[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add sanity check to getScopedLockAndFlush() for pending writes

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

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

Change subject: Add sanity check to getScopedLockAndFlush() for pending writes
..

Add sanity check to getScopedLockAndFlush() for pending writes

Also made a few related exception message more uniform.

Change-Id: I4491f16493b3d9f8ab8fad45fc6373e0d7f7d67b
---
M includes/db/Database.php
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/305453/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index be0399d..933bea6 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -2673,7 +2673,7 @@
if ( $this->mTrxLevel ) {
if ( $this->mTrxAtomicLevels ) {
$levels = implode( ', ', 
$this->mTrxAtomicLevels );
-   $msg = "Got explicit BEGIN from $fname while 
atomic section(s) $levels are open.";
+   $msg = "$fname: Got explicit BEGIN while atomic 
section(s) $levels are open.";
throw new DBUnexpectedError( $this, $msg );
} elseif ( !$this->mTrxAutomatic ) {
$msg = "$fname: Explicit transaction already 
active (from {$this->mTrxFname}).";
@@ -2727,7 +2727,7 @@
$levels = implode( ', ', $this->mTrxAtomicLevels );
throw new DBUnexpectedError(
$this,
-   "Got COMMIT while atomic sections $levels are 
still open."
+   "$fname: Got COMMIT while atomic sections 
$levels are still open."
);
}
 
@@ -3286,6 +3286,14 @@
}
 
public function getScopedLockAndFlush( $lockKey, $fname, $timeout ) {
+   if ( $this->writesOrCallbacksPending() ) {
+   // This only flushes transactions to clear snapshots, 
not to write data
+   throw new DBUnexpectedError(
+   $this,
+   "$fname: Cannot COMMIT to clear snapshot 
because writes are pending."
+   );
+   }
+
if ( !$this->lock( $lockKey, $fname, $timeout ) ) {
return null;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4491f16493b3d9f8ab8fad45fc6373e0d7f7d67b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow defining cache size for page props

2016-08-17 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: Allow defining cache size for page props
..

Allow defining cache size for page props

May be useful for batch processing where size of the batch is known
and the batch should fit in cache.

Change-Id: Ib6d6e6ab7e12788c934cd0e973bc35e133aeccbb
---
M includes/PageProps.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/PageProps.php b/includes/PageProps.php
index 3654384..aa9185d 100644
--- a/includes/PageProps.php
+++ b/includes/PageProps.php
@@ -79,9 +79,10 @@
 
/**
 * Create a PageProps object
+* @param int|null $size Cache size, by default self::CACHE_SIZE
 */
-   private function __construct() {
-   $this->cache = new ProcessCacheLRU( self::CACHE_SIZE );
+   private function __construct( $size = null ) {
+   $this->cache = new ProcessCacheLRU( $size ?: self::CACHE_SIZE );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: getScopedLockAndFlush() should not commit when exceptions ar...

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

Change subject: getScopedLockAndFlush() should not commit when exceptions are 
thrown
..


getScopedLockAndFlush() should not commit when exceptions are thrown

Previously it would commit() since the __destruct() call happens
as an exception is thrown but before it reached MWExceptionHandler.

Change-Id: I3d4186eb9ec02cf4d42ac84590869e2cf29b30b4
---
M includes/db/Database.php
M includes/db/IDatabase.php
M tests/phpunit/includes/db/DatabaseTest.php
3 files changed, 61 insertions(+), 5 deletions(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 940c3f7..be0399d 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -3291,8 +3291,16 @@
}
 
$unlocker = new ScopedCallback( function () use ( $lockKey, 
$fname ) {
-   $this->commit( __METHOD__, self::FLUSHING_INTERNAL );
-   $this->unlock( $lockKey, $fname );
+   if ( $this->trxLevel() ) {
+   // There is a good chance an exception was 
thrown, causing any early return
+   // from the caller. Let any error handler get a 
chance to issue rollback().
+   // If there isn't one, let the error bubble up 
and trigger server-side rollback.
+   $this->onTransactionResolution( function () use 
( $lockKey, $fname ) {
+   $this->unlock( $lockKey, $fname );
+   } );
+   } else {
+   $this->unlock( $lockKey, $fname );
+   }
} );
 
$this->commit( __METHOD__, self::FLUSHING_INTERNAL );
diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
index 772d824..bdab09e 100644
--- a/includes/db/IDatabase.php
+++ b/includes/db/IDatabase.php
@@ -1359,6 +1359,10 @@
 * Begin a transaction. If a transaction is already in progress,
 * that transaction will be committed before the new transaction is 
started.
 *
+* Only call this from code with outer transcation scope.
+* See https://www.mediawiki.org/wiki/Database_transactions for details.
+* Nesting of transactions is not supported.
+*
 * Note that when the DBO_TRX flag is set (which is usually the case 
for web
 * requests, but not for maintenance scripts), any previous database 
query
 * will have started a transaction automatically.
@@ -1377,6 +1381,8 @@
 * Commits a transaction previously started using begin().
 * If no transaction is in progress, a warning is issued.
 *
+* Only call this from code with outer transcation scope.
+* See https://www.mediawiki.org/wiki/Database_transactions for details.
 * Nesting of transactions is not supported.
 *
 * @param string $fname
@@ -1397,7 +1403,11 @@
 * Rollback a transaction previously started using begin().
 * If no transaction is in progress, a warning is issued.
 *
-* No-op on non-transactional databases.
+* Only call this from code with outer transcation scope.
+* See https://www.mediawiki.org/wiki/Database_transactions for details.
+* Nesting of transactions is not supported. If a serious unexpected 
error occurs,
+* throwing an Exception is preferrable, using a pre-installed error 
handler to trigger
+* rollback (in any case, failure to issue COMMIT will cause rollback 
server-side).
 *
 * @param string $fname
 * @param string $flush Flush flag, set to a situationally valid 
IDatabase::FLUSHING_*
@@ -1568,10 +1578,14 @@
/**
 * Acquire a named lock, flush any transaction, and return an RAII 
style unlocker object
 *
+* Only call this from outer transcation scope and when only one DB 
will be affected.
+* See https://www.mediawiki.org/wiki/Database_transactions for details.
+*
 * This is suitiable for transactions that need to be serialized using 
cooperative locks,
 * where each transaction can see each others' changes. Any transaction 
is flushed to clear
 * out stale REPEATABLE-READ snapshot data. Once the returned object 
falls out of PHP scope,
-* any transaction will be committed and the lock will be released.
+* the lock will be released unless a transaction is active. If one is 
active, then the lock
+* will be released when it either commits or rolls back.
 *
 * If the lock acquisition failed, then no transaction flush happens, 
and null is returned.
 *
diff --git a/tests/phpunit/includes/db/DatabaseTest.php 
b/test

[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Split modules collector into three collectors

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

Change subject: Split modules collector into three collectors
..


Split modules collector into three collectors

Let the module collector be three collectors so we can have individual
links in the menu and make it cleaner when we add more
information/functionality to the CSS collector.

Bug: T142975
Change-Id: I11c5e70c0c466fe56d09245f14d7014c78c51b3f
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A modules/collectors/ext.PerformanceInspector.modulescss.js
A modules/collectors/ext.PerformanceInspector.moduleslocalstorage.js
R modules/collectors/ext.PerformanceInspector.modulessize.js
D modules/templates/modules.mustache
A modules/templates/modulescss.mustache
A modules/templates/moduleslocalstorage.mustache
A modules/templates/modulessize.mustache
10 files changed, 140 insertions(+), 87 deletions(-)

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



diff --git a/extension.json b/extension.json
index f65da3e..1a63108 100644
--- a/extension.json
+++ b/extension.json
@@ -24,7 +24,9 @@
"ext.PerformanceInspector.setup.js",
"ext.PerformanceInspector.view.js",
"util/barChart.js",
-   
"collectors/ext.PerformanceInspector.modules.js",
+   
"collectors/ext.PerformanceInspector.modulessize.js",
+   
"collectors/ext.PerformanceInspector.modulescss.js",
+   
"collectors/ext.PerformanceInspector.moduleslocalstorage.js",

"collectors/ext.PerformanceInspector.imagesize.js",
"collectors/ext.PerformanceInspector.newpp.js"
],
@@ -37,7 +39,9 @@
],
"templates": {
"summary.mustache": 
"templates/summary.mustache",
-   "modules.mustache": 
"templates/modules.mustache",
+   "modulessize.mustache": 
"templates/modulessize.mustache",
+   "modulescss.mustache": 
"templates/modulescss.mustache",
+   "moduleslocalstorage.mustache": 
"templates/moduleslocalstorage.mustache",
"imagesize.mustache": 
"templates/imagesize.mustache",
"newpp.mustache": "templates/newpp.mustache"
},
@@ -46,19 +50,21 @@
"performanceinspector-dialog-summary",
"performanceinspector-dialog-cancel",

"performanceinspector-modules-summary-total-size",
-   "performanceinspector-modules-css-title",
+   "performanceinspector-modules-css-name",
+   "performanceinspector-modules-css-label",

"performanceinspector-modules-css-column-module",

"performanceinspector-modules-css-column-allselectors",

"performanceinspector-modules-css-column-matchedselectors",

"performanceinspector-modules-css-column-percentmatched",
-   
"performanceinspector-modules-localstorage-title",
+   
"performanceinspector-modules-localstorage-name",
+   
"performanceinspector-modules-localstorage-label",

"performanceinspector-modules-localstorage-disabled",

"performanceinspector-modules-localstorage-hits",

"performanceinspector-modules-localstorage-misses",

"performanceinspector-modules-localstorage-expired",

"performanceinspector-modules-localstorage-totalsize",
-   "performanceinspector-modules-name",
-   "performanceinspector-modules-label",
+   "performanceinspector-modules-size-name",
+   "performanceinspector-modules-size-label",
"performanceinspector-imagesize-name",
"performanceinspector-imagesize-label",

"performanceinspector-imagesize-column-image-name",
diff --git a/i18n/en.json b/i18n/en.json
index b58d99d..ff14082 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -11,16 +11,18 @@
 
"performanceinspector-modules-summary-total-size": "The total size of 
all modules ",
 
-   "performanceinspector-modules-name": "Modules",
-   "performanceinspector-modules-label": "Modules information",
+   "perfor

[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Get the localstorage out of the array

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

Change subject: Get the localstorage out of the array
..


Get the localstorage out of the array

The localstorage object is in an array, lets just forward the object.
Thanks @krinkle for finding that.

Change-Id: I608c1d6822ed60f00196700956f4bf461d255d00
---
M modules/ext.PerformanceInspector.startup.js
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/modules/ext.PerformanceInspector.startup.js 
b/modules/ext.PerformanceInspector.startup.js
index 4343118..99f4293 100644
--- a/modules/ext.PerformanceInspector.startup.js
+++ b/modules/ext.PerformanceInspector.startup.js
@@ -12,10 +12,9 @@
if ( !inspectData ) {
inspectData = mw.loader.using( [ 
'mediawiki.inspect' ] ).then( function () {
return {
-   // we want the largest module 
first
modules: 
mw.inspect.reports.size(),
css: mw.inspect.reports.css(),
-   store: 
mw.inspect.reports.store()
+   store: 
mw.inspect.reports.store()[ 0 ]
};
} );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I608c1d6822ed60f00196700956f4bf461d255d00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Copy from DOM instead of using vector-view-edit and vector-a...

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

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

Change subject: Copy from DOM instead of using vector-view-edit and 
vector-action-move
..

Copy from DOM instead of using vector-view-edit and vector-action-move

Bug: T143296
Change-Id: Ia457f43c2c276de9556649d41f08f64e0833e6ef
---
M extension.json
M i18n/en.json
M modules/tours/ext.cx.tours.publish.js
3 files changed, 12 insertions(+), 6 deletions(-)


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

diff --git a/extension.json b/extension.json
index 7e35590..1198fcb 100644
--- a/extension.json
+++ b/extension.json
@@ -879,8 +879,8 @@
"mediawiki.Title"
],
"messages": [
-   "vector-action-move",
-   "vector-view-edit",
+   "move",
+   "edit",

"cx-publish-gt-no-permission-to-move-description",
"cx-publish-gt-first-step-title",
"cx-publish-gt-first-step-description",
diff --git a/i18n/en.json b/i18n/en.json
index 45bf7b2..20139bf 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -37,13 +37,13 @@
"cx-publish-summary": "Created by translating the page \"$1\"",
"cx-publish-gt-no-permission-to-move-description": "Please ask an 
experienced user of this site to help you review your translation and publish 
it in the main space.",
"cx-publish-gt-first-step-title": "The translation has been published 
as a draft under your user page for review",
-   "cx-publish-gt-first-step-description": "Click on the 
\"{{int:vector-action-move}}\" action under this menu to make the content 
available to all users as a regular page.",
+   "cx-publish-gt-first-step-description": "Click on the \"$1\" action 
under this menu to make the content available to all users as a regular page.",
"cx-publish-gt-move-page-title": "Move the page",
"cx-publish-gt-move-page-description": "Select the 
\"{{int:blanknamespace}}\" namespace and give your page an appropriate title.",
"cx-publish-gt-moved-title": "The translated page was moved",
"cx-publish-gt-moved-description": "Click this link to read and improve 
your new translated page",
"cx-publish-gt-published-title": "Congratulations, the page has been 
published",
-   "cx-publish-gt-published-description": "You can click 
\"{{int:vector-view-edit}}\" to keep improving the page. Make sure it reads 
naturally.",
+   "cx-publish-gt-published-description": "You can click \"$1\" to keep 
improving the page. Make sure it reads naturally.",
"cx-translation-add-translation": "+ Add translation",
"cx-translation-target-page-exists": "A page with the title [$1 $2] 
exists in the target wiki. Consider giving the page a different title.",
"cx-descriptionpagelink": "mw:Content translation",
diff --git a/modules/tours/ext.cx.tours.publish.js 
b/modules/tours/ext.cx.tours.publish.js
index fad51ba..086d242 100644
--- a/modules/tours/ext.cx.tours.publish.js
+++ b/modules/tours/ext.cx.tours.publish.js
@@ -100,7 +100,10 @@
attachTo: cactions,
position: 'leftBottom',
titlemsg: 'cx-publish-gt-first-step-title',
-   descriptionmsg: 'cx-publish-gt-first-step-description',
+   descriptionmsg: mw.message(
+   'cx-publish-gt-first-step-description',
+   $( '#ca-edit a' ).text()
+   ).parse(),
onShow: function () {
var $cactions = $( cactions ),
$actionsMenu = $cactions.find( '.menu' );
@@ -163,7 +166,10 @@
attachTo: editElement,
position: 'bottom',
titlemsg: 'cx-publish-gt-published-title',
-   descriptionmsg: 'cx-publish-gt-published-description',
+   descriptionmsg: mw.message(
+   'cx-publish-gt-published-description',
+   $( '#ca-move a' ).text()
+   ).parse(),
onShow: deletePublishCookie,
buttons: [ {
action: 'end'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia457f43c2c276de9556649d41f08f64e0833e6ef
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/lis

[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Update bootstrapping of $wgConf in unit tests

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

Change subject: Update bootstrapping of $wgConf in unit tests
..


Update bootstrapping of $wgConf in unit tests

After 010410265, we need to provide the canonical server and article
path so it doesn't return null.

And remove 'wiki' from $wgConf->wikis because we don't set any metadata
for it, so it will also return null.

Bug: T142229
Change-Id: I867673ad3ddbd94fbd65fff07f275ce8e9a03761
---
M tests/MassMessageTestCase.php
1 file changed, 13 insertions(+), 11 deletions(-)

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



diff --git a/tests/MassMessageTestCase.php b/tests/MassMessageTestCase.php
index 1e96831..43e99e9 100644
--- a/tests/MassMessageTestCase.php
+++ b/tests/MassMessageTestCase.php
@@ -6,12 +6,11 @@
 
 abstract class MassMessageTestCase extends MediaWikiTestCase {
 
-   public static function setUpBeforeClass() {
-   // $wgConf ew
-   global $wgConf, $wgLocalDatabases;
-   parent::setUpBeforeClass();
+   protected function setUp() {
+   global $wgLqtPages, $wgContLang;
+   parent::setUp();
$wgConf = new SiteConfiguration;
-   $wgConf->wikis = [ 'enwiki', 'dewiki', 'frwiki', 'wiki' ];
+   $wgConf->wikis = [ 'enwiki', 'dewiki', 'frwiki' ];
$wgConf->suffixes = [ 'wiki' ];
$wgConf->settings = [
'wgServer' => [
@@ -19,13 +18,16 @@
'dewiki' => '//de.wikipedia.org',
'frwiki' => '//fr.wikipedia.org',
],
+   'wgCanonicalServer' => [
+   'enwiki' => 'https://en.wikipedia.org',
+   'dewiki' => 'https://de.wikipedia.org',
+   'frwiki' => 'https://fr.wikipedia.org',
+   ],
+   'wgArticlePath' => [
+   'default' => '/wiki/$1',
+   ],
];
-   $wgLocalDatabases =& $wgConf->getLocalDatabases();
-   }
-
-   protected function setUp() {
-   global $wgLqtPages, $wgContLang;
-   parent::setUp();
+   $this->setMwGlobals( 'wgConf', $wgConf );
$proj = $wgContLang->getFormattedNsText( NS_PROJECT );
$wgLqtPages[] = $proj . ':LQT test';
// Create a redirect

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I867673ad3ddbd94fbd65fff07f275ce8e9a03761
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Wctaiwan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Don't override ContentHandler::unserializeContent()

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

Change subject: Don't override ContentHandler::unserializeContent()
..


Don't override ContentHandler::unserializeContent()

This prevents us from giving more specific errors (e.g. via
Content::prepareSave) later on since we can never instantiate the
object.

Change-Id: I28d6703cff72c9af5cb8ca41a4bf9f11d4ca4856
---
M includes/content/MassMessageListContentHandler.php
1 file changed, 0 insertions(+), 15 deletions(-)

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



diff --git a/includes/content/MassMessageListContentHandler.php 
b/includes/content/MassMessageListContentHandler.php
index b34bb51..f4aae01 100644
--- a/includes/content/MassMessageListContentHandler.php
+++ b/includes/content/MassMessageListContentHandler.php
@@ -10,21 +10,6 @@
}
 
/**
-* @param string $text
-* @param string $format
-* @return MassMessageListContent
-* @throws MWContentSerializationException
-*/
-   public function unserializeContent( $text, $format = null ) {
-   $this->checkFormat( $format );
-   $content = new MassMessageListContent( $text );
-   if ( !$content->isValid() ) {
-   throw new MWContentSerializationException( 'The 
delivery list content is invalid.' );
-   }
-   return $content;
-   }
-
-   /**
 * @return MassMessageListContent
 */
public function makeEmptyContent() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28d6703cff72c9af5cb8ca41a4bf9f11d4ca4856
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Wctaiwan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Remove 'UnitTestList' hook

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

Change subject: Remove 'UnitTestList' hook
..


Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: Ibe1fc06518d56a2ddb3847f0e896a7f1975ae57b
---
M MassMessage.hooks.php
M extension.json
R tests/phpunit/MassMessageApiTestCase.php
R tests/phpunit/MassMessageTargetsTest.php
R tests/phpunit/MassMessageTest.php
R tests/phpunit/MassMessageTestCase.php
R tests/phpunit/api/ApiEditMassMessageListTest.php
R tests/phpunit/api/ApiMassMessageTest.php
R tests/phpunit/api/ApiQueryMMSitesTest.php
R tests/phpunit/content/MassMessageContentHandlerTest.php
R tests/phpunit/content/MassMessageContentTest.php
R tests/phpunit/job/MassMessageJobTest.php
R tests/phpunit/job/MassMessageSubmitJobTest.php
13 files changed, 2 insertions(+), 27 deletions(-)

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



diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index 3fabc14..ba5bb41 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -116,28 +116,6 @@
}
 
/**
-* Load our unit tests
-*/
-   public static function onUnitTestsList( &$files ) {
-   // @codeCoverageIgnoreStart
-   $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . 
'/tests/' );
-
-   /**
-* @var SplFileInfo $fileInfo
-*/
-   $ourFiles = [];
-   foreach ( new RecursiveIteratorIterator( $directoryIterator ) 
as $fileInfo ) {
-   if ( substr( $fileInfo->getFilename(), -8 ) === 
'Test.php' ) {
-   $ourFiles[] = $fileInfo->getPathname();
-   }
-   }
-
-   $files = array_merge( $files, $ourFiles );
-   return true;
-   // @codeCoverageIgnoreEnd
-   }
-
-   /**
 * Makes the messenger sender exempt from IP blocks no matter what
 * Called only if the context is a MassMessage job (bug 69381)
 * @see bug 58237
diff --git a/extension.json b/extension.json
index 3b947f9..1b01da9 100644
--- a/extension.json
+++ b/extension.json
@@ -61,9 +61,6 @@
"UserGetReservedNames": [
"MassMessageHooks::onUserGetReservedNames"
],
-   "UnitTestsList": [
-   "MassMessageHooks::onUnitTestsList"
-   ],
"BeforeEchoEventInsert": [
"MassMessageHooks::onBeforeEchoEventInsert"
],
@@ -211,8 +208,8 @@
"MassMessageListContent": 
"includes/content/MassMessageListContent.php",
"MassMessageListContentHandler": 
"includes/content/MassMessageListContentHandler.php",
"MassMessageListDiffEngine": 
"includes/content/MassMessageListDiffEngine.php",
-   "MassMessageTestCase": "tests/MassMessageTestCase.php",
-   "MassMessageApiTestCase": "tests/MassMessageApiTestCase.php"
+   "MassMessageTestCase": "tests/phpunit/MassMessageTestCase.php",
+   "MassMessageApiTestCase": 
"tests/phpunit/MassMessageApiTestCase.php"
},
"manifest_version": 1
 }
diff --git a/tests/MassMessageApiTestCase.php 
b/tests/phpunit/MassMessageApiTestCase.php
similarity index 100%
rename from tests/MassMessageApiTestCase.php
rename to tests/phpunit/MassMessageApiTestCase.php
diff --git a/tests/MassMessageTargetsTest.php 
b/tests/phpunit/MassMessageTargetsTest.php
similarity index 100%
rename from tests/MassMessageTargetsTest.php
rename to tests/phpunit/MassMessageTargetsTest.php
diff --git a/tests/MassMessageTest.php b/tests/phpunit/MassMessageTest.php
similarity index 100%
rename from tests/MassMessageTest.php
rename to tests/phpunit/MassMessageTest.php
diff --git a/tests/MassMessageTestCase.php 
b/tests/phpunit/MassMessageTestCase.php
similarity index 100%
rename from tests/MassMessageTestCase.php
rename to tests/phpunit/MassMessageTestCase.php
diff --git a/tests/api/ApiEditMassMessageListTest.php 
b/tests/phpunit/api/ApiEditMassMessageListTest.php
similarity index 100%
rename from tests/api/ApiEditMassMessageListTest.php
rename to tests/phpunit/api/ApiEditMassMessageListTest.php
diff --git a/tests/api/ApiMassMessageTest.php 
b/tests/phpunit/api/ApiMassMessageTest.php
similarity index 100%
rename from tests/api/ApiMassMessageTest.php
rename to tests/phpunit/api/ApiMassMessageTest.php
diff --git a/tests/api/ApiQueryMMSitesTest.php 
b/tests/phpunit/api/ApiQueryMMSitesTest.php
similarity index 100%
rename from tests/api/ApiQueryMMSitesTest.php
rename to tests/phpunit/api/ApiQueryMMSitesTest.php
diff --git a/tests/content/MassMessageContentHandlerTest.php 
b/tests/phpunit/content/MassMessageContentHandlerTest.php
similarity index 100%
rename from tests/content/Mass

[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Get the localstorage out of the array

2016-08-17 Thread Phedenskog (Code Review)
Phedenskog has uploaded a new change for review.

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

Change subject: Get the localstorage out of the array
..

Get the localstorage out of the array

The localstorage object is in an array, lets just forward the object.
Thanks @krinkle for finding that.

Change-Id: I608c1d6822ed60f00196700956f4bf461d255d00
---
M modules/ext.PerformanceInspector.startup.js
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/modules/ext.PerformanceInspector.startup.js 
b/modules/ext.PerformanceInspector.startup.js
index 4343118..99f4293 100644
--- a/modules/ext.PerformanceInspector.startup.js
+++ b/modules/ext.PerformanceInspector.startup.js
@@ -12,10 +12,9 @@
if ( !inspectData ) {
inspectData = mw.loader.using( [ 
'mediawiki.inspect' ] ).then( function () {
return {
-   // we want the largest module 
first
modules: 
mw.inspect.reports.size(),
css: mw.inspect.reports.css(),
-   store: 
mw.inspect.reports.store()
+   store: 
mw.inspect.reports.store()[ 0 ]
};
} );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I608c1d6822ed60f00196700956f4bf461d255d00
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Phedenskog 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: oauth_hello_world: Improve error display

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

Change subject: oauth_hello_world: Improve error display
..


oauth_hello_world: Improve error display

Change-Id: I413ca7c4b4cad54b4d73f9ed9de86a82b23f0d7e
---
M puppet/modules/role/templates/oauth/hello_world.php.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/puppet/modules/role/templates/oauth/hello_world.php.erb 
b/puppet/modules/role/templates/oauth/hello_world.php.erb
index 0b717f2..442f216 100644
--- a/puppet/modules/role/templates/oauth/hello_world.php.erb
+++ b/puppet/modules/role/templates/oauth/hello_world.php.erb
@@ -218,7 +218,7 @@
$token = json_decode( $data );
if ( is_object( $token ) && isset( $token->error ) ) {
header( "HTTP/1.1 $errorCode Internal Server Error" );
-   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error );
+   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error )  . '' . htmlspecialchars( $token->message );
exit(0);
}
if ( !is_object( $token ) || !isset( $token->key ) || !isset( 
$token->secret ) ) {
@@ -285,7 +285,7 @@
$token = json_decode( $data );
if ( is_object( $token ) && isset( $token->error ) ) {
header( "HTTP/1.1 $errorCode Internal Server Error" );
-   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error );
+   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error ) . '' . htmlspecialchars( $token->message );
exit(0);
}
if ( !is_object( $token ) || !isset( $token->key ) || !isset( 
$token->secret ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I413ca7c4b4cad54b4d73f9ed9de86a82b23f0d7e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Don't override ContentHandler::unserializeContent()

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

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

Change subject: Don't override ContentHandler::unserializeContent()
..

Don't override ContentHandler::unserializeContent()

This prevents us from giving more specific errors (e.g. via
Content::prepareSave) later on since we can never instantiate the
object.

Change-Id: I28d6703cff72c9af5cb8ca41a4bf9f11d4ca4856
---
M includes/content/MassMessageListContentHandler.php
1 file changed, 0 insertions(+), 15 deletions(-)


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

diff --git a/includes/content/MassMessageListContentHandler.php 
b/includes/content/MassMessageListContentHandler.php
index b34bb51..f4aae01 100644
--- a/includes/content/MassMessageListContentHandler.php
+++ b/includes/content/MassMessageListContentHandler.php
@@ -10,21 +10,6 @@
}
 
/**
-* @param string $text
-* @param string $format
-* @return MassMessageListContent
-* @throws MWContentSerializationException
-*/
-   public function unserializeContent( $text, $format = null ) {
-   $this->checkFormat( $format );
-   $content = new MassMessageListContent( $text );
-   if ( !$content->isValid() ) {
-   throw new MWContentSerializationException( 'The 
delivery list content is invalid.' );
-   }
-   return $content;
-   }
-
-   /**
 * @return MassMessageListContent
 */
public function makeEmptyContent() {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Implement custom EditPage-based editor

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

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

Change subject: Implement custom EditPage-based editor
..

Implement custom EditPage-based editor

Eventually this should let us remove Special:EditMassMessageList, but
there are still some rough edges, so we should leave the special page as
the default editor for now. This can be accessed by manually appending
?action=edit to the URL.

Mostly the validation needs to be improved, but that's already a mess
and should be in a separate change.

Change-Id: I09d161005cbba9ac159c8be01f73eedebc3112f4
---
M MassMessage.hooks.php
M extension.json
A includes/MassMessageListEditor.php
M includes/content/MassMessageListContent.php
4 files changed, 136 insertions(+), 2 deletions(-)


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

diff --git a/MassMessage.hooks.php b/MassMessage.hooks.php
index ba5bb41..61e62d5 100644
--- a/MassMessage.hooks.php
+++ b/MassMessage.hooks.php
@@ -233,4 +233,19 @@
$tags[] = 'massmessage-delivery';
return true;
}
+
+   /**
+* @param Article $article
+* @param User $user
+* @return bool
+*/
+   public static function onCustomEditor( $article, User $user ) {
+   if ( $article->getContentModel() === 'MassMessageListContent' ) 
{
+   $editor = new MassMessageListEditor( $article );
+   $editor->edit();
+   return false;
+   }
+
+   return true;
+   }
 }
diff --git a/extension.json b/extension.json
index 1b01da9..fe81675 100644
--- a/extension.json
+++ b/extension.json
@@ -75,7 +75,8 @@
],
"ChangeTagsListActive": [
"MassMessageHooks::onRegisterTags"
-   ]
+   ],
+   "CustomEditor": "MassMessageHooks::onCustomEditor"
},
"ContentHandlers": {
"MassMessageListContent": "MassMessageListContentHandler"
@@ -195,6 +196,7 @@
"ApiEditMassMessageList": "includes/ApiEditMassMessageList.php",
"ApiQueryMMSites": "includes/ApiQueryMMSites.php",
"MassMessage": "includes/MassMessage.php",
+   "MassMessageListEditor": "includes/MassMessageListEditor.php",
"MassMessageTargets": "includes/MassMessageTargets.php",
"SpecialMassMessage": "includes/SpecialMassMessage.php",
"SpecialCreateMassMessageList": 
"includes/SpecialCreateMassMessageList.php",
diff --git a/includes/MassMessageListEditor.php 
b/includes/MassMessageListEditor.php
new file mode 100644
index 000..8d55de5
--- /dev/null
+++ b/includes/MassMessageListEditor.php
@@ -0,0 +1,111 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+class MassMessageListEditor extends EditPage {
+   protected function showHeader() {
+   global $wgAllowGlobalMessaging;
+   if ( !parent::showHeader() ) {
+   return false;
+   }
+
+   $ctx = $this->getArticle()->getContext();
+
+   // Instructions
+   if ( $wgAllowGlobalMessaging && count( 
MassMessage::getDatabases() ) > 1 ) {
+   $headerKey = 'massmessage-edit-headermulti';
+   } else {
+   $headerKey = 'massmessage-edit-header';
+   }
+   $ctx->getOutput()->addHTML(
+   Html::rawElement( 'p', [], $ctx->msg( $headerKey 
)->parse() ) );
+
+   return true;
+   }
+
+   public function showContentForm() {
+   /** @var MassMessageListContent $content */
+   $content = $this->toEditContent( $this->textbox1 );
+   $ctx = $this->getArticle()->getContext();
+   $out = $ctx->getOutput();
+
+   $pageLang = $this->getTitle()->getPageLanguage();
+   $attribs = [
+   'id' => 'wpMassMessageListTargets',
+   'lang' => $pageLang->getHtmlCode(),
+   'dir' => $pageLang->getDir(),
+   'rows' => HTMLTextAreaField::DEFAULT_ROWS,
+   ];
+
+   $descHeading = $ctx->msg( 'massmessage-edit-description' 
)->text();
+   $targetsHeading = $ctx->msg( 'massmessage-edit-content' 
)->text();
+   $out->addHTML(
+   Html::element( 'h2', [ "id" => 'mw-mm-desc' ], 
$descHeading )
+   );
+
+   $this->showTextbox1( [ 'rows' => 5 ], 
$content->getDescription() );
+   $out->addHTML(
+   Html::element( 'h2', [ "id" => 'mw-mm-targets' ], 
$targetsHeading )
+   .
+   Html::textarea(
+   'wpMassMessa

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: oauth_hello_world: Improve error display

2016-08-17 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: oauth_hello_world: Improve error display
..

oauth_hello_world: Improve error display

Change-Id: I413ca7c4b4cad54b4d73f9ed9de86a82b23f0d7e
---
M puppet/modules/role/templates/oauth/hello_world.php.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/40/305440/1

diff --git a/puppet/modules/role/templates/oauth/hello_world.php.erb 
b/puppet/modules/role/templates/oauth/hello_world.php.erb
index 0b717f2..442f216 100644
--- a/puppet/modules/role/templates/oauth/hello_world.php.erb
+++ b/puppet/modules/role/templates/oauth/hello_world.php.erb
@@ -218,7 +218,7 @@
$token = json_decode( $data );
if ( is_object( $token ) && isset( $token->error ) ) {
header( "HTTP/1.1 $errorCode Internal Server Error" );
-   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error );
+   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error )  . '' . htmlspecialchars( $token->message );
exit(0);
}
if ( !is_object( $token ) || !isset( $token->key ) || !isset( 
$token->secret ) ) {
@@ -285,7 +285,7 @@
$token = json_decode( $data );
if ( is_object( $token ) && isset( $token->error ) ) {
header( "HTTP/1.1 $errorCode Internal Server Error" );
-   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error );
+   echo 'Error retrieving token: ' . htmlspecialchars( 
$token->error ) . '' . htmlspecialchars( $token->message );
exit(0);
}
if ( !is_object( $token ) || !isset( $token->key ) || !isset( 
$token->secret ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I413ca7c4b4cad54b4d73f9ed9de86a82b23f0d7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Don't abuse ParserOptions::getUser()->getOption( 'language' ...

2016-08-17 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Don't abuse ParserOptions::getUser()->getOption( 'language' ) 
to get the user lang
..

Don't abuse ParserOptions::getUser()->getOption( 'language' ) to get the user 
lang

As that's not necessary the desired user language, as that can
also be altered via ?uselang. This is especially relevant for
logged-out users.

I removed the hack in question by simply using ParserOptions::getUserLangObj.
In order to not split the parser cache by user language where not
needed, I divided WikibaseLuaBindings into one class with language
dependent functionality and one with language independent functionality,
so that these can be instantiated independently.

Please note, that the hack in question wasn't needed in 
Scribunto_LuaWikibaseEntityLibrary
in the first place, as the only way to obtain a mw.wikibase.entity
object is to call mw.wikibase.getEntity/getEntityObject which already
splits the parser cache if "allowDataAccessInUserLanguage" is true.

This also adds tests for WikibaseLanguageIndependentLuaBindings::getSetting.

Bug: T142906
Change-Id: Iecc1fa18124d655bbce554d5ce7b33b67ee1abe7
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
A client/includes/DataAccess/Scribunto/WikibaseLanguageDependentLuaBindings.php
A 
client/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindings.php
D client/includes/DataAccess/Scribunto/WikibaseLuaBindings.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
A 
client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLanguageDependentLuaBindingsTest.php
A 
client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLanguageIndependentLuaBindingsTest.php
D client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
9 files changed, 619 insertions(+), 556 deletions(-)


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

diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 1f49cd3..9f4c520 100644
--- 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++ 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -89,9 +89,6 @@
 * language, otherwise it will be the content language.
 * In a perfect world, this would equal Parser::getTargetLanguage.
 *
-* This doesn't split the ParserCache by language yet, please see
-* self::splitParserCacheIfMultilingual for that.
-*
 * This can probably be removed after T114640 has been implemented.
 *
 * @return Language
@@ -100,23 +97,10 @@
global $wgContLang;
 
if ( $this->allowDataAccessInUserLanguage() ) {
-   // Can't use ParserOptions::getUserLang as that already 
splits the ParserCache
-   $userLang = 
$this->getParserOptions()->getUser()->getOption( 'language' );
-
-   return Language::factory( $userLang );
+   return $this->getParserOptions()->getUserLangObj();
}
 
return $wgContLang;
-   }
-
-   /**
-* Splits the page's ParserCache in case we're on a multilingual wiki
-*/
-   private function splitParserCacheIfMultilingual() {
-   if ( $this->allowDataAccessInUserLanguage() ) {
-   // ParserOptions::getUserLang splits the ParserCache
-   $this->getParserOptions()->getUserLang();
-   }
}
 
/**
@@ -188,8 +172,6 @@
$this->checkType( 'formatPropertyValues', 1, 
$propertyLabelOrId, 'string' );
$this->checkTypeOptional( 'formatPropertyValues', 2, 
$acceptableRanks, 'table', null );
try {
-   $this->splitParserCacheIfMultilingual();
-
return array(

$this->getImplementation()->formatPropertyValues(
$entityId,
diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index aadd17c..46822de 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -38,9 +38,14 @@
 class Scribunto_LuaWikibaseLibrary extends Scribunto_LuaLibraryBase {
 
/**
-* @var WikibaseLuaBindings|null
+* @var WikibaseLanguageIndependentLuaBindings|null
 */
-   private $luaBindings = null;
+   private

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: WIP: Function to rebase a transaction onto another

2016-08-17 Thread Divec (Code Review)
Divec has uploaded a new change for review.

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

Change subject: WIP: Function to rebase a transaction onto another
..

WIP: Function to rebase a transaction onto another

Change-Id: I2c83056b24e45edb35aceb78f8bf066866e6563f
---
M src/dm/ve.dm.Transaction.js
1 file changed, 128 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/38/305438/1

diff --git a/src/dm/ve.dm.Transaction.js b/src/dm/ve.dm.Transaction.js
index 1b510fc..2cc0f26 100644
--- a/src/dm/ve.dm.Transaction.js
+++ b/src/dm/ve.dm.Transaction.js
@@ -1535,3 +1535,131 @@
}
return offset;
 };
+
+/**
+ * Rebase this to happen after other
+ *
+ * @param {other} Transaction that acts on the document in the same start 
state as this
+ * @returns {other|null}
+ */
+ve.dm.Transaction.prototype.rebaseOnto( other ) {
+   var i, len, r, range, opEnd,
+   changedRanges = other.getChangedRanges(),
+   // changedRange pointer
+   r = 0,
+   // cumulative range length diff
+   diff = 0,
+   tx = this.clone();
+
+   opLoop:
+   for ( i = 0, len = tx.operations.length; i < len; i++ ) {
+   op = tx.operations[ i ];
+   while ( true ) {
+   if ( r >= changedRanges.length ) {
+   op.start += diff;
+   continue opLoop;
+   }
+   range = changedRanges[ r ];
+   if ( range.end < op.start ) {
+   diff += range.diff;
+   r++;
+   continue;
+   }
+   break;
+   }
+   // Else op.start <= range.end
+
+   opEnd = ( op.type === 'replace' ? op.remove : op.type === 
'retain' ? op.length : 1 );
+   if ( opEnd < range.start ) {
+   op.start += diff;
+   continue;
+   }
+   // Else [ range.start, range.end ] overlaps with [ op.start, 
op.end ]
+
+   if ( op.type === 'retain' && op.start <= range.start && opEnd 
>= range.end ) {
+   op.start += diff;
+   op.length += range.diff;
+   }
+
+   // Else conflict
+   debugger;
+   console.log( 'Conflict:', [ range.start, range.end ], [ 
op.start, opEnd ] );
+   return null;
+   }
+   return tx;
+};
+
+
+/**
+ * @returns {Object[]} List of { start: x, end: x, diff: x } sorted by start
+ */
+ve.dm.Transaction.prototype.getChangedRanges = function () {
+   var i, len, op,
+   // List of { start: x, end: x, diff: x }
+   changedRanges = [],
+   // Number of annotation changes in force
+   annotating = 0,
+   // Data pointer
+   d = 0,
+   // Cumulative range length diff
+   diff = 0,
+   // Data pointer at the start of this run of annotation changes
+   annStart = null,
+   // Length diff at the start of this run of annotation changes
+   annStartDiff = null;
+
+   for ( i = 0, len = this.operations.length; i < len; i++ ) {
+   op = this.operations[ i ];
+   if ( op.type === 'retain' ) {
+   d += op.length;
+   } else if ( op.type === 'replaceMetadata' ) {
+   // Mark the current item as modified
+   if ( !annotating ) {
+   changedRanges.push( {
+   start: d,
+   end: d + 1,
+   diff: 0
+   } );
+   }
+   } else if ( op.type === 'replace' ) {
+   if ( !annotating ) {
+   changedRanges.push( {
+   start: d,
+   end: d + op.remove.length,
+   diff: op.insert.length - 
op.remove.length
+   } );
+   }
+   d += op.remove.length;
+   diff += op.insert.length - op.remove.length;
+   } else if ( op.type === 'attribute' ) {
+   if ( !annotating ) {
+   changedRanges.push( {
+   start: d,
+   end: d + 1,
+   diff: 0
+   } );
+   }
+   } else if ( op.type === 'annotate' && ob.bias =

[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Don't fatal if a wiki is not in WikiMap

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

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

Change subject: Don't fatal if a wiki is not in WikiMap
..

Don't fatal if a wiki is not in WikiMap

Bug: T142229
Change-Id: I867673ad3ddbd94fbd65fff07f275ce8e9a03761
---
M includes/MassMessage.php
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/includes/MassMessage.php b/includes/MassMessage.php
index 615d8fc..38bacb6 100644
--- a/includes/MassMessage.php
+++ b/includes/MassMessage.php
@@ -85,9 +85,14 @@
$dbs = $wgConf->getLocalDatabases();
$mapping = [];
foreach ( $dbs as $dbname ) {
-   $url = WikiMap::getWiki( $dbname 
)->getCanonicalServer();
-   $site = self::getBaseUrl( $url );
-   $mapping[$site] = $dbname;
+   $wikiMap = WikiMap::getWiki( $dbname );
+   // It should always be in WikiMap, but 
be
+   // on the safe side... (T142229)
+   if ( $wikiMap ) {
+   $url = 
$wikiMap->getCanonicalServer();
+   $site = self::getBaseUrl( $url 
);
+   $mapping[$site] = $dbname;
+   }
}
$wgMemc->set( $key, $mapping, 60 * 60 );
} else {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fully restrict uploads on ms.wikipedia

2016-08-17 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review.

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

Change subject: Fully restrict uploads on ms.wikipedia
..

Fully restrict uploads on ms.wikipedia

Community consensus is to disable even from sysops the ability to upload
files locally.

Bug: T126944
Change-Id: Id6187cb467848a6d214764e1255ce4711d8fc932
---
M dblists/commonsuploads.dblist
M wmf-config/InitialiseSettings.php
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/dblists/commonsuploads.dblist b/dblists/commonsuploads.dblist
index 87da1d0..776fec7 100644
--- a/dblists/commonsuploads.dblist
+++ b/dblists/commonsuploads.dblist
@@ -316,7 +316,6 @@
 mrwikiquote
 mrwikisource
 mrwiktionary
-mswiki
 mswikibooks
 mswiktionary
 mtwiki
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6803349..dbfac5f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1220,6 +1220,7 @@
'jawiktionary' => false, // T13775
'loginwiki' => false,
'lrcwiki' => false, // T102026
+   'mswiki' => false, // T126944
'mswiktionary' => false, // T69152
'nlwikisource' => false, // T73403
'nlwikivoyage' => false, // T73403
@@ -1310,6 +1311,7 @@
'lrcwiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=lrc', // T102026
'metawiki' => false, // T52287
'mlwiki' => '/wiki/വിക്കിപീഡിയ:അപ്‌ലോഡ്',
+   'mswiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=ms' // T126944
'ndswiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nds',
'nlwiki' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl',
'nlwikisource' => 
'//commons.wikimedia.org/wiki/Special:UploadWizard?uselang=nl',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6187cb467848a6d214764e1255ce4711d8fc932
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...gui-deploy[production]: Merging from b79dd5d56160aabfdb424784d852f7153530782d:

2016-08-17 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged.

Change subject: Merging from b79dd5d56160aabfdb424784d852f7153530782d:
..


Merging from b79dd5d56160aabfdb424784d852f7153530782d:

Rewrite date parser in FormatterHelper

Change-Id: I62a44e2cdce2317dd34fc2d47f81372c00991d30
---
M embed.html
M i18n/bg.json
M i18n/ckb.json
M i18n/cy.json
M i18n/de.json
M i18n/diq.json
M i18n/el.json
M i18n/eo.json
M i18n/fr.json
M i18n/gl.json
M i18n/hans.json
M i18n/hant.json
M i18n/hy.json
M i18n/ia.json
M i18n/id.json
M i18n/it.json
M i18n/ja.json
M i18n/kn.json
M i18n/ko.json
M i18n/lb.json
M i18n/mk.json
M i18n/pt.json
M i18n/qqq.json
M i18n/ru.json
M i18n/sv.json
M i18n/te.json
M i18n/tr.json
M i18n/uk.json
M index.html
D js/embed.wdqs.min.0527dd47b1e3a31eaf84.js
A js/embed.wdqs.min.f61d16179fc9b9fb.js
D js/wdqs.min.56e3f055e95160fa0ead.js
A js/wdqs.min.cba3e1e019d4801d2360.js
33 files changed, 34 insertions(+), 34 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62a44e2cdce2317dd34fc2d47f81372c00991d30
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Switch to automatic unit test registration

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

Change subject: Switch to automatic unit test registration
..


Switch to automatic unit test registration

Also comment out a failing test for now

Change-Id: I68c4216ba29d4efa2584c3c330d1b16c2ace9d5c
---
M extension.json
M includes/Hooks.php
R tests/phpunit/BoundingBoxTest.php
R tests/phpunit/CoordTest.php
R tests/phpunit/GeoDataMathTest.php
R tests/phpunit/GeoSearchTest.php
R tests/phpunit/GlobeTest.php
R tests/phpunit/MiscGeoDataTest.php
R tests/phpunit/ParseCoordTest.php
R tests/phpunit/TagTest.php
10 files changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/extension.json b/extension.json
index fc93f79..4f9376e 100644
--- a/extension.json
+++ b/extension.json
@@ -38,7 +38,6 @@
"Hooks": {
"LoadExtensionSchemaUpdates": 
"GeoData\\Hooks::onLoadExtensionSchemaUpdates",
"ParserFirstCallInit": "GeoData\\Hooks::onParserFirstCallInit",
-   "UnitTestsList": "GeoData\\Hooks::onUnitTestsList",
"ArticleDeleteComplete": 
"GeoData\\Hooks::onArticleDeleteComplete",
"LinksUpdate": "GeoData\\Hooks::onLinksUpdate",
"FileUpload": "GeoData\\Hooks::onFileUpload",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 057cb56..6fb7b2f 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -70,16 +70,6 @@
}
 
/**
-* UnitTestsList hook handler
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
-*
-* @param array $files
-*/
-   public static function onUnitTestsList( &$files ) {
-   $files[] = dirname( __DIR__ ) . '/tests';
-   }
-
-   /**
 * ParserFirstCallInit hook handler
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
 *
diff --git a/tests/BoundingBoxTest.php b/tests/phpunit/BoundingBoxTest.php
similarity index 100%
rename from tests/BoundingBoxTest.php
rename to tests/phpunit/BoundingBoxTest.php
diff --git a/tests/CoordTest.php b/tests/phpunit/CoordTest.php
similarity index 100%
rename from tests/CoordTest.php
rename to tests/phpunit/CoordTest.php
diff --git a/tests/GeoDataMathTest.php b/tests/phpunit/GeoDataMathTest.php
similarity index 100%
rename from tests/GeoDataMathTest.php
rename to tests/phpunit/GeoDataMathTest.php
diff --git a/tests/GeoSearchTest.php b/tests/phpunit/GeoSearchTest.php
similarity index 91%
rename from tests/GeoSearchTest.php
rename to tests/phpunit/GeoSearchTest.php
index 523a90f..65e9096 100644
--- a/tests/GeoSearchTest.php
+++ b/tests/phpunit/GeoSearchTest.php
@@ -31,7 +31,7 @@
return [
[ [], 'coord, page or bbox are required' ],
[ [ 'gscoord' => '1|2', 'gspage' => 'foo' ], 'Must have 
only one of coord, page or bbox' ],
-   [ [ 'gsbbox' => '10|170|-10|-170' ], 'Fail if bounding 
box is too big' ],
+   // @fixme: [ [ 'gsbbox' => '10|170|-10|-170' ], 'Fail 
if bounding box is too big' ],
[ [ 'gsbbox' => '10|170|10|170' ], 'Fail if bounding 
box is too small' ],
];
}
diff --git a/tests/GlobeTest.php b/tests/phpunit/GlobeTest.php
similarity index 100%
rename from tests/GlobeTest.php
rename to tests/phpunit/GlobeTest.php
diff --git a/tests/MiscGeoDataTest.php b/tests/phpunit/MiscGeoDataTest.php
similarity index 100%
rename from tests/MiscGeoDataTest.php
rename to tests/phpunit/MiscGeoDataTest.php
diff --git a/tests/ParseCoordTest.php b/tests/phpunit/ParseCoordTest.php
similarity index 100%
rename from tests/ParseCoordTest.php
rename to tests/phpunit/ParseCoordTest.php
diff --git a/tests/TagTest.php b/tests/phpunit/TagTest.php
similarity index 100%
rename from tests/TagTest.php
rename to tests/phpunit/TagTest.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68c4216ba29d4efa2584c3c330d1b16c2ace9d5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
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] mediawiki...GeoData[master]: Switch to automatic unit test registration

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

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

Change subject: Switch to automatic unit test registration
..

Switch to automatic unit test registration

Also comment out a failing test for now

Change-Id: I68c4216ba29d4efa2584c3c330d1b16c2ace9d5c
---
M extension.json
M includes/Hooks.php
R tests/phpunit/BoundingBoxTest.php
R tests/phpunit/CoordTest.php
R tests/phpunit/GeoDataMathTest.php
R tests/phpunit/GeoSearchTest.php
R tests/phpunit/GlobeTest.php
R tests/phpunit/MiscGeoDataTest.php
R tests/phpunit/ParseCoordTest.php
R tests/phpunit/TagTest.php
10 files changed, 1 insertion(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index fc93f79..4f9376e 100644
--- a/extension.json
+++ b/extension.json
@@ -38,7 +38,6 @@
"Hooks": {
"LoadExtensionSchemaUpdates": 
"GeoData\\Hooks::onLoadExtensionSchemaUpdates",
"ParserFirstCallInit": "GeoData\\Hooks::onParserFirstCallInit",
-   "UnitTestsList": "GeoData\\Hooks::onUnitTestsList",
"ArticleDeleteComplete": 
"GeoData\\Hooks::onArticleDeleteComplete",
"LinksUpdate": "GeoData\\Hooks::onLinksUpdate",
"FileUpload": "GeoData\\Hooks::onFileUpload",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 057cb56..6fb7b2f 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -70,16 +70,6 @@
}
 
/**
-* UnitTestsList hook handler
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
-*
-* @param array $files
-*/
-   public static function onUnitTestsList( &$files ) {
-   $files[] = dirname( __DIR__ ) . '/tests';
-   }
-
-   /**
 * ParserFirstCallInit hook handler
 * @see https://www.mediawiki.org/wiki/Manual:Hooks/ParserFirstCallInit
 *
diff --git a/tests/BoundingBoxTest.php b/tests/phpunit/BoundingBoxTest.php
similarity index 100%
rename from tests/BoundingBoxTest.php
rename to tests/phpunit/BoundingBoxTest.php
diff --git a/tests/CoordTest.php b/tests/phpunit/CoordTest.php
similarity index 100%
rename from tests/CoordTest.php
rename to tests/phpunit/CoordTest.php
diff --git a/tests/GeoDataMathTest.php b/tests/phpunit/GeoDataMathTest.php
similarity index 100%
rename from tests/GeoDataMathTest.php
rename to tests/phpunit/GeoDataMathTest.php
diff --git a/tests/GeoSearchTest.php b/tests/phpunit/GeoSearchTest.php
similarity index 91%
rename from tests/GeoSearchTest.php
rename to tests/phpunit/GeoSearchTest.php
index 523a90f..65e9096 100644
--- a/tests/GeoSearchTest.php
+++ b/tests/phpunit/GeoSearchTest.php
@@ -31,7 +31,7 @@
return [
[ [], 'coord, page or bbox are required' ],
[ [ 'gscoord' => '1|2', 'gspage' => 'foo' ], 'Must have 
only one of coord, page or bbox' ],
-   [ [ 'gsbbox' => '10|170|-10|-170' ], 'Fail if bounding 
box is too big' ],
+   // @fixme: [ [ 'gsbbox' => '10|170|-10|-170' ], 'Fail 
if bounding box is too big' ],
[ [ 'gsbbox' => '10|170|10|170' ], 'Fail if bounding 
box is too small' ],
];
}
diff --git a/tests/GlobeTest.php b/tests/phpunit/GlobeTest.php
similarity index 100%
rename from tests/GlobeTest.php
rename to tests/phpunit/GlobeTest.php
diff --git a/tests/MiscGeoDataTest.php b/tests/phpunit/MiscGeoDataTest.php
similarity index 100%
rename from tests/MiscGeoDataTest.php
rename to tests/phpunit/MiscGeoDataTest.php
diff --git a/tests/ParseCoordTest.php b/tests/phpunit/ParseCoordTest.php
similarity index 100%
rename from tests/ParseCoordTest.php
rename to tests/phpunit/ParseCoordTest.php
diff --git a/tests/TagTest.php b/tests/phpunit/TagTest.php
similarity index 100%
rename from tests/TagTest.php
rename to tests/phpunit/TagTest.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68c4216ba29d4efa2584c3c330d1b16c2ace9d5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Use setMwGlobals() to preserve global state

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

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

Change subject: Use setMwGlobals() to preserve global state
..

Use setMwGlobals() to preserve global state

Change-Id: Ia82ef7fbfe48202af743bad5692fa79016ce9c75
---
M tests/phpunit/TagTest.php
1 file changed, 6 insertions(+), 13 deletions(-)


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

diff --git a/tests/phpunit/TagTest.php b/tests/phpunit/TagTest.php
index 0a53e19..b27fc6f 100644
--- a/tests/phpunit/TagTest.php
+++ b/tests/phpunit/TagTest.php
@@ -4,24 +4,18 @@
  * @group GeoData
  */
 class TagTest extends MediaWikiTestCase {
-   private $contLang;
 
public function setUp() {
-   $GLOBALS['wgDefaultDim'] = 1000; // reset to default
-   $this->contLang = $GLOBALS['wgContLang'];
parent::setUp();
-   }
-
-   public function tearDown() {
-   $GLOBALS['wgContLang'] = $this->contLang;
-   parent::tearDown();
+   $this->setMwGlobals( 'wgDefaultDim', 1000 ); // reset to default
}
 
private function setWarnings( $level ) {
global $wgGeoDataWarningLevel;
-   foreach ( array_keys( $wgGeoDataWarningLevel ) as $key ) {
-   $wgGeoDataWarningLevel[$key] = $level;
-   }
+
+   $this->setMwGlobals( 'wgGeoDataWarningLevel',
+   array_fill_keys( array_keys( $wgGeoDataWarningLevel ), 
$level )
+   );
}
 
private function assertParse( $input, $expected ) {
@@ -48,8 +42,7 @@
 */
public function testLooseTagParsing( $input, $expected, $langCode = 
false ) {
if ( $langCode ) {
-   global $wgContLang;
-   $wgContLang = Language::factory( $langCode );
+   $this->setMwGlobals( 'wgContLang', Language::factory( 
$langCode ) );
}
$this->setWarnings( 'none' );
$this->assertParse( $input, $expected );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia82ef7fbfe48202af743bad5692fa79016ce9c75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GeoData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Use strict comparisons in equalsTo() and fullyEqualsTo()

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

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

Change subject: Use strict comparisons in equalsTo() and fullyEqualsTo()
..

Use strict comparisons in equalsTo() and fullyEqualsTo()

This results in some updates not happening.
* Update tests massively to test in this area
* Ensure that parsing wikitext forces all the types

Change-Id: I48e02c998f812e1ec0e70ec2c25f8f2f232e33b2
---
M includes/Coord.php
M includes/CoordinatesParserFunction.php
M tests/phpunit/CoordTest.php
M tests/phpunit/TagTest.php
4 files changed, 114 insertions(+), 46 deletions(-)


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

diff --git a/includes/Coord.php b/includes/Coord.php
index 73d7e9c..fc09da5 100644
--- a/includes/Coord.php
+++ b/includes/Coord.php
@@ -20,12 +20,24 @@
$pageId,
$distance;
 
-   public function __construct( $lat, $lon, $globe = null ) {
+   /**
+* @param float $lat
+* @param float $lon
+* @param string|null $globe
+* @param array $extraFields
+*/
+   public function __construct( $lat, $lon, $globe = null, $extraFields = 
[] ) {
global $wgDefaultGlobe;
 
$this->lat = $lat;
$this->lon = $lon;
$this->globe = isset( $globe ) ? $globe : $wgDefaultGlobe;
+
+   foreach ( $extraFields as $key => $value ) {
+   if ( isset( self::$fieldMapping[$key] ) ) {
+   $this->$key = $value;
+   }
+   }
}
 
public static function newFromRow( $row ) {
@@ -54,9 +66,9 @@
 */
public function equalsTo( $coord, $precision = 6 ) {
return isset( $coord )
-   && round( $this->lat, $precision ) == round( $coord->lat, 
$precision )
-   && round( $this->lon, $precision ) == round( $coord->lon, 
$precision )
-   && $this->globe == $coord->globe;
+   && round( $this->lat, $precision ) == round( 
$coord->lat, $precision )
+   && round( $this->lon, $precision ) == round( 
$coord->lon, $precision )
+   && $this->globe === $coord->globe;
}
 
/**
@@ -67,16 +79,14 @@
 * @return Boolean
 */
public function fullyEqualsTo( $coord, $precision = 6 ) {
-   return isset( $coord )
-   && round( $this->lat, $precision ) == round( $coord->lat, 
$precision )
-   && round( $this->lon, $precision ) == round( $coord->lon, 
$precision )
-   && $this->globe == $coord->globe
-   && $this->primary == $coord->primary
-   && $this->dim == $coord->dim
-   && $this->type == $coord->type
-   && $this->name == $coord->name
-   && $this->country == $coord->country
-   && $this->region == $coord->region;
+   return $this->equalsTo( $coord, $precision )
+   && $this->globe === $coord->globe
+   && $this->primary == $coord->primary
+   && $this->dim === $coord->dim
+   && $this->type === $coord->type
+   && $this->name === $coord->name
+   && $this->country === $coord->country
+   && $this->region === $coord->region;
}
 
/**
diff --git a/includes/CoordinatesParserFunction.php 
b/includes/CoordinatesParserFunction.php
index 1061002..81aa5f1 100644
--- a/includes/CoordinatesParserFunction.php
+++ b/includes/CoordinatesParserFunction.php
@@ -184,12 +184,12 @@
}
}
if ( isset( $args['scale'] ) ) {
-   $coord->dim = $args['scale'] / 10;
+   $coord->dim = intval( $args['scale'] / 10 );
}
if ( isset( $args['dim'] ) ) {
$dim = $this->parseDim( $args['dim'] );
if ( $dim !== false ) {
-   $coord->dim = $dim;
+   $coord->dim = intval( $dim );
}
}
$coord->name = isset( $args['name'] ) ? $args['name'] : null;
@@ -286,7 +286,7 @@
if ( $lon === false ) {
return Status::newFatal( 'geodata-bad-longitude' );
}
-   return Status::newGood( new Coord( $lat, $lon, 
$globe->getName() ) );
+   return Status::newGood( new Coord( (float)$lat, (float)$lon, 
$globe->getName() ) );
}
 
private static function parseOneCoord( $parts, $min, $max, $suffixes ) {
diff --git a/tests/phpunit/CoordTest.php b/tests/phpunit/CoordTest.php
index 0328f12..775d649 100644
--- a/tests/phpunit/Co

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Use display name in category page subheadings if pro...

2016-08-17 Thread Liuxinyu970226 (Code Review)
Liuxinyu970226 has uploaded a new change for review.

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

Change subject: Revert "Use display name in category page subheadings if 
provided"
..

Revert "Use display name in category page subheadings if provided"

This reverts commit 8ccde8984913896d59a3c2b529768cfe74100afd.

For the reason, see T43720#2531092

Change-Id: Id1ace9599642a36b333c63eaeebab0537466e7bd
---
M includes/CategoryViewer.php
1 file changed, 6 insertions(+), 19 deletions(-)


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

diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index cf471d9..389b077 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -408,25 +408,10 @@
}
 
/**
-* Return pretty name which is display name if given and different from 
prefix text or
-* the unprefixed page name.
-*
-* @return string HTML safe name.
-*/
-   function getPrettyPageNameHtml() {
-   $displayTitle = $this->getOutput()->getPageTitle();
-   if ( $displayTitle === $this->getTitle()->getPrefixedText() ) {
-   return htmlspecialchars( $this->getTitle()->getText() );
-   } else {
-   return $displayTitle;
-   }
-   }
-
-   /**
 * @return string
 */
function getPagesSection() {
-   $name = $this->getPrettyPageNameHtml();
+   $ti = wfEscapeWikiText( $this->title->getText() );
# Don't show articles section if there are none.
$r = '';
 
@@ -442,7 +427,7 @@
 
if ( $rescnt > 0 ) {
$r = "\n";
-   $r .= '' . $this->msg( 'category_header' 
)->rawParams( $name )->parse() . "\n";
+   $r .= '' . $this->msg( 'category_header', $ti 
)->parse() . "\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'page' );
$r .= $this->formatList( $this->articles, 
$this->articles_start_char );
@@ -456,7 +441,6 @@
 * @return string
 */
function getImageSection() {
-   $name = $this->getPrettyPageNameHtml();
$r = '';
$rescnt = $this->showGallery ? $this->gallery->count() : count( 
$this->imgsNoGallery );
$dbcnt = $this->cat->getFileCount();
@@ -466,7 +450,10 @@
if ( $rescnt > 0 ) {
$r .= "\n";
$r .= '' .
-   $this->msg( 'category-media-header' 
)->rawParams( $name )->parse() .
+   $this->msg(
+   'category-media-header',
+   wfEscapeWikiText( 
$this->title->getText() )
+   )->text() .
"\n";
$r .= $countmsg;
$r .= $this->getSectionPagingLinks( 'file' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id1ace9599642a36b333c63eaeebab0537466e7bd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liuxinyu970226 <541329...@qq.com>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: put installserver::dhcp on install1001, install2001

2016-08-17 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: put installserver::dhcp on install1001, install2001
..

put installserver::dhcp on install1001, install2001

After splitting installserver::dhcp into a seperate role,
and making sure only one server is configured as the currently
running server, add DHCP servers on install1001 and install2001.

Bug: T132757
Change-Id: Id9ff2442d13b0a1da9ea02707f7daa04d6f89a8b
---
M manifests/site.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/305431/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 27ad201..dee2c8d 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1322,7 +1322,7 @@
 
 # partially replaces carbon (T132757)
 node 'install1001.wikimedia.org' {
-role installserver::tftp_server, aptrepo::wikimedia
+role installserver::tftp_server, installserver::dhcp, aptrepo::wikimedia
 $cluster = 'misc'
 
 interface::add_ip6_mapped { 'main':
@@ -1333,7 +1333,7 @@
 }
 
 node 'install2001.wikimedia.org' {
-role installserver::tftp_server
+role installserver::tftp_server, installserver::dhcp
 $cluster = 'misc'
 $ganglia_aggregator = true
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Added HTML Email template

2016-08-17 Thread Galorefitz (Code Review)
Galorefitz has uploaded a new change for review.

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

Change subject: Added HTML Email template
..

Added HTML Email template

Added a test template from sendwithus for the HTML part of the multipart
emails. Images are to be added to it, but this will be done in a later
patch.

Bug: T135484
Change-Id: I702119fbdaca7e272b9577ccfc1bb608147ea67d
---
M includes/mail/EmailNotification.php
A includes/templates/HTMLEmail.mustache
M includes/user/User.php
3 files changed, 197 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/305430/1

diff --git a/includes/mail/EmailNotification.php 
b/includes/mail/EmailNotification.php
index 28eb992..eee1324 100644
--- a/includes/mail/EmailNotification.php
+++ b/includes/mail/EmailNotification.php
@@ -543,7 +543,9 @@
public static function transformContentToHTML( $content ) {
$parser = new Parser;
$output = $parser->parse( $content, new Title, new 
ParserOptions );
-   return $output->mText;
+   $templateParser = new TemplateParser();
+   $content = $templateParser->processTemplate( 'HTMLEmail', [ 
'body' => $output->mText ] );
+   return $content;
}
 
/**
diff --git a/includes/templates/HTMLEmail.mustache 
b/includes/templates/HTMLEmail.mustache
new file mode 100644
index 000..a134995
--- /dev/null
+++ b/includes/templates/HTMLEmail.mustache
@@ -0,0 +1,192 @@
+
+http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
+http://www.w3.org/1999/xhtml"; 
xmlns="http://www.w3.org/1999/xhtml"; lang="en" xml:lang="en" style="min-height: 
100%; background: #f6f6f6;" xml:lang="en">
+   
+   
+   
+   
+   
+   
+   @media only screen and (max-width: 596px) {
+   table.body table.container .hide-for-large {
+   display: block !important; width: auto 
!important; overflow: visible !important;
+   }
+   table.body table.container .row.hide-for-large {
+   display: table !important; width: 100% 
!important;
+   }
+   table.body table.container .row.hide-for-large {
+   display: table !important; width: 100% 
!important;
+   }
+   table.body table.container .show-for-large {
+   display: none !important; width: 0; mso-hide: 
all; overflow: hidden;
+   }
+   table.body img {
+   width: auto !important; height: auto !important;
+   }
+   table.body center {
+   min-width: 0 !important;
+   }
+   table.body .container {
+   width: 95% !important;
+   }
+   table.body .columns {
+   height: auto !important; -moz-box-sizing: 
border-box; -webkit-box-sizing: border-box; box-sizing: border-box; 
padding-left: 16px !important; padding-right: 16px !important;
+   }
+   table.body .columns .column {
+   padding-left: 0 !important; padding-right: 0 
!important;
+   }
+   table.body .columns .columns {
+   padding-left: 0 !important; padding-right: 0 
!important;
+   }
+   table.body .collapse .columns {
+   padding-left: 0 !important; padding-right: 0 
!important;
+   }
+   td.small-12 {
+   display: inline-block !important; width: 100% 
!important;
+   }
+   th.small-12 {
+   display: inline-block !important; width: 100% 
!important;
+   }
+   .columns td.small-12 {
+   display: block !important; width: 100% 
!important;
+   }
+   .columns th.small-12 {
+   display: block !important; width: 100% 
!important;
+   }
+   table.body table.columns td.expander {
+   display: none !important;
+   }
+   table.body table.columns th.expander {
+   display: none !important;
+   }
+   }
+   
+   
+   
+   
+   
+ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: DHCP: make configurable in Hiera which is the running server

2016-08-17 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: DHCP: make configurable in Hiera which is the running server
..

DHCP: make configurable in Hiera which is the running server

Make it configurable in Hiera which server is the currently running
DHCP server. So that we can apply installserver::dhcp on multiple servers
and just switch here, avoiding that multiple DHCP servers are running
at a time.

Bug: T132757
Change-Id: I4f18510bc454650bb31775d851aff551808cca98
---
M hieradata/role/common/installserver/dhcp.yaml
M modules/install_server/manifests/dhcp_server.pp
2 files changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/hieradata/role/common/installserver/dhcp.yaml 
b/hieradata/role/common/installserver/dhcp.yaml
index e7b3921..38fd120 100644
--- a/hieradata/role/common/installserver/dhcp.yaml
+++ b/hieradata/role/common/installserver/dhcp.yaml
@@ -3,3 +3,5 @@
 value: standard
 admin::groups:
   - datacenter-ops
+
+active_dhcp_server: 'carbon'
diff --git a/modules/install_server/manifests/dhcp_server.pp 
b/modules/install_server/manifests/dhcp_server.pp
index 1c27e5f..c6ee9c5 100644
--- a/modules/install_server/manifests/dhcp_server.pp
+++ b/modules/install_server/manifests/dhcp_server.pp
@@ -27,8 +27,16 @@
 ensure => present,
 }
 
+$dhcp_active_server = hiera('dhcp_active_server')
+
+if $::hostname == $dhcp_active_server {
+$ensure_dhcp = 'running'
+} else {
+$ensure_dhcp = 'stopped'
+}
+
 service { 'isc-dhcp-server':
-ensure=> running,
+ensure=> $ensure_dhcp,
 require   => [
 Package['isc-dhcp-server'],
 File['/etc/dhcp']

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: New attachAccount maintenance script

2016-08-17 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: New attachAccount maintenance script
..

New attachAccount maintenance script

New maintenance script for attaching dangling local user accounts. Takes
a file with one username per line and finds and attaches any unattached
local accounts for that user.

Bug: T141020
Change-Id: I0c783ad1c7629f2267b76504c5d4703e621c413f
---
A maintenance/attachAccount.php
1 file changed, 167 insertions(+), 0 deletions(-)


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

diff --git a/maintenance/attachAccount.php b/maintenance/attachAccount.php
new file mode 100644
index 000..568c709
--- /dev/null
+++ b/maintenance/attachAccount.php
@@ -0,0 +1,167 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if ( $IP === false ) {
+   $IP = __DIR__ . '/../../..';
+}
+require_once( "$IP/maintenance/Maintenance.php" );
+
+/**
+ * @copyright © 2016 Wikimedia Foundation and contributors.
+ */
+class AttachAccount extends Maintenance {
+   public function __construct() {
+   parent::__construct();
+   $this->mDescription =
+   "Attaches the specified usernames to a global account";
+   $this->start = microtime( true );
+   $this->missing = 0;
+   $this->partial = 0;
+   $this->attached = 0;
+   $this->ok = 0;
+   $this->total = 0;
+   $this->dbBackground = null;
+   $this->batchSize = 1000;
+   $this->dryRun = false;
+   $this->quiet = false;
+
+   $this->addOption( 'userlist',
+   'List of usernames to attach, one per line', true, true 
);
+   $this->addOption( 'dry-run', 'Do not update database' );
+   $this->addOption( 'quiet',
+   'Only report database changes and final statistics' );
+   }
+
+   public function execute() {
+   $this->dbBackground = CentralAuthUtils::getCentralSlaveDB();
+
+   $this->dryRun = $this->hasOption( 'dry-run' );
+   $this->quiet = $this->hasOption( 'quiet' );
+
+   $list = $this->getOption( 'userlist' );
+   if ( !is_file( $list ) ) {
+   $this->output( "ERROR - File not found: {$list}" );
+   exit( 1 );
+   }
+   $file = fopen( $list, 'r' );
+   if ( $file === false ) {
+   $this->output( "ERROR - Could not open file: {$list}" );
+   exit( 1 );
+   }
+   while( strlen( $username = trim( fgets( $file ) ) ) ) {
+   $this->attach( $username );
+   if ( $this->total % $this->batchSize == 0 ) {
+   $this->output( "Waiting for slaves to catch up 
... " );
+   CentralAuthUtils::waitForSlaves();
+   $this->output( "done\n" );
+   }
+   }
+   fclose( $file );
+
+   $this->report();
+   $this->output( "done.\n" );
+   }
+
+   protected function attach( $username ) {
+   $this->total++;
+   if ( !$this->quiet ) {
+   $this->output( "CentralAuth account attach for: 
{$username}\n");
+   }
+   $central = new CentralAuthUser(
+   $username, CentralAuthUser::READ_LATEST );
+   try {
+   $unattached = $central->queryUnattached();
+   } catch ( Exception $e ) {
+   // This might happen due to localnames inconsistencies 
(bug 67350)
+   $this->output(
+   "ERROR: Fetching unattached accounts for 
{$username} failed.\n"
+   );
+   return;
+   }
+
+   if ( count( $unattached ) === 0 ) {
+   $this->ok++;
+   if ( !$this->quiet ) {
+   $this->output( "OK: {$username}\n" );
+   }
+   return;
+   }
+
+   if ( !$central->exists() ) {
+   $this->missing++;
+   $this->output( "ERROR: No CA account found for: 
{$username}\n" );
+   return;
+   }
+
+   foreach ( $unattached as $wiki => $local ) {
+   $this->output( "ATTACHING: {$username}@{$wiki}\n" );
+   if ( !$this->dryRun ) {
+   $central->attach( $wiki, 'login', false );
+   }
+   }
+
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: dynamicproxy: puppetize appendfilename setting

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

Change subject: dynamicproxy: puppetize appendfilename setting
..


dynamicproxy: puppetize appendfilename setting

Please note this was somehow set in redis.conf on all toollabs proxies
before the transition to redis::instance and then left behind.

This will just add an explicit setting that is already in place.

Change-Id: I13cc266c4b8c1159eec6783462006cb0a57f16c2
---
M modules/dynamicproxy/manifests/init.pp
1 file changed, 8 insertions(+), 6 deletions(-)

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



diff --git a/modules/dynamicproxy/manifests/init.pp 
b/modules/dynamicproxy/manifests/init.pp
index 7f5b41e..fe11c02 100644
--- a/modules/dynamicproxy/manifests/init.pp
+++ b/modules/dynamicproxy/manifests/init.pp
@@ -41,17 +41,19 @@
 
 $resolver = join($::nameservers, ' ')
 
+$redis_port = '6379'
 if $redis_replication and $redis_replication[$::hostname] {
 $slave_host = $redis_replication[$::hostname]
-$slaveof = "${slave_host} 6379"
+$slaveof = "${slave_host} ${redis_port}"
 }
 
-redis::instance { '6379':
+redis::instance { $redis_port:
 settings => {
-appendonly => 'yes',
-maxmemory  => $redis_maxmemory,
-slaveof=> $slaveof,
-dir=> '/var/lib/redis',
+appendonly => 'yes',
+appendfilename => "${::hostname}-${redis_port}.aof",
+maxmemory  => $redis_maxmemory,
+slaveof=> $slaveof,
+dir=> '/var/lib/redis',
 },
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13cc266c4b8c1159eec6783462006cb0a57f16c2
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Rush 
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] mediawiki...MultimediaViewer[master]: Update beta test URL to use HTTPS

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

Change subject: Update beta test URL to use HTTPS
..


Update beta test URL to use HTTPS

Maybe related to T142423. Maybe not, but no harm in it in any case.

Change-Id: I121fedbcc2c7546e1be138f4d966003d975834bb
---
M tests/browser/environments.yml
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  Gergő Tisza: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index 2fec130..caa5168 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -25,7 +25,7 @@
 
 beta:
   browser_useragent: test-user-agent
-  mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/
+  mediawiki_url: https://en.wikipedia.beta.wmflabs.org/wiki/
   mediawiki_user: Selenium_user
   # mediawiki_password: SET THIS IN THE ENVIRONMENT!
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I121fedbcc2c7546e1be138f4d966003d975834bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Update package.json

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

Change subject: Update package.json
..


Update package.json

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

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



diff --git a/package.json b/package.json
index 2109d59..952c638 100644
--- a/package.json
+++ b/package.json
@@ -4,11 +4,10 @@
 "test": "grunt test"
   },
   "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
-"grunt-contrib-jshint": "0.11.3",
-"grunt-banana-checker": "0.4.0",
+"grunt": "1.0.1",
+"grunt-contrib-jshint": "1.0.0",
+"grunt-banana-checker": "0.5.0",
 "grunt-jsonlint": "1.0.7",
-"grunt-jscs": "2.6.0"
+"grunt-jscs": "2.8.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45896d0dced8c171c5c2bcf94a3a318522ebfb88
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use IDENTIFIER constants instead of strings

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

Change subject: Use IDENTIFIER constants instead of strings
..


Use IDENTIFIER constants instead of strings

And fix a function name.  Cleanup from If99b24c017175dc3f41b

Change-Id: I044599a80ca6885236c495795d8b974af6164400
---
M adyen_gateway/adyen_gateway.body.php
M adyen_gateway/adyen_resultswitcher.body.php
M amazon_gateway/amazon_gateway.body.php
M astropay_gateway/astropay_gateway.body.php
M astropay_gateway/astropay_resultswitcher.body.php
M gateway_common/DataValidator.php
M gateway_common/GatewayPage.php
M globalcollect_gateway/globalcollect_gateway.body.php
M globalcollect_gateway/globalcollect_resultswitcher.body.php
M paypal_gateway/express_checkout/paypal_express_gateway.body.php
M paypal_gateway/express_checkout/paypal_express_resultswitcher.body.php
M paypal_gateway/legacy/paypal_legacy_gateway.body.php
M tests/phpunit/includes/TestingGatewayPage.php
13 files changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/adyen_gateway/adyen_gateway.body.php 
b/adyen_gateway/adyen_gateway.body.php
index 4290acb..cc08e60 100644
--- a/adyen_gateway/adyen_gateway.body.php
+++ b/adyen_gateway/adyen_gateway.body.php
@@ -22,7 +22,7 @@
  */
 class AdyenGateway extends GatewayPage {
 
-   protected $gatewayName = 'adyen';
+   protected $gatewayIdentifier = AdyenAdapter::IDENTIFIER;
 
/**
 * TODO: Finish Adyen error handling
diff --git a/adyen_gateway/adyen_resultswitcher.body.php 
b/adyen_gateway/adyen_resultswitcher.body.php
index 70b43a9..e2b24bd 100644
--- a/adyen_gateway/adyen_resultswitcher.body.php
+++ b/adyen_gateway/adyen_resultswitcher.body.php
@@ -2,7 +2,7 @@
 
 class AdyenGatewayResult extends GatewayPage {
 
-   protected $gatewayName = 'adyen';
+   protected $gatewayIdentifier = AdyenAdapter::IDENTIFIER;
 
protected function handleRequest() {
$this->handleResultRequest();
diff --git a/amazon_gateway/amazon_gateway.body.php 
b/amazon_gateway/amazon_gateway.body.php
index 9368052..0ad2da9 100644
--- a/amazon_gateway/amazon_gateway.body.php
+++ b/amazon_gateway/amazon_gateway.body.php
@@ -18,7 +18,7 @@
 
 class AmazonGateway extends GatewayPage {
 
-   protected $gatewayName = 'amazon';
+   protected $gatewayIdentifier = AmazonAdapter::IDENTIFIER;
 
/**
 * Show the special page
diff --git a/astropay_gateway/astropay_gateway.body.php 
b/astropay_gateway/astropay_gateway.body.php
index 4ab9b5a..f45e16f 100644
--- a/astropay_gateway/astropay_gateway.body.php
+++ b/astropay_gateway/astropay_gateway.body.php
@@ -22,7 +22,7 @@
  */
 class AstroPayGateway extends GatewayPage {
 
-   protected $gatewayName = 'astropay';
+   protected $gatewayIdentifier = AstroPayAdapter::IDENTIFIER;
 
protected function handleRequest() {
$this->getOutput()->addModules( 'ext.donationInterface.forms' );
diff --git a/astropay_gateway/astropay_resultswitcher.body.php 
b/astropay_gateway/astropay_resultswitcher.body.php
index 4943978..4e3df9d 100644
--- a/astropay_gateway/astropay_resultswitcher.body.php
+++ b/astropay_gateway/astropay_resultswitcher.body.php
@@ -2,7 +2,7 @@
 
 class AstroPayGatewayResult extends GatewayPage {
 
-   protected $gatewayName = 'astropay';
+   protected $gatewayIdentifier = AstroPayAdapter::IDENTIFIER;
 
protected function handleRequest() {
$this->adapter->setCurrentTransaction( 'ProcessReturn' );
diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php
index f2b3721..51c3f79 100644
--- a/gateway_common/DataValidator.php
+++ b/gateway_common/DataValidator.php
@@ -429,7 +429,7 @@
protected static function validate_gateway( $value ){
global $wgDonationInterfaceGatewayAdapters;
 
-   return key_exists( $value, $wgDonationInterfaceGatewayAdapters 
);
+   return array_key_exists( $value, 
$wgDonationInterfaceGatewayAdapters );
}
 
/**
diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index b9cd547..c7bc830 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -27,11 +27,11 @@
 abstract class GatewayPage extends UnlistedSpecialPage {
 
/**
-* Derived classes must override this with the name of the gateway
+* Derived classes must override this with the identifier of the gateway
 * as set in GatewayAdapter::IDENTIFIER
 * @var string
 */
-   protected $gatewayName;
+   protected $gatewayIdentifier;
 
/**
 * An array of form errors
@@ -75,7 +75,7 @@
$wgLang = $this->getContext()->getLanguage(); // 
BackCompat
}
 
-   $gatewayName = $this->getGatewayName();
+   $gatewayName = $this->getGatewa

[MediaWiki-commits] [Gerrit] operations/puppet[production]: site.pp: fix/add some node comments

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

Change subject: site.pp: fix/add some node comments
..


site.pp: fix/add some node comments

- chromium/hydrogen are not url-downloaders anymore
- gerrit server is now generic gerrit.wikimedia.org
- explain "sca"/"scb"
- rutherfordium is people.wm.org for all shell users
- uranium is ganglia web ui

Change-Id: If95210bc143012313e665faee1be8bfebe5874da
---
M manifests/site.pp
1 file changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index f611b4d..3148e5b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -239,7 +239,7 @@
 include standard
 }
 
-# DNS recursor, URL downloader
+# DNS recursor
 node 'chromium.wikimedia.org' {
 role dnsrecursor, ntp
 include standard
@@ -1182,7 +1182,7 @@
 include standard
 }
 
-# DNS recursor, URL downloader
+# DNS recursor
 node 'hydrogen.wikimedia.org' {
 role dnsrecursor, ntp
 include standard
@@ -1539,8 +1539,6 @@
 
 # New https://www.mediawiki.org/wiki/Gerrit
 node 'lead.wikimedia.org' {
-# Note: whenever moving Gerrit to another server you will need
-# to update the role::zuul::configuration variable 'gerrit_server'
 role gerrit::server
 
 include standard
@@ -2574,6 +2572,7 @@
 }
 }
 
+# people.wikimedia.org, for all shell users
 node 'rutherfordium.eqiad.wmnet' {
 role microsites::peopleweb, backup::host
 include base::firewall
@@ -2618,10 +2617,12 @@
 
 }
 
+# Services 'A'
 node /^sca[12]00[12]\.(eqiad|codfw)\.wmnet$/ {
 role sca
 }
 
+# Services 'B'
 node /^scb[12]00[12]\.(eqiad|codfw)\.wmnet$/ {
 role scb
 }
@@ -2842,6 +2843,7 @@
 
 }
 
+# Ganglia Web UI
 node 'uranium.wikimedia.org' {
 $ganglia_aggregator = true
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: site.pp: fix/add some node comments

2016-08-17 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: site.pp: fix/add some node comments
..

site.pp: fix/add some node comments

- chromium/hydrogen are not url-downloaders anymore
- gerrit server is now generic gerrit.wikimedia.org
- explain "sca"/"scb"
- ...

Change-Id: If95210bc143012313e665faee1be8bfebe5874da
---
M manifests/site.pp
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/305427/1

diff --git a/manifests/site.pp b/manifests/site.pp
index f611b4d..3148e5b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -239,7 +239,7 @@
 include standard
 }
 
-# DNS recursor, URL downloader
+# DNS recursor
 node 'chromium.wikimedia.org' {
 role dnsrecursor, ntp
 include standard
@@ -1182,7 +1182,7 @@
 include standard
 }
 
-# DNS recursor, URL downloader
+# DNS recursor
 node 'hydrogen.wikimedia.org' {
 role dnsrecursor, ntp
 include standard
@@ -1539,8 +1539,6 @@
 
 # New https://www.mediawiki.org/wiki/Gerrit
 node 'lead.wikimedia.org' {
-# Note: whenever moving Gerrit to another server you will need
-# to update the role::zuul::configuration variable 'gerrit_server'
 role gerrit::server
 
 include standard
@@ -2574,6 +2572,7 @@
 }
 }
 
+# people.wikimedia.org, for all shell users
 node 'rutherfordium.eqiad.wmnet' {
 role microsites::peopleweb, backup::host
 include base::firewall
@@ -2618,10 +2617,12 @@
 
 }
 
+# Services 'A'
 node /^sca[12]00[12]\.(eqiad|codfw)\.wmnet$/ {
 role sca
 }
 
+# Services 'B'
 node /^scb[12]00[12]\.(eqiad|codfw)\.wmnet$/ {
 role scb
 }
@@ -2842,6 +2843,7 @@
 
 }
 
+# Ganglia Web UI
 node 'uranium.wikimedia.org' {
 $ganglia_aggregator = true
 

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Use SmashPig config shortcuts, reset Context

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

Change subject: Use SmashPig config shortcuts, reset Context
..


Use SmashPig config shortcuts, reset Context

Otherwise multiple SP-involved tests interfere.

Change-Id: Ia1ec3275f51024dcd7e7212bbd9c2f4fe7af1ce6
---
M sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
M sites/all/modules/wmf_audit/wmf_audit.module
M sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
3 files changed, 12 insertions(+), 17 deletions(-)

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



diff --git a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php 
b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
index cd71ec3..fdf624e 100644
--- a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
@@ -1,7 +1,7 @@
  __DIR__ . '/data/logs/',
diff --git a/sites/all/modules/wmf_audit/wmf_audit.module 
b/sites/all/modules/wmf_audit/wmf_audit.module
index 3fd525f..2aab73e 100644
--- a/sites/all/modules/wmf_audit/wmf_audit.module
+++ b/sites/all/modules/wmf_audit/wmf_audit.module
@@ -2,7 +2,6 @@
 
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
-use SmashPig\Core\Logging\Logger;
 
 define('WMF_AUDIT_PAYMENTS_LOGS_DIR', '/usr/local/src/logs/');
 
@@ -38,16 +37,8 @@
  * @param array $options Runtime parameters
  */
 function wmf_audit_main( $gateway, $options ) {
-$settings_file = DRUPAL_ROOT . '/sites/default/smashpig.settings.php';
-if ( !file_exists( $settings_file ) ) {
-$settings_file = null;
-}
-$config = new Configuration( $gateway );
-Context::init( $config );
-Logger::init(
-$config->val( 'logging/root-context' ),
-$config->val( 'logging/log-level' ),
-$config,
+Context::initWithLogger(
+new Configuration( $gateway ),
 "{$gateway}_audit"
 );
 
diff --git 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
index 6fd17bc..c2be85f 100644
--- 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
+++ 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
@@ -1,5 +1,7 @@
 roles = array( DRUPAL_AUTHENTICATED_RID => 'authenticated user' 
);
 }
 
+public function tearDown() {
+   Context::set(); // Nullify any SmashPig context for the next run
+   parent::tearDown();
+   }
+
/**
 * Temporarily set foreign exchange rates to known values
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia1ec3275f51024dcd7e7212bbd9c2f4fe7af1ce6
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update SmashPig and PHP-Queue

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

Change subject: Update SmashPig and PHP-Queue
..


Update SmashPig and PHP-Queue

Gets the new queue consumer stuff

Change-Id: Ie93e0ec787976eeda8ef3de9a2b08fa6c8647704
---
M composer.lock
1 file changed, 16 insertions(+), 14 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 9ca2dfb..1b3f7a6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -44,7 +44,7 @@
 "payment",
 "payments"
 ],
-"time": "2015-10-07 20:06:54"
+"time": "2015-10-07 15:01:25"
 },
 {
 "name": "clio/clio",
@@ -93,27 +93,23 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "da00b03c229b4437b5cb69427b8e5b9adbffaa3f"
+"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
 },
 "require": {
-"clio/clio": "@stable",
+"clio/clio": "0.1.*",
 "monolog/monolog": "~1.3",
 "php": ">=5.3.0"
 },
 "require-dev": {
-"amazonwebservices/aws-sdk-for-php": "dev-master",
-"aws/aws-sdk-php": "dev-master",
-"ext-memcache": "*",
-"iron-io/iron_mq": "dev-master",
-"microsoft/windowsazure": "dev-master",
-"mrpoundsign/pheanstalk-5.3": "dev-master",
-"predis/predis": "1.*"
+"jakub-onderka/php-parallel-lint": "0.9",
+"phpunit/phpunit": "4.4.*"
 },
 "suggest": {
 "Respect/Rest": "For a REST server to post job data",
 "amazonwebservices/aws-sdk-for-php": "For AWS SQS backend 
support (legacy version)",
 "aws/aws-sdk-php": "For AWS SQS backend support",
 "clio/clio": "Support for daemonizing PHP CLI runner",
+"ext-memcache": "*",
 "fusesource/stomp-php": "For the STOMP backend",
 "iron-io/iron_mq": "For IronMQ backend support",
 "microsoft/windowsazure": "For Windows Azure Service Bus 
backend support",
@@ -132,6 +128,12 @@
 "PHPQueue": "src/"
 }
 },
+"scripts": {
+"test": [
+"parallel-lint . --exclude vendor",
+"phpunit"
+]
+},
 "license": [
 "MIT"
 ],
@@ -147,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2015-06-11 20:26:19"
+"time": "2016-08-05 19:16:32"
 },
 {
 "name": "cogpowered/finediff",
@@ -813,7 +815,7 @@
 "GPL-2.0"
 ],
 "description": "Wikimedia Foundation payment processing library",
-"time": "2015-10-20 20:46:30"
+"time": "2015-10-21 13:44:26"
 },
 {
 "name": "wikimedia/smash-pig",
@@ -821,7 +823,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git";,
-"reference": "601f1fe54ff7c889a5a2202d8f5f88a5b49a0541"
+"reference": "6746e0f6393f23c0351b0379de94e6b2e861b359"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -872,7 +874,7 @@
 "donations",
 "payments"
 ],
-"time": "2016-08-02 15:07:20"
+"time": "2016-08-08 21:50:08"
 },
 {
 "name": "zordius/lightncandy",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie93e0ec787976eeda8ef3de9a2b08fa6c8647704
Gerrit-PatchSet: 3
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add order_id and more to audit messages

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

Change subject: Add order_id and more to audit messages
..


Add order_id and more to audit messages

Need order_id to delete from pending message queue. Also, can get more
information from JSON in the logs.

Bug: T141484
Change-Id: I7fab992a001b41871b324b01aaa6bd1f667652db
---
M sites/all/modules/wmf_audit/BaseAuditProcessor.php
M sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
M sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
M sites/all/modules/wmf_audit/tests/AstroPayAuditTest.php
M sites/all/modules/wmf_audit/tests/data/logs/payments-adyen-20160218.gz
M 
sites/all/modules/wmf_audit/tests/data/logs/payments-amazon_gateway-20151001.gz
M sites/all/modules/wmf_audit/tests/data/logs/payments-astropay-20150617.gz
7 files changed, 20 insertions(+), 8 deletions(-)

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



diff --git a/sites/all/modules/wmf_audit/BaseAuditProcessor.php 
b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
index 46544e2..c53049f 100644
--- a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
+++ b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
@@ -675,6 +675,7 @@

wmf_audit_echo( '.' );

continue;
}
+   
$data['order_id'] = $order_id;
//if we have 
data at this point, it means we have a match in the logs
$found += 1;
 
@@ -1186,11 +1187,14 @@
'email',
'fname' => 'first_name',
'gateway',
+   'gateway_account',
'language',
'lname' => 'last_name',
'payment_method',
'payment_submethod',
'user_ip',
+   'utm_campaign',
+   'utm_medium',
'utm_source',
);
$normal = array();
diff --git a/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php 
b/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
index 2f1a00a..73dfb9d 100644
--- a/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
@@ -110,15 +110,17 @@
'fee' => '0.24',
'first_name' => 'asdf',
'gateway' => 'adyen',
+   'gateway_account' => 
'TestMerchant',
'gateway_txn_id' => 
'5364893193133131',
'gross' => '1.00',
'language' => 'en',
'last_name' => 'asdff',
+   'order_id' => '33992337.0',
'payment_method' => 'cc',
'payment_submethod' => 'visa',
'user_ip' => '77.177.177.77',
-   'utm_campaign' => 'adyen_audit',
-   'utm_medium' => 'adyen_audit',
+   'utm_campaign' => 
'C13_en.wikipedia.org',
+   'utm_medium' => 'sidebar',
'utm_source' => '..cc',
'settled_gross' => '0.76',
'settled_currency' => 'USD',
diff --git a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php 
b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
index 131fb87..cd71ec3 100644
--- a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
@@ -94,15 +94,17 @@
'fee' => '0.59',
'first_name' => 'Test',
'gateway' => 'amazon',
+   'gateway_account' => 'default',
'gateway_txn_id' => 
'P01-1488694-1234567-C034811',
'gross' => '10.00',
'language' => 'en',
'last_name' =

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Not using referrer from messages

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

Change subject: Not using referrer from messages
..


Not using referrer from messages

We store referrer right at the start in the contribution_tracking table.
There's no reason to look for it in messages, and we don't do anything
with it if we find it.  This takes it out of test data and stops looking
for it in a couple spots.

We leave the dummy value being used to instantiate a gateway adapter,
so the DonationData doesn't try to look for a request header. (maybe fixed?)

Bug: T110564
Change-Id: I8762f03bf51bd0e3bdbe45b38f4856f305dce232
---
M sites/all/modules/queue2civicrm/tests/data/donation.json
M sites/all/modules/queue2civicrm/tests/includes/Message.php
M sites/all/modules/wmf_audit/BaseAuditProcessor.php
M sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
M sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
M sites/all/modules/wmf_audit/tests/AstroPayAuditTest.php
M sites/all/modules/wmf_audit/tests/data/logs/payments-adyen-20160218.gz
M 
sites/all/modules/wmf_audit/tests/data/logs/payments-amazon_gateway-20151001.gz
M sites/all/modules/wmf_audit/tests/data/logs/payments-astropay-20150617.gz
M sites/all/modules/wmf_audit/wmf_audit.module
10 files changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/sites/all/modules/queue2civicrm/tests/data/donation.json 
b/sites/all/modules/queue2civicrm/tests/data/donation.json
index db6b656..315673c 100644
--- a/sites/all/modules/queue2civicrm/tests/data/donation.json
+++ b/sites/all/modules/queue2civicrm/tests/data/donation.json
@@ -28,7 +28,6 @@
 "postal_code": "11122",
 "postal_code_2": "11122",
 "premium_language": "en",
-"referrer": 
"http://payments.local.net/index.php/Special:GlobalCollectGateway?uselang=en&masthead=none&form_name=RapidHtml&text_template=2010/JimmyQuote-green&appeal=JimmyQuote-green&language=ar&ffname=cc_vma&amount=12.34¤cy_code=BRL";,
 "response": "Original Response Status (pre-SET_PAYMENT): 600",
 "size": "",
 "state_province_2": "AL",
diff --git a/sites/all/modules/queue2civicrm/tests/includes/Message.php 
b/sites/all/modules/queue2civicrm/tests/includes/Message.php
index 3a68e67..f3620ff 100644
--- a/sites/all/modules/queue2civicrm/tests/includes/Message.php
+++ b/sites/all/modules/queue2civicrm/tests/includes/Message.php
@@ -63,7 +63,6 @@
 'utm_medium' => mt_rand(),
 'utm_campaign' => mt_rand(),
 'language' => $lang[array_rand( $lang )],
-'referrer' => 'http://example.com/' . mt_rand(),
 'email' => mt_rand() . '@example.com',
 'first_name' => mt_rand(),
 'middle_name' => mt_rand(),
diff --git a/sites/all/modules/wmf_audit/BaseAuditProcessor.php 
b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
index 4079b10..46544e2 100644
--- a/sites/all/modules/wmf_audit/BaseAuditProcessor.php
+++ b/sites/all/modules/wmf_audit/BaseAuditProcessor.php
@@ -1190,7 +1190,6 @@
'lname' => 'last_name',
'payment_method',
'payment_submethod',
-   'referrer',
'user_ip',
'utm_source',
);
diff --git a/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php 
b/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
index e9360bf..2f1a00a 100644
--- a/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/AdyenAuditTest.php
@@ -116,7 +116,6 @@
'last_name' => 'asdff',
'payment_method' => 'cc',
'payment_submethod' => 'visa',
-   'referrer' => 
'https://payments.wikimedia.org/index.php?title=Special:AdyenGateway&payment_method=cc&language=en&country=US¤cy_code=USD&amount=1',
'user_ip' => '77.177.177.77',
'utm_campaign' => 'adyen_audit',
'utm_medium' => 'adyen_audit',
diff --git a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php 
b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
index 03eb15f..131fb87 100644
--- a/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
+++ b/sites/all/modules/wmf_audit/tests/AmazonAuditTest.php
@@ -100,7 +100,6 @@
'last_name' => 'Person',
'payment_method' => 'amazon',
'payment_submethod' => '',
-   'referrer' => 
'https://mail.google.com/mail/u/0/?pli=1',

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Remove some unused message fields

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

Change subject: Remove some unused message fields
..


Remove some unused message fields

We're not setting or using these, as far as I can tell, and they're
adding noise to the pending comparison logging.

Bug: T140959
Change-Id: I1f709ac052405c6df50488a7c44ecf63bcc34bd5
---
M CrmLink/Messages/DonationInterfaceMessage.php
M PaymentProviders/Adyen/Tests/Data/pending.json
2 files changed, 0 insertions(+), 22 deletions(-)

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



diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index a707bbc..2d3239d 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -8,42 +8,31 @@
 class DonationInterfaceMessage extends KeyedOpaqueStorableObject {
public $captured = '';
public $city = '';
-   public $city_2 = '';
-   public $comment = '';
public $contribution_tracking_id = '';
public $country = '';
-   public $country_2 = '';
public $currency = '';
public $date = '';
public $email = '';
public $fee = '';
public $first_name = '';
-   public $first_name_2 = '';
public $gateway = '';
public $gateway_account = '';
public $gateway_txn_id = '';
public $gross = '';
public $language = '';
public $last_name = '';
-   public $last_name_2 = '';
public $middle_name = '';
public $net = '';
public $order_id = '';
public $payment_method = '';
public $payment_submethod = '';
public $postal_code = '';
-   public $postal_code_2 = '';
-   public $premium_language = '';
public $recurring = '';
public $response = '';
public $risk_score = '';
-   public $size = '';
public $state_province = '';
-   public $state_province_2 = '';
public $street_address = '';
-   public $street_address_2 = '';
public $supplemental_address_1 = '';
-   public $supplemental_address_2 = '';
public $user_ip = '';
public $utm_campaign = '';
public $utm_medium = '';
diff --git a/PaymentProviders/Adyen/Tests/Data/pending.json 
b/PaymentProviders/Adyen/Tests/Data/pending.json
index 3f86e18..7b57f33 100644
--- a/PaymentProviders/Adyen/Tests/Data/pending.json
+++ b/PaymentProviders/Adyen/Tests/Data/pending.json
@@ -1,40 +1,29 @@
 {
   "city": "Columbus",
-  "city_2": "",
-  "comment": "",
   "contribution_tracking_id": "119223",
   "country": "US",
-  "country_2": "",
   "currency": "USD",
   "date": 1458060070,
   "email": "test119...@example.com",
   "fee": "0",
   "first_name": "Testy119223",
-  "first_name_2": "",
   "gateway": "adyen",
   "gateway_account": "WikimediaCOM",
   "gateway_txn_id": false,
   "gross": "10.00",
   "language": "en",
   "last_name": "Testerson119223",
-  "last_name_2": "",
   "middle_name": "",
   "net": "",
   "payment_method": "cc",
   "payment_submethod": "amex",
   "postal_code": "12345",
-  "postal_code_2": "",
-  "premium_language": "",
   "recurring": "",
   "response": false,
   "risk_score": 10,
-  "size": "",
   "state_province": "OH",
-  "state_province_2": "",
   "street_address": "123 Fake St",
-  "street_address_2": "",
   "supplemental_address_1": "",
-  "supplemental_address_2": "",
   "user_ip": "127.0.0.1",
   "utm_campaign": "",
   "utm_medium": "",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f709ac052405c6df50488a7c44ecf63bcc34bd5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
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] wikimedia...crm[master]: Further fix to criteria range on dedupe - exclude deleted

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

Change subject: Further fix to criteria range on dedupe - exclude deleted
..


Further fix to criteria range on dedupe - exclude deleted

Bug: T142954
Change-Id: I6a2163f2097ad3e5e67c1f28c2e27d41950bf6ba
---
M sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc 
b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
index 12d1741..02b005d 100644
--- a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
+++ b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
@@ -44,7 +44,7 @@
   $end = CRM_Core_DAO::singleValueQuery("
 SELECT max(id)
 FROM (
-  SELECT id FROM civicrm_contact WHERE id > %1 ORDER BY id ASC LIMIT %2
+  SELECT id FROM civicrm_contact WHERE id > %1 AND is_deleted = 0 ORDER BY 
id ASC LIMIT %2
 ) as c",
 array(1 => array($start, 'Integer'), 2 => array($batch_size, 'Integer'))
   );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a2163f2097ad3e5e67c1f28c2e27d41950bf6ba
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: phabricator: only send SMS for issues on active server

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

Change subject: phabricator: only send SMS for issues on active server
..


phabricator: only send SMS for issues on active server

Add to hiera which server is the current active server.

Change the contact groups based on the hostname being
the active server or not.

If group "sms" is used, that means paging.

This way we will not get paged for the inactive server
and if we switch it's in this one place in hiera, not
in .pp files.

Change-Id: I3c9a3bda0e6f2b3b20b7049c18c450ad4722a754
---
M hieradata/role/common/phabricator/main.yaml
M modules/phabricator/manifests/monitoring.pp
2 files changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/hieradata/role/common/phabricator/main.yaml 
b/hieradata/role/common/phabricator/main.yaml
index fa18bfe..1820eb5 100644
--- a/hieradata/role/common/phabricator/main.yaml
+++ b/hieradata/role/common/phabricator/main.yaml
@@ -7,3 +7,5 @@
 debdeploy::grains:
   debdeploy-phabricator:
 value: standard
+
+phabricator_active_server: 'iridium'
diff --git a/modules/phabricator/manifests/monitoring.pp 
b/modules/phabricator/manifests/monitoring.pp
index a8f0446..c1d1cda 100644
--- a/modules/phabricator/manifests/monitoring.pp
+++ b/modules/phabricator/manifests/monitoring.pp
@@ -7,15 +7,24 @@
 source   => 'puppet:///modules/phabricator/monitor/apache_status.py',
 }
 
+$phabricator_active_server = hiera('phabricator_active_server')
+
+if $::hostname == $phabricator_active_server {
+$phab_contact_groups = 'admins,phabricator,sms'
+} else {
+$phab_contact_groups = 'admins,phabricator'
+}
+
 nrpe::monitor_service { 'check_phab_taskmaster':
 description   => 'PHD should be supervising processes',
 nrpe_command  => '/usr/lib/nagios/plugins/check_procs -c 3:150 -u phd',
-contact_group => 'admins,phabricator,sms',
+contact_group => $phab_contact_groups,
 }
 
 monitoring::service { 'phabricator-https':
 description   => 'https://phabricator.wikimedia.org',
 check_command => 'check_https_phabricator',
-contact_group => 'admins,phabricator,sms',
+contact_group => $phab_contact_groups,
 }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c9a3bda0e6f2b3b20b7049c18c450ad4722a754
Gerrit-PatchSet: 10
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: 20after4 
Gerrit-Reviewer: 20after4 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Volans 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[wmf/1.28.0-wmf.15]: Fix incorrect directory for i18n messages

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

Change subject: Fix incorrect directory for i18n messages
..


Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

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

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



diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: wmf/1.28.0-wmf.15
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[wmf/1.28.0-wmf.14]: Fix incorrect directory for i18n messages

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

Change subject: Fix incorrect directory for i18n messages
..


Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
(cherry picked from commit a1ce74fc74bf86058859e6f3b9d58136c4920117)
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: wmf/1.28.0-wmf.14
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[wmf/1.28.0-wmf.14]: Fix incorrect directory for i18n messages

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

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

Change subject: Fix incorrect directory for i18n messages
..

Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
(cherry picked from commit a1ce74fc74bf86058859e6f3b9d58136c4920117)
---
M extension.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: wmf/1.28.0-wmf.14
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Fix incorrect directory for i18n messages

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

Change subject: Fix incorrect directory for i18n messages
..


Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

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

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



diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[wmf/1.28.0-wmf.15]: Fix incorrect directory for i18n messages

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

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

Change subject: Fix incorrect directory for i18n messages
..

Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

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


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

diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e4b509d981caf75c2e22c573bddcb64b8e23232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: wmf/1.28.0-wmf.15
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMessages[master]: Fix incorrect directory for i18n messages

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

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

Change subject: Fix incorrect directory for i18n messages
..

Fix incorrect directory for i18n messages

When converting to extension.json it seems this directory name was
copied improperly. This resulted in the messages no-longer being
available. Fix up the directory name so it works as expected.

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


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

diff --git a/extension.json b/extension.json
index 9960c0e..a198d44 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
"i18n/wikimedia"
],
"WikimediaInterwikiSearchResultsMessages": [
-   "i18n/interwikisearchresults"
+   "i18n/wikimediainterwikisearchresults"
],
"WikimediaTemporaryMessages": [
"i18n/temporary"

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...UserMerge[master]: Avoid unit test failures in deduplicateWatchlistEntries()

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

Change subject: Avoid unit test failures in deduplicateWatchlistEntries()
..


Avoid unit test failures in deduplicateWatchlistEntries()

Temporary tables cannot be joined against themselves.

Change-Id: I18e898c4a55e0f5e553f94fa41967f8f54d07096
---
M MergeUser.php
1 file changed, 30 insertions(+), 28 deletions(-)

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



diff --git a/MergeUser.php b/MergeUser.php
index b4b7a62..10b0a43 100755
--- a/MergeUser.php
+++ b/MergeUser.php
@@ -298,42 +298,44 @@
private function deduplicateWatchlistEntries( $dbw ) {
$this->begin( $dbw );
 
+   // Get all titles both watched by the old and new user accounts.
+   // Avoid using self-joins as this fails on temporary tables 
(e.g. unit tests).
+   // See https://bugs.mysql.com/bug.php?id=10327.
+   $titlesToDelete = [];
$res = $dbw->select(
-   [
-   'w1' => 'watchlist',
-   'w2' => 'watchlist'
-   ],
-   [
-   'w2.wl_namespace',
-   'w2.wl_title'
-   ],
-   [
-   'w1.wl_user' => $this->newUser->getId(),
-   'w2.wl_user' => $this->oldUser->getId()
-   ],
+   'watchlist',
+   [ 'wl_namespace', 'wl_title' ],
+   [ 'wl_user' => $this->oldUser->getId() ],
__METHOD__,
-   [ 'FOR UPDATE' ],
-   [
-   'w2' => [
-   'INNER JOIN',
-   [
-   'w1.wl_namespace = 
w2.wl_namespace',
-   'w1.wl_title = w2.wl_title'
-   ],
-   ]
-   ]
+   [ 'FOR UPDATE' ]
);
+   foreach ( $res as $row ) {
+   $titlesToDelete[$row->wl_namespace . "|" . 
$row->wl_title] = false;
+   }
+   $res = $dbw->select(
+   'watchlist',
+   [ 'wl_namespace', 'wl_title' ],
+   [ 'wl_user' => $this->newUser->getId() ],
+   __METHOD__,
+   [ 'FOR UPDATE' ]
+   );
+   foreach ( $res as $row ) {
+   $key = $row->wl_namespace . "|" . $row->wl_title;
+   if ( isset( $titlesToDelete[$key] ) ) {
+   $titlesToDelete[$key] = true;
+   }
+   }
+   $dbw->freeResult( $res );
+   $titlesToDelete = array_filter( $titlesToDelete );
 
-   # Construct an array to delete all watched pages of the old user
-   # which the new user already watches
$conds = [];
-
-   foreach ( $res as $result ) {
+   foreach ( $titlesToDelete as $tuple ) {
+   list( $ns, $dbKey ) = explode( "|", $tuple, 2 );
$conds[] = $dbw->makeList(
[
'wl_user' => $this->oldUser->getId(),
-   'wl_namespace' => $result->wl_namespace,
-   'wl_title' => $result->wl_title
+   'wl_namespace' => $ns,
+   'wl_title' => $dbKey
],
LIST_AND
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18e898c4a55e0f5e553f94fa41967f8f54d07096
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: CN: use cookie exclusively for GeoIP data

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: CN: use cookie exclusively for GeoIP data
..

CN: use cookie exclusively for GeoIP data

Untested and probably broken POC

Bug: T143271
Change-Id: I7bf1b9a0fdb2517b93c9cbe959f89fb5893bc2c4
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
M resources/subscribing/ext.centralNotice.geoIP.js
M tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js
4 files changed, 23 insertions(+), 261 deletions(-)


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

diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 647c71d..55057a3 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -27,7 +27,7 @@
  * Provides cn.internal.hide.
  *
  * For an overview of how this all fits together, see
- * mw.centralNotice.reallyChooseAndMaybeDisplay() (below).
+ * mw.centralNotice.chooseAndMaybeDisplay() (below).
  */
 ( function ( $, mw ) {
 
@@ -197,7 +197,7 @@
}
}
 
-   function reallyChooseAndMaybeDisplay() {
+   function chooseAndMaybeDisplay() {
 
var chooser = cn.internal.chooser,
bucketer = cn.internal.bucketer,
@@ -485,40 +485,13 @@
campaignMixins[ mixin.name ] = mixin;
},
 
-   /**
-* Select a campaign and a banner, run hooks, and maybe display 
a
-* banner.
-* Note: cn.choiceData must be set before this is called
-*/
-   chooseAndMaybeDisplay: function () {
-
-   // Make sure GeoIP info is available before processing
-
-   // geoIP usually doesn't make background requests; 
however, it may
-   // make one if location data wasn't retrievable from a 
cookie. We
-   // use a callback just in case, even though most of the 
time, the
-   // callback executes without delay.
-
-   // TODO Take GeoIP out of CentralNotice.
-   // See https://phabricator.wikimedia.org/T102848.
-
-   mw.geoIP.getPromise()
-   .fail( cn.internal.state.setInvalidGeoData )
-   .always( reallyChooseAndMaybeDisplay );
-   },
-
displayTestingBanner: function () {
-
// We gather the same data as for normal banner 
display, plus
// campaign and banner.
-   mw.geoIP.getPromise()
-   .fail( cn.internal.state.setInvalidGeoData )
-   .always( function () {
-   
cn.internal.state.setUpForTestingBanner();
-   setUpDataProperty();
-   setUpBannerLoadedPromise();
-   fetchBanner();
-   } );
+   cn.internal.state.setUpForTestingBanner();
+   setUpDataProperty();
+   setUpBannerLoadedPromise();
+   fetchBanner();
},
 
insertBanner: function ( bannerJson ) {
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index 3cf4fe5..cd415f9 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -108,9 +108,7 @@
state.data.uselang = mw.config.get( 'wgUserLanguage' );
state.data.device = urlParams.device || getDeviceCode();
 
-   // data.country may already have been set, if 
setInvalidGeoData() was
-   // called
-   state.data.country = urlParams.country || state.data.country ||
+   state.data.country = urlParams.country ||
( window.Geo && window.Geo.country ) || 
UNKNOWN_COUNTRY_CODE;
 
// Some parameters should get through even if they have falsey 
values
@@ -174,14 +172,6 @@
 * @private
 */
banner: null,
-
-   /**
-* Call this before calling setUp() or setUpForTestingBanner()
-* if window.Geo is known to be invalid.
-*/
-   setInvalidGeoData: function () {
-   state.data.country = UNKNOWN_COUNTRY_CODE;
-   },
 
setUp: function () {
setInitialData

[MediaWiki-commits] [Gerrit] operations/dns[master]: Remove geoiplookup DNS entries

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Remove geoiplookup DNS entries
..

Remove geoiplookup DNS entries

Bug: T100902
Change-Id: I896558663559c997a4de2d956b11a1f7417fbbd5
---
M templates/153.80.208.in-addr.arpa
M templates/154.80.208.in-addr.arpa
M templates/174.198.91.in-addr.arpa
M templates/26.35.198.in-addr.arpa
M templates/wikimedia.org
5 files changed, 0 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/22/305422/1

diff --git a/templates/153.80.208.in-addr.arpa 
b/templates/153.80.208.in-addr.arpa
index 347e329..ef0257f 100644
--- a/templates/153.80.208.in-addr.arpa
+++ b/templates/153.80.208.in-addr.arpa
@@ -136,7 +136,6 @@
 ; - - 208.80.153.224/29 (224-231) LVS Desktop
 
 224 1H  IN PTR  text-lb.codfw.wikimedia.org.
-225 1H  IN PTR  geoiplookup-lb.codfw.wikimedia.org.
 
 ; wrong subnet, but not important...
 231 1H  IN PTR  ns1.wikimedia.org.
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index 742d38b..9d5fa5e 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -163,7 +163,6 @@
 ; - - 208.80.154.224/29 (224-231) LVS Desktop
 
 224 1H  IN PTR  text-lb.eqiad.wikimedia.org.
-225 1H  IN PTR  geoiplookup-lb.eqiad.wikimedia.org.
 
 ; - - 208.80.154.232/29 (232-239) LVS Mobile
 
diff --git a/templates/174.198.91.in-addr.arpa 
b/templates/174.198.91.in-addr.arpa
index 20ef033..f6872cc 100644
--- a/templates/174.198.91.in-addr.arpa
+++ b/templates/174.198.91.in-addr.arpa
@@ -43,7 +43,6 @@
 ; - - 91.198.174.192/29 (192-199) LVS Desktop
 
 192 1H  IN PTR  text-lb.esams.wikimedia.org.
-193 1H  IN PTR  geoiplookup-lb.esams.wikimedia.org.
 
 ; - - 91.198.174.200/29 (200-207) LVS Mobile
 
diff --git a/templates/26.35.198.in-addr.arpa b/templates/26.35.198.in-addr.arpa
index 308ed45..0169668 100644
--- a/templates/26.35.198.in-addr.arpa
+++ b/templates/26.35.198.in-addr.arpa
@@ -31,7 +31,6 @@
 ; - - 198.35.26.96/29 (96-103) LVS Desktop
 
 96  1H IN PTR   text-lb.ulsfo.wikimedia.org.
-97  1H IN PTR   geoiplookup-lb.ulsfo.wikimedia.org.
 
 ; - - 198.35.26.104/29 (104-111) LVS Mobile
 
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index 305eab3..da3f107 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -80,7 +80,6 @@
 maps600 DYNA geoip!maps-addrs
 m   600 DYNA geoip!text-addrs
 misc-web-lb 600 DYNA geoip!misc-addrs
-geoiplookup 600 DYNA geoip!geoiplookup-addrs
 donate  600 DYNA geoip!text-addrs
 1H  IN MX   10 mx1001
 1H  IN MX   50 mx2001
@@ -225,8 +224,6 @@
 dns-rec-lb.eqiad1H  IN A208.80.154.239
 1H  IN  2620:0:861:ed1a::3:fe
 
-geoiplookup-lb.eqiad600 IN DYNA geoip!geoiplookup-addrs/eqiad
-
 ; These legacy entries should eventually move to RESTBase
 cxserver600 IN DYNA geoip!text-addrs
 citoid  600 IN DYNA geoip!text-addrs
@@ -248,7 +245,6 @@
 upload-lb.ulsfo 600 IN DYNA geoip!upload-addrs/ulsfo
 maps-lb.ulsfo   600 IN DYNA geoip!maps-addrs/ulsfo
 misc-web-lb.ulsfo   600 IN DYNA geoip!misc-addrs/ulsfo
-geoiplookup-lb.ulsfo600 IN DYNA geoip!geoiplookup-addrs/ulsfo
 donate-lb.ulsfo 600 IN DYNA geoip!text-addrs/ulsfo
 1H  IN MX 10mx1001
 1H  IN MX 50mx2001
@@ -261,14 +257,12 @@
 maps-lb.codfw   600 IN DYNA geoip!maps-addrs/codfw
 misc-web-lb.codfw   600 IN DYNA geoip!misc-addrs/codfw
 donate-lb.codfw 600 IN DYNA geoip!text-addrs/codfw
-geoiplookup-lb.codfw600 IN DYNA geoip!geoiplookup-addrs/codfw
 
 ;;; esams
 text-lb.esams   600 IN DYNA geoip!text-addrs/esams
 upload-lb.esams 600 IN DYNA geoip!upload-addrs/esams
 maps-lb.esams   600 IN DYNA geoip!maps-addrs/esams
 misc-web-lb.esams   600 IN DYNA geoip!misc-addrs/esams
-geoiplookup-lb.esams600 IN DYNA geoip!geoiplookup-addrs/esams
 donate-lb.esams 600 IN DYNA geoip!text-addrs/esams
   1H  IN MX 10mx1001
   1H  IN MX 50mx2001

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I896558663559c997a4de2d956b11a1f7417fbbd5
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: www.toolserver.org: remove geoiplookup reference

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: www.toolserver.org: remove geoiplookup reference
..

www.toolserver.org: remove geoiplookup reference

Bug: T100902
Change-Id: I7fd153a7815dd78a72536f39263db2137c8f17a6
---
M modules/toolserver_legacy/templates/www.toolserver.org.erb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/305418/1

diff --git a/modules/toolserver_legacy/templates/www.toolserver.org.erb 
b/modules/toolserver_legacy/templates/www.toolserver.org.erb
index 170e4c8..dc4c4f0 100644
--- a/modules/toolserver_legacy/templates/www.toolserver.org.erb
+++ b/modules/toolserver_legacy/templates/www.toolserver.org.erb
@@ -235,7 +235,6 @@
 Redirect 301 /~para/GeoCommons/proximityrama 
https://tools.wmflabs.org/geocommons/proximityrama
 Redirect 301 /~para/earth.php 
https://tools.wmflabs.org/geocommons/earth.kml
 Redirect 301 /~para/GeoCommons/geocodingtodo.php 
https://tools.wmflabs.org/geocommons/geocodingtodo
-Redirect 301 /~para/geoip.fcgi https://geoiplookup.wikimedia.org
 Redirect 301 /~para/cgi-bin/wgs2tky 
https://tools.wmflabs.org/para/geo/convert/wgs2tky
 Redirect 301 /~para/WGS84toRT90.php 
https://tools.wmflabs.org/para/geo/convert/WGS84toRT90
 Redirect 301 /~para/kkj.php https://tools.wmflabs.org/para/geo/convert/kkj

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: GeoIP VCL: remove JSON output support

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: GeoIP VCL: remove JSON output support
..

GeoIP VCL: remove JSON output support

Bug: T100902
Change-Id: I9158f52a5e24af750b876c1d1c1fc900f0cecb08
---
M templates/varnish/geoip.inc.vcl.erb
M templates/varnish/text-frontend.inc.vcl.erb
2 files changed, 2 insertions(+), 49 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/305421/1

diff --git a/templates/varnish/geoip.inc.vcl.erb 
b/templates/varnish/geoip.inc.vcl.erb
index e2d0fb8..48a1f29 100644
--- a/templates/varnish/geoip.inc.vcl.erb
+++ b/templates/varnish/geoip.inc.vcl.erb
@@ -141,33 +141,6 @@
 _GEO_IDX_SIZE   = 5,
 } geo_idx_t;
 
-static const char json_fmt[] =
-"Geo = {\"city\":\"%s\",\"country\":\"%s\",\"region\":\"%s\","
-"\"lat\":\"%s\",\"lon\":\"%s\",\"IP\":\"%s\"}";
-
-static void geo_out_json(struct sess* sp, const char* ip, char** geo) {
-char out[255];
-int out_size = snprintf(out, 255, json_fmt,
-geo[GEO_IDX_CITY],
-geo[GEO_IDX_COUNTRY],
-geo[GEO_IDX_REGION],
-geo[GEO_IDX_LAT],
-geo[GEO_IDX_LON],
-ip
-);
-if (out_size >= 254) // Don't use truncated output
-return;
-
-VRT_synth_page(sp, 0, out, vrt_magic_string_end);
-char* now = VRT_time_string(sp, VRT_r_now(sp));
-VRT_SetHdr(sp, HDR_OBJ, "\016Last-Modified:",
-   now, vrt_magic_string_end);
-VRT_SetHdr(sp, HDR_OBJ, "\016Cache-Control:",
-   "private, max-age=86400, s-maxage=0", vrt_magic_string_end);
-VRT_SetHdr(sp, HDR_OBJ, "\015Content-Type:",
-   "text/javascript", vrt_magic_string_end);
-}
-
 static void geo_out_cookie(struct sess* sp, const char* ip, char** geo) {
 char host_safe[50];
 char out[255];
@@ -206,7 +179,7 @@
 {"location", "longitude", NULL, NULL},
 };
 
-static void geo_xcip_output(struct sess* sp, const bool json) {
+static void geo_xcip_output(struct sess* sp) {
 char ip[INET6_ADDRSTRLEN];
 int gai_error, mmdb_error;
 
@@ -246,17 +219,9 @@
 geo[g] = data;
 }
 
-if (json)
-geo_out_json(sp, ip, geo);
-else
-geo_out_cookie(sp, ip, geo);
+geo_out_cookie(sp, ip, geo);
 }
 }C
-
-// Emits JSON
-sub geoip_lookup {
-C{geo_xcip_output(sp, true);}C
-}
 
 // Emits a Set-Cookie
 sub geoip_cookie {
diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 20db59f..d42b784 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -65,10 +65,6 @@
// Disable Range requests for now.
unset req.http.Range;
 
-   if (req.url == "/geoiplookup" || req.http.host == 
"geoiplookup.wikimedia.org") {
-   error 668 "geoiplookup";
-   }
-
if (req.restarts == 0) {
// Always set or clear X-Subdomain and X-Orig-Cookie
unset req.http.X-Orig-Cookie;
@@ -260,14 +256,6 @@
set obj.http.Connection = "keep-alive";
return (deliver);
}
-   }
-
-   // Support geoiplookup
-   if (obj.status == 668) {
-   call geoip_lookup;
-   set obj.status = 200;
-   set obj.http.Connection = "keep-alive";
-   return (deliver);
}
 
// Support mobile redirects

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove geoiplookup service IPs from LVS

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: Remove geoiplookup service IPs from LVS
..

Remove geoiplookup service IPs from LVS

Bug: T100902
Change-Id: I960d9cc4ecbf1ce24d8d6c5ffd6262c302a31dc3
---
M hieradata/common/lvs/configuration.yaml
1 file changed, 0 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/20/305420/1

diff --git a/hieradata/common/lvs/configuration.yaml 
b/hieradata/common/lvs/configuration.yaml
index d87425f..3f2f019 100644
--- a/hieradata/common/lvs/configuration.yaml
+++ b/hieradata/common/lvs/configuration.yaml
@@ -3,19 +3,15 @@
 codfw:
   textlb: 208.80.153.224
   textlb6: 2620:0:860:ed1a::1
-  geoiplookuplb: 208.80.153.225
 eqiad:
   textlb: 208.80.154.224
   textlb6: 2620:0:861:ed1a::1
-  geoiplookuplb: 208.80.154.225
 esams:
   textlb: 91.198.174.192
   textlb6: 2620:0:862:ed1a::1
-  geoiplookuplb: 91.198.174.193
 ulsfo:
   textlb: 198.35.26.96
   textlb6: 2620:0:863:ed1a::1
-  geoiplookuplb: 198.35.26.97
   upload: &ip_block002
 codfw:
   uploadlb: 208.80.153.240

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: GeoIP VCL: re-set old IPv6 no-data cookies

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: GeoIP VCL: re-set old IPv6 no-data cookies
..

GeoIP VCL: re-set old IPv6 no-data cookies

Bug: T99226
Change-Id: Ib611c34130cea0613f879b86d634f6af5a59c80c
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/19/305419/1

diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index 6aac666..20db59f 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -246,6 +246,11 @@
&& req.http.Cookie !~ "(^|;\s*)GeoIP=[^;]") {
call geoip_cookie;
}
+   // Fix old IPv6 no-data cookies
+   else if (req.http.X-Orig-Cookie ~ "(^|;\s*)GeoIP=:v6"
+   || req.http.Cookie ~ "(^|;\s*)GeoIP=:v6") {
+   call geoip_cookie;
+   }
 }
 
 sub cluster_fe_err_synth {

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable Language ID for Russian, Japanese, Portuguese Wikipedias

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

Change subject: Enable Language ID for Russian, Japanese, Portuguese Wikipedias
..


Enable Language ID for Russian, Japanese, Portuguese Wikipedias

Enable the languages specified in T142413 for language detection for
these three Wikipedias.

Bug: T142413
Change-Id: I774bd62bb91c0c75034b3dc7ae3246226899f287
---
M wmf-config/InitialiseSettings.php
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1d86f1b..6803349 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16639,6 +16639,9 @@
'eswiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
'itwiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
'frwiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
+   'ptwiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
+   'ruwiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
+   'jawiki' => [ 'textcat' => 'CirrusSearch\\LanguageDetector\\TextCat' ],
 ],
 
 // Enable interwiki search by language detection. The list of language
@@ -16654,6 +16657,9 @@
'eswiki' => true,
'itwiki' => true,
'frwiki' => true,
+   'ptwiki' => true,
+   'ruwiki' => true,
+   'jawiki' => true,
 ],
 
 'wmgCirrusSearchTextcatLanguages' => [
@@ -16675,6 +16681,16 @@
'de', 'en', 'zh', 'el', 'ru', 'ar', 'hi', 'th',
'ko', 'ja',
],
+   'ptwiki' => [
+   'pt', 'en', 'ru', 'he', 'ar', 'zh', 'ko', 'el',
+   ],
+   'ruwiki' => [
+   'ru', 'en', 'uk', 'ka', 'hy', 'ja', 'ar', 'he',
+   'zh',
+   ],
+   'jawiki' => [
+   'ja', 'en', 'ru', 'ko', 'ar', 'he',
+   ],
 ],
 
 // List of languages detected by the short-text

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I774bd62bb91c0c75034b3dc7ae3246226899f287
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tjones 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: installer: Update assets README to mention public-domain.png.

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

Change subject: installer: Update assets README to mention public-domain.png.
..


installer: Update assets README to mention public-domain.png.

Follows-up be0b28d4. This way it'll be found when searching for the file.

Change-Id: I57fafa0b3e6a63a61f7c67e3279ee875eae2a344
---
M resources/assets/licenses/README
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/resources/assets/licenses/README b/resources/assets/licenses/README
index 0f5cf51..dae2549 100644
--- a/resources/assets/licenses/README
+++ b/resources/assets/licenses/README
@@ -1,4 +1,4 @@
 These license icons are used in LocalSettings.php files that are generated by
-the installer. Although public domain has been removed from the installer as
-an option, the image needs to remain here to support installations which refer
-to it in LocalSettings.php.
+the installer. Although "Public domain" has been removed from the installer as
+an option, the public-domain.png image needs to remain here to support older
+installations that refer to it in LocalSettings.php.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57fafa0b3e6a63a61f7c67e3279ee875eae2a344
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata/browsertests[master]: Fix JSON::ParserError

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

Change subject: Fix JSON::ParserError
..


Fix JSON::ParserError

Bug: T129483
Change-Id: I51c9527793bd66a11c992870ec5717f78b0672f2
---
M tests/browser/environments.yml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index 9b6279a..3b28ccd 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -31,7 +31,7 @@
 beta:
   language_code: en
   browser: firefox
-  mediawiki_url: http://wikidata.beta.wmflabs.org/wiki/
+  mediawiki_url: https://wikidata.beta.wmflabs.org/wiki/
   mediawiki_user: Selenium_user
   # mediawiki_password: SET THIS IN THE ENVIRONMENT!
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51c9527793bd66a11c992870ec5717f78b0672f2
Gerrit-PatchSet: 3
Gerrit-Project: wikidata/browsertests
Gerrit-Branch: master
Gerrit-Owner: Zfilipin 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: Zfilipin 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: CirrusSearch - drop references to nobelium and labsearch

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

Change subject: CirrusSearch - drop references to nobelium and labsearch
..


CirrusSearch - drop references to nobelium and labsearch

nobelium is being decommisioned, this is the related cleanup. Note that
labsearch isn't used anymore, so all references to it are cleaned.

Bug: T142705
Change-Id: I7d0dda4ad77136e0c3d0f0fe070e36a9f4de2eec
---
M tests/cirrusTest.php
M wmf-config/CirrusSearch-production.php
2 files changed, 7 insertions(+), 21 deletions(-)

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



diff --git a/tests/cirrusTest.php b/tests/cirrusTest.php
index 820d868..06268d5 100644
--- a/tests/cirrusTest.php
+++ b/tests/cirrusTest.php
@@ -11,7 +11,7 @@
$this->assertArrayHasKey( 'wgCirrusSearchClusters', $config );
$this->assertArrayHasKey( 'wgCirrusSearchDefaultCluster', 
$config );
$this->assertEquals( 'unittest', 
$config['wgCirrusSearchDefaultCluster'] );
-   $this->assertCount( 3, $config['wgCirrusSearchClusters'] );
+   $this->assertCount( 2, $config['wgCirrusSearchClusters'] );
 
// testwiki writes to eqiad and codfw
$this->assertCount( 2, $config['wgCirrusSearchWriteClusters'] );
@@ -29,10 +29,10 @@
$this->assertArrayNotHasKey( 'wgCirrusSearchServers', $config );
$this->assertArrayHasKey( 'wgCirrusSearchClusters', $config );
$this->assertArrayHasKey( 'wgCirrusSearchDefaultCluster', 
$config );
-   $this->assertCount( 3, $config['wgCirrusSearchClusters'] );
-   $this->assertCount( 3, $config['wgCirrusSearchShardCount'] );
-   $this->assertCount( 3, $config['wgCirrusSearchReplicas'] );
-   $this->assertCount( 3, 
$config['wgCirrusSearchClientSideConnectTimeout'] );
+   $this->assertCount( 2, $config['wgCirrusSearchClusters'] );
+   $this->assertCount( 2, $config['wgCirrusSearchShardCount'] );
+   $this->assertCount( 2, $config['wgCirrusSearchReplicas'] );
+   $this->assertCount( 2, 
$config['wgCirrusSearchClientSideConnectTimeout'] );
 
foreach ( array_keys ( $config['wgCirrusSearchClusters'] ) as 
$cluster ) {
$this->assertArrayHasKey( $cluster, 
$config['wgCirrusSearchShardCount'] );
diff --git a/wmf-config/CirrusSearch-production.php 
b/wmf-config/CirrusSearch-production.php
index 24ab406..24a0d34 100644
--- a/wmf-config/CirrusSearch-production.php
+++ b/wmf-config/CirrusSearch-production.php
@@ -13,7 +13,6 @@
 $wgCirrusSearchClusters = [
'eqiad' => $wmfAllServices['eqiad']['search'],
'codfw' => $wmfAllServices['codfw']['search'],
-   'labsearch' => [ '10.64.37.14' ], // nobelium.eqiad.wmnet
 ];
 if ( defined( 'HHVM_VERSION' ) ) {
$wgCirrusSearchClusters['eqiad'] = array_map( function ( $host ) {
@@ -42,7 +41,6 @@
$wgCirrusSearchClusters = [
'eqiad' => $wmfAllServices['eqiad']['search'],
'codfw' => $wmfAllServices['codfw']['search'],
-   'labsearch' => [ '10.64.37.14' ], // nobelium.eqiad.wmnet
];
 }
 
@@ -88,36 +86,24 @@
 $wgCirrusSearchShardCount = [
'eqiad' => $wmgCirrusSearchShardCount,
'codfw' => $wmgCirrusSearchShardCount,
-   'labsearch' => array_map( function() { return 1; }, 
$wmgCirrusSearchShardCount ),
 ];
 
-// Disable replicas for the labsearch cluster, it's only a single machine
-if ( isset( $wmgCirrusSearchReplicas['eqiad'] ) ) {
-   $wgCirrusSearchReplicas = $wmgCirrusSearchReplicas + [
-   'labsearch' => array_map( function() { return 'false'; }, 
$wmgCirrusSearchReplicas['eqiad'] ),
-   ];
-} else {
+if (! isset( $wmgCirrusSearchReplicas['eqiad'] ) ) {
$wgCirrusSearchReplicas = [
'eqiad' => $wmgCirrusSearchReplicas,
'codfw' => $wmgCirrusSearchReplicas,
-   'labsearch' => array_map( function() { return 'false'; }, 
$wmgCirrusSearchReplicas ),
];
 }
 
-// 5 second timeout for local cluster, 10 seconds for remote. 2 second timeout
-// for the labsearch cluster.
+// 5 second timeout for local cluster, 10 seconds for remote.
 $wgCirrusSearchClientSideConnectTimeout = [
'eqiad' => $wmfDatacenter === 'eqiad' ? 5 : 10,
'codfw' => $wmfDatacenter === 'codfw' ? 5 : 10,
-   'labsearch' => 2,
 ];
 
-// Drop delayed jobs for the labsearch cluster after only 10 minutes to keep 
them
-// from filling up the job queue.
 $wgCirrusSearchDropDelayedJobsAfter = [
'eqiad' => $wgCirrusSearchDropDelayedJobsAfter,
'codfw' => $wgCirrusSearchDropDelayedJobsAfter,
-   'labsearch' => 10 * 60, // ten minutes
 ];
 
 $wgCirrusS

[MediaWiki-commits] [Gerrit] operations/puppet[production]: en.planet: add 3 new feeds

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

Change subject: en.planet: add 3 new feeds
..


en.planet: add 3 new feeds

Adding 3 new feeds that were requested to be added.

- Lorna M Campbell
- Stryn
- Sam Wilson

https://meta.wikimedia.org/w/index.php?title=Planet_Wikimedia&oldid=15844093#Not_yet_added

Change-Id: Ifd7ab0a8a129e8588cf03e77a510f8d8b9c84fe4
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index 4c1cc90..e5283b6 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -533,3 +533,12 @@
 [https://phabricator.wikimedia.org/phame/blog/feed/1/]
 name=WMF Release Engineering
 
+[https://lornamcampbell.org/tag/wikimedia/feed/]
+name=Lorna M Campbell
+
+[http://stryn.hol.es/blog/tag/wikimedia/feed/]
+name=Stryn
+
+[https://samwilson.id.au/Wikimedia.rss]
+name=Sam Wilson
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Dim the title of current wiki if it has 0 notificati...

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

Change subject: Revert "Dim the title of current wiki if it has 0 notifications"
..


Revert "Dim the title of current wiki if it has 0 notifications"

We decided we didn't want this behavior after all.

This reverts commit eadaac1c845e45b988a6dc779405c296d78122dc.

Bug: T139646
Change-Id: Ib71f8000a59e66968c0fa161e3ab59b9ebdb3b1a
---
M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
M modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
2 files changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less 
b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
index b07752b..1966d9d 100644
--- a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
+++ b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
@@ -12,13 +12,6 @@
}
}
 
-   &-empty {
-   .mw-echo-ui-pageNotificationsOptionWidget-count,
-   .mw-echo-ui-pageNotificationsOptionWidget-title-label {
-   color: @grey-light;
-   }
-   }
-
&-title {
padding: 0.2em 0;
}
diff --git a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js 
b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
index 4cc8b41..e3283f4 100644
--- a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
+++ b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
@@ -31,7 +31,6 @@
// Initialization
this.$element
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget' )
-   .toggleClass( 
'mw-echo-ui-pageNotificationsOptionWidget-empty', !this.count )
.append(
$( '' )
.addClass( 
'mw-echo-ui-pageNotificationsOptionWidget-count' )

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make doAtomicSection() return the callback result

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

Change subject: Make doAtomicSection() return the callback result
..


Make doAtomicSection() return the callback result

This makes the method a bit more convenient

Change-Id: Ic140e200cddcdf8e1a09b65c94d2da3aed62756d
---
M includes/db/Database.php
M includes/db/IDatabase.php
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 78975ff..2041aca 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -2658,12 +2658,14 @@
final public function doAtomicSection( $fname, callable $callback ) {
$this->startAtomic( $fname );
try {
-   call_user_func_array( $callback, [ $this, $fname ] );
+   $res = call_user_func_array( $callback, [ $this, $fname 
] );
} catch ( Exception $e ) {
$this->rollback( $fname );
throw $e;
}
$this->endAtomic( $fname );
+
+   return $res;
}
 
final public function begin( $fname = __METHOD__ ) {
diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
index af024b8..a871082 100644
--- a/includes/db/IDatabase.php
+++ b/includes/db/IDatabase.php
@@ -1342,6 +1342,7 @@
 *
 * @param string $fname Caller name (usually __METHOD__)
 * @param callable $callback Callback that issues DB updates
+* @return mixed $res Result of the callback (since 1.28)
 * @throws DBError
 * @throws RuntimeException
 * @throws UnexpectedValueException

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: installer: Update assets README to mention public-domain.png.

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

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

Change subject: installer: Update assets README to mention public-domain.png.
..

installer: Update assets README to mention public-domain.png.

Follows-up be0b28d4. This way it'll be found when searching for the file.

Change-Id: I57fafa0b3e6a63a61f7c67e3279ee875eae2a344
---
M resources/assets/licenses/README
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/305417/1

diff --git a/resources/assets/licenses/README b/resources/assets/licenses/README
index 0f5cf51..dae2549 100644
--- a/resources/assets/licenses/README
+++ b/resources/assets/licenses/README
@@ -1,4 +1,4 @@
 These license icons are used in LocalSettings.php files that are generated by
-the installer. Although public domain has been removed from the installer as
-an option, the image needs to remain here to support installations which refer
-to it in LocalSettings.php.
+the installer. Although "Public domain" has been removed from the installer as
+an option, the public-domain.png image needs to remain here to support older
+installations that refer to it in LocalSettings.php.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ObjectFactoryTest: Add tests for 'factory' option

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

Change subject: ObjectFactoryTest: Add tests for 'factory' option
..


ObjectFactoryTest: Add tests for 'factory' option

Increase coverage of getObjectFromSpec():

* Case for 'factory' option.
* Case for 'class' option with no arguments.
* Case for missing 'factory' and 'class' options.

Change-Id: Idc9ee73de4f6e55372b4ab5b1afbaa4c7e54509a
---
M tests/phpunit/includes/libs/ObjectFactoryTest.php
1 file changed, 39 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php 
b/tests/phpunit/includes/libs/ObjectFactoryTest.php
index 043be4e..f8dda6f 100644
--- a/tests/phpunit/includes/libs/ObjectFactoryTest.php
+++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php
@@ -82,6 +82,44 @@
}
 
/**
+* @covers ObjectFactory::getObjectFromSpec
+*/
+   public function testGetObjectFromFactory() {
+   $args = [ 'a', 'b' ];
+   $obj = ObjectFactory::getObjectFromSpec( [
+   'factory' => function ( $a, $b ) {
+   return new ObjectFactoryTestFixture( $a, $b );
+   },
+   'args' => $args,
+   ] );
+   $this->assertSame( $args, $obj->args );
+   }
+
+   /**
+* @covers ObjectFactory::getObjectFromSpec
+* @expectedException InvalidArgumentException
+*/
+   public function testGetObjectFromInvalid() {
+   $args = [ 'a', 'b' ];
+   $obj = ObjectFactory::getObjectFromSpec( [
+   // Missing 'class' or 'factory'
+   'args' => $args,
+   ] );
+   }
+
+   /**
+* @covers ObjectFactory::getObjectFromSpec
+* @dataProvider provideConstructClassInstance
+*/
+   public function testGetObjectFromClass( $args ) {
+   $obj = ObjectFactory::getObjectFromSpec( [
+   'class' => 'ObjectFactoryTestFixture',
+   'args' => $args,
+   ] );
+   $this->assertSame( $args, $obj->args );
+   }
+
+   /**
 * @covers ObjectFactory::constructClassInstance
 * @dataProvider provideConstructClassInstance
 */
@@ -92,7 +130,7 @@
$this->assertSame( $args, $obj->args );
}
 
-   public function provideConstructClassInstance() {
+   public static function provideConstructClassInstance() {
// These args go to 11. I thought about making 10 one louder, 
but 11!
return [
'0 args' => [ [] ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc9ee73de4f6e55372b4ab5b1afbaa4c7e54509a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Dim the title of current wiki if it has 0 notificati...

2016-08-17 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Revert "Dim the title of current wiki if it has 0 notifications"
..

Revert "Dim the title of current wiki if it has 0 notifications"

We decided we didn't want this behavior after all.

This reverts commit eadaac1c845e45b988a6dc779405c296d78122dc.

Bug: T139646
Change-Id: Ib71f8000a59e66968c0fa161e3ab59b9ebdb3b1a
---
M modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
M modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
2 files changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less 
b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
index b07752b..1966d9d 100644
--- a/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
+++ b/modules/styles/mw.echo.ui.PageNotificationsOptionWidget.less
@@ -12,13 +12,6 @@
}
}
 
-   &-empty {
-   .mw-echo-ui-pageNotificationsOptionWidget-count,
-   .mw-echo-ui-pageNotificationsOptionWidget-title-label {
-   color: @grey-light;
-   }
-   }
-
&-title {
padding: 0.2em 0;
}
diff --git a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js 
b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
index 4cc8b41..e3283f4 100644
--- a/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
+++ b/modules/ui/mw.echo.ui.PageNotificationsOptionWidget.js
@@ -31,7 +31,6 @@
// Initialization
this.$element
.addClass( 'mw-echo-ui-pageNotificationsOptionWidget' )
-   .toggleClass( 
'mw-echo-ui-pageNotificationsOptionWidget-empty', !this.count )
.append(
$( '' )
.addClass( 
'mw-echo-ui-pageNotificationsOptionWidget-count' )

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: phpunit: Add @covers to ObjectFactoryTest

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

Change subject: phpunit: Add @covers to ObjectFactoryTest
..


phpunit: Add @covers to ObjectFactoryTest

* expandClosures() wasn't covered at all.
  Make the test dedicated to this feature cover that method.

* constructClassInstance() coverage was almost complete except for
  the exception case. This was covered in a separate test, but it
  was missing its @covers tag.

Change-Id: I73252849a92440fd7ae2c44f9ca58f7bf9c1f92c
---
M tests/phpunit/includes/libs/ObjectFactoryTest.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/libs/ObjectFactoryTest.php 
b/tests/phpunit/includes/libs/ObjectFactoryTest.php
index a4871a6..043be4e 100644
--- a/tests/phpunit/includes/libs/ObjectFactoryTest.php
+++ b/tests/phpunit/includes/libs/ObjectFactoryTest.php
@@ -44,6 +44,7 @@
 
/**
 * @covers ObjectFactory::getObjectFromSpec
+* @covers ObjectFactory::expandClosures
 */
public function testClosureExpansionEnabled() {
$obj = ObjectFactory::getObjectFromSpec( [
@@ -110,6 +111,7 @@
}
 
/**
+* @covers ObjectFactory::constructClassInstance
 * @expectedException InvalidArgumentException
 */
public function testNamedArgs() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73252849a92440fd7ae2c44f9ca58f7bf9c1f92c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: visualeditor: Enable wikitext surface

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

Change subject: visualeditor: Enable wikitext surface
..


visualeditor: Enable wikitext surface

Change-Id: I1591408c8c4f2778542a6e5f84c0fcafd4ce14ed
---
M puppet/modules/role/templates/visualeditor/conf.php.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/puppet/modules/role/templates/visualeditor/conf.php.erb 
b/puppet/modules/role/templates/visualeditor/conf.php.erb
index 1b4ba6e..60f3d1e 100644
--- a/puppet/modules/role/templates/visualeditor/conf.php.erb
+++ b/puppet/modules/role/templates/visualeditor/conf.php.erb
@@ -3,3 +3,4 @@
 $wgVisualEditorUseSingleEditTab = true;
 $wgDefaultUserOptions['visualeditor-enable'] = 1;
 $wgVisualEditorParsoidURL = 'http://localhost:<%= scope['parsoid::port'] %>';
+$wgVisualEditorEnableWikitext = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1591408c8c4f2778542a6e5f84c0fcafd4ce14ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Remove unused methods from Util

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

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

Change subject: Remove unused methods from Util
..

Remove unused methods from Util

These methods were moved from Util class to the new more specialized
GeoFeature class. It seems that patch forgot to actually remove them
here. Finish that refactor by removing them.

Change-Id: I1e36fb30f5cf16dc978b8a5f4bcb9b91b6191ba5
---
M includes/Util.php
M tests/unit/UtilTest.php
2 files changed, 1 insertion(+), 361 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/13/305413/1

diff --git a/includes/Util.php b/includes/Util.php
index c9a2d29..8070990 100644
--- a/includes/Util.php
+++ b/includes/Util.php
@@ -419,118 +419,6 @@
}
 
/**
-* radius, if provided, must have either m or km suffix. Valid formats:
-*   
-*   ,
-*
-* @param string $text
-* @return array Three member array with Coordinate object, integer 
radius
-*  in meters, and page id to exclude from results.. When invalid the
-*  Coordinate returned will be null.
-*/
-   public static function parseGeoNearbyTitle( $text ) {
-   if ( !class_exists( GeoData::class ) ) {
-   return array( null, 0, 0 );
-   }
-
-   $title = Title::newFromText( $text );
-   if ( $title && $title->exists() ) {
-   // Default radius if not provided: 5km
-   $radius = 5000;
-   } else {
-   // If the provided value is not a title try to extract 
a radius prefix
-   // from the beginning. If $text has a valid radius 
prefix see if the
-   // remaining text is a valid title to use.
-   $pieces = explode( ',', $text, 2 );
-   if ( count( $pieces ) !== 2 ) {
-   return array( null, 0, 0 );
-   }
-   $radius = self::parseDistance( $pieces[0] );
-   if ( $radius === null ) {
-   return array( null, 0, 0 );
-   }
-   $title = Title::newFromText( $pieces[1] );
-   if ( !$title || !$title->exists() ) {
-   return array( null, 0, 0 );
-   }
-   }
-
-   $coord = GeoData::getPageCoordinates( $title );
-   if ( !$coord ) {
-   return array( null, 0, 0 );
-   }
-
-   return array( $coord, $radius, $title->getArticleID() );
-   }
-
-   /**
-* radius, if provided, must have either m or km suffix. Latitude and 
longitude
-* must be floats in the domain of [-90:90] for latitude and [-180,180] 
for
-* longitude. Valid formats:
-*   ,
-*   ,,
-*
-* @param string $text
-* @return array Two member array with Coordinate object, and integer 
radius
-*  in meters. When invalid the Coordinate returned will be null.
-*/
-   public static function parseGeoNearby( $text ) {
-   if ( !class_exists( GeoData::class ) ) {
-   return array( null, 0 );
-   }
-
-   $pieces = explode( ',', $text, 3 );
-   // Default radius if not provided: 5km
-   $radius = 5000;
-   if ( count( $pieces ) === 3 ) {
-   $radius = self::parseDistance( $pieces[0] );
-   if ( $radius === null ) {
-   return array( null, 0 );
-   }
-   $lat = $pieces[1];
-   $lon = $pieces[2];
-   } elseif ( count( $pieces ) === 2 ) {
-   $lat = $pieces[0];
-   $lon = $pieces[1];
-   } else {
-   return array( null, 0 );
-   }
-
-   $globe = new Globe( 'earth' );
-   if ( !$globe->coordinatesAreValid( $lat, $lon ) ) {
-   return array( null, 0 );
-   }
-
-   return array(
-   new Coord( floatval( $lat ), floatval( $lon ), 
$globe->getName() ),
-   $radius,
-   );
-   }
-
-   /**
-* @param string $distance
-* @param int $default
-* @return int|null Parsed distance in meters, or null if unparsable
-*/
-   public static function parseDistance( $distance ) {
-   if ( !preg_match( '/^(\d+)(m|km|mi|ft|yd)$/', $distance, 
$matches ) ) {
-   return null;
-   }
-
-   $scale = array(
-   'm' => 1,
-  

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: ULS: Use GeoIP Cookie exclusively for geolocation

2016-08-17 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: ULS: Use GeoIP Cookie exclusively for geolocation
..

ULS: Use GeoIP Cookie exclusively for geolocation

Untested copypasta-based work!

Note: wait for resolution of blocker T99226 before deploying!

Bug: T143270
Change-Id: Ib19ec5893c14f2950105dbaf06fa63de5b0119e1
---
M UniversalLanguageSelector.hooks.php
M extension.json
D resources/js/ext.uls.geoclient.js
3 files changed, 56 insertions(+), 57 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/12/305412/1

diff --git a/UniversalLanguageSelector.hooks.php 
b/UniversalLanguageSelector.hooks.php
index 1987f4d..d24d104 100644
--- a/UniversalLanguageSelector.hooks.php
+++ b/UniversalLanguageSelector.hooks.php
@@ -97,6 +97,56 @@
}
 
/**
+* "Stolen" from CentralNotice's ext.centralNotice.geoIP.js
+* Parse geo data in cookieValue and return an object with properties 
from
+* the fields therein. Returns null if the value couldn't be parsed.
+*
+* The cookie will look like one of the following:
+* - "US:CO:Denver:39.6762:-104.887:v4"
+* - ":v6"
+* - ""
+*
+* @param {string} cookieValue
+* @return {?Object}
+*/
+   function parseCookieValue( cookieValue ) {
+
+   // TODO Verify that these Regexes are optimal. (Why no anchors? 
Why the
+   // semicolon in the last group?)
+
+   // Parse cookie format currently set by WMF servers
+   var matches =
+   cookieValue.match( 
/([^:]*):([^:]*):([^:]*):([^:]*):([^:]*):([^;]*)/ )
+
+   // No matches...? Boo, no data from geo cookie.
+   if ( !matches ) {
+   return null;
+   }
+
+   // If country value looks wrong, assume no valid data
+if ( matches[ 1 ].length < 2 ) {
+   return null;
+   }
+
+   // If the matches were from the old cookie format, add an empty 
region
+   // element.
+   if ( matches.length === 6 ) {
+   matches = matches.slice( 0, 2 ).concat( [ '' ] )
+   .concat( matches.slice( 2 ) );
+   }
+
+   // Return a juicy Geo object
+   return {
+   country: matches[ 1 ],
+   region: matches[ 2 ],
+   city: matches[ 3 ],
+   lat: matches[ 4 ] && parseFloat( matches[ 4 ] ),
+   lon: matches[ 5 ] && parseFloat( matches[ 5 ] ),
+   af: matches[ 6 ]
+   };
+   }
+
+   /**
 * @param OutputPage $out
 * @param Skin $skin
 * @return bool
@@ -124,10 +174,12 @@
$out->addModules( 'ext.uls.compactlinks' );
}
 
-   if ( is_string( $wgULSGeoService ) ) {
-   $out->addModules( 'ext.uls.geoclient' );
-   } elseif ( $wgULSGeoService === true ) {
-   $out->addScript( '' );
+   var cookieValue = $.cookie( 'GeoIP' );
+   if ( cookieValue ) {
+   var geoObj = parseCookieValue( cookieValue );
+   if ( geoObj ) {
+   window.Geo = geoObj;
+   }
}
 
if ( self::isToolbarEnabled( $out->getUser() ) ) {
diff --git a/extension.json b/extension.json
index c765538..1a0e48b 100644
--- a/extension.json
+++ b/extension.json
@@ -127,11 +127,6 @@
"localBasePath": "resources",
"remoteExtPath": "UniversalLanguageSelector/resources"
},
-   "ext.uls.geoclient": {
-   "scripts": "js/ext.uls.geoclient.js",
-   "localBasePath": "resources",
-   "remoteExtPath": "UniversalLanguageSelector/resources"
-   },
"ext.uls.ime": {
"scripts": "js/ext.uls.ime.js",
"dependencies": [
diff --git a/resources/js/ext.uls.geoclient.js 
b/resources/js/ext.uls.geoclient.js
deleted file mode 100644
index 71d2de6..000
--- a/resources/js/ext.uls.geoclient.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*!
- * ULS GeoIP client
- *
- * Copyright (C) 2012 Alolita Sharma, Amir Aharoni, Arun Ganesh, Brandon 
Harris,
- * Niklas Laxström, Pau Giner, Santhosh Thottingal, Siebrand Mazeland and other
- * contributors. See CREDITS for a list.
- *
- * UniversalLanguageSelector is dual licensed GPLv2 or later and MIT. You don't
- * have to do anything special to choose one license or the other and you don't
- * have to notify anyone whi

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make doAtomicSection() return the callback result

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

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

Change subject: Make doAtomicSection() return the callback result
..

Make doAtomicSection() return the callback result

This makes the method a bit more convenient

Change-Id: Ic140e200cddcdf8e1a09b65c94d2da3aed62756d
---
M includes/db/Database.php
M includes/db/IDatabase.php
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/305415/1

diff --git a/includes/db/Database.php b/includes/db/Database.php
index 78975ff..2041aca 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -2658,12 +2658,14 @@
final public function doAtomicSection( $fname, callable $callback ) {
$this->startAtomic( $fname );
try {
-   call_user_func_array( $callback, [ $this, $fname ] );
+   $res = call_user_func_array( $callback, [ $this, $fname 
] );
} catch ( Exception $e ) {
$this->rollback( $fname );
throw $e;
}
$this->endAtomic( $fname );
+
+   return $res;
}
 
final public function begin( $fname = __METHOD__ ) {
diff --git a/includes/db/IDatabase.php b/includes/db/IDatabase.php
index af024b8..a871082 100644
--- a/includes/db/IDatabase.php
+++ b/includes/db/IDatabase.php
@@ -1342,6 +1342,7 @@
 *
 * @param string $fname Caller name (usually __METHOD__)
 * @param callable $callback Callback that issues DB updates
+* @return mixed $res Result of the callback (since 1.28)
 * @throws DBError
 * @throws RuntimeException
 * @throws UnexpectedValueException

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic140e200cddcdf8e1a09b65c94d2da3aed62756d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] operations/puppet[production]: ChangeProp: Set UV_THREADPOOL_SIZE env variable

2016-08-17 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

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

Change subject: ChangeProp: Set UV_THREADPOOL_SIZE env variable
..

ChangeProp: Set UV_THREADPOOL_SIZE env variable

To switch to the new kafka driver we need to set
the UV_THREADPOOL_SIZE to the maximum in order to
get bigger libuv thread pool. This is a temporary
solution until upstream kafka driver switches to
custom thread pool implementation.

Change-Id: I53c2590e0f084b846f45ecf5619e4aacab97fabb
---
M modules/changeprop/manifests/init.pp
M modules/service/manifests/node.pp
M modules/service/templates/initscripts/node.systemd.erb
M modules/service/templates/initscripts/node.upstart.erb
4 files changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/305414/1

diff --git a/modules/changeprop/manifests/init.pp 
b/modules/changeprop/manifests/init.pp
index b7124f7..d09397e 100644
--- a/modules/changeprop/manifests/init.pp
+++ b/modules/changeprop/manifests/init.pp
@@ -34,6 +34,11 @@
 
 include ::service::configuration
 
+service::packages { 'changeprop':
+pkgs => ['librdkafka++1', 'librdkafka1'],
+dev_pkgs => ['librdkafka-dev'],
+}
+
 $restbase_uri = $::service::configuration::restbase_uri
 $mwapi_uri = $::service::configuration::mwapi_uri
 
@@ -49,6 +54,9 @@
 deployment  => 'scap3',
 auto_refresh=> false,
 init_restart=> false,
+environment => {
+'UV_THREADPOOL_SIZE' => 128
+},
 }
 
 }
diff --git a/modules/service/manifests/node.pp 
b/modules/service/manifests/node.pp
index f8668cc..f1c3da6 100644
--- a/modules/service/manifests/node.pp
+++ b/modules/service/manifests/node.pp
@@ -86,6 +86,10 @@
 #  Whether the service should be respawned by the init system in case of
 #  crashes. Default: true
 #
+# [*environment*]
+#  Environment variables that should be set in the service systemd or upstart 
unit.
+#  Default: undef
+#
 # [*deployment*]
 #   If this value is set to 'scap3' then deploy via scap3, otherwise,
 #   use trebuchet
@@ -124,6 +128,16 @@
 #},
 #}
 #
+# You can supply additional enviroment variables for the service systemd or 
upstart unit:
+#
+#service::node { 'myservice':
+#port   => 8520,
+#environment => {
+#   FOO: "bar"
+#}
+#}
+#
+#
 define service::node(
 $port,
 $enable  = true,
@@ -144,6 +158,7 @@
 $statsd_prefix   = $title,
 $auto_refresh= true,
 $init_restart= true,
+$environment = undef,
 $deployment  = undef,
 $deployment_user = 'deploy-service',
 $deployment_config = false,
diff --git a/modules/service/templates/initscripts/node.systemd.erb 
b/modules/service/templates/initscripts/node.systemd.erb
index 153b0ab..d6e6cc6 100644
--- a/modules/service/templates/initscripts/node.systemd.erb
+++ b/modules/service/templates/initscripts/node.systemd.erb
@@ -11,6 +11,11 @@
 Group=<%= @title %>
 Environment="NODE_PATH=/srv/deployment/<%= @repo %>/node_modules"
 Environment="<%= @title.gsub(/[^a-zA-Z0-9_]/, '_').upcase %>_PORT=<%= @port %>"
+<%- if defined?(@environment) && !@environment.empty? -%>
+<%- @environment.each do | variable, value | -%>
+Environment="<%= variable %>=<%= value %>"
+<%- end -%>
+<%- end -%>
 SyslogIdentifier=<%= @title %>
 <% if @init_restart -%>
 Restart=always
diff --git a/modules/service/templates/initscripts/node.upstart.erb 
b/modules/service/templates/initscripts/node.upstart.erb
index 59e6367..cf2b2fc 100644
--- a/modules/service/templates/initscripts/node.upstart.erb
+++ b/modules/service/templates/initscripts/node.upstart.erb
@@ -14,6 +14,11 @@
 
 env NODE_PATH="/srv/deployment/<%= @repo %>/node_modules"
 env <%= @title.gsub(/[^a-zA-Z0-9_]/, '_').upcase %>_PORT="<%= @port %>"
+<%- if defined?(@environment) && !@environment.empty? -%>
+<%- @environment.each do | variable, value | -%>
+env <%= variable.upcase %>="<%= value %>"
+<%- end -%>
+<%- end -%>
 
 <% if @init_restart -%>
 respawn

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: rake: Fix bundle install path

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

Change subject: rake: Fix bundle install path
..


rake: Fix bundle install path

Change-Id: Ieb7b7d9f299a68ec6844c7a7e5d39f9ebb4890bf
---
M jjb/ruby-jobs.yaml
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index f665d68..f0834bf 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -61,9 +61,7 @@
  - zuul
 builders:
  - shell: |
-# We clean up unused gems that might be injected by castor
-# Installs under BUNDLE_PATH injected by Zuul
-bundle install --clean
+bundle install --clean --path ../vendor/bundle
 bundle exec rake test
 
 - job-template:

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: rake: Fix bundle install path

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

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

Change subject: rake: Fix bundle install path
..

rake: Fix bundle install path

Change-Id: Ieb7b7d9f299a68ec6844c7a7e5d39f9ebb4890bf
---
M jjb/ruby-jobs.yaml
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/11/305411/1

diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index f665d68..f0834bf 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -61,9 +61,7 @@
  - zuul
 builders:
  - shell: |
-# We clean up unused gems that might be injected by castor
-# Installs under BUNDLE_PATH injected by Zuul
-bundle install --clean
+bundle install --clean --path ../vendor/bundle
 bundle exec rake test
 
 - job-template:

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Move `rake` jobs off of nodepool

2016-08-17 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: Move `rake` jobs off of nodepool
..


Move `rake` jobs off of nodepool

Most of these jobs are less than 10 seconds.

Change-Id: I8cfa8968aa5f2647e99f44162a622699c7bb72d7
---
M jjb/oojs.yaml
M jjb/ruby-jobs.yaml
M tests/test_zuul_scheduler.py
M zuul/layout.yaml
4 files changed, 16 insertions(+), 19 deletions(-)

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



diff --git a/jjb/oojs.yaml b/jjb/oojs.yaml
index 7d1156c..8d3e183 100644
--- a/jjb/oojs.yaml
+++ b/jjb/oojs.yaml
@@ -6,7 +6,7 @@
 script:
 - doc
 - demos
-- '{name}-rake-jessie'
+- '{name}-rake'
 - '{name}-jshint'
 - '{name}-jsonlint'
 
diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index 46a44cb..f665d68 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -51,27 +51,24 @@
  bundler-version: ''
  command: '{command}'
 
-# Run `bundle exec rake test` on Nodepool Jessie instances.
-- job: &job_rake-jessie
-name: 'rake-jessie'
-node: ci-jessie-wikimedia
+# Run `bundle exec rake test` on Jessie instances.
+- job: &job_rake
+name: 'rake'
+node: contintLabsSlave && DebianJessie
 defaults: use-remote-zuul-shallow-clone
 concurrent: true
 triggers:
  - zuul
 builders:
- - castor-load
  - shell: |
 # We clean up unused gems that might be injected by castor
 # Installs under BUNDLE_PATH injected by Zuul
 bundle install --clean
 bundle exec rake test
-publishers:
- - castor-save
 
 - job-template:
-!!merge : *job_rake-jessie
-name: '{name}-rake-jessie'
+!!merge : *job_rake
+name: '{name}-rake'
 # Reinject Zuul parameters since JJB strip for some reason
 triggers:
  - zuul
@@ -79,7 +76,7 @@
 - project:
 name: common-rake-job
 jobs:
- - rake-jessie
+ - rake
 
 # Call bundle 'yard' to generate documentation in labs and publish to
 # doc.wikimedia.org using an intermediate rsync repository in labs.
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index a489ed0..b1d412c 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -512,7 +512,7 @@
 
 self.assertTrue(test_manager.eventMatches(event, change))
 
-# Make sure rake-jessie is properly filtered
+# Make sure rake is properly filtered
 # https://phabricator.wikimedia.org/T105178
 def test_mediawiki_core_rake_filters(self):
 test_manager = self.getPipeline('test').manager
@@ -520,7 +520,7 @@
  self.getPipeline('test').job_trees.iteritems()
  if p.name == 'mediawiki/core'][0]
 rake_job = [j for j in jobs_tree.getJobs()
-if j.name == 'rake-jessie'][0]
+if j.name == 'rake'][0]
 
 def change_for_branch(branch_name):
 """Return a change against branch_name branch"""
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 3f99281..d4f58ee 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -622,7 +622,7 @@
   - name: ^.*-non-voting$
 voting: false
 
-  - name: ^rake-jessie$
+  - name: ^rake$
 # Rake entry points have not been backported to wmf branches yet
 # -- hashar Nov 10th 2015
 branch: (?!^wmf/1\.27\.0-wmf\.[45])
@@ -1198,9 +1198,9 @@
 
   - name: rake
 test:
-  - rake-jessie
+  - rake
 gate-and-submit:
-  - rake-jessie
+  - rake
 
   - name: tox-jessie
 test:
@@ -2199,7 +2199,7 @@
 test:
   # testing
   - operations-puppet-tox
-  - rake-jessie
+  - rake
   # Same as `check` pipeline:
   - erblint-HEAD
   - pplint-HEAD
@@ -8376,12 +8376,12 @@
   - oojs-ui-jsonlint
 test:
   - oojs-ui-npm-node-4
-  - oojs-ui-rake-jessie
+  - oojs-ui-rake
   - oojs-ui-npm-run-demos-node-4
   - oojs-ui-npm-run-doc-node-4
 gate-and-submit:
   - oojs-ui-npm-node-4
-  - oojs-ui-rake-jessie
+  - oojs-ui-rake
   - oojs-ui-npm-run-demos-node-4
   - oojs-ui-npm-run-doc-node-4
 postmerge:

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: en.planet: add 3 new feeds

2016-08-17 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: en.planet: add 3 new feeds
..

en.planet: add 3 new feeds

Adding 3 new feeds that were requested to be added.

- Lorna M Campbell
- Stryn
- Sam Wilson

https://meta.wikimedia.org/w/index.php?title=Planet_Wikimedia&oldid=15844093#Not_yet_added

Change-Id: Ifd7ab0a8a129e8588cf03e77a510f8d8b9c84fe4
---
M modules/planet/templates/feeds/en_config.erb
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/305410/1

diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index 4c1cc90..e5283b6 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -533,3 +533,12 @@
 [https://phabricator.wikimedia.org/phame/blog/feed/1/]
 name=WMF Release Engineering
 
+[https://lornamcampbell.org/tag/wikimedia/feed/]
+name=Lorna M Campbell
+
+[http://stryn.hol.es/blog/tag/wikimedia/feed/]
+name=Stryn
+
+[https://samwilson.id.au/Wikimedia.rss]
+name=Sam Wilson
+

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: visualeditor: Enable wikitext surface

2016-08-17 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: visualeditor: Enable wikitext surface
..

visualeditor: Enable wikitext surface

Change-Id: I1591408c8c4f2778542a6e5f84c0fcafd4ce14ed
---
M puppet/modules/role/templates/visualeditor/conf.php.erb
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/09/305409/1

diff --git a/puppet/modules/role/templates/visualeditor/conf.php.erb 
b/puppet/modules/role/templates/visualeditor/conf.php.erb
index 1b4ba6e..60f3d1e 100644
--- a/puppet/modules/role/templates/visualeditor/conf.php.erb
+++ b/puppet/modules/role/templates/visualeditor/conf.php.erb
@@ -3,3 +3,4 @@
 $wgVisualEditorUseSingleEditTab = true;
 $wgDefaultUserOptions['visualeditor-enable'] = 1;
 $wgVisualEditorParsoidURL = 'http://localhost:<%= scope['parsoid::port'] %>';
+$wgVisualEditorEnableWikitext = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1591408c8c4f2778542a6e5f84c0fcafd4ce14ed
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Move `rake` jobs off of nodepool

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

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

Change subject: Move `rake` jobs off of nodepool
..

Move `rake` jobs off of nodepool

Most of these jobs are less than 10 seconds.

Change-Id: I8cfa8968aa5f2647e99f44162a622699c7bb72d7
---
M jjb/oojs.yaml
M jjb/ruby-jobs.yaml
M tests/test_zuul_scheduler.py
M zuul/layout.yaml
4 files changed, 16 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/08/305408/1

diff --git a/jjb/oojs.yaml b/jjb/oojs.yaml
index 7d1156c..8d3e183 100644
--- a/jjb/oojs.yaml
+++ b/jjb/oojs.yaml
@@ -6,7 +6,7 @@
 script:
 - doc
 - demos
-- '{name}-rake-jessie'
+- '{name}-rake'
 - '{name}-jshint'
 - '{name}-jsonlint'
 
diff --git a/jjb/ruby-jobs.yaml b/jjb/ruby-jobs.yaml
index 46a44cb..f665d68 100644
--- a/jjb/ruby-jobs.yaml
+++ b/jjb/ruby-jobs.yaml
@@ -51,27 +51,24 @@
  bundler-version: ''
  command: '{command}'
 
-# Run `bundle exec rake test` on Nodepool Jessie instances.
-- job: &job_rake-jessie
-name: 'rake-jessie'
-node: ci-jessie-wikimedia
+# Run `bundle exec rake test` on Jessie instances.
+- job: &job_rake
+name: 'rake'
+node: contintLabsSlave && DebianJessie
 defaults: use-remote-zuul-shallow-clone
 concurrent: true
 triggers:
  - zuul
 builders:
- - castor-load
  - shell: |
 # We clean up unused gems that might be injected by castor
 # Installs under BUNDLE_PATH injected by Zuul
 bundle install --clean
 bundle exec rake test
-publishers:
- - castor-save
 
 - job-template:
-!!merge : *job_rake-jessie
-name: '{name}-rake-jessie'
+!!merge : *job_rake
+name: '{name}-rake'
 # Reinject Zuul parameters since JJB strip for some reason
 triggers:
  - zuul
@@ -79,7 +76,7 @@
 - project:
 name: common-rake-job
 jobs:
- - rake-jessie
+ - rake
 
 # Call bundle 'yard' to generate documentation in labs and publish to
 # doc.wikimedia.org using an intermediate rsync repository in labs.
diff --git a/tests/test_zuul_scheduler.py b/tests/test_zuul_scheduler.py
index a489ed0..b1d412c 100644
--- a/tests/test_zuul_scheduler.py
+++ b/tests/test_zuul_scheduler.py
@@ -512,7 +512,7 @@
 
 self.assertTrue(test_manager.eventMatches(event, change))
 
-# Make sure rake-jessie is properly filtered
+# Make sure rake is properly filtered
 # https://phabricator.wikimedia.org/T105178
 def test_mediawiki_core_rake_filters(self):
 test_manager = self.getPipeline('test').manager
@@ -520,7 +520,7 @@
  self.getPipeline('test').job_trees.iteritems()
  if p.name == 'mediawiki/core'][0]
 rake_job = [j for j in jobs_tree.getJobs()
-if j.name == 'rake-jessie'][0]
+if j.name == 'rake'][0]
 
 def change_for_branch(branch_name):
 """Return a change against branch_name branch"""
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 3f99281..d4f58ee 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -622,7 +622,7 @@
   - name: ^.*-non-voting$
 voting: false
 
-  - name: ^rake-jessie$
+  - name: ^rake$
 # Rake entry points have not been backported to wmf branches yet
 # -- hashar Nov 10th 2015
 branch: (?!^wmf/1\.27\.0-wmf\.[45])
@@ -1198,9 +1198,9 @@
 
   - name: rake
 test:
-  - rake-jessie
+  - rake
 gate-and-submit:
-  - rake-jessie
+  - rake
 
   - name: tox-jessie
 test:
@@ -2199,7 +2199,7 @@
 test:
   # testing
   - operations-puppet-tox
-  - rake-jessie
+  - rake
   # Same as `check` pipeline:
   - erblint-HEAD
   - pplint-HEAD
@@ -8376,12 +8376,12 @@
   - oojs-ui-jsonlint
 test:
   - oojs-ui-npm-node-4
-  - oojs-ui-rake-jessie
+  - oojs-ui-rake
   - oojs-ui-npm-run-demos-node-4
   - oojs-ui-npm-run-doc-node-4
 gate-and-submit:
   - oojs-ui-npm-node-4
-  - oojs-ui-rake-jessie
+  - oojs-ui-rake
   - oojs-ui-npm-run-demos-node-4
   - oojs-ui-npm-run-doc-node-4
 postmerge:

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Further fix to criteria range on dedupe - exclude deleted

2016-08-17 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Further fix to criteria range on dedupe - exclude deleted
..

Further fix to criteria range on dedupe - exclude deleted

Bug: T142954
Change-Id: I6a2163f2097ad3e5e67c1f28c2e27d41950bf6ba
---
M sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/07/305407/1

diff --git a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc 
b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
index 12d1741..02b005d 100644
--- a/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
+++ b/sites/all/modules/wmf_civicrm/scripts/civicrm_merge.drush.inc
@@ -44,7 +44,7 @@
   $end = CRM_Core_DAO::singleValueQuery("
 SELECT max(id)
 FROM (
-  SELECT id FROM civicrm_contact WHERE id > %1 ORDER BY id ASC LIMIT %2
+  SELECT id FROM civicrm_contact WHERE id > %1 AND is_deleted = 0 ORDER BY 
id ASC LIMIT %2
 ) as c",
 array(1 => array($start, 'Integer'), 2 => array($batch_size, 'Integer'))
   );

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Add .idea directory to .gitignore

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

Change subject: Add .idea directory to .gitignore
..


Add .idea directory to .gitignore

Used as a project settings directory for PhpStorm.

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

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



diff --git a/.gitignore b/.gitignore
index 88b0536..3b4c22a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,3 +13,4 @@
 /demos/node_modules
 /demos/dist
 /demos/php
+.idea

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I234ecc64f6762403f6996a1164b6ff3c420a33e0
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: 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] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

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

Change subject: Update DonationInterface submodule
..


Update DonationInterface submodule

Change-Id: Ieda1c722f4373de6501f3ae9c4412968cebb3e6a
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 8de7409..f830e81 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 8de740959e26a1d45b11b7201e95595b0e13682a
+Subproject commit f830e813690b918513e0cc7f33ef5a149be64388

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieda1c722f4373de6501f3ae9c4412968cebb3e6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: XenoRyet 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: tests: Fix invalid @covers tag for testModuleVersion()

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

Change subject: tests: Fix invalid @covers tag for testModuleVersion()
..


tests: Fix invalid @covers tag for testModuleVersion()

Follows-up 82a52d9. getModifiedTime() no longer exists,
this logic is now in getDefinitionSummary().

Change-Id: I6996a31cddeb60e63e3efbd7b3dec791e257c857
---
M tests/phpunit/ResourceLoaderSchemaModuleTest.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/tests/phpunit/ResourceLoaderSchemaModuleTest.php 
b/tests/phpunit/ResourceLoaderSchemaModuleTest.php
index 81ba385..5ac1ea2 100644
--- a/tests/phpunit/ResourceLoaderSchemaModuleTest.php
+++ b/tests/phpunit/ResourceLoaderSchemaModuleTest.php
@@ -48,9 +48,7 @@
}
 
/**
-* When the RemoteSchema dependency can be loaded, the modified time
-* should be set to sum of $wgCacheEpoch (in UNIX time) and the 
revision number.
-* @covers ResourceLoaderSchemaModule::getModifiedTime
+* @covers ResourceLoaderSchemaModule::getDefinitionSummary
 */
function testModuleVersion() {
$version1 = $this->module->getVersionHash( $this->context );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6996a31cddeb60e63e3efbd7b3dec791e257c857
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: Reclaim nobelium

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

Change subject: Reclaim nobelium
..


Reclaim nobelium

Entries for nobelium removed from DNS configuration. mgmt entries are kept
until the system is wiped.

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

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 0e92108..66058b6 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -927,7 +927,6 @@
 11  1H IN PTR   labsdb1006.eqiad.wmnet.
 12  1H IN PTR   labsdb1007.eqiad.wmnet.
 13  1H IN PTR   labmon1001.eqiad.wmnet.
-14  1H IN PTR   nobelium.eqiad.wmnet.
 15  1H IN PTR   labsdb1008.eqiad.wmnet.
 16  1H IN PTR   nfs-scratch.svc.eqiad.wmnet.
 17  1H IN PTR   nfs-tools-home.svc.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 546b0f6..e18cd08 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -712,7 +712,6 @@
 mw1306  1H  IN A10.64.16.106
 neodymium   1H  IN A10.64.32.20
 nitrogen1H  IN A10.64.32.199 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-nobelium1H  IN A10.64.37.14
 ocg1001 1H  IN A10.64.32.151
 ocg1002 1H  IN A10.64.48.42
 ocg1003 1H  IN A10.64.48.43

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2229f97cd19fe9c8fc4979ae61b7d8c549dbc3f8
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Gehel 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2016-08-17 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review.

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

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: Ieda1c722f4373de6501f3ae9c4412968cebb3e6a
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/305406/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 8de7409..f830e81 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 8de740959e26a1d45b11b7201e95595b0e13682a
+Subproject commit f830e813690b918513e0cc7f33ef5a149be64388

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieda1c722f4373de6501f3ae9c4412968cebb3e6a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: XenoRyet 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: SecureFileStore: using extension.json

2016-08-17 Thread Gerharddiller85 (Code Review)
Gerharddiller85 has uploaded a new change for review.

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

Change subject: SecureFileStore: using extension.json
..

SecureFileStore: using extension.json

Change-Id: Ie8763c2c65477a83d7ea55999caadca5a513a502
---
M SecureFileStore/SecureFileStore.class.php
M SecureFileStore/SecureFileStore.setup.php
A SecureFileStore/extension.json
3 files changed, 29 insertions(+), 33 deletions(-)


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

diff --git a/SecureFileStore/SecureFileStore.class.php 
b/SecureFileStore/SecureFileStore.class.php
index fa54391..7aa257b 100644
--- a/SecureFileStore/SecureFileStore.class.php
+++ b/SecureFileStore/SecureFileStore.class.php
@@ -46,31 +46,6 @@
const PATHTOFILEDISPATCHER = 
'index.php?action=ajax&title=-&rs=SecureFileStore::getFile';
 
/**
-* Constructor of SecureFileStore class
-*/
-   public function __construct() {
-   wfProfileIn( 'BS::'.__METHOD__ );
-
-   // Base settings
-   $this->mExtensionFile = __FILE__;
-   $this->mExtensionType = EXTTYPE::VARIABLE;
-   $this->mInfo = array(
-   EXTINFO::NAME=> 'SecureFileStore',
-   EXTINFO::DESCRIPTION => 'bs-securefilestore-desc',
-   EXTINFO::AUTHOR  => 'Markus Glaser, Marc Reymann',
-   EXTINFO::VERSION => 'default',
-   EXTINFO::STATUS  => 'default',
-   EXTINFO::PACKAGE => 'default',
-   EXTINFO::URL => 
'https://help.bluespice.com/index.php/SecureFileStore',
-   EXTINFO::DEPS=> array(
-   'bluespice'   => 
'2.22.0'
-   )
-   );
-   $this->mExtensionKey = 'MW::SecureFileStore';
-   wfProfileOut( 'BS::'.__METHOD__ );
-   }
-
-   /**
 * Initialization of ExtendedEditBar extension
 */
protected function initExt() {
diff --git a/SecureFileStore/SecureFileStore.setup.php 
b/SecureFileStore/SecureFileStore.setup.php
index 5dcb32b..b34d461 100644
--- a/SecureFileStore/SecureFileStore.setup.php
+++ b/SecureFileStore/SecureFileStore.setup.php
@@ -1,9 +1,2 @@
 https://help.bluespice.com/index.php/SecureFileStore";,
+   "author": "Markus Glaser, Marc Reymann",
+   "descriptionmsg": "bs-securefilestore-desc",
+   "type": "bluespice",
+   "bsgExtensions": {
+   "SecureFileStore": {
+   "className": "SecureFileStore",
+   "extPath": "/BlueSpiceExtensions/SecureFileStore"
+   }
+   },
+   "MessagesDirs": {
+   "SecureFileStore": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "SecureFileStore": "SecureFileStore.class.php"
+   },
+   "config": {
+   "AjaxExportList": [
+   "SecureFileStore::getFile"
+   ]
+   },
+   "manifest_version": 1
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8763c2c65477a83d7ea55999caadca5a513a502
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Gerharddiller85 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add Scap3 deployment configuration

2016-08-17 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Add Scap3 deployment configuration
..


Add Scap3 deployment configuration

Bug: T143129
Change-Id: I3afd56c476fd3feaf7098f2cede8932abd0f8384
---
A scap/betacluster
A scap/scap.cfg
A scap/target-canary
A scap/targets
4 files changed, 25 insertions(+), 0 deletions(-)

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



diff --git a/scap/betacluster b/scap/betacluster
new file mode 100644
index 000..09205c2
--- /dev/null
+++ b/scap/betacluster
@@ -0,0 +1 @@
+deployment-pdfrender.deployment-prep.eqiad.wmflabs
diff --git a/scap/scap.cfg b/scap/scap.cfg
new file mode 100644
index 000..5621202
--- /dev/null
+++ b/scap/scap.cfg
@@ -0,0 +1,20 @@
+[global]
+git_repo: electron-render/deploy
+git_deploy_dir: /srv/deployment
+git_repo_user: deploy-service
+ssh_user: deploy-service
+server_groups: canary, default
+canary_dsh_targets: target-canary
+dsh_targets: targets
+git_submodules: True
+service_name: pdfrender
+service_port: 5252
+lock_file: /tmp/scap.pdfrender.lock
+
+[wmnet]
+git_server: tin.eqiad.wmnet
+
+[deployment-prep.eqiad.wmflabs]
+git_server: deployment-tin.deployment-prep.eqiad.wmflabs
+server_groups: default
+dsh_targets: betacluster
diff --git a/scap/target-canary b/scap/target-canary
new file mode 100644
index 000..49e9dd7
--- /dev/null
+++ b/scap/target-canary
@@ -0,0 +1 @@
+scb2001.codfw.wmnet
diff --git a/scap/targets b/scap/targets
new file mode 100644
index 000..c28d243
--- /dev/null
+++ b/scap/targets
@@ -0,0 +1,3 @@
+scb2002.codfw.wmnet
+scb1001.eqiad.wmnet
+scb1002.eqiad.wmnet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3afd56c476fd3feaf7098f2cede8932abd0f8384
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/electron-render/deploy
Gerrit-Branch: master
Gerrit-Owner: Mobrovac 
Gerrit-Reviewer: Mobrovac 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Get rid of Notice: Undefined property: stdClass::$image that...

2016-08-17 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

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

Change subject: Get rid of Notice: Undefined property: stdClass::$image that 
pops up on collaborationlists when initially opening to edit with preview
..

Get rid of Notice: Undefined property: stdClass::$image that pops up on
collaborationlists when initially opening to edit with preview

We might as well just check if the image is set before checking if it's
a string.

Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
---
M includes/content/CollaborationListContent.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollaborationKit 
refs/changes/05/305405/1

diff --git a/includes/content/CollaborationListContent.php 
b/includes/content/CollaborationListContent.php
index 3bedad3..2b9d775 100644
--- a/includes/content/CollaborationListContent.php
+++ b/includes/content/CollaborationListContent.php
@@ -374,7 +374,7 @@
if ( class_exists( 'PageImages' ) ) {
$image = PageImages::getPageImage( 
$titleForItem );
}
-   } elseif ( is_string( $item->image ) ) {
+   } elseif ( isset( $item->image ) && is_string( 
$item->image ) ) {
$imageTitle = Title::newFromText( $item->image, 
NS_FILE );
if ( $imageTitle ) {
$image = wfFindFile( $imageTitle );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeee3c066f13133cce01efba03028c1bd7e61f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Isarra 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Prevent multiple Ingenico iFrames

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

Change subject: Prevent multiple Ingenico iFrames
..


Prevent multiple Ingenico iFrames

Reselecting or changing card types was creating and displaying multiple
Ingenico iFrames.  This stops that happening by removing preexiting iFrames
before creating the new one.

Bug: T142059
Change-Id: Ib57651c13ceac694cd45e028de96b6981046df06
---
M globalcollect_gateway/forms/js/ingenico.js
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/globalcollect_gateway/forms/js/ingenico.js 
b/globalcollect_gateway/forms/js/ingenico.js
index 2669ba4..4c1d2e3 100644
--- a/globalcollect_gateway/forms/js/ingenico.js
+++ b/globalcollect_gateway/forms/js/ingenico.js
@@ -2,12 +2,17 @@
var di = mw.donationInterface;
 
function showIframe( result ) {
+   // Remove any preexisting iFrames
+   $( '#ingenico-iFrame' ).remove();
+
var $form = $( '' )
.attr( {
src: result.formaction,
width: 318,
height: 314,
-   frameborder: 0
+   frameborder: 0,
+   name: 'ingenico-iFrame',
+   id: 'ingenico-iFrame'
} );
$( '#payment-form' ).append( $form );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib57651c13ceac694cd45e028de96b6981046df06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: XenoRyet 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: ShoutBox: using extension.json

2016-08-17 Thread Gerharddiller85 (Code Review)
Gerharddiller85 has uploaded a new change for review.

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

Change subject: ShoutBox: using extension.json
..

ShoutBox: using extension.json

Change-Id: Iad1af5acf1dcb8915158a49097dff256df2b3d3e
---
M ShoutBox/ShoutBox.class.php
M ShoutBox/ShoutBox.setup.php
A ShoutBox/extension.json
3 files changed, 75 insertions(+), 81 deletions(-)


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

diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php
index 265cf80..73f2951 100644
--- a/ShoutBox/ShoutBox.class.php
+++ b/ShoutBox/ShoutBox.class.php
@@ -42,30 +42,6 @@
  * @subpackage ShoutBox
  */
 class ShoutBox extends BsExtensionMW {
-
-   /**
-* Constructor of ShoutBox class
-*/
-   public function __construct() {
-   wfProfileIn( 'BS::' . __METHOD__ );
-
-   // Base settings
-   $this->mExtensionFile = __FILE__;
-   $this->mExtensionType = EXTTYPE::PARSERHOOK;
-   $this->mInfo = array(
-   EXTINFO::NAME => 'ShoutBox',
-   EXTINFO::DESCRIPTION => 'bs-shoutbox-desc',
-   EXTINFO::AUTHOR => 'Karl Waldmannstetter, Markus 
Glaser',
-   EXTINFO::VERSION => 'default',
-   EXTINFO::STATUS => 'default',
-   EXTINFO::PACKAGE => 'default',
-   EXTINFO::URL => 
'https://help.bluespice.com/index.php/Shoutbox',
-   EXTINFO::DEPS => array( 'bluespice' => '2.22.0' )
-   );
-   $this->mExtensionKey = 'MW::ShoutBox';
-   wfProfileOut( 'BS::' . __METHOD__ );
-   }
-
/**
 * Initialization of ShoutBox extension
 */
diff --git a/ShoutBox/ShoutBox.setup.php b/ShoutBox/ShoutBox.setup.php
index ddb35d9..aba7d04 100644
--- a/ShoutBox/ShoutBox.setup.php
+++ b/ShoutBox/ShoutBox.setup.php
@@ -1,58 +1,2 @@
  $IP . 
'/extensions/BlueSpiceExtensions/ShoutBox/resources',
-   'remoteExtPath' => 'BlueSpiceExtensions/ShoutBox/resources'
-);
-
-$wgResourceModules['ext.bluespice.shoutbox'] = array(
-   'scripts' => 'bluespice.shoutBox.js',
-   'dependencies' => 'ext.bluespice',
-   'messages' => array(
-   'bs-shoutbox-confirm-text',
-   'bs-shoutbox-confirm-title',
-   'bs-shoutbox-entermessage',
-   'bs-shoutbox-too-early',
-   'bs-shoutbox-charactersleft',
-   'bs-shoutbox-n-shouts'
-   ),
-   'position' => 'bottom'
-) + $aResourceModuleTemplate;
-
-$wgResourceModules['ext.bluespice.shoutbox.mention'] = array(
-   'scripts' => array(
-   'jquery.textcomplete/jquery.textcomplete.min.js',
-   'bluespice.shoutBox.mention.js',
-   ),
-   'styles' => 'jquery.textcomplete/jquery.textcomplete.css',
-   'dependencies' => array(
-   'ext.bluespice',
-   'ext.bluespice.shoutbox'
-   ),
-   'position' => 'bottom'
-) + $aResourceModuleTemplate;
-
-$wgDefaultUserOptions["echo-subscriptions-web-bs-shoutbox-mention-cat"] = true;
-
-$wgResourceModules['ext.bluespice.shoutbox.styles'] = array(
-   'styles' => 'bluespice.shoutBox.css',
-   'position' => 'top'
-) + $aResourceModuleTemplate;
-
-unset( $aResourceModuleTemplate );
-
-$wgAPIModules['bs-shoutbox-tasks'] = 'BSApiTasksShoutBox';
-
-$wgAutoloadClasses['ShoutBox'] = __DIR__ . '/ShoutBox.class.php';
-$wgAutoloadClasses['BSApiTasksShoutBox'] = __DIR__ . 
'/includes/api/BSApiTasksShoutBox.php';
-$wgAutoloadClasses['ViewShoutBox'] = __DIR__ . '/views/view.ShoutBox.php';
-$wgAutoloadClasses['ViewShoutBoxMessageList'] = __DIR__ . 
'/views/view.ShoutBoxMessageList.php';
-$wgAutoloadClasses['ViewShoutBoxMessage'] = __DIR__ . 
'/views/view.ShoutBoxMessage.php';
-
-$wgHooks['LoadExtensionSchemaUpdates'][] = 'ShoutBox::getSchemaUpdates';
\ No newline at end of file
+wfLoadExtension( 'BlueSpiceExtensions/ShoutBox' );
\ No newline at end of file
diff --git a/ShoutBox/extension.json b/ShoutBox/extension.json
new file mode 100644
index 000..7bb9efe
--- /dev/null
+++ b/ShoutBox/extension.json
@@ -0,0 +1,74 @@
+{
+"name": "ShoutBox",
+   "version": "2.27.0",
+   "url": "https://help.bluespice.com/index.php/Shoutbox";,
+   "author": "Karl Waldmannstetter, Markus Glaser",
+   "descriptionmsg": "bs-shoutbox-desc",
+   "type": "bluespice",
+   "bsgExtensions": {
+   "ShoutBox": {
+   "className": "ShoutBox",
+   "extPath": "/BlueSpiceExtensions/ShoutBox"
+   }
+   },
+   "DefaultUserOptions": {
+   "echo-subscriptions-web-bs-shoutbox-mention-cat": true
+   },
+   "APIModules": {
+   "bs-shoutbox-tasks": "BSApiTasksShoutBox"
+   },
+   

[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Add description to each section

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

Change subject: Add description to each section
..


Add description to each section

Bug: T142973
Change-Id: Ib52e58ef2142dea5adcf41c9236145c4044921e9
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/templates/modules.mustache
M modules/templates/newpp.mustache
5 files changed, 31 insertions(+), 4 deletions(-)

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



diff --git a/extension.json b/extension.json
index a4cad16..f65da3e 100644
--- a/extension.json
+++ b/extension.json
@@ -92,7 +92,14 @@
"performanceinspector-newpp-parsed-ttl",
"performanceinspector-newpp-dynamic-content",
"performanceinspector-newpp-cachereport",
-   "performanceinspector-newpp-value-and-limit"
+   "performanceinspector-newpp-value-and-limit",
+   
"performanceinspector-modules-localstorage-description",
+   "performanceinspector-modules-css-description",
+   
"performanceinspector-modules-module-description",
+   "performanceinspector-newpp-description",
+   
"performanceinspector-newpp-timingprofile-description",
+   
"performanceinspector-newpp-scribunto-description",
+   
"performanceinspector-newpp-cachereport-description"
]
}
},
diff --git a/i18n/en.json b/i18n/en.json
index 4053048..b58d99d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -60,5 +60,12 @@
"performanceinspector-newpp-cached-time": "Cached time",
"performanceinspector-newpp-parsed-ttl": "Cache expiry",
"performanceinspector-newpp-dynamic-content": "Dynamic content",
-   "performanceinspector-newpp-cachereport": "Parser cache"
+   "performanceinspector-newpp-cachereport": "Parser cache",
+   "performanceinspector-modules-localstorage-description": "How many 
ResourceLoader modules were loaded from local storage.",
+   "performanceinspector-modules-css-description": "For each 
ResourceLoader module with styles, count the number of selectors, and count how 
many match against some element currently in the DOM",
+   "performanceinspector-modules-module-description": "The ResourceLoader 
modules used by this page.",
+   "performanceinspector-newpp-description": "Information collected when 
the page was parsed in the backend. Most users will get a cached copy where the 
page is already parsed.",
+   "performanceinspector-newpp-timingprofile-description": "Time spent 
parsing the templates for this page.",
+   "performanceinspector-newpp-scribunto-description": "Memory and time 
usage spent in Lua scripting.",
+   "performanceinspector-newpp-cachereport-description": "When was this 
page cached in the parser cache."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 753b64f..b6eb023 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -57,5 +57,12 @@
"performanceinspector-newpp-expensivefunctioncount": "The text 
explaining the expensive parser function count metric",
"performanceinspector-newpp-timingprofile": "Header name for the timing 
profile part",
"performanceinspector-newpp-scribunto": "Header name for scribunto 
report part",
-   "performanceinspector-newpp-cachereport": "Header name for the cache 
report"
+   "performanceinspector-newpp-cachereport": "Header name for the cache 
report",
+   "performanceinspector-modules-localstorage-description": "Description 
explaining the local storage metrics",
+   "performanceinspector-modules-css-description": "Description explaining 
the CSS list metrics",
+   "performanceinspector-modules-module-description": "Description 
explaining the module list",
+   "performanceinspector-newpp-description": "Descriptiont explaining the 
parser report metrics",
+   "performanceinspector-newpp-timingprofile-description": "Description 
explaining the timing profile metrics",
+   "performanceinspector-newpp-scribunto-description": "Description 
explaining the scribuntu metrics",
+   "performanceinspector-newpp-cachereport-description": "Description 
explaining the cache report metrics"
 }
diff --git a/modules/templates/modules.mustache 
b/modules/templates/modules.mustache
index 55cb9d7..140f5d8 100644
--- a/modules/templates/modules.mustache
+++ b/modules/templates/modules.mustache
@@ -1,4 +1,5 @@
 {{! Module size info  }}
+{{#msg}}performanceinspector-modules-module-description{{/msg}}

  
{{#series}}
@@ -15,6 +16,7 @@
 
 {{! CSS info  }}
 {{#msg}}performanceinspector-modules-css-title{{/msg}}
+{{#msg}}performanceinspector-mo

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Prevent multiple Ingenico iFrames

2016-08-17 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review.

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

Change subject: Prevent multiple Ingenico iFrames
..

Prevent multiple Ingenico iFrames

Reselecting or changing card types was creating and displaying multiple
Ingenico iFrames.  This stops that happening by removing preexiting iFrames
before creating the new one.

Bug: T142059
Change-Id: Ib57651c13ceac694cd45e028de96b6981046df06
---
M globalcollect_gateway/forms/js/ingenico.js
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/globalcollect_gateway/forms/js/ingenico.js 
b/globalcollect_gateway/forms/js/ingenico.js
index 2669ba4..4c1d2e3 100644
--- a/globalcollect_gateway/forms/js/ingenico.js
+++ b/globalcollect_gateway/forms/js/ingenico.js
@@ -2,12 +2,17 @@
var di = mw.donationInterface;
 
function showIframe( result ) {
+   // Remove any preexisting iFrames
+   $( '#ingenico-iFrame' ).remove();
+
var $form = $( '' )
.attr( {
src: result.formaction,
width: 318,
height: 314,
-   frameborder: 0
+   frameborder: 0,
+   name: 'ingenico-iFrame',
+   id: 'ingenico-iFrame'
} );
$( '#payment-form' ).append( $form );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib57651c13ceac694cd45e028de96b6981046df06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: XenoRyet 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Replace git.wikimedia.org links with diffusion

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

Change subject: Replace git.wikimedia.org links with diffusion
..


Replace git.wikimedia.org links with diffusion

Bug: T139089
Change-Id: I8ef06d7f85011b9cdfcfbd5a3d7ac4809d098d4f
---
M docs/json.wiki
M view/init.mw.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/docs/json.wiki b/docs/json.wiki
index 7a8421c..2ae7b0a 100644
--- a/docs/json.wiki
+++ b/docs/json.wiki
@@ -1,4 +1,4 @@
-This document can be found 
[https://git.wikimedia.org/blob/mediawiki%2Fextensions%2FWikibase/master/docs%2Fjson.wiki
 in the Wikibase source code] and should be edited only there. It should be 
ensured that this page is up to date with the version in the code.
+This document can be found 
[https://phabricator.wikimedia.org/diffusion/EWBA/browse/master/docs/json.wiki 
in the Wikibase source code] and should be edited only there. It should be 
ensured that this page is up to date with the version in the code.
 
 = Wikibase JSON format =
 
diff --git a/view/init.mw.php b/view/init.mw.php
index f7c965c..499c939 100644
--- a/view/init.mw.php
+++ b/view/init.mw.php
@@ -11,7 +11,7 @@
'author' => array(
'[http://www.snater.com H. Snater]',
),
-   'url' => 
'https://git.wikimedia.org/summary/mediawiki%2Fextensions%2FWikibaseView',
+   'url' => 'https://phabricator.wikimedia.org/diffusion/EWBV/',
'description' => 'Wikibase View',
'license-name' => 'GPL-2.0+'
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ef06d7f85011b9cdfcfbd5a3d7ac4809d098d4f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Move mw.loader qunit tests to a separate file

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

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

Change subject: resourceloader: Move mw.loader qunit tests to a separate file
..

resourceloader: Move mw.loader qunit tests to a separate file

Change-Id: I867f00b0845664a2b670c460c58bf4f7791e0b38
---
M tests/qunit/QUnitTestResources.php
A tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
3 files changed, 688 insertions(+), 683 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/305403/1

diff --git a/tests/qunit/QUnitTestResources.php 
b/tests/qunit/QUnitTestResources.php
index 95f28c8..e30088d 100644
--- a/tests/qunit/QUnitTestResources.php
+++ b/tests/qunit/QUnitTestResources.php
@@ -74,6 +74,7 @@

'tests/qunit/suites/resources/mediawiki/mediawiki.template.test.js',

'tests/qunit/suites/resources/mediawiki/mediawiki.template.mustache.test.js',

'tests/qunit/suites/resources/mediawiki/mediawiki.test.js',
+   
'tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js',

'tests/qunit/suites/resources/mediawiki/mediawiki.html.test.js',

'tests/qunit/suites/resources/mediawiki/mediawiki.Title.test.js',

'tests/qunit/suites/resources/mediawiki/mediawiki.toc.test.js',
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
new file mode 100644
index 000..41d800a
--- /dev/null
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.loader.test.js
@@ -0,0 +1,685 @@
+( function ( mw, $ ) {
+   QUnit.module( 'mediawiki (mw.loader)' );
+
+   mw.loader.addSource(
+   'testloader',
+   QUnit.fixurl( mw.config.get( 'wgScriptPath' ) + 
'/tests/qunit/data/load.mock.php' )
+   );
+
+   /**
+* The sync style load test (for @import). This is, in a way, also an 
open bug for
+* ResourceLoader ("execute js after styles are loaded"), but browsers 
don't offer a
+* way to get a callback from when a stylesheet is loaded (that is, 
including any
+* `@import` rules inside). To work around this, we'll have a little 
time loop to check
+* if the styles apply.
+*
+* Note: This test originally used new Image() and onerror to get a 
callback
+* when the url is loaded, but that is fragile since it doesn't monitor 
the
+* same request as the css @import, and Safari 4 has issues with
+* onerror/onload not being fired at all in weird cases like this.
+*/
+   function assertStyleAsync( assert, $element, prop, val, fn ) {
+   var styleTestStart,
+   el = $element.get( 0 ),
+   styleTestTimeout = ( QUnit.config.testTimeout || 5000 ) 
- 200;
+
+   function isCssImportApplied() {
+   // Trigger reflow, repaint, redraw, whatever 
(cross-browser)
+   var x = $element.css( 'height' );
+   x = el.innerHTML;
+   el.className = el.className;
+   x = document.documentElement.clientHeight;
+
+   return $element.css( prop ) === val;
+   }
+
+   function styleTestLoop() {
+   var styleTestSince = new Date().getTime() - 
styleTestStart;
+   // If it is passing or if we timed out, run the real 
test and stop the loop
+   if ( isCssImportApplied() || styleTestSince > 
styleTestTimeout ) {
+   assert.equal( $element.css( prop ), val,
+   'style "' + prop + ': ' + val + '" from 
url is applied (after ' + styleTestSince + 'ms)'
+   );
+
+   if ( fn ) {
+   fn();
+   }
+
+   return;
+   }
+   // Otherwise, keep polling
+   setTimeout( styleTestLoop );
+   }
+
+   // Start the loop
+   styleTestStart = new Date().getTime();
+   styleTestLoop();
+   }
+
+   function urlStyleTest( selector, prop, val ) {
+   return QUnit.fixurl(
+   mw.config.get( 'wgScriptPath' ) +
+   '/tests/qunit/data/styleTest.css.php?' +
+   $.param( {
+   selector: selector,
+   prop: prop,
+   val: val
+   } )
+   );
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Move cache-eval logic out of mw.loader.work()

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

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

Change subject: resourceloader: Move cache-eval logic out of mw.loader.work()
..

resourceloader: Move cache-eval logic out of mw.loader.work()

Change-Id: Ib6bad1e88243381e9eb86e95571887c8ae1fc4f0
---
M resources/src/mediawiki/mediawiki.js
1 file changed, 41 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/305402/1

diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 491564a..dbaae2a 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -1662,6 +1662,38 @@
}
}
 
+
+   /**
+* Evaluate a batch of load.php responses retreived 
from mw.loader.store.
+*
+* @private
+* @param {string[]} modules List of module names being 
evaluated.
+* @param {string[]} sources Array of JavaScript source 
code in the form of
+* calls to mw.loader#implement().
+* @return {string[]} List of module names that failed 
evaluation
+*/
+   function batchEval( modules, sources ) {
+   try {
+   $.globalEval( sources.join( ';' ) );
+   } catch ( err ) {
+   // Not good, the cached 
mw.loader.implement calls failed! This should
+   // never happen, barring ResourceLoader 
bugs, browser bugs and PEBKACs.
+   // Depending on how corrupt the string 
is, it is likely that some
+   // modules' implement() succeeded while 
the ones after the error will
+   // never run and leave their modules in 
the 'loading' state forever.
+   // Since this is an error not caused by 
an individual module but by
+   // something that infected the 
implement call itself, don't take any
+   // risks and clear everything in this 
cache.
+   mw.loader.store.clear();
+
+   mw.track( 'resourceloader.exception', { 
exception: err, source: 'store-eval' } );
+   return $.grep( modules, function ( 
module ) {
+   return registry[ module ].state 
=== 'loading';
+   } );
+   }
+   return [];
+   }
+
/* Public Members */
return {
/**
@@ -1686,7 +1718,7 @@
 * @protected
 */
work: function () {
-   var q, batch, concatSource, origBatch;
+   var q, batch, sources, sourceModules, 
failed;
 
batch = [];
 
@@ -1705,39 +1737,18 @@
 
mw.loader.store.init();
if ( mw.loader.store.enabled ) {
-   concatSource = [];
-   origBatch = batch;
-   batch = $.grep( batch, function 
( module ) {
+   sources = [];
+   sourceModules = $.grep( batch, 
function ( module ) {
var source = 
mw.loader.store.get( module );
if ( source ) {
-   
concatSource.push( source );
-   return false;
+   sources.push( 
source );
+   return true;
}
-   return true;
+   return false;
} );
-   try {
-   $.globalEval( 
concatSource.join( ';' ) );
-  

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[wmf/1.28.0-wmf.15]: Make sure status updates in jobs commit/rollback all DBs tog...

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

Change subject: Make sure status updates in jobs commit/rollback all DBs 
together
..


Make sure status updates in jobs commit/rollback all DBs together

All fixed call to undefined getWikiText() method in StatusValue.

Bug: T143171
Change-Id: Ide1ee9ff75e61caf794c1acc9736a576cbf3233c
(cherry picked from commit 5c51154c3e1b3846aaa881741958e58f6fd40ca3)
---
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/LocalRenameJob/LocalRenameJob.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
4 files changed, 21 insertions(+), 15 deletions(-)

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



diff --git a/includes/GlobalRename/GlobalRenameUserStatus.php 
b/includes/GlobalRename/GlobalRenameUserStatus.php
index f307973..ecb6101 100644
--- a/includes/GlobalRename/GlobalRenameUserStatus.php
+++ b/includes/GlobalRename/GlobalRenameUserStatus.php
@@ -201,14 +201,4 @@
}
);
}
-
-   /**
-* Commit status changes to the database
-*/
-   public function commitStatus() {
-   $dbw = $this->getDB( DB_MASTER );
-   if ( $dbw->trxLevel() ) {
-   $dbw->commit( __METHOD__ );
-   }
-   }
 }
diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index 31d29e8..0eb0c88 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -1,6 +1,7 @@
 doRun();
$this->addTeardownCallback( [ $this, 'scheduleNextWiki' 
] );
} catch ( Exception $e ) {
-   // This will lock the user out of their account
-   // until a sysadmin intervenes
+   // This will lock the user out of their account until a 
sysadmin intervenes
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->rollbackMasterChanges( __METHOD__ );
$this->updateStatus( 'failed' );
+   $factory->commitMasterChanges( __METHOD__ );
throw $e;
}
 
@@ -101,7 +104,6 @@
 
protected function updateStatus( $status ) {
$this->renameuserStatus->setStatus( wfWikiID(), $status );
-   $this->renameuserStatus->commitStatus();
}
 
protected function scheduleNextWiki() {
diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index 5d2a754..91bd6bc 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -1,5 +1,7 @@
 params['to'];
 
$this->updateStatus( 'inprogress' );
+   // Make the status update visible to all other transactions 
immediately
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->commitMasterChanges( __METHOD__ );
 
if ( isset( $this->params['force'] ) && $this->params['force'] 
) {
// If we're dealing with an invalid username, load the 
data ourselves to avoid
diff --git a/includes/LocalRenameJob/LocalUserMergeJob.php 
b/includes/LocalRenameJob/LocalUserMergeJob.php
index 4f9732f..9cd2535 100755
--- a/includes/LocalRenameJob/LocalUserMergeJob.php
+++ b/includes/LocalRenameJob/LocalUserMergeJob.php
@@ -1,5 +1,7 @@
 params['to'];
 
$this->updateStatus( 'inprogress' );
+   // Make the status update visible to all other transactions 
immediately
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->commitMasterChanges( __METHOD__ );
 
$toUser = $this->maybeCreateNewUser( $to );
 
@@ -66,10 +71,14 @@
return $user;
}
 
-   $status = CentralAuthUtils::autoCreateUser( $user );
+   $status = Status::wrap( CentralAuthUtils::autoCreateUser( $user 
) );
if ( !$status->isGood() ) {
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->rollbackMasterChanges( __METHOD__ );
$this->updateStatus( 'failed' );
-   throw new Exception( "autoCreateUser failed for 
$newName: " . $status->getWikiText( null, null, 'en' ) );
+   $factory->commitMasterChanges( __METHOD__ );
+   throw new Exception( "autoCreateUser failed for 
$newName: " .
+   $status->getWikiText( null, null, 'en' ) );
}
 
return $user;

-- 
To view, visit https:/

[MediaWiki-commits] [Gerrit] operations/puppet[production]: sge collector: set correct env

2016-08-17 Thread Rush (Code Review)
Rush has uploaded a new change for review.

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

Change subject: sge collector: set correct env
..

sge collector: set correct env

export SGE_ROOT='/data/project/.system/gridengine/' equiv

Change-Id: Ia4f6002186dc3106361d31f047d8a0e47f4603a1
Bugs: T140999
---
M modules/toollabs/files/monitoring/sge.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/305401/1

diff --git a/modules/toollabs/files/monitoring/sge.py 
b/modules/toollabs/files/monitoring/sge.py
index 8a7ae85..d925416 100644
--- a/modules/toollabs/files/monitoring/sge.py
+++ b/modules/toollabs/files/monitoring/sge.py
@@ -43,7 +43,8 @@
 def get_queues(self):
 """ retrieve list of queues
 """
-queues = subprocess.check_output(['/usr/bin/qconf', '-sql'])
+queues = subprocess.check_output(['/usr/bin/qconf', '-sql'],
+  env={"SGE_ROOT": 
'/data/project/.system/gridengine/'})
 return [q for q in queues.splitlines() if q not in 
self.config['exclude']]
 
 def job_state_stats(self, jobs):

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...prince[master]: Language visited bugfixes & progress bar

2016-08-17 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Language visited bugfixes & progress bar
..


Language visited bugfixes & progress bar

Fixes:
 - Correctly sorts the languages in the top 10 and bottom 50 lists by
   clicks or users (high to low) depending on which the user selected
 - Now auto-selects the bottom 12 (the maximum number of languages that
   can be selected at the same time) when sort is set to "Bottom 50"

Adds:
 - A progress bar showing the first-user-of-the-day the progress as
   the dashboard downloads the latest data

Bug: T140816
Change-Id: Iee7f255f76924f8398fb19d11793356bad22f0fe
---
M server.R
M ui.R
2 files changed, 46 insertions(+), 14 deletions(-)

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



diff --git a/server.R b/server.R
index 51bdb73..e4151eb 100644
--- a/server.R
+++ b/server.R
@@ -11,13 +11,23 @@
 shinyServer(function(input, output, session){
   
   if (Sys.Date() != existing_date) {
+progress <- shiny::Progress$new(session, min = 0, max = 1)
+on.exit(progress$close())
+progress$set(message = "Downloading clickthrough data...", value = 0)
 read_clickthrough()
+progress$set(message = "Downloading language visit data...", value = 1/7)
 read_langs()
+progress$set(message = "Downloading dwell-time data...", value = 2/7)
 read_dwelltime()
+progress$set(message = "Downloading country data data...", value = 3/7)
 read_country()
+progress$set(message = "Downloading user-agent data...", value = 4/7)
 read_useragents()
+progress$set(message = "Downloading pageview data...", value = 5/7)
 read_pageviews()
+progress$set(message = "Downloading referral data...", value = 6/7)
 read_referrals()
+progress$set(message = "Finished downloading datasets.", value = 1)
 existing_date <<- Sys.Date()
   }
   
@@ -35,7 +45,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$action_breakdown_dygraph <- renderDygraph({
@@ -50,7 +61,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$most_common_dygraph <- renderDygraph({
@@ -63,7 +75,8 @@
   dyLegend(labelsDiv = "most_common_legend", show = "always") %>%
   dyRangeSelector(fillColor = "", strokeColor = "", retainDateWindow = 
TRUE) %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$first_visit_dygraph <- renderDygraph({
@@ -77,7 +90,8 @@
   dyRangeSelector(fillColor = "", strokeColor = "", retainDateWindow = 
TRUE) %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$dwelltime_dygraph <- renderDygraph({
@@ -91,7 +105,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", label

[MediaWiki-commits] [Gerrit] wikimedia...prince[master]: Language visited bugfixes & progress bar

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

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

Change subject: Language visited bugfixes & progress bar
..

Language visited bugfixes & progress bar

Fixes:
 - Correctly sorts the languages in the top 10 and bottom 50 lists by
   clicks or users (high to low) depending on which the user selected
 - Now auto-selects the bottom 12 (the maximum number of languages that
   can be selected at the same time) when sort is set to "Bottom 50"

Adds:
 - A progress bar showing the first-user-of-the-day the progress as
   the dashboard downloads the latest data

Bug: T140816
Change-Id: Iee7f255f76924f8398fb19d11793356bad22f0fe
---
M server.R
M ui.R
2 files changed, 46 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/prince 
refs/changes/00/305400/1

diff --git a/server.R b/server.R
index 51bdb73..e4151eb 100644
--- a/server.R
+++ b/server.R
@@ -11,13 +11,23 @@
 shinyServer(function(input, output, session){
   
   if (Sys.Date() != existing_date) {
+progress <- shiny::Progress$new(session, min = 0, max = 1)
+on.exit(progress$close())
+progress$set(message = "Downloading clickthrough data...", value = 0)
 read_clickthrough()
+progress$set(message = "Downloading language visit data...", value = 1/7)
 read_langs()
+progress$set(message = "Downloading dwell-time data...", value = 2/7)
 read_dwelltime()
+progress$set(message = "Downloading country data data...", value = 3/7)
 read_country()
+progress$set(message = "Downloading user-agent data...", value = 4/7)
 read_useragents()
+progress$set(message = "Downloading pageview data...", value = 5/7)
 read_pageviews()
+progress$set(message = "Downloading referral data...", value = 6/7)
 read_referrals()
+progress$set(message = "Finished downloading datasets.", value = 1)
 existing_date <<- Sys.Date()
   }
   
@@ -35,7 +45,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$action_breakdown_dygraph <- renderDygraph({
@@ -50,7 +61,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$most_common_dygraph <- renderDygraph({
@@ -63,7 +75,8 @@
   dyLegend(labelsDiv = "most_common_legend", show = "always") %>%
   dyRangeSelector(fillColor = "", strokeColor = "", retainDateWindow = 
TRUE) %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$first_visit_dygraph <- renderDygraph({
@@ -77,7 +90,8 @@
   dyRangeSelector(fillColor = "", strokeColor = "", retainDateWindow = 
TRUE) %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-05-18"), "Sister Links Updated", labelLoc = 
"bottom", color = "white") %>%
-  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white")
+  dyEvent(as.Date("2016-06-02"), "Detect Language Deployed", labelLoc = 
"bottom", color = "white") %>%
+  dyEvent(as.Date("2016-08-16"), "Secondary Links Collapsed", labelLoc = 
"bottom", color = "white")
   })
   
   output$dwelltime_dygraph <- renderDygraph({
@@ -91,7 +105,8 @@
   dyEvent(as.Date("2015-12-07"), "A (sampling change)", labelLoc = 
"bottom", color = "white") %>%
   dyEvent(as.Date("2016-03-10"), "Search Box Deployed", labelLoc = 
"bottom", color = "white") %>

[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[wmf/1.28.0-wmf.15]: Make sure status updates in jobs commit/rollback all DBs tog...

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

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

Change subject: Make sure status updates in jobs commit/rollback all DBs 
together
..

Make sure status updates in jobs commit/rollback all DBs together

All fixed call to undefined getWikiText() method in StatusValue.

Bug: T143171
Change-Id: Ide1ee9ff75e61caf794c1acc9736a576cbf3233c
(cherry picked from commit 5c51154c3e1b3846aaa881741958e58f6fd40ca3)
---
M includes/GlobalRename/GlobalRenameUserStatus.php
M includes/LocalRenameJob/LocalRenameJob.php
M includes/LocalRenameJob/LocalRenameUserJob.php
M includes/LocalRenameJob/LocalUserMergeJob.php
4 files changed, 21 insertions(+), 15 deletions(-)


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

diff --git a/includes/GlobalRename/GlobalRenameUserStatus.php 
b/includes/GlobalRename/GlobalRenameUserStatus.php
index f307973..ecb6101 100644
--- a/includes/GlobalRename/GlobalRenameUserStatus.php
+++ b/includes/GlobalRename/GlobalRenameUserStatus.php
@@ -201,14 +201,4 @@
}
);
}
-
-   /**
-* Commit status changes to the database
-*/
-   public function commitStatus() {
-   $dbw = $this->getDB( DB_MASTER );
-   if ( $dbw->trxLevel() ) {
-   $dbw->commit( __METHOD__ );
-   }
-   }
 }
diff --git a/includes/LocalRenameJob/LocalRenameJob.php 
b/includes/LocalRenameJob/LocalRenameJob.php
index 31d29e8..0eb0c88 100644
--- a/includes/LocalRenameJob/LocalRenameJob.php
+++ b/includes/LocalRenameJob/LocalRenameJob.php
@@ -1,6 +1,7 @@
 doRun();
$this->addTeardownCallback( [ $this, 'scheduleNextWiki' 
] );
} catch ( Exception $e ) {
-   // This will lock the user out of their account
-   // until a sysadmin intervenes
+   // This will lock the user out of their account until a 
sysadmin intervenes
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->rollbackMasterChanges( __METHOD__ );
$this->updateStatus( 'failed' );
+   $factory->commitMasterChanges( __METHOD__ );
throw $e;
}
 
@@ -101,7 +104,6 @@
 
protected function updateStatus( $status ) {
$this->renameuserStatus->setStatus( wfWikiID(), $status );
-   $this->renameuserStatus->commitStatus();
}
 
protected function scheduleNextWiki() {
diff --git a/includes/LocalRenameJob/LocalRenameUserJob.php 
b/includes/LocalRenameJob/LocalRenameUserJob.php
index 5d2a754..91bd6bc 100644
--- a/includes/LocalRenameJob/LocalRenameUserJob.php
+++ b/includes/LocalRenameJob/LocalRenameUserJob.php
@@ -1,5 +1,7 @@
 params['to'];
 
$this->updateStatus( 'inprogress' );
+   // Make the status update visible to all other transactions 
immediately
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->commitMasterChanges( __METHOD__ );
 
if ( isset( $this->params['force'] ) && $this->params['force'] 
) {
// If we're dealing with an invalid username, load the 
data ourselves to avoid
diff --git a/includes/LocalRenameJob/LocalUserMergeJob.php 
b/includes/LocalRenameJob/LocalUserMergeJob.php
index 4f9732f..9cd2535 100755
--- a/includes/LocalRenameJob/LocalUserMergeJob.php
+++ b/includes/LocalRenameJob/LocalUserMergeJob.php
@@ -1,5 +1,7 @@
 params['to'];
 
$this->updateStatus( 'inprogress' );
+   // Make the status update visible to all other transactions 
immediately
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->commitMasterChanges( __METHOD__ );
 
$toUser = $this->maybeCreateNewUser( $to );
 
@@ -66,10 +71,14 @@
return $user;
}
 
-   $status = CentralAuthUtils::autoCreateUser( $user );
+   $status = Status::wrap( CentralAuthUtils::autoCreateUser( $user 
) );
if ( !$status->isGood() ) {
+   $factory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $factory->rollbackMasterChanges( __METHOD__ );
$this->updateStatus( 'failed' );
-   throw new Exception( "autoCreateUser failed for 
$newName: " . $status->getWikiText( null, null, 'en' ) );
+   $factory->commitMasterChanges( __METHOD__ );
+   throw new Exception( "autoCreateUser failed for 
$newName: " .
+   $status->getWikiText( null, null, 'en' ) );
}
 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: zuul-test-repo: Allow testing multiple repositories at once

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

Change subject: zuul-test-repo: Allow testing multiple repositories at once
..


zuul-test-repo: Allow testing multiple repositories at once

Allow passing a file containing a list of repositories that should all
be tested.

Change-Id: I5c71605b3d4417d0d725580cc75e76dd73a668a2
---
M modules/zuul/files/zuul-test-repo.py
1 file changed, 31 insertions(+), 18 deletions(-)

Approvals:
  Hashar: Looks good to me, but someone else must approve
  Dzahn: Verified; Looks good to me, approved



diff --git a/modules/zuul/files/zuul-test-repo.py 
b/modules/zuul/files/zuul-test-repo.py
index 8b1b94d..785d008 100644
--- a/modules/zuul/files/zuul-test-repo.py
+++ b/modules/zuul/files/zuul-test-repo.py
@@ -31,23 +31,36 @@
 except IndexError:
 pipeline = 'test'
 
-# Allow "ext:MassMessage" as shorthand
 if repo.startswith('ext:'):
-repo = 'mediawiki/extensions/' + repo.split(':', 1)[1]
+# Allow "ext:MassMessage" as shorthand
+repos = ['mediawiki/extensions/' + repo.split(':', 1)[1]]
+elif repo.startswith('file:'):
+# Or entire files with "file:/home/foobar/list"
+with open(repo.split(':', 1)[1]) as f:
+repos = f.read().splitlines()
+else:
+repos = [repo]
 
-# Fetch the latest change for the repo from the Gerrit API
-r = requests.get('https://gerrit.wikimedia.org/r/changes/?'
- 'q=status:merged+project:%s&n=1&o=CURRENT_REVISION' % repo)
-data = json.loads(r.text[4:])
-if not data:
-print('Error, could not find any changes in %s.' % repo)
-sys.exit(1)
-change = data[0]
-change_number = change['_number']
-patchset = change['revisions'][change['current_revision']]['_number']
-print('Going to test %s@%s,%s' % (repo, change_number, patchset))
-subprocess.call(['zuul', 'enqueue',
- '--trigger', 'gerrit',
- '--pipeline', pipeline,
- '--project', repo,
- '--change', '%s,%s' % (change_number, patchset)])
+
+def test_repo(repo):
+# Fetch the latest change for the repo from the Gerrit API
+r = requests.get('https://gerrit.wikimedia.org/r/changes/?'
+ 'q=status:merged+project:%s&n=1&o=CURRENT_REVISION'
+ % repo)
+data = json.loads(r.text[4:])
+if not data:
+print('Error, could not find any changes in %s.' % repo)
+sys.exit(1)
+change = data[0]
+change_number = change['_number']
+patchset = change['revisions'][change['current_revision']]['_number']
+print('Going to test %s@%s,%s' % (repo, change_number, patchset))
+subprocess.call(['zuul', 'enqueue',
+ '--trigger', 'gerrit',
+ '--pipeline', pipeline,
+ '--project', repo,
+ '--change', '%s,%s' % (change_number, patchset)])
+
+if __name__ == '__main__':
+for repo in repos:
+test_repo(repo)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c71605b3d4417d0d725580cc75e76dd73a668a2
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Make excerpts in bundles not italic, but still grey

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

Change subject: Make excerpts in bundles not italic, but still grey
..


Make excerpts in bundles not italic, but still grey

Bug: T141034
Change-Id: I34c376a97e57ae660149e0fb8172128eb8c0
---
M modules/styles/mw.echo.ui.NotificationItemWidget.less
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 89dc7e9..1d78ba9 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -153,6 +153,7 @@
// for these.
em {
color: 
@notification-body-color;
+   font-style: normal;
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I34c376a97e57ae660149e0fb8172128eb8c0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PerformanceInspector[master]: Remove unused message key 'performanceinspector-newpp-column'

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

Change subject: Remove unused message key 'performanceinspector-newpp-column'
..


Remove unused message key 'performanceinspector-newpp-column'

Follows-up 1ea6033. Message key was attempted to be loaded but
not defined or used anywhere.

It didn't fail CI initially because the unit test for this error
was only recently merged upstream.

Change-Id: I1ce0e471b54d495416cd6a84c12c041728cad492
---
M extension.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index bfa0386..a4cad16 100644
--- a/extension.json
+++ b/extension.json
@@ -72,7 +72,6 @@
"performanceinspector-newpp-label",
"performanceinspector-newpp-column-name",
"performanceinspector-newpp-column-value",
-   "performanceinspector-newpp-column-limit",

"performanceinspector-newpp-template-time-report-column-name",

"performanceinspector-newpp-template-time-report-column-percentreal",

"performanceinspector-newpp-template-time-report-column-real",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ce0e471b54d495416cd6a84c12c041728cad492
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PerformanceInspector
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Phedenskog 
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   >