[MediaWiki-commits] [Gerrit] Make ApiQueryImageInfo::getInfo() public - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Make ApiQueryImageInfo::getInfo() public
..

Make ApiQueryImageInfo::getInfo() public

Used as such in core and TimedMediaHandler.

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


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

diff --git a/includes/api/ApiQueryImageInfo.php 
b/includes/api/ApiQueryImageInfo.php
index 6890046..b9ec2c3 100644
--- a/includes/api/ApiQueryImageInfo.php
+++ b/includes/api/ApiQueryImageInfo.php
@@ -357,7 +357,7 @@
 *'revdelUser': User to use when checking whether to show 
revision-deleted fields.
 * @return array Result array
 */
-   static function getInfo( $file, $prop, $result, $thumbParams = null, 
$opts = false ) {
+   public static function getInfo( $file, $prop, $result, $thumbParams = 
null, $opts = false ) {
global $wgContLang;
 
$anyHidden = false;

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

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

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


[MediaWiki-commits] [Gerrit] Declare functions with access modifiers - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Declare functions with access modifiers
..

Declare functions with access modifiers

Parents have this visibility.

Change-Id: Icb4d0a112def0ac02f9aa42723c81bc63c085450
---
M includes/api/ApiStashEdit.php
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/includes/api/ApiStashEdit.php b/includes/api/ApiStashEdit.php
index d8562b0..0d469a7 100644
--- a/includes/api/ApiStashEdit.php
+++ b/includes/api/ApiStashEdit.php
@@ -433,19 +433,19 @@
];
}
 
-   function needsToken() {
+   public function needsToken() {
return 'csrf';
}
 
-   function mustBePosted() {
+   public function mustBePosted() {
return true;
}
 
-   function isWriteMode() {
+   public function isWriteMode() {
return true;
}
 
-   function isInternal() {
+   public function isInternal() {
return true;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Preferences: Fixed autoloader entry - change (mediawiki...BlueSpiceExtensions)

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

Change subject: Preferences: Fixed autoloader entry
..


Preferences: Fixed autoloader entry

There was a mistake in the class name that got registered.

Change-Id: I292f0fee3a11d07848b00ed51633b3f1b0c8ffad
---
M Preferences/Preferences.setup.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/Preferences/Preferences.setup.php 
b/Preferences/Preferences.setup.php
index 73d1b98..d65841a 100644
--- a/Preferences/Preferences.setup.php
+++ b/Preferences/Preferences.setup.php
@@ -2,7 +2,7 @@
 
 BsExtensionManager::registerExtension('Preferences', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE, BsACTION::LOAD_SPECIALPAGE);
 
-$GLOBALS['wgAutoloadClasses']['Preferences'] = __DIR__ . 
'/Preferences.class.php';
+$GLOBALS['wgAutoloadClasses']['BsPreferences'] = __DIR__ . 
'/Preferences.class.php';
 
 $wgMessagesDirs['Preferences'] = __DIR__ . '/i18n';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I292f0fee3a11d07848b00ed51633b3f1b0c8ffad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ExtensionManager: Invoke autoloader if possible - change (mediawiki...BlueSpiceFoundation)

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

Change subject: ExtensionManager: Invoke autoloader if possible
..


ExtensionManager: Invoke autoloader if possible

In future we are going to remove the 'require' statements completely and
only use autoloader. Until this we just priotize autoloader.

Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
---
M includes/ExtensionManager.class.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/includes/ExtensionManager.class.php 
b/includes/ExtensionManager.class.php
index a44483a..ca6dbd8 100644
--- a/includes/ExtensionManager.class.php
+++ b/includes/ExtensionManager.class.php
@@ -85,6 +85,11 @@
$path = "$IP/extensions/BlueSpiceExtensions";
 
foreach ( self::$prRegisteredExtensions as $extension => 
$attributes ) {
+   //if possible, load by autoloader
+   if( class_exists( 'Bs' . $extension ) || 
class_exists( $extension ) ) {
+   continue;
+   }
+
if ( $attributes['baseDir'] != 'ext' ) {
require( $attributes['baseDir'] . DS . 
$extension . '.class.php' );
} else {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Remove deprecated ApiQuoery::getModuleType() - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Remove deprecated ApiQuoery::getModuleType()
..

Remove deprecated ApiQuoery::getModuleType()

No more uses found in core or Gerrit extensions.

Change-Id: I1d46adc9ecad598c7d7726a2243bba4f7a04531a
---
M RELEASE-NOTES-1.27
M includes/api/ApiQuery.php
2 files changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 437f8e6..6f7dbc6 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -218,6 +218,7 @@
 * ApiQueryBase::checkRowCount() was removed (deprecated since 1.24).
 * ApiQueryBase::getDirectionDescription() was removed (deprecated since 1.25).
 * ApiQuery::getModules() was removed (deprecated since 1.21).
+* ApiQuery::getModuleType() was removed (deprecated since 1.21).
 * ApiMain::getModules() was removed (deprecated since 1.21).
 * ApiBase::getVersion() was removed (deprecated since 1.21).
 
diff --git a/includes/api/ApiQuery.php b/includes/api/ApiQuery.php
index 58b670a..c0cd21d 100644
--- a/includes/api/ApiQuery.php
+++ b/includes/api/ApiQuery.php
@@ -203,16 +203,6 @@
}
 
/**
-* Get whether the specified module is a prop, list or a meta query 
module
-* @deprecated since 1.21, use getModuleManager()->getModuleGroup()
-* @param string $moduleName Name of the module to find type for
-* @return string|null
-*/
-   function getModuleType( $moduleName ) {
-   return $this->getModuleManager()->getModuleGroup( $moduleName );
-   }
-
-   /**
 * @return ApiFormatRaw|null
 */
public function getCustomPrinter() {

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

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

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


[MediaWiki-commits] [Gerrit] Make ApiImportReporter public - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Make ApiImportReporter public
..

Make ApiImportReporter public

Used as such in this file.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/275764/1

diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php
index c5a8a71..10106ff 100644
--- a/includes/api/ApiImport.php
+++ b/includes/api/ApiImport.php
@@ -194,7 +194,7 @@
parent::reportPage( $title, $origTitle, $revisionCount, 
$successCount, $pageInfo );
}
 
-   function getData() {
+   public function getData() {
return $this->mResultArr;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Make ApiFormatBase::addXslt() protected - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Make ApiFormatBase::addXslt() protected
..

Make ApiFormatBase::addXslt() protected

Ony used in private/protected context.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/62/275762/1

diff --git a/includes/api/ApiFormatXml.php b/includes/api/ApiFormatXml.php
index be9b6d0..a45dbeb 100644
--- a/includes/api/ApiFormatXml.php
+++ b/includes/api/ApiFormatXml.php
@@ -266,7 +266,7 @@
);
}
 
-   function addXslt() {
+   protected function addXslt() {
$nt = Title::newFromText( $this->mXslt );
if ( is_null( $nt ) || !$nt->exists() ) {
$this->setWarning( 'Invalid or non-existent stylesheet 
specified' );

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

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

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


[MediaWiki-commits] [Gerrit] Make ImportReporter() and override public - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Make ImportReporter() and override public
..

Make ImportReporter() and override public

Used as such in SpecialImport.php.

Change-Id: Ia8cb1f4b95f43a50ff7ddd9aa4cb3ffc90f916c8
---
M includes/api/ApiImport.php
M includes/specials/SpecialImport.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/63/275763/1

diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php
index 8574dce..c5a8a71 100644
--- a/includes/api/ApiImport.php
+++ b/includes/api/ApiImport.php
@@ -175,7 +175,7 @@
 * @param array $pageInfo
 * @return void
 */
-   function reportPage( $title, $origTitle, $revisionCount, $successCount, 
$pageInfo ) {
+   public function reportPage( $title, $origTitle, $revisionCount, 
$successCount, $pageInfo ) {
// Add a result entry
$r = [];
 
diff --git a/includes/specials/SpecialImport.php 
b/includes/specials/SpecialImport.php
index 72f8cca..fe1dd98 100644
--- a/includes/specials/SpecialImport.php
+++ b/includes/specials/SpecialImport.php
@@ -581,7 +581,7 @@
 * @param array $pageInfo
 * @return void
 */
-   function reportPage( $title, $foreignTitle, $revisionCount,
+   public function reportPage( $title, $foreignTitle, $revisionCount,
$successCount, $pageInfo ) {
$args = func_get_args();
call_user_func_array( $this->mOriginalPageOutCallback, $args );

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

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

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


[MediaWiki-commits] [Gerrit] [FIX] intersect_generators must use daemon threads - change (pywikibot/core)

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

Change subject: [FIX] intersect_generators must use daemon threads
..


[FIX] intersect_generators must use daemon threads

Set threads in intersect_generators() as daemon threads, so that they
are killed automatically on program exit.

With the quit mechanism implemented via QuitKeyboardInterrupt,
KeyboardInterrupt is not caught any longer in intersect_generators()
and scripts based on Bot class hang when using pagegenerators with
parameter -intersect.

Bug: T129186
Change-Id: I61b2770afce4fd0c86ca0f0a7996432375e8b18a
---
M pywikibot/tools/__init__.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 94a6dcd..c2c5bba 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -695,6 +695,7 @@
 
 for source in genlist:
 threaded_gen = ThreadedGenerator(name=repr(source), target=source)
+threaded_gen.daemon = True
 thrlist.append(threaded_gen)
 
 while True:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61b2770afce4fd0c86ca0f0a7996432375e8b18a
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ExtensionManager: Invoke autoloader if possible - change (mediawiki...BlueSpiceFoundation)

2016-03-07 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: ExtensionManager: Invoke autoloader if possible
..

ExtensionManager: Invoke autoloader if possible

In future we are going to remove the 'require' statements completely and
only use autoloader. Until this we just priotize autoloader.

Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
---
M includes/ExtensionManager.class.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/includes/ExtensionManager.class.php 
b/includes/ExtensionManager.class.php
index a44483a..ca6dbd8 100644
--- a/includes/ExtensionManager.class.php
+++ b/includes/ExtensionManager.class.php
@@ -85,6 +85,11 @@
$path = "$IP/extensions/BlueSpiceExtensions";
 
foreach ( self::$prRegisteredExtensions as $extension => 
$attributes ) {
+   //if possible, load by autoloader
+   if( class_exists( 'Bs' . $extension ) || 
class_exists( $extension ) ) {
+   continue;
+   }
+
if ( $attributes['baseDir'] != 'ext' ) {
require( $attributes['baseDir'] . DS . 
$extension . '.class.php' );
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4d3d0e5e8cfda26b167989a98225edece8a978bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] Implement the Wikimedia User Agent policy in setting agent type - change (analytics...source)

2016-03-07 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review.

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

Change subject: Implement the Wikimedia User Agent policy in setting agent type
..

Implement the Wikimedia User Agent policy in setting agent type

This patch implements the Wikimedia User Agent policy defined here:
https://meta.wikimedia.org/wiki/User-Agent_policy. Specifically, it
now tags the occurence of bot, emails, User/User talk pages, wikimedia tools
and github links as automated traffic (currently denoted by agent-type spider
in the webrequest table). It also deprecated the WikimediaBot convention
which will no longer be used. See -
https://lists.wikimedia.org/pipermail/analytics/2016-February/004905.html

Bug: T125731
Change-Id: I9dcbc8240ffb2b2c5e0868b4b793b1079b7284ef
---
M 
refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java
M 
refinery-core/src/test/java/org/wikimedia/analytics/refinery/core/TestWebrequest.java
M refinery-core/src/test/resources/isSpider_test_data.csv
D 
refinery-hive/src/main/java/org/wikimedia/analytics/refinery/hive/IsWikimediaBotUDF.java
M 
refinery-hive/src/test/java/org/wikimedia/analytics/refinery/hive/TestIsCrawlerUDF.java
M 
refinery-hive/src/test/java/org/wikimedia/analytics/refinery/hive/TestIsSpiderUDF.java
D 
refinery-hive/src/test/java/org/wikimedia/analytics/refinery/hive/TestIsWikimediaBotUDF.java
7 files changed, 76 insertions(+), 189 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source 
refs/changes/60/275760/1

diff --git 
a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java
 
b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java
index edd5204..8602547 100644
--- 
a/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java
+++ 
b/refinery-core/src/main/java/org/wikimedia/analytics/refinery/core/Webrequest.java
@@ -41,10 +41,19 @@
 return instance;
 }
 
+/* Regex to coarsely match email addresses in the user-agent as part of 
spider identification,
+   as the User-Agent policy - 
https://meta.wikimedia.org/wiki/User-Agent_policy,
+   encourages bot developers to leave contact information in the user 
agent string.
+ */
+private static final String coarseEmailPattern = 
"\\w+@\\w+\\.[a-zA-Z]{2,3}";
+
 /*
- * Spiders identification pattern (obvisouly not perfect...)
+ * Spiders identification pattern (obviously not perfect...)
  * to be used in addition to ua-parser device_family field
  * being identified as Spider.
+ *
+ * Implements also the Wikimedia User-Agent policy -
+ * https://meta.wikimedia.org/wiki/User-Agent_policy
  */
 private static final Pattern spiderPattern = Pattern.compile("(?i)^(" +
 
".*(bot|spider|WordPress|AppEngine|AppleDictionaryService|Python-urllib|python-requests|"
 +
@@ -52,7 +61,8 @@
 "|(goo 
wikipedia|MediaWikiCrawler-Google|wikiwix-bot|Java/|curl|PHP/|Faraday|HTTPC|Ruby|\\.NET|"
 +
 
"Python|Apache|Scrapy|PycURL|libwww|Zend|wget|nodemw|WinHttpRaw|Twisted|com\\.eusoft|Lagotto|"
 +
 
"Peggo|Recuweb|check_http|Magnus|MLD|Jakarta|find-link|J\\. 
River|projectplan9|ADmantX|" +
-
"httpunit|LWP|iNaturalist|WikiDemo|FSResearchIt|livedoor|Microsoft 
Monitoring|MediaWiki).*" +
+
"httpunit|LWP|iNaturalist|WikiDemo|FSResearchIt|livedoor|Microsoft 
Monitoring|MediaWiki|" +
+"User:|User_talk:|github|tools.wmflabs.org|" + 
coarseEmailPattern + ").*" +
 ")$");
 
 /*
@@ -61,11 +71,6 @@
  * We use a LRU cache to prevent recomputing agentType for frequently seen 
user agents.
  */
 private Utilities.LRUCache agentTypeCache = new 
Utilities.LRUCache<>(1);
-
-/*
- * WikimediaBot identification pattern 
- */
-private static final Pattern wikimediaBotPattern = 
Pattern.compile("\\bWikimediaBot\\b");
 
 /**
  * Pattern for automatically-added subdomains that indicate zero,
@@ -86,8 +91,7 @@
 
 /**
  * Identify a bunch of spiders; returns TRUE
- * if the user agent matches a known spider and doesn't
- * match the WikimediaBot convention.
+ * if the user agent matches a known spider.
  * @paramuserAgentthe user agent associated with the request.
  * @return   boolean
  */
@@ -98,8 +102,7 @@
 if (agentTypeCache.containsKey(userAgent))
 return agentTypeCache.get(userAgent);
 else {
-boolean isSpider = (spiderPattern.matcher(userAgent).find()
-&& 
!wikimediaBotPattern.matcher(userAgent).find());
+boolean isSpider = spiderPattern.matcher(userAgent).find();
 agentTypeCache.put(userAgent, 

[MediaWiki-commits] [Gerrit] Make ApiFormatBase::initPrinter public - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Make ApiFormatBase::initPrinter public
..

Make ApiFormatBase::initPrinter public

It's overridden three times, and in all cases it's public.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/275759/1

diff --git a/includes/api/ApiFormatBase.php b/includes/api/ApiFormatBase.php
index 7c203d9..c826bba 100644
--- a/includes/api/ApiFormatBase.php
+++ b/includes/api/ApiFormatBase.php
@@ -151,7 +151,7 @@
 * Initialize the printer function and prepare the output headers.
 * @param bool $unused Always false since 1.25
 */
-   function initPrinter( $unused = false ) {
+   public function initPrinter( $unused = false ) {
if ( $this->mDisabled ) {
return;
}

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

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

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


[MediaWiki-commits] [Gerrit] Call static functions statically in API - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Call static functions statically in API
..

Call static functions statically in API

Change-Id: I5952acb932c1e7337dc85226a898da3472e799e9
---
M includes/api/ApiBase.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/275758/1

diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 76fae6b..1a87020 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -2323,18 +2323,18 @@
$msg = ApiBase::makeMessage( $msg, $this->getContext(),
[ $prefix, $param, $name, $path ] );
if ( !$msg ) {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,
'Value in ApiBase::PARAM_HELP_MSG is 
not valid' );
}
$msgs[$param] = [ $msg ];
 
if ( isset( 
$settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
if ( !is_array( 
$settings[ApiBase::PARAM_HELP_MSG_PER_VALUE] ) ) {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,

'ApiBase::PARAM_HELP_MSG_PER_VALUE is not valid' );
}
if ( !is_array( $settings[ApiBase::PARAM_TYPE] 
) ) {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,

'ApiBase::PARAM_HELP_MSG_PER_VALUE may only be used when ' .
'ApiBase::PARAM_TYPE is an 
array' );
}
@@ -2356,7 +2356,7 @@
);
$msgs[$param][] = 
$m->setContext( $this->getContext() );
} else {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,
"Value in 
ApiBase::PARAM_HELP_MSG_PER_VALUE for $value is not valid" );
}
}
@@ -2364,7 +2364,7 @@
 
if ( isset( $settings[ApiBase::PARAM_HELP_MSG_APPEND] ) 
) {
if ( !is_array( 
$settings[ApiBase::PARAM_HELP_MSG_APPEND] ) ) {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,
'Value for 
ApiBase::PARAM_HELP_MSG_APPEND is not an array' );
}
foreach ( 
$settings[ApiBase::PARAM_HELP_MSG_APPEND] as $m ) {
@@ -2373,7 +2373,7 @@
if ( $m ) {
$msgs[$param][] = $m;
} else {
-   $this->dieDebug( __METHOD__,
+   self::dieDebug( __METHOD__,
'Value in 
ApiBase::PARAM_HELP_MSG_APPEND is not valid' );
}
}

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

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

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


[MediaWiki-commits] [Gerrit] Preferences: Fixed autoloader entry - change (mediawiki...BlueSpiceExtensions)

2016-03-07 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: Preferences: Fixed autoloader entry
..

Preferences: Fixed autoloader entry

There was a mistake in the class name that got registered.

Change-Id: I292f0fee3a11d07848b00ed51633b3f1b0c8ffad
---
M Preferences/Preferences.setup.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Preferences/Preferences.setup.php 
b/Preferences/Preferences.setup.php
index 73d1b98..d65841a 100644
--- a/Preferences/Preferences.setup.php
+++ b/Preferences/Preferences.setup.php
@@ -2,7 +2,7 @@
 
 BsExtensionManager::registerExtension('Preferences', 
BsRUNLEVEL::FULL|BsRUNLEVEL::REMOTE, BsACTION::LOAD_SPECIALPAGE);
 
-$GLOBALS['wgAutoloadClasses']['Preferences'] = __DIR__ . 
'/Preferences.class.php';
+$GLOBALS['wgAutoloadClasses']['BsPreferences'] = __DIR__ . 
'/Preferences.class.php';
 
 $wgMessagesDirs['Preferences'] = __DIR__ . '/i18n';
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I292f0fee3a11d07848b00ed51633b3f1b0c8ffad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] Use Elvis operator where possible in API - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Use Elvis operator where possible in API
..

Use Elvis operator where possible in API

Change-Id: I0a26c04cf2ded2c1bd74d8dabd131ae8e20117f3
---
M includes/api/ApiParse.php
M includes/api/ApiQueryRevisionsBase.php
M includes/api/ApiQuerySiteinfo.php
3 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/275755/1

diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 872876d..ca3521e 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -275,7 +275,7 @@
$result_array = [];
 
$result_array['title'] = $titleObj->getPrefixedText();
-   $result_array['pageid'] = $pageid ? $pageid : $pageObj->getId();
+   $result_array['pageid'] = $pageid ?: $pageObj->getId();
 
if ( !is_null( $oldid ) ) {
$result_array['revid'] = intval( $oldid );
@@ -341,8 +341,7 @@
}
 
if ( isset( $prop['displaytitle'] ) ) {
-   $result_array['displaytitle'] = 
$p_result->getDisplayTitle() ?
-   $p_result->getDisplayTitle() :
+   $result_array['displaytitle'] = 
$p_result->getDisplayTitle() ?:
$titleObj->getPrefixedText();
}
 
diff --git a/includes/api/ApiQueryRevisionsBase.php 
b/includes/api/ApiQueryRevisionsBase.php
index c12393d..5f5d157 100644
--- a/includes/api/ApiQueryRevisionsBase.php
+++ b/includes/api/ApiQueryRevisionsBase.php
@@ -332,7 +332,7 @@
}
 
if ( $text === null ) {
-   $format = $this->contentFormat ? 
$this->contentFormat : $content->getDefaultFormat();
+   $format = $this->contentFormat ?: 
$content->getDefaultFormat();
$model = $content->getModel();
 
if ( !$content->isSupportedFormat( $format ) ) {
diff --git a/includes/api/ApiQuerySiteinfo.php 
b/includes/api/ApiQuerySiteinfo.php
index 4befad6..f05556e 100644
--- a/includes/api/ApiQuerySiteinfo.php
+++ b/includes/api/ApiQuerySiteinfo.php
@@ -652,8 +652,8 @@
}
 
$data = [
-   'url' => $url ? $url : '',
-   'text' => $text ? $text : ''
+   'url' => $url ?: '',
+   'text' => $text ?: ''
];
 
return $this->getResult()->addValue( 'query', $property, $data 
);

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

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

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


[MediaWiki-commits] [Gerrit] Remove decommissioned appservers - change (operations/dns)

2016-03-07 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: Remove decommissioned appservers
..

Remove decommissioned appservers

Bug: T126242
Change-Id: I10359769ca596e7b65b73efc9e84f51778cfc1d1
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 0 insertions(+), 258 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/56/275756/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index d6f472f..133172c 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -271,45 +271,6 @@
 53  1H IN PTR   mw1023.eqiad.wmnet.
 54  1H IN PTR   mw1024.eqiad.wmnet.
 55  1H IN PTR   mw1025.eqiad.wmnet.
-56  1H IN PTR   mw1026.eqiad.wmnet.
-57  1H IN PTR   mw1027.eqiad.wmnet.
-58  1H IN PTR   mw1028.eqiad.wmnet.
-59  1H IN PTR   mw1029.eqiad.wmnet.
-60  1H IN PTR   mw1030.eqiad.wmnet.
-
-62  1H IN PTR   mw1032.eqiad.wmnet.
-63  1H IN PTR   mw1033.eqiad.wmnet.
-64  1H IN PTR   mw1034.eqiad.wmnet.
-65  1H IN PTR   mw1035.eqiad.wmnet.
-66  1H IN PTR   mw1036.eqiad.wmnet.
-67  1H IN PTR   mw1037.eqiad.wmnet.
-68  1H IN PTR   mw1038.eqiad.wmnet.
-69  1H IN PTR   mw1039.eqiad.wmnet.
-70  1H IN PTR   mw1040.eqiad.wmnet.
-
-72  1H IN PTR   mw1042.eqiad.wmnet.
-73  1H IN PTR   mw1043.eqiad.wmnet.
-74  1H IN PTR   mw1044.eqiad.wmnet.
-75  1H IN PTR   mw1045.eqiad.wmnet.
-76  1H IN PTR   mw1046.eqiad.wmnet.
-77  1H IN PTR   mw1047.eqiad.wmnet.
-78  1H IN PTR   mw1048.eqiad.wmnet.
-79  1H IN PTR   mw1049.eqiad.wmnet.
-80  1H IN PTR   mw1050.eqiad.wmnet.
-81  1H IN PTR   mw1051.eqiad.wmnet.
-82  1H IN PTR   mw1052.eqiad.wmnet.
-83  1H IN PTR   mw1053.eqiad.wmnet.
-84  1H IN PTR   mw1054.eqiad.wmnet.
-85  1H IN PTR   mw1055.eqiad.wmnet.
-86  1H IN PTR   mw1056.eqiad.wmnet.
-87  1H IN PTR   mw1057.eqiad.wmnet.
-88  1H IN PTR   mw1058.eqiad.wmnet.
-89  1H IN PTR   mw1059.eqiad.wmnet.
-90  1H IN PTR   mw1060.eqiad.wmnet.
-91  1H IN PTR   mw1061.eqiad.wmnet.
-92  1H IN PTR   mw1062.eqiad.wmnet.
-93  1H IN PTR   mw1063.eqiad.wmnet.
-94  1H IN PTR   mw1064.eqiad.wmnet.
 95  1H IN PTR   cp1058.eqiad.wmnet.
 96  1H IN PTR   cp1059.eqiad.wmnet.
 97  1H IN PTR   cp1060.eqiad.wmnet.
@@ -486,11 +447,6 @@
 
 43  1H IN PTR   cam1-b-c-eqiad.eqiad.wmnet.
 44  1H IN PTR   cam2-b-c-eqiad.eqiad.wmnet.
-45  1H IN PTR   mw1065.eqiad.wmnet.
-46  1H IN PTR   mw1066.eqiad.wmnet.
-47  1H IN PTR   mw1067.eqiad.wmnet.
-48  1H IN PTR   mw1068.eqiad.wmnet.
-49  1H IN PTR   mw1069.eqiad.wmnet.
 50  1H IN PTR   mw1070.eqiad.wmnet.
 51  1H IN PTR   mw1071.eqiad.wmnet.
 52  1H IN PTR   mw1072.eqiad.wmnet.
@@ -1282,92 +1238,6 @@
 24  1H  IN PTR  wmf3192.mgmt.eqiad.wmnet.
 25  1H  IN PTR  mw1025.mgmt.eqiad.wmnet.
 25  1H  IN PTR  wmf3191.mgmt.eqiad.wmnet.
-26  1H  IN PTR  mw1026.mgmt.eqiad.wmnet.
-26  1H  IN PTR  wmf3190.mgmt.eqiad.wmnet.
-27  1H  IN PTR  mw1027.mgmt.eqiad.wmnet.
-27  1H  IN PTR  wmf3189.mgmt.eqiad.wmnet.
-28  1H  IN PTR  mw1028.mgmt.eqiad.wmnet.
-28  1H  IN PTR  wmf3188.mgmt.eqiad.wmnet.
-29  1H  IN PTR  mw1029.mgmt.eqiad.wmnet.
-29  1H  IN PTR  wmf3187.mgmt.eqiad.wmnet.
-30  1H  IN PTR  mw1030.mgmt.eqiad.wmnet.
-30  1H  IN PTR  wmf3186.mgmt.eqiad.wmnet.
-
-32  1H  IN PTR  mw1032.mgmt.eqiad.wmnet.
-32  1H  IN PTR  wmf3184.mgmt.eqiad.wmnet.
-33  1H  IN PTR  mw1033.mgmt.eqiad.wmnet.
-33  1H  IN PTR  wmf3247.mgmt.eqiad.wmnet.
-34  1H  IN PTR  mw1034.mgmt.eqiad.wmnet.
-34  1H  IN PTR  wmf3246.mgmt.eqiad.wmnet.
-35  1H  IN PTR  mw1035.mgmt.eqiad.wmnet.
-35  1H  IN PTR  wmf3245.mgmt.eqiad.wmnet.
-36  1H  IN PTR  mw1036.mgmt.eqiad.wmnet.
-36  1H  IN PTR  wmf3244.mgmt.eqiad.wmnet.
-37  1H  IN PTR  mw1037.mgmt.eqiad.wmnet.
-37  1H  IN PTR  wmf3243.mgmt.eqiad.wmnet.
-38  1H  IN PTR  mw1038.mgmt.eqiad.wmnet.
-38  1H  IN PTR  wmf3242.mgmt.eqiad.wmnet.
-39  1H  IN PTR  mw1039.mgmt.eqiad.wmnet.
-39  1H  IN PTR  wmf3241.mgmt.eqiad.wmnet.
-40  1H  IN PTR  mw1040.mgmt.eqiad.wmnet.
-40  1H  IN PTR  wmf3240.mgmt.eqiad.wmnet.
-
-42  1H  IN PTR  mw1042.mgmt.eqiad.wmnet.
-42  1H  IN PTR  wmf3238.mgmt.eqiad.wmnet.
-43  1H  IN PTR  mw1043.mgmt.eqiad.wmnet.
-43  1H  IN PTR  wmf3237.mgmt.eqiad.wmnet.
-44  1H  IN PTR  mw1044.mgmt.eqiad.wmnet.
-44  1H  IN PTR  wmf3236.mgmt.eqiad.wmnet.
-45  1H  IN PTR  mw1045.mgmt.eqiad.wmnet.
-45  1H  IN PTR  wmf3235.mgmt.eqiad.wmnet.
-46  1H  IN PTR  mw1046.mgmt.eqiad.wmnet.
-46  1H  IN PTR  wmf3234.mgmt.eqiad.wmnet.
-47  1H  IN PTR  mw1047.mgmt.eqiad.wmnet.
-47  1H  IN PTR  wmf3233.mgmt.eqiad.wmnet.
-48  1H  IN PTR  mw1048.mgmt.eqiad.wmnet.
-48  1H  IN PTR  wmf3232.mgmt.eqiad.wmnet.
-49  1H  IN PTR  mw1049.mgmt.eqiad.wmnet.
-49  1H  IN PTR  wmf3231.mgmt.eqiad.wmnet.
-50  1H  IN PTR  mw1050.mgmt.eqiad.wmnet.
-50  1H  IN PTR  

[MediaWiki-commits] [Gerrit] Remove unused local variables in API - change (mediawiki/core)

2016-03-07 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Remove unused local variables in API
..

Remove unused local variables in API

Change-Id: Ia94ae232308ad47ee88dbd30675cfcbdb6b371ed
---
M includes/api/ApiLogin.php
M includes/api/ApiQueryBacklinksprop.php
2 files changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/275754/1

diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index a6e6c49..02aae06 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -208,7 +208,6 @@
 
case LoginForm::THROTTLED:
$result['result'] = 'Throttled';
-   $throttle = $this->getConfig()->get( 
'PasswordAttemptThrottle' );
$result['wait'] = intval( 
$loginForm->mThrottleWait );
break;
 
diff --git a/includes/api/ApiQueryBacklinksprop.php 
b/includes/api/ApiQueryBacklinksprop.php
index 17b51da..1668221 100644
--- a/includes/api/ApiQueryBacklinksprop.php
+++ b/includes/api/ApiQueryBacklinksprop.php
@@ -164,21 +164,16 @@
$this->dieContinueUsageIf( count( $cont ) != count( 
$sortby ) );
$where = '';
$i = count( $sortby ) - 1;
-   $cont_ns = 0;
-   $cont_title = '';
foreach ( array_reverse( $sortby, true ) as $field => 
$type ) {
$v = $cont[$i];
switch ( $type ) {
case 'ns':
-   $cont_ns = (int)$v;
/* fall through */
case 'int':
$v = (int)$v;
$this->dieContinueUsageIf( $v 
!= $cont[$i] );
break;
-
case 'title':
-   $cont_title = $v;
/* fall through */
default:
$v = $db->addQuotes( $v );

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8d7bacc..b247ffd - change (mediawiki/extensions)

2016-03-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 8d7bacc..b247ffd
..


Syncronize VisualEditor: 8d7bacc..b247ffd

Change-Id: I9c420c917adfa913af681746eaf982c37711ea11
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 8d7bacc..b247ffd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 8d7baccd5f23b6140894161076e04dede15c7d72
+Subproject commit b247ffd7bd792f47d5487bb06211b76d47a2ce81

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c420c917adfa913af681746eaf982c37711ea11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] i18n: Explain to returning users that their preferences are ... - change (mediawiki...VisualEditor)

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

Change subject: i18n: Explain to returning users that their preferences are 
mutable
..


i18n: Explain to returning users that their preferences are mutable

Change-Id: I8a47725d7271af54b30f2130e97b08edec0f0b59
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 904a851..84a7d50 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -215,7 +215,7 @@
"visualeditor-differror": "Error loading data from server: $1.",
"visualeditor-donebutton-tooltip": "Done editing",
"visualeditor-editconflict": "Your changes could not be saved because 
of an edit conflict. Would {{GENDER:|you}} like to resolve the conflict 
manually?",
-   "visualeditor-editingtabdialog-body": "{{SITENAME}} now remembers which 
editor you prefer.",
+   "visualeditor-editingtabdialog-body": "{{SITENAME}} now remembers which 
editor you prefer. You can switch edit modes as you edit, and change your 
preference later.",
"visualeditor-editingtabdialog-ok": "Use the editor I used in my last 
edit",
"visualeditor-editingtabdialog-title": "Editing tabs",
"visualeditor-editnotices-tool": "$1 {{PLURAL:$1|notice|notices}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a47725d7271af54b30f2130e97b08edec0f0b59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8d7bacc..b247ffd - change (mediawiki/extensions)

2016-03-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 8d7bacc..b247ffd
..

Syncronize VisualEditor: 8d7bacc..b247ffd

Change-Id: I9c420c917adfa913af681746eaf982c37711ea11
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/VisualEditor b/VisualEditor
index 8d7bacc..b247ffd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 8d7baccd5f23b6140894161076e04dede15c7d72
+Subproject commit b247ffd7bd792f47d5487bb06211b76d47a2ce81

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c420c917adfa913af681746eaf982c37711ea11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] i18n: Relabel the SET preference and dialog to 'mode' - change (mediawiki...VisualEditor)

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

Change subject: i18n: Relabel the SET preference and dialog to 'mode'
..


i18n: Relabel the SET preference and dialog to 'mode'

Change-Id: Id876f4ba102800237cbc4a671d4db9a26f7f116d
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 73f218f..904a851 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -279,7 +279,7 @@
"visualeditor-preference-core-info-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/General",
"visualeditor-preference-core-label": "Visual editing",
"visualeditor-preference-enable": "Enable the visual editor. It will be 
available in the following {{PLURAL:$2|namespace|namespaces}}: $1",
-   "visualeditor-preference-tabs": "Editing tabs",
+   "visualeditor-preference-tabs": "Editing mode",
"visualeditor-preference-tabs-multi-tab": "Show me both editor tabs",
"visualeditor-preference-tabs-prefer-ve": "Always give me the visual 
editor if possible",
"visualeditor-preference-tabs-prefer-wt": "Always give me the wikitext 
editor",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id876f4ba102800237cbc4a671d4db9a26f7f116d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update grunt-banana-checker to 0.4.0 - change (mediawiki...ContactPage)

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

Change subject: Update grunt-banana-checker to 0.4.0
..


Update grunt-banana-checker to 0.4.0

Remove blank i18n gom.json file.

Change-Id: Ib4c222e98fe636a6bbc484a557c322d134ba2b9e
---
M Gruntfile.js
D i18n/gom.json
M package.json
3 files changed, 2 insertions(+), 12 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index f5941c4..b549242 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,9 +11,7 @@
 
grunt.initConfig( {
banana: {
-   "ContactPage": [
-   "i18n"
-   ]
+   all: 'i18n/'
},
jsonlint: {
all: [
diff --git a/i18n/gom.json b/i18n/gom.json
deleted file mode 100644
index fdba554..000
--- a/i18n/gom.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
-   "@metadata": {
-   "authors": [
-   "The Discoverer"
-   ]
-   },
-   "contactpage": ""
-}
diff --git a/package.json b/package.json
index b4b3339..8674dec 100644
--- a/package.json
+++ b/package.json
@@ -9,7 +9,7 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.2",
+"grunt-banana-checker": "0.4.0",
 "grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4c222e98fe636a6bbc484a557c322d134ba2b9e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
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] Do not attempt adding orphan section unless source article i... - change (mediawiki...ContentTranslation)

2016-03-07 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Do not attempt adding orphan section unless source article is 
old revision
..

Do not attempt adding orphan section unless source article is old revision

We are attempting orphan section fitting in lastest revision and if that
fails we load old revision of source.

We are changing that behavior. The orphan section fitting will be attempted
only on old source revision.

So the improvised translation reload steps are:
1. Try to find matching source section ids and restore translation against it
2. Try to find matching sequence Id in source and restore translation against it
3. Load the source article's revision that was used for the translation. and 
attempt
   step #1 and #2
4. If the source article is old revision, add orphan sections in translation 
column
   when #1 and #2 failed.

Change-Id: I7705279068a623c4e367d696403138c04334fbca
---
M modules/translation/ext.cx.translation.loader.js
M tests/qunit/translation/ext.cx.translation.loader.test.js
2 files changed, 14 insertions(+), 3 deletions(-)


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

diff --git a/modules/translation/ext.cx.translation.loader.js 
b/modules/translation/ext.cx.translation.loader.js
index 31a92bb..6a7b493 100644
--- a/modules/translation/ext.cx.translation.loader.js
+++ b/modules/translation/ext.cx.translation.loader.js
@@ -17,6 +17,7 @@
this.$sourceColumn = null;
this.$translationColumn = null;
this.disabled = false;
+   this.oldRevision = false;
}
 
/**
@@ -102,7 +103,12 @@
self.restore();
mw.hook( 'mw.cx.draft.restored' ).fire();
if ( self.translation.sourceRevisionId !== 
mw.cx.sourceRevision ) {
+   // Show a message to translator that we 
loaded an older revision of
+   // source article.
self.showOldRevisionWarning();
+   // Since we are using older revision, 
use agressive section restore
+   // algorithm.
+   self.oldRevision = true;
}
} );
}, function ( errorCode, details ) {
@@ -200,7 +206,7 @@
if ( !$restoredSection ) {
mw.log( 'Source section not found for ' + 
sourceSectionId );
// Insert right after last matched section if 
possible
-   if ( $lastRestoredSection && 
$lastRestoredSection.length ) {
+   if ( this.oldRevision && $lastRestoredSection 
&& $lastRestoredSection.length ) {
$lastRestoredSection = 
this.addOprhanTranslationUnit(
sourceSectionId, 
$lastRestoredSection, 'after'
);
@@ -213,6 +219,10 @@
$lastRestoredSection = $restoredSection;
// As a last resort, if we did not add orphans 
immediately, add them
// now before this section.
+   if ( !this.oldRevision ) {
+   // Dont use orphan sections unless we 
are using old source article
+   continue;
+   }
for ( i = 0; i < orphans.length; i++ ) {
$lastRestoredSection = 
this.addOprhanTranslationUnit( orphans[ i ], $lastRestoredSection );
if ( $restoredSection && 
$restoredSection.length ) {
@@ -223,7 +233,7 @@
}
}
 
-   if ( orphans.length ) {
+   if ( orphans.length && !this.oldRevision ) {
mw.log( 'Draft restoration failed. Loading older 
revision.' );
window.location = mw.cx.siteMapper.getCXUrl(
mw.cx.sourceTitle,
diff --git a/tests/qunit/translation/ext.cx.translation.loader.test.js 
b/tests/qunit/translation/ext.cx.translation.loader.test.js
index 24055b7..1a3910a 100644
--- a/tests/qunit/translation/ext.cx.translation.loader.test.js
+++ b/tests/qunit/translation/ext.cx.translation.loader.test.js
@@ -52,7 +52,8 @@
QUnit.test( 'Translation daft restore test', function ( assert ) {
var i;
QUnit.expect( tests.length );
-
+   // Without old revision flag set true, orphan sections 

[MediaWiki-commits] [Gerrit] Do not count a section restored as orphan as orphan again - change (mediawiki...ContentTranslation)

2016-03-07 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Do not count a section restored as orphan as orphan again
..

Do not count a section restored as orphan as orphan again

If a section was not able to restore and if there is a successfully
restored last section exists, we add it after the last restored section.

But once that is done, we should not still add that section to orphans
array. There was a logic error in the code. This commit fixes it.

Change-Id: If62429a1494d746e37c9fadf86c93ac01a21fba9
---
M modules/translation/ext.cx.translation.loader.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/modules/translation/ext.cx.translation.loader.js 
b/modules/translation/ext.cx.translation.loader.js
index c342fed..31a92bb 100644
--- a/modules/translation/ext.cx.translation.loader.js
+++ b/modules/translation/ext.cx.translation.loader.js
@@ -204,8 +204,11 @@
$lastRestoredSection = 
this.addOprhanTranslationUnit(
sourceSectionId, 
$lastRestoredSection, 'after'
);
+   } else {
+   // No lastRestoredSection, So add and 
keep it in orphans array
+   // to try later.
+   orphans.push( sourceSectionId );
}
-   orphans.push( sourceSectionId );
} else {
$lastRestoredSection = $restoredSection;
// As a last resort, if we did not add orphans 
immediately, add them
@@ -213,6 +216,7 @@
for ( i = 0; i < orphans.length; i++ ) {
$lastRestoredSection = 
this.addOprhanTranslationUnit( orphans[ i ], $lastRestoredSection );
if ( $restoredSection && 
$restoredSection.length ) {
+   // Remove it from the orphans 
array.
orphans.splice( i, 1 );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If62429a1494d746e37c9fadf86c93ac01a21fba9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] tutorial - change (mediawiki...examples)

2016-03-07 Thread Faithfullie (Code Review)
Faithfullie has uploaded a new change for review.

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

Change subject: tutorial
..

tutorial

Change-Id: I322920a4d30db0d19f842d96752f4d1e69965432
---
M Example/specials/SpecialHelloWorld.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/Example/specials/SpecialHelloWorld.php 
b/Example/specials/SpecialHelloWorld.php
index db56abb..3da3de5 100644
--- a/Example/specials/SpecialHelloWorld.php
+++ b/Example/specials/SpecialHelloWorld.php
@@ -33,6 +33,11 @@
$out->addWikiMsg( 'example-helloworld-intro' );
}
 
+   /**
+* Get version number of core
+*/
+   function getVersion(){return '0.01';}
+
protected function getGroupName() {
return 'other';
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I322920a4d30db0d19f842d96752f4d1e69965432
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Faithfullie 

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


[MediaWiki-commits] [Gerrit] Build cirrus completion indices daily - change (operations/puppet)

2016-03-07 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Build cirrus completion indices daily
..

Build cirrus completion indices daily

We have made some optimizations to the index building process,
bringing runtime down from over 12 hours to under 5 hours. This
should be low enough we can afford to rebuild these indices on
a daily basis.

Change-Id: I5d3ed3aada0fe05ce36e11d65c27b36c19076bbd
---
M modules/mediawiki/manifests/maintenance/cirrussearch.pp
1 file changed, 7 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/49/275749/1

diff --git a/modules/mediawiki/manifests/maintenance/cirrussearch.pp 
b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
index 0e88308..485e184 100644
--- a/modules/mediawiki/manifests/maintenance/cirrussearch.pp
+++ b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
@@ -1,26 +1,24 @@
 class mediawiki::maintenance::cirrussearch( $ensure = present ) {
 require mediawiki::users
 
-# Rebuilds the completion suggester indices once a week. This is scheduled
-# to run during the low period of cirrus usage, which is generally 12am
+# Rebuilds the completion suggester indices daily. This is scheduled
+# to run during the low period of cirrus usage, which is generally 3am
 # to 7am UTC. The `|| true` statement ensures one failing wiki doesn't
-# fail the entire job. This job, as of dec 2015, takes around 12 hours to
+# fail the entire job. This job, as of mar 2015, takes around 5 hours
 # to run.
 cron { 'cirrus_build_completion_indices_eqiad':
 ensure  => $ensure,
 user=> $::mediawiki::users::web,
-minute  => 20,
-hour=> 0,
-weekday => 2,
+minute  => 30,
+hour=> 2,
 command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --cluster=eqiad --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\''
 }
 
 cron { 'cirrus_build_completion_indices_codfw':
 ensure  => $ensure,
 user=> $::mediawiki::users::web,
-minute  => 20,
-hour=> 0,
-weekday => 2,
+minute  => 30,
+hour=> 2,
 command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --cluster=codfw --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\''
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Minor update on login form on layout and buttons - change (mediawiki/core)

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

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

Change subject: Minor update on login form on layout and buttons
..

Minor update on login form on layout and buttons

Changing current `constructive` button to `progressive` as part of the
consolidation task T110555. Also bringing some minor layout improvements,
aligning values to CSS coding guidelines and cleaning up typos and
superflous (initial) style values.

Bug: T89860
Bug: T126307
Change-Id: I2cc642ddc78f1b436e47261568601be592fe1fa4
Depends-on: I095eddfe5ec2f1fbc81939b67ed467484e15092b
---
M includes/templates/Userlogin.php
M resources/src/mediawiki.special/mediawiki.special.userlogin.common.css
M resources/src/mediawiki.special/mediawiki.special.userlogin.login.css
3 files changed, 13 insertions(+), 13 deletions(-)


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

diff --git a/includes/templates/Userlogin.php b/includes/templates/Userlogin.php
index 4a0b413..f19c0f2 100644
--- a/includes/templates/Userlogin.php
+++ b/includes/templates/Userlogin.php
@@ -1,7 +1,7 @@
 data['formheader'] ) { ?>

-   html( 'formheader' ); /* 
extensions such as MobileFrontend add html here */ ?>
+   html( 'formheader' ); /* 
extensions such as MobileFrontend add HTML here */ ?>



-   
+   
msg( 'userlogin-yourname' );
 
@@ -90,7 +90,7 @@

 

-   
+   
msg( 'userlogin-yourpassword' );
?>
@@ -116,7 +116,7 @@
}
?>

-   msg( 
'yourdomainname' ); ?>
+   msg( 
'yourdomainname' ); ?>
getHTML(); ?>


@@ -148,7 +148,7 @@
'tabindex' => '6',
);
$modifiers = array(
-   'mw-ui-constructive',
+   'mw-ui-progressive',
);
echo Html::submitButton( $this->getMsg( 
'pt-login-button' )->text(), $attrs, $modifiers );
?>
@@ -188,8 +188,8 @@
msg( 'userlogin-createanother' ); ?>


-   
-   msg( 
'userlogin-noaccount' ); ?>msg( 'userlogin-joinproject' ); ?>
+   
+   msg( 
'userlogin-noaccount' ); ?>msg( 'userlogin-joinproject' ); ?>

https://gerrit.wikimedia.org/r/275748
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cc642ddc78f1b436e47261568601be592fe1fa4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] add the spacebeforecontrolbrace sniff - change (mediawiki...codesniffer)

2016-03-07 Thread Lethexie (Code Review)
Lethexie has uploaded a new change for review.

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

Change subject: add the spacebeforecontrolbrace sniff
..

add the spacebeforecontrolbrace sniff

Change-Id: Ie23b3e30d3d7b743e858f9cb45cc03e702dfdf79
---
A MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php
A MediaWiki/Tests/files/WhiteSpace/space_before_structure_brace_fail.php
A MediaWiki/Tests/files/WhiteSpace/space_before_structure_brace_pass.php
3 files changed, 156 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/47/275747/1

diff --git 
a/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php 
b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php
new file mode 100644
index 000..220e97f
--- /dev/null
+++ b/MediaWiki/Sniffs/WhiteSpace/SpaceBeforeControlStructureBraceSniff.php
@@ -0,0 +1,101 @@
+getTokens();
+   if ( $tokens[$stackPtr]['scope_opener'] === false ) {
+   return;
+   }
+
+   if ( $tokens[$stackPtr + 1]['code'] !== T_WHITESPACE 
+   || $tokens[$stackPtr + 2]['code'] !== T_OPEN_PARENTHESIS
+   || $tokens[$stackPtr + 2]['parenthesis_closer'] === 
null ) {
+   return;
+   }
+   $closeBracket = $tokens[$stackPtr + 2]['parenthesis_closer'];
+   $openBrace = $tokens[$stackPtr]['scope_opener'];
+   $closeBracketLine = $tokens[$closeBracket]['line'];
+   $openBraceLine = $tokens[$openBrace]['line'];
+   $lineDifference = ( $openBraceLine - $closeBracketLine );
+   if ( $lineDifference > 0 ) {
+   // if brace on new line
+   $this->processBraceLineDifferent( $phpcsFile, 
$openBrace, $closeBracket, $tokens );
+   }
+   if ( $lineDifference === 0 ) {
+   // if brace on the same line as closing parenthesis
+   $this->processBraceLineSame( $phpcsFile, $openBrace, 
$closeBracket, $stackPtr, $tokens );
+   }
+   $this->processEmptyLine( $phpcsFile, $closeBracket + 2, 
$stackPtr, $tokens );
+   }
+
+   protected function processBraceLineDifferent( $phpcsFile, $openBrace, 
$closeBracket, $stackPtr, $tokens ) {
+   $phpcsFile->recordMetric( $stackPtr, 'Control Structs opening 
brace placement', 'new line' );
+   $error = 'Opening brace should be on the same line as the 
declaration';
+   $fix   = $phpcsFile->addFixableError( $error, $openBrace, 
'BraceOnNewLine' );
+   if ( $fix === true ) {
+   $phpcsFile->fixer->beginChangeset();
+   $i = $closeBracket + 1;
+   for ( $i; $i < $openBrace; $i++ ) {
+   $phpcsFile->fixer->replaceToken( $i, '');
+   }
+   $phpcsFile->fixer->addContent( $closeBracket, ' {' );
+   $phpcsFile->fixer->replaceToken( $openBrace, '' );
+   $phpcsFile->fixer->addNewLine( $closeBracket + 2 );
+   $phpcsFile->fixer->endChangeset();
+   }
+   }
+
+   protected function processBraceLineSame( $phpcsFile, $openBrace, 
$closeBracket, $stackPtr, $tokens ) {
+   $content = $phpcsFile->getTokensAsString( $closeBracket + 1, 
$openBrace - $closeBracket - 1 );
+   $length = strlen( $content );
+   if ( $length === 1 && $tokens[$closeBracket + 1]['content'] === 
' ' ) {
+   return;
+   } else {
+   $warning = 'Expected only 1 space between closing 
parenthesis and opening brace; find %s characters';
+   $fix = $phpcsFile->addFixableWarning( $warning, 
$openBrace, 'SpaceBeforeControl', [ $length ] );
+   if ( $fix === true ) {
+   $phpcsFile->fixer->beginChangeset();
+   $phpcsFile->fixer->replaceToken( $openBrace, '' 
);
+   $phpcsFile->fixer->addContent( $closeBracket, ' 
{' );
+   $next = $phpcsFile->findNext( T_WHITESPACE, 
$closeBracket + 1, null, true);
+   for ( $i = ($closeBracket + 1) ; $i < $next; 
$i++ ) {
+   $phpcsFile->fixer->replaceToken( $i, '' 
);
+   }
+   $phpcsFile->fixer->endChangeset();
+   }
+   }
+   }
+   protected function processEmptyLine( $phpcsFile, $openBrace, $stackPtr, 
$tokens ) {
+   $next = $phpcsFile->findNext( T_WHITESPACE, $openBrace + 2, 
null, false);
+   $found = strpos( 

[MediaWiki-commits] [Gerrit] Use underscores in titles sent to the RB / Parsoid API - change (mediawiki...bundler)

2016-03-07 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Use underscores in titles sent to the RB / Parsoid API
..

Use underscores in titles sent to the RB / Parsoid API

We are starting to normalize titles to consistently use underscores, and will
soon start redirecting any non-canonical requests to their canonical
equivalent.

This patch makes OCG request titles with underscores instead of spaces.

Change-Id: I7dcd46f32d6534bfb8031f10c44d22dacc57a905
---
M lib/parsoid.js
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Collection/OfflineContentGenerator/bundler
 refs/changes/46/275746/1

diff --git a/lib/parsoid.js b/lib/parsoid.js
index 659e69c..d9bb13e 100644
--- a/lib/parsoid.js
+++ b/lib/parsoid.js
@@ -143,7 +143,8 @@
} else {
apiURL = url.resolve(apiURL, './page/html/');
}
-   apiURL += encodeURIComponent(title); /* Encode slashes. */
+// Use underscores, escape delimiters incl. slashes.
+   apiURL += encodeURIComponent(title.replace(/ /g, '_'));
if (revid) {
apiURL += '/' + revid;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7dcd46f32d6534bfb8031f10c44d22dacc57a905
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Collection/OfflineContentGenerator/bundler
Gerrit-Branch: master
Gerrit-Owner: GWicke 

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


[MediaWiki-commits] [Gerrit] Ignore name-less inputs on preference page confirmCloseWindo... - change (mediawiki/core)

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

Change subject: Ignore name-less inputs on preference page confirmCloseWindow 
check
..


Ignore name-less inputs on preference page confirmCloseWindow check

Ignore any fields that will not be submitted when checking
if the user has made changes to the Preferences form.

Bug: T122702
Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
(cherry picked from commit 614dd71670d6d73e3c3aa953f6afadd5b9187936)
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 29322f4..a756f22 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -266,7 +266,7 @@
 
// Check if all of the form values are unchanged
function isPrefsChanged() {
-   var inputs = $( '#mw-prefs-form :input' ),
+   var inputs = $( '#mw-prefs-form :input[name]' ),
input, $input, inputType,
index, optIndex,
opt;
@@ -276,7 +276,8 @@
$input = $( input );
 
// Different types of inputs have different 
methods for accessing defaults
-   if ( $input.is( 'select' ) ) { //  has 
the property defaultSelected for each option
+   if ( $input.is( 'select' ) ) {
+   //  has the property 
defaultSelected for each option
for ( optIndex = 0; optIndex < 
input.options.length; optIndex++ ) {
opt = input.options[ optIndex ];
if ( opt.selected !== 
opt.defaultSelected ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixed maps referrer header check - change (operations/puppet)

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

Change subject: Fixed maps referrer header check
..


Fixed maps referrer header check

Firefox does not send trailing / symbol for referrer.

Bug: T129187
Change-Id: I4e20c458b5bf3dbb8ccefc2ad1e2be525ee65796
---
M templates/varnish/maps-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/templates/varnish/maps-frontend.inc.vcl.erb 
b/templates/varnish/maps-frontend.inc.vcl.erb
index 52fd6e7..0a72093 100644
--- a/templates/varnish/maps-frontend.inc.vcl.erb
+++ b/templates/varnish/maps-frontend.inc.vcl.erb
@@ -5,10 +5,10 @@
 sub cluster_fe_recv {
if (req.http.referer
&& req.url != "/"
-   && req.http.referer !~ 
"(?i)^https?://([-a-zA-Z0-9.]+\.)?(mediawiki|wikivoyage|wikivoyage-ev|wmflabs|wikidata)\.org/"
-   && req.http.referer !~ 
"(?i)^https?://(maps|phabricator|wikitech|incubator)\.wikimedia\.org/"
-   && req.http.referer !~ 
"(?i)^https?://test2?\.(m\.)?wikipedia\.org/"
-   && req.http.referer !~ 
"(?i)^https?://(localhost|127\.0\.0\.1)(:\d+)?/"
+   && req.http.referer !~ 
"(?i)^https?://([-a-zA-Z0-9.]+\.)?(mediawiki|wikivoyage|wikivoyage-ev|wmflabs|wikidata)\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://(maps|phabricator|wikitech|incubator)\.wikimedia\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://test2?\.(m\.)?wikipedia\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://(localhost|127\.0\.0\.1)(:\d+)?(/|$)"
) {
error 403 "Access Denied";
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e20c458b5bf3dbb8ccefc2ad1e2be525ee65796
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix EchoAttributeManager::getNotificationSection() php doc - change (mediawiki...Echo)

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

Change subject: Fix EchoAttributeManager::getNotificationSection() php doc
..


Fix EchoAttributeManager::getNotificationSection() php doc

Change-Id: I5a82e4618907e7a58a61d10ecb93c76d9772de53
---
M includes/AttributeManager.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/AttributeManager.php b/includes/AttributeManager.php
index 36211e9..d0a4441 100644
--- a/includes/AttributeManager.php
+++ b/includes/AttributeManager.php
@@ -247,7 +247,7 @@
/**
 * Get notification section for a notification type
 * @todo add a unit test case
-* @parm string
+* @param string $notificationType
 * @return string
 */
public function getNotificationSection( $notificationType ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a82e4618907e7a58a61d10ecb93c76d9772de53
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Defer onPersonalUrls() DB writes to post-send - change (mediawiki...Echo)

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

Change subject: Defer onPersonalUrls() DB writes to post-send
..


Defer onPersonalUrls() DB writes to post-send

We calculate how many messages and alerts are being marked as read, and
subtract them from the count since the database and caches won't be
updated until the end of the request.

For performance, we also get the event_type while doing the
EchoTargetPage lookup query to avoid having to query it individually
later on.

Bug: T117531
Change-Id: I0d9302adf1b4b07a4ff26a04b00d4498aa3fe7ee
---
M Hooks.php
M includes/mapper/TargetPageMapper.php
M includes/model/TargetPage.php
3 files changed, 51 insertions(+), 13 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index b326795..7d51ae3 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -724,24 +724,40 @@
return true;
}
 
-   // Attempt to mark a notification as read when visiting a page,
-   // ideally this should be deferred to end of request and update
-   // the notification count accordingly
-   // @Fixme - Find a better place to put this code
+   // Attempt to mark a notification as read when visiting a page
+   // @todo should this really be here?
+   $subtractAlerts = 0;
+   $subtractMessages = 0;
if ( $title->getArticleID() ) {
$mapper = new EchoTargetPageMapper();
$targetPages = $mapper->fetchByUserPageId( $user, 
$title->getArticleID() );
if ( $targetPages ) {
-   $eventIds = array_keys( $targetPages );
-   $notifUser = MWEchoNotifUser::newFromUser( 
$user );
-   $notifUser->markRead( $eventIds );
+   $eventIds = array();
+   $attribManager = 
EchoAttributeManager::newFromGlobalVars();
+   /* @var EchoTargetPage $targetPage */
+   foreach ( $targetPages as $id => $targetPage ) {
+   $section = 
$attribManager->getNotificationSection(
+   $targetPage->getEventType()
+   );
+   if ( $section === 
EchoAttributeManager::MESSAGE ) {
+   $subtractMessages += 1;
+   } else {
+   // ALERT
+   $subtractAlerts += 1;
+   }
+   $eventIds[] = $id;
+   }
+   DeferredUpdates::addCallableUpdate( function () 
use ( $user, $eventIds ) {
+   $notifUser = 
MWEchoNotifUser::newFromUser( $user );
+   $notifUser->markRead( $eventIds );
+   } );
}
}
 
// Add a "My notifications" item to personal URLs
$notifUser = MWEchoNotifUser::newFromUser( $user );
-   $msgCount = $notifUser->getMessageCount();
-   $alertCount = $notifUser->getAlertCount();
+   $msgCount = $notifUser->getMessageCount() - $subtractMessages;
+   $alertCount = $notifUser->getAlertCount() - $subtractAlerts;
 
$msgNotificationTimestamp = 
$notifUser->getLastUnreadMessageTime();
$alertNotificationTimestamp = 
$notifUser->getLastUnreadAlertTime();
diff --git a/includes/mapper/TargetPageMapper.php 
b/includes/mapper/TargetPageMapper.php
index f34803a..7cdfde9 100644
--- a/includes/mapper/TargetPageMapper.php
+++ b/includes/mapper/TargetPageMapper.php
@@ -28,13 +28,15 @@
$dbr = $this->dbFactory->getEchoDb( DB_SLAVE );
 
$res = $dbr->select(
-   array( 'echo_target_page' ),
-   self::$fields,
+   array( 'echo_target_page', 'echo_event' ),
+   array_merge( self::$fields, array( 'event_type' ) ),
array(
'etp_user' => $user->getId(),
'etp_page' => $pageId
),
-   __METHOD__
+   __METHOD__,
+   array(),
+   array( 'echo_event' => array( 'JOIN', 
'etp_event=event_id' ) )
);
if ( $res ) {
$targetPages = array();
diff --git a/includes/model/TargetPage.php 

[MediaWiki-commits] [Gerrit] EchoTargetPage: Don't call Title::newFromId() repeatedly - change (mediawiki...Echo)

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

Change subject: EchoTargetPage: Don't call Title::newFromId() repeatedly
..


EchoTargetPage: Don't call Title::newFromId() repeatedly

Title::newFromId() can return null, and if this were the case the
instance caching would never work, so it would continually make useless
database queries.

Initialize the $title member variable as false to begin with, and use
that to check whether we've already checked Title::newFromId().

Change-Id: Id07c2c963ffcd03e212bed0a666735bcb68b92e0
---
M includes/model/TargetPage.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php
index d62437a..c678947 100644
--- a/includes/model/TargetPage.php
+++ b/includes/model/TargetPage.php
@@ -13,9 +13,9 @@
protected $user;
 
/**
-* @var Title|null
+* @var Title|null|bool false if not initialized yet
 */
-   protected $title;
+   protected $title = false;
 
/**
 * @var int
@@ -107,7 +107,7 @@
 * @return Title|null
 */
public function getTitle() {
-   if ( !$this->title ) {
+   if ( $this->title === false ) {
$this->title = Title::newFromId( $this->pageId );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id07c2c963ffcd03e212bed0a666735bcb68b92e0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ignore name-less inputs on preference page confirmCloseWindo... - change (mediawiki/core)

2016-03-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Ignore name-less inputs on preference page confirmCloseWindow 
check
..

Ignore name-less inputs on preference page confirmCloseWindow check

Ignore any fields that will not be submitted when checking
if the user has made changes to the Preferences form.

Bug: T122702
Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
(cherry picked from commit 614dd71670d6d73e3c3aa953f6afadd5b9187936)
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/45/275745/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 29322f4..a756f22 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -266,7 +266,7 @@
 
// Check if all of the form values are unchanged
function isPrefsChanged() {
-   var inputs = $( '#mw-prefs-form :input' ),
+   var inputs = $( '#mw-prefs-form :input[name]' ),
input, $input, inputType,
index, optIndex,
opt;
@@ -276,7 +276,8 @@
$input = $( input );
 
// Different types of inputs have different 
methods for accessing defaults
-   if ( $input.is( 'select' ) ) { //  has 
the property defaultSelected for each option
+   if ( $input.is( 'select' ) ) {
+   //  has the property 
defaultSelected for each option
for ( optIndex = 0; optIndex < 
input.options.length; optIndex++ ) {
opt = input.options[ optIndex ];
if ( opt.selected !== 
opt.defaultSelected ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: TheDJ 

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


[MediaWiki-commits] [Gerrit] netboot:fix partman recipe for sinistra Bug:T128796 - change (operations/puppet)

2016-03-07 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: netboot:fix partman recipe for sinistra Bug:T128796
..


netboot:fix partman recipe for sinistra
Bug:T128796

Change-Id: Id8f9caf3d37f0d99e68e571b6696791381b1bb9a
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 1b073cf..3461988 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -124,7 +124,7 @@
 restbase200[3-6]) echo partman/cassandrahosts-4ssd.cfg ;; \
 rheniumi|wmf4727-test) echo partman/raid1-gpt.cfg ;; \
 sarin) echo partman/raid1-lvm-ext4-srv.cfg ;; \
-sinistra) echo partman/raid1-lvm-ext4-srv.cfg ;; \
+sinistra) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \
 stat1002) echo partman/lvm-noraid-large.a.cfg ;; \
 tin) echo partman/lvm-tin.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id8f9caf3d37f0d99e68e571b6696791381b1bb9a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] netboot:fix partman recipe for sinistra Bug:T128796 - change (operations/puppet)

2016-03-07 Thread Papaul (Code Review)
Papaul has uploaded a new change for review.

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

Change subject: netboot:fix partman recipe for sinistra Bug:T128796
..

netboot:fix partman recipe for sinistra
Bug:T128796

Change-Id: Id8f9caf3d37f0d99e68e571b6696791381b1bb9a
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/44/275744/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 1b073cf..3461988 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -124,7 +124,7 @@
 restbase200[3-6]) echo partman/cassandrahosts-4ssd.cfg ;; \
 rheniumi|wmf4727-test) echo partman/raid1-gpt.cfg ;; \
 sarin) echo partman/raid1-lvm-ext4-srv.cfg ;; \
-sinistra) echo partman/raid1-lvm-ext4-srv.cfg ;; \
+sinistra) echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 snapshot[1-4]|snapshot100[1-4]) echo partman/snapshot.cfg ;; \
 stat1002) echo partman/lvm-noraid-large.a.cfg ;; \
 tin) echo partman/lvm-tin.cfg ;; \

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

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

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


[MediaWiki-commits] [Gerrit] Ignore name-less inputs on preference page confirmCloseWindo... - change (mediawiki/core)

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

Change subject: Ignore name-less inputs on preference page confirmCloseWindow 
check
..


Ignore name-less inputs on preference page confirmCloseWindow check

Ignore any fields that will not be submitted when checking
if the user has made changes to the Preferences form.

Bug: T122702
Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
---
M resources/src/mediawiki.special/mediawiki.special.preferences.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.preferences.js 
b/resources/src/mediawiki.special/mediawiki.special.preferences.js
index 29322f4..a756f22 100644
--- a/resources/src/mediawiki.special/mediawiki.special.preferences.js
+++ b/resources/src/mediawiki.special/mediawiki.special.preferences.js
@@ -266,7 +266,7 @@
 
// Check if all of the form values are unchanged
function isPrefsChanged() {
-   var inputs = $( '#mw-prefs-form :input' ),
+   var inputs = $( '#mw-prefs-form :input[name]' ),
input, $input, inputType,
index, optIndex,
opt;
@@ -276,7 +276,8 @@
$input = $( input );
 
// Different types of inputs have different 
methods for accessing defaults
-   if ( $input.is( 'select' ) ) { //  has 
the property defaultSelected for each option
+   if ( $input.is( 'select' ) ) {
+   //  has the property 
defaultSelected for each option
for ( optIndex = 0; optIndex < 
input.options.length; optIndex++ ) {
opt = input.options[ optIndex ];
if ( opt.selected !== 
opt.defaultSelected ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cf27267e60f2077180b7bb6a3bc29fded4b67f6
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Edokter 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Sn1per 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "mw2122 offline" - change (operations/puppet)

2016-03-07 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: Revert "mw2122 offline"
..


Revert "mw2122 offline"

system is back online

This reverts commit ee13e0e6d5b206e3addec9b7b668489ad0830141.

Change-Id: I61f63517425eda94a376871e717100bd03dd093c
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index bf50c2b..7479142 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -348,7 +348,7 @@
 mw2119.codfw.wmnet
 mw2120.codfw.wmnet
 mw2121.codfw.wmnet
-# mw2122.codfw.wmnet # T129196
+mw2122.codfw.wmnet
 mw2123.codfw.wmnet
 mw2124.codfw.wmnet
 mw2125.codfw.wmnet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61f63517425eda94a376871e717100bd03dd093c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fixed maps referrer header check - change (operations/puppet)

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

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

Change subject: Fixed maps referrer header check
..

Fixed maps referrer header check

Firefox does not send trailing / symbol for referrer.

Bug: T129187
Change-Id: I4e20c458b5bf3dbb8ccefc2ad1e2be525ee65796
---
M templates/varnish/maps-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/templates/varnish/maps-frontend.inc.vcl.erb 
b/templates/varnish/maps-frontend.inc.vcl.erb
index 52fd6e7..0a72093 100644
--- a/templates/varnish/maps-frontend.inc.vcl.erb
+++ b/templates/varnish/maps-frontend.inc.vcl.erb
@@ -5,10 +5,10 @@
 sub cluster_fe_recv {
if (req.http.referer
&& req.url != "/"
-   && req.http.referer !~ 
"(?i)^https?://([-a-zA-Z0-9.]+\.)?(mediawiki|wikivoyage|wikivoyage-ev|wmflabs|wikidata)\.org/"
-   && req.http.referer !~ 
"(?i)^https?://(maps|phabricator|wikitech|incubator)\.wikimedia\.org/"
-   && req.http.referer !~ 
"(?i)^https?://test2?\.(m\.)?wikipedia\.org/"
-   && req.http.referer !~ 
"(?i)^https?://(localhost|127\.0\.0\.1)(:\d+)?/"
+   && req.http.referer !~ 
"(?i)^https?://([-a-zA-Z0-9.]+\.)?(mediawiki|wikivoyage|wikivoyage-ev|wmflabs|wikidata)\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://(maps|phabricator|wikitech|incubator)\.wikimedia\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://test2?\.(m\.)?wikipedia\.org(/|$)"
+   && req.http.referer !~ 
"(?i)^https?://(localhost|127\.0\.0\.1)(:\d+)?(/|$)"
) {
error 403 "Access Denied";
}

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

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

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


[MediaWiki-commits] [Gerrit] Distingush debit cards with text under logo - change (mediawiki...DonationInterface)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Distingush debit cards with text under logo
..

Distingush debit cards with text under logo

Not the most beautiful solution, but it translates.

Bug: T124320
Change-Id: I319f41c393bab37982d7baa2704a2ceb9576a6c9
---
M astropay_gateway/astropay.adapter.php
M gateway_common/i18n/interface/en.json
M gateway_common/i18n/interface/es.json
M gateway_common/i18n/interface/qqq.json
M gateway_forms/Mustache.php
D gateway_forms/includes/card-visa-debit.png
M gateway_forms/mustache/forms.css
M gateway_forms/mustache/payment_method.html.mustache
8 files changed, 32 insertions(+), 3 deletions(-)


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

diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index 3584f52..0f5fd62 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -343,7 +343,8 @@
'countries' => array(
'MX' => true,
),
-   'logo' => 'card-visa-debit.png',
+   'logo' => 'card-visa-lg.png',
+   'sub_message' => 'donate_interface-debit',
);
 
// MasterCard debit
@@ -354,6 +355,8 @@
'countries' => array(
'MX' => true,
),
+   'logo' => 'card-mc-lg.png',
+   'sub_message' => 'donate_interface-debit',
);
 
// Elo (Brazil-only)
diff --git a/gateway_common/i18n/interface/en.json 
b/gateway_common/i18n/interface/en.json
index 141222e..46409e1 100644
--- a/gateway_common/i18n/interface/en.json
+++ b/gateway_common/i18n/interface/en.json
@@ -307,6 +307,7 @@
"donate_interface-cvv-number": "CVV number",
"donate_interface-verification-number": "Verification number",
"donate_interface-what-is-this": "What is this?",
+   "donate_interface-debit": "(debit)",
"donate_interface-do-not-include-dashes": "Please do not include 
dashes",
"donate_interface-please-donate-today": "Please donate today",
"donate_interface-donate-now": "Donate now",
diff --git a/gateway_common/i18n/interface/es.json 
b/gateway_common/i18n/interface/es.json
index 4dd87e6..86f1927 100644
--- a/gateway_common/i18n/interface/es.json
+++ b/gateway_common/i18n/interface/es.json
@@ -315,6 +315,7 @@
"donate_interface-cvv-number": "Número CVV",
"donate_interface-verification-number": "Número de verificación",
"donate_interface-what-is-this": "¿Qué es esto?",
+   "donate_interface-debit": "(débito)",
"donate_interface-do-not-include-dashes": "No incluyas guiones",
"donate_interface-please-donate-today": "Haz una donación hoy",
"donate_interface-donate-now": "Dona ahora",
diff --git a/gateway_common/i18n/interface/qqq.json 
b/gateway_common/i18n/interface/qqq.json
index 06ca161..088135a 100644
--- a/gateway_common/i18n/interface/qqq.json
+++ b/gateway_common/i18n/interface/qqq.json
@@ -332,6 +332,7 @@
"donate_interface-cvv-number": "Abbreviation of 'Card Verification 
Value' + 'Number' (unabbreviated)",
"donate_interface-verification-number": "Prompt for the card's 
verification number",
"donate_interface-what-is-this": "{{Identical|What is this}}",
+   "donate_interface-debit": "Text to indicate that the choice is a debit 
card as distinct from a credit card, displayed in parentheses",
"donate_interface-do-not-include-dashes": "Reminder to exclude dashes 
from entries",
"donate_interface-please-donate-today": "Label for request urging 
donation",
"donate_interface-donate-now": "Label for button to donate",
diff --git a/gateway_forms/Mustache.php b/gateway_forms/Mustache.php
index 7f22936..8f0a3b3 100644
--- a/gateway_forms/Mustache.php
+++ b/gateway_forms/Mustache.php
@@ -98,6 +98,9 @@
if ( isset( $submethod['logo'] ) ) {
$submethod['logo'] = 
"{$data['script_path']}/extensions/DonationInterface/gateway_forms/includes/{$submethod['logo']}";
}
+   if ( isset( $submethod['sub_message'] ) ) {
+   $submethod['has_subtext'] = true;
+   }
$data['submethods'][] = $submethod;
}
 
diff --git a/gateway_forms/includes/card-visa-debit.png 
b/gateway_forms/includes/card-visa-debit.png
deleted file mode 100644
index 5480719..000
--- a/gateway_forms/includes/card-visa-debit.png
+++ /dev/null
Binary files differ
diff --git 

[MediaWiki-commits] [Gerrit] Adding new partman recipe for 4 disks raid10 with lvm - change (operations/puppet)

2016-03-07 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: Adding new partman recipe for 4 disks raid10 with lvm
..


Adding new partman recipe for 4 disks raid10 with lvm

Change-Id: I57ddf912f74d1f2ef10e3becf8920d0e022cc0d5
---
A modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
1 file changed, 65 insertions(+), 0 deletions(-)

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



diff --git 
a/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg 
b/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
new file mode 100644
index 000..2954956
--- /dev/null
+++ 
b/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
@@ -0,0 +1,65 @@
+# Automatic software RAID partitioning
+#
+# * four disks, sda, sdb, sdc, sdd
+# * primary partitions, with LVM
+# * GPT layout (large disks, > 2TB)
+# * layout:
+#  - / :   ext4, RAID10, 50GB
+#  - /srv: ext4,  RAID10, rest of the space
+
+
+d-i partman-auto/methodstring  raid
+d-i partman-md/device_remove_md boolean true
+d-i partman-lvm/device_remove_lvm  boolean true
+
+# Use all the disks
+d-i partman-auto/disk  string  /dev/sda /dev/sdb /dev/sdc /dev/sdd
+
+# Define physical partitions
+d-i partman-auto/expert_recipe string  \
+   multiraid ::\
+   1   1   1   grub\
+   $primary{ } method{ biosgrub }  \
+   .   \
+   5   80005   raid\
+   $primary{ } method{ raid }  \
+   $lvmignore{}\
+   .   \
+   10001000-1  raid\
+   $primary{ } method{ raid }  \
+   $lvmignore{} \
+   .   
\
+   64 1000 1000 ext4   \
+   $primary{ } \
+   method{ format }\
+   format{ }   \
+   use_filesystem{ }   \
+   filesystem{ ext4 }  \
+   lv_name{ data } \
+   $defaultignore{ }   \
+   $lvmok{ }   \
+   mountpoint{ /srv }  \
+   .   
\
+
+
+# Parameters are:
+#  \
+#  
+d-i partman-auto-raid/recipe   string  \
+   10  4   0   ext4/   \
+   /dev/sda2#/dev/sdb2#/dev/sdc2#/dev/sdd2 \
+   .   \
+   10  4   0   lvm-\
+   /dev/sda3#/dev/sdb3#/dev/sdc3#/dev/sdd3 \
+   .
+
+d-i partman-md/confirm boolean true
+d-i partman-md/confirm_nooverwrite boolean true
+d-i partman/confirm_write_new_label boolean true
+d-i partman/choose_partition   select  finish
+d-i partman/confirmboolean true
+d-i partman/confirm_nooverwriteboolean true
+
+d-i partman-auto-lvm/guided_size   string  80%
+d-i partman-lvm/confirmboolean true
+d-i partman-lvm/confirm_nooverwrite boolean true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57ddf912f74d1f2ef10e3becf8920d0e022cc0d5
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Papaul 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Revert "mw2122 offline" - change (operations/puppet)

2016-03-07 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: Revert "mw2122 offline"
..

Revert "mw2122 offline"

system is back online

This reverts commit ee13e0e6d5b206e3addec9b7b668489ad0830141.

Change-Id: I61f63517425eda94a376871e717100bd03dd093c
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index bf50c2b..7479142 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -348,7 +348,7 @@
 mw2119.codfw.wmnet
 mw2120.codfw.wmnet
 mw2121.codfw.wmnet
-# mw2122.codfw.wmnet # T129196
+mw2122.codfw.wmnet
 mw2123.codfw.wmnet
 mw2124.codfw.wmnet
 mw2125.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Use an example with working digit transformation - change (mediawiki/core)

2016-03-07 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Use an example with working digit transformation
..

Use an example with working digit transformation

Change-Id: I6424774a4cf720fe85a431ff12e5d5c61c9bfcde
---
M languages/Language.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/275740/1

diff --git a/languages/Language.php b/languages/Language.php
index 0bd2276..b2a749d 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -3350,7 +3350,7 @@
 * Normally we output all numbers in plain en_US style, that is
 * 293,291.235 for twohundredninetythreethousand-twohundredninetyone
 * point twohundredthirtyfive. However this is not suitable for all
-* languages, some such as Punjabi want ੨੯੩,੨੯੫.੨੩੫ and others such as
+* languages, some such as Bengali (bn) want ২,৯৩,২৯১.২৩৫ and others 
such as
 * Icelandic just want to use commas instead of dots, and dots instead
 * of commas like "293.291,235".
 *

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

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

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


[MediaWiki-commits] [Gerrit] Add "MF cache pollution debug log" live hack - change (mediawiki...release)

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

Change subject: Add "MF cache pollution debug log" live hack
..


Add "MF cache pollution debug log" live hack

Bug: T124356
Change-Id: Ic9c492e1adbec5b3603671362fb2b6d8b70f2192
---
M make-wmf-branch/default.conf
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/make-wmf-branch/default.conf b/make-wmf-branch/default.conf
index 0e25f85..6210a3a 100644
--- a/make-wmf-branch/default.conf
+++ b/make-wmf-branch/default.conf
@@ -14,6 +14,7 @@
 
 # Map of custom patches (refs/*) to gerrit /mediawiki/ relative base paths 
(repos)
 $patches = array(
+   'refs/changes/65/274165/3' => 'core' // 
https://gerrit.wikimedia.org/r/#/c/274165/
 );
 
 $dryRun = false; // Don't actually push anything

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

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

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


[MediaWiki-commits] [Gerrit] Lower "max lag" and $wgAPIMaxLagThreshold to 8/6 - change (operations/mediawiki-config)

2016-03-07 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Lower "max lag" and $wgAPIMaxLagThreshold to 8/6
..

Lower "max lag" and $wgAPIMaxLagThreshold to 8/6

Change-Id: I17054c740ec7f1af01cebb30654e979135e375b4
---
M wmf-config/CommonSettings.php
M wmf-config/db-codfw.php
M wmf-config/db-eqiad.php
3 files changed, 5 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b8e05bf..6dd0f50 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -212,6 +212,9 @@
 
 # Disallow web request DB transactions slower than this
 $wgMaxUserDBWriteDuration = 6.0;
+# Activate read-only mode for bots when lag is getting high.
+# This should be lower than 'max lag' in the LBFactory conf.
+$wgAPIMaxLagThreshold = 6;
 
 ini_set( 'memory_limit', $wmgMemoryLimit );
 
diff --git a/wmf-config/db-codfw.php b/wmf-config/db-codfw.php
index 0733994..34076d7 100644
--- a/wmf-config/db-codfw.php
+++ b/wmf-config/db-codfw.php
@@ -167,7 +167,7 @@
'password'=> $wgDBpassword,
'type'=> 'mysql',
'flags'   => DBO_DEFAULT,
-   'max lag' => 10, // should be safely less than 
$wgCdnReboundPurgeDelay
+   'max lag' => 8, // should be safely less than 
$wgCdnReboundPurgeDelay
'variables'   => array(
'innodb_lock_wait_timeout' => 15
)
diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 3f49b4d..862c942 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -162,7 +162,7 @@
'password'=> $wgDBpassword,
'type'=> 'mysql',
'flags'   => DBO_DEFAULT,
-   'max lag' => 10, // should be safely less than 
$wgCdnReboundPurgeDelay
+   'max lag' => 8, // should be safely less than 
$wgCdnReboundPurgeDelay
'variables'   => array(
'innodb_lock_wait_timeout' => 15
)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17054c740ec7f1af01cebb30654e979135e375b4
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] MWPopupTool: Don't pass to visualeditor-beta-warning any more - change (mediawiki...VisualEditor)

2016-03-07 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: MWPopupTool: Don't pass  to visualeditor-beta-warning any more
..

MWPopupTool: Don't pass  to visualeditor-beta-warning any more

Change-Id: Ib2f63d1626d8286c7dfd74227d09046a7d2af509
---
M modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
index 3785653..2876273 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWPopupTool.js
@@ -144,7 +144,7 @@
.append(
$( '' )
.addClass( 've-ui-mwHelpPopupTool-item' )
-   .text( ve.msg( 'visualeditor-beta-warning', $( 
'#ca-edit' ).text() ) )
+   .text( ve.msg( 'visualeditor-beta-warning' ) )
)
.append(
$( '' )

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

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

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


[MediaWiki-commits] [Gerrit] Disable geojson double-sanitization - change (mediawiki...Kartographer)

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

Change subject: Disable geojson double-sanitization
..


Disable geojson double-sanitization

Disable mapbox's internal sanitization
after geojson has passed through the MW sanitizer.

Bug: T129189
Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
---
M modules/kartographer.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/kartographer.js b/modules/kartographer.js
index a0eb7b7..61219ed 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -115,6 +115,14 @@
return map;
};
 
+   mw.kartographer.dataLayerOpts = {
+   // Disable double-sanitization by mapbox's internal sanitizer
+   // because geojson has already passed through the MW internal 
sanitizer
+   sanitizer: function ( v ) {
+   return v;
+   }
+   };
+
/**
 * Create a new GeoJSON layer and add it to map.
 *
@@ -123,7 +131,7 @@
 */
mw.kartographer.addDataLayer = function ( map, geoJson ) {
try {
-   return L.mapbox.featureLayer( geoJson ).addTo( map );
+   return L.mapbox.featureLayer( geoJson, 
mw.kartographer.dataLayerOpts ).addTo( map );
} catch ( e ) {
mw.log( e );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] i18n: Don't refer to the name of the tab in the beta notice ... - change (mediawiki...VisualEditor)

2016-03-07 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: i18n: Don't refer to the name of the tab in the beta notice 
given it changes
..

i18n: Don't refer to the name of the tab in the beta notice given it changes

Change-Id: I9beb322aeabece0df483271b33dbaa41f5da732a
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 84a7d50..558ded3 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -52,7 +52,7 @@
"visualeditor-advancedsettings-tool": "Advanced settings",
"visualeditor-backbutton-tooltip": "Go back",
"visualeditor-beta-label": "beta",
-   "visualeditor-beta-warning": "You can switch to the wikitext editor at 
any time by clicking on the \"$1\" tab, keeping any changes you have made. If 
you encounter any issues, please report them below.",
+   "visualeditor-beta-warning": "You can switch to the wikitext editor at 
any time by clicking on the switch button. If you encounter any issues, please 
report them below.",
"visualeditor-browserwarning": "You are using a browser which is not 
officially supported by this editor.",
"visualeditor-ca-createlocaldescriptionsource": "Add local description 
source",
"visualeditor-ca-createsource": "Create source",

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

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

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


[MediaWiki-commits] [Gerrit] i18n: Explain to returning users that their preferences are ... - change (mediawiki...VisualEditor)

2016-03-07 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: i18n: Explain to returning users that their preferences are 
mutable
..

i18n: Explain to returning users that their preferences are mutable

Change-Id: I8a47725d7271af54b30f2130e97b08edec0f0b59
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 904a851..84a7d50 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -215,7 +215,7 @@
"visualeditor-differror": "Error loading data from server: $1.",
"visualeditor-donebutton-tooltip": "Done editing",
"visualeditor-editconflict": "Your changes could not be saved because 
of an edit conflict. Would {{GENDER:|you}} like to resolve the conflict 
manually?",
-   "visualeditor-editingtabdialog-body": "{{SITENAME}} now remembers which 
editor you prefer.",
+   "visualeditor-editingtabdialog-body": "{{SITENAME}} now remembers which 
editor you prefer. You can switch edit modes as you edit, and change your 
preference later.",
"visualeditor-editingtabdialog-ok": "Use the editor I used in my last 
edit",
"visualeditor-editingtabdialog-title": "Editing tabs",
"visualeditor-editnotices-tool": "$1 {{PLURAL:$1|notice|notices}}",

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

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

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


[MediaWiki-commits] [Gerrit] Adding new partman recipe for 4 disks raid10 with lvm - change (operations/puppet)

2016-03-07 Thread Papaul (Code Review)
Papaul has uploaded a new change for review.

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

Change subject: Adding new partman recipe for 4 disks raid10 with lvm
..

Adding new partman recipe for 4 disks raid10 with lvm

Change-Id: I57ddf912f74d1f2ef10e3becf8920d0e022cc0d5
---
A modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
1 file changed, 65 insertions(+), 0 deletions(-)


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

diff --git 
a/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg 
b/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
new file mode 100644
index 000..e5bc202
--- /dev/null
+++ 
b/modules/install_server/files/autoinstall/partman/raid10-gpt-srv-lvm-ext4.cfg
@@ -0,0 +1,65 @@
+# Automatic software RAID partitioning
+#
+# * four disks, sda, sdb, sdc, sdd
+# * primary partitions, with LVM
+# * GPT layout (large disks, > 2TB)
+# * layout:
+#   - /:   ext4, RAID10, 50GB
+#   - /srv: ext4,  RAID10, rest of the space
+
+
+d-ipartman-auto/method string  raid
+d-ipartman-md/device_remove_md boolean true
+d-ipartman-lvm/device_remove_lvm   boolean true
+
+# Use all the disks
+d-ipartman-auto/disk   string  /dev/sda /dev/sdb /dev/sdc /dev/sdd
+
+# Define physical partitions
+d-ipartman-auto/expert_recipe  string  \
+   multiraid ::\
+   1   1   1   grub\
+   $primary{ } method{ biosgrub }  \
+   .   \
+   5   80005   raid\
+   $primary{ } method{ raid }  \
+$lvmignore{}\
+   .   \
+   10001000-1  raid\
+   $primary{ } method{ raid }  \
+$lvmignore{} \
+.   \
+64 1000 1000 ext4   \
+$primary{ } \
+method{ format }\
+format{ }   \
+use_filesystem{ }   \
+filesystem{ ext4 }  \
+lv_name{ data } \
+$defaultignore{ }   \
+$lvmok{ }   \
+mountpoint{ /srv }  \
+.
+
+
+# Parameters are:
+#  \
+#   
+d-ipartman-auto-raid/recipestring  \
+   10  4   0   ext4/   \
+   /dev/sda2#/dev/sdb2#/dev/sdc2#/dev/sdd2 \
+   .   \
+   10  4   0   lvm-\
+   /dev/sda3#/dev/sdb3#/dev/sdc3#/dev/sdd3 \
+   .
+
+d-ipartman-md/confirm  boolean true
+d-ipartman-md/confirm_nooverwrite  boolean true
+d-ipartman/confirm_write_new_label boolean true
+d-ipartman/choose_partitionselect  finish
+d-ipartman/confirm boolean true
+d-ipartman/confirm_nooverwrite boolean true
+
+d-i partman-auto-lvm/guided_sizestring  80%
+d-i partman-lvm/confirm boolean true
+d-i partman-lvm/confirm_nooverwrite boolean true

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

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

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


[MediaWiki-commits] [Gerrit] Add more Chile payment methods - change (mediawiki...DonationInterface)

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

Change subject: Add more Chile payment methods
..


Add more Chile payment methods

Also allow a submethod to be in multiple groups.

Bug: T124323
Change-Id: Ifcd326621766eb333507d7794e90ce40cd475131
---
M astropay_gateway/astropay.adapter.php
M gateway_common/gateway.adapter.php
2 files changed, 48 insertions(+), 3 deletions(-)

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



diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index c139864..3584f52 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -288,6 +288,7 @@
'countries' => array(
'AR' => true,
'BR' => true,
+   'CL' => true,
'MX' => true,
'CO' => true,
),
@@ -302,10 +303,22 @@
'countries' => array(
'AR' => true,
'BR' => true,
+   'CL' => true,
'MX' => true,
'CO' => true,
),
'logo' => 'card-mc-lg.png',
+   );
+
+   // Magna
+   $this->payment_submethods['magna'] = array(
+   'bank_code' => 'MG',
+   'label' => 'Magna',
+   'group' => 'cc',
+   'countries' => array(
+   'CL' => true,
+   ),
+   'logo' => 'card-magna.png',
);
 
// American Express
@@ -316,6 +329,7 @@
'countries' => array(
'BR' => true,
'AR' => true,
+   'CL' => true,
'CO' => true,
),
'logo' => 'card-amex-lg.png',
@@ -358,6 +372,7 @@
'group' => 'cc',
'countries' => array(
'BR' => true,
+   'CL' => true,
'CO' => true,
),
'logo' => 'card-dinersclub-lg.png',
@@ -435,12 +450,40 @@
'logo' => 'card-argencard.png',
);
 
+   // CMR Falabella
+   $this->payment_submethods['cmr'] = array(
+   'bank_code' => 'CM',
+   'label' => 'CMR',
+   'group' => 'cc',
+   'countries' => array( 'CL' => true, ),
+   'logo' => 'card-cmr.png',
+   );
+
+   // Presto
+   $this->payment_submethods['presto'] = array(
+   'bank_code' => 'PR',
+   'label' => 'Presto',
+   'group' => 'cc',
+   'countries' => array( 'CL' => true, ),
+   'logo' => 'card-presto.png',
+   );
+
// Webpay
$this->payment_submethods['webpay'] = array(
'bank_code' => 'WP',
'label' => 'Webpay',
-   'group' => 'cc',
+   'group' => array( 'cc', 'bt', ),
'countries' => array( 'CL' => true, ),
+   'logo' => 'bank-webpay.png',
+   );
+
+   // Banco de Chile
+   $this->payment_submethods['banco_de_chile'] = array(
+   'bank_code' => 'BX',
+   'label' => 'Banco de Chile',
+   'group' => 'bt',
+   'countries' => array( 'CL' => true, ),
+   'logo' => 'bank-banco_de_chile.png',
);
 
// Banco do Brasil
@@ -713,7 +756,8 @@
$method = $this->getData_Staged( 'payment_method' );
$bank = $this->getData_Staged( 'bank_code' );
$filter = function( $submethod ) use ( $method, $bank ) {
-   return $submethod['group'] === $method && 
$submethod['bank_code'] === $bank;
+   $groups = (array) $submethod['group'];
+   return in_array( $groups, $method ) && 
$submethod['bank_code'] === $bank;
};
$candidates = array_filter( $this->payment_submethods, $filter 
);
if ( count( $candidates ) !== 1 ) {
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 1d57910..586f64f 100644
--- 

[MediaWiki-commits] [Gerrit] Lowered $wgMaxUserDBWriteDuration to 5 - change (operations/mediawiki-config)

2016-03-07 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Lowered $wgMaxUserDBWriteDuration to 5
..

Lowered $wgMaxUserDBWriteDuration to 5

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b8e05bf..c34ba22 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -211,7 +211,7 @@
 }
 
 # Disallow web request DB transactions slower than this
-$wgMaxUserDBWriteDuration = 6.0;
+$wgMaxUserDBWriteDuration = 5.0;
 
 ini_set( 'memory_limit', $wmgMemoryLimit );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d26719844adbb12be1590c89d149121615ba48d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Argument bug fix - change (wikimedia...golden)

2016-03-07 Thread OliverKeyes (Code Review)
OliverKeyes has submitted this change and it was merged.

Change subject: Argument bug fix
..


Argument bug fix

Change-Id: I5c5d756eac3501db85965bd8c4c365bb9cdcac00
---
M search/dwelltime.R
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/search/dwelltime.R b/search/dwelltime.R
index 4be0937..93c8e79 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -17,7 +17,7 @@
 date <- as.Date(data$timestamp[1])
   }
 
-  dwell_data <- ortiz::dwell_time(data = data, ids = "session_id", timestamps 
= "timestamp", dwell_threshold = 10)
+  dwell_data <- ortiz::dwell_time(data = data, id_col = "session_id", ts_col = 
"timestamp", dwell_threshold = 10)
   
   # Turn it into a data.frame we can write out conditionally, and then do that
   output <- data.frame(date = date, threshold_pass = 
sum(dwell_data)/length(dwell_data))

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

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

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


[MediaWiki-commits] [Gerrit] Argument bug fix - change (wikimedia...golden)

2016-03-07 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Argument bug fix
..

Argument bug fix

Change-Id: I5c5d756eac3501db85965bd8c4c365bb9cdcac00
---
M search/dwelltime.R
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/33/275733/1

diff --git a/search/dwelltime.R b/search/dwelltime.R
index 4be0937..93c8e79 100644
--- a/search/dwelltime.R
+++ b/search/dwelltime.R
@@ -17,7 +17,7 @@
 date <- as.Date(data$timestamp[1])
   }
 
-  dwell_data <- ortiz::dwell_time(data = data, ids = "session_id", timestamps 
= "timestamp", dwell_threshold = 10)
+  dwell_data <- ortiz::dwell_time(data = data, id_col = "session_id", ts_col = 
"timestamp", dwell_threshold = 10)
   
   # Turn it into a data.frame we can write out conditionally, and then do that
   output <- data.frame(date = date, threshold_pass = 
sum(dwell_data)/length(dwell_data))

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

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

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


[MediaWiki-commits] [Gerrit] Disable geojson double-sanitization - change (mediawiki...Kartographer)

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

Change subject: Disable geojson double-sanitization
..


Disable geojson double-sanitization

Disable mapbox's internal sanitization
after geojson has passed through the MW sanitizer.

Bug: T129189
Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
---
M modules/kartographer.js
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/modules/kartographer.js b/modules/kartographer.js
index a0eb7b7..61219ed 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -115,6 +115,14 @@
return map;
};
 
+   mw.kartographer.dataLayerOpts = {
+   // Disable double-sanitization by mapbox's internal sanitizer
+   // because geojson has already passed through the MW internal 
sanitizer
+   sanitizer: function ( v ) {
+   return v;
+   }
+   };
+
/**
 * Create a new GeoJSON layer and add it to map.
 *
@@ -123,7 +131,7 @@
 */
mw.kartographer.addDataLayer = function ( map, geoJson ) {
try {
-   return L.mapbox.featureLayer( geoJson ).addTo( map );
+   return L.mapbox.featureLayer( geoJson, 
mw.kartographer.dataLayerOpts ).addTo( map );
} catch ( e ) {
mw.log( e );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Disable geojson double-sanitization - change (mediawiki...Kartographer)

2016-03-07 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Disable geojson double-sanitization
..

Disable geojson double-sanitization

Disable mapbox's internal sanitization
after geojson has passed through the MW sanitizer.

Bug: T129189
Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
---
M modules/kartographer.js
1 file changed, 9 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/32/275732/1

diff --git a/modules/kartographer.js b/modules/kartographer.js
index a0eb7b7..61219ed 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -115,6 +115,14 @@
return map;
};
 
+   mw.kartographer.dataLayerOpts = {
+   // Disable double-sanitization by mapbox's internal sanitizer
+   // because geojson has already passed through the MW internal 
sanitizer
+   sanitizer: function ( v ) {
+   return v;
+   }
+   };
+
/**
 * Create a new GeoJSON layer and add it to map.
 *
@@ -123,7 +131,7 @@
 */
mw.kartographer.addDataLayer = function ( map, geoJson ) {
try {
-   return L.mapbox.featureLayer( geoJson ).addTo( map );
+   return L.mapbox.featureLayer( geoJson, 
mw.kartographer.dataLayerOpts ).addTo( map );
} catch ( e ) {
mw.log( e );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] Disable geojson double-sanitization - change (mediawiki...Kartographer)

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

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

Change subject: Disable geojson double-sanitization
..

Disable geojson double-sanitization

Disable mapbox's internal sanitization
after geojson has passed through the MW sanitizer.

Bug: T129189
Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
---
M modules/kartographer.js
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/modules/kartographer.js b/modules/kartographer.js
index a0eb7b7..0e318d0 100644
--- a/modules/kartographer.js
+++ b/modules/kartographer.js
@@ -115,6 +115,14 @@
return map;
};
 
+   mw.kartographer.dataLayerOpts = {
+   // Disable double-sanitization by mapbox's internal sanitizer
+   // because geojson has already passed through the MW internal 
sanitizer
+   sanitizer: function (v) {
+   return v;
+   }
+   };
+
/**
 * Create a new GeoJSON layer and add it to map.
 *
@@ -123,7 +131,7 @@
 */
mw.kartographer.addDataLayer = function ( map, geoJson ) {
try {
-   return L.mapbox.featureLayer( geoJson ).addTo( map );
+   return L.mapbox.featureLayer( geoJson, 
mw.kartographer.dataLayerOpts ).addTo( map );
} catch ( e ) {
mw.log( e );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic244ea0253b9980303fc02da3260a48496f4a7ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] mw2122 offline - change (operations/puppet)

2016-03-07 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: mw2122 offline
..


mw2122 offline

commenting in mediawiki-installation while offline

T129196

Change-Id: Ibee0ebbe14d671fb27312f6a359fb29705c18206
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 7479142..bf50c2b 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -348,7 +348,7 @@
 mw2119.codfw.wmnet
 mw2120.codfw.wmnet
 mw2121.codfw.wmnet
-mw2122.codfw.wmnet
+# mw2122.codfw.wmnet # T129196
 mw2123.codfw.wmnet
 mw2124.codfw.wmnet
 mw2125.codfw.wmnet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibee0ebbe14d671fb27312f6a359fb29705c18206
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: RobH 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mw2122 offline - change (operations/puppet)

2016-03-07 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: mw2122 offline
..

mw2122 offline

commenting in mediawiki-installation while offline

T129196

Change-Id: Ibee0ebbe14d671fb27312f6a359fb29705c18206
---
M modules/scap/files/dsh/group/mediawiki-installation
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/275730/1

diff --git a/modules/scap/files/dsh/group/mediawiki-installation 
b/modules/scap/files/dsh/group/mediawiki-installation
index 7479142..bf50c2b 100644
--- a/modules/scap/files/dsh/group/mediawiki-installation
+++ b/modules/scap/files/dsh/group/mediawiki-installation
@@ -348,7 +348,7 @@
 mw2119.codfw.wmnet
 mw2120.codfw.wmnet
 mw2121.codfw.wmnet
-mw2122.codfw.wmnet
+# mw2122.codfw.wmnet # T129196
 mw2123.codfw.wmnet
 mw2124.codfw.wmnet
 mw2125.codfw.wmnet

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

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

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


[MediaWiki-commits] [Gerrit] Reset scoped session for two more jobs after deferred updates - change (mediawiki...CentralAuth)

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

Change subject: Reset scoped session for two more jobs after deferred updates
..


Reset scoped session for two more jobs after deferred updates

Follows up 21eaefa8be0c5e8f

Bug: T126450
Change-Id: I0ee0894014471f7960a17d2322a80903bf2f6277
---
M includes/CreateLocalAccountJob.php
M includes/LocalRenameJob/LocalPageMoveJob.php
2 files changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/CreateLocalAccountJob.php 
b/includes/CreateLocalAccountJob.php
index 021eeeb..846446b 100644
--- a/includes/CreateLocalAccountJob.php
+++ b/includes/CreateLocalAccountJob.php
@@ -31,6 +31,9 @@
$this->params['session']['userId'] = 0;
$this->params['session']['sessionId'] = '';
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
 
$user = User::newFromName( $username );
diff --git a/includes/LocalRenameJob/LocalPageMoveJob.php 
b/includes/LocalRenameJob/LocalPageMoveJob.php
index d7e6239..3af8d53 100644
--- a/includes/LocalRenameJob/LocalPageMoveJob.php
+++ b/includes/LocalRenameJob/LocalPageMoveJob.php
@@ -34,6 +34,9 @@
public function run() {
if ( isset( $this->params['session'] ) ) {
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
$this->user = User::newFromName( $this->params['renamer'] );
if ( isset( $this->params['pages'] ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ee0894014471f7960a17d2322a80903bf2f6277
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Set VisualEditorSingleEditTabSwitchTime to correct dates - change (operations/mediawiki-config)

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

Change subject: Set VisualEditorSingleEditTabSwitchTime to correct dates
..


Set VisualEditorSingleEditTabSwitchTime to correct dates

Change-Id: I4f1a0554d4b338629d1af2e019ebf0746ce6ad35
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9c80d8e..c610364 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2007,6 +2007,7 @@
// Tab configuration
if ( $wmgVisualEditorUseSingleEditTab ) {
$wgVisualEditorUseSingleEditTab = true;
+   $wgVisualEditorSingleEditTabSwitchTime = 
$wmgVisualEditorSingleEditTabSwitchTime;
if ( $wmgVisualEditorSingleEditTabSecondaryEditor ) {
$wgDefaultUserOptions['visualeditor-editor'] = 
'wikitext';
} else {
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4f54353..e7ed64b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13189,6 +13189,17 @@
'officewiki' => true,   # Per legoktm's orders, 2016-03-03
 ),
 
+// Time that above variable was switched on, used to determine whether we 
should prompt user about
+// preference on first load
+'wmgVisualEditorSingleEditTabSwitchTime' => array(
+   'default' => 2016010100,
+   'mediawikiwiki' => 2016020300,
+   'testwiki' => 2016020300,
+   'test2wiki' => 2015121500,
+   'huwiki' => 2016022300,
+   'officewiki' => 2016030300,
+),
+
 // Whether the wikitext editor should be the default (first-open) editor on 
SET wikis
 'wmgVisualEditorSingleEditTabSecondaryEditor' => array(
'default' => false,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f1a0554d4b338629d1af2e019ebf0746ce6ad35
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
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] Define the horizon and wikitech hostnames in hiera. - change (operations/puppet)

2016-03-07 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Define the horizon and wikitech hostnames in hiera.
..


Define the horizon and wikitech hostnames in hiera.

This removes some hard-coding in the designate role class,
and should allow labtest horizin to access labtest designate.

Change-Id: I17d3b369a742972407233b093d90ee4efa1b6b17
---
M hieradata/codfw/labtest.yaml
M hieradata/eqiad.yaml
M modules/role/manifests/labs/openstack/designate.pp
3 files changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/codfw/labtest.yaml b/hieradata/codfw/labtest.yaml
index 675b957..efbf504 100644
--- a/hieradata/codfw/labtest.yaml
+++ b/hieradata/codfw/labtest.yaml
@@ -12,6 +12,9 @@
 labs_nova_controller:  "labtestcontrol2001.wikimedia.org"
 labs_nova_controller_spare:  
"labtestcontrol2001.wikimedia.org"
 
+labs_osm_host: "labtestwikitech.wikimedia.org"
+labs_horizon_host: "labtesthorizon.wikimedia.org"
+
 labs_designate_hostname:  
"labtestservices2001.wikimedia.org"
 labs_designate_hostname_secondary: _designate_hostname_secondary 
"labtestservices2001.wikimedia.org"
 
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index a65b3e5..53a98c0 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -84,6 +84,9 @@
 labs_puppet_master:  "labs-puppetmaster-eqiad.wikimedia.org"
 labs_keystone_host:  "labcontrol1001.wikimedia.org"
 
+labs_osm_host: "wikitech.wikimedia.org"
+labs_horizon_host: "horizon.wikimedia.org"
+
 # These are the old, soon-to-be-phased-out dns servers:
 labs_ldap_dns_host:  "labs-ns0.wikimedia.org"
 labs_ldap_dns_host_secondary:  
"labs-ns1.wikimedia.org"
diff --git a/modules/role/manifests/labs/openstack/designate.pp 
b/modules/role/manifests/labs/openstack/designate.pp
index bcfda37..2eef3d1 100644
--- a/modules/role/manifests/labs/openstack/designate.pp
+++ b/modules/role/manifests/labs/openstack/designate.pp
@@ -7,13 +7,15 @@
 $keystone_host   = hiera('labs_keystone_host')
 $nova_controller = hiera('labs_nova_controller')
 $designate_host  = hiera('labs_designate_hostname')
+$osm_host= hiera('labs_osm_host')
+$horizon_host= hiera('labs_horizon_host')
 
 $keystoneconfig  = hiera_hash('keystoneconfig', {})
 $designateconfig = hiera_hash('designateconfig', {})
 
 $controller_ip   = ipresolve($nova_controller,4)
-$horizon_ip  = ipresolve('horizon.wikimedia.org',4)
-$wikitech_ip = ipresolve('wikitech.wikimedia.org',4)
+$horizon_ip  = ipresolve($horizon_host,4)
+$wikitech_ip = ipresolve($osm_host,4)
 
 $dnsconfig = hiera_hash('labsdnsconfig', {})
 $dns_host  = $dnsconfig['host']

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

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

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


[MediaWiki-commits] [Gerrit] Try and avoid race conditions with thank-you-edit notifications - change (mediawiki...Echo)

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

Change subject: Try and avoid race conditions with thank-you-edit notifications
..


Try and avoid race conditions with thank-you-edit notifications

Wait until after the main transaction has been committed before checking
whether they have the right number of edits.

Bug: T128249
Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2
(cherry picked from commit 8d9949010813cf5f31ca6ba0c638ca25ed815bf2)
---
M Hooks.php
1 file changed, 16 insertions(+), 9 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 0b67aa1..b326795 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -461,15 +461,22 @@
// This edit hasn't been added to the edit count yet
$editCount = $user->getEditCount() + 1;
if ( in_array( $editCount, $thresholds ) ) {
-   LoggerFactory::getInstance( 'Echo' )->debug(
-   'Thanking {user} (id: {id}) for their 
{count} edit',
-   array(
-   'user' => $user->getName(),
-   'id' => $user->getId(),
-   'count' => $editCount,
-   )
-   );
-   DeferredUpdates::addCallableUpdate( function () 
use ( $user, $title, $editCount ) {
+   $id = $user->getId();
+   DeferredUpdates::addCallableUpdate( function () 
use ( $id, $title, $editCount ) {
+   // Fresh User object
+   $user = User::newFromId( $id );
+   if ( $user->getEditCount() !== 
$editCount ) {
+   // Race condition with multiple 
simultaneous requests, skip
+   return;
+   }
+   LoggerFactory::getInstance( 'Echo' 
)->debug(
+   'Thanking {user} (id: {id}) for 
their {count} edit',
+   array(
+   'user' => 
$user->getName(),
+   'id' => $user->getId(),
+   'count' => $editCount,
+   )
+   );
EchoEvent::create( array(
'type' => 
'thank-you-edit',
'title' => $title,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38cc0f96e97fda3692340cc8906144a002594ef2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Catrope 
Gerrit-Reviewer: EBernhardson 
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] Reduce replica count for commonswiki_file in codfw - change (operations/mediawiki-config)

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

Change subject: Reduce replica count for commonswiki_file in codfw
..


Reduce replica count for commonswiki_file in codfw

Missed this one when writing the unit test to verify shard counts.
Should be ok reducing to 2 replicas and save having to reindex.

Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2
---
M tests/cirrusTest.php
M wmf-config/InitialiseSettings.php
2 files changed, 13 insertions(+), 6 deletions(-)

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



diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php
index 4253976..3c61719 100644
--- a/tests/cirrusTest.php
+++ b/tests/cirrusTest.php
@@ -146,7 +146,7 @@
}
}
$wikis = array_unique( $wikis );
-   $indexTypes = array( 'content', 'general', 'titlesuggest' );
+   $indexTypes = array( 'content', 'general', 'titlesuggest', 
'file' );
$clusters = array( 'eqiad' => 31, 'codfw' => 24 );
 
// restrict wgConf to only the settings we care about
@@ -169,11 +169,15 @@
'stdlogo' => 'file://dev/null',
) );
foreach ( $indexTypes as $indexType ) {
+   // only commonswiki has the file index
+   if ( $indexType === 'file' && $wiki !== 
'commonswiki' ) {
+   continue;
+   }
+   // wikidata doesn't have completion suggester
+   if ( $wiki === 'wikidatawiki' && $indexType === 
'titlesuggest' ) {
+   continue;
+   }
foreach ( $clusters as $clusterName => 
$numServers ) {
-   // wikidata doesn't have completion 
suggester
-   if ( $wiki === 'wikidatawiki' && 
$indexType === 'titlesuggest' ) {
-   continue;
-   }
$tests["$clusterName 
{$wiki}_{$indexType}"] = array(
$wiki,
$indexType,
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6ec2b40..0f77e39 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16014,7 +16014,10 @@
 // some of the larger ones will want more replicas for content indexes
 'wmgCirrusSearchReplicas' => array(
'default' => array( 'content' => '0-2', 'general' => '0-2', 
'titlesuggest' => '0-2' ),
-   '+commonswiki' => array( 'file' => '0-3' ),
+   'commonswiki' => array(
+   'eqiad' => array( 'content' => '0-2', 'general' => '0-2', 
'titlesuggest' => '0-2', 'file' => '0-3' ),
+   'codfw' => array( 'content' => '0-2', 'general' => '0-2', 
'titlesuggest' => '0-2', 'file' => '0-2' ),
+   ),
'+eswiki' => array( 'titlesuggest' => '0-5' ),
'+jawiki' => array( 'titlesuggest' => '0-5' ),
'+ruwiki' => array( 'titlesuggest' => '0-5' ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57104b666aa5fb697a40c9a7864223b59cbe19a2
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Define the horizon and wikitech hostnames in hiera. - change (operations/puppet)

2016-03-07 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Define the horizon and wikitech hostnames in hiera.
..

Define the horizon and wikitech hostnames in hiera.

This removes some hard-coding in the designate role class,
and should allow labtest horizin to access labtest designate.

Change-Id: I17d3b369a742972407233b093d90ee4efa1b6b17
---
M hieradata/codfw/labtest.yaml
M hieradata/eqiad.yaml
M modules/role/manifests/labs/openstack/designate.pp
3 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/275729/1

diff --git a/hieradata/codfw/labtest.yaml b/hieradata/codfw/labtest.yaml
index 675b957..efbf504 100644
--- a/hieradata/codfw/labtest.yaml
+++ b/hieradata/codfw/labtest.yaml
@@ -12,6 +12,9 @@
 labs_nova_controller:  "labtestcontrol2001.wikimedia.org"
 labs_nova_controller_spare:  
"labtestcontrol2001.wikimedia.org"
 
+labs_osm_host: "labtestwikitech.wikimedia.org"
+labs_horizon_host: "labtesthorizon.wikimedia.org"
+
 labs_designate_hostname:  
"labtestservices2001.wikimedia.org"
 labs_designate_hostname_secondary: _designate_hostname_secondary 
"labtestservices2001.wikimedia.org"
 
diff --git a/hieradata/eqiad.yaml b/hieradata/eqiad.yaml
index a65b3e5..53a98c0 100644
--- a/hieradata/eqiad.yaml
+++ b/hieradata/eqiad.yaml
@@ -84,6 +84,9 @@
 labs_puppet_master:  "labs-puppetmaster-eqiad.wikimedia.org"
 labs_keystone_host:  "labcontrol1001.wikimedia.org"
 
+labs_osm_host: "wikitech.wikimedia.org"
+labs_horizon_host: "horizon.wikimedia.org"
+
 # These are the old, soon-to-be-phased-out dns servers:
 labs_ldap_dns_host:  "labs-ns0.wikimedia.org"
 labs_ldap_dns_host_secondary:  
"labs-ns1.wikimedia.org"
diff --git a/modules/role/manifests/labs/openstack/designate.pp 
b/modules/role/manifests/labs/openstack/designate.pp
index bcfda37..2eef3d1 100644
--- a/modules/role/manifests/labs/openstack/designate.pp
+++ b/modules/role/manifests/labs/openstack/designate.pp
@@ -7,13 +7,15 @@
 $keystone_host   = hiera('labs_keystone_host')
 $nova_controller = hiera('labs_nova_controller')
 $designate_host  = hiera('labs_designate_hostname')
+$osm_host= hiera('labs_osm_host')
+$horizon_host= hiera('labs_horizon_host')
 
 $keystoneconfig  = hiera_hash('keystoneconfig', {})
 $designateconfig = hiera_hash('designateconfig', {})
 
 $controller_ip   = ipresolve($nova_controller,4)
-$horizon_ip  = ipresolve('horizon.wikimedia.org',4)
-$wikitech_ip = ipresolve('wikitech.wikimedia.org',4)
+$horizon_ip  = ipresolve($horizon_host,4)
+$wikitech_ip = ipresolve($osm_host,4)
 
 $dnsconfig = hiera_hash('labsdnsconfig', {})
 $dns_host  = $dnsconfig['host']

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

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

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


[MediaWiki-commits] [Gerrit] Enable completion suggester as default prefix algo on test/t... - change (operations/mediawiki-config)

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

Change subject: Enable completion suggester as default prefix algo on test/test2
..


Enable completion suggester as default prefix algo on test/test2

Also sets all beta cluster wiki's to use completion as the
default algo.

Depends-On: I3ee645f003189b855ba1b4e623338e121499f9ba
Bug: T128774
Change-Id: Iad874d6e4e2d8383b51f33a6854400ab50721bd3
---
M wmf-config/CirrusSearch-common.php
M wmf-config/CirrusSearch-labs.php
M wmf-config/CirrusSearch-production.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/InitialiseSettings.php
5 files changed, 14 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/CirrusSearch-common.php 
b/wmf-config/CirrusSearch-common.php
index e9bfe8f..b79af6d 100644
--- a/wmf-config/CirrusSearch-common.php
+++ b/wmf-config/CirrusSearch-common.php
@@ -160,6 +160,10 @@
}
 }
 
+// Enable completion suggester
+$wgCirrusSearchUseCompletionSuggester = $wmgCirrusSearchUseCompletionSuggester;
+
+
 # Load per realm specific configuration, either:
 # - CirrusSearch-labs.php
 # - CirrusSearch-production.php
diff --git a/wmf-config/CirrusSearch-labs.php b/wmf-config/CirrusSearch-labs.php
index d1b5e73..04092b0 100644
--- a/wmf-config/CirrusSearch-labs.php
+++ b/wmf-config/CirrusSearch-labs.php
@@ -79,4 +79,3 @@
 'zh' => 'zhwiki',
 );
 
-$wgCirrusSearchUseCompletionSuggester = true;
diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index 2ad0122..d609900 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -90,9 +90,6 @@
'labsearch' => 10 * 60, // ten minutes
 );
 
-// Enable completion suggester (beta)
-$wgCirrusSearchUseCompletionSuggester = $wmgCirrusSearchUseCompletionSuggester;
-
 $wgCirrusSearchRecycleCompletionSuggesterIndex = 
$wmgCirrusSearchRecycleCompletionSuggesterIndex;
 
 // repoint morelike queries to codfw
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 750812a..d5a90b6 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -627,5 +627,11 @@
'default' => array( 'hard' => 0.7, 'soft'=> 0.5 ),
'wikipedia' => array( 'hard' => 0.8, 'soft'=> 0.7 ), // 
T127661
),
+   // test completion suggester default everywhere in preperation
+   // for rollout to production
+   'wmgCirrusSearchUseCompletionSuggester' => array(
+   'default' => 'yes',
+   'wikidatawiki' => 'no',
+   ),
);
 } # wmflLabsSettings()
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4f54353..4c71213 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16044,8 +16044,10 @@
 
 // Enable completion suggester on all wikis (except wikidata)
 'wmgCirrusSearchUseCompletionSuggester' => array(
-   'default' => true,
-   'wikidatawiki' => false,
+   'default' => 'beta',
+   'testwiki' => 'yes',
+   'test2wiki' => 'yes',
+   'wikidatawiki' => 'no',
 ),
 
 // wmgCirrusSearchRecycleCompletionSuggesterIndex @{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iad874d6e4e2d8383b51f33a6854400ab50721bd3
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs: Switch wdqs project to use only scratch - change (operations/puppet)

2016-03-07 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labs: Switch wdqs project to use only scratch
..


labs: Switch wdqs project to use only scratch

No home.

Bug: T128815
Change-Id: Idd1f15e547e53fe92f883339b4a027761a1796fb
---
M modules/labstore/files/nfs-mounts.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/labstore/files/nfs-mounts.yaml 
b/modules/labstore/files/nfs-mounts.yaml
index 772fad6..7933f75 100644
--- a/modules/labstore/files/nfs-mounts.yaml
+++ b/modules/labstore/files/nfs-mounts.yaml
@@ -34,7 +34,7 @@
   wikidata-query:
 gid: 52354
 mounts:
-  home: true
+  scratch: true
   cvresearch:
 gid: 50118
 mounts:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd1f15e547e53fe92f883339b4a027761a1796fb
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs: Switch wdqs project to use only scratch - change (operations/puppet)

2016-03-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labs: Switch wdqs project to use only scratch
..

labs: Switch wdqs project to use only scratch

No home.

Bug: T128815
Change-Id: Idd1f15e547e53fe92f883339b4a027761a1796fb
---
M modules/labstore/files/nfs-mounts.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/275728/1

diff --git a/modules/labstore/files/nfs-mounts.yaml 
b/modules/labstore/files/nfs-mounts.yaml
index 772fad6..7933f75 100644
--- a/modules/labstore/files/nfs-mounts.yaml
+++ b/modules/labstore/files/nfs-mounts.yaml
@@ -34,7 +34,7 @@
   wikidata-query:
 gid: 52354
 mounts:
-  home: true
+  scratch: true
   cvresearch:
 gid: 50118
 mounts:

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

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

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


[MediaWiki-commits] [Gerrit] Reset scoped session for two more jobs after deferred updates - change (mediawiki...CentralAuth)

2016-03-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Reset scoped session for two more jobs after deferred updates
..

Reset scoped session for two more jobs after deferred updates

Follows up 21eaefa8be0c5e8f

Bug: T126450
Change-Id: I0ee0894014471f7960a17d2322a80903bf2f6277
---
M includes/CreateLocalAccountJob.php
M includes/LocalRenameJob/LocalPageMoveJob.php
2 files changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/includes/CreateLocalAccountJob.php 
b/includes/CreateLocalAccountJob.php
index 021eeeb..846446b 100644
--- a/includes/CreateLocalAccountJob.php
+++ b/includes/CreateLocalAccountJob.php
@@ -31,6 +31,9 @@
$this->params['session']['userId'] = 0;
$this->params['session']['sessionId'] = '';
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
 
$user = User::newFromName( $username );
diff --git a/includes/LocalRenameJob/LocalPageMoveJob.php 
b/includes/LocalRenameJob/LocalPageMoveJob.php
index d7e6239..3af8d53 100644
--- a/includes/LocalRenameJob/LocalPageMoveJob.php
+++ b/includes/LocalRenameJob/LocalPageMoveJob.php
@@ -34,6 +34,9 @@
public function run() {
if ( isset( $this->params['session'] ) ) {
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
$this->user = User::newFromName( $this->params['renamer'] );
if ( isset( $this->params['pages'] ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] Enable async swift writes to all wikis except commons - change (operations/mediawiki-config)

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

Change subject: Enable async swift writes to all wikis except commons
..


Enable async swift writes to all wikis except commons

Change-Id: Ic437670fa04502e8e9672b7fcb7c417ff2dceb37
---
M wmf-config/filebackend-production.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Filippo Giunchedi: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/wmf-config/filebackend-production.php 
b/wmf-config/filebackend-production.php
index 2af5f37..974fa7b 100644
--- a/wmf-config/filebackend-production.php
+++ b/wmf-config/filebackend-production.php
@@ -92,7 +92,7 @@
'wikiId'  => "{$site}-{$lang}",
'lockManager' => 'redisLockManager',
# DO NOT change the master backend unless it is fully trusted or 
autoRsync is off
-   'backends'=> in_array( $wgDBname, $wmfSwiftBigWikis )
+   'backends'=> ( $wgDBname === 'commonswiki' )
? array( array( 'template' => 'local-swift-eqiad', 
'isMultiMaster' => true ) )
: array(
array( 'template' => 'local-swift-eqiad', 
'isMultiMaster' => true ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic437670fa04502e8e9672b7fcb7c417ff2dceb37
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update DonationInterface Submodule - change (mediawiki/core)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Update DonationInterface Submodule
..


Update DonationInterface Submodule

Change-Id: Ida21912df016dd40d26dac912f717844ebdddf93
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 621d313..1a21bb1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 621d313534d2d72c3033bc8deb9419daac1fcc38
+Subproject commit 1a21bb18a09dd871989f903b826472cbf24dbef3

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida21912df016dd40d26dac912f717844ebdddf93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Ejegg 

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


[MediaWiki-commits] [Gerrit] Update DonationInterface Submodule - change (mediawiki/core)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Update DonationInterface Submodule
..

Update DonationInterface Submodule

Change-Id: Ida21912df016dd40d26dac912f717844ebdddf93
---
M extensions/DonationInterface
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/275726/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 621d313..1a21bb1 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
-Subproject commit 621d313534d2d72c3033bc8deb9419daac1fcc38
+Subproject commit 1a21bb18a09dd871989f903b826472cbf24dbef3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida21912df016dd40d26dac912f717844ebdddf93
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_25
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged.

Change subject: Merge master into deployment
..


Merge master into deployment

d9c5d03 Update payment methods and submethods for AstroPay LATAM rollout
34bcc66 Hide submethod buttons when only one choice
8b2a9e8 Add more LATAM card logos
0dceb82 Add and update AstroPay logos
4056242 Allow multiple name filter rules

Removed tests

Change-Id: I23e426eed0ddb96d883b339e32b89ebdf2fca278
---
D tests/Adapter/GatewayAdapterTest.php
1 file changed, 0 insertions(+), 313 deletions(-)

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



diff --git a/tests/Adapter/GatewayAdapterTest.php 
b/tests/Adapter/GatewayAdapterTest.php
deleted file mode 100644
index e188b2e..000
--- a/tests/Adapter/GatewayAdapterTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<<< HEAD   (621d31 Merge master into deployment)
-===
-setMwGlobals( array(
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'testytest' => array(
-   'gateway' => 'globalcollect', // RAR.
-   ),
-   'rapidFailError' => array(
-   'file' => 'error-cc.html',
-   'gateway' => array( 'globalcollect', 
'adyen', 'amazon', 'astropay', 'paypal', 'worldpay' ),
-   'special_type' => 'error',
-   )
-   ),
-   ) );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers GatewayAdapter::defineVarMap
-* @covers GatewayAdapter::defineReturnValueMap
-* @covers GatewayAdapter::defineTransactions
-*/
-   public function testConstructor() {
-
-   $options = $this->getDonorTestData();
-   $class = $this->testAdapterClass;
-
-   $_SERVER['REQUEST_URI'] = 
GatewayFormChooser::buildPaymentsFormURL(
-   'testytest', array( 'gateway' => 
$class::getIdentifier() )
-   );
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway );
-
-   $this->resetAllEnv();
-   $gateway = $this->getFreshGatewayObject( $options = array() );
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway, 
"Having trouble constructing a blank adapter." );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers DonationData::__construct
-*/
-   public function testConstructorHasDonationData() {
-
-   $_SERVER['REQUEST_URI'] = 
'/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmount';
-
-   $options = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( 'TestingGlobalCollectAdapter', 
$gateway );
-
-   // please define this function only inside the 
TESTS_ADAPTER_DEFAULT,
-   // which should be a test adapter object that descende from one 
of the
-   // production adapters.
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertInstanceOf( 'DonationData', $exposed->dataObj );
-   }
-
-   public function testLanguageChange() {
-   $options = $this->getDonorTestData( 'US' );
-   $options['payment_method'] = 'cc';
-   $options['payment_submethod'] = 'visa';
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'en', "'US' donor's language was inproperly set. Should be 'en'" );
-   $gateway->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
-   // so we know it tried to screw with the session and such.
-
-   $options = $this->getDonorTestData( 'NO' );
-   $gateway = $this->getFreshGatewayObject( $options );
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'no', "'NO' donor's language was inproperly set. Should be 'no'" );
-   }
-
-   /**
-* Make sure data is cleared out when changing gateways.
-* In particular, ensure order IDs aren't leaking.
-*/
-   public function testResetOnGatewaySwitch() {
-   // Fill the session with some GlobalCollect stuff
-   $init = $this->getDonorTestData( 'FR' );
-   $init['contribution_tracking_id'] = mt_rand();
-   $firstRequest = $this->setUpRequest( $init );
-   

[MediaWiki-commits] [Gerrit] Merge master into deployment - change (mediawiki...DonationInterface)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Merge master into deployment
..

Merge master into deployment

d9c5d03 Update payment methods and submethods for AstroPay LATAM rollout
34bcc66 Hide submethod buttons when only one choice
8b2a9e8 Add more LATAM card logos
0dceb82 Add and update AstroPay logos
4056242 Allow multiple name filter rules

Removed tests

Change-Id: I23e426eed0ddb96d883b339e32b89ebdf2fca278
---
D tests/Adapter/GatewayAdapterTest.php
1 file changed, 0 insertions(+), 313 deletions(-)


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

diff --git a/tests/Adapter/GatewayAdapterTest.php 
b/tests/Adapter/GatewayAdapterTest.php
deleted file mode 100644
index e188b2e..000
--- a/tests/Adapter/GatewayAdapterTest.php
+++ /dev/null
@@ -1,313 +0,0 @@
-<<< HEAD   (621d31 Merge master into deployment)
-===
-setMwGlobals( array(
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'testytest' => array(
-   'gateway' => 'globalcollect', // RAR.
-   ),
-   'rapidFailError' => array(
-   'file' => 'error-cc.html',
-   'gateway' => array( 'globalcollect', 
'adyen', 'amazon', 'astropay', 'paypal', 'worldpay' ),
-   'special_type' => 'error',
-   )
-   ),
-   ) );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers GatewayAdapter::defineVarMap
-* @covers GatewayAdapter::defineReturnValueMap
-* @covers GatewayAdapter::defineTransactions
-*/
-   public function testConstructor() {
-
-   $options = $this->getDonorTestData();
-   $class = $this->testAdapterClass;
-
-   $_SERVER['REQUEST_URI'] = 
GatewayFormChooser::buildPaymentsFormURL(
-   'testytest', array( 'gateway' => 
$class::getIdentifier() )
-   );
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway );
-
-   $this->resetAllEnv();
-   $gateway = $this->getFreshGatewayObject( $options = array() );
-   $this->assertInstanceOf( TESTS_ADAPTER_DEFAULT, $gateway, 
"Having trouble constructing a blank adapter." );
-   }
-
-   /**
-*
-* @covers GatewayAdapter::__construct
-* @covers DonationData::__construct
-*/
-   public function testConstructorHasDonationData() {
-
-   $_SERVER['REQUEST_URI'] = 
'/index.php/Special:GlobalCollectGateway?form_name=TwoStepAmount';
-
-   $options = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $this->assertInstanceOf( 'TestingGlobalCollectAdapter', 
$gateway );
-
-   // please define this function only inside the 
TESTS_ADAPTER_DEFAULT,
-   // which should be a test adapter object that descende from one 
of the
-   // production adapters.
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertInstanceOf( 'DonationData', $exposed->dataObj );
-   }
-
-   public function testLanguageChange() {
-   $options = $this->getDonorTestData( 'US' );
-   $options['payment_method'] = 'cc';
-   $options['payment_submethod'] = 'visa';
-   $gateway = $this->getFreshGatewayObject( $options );
-
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'en', "'US' donor's language was inproperly set. Should be 'en'" );
-   $gateway->do_transaction( 'INSERT_ORDERWITHPAYMENT' );
-   // so we know it tried to screw with the session and such.
-
-   $options = $this->getDonorTestData( 'NO' );
-   $gateway = $this->getFreshGatewayObject( $options );
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $this->assertEquals( $exposed->getData_Staged( 'language' ), 
'no', "'NO' donor's language was inproperly set. Should be 'no'" );
-   }
-
-   /**
-* Make sure data is cleared out when changing gateways.
-* In particular, ensure order IDs aren't leaking.
-*/
-   public function testResetOnGatewaySwitch() {
-   // Fill the session with some GlobalCollect stuff
-   $init = $this->getDonorTestData( 'FR' );
-   $init['contribution_tracking_id'] = mt_rand();
-  

[MediaWiki-commits] [Gerrit] Reset scoped session for global rename jobs after deferred u... - change (mediawiki...CentralAuth)

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

Change subject: Reset scoped session for global rename jobs after deferred 
updates
..


Reset scoped session for global rename jobs after deferred updates

Same as 1ac63f17676e0e6 in MediaWiki core

Bug: T126450
Change-Id: I47fac57fd17235979030e6d2b6cded7c1a078d08
---
M includes/LocalRenameJob/LocalRenameJob.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index b915c54..a1d1f85 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -19,6 +19,9 @@
$this->params['session']['userId'] = 0;
$this->params['session']['sessionId'] = '';
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
try {
$this->doRun();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47fac57fd17235979030e6d2b6cded7c1a078d08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Do not impact API with lazy loading changes - change (mediawiki...MobileFrontend)

2016-03-07 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Do not impact API with lazy loading changes
..

Do not impact API with lazy loading changes

API usage should not be impacted by our changes, so ensure
the config only impacts the mobile view. We can add API parameters
later if deemed useful.

Bug: T129167
Change-Id: I999650e0b301ab27ec4d54d9f2ce75c052a4995e
---
M includes/MobileFormatter.php
M includes/MobileFrontend.body.php
2 files changed, 22 insertions(+), 19 deletions(-)


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

diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index c9ff2dd..c7c5b3a 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -102,9 +102,13 @@
/**
 * Removes content inappropriate for mobile devices
 * @param bool $removeDefaults Whether default settings at 
$wgMFRemovableClasses should be used
+* @param bool $removeReferences Whether to remove references from the 
output
+* @param bool $removeImages Whether to move images into noscript tags
 * @return array
 */
-   public function filterContent( $removeDefaults = true ) {
+   public function filterContent( $removeDefaults = true,
+   $removeReferences = false, $removeImages = false
+   ) {
$ctx = MobileContext::singleton();
$config = $ctx->getMFConfig();
$isBeta = $ctx->isBetaGroupMember();
@@ -117,26 +121,14 @@
}
}
 
-   $mfReferences = $config->get( 'MFLazyLoadReferences' );
-   if ( $mfReferences ) {
-   if ( $mfReferences['base'] ||
-   ( $isBeta && $mfReferences['beta'] )
-   ) {
-   $this->doRewriteReferencesForLazyLoading();
-   }
+   if ( $removeReferences ) {
+   $this->doRewriteReferencesForLazyLoading();
}
 
if ( $this->removeMedia ) {
$this->doRemoveImages();
-   } else {
-   $mfLazyLoadImages = $config->get( 'MFLazyLoadImages' );
-
-   if (
-   $mfLazyLoadImages['base'] ||
-   ( $isBeta && $mfLazyLoadImages['beta'] )
-   ) {
-   $this->doRewriteImagesForLazyLoading();
-   }
+   } elseif ( $removeImages ){
+   $this->doRewriteImagesForLazyLoading();
}
 
return parent::filterContent();
diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 6cf0bfb..493c56b 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -35,6 +35,7 @@
$html = $text ? $text : $out->getHTML();
 
$context = MobileContext::singleton();
+   $config = $context->getMFConfig();
 
$formatter = MobileFormatter::newFromContext( $context, $html );
 
@@ -42,6 +43,7 @@
 
$title = $out->getTitle();
$isSpecialPage = $title->isSpecialPage();
+
$formatter->enableExpandableSections(
// Don't collapse sections e.g. on JS pages
$out->canUseWikiPage()
@@ -49,14 +51,23 @@
// And not in certain namespaces
&& array_search(
$title->getNamespace(),
-   $context->getMFConfig()->get( 
'MFNamespacesWithoutCollapsibleSections' )
+   $config->get( 
'MFNamespacesWithoutCollapsibleSections' )
) === false
// And not when what's shown is not actually article 
text
&& $context->getRequest()->getText( 'action', 'view' ) 
== 'view'
);
+
+   $mfReferences = $config->get( 'MFLazyLoadReferences' );
+   $mfLazyLoadImages = $config->get( 'MFLazyLoadImages' );
+
+   $removeImages = $mfLazyLoadImages['base'] ||
+   ( $isBeta && $mfLazyLoadImages['beta'] );
+   $removeReferences = $mfReferences['base'] || ( $isBeta && 
$mfReferences['beta'] );
+
if ( $context->getContentTransformations() ) {
// Remove images if they're disabled from special 
pages, but don't transform otherwise
-   $formatter->filterContent( /* remove defaults */ 
!$isSpecialPage );
+   $formatter->filterContent( /* remove defaults */ 
!$isSpecialPage,
+   

[MediaWiki-commits] [Gerrit] mobileview api should support revisions - change (mediawiki...MobileFrontend)

2016-03-07 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: mobileview api should support revisions
..

mobileview api should support revisions

Change-Id: Ia00d135c9e2850372695cb6ff1a15da2381c6872
---
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiMobileView.php
3 files changed, 29 insertions(+), 12 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 6551df8..5714fe2 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -387,6 +387,7 @@
"apihelp-mobileview-param-thumbsize": "Maximum thumbnail dimensions.",
"apihelp-mobileview-param-thumbwidth": "Maximum thumbnail width.",
"apihelp-mobileview-param-thumbheight": "Maximum thumbnail height.",
+   "apihelp-mobileview-param-revision": "Request a specific revision.",
"apihelp-mobileview-example-1": "Get information about section 0 of 
[[Doom metal]]",
"apihelp-mobileview-example-2": "Get information about section 0 and 
sections containing references of [[Candlemass]]",
"apihelp-mobileview-example-3": "Get information about sections 1 and 
later and sections containing references of [[Candlemass]]",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e36ca57..9543c33 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -385,6 +385,7 @@
"apihelp-mobileview-param-thumbsize": 
"{{doc-apihelp-param|mobileview|thumbsize}}",
"apihelp-mobileview-param-thumbwidth": 
"{{doc-apihelp-param|mobileview|thumbwidth}}",
"apihelp-mobileview-param-thumbheight": 
"{{doc-apihelp-param|mobileview|thumbheight}}",
+   "apihelp-mobileview-param-revision": 
"{{doc-apihelp-param|mobileview|revision}}",
"apihelp-mobileview-example-1": "{{doc-apihelp-example|mobileview}}",
"apihelp-mobileview-example-2": "{{doc-apihelp-example|mobileview}}",
"apihelp-mobileview-example-3": "{{doc-apihelp-example|mobileview}}",
diff --git a/includes/api/ApiMobileView.php b/includes/api/ApiMobileView.php
index 98eb124..e87570b 100644
--- a/includes/api/ApiMobileView.php
+++ b/includes/api/ApiMobileView.php
@@ -96,8 +96,7 @@
'ns' => $namespace,
) );
}
-
-   $data = $this->getData( $title, $params['noimages'] );
+   $data = $this->getData( $title, $params['noimages'], 
$params['revision'] );
$plainData = array( 'lastmodified', 'lastmodifiedby', 
'revision',
'languagecount', 'hasvariants', 'displaytitle', 'id', 
'contentmodel' );
foreach ( $plainData as $name ) {
@@ -411,18 +410,17 @@
 * Performs a page parse
 * @param WikiPage $wp
 * @param ParserOptions $parserOptions
+* @param null|int [$oldid] Revision ID to get the text from, passing 
null or 0 will
+*   get the current revision (default value)
 * @return ParserOutput
 */
-   protected function getParserOutput( WikiPage $wp, ParserOptions 
$parserOptions ) {
+   protected function getParserOutput( WikiPage $wp, ParserOptions 
$parserOptions, $oldid = null ) {
$time = microtime( true );
-   $parserOutput = $wp->getParserOutput( $parserOptions );
+   $parserOutput = $wp->getParserOutput( $parserOptions, $oldid );
$time = microtime( true ) - $time;
-   if ( !$parserOutput ) {
-   wfDebugLog( 'mobile', "Empty parser output on 
'{$wp->getTitle()->getPrefixedText()}'" .
-   ": rev {$wp->getId()}, time $time" );
-   throw new Exception( __METHOD__ . ": PoolCounter didn't 
return parser output" );
+   if ( $parserOutput ) {
+   $parserOutput->setTOCEnabled( false );
}
-   $parserOutput->setTOCEnabled( false );
 
return $parserOutput;
}
@@ -449,9 +447,11 @@
 * Get data of requested article.
 * @param Title $title
 * @param boolean $noImages
+* @param null|int [$oldid] Revision ID to get the text from, passing 
null or 0 will
+*   get the current revision (default value)
 * @return array
 */
-   private function getData( Title $title, $noImages ) {
+   private function getData( Title $title, $noImages, $oldid = null ) {
$mfConfig = MobileContext::singleton()->getMFConfig();
$useTidy = $this->getConfig()->get( 'UseTidy' );
$mfTidyMobileViewSections = $mfConfig->get( 
'MFTidyMobileViewSections' );
@@ -485,6 +485,8 @@
$latest = $wp->getLatest();
// Use page_touched so template updates invalidate cache
$touched = $wp->getTouched();
+
+   $revId = $oldid 

[MediaWiki-commits] [Gerrit] Lazy load references via mobileview API - change (mediawiki...MobileFrontend)

2016-03-07 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Lazy load references via mobileview API
..

Lazy load references via mobileview API

While we discuss the internals of a generic references API we
should make use of the mobileview API we already have to source
references.

A useMobileView API config setting will redirect queries via the
mobileview API.

Bug: T129182
Change-Id: Iec812faf12182f80f5a2193c2bc4b9b95ea86bbe
---
M extension.json
M resources/mobile.references/references.js
M resources/skins.minerva.scripts/preInit.js
M tests/qunit/mobile.references/test_references.js
4 files changed, 84 insertions(+), 13 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7d611ae..de0eb1a 100644
--- a/extension.json
+++ b/extension.json
@@ -2000,7 +2000,8 @@
},
"MFLazyLoadReferences": {
"base": false,
-   "beta": false
+   "beta": false,
+   "useMobileViewApi": true
},
"MFNoMobileCategory": false,
"MFNoMobilePages": [],
diff --git a/resources/mobile.references/references.js 
b/resources/mobile.references/references.js
index 3cdb910..fa0d48f 100644
--- a/resources/mobile.references/references.js
+++ b/resources/mobile.references/references.js
@@ -19,6 +19,7 @@
d.resolve( referencesData );
} else {
api = new mw.Api();
+   // FIXME: This code block should be revisited in April 
2016 (see T125329)
api.get( {
action: 'query',
prop: 'references',
@@ -40,13 +41,62 @@
 * Return the matched reference among the children of ol.references
 * @method
 * @ignore
+* @param {Page} page to retrieve reference for
+* @param {String} id CSS selector
+* @returns {jQuery.Deferred} resolves with an Object representing 
reference
+*/
+   function getReferenceFromHTML( page, id ) {
+   // Use find rather than string concatenation
+   var d = $.Deferred(),
+   api = new mw.Api(),
+   $refs = page.$( 'ol.references' ),
+   $el = $refs.find( id );
+
+   if ( $refs.length ) {
+   if ( $el.length ) {
+   d.resolve( {
+   text: $el.html()
+   } );
+   } else {
+   d.reject();
+   }
+   } else {
+   api.get( {
+   action: 'mobileview',
+   page: page.getTitle(),
+   sections: 'references',
+   prop: 'text',
+   revision: page.getRevisionId()
+   } ).done( function ( data ) {
+   var sections = data.mobileview.sections;
+   if ( sections ) {
+   // store on current page so we can 
access it in future.
+   $refs = $( '' ).html( 
sections[0].text ).appendTo( page.$el );
+   $el = $refs.find( id );
+   if ( $el.length ) {
+   d.resolve( {
+   text: $el.html()
+   } );
+   return;
+   }
+   }
+   d.reject();
+   } ).fail( $.proxy( d, 'reject' ) );
+   }
+   return d;
+   }
+
+   /**
+* Return the matched reference via API or DOM query
+* @method
+* @ignore
 * @param {String} id CSS selector
 * @param {Page} page to retrieve reference for
 * @returns {jQuery.Deferred} resolves with an Object representing 
reference
 */
function getReference( id, page ) {
-   var $el,
-   config = mw.config.get( 'wgMFLazyLoadReferences' ),
+   var config = mw.config.get( 'wgMFLazyLoadReferences' ),
+   useMobileViewApi = config.useMobileViewApi,
EditorGateway = M.require( 
'mobile.editor.api/EditorGateway' ),
editorGateway = new EditorGateway( {
api: new 

[MediaWiki-commits] [Gerrit] Allow multiple name filter rules - change (mediawiki...DonationInterface)

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

Change subject: Allow multiple name filter rules
..


Allow multiple name filter rules

Extend existing logic to multiple sets of keymap, ratio, and score.

Bug: T128928
Change-Id: I438d2ca244df940c90efb778e9f5a0c4c44a207f
---
M DonationInterface.php
M gateway_common/gateway.adapter.php
M tests/Adapter/GatewayAdapterTest.php
3 files changed, 49 insertions(+), 47 deletions(-)

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



diff --git a/DonationInterface.php b/DonationInterface.php
index 69e1ffa..670d17e 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -758,14 +758,12 @@
 $wgDonationInterfaceUtmSourceMap = array();
 
 /**
- * $wgDonationInterfaceKeyMapA
- * $wgDonationInterfaceKeyMapB
- * $wgDonationInterfaceNameGibberishWeight
- * $wgDonationInterfaceNameScore
+ * $wgDonationInterfaceNameFilterRules
  *
+ * For each entry in the rule array,
  * Set KeyMapA and KeyMapB to mutually exclusive arrays of characters.
- * Set NameGibberishWeight to reflect the ratio of characters from one group 
that will cause a fail.
- * Set NameScore to the number of points to assign on fail.
+ * Set GibberishWeight to reflect the ratio of characters from one group that 
will cause a fail.
+ * Set Score to the number of points to assign on fail.
  *
  * To enable this filter add this to your LocalSettings.php:
  *
@@ -776,20 +774,18 @@
  * 'getScoreName' => 100,
  * );
  *
- * $wgDonationInterfaceKeyMapA = array('a','s','d');
- *
- * $wgDonationInterfaceKeyMapB = array('h','j','k','l');
- *
- * $wgDonationInterfaceNameGibberishWeight = .9;
- *
- * $wgDonationInterfaceNameScore = 10;
+ * $wgDonationInterfaceNameFilterRules = array(
+ * array(
+ * 'KeyMapA' => array('a','s','d'),
+ * 'KeyMapB' => array('h','j','k','l'),
+ * 'GibberishWeight' => .9,
+ * 'Score' => 10,
+ * ),
+ * );
  *
  */
 
-$wgDonationInterfaceKeyMapA = array();
-$wgDonationInterfaceKeyMapB = array();
-$wgDonationInterfaceNameGibberishWeight = 0;
-$wgDonationInterfaceNameScore = 0;
+$wgDonationInterfaceNameFilterRules = array();
 
 $wgDonationInterfaceEnableQueue = false;
 $wgDonationInterfaceEnableConversionLog = false; //this is definitely an Extra
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 1d57910..ddb56a0 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2849,59 +2849,60 @@
return false;
}
 
- /**
+   /**
 * This custom filter function checks the global variable:
-*
-* KeyMapA
-* KeyMapB
+* wgDonationInterfaceNameFilterRules
+* Each entry in that array has keys
+*   KeyMapA, KeyMapB: define keyboard zones
+*   GibberishWeight: threshold fraction of name letters in a single 
zone
+*   Score: added to the total fraud score when this threshold is 
exceeded
 *
 * How the score is tabulated:
 *  - If the configurable portion letters in a name come from the same 
zone points are added.
 *  - Returns an integer: 0 <= $score <= 100
 *
 * @see $wgDonationInterfaceCustomFiltersFunctions
-* @see $wgDonationInterfaceKeyMapA* @see $wgDonationInterfaceKeyMapB
+* @see $wgDonationInterfaceNameFilterRules
 *
 * @return integer
 */
-public function getScoreName(){
+   public function getScoreName(){
+   $fName = $this->getData_Unstaged_Escaped( 'fname' );
+   $lName = $this->getData_Unstaged_Escaped( 'lname' );
 
-   $fName = $this->getData_Unstaged_Escaped( 'fname' );
-   $lName = $this->getData_Unstaged_Escaped( 'lname' );
+   $nameArray = str_split( strtolower( $fName . $lName ) );
+   $rules = $this->getGlobal( 'NameFilterRules' );
+   $score = 0;
 
-   $nameArray = str_split( strtolower( $fName . $lName ) );
+   foreach( $rules as $rule ) {
+   $keyMapA = $rule['KeyMapA'];
+   $keyMapB = $rule['KeyMapB'];
 
-   $keyMapA = $this->getGlobal( 'KeyMapA' );
+   $gibberishWeight = $rule['GibberishWeight'];
 
-   $keyMapB = $this->getGlobal( 'KeyMapB' );
-
-   $gibberishWeight = $this->getGlobal( 
'NameGibberishWeight' );
-
-   $failScore = $this->getGlobal( 'NameScore' );
+   $failScore = $rule['Score'];
 
$points = 0;
 
-   $score = 0;
-
-   if ( is_array( $nameArray ) && !empty( $nameArray ) ){
-   foreach($nameArray as $letter){
+   if ( is_array( $nameArray ) && !empty( 

[MediaWiki-commits] [Gerrit] EchoTargetPage: Don't call Title::newFromId() repeatedly - change (mediawiki...Echo)

2016-03-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: EchoTargetPage: Don't call Title::newFromId() repeatedly
..

EchoTargetPage: Don't call Title::newFromId() repeatedly

Title::newFromId() can return null, and if this were the case the
instance caching would never work, so it would continually make useless
database queries.

Initialize the $title member variable as false to begin with, and use
that to check whether we've already checked Title::newFromId().

Change-Id: Id07c2c963ffcd03e212bed0a666735bcb68b92e0
---
M includes/model/TargetPage.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/model/TargetPage.php b/includes/model/TargetPage.php
index d62437a..c678947 100644
--- a/includes/model/TargetPage.php
+++ b/includes/model/TargetPage.php
@@ -13,9 +13,9 @@
protected $user;
 
/**
-* @var Title|null
+* @var Title|null|bool false if not initialized yet
 */
-   protected $title;
+   protected $title = false;
 
/**
 * @var int
@@ -107,7 +107,7 @@
 * @return Title|null
 */
public function getTitle() {
-   if ( !$this->title ) {
+   if ( $this->title === false ) {
$this->title = Title::newFromId( $this->pageId );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] i18n: Relabel the SET preference and dialog to 'mode' - change (mediawiki...VisualEditor)

2016-03-07 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: i18n: Relabel the SET preference and dialog to 'mode'
..

i18n: Relabel the SET preference and dialog to 'mode'

Change-Id: Id876f4ba102800237cbc4a671d4db9a26f7f116d
---
M modules/ve-mw/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index 73f218f..904a851 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -279,7 +279,7 @@
"visualeditor-preference-core-info-link": 
"\/\/mediawiki.org\/wiki\/Special:MyLanguage\/VisualEditor\/Beta_Features\/General",
"visualeditor-preference-core-label": "Visual editing",
"visualeditor-preference-enable": "Enable the visual editor. It will be 
available in the following {{PLURAL:$2|namespace|namespaces}}: $1",
-   "visualeditor-preference-tabs": "Editing tabs",
+   "visualeditor-preference-tabs": "Editing mode",
"visualeditor-preference-tabs-multi-tab": "Show me both editor tabs",
"visualeditor-preference-tabs-prefer-ve": "Always give me the visual 
editor if possible",
"visualeditor-preference-tabs-prefer-wt": "Always give me the wikitext 
editor",

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

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

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


[MediaWiki-commits] [Gerrit] [FIX] intersect_generators must use daemon threads - change (pywikibot/core)

2016-03-07 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review.

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

Change subject: [FIX] intersect_generators must use daemon threads
..

[FIX] intersect_generators must use daemon threads

Set threads in intersect_generators() as daemon threads, so that they
are killed automatically on program exit.

With the quit mechanism implemented via QuitKeyboardInterrupt,
KeyboardInterrupt is not catched any longer in intersect_generators()
and scripts based on Bot class hang when using pagegenrators with
parameter -intersect.

Change-Id: I61b2770afce4fd0c86ca0f0a7996432375e8b18a
---
M pywikibot/tools/__init__.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/18/275718/1

diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index 94a6dcd..c2c5bba 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -695,6 +695,7 @@
 
 for source in genlist:
 threaded_gen = ThreadedGenerator(name=repr(source), target=source)
+threaded_gen.daemon = True
 thrlist.append(threaded_gen)
 
 while True:

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

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

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


[MediaWiki-commits] [Gerrit] Reset scoped session for global rename jobs after deferred u... - change (mediawiki...CentralAuth)

2016-03-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Reset scoped session for global rename jobs after deferred 
updates
..

Reset scoped session for global rename jobs after deferred updates

Same as 1ac63f17676e0e6 in MediaWiki core

Bug: T126450
Change-Id: I47fac57fd17235979030e6d2b6cded7c1a078d08
---
M includes/LocalRenameJob/LocalRenameJob.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index b915c54..a1d1f85 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -19,6 +19,9 @@
$this->params['session']['userId'] = 0;
$this->params['session']['sessionId'] = '';
$callback = RequestContext::importScopedSession( 
$this->params['session'] );
+   $this->addTeardownCallback( function() use ( &$callback 
) {
+   ScopedCallback::consume( $callback );
+   } );
}
try {
$this->doRun();

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

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

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


[MediaWiki-commits] [Gerrit] Re-add featured script to the auto run list - change (pywikibot/core)

2016-03-07 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Re-add featured script to the auto run list
..

Re-add featured script to the auto run list

It was removed in 38ac044 when featured was moved into scripts/archive.

Also tidy other parts of that commit, including adding a deprecation
warning to the featured.py script.

Bug: T128955
Change-Id: I1e373b9229b479227e3df30b51cb20915d1f0c47
---
M scripts/archive/README
M scripts/archive/featured.py
M tests/script_tests.py
M tox.ini
4 files changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/17/275717/1

diff --git a/scripts/archive/README b/scripts/archive/README
index 92d5958..1e70cad 100644
--- a/scripts/archive/README
+++ b/scripts/archive/README
@@ -1 +1,6 @@
-This folder consists scripts that will not maintened but we keep them for 
historical reasons.
+This folder consists scripts that will not be improved, but are kept for
+backwards compatibility with a deprecation notice.
+
+featured.py is no longer compatible with Wikimedia sites, and no other wiki
+online could be found that is compatible with this script.
+See https://phabricator.wikimedia.org/T128955 for more information.
diff --git a/scripts/archive/featured.py b/scripts/archive/featured.py
index a29b05f..92d21de 100755
--- a/scripts/archive/featured.py
+++ b/scripts/archive/featured.py
@@ -75,6 +75,7 @@
 from pywikibot import i18n, textlib, config
 
 from pywikibot.pagegenerators import PreloadingGenerator
+from pywikibot.tools import issue_deprecation_warning
 from pywikibot.tools.formatter import color_format
 
 if sys.version_info[0] > 2:
@@ -619,6 +620,9 @@
 @param args: command line arguments
 @type args: list of unicode
 """
+issue_deprecation_warning(
+'featured.py script', 'Wikibase Client extension',
+0, UserWarning)
 options = {}
 for arg in pywikibot.handle_args(args):
 if arg.startswith('-fromlang:'):
diff --git a/tests/script_tests.py b/tests/script_tests.py
index c0bb625..4fdd9ec 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -122,6 +122,7 @@
 'checkimages',
 'clean_sandbox',
 'disambredir',
+'featured',
 'imagerecat',
 'login',
 'lonelypages',
diff --git a/tox.ini b/tox.ini
index b01f51a..b3f567d 100644
--- a/tox.ini
+++ b/tox.ini
@@ -128,7 +128,7 @@
 tests/pwb/ : +T001, T003
 scripts/casechecker.py,scripts/imagetransfer.py : +T001, T003
 scripts/maintenance/make_i18n_dict.py : +T001, T003
-scripts/archive/ : +D102, D103
+scripts/archive/featured.py : +D102, D103
 scripts/script_wui.py : +D102
 scripts/makecat.py : +D103
 scripts/interwiki.py,/""/ : +P102

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e373b9229b479227e3df30b51cb20915d1f0c47
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 

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


[MediaWiki-commits] [Gerrit] Allow multiple name filter rules - change (mediawiki...DonationInterface)

2016-03-07 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Allow multiple name filter rules
..

Allow multiple name filter rules

Extend existing logic to multiple sets of keymap, ratio, and score.

Bug: T128928
Change-Id: I438d2ca244df940c90efb778e9f5a0c4c44a207f
---
M DonationInterface.php
M gateway_common/gateway.adapter.php
M tests/Adapter/GatewayAdapterTest.php
3 files changed, 49 insertions(+), 47 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/16/275716/1

diff --git a/DonationInterface.php b/DonationInterface.php
index 69e1ffa..670d17e 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -758,14 +758,12 @@
 $wgDonationInterfaceUtmSourceMap = array();
 
 /**
- * $wgDonationInterfaceKeyMapA
- * $wgDonationInterfaceKeyMapB
- * $wgDonationInterfaceNameGibberishWeight
- * $wgDonationInterfaceNameScore
+ * $wgDonationInterfaceNameFilterRules
  *
+ * For each entry in the rule array,
  * Set KeyMapA and KeyMapB to mutually exclusive arrays of characters.
- * Set NameGibberishWeight to reflect the ratio of characters from one group 
that will cause a fail.
- * Set NameScore to the number of points to assign on fail.
+ * Set GibberishWeight to reflect the ratio of characters from one group that 
will cause a fail.
+ * Set Score to the number of points to assign on fail.
  *
  * To enable this filter add this to your LocalSettings.php:
  *
@@ -776,20 +774,18 @@
  * 'getScoreName' => 100,
  * );
  *
- * $wgDonationInterfaceKeyMapA = array('a','s','d');
- *
- * $wgDonationInterfaceKeyMapB = array('h','j','k','l');
- *
- * $wgDonationInterfaceNameGibberishWeight = .9;
- *
- * $wgDonationInterfaceNameScore = 10;
+ * $wgDonationInterfaceNameFilterRules = array(
+ * array(
+ * 'KeyMapA' => array('a','s','d'),
+ * 'KeyMapB' => array('h','j','k','l'),
+ * 'GibberishWeight' => .9,
+ * 'Score' => 10,
+ * ),
+ * );
  *
  */
 
-$wgDonationInterfaceKeyMapA = array();
-$wgDonationInterfaceKeyMapB = array();
-$wgDonationInterfaceNameGibberishWeight = 0;
-$wgDonationInterfaceNameScore = 0;
+$wgDonationInterfaceNameFilterRules = array();
 
 $wgDonationInterfaceEnableQueue = false;
 $wgDonationInterfaceEnableConversionLog = false; //this is definitely an Extra
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 1d57910..ddb56a0 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -2849,59 +2849,60 @@
return false;
}
 
- /**
+   /**
 * This custom filter function checks the global variable:
-*
-* KeyMapA
-* KeyMapB
+* wgDonationInterfaceNameFilterRules
+* Each entry in that array has keys
+*   KeyMapA, KeyMapB: define keyboard zones
+*   GibberishWeight: threshold fraction of name letters in a single 
zone
+*   Score: added to the total fraud score when this threshold is 
exceeded
 *
 * How the score is tabulated:
 *  - If the configurable portion letters in a name come from the same 
zone points are added.
 *  - Returns an integer: 0 <= $score <= 100
 *
 * @see $wgDonationInterfaceCustomFiltersFunctions
-* @see $wgDonationInterfaceKeyMapA* @see $wgDonationInterfaceKeyMapB
+* @see $wgDonationInterfaceNameFilterRules
 *
 * @return integer
 */
-public function getScoreName(){
+   public function getScoreName(){
+   $fName = $this->getData_Unstaged_Escaped( 'fname' );
+   $lName = $this->getData_Unstaged_Escaped( 'lname' );
 
-   $fName = $this->getData_Unstaged_Escaped( 'fname' );
-   $lName = $this->getData_Unstaged_Escaped( 'lname' );
+   $nameArray = str_split( strtolower( $fName . $lName ) );
+   $rules = $this->getGlobal( 'NameFilterRules' );
+   $score = 0;
 
-   $nameArray = str_split( strtolower( $fName . $lName ) );
+   foreach( $rules as $rule ) {
+   $keyMapA = $rule['KeyMapA'];
+   $keyMapB = $rule['KeyMapB'];
 
-   $keyMapA = $this->getGlobal( 'KeyMapA' );
+   $gibberishWeight = $rule['GibberishWeight'];
 
-   $keyMapB = $this->getGlobal( 'KeyMapB' );
-
-   $gibberishWeight = $this->getGlobal( 
'NameGibberishWeight' );
-
-   $failScore = $this->getGlobal( 'NameScore' );
+   $failScore = $rule['Score'];
 
$points = 0;
 
-   $score = 0;
-
-   if ( is_array( $nameArray ) && !empty( $nameArray ) ){
-   foreach($nameArray as $letter){
+  

[MediaWiki-commits] [Gerrit] Include a designate policy file for Horizon. - change (operations/puppet)

2016-03-07 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Include a designate policy file for Horizon.
..


Include a designate policy file for Horizon.

This is in anticipation of actually having a designate dashboard.

Change-Id: Id8a97d43b138be50d685cb1aa51136d9c4f1ac9c
---
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/templates/liberty/horizon/local_settings.py.erb
2 files changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/modules/openstack/manifests/horizon/service.pp 
b/modules/openstack/manifests/horizon/service.pp
index be215da..3e72db9 100644
--- a/modules/openstack/manifests/horizon/service.pp
+++ b/modules/openstack/manifests/horizon/service.pp
@@ -79,6 +79,14 @@
 require => Package['openstack-dashboard'],
 mode=> '0440',
 }
+file { '/etc/openstack-dashboard/designate_policy.json':
+source  => 
"puppet:///modules/openstack/${openstack_version}/designate/policy.json",
+owner   => 'horizon',
+group   => 'horizon',
+notify  => Service['apache2'],
+require => Package['openstack-dashboard'],
+mode=> '0440',
+}
 
 file { 
'/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/logo.png':
 source  => 
'puppet:///modules/openstack/horizon/216px-Wikimedia_labs_dashboard_logo.png',
diff --git a/modules/openstack/templates/liberty/horizon/local_settings.py.erb 
b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
index c5b0f5f..3727675 100644
--- a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
+++ b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
@@ -283,6 +283,7 @@
 'compute': 'nova_policy.json',
 #'volume': 'cinder_policy.json',
 'image': 'glance_policy.json',
+'dns': 'designate_policy.json',
 }
 
 # Trove user and database extension support. By default support for

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

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

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to wmf/1.27.0-wmf.15 HEAD (581178b) - change (mediawiki/core)

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

Change subject: Update VE core submodule to wmf/1.27.0-wmf.15 HEAD (581178b)
..


Update VE core submodule to wmf/1.27.0-wmf.15 HEAD (581178b)

New changes:
581178b Follow-up I65d96627: Remember the user's preference in WikiEditor too

Change-Id: I3eb3df85f597084a47b0bc11af17843fdd9fe134
---
M extensions/VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/VisualEditor b/extensions/VisualEditor
index 82cc562..581178b 16
--- a/extensions/VisualEditor
+++ b/extensions/VisualEditor
-Subproject commit 82cc562ba5cf9162e5037aae2a78ac64d042e91d
+Subproject commit 581178b8e52dfd9644147d666501ffa6c49c3a17

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3eb3df85f597084a47b0bc11af17843fdd9fe134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.27.0-wmf.15
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Include a designate policy file for Horizon. - change (operations/puppet)

2016-03-07 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Include a designate policy file for Horizon.
..

Include a designate policy file for Horizon.

This is in anticipation of actually having a designate dashboard.

Change-Id: Id8a97d43b138be50d685cb1aa51136d9c4f1ac9c
---
M modules/openstack/manifests/horizon/service.pp
M modules/openstack/templates/liberty/horizon/local_settings.py.erb
2 files changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/275715/1

diff --git a/modules/openstack/manifests/horizon/service.pp 
b/modules/openstack/manifests/horizon/service.pp
index be215da..3e72db9 100644
--- a/modules/openstack/manifests/horizon/service.pp
+++ b/modules/openstack/manifests/horizon/service.pp
@@ -79,6 +79,14 @@
 require => Package['openstack-dashboard'],
 mode=> '0440',
 }
+file { '/etc/openstack-dashboard/designate_policy.json':
+source  => 
"puppet:///modules/openstack/${openstack_version}/designate/policy.json",
+owner   => 'horizon',
+group   => 'horizon',
+notify  => Service['apache2'],
+require => Package['openstack-dashboard'],
+mode=> '0440',
+}
 
 file { 
'/usr/share/openstack-dashboard/openstack_dashboard/static/dashboard/img/logo.png':
 source  => 
'puppet:///modules/openstack/horizon/216px-Wikimedia_labs_dashboard_logo.png',
diff --git a/modules/openstack/templates/liberty/horizon/local_settings.py.erb 
b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
index c5b0f5f..3727675 100644
--- a/modules/openstack/templates/liberty/horizon/local_settings.py.erb
+++ b/modules/openstack/templates/liberty/horizon/local_settings.py.erb
@@ -283,6 +283,7 @@
 'compute': 'nova_policy.json',
 #'volume': 'cinder_policy.json',
 'image': 'glance_policy.json',
+'dns': 'designate_policy.json',
 }
 
 # Trove user and database extension support. By default support for

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

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

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


[MediaWiki-commits] [Gerrit] uwsgi: Don't attempt to stop service on non-jessie systems - change (operations/puppet)

2016-03-07 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: uwsgi: Don't attempt to stop service on non-jessie systems
..


uwsgi: Don't attempt to stop service on non-jessie systems

Weird systemd / update-rc.d interactions. Causes puppet
failure on Ubuntu systems

Change-Id: I1b7bbfb0891b0a0bc91983434263d429a78356b9
---
M modules/uwsgi/manifests/init.pp
1 file changed, 14 insertions(+), 5 deletions(-)

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



diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp
index 8b3b45e..5739d45 100644
--- a/modules/uwsgi/manifests/init.pp
+++ b/modules/uwsgi/manifests/init.pp
@@ -17,14 +17,23 @@
 package { [ 'uwsgi', 'uwsgi-dbg' ]: }
 package { $plugins: }
 
-# Stop the default uwsgi service since it is incompatible with
-# our multi instance setup
-service { 'uwsgi':
-ensure  => stopped,
-enable  => false,
+exec { 'remove_uwsgi_initd':
+command => '/usr/sbin/update-rc.d -f uwsgi remove',
+onlyif  => '/usr/sbin/update-rc.d -n -f uwsgi remove | /bin/grep -Pq 
rc..d',
 require => Package['uwsgi'],
 }
 
+if os_version('debian >= jessie') {
+# Stop the default uwsgi service since it is incompatible with
+# our multi instance setup. The update-rc.d isn't good enough on
+# systemd instances
+service { 'uwsgi':
+ensure  => stopped,
+enable  => false,
+require => Package['uwsgi'],
+}
+}
+
 file { [ '/etc/uwsgi/apps-available', '/etc/uwsgi/apps-enabled' ]:
 ensure  => directory,
 recurse => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b7bbfb0891b0a0bc91983434263d429a78356b9
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] context: Support setting title to null - change (mediawiki/core)

2016-03-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: context: Support setting title to null
..

context: Support setting title to null

We have various entry points without a title set:

* load.php: Setup.php defaults $wgTitle to null. When messages
  are parsed, MessageCache::parse() will emit a warning and uses
  $wgTitle which is then casted to Special:Badtitle.

* Parser tests: Work all with context now (or parser options)
  without ever setting $wgTitle. However, in order to allow SpecialPageFactory
  to getTitle() and then setTitle() the same value from context, context needs
  to support setting null as title, the same way it can get null as title.

Change-Id: I770f449fe67beedc3f7d4009ed2208e9dde4491c
---
M includes/context/RequestContext.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/275714/1

diff --git a/includes/context/RequestContext.php 
b/includes/context/RequestContext.php
index 35ee1b7..c8b8108 100644
--- a/includes/context/RequestContext.php
+++ b/includes/context/RequestContext.php
@@ -167,7 +167,7 @@
 *
 * @param Title $title
 */
-   public function setTitle( Title $title ) {
+   public function setTitle( Title $title = null ) {
$this->title = $title;
// Erase the WikiPage so a new one with the new title gets 
created.
$this->wikipage = null;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I770f449fe67beedc3f7d4009ed2208e9dde4491c
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] uwsgi: Don't attempt to stop service on non-jessie systems - change (operations/puppet)

2016-03-07 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: uwsgi: Don't attempt to stop service on non-jessie systems
..

uwsgi: Don't attempt to stop service on non-jessie systems

Weird systemd / update-rc.d interactions. Causes puppet
failure on Ubuntu systems

Change-Id: I1b7bbfb0891b0a0bc91983434263d429a78356b9
---
M modules/uwsgi/manifests/init.pp
1 file changed, 14 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/275713/1

diff --git a/modules/uwsgi/manifests/init.pp b/modules/uwsgi/manifests/init.pp
index 8b3b45e..5739d45 100644
--- a/modules/uwsgi/manifests/init.pp
+++ b/modules/uwsgi/manifests/init.pp
@@ -17,14 +17,23 @@
 package { [ 'uwsgi', 'uwsgi-dbg' ]: }
 package { $plugins: }
 
-# Stop the default uwsgi service since it is incompatible with
-# our multi instance setup
-service { 'uwsgi':
-ensure  => stopped,
-enable  => false,
+exec { 'remove_uwsgi_initd':
+command => '/usr/sbin/update-rc.d -f uwsgi remove',
+onlyif  => '/usr/sbin/update-rc.d -n -f uwsgi remove | /bin/grep -Pq 
rc..d',
 require => Package['uwsgi'],
 }
 
+if os_version('debian >= jessie') {
+# Stop the default uwsgi service since it is incompatible with
+# our multi instance setup. The update-rc.d isn't good enough on
+# systemd instances
+service { 'uwsgi':
+ensure  => stopped,
+enable  => false,
+require => Package['uwsgi'],
+}
+}
+
 file { [ '/etc/uwsgi/apps-available', '/etc/uwsgi/apps-enabled' ]:
 ensure  => directory,
 recurse => true,

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

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

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


[MediaWiki-commits] [Gerrit] CapsuleMultiSelectWidget: Emit 'resize' when widget height c... - change (oojs/ui)

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

Change subject: CapsuleMultiSelectWidget: Emit 'resize' when widget height 
changes
..


CapsuleMultiSelectWidget: Emit 'resize' when widget height changes

Bug: T129158
Change-Id: I22efd3bc5c66a547a89445b4c826877e18e36f8a
---
M src/widgets/CapsuleMultiSelectWidget.js
1 file changed, 23 insertions(+), 3 deletions(-)

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



diff --git a/src/widgets/CapsuleMultiSelectWidget.js 
b/src/widgets/CapsuleMultiSelectWidget.js
index 53dab89..d12b9b6 100644
--- a/src/widgets/CapsuleMultiSelectWidget.js
+++ b/src/widgets/CapsuleMultiSelectWidget.js
@@ -190,6 +190,13 @@
  * @param {Mixed[]} datas Data of the now-selected items
  */
 
+/**
+ * @event resize
+ *
+ * A resize event is emitted when the widget's dimensions change to accomodate 
newly added items or
+ * current user input.
+ */
+
 /* Methods */
 
 /**
@@ -352,7 +359,7 @@
}
if ( !same ) {
this.emit( 'change', this.getItemsData() );
-   this.menu.position();
+   this.updateIfHeightChanged();
}
 
return this;
@@ -389,7 +396,7 @@
}
if ( !same ) {
this.emit( 'change', this.getItemsData() );
-   this.menu.position();
+   this.updateIfHeightChanged();
}
 
return this;
@@ -402,7 +409,7 @@
if ( this.items.length ) {
OO.ui.mixin.GroupElement.prototype.clearItems.call( this );
this.emit( 'change', this.getItemsData() );
-   this.menu.position();
+   this.updateIfHeightChanged();
}
return this;
 };
@@ -632,8 +639,21 @@
bestWidth = this.$content.innerWidth() - 10;
}
this.$input.width( Math.floor( bestWidth ) );
+   this.updateIfHeightChanged();
+   }
+};
 
+/**
+ * Determine if widget height changed, and if so, update menu position and 
emit 'resize' event.
+ *
+ * @private
+ */
+OO.ui.CapsuleMultiSelectWidget.prototype.updateIfHeightChanged = function () {
+   var height = this.$element.height();
+   if ( height !== this.height ) {
+   this.height = height;
this.menu.position();
+   this.emit( 'resize' );
}
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] Revert "Replace deprecated functions" - change (mediawiki...MonoBook)

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

Change subject: Revert "Replace deprecated functions"
..


Revert "Replace deprecated functions"

This reverts commit 3fa0e414a5ccdde5a84ba41d56cd91d1be11b89f.

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

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/MonoBookTemplate.php b/MonoBookTemplate.php
index 46b5b81..adffa58 100644
--- a/MonoBookTemplate.php
+++ b/MonoBookTemplate.php
@@ -39,7 +39,7 @@
 */
public function execute() {
// Suppress warnings to prevent notices about missing indexes 
in $this->data
-   \MediaWiki\suppressWarnings();
+   wfSuppressWarnings();
 
$this->html( 'headelement' );
?>
@@ -192,7 +192,7 @@
echo Html::closeElement( 'body' );
echo Html::closeElement( 'html' );
echo "\n";
-   \MediaWiki\suppressWarnings();
+   wfRestoreWarnings();
} // end of execute() method
 

/*/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia847aed9b0f0f15ef617b60b0902ee6462c16adc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/MonoBook
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Bartosz Dziewoński 
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] Syncronize VisualEditor: 39f3cfa..8d7bacc - change (mediawiki/extensions)

2016-03-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 39f3cfa..8d7bacc
..


Syncronize VisualEditor: 39f3cfa..8d7bacc

Change-Id: I61559d391d12d7e05cb3ef6c5108cb306abdef7a
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 39f3cfa..8d7bacc 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 39f3cfa4a77a7e3856fe7583c7799ff0f887be16
+Subproject commit 8d7baccd5f23b6140894161076e04dede15c7d72

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61559d391d12d7e05cb3ef6c5108cb306abdef7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 39f3cfa..8d7bacc - change (mediawiki/extensions)

2016-03-07 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 39f3cfa..8d7bacc
..

Syncronize VisualEditor: 39f3cfa..8d7bacc

Change-Id: I61559d391d12d7e05cb3ef6c5108cb306abdef7a
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/12/275712/1

diff --git a/VisualEditor b/VisualEditor
index 39f3cfa..8d7bacc 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 39f3cfa4a77a7e3856fe7583c7799ff0f887be16
+Subproject commit 8d7baccd5f23b6140894161076e04dede15c7d72

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61559d391d12d7e05cb3ef6c5108cb306abdef7a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Simplify showtabdialog logic a little bit - change (mediawiki...VisualEditor)

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

Change subject: Simplify showtabdialog logic a little bit
..


Simplify showtabdialog logic a little bit

Don't unnecessarily nest if statements, don't check tabs preference twice

Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
---
M VisualEditor.hooks.php
1 file changed, 19 insertions(+), 23 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 94bbf67..77466e2 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -234,32 +234,28 @@
return true;
}
 
+   $dbr = wfGetDB( DB_SLAVE );
if (
$config->get( 'VisualEditorUseSingleEditTab' ) &&
-   $user->getOption( 'visualeditor-tabs' ) !== 'multi-tab'
+   !$user->isAnon() &&
+   !$user->getOption( 'visualeditor-autodisable' ) &&
+   !$user->getOption( 'visualeditor-betatempdisable' ) &&
+   !$user->getOption( 'visualeditor-hidetabdialog' ) &&
+   $user->getOption( 'visualeditor-tabs' ) === 
'remember-last' &&
+   $dbr->select(
+   'revision',
+   '1',
+   [
+   'rev_user' => $user->getId(),
+   'rev_timestamp < ' . $dbr->addQuotes(
+   $config->get( 
'VisualEditorSingleEditTabSwitchTime' )
+   )
+   ],
+   __METHOD__,
+   [ 'LIMIT' => 1 ]
+   )->numRows() === 1
) {
-   $dbr = wfGetDB( DB_SLAVE );
-   if (
-   !$user->isAnon() &&
-   !$user->getOption( 'visualeditor-autodisable' ) 
&&
-   !$user->getOption( 
'visualeditor-betatempdisable' ) &&
-   !$user->getOption( 'visualeditor-hidetabdialog' 
) &&
-   $user->getOption( 'visualeditor-tabs' ) === 
'remember-last' &&
-   $dbr->select(
-   'revision',
-   '1',
-   [
-   'rev_user' => $user->getId(),
-   'rev_timestamp < ' . 
$dbr->addQuotes(
-   $config->get( 
'VisualEditorSingleEditTabSwitchTime' )
-   )
-   ],
-   __METHOD__,
-   [ 'LIMIT' => 1 ]
-   )->numRows() === 1
-   ) {
-   $links['views']['edit']['class'] .= ' 
visualeditor-showtabdialog';
-   }
+   $links['views']['edit']['class'] .= ' 
visualeditor-showtabdialog';
}
 
// Exit if the user doesn't have VE enabled

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I788d978b2e13030104be7ea295137a09abc032a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Education popup: Also handle clicks on dots - change (mediawiki...VisualEditor)

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

Change subject: Education popup: Also handle clicks on dots
..


Education popup: Also handle clicks on dots

Bug: T128440
Change-Id: I25728cf3dd3462cb1a13476fe45d7fc3755429dd
---
M modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
index d52b086..e470123 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
@@ -59,7 +59,11 @@
this.shownEducationPopup = false;
this.$pulsatingDot = $( '' ).addClass( 've-ui-pulsatingDot' );
this.$stillDot = $( '' ).addClass( 've-ui-stillDot' );
-   $shield = $( '' ).addClass( 've-ui-educationPopup-shield' ).on( 
'click', function () {
+   $shield = $( '' ).addClass( 've-ui-educationPopup-shield' );
+   this.$element
+   .addClass( 've-ui-educationPopup' )
+   .append( $shield, this.popup.$element, this.$stillDot, 
this.$pulsatingDot );
+   this.$element.children().not( this.popup.$element ).on( 'click', 
function () {
if ( !tool.shownEducationPopup ) {
if ( ve.init.target.openEducationPopupTool ) {

ve.init.target.openEducationPopupTool.popup.toggle( false );
@@ -78,9 +82,6 @@
$shield.remove();
}
} );
-   this.$element
-   .addClass( 've-ui-educationPopup' )
-   .append( $shield, this.popup.$element, this.$stillDot, 
this.$pulsatingDot );
 
setTimeout( function () {
var radius = tool.$pulsatingDot.width() / 2;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25728cf3dd3462cb1a13476fe45d7fc3755429dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [bugfix] Enable script_tests for featured.py - change (pywikibot/core)

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

Change subject: [bugfix] Enable script_tests for featured.py
..


[bugfix] Enable script_tests for featured.py

featured -simulate doesn't response "'Use -help for further information."
but there are 4 lines:

  Link FA does not exist
  
  NOTE: featured articles are not implemented at wikipedia.de
  0 pages written.

We cannot use first or 3rd line because of the localized answer for
template and site. We can expect the last line as response.

The behavior of the response might be changed because the data is hold
by wikibase for wm sites.

Bug: T128955
Change-Id: Ia9ac862d2d07db47b1edc87c89aa4136c524891c
---
M tests/script_tests.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/script_tests.py b/tests/script_tests.py
index cc4348c..c0bb625 100644
--- a/tests/script_tests.py
+++ b/tests/script_tests.py
@@ -146,6 +146,7 @@
 no_args_expected_results = {
 # TODO: until done here, remember to set editor = None in user_config.py
 'editarticle': 'Nothing changed',
+'featured': '0 pages written.',
 'freebasemappingupload': 'Cannot find ',
 'harvest_template': 'ERROR: Please specify',
 'imageuncat': 'WARNING: This script is primarily written for Wikimedia 
Commons',

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

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

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


[MediaWiki-commits] [Gerrit] DesktopArticleTarget: Add Edge and MSIE to whitelist - change (mediawiki...VisualEditor)

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

Change subject: DesktopArticleTarget: Add Edge and MSIE to whitelist
..


DesktopArticleTarget: Add Edge and MSIE to whitelist

Bug: T128447
Change-Id: Ia7afe4ddd5abd4fd1de85ba2d2df1fefa6735d79
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js
2 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 55347ff..30cadeb 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -120,6 +120,8 @@
iceweasel: [ [ '>=', 10 ] ],
safari: [ [ '>=', 7 ] ],
chrome: [ [ '>=', 19 ] ],
+   msie: [ [ '>=', 10 ] ],
+   edge: [ [ '>=', 12 ] ],
opera: [ [ '>=', 15 ] ]
}
 };
diff --git 
a/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js 
b/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js
index d3619a5..e0d1089 100644
--- a/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js
+++ b/modules/ve-mw/tests/init/targets/ve.init.mw.DesktopArticleTarget.test.js
@@ -34,12 +34,17 @@
{
msg: 'IE10',
userAgent: 'Mozilla/5.0 (compatible; MSIE 10.0; 
Windows NT 6.1; WOW64; Trident/6.0)',
-   matches: []
+   matches: [ 'whitelist' ]
},
{
msg: 'IE11',
userAgent: 'Mozilla/5.0 (Windows NT 6.3; WOW64; 
Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko',
-   matches: []
+   matches: [ 'whitelist' ]
+   },
+   {
+   msg: 'Edge 12',
+   userAgent: 'Mozilla/5.0 (Windows NT 10.0; 
Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 
Safari/537.36 Edge/12.246',
+   matches: [ 'whitelist' ]
},
{
msg: 'Firefox 10',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7afe4ddd5abd4fd1de85ba2d2df1fefa6735d79
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
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


  1   2   3   4   5   6   7   >