[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: reducers: Update eventLogging documentation

2017-04-14 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348266 )

Change subject: reducers: Update eventLogging documentation
..

reducers: Update eventLogging documentation

Bug: T159490
Change-Id: Ica8363ffb166cf4e1583b481a7055f6d1678ccf4
---
M resources/dist/index.js
M resources/dist/index.js.map
M src/reducers/eventLogging.js
3 files changed, 55 insertions(+), 29 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: media: Capture stderr when running 'convert --version'

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

Change subject: media: Capture stderr when running 'convert --version'
..


media: Capture stderr when running 'convert --version'

At Wikimedia, $wgImageMagickConvertCommand points to a shell wrapper
that invokes ImageMagick convert with:

  firejail --profile=/etc/firejail/mediawiki-converters.profile

firejail emits to stderr an information message:

  Reading profile /etc/firejail/mediawiki-converters.profile

That ends up in HHVM stderr and is populated up to logstash as an error.

MediaWiki does check imagemagick version by running `convert -version`,
switch from wfShellExec() to wfShellExecWithStderr().

Bug: T158649
Change-Id: I78d1ef59533c605f59b42e10556bb595d6c2cc15
---
M includes/media/TransformationalImageHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/media/TransformationalImageHandler.php 
b/includes/media/TransformationalImageHandler.php
index 1ab0f36..2a74e0d 100644
--- a/includes/media/TransformationalImageHandler.php
+++ b/includes/media/TransformationalImageHandler.php
@@ -521,7 +521,7 @@
$cmd = wfEscapeShellArg( 
$wgImageMagickConvertCommand ) . ' -version';
wfDebug( $method . ": Running convert 
-version\n" );
$retval = '';
-   $return = wfShellExec( $cmd, $retval );
+   $return = wfShellExecWithStderr( $cmd, $retval 
);
$x = preg_match(
'/Version: ImageMagick 
([0-9]*\.[0-9]*\.[0-9]*)/', $return, $matches
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78d1ef59533c605f59b42e10556bb595d6c2cc15
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Update karma to 1.5.0, karma-firefox-launcher to 1.0.1

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

Change subject: build: Update karma to 1.5.0, karma-firefox-launcher to 1.0.1
..


build: Update karma to 1.5.0, karma-firefox-launcher to 1.0.1

karma:
 Changelog at https://github.com/karma-runner/karma/releases
 https://github.com/karma-runner/karma/compare/v1.1.0...v1.5.0

karma-firefox-launcher:
 Changelog at 
https://github.com/karma-runner/karma-firefox-launcher/blob/master/CHANGELOG.md#101-2017-03-04
 https://github.com/karma-runner/karma-firefox-launcher/compare/v1.0.0...v1.0.1


Karma v1.1.1 added use of 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Consider languages being it's own parent in LanguageFallback...

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

Change subject: Consider languages being it's own parent in 
LanguageFallbackChainFactory
..


Consider languages being it's own parent in LanguageFallbackChainFactory

As far as I can tell this change is not that relevant in production because
we are currently exclusively using the …::FALLBACK_ALL mode in production.
But I feel this makes the code more clean and behave more like you would
expect: if you don't ask for a self-reference, you should not get one, even
if it is in core's variants list for some reason.

Bug: T156280
Change-Id: I1d9691c784032669979f8109c9a5f65cbf4122c9
---
M lib/includes/LanguageFallbackChainFactory.php
M lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
2 files changed, 28 insertions(+), 12 deletions(-)

Approvals:
  Smalyshev: Looks good to me, but someone else must approve
  C. Scott Ananian: Looks good to me, but someone else must approve
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/includes/LanguageFallbackChainFactory.php 
b/lib/includes/LanguageFallbackChainFactory.php
index 0c4cda0..7d12a73 100644
--- a/lib/includes/LanguageFallbackChainFactory.php
+++ b/lib/includes/LanguageFallbackChainFactory.php
@@ -99,7 +99,7 @@
 * @param Language|string $language Language object or language code as 
string
 * @param int $mode Bitfield of self::FALLBACK_*
 * @param LanguageFallbackChain[] $chain for recursive calls
-* @param array $fetched for recursive calls
+* @param bool[] $fetched for recursive calls
 *
 * @throws InvalidArgumentException
 * @return LanguageWithConversion[]
@@ -123,16 +123,16 @@
}
 
if ( $mode & self::FALLBACK_VARIANTS ) {
-   /** @var Language $parentLanguage */
-   $pieces = explode( '-', $languageCode );
-   if ( !in_array( $pieces[0], 
LanguageConverter::$languagesWithVariants ) ) {
-   $parentLanguage = null;
-   } else {
+   $parentLanguage = null;
+   $pieces = explode( '-', $languageCode, 2 );
+
+   if ( in_array( $pieces[0], 
LanguageConverter::$languagesWithVariants ) ) {
if ( is_string( $language ) ) {
$language = Language::factory( 
$language );
}
$parentLanguage = 
$language->getParentLanguage();
}
+
if ( $parentLanguage ) {
// It's less likely to trigger conversion 
mistakes by converting
// zh-tw to zh-hk first instead of converting 
zh-cn to zh-tw.
@@ -147,12 +147,14 @@
}
 
foreach ( $variants as $variant ) {
-   if ( isset( $fetched[$variant] ) || 
!$parentLanguage->hasVariant( $variant ) ) {
-   continue;
+   if ( !isset( $fetched[$variant] )
+   // The self::FALLBACK_SELF mode 
is already responsible for self-references.
+   && $variant !== $languageCode
+   && $parentLanguage->hasVariant( 
$variant )
+   ) {
+   $chain[] = 
LanguageWithConversion::factory( $language, $variant );
+   $fetched[$variant] = true;
}
-
-   $chain[] = 
LanguageWithConversion::factory( $language, $variant );
-   $fetched[$variant] = true;
}
}
}
diff --git a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php 
b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
index e4c871e..b5e0903 100644
--- a/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
+++ b/lib/tests/phpunit/LanguageFallbackChainFactoryTest.php
@@ -218,7 +218,21 @@
[ 'zh', 'zh-sg' ],
[ 'zh', 'zh-mo' ],
[ 'zh', 'zh-my' ],
-   [ 'zh', 'zh' ],
+   ]
+   ],
+   [
+   'languageCode' => 'zh',
+   'mode' => 
LanguageFallbackChainFactory::FALLBACK_SELF | 
LanguageFallbackChainFactory::FALLBACK_VARIANTS,
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: build: Update karma from v1.1.0 to v1.1.1

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

Change subject: build: Update karma from v1.1.0 to v1.1.1
..

build: Update karma from v1.1.0 to v1.1.1

Since the switch to karma-mocha-reporter in c35a2c0567 log messages
from mw.log.warn or console.error were no longer shown in Jenkins.

This was fixed upstream:
* https://github.com/litixsoft/karma-mocha-reporter/issues/67
* https://github.com/karma-runner/karma/releases/tag/v1.1.1
* https://github.com/karma-runner/karma/pull/2220

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


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

diff --git a/package.json b/package.json
index 762c5e7..b535acb 100644
--- a/package.json
+++ b/package.json
@@ -19,7 +19,7 @@
 "grunt-karma": "2.0.0",
 "grunt-stylelint": "0.7.0",
 "grunt-webdriver": "2.0.3",
-"karma": "1.1.0",
+"karma": "1.1.1",
 "karma-chrome-launcher": "2.0.0",
 "karma-firefox-launcher": "1.0.0",
 "karma-mocha-reporter": "2.2.3",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfbbe76d2f9069b9825c9f1602802b3dbc5ad82d
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...WikimediaMaintenance[master]: Add linter tables to all wikis

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

Change subject: Add linter tables to all wikis
..


Add linter tables to all wikis

Kinda needed when extension gets enabled everywhere...

Bug: T148609
Change-Id: Iccba38b3873a532aa8673e2436108f2d18ea5178
---
M addWiki.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/addWiki.php b/addWiki.php
index f30084a..92b154f 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -103,6 +103,7 @@
$dbw->sourceFile( 
"$IP/extensions/AccountAudit/accountaudit.sql" );
$dbw->sourceFile( 
"$IP/extensions/BetaFeatures/sql/create_counts.sql" );
$dbw->sourceFile( "$IP/extensions/SecurePoll/SecurePoll.sql" );
+   $dbw->sourceFile( "$IP/extensions/Linter/linter.sql" );
 
// most wikis are wikibase client wikis and no harm to adding 
this everywhere
$dbw->sourceFile( 
"$IP/extensions/Wikidata/extensions/Wikibase/client/sql/entity_usage.sql" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccba38b3873a532aa8673e2436108f2d18ea5178
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Use Parser::SFH_OBJECT_ARGS statically

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

Change subject: Use Parser::SFH_OBJECT_ARGS statically
..


Use Parser::SFH_OBJECT_ARGS statically

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

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



diff --git a/includes/PF_Hooks.php b/includes/PF_Hooks.php
index b3219e5..026496f 100644
--- a/includes/PF_Hooks.php
+++ b/includes/PF_Hooks.php
@@ -143,8 +143,8 @@
$parser->setFunctionHook( 'formlink', array( 
'PFParserFunctions', 'renderFormLink' ) );
$parser->setFunctionHook( 'formredlink', array( 
'PFParserFunctions', 'renderFormRedLink' ) );
$parser->setFunctionHook( 'queryformlink', array( 
'PFParserFunctions', 'renderQueryFormLink' ) );
-   $parser->setFunctionHook( 'arraymap', array( 
'PFParserFunctions', 'renderArrayMap' ), $parser::SFH_OBJECT_ARGS );
-   $parser->setFunctionHook( 'arraymaptemplate', array( 
'PFParserFunctions', 'renderArrayMapTemplate' ), $parser::SFH_OBJECT_ARGS );
+   $parser->setFunctionHook( 'arraymap', array( 
'PFParserFunctions', 'renderArrayMap' ), Parser::SFH_OBJECT_ARGS );
+   $parser->setFunctionHook( 'arraymaptemplate', array( 
'PFParserFunctions', 'renderArrayMapTemplate' ), Parser::SFH_OBJECT_ARGS );
 
$parser->setFunctionHook( 'autoedit', array( 
'PFParserFunctions', 'renderAutoEdit' ) );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PopupPages[master]: Remove dead code about SFH_OBJECT_ARGS

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

Change subject: Remove dead code about SFH_OBJECT_ARGS
..


Remove dead code about SFH_OBJECT_ARGS

Use Parser::SFH_OBJECT_ARGS if needed

Change-Id: I8e21d6f807f1dbe4a906e217029cea572e026eb2
---
M PopupPages.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/PopupPages.php b/PopupPages.php
index 4cf2897..b637e3b 100644
--- a/PopupPages.php
+++ b/PopupPages.php
@@ -43,9 +43,9 @@
 $wgHooks['ParserFirstCallInit'][] = 'wfPopupPageFunctions';
 function wfPopupPageFunctions( &$parser ) {
 $wgPopupPageFunctions = new PopupPageFunctions();
-$parser->setFunctionHook( 'popup', 'PopupPageFunctions::popup' );#, 
SFH_OBJECT_ARGS );
-$parser->setFunctionHook( 'popupcloser', 'PopupPageFunctions::closer' );#, 
SFH_OBJECT_ARGS );
-$parser->setFunctionHook( 'popupputter', 'PopupPageFunctions::putter' );#, 
SFH_OBJECT_ARGS );
+$parser->setFunctionHook( 'popup', 'PopupPageFunctions::popup' );
+$parser->setFunctionHook( 'popupcloser', 'PopupPageFunctions::closer' );
+$parser->setFunctionHook( 'popupputter', 'PopupPageFunctions::putter' );
 return true;
 }
 $wgExtensionMessagesFiles['PopupPagesExtension'] = $popupDir . 
'PopupPages.i18n.php';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Remove deprecated PHP entry point

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

Change subject: Remove deprecated PHP entry point
..


Remove deprecated PHP entry point

Bug: T140007
Change-Id: I9ed57903e319ac23b929561c5bad880a69dd5374
---
D WikidataPageBanner.php
M extension.json
2 files changed, 1 insertion(+), 24 deletions(-)

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



diff --git a/WikidataPageBanner.php b/WikidataPageBanner.php
deleted file mode 100644
index 2590d11..000
--- a/WikidataPageBanner.php
+++ /dev/null
@@ -1,23 +0,0 @@
-http://mediawiki.org/wiki/Extension:WikidataPageBanner
- * @author Sumit Asthana, 2015
- * @license GNU General Public Licence 2.0 or later
- */
-
-if ( function_exists( 'wfLoadExtension' ) ) {
-   wfLoadExtension( 'WikidataPageBanner' );
-   // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['WikidataPageBanner'] = __DIR__ . '/i18n';
-   $wgExtensionMessagesFiles['WikidataPageBannerMagic'] =
-   __DIR__ . '/WikidataPageBanner.i18n.magic.php';
-   /* wfWarn(
-   'Deprecated PHP entry point used for WikidataPageBanner 
extension. Please use wfLoadExtension'.
-   'instead, see 
https://www.mediawiki.org/wiki/Extension_registration for more details.'
-   ); */
-   return;
-} else {
-   die( 'This version of the WikidataPageBanner extension requires 
MediaWiki 1.25+' );
-}
diff --git a/extension.json b/extension.json
index baed1a9..71cbd4d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,7 +1,7 @@
 {
"name": "WikidataPageBanner",
"namemsg": "wikidatapagebanner-extensionname",
-   "version": "0.0.1",
+   "version": "0.0.2",
"author": [
"Sumit Asthana"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ed57903e319ac23b929561c5bad880a69dd5374
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...NumerAlpha[master]: Use Parser::SFH_OBJECT_ARGS class const

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

Change subject: Use Parser::SFH_OBJECT_ARGS class const
..


Use Parser::SFH_OBJECT_ARGS class const

Instead of the global const

Change-Id: I810777281905393f341480c629fa922d28f88777
---
M NumerAlpha.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/NumerAlpha.class.php b/NumerAlpha.class.php
index 3af42a5..fc7938d 100755
--- a/NumerAlpha.class.php
+++ b/NumerAlpha.class.php
@@ -51,7 +51,7 @@
'NumerAlpha',  // class to call function from
'renderCounter' // function to call within that 
class
),
-   SFH_OBJECT_ARGS
+   Parser::SFH_OBJECT_ARGS
);
 
return true;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PipeEscape[master]: Use Parser::SFH_OBJECT_ARGS class const

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

Change subject: Use Parser::SFH_OBJECT_ARGS class const
..


Use Parser::SFH_OBJECT_ARGS class const

Instead of the global const

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

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



diff --git a/ExtPipeEsc.php b/ExtPipeEsc.php
index ebea679..41291c0 100644
--- a/ExtPipeEsc.php
+++ b/ExtPipeEsc.php
@@ -9,7 +9,7 @@
// register each hook
foreach( self::$parserFunctions as $hook => $function )
$parser->setFunctionHook( $hook,
-   array( __CLASS__, $function ), SFH_OBJECT_ARGS 
);
+   array( __CLASS__, $function ), 
Parser::SFH_OBJECT_ARGS );
return true;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Use same indent in package.json

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

Change subject: Use same indent in package.json
..


Use same indent in package.json

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

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



diff --git a/package.json b/package.json
index 71cdeb8..bb2077c 100644
--- a/package.json
+++ b/package.json
@@ -4,7 +4,7 @@
 "test": "grunt test"
   },
   "devDependencies": {
-   "eslint-config-wikimedia": "0.3.0",
+"eslint-config-wikimedia": "0.3.0",
 "grunt": "1.0.1",
 "grunt-banana-checker": "0.5.0",
 "grunt-eslint": "19.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic92c30f4cd47abbd942d2cb5588ef139945de577
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: XenoRyet 
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...RelatedArticles[master]: tests: Don't assume synchronous jQuery.Deferred

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

Change subject: tests: Don't assume synchronous jQuery.Deferred
..


tests: Don't assume synchronous jQuery.Deferred

Bug: T124742
Change-Id: I8289d88fa61447ba31e7b767727775ead411987e
---
M tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
1 file changed, 10 insertions(+), 10 deletions(-)

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



diff --git 
a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js 
b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
index c2b2f32..f4219ee 100644
--- 
a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
+++ 
b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
@@ -26,48 +26,48 @@
}
} );
 
-   QUnit.test( 'Returns an array with the results when api responds', 2, 
function ( assert ) {
+   QUnit.test( 'Returns an array with the results when api responds', 
function ( assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', null, 
true );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.strictEqual( results[ 0 ].title, 'Oh noes' );
} );
} );
 
-   QUnit.test( 'Empty related pages is handled fine.', 2, function ( 
assert ) {
+   QUnit.test( 'Empty related pages is handled fine.', function ( assert ) 
{
var gateway = new RelatedPagesGateway( this.api, 'Foo', null, 
true );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( emptyRelatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.strictEqual( results.length, 0 );
} );
} );
 
-   QUnit.test( 'Empty related pages with no cirrus search is handled fine. 
No API request.', 3, function ( assert ) {
+   QUnit.test( 'Empty related pages with no cirrus search is handled fine. 
No API request.', function ( assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', [], 
false ),
spy = this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.ok( !spy.called, 'API is not invoked' );
assert.strictEqual( results.length, 0 );
} );
} );
 
-   QUnit.test( 'Related pages from editor curated content', 1, function ( 
assert ) {
+   QUnit.test( 'Related pages from editor curated content', function ( 
assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', [ { 
title: 1 } ], false );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.strictEqual( results.length, 1,
'API still hit despite cirrus being disabled.' 
);
} );
} );
 
-   QUnit.test( 'Ignore related pages from editor curated content', 1, 
function ( assert ) {
+   QUnit.test( 'Ignore related pages from editor curated content', 
function ( assert ) {
var wgRelatedArticles = [
'Bar',
'Baz',
@@ -79,7 +79,7 @@
spy = this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function () {
+   return gateway.getForCurrentPage( 1 ).then( function () {
var parameters = spy.lastCall.args[ 0 ];
 
assert.strictEqual(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8289d88fa61447ba31e7b767727775ead411987e
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Make LogFormatterTest less slow

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

Change subject: phpunit: Make LogFormatterTest less slow
..


phpunit: Make LogFormatterTest less slow

Right now it's quite slow because it reloads LocalisationCache
for every test case.

Change the reload to only happen once for the entire class.

Also use RequestContext instead of wgLang to match logic in
the parent class (MediaWikiLangTestCase).

$ phpunit includes/logging/LogFormatterTest.php
Before
- run 1) Time: 23.56 seconds, Memory: 48.00MB
- run 2) Time: 22.41 seconds, Memory: 48.75MB
After
- run 1) Time: 14.27 seconds, Memory: 47.50MB
- run 2) Time: 13.45 seconds, Memory: 47.25MB

Change-Id: Ia791563ca9094c36782acfe9826def45f2a1d621
---
M tests/phpunit/includes/logging/LogFormatterTest.php
1 file changed, 19 insertions(+), 13 deletions(-)

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



diff --git a/tests/phpunit/includes/logging/LogFormatterTest.php 
b/tests/phpunit/includes/logging/LogFormatterTest.php
index c2b791e..1ef3df6 100644
--- a/tests/phpunit/includes/logging/LogFormatterTest.php
+++ b/tests/phpunit/includes/logging/LogFormatterTest.php
@@ -4,6 +4,7 @@
  * @group Database
  */
 class LogFormatterTest extends MediaWikiLangTestCase {
+   private static $oldExtMsgFiles;
 
/**
 * @var User
@@ -30,20 +31,32 @@
 */
protected $user_comment;
 
+   public static function setUpBeforeClass() {
+   parent::setUpBeforeClass();
+
+   global $wgExtensionMessagesFiles;
+   self::$oldExtMsgFiles = $wgExtensionMessagesFiles;
+   $wgExtensionMessagesFiles['LogTests'] = __DIR__ . 
'/LogTests.i18n.php';
+   Language::getLocalisationCache()->recache( 'en' );
+   }
+
+   public static function tearDownAfterClass() {
+   global $wgExtensionMessagesFiles;
+   $wgExtensionMessagesFiles = self::$oldExtMsgFiles;
+   Language::getLocalisationCache()->recache( 'en' );
+
+   parent::tearDownAfterClass();
+   }
+
protected function setUp() {
parent::setUp();
-
-   global $wgLang;
 
$this->setMwGlobals( [
'wgLogTypes' => [ 'phpunit' ],
'wgLogActionsHandlers' => [ 'phpunit/test' => 
'LogFormatter',
'phpunit/param' => 'LogFormatter' ],
'wgUser' => User::newFromName( 'Testuser' ),
-   'wgExtensionMessagesFiles' => [ 'LogTests' => __DIR__ . 
'/LogTests.i18n.php' ],
] );
-
-   Language::getLocalisationCache()->recache( $wgLang->getCode() );
 
$this->user = User::newFromName( 'Testuser' );
$this->title = Title::newFromText( 'SomeTitle' );
@@ -52,16 +65,9 @@
$this->context = new RequestContext();
$this->context->setUser( $this->user );
$this->context->setTitle( $this->title );
-   $this->context->setLanguage( $wgLang );
+   $this->context->setLanguage( 
RequestContext::getMain()->getLanguage() );
 
$this->user_comment = '';
-   }
-
-   protected function tearDown() {
-   parent::tearDown();
-
-   global $wgLang;
-   Language::getLocalisationCache()->recache( $wgLang->getCode() );
}
 
public function newLogEntry( $action, $params ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia791563ca9094c36782acfe9826def45f2a1d621
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: Replace use of deprecated jQuery bind() with on()

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

Change subject: Replace use of deprecated jQuery bind() with on()
..


Replace use of deprecated jQuery bind() with on()

bind() wasnt removed any in jQuery 3, merely deprecated, but
might as well fix now.

Change-Id: I27548f2bf436c8a221ac3fa80ffb857c65a731a5
---
M modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js 
b/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js
index cd14c34..8ec9e09 100644
--- a/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js
+++ b/modules/mediawiki.libs.guiders/mediawiki.libs.guiders.js
@@ -176,7 +176,7 @@
guiderButtonsContainer.append(thisButtonElem);
 
if (thisButton.onclick) {
-   thisButtonElem.bind('click', 
guiders._makeButtonListener(thisButton.onclick));
+   thisButtonElem.on('click', 
guiders._makeButtonListener(thisButton.onclick));
}
}
 
@@ -216,11 +216,11 @@
 
// myGuider is passed though it's not currently used.
guiders._unWireEscape = function (/* myGuider */) {
-   $(document).unbind('keydown');
+   $(document).off('keydown');
};
 
guiders._wireClickOutside = function (myGuider) {
-   $(document).bind('click.guiders', function (event) {
+   $(document).on('click.guiders', function (event) {
if ($(event.target).closest('.guider').length === 0) {
guiders.handleOnClose(myGuider, true, 
'clickOutside' /* close by clicking outside */);
if (event.target.id === 'guider_overlay') {
@@ -231,7 +231,7 @@
};
 
guiders._unWireClickOutside = function () {
-   $(document).unbind('click.guiders');
+   $(document).off('click.guiders');
};
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I27548f2bf436c8a221ac3fa80ffb857c65a731a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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/core[master]: qunit: Improve testrunner logging for pending ajax

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

Change subject: qunit: Improve testrunner logging for pending ajax
..


qunit: Improve testrunner logging for pending ajax

* Move `restoreWarnings()` in tearDown() to the mirrored location
  of related code in setUp().

* Ensure that accidentally calling `suppressWarnings()` twice will
  not wipe out the original reference indefinitely. If it was
  already set, subsequent calls should do nothing instead of
  overwriting them again so that recovery is still possible.

* Log all ajax requests logged during the test, not just the
  one currently still pending. This should avoid situations
  where we throw "Pending ajax requests" but no information
  is logged about which requests those might be.

Change-Id: I900ad98c4c8520bdd6ae00a24ac82272f3becfee
---
M tests/qunit/data/testrunner.js
1 file changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index b0118af..55bd276 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -131,9 +131,11 @@
liveMessages = mw.messages;
 
function suppressWarnings() {
-   warn = mw.log.warn;
-   error = mw.log.error;
-   mw.log.warn = mw.log.error = $.noop;
+   if ( warn === undefined ) {
+   warn = mw.log.warn;
+   error = mw.log.error;
+   mw.log.warn = mw.log.error = $.noop;
+   }
}
 
function restoreWarnings() {
@@ -215,6 +217,10 @@
// Stop tracking ajax requests
$( document ).off( 'ajaxSend', 
trackAjax );
 
+   // As a convenience feature, 
automatically restore warnings if they're
+   // still suppressed by the end of the 
test.
+   restoreWarnings();
+
// Farewell, mock environment!
mw.config = liveConfig;
mw.messages = liveMessages;
@@ -222,10 +228,6 @@
mw.jqueryMsg.setParserDefaults( {
messages: liveMessages
} );
-
-   // As a convenience feature, 
automatically restore warnings if they're
-   // still suppressed by the end of the 
test.
-   restoreWarnings();
 
// Tests should use fake timers or wait 
for animations to complete
// Check for incomplete 
animations/requests/etc and throw if there are any.
@@ -253,8 +255,11 @@
mw.log.warn( 'Pending 
requests does not match jQuery.active count' );
}
// Force requests to stop to 
give the next test a clean start
-   $.each( pending, function ( i, 
ajax ) {
-   mw.log.warn( 'Pending 
AJAX request #' + i, ajax.options );
+   $.each( ajaxRequests, function 
( i, ajax ) {
+   mw.log.warn(
+   'AJAX request 
#' + i + ' (state: ' + ajax.xhr.state() + ')',
+   ajax.options
+   );
ajax.xhr.abort();
} );
ajaxRequests = [];

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

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

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


[MediaWiki-commits] [Gerrit] oojs/core[master]: EventEmitter: Factor out private addBinding() from on()

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

Change subject: EventEmitter: Factor out private addBinding() from on()
..


EventEmitter: Factor out private addBinding() from on()

In preparation of refactoring once().

Bug: T101411
Change-Id: I784a87d7e3a7c1198812bd41f47e97b11649940c
---
M src/EventEmitter.js
1 file changed, 19 insertions(+), 10 deletions(-)

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



diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index 494f145..f8d8e87 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -51,6 +51,24 @@
}
}
 
+   /**
+* @private
+* @param {OO.EventEmitter} ee
+* @param {Function|string} method Function or method name
+* @param {Object} binding
+*/
+   function addBinding( ee, event, binding ) {
+   var bindings;
+   // Auto-initialize bindings list
+   if ( hasOwn.call( ee.bindings, event ) ) {
+   bindings = ee.bindings[ event ];
+   } else {
+   bindings = ee.bindings[ event ] = [];
+   }
+   // Add binding
+   bindings.push( binding );
+   }
+
/* Methods */
 
/**
@@ -67,18 +85,9 @@
 * @chainable
 */
oo.EventEmitter.prototype.on = function ( event, method, args, context 
) {
-   var bindings;
-
validateMethod( method, context );
 
-   if ( hasOwn.call( this.bindings, event ) ) {
-   bindings = this.bindings[ event ];
-   } else {
-   // Auto-initialize bindings list
-   bindings = this.bindings[ event ] = [];
-   }
-   // Add binding
-   bindings.push( {
+   addBinding( this, event, {
method: method,
args: args,
context: ( arguments.length < 4 ) ? null : context

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I784a87d7e3a7c1198812bd41f47e97b11649940c
Gerrit-PatchSet: 2
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
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...PopupPages[master]: Remove dead code about SFH_OBJECT_ARGS

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348264 )

Change subject: Remove dead code about SFH_OBJECT_ARGS
..

Remove dead code about SFH_OBJECT_ARGS

Use Parser::SFH_OBJECT_ARGS if needed

Change-Id: I8e21d6f807f1dbe4a906e217029cea572e026eb2
---
M PopupPages.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/PopupPages.php b/PopupPages.php
index 4cf2897..b637e3b 100644
--- a/PopupPages.php
+++ b/PopupPages.php
@@ -43,9 +43,9 @@
 $wgHooks['ParserFirstCallInit'][] = 'wfPopupPageFunctions';
 function wfPopupPageFunctions( &$parser ) {
 $wgPopupPageFunctions = new PopupPageFunctions();
-$parser->setFunctionHook( 'popup', 'PopupPageFunctions::popup' );#, 
SFH_OBJECT_ARGS );
-$parser->setFunctionHook( 'popupcloser', 'PopupPageFunctions::closer' );#, 
SFH_OBJECT_ARGS );
-$parser->setFunctionHook( 'popupputter', 'PopupPageFunctions::putter' );#, 
SFH_OBJECT_ARGS );
+$parser->setFunctionHook( 'popup', 'PopupPageFunctions::popup' );
+$parser->setFunctionHook( 'popupcloser', 'PopupPageFunctions::closer' );
+$parser->setFunctionHook( 'popupputter', 'PopupPageFunctions::putter' );
 return true;
 }
 $wgExtensionMessagesFiles['PopupPagesExtension'] = $popupDir . 
'PopupPages.i18n.php';

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

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

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


[MediaWiki-commits] [Gerrit] oojs/core[master]: build: Remove left-over jshint config file in dist/

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

Change subject: build: Remove left-over jshint config file in dist/
..


build: Remove left-over jshint config file in dist/

Follow-up to b9ed094. Without this, there is a warning about uncommitted
removal of dist/.jshintrc during development, because the 'grunt build'
task ends up removing it as part of 'grunt clear'.

Change-Id: Ia3e67726dbb065ed9d63805b4dab2f621bd8b9ad
---
D dist/.jshintrc
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/dist/.jshintrc b/dist/.jshintrc
deleted file mode 100644
index f0d20f4..000
--- a/dist/.jshintrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-   "undef": false,
-   "unused": false,
-
-   "extends": "../.jshintrc"
-}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3e67726dbb065ed9d63805b4dab2f621bd8b9ad
Gerrit-PatchSet: 2
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
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...PageForms[master]: Use Parser::SFH_OBJECT_ARGS statically

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348263 )

Change subject: Use Parser::SFH_OBJECT_ARGS statically
..

Use Parser::SFH_OBJECT_ARGS statically

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


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

diff --git a/includes/PF_Hooks.php b/includes/PF_Hooks.php
index b3219e5..026496f 100644
--- a/includes/PF_Hooks.php
+++ b/includes/PF_Hooks.php
@@ -143,8 +143,8 @@
$parser->setFunctionHook( 'formlink', array( 
'PFParserFunctions', 'renderFormLink' ) );
$parser->setFunctionHook( 'formredlink', array( 
'PFParserFunctions', 'renderFormRedLink' ) );
$parser->setFunctionHook( 'queryformlink', array( 
'PFParserFunctions', 'renderQueryFormLink' ) );
-   $parser->setFunctionHook( 'arraymap', array( 
'PFParserFunctions', 'renderArrayMap' ), $parser::SFH_OBJECT_ARGS );
-   $parser->setFunctionHook( 'arraymaptemplate', array( 
'PFParserFunctions', 'renderArrayMapTemplate' ), $parser::SFH_OBJECT_ARGS );
+   $parser->setFunctionHook( 'arraymap', array( 
'PFParserFunctions', 'renderArrayMap' ), Parser::SFH_OBJECT_ARGS );
+   $parser->setFunctionHook( 'arraymaptemplate', array( 
'PFParserFunctions', 'renderArrayMapTemplate' ), Parser::SFH_OBJECT_ARGS );
 
$parser->setFunctionHook( 'autoedit', array( 
'PFParserFunctions', 'renderAutoEdit' ) );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PagesList[master]: Use Parser::SFH_OBJECT_ARGS class const

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348262 )

Change subject: Use Parser::SFH_OBJECT_ARGS class const
..

Use Parser::SFH_OBJECT_ARGS class const

Instead of the global const

Change-Id: I1b487c4172697c53d04e825ee4281fa98d69e9ca
---
M PagesList.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/PagesList.hooks.php b/PagesList.hooks.php
index 5cf59fb..446fe38 100644
--- a/PagesList.hooks.php
+++ b/PagesList.hooks.php
@@ -51,7 +51,7 @@
 * @return boolean
 */
public static function setupParserFunction( Parser &$parser ) {
-   $parser->setFunctionHook( 'pageslist', __CLASS__ . 
'::pageslistParserFunction', SFH_OBJECT_ARGS );
+   $parser->setFunctionHook( 'pageslist', __CLASS__ . 
'::pageslistParserFunction', Parser::SFH_OBJECT_ARGS );
 
return true;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PipeEscape[master]: Use Parser::SFH_OBJECT_ARGS class const

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348261 )

Change subject: Use Parser::SFH_OBJECT_ARGS class const
..

Use Parser::SFH_OBJECT_ARGS class const

Instead of the global const

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


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

diff --git a/ExtPipeEsc.php b/ExtPipeEsc.php
index ebea679..41291c0 100644
--- a/ExtPipeEsc.php
+++ b/ExtPipeEsc.php
@@ -9,7 +9,7 @@
// register each hook
foreach( self::$parserFunctions as $hook => $function )
$parser->setFunctionHook( $hook,
-   array( __CLASS__, $function ), SFH_OBJECT_ARGS 
);
+   array( __CLASS__, $function ), 
Parser::SFH_OBJECT_ARGS );
return true;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...NumerAlpha[master]: Use Parser::SFH_OBJECT_ARGS class const

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348260 )

Change subject: Use Parser::SFH_OBJECT_ARGS class const
..

Use Parser::SFH_OBJECT_ARGS class const

Instead of the global const

Change-Id: I810777281905393f341480c629fa922d28f88777
---
M NumerAlpha.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/NumerAlpha.class.php b/NumerAlpha.class.php
index 3af42a5..fc7938d 100755
--- a/NumerAlpha.class.php
+++ b/NumerAlpha.class.php
@@ -51,7 +51,7 @@
'NumerAlpha',  // class to call function from
'renderCounter' // function to call within that 
class
),
-   SFH_OBJECT_ARGS
+   Parser::SFH_OBJECT_ARGS
);
 
return true;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikidataPageBanner[master]: Use Parser::SFH_NO_HASH class const

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348259 )

Change subject: Use Parser::SFH_NO_HASH class const
..

Use Parser::SFH_NO_HASH class const

Instead of the global const

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


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

diff --git a/includes/WikidataPageBanner.hooks.php 
b/includes/WikidataPageBanner.hooks.php
index 53d6edd..c046fcb 100755
--- a/includes/WikidataPageBanner.hooks.php
+++ b/includes/WikidataPageBanner.hooks.php
@@ -304,7 +304,7 @@
 * @return bool
 */
public static function onParserFirstCallInit( Parser $parser ) {
-   $parser->setFunctionHook( 'PAGEBANNER', 
'WikidataPageBanner::addCustomBanner', SFH_NO_HASH );
+   $parser->setFunctionHook( 'PAGEBANNER', 
'WikidataPageBanner::addCustomBanner', Parser::SFH_NO_HASH );
return true;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...NumberOfComments[master]: Use Parser::SFH_NO_HASH class const

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348258 )

Change subject: Use Parser::SFH_NO_HASH class const
..

Use Parser::SFH_NO_HASH class const

Instead of the global const

Change-Id: I9beb2013c2f0474f4832c8a4a6c41e4b5d9197e3
---
M NumberOfComments.body.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/NumberOfComments.body.php b/NumberOfComments.body.php
index ea3788b..5ade0a7 100644
--- a/NumberOfComments.body.php
+++ b/NumberOfComments.body.php
@@ -8,7 +8,7 @@
}
 
static function setupNumberOfCommentsParser( &$parser ) {
-   $parser->setFunctionHook( 'NoC', 
'NumberOfComments::getNumberOfCommentsParser', SFH_NO_HASH );
+   $parser->setFunctionHook( 'NoC', 
'NumberOfComments::getNumberOfCommentsParser', Parser::SFH_NO_HASH );
return true;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: themes: Align `@size-*-min` variable to naming scheme and re...

2017-04-14 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348257 )

Change subject: themes: Align `@size-*-min` variable to naming scheme and rename
..

themes: Align `@size-*-min` variable to naming scheme and rename

Aligning `@size-*-min` variable to naming scheme by renaming it to
`@min-size-*`.

Change-Id: Ib30efca433b6ca73bdbf5d9f04ff964322d7d83d
---
M src/styles/elements/IconElement.less
M src/styles/elements/IndicatorElement.less
M src/themes/apex/common.less
M src/themes/blank/common.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
6 files changed, 17 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/57/348257/1

diff --git a/src/styles/elements/IconElement.less 
b/src/styles/elements/IconElement.less
index 4a76b4f..120454b 100644
--- a/src/styles/elements/IconElement.less
+++ b/src/styles/elements/IconElement.less
@@ -7,10 +7,10 @@
background-position: center center;
background-repeat: no-repeat;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
-   min-width: @size-icon-min;
+   min-width: @min-size-icon;
width: @size-icon;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
-   min-height: @size-icon-min;
+   min-height: @min-size-icon;
height: @size-icon;
}
 
diff --git a/src/styles/elements/IndicatorElement.less 
b/src/styles/elements/IndicatorElement.less
index 5584dbd..b4a6a6d 100644
--- a/src/styles/elements/IndicatorElement.less
+++ b/src/styles/elements/IndicatorElement.less
@@ -7,10 +7,10 @@
background-position: center center;
background-repeat: no-repeat;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
-   min-width: @size-indicator-min;
+   min-width: @min-size-indicator;
width: @size-indicator;
// Support: IE11, Edge 12+ (T94494), Firefox 31.5 (T93636)
-   min-height: @size-indicator-min;
+   min-height: @min-size-indicator;
height: @size-indicator;
}
 
diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less
index 819b106..622e4c9 100644
--- a/src/themes/apex/common.less
+++ b/src/themes/apex/common.less
@@ -24,12 +24,13 @@
 @color-subtle: #767676;
 
 // Box Sizes
+// `@*size` variables are used for `*width` & `*height` properties
+@min-size-icon: 24px;
+@min-size-indicator: 12px;
 @max-width-default: 50em;
 @max-width-input-default: @max-width-default;
 
 @size-anchor: 6px;
-@size-icon-min: 24px;
-@size-indicator-min: 12px;
 @size-icon: unit( 24 / 16 / 0.8, em );
 @size-indicator: unit( 12 / 16 / 0.8, em );
 
diff --git a/src/themes/blank/common.less b/src/themes/blank/common.less
index 6ec8a32..e76d596 100644
--- a/src/themes/blank/common.less
+++ b/src/themes/blank/common.less
@@ -5,8 +5,9 @@
 @oo-ui-font-size-browser: 16; // assumed browser default of `16px`
 @oo-ui-font-size-default: 0.8em; // equals `12.8px` at browser default of 
`16px`
 
-@size-icon-min: 24px; // values used for `min-height` are defined in `px`, see 
T130691
-@size-indicator-min: 12px;
+// `@*size` variables are used for `*width` & `*height` properties
+@min-size-icon: 24px; // values used for `min-height` are defined in `px`, see 
T130691
+@min-size-indicator: 12px;
 @size-icon: 24 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `1.875em`≈`24px` at base `font-size: 12.8px`
 @size-indicator: 12 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `0.9375em`≈`12px` at base `font-size: 12.8px`
 
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 471b0b5..851c14a 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -61,19 +61,20 @@
 @border-toolbar: @border-width-default solid #c8ccd1;
 
 // Box Sizes
+// `@*size` variables are used for `*width` & `*height` properties
+@size-default: 32 / @oo-ui-font-size-browser / @oo-ui-font-size-default; // 
equals `2.5em`≈`32px`
+
+@min-size-icon: 24px; // values used for `min-height` are defined in `px`, see 
T130691
+@min-size-indicator: 12px;
 @min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 12.8px`
-@min-width-button-combo-widget: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `2.5em`≈`32px`
+@min-width-button-combo-widget: @size-default;
 @min-height-widget-default: @size-default;
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
 @max-width-default: 50em;
 @max-width-input: @max-width-default;
 
-// `@size-*` variables are used for `width` & `height` properties
-@size-default: 32 / 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Moved commas and dots.

2017-04-14 Thread Felipe L. Ewald (Code Review)
Felipe L. Ewald has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348254 )

Change subject: Moved commas and dots.
..

Moved commas and dots.

Change-Id: I09fb50ee5e3fa9d34535b787a1bfd8aa365d880c
---
M languages/i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/348254/2

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index a003a10..93103c2 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1424,9 +1424,9 @@
"rcfilters-filter-categorization-description": "Records of pages being 
added or removed from categories.",
"rcfilters-filter-logactions-label": "Logged actions",
"rcfilters-filter-logactions-description": "Administrative actions, 
account creations, page deletions, uploads",
-   "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor 
edits\" filter conflicts with one or more Type of Change filters, because 
certain types of change cannot be designated as \"minor.\" The conflicting 
filters are marked in the Active Filters area, above.",
-   "rcfilters-hideminor-conflicts-typeofchange": "Certain types of change 
cannot be designated as \"minor,\" so this filter conflicts with the following 
Type of Change filters: $1",
-   "rcfilters-typeofchange-conflicts-hideminor": "This Type of Change 
filter conflicts with the \"Minor Edits\" filter. Certain types of change 
cannot be designated as \"minor.\"",
+   "rcfilters-hideminor-conflicts-typeofchange-global": "The \"Minor 
edits\" filter conflicts with one or more Type of Change filters, because 
certain types of change cannot be designated as \"minor\". The conflicting 
filters are marked in the Active Filters area, above.",
+   "rcfilters-hideminor-conflicts-typeofchange": "Certain types of change 
cannot be designated as \"minor\", so this filter conflicts with the following 
Type of Change filters: $1",
+   "rcfilters-typeofchange-conflicts-hideminor": "This Type of Change 
filter conflicts with the \"Minor Edits\" filter. Certain types of change 
cannot be designated as \"minor\".",
"rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since 
$3, $4 (up to $1 shown).",
"rclistfromreset": "Reset date selection",
"rclistfrom": "Show new changes starting from $2, $3",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09fb50ee5e3fa9d34535b787a1bfd8aa365d880c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Felipe L. Ewald 
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]: MediaWiki theme: Clarify `@min-height-widget-default` usage

2017-04-14 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348256 )

Change subject: MediaWiki theme: Clarify `@min-height-widget-default` usage
..

MediaWiki theme: Clarify `@min-height-widget-default` usage

Clarifying `@min-height-widget-default` usage and application.

Change-Id: I07e3fdaa6bb73922604cfcb5da23cf1ed22ebf56
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/56/348256/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index fe1564e..095dd71 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -64,11 +64,11 @@
 @min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 12.8px`
 @min-width-button-combo-widget: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `2.5em`≈`32px`
 @min-height-widget-default: @size-default;
-@min-height-button-default: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
 @max-width-default: 50em;
 @max-width-input: @max-width-default;
 
+// `@size-*` are used for both `width` & `height` properties
 @size-default: 32 / @oo-ui-font-size-browser / @oo-ui-font-size-default;
 @size-anchor: 9px;
 @size-button-default: @size-default;
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 9a7002f..36dea51 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -208,7 +208,7 @@
 
&-framed {
> .oo-ui-buttonElement-button {
-   min-height: @min-height-button-default;
+   min-height: @min-height-widget-default;
border-radius: @border-radius-default;
padding: @padding-default;
}
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index af1c671..b8194c4 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -464,7 +464,7 @@
 
.oo-ui-buttonElement-button {
min-width: @min-width-button-combo-widget;
-   min-height: @min-height-button-default;
+   min-height: @min-height-widget-default;
padding-left: 0;
 
> .oo-ui-indicatorElement-indicator {
@@ -531,7 +531,7 @@
.oo-ui-inline-spacing( 0.5em );
 
&-handle {
-   min-height: @size-default; // Address label-less widgets
+   min-height: @min-height-widget-default; // Address label-less 
widgets
border: @border-default;
border-radius: @border-radius-default;
padding: @padding-default;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RelatedArticles[master]: tests: Don't assume synchronous jQuery.Deferred

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

Change subject: tests: Don't assume synchronous jQuery.Deferred
..

tests: Don't assume synchronous jQuery.Deferred

Bug: T124742
Change-Id: I8289d88fa61447ba31e7b767727775ead411987e
---
M tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
1 file changed, 10 insertions(+), 10 deletions(-)


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

diff --git 
a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js 
b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
index c2b2f32..f4219ee 100644
--- 
a/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
+++ 
b/tests/qunit/ext.relatedArticles.readMore.gateway/test_RelatedPagesGateway.js
@@ -26,48 +26,48 @@
}
} );
 
-   QUnit.test( 'Returns an array with the results when api responds', 2, 
function ( assert ) {
+   QUnit.test( 'Returns an array with the results when api responds', 
function ( assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', null, 
true );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.strictEqual( results[ 0 ].title, 'Oh noes' );
} );
} );
 
-   QUnit.test( 'Empty related pages is handled fine.', 2, function ( 
assert ) {
+   QUnit.test( 'Empty related pages is handled fine.', function ( assert ) 
{
var gateway = new RelatedPagesGateway( this.api, 'Foo', null, 
true );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( emptyRelatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.strictEqual( results.length, 0 );
} );
} );
 
-   QUnit.test( 'Empty related pages with no cirrus search is handled fine. 
No API request.', 3, function ( assert ) {
+   QUnit.test( 'Empty related pages with no cirrus search is handled fine. 
No API request.', function ( assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', [], 
false ),
spy = this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.ok( $.isArray( results ), 'Results must be an 
array' );
assert.ok( !spy.called, 'API is not invoked' );
assert.strictEqual( results.length, 0 );
} );
} );
 
-   QUnit.test( 'Related pages from editor curated content', 1, function ( 
assert ) {
+   QUnit.test( 'Related pages from editor curated content', function ( 
assert ) {
var gateway = new RelatedPagesGateway( this.api, 'Foo', [ { 
title: 1 } ], false );
this.sandbox.stub( this.api, 'get' ).returns( 
$.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function ( results ) {
+   return gateway.getForCurrentPage( 1 ).then( function ( results 
) {
assert.strictEqual( results.length, 1,
'API still hit despite cirrus being disabled.' 
);
} );
} );
 
-   QUnit.test( 'Ignore related pages from editor curated content', 1, 
function ( assert ) {
+   QUnit.test( 'Ignore related pages from editor curated content', 
function ( assert ) {
var wgRelatedArticles = [
'Bar',
'Baz',
@@ -79,7 +79,7 @@
spy = this.sandbox.stub( this.api, 'get' )
.returns( $.Deferred().resolve( relatedPages ) );
 
-   gateway.getForCurrentPage( 1 ).then( function () {
+   return gateway.getForCurrentPage( 1 ).then( function () {
var parameters = spy.lastCall.args[ 0 ];
 
assert.strictEqual(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Fix pixel regression on SelectFileWidget ic...

2017-04-14 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348253 )

Change subject: MediaWiki theme: Fix pixel regression on SelectFileWidget 
icon/indicator
..

MediaWiki theme: Fix pixel regression on SelectFileWidget icon/indicator

Fixing 1px icon/indicator position regression introduced in Ia841d66723f
The corrected approach is also relying on Less variables and addressing
the issue cleaner.

Change-Id: Ic76860293c3fe268d5bef19440a1a565808e8dd8
---
M src/themes/mediawiki/common.less
M src/themes/mediawiki/widgets.less
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/53/348253/1

diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 1eadeb9..fe1564e 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -63,6 +63,7 @@
 // Box Sizes
 @min-width-button-default: 40 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `3.125em`≈`40px` at base `font-size: 12.8px`
 @min-width-button-combo-widget: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default; // equals `2.5em`≈`32px`
+@min-height-widget-default: @size-default;
 @min-height-button-default: 32 / @oo-ui-font-size-browser / 
@oo-ui-font-size-default;
 @min-height-toggleswitch: 26px; // equals `16px` @size-toggleswitch-grip-min + 
4px*2 distance top/bottom + 1px*2 border top/bottom
 @max-width-default: 50em;
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 5bab5a1..af1c671 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1315,14 +1315,16 @@
border-right-width: 0;
 
> .oo-ui-iconElement-icon {
+   top: -@border-width-default; // Address `border-top` of 
parent element
left: @padding-start-input-text-icon;
-   min-height: 2.4em;
+   min-height: @min-height-widget-default;
margin-left: -@border-width-default; // Address extra 
`border-left` pixel above
}
 
> .oo-ui-indicatorElement-indicator {
+   top: -@border-width-default; // Address `border-top` of 
parent element
right: @padding-horizontal-default;
-   min-height: 2.4em;
+   min-height: @min-height-widget-default;
}
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add grep infos to Parser::getImageParams

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

Change subject: Add grep infos to Parser::getImageParams
..


Add grep infos to Parser::getImageParams

Comments for grep makes searching easier

Change-Id: I98e93baf6bd89df36185d535d6e63c51c6f65bc9
---
M includes/parser/Parser.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 953f021..19f368a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -5141,6 +5141,11 @@
$internalParamMap = [];
foreach ( $internalParamNames as $type => 
$names ) {
foreach ( $names as $name ) {
+   // For grep: img_left, 
img_right, img_center, img_none,
+   // img_baseline, img_sub, 
img_super, img_top, img_text_top, img_middle,
+   // img_bottom, img_text_bottom,
+   // img_thumbnail, 
img_manualthumb, img_framed, img_frameless, img_upright,
+   // img_border, img_link, 
img_alt, img_class
$magicName = str_replace( '-', 
'_', "img_$name" );
$internalParamMap[$magicName] = 
[ $type, $name ];
}

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

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

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


[MediaWiki-commits] [Gerrit] data-values/value-view[master]: Add TabularData datatype

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

Change subject: Add TabularData datatype
..

Add TabularData datatype

Bug: T160048
Change-Id: Iacc868ad2533e002d204d1aec8cb49af858a9606
---
A src/experts/TabularData.js
M src/experts/resources.php
2 files changed, 62 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/data-values/value-view 
refs/changes/52/348252/1

diff --git a/src/experts/TabularData.js b/src/experts/TabularData.js
new file mode 100644
index 000..2515b8e
--- /dev/null
+++ b/src/experts/TabularData.js
@@ -0,0 +1,49 @@
+( function( $, vv ) {
+   'use strict';
+
+   var PARENT = vv.experts.StringValue;
+
+   /**
+* `Valueview` expert for adding specialized handling for 
`tabular-data` data type.
+* Without this more specialized expert, the `StringValue` expert would 
be used since the
+* `tabular-data` data type is using the `String` data value type.
+* This expert is based on the `StringValue` expert but will add a 
drop-down for choosing
+* Commons data sources. It will also display the value as a link to 
Commons.
+* @class jQuery.valueview.experts.TabularData
+* @extends jQuery.valueview.experts.StringValue
+* @since 0.1
+* @licence GNU GPL v2+
+* @author Amir Sarabadani 
+*/
+   vv.experts.TabularData = vv.expert( 'TabularData', PARENT, {
+   /**
+* @inheritdoc
+* @protected
+*/
+   _init: function() {
+   PARENT.prototype._init.call( this );
+
+   var notifier = this._viewNotifier,
+   $input = this.$input;
+
+   $input.commonssuggester( {
+   apiUrl: this._options.commonsApiUrl,
+   namespace: 'Data',
+   contentModel: 'Map.JsonConfig'
+   } );
+
+   // Using the inputautoexpand plugin, the position of 
the dropdown needs to be updated
+   // whenever the input box expands vertically:
+   $input
+   .on( 'eachchange', function( event, oldValue ) {
+   // TODO/OPTIMIZE: Only reposition when 
necessary, i.e. when expanding vertically
+   $input.data( 'commonssuggester' 
).repositionMenu();
+   } )
+   .on( 'commonssuggesterchange', function( event, 
response ) {
+   notifier.notify( 'change' );
+   $input.data( 'inputautoexpand' ).expand();
+   } );
+   }
+   } );
+
+}( jQuery, jQuery.valueview ) );
diff --git a/src/experts/resources.php b/src/experts/resources.php
index 7c05911..0018029 100644
--- a/src/experts/resources.php
+++ b/src/experts/resources.php
@@ -44,6 +44,19 @@
),
),
 
+   'jquery.valueview.experts.TabularData' => $moduleTemplate + 
array(
+   'scripts' => array(
+   'TabularData.js',
+   ),
+   'dependencies' => array(
+   
'jquery.event.special.eachchange',
+   'jquery.ui.commonssuggester',
+   'jquery.valueview.experts',
+   
'jquery.valueview.experts.StringValue',
+   'jquery.valueview.Expert',
+   ),
+   ),
+
'jquery.valueview.experts.EmptyValue' => $moduleTemplate + 
array(
'scripts' => array(
'EmptyValue.js',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacc868ad2533e002d204d1aec8cb49af858a9606
Gerrit-PatchSet: 1
Gerrit-Project: data-values/value-view
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: qunit: Improve testrunner logging for pending ajax

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

Change subject: qunit: Improve testrunner logging for pending ajax
..

qunit: Improve testrunner logging for pending ajax

* Move `restoreWarnings()` in tearDown() to the mirrored location
  of related code in setUp().

* Log all ajax requests logged during the test, not just the
  one currently still pending. This should avoid situations
  where we throw "Pending ajax requests" but no information
  is logged about which requests those might be.

Change-Id: I900ad98c4c8520bdd6ae00a24ac82272f3becfee
---
M tests/qunit/data/testrunner.js
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/348251/1

diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index b0118af..e7c190e 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -215,6 +215,10 @@
// Stop tracking ajax requests
$( document ).off( 'ajaxSend', 
trackAjax );
 
+   // As a convenience feature, 
automatically restore warnings if they're
+   // still suppressed by the end of the 
test.
+   restoreWarnings();
+
// Farewell, mock environment!
mw.config = liveConfig;
mw.messages = liveMessages;
@@ -222,10 +226,6 @@
mw.jqueryMsg.setParserDefaults( {
messages: liveMessages
} );
-
-   // As a convenience feature, 
automatically restore warnings if they're
-   // still suppressed by the end of the 
test.
-   restoreWarnings();
 
// Tests should use fake timers or wait 
for animations to complete
// Check for incomplete 
animations/requests/etc and throw if there are any.
@@ -253,8 +253,11 @@
mw.log.warn( 'Pending 
requests does not match jQuery.active count' );
}
// Force requests to stop to 
give the next test a clean start
-   $.each( pending, function ( i, 
ajax ) {
-   mw.log.warn( 'Pending 
AJAX request #' + i, ajax.options );
+   $.each( ajaxRequests, function 
( i, ajax ) {
+   mw.log.warn(
+   'AJAX request 
#' + i + ' (state: ' + ajax.xhr.state() + ')',
+   ajax.options
+   );
ajax.xhr.abort();
} );
ajaxRequests = [];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I900ad98c4c8520bdd6ae00a24ac82272f3becfee
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...Wikibase[master]: Add "tabular-data" data type

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

Change subject: Add "tabular-data" data type
..

Add "tabular-data" data type

Bug: T160048
Change-Id: Ie6757f693ef5735dc2f8a606e7e3a6555446a2e1
---
M client/WikibaseClient.datatypes.php
M 
client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
M lib/WikibaseLib.datatypes.php
M lib/i18n/en.json
M lib/includes/Formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/Formatters/WikibaseValueFormatterBuildersTest.php
M repo/WikibaseRepo.datatypes.php
M repo/config/Wikibase.default.php
M repo/i18n/en.json
A repo/includes/Rdf/Values/TabularDataRdfBuilder.php
M repo/includes/ValidatorBuilders.php
M repo/includes/WikibaseRepo.php
M repo/resources/Resources.php
M repo/resources/experts/getStore.js
M repo/resources/experts/resources.php
M repo/resources/parsers/getStore.js
M repo/resources/wikibase.ui.entityViewInit.js
M repo/tests/phpunit/includes/ValidatorBuildersTest.php
18 files changed, 259 insertions(+), 5 deletions(-)


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

diff --git a/client/WikibaseClient.datatypes.php 
b/client/WikibaseClient.datatypes.php
index 2f744e7..6a924de 100644
--- a/client/WikibaseClient.datatypes.php
+++ b/client/WikibaseClient.datatypes.php
@@ -84,6 +84,12 @@
return $factory->newGeoShapeFormatter( $format, 
$options );
},
],
+   'PT:tabular-data' => [
+   'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
+   $factory = 
WikibaseClient::getDefaultValueFormatterBuilders();
+   return $factory->newTabularDataFormatter( 
$format, $options );
+   },
+   ],
'VT:time' => [
'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
$factory = 
WikibaseClient::getDefaultValueFormatterBuilders();
diff --git 
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
 
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
index d54cdd8..251fc19 100644
--- 
a/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/DataAccessSnakFormatterOutputFormatTest.php
@@ -60,6 +60,7 @@
$siteId = $settings->getSetting( 'siteGlobalID' );
 
$settings->setSetting( 'geoShapeStorageFrontendUrl', 
'https://media.something/view/' );
+   $settings->setSetting( 'tabularDataStorageFrontendUrl', 
'https://tabular.data/view/' );
$this->setUpDummyData( $store, $siteId );
}
 
@@ -77,6 +78,7 @@
'P9' => 'wikibase-item',
'P10' => 'external-id', // with formatter
'P11' => 'geo-shape',
+   'P12' => 'tabular-data',
];
 
foreach ( $dataTypeIds as $id => $dataTypeId ) {
@@ -285,7 +287,14 @@
new PropertyId( 'P11' ),
new StringValue( 'April 2017' )
)
-   ]
+   ],
+   'tabular-data' => [
+   
'[https://tabular.data/view/In_data_we_trust In data we trust]',
+   new PropertyValueSnak(
+   new PropertyId( 'P12' ),
+   new StringValue( 'In data we trust' )
+   )
+   ],
];
 
foreach ( $genericSnaks as $testName => $case ) {
@@ -340,6 +349,13 @@
new PropertyId( 'P11' ),
new StringValue( 'April 2017' )
)
+   ],
+   'tabular-data' => [
+   'In data we trust',
+   new PropertyValueSnak(
+   new PropertyId( 'P12' ),
+   new StringValue( 'In data we trust' )
+   )
]
];
 
diff --git a/lib/WikibaseLib.datatypes.php b/lib/WikibaseLib.datatypes.php
index 52bada2..ee1df73 100644
--- a/lib/WikibaseLib.datatypes.php
+++ b/lib/WikibaseLib.datatypes.php
@@ -22,6 +22,7 @@
'PT:monolingualtext'   => array( 'value-type' => 'monolingualtext' ),
'PT:quantity'  => array( 'value-type' => 'quantity' ),
'PT:string'=> array( 

[MediaWiki-commits] [Gerrit] mediawiki...Wikilog[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: Ie6051d3df019dbe35b05917fa597a855f9184b04
---
M WikilogFeed.php
M WikilogMainPage.php
M WikilogParser.php
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/WikilogFeed.php b/WikilogFeed.php
index 2e65d40..9deb8e4 100644
--- a/WikilogFeed.php
+++ b/WikilogFeed.php
@@ -497,11 +497,11 @@
}
}
if ( $row->wlw_icon ) {
-   $t = Title::makeTitle( NS_IMAGE, 
$row->wlw_icon );
+   $t = Title::makeTitle( NS_FILE, 
$row->wlw_icon );
$feed->setIcon( wfFindFile( $t ) );
}
if ( $row->wlw_logo ) {
-   $t = Title::makeTitle( NS_IMAGE, 
$row->wlw_logo );
+   $t = Title::makeTitle( NS_FILE, 
$row->wlw_logo );
$feed->setLogo( wfFindFile( $t ) );
}
if ( $wgWikilogFeedCategories ) {
diff --git a/WikilogMainPage.php b/WikilogMainPage.php
index 67853a5..404513d 100644
--- a/WikilogMainPage.php
+++ b/WikilogMainPage.php
@@ -164,7 +164,7 @@
 
$s = '';
if ( $this->mWikilogIcon ) {
-   $title = Title::makeTitle( NS_IMAGE, 
$this->mWikilogIcon );
+   $title = Title::makeTitle( NS_FILE, $this->mWikilogIcon 
);
$file = wfFindFile( $title );
$s .= Linker::makeImageLink( $wgParser, $title, $file,
array( 'align' => 'left' ),
diff --git a/WikilogParser.php b/WikilogParser.php
index 1c63dce..19da3e9 100644
--- a/WikilogParser.php
+++ b/WikilogParser.php
@@ -575,7 +575,7 @@
return null;
 
$ns = $nt->getNamespace();
-   if ( $ns == NS_IMAGE || $ns == NS_MEDIA ) {
+   if ( $ns == NS_FILE || $ns == NS_MEDIA ) {
$parser->mOutput->addLink( $nt );
return @ array( $m[1], $m[2], wfFindFile( $nt ) );
} else {

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Fix standalone, disabled sibling ButtonWidgets

2017-04-14 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348249 )

Change subject: MediaWiki theme: Fix standalone, disabled sibling ButtonWidgets
..

MediaWiki theme: Fix standalone, disabled sibling ButtonWidgets

Fixing disabled ButtonWidgets, which are put side-by-side and
move the `border-left-color` rule to the only needed places in
ButtonGroup- and ButtonSelectWidget.

Change-Id: I203f55e0e747da68dde879b9385a817a0f59b706
---
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
2 files changed, 17 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/49/348249/1

diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 9a7002f..4a737fd 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -261,12 +261,6 @@
color: @color-disabled-filled;
border: @border-disabled;
}
-
-   & + .oo-ui-widget-disabled {
-   > .oo-ui-buttonElement-button {
-   border-left-color: 
@border-color-disabled-filled;
-   }
-   }
}
 
&.oo-ui-widget-enabled {
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 5bab5a1..b7ba13f 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -17,25 +17,32 @@
z-index: 0;
position: relative;
 
+   // Overrides both, ButtonWidget & ToggleButtonWidget
.oo-ui-buttonElement {
.oo-ui-inline-spacing( 0 );
}
 
.oo-ui-buttonElement-framed {
.oo-ui-buttonElement-button {
+   margin-left: -@border-width-default;
border-radius: 0;
-   margin-left: -1px;
}
 
&:first-child .oo-ui-buttonElement-button {
+   margin-left: 0;
border-bottom-left-radius: @border-radius-default;
border-top-left-radius: @border-radius-default;
-   margin-left: 0;
}
 
&:last-child .oo-ui-buttonElement-button {
border-bottom-right-radius: @border-radius-default;
border-top-right-radius: @border-radius-default;
+   }
+
+   &.oo-ui-widget-disabled + .oo-ui-widget-disabled {
+   > .oo-ui-buttonElement-button {
+   border-left-color: 
@border-color-disabled-filled;
+   }
}
}
 
@@ -80,14 +87,14 @@
 
.oo-ui-buttonOptionWidget {
.oo-ui-buttonElement-button {
-   border-radius: 0;
margin-left: -@border-width-default;
+   border-radius: 0;
}
 
&:first-child .oo-ui-buttonElement-button {
+   margin-left: 0;
border-bottom-left-radius: @border-radius-default;
border-top-left-radius: @border-radius-default;
-   margin-left: 0;
}
 
&:last-child .oo-ui-buttonElement-button {
@@ -99,6 +106,12 @@
&.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
position: absolute; // FIXME: Remove from 
ButtonOptionWidget after cleaning up when T161177 is resolved
}
+
+   &.oo-ui-widget-disabled + .oo-ui-widget-disabled {
+   > .oo-ui-buttonElement-button {
+   border-left-color: 
@border-color-disabled-filled;
+   }
+   }
}
 
&.oo-ui-widget-enabled {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadLocal[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

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

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



diff --git a/UploadLocalDirectory.php b/UploadLocalDirectory.php
index 1d2f3a8..4f0c4d5 100644
--- a/UploadLocalDirectory.php
+++ b/UploadLocalDirectory.php
@@ -229,7 +229,7 @@
$links_to_images = '';
foreach($forms as $key => $form) {
// language-neutral namespacing thanks to Eric Lemoine
-   $links_to_images .= '* [[:'.$wgContLang->getNsText( 
NS_IMAGE ).':'.$forms[$key]->getUploadSaveName().']]'."\n";
+   $links_to_images .= '* [[:'.$wgContLang->getNsText( 
NS_FILE ).':'.$forms[$key]->getUploadSaveName().']]'."\n";
}
$wgOut->addWikitext($links_to_images);
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...StarterWiki[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: I1a0137bc6141a2c52daecbeae6375da77ae92aae
---
M StarterWiki.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/StarterWiki.php b/StarterWiki.php
index ea159a2..283886e 100644
--- a/StarterWiki.php
+++ b/StarterWiki.php
@@ -36,8 +36,8 @@
NS_USER, # Don't clone userpages, users may not be the same.
NS_USER_TALK, # Don't clone talkpages, discussions shouldn't be cloned.
NS_PROJECT_TALK, # Don't clone talkpages, discussions shouldn't be 
cloned.
-   NS_IMAGE, # Don't clone image pages, files are not cloned.
-   NS_IMAGE_TALK, # Don't clone talkpages, discussions shouldn't be cloned.
+   NS_FILE, # Don't clone image pages, files are not cloned.
+   NS_FILE_TALK, # Don't clone talkpages, discussions shouldn't be cloned.
NS_MEDIAWIKI, # Don't clone messages, a shared system should be used
NS_MEDIAWIKI_TALK, # Don't clone talkpages, discussions shouldn't be 
cloned.
NS_TEMPLATE_TALK, # Don't clone talkpages, discussions shouldn't be 
cloned.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SmoothGallery[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: I8d31d2ec40b356f894d4ba8800e5686d0434a26a
---
M SmoothGalleryParser.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/SmoothGalleryParser.php b/SmoothGalleryParser.php
index 0409aab..7cd7a89 100644
--- a/SmoothGalleryParser.php
+++ b/SmoothGalleryParser.php
@@ -151,7 +151,7 @@
continue;
}
 
-   $title = Title::newFromText( $img, NS_IMAGE );
+   $title = Title::newFromText( $img, NS_FILE );
 
if ( is_null( $title ) ) {
$galleryArray["missing_images"][] = $title;
@@ -160,7 +160,7 @@
 
$ns = $title->getNamespace();
 
-   if ( $ns == NS_IMAGE ) {
+   if ( $ns == NS_FILE ) {
$galleryArray = $this->parseImage( $title, 
$parser, $galleryArray, $img_desc );
} elseif ( $ns == NS_CATEGORY ) {
// list images in category
@@ -275,7 +275,7 @@
$sql = "SELECT page_namespace, page_title FROM $page " .
"JOIN $categorylinks ON cl_from = page_id " .
"WHERE cl_to = " . $dbr->addQuotes( $name ) . " " .
-   "AND page_namespace = " . NS_IMAGE . " " .
+   "AND page_namespace = " . NS_FILE . " " .
"ORDER BY cl_sortkey";
 
$images = array();

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SemanticPageMaker[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: Ifa61f68509f7bf9c5d654c77548343f09e4b886f
---
M includes/SPM_Initialize.php
M includes/widgets/datatype/SMW_DV_DTWikiPage.php
M includes/widgets/datatype/SPM_WT_File.php
M specials/WidgetAssembler/SPM_UploadWindow.php
4 files changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/includes/SPM_Initialize.php b/includes/SPM_Initialize.php
index 172f86e..00079e3 100644
--- a/includes/SPM_Initialize.php
+++ b/includes/SPM_Initialize.php
@@ -8,6 +8,13 @@
 
 define( 'SPM_VERSION', '0.1' );
 
+/**
+ * For older versions of mediawiki, which don't support NS_FILE (< 1.14).
+ */
+if ( !defined( 'NS_FILE' ) ) {
+   define( 'NS_FILE', NS_IMAGE );
+}
+
 $wgSPMIP = $IP . '/extensions/SemanticPageMaker';
 $wgSPMScriptPath = $wgScriptPath . '/extensions/SemanticPageMaker';
 
diff --git a/includes/widgets/datatype/SMW_DV_DTWikiPage.php 
b/includes/widgets/datatype/SMW_DV_DTWikiPage.php
index 28512a8..23e32d1 100644
--- a/includes/widgets/datatype/SMW_DV_DTWikiPage.php
+++ b/includes/widgets/datatype/SMW_DV_DTWikiPage.php
@@ -11,7 +11,7 @@
$this->m_fixNamespace = NS_MEDIA;
break;
case '___img':
-   $this->m_fixNamespace = NS_IMAGE; // NS_FILE
+   $this->m_fixNamespace = NS_FILE;
break;
case '___wdg':
$this->m_fixNamespace = NS_CATEGORY_WIDGET;
diff --git a/includes/widgets/datatype/SPM_WT_File.php 
b/includes/widgets/datatype/SPM_WT_File.php
index 152980d..a8804da 100644
--- a/includes/widgets/datatype/SPM_WT_File.php
+++ b/includes/widgets/datatype/SPM_WT_File.php
@@ -11,7 +11,7 @@
parent::__construct( $typeid );
switch ( $typeid ) {
case '___img':
-   $this->m_fixNamespace = NS_IMAGE; // NS_FILE
+   $this->m_fixNamespace = NS_FILE;
break;
}
}
diff --git a/specials/WidgetAssembler/SPM_UploadWindow.php 
b/specials/WidgetAssembler/SPM_UploadWindow.php
index e6e4e75..2e31958 100644
--- a/specials/WidgetAssembler/SPM_UploadWindow.php
+++ b/specials/WidgetAssembler/SPM_UploadWindow.php
@@ -358,7 +358,7 @@
 * out of it. We'll strip some silently that Title would die on.
 */
$filtered = wfStripIllegalFilenameChars ( $filtered );
-   $nt = Title::makeTitleSafe( NS_IMAGE, $filtered );
+   $nt = Title::makeTitleSafe( NS_FILE, $filtered );
if ( is_null( $nt ) ) {
$this->uploadError( wfMessage( 'illegalfilename', 
$filtered )->escaped() );
return;
@@ -679,7 +679,7 @@
public static function ajaxGetLicensePreview( $license ) {
global $wgParser, $wgUser;
$text = '{{' . $license . '}}';
-   $title = Title::makeTitle( NS_IMAGE, 'Sample.jpg' );
+   $title = Title::makeTitle( NS_FILE, 'Sample.jpg' );
$options = ParserOptions::newFromUser( $wgUser );
 
// Expand subst: first, then live templates...
@@ -872,7 +872,7 @@
}
 
if ( $this->mDesiredDestName && $wgUser->isAllowed( 
'deletedhistory' ) ) {
-   $title = Title::makeTitleSafe( NS_IMAGE, 
$this->mDesiredDestName );
+   $title = Title::makeTitleSafe( NS_FILE, 
$this->mDesiredDestName );
if ( $title instanceof Title && ( $count = 
$title->isDeleted() ) > 0 ) {
$link = wfMessage(
$wgUser->isAllowed( 'delete' ) ? 
'thisisdeleted' : 'viewdeleted'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Adapt to changes of TOC in core

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

Change subject: Adapt to changes of TOC in core
..


Adapt to changes of TOC in core

* Use .toc instead of #toc in JavaScript to allow multiple TOCs.
* Use .toc and #toc in CSS as in core.
* Remove cellpadding because the TOC is no  anymore.

Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c
---
M modules/ext.toctree.css
M modules/ext.toctree.js
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/modules/ext.toctree.css b/modules/ext.toctree.css
index 5c2562c..609dd33 100644
--- a/modules/ext.toctree.css
+++ b/modules/ext.toctree.css
@@ -9,10 +9,12 @@
  * @licence GNU General Public Licence 2.0 or later
  */
 
+.toc .tocUl,
 #toc .tocUl {
padding-left: 2em;
 }
 
+.toc.tocFloat,
 #toc.tocFloat {
float: left;
margin: 0 2em 1em 0;
@@ -30,6 +32,7 @@
left: -2em;
 }
 
+.noFloat .toc.tocFloat,
 .noFloat #toc.tocFloat {
float: none;
margin: 0;
@@ -37,12 +40,14 @@
 }
 
 /* toc-floated CSS */
+.toc.tocFloat,
 #toc.tocFloat {
float: left;
margin: 0 2em 1em 0;
max-width: 20em;
 }
 
+.noFloat .toc.tocFloat,
 .noFloat #toc.tocFloat {
float: none;
margin: 0;
@@ -50,6 +55,7 @@
 }
 
 @media print {
+   .toc.tocFloat,
#toc.tocFloat {
background: #ff;
}
@@ -58,6 +64,7 @@
display: none;
}
 
+   .toc .tocUl,
#toc .tocUl {
padding-left: 0;
}
diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index 097a363..990bac7 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -28,13 +28,12 @@
}
 
function init() {
-   var $toc = $( '#toc' );
+   var $toc = $( '.toc' );
 
if ( $toc.length > 0 ) {
if ( mw.user.options.get( 'toc-floated' ) ) {
$toc.addClass( 'tocFloat' );
}
-   $toc.attr( 'cellspacing', 0 );
 
var $mainUl = $toc.find( 'ul:first' );
var $mainList = $toc.find( 'li' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32844d5cefb2ee7b03676fc3f0acef5bb543b54c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Fomafix 
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...SelectCategory[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: Id11c7fabdac77a52bcde7e7d1b03d8652af84a58
---
M README
M SelectCategory.php
M SelectCategory_body.php
3 files changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/README b/README
index ee6e7a1..0d0d746 100644
--- a/README
+++ b/README
@@ -46,8 +46,8 @@
NS_USER_TALK=> false,
NS_PROJECT  => true,
NS_PROJECT_TALK => false,
-   NS_IMAGE=> true,
-   NS_IMAGE_TALK   => false,
+   NS_FILE => true,
+   NS_FILE_TALK=> false,
NS_MEDIAWIKI=> false,
NS_MEDIAWIKI_TALK   => false,
NS_TEMPLATE => false,
@@ -73,8 +73,8 @@
NS_USER_TALK=> false,
NS_PROJECT  => false,
NS_PROJECT_TALK => false,
-   NS_IMAGE=> "My Image Root Category",
-   NS_IMAGE_TALK   => false,
+   NS_FILE => "My Image Root Category",
+   NS_FILE_TALK=> false,
NS_MEDIAWIKI=> false,
NS_MEDIAWIKI_TALK   => false,
NS_TEMPLATE => false,
diff --git a/SelectCategory.php b/SelectCategory.php
index c0d3b6b..2351cd6 100644
--- a/SelectCategory.php
+++ b/SelectCategory.php
@@ -27,8 +27,8 @@
NS_USER_TALK=> false,
NS_PROJECT  => true,
NS_PROJECT_TALK => false,
-   NS_IMAGE=> true,
-   NS_IMAGE_TALK   => false,
+   NS_FILE => true,
+   NS_FILE_TALK=> false,
NS_MEDIAWIKI=> false,
NS_MEDIAWIKI_TALK   => false,
NS_TEMPLATE => false,
@@ -47,8 +47,8 @@
NS_USER_TALK=> false,
NS_PROJECT  => false,
NS_PROJECT_TALK => false,
-   NS_IMAGE=> false,
-   NS_IMAGE_TALK   => false,
+   NS_FILE => false,
+   NS_FILE_TALK=> false,
NS_MEDIAWIKI=> false,
NS_MEDIAWIKI_TALK   => false,
NS_TEMPLATE => false,
diff --git a/SelectCategory_body.php b/SelectCategory_body.php
index 1a92e0d..b1c66cb 100644
--- a/SelectCategory_body.php
+++ b/SelectCategory_body.php
@@ -37,7 +37,7 @@
$wgOut->addScriptFile( 
"{$wgExtensionAssetsPath}/SelectCategory/SelectCategory.js" );
 
# Get all categories from wiki
-   $allCats = self::getAllCategories( $isUpload ? NS_IMAGE 
: $pageObj->mTitle->getNamespace() );
+   $allCats = self::getAllCategories( $isUpload ? NS_FILE 
: $pageObj->mTitle->getNamespace() );
# Load system messages
 
# Get the right member variables, depending on if we're 
on an upload form or not

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Support live preview

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

Change subject: Support live preview
..


Support live preview

Use mw.hook( 'wikipage.content' ).add( ... ) to support live preview.

Change-Id: Icd3a2f69dd8ae93e4730d8c6e17d0daee2967a87
---
M modules/ext.toctree.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/ext.toctree.js b/modules/ext.toctree.js
index 990bac7..31bfb80 100644
--- a/modules/ext.toctree.js
+++ b/modules/ext.toctree.js
@@ -27,8 +27,8 @@
}
}
 
-   function init() {
-   var $toc = $( '.toc' );
+   function init( $content ) {
+   var $toc = $content.find( '.toc' ).addBack( '.toc' );
 
if ( $toc.length > 0 ) {
if ( mw.user.options.get( 'toc-floated' ) ) {
@@ -75,5 +75,5 @@
}
}
 
-   $( init );
+   mw.hook( 'wikipage.content' ).add( init );
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd3a2f69dd8ae93e4730d8c6e17d0daee2967a87
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Fomafix 
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...Polyglot[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

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

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



diff --git a/Polyglot.php b/Polyglot.php
index a22557b..669a4bd 100644
--- a/Polyglot.php
+++ b/Polyglot.php
@@ -53,7 +53,7 @@
 $wfPolyglotExemptNamespaces = array(
NS_CATEGORY,
NS_TEMPLATE,
-   NS_IMAGE,
+   NS_FILE,
NS_MEDIA,
NS_SPECIAL,
NS_MEDIAWIKI

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Make LogFormatterTest less slow

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

Change subject: phpunit: Make LogFormatterTest less slow
..

phpunit: Make LogFormatterTest less slow

Right now it's quite slow because it reloads LocalisationCache
for every test case.

Change the reload to only happen once for the entire class.

Also use RequestContext instead of wgLang to match logic in
the parent class (MediaWikiLangTestCase).

Change-Id: Ia791563ca9094c36782acfe9826def45f2a1d621
---
M tests/phpunit/includes/logging/LogFormatterTest.php
1 file changed, 19 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/48/348248/1

diff --git a/tests/phpunit/includes/logging/LogFormatterTest.php 
b/tests/phpunit/includes/logging/LogFormatterTest.php
index c2b791e..1ef3df6 100644
--- a/tests/phpunit/includes/logging/LogFormatterTest.php
+++ b/tests/phpunit/includes/logging/LogFormatterTest.php
@@ -4,6 +4,7 @@
  * @group Database
  */
 class LogFormatterTest extends MediaWikiLangTestCase {
+   private static $oldExtMsgFiles;
 
/**
 * @var User
@@ -30,20 +31,32 @@
 */
protected $user_comment;
 
+   public static function setUpBeforeClass() {
+   parent::setUpBeforeClass();
+
+   global $wgExtensionMessagesFiles;
+   self::$oldExtMsgFiles = $wgExtensionMessagesFiles;
+   $wgExtensionMessagesFiles['LogTests'] = __DIR__ . 
'/LogTests.i18n.php';
+   Language::getLocalisationCache()->recache( 'en' );
+   }
+
+   public static function tearDownAfterClass() {
+   global $wgExtensionMessagesFiles;
+   $wgExtensionMessagesFiles = self::$oldExtMsgFiles;
+   Language::getLocalisationCache()->recache( 'en' );
+
+   parent::tearDownAfterClass();
+   }
+
protected function setUp() {
parent::setUp();
-
-   global $wgLang;
 
$this->setMwGlobals( [
'wgLogTypes' => [ 'phpunit' ],
'wgLogActionsHandlers' => [ 'phpunit/test' => 
'LogFormatter',
'phpunit/param' => 'LogFormatter' ],
'wgUser' => User::newFromName( 'Testuser' ),
-   'wgExtensionMessagesFiles' => [ 'LogTests' => __DIR__ . 
'/LogTests.i18n.php' ],
] );
-
-   Language::getLocalisationCache()->recache( $wgLang->getCode() );
 
$this->user = User::newFromName( 'Testuser' );
$this->title = Title::newFromText( 'SomeTitle' );
@@ -52,16 +65,9 @@
$this->context = new RequestContext();
$this->context->setUser( $this->user );
$this->context->setTitle( $this->title );
-   $this->context->setLanguage( $wgLang );
+   $this->context->setLanguage( 
RequestContext::getMain()->getLanguage() );
 
$this->user_comment = '';
-   }
-
-   protected function tearDown() {
-   parent::tearDown();
-
-   global $wgLang;
-   Language::getLocalisationCache()->recache( $wgLang->getCode() );
}
 
public function newLogEntry( $action, $params ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia791563ca9094c36782acfe9826def45f2a1d621
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...News[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

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

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



diff --git a/NewsRenderer.php b/NewsRenderer.php
index c52d039..50057bc 100644
--- a/NewsRenderer.php
+++ b/NewsRenderer.php
@@ -605,7 +605,7 @@
$iconright = ( strtolower(trim($m[2])) === 'right' );
}
 
-   $ticon = $icon ? Title::newFromText($icon, NS_IMAGE) : null;
+   $ticon = $icon ? Title::newFromText($icon, NS_FILE) : null;
if ( $ticon ) {
$image = wfFindFile( $ticon );
if ( !$image->exists() ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MsLinks[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: I68ef7f6fc8a2c03d5b961bbc97042cb3c63fec9e
---
M MsLinks.body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/MsLinks.body.php b/MsLinks.body.php
index 603b6f9..cd9b514 100755
--- a/MsLinks.body.php
+++ b/MsLinks.body.php
@@ -30,7 +30,7 @@
}
 
try {
-   $title = Title::newFromText( $url, NS_IMAGE );
+   $title = Title::newFromText( $url, NS_FILE );
$file = function_exists( 'wfFindFile' ) ? wfFindFile( 
$title ) : new Image( $title );
$base = ( is_object( $file ) && $file->exists() ) ? 
':Image' : 'Media';
} catch( Exception $exception ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaFunctions[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: I1152e0aad16422481a57c16e9ba37142461572a0
---
M MediaFunctions.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/MediaFunctions.class.php b/MediaFunctions.class.php
index f68fca3..bacd281 100644
--- a/MediaFunctions.class.php
+++ b/MediaFunctions.class.php
@@ -156,8 +156,8 @@
if ( $text ) {
$title = Title::newFromText( $text );
if ( $title instanceof Title ) {
-   if ( $title->getNamespace() != NS_IMAGE )
-   $title = Title::makeTitle( NS_IMAGE, 
$title->getText() );
+   if ( $title->getNamespace() != NS_FILE )
+   $title = Title::makeTitle( NS_FILE, 
$title->getText() );
$file = wfFindFile( $title );
return $file instanceof File
? $file

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...LiveTranslate[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: Ie39ce676a41498d7b7530145c553b3b281a6507a
---
M LiveTranslate_Settings.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/LiveTranslate_Settings.php b/LiveTranslate_Settings.php
index dbe067c..e0f5fb8 100644
--- a/LiveTranslate_Settings.php
+++ b/LiveTranslate_Settings.php
@@ -43,8 +43,8 @@
 NS_USER_TALK => false,
   NS_PROJECT => true,
  NS_PROJECT_TALK => false,
-NS_IMAGE => true,
-   NS_IMAGE_TALK => false,
+ NS_FILE => true,
+NS_FILE_TALK => false,
 NS_MEDIAWIKI => false,
NS_MEDIAWIKI_TALK => false,
  NS_TEMPLATE => false,

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...IndexFunction[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

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

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



diff --git a/IndexAbstracts.php b/IndexAbstracts.php
index 4b05515..f39b82b 100644
--- a/IndexAbstracts.php
+++ b/IndexAbstracts.php
@@ -56,7 +56,7 @@
 
if ( $title ) {
$ns = $title->getNamespace();
-   if ( $title->getInterwiki() || $ns == NS_IMAGE || $ns 
== NS_CATEGORY ) {
+   if ( $title->getInterwiki() || $ns == NS_FILE || $ns == 
NS_CATEGORY ) {
return "";
} else {
return $text;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33d24a08977a5965a9c07aa177729b9506045724
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/IndexFunction
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DumpHTML[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

Change-Id: Ibddf6d7c43102130e6d04c0ec394b39a9d8751da
---
M dumpHTML.inc
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/dumpHTML.inc b/dumpHTML.inc
index b859ff6..2a43082 100644
--- a/dumpHTML.inc
+++ b/dumpHTML.inc
@@ -305,7 +305,7 @@
$this->setCheckpoint( 'local 
image', $row->img_name );
}
}
-   $title = Title::makeTitle( NS_IMAGE, 
$row->img_name );
+   $title = Title::makeTitle( NS_FILE, 
$row->img_name );
if ( $title->getArticleID() ) {
// Already done by dumpHTML
continue;
@@ -352,7 +352,7 @@
print "$rel $i\r";
}
 
-   $title = Title::makeTitleSafe( 
NS_IMAGE, $file );
+   $title = Title::makeTitleSafe( NS_FILE, 
$file );
if ( !$title ) {
wfDebug( __METHOD__.": invalid 
title: $file\n" );
continue;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[master]: NS_IMAGE -> NS_FILE

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

Change subject: NS_IMAGE -> NS_FILE
..


NS_IMAGE -> NS_FILE

Deprecated since 1.14

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

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



diff --git a/BanPests.php b/BanPests.php
index e8647fb..92193a0 100644
--- a/BanPests.php
+++ b/BanPests.php
@@ -206,7 +206,7 @@
 
public static function deletePage( $title, $sp = null ) {
$ret = null;
-   $file = $title->getNamespace() == NS_IMAGE ? wfLocalFile( 
$title ) : false;
+   $file = $title->getNamespace() == NS_FILE ? wfLocalFile( $title 
) : false;
if ( $file ) {
$reason= wfMessage( "blockandnuke-delete-file" 
)->text();
$oldimage = null; // Must be passed by reference

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

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

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


[MediaWiki-commits] [Gerrit] oojs/core[master]: build: Remove lefover jshint config in dist/

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

Change subject: build: Remove lefover jshint config in dist/
..

build: Remove lefover jshint config in dist/

Follows-up b9ed094. Without this, there is a warning about uncommitted
removal of dist/.jshintrc during developmente because 'grunt build'
ends up removing it as part of 'grunt clear'.

Change-Id: Ia3e67726dbb065ed9d63805b4dab2f621bd8b9ad
---
D dist/.jshintrc
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/47/348247/1

diff --git a/dist/.jshintrc b/dist/.jshintrc
deleted file mode 100644
index f0d20f4..000
--- a/dist/.jshintrc
+++ /dev/null
@@ -1,6 +0,0 @@
-{
-   "undef": false,
-   "unused": false,
-
-   "extends": "../.jshintrc"
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3e67726dbb065ed9d63805b4dab2f621bd8b9ad
Gerrit-PatchSet: 1
Gerrit-Project: oojs/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 some LoadBalancer::waitFor*() inconsistencies

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

Change subject: Fix some LoadBalancer::waitFor*() inconsistencies
..


Fix some LoadBalancer::waitFor*() inconsistencies

* Make sure waitFor() always handles laggedReplicaMode updates,
  even if the actual waiting was deferred until a connection was
  needed.
* Restore the old mWaitForPos in waitForOne()/waitForAll() since
  this do not care about the generic reader index or the sort of
  ChronologyProtector logic related to it.

Change-Id: I0767e9831b8fd7fd115a472354977e3c1e12114a
---
M includes/libs/rdbms/loadbalancer/ILoadBalancer.php
M includes/libs/rdbms/loadbalancer/LoadBalancer.php
2 files changed, 14 insertions(+), 6 deletions(-)

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



diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
index 8b5a98d..cbd0ff3 100644
--- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php
@@ -135,6 +135,10 @@
 * If a DB_REPLICA connection has been opened already, then wait 
immediately.
 * Otherwise sets a variable telling it to wait if such a connection is 
opened.
 *
+* This only applies to connections to the generic replica DB for this 
request.
+* If a timeout happens when waiting, then 
getLaggedReplicaMode()/laggedReplicaUsed()
+* will return true.
+*
 * @param DBMasterPos|bool $pos Master position or false
 */
public function waitFor( $pos );
diff --git a/includes/libs/rdbms/loadbalancer/LoadBalancer.php 
b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
index ffa4f78..e8069c0 100644
--- a/includes/libs/rdbms/loadbalancer/LoadBalancer.php
+++ b/includes/libs/rdbms/loadbalancer/LoadBalancer.php
@@ -411,7 +411,11 @@
# Replica DB connection successful.
# Wait for the session master pos for a short time.
if ( $this->mWaitForPos && $i > 0 ) {
-   $this->doWait( $i );
+   # When LoadBalancer::waitFor() set mWaitForPos, 
the wait will happen here.
+   # Be sure to update laggedReplicaMode 
accordingly for consistency.
+   if ( !$this->doWait( $i ) ) {
+   $laggedReplicaMode = true;
+   }
}
if ( $this->mReadIndex <= 0 && $this->mLoads[$i] > 0 && 
$group === false ) {
$this->mReadIndex = $i;
@@ -440,7 +444,7 @@
}
}
} finally {
-   // Restore the older position if it was higher
+   // Restore the older position if it was higher since 
this is used for lag-protection
$this->setWaitForPositionIfHigher( $oldPos );
}
}
@@ -465,8 +469,8 @@
$ok = true; // no applicable loads
}
} finally {
-   // Restore the older position if it was higher
-   $this->setWaitForPositionIfHigher( $oldPos );
+   # Restore the old position, as this is not used for 
lag-protection but for throttling
+   $this->mWaitForPos = $oldPos;
}
 
return $ok;
@@ -485,8 +489,8 @@
}
}
} finally {
-   // Restore the older position if it was higher
-   $this->setWaitForPositionIfHigher( $oldPos );
+   # Restore the old position, as this is not used for 
lag-protection but for throttling
+   $this->mWaitForPos = $oldPos;
}
 
return $ok;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0767e9831b8fd7fd115a472354977e3c1e12114a
Gerrit-PatchSet: 3
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] oojs/core[master]: EventEmitter: Factor out private addBinding() from on()

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

Change subject: EventEmitter: Factor out private addBinding() from on()
..

EventEmitter: Factor out private addBinding() from on()

In preparation of refactoring once().

Bug: T101411
Change-Id: I784a87d7e3a7c1198812bd41f47e97b11649940c
---
M src/EventEmitter.js
1 file changed, 13 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/45/348245/1

diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index 494f145..e4bca2e 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -51,6 +51,18 @@
}
}
 
+   function addBinding( ee, event, binding ) {
+   var bindings;
+   // Auto-initialize bindings list
+   if ( hasOwn.call( ee.bindings, event ) ) {
+   bindings = ee.bindings[ event ];
+   } else {
+   bindings = ee.bindings[ event ] = [];
+   }
+   // Add binding
+   bindings.push( binding );
+   }
+
/* Methods */
 
/**
@@ -67,18 +79,9 @@
 * @chainable
 */
oo.EventEmitter.prototype.on = function ( event, method, args, context 
) {
-   var bindings;
-
validateMethod( method, context );
 
-   if ( hasOwn.call( this.bindings, event ) ) {
-   bindings = this.bindings[ event ];
-   } else {
-   // Auto-initialize bindings list
-   bindings = this.bindings[ event ] = [];
-   }
-   // Add binding
-   bindings.push( {
+   addBinding( this, event, {
method: method,
args: args,
context: ( arguments.length < 4 ) ? null : context

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I784a87d7e3a7c1198812bd41f47e97b11649940c
Gerrit-PatchSet: 1
Gerrit-Project: oojs/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] oojs/core[master]: EventEmitter: Support passing once() handler to off()

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

Change subject: EventEmitter: Support passing once() handler to off()
..

EventEmitter: Support passing once() handler to off()

Move once logic into the registry so that the handler can be
matched against in off() as well.

Bug: T101411
Change-Id: I3060581cb00e2c93bf2c3737b090a032c9fdbb2e
---
M src/EventEmitter.js
M tests/unit/EventEmitter.test.js
2 files changed, 56 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/46/348246/1

diff --git a/src/EventEmitter.js b/src/EventEmitter.js
index e4bca2e..9348eaf 100644
--- a/src/EventEmitter.js
+++ b/src/EventEmitter.js
@@ -81,10 +81,12 @@
oo.EventEmitter.prototype.on = function ( event, method, args, context 
) {
validateMethod( method, context );
 
+   // Ensure consistent object shape (optimisation)
addBinding( this, event, {
method: method,
args: args,
-   context: ( arguments.length < 4 ) ? null : context
+   context: ( arguments.length < 4 ) ? null : context,
+   once: false
} );
return this;
};
@@ -97,12 +99,16 @@
 * @chainable
 */
oo.EventEmitter.prototype.once = function ( event, listener ) {
-   var eventEmitter = this,
-   wrapper = function () {
-   eventEmitter.off( event, wrapper );
-   return listener.apply( this, arguments );
-   };
-   return this.on( event, wrapper );
+   validateMethod( listener );
+
+   // Ensure consistent object shape (optimisation)
+   addBinding( this, event, {
+   method: listener,
+   args: undefined,
+   context: null,
+   once: true
+   } );
+   return this;
};
 
/**
@@ -177,6 +183,11 @@
} else {
method = binding.method;
}
+   if ( binding.once ) {
+   // Must unbind before calling method to 
avoid
+   // any nested triggers.
+   this.off( event, method );
+   }
method.apply(
binding.context,
binding.args ? binding.args.concat( 
args ) : args
diff --git a/tests/unit/EventEmitter.test.js b/tests/unit/EventEmitter.test.js
index 35fef9d..6d5bcf3 100644
--- a/tests/unit/EventEmitter.test.js
+++ b/tests/unit/EventEmitter.test.js
@@ -104,6 +104,44 @@
assert.deepEqual( seq, [ 'call' ], 'Callback ran only once' );
} );
 
+   QUnit.test( 'once - nested', function ( assert ) {
+   var seq = [],
+   ee = new oo.EventEmitter();
+
+   ee.once( 'basic', function ( value ) {
+   seq.push( value );
+   if ( value === 'one' ) {
+   // Verify once is truly once, handler must be 
unbound
+   // before handler runs.
+   ee.emit( 'basic', 'nested' );
+   }
+   } );
+
+   ee.emit( 'basic', 'one' );
+   ee.emit( 'basic', 'two' );
+   assert.deepEqual( seq, [ 'one' ], 'Callback ran only once' );
+   } );
+
+   QUnit.test( 'once - off', function ( assert ) {
+   var seq,
+   ee = new oo.EventEmitter();
+
+   function handle() {
+   seq.push( 'call' );
+   }
+
+   seq = [];
+   ee.once( 'basic', handle );
+   ee.off( 'basic', handle );
+   ee.emit( 'basic' );
+   assert.deepEqual( seq, [], 'Handle is compatible with off()' );
+
+   seq = [];
+   ee.once( 'basic', handle );
+   ee.emit( 'basic' );
+   assert.deepEqual( seq, [ 'call' ], 'Handle can be re-bound' );
+   } );
+
QUnit.test( 'emit', function ( assert ) {
var data1, data2A, data2B, data2C,
ee = new oo.EventEmitter();

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

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

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Add linter tables to all wikis

2017-04-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348244 )

Change subject: Add linter tables to all wikis
..

Add linter tables to all wikis

Kinda needed when extension gets enabled everywhere...

Bug: T148609
Change-Id: Iccba38b3873a532aa8673e2436108f2d18ea5178
---
M addWiki.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/addWiki.php b/addWiki.php
index f30084a..92b154f 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -103,6 +103,7 @@
$dbw->sourceFile( 
"$IP/extensions/AccountAudit/accountaudit.sql" );
$dbw->sourceFile( 
"$IP/extensions/BetaFeatures/sql/create_counts.sql" );
$dbw->sourceFile( "$IP/extensions/SecurePoll/SecurePoll.sql" );
+   $dbw->sourceFile( "$IP/extensions/Linter/linter.sql" );
 
// most wikis are wikibase client wikis and no harm to adding 
this everywhere
$dbw->sourceFile( 
"$IP/extensions/Wikidata/extensions/Wikibase/client/sql/entity_usage.sql" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccba38b3873a532aa8673e2436108f2d18ea5178
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add grep infos to Parser::getImageParams

2017-04-14 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348243 )

Change subject: Add grep infos to Parser::getImageParams
..

Add grep infos to Parser::getImageParams

Comments for grep makes searching easier

Change-Id: I98e93baf6bd89df36185d535d6e63c51c6f65bc9
---
M includes/parser/Parser.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 953f021..19f368a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -5141,6 +5141,11 @@
$internalParamMap = [];
foreach ( $internalParamNames as $type => 
$names ) {
foreach ( $names as $name ) {
+   // For grep: img_left, 
img_right, img_center, img_none,
+   // img_baseline, img_sub, 
img_super, img_top, img_text_top, img_middle,
+   // img_bottom, img_text_bottom,
+   // img_thumbnail, 
img_manualthumb, img_framed, img_frameless, img_upright,
+   // img_border, img_link, 
img_alt, img_class
$magicName = str_replace( '-', 
'_', "img_$name" );
$internalParamMap[$magicName] = 
[ $type, $name ];
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Define used messages in extension.json and TocTree.php

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

Change subject: Define used messages in extension.json and TocTree.php
..


Define used messages in extension.json and TocTree.php

ext.toctree.js uses the messages 'hidetoc' and 'showtoc' from core.
This definition ensures that the messages are loaded even when module
'mediawiki.toc' is not loaded.

Change-Id: I655a0ca5ef232d47f01c53ea670992f258233c6c
---
M TocTree.php
M extension.json
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/TocTree.php b/TocTree.php
index 3d9a2af..e39db30 100644
--- a/TocTree.php
+++ b/TocTree.php
@@ -35,6 +35,10 @@
'remoteExtPath' => 'TocTree/modules',
'styles' => 'ext.toctree.css',
'scripts' => 'ext.toctree.js',
+   'messages' => [
+   'hidetoc',
+   'showtoc'
+   ]
 ];
 
 // credits
diff --git a/extension.json b/extension.json
index c3dc5fd..4ded842 100644
--- a/extension.json
+++ b/extension.json
@@ -28,7 +28,11 @@
"localBasePath": "modules",
"remoteExtPath": "TocTree/modules",
"styles": "ext.toctree.css",
-   "scripts": "ext.toctree.js"
+   "scripts": "ext.toctree.js",
+   "messages": [
+   "hidetoc",
+   "showtoc"
+   ]
}
},
"Hooks": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I655a0ca5ef232d47f01c53ea670992f258233c6c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Deploy Linter to all wikis"

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

Change subject: Revert "Deploy Linter to all wikis"
..


Revert "Deploy Linter to all wikis"

This reverts commit b18ca6dbebcb0f6a74264467d78e610e8228d4a0.

Change-Id: Iaeb01d87c19eaf11bc36c3693fc5a1261e924367
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index fa457c3..0e2dbef 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14065,9 +14065,10 @@
 ],
 
 'wmgUseLinter' => [
-   'default' => true,
-   'votewiki' => false,
-   'loginwiki' => false,
+   'default' => false,
+   'small' => true,
+   'medium' => true,
+   'group0' => true,
 ],
 
 'wgLinterStatsdSampleFactor' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Deploy Linter to all wikis"

2017-04-14 Thread Volans (Code Review)
Hello Legoktm, Florianschmidtwelzow, jenkins-bot, Jforrester,

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

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

to review the following change.


Change subject: Revert "Deploy Linter to all wikis"
..

Revert "Deploy Linter to all wikis"

This reverts commit b18ca6dbebcb0f6a74264467d78e610e8228d4a0.

Change-Id: I9f99e1695a02f4e4d422b830dd7e9c029f67059c
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 984bbea..e62f8ac 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14195,9 +14195,10 @@
 ],
 
 'wmgUseLinter' => [
-   'default' => true,
-   'votewiki' => false,
-   'loginwiki' => false,
+   'default' => false,
+   'small' => true,
+   'medium' => true,
+   'group0' => true,
 ],
 
 'wgLinterStatsdSampleFactor' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9f99e1695a02f4e4d422b830dd7e9c029f67059c
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Volans 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Deploy Linter to all wikis"

2017-04-14 Thread Reedy (Code Review)
Hello Legoktm, Florianschmidtwelzow, jenkins-bot, Jforrester,

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

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

to review the following change.


Change subject: Revert "Deploy Linter to all wikis"
..

Revert "Deploy Linter to all wikis"

This reverts commit b18ca6dbebcb0f6a74264467d78e610e8228d4a0.

Change-Id: Iaeb01d87c19eaf11bc36c3693fc5a1261e924367
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 984bbea..e62f8ac 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14195,9 +14195,10 @@
 ],
 
 'wmgUseLinter' => [
-   'default' => true,
-   'votewiki' => false,
-   'loginwiki' => false,
+   'default' => false,
+   'small' => true,
+   'medium' => true,
+   'group0' => true,
 ],
 
 'wgLinterStatsdSampleFactor' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaeb01d87c19eaf11bc36c3693fc5a1261e924367
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Polish demo labels, styles and add frameless button t...

2017-04-14 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348240 )

Change subject: demos: Polish demo labels, styles and add frameless button tests
..

demos: Polish demo labels, styles and add frameless button tests

Unify button labelling, add frameless button variants & reorder and
extend demo styles.

Change-Id: Id59827579bffd0e50186fb1b0dfc87f46ad3f15e
---
M demos/pages/widgets.js
M demos/pages/widgets.php
M demos/styles/demo.css
3 files changed, 174 insertions(+), 87 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/40/348240/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 3081ec4..37c8c2a 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -188,12 +188,32 @@
),
new OO.ui.FieldLayout(
new OO.ui.ButtonWidget( {
+   icon: 'help',
+   title: 'Icon only, framed'
+   } ),
+   {
+   label: 'ButtonWidget (icon 
only)\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonWidget( {
+   indicator: 'alert',
+   title: 'Indicator only, framed'
+   } ),
+   {
+   label: 'ButtonWidget (indicator 
only)\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonWidget( {
framed: false,
icon: 'help',
title: 'Icon only'
} ),
{
-   label: 'ButtonWidget (icon 
only)\u200E',
+   label: 'ButtonWidget 
(frameless, icon only)\u200E',
align: 'top'
}
),
@@ -204,27 +224,7 @@
title: 'Indicator only'
} ),
{
-   label: 'ButtonWidget (indicator 
only)\u200E',
-   align: 'top'
-   }
-   ),
-   new OO.ui.FieldLayout(
-   new OO.ui.ButtonWidget( {
-   icon: 'help',
-   title: 'Icon only, framed'
-   } ),
-   {
-   label: 'ButtonWidget (icon 
only, framed)\u200E',
-   align: 'top'
-   }
-   ),
-   new OO.ui.FieldLayout(
-   new OO.ui.ButtonWidget( {
-   indicator: 'alert',
-   title: 'Indicator only, framed'
-   } ),
-   {
-   label: 'ButtonWidget (indicator 
only, framed)\u200E',
+   label: 'ButtonWidget 
(frameless, indicator only)\u200E',
align: 'top'
}
),
@@ -284,6 +284,17 @@
} ),
{
label: 'ButtonWidget 
(frameless, constructive)\u200E',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonWidget( {
+   framed: false,
+

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Grant sysop and interface-editor 'abusefilter-modify-restric...

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

Change subject: Grant sysop and interface-editor 
'abusefilter-modify-restricted' on trwiki
..


Grant sysop and interface-editor 'abusefilter-modify-restricted' on trwiki

Bug: T161960
Change-Id: I23d30277b0a00e8c990fce35464b9e096f0fb9d4
---
M wmf-config/abusefilter.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index e13af5e..5c72dc2 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -363,6 +363,8 @@
$wgAbuseFilterNotifications = false;
break;
case 'trwiki':
+   
$wgGroupPermissions['interface-editor']['abusefilter-modify-restricted'] = 
true; // T161960
+   $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true; // T161960
$wgAbuseFilterActions['block'] = true; // T161960
$wgAbuseFilterBlockDuration = 'indefinite'; // T161960
$wgAbuseFilterAnonBlockDuration = '24 hours';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23d30277b0a00e8c990fce35464b9e096f0fb9d4
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Luke081515 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TerraCodes 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Grant sysop and interface-editor 'abusefilter-modify-restric...

2017-04-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348239 )

Change subject: Grant sysop and interface-editor 
'abusefilter-modify-restricted' on trwiki
..

Grant sysop and interface-editor 'abusefilter-modify-restricted' on trwiki

Bug: T161960
Change-Id: I23d30277b0a00e8c990fce35464b9e096f0fb9d4
---
M wmf-config/abusefilter.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index e13af5e..5c72dc2 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -363,6 +363,8 @@
$wgAbuseFilterNotifications = false;
break;
case 'trwiki':
+   
$wgGroupPermissions['interface-editor']['abusefilter-modify-restricted'] = 
true; // T161960
+   $wgGroupPermissions['sysop']['abusefilter-modify-restricted'] = 
true; // T161960
$wgAbuseFilterActions['block'] = true; // T161960
$wgAbuseFilterBlockDuration = 'indefinite'; // T161960
$wgAbuseFilterAnonBlockDuration = '24 hours';

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Phabricator monthly email: Also include Differential user ac...

2017-04-14 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348238 )

Change subject: Phabricator monthly email: Also include Differential user 
activity
..

Phabricator monthly email: Also include Differential user activity

Change-Id: I183675e5a4c880cc10f7368fd65d54ae5f79a843
---
M modules/phabricator/templates/community_metrics.sh.erb
1 file changed, 16 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/348238/1

diff --git a/modules/phabricator/templates/community_metrics.sh.erb 
b/modules/phabricator/templates/community_metrics.sh.erb
index abcfaf7..95af778 100644
--- a/modules/phabricator/templates/community_metrics.sh.erb
+++ b/modules/phabricator/templates/community_metrics.sh.erb
@@ -14,8 +14,17 @@
 declare sql_name='phabricator_maniphest'
 declare sql_pass='<%= 
scope.lookupvar('passwords::mysql::phabricator::metrics_pass') %>'
 
-#echo "result_activesusers"
-result_activeusers=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h $sql_host -u 
$sql_user $sql_name << END
+#echo "result_activedifferentialusers"
+result_activedifferentialusers=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u $sql_user phabricator_differential << END
+
+SELECT COUNT(DISTINCT authorPHID) FROM differential_transaction WHERE
+FROM_UNIXTIME(dateCreated,'%Y%m')=date_format(NOW() - INTERVAL 1 
MONTH,'%Y%m');
+
+END
+)
+
+#echo "result_activemaniphestusers"
+result_activemaniphestusers=$(MYSQL_PWD=${sql_pass} /usr/bin/mysql -h 
$sql_host -u $sql_user $sql_name << END
 
 SELECT COUNT(DISTINCT authorPHID) FROM maniphest_transaction WHERE
 FROM_UNIXTIME(dateCreated,'%Y%m')=date_format(NOW() - INTERVAL 1 
MONTH,'%Y%m');
@@ -137,7 +146,7 @@
 
 accountscreated=$(echo $result_accounts_created | tr -d '\n')
 
-activeusers=$(echo $result_activeusers | cut -d " " -f3)
+activemaniphestusers=$(echo $result_activemaniphestusers | cut -d " " -f3)
 authors=$(echo $result_authors | cut -d " " -f3)
 resolvers=$(echo $result_resolvers | cut -d " " -f3)
 
@@ -180,6 +189,7 @@
 diff_lowest=$((epochnow-mediantasksopen_lowest_epoch))
 mediantasksopen_lowest=$(echo $((diff_lowest/86400)))
 
+activedifferentialusers=$(echo $result_activedifferentialusers | cut -d " " 
-f3)
 
 lastmonth=$(date --date="last month" +%Y-%m)
 
@@ -191,7 +201,7 @@
 This is your automatic monthly Phabricator statistics mail.
 
 Accounts created in (${lastmonth}): ${accountscreated}
-Active users (any activity) in (${lastmonth}): ${activeusers}
+Active Maniphest users (any activity) in (${lastmonth}): 
${activemaniphestusers}
 Task authors in (${lastmonth}): ${authors}
 Users who have closed tasks in (${lastmonth}): ${resolvers}
 
@@ -213,6 +223,8 @@
 
 (How long tasks have been open, not how long they have had that priority)
 
+Active Differential users (any activity) in (${lastmonth}): 
${activedifferentialusers}
+
 TODO: Numbers which refer to closed tasks might not be correct, as
 described in https://phabricator.wikimedia.org/T1003 .
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Improve config.example.yaml documentation.

2017-04-14 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348237 )

Change subject: Improve config.example.yaml documentation.
..

Improve config.example.yaml documentation.

Change-Id: I619e2f06ff5ef7a0b02f4395ed919aed9971c435
---
M config.example.yaml
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/config.example.yaml b/config.example.yaml
index fff190d..e74103a 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -37,8 +37,9 @@
   uri: 'http://localhost/w/api.php'
   # The "domain" is used for communication with Visual Editor
   # and RESTBase.  It defaults to the hostname portion of
-  # the `uri` property below, but you can manually set it
-  # to an arbitrary string.
+  # the `uri` property above, but you can manually set it
+  # to an arbitrary string. It must match the "domain" set
+  # in $wgVirtualRestConfig.
   domain: 'localhost'  # optional
   # To specify a proxy (or proxy headers) specific to this prefix
   # (which overrides defaultAPIProxyURI). Alternatively, set `proxy`

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: swift: make rewrite_thumb_server optional

2017-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348236 )

Change subject: swift: make rewrite_thumb_server optional
..

swift: make rewrite_thumb_server optional

Change-Id: Ied8d267ce1b5a7a855a5ca53297737abf7d454df
---
M modules/swift/manifests/proxy.pp
M modules/swift/templates/proxy-server.conf.erb
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/348236/1

diff --git a/modules/swift/manifests/proxy.pp b/modules/swift/manifests/proxy.pp
index 0281b1e..1ac73fd 100644
--- a/modules/swift/manifests/proxy.pp
+++ b/modules/swift/manifests/proxy.pp
@@ -1,6 +1,5 @@
 class swift::proxy (
 $proxy_service_host,
-$rewrite_thumb_server,
 $shard_container_list,
 $accounts = $swift::params::accounts,
 $credentials = $swift::params::account_keys,
@@ -12,6 +11,7 @@
 $num_workers   = $::processorcount,
 $backend_url_format= 'sitelang',
 $rewrite_account   = undef,
+$rewrite_thumb_server  = undef,
 $dispersion_account= undef,
 $tld   = 'org',
 $thumborhost   = '',
diff --git a/modules/swift/templates/proxy-server.conf.erb 
b/modules/swift/templates/proxy-server.conf.erb
index 2208f36..fc8a0b6 100644
--- a/modules/swift/templates/proxy-server.conf.erb
+++ b/modules/swift/templates/proxy-server.conf.erb
@@ -55,8 +55,10 @@
 # the auth system turns our login and key into an account / token pair.
 # the account remains valid forever, but the token times out.
 account = <%= @accounts[@rewrite_account]['account_name'] %>
+<% if defined? @rewrite_thumb_server -%>
 # the name of the scaler cluster.
 thumbhost = <%= @rewrite_thumb_server %>
+<%- end -%>
 # upload doesn't like our User-agent (Python-urllib/2.6), otherwise we could 
call it using urllib2.urlopen()
 user_agent = Mozilla/5.0
 # this list is the containers that should be sharded

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Improve documentation for sync-parserTests a bit.

2017-04-14 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348235 )

Change subject: Improve documentation for sync-parserTests a bit.
..

Improve documentation for sync-parserTests a bit.

Change-Id: If85b92ce4db9edba9e01fd8dc182bb8dc4e9efd5
---
M tools/sync-parserTests.js
1 file changed, 5 insertions(+), 3 deletions(-)


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

diff --git a/tools/sync-parserTests.js b/tools/sync-parserTests.js
index d58fef5..f5ac020 100755
--- a/tools/sync-parserTests.js
+++ b/tools/sync-parserTests.js
@@ -8,9 +8,11 @@
 
Basic use:
  $PARSOID is the path to a checked out git copy of Parsoid
- $REPO is the path to a checked out git copy of the repo containing the 
parserTest file
- $BRANCH is a branch name for the patch to $REPO (ie, 'pt-sync')
- $TARGET is the key to parserTests.json we're sync'ing
+ $REPO is the path to a checked out git copy of the repo containing
+   the parserTest file. (Check the `repo` key in tests/parserTests.json)
+ $BRANCH is a branch name for the patch to $REPO (ie, 'ptsync-')
+ $TARGET identifies which set of parserTests we're synchronizing.
+   (This should be one of the top-level keys in tests/parserTests.json)
 
$ cd $PARSOID
$ tools/sync-parserTests.js $REPO $BRANCH $TARGET

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Do not exceed limit of 50 pageids

2017-04-14 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348233 )

Change subject: Do not exceed limit of 50 pageids
..

Do not exceed limit of 50 pageids

AllpagesGenerator (and possibly others) returns pages with their ids.
When reused in PreloadingGenerator, this generates a warning and
truncates the series of pages to 50 at most.

Bug: T78333
Bug: T161783
Change-Id: I240b0f998d5ef9c6438338da9572bdde265a3699
---
M pywikibot/site.py
M scripts/category_redirect.py
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/33/348233/2

diff --git a/pywikibot/site.py b/pywikibot/site.py
index a16bdea..7178613 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3257,7 +3257,8 @@
 next_prio = 0
 rvgen = api.PropertyGenerator(props, site=self)
 rvgen.set_maximum_items(-1)  # suppress use of "rvlimit" parameter
-if len(pageids) == len(sublist):
+if (len(pageids) == len(sublist)
+and len(pageids) <= 50):  # xxx: T78333, T161783
 # only use pageids if all pages have them
 rvgen.request['pageids'] = set(pageids)
 else:
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 65aae8d..d616d4f 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -223,9 +223,8 @@
 comment = i18n.twtranslate(self.site, self.redir_comment)
 
 # generator yields all hard redirect pages in namespace 14
-for page in pagegenerators.PreloadingGenerator(
-self.site.allpages(namespace=14, filterredir=True),
-groupsize=250):
+for page in self.site.allpages(namespace=14, filterredir=True,
+   content=True):
 if page.isCategoryRedirect():
 # this is already a soft-redirect, so skip it (for now)
 continue

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I240b0f998d5ef9c6438338da9572bdde265a3699
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
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]: tests: Update OO.ui.Process tests for jQuery 3 compatibility

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

Change subject: tests: Update OO.ui.Process tests for jQuery 3 compatibility
..


tests: Update OO.ui.Process tests for jQuery 3 compatibility

The first two tests were relying on jQuery 1's behavior where
resolving a Deferred immediately would be synchronous.

Also updated all other tests to use the current method of doing
asynchronous tests in QUnit (returning a Promise rather than
manually stopping/starting the test runner).

Bug: T160802
Change-Id: I070f5dab69a1618907bb4e1f397698bf83bbbac1
---
M tests/Process.test.js
1 file changed, 52 insertions(+), 51 deletions(-)

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



diff --git a/tests/Process.test.js b/tests/Process.test.js
index 3f03640..00eef1a 100644
--- a/tests/Process.test.js
+++ b/tests/Process.test.js
@@ -6,7 +6,7 @@
var process = new OO.ui.Process(),
result = [];
 
-   process
+   return process
.next( function () {
result.push( 0 );
} )
@@ -16,16 +16,17 @@
.next( function () {
result.push( 2 );
} )
-   .execute();
-
-   assert.deepEqual( result, [ 0, 1, 2 ], 'Steps can be added at the end' 
);
+   .execute()
+   .then( function () {
+   assert.deepEqual( result, [ 0, 1, 2 ], 'Steps can be 
added at the end' );
+   } );
 } );
 
 QUnit.test( 'first', 1, function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
-   process
+   return process
.first( function () {
result.push( 0 );
} )
@@ -35,17 +36,17 @@
.first( function () {
result.push( 2 );
} )
-   .execute();
-
-   assert.deepEqual( result, [ 2, 1, 0 ], 'Steps can be added at the 
beginning' );
+   .execute()
+   .then( function () {
+   assert.deepEqual( result, [ 2, 1, 0 ], 'Steps can be 
added at the beginning' );
+   } );
 } );
 
-QUnit.asyncTest( 'execute (async)', 1, function ( assert ) {
-   // Async
+QUnit.test( 'execute (async)', 1, function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
-   process
+   return process
.next( function () {
var deferred = $.Deferred();
 
@@ -68,23 +69,22 @@
} )
.next( function () {
result.push( 2 );
+   } )
+   .execute()
+   .then( function () {
+   assert.deepEqual(
+   result,
+   [ 0, 1, 2 ],
+   'Synchronous and asynchronous steps are 
executed in the correct order'
+   );
} );
-
-   process.execute().done( function () {
-   assert.deepEqual(
-   result,
-   [ 0, 1, 2 ],
-   'Synchronous and asynchronous steps are executed in the 
correct order'
-   );
-   QUnit.start();
-   } );
 } );
 
-QUnit.asyncTest( 'execute (return false)', 1, function ( assert ) {
+QUnit.test( 'execute (return false)', 1, function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
-   process
+   return process
.next( function () {
var deferred = $.Deferred();
 
@@ -102,23 +102,23 @@
.next( function () {
// Should never be run because previous step is rejected
result.push( 2 );
+   } )
+   .execute()
+   .then( null, function () {
+   assert.deepEqual(
+   result,
+   [ 0, 1 ],
+   'Process is stopped when a step returns false'
+   );
+   return $.Deferred().resolve();
} );
-
-   process.execute().fail( function () {
-   assert.deepEqual(
-   result,
-   [ 0, 1 ],
-   'Process is stopped when a step returns false'
-   );
-   QUnit.start();
-   } );
 } );
 
-QUnit.asyncTest( 'execute (async reject)', 1, function ( assert ) {
+QUnit.test( 'execute (async reject)', 1, function ( assert ) {
var process = new OO.ui.Process(),
result = [];
 
-   process
+   return process
.next( function () {
result.push( 0 );
   

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Introduce single-line mode for surfaces

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

Change subject: Introduce single-line mode for surfaces
..


Introduce single-line mode for surfaces

Or rather multi-line, defaulted to true.

For now this blocks the creation of newlines using  or
via paste.

There are other ways to trigger complex creation that will need
to be addressed later, possibly at the transaction level:

* Pasting objects (e.g. HTML files)
* Sequences (e.g. '* ')
* Commands (no real-world examples)

Bug: T162808
Change-Id: I31fce3cc9ac6f7c12ec916b364b91cead2b4e6c9
---
M src/ce/keydownhandlers/ve.ce.LinearEnterKeyDownHandler.js
M src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js
M src/ce/ve.ce.Surface.js
M src/dm/lineardata/ve.dm.ElementLinearData.js
M src/ui/ve.ui.Surface.js
M src/ui/widgets/ve.ui.TargetWidget.js
M tests/ce/ve.ce.Surface.test.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
M tests/ve.test.utils.js
9 files changed, 67 insertions(+), 3 deletions(-)

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



diff --git a/src/ce/keydownhandlers/ve.ce.LinearEnterKeyDownHandler.js 
b/src/ce/keydownhandlers/ve.ce.LinearEnterKeyDownHandler.js
index fa8a64d..7d05f16 100644
--- a/src/ce/keydownhandlers/ve.ce.LinearEnterKeyDownHandler.js
+++ b/src/ce/keydownhandlers/ve.ce.LinearEnterKeyDownHandler.js
@@ -49,6 +49,10 @@
 
e.preventDefault();
 
+   if ( !surface.getSurface().isMultiline() ) {
+   return true;
+   }
+
if ( ( e.ctrlKey || e.metaKey ) && surface.getSurface().getInDialog() ) 
{
// We're inside a dialog. OOUI behavior is to close+submit a 
dialog if
// ctrl/cmd+enter is pressed. If this dialog is going to close, 
we
diff --git a/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js 
b/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js
index 84cbcd2..e82a26a 100644
--- a/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js
+++ b/src/ce/keydownhandlers/ve.ce.TableArrowKeyDownHandler.js
@@ -89,6 +89,7 @@
e.preventDefault();
 
this.moveTableSelection( surface, rowOffset, colOffset, checkDir, 
expand, wrap );
+   return true;
 };
 
 /**
diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 8d04250..5620fae 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -1100,7 +1100,10 @@
 
} else {
// External drop
-   this.handleDataTransfer( dataTransfer, false, targetFragment );
+   // TODO: Support sanitized drop on single line surfaces
+   if ( this.getSurface().isMultiline() ) {
+   this.handleDataTransfer( dataTransfer, false, 
targetFragment );
+   }
}
this.endRelocation();
 };
diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index cc96094..eb8a05d 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -1100,10 +1100,11 @@
  * @param {boolean} [rules.preserveHtmlWhitespace] Preserve non-semantic HTML 
whitespace
  * @param {boolean} [rules.nodeSanitization] Apply per-type node sanitizations 
via ve.dm.Node#sanitize
  * @param {boolean} [rules.keepEmptyContentBranches] Preserve empty content 
branch nodes
+ * @param {boolean} [rules.singleLine] Don't allow more that one 
ContentBranchNode
  */
 ve.dm.ElementLinearData.prototype.sanitize = function ( rules ) {
var i, len, annotations, emptySet, setToRemove, type, oldHash, newHash,
-   canContainContent, contentElement, isOpen, nodeClass, ann,
+   canContainContent, contentElement, isOpen, nodeClass, ann, 
start,
elementStack = [],
store = this.getStore(),
allAnnotations = this.getAnnotationsFromRange( new ve.Range( 0, 
this.getLength() ), true );
@@ -1228,6 +1229,16 @@
}
}
 
+   if ( canContainContent && !isOpen && rules.singleLine ) 
{
+   i++;
+   start = i;
+   while ( i < len && !( this.isOpenElementData( i 
) && this.getType( i ) === 'internalList' ) ) {
+   i++;
+   }
+   this.splice( start, i - start );
+   break;
+   }
+
// Store the current contentElement for splitting
if ( canContainContent ) {
contentElement = isOpen ? this.getData( i ) : 
null;
diff --git a/src/ui/ve.ui.Surface.js b/src/ui/ve.ui.Surface.js
index e25a74b..4c89bee 100644
--- a/src/ui/ve.ui.Surface.js
+++ b/src/ui/ve.ui.Surface.js
@@ -22,6 +22,7 

[MediaWiki-commits] [Gerrit] mediawiki/extensions[REL1_28]: rm -rf more extensions

2017-04-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348232 )

Change subject: rm -rf more extensions
..

rm -rf more extensions

Bug: T162884
Change-Id: I7382bd8820d0ec6522f6a1e8a4cc169d77d2dbd5
---
M .gitmodules
D RawImageHandler
D SMWEnrich
D SemanticDummyEditor
D ShortUrlApi
D ViewportMetrics
D WikibaseClient
D WikibaseLib
D WikibaseView
9 files changed, 0 insertions(+), 40 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/32/348232/2

diff --git a/.gitmodules b/.gitmodules
index 28d5c94..55571ff 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2074,10 +2074,6 @@
path = Ratings
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Ratings
branch = .
-[submodule "RawImageHandler"]
-   path = RawImageHandler
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/RawImageHandler
-   branch = .
 [submodule "ReaderFeedback"]
path = ReaderFeedback
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ReaderFeedback
@@ -2153,10 +2149,6 @@
 [submodule "RightFunctions"]
path = RightFunctions
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/RightFunctions
-   branch = .
-[submodule "SMWEnrich"]
-   path = SMWEnrich
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/SMWEnrich
branch = .
 [submodule "SSLClientAuthentication"]
path = SSLClientAuthentication
@@ -2269,10 +2261,6 @@
 [submodule "SemanticDrilldown"]
path = SemanticDrilldown
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticDrilldown
-   branch = .
-[submodule "SemanticDummyEditor"]
-   path = SemanticDummyEditor
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticDummyEditor
branch = .
 [submodule "SemanticExpressiveness"]
path = SemanticExpressiveness
@@ -2397,10 +2385,6 @@
 [submodule "ShortUrl"]
path = ShortUrl
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ShortUrl
-   branch = .
-[submodule "ShortUrlApi"]
-   path = ShortUrlApi
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ShortUrlApi
branch = .
 [submodule "ShoutBox"]
path = ShoutBox
@@ -2910,10 +2894,6 @@
path = ViewFiles
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ViewFiles
branch = .
-[submodule "ViewportMetrics"]
-   path = ViewportMetrics
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/ViewportMetrics
-   branch = .
 [submodule "Views"]
path = Views
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Views
@@ -3066,10 +3046,6 @@
path = Wikibase
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase
branch = .
-[submodule "WikibaseClient"]
-   path = WikibaseClient
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseClient
-   branch = .
 [submodule "WikibaseJavaScriptApi"]
path = WikibaseJavaScriptApi
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseJavaScriptApi
@@ -3077,10 +3053,6 @@
 [submodule "WikibaseLexeme"]
path = WikibaseLexeme
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseLexeme
-   branch = .
-[submodule "WikibaseLib"]
-   path = WikibaseLib
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseLib
branch = .
 [submodule "WikibaseMediaInfo"]
path = WikibaseMediaInfo
@@ -3101,10 +3073,6 @@
 [submodule "WikibaseRepository"]
path = WikibaseRepository
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseRepository
-   branch = .
-[submodule "WikibaseView"]
-   path = WikibaseView
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseView
branch = .
 [submodule "Wikidata"]
path = Wikidata
diff --git a/RawImageHandler b/RawImageHandler
deleted file mode 16
index 937a854..000
--- a/RawImageHandler
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 937a8549a3b90a539cab1fcd9e433830f649dee6
diff --git a/SMWEnrich b/SMWEnrich
deleted file mode 16
index 3a8910f..000
--- a/SMWEnrich
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3a8910fd9e35cc44e58785fc8dd31383732f574f
diff --git a/SemanticDummyEditor b/SemanticDummyEditor
deleted file mode 16
index 89f95b3..000
--- a/SemanticDummyEditor
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 89f95b3f7fd9956e19715102901f5c80ed12992a
diff --git a/ShortUrlApi b/ShortUrlApi
deleted file mode 16
index b273127..000
--- a/ShortUrlApi
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b273127212f560c66b611b9019c0eeda1aef2b6f
diff --git a/ViewportMetrics b/ViewportMetrics
deleted file mode 16
index 78a653f..000
--- a/ViewportMetrics
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 

[MediaWiki-commits] [Gerrit] mediawiki/extensions[REL1_28]: rm -rf more extensions

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

Change subject: rm -rf more extensions
..


rm -rf more extensions

Bug: T162884
Change-Id: I7382bd8820d0ec6522f6a1e8a4cc169d77d2dbd5
---
M .gitmodules
D RawImageHandler
D SMWEnrich
D SemanticDummyEditor
D ShortUrlApi
D ViewportMetrics
D WikibaseClient
D WikibaseLib
D WikibaseView
9 files changed, 0 insertions(+), 40 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 28d5c94..55571ff 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -2074,10 +2074,6 @@
path = Ratings
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Ratings
branch = .
-[submodule "RawImageHandler"]
-   path = RawImageHandler
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/RawImageHandler
-   branch = .
 [submodule "ReaderFeedback"]
path = ReaderFeedback
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ReaderFeedback
@@ -2153,10 +2149,6 @@
 [submodule "RightFunctions"]
path = RightFunctions
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/RightFunctions
-   branch = .
-[submodule "SMWEnrich"]
-   path = SMWEnrich
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/SMWEnrich
branch = .
 [submodule "SSLClientAuthentication"]
path = SSLClientAuthentication
@@ -2269,10 +2261,6 @@
 [submodule "SemanticDrilldown"]
path = SemanticDrilldown
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticDrilldown
-   branch = .
-[submodule "SemanticDummyEditor"]
-   path = SemanticDummyEditor
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/SemanticDummyEditor
branch = .
 [submodule "SemanticExpressiveness"]
path = SemanticExpressiveness
@@ -2397,10 +2385,6 @@
 [submodule "ShortUrl"]
path = ShortUrl
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ShortUrl
-   branch = .
-[submodule "ShortUrlApi"]
-   path = ShortUrlApi
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ShortUrlApi
branch = .
 [submodule "ShoutBox"]
path = ShoutBox
@@ -2910,10 +2894,6 @@
path = ViewFiles
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/ViewFiles
branch = .
-[submodule "ViewportMetrics"]
-   path = ViewportMetrics
-   url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/ViewportMetrics
-   branch = .
 [submodule "Views"]
path = Views
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Views
@@ -3066,10 +3046,6 @@
path = Wikibase
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/Wikibase
branch = .
-[submodule "WikibaseClient"]
-   path = WikibaseClient
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseClient
-   branch = .
 [submodule "WikibaseJavaScriptApi"]
path = WikibaseJavaScriptApi
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseJavaScriptApi
@@ -3077,10 +3053,6 @@
 [submodule "WikibaseLexeme"]
path = WikibaseLexeme
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseLexeme
-   branch = .
-[submodule "WikibaseLib"]
-   path = WikibaseLib
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseLib
branch = .
 [submodule "WikibaseMediaInfo"]
path = WikibaseMediaInfo
@@ -3101,10 +3073,6 @@
 [submodule "WikibaseRepository"]
path = WikibaseRepository
url = 
https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseRepository
-   branch = .
-[submodule "WikibaseView"]
-   path = WikibaseView
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/WikibaseView
branch = .
 [submodule "Wikidata"]
path = Wikidata
diff --git a/RawImageHandler b/RawImageHandler
deleted file mode 16
index 937a854..000
--- a/RawImageHandler
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 937a8549a3b90a539cab1fcd9e433830f649dee6
diff --git a/SMWEnrich b/SMWEnrich
deleted file mode 16
index 3a8910f..000
--- a/SMWEnrich
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 3a8910fd9e35cc44e58785fc8dd31383732f574f
diff --git a/SemanticDummyEditor b/SemanticDummyEditor
deleted file mode 16
index 89f95b3..000
--- a/SemanticDummyEditor
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 89f95b3f7fd9956e19715102901f5c80ed12992a
diff --git a/ShortUrlApi b/ShortUrlApi
deleted file mode 16
index b273127..000
--- a/ShortUrlApi
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit b273127212f560c66b611b9019c0eeda1aef2b6f
diff --git a/ViewportMetrics b/ViewportMetrics
deleted file mode 16
index 78a653f..000
--- a/ViewportMetrics
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: CentralAuthGroupMembershipProxy needs master CentralAuthUser...

2017-04-14 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348231 )

Change subject: CentralAuthGroupMembershipProxy needs master CentralAuthUser 
instances
..

CentralAuthGroupMembershipProxy needs master CentralAuthUser instances

For the calls to ->addGroup and ->removeGroup.

While we could get more complicated and add a flag to make master and
non-master instances, it's probably not worth it since the only caller
is SpecialGlobalGroupMembership.

Change-Id: I61535c3b0125245cbb6a7dd3f392aeb91f3b82d6
---
M includes/CentralAuthGroupMembershipProxy.php
M includes/CentralAuthUser.php
2 files changed, 23 insertions(+), 2 deletions(-)


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

diff --git a/includes/CentralAuthGroupMembershipProxy.php 
b/includes/CentralAuthGroupMembershipProxy.php
index 9e81b63..c3d9c2c 100644
--- a/includes/CentralAuthGroupMembershipProxy.php
+++ b/includes/CentralAuthGroupMembershipProxy.php
@@ -45,7 +45,7 @@
if ( $name === false ) {
return null;
}
-   $globalUser = CentralAuthUser::getInstanceByName( $name );
+   $globalUser = CentralAuthUser::getMasterInstanceByName( $name );
return $globalUser->exists() ? new 
CentralAuthGroupMembershipProxy( $globalUser ) : null;
}
 
@@ -54,7 +54,7 @@
 * @return CentralAuthGroupMembershipProxy|null
 */
public static function newFromId( $id ) {
-   $globalUser = CentralAuthUser::newFromId( $id );
+   $globalUser = CentralAuthUser::newMasterInstanceFromId( $id );
return $globalUser ? new CentralAuthGroupMembershipProxy( 
$globalUser ) : null;
}
 
diff --git a/includes/CentralAuthUser.php b/includes/CentralAuthUser.php
index de353f6..7363e6c 100644
--- a/includes/CentralAuthUser.php
+++ b/includes/CentralAuthUser.php
@@ -296,6 +296,27 @@
}
 
/**
+* Get a master CentralAuthUser object from a user's id
+*
+* @param int $id
+* @return CentralAuthUser|bool false if no user exists with that id
+*/
+   public static function newMasterInstanceFromId( $id ) {
+   $name = CentralAuthUtils::getCentralDB()->selectField(
+   'globaluser',
+   'gu_name',
+   array( 'gu_id' => $id ),
+   __METHOD__
+   );
+
+   if ( $name ) {
+   return CentralAuthUser::getMasterInstanceByName( $name 
);
+   } else {
+   return false;
+   }
+   }
+
+   /**
 * Create a CentralAuthUser object from a joined globaluser/localuser 
row
 *
 * @param $row ResultWrapper|object

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BounceHandler[master]: Use a master CentralAuthUser when unsubscribing

2017-04-14 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348230 )

Change subject: Use a master CentralAuthUser when unsubscribing
..

Use a master CentralAuthUser when unsubscribing

At some point trying to call writing methods on a non-master instance
will be an error.

Change-Id: Id59784ff693bf7e1dae017fbfa38ac8f6b4fffbd
---
M includes/BounceHandlerActions.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/includes/BounceHandlerActions.php 
b/includes/BounceHandlerActions.php
index ad0bf8f..9ad2b28 100644
--- a/includes/BounceHandlerActions.php
+++ b/includes/BounceHandlerActions.php
@@ -143,7 +143,11 @@
$user = User::newFromId( $bounceUserId );
// Handle the central account email status (if applicable)
if ( class_exists( 'CentralAuthUser') ) {
-   $caUser = CentralAuthUser::getInstance( $user );
+   if ( is_callable( 'CentralAuthUser::getMasterInstance' 
) ) { // 1.27
+   $caUser = CentralAuthUser::getMasterInstance( 
$user );
+   } else { // older
+   $caUser = CentralAuthUser::getInstance( $user );
+   }
if ( $caUser->isAttached() ) {
$caUser->setEmailAuthenticationTimestamp( null 
);
$caUser->saveSettings();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id59784ff693bf7e1dae017fbfa38ac8f6b4fffbd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BounceHandler
Gerrit-Branch: master
Gerrit-Owner: Anomie 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Don't trust LanguageConverter::$languagesWithVariants

2017-04-14 Thread C. Scott Ananian (Code Review)
C. Scott Ananian has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348229 )

Change subject: Don't trust LanguageConverter::$languagesWithVariants
..

Don't trust LanguageConverter::$languagesWithVariants

Use $language->hasVariants() as the authoritative source, since variants
could have been disabled with $wgDisabledVariants.

Change-Id: Ibc7197b7cb8f35c389ccd260f2fcd61a2692a101
---
M lib/includes/LanguageFallbackChainFactory.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/lib/includes/LanguageFallbackChainFactory.php 
b/lib/includes/LanguageFallbackChainFactory.php
index 7d12a73..4f99cfd 100644
--- a/lib/includes/LanguageFallbackChainFactory.php
+++ b/lib/includes/LanguageFallbackChainFactory.php
@@ -130,7 +130,12 @@
if ( is_string( $language ) ) {
$language = Language::factory( 
$language );
}
-   $parentLanguage = 
$language->getParentLanguage();
+   // $languagesWithVariants is just an 
approximation; variants
+   // can be disabled via $wgDisabledVariants, 
etc.  The
+   // $language->hasVariants() API is 
authoritative.
+   if ( $language->hasVariants() ) {
+   $parentLanguage = 
$language->getParentLanguage();
+   }
}
 
if ( $parentLanguage ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc7197b7cb8f35c389ccd260f2fcd61a2692a101
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Shallow stderr when running convert --version

2017-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348228 )

Change subject: Shallow stderr when running convert --version
..

Shallow stderr when running convert --version

On Wikimedia, $wgImageMagickConvertCommand points to a shell wrapper
that invokes ImageMagick convert with:

  firejail --profile=/etc/firejail/mediawiki-converters.profile

firejail emits to stderr an information message:

  Reading profile /etc/firejail/mediawiki-converters.profile

That ends up to HHVM stderr and is populated up to logstash as an error.

MediaWiki does check imagemagick version by running `convert -version`,
switch from wfShellExec() to wfShellExecWithStderr().

Bug: T158649
Change-Id: I78d1ef59533c605f59b42e10556bb595d6c2cc15
---
M includes/media/TransformationalImageHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/348228/1

diff --git a/includes/media/TransformationalImageHandler.php 
b/includes/media/TransformationalImageHandler.php
index 1ab0f36..2a74e0d 100644
--- a/includes/media/TransformationalImageHandler.php
+++ b/includes/media/TransformationalImageHandler.php
@@ -521,7 +521,7 @@
$cmd = wfEscapeShellArg( 
$wgImageMagickConvertCommand ) . ' -version';
wfDebug( $method . ": Running convert 
-version\n" );
$retval = '';
-   $return = wfShellExec( $cmd, $retval );
+   $return = wfShellExecWithStderr( $cmd, $retval 
);
$x = preg_match(
'/Version: ImageMagick 
([0-9]*\.[0-9]*\.[0-9]*)/', $return, $matches
);

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

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

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


[MediaWiki-commits] [Gerrit] analytics/dashiki[master]: Add annotations to tabs layout

2017-04-14 Thread Mforns (Code Review)
Mforns has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348227 )

Change subject: Add annotations to tabs layout
..

Add annotations to tabs layout

Bug: T162482
Change-Id: I5d0c9cab72aa713c7f0e6cd7b1f1d832c7aca5b8
---
M src/app/apis/aqs-api.js
M src/components/layouts/tabs/tabs.js
M src/components/visualizers/dygraphs-timeseries/bindings.js
M src/components/visualizers/visualizer/visualizer.js
M src/layouts/tabs/styles.css
5 files changed, 46 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/dashiki 
refs/changes/27/348227/1

diff --git a/src/app/apis/aqs-api.js b/src/app/apis/aqs-api.js
index 8f339d2..280dbf9 100644
--- a/src/app/apis/aqs-api.js
+++ b/src/app/apis/aqs-api.js
@@ -92,7 +92,7 @@
 
 // Datasets are disjoint but we need to add them so that
 // the timeseries object makes sense.
-var ts = TimeseriesData.mergeAll(timeseries)
+var ts = TimeseriesData.mergeAll(timeseries);
 deferred.resolve(ts);
 
 }, function (reason) {
diff --git a/src/components/layouts/tabs/tabs.js 
b/src/components/layouts/tabs/tabs.js
index 6866983..3f0edc8 100644
--- a/src/components/layouts/tabs/tabs.js
+++ b/src/components/layouts/tabs/tabs.js
@@ -7,7 +7,8 @@
 var ko = require('knockout'),
 _ = require('lodash'),
 templateMarkup = require('text!./tabs.html'),
-configApi = require('apis.config');
+configApi = require('apis.config'),
+annotationsApi = require('apis.annotations');
 
 require('twix');
 
@@ -64,6 +65,15 @@
 g.type === 'stacked-bars' ? 'bar' :
 g.type === 'dygraphs-timeseries' ? 'line' :
 g.type === 'table-timeseries' ? 'table' : '';
+
+// Fetch annotations if present
+var annotationsInfo = g.annotations;
+g.annotations = ko.observable();
+if (annotationsInfo) {
+annotationsApi.getTimeseriesData(
+{annotations: annotationsInfo}
+).then(g.annotations);
+}
 });
 
 }, this);
diff --git a/src/components/visualizers/dygraphs-timeseries/bindings.js 
b/src/components/visualizers/dygraphs-timeseries/bindings.js
index 78d5692..201b8d2 100644
--- a/src/components/visualizers/dygraphs-timeseries/bindings.js
+++ b/src/components/visualizers/dygraphs-timeseries/bindings.js
@@ -75,12 +75,14 @@
 dygraphChart.ready(function () {
 var i = 0,
 $roller = $(dygraphChart.roller_),
-$rollerHolder = $('Averaging: ');
+$rollerHolder = $('Averaging: ')
+charCode = 65;
 
 
dygraphChart.setAnnotations(annotations.rowData().map(function (a) {
 // find the closest date in the data that fits
 var closestDate = null;
 var lastDistance = Math.pow(2, 53) - 1;
+
 for (; i < rows.length; i++) {
 var date = rows[i][0];
 var thisDistance = Math.min(lastDistance, 
Math.abs(date.getTime() - a[0]));
@@ -103,7 +105,7 @@
 // just attach to the first series and show on 
X axis
 series: options.labels[1],
 attachAtBottom: true,
-shortText: 'A',
+shortText: String.fromCharCode(charCode++),
 // annoying thing to learn through 
experimentation:
 //   Dygraphs requires Date instances for the 
data, but
 //   Dygraphs requires milliseconds since 
epoch for the annotations
diff --git a/src/components/visualizers/visualizer/visualizer.js 
b/src/components/visualizers/visualizer/visualizer.js
index 19002a9..e28204b 100644
--- a/src/components/visualizers/visualizer/visualizer.js
+++ b/src/components/visualizers/visualizer/visualizer.js
@@ -141,6 +141,7 @@
 format: numberUtils.numberFormatter(graph.format),
 height: 500,
 id: _.kebabCase([graph.metric, graph.submetric].join('-')),
+annotations: graph.annotations,
 };
 this.params.downloadLink = graph.downloadLink;
 this.legendHeight = this.params.height - 80 + 'px';
diff --git a/src/layouts/tabs/styles.css b/src/layouts/tabs/styles.css
index 94d181b..c35ba52 100644
--- a/src/layouts/tabs/styles.css
+++ b/src/layouts/tabs/styles.css
@@ -82,3 +82,32 @@
 font-size: 11px!important;
 padding-right: 

[MediaWiki-commits] [Gerrit] mediawiki...Widgets[master]: v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd

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

Change subject: v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd
..


v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd

Commit 28b4ebd switched from deprecated Article::getContent() to
protected Article::getContentObject(). From now on we use
WikiPage, as recommended in docs/ContentHandler.txt.

Bug: T155088
Change-Id: I5b58a38a672cd37ff9e73f72cdb8cc2454ad65a9
---
M WidgetRenderer.php
M Widgets.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/WidgetRenderer.php b/WidgetRenderer.php
index b741d09..27db8ad 100644
--- a/WidgetRenderer.php
+++ b/WidgetRenderer.php
@@ -172,8 +172,8 @@
$widgetCode = '';
}
} else {
-   $widgetArticle = new Article( $widgetTitle );
-   $widgetContent = 
$widgetArticle->getContentObject();
+   $widgetWikiPage = new WikiPage( $widgetTitle );
+   $widgetContent = $widgetWikiPage->getContent();
$widgetCode = ContentHandler::getContentText( 
$widgetContent );
}
 
diff --git a/Widgets.php b/Widgets.php
index 25b2e27..b9ce9ed 100644
--- a/Widgets.php
+++ b/Widgets.php
@@ -16,7 +16,7 @@
'path' => __FILE__,
'name' => 'Widgets',
'descriptionmsg' => 'widgets-desc',
-   'version' => '1.2.1',
+   'version' => '1.2.2',
'author' => array( '[http://www.sergeychernyshev.com Sergey 
Chernyshev]', '...' ),
'url' => 'https://www.mediawiki.org/wiki/Extension:Widgets',
'license-name' => 'GPL-2.0+'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b58a38a672cd37ff9e73f72cdb8cc2454ad65a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Widgets
Gerrit-Branch: master
Gerrit-Owner: FreedomFighterSparrow 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Make a decorator for asynchronous methods

2017-04-14 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/347171 )

Change subject: [IMPR] Make a decorator for asynchronous methods
..

[IMPR] Make a decorator for asynchronous methods

Change-Id: Ib7a696aa45d395009bb096e30fb1900841a278d5
---
M pywikibot/page.py
1 file changed, 65 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/71/347171/4

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 00c60c3..1a77813 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -67,12 +67,12 @@
 from pywikibot.family import Family
 from pywikibot.site import DataSite, Namespace, need_version
 from pywikibot.tools import (
-compute_file_hash,
 PYTHON_VERSION,
 MediaWikiVersion, UnicodeMixin, ComparableMixin, DotReadableDict,
-deprecated, deprecate_arg, deprecated_args, issue_deprecation_warning,
+add_full_name, compute_file_hash, deprecated, deprecate_arg,
+deprecated_args, first_upper, issue_deprecation_warning,
 ModuleDeprecationWrapper as _ModuleDeprecationWrapper,
-first_upper, redirect_func, remove_last_args, _NotImplementedWarning,
+manage_wrapping, redirect_func, remove_last_args, _NotImplementedWarning,
 OrderedDict, Counter,
 )
 from pywikibot.tools.ip import ip_regexp
@@ -100,6 +100,46 @@
 )
 
 logger = logging.getLogger("pywiki.wiki.page")
+
+
+@add_full_name
+def asynchronous(func):
+"""
+Decorator to make it possible to run a BasePage method asynchronously.
+
+This is done when the method is called with kwarg asynchronous=True.
+Optionally, you can also provide kwarg callback, which, if provided, is
+a callable that gets the page as the first and a possible exception that
+occurred during saving in the second thread or None as the second argument.
+"""
+def handle(func, self, do_async=False, callback=None, *args, **kwargs):
+err = None
+try:
+func(self, *args, **kwargs)
+# TODO: other "expected" error types to catch?
+except pywikibot.Error as edit_err:
+err = edit_err  # edit_err will be deleted in the end of the scope
+link = self.title(asLink=True)
+pywikibot.log('Error saving page %s (%s)\n' % (link, err),
+  exc_info=True)
+if not callback and not do_async:
+if isinstance(err, pywikibot.PageSaveRelatedError):
+raise err
+raise pywikibot.OtherPageSaveError(self, err)
+if callback:
+callback(self, err)
+
+def wrapper(self, *args, **kwargs):
+do_async = kwargs.pop('asynchronous', False)
+if do_async:
+pywikibot.async_request(handle, func, self, do_async=True,
+*args, **kwargs)
+else:
+handle(func, self, *args, **kwargs)
+
+manage_wrapping(wrapper, func)
+
+return wrapper
 
 
 # Note: Link objects (defined later on) represent a wiki-page's title, while
@@ -1197,7 +1237,7 @@
 @param quiet: enable/disable successful save operation message;
 defaults to False.
 In asynchronous mode, if True, it is up to the calling bot to
-manage the ouput e.g. via callback.
+manage the output e.g. via callback.
 @type quiet: bool
 """
 if not summary:
@@ -1209,47 +1249,26 @@
 if not force and not self.botMayEdit():
 raise pywikibot.OtherPageSaveError(
 self, "Editing restricted by {{bots}} template")
-if asynchronous:
-pywikibot.async_request(self._save, summary=summary, watch=watch,
-minor=minor, botflag=botflag,
-asynchronous=asynchronous,
-callback=callback,
-cc=apply_cosmetic_changes,
-quiet=quiet, **kwargs)
-else:
-self._save(summary=summary, watch=watch, minor=minor,
-   botflag=botflag, asynchronous=asynchronous,
-   callback=callback, cc=apply_cosmetic_changes,
-   quiet=quiet, **kwargs)
+self._save(summary=summary, watch=watch, minor=minor, botflag=botflag,
+   asynchronous=asynchronous, callback=callback,
+   cc=apply_cosmetic_changes, quiet=quiet, **kwargs)
 
+@asynchronous
 def _save(self, summary=None, watch=None, minor=True, botflag=None,
-  asynchronous=False, callback=None, cc=None, quiet=False,
-  **kwargs):
+  cc=None, quiet=False, **kwargs):
 """Helper function for save()."""
-err = None
 link = self.title(asLink=True)
 if cc or cc is None and config.cosmetic_changes:
 summary = 

[MediaWiki-commits] [Gerrit] mediawiki...Popups[master]: dist: Bundle assets with webpack@2.4.1

2017-04-14 Thread Phuedx (Code Review)
Phuedx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348226 )

Change subject: dist: Bundle assets with webpack@2.4.1
..

dist: Bundle assets with webpack@2.4.1

Change-Id: I2d653bb50fdebce3a2b7ac3a60748cbb0b8b8f6d
---
M resources/dist/index.js
M resources/dist/index.js.map
2 files changed, 3 insertions(+), 3 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: (WIP) Crazy rspec for the role module (WIP)

2017-04-14 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/307425 )

Change subject: (WIP) Crazy rspec for the role module (WIP)
..

(WIP) Crazy rspec for the role module (WIP)

They should compile.

Finished in 8 minutes 6 seconds
291 examples, 0 failures, 25 pending

Change-Id: Ibcb7fe8d5c86b7ab1e99e0b5633d89bce3b21cfb
---
M .rubocop_todo.yml
A modules/role/.gitignore
A modules/role/.rspec
A modules/role/Rakefile
A modules/role/spec/fixtures/hiera.yaml
A modules/role/spec/fixtures/hieradata/common.yaml
A modules/role/spec/fixtures/hieradata/network.yaml
A modules/role/spec/fixtures/hieradata/realm_labs.yaml
A modules/role/spec/fixtures/hieradata/role/analytics_cluster/hadoop/worker.yaml
A modules/role/spec/fixtures/hieradata/role/analytics_cluster/refinery.yaml
A modules/role/spec/fixtures/hieradata/role/backup.yaml
A modules/role/spec/fixtures/hieradata/role/cache.yaml
A modules/role/spec/fixtures/hieradata/role/cache/2layer.yaml
A modules/role/spec/fixtures/hieradata/role/cache/base.yaml
A modules/role/spec/fixtures/hieradata/role/cache/kafka.yaml
A modules/role/spec/fixtures/hieradata/role/cache/maps.yaml
A modules/role/spec/fixtures/hieradata/role/cache/misc.yaml
A modules/role/spec/fixtures/hieradata/role/cache/text.yaml
A modules/role/spec/fixtures/hieradata/role/cache/upload.yaml
A modules/role/spec/fixtures/hieradata/role/ceilometer.yaml
A modules/role/spec/fixtures/hieradata/role/dataset.yaml
A modules/role/spec/fixtures/hieradata/role/deployment.yaml
A modules/role/spec/fixtures/hieradata/role/elasticsearch.yaml
A modules/role/spec/fixtures/hieradata/role/ganglia.yaml
A modules/role/spec/fixtures/hieradata/role/gerrit/server.yaml
A modules/role/spec/fixtures/hieradata/role/grafana/base.yaml
A modules/role/spec/fixtures/hieradata/role/kafka/analytics/burrow.yaml
A modules/role/spec/fixtures/hieradata/role/labs.yaml
A modules/role/spec/fixtures/hieradata/role/labs/dnsrecursor.yaml
A modules/role/spec/fixtures/hieradata/role/labs/nfs.yaml
A modules/role/spec/fixtures/hieradata/role/labs/ores.yaml
A modules/role/spec/fixtures/hieradata/role/labs/tools.yaml
A modules/role/spec/fixtures/hieradata/role/labs/tools/mailrelay.yaml
A modules/role/spec/fixtures/hieradata/role/lists.yaml
A modules/role/spec/fixtures/hieradata/role/maps.yaml
A modules/role/spec/fixtures/hieradata/role/maps/master.yaml
A modules/role/spec/fixtures/hieradata/role/maps/server.yaml
A modules/role/spec/fixtures/hieradata/role/maps/slave.yaml
A modules/role/spec/fixtures/hieradata/role/mediawiki.yaml
A modules/role/spec/fixtures/hieradata/role/mediawiki/jobrunner.yaml
A modules/role/spec/fixtures/hieradata/role/mediawiki/videoscaler.yaml
A modules/role/spec/fixtures/hieradata/role/openldap/labs.yaml
A modules/role/spec/fixtures/hieradata/role/ores/redis.yaml
A modules/role/spec/fixtures/hieradata/role/osm/master.yaml
A modules/role/spec/fixtures/hieradata/role/otrs/webserver.yaml
A modules/role/spec/fixtures/hieradata/role/phabricator/labs.yaml
A modules/role/spec/fixtures/hieradata/role/phabricator/main.yaml
A modules/role/spec/fixtures/hieradata/role/programdashboard.yaml
A modules/role/spec/fixtures/hieradata/role/prometheus/mysqld_exporter.yaml
A modules/role/spec/fixtures/hieradata/role/prometheus/node_exporter.yaml
A modules/role/spec/fixtures/hieradata/role/prometheus/tools.yaml
A modules/role/spec/fixtures/hieradata/role/puppetmaster.yaml
A modules/role/spec/fixtures/hieradata/role/puppetmaster/common.yaml
A modules/role/spec/fixtures/hieradata/role/puppetmaster/puppetdb.yaml
A modules/role/spec/fixtures/hieradata/role/salt/masters/labs.yaml
A modules/role/spec/fixtures/hieradata/role/snapshot.yaml
A modules/role/spec/fixtures/hieradata/role/striker/web.yaml
A modules/role/spec/fixtures/hieradata/role/swift/proxy.yaml
A modules/role/spec/fixtures/hieradata/role/swift/storage.yaml
A modules/role/spec/fixtures/hieradata/role/thumbor.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/clush.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/docker/builder.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/docker/registry.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/elasticsearch.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/etcd.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/k8s/bastion.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/k8s/master.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/k8s/webproxy.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/k8s/worker.yaml
A modules/role/spec/fixtures/hieradata/role/toollabs/logging/sender.yaml
A modules/role/spec/fixtures/hieradata/role/yubiauth/server.yaml
A modules/role/spec/fixtures/hieradata/role/zuul.yaml
A modules/role/spec/fixtures/manifests/site.pp
A modules/role/spec/fixtures/modules/grub/manifests/bootparam.pp
A 

[MediaWiki-commits] [Gerrit] integration/config[master]: Switch mw-checks-test to extension-unittests-non-voting

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

Change subject: Switch mw-checks-test to extension-unittests-non-voting
..


Switch mw-checks-test to extension-unittests-non-voting

DumpHTML: will fail because the entry point uses lower case.
HierarchyBuilder: depends on SemanticMediaWiki
Html2Wiki: require $wgNamespacesWithSubpages[NS_MAIN] = true

Change-Id: Ida5a8c03dfcee7bbd5da2a3d95031f10e348d5ee
---
M zuul/layout.yaml
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 510a3d3..b01be36 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -3204,7 +3204,7 @@
 
   - name: mediawiki/extensions/DumpHTML
 template:
-  - name: mw-checks-test
+  - name: extension-unittests-non-voting
   - name: npm
 check:
   - jsonlint
@@ -7348,7 +7348,7 @@
   # Depends on SemanticForms which is on GitHub
   - name: mediawiki/extensions/HierarchyBuilder
 template:
- - name: mw-checks-test
+ - name: extension-unittests-non-voting
  - name: npm
 
   - name: mediawiki/extensions/HitCounters
@@ -7363,7 +7363,7 @@
   # Require $wgNamespacesWithSubpages set to TRUE in the MAIN namespace.
   - name: mediawiki/extensions/Html2Wiki
 template:
- - name: mw-checks-test
+ - name: extension-unittests-non-voting
  - name: npm
 
   - name: mediawiki/extensions/ImageTagging

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida5a8c03dfcee7bbd5da2a3d95031f10e348d5ee
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [PEP8] Keep lines beneath 80 chars

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

Change subject: [PEP8] Keep lines beneath 80 chars
..


[PEP8] Keep lines beneath 80 chars

Change-Id: I9bfc5d6658fffa2a26196541745e9ed622ab0d5d
---
M scripts/imagecopy.py
M scripts/imagecopy_self.py
M scripts/imageharvest.py
3 files changed, 27 insertions(+), 16 deletions(-)

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



diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 49ce90b..1e2f454 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -77,7 +77,7 @@
 #
 # Another rewrite by:
 # (C) Multichill 2008-2011
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -366,9 +366,10 @@
 
 # Check if both are found and are equal
 if (informationMatch and selfMatch):
-if(informationMatch.group('author') == selfMatch.group('author')):
+if informationMatch.group('author') == selfMatch.group('author'):
 # Replace |Author=Original uploader was ... with |Author= ...
-pageText = informationRegex.sub(r'|Author=\g', 
pageText)
+pageText = informationRegex.sub(r'|Author=\g',
+pageText)
 return pageText
 
 
@@ -411,7 +412,7 @@
 self.uploader = "Unknown"
 # uploader.decode('utf-8')
 scrollbar = Tkinter.Scrollbar(self.root, orient=Tkinter.VERTICAL)
-label = Tkinter.Label(self.root, text=u"Enter new name or leave 
blank.")
+label = Tkinter.Label(self.root, text='Enter new name or leave blank.')
 imageinfo = Tkinter.Label(self.root, text='Uploaded by %s.' % uploader)
 textarea = Tkinter.Text(self.root)
 textarea.insert(Tkinter.END, content.encode('utf-8'))
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index 0f2e12f..f0ec351 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -45,7 +45,7 @@
 # English Wikipedia specific bot by:
 # (C) Multichill 2010-2012
 #
-# (C) Pywikibot team, 2010-2016
+# (C) Pywikibot team, 2010-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -86,7 +86,8 @@
 
 nowCommonsTemplate = {
 'de': u'{{NowCommons|%s}}',
-'en': 
'{{NowCommons|1=File:%s|date=~|reviewer={{subst:REVISIONUSER',
+'en': ('{{NowCommons|1=File:%s|date=~|'
+   'reviewer={{subst:REVISIONUSER'),
 'lb': u'{{Elo op Commons|%s}}',
 'nds-nl': u'{{NoenCommons|1=File:%s}}',
 'shared': ('{{NowCommons|1=File:%s|date=~|'
@@ -422,7 +423,11 @@
 u'skip': False}
 
 def getNewFieldsFromInformation(self, imagepage):
-"""Extract fields from current information template for new 
template."""
+"""Extract fields from current information template for new template.
+
+@param imagepage: The file page to get the template.
+@type imagepage: pywikibot.FilePage
+"""
 # fields = ['location', 'description', 'source', 'date', 'author',
 #   'permission', 'other versions']
 # FIXME: The implementation for German has to be checked for the
@@ -733,8 +738,8 @@
 
 self.old_description_label = Tkinter.Label(
 self.root, text='The old description was : ')
-self.new_description_label = Tkinter.Label(self.root,
-   text='The new fields are : 
')
+self.new_description_label = Tkinter.Label(
+self.root, text='The new fields are : ')
 self.filename_label = Tkinter.Label(self.root, text=u'Filename : ')
 self.information_description_label = Tkinter.Label(
 self.root, text='Description : ')
@@ -750,8 +755,8 @@
 
 self.information_licensetemplate_label = Tkinter.Label(
 self.root, text='License : ')
-self.information_categories_label = Tkinter.Label(self.root,
-  text=u'Categories : 
')
+self.information_categories_label = Tkinter.Label(
+self.root, text=u'Categories : ')
 
 self.filename_field = Tkinter.Entry(self.root)
 self.information_description = Tkinter.Entry(self.root)
@@ -937,7 +942,11 @@
 return cid
 
 def getOriginalUploadLog(self, imagepage):
-"""Get upload log to put at the bottom of the image description 
page."""
+"""Get upload log to put at the bottom of the image description page.
+
+@param imagepage: The file page to retrieve the log.
+@type imagepage: pywikibot.FilePage
+"""
 filehistory = imagepage.getFileVersionHistory()
 filehistory.reverse()
 
@@ -1065,8 +1074,8 @@
 uploaderThread.daemon = False
 
 if autonomous:
-pywikibot.output(u'Bot is running in 

[MediaWiki-commits] [Gerrit] mediawiki...api[master]: Ruby gem documentation should state license

2017-04-14 Thread Rammanojpotla (Code Review)
Rammanojpotla has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348225 )

Change subject: Ruby gem documentation should state license
..

Ruby gem documentation should state license

Applied a copyright text at the end of README.md and linked it to the license 
file

Bug:T94001
Change-Id: Icc487bc6932027e4652dc24743c664c245e0222b
---
M README.md
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/ruby/api 
refs/changes/25/348225/1

diff --git a/README.md b/README.md
index 8e3e7f3..f8b1458 100644
--- a/README.md
+++ b/README.md
@@ -137,3 +137,6 @@
 ### 0.0.1 2014-02-07
 
 - Added MediawikiApi#create_article and #create_user.
+
+
+#© Copyright 1989, Wikimedia Foundation & contributors Licensed 
[here](../LICENSE.txt).

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc487bc6932027e4652dc24743c664c245e0222b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/ruby/api
Gerrit-Branch: master
Gerrit-Owner: Rammanojpotla 

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


[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Rename $ceAllowConfirmedEmail to $wgAllowConfirmedEmail

2017-04-14 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348224 )

Change subject: Rename $ceAllowConfirmedEmail to $wgAllowConfirmedEmail
..

Rename $ceAllowConfirmedEmail to $wgAllowConfirmedEmail

The value of $ceAllowConfirmedEmail is copied to $wgAllowConfirmedEmail if
set in LocalSettings.php for backward-compatibility. However, a deprecation
warning is emitted in this case.

Bug: T162641
Change-Id: If4daf6f25f0d2b2c0f1e173ee3903063a39978bb
---
M extension.json
M includes/ConfirmEditHooks.php
2 files changed, 23 insertions(+), 16 deletions(-)


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

diff --git a/extension.json b/extension.json
index 8289d0e..61ec7af 100644
--- a/extension.json
+++ b/extension.json
@@ -91,11 +91,10 @@
}
},
"config": {
-   "_prefix": "",
-   "wgCaptchaWhitelistIP": false,
-   "wgCaptcha": null,
-   "wgCaptchaClass": "SimpleCaptcha",
-   "wgCaptchaTriggers": {
+   "CaptchaWhitelistIP": false,
+   "Captcha": null,
+   "CaptchaClass": "SimpleCaptcha",
+   "CaptchaTriggers": {
"edit": false,
"create": false,
"sendemail": false,
@@ -105,18 +104,18 @@
"badloginperuser": true,
"_merge_strategy": "array_plus"
},
-   "wgCaptchaTriggersOnNamespace": {
+   "CaptchaTriggersOnNamespace": {
"_merge_strategy": "array_plus_2d"
},
-   "wgCaptchaStorageClass": "CaptchaSessionStore",
-   "wgCaptchaSessionExpiration": 1800,
-   "wgCaptchaBadLoginExpiration": 300,
-   "wgCaptchaBadLoginPerUserExpiration": 600,
-   "ceAllowConfirmedEmail": false,
-   "wgCaptchaBadLoginAttempts": 3,
-   "wgCaptchaBadLoginPerUserAttempts": 20,
-   "wgCaptchaWhitelist": false,
-   "wgCaptchaRegexes": []
+   "CaptchaStorageClass": "CaptchaSessionStore",
+   "CaptchaSessionExpiration": 1800,
+   "CaptchaBadLoginExpiration": 300,
+   "CaptchaBadLoginPerUserExpiration": 600,
+   "AllowConfirmedEmail": false,
+   "CaptchaBadLoginAttempts": 3,
+   "CaptchaBadLoginPerUserAttempts": 20,
+   "CaptchaWhitelist": false,
+   "CaptchaRegexes": []
},
"manifest_version": 1
 }
diff --git a/includes/ConfirmEditHooks.php b/includes/ConfirmEditHooks.php
index 71ffee9..1dc80f9 100644
--- a/includes/ConfirmEditHooks.php
+++ b/includes/ConfirmEditHooks.php
@@ -87,12 +87,20 @@
 * Set up $wgWhitelistRead
 */
public static function confirmEditSetup() {
-   global $wgCaptchaTriggers, $wgWikimediaJenkinsCI;
+   global $wgCaptchaTriggers, $wgWikimediaJenkinsCI, 
$ceAllowConfirmedEmail,
+  $wgAllowConfirmedEmail;
 
// There is no need to run (core) tests with enabled 
ConfirmEdit - bug T44145
if ( isset( $wgWikimediaJenkinsCI ) && $wgWikimediaJenkinsCI 
=== true ) {
$wgCaptchaTriggers = array_fill_keys( array_keys( 
$wgCaptchaTriggers ), false );
}
+
+   // $ceAllowConfirmedEmail is deprecated and should be replaced 
by $wgAllowConfirmedEmail.
+   // For backward-compatibility, keep the value for some time. 
T162641
+   if ( isset( $ceAllowConfirmedEmail ) ) {
+   wfDeprecated( '$ceAllowConfirmedEmail' );
+   $wgAllowConfirmedEmail = $ceAllowConfirmedEmail;
+   }
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Revert "Add classList polyfill for IE9"

2017-04-14 Thread Esanders (Code Review)
Hello jenkins-bot, Jforrester,

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

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

to review the following change.


Change subject: Revert "Add classList polyfill for IE9"
..

Revert "Add classList polyfill for IE9"

IE9 is no longer supported.

This reverts commit bf73326f8efe421fa3472a0304eebef8fc12f2ed.

Bug: T162277
Change-Id: I1e955a493128e732dae39d1e2ea4a336c403374a
---
M AUTHORS.txt
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
D lib/classList/classList.js
M tests/index.html
6 files changed, 0 insertions(+), 260 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/23/348223/1

diff --git a/AUTHORS.txt b/AUTHORS.txt
index d9a8118..6a36a84 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -66,12 +66,6 @@
 
 Libraries used (alphabetically)
 
-classList.js
- – https://github.com/eligrey/classList.js/
- – Dedicated to the public domain
-   https://github.com/eligrey/classList.js/blob/master/LICENSE.md
- – Eli Grey, http://eligrey.com
-
 jQuery
  – https://jquery.com/
  – MIT license
diff --git a/build/modules.json b/build/modules.json
index a8c0b2c..602b779 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -78,11 +78,6 @@
"lib/rangefix/rangefix.js"
]
},
-   "dom-classlist-shim": {
-   "scripts": [
-   "lib/classList/classList.js"
-   ]
-   },
"jquery.i18n": {
"scripts": [
"lib/jquery.i18n/src/jquery.i18n.js",
@@ -203,7 +198,6 @@
"src/init/ve.init.Target.js"
],
"dependencies": [
-   "dom-classlist-shim",
"visualEditor.supportCheck",
"unicodejs",
"rangefix"
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 5a0898c..f4eed5a 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -142,9 +142,6 @@


 
-   
-   
-


 
diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 5a5020d..b7b6f9b 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -143,9 +143,6 @@


 
-   
-   
-


 
diff --git a/lib/classList/classList.js b/lib/classList/classList.js
deleted file mode 100644
index 469bacc..000
--- a/lib/classList/classList.js
+++ /dev/null
@@ -1,239 +0,0 @@
-/*
- * classList.js: Cross-browser full element.classList implementation.
- * 1.1.20150312
- *
- * By Eli Grey, http://eligrey.com
- * License: Dedicated to the public domain.
- *   See https://github.com/eligrey/classList.js/blob/master/LICENSE.md
- */
-
-/*global self, document, DOMException */
-
-/*! @source 
http://purl.eligrey.com/github/classList.js/blob/master/classList.js */
-
-if ("document" in self) {
-
-// Full polyfill for browsers with no classList support
-// Including IE < Edge missing SVGElement.classList
-if (!("classList" in document.createElement("_")) 
-  || document.createElementNS && !("classList" in 
document.createElementNS("http://www.w3.org/2000/svg","g;))) {
-
-(function (view) {
-
-"use strict";
-
-if (!('Element' in view)) return;
-
-var
-classListProp = "classList"
-  , protoProp = "prototype"
-  , elemCtrProto = view.Element[protoProp]
-  , objCtr = Object
-  , strTrim = String[protoProp].trim || function () {
-return this.replace(/^\s+|\s+$/g, "");
-  }
-  , arrIndexOf = Array[protoProp].indexOf || function (item) {
-var
-i = 0
-  , len = this.length
-;
-for (; i < len; i++) {
-  if (i in this && this[i] === item) {
-return i;
-  }
-}
-return -1;
-  }
-  // Vendors: please allow content code to instantiate DOMExceptions
-  , DOMEx = function (type, message) {
-this.name = type;
-this.code = DOMException[type];
-this.message = message;
-  }
-  , checkTokenAndGetIndex = function (classList, token) {
-if (token === "") {
-  throw new DOMEx(
-  "SYNTAX_ERR"
-, "An invalid or illegal string was specified"
-  );
-}
-if (/\s/.test(token)) {
-  throw new DOMEx(
-  "INVALID_CHARACTER_ERR"
-, "String contains an invalid character"
-  );
-}
-return arrIndexOf.call(classList, token);
-  }
-  , ClassList = function (elem) {
-var
-trimmedClasses = strTrim.call(elem.getAttribute("class") || "")
-  , classes = trimmedClasses ? trimmedClasses.split(/\s+/) : []
-  , i = 0
-  , len = classes.length
-;
-for (; i < len; i++) {
-  this.push(classes[i]);
-}
-this._updateClassName = function () {
-  elem.setAttribute("class", this.toString());
-};
-  }
-  , classListProto = 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Make sure sizes are not NaN too

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

Change subject: Make sure sizes are not NaN too
..


Make sure sizes are not NaN too

 * Because of the defensive coercion in `handleInfo()`, we need to check
   for more than just the type in this assertion.

 * This was pointed out in review of a14fadd8,
   https://gerrit.wikimedia.org/r/#/c/340661/9/lib/wt2html/tt/LinkHandler.js

Change-Id: I8e0573da19e14158f15c34f1917185c766c9535a
---
M lib/wt2html/tt/LinkHandler.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index a0483f3..0c8ca3c 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -615,8 +615,8 @@
var height = info.height;
var width = info.width;
 
-   console.assert(typeof height === 'number');
-   console.assert(typeof width === 'number');
+   console.assert(typeof height === 'number' && !Number.isNaN(height));
+   console.assert(typeof width === 'number' && !Number.isNaN(width));
 
if (info.thumburl && info.thumbheight) {
height = info.thumbheight;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e0573da19e14158f15c34f1917185c766c9535a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: dib: point imagecache to local directory

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

Change subject: dib: point imagecache to local directory
..


dib: point imagecache to local directory

The image cache (debootstrap, git repos...) defaults to /srv/dib/cache
which most probably does not exist a local machine.

diskimage-builder defaults to ~/.cache/image-create which I find
annoying because that fills the home dir.

Instead default to 'imagecache', eg whereever the script is being run,
typically straight from config/dib/

Change-Id: Ice34945ea501d27ede6367ee29fad0d5b97182dc
---
M dib/build_image.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/dib/build_image.sh b/dib/build_image.sh
index 37746f7..cf2b812 100755
--- a/dib/build_image.sh
+++ b/dib/build_image.sh
@@ -43,7 +43,7 @@
'wikimedia'
)
 export DIB_COMMAND=${DIB_COMMAND:-'disk-image-create'}
-export DIB_IMAGE_CACHE=${DIB_IMAGE_CACHE:-/srv/dib/cache}  # XXX should be 
unset by default
+export DIB_IMAGE_CACHE=${DIB_IMAGE_CACHE:-imagecache}  # XXX should be unset 
by default
 DATE=`date -u +'%Y%m%dT%H%M%SZ'`
 export DIB_IMAGE_NAME=${DIB_IMAGE_NAME:-"image-${DIB_RELEASE}-${DATE}"}
 export DIB_GIT_BARE_MIRRORS='/srv/git'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice34945ea501d27ede6367ee29fad0d5b97182dc
Gerrit-PatchSet: 2
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
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/selenium[master]: Ruby gem documentation should state license

2017-04-14 Thread Rammanojpotla (Code Review)
Rammanojpotla has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348222 )

Change subject: Ruby gem documentation should state license
..

Ruby gem documentation should state license

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/selenium 
refs/changes/22/348222/1

diff --git a/README.md b/README.md
index ab192a5..4ebe478 100644
--- a/README.md
+++ b/README.md
@@ -301,3 +301,6 @@
 ## Release notes
 
 See {file:RELEASES.md}.
+
+
+#© Copyright 1981, Wikimedia Foundation & contributors  Licensed 
[here](../LICENSE).

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc487bc6932027e4652dc24743c664c245e0222b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Rammanojpotla 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: exim/fundraising: barium -> civi1001, donate mails to civicrm

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

Change subject: exim/fundraising: barium -> civi1001, donate mails to civicrm
..


exim/fundraising: barium -> civi1001, donate mails to civicrm

barium is to be decom'ed per T162952 but it is still
in this exim template for donate.wikimedia.org mail
routing to CiviCRM.

So this should probably be updated before the shutdown tomorrow.

Bug: T162952
Change-Id: Ic9caa0af18952e0e7787bcf84a6cccdad770d445
---
M modules/role/templates/exim/exim4.conf.mx.erb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/templates/exim/exim4.conf.mx.erb 
b/modules/role/templates/exim/exim4.conf.mx.erb
index ad273c8..d645889 100644
--- a/modules/role/templates/exim/exim4.conf.mx.erb
+++ b/modules/role/templates/exim/exim4.conf.mx.erb
@@ -207,7 +207,7 @@
 donate:
driver = manualroute
domains = +donate_domains
-   route_list = * barium.frack.eqiad.wmnet byname
+   route_list = * civi1001.frack.eqiad.wmnet byname
transport = remote_smtp
 
 # Route non-local domains (including +relay_domains) via DNS MX and A records

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9caa0af18952e0e7787bcf84a6cccdad770d445
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Faidon Liambotis 
Gerrit-Reviewer: Jgreen 
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]: Revert "Dropping IE9: Remove disableUneditableContent from D...

2017-04-14 Thread Esanders (Code Review)
Hello jenkins-bot, Jforrester,

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

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

to review the following change.


Change subject: Revert "Dropping IE9: Remove disableUneditableContent from 
DesktopArticleTarget"
..

Revert "Dropping IE9: Remove disableUneditableContent from DesktopArticleTarget"

IE10 also lacks pointer events support.

This reverts commit 52667769532e27ee40f28a8d5d5aedf762b797bf.

Change-Id: I42c9530c45ad98657b403bdb266188368085716b
---
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
2 files changed, 16 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
index 27c5b00..0c0f9d7 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget.init.css
@@ -44,6 +44,7 @@
 .ve-loading #content > :not( .ve-init-mw-desktopArticleTarget-loading-overlay 
),
 /* Once activated, all uneditable content except catlinks */
 .ve-activated .ve-init-mw-desktopArticleTarget-uneditableContent {
+   /* IE9 is supported with JS events */
pointer-events: none;
-webkit-user-select: none;
-moz-user-select: none;
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 75b6417..665cb97 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -878,6 +878,7 @@
}
$categories = $( $.parseHTML( response.parse.categorieshtml ) );
target.transformCategoryLinks( $categories );
+   target.disableUneditableContent( $categories );
mw.hook( 'wikipage.categories' ).fire( $categories );
$( '#catlinks' ).replaceWith( $categories );
} );
@@ -1238,6 +1239,8 @@
$content = $content.parent();
}
 
+   this.disableUneditableContent();
+
this.updateHistoryState();
 };
 
@@ -1264,6 +1267,18 @@
 };
 
 /**
+ * Disabling of non-editable content, in a given context
+ *
+ * @param {jQuery|string} [context] Context to disable in
+ */
+ve.init.mw.DesktopArticleTarget.prototype.disableUneditableContent = function 
( context ) {
+   $( '.ve-init-mw-desktopArticleTarget-uneditableContent', context ).on( 
'click.ve-target', function ( e ) {
+   // Support IE9: Prevent default, but don't stop propagation
+   e.preventDefault();
+   } );
+};
+
+/**
  * Update the history state based on the editor mode
  */
 ve.init.mw.DesktopArticleTarget.prototype.updateHistoryState = function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42c9530c45ad98657b403bdb266188368085716b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
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...Widgets[master]: v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd

2017-04-14 Thread FreedomFighterSparrow (Code Review)
FreedomFighterSparrow has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348220 )

Change subject: v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd
..

v1.2.2: restore compatibility with MW 1.27 after commit 28b4ebd

Commit 28b4ebd switched from deprecated Article::getContent() to
protected Article::getContentObject(). From now on we use
WikiPage, as recommended in docs/ContentHandler.txt.

Bug: T155088
Change-Id: I5b58a38a672cd37ff9e73f72cdb8cc2454ad65a9
---
M WidgetRenderer.php
M Widgets.php
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Widgets 
refs/changes/20/348220/1

diff --git a/WidgetRenderer.php b/WidgetRenderer.php
index b741d09..27db8ad 100644
--- a/WidgetRenderer.php
+++ b/WidgetRenderer.php
@@ -172,8 +172,8 @@
$widgetCode = '';
}
} else {
-   $widgetArticle = new Article( $widgetTitle );
-   $widgetContent = 
$widgetArticle->getContentObject();
+   $widgetWikiPage = new WikiPage( $widgetTitle );
+   $widgetContent = $widgetWikiPage->getContent();
$widgetCode = ContentHandler::getContentText( 
$widgetContent );
}
 
diff --git a/Widgets.php b/Widgets.php
index 25b2e27..b9ce9ed 100644
--- a/Widgets.php
+++ b/Widgets.php
@@ -16,7 +16,7 @@
'path' => __FILE__,
'name' => 'Widgets',
'descriptionmsg' => 'widgets-desc',
-   'version' => '1.2.1',
+   'version' => '1.2.2',
'author' => array( '[http://www.sergeychernyshev.com Sergey 
Chernyshev]', '...' ),
'url' => 'https://www.mediawiki.org/wiki/Extension:Widgets',
'license-name' => 'GPL-2.0+'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b58a38a672cd37ff9e73f72cdb8cc2454ad65a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Widgets
Gerrit-Branch: master
Gerrit-Owner: FreedomFighterSparrow 

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add namespace filter to Special:LintErrors

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

Change subject: Add namespace filter to Special:LintErrors
..


Add namespace filter to Special:LintErrors

Bug: T162918
Change-Id: Id41faeafb9af161d32d5c273094fb2e6d8a8a64b
---
M i18n/en.json
M i18n/qqq.json
M includes/LintErrorsPager.php
M includes/SpecialLintErrors.php
4 files changed, 37 insertions(+), 4 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 9d904d8..bed97b6 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -7,6 +7,7 @@
"linterrors": "Lint errors",
"linterrors-subpage": "Lint errors: $1",
"linter-desc": "Track lint errors from an external service and show 
them to users",
+   "linter-form-namespace": "Namespace:",
"linter-pager-title": "Page title",
"linter-pager-template": "Through a template?",
"linter-pager-obsolete-tag-details": "Obsolete HTML tag",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 93c4291..5dd3129 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,6 +9,7 @@
"linterrors": "{{doc-special|LintErrors}}",
"linterrors-subpage": "Page title for Special:LintErrors, $1 is the 
localized category description",
"linter-desc": 
"{{desc|name=Linter|url=https://www.mediawiki.org/wiki/Extension:Linter}};,
+   "linter-form-namespace": "Label for select field on Special:LintErrors",
"linter-pager-title": "Table column heading for the column with page 
titles in it\n{{Identical|Page title}}",
"linter-pager-template": "Table column heading for column with template 
title in it or an em dash if lint error is not inside a template",
"linter-pager-obsolete-tag-details": "Table column heading",
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 81d9b3a..fac9107 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -41,16 +41,26 @@
 */
private $linkRenderer;
 
+   /**
+* @var int|null
+*/
+   private $namespace;
+
public function __construct( IContextSource $context, $category, 
LinkRenderer $linkRenderer,
-   CategoryManager $catManager
+   CategoryManager $catManager, $namespace
) {
$this->category = $category;
$this->categoryId = $catManager->getCategoryId( $this->category 
);
$this->linkRenderer = $linkRenderer;
+   $this->namespace = $namespace;
parent::__construct( $context );
}
 
public function getQueryInfo() {
+   $conds = [ 'linter_cat' => $this->categoryId ];
+   if ( $this->namespace !== null ) {
+   $conds['page_namespace'] = $this->namespace;
+   }
return [
'tables' => [ 'page', 'linter' ],
'fields' => array_merge(
@@ -61,7 +71,7 @@
'linter_start', 'linter_end',
]
),
-   'conds' => [ 'linter_cat' => $this->categoryId ],
+   'conds' => $conds,
'join_conds' => [ 'page' => [ 'INNER JOIN', 
'page_id=linter_page' ] ]
];
}
diff --git a/includes/SpecialLintErrors.php b/includes/SpecialLintErrors.php
index f13e765..ed100f3 100644
--- a/includes/SpecialLintErrors.php
+++ b/includes/SpecialLintErrors.php
@@ -20,6 +20,7 @@
 
 namespace MediaWiki\Linter;
 
+use HTMLForm;
 use Html;
 use SpecialPage;
 
@@ -29,6 +30,25 @@
 
public function __construct() {
parent::__construct( 'LintErrors' );
+   }
+
+   protected function showNamespaceFilterForm( $ns ) {
+   $fields = [
+   'namespace' => [
+   'type' => 'namespaceselect',
+   'name' => 'namespace',
+   'label-message' => 'linter-form-namespace',
+   'default' => $ns,
+   'id' => 'namespace',
+   'all' => '',
+   'cssclass' => 'namespaceselector',
+   ],
+   ];
+   $form = HTMLForm::factory( 'ooui', $fields, $this->getContext() 
);
+   $form->setWrapperLegend( true );
+   $form->addHeaderText( $this->msg( 
"linter-category-{$this->category}-desc" )->escaped() );
+   $form->setMethod( 'get' );
+   $form->prepareForm()->displayForm( false );
}
 
public function execute( $par ) {
@@ -51,10 +71,11 @@
)
);

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [PEP8] Keep lines beneath 80 chars

2017-04-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348219 )

Change subject: [PEP8] Keep lines beneath 80 chars
..

[PEP8] Keep lines beneath 80 chars

Change-Id: I9bfc5d6658fffa2a26196541745e9ed622ab0d5d
---
M scripts/imagecopy.py
M scripts/imagecopy_self.py
M scripts/imageharvest.py
3 files changed, 27 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/19/348219/1

diff --git a/scripts/imagecopy.py b/scripts/imagecopy.py
index 49ce90b..1e2f454 100644
--- a/scripts/imagecopy.py
+++ b/scripts/imagecopy.py
@@ -77,7 +77,7 @@
 #
 # Another rewrite by:
 # (C) Multichill 2008-2011
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -366,9 +366,10 @@
 
 # Check if both are found and are equal
 if (informationMatch and selfMatch):
-if(informationMatch.group('author') == selfMatch.group('author')):
+if informationMatch.group('author') == selfMatch.group('author'):
 # Replace |Author=Original uploader was ... with |Author= ...
-pageText = informationRegex.sub(r'|Author=\g', 
pageText)
+pageText = informationRegex.sub(r'|Author=\g',
+pageText)
 return pageText
 
 
@@ -411,7 +412,7 @@
 self.uploader = "Unknown"
 # uploader.decode('utf-8')
 scrollbar = Tkinter.Scrollbar(self.root, orient=Tkinter.VERTICAL)
-label = Tkinter.Label(self.root, text=u"Enter new name or leave 
blank.")
+label = Tkinter.Label(self.root, text='Enter new name or leave blank.')
 imageinfo = Tkinter.Label(self.root, text='Uploaded by %s.' % uploader)
 textarea = Tkinter.Text(self.root)
 textarea.insert(Tkinter.END, content.encode('utf-8'))
diff --git a/scripts/imagecopy_self.py b/scripts/imagecopy_self.py
index 0f2e12f..f5ab4c1 100644
--- a/scripts/imagecopy_self.py
+++ b/scripts/imagecopy_self.py
@@ -45,7 +45,7 @@
 # English Wikipedia specific bot by:
 # (C) Multichill 2010-2012
 #
-# (C) Pywikibot team, 2010-2016
+# (C) Pywikibot team, 2010-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -86,7 +86,8 @@
 
 nowCommonsTemplate = {
 'de': u'{{NowCommons|%s}}',
-'en': 
'{{NowCommons|1=File:%s|date=~|reviewer={{subst:REVISIONUSER',
+'en': ('{{NowCommons|1=File:%s|date=~|'
+   'reviewer={{subst:REVISIONUSER',
 'lb': u'{{Elo op Commons|%s}}',
 'nds-nl': u'{{NoenCommons|1=File:%s}}',
 'shared': ('{{NowCommons|1=File:%s|date=~|'
@@ -422,7 +423,11 @@
 u'skip': False}
 
 def getNewFieldsFromInformation(self, imagepage):
-"""Extract fields from current information template for new 
template."""
+"""Extract fields from current information template for new template.
+
+@param imagepage: The file page to get the template.
+@type imagepage: pywikibot.FilePage
+"""
 # fields = ['location', 'description', 'source', 'date', 'author',
 #   'permission', 'other versions']
 # FIXME: The implementation for German has to be checked for the
@@ -733,8 +738,8 @@
 
 self.old_description_label = Tkinter.Label(
 self.root, text='The old description was : ')
-self.new_description_label = Tkinter.Label(self.root,
-   text='The new fields are : 
')
+self.new_description_label = Tkinter.Label(
+self.root, text='The new fields are : ')
 self.filename_label = Tkinter.Label(self.root, text=u'Filename : ')
 self.information_description_label = Tkinter.Label(
 self.root, text='Description : ')
@@ -750,8 +755,8 @@
 
 self.information_licensetemplate_label = Tkinter.Label(
 self.root, text='License : ')
-self.information_categories_label = Tkinter.Label(self.root,
-  text=u'Categories : 
')
+self.information_categories_label = Tkinter.Label(
+self.root, text=u'Categories : ')
 
 self.filename_field = Tkinter.Entry(self.root)
 self.information_description = Tkinter.Entry(self.root)
@@ -937,7 +942,11 @@
 return cid
 
 def getOriginalUploadLog(self, imagepage):
-"""Get upload log to put at the bottom of the image description 
page."""
+"""Get upload log to put at the bottom of the image description page.
+
+@param imagepage: The file page to retrieve the log.
+@type imagepage: pywikibot.FilePage
+"""
 filehistory = imagepage.getFileVersionHistory()
 filehistory.reverse()
 
@@ -1065,8 +1074,8 @@
 uploaderThread.daemon = False
 
 if autonomous:
-pywikibot.output(u'Bot is running in 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Avoid overflowing of unbreakable words in interwiki search r...

2017-04-14 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348218 )

Change subject: Avoid overflowing of unbreakable words in interwiki search 
results
..

Avoid overflowing of unbreakable words in interwiki search results

The interwiki search results can be pretty narrow, and longer
unbreakable words or titles in the results might easily overflow the
containing box. break-word fixes all that.

Change-Id: I97e2b101433bde50a0aa48b772b2fe5a7157aed4
---
M 
resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/348218/1

diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
index d5e1c48..3f23dc4 100644
--- 
a/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
+++ 
b/resources/src/mediawiki.special/mediawiki.special.search.interwikiwidget.styles.less
@@ -20,6 +20,7 @@
width: 100%;
float: left;
list-style-type: none;
+   word-break: break-word;
 }
 
 /* clearfix */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[REL1_28]: rm -rf PipVideoJs

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

Change subject: rm -rf PipVideoJs
..


rm -rf PipVideoJs

Bug: T162884
Change-Id: Ia308f352d4ae31a021a4470ebcbeca9a60015a97
---
M .gitmodules
D PipVideoJs
2 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index 2ebc3bc..28d5c94 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1902,10 +1902,6 @@
path = PictureGame
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PictureGame
branch = .
-[submodule "PipVideoJs"]
-   path = PipVideoJs
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PipVideoJs
-   branch = .
 [submodule "PipeEscape"]
path = PipeEscape
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PipeEscape
diff --git a/PipVideoJs b/PipVideoJs
deleted file mode 16
index f9075a7..000
--- a/PipVideoJs
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f9075a787c55f95f1831794beff33350b7e3bc7c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia308f352d4ae31a021a4470ebcbeca9a60015a97
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki/extensions[REL1_28]: rm -rf PipVideoJs

2017-04-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/348217 )

Change subject: rm -rf PipVideoJs
..

rm -rf PipVideoJs

Bug: T162884
Change-Id: Ia308f352d4ae31a021a4470ebcbeca9a60015a97
---
M .gitmodules
D PipVideoJs
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/17/348217/2

diff --git a/.gitmodules b/.gitmodules
index 2ebc3bc..28d5c94 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1902,10 +1902,6 @@
path = PictureGame
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PictureGame
branch = .
-[submodule "PipVideoJs"]
-   path = PipVideoJs
-   url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PipVideoJs
-   branch = .
 [submodule "PipeEscape"]
path = PipeEscape
url = https://gerrit.wikimedia.org/r/mediawiki/extensions/PipeEscape
diff --git a/PipVideoJs b/PipVideoJs
deleted file mode 16
index f9075a7..000
--- a/PipVideoJs
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit f9075a787c55f95f1831794beff33350b7e3bc7c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia308f352d4ae31a021a4470ebcbeca9a60015a97
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Make (un)collapsing of unchanged texts more visible

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

Change subject: Make (un)collapsing of unchanged texts more visible
..

Make (un)collapsing of unchanged texts more visible

Bug: T162146
Change-Id: I7524a55c150cb9d05672ced81bb879c58aa8b9d7
---
M modules/ext.TwoColConflict.filterOptions.js
M modules/ext.TwoColConflict.less
2 files changed, 32 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/16/348216/1

diff --git a/modules/ext.TwoColConflict.filterOptions.js 
b/modules/ext.TwoColConflict.filterOptions.js
index e192087..2af0822 100644
--- a/modules/ext.TwoColConflict.filterOptions.js
+++ b/modules/ext.TwoColConflict.filterOptions.js
@@ -1,5 +1,6 @@
 ( function( mw, $ ) {
-   var autoScroll = new mw.libs.twoColConflict.AutoScroll();
+   var autoScroll = new mw.libs.twoColConflict.AutoScroll(),
+   expandBtn, collapseBtn;
 
$( function() {
// show filter options when js is available
@@ -14,9 +15,6 @@
$( '.mw-twocolconflict-diffchange-foreign' 
).slideDown();
}
} );
-
-   // select 'both' as the default option
-   $( 'input[name="mw-twocolconflict-show-changes"]' )[ 0 
].click();
 
/**
 * Either shows or hides the text surrounding the diff text
@@ -50,24 +48,33 @@
surroundingText( $( this ).val() === 'show' );
} );
 
+   expandBtn = new OO.ui.ButtonInputWidget( {
+   icon: 'expand',
+   value: 0,
+   framed: false,
+   name: 'mw-twocolconflict-expand-collapse',
+   classes: [ 'mw-twocolconflict-expand-collapse-btn' ]
+   } );
+
+   collapseBtn = new OO.ui.ButtonInputWidget( {
+   icon: 'collapse',
+   value: 1,
+   framed: false,
+   name: 'mw-twocolconflict-expand-collapse',
+   classes: [ 'mw-twocolconflict-expand-collapse-btn' ]
+   } );
+
+   $( '.mw-twocolconflict-diffchange-same-collapsed' ).prepend( 
expandBtn.$element );
+   $( '.mw-twocolconflict-diffchange-same-full' ).prepend( 
collapseBtn.$element );
+
+   $( 'button[name="mw-twocolconflict-expand-collapse"]' ).click( 
function () {
+   $( 'input[name="mw-twocolconflict-same"]' )[ $( this 
).val() ].click();
+   } );
+
+   // select 'both' as the default option
+   $( 'input[name="mw-twocolconflict-show-changes"]' )[ 0 
].click();
+
// select 'hide' as the default option
$( 'input[name="mw-twocolconflict-same"]' )[ 1 ].click();
-
-   $( '.mw-twocolconflict-diffchange-same-collapsed' ).click( 
function() {
-   var $changeDiv = $( this ).parent(),
-   manualOffset;
-
-   manualOffset = autoScroll.getDivTopOffset(
-   $changeDiv,
-   $( '.mw-twocolconflict-changes-editor' )
-   );
-
-   $( 'input[name="mw-twocolconflict-same"]' )[ 0 
].click();
-
-   // wait for expanding animations to be finished
-   $( '.mw-twocolconflict-diffchange-same-full' 
).promise().done( function() {
-   autoScroll.scrollToChangeWithOffset( 
$changeDiv, manualOffset );
-   } );
-   } );
} );
 }( mediaWiki, jQuery ) );
diff --git a/modules/ext.TwoColConflict.less b/modules/ext.TwoColConflict.less
index 02c70a3..347f573 100644
--- a/modules/ext.TwoColConflict.less
+++ b/modules/ext.TwoColConflict.less
@@ -133,6 +133,10 @@
border-left-color: #ff8c00;
 }
 
+.mw-twocolconflict-expand-collapse-btn {
+   float: right;
+}
+
 .mw-twocolconflict-diffchange-same {
background-color: #e2e2e2;
margin: 1em 0 1em 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7524a55c150cb9d05672ced81bb879c58aa8b9d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: Andrew-WMDE 

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


  1   2   >