[MediaWiki-commits] [Gerrit] Allow $wgInterwikiCache to be an associative array - change (mediawiki/core)

2015-11-01 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Allow $wgInterwikiCache to be an associative array
..

Allow $wgInterwikiCache to be an associative array

For the same reasons wikiversions.cdb was converted to a PHP file -- viz., that
static arrays in PHP files get cached in HHVM's bytecode cache and are
therefore faster to use with HHVM than CDB files.

Change-Id: I5a979f047031ef211622f399df9b3b388797f53a
---
M includes/DefaultSettings.php
M includes/interwiki/Interwiki.php
2 files changed, 11 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/250301/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index d20b931..ae95f40 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3871,10 +3871,12 @@
  */
 
 /**
- *$wgInterwikiCache specifies path to constant database file.
+ * Interwiki cache, either as an associative array or a path to a constant
+ * database (.cdb) file.
  *
- * This cdb database is generated by dumpInterwiki from maintenance and has
- * such key formats:
+ * This data structure database is generated by the `dumpInterwiki` maintenance
+ * script and has key formats such as the following:
+ *
  *  - dbname:key - a simple key (e.g. enwiki:meta)
  *  - _sitename:key - site-scope key (e.g. wiktionary:meta)
  *  - __global:key - global-scope key (e.g. __global:meta)
diff --git a/includes/interwiki/Interwiki.php b/includes/interwiki/Interwiki.php
index bd8291f..9ba2917 100644
--- a/includes/interwiki/Interwiki.php
+++ b/includes/interwiki/Interwiki.php
@@ -137,7 +137,7 @@
$value = self::getInterwikiCacheEntry( $prefix );
 
$s = new Interwiki( $prefix );
-   if ( $value != '' ) {
+   if ( $value ) {
// Split values
list( $local, $url ) = explode( ' ', $value, 2 );
$s->mURL = $url;
@@ -165,7 +165,9 @@
$value = false;
try {
if ( !$db ) {
-   $db = CdbReader::open( $wgInterwikiCache );
+   $db = is_array( $wgInterwikiCache )
+   ? MapCache( $wgInterwikiCache )
+   : CdbReader::open( $wgInterwikiCache );
}
/* Resolve site name */
if ( $wgInterwikiScopes >= 3 && !$site ) {
@@ -177,15 +179,12 @@
 
$value = $db->get( wfMemcKey( $prefix ) );
// Site level
-   if ( $value == '' && $wgInterwikiScopes >= 3 ) {
+   if ( !$value && $wgInterwikiScopes >= 3 ) {
$value = $db->get( "_{$site}:{$prefix}" );
}
// Global Level
-   if ( $value == '' && $wgInterwikiScopes >= 2 ) {
+   if ( !$value && $wgInterwikiScopes >= 2 ) {
$value = $db->get( "__global:{$prefix}" );
-   }
-   if ( $value == 'undef' ) {
-   $value = '';
}
} catch ( CdbException $e ) {
wfDebug( __METHOD__ . ": CdbException caught, error 
message was "

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a979f047031ef211622f399df9b3b388797f53a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Use page_touched in cache key instead of page_latest - change (mediawiki...TextExtracts)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use page_touched in cache key instead of page_latest
..


Use page_touched in cache key instead of page_latest

Because the extracts depend upon template inclusion, to make sure
the extract is properly updated whenever the page's dependencies change,
use the page_touched timestamp instead of the latest revision id.

Since we're changing the cache key format, remove the 'mf' prefix from
back when it was still in MobileFrontend.

As a side-effect, this will also make action=purge invalidate the cache
since it updates page_touched.

Bug: T117322
Change-Id: Ib6f415c756c57caf6c83be495a4f229446e8b61e
---
M includes/ApiQueryExtracts.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ApiQueryExtracts.php b/includes/ApiQueryExtracts.php
index 8e1d100..24dd0dd 100644
--- a/includes/ApiQueryExtracts.php
+++ b/includes/ApiQueryExtracts.php
@@ -138,7 +138,7 @@
}
 
private function cacheKey( WikiPage $page, $introOnly ) {
-   return wfMemcKey( 'mf', 'extract', $page->getLatest(),
+   return wfMemcKey( 'textextracts', $page->getId(), 
$page->getTouched(),

$page->getTitle()->getPageLanguage()->getPreferredVariant(),
$this->params['plaintext'], $introOnly
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6f415c756c57caf6c83be495a4f229446e8b61e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TextExtracts
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-11-01T10:00:01+0000 - change (mediawiki...Wikidata)

2015-11-01 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review.

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

Change subject: New Wikidata Build - 2015-11-01T10:00:01+
..

New Wikidata Build - 2015-11-01T10:00:01+

Change-Id: I7134147d73fe530ce9f70baa122641777d1f55c9
---
M composer.lock
M extensions/Wikibase/client/i18n/lt.json
M extensions/Wikibase/lib/i18n/be-tarask.json
M extensions/Wikibase/repo/i18n/lt.json
M vendor/composer/installed.json
5 files changed, 35 insertions(+), 33 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 238d78d..cdb77a6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1444,12 +1444,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "257e975ff92831fff65799d6c1f170ed1102bea6"
+"reference": "8d2b1454a2d054bb9a04106e35f2d0d010d4370e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/257e975ff92831fff65799d6c1f170ed1102bea6;,
-"reference": "257e975ff92831fff65799d6c1f170ed1102bea6",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/8d2b1454a2d054bb9a04106e35f2d0d010d4370e;,
+"reference": "8d2b1454a2d054bb9a04106e35f2d0d010d4370e",
 "shasum": ""
 },
 "require": {
@@ -1518,7 +1518,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2015-10-31 01:10:11"
+"time": "2015-10-31 20:08:40"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/lt.json 
b/extensions/Wikibase/client/i18n/lt.json
index 753664c..322082e 100644
--- a/extensions/Wikibase/client/i18n/lt.json
+++ b/extensions/Wikibase/client/i18n/lt.json
@@ -10,9 +10,10 @@
},
"wikibase-client-desc": "Wikibase išplėtimo klientas",
"tooltip-t-wikibase": "Nuoroda į susietą duomenų saugyklos įrašą",
-   "apihelp-query+pageterms-description": "Gauti su puslapiu susijusias 
sąlygas per susijusį duomenų įrašą.",
+   "apihelp-query+pageterms-description": "Gauti su puslapiu susijusias 
sąlygas per susijusį duomenų įrašą. Viki-pagrindo esybės puslapyje, esybių 
terminai yra naudojami tiesiogiai.\nPastaba: Repozitorijos vikyje, 
puslapių-terminai veikia tik tiesiogiai esybės puslapiuose, bet ne puslapiuose 
susietuose su įrašu. Tai gali keistis ateityje.",
"apihelp-query+pageterms-example-simple": "Gauti visus su puslapiu 
\"Londonas\" susijusius terminus naudotojo kalba.",
"apihelp-query+pageterms-example-label-en": "Gauti žymas ir 
pseudonimus, susijusius su puslapiu \"Londonas\", anglų kalba.",
+   "apihelp-query+pageterms-example-item": "Gauti etiketes ir 
alternatyvius vardus įrašo Q84.",
"apihelp-query+pageterms-param-terms": "Grąžintinų terminų tipai, pvz. 
\"apibūdinimas\". Jei nenurodyta, grąžinami visi tipai.",
"apihelp-query+wikibase-description": "Gauti informacijos apie Wikibase 
klientą ir susijusią Wikibase saugyklą.",
"apihelp-query+wikibase-example": "Gauti URL kelią ir kitos 
informacijos apie Wikibase klientą ir saugyklą.",
diff --git a/extensions/Wikibase/lib/i18n/be-tarask.json 
b/extensions/Wikibase/lib/i18n/be-tarask.json
index 7386dda..850b3cc 100644
--- a/extensions/Wikibase/lib/i18n/be-tarask.json
+++ b/extensions/Wikibase/lib/i18n/be-tarask.json
@@ -4,11 +4,12 @@
"Wizardist",
"Zedlik",
"Fitoschido",
-   "Renessaince"
+   "Renessaince",
+   "Red Winged Duck"
]
},
"wikibase-lib-desc": "Утрымлівае агульны функцыянал пашырэньняў 
Wikibase і Wikibase Client.",
-   "specialpages-group-wikibase": "Рэпазыторый Вікізьвестак",
+   "specialpages-group-wikibase": "Вікібаза",
"wikibase-deletedentity-item": "Выдалены аб’ект",
"wikibase-deletedentity-property": "Выдаленая ўласьцівасьць",
"wikibase-deletedentity-query": "Выдалены запыт",
@@ -54,27 +55,27 @@
"wikibase-entity-summary-wbsetdescription-add": "Дададзенае апісаньне 
для [$2]",
"wikibase-entity-summary-wbsetdescription-set": "Зьмененае апісаньне 
для [$2]",
"wikibase-entity-summary-wbsetdescription-remove": "Выдаленае апісаньне 
для [$2]",
-   "wikibase-entity-summary-wbsetaliases-set": 
"!!FUZZY!!{{PLURAL:$1|1=Вызначаны псэўданім|Вызначаныя псэўданімы}} на [$2]",
+   "wikibase-entity-summary-wbsetaliases-set": "{{PLURAL:$1|1=Вызначаны 
псэўданім|Вызначаныя псэўданімы}} на [$2]",

[MediaWiki-commits] [Gerrit] Make EchoEvent::create() a no-op if the DB is read-only - change (mediawiki...Echo)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Make EchoEvent::create() a no-op if the DB is read-only
..

Make EchoEvent::create() a no-op if the DB is read-only

This seems better for availability than stopping the world
and rolling everything back (or just throwing post-commit
errors that didn't stop the original change anyway).

Change-Id: I816b3cb5f0d26de608e620a01571a332aa832c05
---
M includes/model/Event.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/includes/model/Event.php b/includes/model/Event.php
index 33ef41a..4e1a71f 100644
--- a/includes/model/Event.php
+++ b/includes/model/Event.php
@@ -87,8 +87,10 @@
global $wgEchoNotifications;
 
// Do not create event and notifications if write access is 
locked
-   if ( wfReadOnly() ) {
-   throw new ReadOnlyError();
+   if ( wfReadOnly()
+   || MWEchoDbFactory::newFromDefault()->getEchoDb( 
DB_MASTER )->isReadOnly()
+   ) {
+   return false;
}
 
$obj = new EchoEvent;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I816b3cb5f0d26de608e620a01571a332aa832c05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] Update Jenkins test - change (mediawiki...Example)

2015-11-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Update Jenkins test
..

Update Jenkins test

Add support for running jshint through npm.

Also add composer.json for running tests through it.

Change-Id: Idbb3bfa19c506f76d954b23dac81e91425d18a63
---
M .gitignore
M Gruntfile.js
A composer.json
M package.json
4 files changed, 22 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/06/250306/1

diff --git a/.gitignore b/.gitignore
index c2658d7..7e5da87 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 node_modules/
+vendor/
diff --git a/Gruntfile.js b/Gruntfile.js
index 9c56558..d528f38 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,15 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
+   jshint: {
+   all: [
+   '**/*.js'
+   ]
+   },
banana: {
all: 'i18n/'
},
@@ -15,6 +21,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..f2883f7
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}
diff --git a/package.json b/package.json
index 76e8a82..c3d4d83 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.2",
-"grunt-jsonlint": "1.0.4"
+"grunt-contrib-jshint": "0.11.3",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.5"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idbb3bfa19c506f76d954b23dac81e91425d18a63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2015-11-01T10:00:01+0000 - change (mediawiki...Wikidata)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build - 2015-11-01T10:00:01+
..


New Wikidata Build - 2015-11-01T10:00:01+

Change-Id: I7134147d73fe530ce9f70baa122641777d1f55c9
---
M composer.lock
M extensions/Wikibase/client/i18n/lt.json
M extensions/Wikibase/lib/i18n/be-tarask.json
M extensions/Wikibase/repo/i18n/lt.json
M vendor/composer/installed.json
5 files changed, 35 insertions(+), 33 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 238d78d..cdb77a6 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1444,12 +1444,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "257e975ff92831fff65799d6c1f170ed1102bea6"
+"reference": "8d2b1454a2d054bb9a04106e35f2d0d010d4370e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/257e975ff92831fff65799d6c1f170ed1102bea6;,
-"reference": "257e975ff92831fff65799d6c1f170ed1102bea6",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/8d2b1454a2d054bb9a04106e35f2d0d010d4370e;,
+"reference": "8d2b1454a2d054bb9a04106e35f2d0d010d4370e",
 "shasum": ""
 },
 "require": {
@@ -1518,7 +1518,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2015-10-31 01:10:11"
+"time": "2015-10-31 20:08:40"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/client/i18n/lt.json 
b/extensions/Wikibase/client/i18n/lt.json
index 753664c..322082e 100644
--- a/extensions/Wikibase/client/i18n/lt.json
+++ b/extensions/Wikibase/client/i18n/lt.json
@@ -10,9 +10,10 @@
},
"wikibase-client-desc": "Wikibase išplėtimo klientas",
"tooltip-t-wikibase": "Nuoroda į susietą duomenų saugyklos įrašą",
-   "apihelp-query+pageterms-description": "Gauti su puslapiu susijusias 
sąlygas per susijusį duomenų įrašą.",
+   "apihelp-query+pageterms-description": "Gauti su puslapiu susijusias 
sąlygas per susijusį duomenų įrašą. Viki-pagrindo esybės puslapyje, esybių 
terminai yra naudojami tiesiogiai.\nPastaba: Repozitorijos vikyje, 
puslapių-terminai veikia tik tiesiogiai esybės puslapiuose, bet ne puslapiuose 
susietuose su įrašu. Tai gali keistis ateityje.",
"apihelp-query+pageterms-example-simple": "Gauti visus su puslapiu 
\"Londonas\" susijusius terminus naudotojo kalba.",
"apihelp-query+pageterms-example-label-en": "Gauti žymas ir 
pseudonimus, susijusius su puslapiu \"Londonas\", anglų kalba.",
+   "apihelp-query+pageterms-example-item": "Gauti etiketes ir 
alternatyvius vardus įrašo Q84.",
"apihelp-query+pageterms-param-terms": "Grąžintinų terminų tipai, pvz. 
\"apibūdinimas\". Jei nenurodyta, grąžinami visi tipai.",
"apihelp-query+wikibase-description": "Gauti informacijos apie Wikibase 
klientą ir susijusią Wikibase saugyklą.",
"apihelp-query+wikibase-example": "Gauti URL kelią ir kitos 
informacijos apie Wikibase klientą ir saugyklą.",
diff --git a/extensions/Wikibase/lib/i18n/be-tarask.json 
b/extensions/Wikibase/lib/i18n/be-tarask.json
index 7386dda..850b3cc 100644
--- a/extensions/Wikibase/lib/i18n/be-tarask.json
+++ b/extensions/Wikibase/lib/i18n/be-tarask.json
@@ -4,11 +4,12 @@
"Wizardist",
"Zedlik",
"Fitoschido",
-   "Renessaince"
+   "Renessaince",
+   "Red Winged Duck"
]
},
"wikibase-lib-desc": "Утрымлівае агульны функцыянал пашырэньняў 
Wikibase і Wikibase Client.",
-   "specialpages-group-wikibase": "Рэпазыторый Вікізьвестак",
+   "specialpages-group-wikibase": "Вікібаза",
"wikibase-deletedentity-item": "Выдалены аб’ект",
"wikibase-deletedentity-property": "Выдаленая ўласьцівасьць",
"wikibase-deletedentity-query": "Выдалены запыт",
@@ -54,27 +55,27 @@
"wikibase-entity-summary-wbsetdescription-add": "Дададзенае апісаньне 
для [$2]",
"wikibase-entity-summary-wbsetdescription-set": "Зьмененае апісаньне 
для [$2]",
"wikibase-entity-summary-wbsetdescription-remove": "Выдаленае апісаньне 
для [$2]",
-   "wikibase-entity-summary-wbsetaliases-set": 
"!!FUZZY!!{{PLURAL:$1|1=Вызначаны псэўданім|Вызначаныя псэўданімы}} на [$2]",
+   "wikibase-entity-summary-wbsetaliases-set": "{{PLURAL:$1|1=Вызначаны 
псэўданім|Вызначаныя псэўданімы}} на [$2]",
"wikibase-entity-summary-wbsetaliases-add-remove": "Даданыя й 

[MediaWiki-commits] [Gerrit] Update mw and wm version numbers - change (pywikibot/compat)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update mw and wm version numbers
..


Update mw and wm version numbers

Change-Id: Id0a0f6b9304bce716c9a07dd5873ffb42f8b2d81
---
M family.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/family.py b/family.py
index 1552df0..b717622 100644
--- a/family.py
+++ b/family.py
@@ -4331,7 +4331,7 @@
 # Don't use this, use versionnumber() instead. This only exists
 # to not break family files.
 # Here we return the latest mw release for downloading
-return '1.25.2'
+return '1.25.3'
 
 def versionnumber(self, code, version=None):
 """Return an int identifying MediaWiki version.
@@ -4967,7 +4967,7 @@
 # Don't use this, use versionnumber() instead. This only exists
 # to not break family files.
 # Here we return the latest mw release of wikimedia projects
-return '1.27.0-wmf.1'
+return '1.27.0-wmf.3'
 
 def shared_image_repository(self, code):
 return ('commons', 'commons')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id0a0f6b9304bce716c9a07dd5873ffb42f8b2d81
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use vips shrink for multi-page files - change (mediawiki...VipsScaler)

2015-11-01 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Use vips shrink for multi-page files
..

Use vips shrink for multi-page files

vips shrink reads the file sequentially, which makes it more
memory efficient on large files. Previously we were not using
it on multipage tiff files beyond the first page, as I didn't
know that the options format for that command is different than
vips im_shrink.

Bug: T117349
Change-Id: Ibcdbda52fd3157272305f05f3db8402f59b73925
---
M VipsScaler_body.php
1 file changed, 33 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VipsScaler 
refs/changes/08/250308/1

diff --git a/VipsScaler_body.php b/VipsScaler_body.php
index 37640b9..fc7fd27 100644
--- a/VipsScaler_body.php
+++ b/VipsScaler_body.php
@@ -71,9 +71,11 @@
}
 
$actualSrcPath = $params['srcPath'];
-   if ( $file->isMultipage() && isset( $params['page'] ) && 
$params['page'] > 1 ) {
-   // Note, these types of "page" paths only work with 
im_shrink not shrink
-   $actualSrcPath .= ':' . (intval( $params['page'] ) - 1);
+   // Only do this for tiff files, as valid format options in vips 
is per-format.
+   if ( $file->isMultipage() && isset( $params['page'] )
+   && preg_match( '/\.tiff?$/', $actualSrcPath )
+   ) {
+   $actualSrcPath .= $vipsCommands[0]->makePageArgument( 
$params['page'] );
}
# Execute the commands
/** @var VipsCommand $command */
@@ -160,11 +162,7 @@
$rx, $ry
));
 
-   // shrink is much more memory efficient than im_shrink 
but not as flexible.
-   if ( isset( $params['page'] ) && $params['page'] !== 1 
) {
-   // Shrink does not support page numbers
-   $shrinkCmd = 'im_shrink';
-   } elseif (
+   if (
floor( $params['srcWidth'] / round( $rx ) ) == 
$params['physicalWidth']
&& floor( $params['srcHeight'] / round( $ry ) ) 
== $params['physicalHeight']
) {
@@ -492,6 +490,33 @@
return TempFSFile::factory( 'vips_', $extension );
}
 
+   /**
+* Output syntax for specifying a non-default page.
+*
+* This is a little hacky, but im_shrink and shrink have
+* a different format for specifying page number.
+*
+* @param $page integer Page number (1-indexed)
+* @return string String to append to filename
+*/
+   public function makePageArgument( $page ) {
+   $vipsCommand = $this->args[0];
+   $page = intval( $page ) - 1;
+
+   if ( $page === 0 ) {
+   // Default is first page anyways.
+   return '';
+   }
+   if ( substr( $vipsCommand, 0, 2 ) === 'im' ) {
+   // The im_* commands seem to all take the colon format
+   return ':' . $page;
+   }
+   if ( $vipsCommand === 'shrink' ) {
+   return "[page=$page]";
+   }
+   throw new Exception( "Not sure how to specify page for command 
$vipsCommand" );
+   }
+
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcdbda52fd3157272305f05f3db8402f59b73925
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VipsScaler
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] Make vips reset bit-depth after convolution. (Fix 16 bit tiff) - change (mediawiki...VipsScaler)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make vips reset bit-depth after convolution. (Fix 16 bit tiff)
..


Make vips reset bit-depth after convolution. (Fix 16 bit tiff)

After doing a convolution of a 16 bit greyscale image, vips seems
to get confused about how to convert it back to a png. The result
is usually a pure black box. Forcing vips to reset the bit depth
after doing im_convf, seems to fix the issue.

Example file: File:Fifth_avenue_after_snow_storm_4a12278a.tif

Upstream report: https://github.com/jcupitt/libvips/issues/344

Bug: T116947
Change-Id: Id0cb88b96e68ec05bae3d1a0e6f45238828d2163
---
M VipsScaler_body.php
1 file changed, 75 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/VipsScaler_body.php b/VipsScaler_body.php
index 0d2e404..37640b9 100644
--- a/VipsScaler_body.php
+++ b/VipsScaler_body.php
@@ -384,16 +384,16 @@
const TEMP_OUTPUT = true;
 
/** @var string */
-   private $err;
+   protected $err;
 
/** @var string */
-   private $output;
+   protected $output;
 
/** @var string */
-   private $input;
+   protected $input;
 
/** @var bool */
-   private $removeInput;
+   protected $removeInput;
 
/**
 * Constructor
@@ -504,6 +504,8 @@
 * @return int
 */
public function execute() {
+
+   $format = $this->getFormat( $this->input );
# Convert a 2D array into a space/newline separated matrix
$convolutionMatrix = array_pop( $this->args );
$convolutionString = '';
@@ -517,14 +519,80 @@
file_put_contents( $convolutionFile, $convolutionString );
array_push( $this->args, $convolutionFile );
 
+   $tmpOutput = self::makeTemp( 'v' );
+   $tmpOutput->bind( $this );
+   $tmpOutputPath = $tmpOutput->getPath();
+
wfDebug( __METHOD__ . ": Convolving image [\n" . 
$convolutionString . "] \n" );
 
-   # Call the parent to actually execute the command
-   $retval = parent::execute();
+   $env = array( 'IM_CONCURRENCY' => '1' );
+   $limits = array( 'filesize' => 409600 );
+   $cmd = wfEscapeShellArg(
+   $this->vips,
+   array_shift( $this->args ),
+   $this->input, $tmpOutputPath
+   );
+
+   foreach ( $this->args as $arg ) {
+   $cmd .= ' ' . wfEscapeShellArg( $arg );
+   }
+   # Execute
+   $retval = 0;
+   $this->err = wfShellExecWithStderr( $cmd, $retval, $env, 
$limits );
+
+   if ( $retval === 0 ) {
+   // vips seems to get confused about the bit depth after 
a convolution
+   // so reset it. Without this step, 16-bit tiff files 
seem to become all
+   // black when converted to pngs 
(https://github.com/jcupitt/libvips/issues/344)
+   $formatCmd = wfEscapeShellArg(
+   $this->vips, 'im_clip2fmt', $tmpOutputPath, 
$this->output, $format
+   );
+   $this->err .= wfShellExecWithStderr( $formatCmd, 
$retval, $env, $limits );
+   }
+
+   # Cleanup temp file
+   if ( $retval != 0 && file_exists( $this->output ) ) {
+   unlink ( $this->output );
+   }
+   if ( $this->removeInput ) {
+   unlink( $this->input );
+   }
 
# Remove the temporary matrix file
-   unlink( $convolutionFile );
+   $tmpFile->purge();
+   $tmpOutput->purge();
 
return $retval;
}
+
+   /**
+* Get the vips internal format (aka bit depth)
+*
+* @see https://github.com/jcupitt/libvips/issues/344 for why we do this
+* @param string $input Path to file
+* @return int Vips internal format number (common value 0 = 
VIPS_FORMAT_UCHAR, 2 = VIPS_FORMAT_USHORT)
+*/
+   function getFormat( $input ) {
+   $retval = 0;
+   $cmd = wfEscapeShellArg( $this->vips, 'im_header_int', 
'format', $input );
+   $res = wfShellExec( $cmd, $retval, array( 'IM_CONCURRENCY' => 
'1' ) );
+   $res = trim( $res );
+
+   if ( $retval !== 0 || !is_numeric( $res ) ) {
+   throw new Exception( "Cannot determine vips format of 
image" );
+   }
+
+   $format = (int)$res;
+   // Must be in range -1 to 10
+   // We might want to be even stricter. Its assumed that the 
answer will 

[MediaWiki-commits] [Gerrit] Convert JobQueueDB to using the WAN cache - change (mediawiki/core)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Convert JobQueueDB to using the WAN cache
..

Convert JobQueueDB to using the WAN cache

Change-Id: Ie5820d1439014572ca171c9303d51a8d3938ad00
---
M includes/jobqueue/JobQueueDB.php
1 file changed, 2 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/250302/1

diff --git a/includes/jobqueue/JobQueueDB.php b/includes/jobqueue/JobQueueDB.php
index 6ecfaf4..ed2d0fa 100644
--- a/includes/jobqueue/JobQueueDB.php
+++ b/includes/jobqueue/JobQueueDB.php
@@ -33,7 +33,7 @@
const MAX_JOB_RANDOM = 2147483647; // integer; 2^31 - 1, used for 
job_random
const MAX_OFFSET = 255; // integer; maximum number of rows to skip
 
-   /** @var BagOStuff */
+   /** @var WANObjectCache */
protected $cache;
 
/** @var bool|string Name of an external DB cluster. False if not set */
@@ -48,13 +48,10 @@
 * @param array $params
 */
protected function __construct( array $params ) {
-   global $wgMemc;
-
parent::__construct( $params );
 
$this->cluster = isset( $params['cluster'] ) ? 
$params['cluster'] : false;
-   // Make sure that we don't use the SQL cache, which would be 
harmful
-   $this->cache = ( $wgMemc instanceof SqlBagOStuff ) ? new 
EmptyBagOStuff() : $wgMemc;
+   $this->cache = ObjectCache::getMainWANInstance();
}
 
protected function supportedOrders() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5820d1439014572ca171c9303d51a8d3938ad00
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] Make notifications use getMainStashInstance() - change (mediawiki...Echo)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Make notifications use getMainStashInstance()
..

Make notifications use getMainStashInstance()

This makes sure resetNotificationCount() actually affects all DCs

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


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

diff --git a/includes/NotifUser.php b/includes/NotifUser.php
index 7fcb0c0..911a382 100644
--- a/includes/NotifUser.php
+++ b/includes/NotifUser.php
@@ -68,10 +68,10 @@
if ( $user->isAnon() ) {
throw new MWException( 'User must be logged in to view 
notification!' );
}
-   global $wgMemc;
 
return new MWEchoNotifUser(
-   $user, $wgMemc,
+   $user,
+   ObjectCache::getMainStashInstance(),
new EchoUserNotificationGateway( $user, 
MWEchoDbFactory::newFromDefault() ),
new EchoNotificationMapper(),
new EchoTargetPageMapper()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1af121b54d2ec50473a55308d8326f24a1b43b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
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] urldecode() provided input before storing it - change (mediawiki...UrlShortener)

2015-11-01 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: urldecode() provided input before storing it
..

urldecode() provided input before storing it

Bug: T117347
Change-Id: Iba67a79d976ce43eae1adf74458f797770526caa
---
M UrlShortener.utils.php
M tests/phpunit/UrlShortenerUtilsTest.php
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UrlShortener 
refs/changes/99/250299/1

diff --git a/UrlShortener.utils.php b/UrlShortener.utils.php
index 5bc7b98..e58766d 100755
--- a/UrlShortener.utils.php
+++ b/UrlShortener.utils.php
@@ -78,6 +78,9 @@
// it to a different one when redirecting
$url = self::convertToProtocol( $url, PROTO_HTTP );
 
+   // Decode it...
+   $url = urldecode( $url );
+
// If the wiki is using an article path (e.g. /wiki/$1) try
// and convert plain index.php?title=$1 URLs to the canonical 
form
if ( $wgArticlePath !== false && strpos( $url, '?' ) !== false 
) {
diff --git a/tests/phpunit/UrlShortenerUtilsTest.php 
b/tests/phpunit/UrlShortenerUtilsTest.php
index 39b8d33..6fd2453 100644
--- a/tests/phpunit/UrlShortenerUtilsTest.php
+++ b/tests/phpunit/UrlShortenerUtilsTest.php
@@ -36,6 +36,8 @@
 
public static function provideNormalizeUrl() {
return array(
+   // HTTPS -> HTTP
+   array( 'https://example.org', 'http://example.org' ),
// Article normalized
array( 
'http://example.com/w/index.php?title=Main_Page', 
'http://example.com/wiki/Main_Page' ),
// Already normalized
@@ -48,6 +50,9 @@
array( 'http://example.com/w/index.php.php?foo=bar', 
'http://example.com/w/index.php.php?foo=bar' ),
// Additional parameter not normalized
array( 
'http://example.com/w/index.php?title=Special:Version=bar', 
'http://example.com/w/index.php?title=Special:Version=bar' ),
+   // urldecoded
+   array( 
'http://example.org/wiki/Scott_Morrison_%28politician%29', 
'http://example.org/wiki/Scott_Morrison_(politician)' ),
+   array( 
'http://example.org/wiki/Scott_Morrison_(politician)', 
'http://example.org/wiki/Scott_Morrison_(politician)' ),
);
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba67a79d976ce43eae1adf74458f797770526caa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UrlShortener
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] Expand trigger area for play button contrast change to whole... - change (mediawiki...TimedMediaHandler)

2015-11-01 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Expand trigger area for play button contrast change to whole 
player
..

Expand trigger area for play button contrast change to whole player

The play button is partially transparent and can be hard to notice
on certain backgrounds. It becomes brighter when moused over which
is not much help in finding it. Make it change color when the whole
player is moused over instead (this is how e.g. YouTube handles
button color).

This also makes color change acually work for thumbnails
(.PopUpMediaTransform) in Chrome, before it was always the non-hover
style that was applied. I could not figure out the reason for that,
seemed like a Chrome bug.

Bug: T117344
Change-Id: I3f141d8854eaa9f4a4d87ec80555a25fc81a2ec7
---
M MwEmbedModules/EmbedPlayer/resources/skins/kskin/PlayerSkinKskin.css
M resources/PopUpThumbVideo.css
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/00/250300/1

diff --git 
a/MwEmbedModules/EmbedPlayer/resources/skins/kskin/PlayerSkinKskin.css 
b/MwEmbedModules/EmbedPlayer/resources/skins/kskin/PlayerSkinKskin.css
index f6c675d..d29b1a7 100644
--- a/MwEmbedModules/EmbedPlayer/resources/skins/kskin/PlayerSkinKskin.css
+++ b/MwEmbedModules/EmbedPlayer/resources/skins/kskin/PlayerSkinKskin.css
@@ -33,7 +33,7 @@
}
 }
 /*.ui-state-default */
-.k-player .play-btn-large:hover {
+.k-player:hover .play-btn-large {
background: url(images/ksprite.png) no-repeat 0px -377px;
 }
 
diff --git a/resources/PopUpThumbVideo.css b/resources/PopUpThumbVideo.css
index 5f97d7f..72aefac 100644
--- a/resources/PopUpThumbVideo.css
+++ b/resources/PopUpThumbVideo.css
@@ -8,7 +8,7 @@
/* @embed */
background-image:url('player_big_play_button.png');
 }
-.PopUpMediaTransform a .play-btn-large :hover {
+.PopUpMediaTransform:hover a .play-btn-large {
/* @embed */
background-image:url('player_big_play_button_hover.png');
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f141d8854eaa9f4a4d87ec80555a25fc81a2ec7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
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] Fix position warnings - change (mediawiki...Example)

2015-11-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Fix position warnings
..

Fix position warnings

Change-Id: I494bb35277346311306c4e077e35ca610aa4db6f
---
M skin.json
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Example 
refs/changes/03/250303/1

diff --git a/skin.json b/skin.json
index b90c83f..1c1bc3a 100644
--- a/skin.json
+++ b/skin.json
@@ -17,6 +17,7 @@
},
"ResourceModules": {
"skins.example": {
+   "position": "top",
"styles": {
"resources/libraries/normalise.css": {
"media": "screen"
@@ -33,6 +34,7 @@
}
},
"skins.example.js": {
+   "position": "bottom",
"scripts": [
"resources/main.js"
]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I494bb35277346311306c4e077e35ca610aa4db6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Use startAtomic/endAtomic to avoid breaking transactions - change (mediawiki...PageTriage)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Use startAtomic/endAtomic to avoid breaking transactions
..

Use startAtomic/endAtomic to avoid breaking transactions

Change-Id: I5636e46ffb8c8d11616672088051dffb81dd96eb
---
M includes/ArticleMetadata.php
M includes/PageTriage.php
M includes/PageTriageUtil.php
3 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageTriage 
refs/changes/10/250310/1

diff --git a/includes/ArticleMetadata.php b/includes/ArticleMetadata.php
index abb388f..1efc6d6 100755
--- a/includes/ArticleMetadata.php
+++ b/includes/ArticleMetadata.php
@@ -475,7 +475,7 @@
$articleMetadata = new ArticleMetadata( array( $pageId 
) );
$articleMetadata->flushMetadataFromCache();
//Make sure either all or none metadata for a single 
page_id
-   $dbw->begin();
+   $dbw->startAtomic( __METHOD__ );
foreach ( $data as $key => $val) {
if ( isset( $tags[$key] ) ) {
$row = array (
@@ -492,7 +492,7 @@
$row['ptrp_deleted'] = $data['deleted'] ? '1' : 
'0';
}
$pt->update( $row );
-   $dbw->commit();
+   $dbw->endAtomic( __METHOD__ );
}
}
 
diff --git a/includes/PageTriage.php b/includes/PageTriage.php
index 0d017c0..7c2f7bc 100755
--- a/includes/PageTriage.php
+++ b/includes/PageTriage.php
@@ -114,7 +114,7 @@
$this->mReviewedUpdated = $row['ptrp_reviewed_updated'];
$this->mLastReviewedBy  = $row['ptrp_last_reviewed_by'];
 
-   $dbw->begin();
+   $dbw->startAtomic( __METHOD__ );
//@Todo - case for marking a page as untriaged and make sure 
this logic is correct
if ( !$fromRc && $this->mReviewed && !is_null( $user ) ) {
$rc = RecentChange::newFromConds( array( 'rc_cur_id' => 
$this->mPageId, 'rc_new' => '1' ) );
@@ -129,7 +129,7 @@
if ( $dbw->affectedRows() > 0 && $this->mLastReviewedBy ) {
$this->logUserTriageAction();
}
-   $dbw->commit();
+   $dbw->endAtomic( __METHOD__ );
 
$articleMetadata = new ArticleMetadata( array( $this->mPageId ) 
);
$metadataArray = $articleMetadata->getMetadata();
@@ -233,7 +233,7 @@
 
$this->loadArticleMetadata();
 
-   $dbw->begin();
+   $dbw->startAtomic( __METHOD__ );
 
$dbw->delete(
'pagetriage_page',
@@ -249,7 +249,7 @@
);
$this->mArticleMetadata->deleteMetadata();
 
-   $dbw->commit();
+   $dbw->endAtomic( __METHOD__ );
}
 
/**
diff --git a/includes/PageTriageUtil.php b/includes/PageTriageUtil.php
index 17718dd..0e7af09 100755
--- a/includes/PageTriageUtil.php
+++ b/includes/PageTriageUtil.php
@@ -377,14 +377,14 @@
}
 
$dbw = wfGetDB( DB_MASTER );
-   $dbw->begin();
+   $dbw->startAtomic( __METHOD__ );
$dbw->update(
'pagetriage_page_tags',
array( 'ptrpt_value' => $status ),
array( 'ptrpt_page_id' => $pageIds, 'ptrpt_tag_id' => 
$tags['user_block_status'] )
);
PageTriage::bulkSetTagsUpdated( $pageIds );
-   $dbw->commit();
+   $dbw->endAtomic( __METHOD__ );
 
$metadata = new ArticleMetadata( $pageIds );
$metadata->flushMetadataFromCache();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5636e46ffb8c8d11616672088051dffb81dd96eb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
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] [Example] Update Jenkins tests - change (integration/config)

2015-11-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: [Example] Update Jenkins tests
..

[Example] Update Jenkins tests

Add composer-test

Add jshint and phplint to check: for non-whitelist users.

Remove mw-check.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/07/250307/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 9b081d5..a9688ca 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2360,10 +2360,12 @@
 
   - name: mediawiki/skins/Example
 template:
- - name: mw-checks-test
+ - name: composer-test
  - name: npm
 check:
  - jsonlint
+ - jshint
+ - phplint
 
   - name: mediawiki/skins/Gamepress
 template:

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] Use EntityLookup - change (mediawiki...ArticlePlaceholder)

2015-11-01 Thread Lucie Kaffee (Code Review)
Lucie Kaffee has uploaded a new change for review.

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

Change subject: [WIP] Use EntityLookup
..

[WIP] Use EntityLookup

Bug: T115051
Change-Id: I3fb33ad161deb861eba4fc6e309200763ac87a68
---
M Specials/SpecialFancyUnicorn.php
1 file changed, 19 insertions(+), 2 deletions(-)


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

diff --git a/Specials/SpecialFancyUnicorn.php b/Specials/SpecialFancyUnicorn.php
index e62358c..1bcd958 100644
--- a/Specials/SpecialFancyUnicorn.php
+++ b/Specials/SpecialFancyUnicorn.php
@@ -18,6 +18,7 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\DataModel\Services\Lookup\EntityLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory;
 use Wikibase\Lib\Store\SiteLinkLookup;
 use SiteStore;
@@ -34,7 +35,8 @@
$wikibaseClient->getStore()->getSiteLinkLookup(),
$wikibaseClient->getSiteStore(),
new TitleFactory(),
-   $wikibaseClient->getSettings()->getSetting( 
'siteGlobalID' )
+   $wikibaseClient->getSettings()->getSetting( 
'siteGlobalID' ),
+   $wikibaseClient->getStore()->getEntityLookup()
);
}
 
@@ -69,6 +71,11 @@
private $siteGlobalID;
 
/**
+* @var EntityLookup
+*/
+   private $entityLookup;
+
+   /**
 * Initialize the special page.
 */
public function __construct(
@@ -77,7 +84,8 @@
SiteLinkLookup $sitelinkLookup,
SiteStore $siteStore,
TitleFactory $titleFactory,
-   $siteGlobalID
+   $siteGlobalID,
+   EntityLookup $entityLookup
) {
$this->idParser = $idParser;
$this->termLookupFactory = $termLookupFactory;
@@ -85,6 +93,7 @@
$this->siteStore = $siteStore;
$this->titleFactory = $titleFactory;
$this->siteGlobalID = $siteGlobalID;
+   $this->entityLookup = $entityLookup;
 
parent::__construct( 'FancyUnicorn' );
}
@@ -104,6 +113,14 @@
$entityId = $this->getItemIdParam( 'entityid', $entityIdString 
);
 
if ( $entityId !== null ) {
+
+   if( !$this->entityLookup->hasEntity( $entityId ) ) {
+   $this->createForm();
+   $this->getOutput()->addWikiText( "This is not a 
valid entityId!" );
+   return;
+   }
+
+   $entity = $this->entityLookup->getEntity( $entityId );
$articleOnWiki = $this->getArticleOnWiki( $entityId );
 
if ( $articleOnWiki !== null ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3fb33ad161deb861eba4fc6e309200763ac87a68
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ArticlePlaceholder
Gerrit-Branch: master
Gerrit-Owner: Lucie Kaffee 

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


[MediaWiki-commits] [Gerrit] Turn on all options when running tests; fix some minor issue... - change (mediawiki...bundler)

2015-11-01 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: Turn on all options when running tests; fix some minor issues 
in modules.js.
..

Turn on all options when running tests; fix some minor issues in modules.js.

Change-Id: If0c8554eb9e2c971605035be5b0329d4649d9711
---
M bin/mw-ocg-bundler
M lib/modules.js
M test/samples.js
3 files changed, 18 insertions(+), 10 deletions(-)


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

diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index 8c6f3ef..a7aabd9 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -236,6 +236,7 @@
compat: !!program.compat, // For pediapress compatibility.
follow: !!program.follow, // Follow redirects.
saveRedirects: !!program.saveRedirects, // Save redirect info.
+   fetchModules: !!program.fetchModules, // For full HTML tree.
restbaseApi: program.restbaseApi ?
// Be user-friendly: strip trailing /page/html/ if 
present.
program.restbaseApi.replace(/\/page\/html\/?$/, '/') :
diff --git a/lib/modules.js b/lib/modules.js
index 7704afa..4d6ab7f 100644
--- a/lib/modules.js
+++ b/lib/modules.js
@@ -17,18 +17,21 @@
 };
 
 // Returns a promise for the metadata of modules
-Modules.prototype.fetchdata =
-Promise.guard(MODULE_REQUEST_LIMIT, function(module, page, oldid) {
-   return this.api.request(module.wiki, {
+Modules.prototype.fetchData =
+Promise.guard(MODULE_REQUEST_LIMIT, function(wiki, title, revision) {
+   return this.api.request(wiki, {
action: 'parse',
prop: 'modules|jsconfigvars',
-   page: page,
-   oldid: oldid,
+   page: title,
+   oldid: revision,
}).then(function(resp) {
-   resp = resp.parse.modules;
-   var pageid = Object.keys(resp)[0];
-   resp = resp[pageid];
-   return resp;
+   resp = resp.parse;
+   // Trim down the size of the response by omitting redundant 
fields.
+   return {
+   modules: resp.modules,
+   modulescripts: resp.modulescripts,
+   modulestyles: resp.modulestyles,
+   jsconfigvars: resp.jsconfigvars,
+   };
});
 });
-
diff --git a/test/samples.js b/test/samples.js
index 39395c2..f2d140f 100644
--- a/test/samples.js
+++ b/test/samples.js
@@ -31,6 +31,10 @@
apiVersion: 'restbase1',
size: IMAGESIZE,
debug: TRAVIS,
+   compat: true,
+   follow: true,
+   saveRedirects: true,
+   fetchModules: true,
log: function() {
if (!TRAVIS) { 
return; }
var time = new 
Date().toISOString().slice(11,23);

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

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

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


[MediaWiki-commits] [Gerrit] Add sitenotice area to the skin - change (mediawiki...Gamepress)

2015-11-01 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Add sitenotice area to the skin
..


Add sitenotice area to the skin

Change-Id: Ie1a4545940ece9befbb4d6f4e2d4cf9b810f20fa
---
M Gamepress.skin.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jack Phoenix: Looks good to me, approved



diff --git a/Gamepress.skin.php b/Gamepress.skin.php
index f915a1a..0faaf8c 100644
--- a/Gamepress.skin.php
+++ b/Gamepress.skin.php
@@ -150,6 +150,7 @@

msg( 'jumpto' ) ?> msg( 'jumptonavigation' ) ?>msg( 'comma-separator' ) 
?>msg( 'jumptosearch' ) ?>

+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>
https://gerrit.wikimedia.org/r/250319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1a4545940ece9befbb4d6f4e2d4cf9b810f20fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Gamepress
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...ConfirmAccount)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

Change-Id: I3a87950bb6e26c9a48d6f0d5e06d0f228c0c7748
---
M composer.json
M frontend/specialpages/actions/ConfirmAccount_body.php
M frontend/specialpages/actions/UserCredentials_body.php
3 files changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/composer.json b/composer.json
index 4365e8a..99741dd 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [
diff --git a/frontend/specialpages/actions/ConfirmAccount_body.php 
b/frontend/specialpages/actions/ConfirmAccount_body.php
index c44dafd..3e0027e 100644
--- a/frontend/specialpages/actions/ConfirmAccount_body.php
+++ b/frontend/specialpages/actions/ConfirmAccount_body.php
@@ -631,8 +631,9 @@
$linkList .= "$link$extra\n";
}
$count++;
-   if ( $count >= $max )
+   if ( $count >= $max ) {
break;
+   }
}
if ( $linkList == '' ) {
$linkList = wfMessage( 'confirmaccount-none-p' 
)->escaped();
diff --git a/frontend/specialpages/actions/UserCredentials_body.php 
b/frontend/specialpages/actions/UserCredentials_body.php
index 4b8d53d..4685729 100644
--- a/frontend/specialpages/actions/UserCredentials_body.php
+++ b/frontend/specialpages/actions/UserCredentials_body.php
@@ -230,8 +230,9 @@
 
function getAccountData() {
$uid = User::idFromName( $this->target );
-   if ( !$uid )
+   if ( !$uid ) {
return false;
+   }
# For now, just get the first revision...
$dbr = wfGetDB( DB_SLAVE );
$row = $dbr->selectRow( 'account_credentials', '*',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a87950bb6e26c9a48d6f0d5e06d0f228c0c7748
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ConfirmAccount
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Civi method to fetch tags has changed - change (wikimedia...crm)

2015-11-01 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Civi method to fetch tags has changed
..

Civi method to fetch tags has changed

Bug: T117369
Change-Id: Ic0b1658e97d0f6ea1886247c71859b166d6ff549
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/15/250315/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 7b2f092..acb8a29 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -412,7 +412,7 @@
 
 // Create any required tags on the contribution
 if ( $msg['contribution_tags'] ) {
-$supported_tags = array_flip( CRM_Core_PseudoConstant::tag() );
+$supported_tags = CRM_Core_PseudoConstant::get( 
'CRM_Core_DAO_EntityTag', 'tag_id', array( 'flip' => true ) );
 $stacked_ex = array();
 foreach ( array_unique( $msg['contribution_tags'] ) as $tag ) {
 try {
@@ -1029,7 +1029,7 @@
 
 // Do we have any tags we need to add to this contact?
 if ( $msg['contact_tags'] ) {
-$supported_tags = array_flip( CRM_Core_PseudoConstant::tag() );
+$supported_tags = CRM_Core_PseudoConstant::get( 
'CRM_Core_DAO_EntityTag', 'tag_id', array( 'flip' => true ) );
 $stacked_ex = array();
 foreach ( array_unique( $msg['contact_tags'] ) as $tag ) {
 try {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0b1658e97d0f6ea1886247c71859b166d6ff549
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: civi-4.6.9-deployment
Gerrit-Owner: Awight 

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


[MediaWiki-commits] [Gerrit] Minor clean-ups in ParserOutput DataUpdates code - change (mediawiki...Wikibase)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Minor clean-ups in ParserOutput DataUpdates code
..


Minor clean-ups in ParserOutput DataUpdates code

This is a small subset of the changes in I1aa5890. I hope nothing in here
is controversial and can be merged fast.

Bug: T114220
Change-Id: I16e31581da250467ffbdba122cb4364e2e4d
---
M repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
M repo/includes/ParserOutput/EntityParserOutputGenerator.php
M repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
M repo/includes/ParserOutput/GeoDataDataUpdater.php
M repo/includes/ParserOutput/ReferencedEntitiesDataUpdater.php
M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputDataUpdaterTest.php
M repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
7 files changed, 66 insertions(+), 44 deletions(-)

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



diff --git a/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php 
b/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
index 3b561f7..1b68c94 100644
--- a/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
+++ b/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
@@ -9,7 +9,7 @@
 use Wikibase\DataModel\Statement\StatementListProvider;
 
 /**
- * @todo have ItemParserOutputDataUpdate, etc. instead.
+ * @todo have ItemParserOutputDataUpdater, etc. instead.
  *
  * @since 0.5
  *
@@ -46,11 +46,11 @@
 * @throws InvalidArgumentException
 */
public function __construct( ParserOutput $parserOutput, array 
$dataUpdaters ) {
-   foreach ( $dataUpdaters as $dataUpdater ) {
-   if ( $dataUpdater instanceof StatementDataUpdater ) {
-   $this->statementDataUpdaters[] = $dataUpdater;
-   } elseif ( $dataUpdater instanceof SiteLinkDataUpdater 
) {
-   $this->siteLinkDataUpdaters[] = $dataUpdater;
+   foreach ( $dataUpdaters as $updater ) {
+   if ( $updater instanceof StatementDataUpdater ) {
+   $this->statementDataUpdaters[] = $updater;
+   } elseif ( $updater instanceof SiteLinkDataUpdater ) {
+   $this->siteLinkDataUpdaters[] = $updater;
} else {
throw new InvalidArgumentException( 'Each 
$dataUpdaters element must be a '
. 'StatementDataUpdater, 
SiteLinkDataUpdater or both' );
@@ -83,8 +83,8 @@
}
 
foreach ( $entity->getStatements() as $statement ) {
-   foreach ( $this->statementDataUpdaters as $dataUpdater 
) {
-   $dataUpdater->processStatement( $statement );
+   foreach ( $this->statementDataUpdaters as $updater ) {
+   $updater->processStatement( $statement );
}
}
}
@@ -98,15 +98,15 @@
}
 
foreach ( $item->getSiteLinkList() as $siteLink ) {
-   foreach ( $this->siteLinkDataUpdaters as $dataUpdater ) 
{
-   $dataUpdater->processSiteLink( $siteLink );
+   foreach ( $this->siteLinkDataUpdaters as $updater ) {
+   $updater->processSiteLink( $siteLink );
}
}
}
 
public function finish() {
-   foreach ( $this->dataUpdaters as $dataUpdater ) {
-   $dataUpdater->updateParserOutput( $this->parserOutput );
+   foreach ( $this->dataUpdaters as $updater ) {
+   $updater->updateParserOutput( $this->parserOutput );
}
}
 
diff --git a/repo/includes/ParserOutput/EntityParserOutputGenerator.php 
b/repo/includes/ParserOutput/EntityParserOutputGenerator.php
index f6e6a1d..36e5b26 100644
--- a/repo/includes/ParserOutput/EntityParserOutputGenerator.php
+++ b/repo/includes/ParserOutput/EntityParserOutputGenerator.php
@@ -85,6 +85,17 @@
 */
private $languageCode;
 
+   /**
+* @param EntityViewFactory $entityViewFactory
+* @param ParserOutputJsConfigBuilder $configBuilder
+* @param EntityTitleLookup $entityTitleLookup
+* @param EntityInfoBuilderFactory $entityInfoBuilderFactory
+* @param LanguageFallbackChain $languageFallbackChain
+* @param TemplateFactory $templateFactory
+* @param EntityDataFormatProvider $entityDataFormatProvider
+* @param ParserOutputDataUpdater[] $dataUpdaters
+* @param string $languageCode
+*/
public function __construct(
EntityViewFactory 

[MediaWiki-commits] [Gerrit] Rename $dataUpdate(s) variables to $dataUpdater with an r - change (mediawiki...Wikibase)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rename $dataUpdate(s) variables to $dataUpdater with an r
..


Rename $dataUpdate(s) variables to $dataUpdater with an r

To restore consistency between class and variable names again.

Change-Id: Ibfd576d69cf77550c1a1175e2d690b6f305389e9
---
M repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
M repo/includes/ParserOutput/EntityParserOutputGenerator.php
M repo/includes/ParserOutput/EntityParserOutputGeneratorFactory.php
M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputDataUpdaterTest.php
M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
M repo/tests/phpunit/includes/ParserOutput/GeoDataDataUpdaterTest.php
6 files changed, 50 insertions(+), 50 deletions(-)

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



diff --git a/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php 
b/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
index be2ef6f..3b561f7 100644
--- a/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
+++ b/repo/includes/ParserOutput/EntityParserOutputDataUpdater.php
@@ -27,38 +27,38 @@
/**
 * @var ParserOutputDataUpdater[]
 */
-   private $dataUpdates;
+   private $dataUpdaters;
 
/**
 * @var StatementDataUpdater[]
 */
-   private $statementDataUpdates = array();
+   private $statementDataUpdaters = array();
 
/**
 * @var SiteLinkDataUpdater[]
 */
-   private $siteLinkDataUpdates = array();
+   private $siteLinkDataUpdaters = array();
 
/**
 * @param ParserOutput $parserOutput
-* @param ParserOutputDataUpdater[] $dataUpdates
+* @param ParserOutputDataUpdater[] $dataUpdaters
 *
 * @throws InvalidArgumentException
 */
-   public function __construct( ParserOutput $parserOutput, array 
$dataUpdates ) {
-   foreach ( $dataUpdates as $dataUpdate ) {
-   if ( $dataUpdate instanceof StatementDataUpdater ) {
-   $this->statementDataUpdates[] = $dataUpdate;
-   } elseif ( $dataUpdate instanceof SiteLinkDataUpdater ) 
{
-   $this->siteLinkDataUpdates[] = $dataUpdate;
+   public function __construct( ParserOutput $parserOutput, array 
$dataUpdaters ) {
+   foreach ( $dataUpdaters as $dataUpdater ) {
+   if ( $dataUpdater instanceof StatementDataUpdater ) {
+   $this->statementDataUpdaters[] = $dataUpdater;
+   } elseif ( $dataUpdater instanceof SiteLinkDataUpdater 
) {
+   $this->siteLinkDataUpdaters[] = $dataUpdater;
} else {
-   throw new InvalidArgumentException( 'Each 
$dataUpdates element must be a '
+   throw new InvalidArgumentException( 'Each 
$dataUpdaters element must be a '
. 'StatementDataUpdater, 
SiteLinkDataUpdater or both' );
}
}
 
$this->parserOutput = $parserOutput;
-   $this->dataUpdates = $dataUpdates;
+   $this->dataUpdaters = $dataUpdaters;
}
 
/**
@@ -78,13 +78,13 @@
 * @param StatementListProvider $entity
 */
private function processStatementListProvider( StatementListProvider 
$entity ) {
-   if ( empty( $this->statementDataUpdates ) ) {
+   if ( empty( $this->statementDataUpdaters ) ) {
return;
}
 
foreach ( $entity->getStatements() as $statement ) {
-   foreach ( $this->statementDataUpdates as $dataUpdate ) {
-   $dataUpdate->processStatement( $statement );
+   foreach ( $this->statementDataUpdaters as $dataUpdater 
) {
+   $dataUpdater->processStatement( $statement );
}
}
}
@@ -93,20 +93,20 @@
 * @param Item $item
 */
private function processItem( Item $item ) {
-   if ( empty( $this->siteLinkDataUpdates ) ) {
+   if ( empty( $this->siteLinkDataUpdaters ) ) {
return;
}
 
foreach ( $item->getSiteLinkList() as $siteLink ) {
-   foreach ( $this->siteLinkDataUpdates as $dataUpdate ) {
-   $dataUpdate->processSiteLink( $siteLink );
+   foreach ( $this->siteLinkDataUpdaters as $dataUpdater ) 
{
+   $dataUpdater->processSiteLink( $siteLink );
}
   

[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (mediawiki...OnlineStatus)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

Change-Id: Iab338268b786e6b89cc0425cd4b4580f9dd108dc
---
M OnlineStatus.body.php
M OnlineStatus.php
M composer.json
3 files changed, 6 insertions(+), 4 deletions(-)

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



diff --git a/OnlineStatus.body.php b/OnlineStatus.body.php
index 365aefd..b7102c2 100644
--- a/OnlineStatus.body.php
+++ b/OnlineStatus.body.php
@@ -103,8 +103,9 @@
static function ParserFirstCallInit( $parser ) {
global $wgAllowAnyUserOnlineStatusFunction;
 
-   if ( $wgAllowAnyUserOnlineStatusFunction )
+   if ( $wgAllowAnyUserOnlineStatusFunction ) {
$parser->setFunctionHook( 'anyuseronlinestatus', array( 
__CLASS__, 'ParserHookCallback' ) );
+   }
return true;
}
 
@@ -293,8 +294,9 @@
global $wgUser, $wgUseAjax;
 
# Require ajax
-   if ( !$wgUser->isLoggedIn() || !$wgUseAjax || 
$title->isSpecial( 'Preferences' ) )
+   if ( !$wgUser->isLoggedIn() || !$wgUseAjax || 
$title->isSpecial( 'Preferences' ) ) {
return true;
+   }
 
$arr = array();
 
diff --git a/OnlineStatus.php b/OnlineStatus.php
index dd83a0b..73889ab 100644
--- a/OnlineStatus.php
+++ b/OnlineStatus.php
@@ -38,7 +38,7 @@
 $wgDefaultUserOptions['onlineonlogin'] = 1;
 $wgDefaultUserOptions['offlineonlogout'] = 1;
 
-$dir = dirname( __FILE__ ) . '/';
+$dir = __DIR__ . '/';
 
 // Classes
 $wgAutoloadClasses['OnlineStatus'] = $dir . 'OnlineStatus.body.php';
diff --git a/composer.json b/composer.json
index 4365e8a..99741dd 100644
--- a/composer.json
+++ b/composer.json
@@ -1,7 +1,7 @@
 {
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab338268b786e6b89cc0425cd4b4580f9dd108dc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OnlineStatus
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adding module.js and creating modules.db to download css/js ... - change (mediawiki...bundler)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Adding module.js and creating modules.db to download css/js 
dependencies.
..


Adding module.js and creating modules.db to download css/js dependencies.

Add code to the stage to download the set of modules required for each
page in the collection, and save it to 'modulesDb'.

Bug: T114788
Change-Id: Id59caf8283f3939d769d63605d87d2f89d42ab30
---
M bin/mw-ocg-bundler
M lib/index.js
A lib/modules.js
3 files changed, 54 insertions(+), 3 deletions(-)

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



diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index 79ca000..91fa11f 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -81,7 +81,10 @@
.option('-v, --verbose',
'Print verbose progress information')
.option('-D, --debug',
-   'Turn on debugging features (eg, full stack traces on 
exceptions)');
+   'Turn on debugging features (eg, full stack traces on 
exceptions)')
+   // CSS and Javascript modules of each article are required for building 
HTML tree.
+   .option('--fetchModules',
+   'Fetch css and javascript modules for articles');
 program.on('--help', function() {
console.log('  If -o is omitted, creates bundle.zip');
console.log('  The -m option can be used instead of specifying titles');
diff --git a/lib/index.js b/lib/index.js
index 2a61821..eeedf9e 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -20,6 +20,7 @@
 var Revisions = require('./revisions');
 var SiteInfo = require('./siteinfo');
 var StatusReporter = require('./status');
+var Modules = require('./modules');
 
 // Set this to true to emit bundles which are more closely compatible
 // with the pediapress bundler (at the cost of poorer support for
@@ -83,6 +84,7 @@
 
var parsoid = new Parsoid(metabook.wikis, options.apiVersion, 
options.log);
var authors = new Authors(metabook.wikis, options.log);
+   var modules = new Modules(metabook.wikis, options.log);
var html = new Html(metabook.wikis, options.log);
var imageloader = new Image(metabook.wikis, options.log);
var revisions = new Revisions(metabook.wikis, options.log);
@@ -102,16 +104,17 @@
});
};
 
-   var parsoidDb, authorsDb, imageDb, htmlDb;
+   var parsoidDb, authorsDb, imageDb, htmlDb, modulesDb;
var openDatabases = function() {
parsoidDb = new Db(path.join(options.output, 'parsoid.db'));
authorsDb = new Db(path.join(options.output, 'authors.db'));
imageDb = new Db(path.join(options.output, 'imageinfo.db'));
htmlDb = options.compat ? new Db(path.join(options.output, 
'html.db')) : null;
+   modulesDb =  options.fetchModules ? new 
Db(path.join(options.output, 'modules.db')) : null;
};
 
var closeDatabases = function() {
-   return Promise.map([parsoidDb, authorsDb, imageDb, htmlDb], 
function(db) {
+   return Promise.map([parsoidDb, authorsDb, imageDb, htmlDb, 
modulesDb], function(db) {
if (db) {
return db.close().catch(function(e) { /* Ignore 
*/ });
}
@@ -197,6 +200,10 @@
return options.compat ? html.fetch(item.wiki, 
item.title, item.revision, status) : null;
}).then(function(result) {
return options.compat ? dbPut(htmlDb, key, 
result, options) : null;
+   }).then(function() {
+   return options.fetchModules ? 
modules.fetchData(item.wiki, item.title, item.revision) : null;
+   }).then(function(result) {
+   return options.fetchModules ? dbPut(modulesDb, 
key, result, options) : null;
}).then(function() {
// TODO: these queries should probably be 
batched
return authors.fetchMetadata(item.wiki, 
item.title, item.revision, status).then(function(result) {
@@ -305,6 +312,12 @@
 
// Return a promise to do all these tasks.
return Promise.all(tasks);
+   };
+
+   var moduledir = path.join(options.output, 'modules');
+
+   var mkModuleDir = function() {
+   return options.fetchModules ? P.call(fs.mkdir, fs, moduledir, 
parseInt('777', 8)) : null;
};
 
var fetchRevisions = function() {
@@ -429,6 +442,7 @@
})
.then(repairMetabook)
.then(mkOutputDir)
+   .then(mkModuleDir)
.then(openDatabases)
.then(fetchSiteInfo)
// Stage 2
diff --git a/lib/modules.js b/lib/modules.js
new file mode 

[MediaWiki-commits] [Gerrit] Add MP3MediaHandler - change (mediawiki/extensions)

2015-11-01 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged.

Change subject: Add MP3MediaHandler
..


Add MP3MediaHandler

Change-Id: I611ba4db806e7448e648f004fa1bc2e3304bdae0
---
M .gitmodules
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/.gitmodules b/.gitmodules
index e7d1805..3fbdcb8 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -3104,3 +3104,6 @@
 [submodule "StatCounter"]
path = StatCounter
url = 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/StatCounter.git
+[submodule "MP3MediaHandler"]
+   path = MP3MediaHandler
+   url = 
https://gerrit.wikimedia.org/r/p/mediawiki/extensions/MP3MediaHandler.git

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I611ba4db806e7448e648f004fa1bc2e3304bdae0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Add sitenotice area to the skin - change (mediawiki...Gamepress)

2015-11-01 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Add sitenotice area to the skin
..

Add sitenotice area to the skin

Change-Id: Ie1a4545940ece9befbb4d6f4e2d4cf9b810f20fa
---
M Gamepress.skin.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Gamepress 
refs/changes/19/250319/1

diff --git a/Gamepress.skin.php b/Gamepress.skin.php
index f915a1a..0faaf8c 100644
--- a/Gamepress.skin.php
+++ b/Gamepress.skin.php
@@ -150,6 +150,7 @@

msg( 'jumpto' ) ?> msg( 'jumptonavigation' ) ?>msg( 'comma-separator' ) 
?>msg( 'jumptosearch' ) ?>

+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>
https://gerrit.wikimedia.org/r/250319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1a4545940ece9befbb4d6f4e2d4cf9b810f20fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Gamepress
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Consistency tweaks - change (mediawiki...AccessControl)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Consistency tweaks
..


Consistency tweaks

* Remove leading space
* Replace ! with .

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

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



diff --git a/i18n/en.json b/i18n/en.json
index 135af78..168f5bd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,11 +3,11 @@
"authors": []
},
"accesscontrol-desc": "Enables group access restriction on a page by 
user basis",
-   "accesscontrol-info": "This is a protected page!",
+   "accesscontrol-info": "This is a protected page.",
"accesscontrol-move-anonymous": "Deny_anonymous_by_include",
"accesscontrol-move-users": "Deny_user_by_include",
"accesscontrol-redirect-anonymous": "Deny_anonymous",
"accesscontrol-redirect-users": "Deny_user",
"accesscontrol-actions-deny": "Deny_action",
-   "accesscontrol-info-box": " This MediaWiki uses the 
[https://www.mediawiki.org/wiki/Extension:AccessControl AccessControl] 
extension that allows to restrict access to the site through a user-defined 
list. If you see this message, you have no access to this page."
-}
\ No newline at end of file
+   "accesscontrol-info-box": "This MediaWiki uses the 
[https://www.mediawiki.org/wiki/Extension:AccessControl AccessControl] 
extension that allows to restrict access to the site through a user-defined 
list. If you see this message, you have no access to this page."
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I708954001cd42594503e0dc7283f9b822fb489ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccessControl
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Re-enable AccessControl extension for translation - change (translatewiki)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-enable AccessControl extension for translation
..


Re-enable AccessControl extension for translation

You don't need to have a bugzilla account to have translations on your
extensions plus it is now phabricator.

I have updated the qqq.json messages here 
https://gerrit.wikimedia.org/r/#/c/228812/

Change-Id: I5ef18439c1b5bc949d39cc4b8e36597725ad4f1c
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 4 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index af4e1e3..d47744e 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -4,10 +4,9 @@
 optional = abusefilter-edit-builder-op-bool-xor
 aliasfile = AbuseFilter/AbuseFilter.alias.php
 
-# Siebrand / 2012-06-18: Disabled. Extension owner does not have a bugzilla 
account.
-#Access Control
-#ignored=accesscontrol-info-user, accesscontrol-info-anonymous, 
accesscontrol-info-deny, accesscontrol-edit-anonymous
-#ignored=accesscontrol-edit-users
+Access Control
+ignored = accesscontrol-move-anonymous, accesscontrol-move-users, 
accesscontrol-redirect-anonymous
+ignored = accesscontrol-redirect-users, accesscontrol-actions-deny
 
 # Repo is archived
 # Accessibility Simulation

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ef18439c1b5bc949d39cc4b8e36597725ad4f1c
Gerrit-PatchSet: 8
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add sitenotice area to the skin - change (mediawiki...Bouquet)

2015-11-01 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Add sitenotice area to the skin
..

Add sitenotice area to the skin

Change-Id: Ib4387dd2ceae723c2f3aa66ab32e60c144696f11
---
M Bouquet.skin.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Bouquet 
refs/changes/17/250317/1

diff --git a/Bouquet.skin.php b/Bouquet.skin.php
index c2a0a2a..ad16089 100644
--- a/Bouquet.skin.php
+++ b/Bouquet.skin.php
@@ -170,6 +170,7 @@



+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>

html( 'title' ) ?>
data['undelete'] ) { ?>html( 
'undelete' ) ?>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4387dd2ceae723c2f3aa66ab32e60c144696f11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Add sitenotice area to the skin - change (mediawiki...DuskToDawn)

2015-11-01 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Add sitenotice area to the skin
..

Add sitenotice area to the skin

Also tweaked one padding rule to make it a bit less stupid

Change-Id: I51763c20599559acf84932cff90ccc6dfc19f0e8
---
M DuskToDawn.skin.php
M resources/style.css
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/DuskToDawn 
refs/changes/18/250318/1

diff --git a/DuskToDawn.skin.php b/DuskToDawn.skin.php
index 7a892d5..4f84e15 100644
--- a/DuskToDawn.skin.php
+++ b/DuskToDawn.skin.php
@@ -126,6 +126,7 @@



+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>



diff --git a/resources/style.css b/resources/style.css
index ed9a8c4..df627af 100644
--- a/resources/style.css
+++ b/resources/style.css
@@ -563,7 +563,8 @@
letter-spacing: 1px;
line-height: 1.0em;
margin: 0 0 2px 0;
-   padding: 55px 0 0 0;
+   /* ashley: changed on 1 November 2015 for site notice/ads/general 
prettiness */
+   padding: 20px 0 0 0;
text-transform: uppercase;
 }
 .entry-meta {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51763c20599559acf84932cff90ccc6dfc19f0e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DuskToDawn
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] Set manifest_version in extension.json - change (mediawiki...MsUpload)

2015-11-01 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged.

Change subject: Set manifest_version in extension.json
..


Set manifest_version in extension.json

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

Approvals:
  Paladox: Looks good to me, but someone else must approve
  Umherirrender: Verified; Looks good to me, approved



diff --git a/extension.json b/extension.json
index 0a8663b..adde586 100644
--- a/extension.json
+++ b/extension.json
@@ -66,5 +66,6 @@
"MSU_useMsLinks": false,
"MSU_confirmReplace": true,
"MSU_imgParams": "400px"
-   }
+   },
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I546ea33340136ca93e7fe1e9be7db23126869ed2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MsUpload
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Re-enable disabled MediaWiki code sniffer rules - change (mediawiki...Wikibase)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-enable disabled MediaWiki code sniffer rules
..


Re-enable disabled MediaWiki code sniffer rules

Change-Id: If5e02e18a5b567befb64414e1706d7f8162d6731
---
M client/WikibaseClient.datatypes.php
M client/includes/Changes/WikiPageUpdater.php
M client/includes/specials/SpecialPagesWithBadges.php
M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
M client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
M client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
M 
client/tests/phpunit/includes/recentchanges/RecentChangesDuplicateDetectorTest.php
M client/tests/phpunit/includes/store/AddUsagesForPageJobTest.php
M lib/includes/formatters/DispatchingSnakFormatter.php
M lib/tests/phpunit/formatters/MessageSnakFormatterTest.php
M phpcs.xml
M repo/includes/api/EditEntity.php
M repo/tests/phpunit/includes/store/sql/SqlChangeStoreTest.php
13 files changed, 16 insertions(+), 29 deletions(-)

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



diff --git a/client/WikibaseClient.datatypes.php 
b/client/WikibaseClient.datatypes.php
index 2e977a4..e62c5ea 100644
--- a/client/WikibaseClient.datatypes.php
+++ b/client/WikibaseClient.datatypes.php
@@ -88,4 +88,4 @@
),
);
 
-});
+} );
diff --git a/client/includes/Changes/WikiPageUpdater.php 
b/client/includes/Changes/WikiPageUpdater.php
index 98e120e..8890d43 100644
--- a/client/includes/Changes/WikiPageUpdater.php
+++ b/client/includes/Changes/WikiPageUpdater.php
@@ -125,7 +125,9 @@
 
$rc = $this->recentChangeFactory->newRecentChange( 
$change, $title, $rcAttribs );
 
-   if ( $this->recentChangesDuplicateDetector && 
$this->recentChangesDuplicateDetector->changeExists( $rc )  ) {
+   if ( $this->recentChangesDuplicateDetector
+   && 
$this->recentChangesDuplicateDetector->changeExists( $rc )
+   ) {
wfDebugLog( __CLASS__, __FUNCTION__ . ": 
skipping duplicate RC entry for " . $title->getFullText() );
} else {
wfDebugLog( __CLASS__, __FUNCTION__ . ": saving 
RC entry for " . $title->getFullText() );
diff --git a/client/includes/specials/SpecialPagesWithBadges.php 
b/client/includes/specials/SpecialPagesWithBadges.php
index 3257c76..0fe4074 100644
--- a/client/includes/specials/SpecialPagesWithBadges.php
+++ b/client/includes/specials/SpecialPagesWithBadges.php
@@ -243,7 +243,7 @@
 * @return array
 */
public function linkParameters() {
-   return array( 'badge' => $this->badgeId->getSerialization()  );
+   return array( 'badge' => $this->badgeId->getSerialization() );
}
 
/**
diff --git a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php 
b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
index 8612e7b..7119bf6 100644
--- a/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
+++ b/client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
@@ -332,7 +332,7 @@
array(
new PageEntityUsages( 1, array( 
$q1SitelinkUsage ) ),
),
-   array( EntityUsage::SITELINK_USAGE  ),
+   array( EntityUsage::SITELINK_USAGE ),
array( $page1Q1Usages, $page2Q1Usages ),
$changeFactory->newFromUpdate( ItemChange::UPDATE,
$this->getItemWithSiteLinks( $q1, array( 
'enwiki' => '1' ) ),
diff --git a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php 
b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
index c80af27..fa517e5 100644
--- a/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
+++ b/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
@@ -221,7 +221,7 @@
$this->assertDiffsEqual( $expectedValue, $actual[$key], 
$currentPath );
}
 
-   $extraKeys = array_diff( array_keys( $actual), array_keys( 
$expected ) );
+   $extraKeys = array_diff( array_keys( $actual ), array_keys( 
$expected ) );
$this->assertEquals( array(), $extraKeys, $path . " extra keys" 
);
}
 
diff --git 
a/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php 
b/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
index 55eabff..3e385d6 100644
--- a/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
+++ b/client/tests/phpunit/includes/recentchanges/ExternalChangeFactoryTest.php
@@ -259,8 +259,8 @@
'user_text' 

[MediaWiki-commits] [Gerrit] Re-enable MediaWiki code sniffer rule for empty comments - change (mediawiki...Wikibase)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Re-enable MediaWiki code sniffer rule for empty comments
..


Re-enable MediaWiki code sniffer rule for empty comments

Change-Id: Ib7107c49c081a8a7d67f08892b84cf17e9a08cbd
---
M client/config/WikibaseClient.default.php
M client/config/WikibaseClient.example.php
M client/includes/store/sql/BulkSubscriptionUpdater.php
M phpcs.xml
M repo/config/Wikibase.default.php
M repo/includes/OutputPageJsConfigBuilder.php
M repo/includes/store/sql/WikiPageEntityStore.php
7 files changed, 107 insertions(+), 87 deletions(-)

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



diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index bc2069e..0e3cf71 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -56,29 +56,37 @@
// Enable in case wbc_entity_usage does not exist or is not yet 
populated.
'useLegacyUsageIndex' => false,
 
-   // Enable in case wb_changes_subscription does not exist (on 
the repo) or is not yet populated.
-   //
-   // @note: if Wikibase Repo and Client are enabled on the same 
wiki, then this only needs
-   // to be set in the repo or can be set the same in both. (repo 
settings override client settings)
+   /**
+* Enable in case wb_changes_subscription does not exist (on 
the repo) or is not yet
+* populated.
+*
+* @note If Wikibase Repo and Client are enabled on the same 
wiki, then this only needs to
+* be set in the repo or can be set the same in both (repo 
settings override client
+* settings).
+*/
'useLegacyChangesSubscription' => false,
 
-   // Prefix to use for cache keys that should be shared among a 
Wikibase Repo instance
-   // and all its clients. This is for things like caching entity 
blobs in memcached.
-   //
-   // The default here assumes Wikibase Repo + Client installed 
together on the same wiki.
-   // For a multiwiki / wikifarm setup, to configure shared caches 
between clients and repo,
-   // this needs to be set to the same value in both client and 
repo wiki settings.
-   //
-   // For Wikidata production, we set it to 
'wikibase-shared/wikidata_1_25wmf24-wikidatawiki',
-   // which is 'wikibase_shared/' + deployment branch name + '-' + 
repo database name,
-   // and have it set in both $wgWBClientSettings and 
$wgWBRepoSettings.
+   /**
+* Prefix to use for cache keys that should be shared among a 
Wikibase Repo instance and all
+* its clients. This is for things like caching entity blobs in 
memcached.
+*
+* The default here assumes Wikibase Repo + Client installed 
together on the same wiki. For
+* a multiwiki / wikifarm setup, to configure shared caches 
between clients and repo, this
+* needs to be set to the same value in both client and repo 
wiki settings.
+*
+* For Wikidata production, we set it to 
'wikibase-shared/wikidata_1_25wmf24-wikidatawiki',
+* which is 'wikibase_shared/' + deployment branch name + '-' + 
repo database name, and have
+* it set in both $wgWBClientSettings and $wgWBRepoSettings.
+*/
'sharedCacheKeyPrefix' => 'wikibase_shared/' . WBL_VERSION . 
'-' . $GLOBALS['wgDBname'],
 
-   // The duration of the object cache, in seconds.
-   //
-   // As with sharedCacheKeyPrefix, this is both client and repo 
setting. On a multiwiki
-   // setup, this should be set to the same value in both the repo 
and clients.
-   // Also note that the setting value in $wgWBClientSettings 
overrides the one here.
+   /**
+* The duration of the object cache, in seconds.
+*
+* As with sharedCacheKeyPrefix, this is both client and repo 
setting. On a multiwiki setup,
+* this should be set to the same value in both the repo and 
clients. Also note that the
+* setting value in $wgWBClientSettings overrides the one here.
+*/
'sharedCacheDuration' => 60 * 60,
 
// The type of object cache to use. Use CACHE_XXX constants.
diff --git a/client/config/WikibaseClient.example.php 
b/client/config/WikibaseClient.example.php
index 2d072e8..92e5d33 100644
--- a/client/config/WikibaseClient.example.php
+++ 

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 8303873..3791e56 - change (mediawiki/extensions)

2015-11-01 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 8303873..3791e56
..


Syncronize VisualEditor: 8303873..3791e56

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

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



diff --git a/VisualEditor b/VisualEditor
index 8303873..3791e56 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 8303873ced7de9bba1a723dfedd8a9af30a7594f
+Subproject commit 3791e5658a2c25325d80ca019356cd6361aa3e50

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I449cf1c36df2ba0b3f230c2638452dbb1837b819
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 
Gerrit-Reviewer: Umherirrender 

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


[MediaWiki-commits] [Gerrit] Consistency tweaks - change (mediawiki...AccessControl)

2015-11-01 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: Consistency tweaks
..

Consistency tweaks

* Remove leading space
* Replace ! with .

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


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

diff --git a/i18n/en.json b/i18n/en.json
index 135af78..168f5bd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,11 +3,11 @@
"authors": []
},
"accesscontrol-desc": "Enables group access restriction on a page by 
user basis",
-   "accesscontrol-info": "This is a protected page!",
+   "accesscontrol-info": "This is a protected page.",
"accesscontrol-move-anonymous": "Deny_anonymous_by_include",
"accesscontrol-move-users": "Deny_user_by_include",
"accesscontrol-redirect-anonymous": "Deny_anonymous",
"accesscontrol-redirect-users": "Deny_user",
"accesscontrol-actions-deny": "Deny_action",
-   "accesscontrol-info-box": " This MediaWiki uses the 
[https://www.mediawiki.org/wiki/Extension:AccessControl AccessControl] 
extension that allows to restrict access to the site through a user-defined 
list. If you see this message, you have no access to this page."
-}
\ No newline at end of file
+   "accesscontrol-info-box": "This MediaWiki uses the 
[https://www.mediawiki.org/wiki/Extension:AccessControl AccessControl] 
extension that allows to restrict access to the site through a user-defined 
list. If you see this message, you have no access to this page."
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I708954001cd42594503e0dc7283f9b822fb489ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AccessControl
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] grep the data in getclaims usage generate - change (analytics/limn-wikidata-data)

2015-11-01 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: grep the data in getclaims usage generate
..

grep the data in getclaims usage generate

Otherwise we get more results than we should have...

Change-Id: I0a122095a9437d0f5d501ef63605862c65b8b2f6
---
M src/api/getclaims_property_use/generate.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-wikidata-data 
refs/changes/14/250314/1

diff --git a/src/api/getclaims_property_use/generate.sh 
b/src/api/getclaims_property_use/generate.sh
index 2c2e044..3268572 100755
--- a/src/api/getclaims_property_use/generate.sh
+++ b/src/api/getclaims_property_use/generate.sh
@@ -32,7 +32,7 @@
 fi
 
 # Run the main command
-output=`zgrep action=wbgetclaims $apilog $nextapilog | grep wikidatawiki | 
egrep -o 'property=P[0-9]+' | sort | uniq -c | sort -nr`
+output=`zgrep $dateISO $apilog $nextapilog | grep action=wbgetclaims | grep 
wikidatawiki | egrep -o 'property=P[0-9]+' | sort | uniq -c | sort -nr`
 
 # Start building the SQL
 sql='INSERT INTO wikidata_getclaims_property_use (date,property,count) VALUES '

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a122095a9437d0f5d501ef63605862c65b8b2f6
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-wikidata-data
Gerrit-Branch: master
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] grep the data in getclaims usage generate - change (analytics/limn-wikidata-data)

2015-11-01 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged.

Change subject: grep the data in getclaims usage generate
..


grep the data in getclaims usage generate

Otherwise we get more results than we should have...

Change-Id: I0a122095a9437d0f5d501ef63605862c65b8b2f6
---
M src/api/getclaims_property_use/generate.sh
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/api/getclaims_property_use/generate.sh 
b/src/api/getclaims_property_use/generate.sh
index 2c2e044..3268572 100755
--- a/src/api/getclaims_property_use/generate.sh
+++ b/src/api/getclaims_property_use/generate.sh
@@ -32,7 +32,7 @@
 fi
 
 # Run the main command
-output=`zgrep action=wbgetclaims $apilog $nextapilog | grep wikidatawiki | 
egrep -o 'property=P[0-9]+' | sort | uniq -c | sort -nr`
+output=`zgrep $dateISO $apilog $nextapilog | grep action=wbgetclaims | grep 
wikidatawiki | egrep -o 'property=P[0-9]+' | sort | uniq -c | sort -nr`
 
 # Start building the SQL
 sql='INSERT INTO wikidata_getclaims_property_use (date,property,count) VALUES '

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a122095a9437d0f5d501ef63605862c65b8b2f6
Gerrit-PatchSet: 1
Gerrit-Project: analytics/limn-wikidata-data
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 

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


[MediaWiki-commits] [Gerrit] WIP: ensure we lint bin/mw-ocg-bundler; update jshint & jscs... - change (mediawiki...bundler)

2015-11-01 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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

Change subject: WIP: ensure we lint bin/mw-ocg-bundler; update jshint & jscs 
dependency.
..

WIP: ensure we lint bin/mw-ocg-bundler; update jshint & jscs dependency.

Change-Id: I73cc40424a7df9a9d8d421efecf326c8959099e6
---
M bin/mw-ocg-bundler
M package.json
2 files changed, 18 insertions(+), 18 deletions(-)


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

diff --git a/bin/mw-ocg-bundler b/bin/mw-ocg-bundler
index 79ca000..ab4def2 100755
--- a/bin/mw-ocg-bundler
+++ b/bin/mw-ocg-bundler
@@ -1,5 +1,5 @@
 #!/usr/bin/env node
-"use strict";
+'use strict';
 require('core-js/shim'); // for Map, endsWith, etc.
 var Promise = require('prfun');
 
@@ -102,13 +102,13 @@
 }
 
 if (program.retries !== undefined) {
-   require('../lib/retry-request').DEFAULT_RETRIES = program.retries;
+   require('../lib/retry-request').DEFAULT_RETRIES = program.retries;
 }
 if (program.timeout !== undefined) {
-   require('../lib/retry-request').DEFAULT_TIMEOUT = program.timeout;
+   require('../lib/retry-request').DEFAULT_TIMEOUT = program.timeout;
 }
 if (program.parallelRequestLimit !== undefined) {
-   require('../lib/retry-request').REQUEST_LIMIT = 
+program.parallelRequestLimit;
+   require('../lib/retry-request').REQUEST_LIMIT = 
+program.parallelRequestLimit;
 }
 
 
@@ -126,19 +126,19 @@
process.send({
type: 'log',
level: level,
-   message: message
+   message: message,
});
}
} catch (err) {
// This should never happen!  But don't try to convert arguments
// toString() if it does, since that might fail too.
-   console.error("Could not format message!", err);
+   console.error('Could not format message!', err);
if (process.send) {
process.send({
type: 'log',
level: 'error',
message: 'Could not format message! ' + err,
-   stack: err.stack
+   stack: err.stack,
});
}
}
@@ -184,7 +184,7 @@
 
 // set default output filename
 if ((!program.directory) && (!program.output)) {
-   program.output = "bundle.zip";
+   program.output = 'bundle.zip';
 }
 
 // okay, do it!
@@ -221,7 +221,7 @@
 }).then(function(metabook) {
if (metabook.papersize !== undefined &&
!/^(letter|a4)$/.test(metabook.papersize)) {
-   log("WARN: unknown papersize:", metabook.papersize);
+   log('WARN: unknown papersize:', metabook.papersize);
delete metabook.papersize;
}
return bundler.bundle(metabook, {
@@ -245,20 +245,20 @@
bundleSizeLimit: +program.bundleSizeLimit,
imageSizeLimit: +program.imageSizeLimit,
// logging
-   log: log
+   log: log,
});
 }).catch(function(err) {
var msg = {
type: 'log',
-   level: 'error'
+   level: 'error',
};
-   if ( err instanceof Error ) {
+   if (err instanceof Error) {
msg.message = err.message;
msg.stack = err.stack;
} else {
msg.message = '' + err;
}
-   console.error( (program.debug && msg.stack) || msg.message );
+   console.error((program.debug && msg.stack) || msg.message);
// process.send is sync, so we won't exit before this is sent (yay)
if (process.send) {
process.send(msg);
diff --git a/package.json b/package.json
index 95437d9..39465de 100644
--- a/package.json
+++ b/package.json
@@ -23,8 +23,8 @@
 "tmp": "~0.0.27"
   },
   "devDependencies": {
-"jscs": "~2.1.1",
-"jshint": "~2.8.0",
+"jscs": "~2.5.0",
+"jshint": "~2.9.0",
 "mocha": "~2.3.3",
 "npm-travis": "~1.0.0"
   },
@@ -32,9 +32,9 @@
 "test": "npm run lint-no-0.8 && npm run mocha",
 "lint": "npm run jshint && npm run jscs",
 "lint-no-0.8": "node -e 
'process.exit(/v0[.][0-8][.]/.test(process.version) ? 0 : 1)' || npm run lint",
-"jshint": "jshint .",
-"jscs": "jscs .",
-"jscs-fix": "jscs --fix .",
+"jshint": "jshint . bin/mw-ocg-bundler",
+"jscs": "jscs . bin/mw-ocg-bundler",
+"jscs-fix": "jscs --fix . bin/mw-ocg-bundler",
 "mocha": "mocha",
 "travis": "npm-travis --remote gerrit 
wikimedia/mediawiki-extensions-Collection-OfflineContentGenerator-bundler"
   },

-- 
To view, visit https://gerrit.wikimedia.org/r/250311
To 

[MediaWiki-commits] [Gerrit] Add node_modules to .gitignore - change (mediawiki...BreadCrumbs)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add node_modules to .gitignore
..


Add node_modules to .gitignore

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

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



diff --git a/.gitignore b/.gitignore
index 632d699..4002e52 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *.kate-swp
 .*.swp
 gitpush.sh
+node_modules

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

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

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


[MediaWiki-commits] [Gerrit] Add node_modules to .gitignore - change (mediawiki...Cargo)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add node_modules to .gitignore
..


Add node_modules to .gitignore

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

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



diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..3c3629e
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+node_modules

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

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

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


[MediaWiki-commits] [Gerrit] Convert recordUpload2() to using startAtomic/endAtomic - change (mediawiki/core)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Convert recordUpload2() to using startAtomic/endAtomic
..

Convert recordUpload2() to using startAtomic/endAtomic

* This avoids breaking transactions due to nesting
* Also improve readability a bit in this area

Change-Id: I81c41e83d14aa59930bfb99522ebcc25d8aa14f9
---
M includes/filerepo/file/LocalFile.php
1 file changed, 74 insertions(+), 75 deletions(-)


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

diff --git a/includes/filerepo/file/LocalFile.php 
b/includes/filerepo/file/LocalFile.php
index 390b7fe..cd64f0d 100644
--- a/includes/filerepo/file/LocalFile.php
+++ b/includes/filerepo/file/LocalFile.php
@@ -316,7 +316,7 @@
/**
 * Purge the file object/metadata cache
 */
-   function invalidateCache() {
+   public function invalidateCache() {
$key = $this->getCacheKey();
if ( !$key ) {
return;
@@ -1209,21 +1209,15 @@
 * @param null|User $user
 * @return bool
 */
-   function recordUpload2( $oldver, $comment, $pageText, $props = false, 
$timestamp = false,
-   $user = null
+   function recordUpload2(
+   $oldver, $comment, $pageText, $props = false, $timestamp = 
false, $user = null
) {
-
if ( is_null( $user ) ) {
global $wgUser;
$user = $wgUser;
}
 
$dbw = $this->repo->getMasterDB();
-   $dbw->begin( __METHOD__ );
-
-   if ( !$props ) {
-   $props = $this->repo->getFileProps( 
$this->getVirtualUrl() );
-   }
 
# Imports or such might force a certain timestamp; otherwise we 
generate
# it and can fudge it slightly to keep (name,timestamp) unique 
on re-upload.
@@ -1234,6 +1228,7 @@
$allowTimeKludge = false;
}
 
+   $props = $props ?: $this->repo->getFileProps( 
$this->getVirtualUrl() );
$props['description'] = $comment;
$props['user'] = $user->getId();
$props['user_text'] = $user->getName();
@@ -1243,12 +1238,11 @@
# Fail now if the file isn't there
if ( !$this->fileExists ) {
wfDebug( __METHOD__ . ": File " . $this->getRel() . " 
went missing!\n" );
-   $dbw->rollback( __METHOD__ );
 
return false;
}
 
-   $reupload = false;
+   $dbw->startAtomic( __METHOD__ );
 
# Test to see if the row exists using INSERT IGNORE
# This avoids race conditions by locking the row until the 
commit, and also
@@ -1273,13 +1267,18 @@
__METHOD__,
'IGNORE'
);
-   if ( $dbw->affectedRows() == 0 ) {
+
+   $reupload = ( $dbw->affectedRows() == 0 );
+   if ( $reupload ) {
if ( $allowTimeKludge ) {
# Use LOCK IN SHARE MODE to ignore any 
transaction snapshotting
-   $ltimestamp = $dbw->selectField( 'image', 
'img_timestamp',
+   $ltimestamp = $dbw->selectField(
+   'image',
+   'img_timestamp',
array( 'img_name' => $this->getName() ),
__METHOD__,
-   array( 'LOCK IN SHARE MODE' ) );
+   array( 'LOCK IN SHARE MODE' )
+   );
$lUnixtime = $ltimestamp ? wfTimestamp( 
TS_UNIX, $ltimestamp ) : false;
# Avoid a timestamp that is not newer than the 
last version
# TODO: the image/oldimage tables should be 
like page/revision with an ID field
@@ -1294,8 +1293,6 @@
# version of the file was broken. Allow registration of 
the new
# version to continue anyway, because that's better 
than having
# an image that's not fixable by user operations.
-
-   $reupload = true;
# Collision, this is an update of a file
# Insert previous contents into oldimage
$dbw->insertSelect( 'oldimage', 'image',
@@ -1322,7 +1319,7 @@
 
# Update the current image row
$dbw->update( 'image',
-   array( /* SET */
+   array(

[MediaWiki-commits] [Gerrit] Change searchInput placeholder (i18n message example) - change (mediawiki...Timeless)

2015-11-01 Thread Isarra (Code Review)
Isarra has uploaded a new change for review.

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

Change subject: Change searchInput placeholder (i18n message example)
..

Change searchInput placeholder (i18n message example)

Also fix a $this->msg reference I missed before.

Change-Id: I2082cec190fbbb923cde9bed47cfbf5fd4225613
---
M TimelessTemplate.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/64/250364/1

diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index 5ecae6c..9d226a0 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -203,12 +203,17 @@
?>

>
-   msg( 
'search' ) ?>
+   getMsg( 'search' )->parse() ?>




-   makeSearchInput( 
array( 'id' => 'searchInput' ) ); ?>
+   makeSearchInput( array(
+   'id' => 'searchInput',
+   'placeholder' => $this->getMsg( 
'timeless-search-placeholder' )->escaped(),
+   ) );
+   ?>

get( 
'searchtitle' ) );
diff --git a/i18n/en.json b/i18n/en.json
index a6ecf87..a08744c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -3,5 +3,6 @@
"authors": [ "Isarra" ]
},
"skinname-timeless": "Timeless",
-   "timeless-desc": "A timeless skin designed after the Winter prototype 
by Brandon Harris."
+   "timeless-desc": "A timeless skin designed after the Winter prototype 
by Brandon Harris.",
+   "timeless-search-placeholder": "Search approximately {{NUMBEROFPAGES}} 
pages"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f66c97e..250a8ad 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -3,5 +3,6 @@
"authors": [ "..." ]
},
"skinname-timeless": "{{optional}}",
-   "timeless-desc": 
"{{desc|what=skin|name=Timeless|url=https://www.mediawiki.org/wiki/Skin:Timeless}};
+   "timeless-desc": 
"{{desc|what=skin|name=Timeless|url=https://www.mediawiki.org/wiki/Skin:Timeless}};,
+   "timeless-search-placeholder": "Main search input placeholder text"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2082cec190fbbb923cde9bed47cfbf5fd4225613
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
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] v2.11.1.1 - change (xowa)

2015-11-01 Thread Gnosygnu (Code Review)
Gnosygnu has submitted this change and it was merged.

Change subject: v2.11.1.1
..


v2.11.1.1

Change-Id: I03f2de0c5132e72db11e4fa0f621be87de0b86a1
---
M 100_core/.classpath
M 100_core/src/gplx/Err_.java
A 100_core/src/gplx/Io_mgr.java
R 100_core/src/gplx/Io_mgr__tst.java
A 100_core/src/gplx/Tfds.java
R 100_core/src/gplx/TfdsEqListItmStr.java
D 100_core/src/gplx/core/brys/Bry_rdr.java
M 100_core/src/gplx/core/btries/Btrie_slim_mgr.java
M 100_core/src/gplx/core/btries/Btrie_u8_itm.java
M 100_core/src/gplx/core/criterias/Criteria_.java
M 100_core/src/gplx/core/criterias/Criteria_ioItm_tst.java
M 100_core/src/gplx/core/criterias/Criteria_ioMatch.java
M 100_core/src/gplx/core/criterias/Criteria_like.java
A 100_core/src/gplx/core/encoders/Base85_.java
A 100_core/src/gplx/core/encoders/Base85__tst.java
M 100_core/src/gplx/core/intls/Utf16_.java
A 100_core/src/gplx/core/ios/IoEngine.java
A 100_core/src/gplx/core/ios/IoEnginePool.java
A 100_core/src/gplx/core/ios/IoEngine_.java
A 100_core/src/gplx/core/ios/IoEngine_base.java
A 100_core/src/gplx/core/ios/IoEngine_memory.java
A 100_core/src/gplx/core/ios/IoEngine_system.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_deleteDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_deleteFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_loadFilStr.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_openRead.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_openWrite.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_queryDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_saveFilStr.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_xferDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_xferFil.java
A 100_core/src/gplx/core/ios/IoErr.java
A 100_core/src/gplx/core/ios/IoItmAttrib.java
A 100_core/src/gplx/core/ios/IoItmClassXtn.java
A 100_core/src/gplx/core/ios/IoItmDir.java
A 100_core/src/gplx/core/ios/IoItmDir_.java
A 100_core/src/gplx/core/ios/IoItmFil.java
A 100_core/src/gplx/core/ios/IoItmFil_.java
A 100_core/src/gplx/core/ios/IoItmFil_mem.java
A 100_core/src/gplx/core/ios/IoItmHash.java
A 100_core/src/gplx/core/ios/IoItmList.java
A 100_core/src/gplx/core/ios/IoItm_base.java
A 100_core/src/gplx/core/ios/IoItm_base_.java
A 100_core/src/gplx/core/ios/IoRecycleBin.java
A 100_core/src/gplx/core/ios/IoStream.java
A 100_core/src/gplx/core/ios/IoStream_.java
A 100_core/src/gplx/core/ios/IoStream_mem.java
A 100_core/src/gplx/core/ios/IoStream_mem_tst.java
A 100_core/src/gplx/core/ios/IoStream_mock.java
A 100_core/src/gplx/core/ios/IoStream_mock_tst.java
A 100_core/src/gplx/core/ios/IoStream_stream_rdr.java
A 100_core/src/gplx/core/ios/IoUrlInfo.java
A 100_core/src/gplx/core/ios/IoUrlInfoRegy.java
A 100_core/src/gplx/core/ios/IoUrlInfo_.java
A 100_core/src/gplx/core/ios/IoUrlTypeRegy.java
A 100_core/src/gplx/core/ios/IoZipWkr.java
A 100_core/src/gplx/core/ios/IoZipWkr_tst.java
A 100_core/src/gplx/core/ios/Io_download_fmt.java
A 100_core/src/gplx/core/ios/Io_download_fmt_tst.java
A 100_core/src/gplx/core/ios/Io_fil.java
A 100_core/src/gplx/core/ios/Io_fil_mkr.java
A 100_core/src/gplx/core/ios/Io_size_.java
A 100_core/src/gplx/core/ios/Io_size__tst.java
A 100_core/src/gplx/core/ios/Io_stream_.java
A 100_core/src/gplx/core/ios/Io_stream_rdr.java
A 100_core/src/gplx/core/ios/Io_stream_rdr_.java
A 100_core/src/gplx/core/ios/Io_stream_rdr_tst.java
A 100_core/src/gplx/core/ios/Io_stream_wtr.java
A 100_core/src/gplx/core/ios/Io_stream_wtr_.java
A 100_core/src/gplx/core/ios/Io_url_obj_ref.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_data.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_grp.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_itm.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_itm_.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_log.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_obj.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_root.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_root_tst.java
A 100_core/src/gplx/core/security/HashAlgo.java
A 100_core/src/gplx/core/security/HashAlgo_.java
A 100_core/src/gplx/core/security/HashAlgo_md5_tst.java
A 100_core/src/gplx/core/security/HashAlgo_sha1_tst.java
A 100_core/src/gplx/core/security/HashAlgo_tth192.java
A 100_core/src/gplx/core/security/HashAlgo_tth192_tree_tst.java
A 100_core/src/gplx/core/security/HashAlgo_tth192_tst.java
A 100_core/src/gplx/core/security/HashDlgWtr_tst.java
A 100_core/src/gplx/core/tests/PerfLogMgr_fxt.java
A 100_core/src/gplx/core/texts/Base32Converter.java
A 100_core/src/gplx/core/texts/Base64Converter.java
A 100_core/src/gplx/core/texts/BaseXXConverter_tst.java
A 100_core/src/gplx/core/texts/CharStream.java
A 100_core/src/gplx/core/texts/CharStream_tst.java
A 100_core/src/gplx/core/texts/HexDecUtl.java
A 

[MediaWiki-commits] [Gerrit] v2.11.1.1 - change (xowa)

2015-11-01 Thread Gnosygnu (Code Review)
Gnosygnu has uploaded a new change for review.

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

Change subject: v2.11.1.1
..

v2.11.1.1

Change-Id: I03f2de0c5132e72db11e4fa0f621be87de0b86a1
---
M 100_core/.classpath
M 100_core/src/gplx/Err_.java
A 100_core/src/gplx/Io_mgr.java
R 100_core/src/gplx/Io_mgr__tst.java
A 100_core/src/gplx/Tfds.java
R 100_core/src/gplx/TfdsEqListItmStr.java
D 100_core/src/gplx/core/brys/Bry_rdr.java
M 100_core/src/gplx/core/btries/Btrie_slim_mgr.java
M 100_core/src/gplx/core/btries/Btrie_u8_itm.java
M 100_core/src/gplx/core/criterias/Criteria_.java
M 100_core/src/gplx/core/criterias/Criteria_ioItm_tst.java
M 100_core/src/gplx/core/criterias/Criteria_ioMatch.java
M 100_core/src/gplx/core/criterias/Criteria_like.java
A 100_core/src/gplx/core/encoders/Base85_.java
A 100_core/src/gplx/core/encoders/Base85__tst.java
M 100_core/src/gplx/core/intls/Utf16_.java
A 100_core/src/gplx/core/ios/IoEngine.java
A 100_core/src/gplx/core/ios/IoEnginePool.java
A 100_core/src/gplx/core/ios/IoEngine_.java
A 100_core/src/gplx/core/ios/IoEngine_base.java
A 100_core/src/gplx/core/ios/IoEngine_memory.java
A 100_core/src/gplx/core/ios/IoEngine_system.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_deleteDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_deleteFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_downloadFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_fil_affects1_base.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_loadFilStr.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_openRead.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_openWrite.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_queryDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_recycleFil.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_saveFilStr.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_xferDir.java
A 100_core/src/gplx/core/ios/IoEngine_xrg_xferFil.java
A 100_core/src/gplx/core/ios/IoErr.java
A 100_core/src/gplx/core/ios/IoItmAttrib.java
A 100_core/src/gplx/core/ios/IoItmClassXtn.java
A 100_core/src/gplx/core/ios/IoItmDir.java
A 100_core/src/gplx/core/ios/IoItmDir_.java
A 100_core/src/gplx/core/ios/IoItmFil.java
A 100_core/src/gplx/core/ios/IoItmFil_.java
A 100_core/src/gplx/core/ios/IoItmFil_mem.java
A 100_core/src/gplx/core/ios/IoItmHash.java
A 100_core/src/gplx/core/ios/IoItmList.java
A 100_core/src/gplx/core/ios/IoItm_base.java
A 100_core/src/gplx/core/ios/IoItm_base_.java
A 100_core/src/gplx/core/ios/IoRecycleBin.java
A 100_core/src/gplx/core/ios/IoStream.java
A 100_core/src/gplx/core/ios/IoStream_.java
A 100_core/src/gplx/core/ios/IoStream_mem.java
A 100_core/src/gplx/core/ios/IoStream_mem_tst.java
A 100_core/src/gplx/core/ios/IoStream_mock.java
A 100_core/src/gplx/core/ios/IoStream_mock_tst.java
A 100_core/src/gplx/core/ios/IoStream_stream_rdr.java
A 100_core/src/gplx/core/ios/IoUrlInfo.java
A 100_core/src/gplx/core/ios/IoUrlInfoRegy.java
A 100_core/src/gplx/core/ios/IoUrlInfo_.java
A 100_core/src/gplx/core/ios/IoUrlTypeRegy.java
A 100_core/src/gplx/core/ios/IoZipWkr.java
A 100_core/src/gplx/core/ios/IoZipWkr_tst.java
A 100_core/src/gplx/core/ios/Io_download_fmt.java
A 100_core/src/gplx/core/ios/Io_download_fmt_tst.java
A 100_core/src/gplx/core/ios/Io_fil.java
A 100_core/src/gplx/core/ios/Io_fil_mkr.java
A 100_core/src/gplx/core/ios/Io_size_.java
A 100_core/src/gplx/core/ios/Io_size__tst.java
A 100_core/src/gplx/core/ios/Io_stream_.java
A 100_core/src/gplx/core/ios/Io_stream_rdr.java
A 100_core/src/gplx/core/ios/Io_stream_rdr_.java
A 100_core/src/gplx/core/ios/Io_stream_rdr_tst.java
A 100_core/src/gplx/core/ios/Io_stream_wtr.java
A 100_core/src/gplx/core/ios/Io_stream_wtr_.java
A 100_core/src/gplx/core/ios/Io_url_obj_ref.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_data.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_grp.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_grp_.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_itm.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_itm_.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_log.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_obj.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_root.java
A 100_core/src/gplx/core/log_msgs/Gfo_msg_root_tst.java
A 100_core/src/gplx/core/security/HashAlgo.java
A 100_core/src/gplx/core/security/HashAlgo_.java
A 100_core/src/gplx/core/security/HashAlgo_md5_tst.java
A 100_core/src/gplx/core/security/HashAlgo_sha1_tst.java
A 100_core/src/gplx/core/security/HashAlgo_tth192.java
A 100_core/src/gplx/core/security/HashAlgo_tth192_tree_tst.java
A 100_core/src/gplx/core/security/HashAlgo_tth192_tst.java
A 100_core/src/gplx/core/security/HashDlgWtr_tst.java
A 100_core/src/gplx/core/tests/PerfLogMgr_fxt.java
A 100_core/src/gplx/core/texts/Base32Converter.java
A 100_core/src/gplx/core/texts/Base64Converter.java
A 100_core/src/gplx/core/texts/BaseXXConverter_tst.java
A 100_core/src/gplx/core/texts/CharStream.java
A 100_core/src/gplx/core/texts/CharStream_tst.java
A 

[MediaWiki-commits] [Gerrit] Make $wgNoticeCloseButton not load closeWindow19x19.png from... - change (mediawiki...CentralNotice)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make $wgNoticeCloseButton not load closeWindow19x19.png from 
upload.wikimedia.org
..


Make $wgNoticeCloseButton not load closeWindow19x19.png from 
upload.wikimedia.org

Put CloseWindow19x19.png into the resources/subscribing/ folder. 
The image is embedded now in CSS instead of the previous use in javascript.

Bug: T72462
Change-Id: Ia61b18a83dbab9540c2d9068a10eab31805403cb
---
M CentralNotice.hooks.php
M CentralNotice.php
M resources/infrastructure/bannereditor.js
A resources/subscribing/CloseWindow19x19.png
M resources/subscribing/ext.centralNotice.display.css
5 files changed, 16 insertions(+), 10 deletions(-)

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



diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 7a09271..ee966fe 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -296,8 +296,8 @@
  */
 function efResourceLoaderGetConfigVars( &$vars ) {
global $wgNoticeFundraisingUrl, $wgContLang, $wgNoticeXXCountries,
-  $wgNoticeInfrastructure, $wgNoticeCloseButton,
-  $wgCentralBannerRecorder, $wgNoticeNumberOfBuckets, 
$wgNoticeBucketExpiry,
+  $wgNoticeInfrastructure, $wgCentralBannerRecorder, 
+  $wgNoticeNumberOfBuckets, $wgNoticeBucketExpiry,
   $wgNoticeNumberOfControllerBuckets, 
$wgNoticeCookieDurations, $wgScript,
   $wgNoticeHideUrls, $wgNoticeOldCookieEpoch, 
$wgCentralNoticeSampleRate,
   $wgCentralSelectedBannerDispatcher,
@@ -349,8 +349,6 @@
$vars[ 'wgCentralNoticePerCampaignBucketExtension' ] = 
$wgCentralNoticePerCampaignBucketExtension;
 
if ( $wgNoticeInfrastructure ) {
-   $vars[ 'wgNoticeCloseButton' ] = $wgNoticeCloseButton;
-
// Add campaign mixin defs for use in admin interface
$vars[ 'wgCentralNoticeCampaignMixins' ] = 
$wgCentralNoticeCampaignMixins;
}
diff --git a/CentralNotice.php b/CentralNotice.php
index d25a50c..5868f6b 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -103,9 +103,6 @@
 $wgNoticeCounterSource = 
'http://wikimediafoundation.org/wiki/Special:ContributionTotal?action=raw';
 $wgNoticeDailyCounterSource = 
'http://wikimediafoundation.org/wiki/Special:DailyTotal?action=raw';
 
-// URL for a banner close button
-$wgNoticeCloseButton = 
'//upload.wikimedia.org/wikipedia/foundation/2/20/CloseWindow19x19.png';
-
 // URL prefix where banner screenshots are stored. False if this feature is 
disabled.
 // meta.wikimedia.org CentralNotice banners are archived at 
'http://fundraising-archive.wmflabs.org/banner/'
 $wgNoticeBannerPreview = false;
diff --git a/resources/infrastructure/bannereditor.js 
b/resources/infrastructure/bannereditor.js
index 5d56399..1847f1b 100644
--- a/resources/infrastructure/bannereditor.js
+++ b/resources/infrastructure/bannereditor.js
@@ -171,9 +171,8 @@
buttonValue = ''
-   + '';
+   + '' + 
mw.msg( 'centralnotice-close-title' )
+   + '';
}
if ( document.selection ) {
// IE support
diff --git a/resources/subscribing/CloseWindow19x19.png 
b/resources/subscribing/CloseWindow19x19.png
new file mode 100644
index 000..c96d9ff
--- /dev/null
+++ b/resources/subscribing/CloseWindow19x19.png
Binary files differ
diff --git a/resources/subscribing/ext.centralNotice.display.css 
b/resources/subscribing/ext.centralNotice.display.css
index 300f96b..6d41096 100644
--- a/resources/subscribing/ext.centralNotice.display.css
+++ b/resources/subscribing/ext.centralNotice.display.css
@@ -3,3 +3,15 @@
display: none;
}
 }
+
+.cn-closeButton {
+   display: inline-block;
+   zoom: 1;
+   /* @embed */
+   background: url(CloseWindow19x19.png);
+   width: 19px;
+   height: 19px;
+   text-indent: 19px;
+   white-space: nowrap;
+   overflow: hidden;
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia61b18a83dbab9540c2d9068a10eab31805403cb
Gerrit-PatchSet: 12
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Rosalieper 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Krinkle 

[MediaWiki-commits] [Gerrit] Merge "Normalize header case for FileBackend operations" - change (mediawiki/core)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Merge "Normalize header case for FileBackend operations"
..

Merge "Normalize header case for FileBackend operations"

Change-Id: I0d16aa7a8ee4c70b0708b3102413c0ea4bf3db94
---
M tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/250368/1

diff --git a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php 
b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
index 3e3bac3..904ddbb 100644
--- a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
+++ b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
@@ -42,7 +42,7 @@
);
 
$this->assertEquals(
-   'test:##5820ad1d105aa4dc698585c39df73e19',
+   'test:##dc89dcb43b28614da27660240af478b5',
$this->cache->makeKey( '핖핧핖핟', '핚핗', '함핖', '필픻ퟝ', 
'핖핒핔학',
'핒핣하핦핞핖핟핥', '핥학핚핤', '한핖핪', '함할핦핝핕', '핤핥핚핝핝', 
'핓핖', '핥할할', '핝할핟하' )
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d16aa7a8ee4c70b0708b3102413c0ea4bf3db94
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] tune gitblit settings to improve performance - change (operations/puppet)

2015-11-01 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: tune gitblit settings to improve performance
..


tune gitblit settings to improve performance

- Don't show repository sizes! There's a big warning about how this could 
perform poorly.
- Disable flash copy-to-clipboard
- Cap max activity commits at 5
- Cap timespan of 'activity' views to 7 days
- Reduce the number of entries shown on various paginated displays.

Change-Id: Id60973de330eac598866e4b5203d6ee2716e8eac
---
M modules/gitblit/files/gitblit.conf
M modules/gitblit/files/gitblit.properties
2 files changed, 19 insertions(+), 24 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/gitblit/files/gitblit.conf 
b/modules/gitblit/files/gitblit.conf
index 9726d56..39c1e48 100644
--- a/modules/gitblit/files/gitblit.conf
+++ b/modules/gitblit/files/gitblit.conf
@@ -13,7 +13,7 @@
 
 chdir /var/lib/gitblit
 
-exec /usr/bin/java -server -Xincgc -Xms4096M -Xmx4096M 
-Djava.awt.headless=true \
+exec /usr/bin/java -server -Xmx8g -Djava.awt.headless=true \
 -jar gitblit.jar --baseFolder /var/lib/gitblit/data
 
 respawn
diff --git a/modules/gitblit/files/gitblit.properties 
b/modules/gitblit/files/gitblit.properties
index 30ee456..178e478 100644
--- a/modules/gitblit/files/gitblit.properties
+++ b/modules/gitblit/files/gitblit.properties
@@ -97,7 +97,7 @@
 #
 # SINCE 1.3.0
 # RESTART REQUIRED
-git.daemonPort = 9418
+git.daemonPort = -1
 
 # Allow push/pull over http/https with JGit servlet.
 # If you do NOT want to allow Git clients to clone/push to Gitblit set this
@@ -106,7 +106,7 @@
 # indicate your clone/push urls.
 #
 # SINCE 0.5.0
-git.enableGitServlet = true
+git.enableGitServlet = false
 
 # If you want to restrict all git servlet access to those with valid X509 
client
 # certificates then set this value to true.
@@ -627,7 +627,7 @@
 # is the default behavior for Gitblit <= 1.3.0.
 #
 # SINCE 1.3.1
-web.pageCacheExpires = 5
+web.pageCacheExpires = 10
 
 # If true, the web ui layout will respond and adapt to the browser's 
dimensions.
 # if false, the web ui will use a 940px fixed-width layout.
@@ -639,12 +639,12 @@
 # Allow Gravatar images to be displayed in Gitblit pages.
 #
 # SINCE 0.8.0
-web.allowGravatar = false
+web.allowGravatar = true
 
 # Allow dynamic zip downloads.
 #
 # SINCE 0.5.0   
-web.allowZipDownloads = true
+web.allowZipDownloads = false
 
 # If *web.allowZipDownloads=true* the following formats will be displayed for
 # download compressed archive links:
@@ -657,7 +657,7 @@
 #
 # SPACE-DELIMITED
 # SINCE 1.2.0
-web.compressedDownloads = zip gz bzip2
+web.compressedDownloads = gz
 
 # Allow optional Lucene integration. Lucene indexing is an opt-in feature.
 # A repository may specify branches to index with Lucene instead of using Git
@@ -666,7 +666,7 @@
 # scenario is on a resource-constrained federated Gitblit mirror.
 #
 # SINCE 0.9.0
-web.allowLuceneIndexing = false
+web.allowLuceneIndexing = true
 
 # Allows an authenticated user to create forks of a repository
 #
@@ -684,7 +684,7 @@
 # offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.
 #
 # SINCE 0.8.0
-web.allowFlashCopyToClipboard = true
+web.allowFlashCopyToClipboard = false
 
 # Default maximum number of commits that a repository may contribute to the
 # activity page, regardless of the selected duration.  This setting may be 
valuable
@@ -692,7 +692,7 @@
 # in Edit Repository. 0 disables this throttle.
 #
 # SINCE 1.2.0
-web.maxActivityCommits = 0
+web.maxActivityCommits = 5
 
 # Default number of entries to include in RSS Syndication links
 #
@@ -704,7 +704,7 @@
 # non-performant on some operating systems and/or filesystems. 
 #
 # SINCE 0.5.2
-web.showRepositorySizes = true
+web.showRepositorySizes = false
 
 # List of custom regex expressions that can be displayed in the Filters menu
 # of the Repositories and Activity pages.  Keep them very simple because you
@@ -886,6 +886,7 @@
 # SPACE-DELIMITED
 # SINCE 1.3.0
 web.activityDurationChoices = 1 3 7 14
+web.activityDurationMaximum = 7
 
 # The number of days of commits to cache in memory for the dashboard, activity,
 # and project pages.  A value of 0 will disable all caching and will parse 
commits
@@ -899,7 +900,7 @@
 #
 # SINCE 1.3.0
 # RESTART REQUIRED
-web.activityCacheDays = 7
+web.activityCacheDays = 1
 
 # Case-insensitive list of authors to exclude from metrics.  Useful for
 # eliminating bots.
@@ -912,7 +913,7 @@
 # Value must exceed 0 else default of 20 is used
 #
 # SINCE 0.5.0
-web.summaryCommitCount = 16
+web.summaryCommitCount = 5
 
 # The number of tags/branches to display on the summary page.
 # -1 = all tags/branches
@@ -920,19 +921,19 @@
 # N = N tags/branches
 #
 # SINCE 0.5.0
-web.summaryRefsCount = 5
+web.summaryRefsCount = 0
 
 # The number of items to show on a page before showing the first, prev, next
 # pagination links.  A default of 50 

[MediaWiki-commits] [Gerrit] tune gitblit settings to improve performance - change (operations/puppet)

2015-11-01 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: tune gitblit settings to improve performance
..

tune gitblit settings to improve performance

- Don't show repository sizes! There's a big warning about how this could 
perform poorly.
- Disable flash copy-to-clipboard
- Cap max activity commits at 5
- Cap timespan of 'activity' views to 7 days
- Reduce the number of entries shown on various paginated displays.

Change-Id: Id60973de330eac598866e4b5203d6ee2716e8eac
---
M modules/gitblit/files/gitblit.conf
M modules/gitblit/files/gitblit.properties
2 files changed, 19 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/250369/1

diff --git a/modules/gitblit/files/gitblit.conf 
b/modules/gitblit/files/gitblit.conf
index 9726d56..39c1e48 100644
--- a/modules/gitblit/files/gitblit.conf
+++ b/modules/gitblit/files/gitblit.conf
@@ -13,7 +13,7 @@
 
 chdir /var/lib/gitblit
 
-exec /usr/bin/java -server -Xincgc -Xms4096M -Xmx4096M 
-Djava.awt.headless=true \
+exec /usr/bin/java -server -Xmx8g -Djava.awt.headless=true \
 -jar gitblit.jar --baseFolder /var/lib/gitblit/data
 
 respawn
diff --git a/modules/gitblit/files/gitblit.properties 
b/modules/gitblit/files/gitblit.properties
index 30ee456..178e478 100644
--- a/modules/gitblit/files/gitblit.properties
+++ b/modules/gitblit/files/gitblit.properties
@@ -97,7 +97,7 @@
 #
 # SINCE 1.3.0
 # RESTART REQUIRED
-git.daemonPort = 9418
+git.daemonPort = -1
 
 # Allow push/pull over http/https with JGit servlet.
 # If you do NOT want to allow Git clients to clone/push to Gitblit set this
@@ -106,7 +106,7 @@
 # indicate your clone/push urls.
 #
 # SINCE 0.5.0
-git.enableGitServlet = true
+git.enableGitServlet = false
 
 # If you want to restrict all git servlet access to those with valid X509 
client
 # certificates then set this value to true.
@@ -627,7 +627,7 @@
 # is the default behavior for Gitblit <= 1.3.0.
 #
 # SINCE 1.3.1
-web.pageCacheExpires = 5
+web.pageCacheExpires = 10
 
 # If true, the web ui layout will respond and adapt to the browser's 
dimensions.
 # if false, the web ui will use a 940px fixed-width layout.
@@ -639,12 +639,12 @@
 # Allow Gravatar images to be displayed in Gitblit pages.
 #
 # SINCE 0.8.0
-web.allowGravatar = false
+web.allowGravatar = true
 
 # Allow dynamic zip downloads.
 #
 # SINCE 0.5.0   
-web.allowZipDownloads = true
+web.allowZipDownloads = false
 
 # If *web.allowZipDownloads=true* the following formats will be displayed for
 # download compressed archive links:
@@ -657,7 +657,7 @@
 #
 # SPACE-DELIMITED
 # SINCE 1.2.0
-web.compressedDownloads = zip gz bzip2
+web.compressedDownloads = gz
 
 # Allow optional Lucene integration. Lucene indexing is an opt-in feature.
 # A repository may specify branches to index with Lucene instead of using Git
@@ -666,7 +666,7 @@
 # scenario is on a resource-constrained federated Gitblit mirror.
 #
 # SINCE 0.9.0
-web.allowLuceneIndexing = false
+web.allowLuceneIndexing = true
 
 # Allows an authenticated user to create forks of a repository
 #
@@ -684,7 +684,7 @@
 # offer a 3-step (click, ctrl+c, enter) copy-to-clipboard alternative.
 #
 # SINCE 0.8.0
-web.allowFlashCopyToClipboard = true
+web.allowFlashCopyToClipboard = false
 
 # Default maximum number of commits that a repository may contribute to the
 # activity page, regardless of the selected duration.  This setting may be 
valuable
@@ -692,7 +692,7 @@
 # in Edit Repository. 0 disables this throttle.
 #
 # SINCE 1.2.0
-web.maxActivityCommits = 0
+web.maxActivityCommits = 5
 
 # Default number of entries to include in RSS Syndication links
 #
@@ -704,7 +704,7 @@
 # non-performant on some operating systems and/or filesystems. 
 #
 # SINCE 0.5.2
-web.showRepositorySizes = true
+web.showRepositorySizes = false
 
 # List of custom regex expressions that can be displayed in the Filters menu
 # of the Repositories and Activity pages.  Keep them very simple because you
@@ -886,6 +886,7 @@
 # SPACE-DELIMITED
 # SINCE 1.3.0
 web.activityDurationChoices = 1 3 7 14
+web.activityDurationMaximum = 7
 
 # The number of days of commits to cache in memory for the dashboard, activity,
 # and project pages.  A value of 0 will disable all caching and will parse 
commits
@@ -899,7 +900,7 @@
 #
 # SINCE 1.3.0
 # RESTART REQUIRED
-web.activityCacheDays = 7
+web.activityCacheDays = 1
 
 # Case-insensitive list of authors to exclude from metrics.  Useful for
 # eliminating bots.
@@ -912,7 +913,7 @@
 # Value must exceed 0 else default of 20 is used
 #
 # SINCE 0.5.0
-web.summaryCommitCount = 16
+web.summaryCommitCount = 5
 
 # The number of tags/branches to display on the summary page.
 # -1 = all tags/branches
@@ -920,19 +921,19 @@
 # N = N tags/branches
 #
 # SINCE 0.5.0
-web.summaryRefsCount = 5
+web.summaryRefsCount = 0
 
 # The number of items to show on a page before showing 

[MediaWiki-commits] [Gerrit] Disable WebView hardware acceleration - change (apps...wikipedia)

2015-11-01 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Disable WebView hardware acceleration
..

Disable WebView hardware acceleration

Enabling hardware acceleration is causing a variety of Exceptions across
API levels, mostly KitKat, v4.4.4, API 19. Since enabling acceleration
was originally intended to fix T109983 but didn't, this removes the
setting, restoring the default behavior of software rendering. An
alternative solution might be to catch any Throwable emitted when
enabling acceleration but this might put the object in a bad state:

  @Override
  public void setLayerType(int layerType, Paint paint) {
if (ApiUtil.hasLollipop()) {
  try {
super.setLayerType(layerType, paint);
  } catch (Throwable e) {
L.w(e);
  }
}
  }

Change-Id: Ib5f812ed847e7dcf1905a95133db42d4de2a448f
---
M app/src/main/res/layout/fragment_page.xml
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/app/src/main/res/layout/fragment_page.xml 
b/app/src/main/res/layout/fragment_page.xml
index f74fa34..88babab 100644
--- a/app/src/main/res/layout/fragment_page.xml
+++ b/app/src/main/res/layout/fragment_page.xml
@@ -26,8 +26,7 @@
 
+android:layout_height="match_parent" />
 
 https://gerrit.wikimedia.org/r/250366
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5f812ed847e7dcf1905a95133db42d4de2a448f
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

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


[MediaWiki-commits] [Gerrit] Make makeKeyInternal() limit more conservative - change (mediawiki/core)

2015-11-01 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Make makeKeyInternal() limit more conservative
..

Make makeKeyInternal() limit more conservative

This should avoid error log entries for long WAN cache keys

Change-Id: I401482d25dd5bf47052a3c6729c5f8bc9fd68770
---
M includes/libs/objectcache/MemcachedBagOStuff.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index ef6b3c7..162a531 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -103,8 +103,9 @@
public function makeKeyInternal( $keyspace, $args ) {
// Memcached keys have a maximum length of 255 characters. From 
that,
// subtract the number of characters we need for the keyspace 
and for
-   // the separator character needed for each argument.
-   $charsLeft = 255 - strlen( $keyspace ) - count( $args );
+   // the separator character needed for each argument. To handle 
some
+   // custom prefixes used by thing like WANObjectCache, limit to 
205.
+   $charsLeft = 205 - strlen( $keyspace ) - count( $args );
 
$args = array_map(
function ( $arg ) use ( &$charsLeft ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I401482d25dd5bf47052a3c6729c5f8bc9fd68770
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] Build: Update dev dependencies - change (mediawiki...ConfirmAccount)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Build: Update dev dependencies
..


Build: Update dev dependencies

grunt-banana-checker -> 0.4.0

grunt-jscs -> 2.2.0

grunt-jsonlint -> 1.0.5

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

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



diff --git a/package.json b/package.json
index 2717c89..b34053c 100644
--- a/package.json
+++ b/package.json
@@ -6,8 +6,8 @@
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
 "grunt-contrib-jshint": "0.11.3",
-"grunt-banana-checker": "0.2.2",
-"grunt-jscs": "2.1.0",
-"grunt-jsonlint": "1.0.4"
+"grunt-banana-checker": "0.4.0",
+"grunt-jscs": "2.2.0",
+"grunt-jsonlint": "1.0.5"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3842c0e4c58362b2ec7c16e4ce7172e7fa6c5f59
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/ConfirmAccount
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [ConfirmAccount] Remove optional and update ignored messages - change (translatewiki)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: [ConfirmAccount] Remove optional and update ignored messages
..


[ConfirmAccount] Remove optional and update ignored messages

Updated qqq.json messages at https://gerrit.wikimedia.org/r/#/c/250225/

Change-Id: I0044aa5fc48594c2caeb5095a861bcca1d3e1395
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 0af13fc..3477e47 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -638,8 +638,8 @@
 Confirm Account - Request Account
 file = ConfirmAccount/i18n/requestaccount/%CODE%.json
 id = ext-confirmaccount-requestaccount
-optional = requestaccount-info, requestaccount-footer
-ignored = requestaccount-areas
+optional = requestaccount-info
+ignored = requestaccount-footer, requestaccount-areas
 
 Confirm Account - User Credentials
 file = ConfirmAccount/i18n/usercredentials/%CODE%.json

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0044aa5fc48594c2caeb5095a861bcca1d3e1395
Gerrit-PatchSet: 3
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update qqq.json messages - change (mediawiki...ConfirmAccount)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update qqq.json messages
..


Update qqq.json messages

Chnage optional to no translate for one messages.

Change-Id: Ib5f76e2e46dd4b5031956eb143bc6b8e79eedfb2
---
M i18n/requestaccount/qqq.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/requestaccount/qqq.json b/i18n/requestaccount/qqq.json
index 0895eba..6448383 100644
--- a/i18n/requestaccount/qqq.json
+++ b/i18n/requestaccount/qqq.json
@@ -16,7 +16,7 @@
"requestaccount": "{{doc-special|RequestAccount}}\n{{Identical|Request 
account}}",
"requestaccount-login": "{{Identical|Request account}}",
"requestaccount-text": "Used as intro text in 
[[Special:RequestAccount]].\n\nRefers to {{msg-mw|Requestaccount-page}}.",
-   "requestaccount-footer": "{{optional}}",
+   "requestaccount-footer": "{{notranslate}}",
"requestaccount-page": "Used as link target in the following 
messages:\n* {{msg-mw|Requestaccount-text}}\n* {{msg-mw|Requestaccount-tos}}",
"requestaccount-dup": "Used as notice to users that are logged in.",
"requestaccount-leg-user": "Used as fieldset label in the 
form.\n{{Identical|User account}}",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5f76e2e46dd4b5031956eb143bc6b8e79eedfb2
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/ConfirmAccount
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Raimond Spekking 
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] Add support for PostgreSQL backend - change (mediawiki/vagrant)

2015-11-01 Thread Tim Landscheidt (Code Review)
Tim Landscheidt has uploaded a new change for review.

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

Change subject: Add support for PostgreSQL backend
..

Add support for PostgreSQL backend

This change adds support to set up a PostgreSQL backend by setting the
Vagrant configuration "db_type" to "postgres".  As HHVM does not
support PostgreSQL out of the box, the Zend Engine role is selected if
this backend is chosen.

Bug: T116604
Change-Id: I1a1f001d25e61c9816ba31619f8a08ec8cd0
---
M lib/mediawiki-vagrant/settings/definitions.rb
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/multiwiki.pp
M puppet/modules/mediawiki/manifests/wiki.pp
A puppet/modules/mediawiki/templates/wiki/check_installed_postgres.erb
M puppet/modules/php/manifests/init.pp
A puppet/modules/postgresql/manifests/init.pp
A puppet/modules/postgresql/manifests/packages.pp
M puppet/modules/role/manifests/mediawiki.pp
M spec/mediawiki_vagrant/settings/definitions_spec.rb
10 files changed, 118 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/61/250361/1

diff --git a/lib/mediawiki-vagrant/settings/definitions.rb 
b/lib/mediawiki-vagrant/settings/definitions.rb
index 9ed2f31..f2c3bbd 100644
--- a/lib/mediawiki-vagrant/settings/definitions.rb
+++ b/lib/mediawiki-vagrant/settings/definitions.rb
@@ -67,8 +67,8 @@
 
 setting :db_type,
   description: 'Database type to use',
-  help: "Enter 'mysql' or 'sqlite'. You cannot change this for an already 
provisioned VM.",
+  help: "Enter 'mysql', 'postgres' or 'sqlite'. You cannot change this for 
an already provisioned VM.",
   default: 'mysql',
-  coercion: ->(_setting, new) { %w(mysql sqlite).include?(new) ? new : 
_setting.default }
+  coercion: ->(_setting, new) { %w(mysql postgres sqlite).include?(new) ? 
new : _setting.default }
   end
 end
diff --git a/puppet/modules/mediawiki/manifests/init.pp 
b/puppet/modules/mediawiki/manifests/init.pp
index 8a57e7e..4aa5875 100644
--- a/puppet/modules/mediawiki/manifests/init.pp
+++ b/puppet/modules/mediawiki/manifests/init.pp
@@ -15,7 +15,7 @@
 #   Initial password for admin account (example: 'secret123').
 #
 # [*db_type*]
-#   Type of database backend ('mysql' or 'sqlite').
+#   Type of database backend ('mysql', 'postgres' or 'sqlite').
 #
 # [*db_name*]
 #   Logical database name (example: 'devwiki').
@@ -140,9 +140,17 @@
 ],
 }
 
-if $db_type == 'mysql' {
-Exec['set_mysql_password'] -> Mediawiki::Wiki[$wiki_name]
+# lint:ignore:case_without_default
+case $db_type {
+'mysql': {
+Exec['set_mysql_password'] -> Mediawiki::Wiki[$wiki_name]
+}
+
+'postgres': {
+Exec['create_postgresql_user'] -> Mediawiki::Wiki[$wiki_name]
+}
 }
+# lint:endignore
 
 env::var { 'MW_INSTALL_PATH':
 value => $dir,
diff --git a/puppet/modules/mediawiki/manifests/multiwiki.pp 
b/puppet/modules/mediawiki/manifests/multiwiki.pp
index 7ec886f..e454229 100644
--- a/puppet/modules/mediawiki/manifests/multiwiki.pp
+++ b/puppet/modules/mediawiki/manifests/multiwiki.pp
@@ -197,6 +197,18 @@
 }
 }
 
+'postgres': {
+require_package('postgresql-client-common')
+
+file { '/usr/local/bin/sql':
+ensure  => file,
+owner   => 'root',
+group   => 'root',
+mode=> '0755',
+content => "#!/bin/sh\npsql -U root -h localhost 
${mediawiki::db_name}\n",
+}
+}
+
 'sqlite': {
 require_package('sqlite3')
 
diff --git a/puppet/modules/mediawiki/manifests/wiki.pp 
b/puppet/modules/mediawiki/manifests/wiki.pp
index 850c817..0726dd2 100644
--- a/puppet/modules/mediawiki/manifests/wiki.pp
+++ b/puppet/modules/mediawiki/manifests/wiki.pp
@@ -26,7 +26,7 @@
 #   The name of your site (example: 'devwiki').
 #
 # [*db_type*]
-#   Type of database backend ('mysql' or 'sqlite').
+#   Type of database backend ('mysql', 'postgres' or 'sqlite').
 #
 # [*db_name*]
 #   Logical database name (example: 'devwiki').
@@ -122,9 +122,17 @@
 require => File[$settings_root],
 }
 
-if $db_type == 'mysql' {
-Class['mysql'] -> Exec["${db_name}_setup"]
+# lint:ignore:case_without_default
+case $db_type {
+'mysql': {
+Class['mysql'] -> Exec["${db_name}_setup"]
+}
+
+'postgres': {
+Class['postgresql'] -> Exec["${db_name}_setup"]
+}
 }
+# lint:endignore
 
 exec { "${db_name}_include_extra_settings":
 command => '/bin/echo "include_once \'/vagrant/LocalSettings.php\';" 
>> LocalSettings.php',
diff --git 
a/puppet/modules/mediawiki/templates/wiki/check_installed_postgres.erb 
b/puppet/modules/mediawiki/templates/wiki/check_installed_postgres.erb
new file mode 100644
index 

[MediaWiki-commits] [Gerrit] Add composer-test to mediawiki/skins/Example - change (integration/config)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add composer-test to mediawiki/skins/Example
..


Add composer-test to mediawiki/skins/Example

Change-Id: Id65d95b0c855d7b5859efb40fb61429bb30481ba
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 9b081d5..4c16e2d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2362,6 +2362,7 @@
 template:
  - name: mw-checks-test
  - name: npm
+ - name: composer-test
 check:
  - jsonlint
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id65d95b0c855d7b5859efb40fb61429bb30481ba
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] phpcs: Fix some "Assignment expression not allowed" - change (mediawiki/core)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: phpcs: Fix some "Assignment expression not allowed"
..


phpcs: Fix some "Assignment expression not allowed"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I673f71fd0dfc8d6ba1ce6c3d5da21787ff95cb32
---
M includes/Sanitizer.php
M includes/resourceloader/ResourceLoader.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialDeletedContributions.php
M includes/title/MediaWikiTitleCodec.php
M includes/utils/MWCryptRand.php
M maintenance/importDump.php
7 files changed, 24 insertions(+), 11 deletions(-)

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



diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index f88dd05..a856f1e 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -476,7 +476,8 @@
}
 
$badtag = false;
-   if ( isset( $htmlelements[$t = strtolower( $t 
)] ) ) {
+   $t = strtolower( $t );
+   if ( isset( $htmlelements[$t] ) ) {
# Check our stack
if ( $slash && isset( 
$htmlsingleonly[$t] ) ) {
$badtag = true;
@@ -596,7 +597,8 @@
list( /* $qbar */, $slash, $t, $params, 
$brace, $rest ) = $regs;
 
$badtag = false;
-   if ( isset( $htmlelements[$t = 
strtolower( $t )] ) ) {
+   $t = strtolower( $t );
+   if ( isset( $htmlelements[$t] ) ) {
if ( is_callable( 
$processCallback ) ) {
call_user_func_array( 
$processCallback, array( &$params, $args ) );
}
diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 5208c23..f7ba4d2 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -708,8 +708,11 @@
 
// Capture any PHP warnings from the output buffer and append 
them to the
// error list if we're in debug mode.
-   if ( $context->getDebug() && strlen( $warnings = 
ob_get_contents() ) ) {
-   $this->errors[] = $warnings;
+   if ( $context->getDebug() ) {
+   $warnings = ob_get_contents();
+   if ( strlen( $warnings ) ) {
+   $this->errors[] = $warnings;
+   }
}
 
// Save response to file cache unless there are errors
@@ -877,8 +880,11 @@
$response = $fileCache->fetchText();
// Capture any PHP warnings from the output buffer and 
append them to the
// response in a comment if we're in debug mode.
-   if ( $context->getDebug() && strlen( $warnings = 
ob_get_contents() ) ) {
-   $response = self::makeComment( $warnings ) . 
$response;
+   if ( $context->getDebug() ) {
+   $warnings = ob_get_contents();
+   if ( strlen( $warnings ) ) {
+   $response = self::makeComment( 
$warnings ) . $response;
+   }
}
// Remove the output buffer and output the response
ob_end_clean();
diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 9672580..f0a5aa6 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -107,7 +107,8 @@
)->inContentLanguage() );
}
 
-   if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null 
&& $ns !== '' ) {
+   $ns = $request->getVal( 'namespace', null );
+   if ( $ns !== null && $ns !== '' ) {
$this->opts['namespace'] = intval( $ns );
} else {
$this->opts['namespace'] = '';
diff --git a/includes/specials/SpecialDeletedContributions.php 
b/includes/specials/SpecialDeletedContributions.php
index 44352a7..6f8e786 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -413,7 +413,8 @@
$target = $userObj->getName();
$out->addSubtitle( 

[MediaWiki-commits] [Gerrit] Fix comments in template - change (mediawiki...Example)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix comments in template
..


Fix comments in template

Change-Id: I9f359362a461d87f2d874f989e0da3bf35622084
---
M ExampleTemplate.php
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/ExampleTemplate.php b/ExampleTemplate.php
index 6c053cd..b75dcec 100644
--- a/ExampleTemplate.php
+++ b/ExampleTemplate.php
@@ -177,7 +177,7 @@
}
 
/**
-* Outputs the logo and site title
+* Outputs the search form
 */
private function outputSearch() {
?>
@@ -216,6 +216,10 @@
$this->outputPortlet( $box, true );
}
}
+
+   /**
+* Outputs page-related tools/links
+*/
private function outputPageLinks() {
$this->outputPortlet( array(
'id' => 'p-namespaces',
@@ -238,6 +242,10 @@
'content' => 
$this->data['content_navigation']['actions'],
) );
}
+
+   /**
+* Outputs user tools menu
+*/
private function outputUserLinks() {
$this->outputPortlet( array(
'id' => 'p-personal',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9f359362a461d87f2d874f989e0da3bf35622084
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Isarra 
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] Add sitenotice area to the skin - change (mediawiki...Bouquet)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add sitenotice area to the skin
..


Add sitenotice area to the skin

Change-Id: Ib4387dd2ceae723c2f3aa66ab32e60c144696f11
---
M Bouquet.skin.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/Bouquet.skin.php b/Bouquet.skin.php
index c2a0a2a..ad16089 100644
--- a/Bouquet.skin.php
+++ b/Bouquet.skin.php
@@ -170,6 +170,7 @@



+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>

html( 'title' ) ?>
data['undelete'] ) { ?>html( 
'undelete' ) ?>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4387dd2ceae723c2f3aa66ab32e60c144696f11
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Bouquet
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add sitenotice area to the skin - change (mediawiki...DuskToDawn)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add sitenotice area to the skin
..


Add sitenotice area to the skin

Also tweaked one padding rule to make it a bit less stupid

Change-Id: I51763c20599559acf84932cff90ccc6dfc19f0e8
---
M DuskToDawn.skin.php
M resources/style.css
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/DuskToDawn.skin.php b/DuskToDawn.skin.php
index 7a892d5..4f84e15 100644
--- a/DuskToDawn.skin.php
+++ b/DuskToDawn.skin.php
@@ -126,6 +126,7 @@



+   data['sitenotice'] ) { ?>html( 
'sitenotice' ) ?>



diff --git a/resources/style.css b/resources/style.css
index ed9a8c4..df627af 100644
--- a/resources/style.css
+++ b/resources/style.css
@@ -563,7 +563,8 @@
letter-spacing: 1px;
line-height: 1.0em;
margin: 0 0 2px 0;
-   padding: 55px 0 0 0;
+   /* ashley: changed on 1 November 2015 for site notice/ads/general 
prettiness */
+   padding: 20px 0 0 0;
text-transform: uppercase;
 }
 .entry-meta {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51763c20599559acf84932cff90ccc6dfc19f0e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/DuskToDawn
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix postition warnings - change (mediawiki...Timeless)

2015-11-01 Thread Isarra (Code Review)
Isarra has submitted this change and it was merged.

Change subject: Fix postition warnings
..


Fix postition warnings

Change-Id: Id89d6fd006a7647940a3da4ffb5e30f335108d7b
---
M skin.json
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/skin.json b/skin.json
index 7c6718e..5534791 100644
--- a/skin.json
+++ b/skin.json
@@ -17,6 +17,7 @@
},
"ResourceModules": {
"skins.timeless": {
+   "position": "top",
"class": "ResourceLoaderSkinModule",
"styles": {
"resources/libraries/normalise.css": {
@@ -37,6 +38,7 @@
}
},
"skins.timeless.js": {
+   "position": "bottom",
"scripts": [
"resources/main.js"
]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id89d6fd006a7647940a3da4ffb5e30f335108d7b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] phpcs: Fix some "Assignment expression not allowed" - change (mediawiki/core)

2015-11-01 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: phpcs: Fix some "Assignment expression not allowed"
..

phpcs: Fix some "Assignment expression not allowed"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I673f71fd0dfc8d6ba1ce6c3d5da21787ff95cb32
---
M includes/Sanitizer.php
M includes/resourceloader/ResourceLoader.php
M includes/specials/SpecialContributions.php
M includes/specials/SpecialDeletedContributions.php
M includes/title/MediaWikiTitleCodec.php
M includes/utils/MWCryptRand.php
M maintenance/importDump.php
7 files changed, 24 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/250320/1

diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index f88dd05..a856f1e 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -476,7 +476,8 @@
}
 
$badtag = false;
-   if ( isset( $htmlelements[$t = strtolower( $t 
)] ) ) {
+   $t = strtolower( $t );
+   if ( isset( $htmlelements[$t] ) ) {
# Check our stack
if ( $slash && isset( 
$htmlsingleonly[$t] ) ) {
$badtag = true;
@@ -596,7 +597,8 @@
list( /* $qbar */, $slash, $t, $params, 
$brace, $rest ) = $regs;
 
$badtag = false;
-   if ( isset( $htmlelements[$t = 
strtolower( $t )] ) ) {
+   $t = strtolower( $t );
+   if ( isset( $htmlelements[$t] ) ) {
if ( is_callable( 
$processCallback ) ) {
call_user_func_array( 
$processCallback, array( &$params, $args ) );
}
diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 5208c23..f7ba4d2 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -708,8 +708,11 @@
 
// Capture any PHP warnings from the output buffer and append 
them to the
// error list if we're in debug mode.
-   if ( $context->getDebug() && strlen( $warnings = 
ob_get_contents() ) ) {
-   $this->errors[] = $warnings;
+   if ( $context->getDebug() ) {
+   $warnings = ob_get_contents();
+   if ( strlen( $warnings ) ) {
+   $this->errors[] = $warnings;
+   }
}
 
// Save response to file cache unless there are errors
@@ -877,8 +880,11 @@
$response = $fileCache->fetchText();
// Capture any PHP warnings from the output buffer and 
append them to the
// response in a comment if we're in debug mode.
-   if ( $context->getDebug() && strlen( $warnings = 
ob_get_contents() ) ) {
-   $response = self::makeComment( $warnings ) . 
$response;
+   if ( $context->getDebug() ) {
+   $warnings = ob_get_contents();
+   if ( strlen( $warnings ) ) {
+   $response = self::makeComment( 
$warnings ) . $response;
+   }
}
// Remove the output buffer and output the response
ob_end_clean();
diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index 9672580..640c043 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -107,7 +107,8 @@
)->inContentLanguage() );
}
 
-   if ( ( $ns = $request->getVal( 'namespace', null ) ) !== null 
&& $ns !== '' ) {
+   $ns = $request->getVal( 'namespace', null )
+   if ( $ns !== null && $ns !== '' ) {
$this->opts['namespace'] = intval( $ns );
} else {
$this->opts['namespace'] = '';
diff --git a/includes/specials/SpecialDeletedContributions.php 
b/includes/specials/SpecialDeletedContributions.php
index 44352a7..01d00ca 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -413,7 +413,8 @@
$target = 

[MediaWiki-commits] [Gerrit] Add composer-test to mediawiki/skins/Example - change (integration/config)

2015-11-01 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Add composer-test to mediawiki/skins/Example
..

Add composer-test to mediawiki/skins/Example

Change-Id: Id65d95b0c855d7b5859efb40fb61429bb30481ba
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/62/250362/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 9b081d5..4c16e2d 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -2362,6 +2362,7 @@
 template:
  - name: mw-checks-test
  - name: npm
+ - name: composer-test
 check:
  - jsonlint
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id65d95b0c855d7b5859efb40fb61429bb30481ba
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] mw.html: Document mw.html.elements optional parameters - change (mediawiki/core)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mw.html: Document mw.html.elements optional parameters
..


mw.html: Document mw.html.elements optional parameters

* Move tests to a separate test suite.
* Unit tests already covered these cases without second and third
  parameter so no extra tests.
* Update code to clearly make attribs optional.

Bug: T88962
Change-Id: I26bb4b0a907f48064f41236972e115ec1f7edf0c
---
M resources/src/mediawiki/mediawiki.js
M tests/qunit/QUnitTestResources.php
A tests/qunit/suites/resources/mediawiki/mediawiki.html.test.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
4 files changed, 125 insertions(+), 91 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.js 
b/resources/src/mediawiki/mediawiki.js
index 568bfd4..3ffe55f 100644
--- a/resources/src/mediawiki/mediawiki.js
+++ b/resources/src/mediawiki/mediawiki.js
@@ -2377,30 +2377,32 @@
 * Create an HTML element string, with safe 
escaping.
 *
 * @param {string} name The tag name.
-* @param {Object} attrs An object with members 
mapping element names to values
-* @param {Mixed} contents The contents of the 
element. May be either:
+* @param {Object} [attrs] An object with 
members mapping element names to values
+* @param 
{string|mw.html.Raw|mw.html.Cdata|null} [contents=null] The contents of the 
element.
 *
-*  - string: The string is escaped.
-*  - null or undefined: The short closing form 
is used, e.g. ``.
-*  - this.Raw: The value attribute is included 
without escaping.
-*  - this.Cdata: The value attribute is 
included, and an exception is
-*thrown if it contains an illegal ETAGO 
delimiter.
-*See 
.
+*  - string: Text to be escaped.
+*  - null: The element is treated as void with 
short closing form, e.g. ``.
+*  - this.Raw: The raw value is directly 
included.
+*  - this.Cdata: The raw value is directly 
included. An exception is
+*thrown if it contains any illegal ETAGO 
delimiter.
+*See 
.
 * @return {string} HTML
 */
element: function ( name, attrs, contents ) {
var v, attrName, s = '<' + name;
 
-   for ( attrName in attrs ) {
-   v = attrs[ attrName ];
-   // Convert name=true, to 
name=name
-   if ( v === true ) {
-   v = attrName;
-   // Skip name=false
-   } else if ( v === false ) {
-   continue;
+   if ( attrs ) {
+   for ( attrName in attrs ) {
+   v = attrs[ attrName ];
+   // Convert name=true, 
to name=name
+   if ( v === true ) {
+   v = attrName;
+   // Skip name=false
+   } else if ( v === false 
) {
+   continue;
+   }
+   s += ' ' + attrName + 
'="' + this.escape( String( v ) ) + '"';
}
-   s += ' ' + attrName + '="' + 
this.escape( String( v ) ) + '"';
}
if ( contents === undefined || contents 
=== null ) {
// Self close 

[MediaWiki-commits] [Gerrit] build: Updating development dependencies - change (IPSet)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Updating development dependencies
..


build: Updating development dependencies

* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

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

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



diff --git a/composer.json b/composer.json
index b167a54..856da1f 100644
--- a/composer.json
+++ b/composer.json
@@ -20,7 +20,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9",
"phpunit/phpunit": "4.6.*",
-   "mediawiki/mediawiki-codesniffer": "0.4.0"
+   "mediawiki/mediawiki-codesniffer": "0.5.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ba75290340585b65e1e85182e96524e03933faf
Gerrit-PatchSet: 1
Gerrit-Project: IPSet
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Merge remote-tracking branch 'origin/dev' - change (mediawiki...QuickSurveys)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Merge remote-tracking branch 'origin/dev'
..


Merge remote-tracking branch 'origin/dev'

Change-Id: I3c6cc120d2927ce469f74786f838e3453f92d645
---
M HISTORY
M extension.json
2 files changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/HISTORY b/HISTORY
index 09eee67..a8903aa 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,3 +1,8 @@
+==QuickSurveys 0.6.0==
+6621747 Send insecure surveys to client but do not allow rendering of them.
+1f2af9e Allow insecure external surveys
+7cd3fa3 Stack buttons in quick surveys vertically
+cb4 Add pageId and pageTitle to EventLogging schema
 ==QuickSurveys 0.5.0==
 37af747 Add tests for positioning of Quick Survey
 a72af0d Fix placement of quick survey
diff --git a/extension.json b/extension.json
index 16f97de..cd05491 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "QuickSurveys",
-   "version": "0.5.0",
+   "version": "0.6.0",
"author": [
"Bahodir Mansurov",
"Joaquin Hernandez",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c6cc120d2927ce469f74786f838e3453f92d645
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/QuickSurveys
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix position warnings - change (mediawiki...Example)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix position warnings
..


Fix position warnings

Change-Id: I494bb35277346311306c4e077e35ca610aa4db6f
---
M skin.json
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/skin.json b/skin.json
index b90c83f..1c1bc3a 100644
--- a/skin.json
+++ b/skin.json
@@ -17,6 +17,7 @@
},
"ResourceModules": {
"skins.example": {
+   "position": "top",
"styles": {
"resources/libraries/normalise.css": {
"media": "screen"
@@ -33,6 +34,7 @@
}
},
"skins.example.js": {
+   "position": "bottom",
"scripts": [
"resources/main.js"
]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I494bb35277346311306c4e077e35ca610aa4db6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Isarra 
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] Normalize header case for FileBackend operations - change (mediawiki/core)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Normalize header case for FileBackend operations
..


Normalize header case for FileBackend operations

Normalize all headers to lower case at the start of the
FileBackend operation methods. This makes it easy for
subclasses to check for certain headers, e.g. content-type.

Change-Id: Ia69976326d17a51bcaa61f2781aa669ae7bd9c28
---
M includes/filebackend/FileBackendStore.php
M tests/phpunit/includes/filebackend/FileBackendTest.php
2 files changed, 44 insertions(+), 8 deletions(-)

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



diff --git a/includes/filebackend/FileBackendStore.php 
b/includes/filebackend/FileBackendStore.php
index e5ce968..4ec81ec 100644
--- a/includes/filebackend/FileBackendStore.php
+++ b/includes/filebackend/FileBackendStore.php
@@ -1066,7 +1066,7 @@
$status = Status::newGood();
 
// Fix up custom header name/value pairs...
-   $ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), 
$ops );
+   $ops = array_map( array( $this, 'sanitizeOpHeaders' ), $ops );
 
// Build up a list of FileOps...
$performOps = $this->getOperationsInternal( $ops );
@@ -1133,7 +1133,7 @@
$status = Status::newGood();
 
// Fix up custom header name/value pairs...
-   $ops = array_map( array( $this, 'stripInvalidHeadersFromOp' ), 
$ops );
+   $ops = array_map( array( $this, 'sanitizeOpHeaders' ), $ops );
 
// Clear any file cache entries
$this->clearCache();
@@ -1230,7 +1230,9 @@
}
 
/**
-* Strip long HTTP headers from a file operation.
+* Normalize and filter HTTP headers from a file operation
+*
+* This normalizes and strips long HTTP headers from a file operation.
 * Most headers are just numbers, but some are allowed to be long.
 * This function is useful for cleaning up headers and avoiding backend
 * specific errors, especially in the middle of batch file operations.
@@ -1238,18 +1240,21 @@
 * @param array $op Same format as doOperation()
 * @return array
 */
-   protected function stripInvalidHeadersFromOp( array $op ) {
-   static $longs = array( 'Content-Disposition' );
+   protected function sanitizeOpHeaders( array $op ) {
+   static $longs = array( 'content-disposition' );
+
if ( isset( $op['headers'] ) ) { // op sets HTTP headers
+   $newHeaders = array();
foreach ( $op['headers'] as $name => $value ) {
+   $name = strtolower( $name );
$maxHVLen = in_array( $name, $longs ) ? INF : 
255;
if ( strlen( $name ) > 255 || strlen( $value ) 
> $maxHVLen ) {
trigger_error( "Header '$name: $value' 
is too long." );
-   unset( $op['headers'][$name] );
-   } elseif ( !strlen( $value ) ) {
-   $op['headers'][$name] = ''; // 
null/false => ""
+   } else {
+   $newHeaders[$name] = strlen( $value ) ? 
$value : ''; // null/false => ""
}
}
+   $op['headers'] = $newHeaders;
}
 
return $op;
diff --git a/tests/phpunit/includes/filebackend/FileBackendTest.php 
b/tests/phpunit/includes/filebackend/FileBackendTest.php
index 0d15b75..e7d092f 100644
--- a/tests/phpunit/includes/filebackend/FileBackendTest.php
+++ b/tests/phpunit/includes/filebackend/FileBackendTest.php
@@ -2495,6 +2495,37 @@
);
}
 
+   public function testSanitizeOpHeaders() {
+   $be = TestingAccessWrapper::newFromObject( new 
MemoryFileBackend( array(
+   'name' => 'localtesting',
+   'wikiId' => wfWikiID()
+   ) ) );
+
+   $name = wfRandomString( 300 );
+
+   $input = array(
+   'headers' => array(
+   'content-Disposition' => 
FileBackend::makeContentDisposition( 'inline', $name ),
+   'Content-dUration' => 25.6,
+   'X-LONG-VALUE' => str_pad( '0', 300 ),
+   'CONTENT-LENGTH' => 855055,
+   )
+   );
+   $expected = array(
+   'headers' => array(
+   'content-disposition' => 
FileBackend::makeContentDisposition( 'inline', $name ),
+   'content-duration' => 25.6,
+  

[MediaWiki-commits] [Gerrit] Add "class": "ResourceLoaderSkinModule" with no explanation ... - change (mediawiki...Example)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add "class": "ResourceLoaderSkinModule" with no explanation 
whatsoever.
..


Add "class": "ResourceLoaderSkinModule" with no explanation whatsoever.

Adds support for MonoBook/Vector style logos using wgLogo and wgLogoHD
(for HiDPI support), and possibly other things. It is also included in
mediawiki.skinning.interface, and thus probably redundant for most uses,
but some skins will need it and there is no documentation anywhere and we
might as well have it so stuff magically works.

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

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



diff --git a/skin.json b/skin.json
index 1c1bc3a..930d400 100644
--- a/skin.json
+++ b/skin.json
@@ -17,6 +17,7 @@
},
"ResourceModules": {
"skins.example": {
+   "class": "ResourceLoaderSkinModule",
"position": "top",
"styles": {
"resources/libraries/normalise.css": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7149d16edc4b5d0a38269569ab1658c4d79c7eda
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Isarra 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Isarra 
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] phpcs: Fix some "Single space expected before elseif" - change (mediawiki/core)

2015-11-01 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: phpcs: Fix some "Single space expected before elseif"
..

phpcs: Fix some "Single space expected before elseif"

Found by new version of mediawiki/codesniffer
https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs/1939/consoleFull

Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d
---
M includes/search/SearchOracle.php
M includes/search/SearchPostgres.php
M maintenance/backupTextPass.inc
3 files changed, 10 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/250321/1

diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php
index 5821148..6dad342 100644
--- a/includes/search/SearchOracle.php
+++ b/includes/search/SearchOracle.php
@@ -191,8 +191,7 @@
foreach ( $temp_terms as $t ) {
$searchon .= ( $terms[1] == '-' 
? ' ~' : ' & ' ) . $this->escapeTerm( $t );
}
-   }
-   else {
+   } else {
$searchon .= ( $terms[1] == '-' ? ' ~' 
: ' & ' ) . $this->escapeTerm( $terms[2] );
}
if ( !empty( $terms[3] ) ) {
diff --git a/includes/search/SearchPostgres.php 
b/includes/search/SearchPostgres.php
index 60c4249..649ef4f 100644
--- a/includes/search/SearchPostgres.php
+++ b/includes/search/SearchPostgres.php
@@ -84,14 +84,11 @@
}
if ( strtolower( $terms[2] ) === 'and' ) {
$searchstring .= ' & ';
-   }
-   elseif ( strtolower( $terms[2] ) === 'or' || 
$terms[2] === '|' ) {
+   } elseif ( strtolower( $terms[2] ) === 'or' || 
$terms[2] === '|' ) {
$searchstring .= ' | ';
-   }
-   elseif ( strtolower( $terms[2] ) === 'not' ) {
+   } elseif ( strtolower( $terms[2] ) === 'not' ) {
$searchstring .= ' & !';
-   }
-   else {
+   } else {
$searchstring .= " & $terms[2]";
}
}
@@ -147,8 +144,7 @@
$query = "SELECT page_id, page_namespace, page_title, 0 
AS score " .
"FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
"AND r.rev_text_id = c.old_id AND 1=0";
-   }
-   else {
+   } else {
$m = array();
if ( preg_match_all( "/'([^']+)'/", $top, $m, 
PREG_SET_ORDER ) ) {
foreach ( $m as $terms ) {
@@ -157,9 +153,9 @@
}
 
$query = "SELECT page_id, page_namespace, page_title, " 
.
-   "ts_rank($fulltext, to_tsquery($searchstring), 5) AS 
score " .
-   "FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
-   "AND r.rev_text_id = c.old_id AND $fulltext @@ 
to_tsquery($searchstring)";
+   "ts_rank($fulltext, to_tsquery($searchstring), 
5) AS score " .
+   "FROM page p, revision r, pagecontent c WHERE 
p.page_latest = r.rev_id " .
+   "AND r.rev_text_id = c.old_id AND $fulltext @@ 
to_tsquery($searchstring)";
}
 
# # Namespaces - defaults to 0
diff --git a/maintenance/backupTextPass.inc b/maintenance/backupTextPass.inc
index 0ed584c..0562333 100644
--- a/maintenance/backupTextPass.inc
+++ b/maintenance/backupTextPass.inc
@@ -899,11 +899,9 @@
} elseif ( $this->state == "page" ) {
$this->thisPage .= $data;
}
-   }
-   elseif ( $this->lastName == "model" ) {
+   } elseif ( $this->lastName == "model" ) {
$this->thisRevModel .= $data;
-   }
-   elseif ( $this->lastName == "format" ) {
+   } elseif ( $this->lastName == "format" ) {
$this->thisRevFormat .= $data;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I465bf0d1c89603b3dfc9867be3c0b1190829312d

[MediaWiki-commits] [Gerrit] build: Run jshint through npm, set up phplint through composer - change (mediawiki...Example)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: build: Run jshint through npm, set up phplint through composer
..


build: Run jshint through npm, set up phplint through composer

Change-Id: Idbb3bfa19c506f76d954b23dac81e91425d18a63
---
M .gitignore
A .jshintignore
M Gruntfile.js
A composer.json
M package.json
5 files changed, 25 insertions(+), 4 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index c2658d7..8ec4b92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,3 @@
 node_modules/
+vendor/
+composer.lock
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..c2658d7
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1 @@
+node_modules/
diff --git a/Gruntfile.js b/Gruntfile.js
index 9c56558..35ddbef 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,9 +1,16 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
 
grunt.initConfig( {
+   jshint: {
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
banana: {
all: 'i18n/'
},
@@ -15,6 +22,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..f2883f7
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}
diff --git a/package.json b/package.json
index 76e8a82..c3d4d83 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,8 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
-"grunt-banana-checker": "0.2.2",
-"grunt-jsonlint": "1.0.4"
+"grunt-contrib-jshint": "0.11.3",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.5"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbb3bfa19c506f76d954b23dac81e91425d18a63
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/skins/Example
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: Jforrester 
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] Fixed arguments syntax in hooks.txt - change (mediawiki/core)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed arguments syntax in hooks.txt
..


Fixed arguments syntax in hooks.txt

BaseTemplateAfterPortlet: Add colon to match the other arguments
FileUpload: Adjust spacing to match the other arguments

Change-Id: Iae0285b1a39cf851735cb22e95c839813997
---
M docs/hooks.txt
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 8d36603..427f35e 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -768,7 +768,7 @@
 
 'BaseTemplateAfterPortlet': After output of portlets, allow injecting
 custom HTML after the section. Any uses of the hook need to handle escaping.
-$template BaseTemplate
+$template: BaseTemplate
 $portlet: string portlet name
 &$html: string
 
@@ -1363,10 +1363,10 @@
 $reason: reason
 
 'FileUpload': When a file upload occurs.
-$file : Image object representing the file that was uploaded
-$reupload : Boolean indicating if there was a previously another image there or
+$file: Image object representing the file that was uploaded
+$reupload: Boolean indicating if there was a previously another image there or
   not (since 1.17)
-$hasDescription : Boolean indicating that there was already a description page
+$hasDescription: Boolean indicating that there was already a description page
   and a new one from the comment wasn't created (since 1.17)
 
 'FormatAutocomments': When an autocomment is formatted by the Linker.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae0285b1a39cf851735cb22e95c839813997
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: Waldir 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3791e56..6096916 - change (mediawiki/extensions)

2015-11-01 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 3791e56..6096916
..


Syncronize VisualEditor: 3791e56..6096916

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

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



diff --git a/VisualEditor b/VisualEditor
index 3791e56..6096916 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3791e5658a2c25325d80ca019356cd6361aa3e50
+Subproject commit 6096916701db2474465eee9dee4b3348031e6264

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 3791e56..6096916 - change (mediawiki/extensions)

2015-11-01 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 3791e56..6096916
..

Syncronize VisualEditor: 3791e56..6096916

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


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

diff --git a/VisualEditor b/VisualEditor
index 3791e56..6096916 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 3791e5658a2c25325d80ca019356cd6361aa3e50
+Subproject commit 6096916701db2474465eee9dee4b3348031e6264

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

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

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


[MediaWiki-commits] [Gerrit] ext.urlShortener.toolbar: Remove dependency on OOjs UI - change (mediawiki...UrlShortener)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: ext.urlShortener.toolbar: Remove dependency on OOjs UI
..


ext.urlShortener.toolbar: Remove dependency on OOjs UI

Bug: T112680
Change-Id: I013bfc0fd8f69c154e9e42fd41139dad92ca18d5
---
M extension.json
M i18n/en.json
M i18n/qqq.json
D modules/ext.urlShortener.popup.less
M modules/ext.urlShortener.toolbar.js
A modules/ext.urlShortener.toolbar.less
6 files changed, 26 insertions(+), 62 deletions(-)

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



diff --git a/extension.json b/extension.json
index fa28fd1..78fef83 100644
--- a/extension.json
+++ b/extension.json
@@ -72,13 +72,11 @@
"modules/ext.urlShortener.toolbar.js"
],
"styles": [
-   "modules/ext.urlShortener.popup.less"
-   ],
-   "dependencies": [
-   "oojs-ui"
+   "modules/ext.urlShortener.toolbar.less"
],
"messages": [
"urlshortener-url-input-submitting",
+   "urlshortener-failed-try-again",
"urlshortener-shortened-url-label",
"urlshortener-ratelimit"
]
diff --git a/i18n/en.json b/i18n/en.json
index 84c7cda..240167d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,5 +19,6 @@
"urlshortener-ratelimit": "Please wait some time before shortening more 
URLs.",
"urlshortener-toolbox": "Get shortened URL",
"urlshortener-error-badports": "URLs that contain ports are not allowed 
to be shortened",
-   "urlshortener-error-nouserpass": "URLs that contain a username or 
password are not allowed to be shortened"
+   "urlshortener-error-nouserpass": "URLs that contain a username or 
password are not allowed to be shortened",
+   "urlshortener-failed-try-again": "Failed. Try again?"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 39edd3e..9af1f88 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -20,5 +20,6 @@
"urlshortener-ratelimit": "Error message shown when a user shortens too 
many urls in a short period of time",
"urlshortener-toolbox": "Text of link in toolbox to get shortened URL",
"urlshortener-error-badports": "Error message shown when the URL cannot 
be shortened because it contains a port (e.g. http://example.org:90/path)",
-   "urlshortener-error-nouserpass": "Error message shown when the URL 
cannot be shortened because it contains a username or password (e.g. 
http://user:passw...@example.org/)"
+   "urlshortener-error-nouserpass": "Error message shown when the URL 
cannot be shortened because it contains a username or password (e.g. 
http://user:passw...@example.org/)",
+   "urlshortener-failed-try-again": "Generic failure message with option 
to try again"
 }
diff --git a/modules/ext.urlShortener.popup.less 
b/modules/ext.urlShortener.popup.less
deleted file mode 100644
index c674357..000
--- a/modules/ext.urlShortener.popup.less
+++ /dev/null
@@ -1,4 +0,0 @@
-.ext-urlshortener-popup {
-   left: 100px;
-   z-index: 3; // Monobook puts #content at 2
-}
\ No newline at end of file
diff --git a/modules/ext.urlShortener.toolbar.js 
b/modules/ext.urlShortener.toolbar.js
index 07d921b..42bac98 100644
--- a/modules/ext.urlShortener.toolbar.js
+++ b/modules/ext.urlShortener.toolbar.js
@@ -1,65 +1,30 @@
-( function ( mw, $, OO ) {
+( function ( mw, $ ) {
$( function () {
-   var popup,
-   popupLink = $( '#t-urlshortener' ),
-   POPUP_WIDTH = 300,
-   POPUP_HEIGHT = 50,
-   api = new mw.Api(),
-   progress = new OO.ui.ProgressBarWidget(),
-   fieldset = new OO.ui.FieldsetLayout();
+   var shortenUrlListItem = $( '#t-urlshortener' ),
+   api = new mw.Api();
 
-   fieldset.addItems( [
-   new OO.ui.FieldLayout( progress,
-   { label: mw.msg( 
'urlshortener-url-input-submitting' ), align: 'top' }
-   )
-   ] );
+   shortenUrlListItem.on( 'click', function () {
+   var link = $( this ).find( 'a' );
+   link.text( mw.msg( 'urlshortener-url-input-submitting' 
) );
 
-   /**
-* @param {OO.ui.Widget} widget
-*/
-   function showWidget( widget ) {
-   popup.setSize( POPUP_WIDTH, POPUP_HEIGHT + 50, true );
-   fieldset.clearItems();
-   fieldset.addItems( [ widget ] );
-   }
-
-  

[MediaWiki-commits] [Gerrit] Gallery: Use intrinsic width for gallery to center caption - change (mediawiki/core)

2015-11-01 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Gallery: Use intrinsic width for gallery to center caption
..

Gallery: Use intrinsic width for gallery to center caption

Currently the caption is always centered between the whole width of the browser.
When there are only a few images the caption is not on top of the images.
This change shrinks the gallery to its intrinsic width. The caption is now
centered on top of the images.

This patch does not support Internet Explorer.

Bug: T29540
Change-Id: I145b120183ef151cec98aa75f030d63a191bf9ac
---
M resources/src/mediawiki/page/gallery.css
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/250372/1

diff --git a/resources/src/mediawiki/page/gallery.css 
b/resources/src/mediawiki/page/gallery.css
index 3c80bbb..e834e28 100644
--- a/resources/src/mediawiki/page/gallery.css
+++ b/resources/src/mediawiki/page/gallery.css
@@ -17,6 +17,9 @@
margin: 2px;
padding: 2px;
display: block;
+   width: -moz-fit-content;
+   width: -webkit-fit-content;
+   width: fit-content;
 }
 
 li.gallerycaption {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I145b120183ef151cec98aa75f030d63a191bf9ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 

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


[MediaWiki-commits] [Gerrit] iridium system-wide gitconfig needs http.proxy - change (operations/puppet)

2015-11-01 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review.

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

Change subject: iridium system-wide gitconfig needs http.proxy
..

iridium system-wide gitconfig needs http.proxy

Phabricator needs to mirror some repos from github. Apparently
accessing the internet requires a proxy, so it needs to be specified
in the system-wide git configuration.

Change-Id: I9f7b950d8a0d697d72653630c7f23c8fc99f1832
---
D modules/phabricator/files/system.gitconfig
M modules/phabricator/manifests/vcs.pp
A modules/phabricator/templates/system.gitconfig.erb
3 files changed, 14 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/250370/1

diff --git a/modules/phabricator/files/system.gitconfig 
b/modules/phabricator/files/system.gitconfig
deleted file mode 100644
index a1bd79f..000
--- a/modules/phabricator/files/system.gitconfig
+++ /dev/null
@@ -1,3 +0,0 @@
-[remote "origin"]
-fetch = +refs/changes/*:refs/changes/*
-fetch = +refs/meta/*:refs/meta/*
diff --git a/modules/phabricator/manifests/vcs.pp 
b/modules/phabricator/manifests/vcs.pp
index f0bb4fd..986c6df 100644
--- a/modules/phabricator/manifests/vcs.pp
+++ b/modules/phabricator/manifests/vcs.pp
@@ -45,10 +45,14 @@
 require => Package['git'],
 }
 
+$http_proxy = "http://webproxy.${::site}.wmnet:8080;
+
 # Configure all git repositories we host
 file { '/etc/gitconfig':
-source  => 'puppet:///modules/phabricator/system.gitconfig',
+content => template('phabricator/system.gitconfig.erb'),
 require => Package['git'],
+owner   => 'root',
+group   => 'root',
 }
 
 file { $ssh_hook_path:
diff --git a/modules/phabricator/templates/system.gitconfig.erb 
b/modules/phabricator/templates/system.gitconfig.erb
new file mode 100644
index 000..1bc66b9
--- /dev/null
+++ b/modules/phabricator/templates/system.gitconfig.erb
@@ -0,0 +1,9 @@
+[remote "origin"]
+fetch = +refs/changes/*:refs/changes/*
+fetch = +refs/meta/*:refs/meta/*
+
+[http]
+proxy = <%= @http_proxy %>
+
+[https]
+proxy = <%= @http_proxy %>
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] Make makeKeyInternal() limit more conservative - change (mediawiki/core)

2015-11-01 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make makeKeyInternal() limit more conservative
..


Make makeKeyInternal() limit more conservative

This should avoid error log entries for long WAN cache keys

Change-Id: I401482d25dd5bf47052a3c6729c5f8bc9fd68770
---
M includes/libs/objectcache/MemcachedBagOStuff.php
M tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
2 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index ef6b3c7..162a531 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -103,8 +103,9 @@
public function makeKeyInternal( $keyspace, $args ) {
// Memcached keys have a maximum length of 255 characters. From 
that,
// subtract the number of characters we need for the keyspace 
and for
-   // the separator character needed for each argument.
-   $charsLeft = 255 - strlen( $keyspace ) - count( $args );
+   // the separator character needed for each argument. To handle 
some
+   // custom prefixes used by thing like WANObjectCache, limit to 
205.
+   $charsLeft = 205 - strlen( $keyspace ) - count( $args );
 
$args = array_map(
function ( $arg ) use ( &$charsLeft ) {
diff --git a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php 
b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
index 3e3bac3..904ddbb 100644
--- a/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
+++ b/tests/phpunit/includes/objectcache/MemcachedBagOStuffTest.php
@@ -42,7 +42,7 @@
);
 
$this->assertEquals(
-   'test:##5820ad1d105aa4dc698585c39df73e19',
+   'test:##dc89dcb43b28614da27660240af478b5',
$this->cache->makeKey( '핖핧핖핟', '핚핗', '함핖', '필픻ퟝ', 
'핖핒핔학',
'핒핣하핦핞핖핟핥', '핥학핚핤', '한핖핪', '함할핦핝핕', '핤핥핚핝핝', 
'핓핖', '핥할할', '핝할핟하' )
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I401482d25dd5bf47052a3c6729c5f8bc9fd68770
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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] Use $::mail_smarthost for SMTP_HOST - change (operations/puppet)

2015-11-01 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Use $::mail_smarthost for SMTP_HOST
..

Use $::mail_smarthost for SMTP_HOST

Hardcoding the setting into the module is ugly but it's available
as a puppet variable and I couldn't figure out a way to reconcile
that with a hiera-based approach since hiera cannot interpolate
array elements.

Bug: T116709
Change-Id: If4b5e28d1c9cb270aa4d1aa866ead84f39c71cfc
---
M hieradata/labs/sentry/common.yaml
M hieradata/role/common/sentry.yaml
M modules/sentry/manifests/init.pp
M modules/sentry/templates/sentry.conf.py.erb
4 files changed, 1 insertion(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/250373/1

diff --git a/hieradata/labs/sentry/common.yaml 
b/hieradata/labs/sentry/common.yaml
index c1bee0b..1476ddc 100644
--- a/hieradata/labs/sentry/common.yaml
+++ b/hieradata/labs/sentry/common.yaml
@@ -1,3 +1,2 @@
 sentry::server_name: "%{::sentry_server_name}"
-sentry::smtp_host: 'polonium.wikimedia.org'
 sentry::admin_email: 'gti...@wikimedia.org'
diff --git a/hieradata/role/common/sentry.yaml 
b/hieradata/role/common/sentry.yaml
index 26e59e3..c07e1ed 100644
--- a/hieradata/role/common/sentry.yaml
+++ b/hieradata/role/common/sentry.yaml
@@ -1,3 +1,2 @@
 sentry::server_name: 'sentry.wikimedia.org'
-sentry::smtp_host: 'polonium.wikimedia.org'
 sentry::admin_email: 'gti...@wikimedia.org'
diff --git a/modules/sentry/manifests/init.pp b/modules/sentry/manifests/init.pp
index 5f3b1e3..51ae189 100644
--- a/modules/sentry/manifests/init.pp
+++ b/modules/sentry/manifests/init.pp
@@ -11,15 +11,6 @@
 # [*server_name*]
 #   Domain name under which Sentry will be available.
 #
-# [*smtp_host*]
-#   SMTP server host name; used to send email alerts on new errors.
-#
-# [*smtp_user*]
-#   SMTP username.
-#
-# [*smtp_pass*]
-#   SMTP password.
-#
 # [*git_branch*]
 #   Which branch to check out.
 #
@@ -38,9 +29,6 @@
 $secret_key,
 $admin_pass,
 $admin_email = 'n...@wikimedia.org',
-$smtp_host   = '',
-$smtp_user   = '',
-$smtp_pass   = '',
 $git_branch  = 'master',
 ) {
 include ::nginx
diff --git a/modules/sentry/templates/sentry.conf.py.erb 
b/modules/sentry/templates/sentry.conf.py.erb
index e17d8ab..5baa9e4 100644
--- a/modules/sentry/templates/sentry.conf.py.erb
+++ b/modules/sentry/templates/sentry.conf.py.erb
@@ -92,9 +92,7 @@
 #
 
 EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
-EMAIL_HOST = '<%= @smtp_host %>'
-EMAIL_HOST_USER = '<%= @smtp_user %>'
-EMAIL_HOST_PASSWORD = '<%= @smtp_pass %>'
+EMAIL_HOST = '<%= @mail_smarthost[0] %>'
 SERVER_EMAIL = 'sentry@<%= @server_name %>'
 
 # see http://sentry.readthedocs.org/en/latest/beacon.html

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4b5e28d1c9cb270aa4d1aa866ead84f39c71cfc
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] gallery.js: Do not resize gallery caption - change (mediawiki/core)

2015-11-01 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: gallery.js: Do not resize gallery caption
..

gallery.js: Do not resize gallery caption

Resize only gallerybox which contains resized images.

Bug: T91075
Change-Id: Idcaf22fbaabaa26c8d06f5dd0194d4ed7c7b1a60
---
M resources/src/mediawiki/page/gallery.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/250371/1

diff --git a/resources/src/mediawiki/page/gallery.js 
b/resources/src/mediawiki/page/gallery.js
index dfccf21..79937e5 100644
--- a/resources/src/mediawiki/page/gallery.js
+++ b/resources/src/mediawiki/page/gallery.js
@@ -25,7 +25,7 @@
rows = [],
$gallery = $( this );
 
-   $gallery.children( 'li' ).each( function () {
+   $gallery.children( 'li.gallerybox' ).each( function () {
// Math.floor to be paranoid if things are off by 
0.001
var top = Math.floor( $( this ).position().top ),
$this = $( this );
@@ -205,7 +205,7 @@
}
 
function handleResizeStart() {
-   $galleries.children( 'li' ).each( function () {
+   $galleries.children( 'li.gallerybox' ).each( function () {
var imgWidth = $( this ).data( 'imgWidth' ),
imgHeight = $( this ).data( 'imgHeight' ),
width = $( this ).data( 'width' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idcaf22fbaabaa26c8d06f5dd0194d4ed7c7b1a60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Gerrit Patch Uploader 

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