[MediaWiki-commits] [Gerrit] ParserTests: Add a video file to parser test suite - change (mediawiki/core)

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

Change subject: ParserTests: Add a video file to parser test suite
..


ParserTests: Add a video file to parser test suite

Introduce an ogv video file to the parser file testsuite, so that we
can use it later in TimedMediaHandler parsertests.

Change-Id: I6a3b307ad9c82e9df0aeec025934d736eec8375f
---
M tests/parser/parserTest.inc
M tests/parser/parserTests.txt
A tests/phpunit/data/parser/320x240.ogv
M tests/phpunit/includes/parser/NewParserTest.php
4 files changed, 44 insertions(+), 1 deletion(-)

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



diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 6a6d447..cf65a0d 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -1099,6 +1099,19 @@
'fileExists' => true
), $this->db->timestamp( '20010115123500' ), $user );
 
+   $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Video.ogv' ) 
);
+   $image->recordUpload2( '', 'A pretty movie', 'Will it play', 
array(
+   'size' => 12345,
+   'width' => 320,
+   'height' => 240,
+   'bits' => 0,
+   'media_type' => MEDIATYPE_VIDEO,
+   'mime' => 'application/ogg',
+   'metadata' => serialize( array() ),
+   'sha1' => Wikimedia\base_convert( '', 16, 36, 31 ),
+   'fileExists' => true
+   ), $this->db->timestamp( '20010115123500' ), $user );
+
# A DjVu file
$image = wfLocalFile( Title::makeTitle( NS_FILE, 
'LoremIpsum.djvu' ) );
$image->recordUpload2( '', 'Upload a DjVu', 'A DjVu', array(
@@ -1212,6 +1225,8 @@
' version="1.1" width="240" height="180"/>' );
wfMkdirParents( $dir . '/5/5f', null, __METHOD__ );
copy( "$IP/tests/phpunit/data/parser/LoremIpsum.djvu", 
"$dir/5/5f/LoremIpsum.djvu" );
+   wfMkdirParents( $dir . '/0/00', null, __METHOD__ );
+   copy( "$IP/tests/phpunit/data/parser/320x240.ogv", 
"$dir/0/00/Video.ogv" );
 
return;
}
@@ -1253,6 +1268,14 @@
"$dir/f/ff/Foobar.svg",
"$dir/thumb/f/ff/Foobar.svg/*-Foobar.svg.png",

"$dir/math/f/a/5/fa50b8b616463173474302ca3e63586b.png",
+   "$dir/0/00/Video.ogv",
+   
"$dir/thumb/0/00/Video.ogv/120px--Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/180px--Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/240px--Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/320px--Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/270px--Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/320px-seek=2-Video.ogv.jpg",
+   
"$dir/thumb/0/00/Video.ogv/320px-seek=3.36667-Video.ogv.jpg",
)
);
 
@@ -1270,10 +1293,14 @@
"$dir/thumb/f/ff/Foobar.svg",
"$dir/thumb/f/ff/",
"$dir/thumb/f/",
+   "$dir/0/00/",
"$dir/0/09/",
"$dir/0/",
"$dir/5/5f",
"$dir/5",
+   "$dir/thumb/0/00/Video.ogv",
+   "$dir/thumb/0/00",
+   "$dir/thumb/0",
"$dir/thumb/5/5f/LoremIpsum.djvu",
"$dir/thumb/5/5f",
"$dir/thumb/5",
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index d0a3d08..cd2b769 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -9669,7 +9669,7 @@
 !! wikitext
 {{NUMBEROFFILES}}
 !! html
-5
+6
 
 !! end
 
diff --git a/tests/phpunit/data/parser/320x240.ogv 
b/tests/phpunit/data/parser/320x240.ogv
new file mode 100644
index 000..7903820
--- /dev/null
+++ b/tests/phpunit/data/parser/320x240.ogv
Binary files differ
diff --git a/tests/phpunit/includes/parser/NewParserTest.php 
b/tests/phpunit/includes/parser/NewParserTest.php
index 5c6c17d..256ad69 100644
--- a/tests/phpunit/includes/parser/NewParserTest.php
+++ b/tests/phpunit/includes/parser/NewParserTest.php
@@ -304,6 +304,22 @@
), $this->db->timestamp( '20010115123500' ), $user );
}
 
+   $image = wfLocalFile( Title::makeTitle( NS_FILE, 'Video.ogv' ) 
);
+   if ( !$this

[MediaWiki-commits] [Gerrit] Print which file we are running parsertests for - change (mediawiki/core)

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

Change subject: Print which file we are running parsertests for
..


Print which file we are running parsertests for

I spent half an hour searching which extension was causing a crash in
my parser tests. Printing the filename seems like a handy plan here...

Change-Id: I09558101be15e92eeb3841f8f4198c2bc01f3e9d
---
M tests/parser/parserTest.inc
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/parser/parserTest.inc b/tests/parser/parserTest.inc
index 6a6d447..320acfe 100644
--- a/tests/parser/parserTest.inc
+++ b/tests/parser/parserTest.inc
@@ -512,6 +512,7 @@
$ok = true;
 
foreach ( $filenames as $filename ) {
+   echo "Running parser tests from: $filename\n";
$tests = new TestFileIterator( $filename, $this 
);
$ok = $this->runTests( $tests ) && $ok;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I09558101be15e92eeb3841f8f4198c2bc01f3e9d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Jackmcbarn 
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] Remove reference to no longer existing class - change (mediawiki...WikibaseQualityConstraints)

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

Change subject: Remove reference to no longer existing class
..


Remove reference to no longer existing class

was removed in I52356dd

Change-Id: Ibfd44615b12e4ec987d18672578b7c65035b1824
---
M specials/SpecialConstraintReport.php
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/specials/SpecialConstraintReport.php 
b/specials/SpecialConstraintReport.php
index 7d43083..64cbd0c 100644
--- a/specials/SpecialConstraintReport.php
+++ b/specials/SpecialConstraintReport.php
@@ -318,8 +318,6 @@
}
 
/**
-* @see SpecialCheckResultPage::executeCheck
-*
 * @param Entity $entity
 *
 * @return CheckResult[]
@@ -329,8 +327,6 @@
}
 
/**
-* @see SpecialCheckResultPage::buildResultTable
-*
 * @param EntityId $entityId
 * @param array $results
 *
@@ -715,8 +711,6 @@
}
 
/**
-* @see SpecialCheckResultPage::getStatusMapping
-*
 * @return array
 */
private function getStatusMapping() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfd44615b12e4ec987d18672578b7c65035b1824
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Aude 
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 grunt-jsonlint and update grunt-jscs to 2.6.0 - change (mediawiki...WikibaseQuality)

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

Change subject: Add grunt-jsonlint and update grunt-jscs to 2.6.0
..


Add grunt-jsonlint and update grunt-jscs to 2.6.0

Change-Id: I5fb833f64790a01f3eca55d3425514140b0c7b2c
---
M Gruntfile.js
M package.json
2 files changed, 10 insertions(+), 2 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 398551c..cf1d515 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,6 +1,7 @@
 /* jshint node: true, strict: false */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.loadNpmTasks( 'grunt-jscs' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
 
@@ -19,9 +20,15 @@
requireCompleteMessageDocumentation: false
},
all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
}
} );
 
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 25a2cb9..94b48bc 100644
--- a/package.json
+++ b/package.json
@@ -15,6 +15,7 @@
 "grunt-banana-checker": "0.4.0",
 "grunt-cli": "0.1.13",
 "grunt-contrib-jshint": "0.11.3",
-"grunt-jscs": "2.1.0"
+"grunt-jscs": "2.6.0",
+"grunt-jsonlint": "1.0.7"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fb833f64790a01f3eca55d3425514140b0c7b2c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQuality
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Legoktm 
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] Optimize imports in SpecialConstraintReport.php - change (mediawiki...WikibaseQualityConstraints)

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

Change subject: Optimize imports in SpecialConstraintReport.php
..


Optimize imports in SpecialConstraintReport.php

Change-Id: Id84de6d834aad1499a78fcde3474471c80fb8952
---
M specials/SpecialConstraintReport.php
1 file changed, 22 insertions(+), 23 deletions(-)

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



diff --git a/specials/SpecialConstraintReport.php 
b/specials/SpecialConstraintReport.php
index 6495c54..7d43083 100644
--- a/specials/SpecialConstraintReport.php
+++ b/specials/SpecialConstraintReport.php
@@ -2,37 +2,36 @@
 
 namespace WikibaseQuality\ConstraintReport\Specials;
 
-use UnexpectedValueException;
-use InvalidArgumentException;
-use SpecialPage;
-use ValueFormatters\FormatterOptions;
-use ValueFormatters\ValueFormatter;
-use Wikibase\DataModel\Services\EntityId\EntityIdFormatter;
-use HTMLForm;
-use Wikibase\DataModel\Services\Lookup\EntityLookup;
-use Wikibase\Lib\OutputFormatValueFormatterFactory;
-use Wikibase\Lib\SnakFormatter;
 use DataValues;
 use DataValues\DataValue;
+use HTMLForm;
 use Html;
-use Wikibase\DataModel\Entity\Entity;
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\EntityIdParser;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
-use Wikibase\DataModel\Entity\EntityIdValue;
-use Wikibase\DataModel;
-use Wikibase\DataModel\Entity\ItemId;
-use Wikibase\DataModel\Entity\PropertyId;
-use Wikibase\Lib\Store\EntityTitleLookup;
-use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory;
-use Wikibase\Repo\EntityIdHtmlLinkFormatterFactory;
-use Wikibase\Repo\EntityIdLabelFormatterFactory;
-use Wikibase\Repo\WikibaseRepo;
+use InvalidArgumentException;
+use SpecialPage;
+use UnexpectedValueException;
+use ValueFormatters\FormatterOptions;
+use ValueFormatters\ValueFormatter;
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\DelegatingConstraintChecker;
 use WikibaseQuality\ConstraintReport\ConstraintReportFactory;
 use WikibaseQuality\Html\HtmlTableBuilder;
 use WikibaseQuality\Html\HtmlTableCellBuilder;
 use WikibaseQuality\Html\HtmlTableHeaderBuilder;
+use Wikibase\DataModel\Entity\Entity;
+use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\DataModel\Entity\EntityIdParser;
+use Wikibase\DataModel\Entity\EntityIdParsingException;
+use Wikibase\DataModel\Entity\EntityIdValue;
+use Wikibase\DataModel\Entity\ItemId;
+use Wikibase\DataModel\Entity\PropertyId;
+use Wikibase\DataModel\Services\EntityId\EntityIdFormatter;
+use Wikibase\DataModel\Services\Lookup\EntityLookup;
+use Wikibase\Lib\OutputFormatValueFormatterFactory;
+use Wikibase\Lib\SnakFormatter;
+use Wikibase\Lib\Store\EntityTitleLookup;
+use Wikibase\Lib\Store\LanguageFallbackLabelDescriptionLookupFactory;
+use Wikibase\Repo\EntityIdHtmlLinkFormatterFactory;
+use Wikibase\Repo\EntityIdLabelFormatterFactory;
+use Wikibase\Repo\WikibaseRepo;
 
 /**
  * Class SpecialConstraintReport

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id84de6d834aad1499a78fcde3474471c80fb8952
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Aude 
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] Fix last direct usage of UtfNormal in MW core - change (mediawiki/core)

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

Change subject: Fix last direct usage of UtfNormal in MW core
..


Fix last direct usage of UtfNormal in MW core

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

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



diff --git a/includes/Xml.php b/includes/Xml.php
index 11f14db..63301ac 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -91,7 +91,7 @@
public static function elementClean( $element, $attribs = array(), 
$contents = '' ) {
global $wgContLang;
if ( $attribs ) {
-   $attribs = array_map( array( 'UtfNormal', 'cleanUp' ), 
$attribs );
+   $attribs = array_map( array( 'UtfNormal\Validator', 
'cleanUp' ), $attribs );
}
if ( $contents ) {
$contents = $wgContLang->normalize( $contents );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82789ab5ba628d974c77f026f0276cec1e22ad05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] Removed duplicate alt & title attributes - change (mediawiki...Graph)

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

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

Change subject: Removed duplicate alt & title attributes
..

Removed duplicate alt & title attributes

Change-Id: I63062871777a8c22c9d52ddf75d2e78b0191cadd
---
M includes/Graph.body.php
1 file changed, 21 insertions(+), 19 deletions(-)


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

diff --git a/includes/Graph.body.php b/includes/Graph.body.php
index 0c06206..8e20329 100644
--- a/includes/Graph.body.php
+++ b/includes/Graph.body.php
@@ -202,34 +202,36 @@
$title = !$title ? '' : rawurlencode( 
$title->getPrefixedDBkey() );
$revid = rawurlencode( (string)$revid ) ?: '0';
$url = sprintf( $wgGraphImgServiceUrl, $server, $title, 
$revid, $hash );
-   $html = Html::rawElement( 'img', array(
-   'class' => 'mw-graph-img',
-   'src' => $url,
-   'alt' => $graphTitle,
-   'title' => $graphTitle,
-   ) );
+   $imgAttrs = array(
+   'class' => 'mw-graph-img',
+   'src' => $url,
+   );
+   if ( $graphTitle ) {
+   // only add alt tag if we have some descriptive 
text
+   $imgAttrs['alt'] = $graphTitle;
+   }
+   $html = Html::rawElement( 'img', $imgAttrs );
 
if ( $isInteractive ) {
// Allow image to interactive switchover
$parserOutput->setExtensionData( 
'graph_interact', true );
$attribs = self::buildDivAttributes( 
'interactable', $data, $hash );
 
+   // add the overlay title
+   if ( $graphTitle ) {
+   $hoverTitle = Html::element( 'div', 
array( 'class' => 'mw-graph-hover-title' ),
+   $graphTitle );
+   } else {
+   $hoverTitle = '';
+   }
+
// Add a "make interactive" button
-   $buttonIcon = Html::rawElement( 'i', array( 
'class' => 'icon-play' ), '►' );
+   $button = Html::rawElement( 'div', array( 
'class' => 'mw-graph-switch' ),
+   Html::rawElement( 'i', array( 'class' 
=> 'icon-play' ), '►' ) );
 
-   $button = Html::rawElement( 'div', array(
-   'class' => 'mw-graph-switch',
-   ), $buttonIcon );
-
-   $hoverTitle = Html::element( 'div', array( 
'class' => 'mw-graph-hover-title' ), $graphTitle );
-
-   $layoverContent = $hoverTitle . $button;
-
-   $layover = Html::rawElement( 'div', array(
+   $html .= Html::rawElement( 'div', array(
'class' => 'mw-graph-layover',
-   ), $layoverContent );
-
-   $html .= $layover;
+   ), $hoverTitle . $button );
} else {
$attribs = self::buildDivAttributes( '', $data 
);
}

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

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

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


[MediaWiki-commits] [Gerrit] Expose visitedwatchers to API through action=query&prop=info - change (mediawiki/core)

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

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

Change subject: Expose visitedwatchers to API through action=query&prop=info
..

Expose visitedwatchers to API through action=query&prop=info

Bug: T105392
Change-Id: I87059dd77dd0e280b02e9d9b638ba2725ff71762
---
M includes/api/ApiQueryInfo.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 78 insertions(+), 3 deletions(-)


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

diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php
index 6f1e2e5..bc6dded 100644
--- a/includes/api/ApiQueryInfo.php
+++ b/includes/api/ApiQueryInfo.php
@@ -33,7 +33,8 @@
 
private $fld_protection = false, $fld_talkid = false,
$fld_subjectid = false, $fld_url = false,
-   $fld_readable = false, $fld_watched = false, $fld_watchers = 
false,
+   $fld_readable = false, $fld_watched = false,
+   $fld_watchers = false, $fld_visitingwatchers = false,
$fld_notificationtimestamp = false,
$fld_preload = false, $fld_displaytitle = false;
 
@@ -42,8 +43,8 @@
private $pageRestrictions, $pageIsRedir, $pageIsNew, $pageTouched,
$pageLatest, $pageLength;
 
-   private $protections, $restrictionTypes, $watched, $watchers, 
$notificationtimestamps,
-   $talkids, $subjectids, $displaytitles;
+   private $protections, $restrictionTypes, $watched, $watchers, 
$visitingwatchers,
+   $notificationtimestamps, $talkids, $subjectids, $displaytitles;
private $showZeroWatchers = false;
 
private $tokenFunctions;
@@ -292,6 +293,7 @@
$this->fld_protection = isset( $prop['protection'] );
$this->fld_watched = isset( $prop['watched'] );
$this->fld_watchers = isset( $prop['watchers'] );
+   $this->fld_visitingwatchers = isset( 
$prop['visitingwatchers'] );
$this->fld_notificationtimestamp = isset( 
$prop['notificationtimestamp'] );
$this->fld_talkid = isset( $prop['talkid'] );
$this->fld_subjectid = isset( $prop['subjectid'] );
@@ -346,6 +348,10 @@
 
if ( $this->fld_watchers ) {
$this->getWatcherInfo();
+   }
+
+   if ( $this->fld_visitingwatchers ) {
+   $this->getVisitingWatcherInfo();
}
 
// Run the talkid/subjectid query if requested
@@ -444,6 +450,14 @@
$pageInfo['watchers'] = 
$this->watchers[$ns][$dbkey];
} elseif ( $this->showZeroWatchers ) {
$pageInfo['watchers'] = 0;
+   }
+   }
+
+   if ( $this->fld_visitingwatchers ) {
+   if ( isset( $this->visitingwatchers[$ns][$dbkey] ) ) {
+   $pageInfo['visitingwatchers'] = 
$this->visitingwatchers[$ns][$dbkey];
+   } elseif ( $this->showZeroWatchers ) {
+   $pageInfo['visitingwatchers'] = 0;
}
}
 
@@ -802,6 +816,64 @@
}
}
 
+   /**
+* Get the count of watchers who have visited recent edits and put it in
+* $this->visitingwatchers
+*
+* Based on InfoAction::pageCounts
+*/
+   private function getVisitingWatcherInfo() {
+   $visitingWatchers = array();
+   $config = $this->getConfig();
+   $user = $this->getUser();
+
+   $canUnwatchedpages = $user->isAllowed( 'unwatchedpages' );
+   $unwatchedPageThreshold = $this->getConfig()->get( 
'UnwatchedPageThreshold' );
+   if ( !$canUnwatchedpages && !is_int( $unwatchedPageThreshold ) 
) {
+   return;
+   }
+
+   $this->showZeroWatchers = $canUnwatchedpages;
+
+   if ( $config->get( 'ShowUpdatedMarker' ) ) {
+   foreach ( $this->everything as $pageid => $title ) {
+   $page = new WikiPage( $title );
+   $db = $this->getDB();
+
+   $namespace = $title->getNamespace();
+   $dbKey = $title->getDBkey();
+
+   // Threshold: last visited about 26 weeks 
before latest edit
+   $updated = wfTimestamp( TS_UNIX, 
$page->getTimestamp() );
+   $age = $config->get( 'WatchersMaxAge' );
+   $threshold = $db->timestamp( $updated - $age );
+
+   // Number of page watchers who also visited a 
"rece

[MediaWiki-commits] [Gerrit] starsList tests - change (pywikibot/core)

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

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

Change subject: starsList tests
..

starsList tests

Bug: T123150
Change-Id: I7cd2546caa2523971de554f40877501764ad5219
---
M tests/__init__.py
A tests/add_text_tests.py
M tests/cosmetic_changes_tests.py
3 files changed, 57 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/61/263161/1

diff --git a/tests/__init__.py b/tests/__init__.py
index 8d768ba..4fb3698 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -128,6 +128,7 @@
 'pwb',
 'script',
 'l10n',
+'add_text',
 'archivebot',
 'category_bot',
 'checkimages',
diff --git a/tests/add_text_tests.py b/tests/add_text_tests.py
new file mode 100644
index 000..9c90ef6
--- /dev/null
+++ b/tests/add_text_tests.py
@@ -0,0 +1,50 @@
+# -*- coding: utf-8 -*-
+"""Test add_text bot module."""
+#
+# (C) Pywikibot team, 2016
+#
+# Distributed under the terms of the MIT license.
+#
+from __future__ import absolute_import, unicode_literals
+
+__version__ = '$Id$'
+
+import pywikibot
+
+from scripts.add_text import add_text
+
+from tests.aspects import unittest, TestCase
+
+
+class TestStarList(TestCase):
+
+"""Test starlist."""
+
+family = 'wikipedia'
+code = 'en'
+
+dry = True
+
+def test_basic(self):
+"""Test adding text before {{linkfa}} without parameters."""
+page = pywikibot.Page(self.site, 'foo')
+(text, newtext, always) = add_text(
+page, 'bar', putText=False,
+oldTextGiven='foo\n{{linkfa}}')
+self.assertEqual(
+'foo\n{{linkfa}}\nbar',
+newtext)
+
+def test_with_params(self):
+"""Test adding text before {{linkfa|...}}."""
+page = pywikibot.Page(self.site, 'foo')
+(text, newtext, always) = add_text(
+page, 'bar', putText=False,
+oldTextGiven='foo\n{{linkfa|...}}')
+self.assertEqual(
+'foo\nbar\n\n{{linkfa|...}}\n',
+newtext)
+
+
+if __name__ == "__main__":
+unittest.main()
diff --git a/tests/cosmetic_changes_tests.py b/tests/cosmetic_changes_tests.py
index 17e270d..4f01f22 100644
--- a/tests/cosmetic_changes_tests.py
+++ b/tests/cosmetic_changes_tests.py
@@ -42,6 +42,12 @@
 self.assertEqual('[[en:Foo bar]]',
  self.cct.fixSelfInterwiki('[[en:Foo bar]]'))
 
+def test_standardizePageFooter(self):
+"""Test standardizePageFooter method."""
+self.assertEqual('Foo\n{{link fa}}\n\n[[Category:Foo]]',
+ self.cct.standardizePageFooter(
+'Foo [[category:foo]] {{link fa}}'))
+
 def test_resolveHtmlEntities(self):
 """Test resolveHtmlEntities method."""
 self.assertEqual(

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

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

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


[MediaWiki-commits] [Gerrit] Cache JSON objects in memcached - change (mediawiki...Graph)

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

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

Change subject: Cache JSON objects in memcached
..

Cache JSON objects in memcached

* The graph data should now be available immediatelly
  after parsing, without waiting for SQL replication
* Graph URL will now continue working for some time
  after being removed from the page. This is not
  a complete solution, and we will need to implement
  something more permanent for the older graphs.

Change-Id: I0c6bc4bb4aa21d4b1647e04601806da345a008ef
---
M includes/ApiGraph.php
M includes/Graph.body.php
2 files changed, 49 insertions(+), 20 deletions(-)


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

diff --git a/includes/ApiGraph.php b/includes/ApiGraph.php
index 09b69a0..3adef4c 100644
--- a/includes/ApiGraph.php
+++ b/includes/ApiGraph.php
@@ -88,28 +88,31 @@
 * @return string
 */
private function getFromStorage( $title, $hash ) {
-   $title = Title::newFromText( $title );
-   if ( !$title || !$title->exists() || !$title->userCan( 'read', 
$this->getUser() ) ) {
-   $this->dieUsage( "Invalid title given.", "invalidtitle" 
);
-   }
+   $graph = Singleton::getDataByHash( $hash );
 
-   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', array(
-   'pp_page' => $title->getArticleID(),
-   'pp_propname' => 'graph_specs',
-   ), __METHOD__ );
-
-   $graph = false;
-   if ( $ppValue ) {
-   // Copied from TemplateDataBlob.php:newFromDatabase()
-   // Handle GZIP compression. \037\213 is the header for 
GZIP files.
-   if ( substr( $ppValue, 0, 2 ) === "\037\213" ) {
-   $ppValue = gzdecode( $ppValue );
+   if ( !$graph ) {
+   $title = Title::newFromText( $title );
+   if ( !$title || !$title->exists() || !$title->userCan( 
'read', $this->getUser() ) ) {
+   $this->dieUsage( "Invalid title given.", 
"invalidtitle" );
}
-   $st = FormatJson::parse( $ppValue );
-   if ( $st->isOK() ) {
-   $allGraphs = $st->getValue();
-   if ( property_exists( $allGraphs, $hash ) ) {
-   $graph = $allGraphs->$hash;
+
+   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', array(
+   'pp_page' => $title->getArticleID(),
+   'pp_propname' => 'graph_specs',
+   ), __METHOD__ );
+
+   if ( $ppValue ) {
+   // Copied from 
TemplateDataBlob.php:newFromDatabase()
+   // Handle GZIP compression. \037\213 is the 
header for GZIP files.
+   if ( substr( $ppValue, 0, 2 ) === "\037\213" ) {
+   $ppValue = gzdecode( $ppValue );
+   }
+   $st = FormatJson::parse( $ppValue );
+   if ( $st->isOK() ) {
+   $allGraphs = $st->getValue();
+   if ( property_exists( $allGraphs, $hash 
) ) {
+   $graph = $allGraphs->$hash;
+   }
}
}
}
diff --git a/includes/Graph.body.php b/includes/Graph.body.php
index 0c06206..e587138 100644
--- a/includes/Graph.body.php
+++ b/includes/Graph.body.php
@@ -189,6 +189,8 @@
$specs[$hash] = $data;
$parserOutput->setExtensionData( 'graph_specs', $specs );
 
+   self::saveDataToCache( $hash, $data );
+
if ( $isPreview || !$wgGraphImgServiceUrl ) {
// Always do client-side rendering
$attribs = self::buildDivAttributes( 'always', $data, 
$hash );
@@ -197,6 +199,7 @@
$parserOutput->setExtensionData( 'graph_live_specs', 
$liveSpecs );
$html = ''; // will be injected with a  tag
} else {
+
// Image from Graphoid
$server = rawurlencode( $wgServerName );
$title = !$title ? '' : rawurlencode( 
$title->getPrefixedDBkey() );
@@ -237,6 +240,28 @@
 
return Html::rawElement( 'div', $attribs, $html );
}
+
+   /**
+* Store graph data in the memcached
+* @param $hash string
+* @param $data mixe

[MediaWiki-commits] [Gerrit] [FIX] Page: Use repr-like if it can't be encoded - change (pywikibot/core)

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

Change subject: [FIX] Page: Use repr-like if it can't be encoded
..


[FIX] Page: Use repr-like if it can't be encoded

When the title contains characters which can't be encoded it falls back to use
an encoding which works like repr() on a unicode. It is also changing how it
behaves on Python 3 as it doesn't encode the title anymore and is thus not a
bytes anymore.

Conflicts:
pywikibot/page.py
tests/page_tests.py

Bug: T107428
Change-Id: I25dddac881891291c5a0dbe3f5dd2b1a0beedf0f
(cherry picked from commit 38589d3057847b9650b514e186b4bb3c66fad841)
---
M pywikibot/page.py
M tests/aspects.py
M tests/page_tests.py
M tests/utils.py
4 files changed, 59 insertions(+), 11 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index af178f0..a9c7a4e 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -273,7 +273,14 @@
 
 def __repr__(self):
 """Return a more complete string representation."""
-title = self.title().encode(config.console_encoding)
+if sys.version_info[0] > 2:
+title = repr(self.title())
+else:
+try:
+title = self.title().encode(config.console_encoding)
+except UnicodeEncodeError:
+# okay console encoding didn't work, at least try something
+title = self.title().encode('unicode_escape')
 return str('{0}({1})').format(self.__class__.__name__, title)
 
 def _cmpkey(self):
diff --git a/tests/aspects.py b/tests/aspects.py
index 4e0411c..042281f 100644
--- a/tests/aspects.py
+++ b/tests/aspects.py
@@ -907,7 +907,7 @@
 return self._mainpage
 
 mainpage = pywikibot.Page(site, site.siteinfo['mainpage'])
-if mainpage.isRedirectPage():
+if not isinstance(site, DrySite) and mainpage.isRedirectPage():
 mainpage = mainpage.getRedirectTarget()
 
 self._mainpage = mainpage
diff --git a/tests/page_tests.py b/tests/page_tests.py
index c031da4..8755dc6 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -17,8 +17,8 @@
 
 from tests.aspects import (
 unittest, TestCase, DefaultSiteTestCase, SiteAttributeTestCase,
+DefaultDrySiteTestCase,
 )
-from tests.utils import expected_failure_if
 
 if sys.version_info[0] > 2:
 basestring = (str, )
@@ -507,11 +507,31 @@
 self.assertTrue(page_copy.isRedirectPage())
 
 
-class TestPageRepr(DefaultSiteTestCase):
+class TestPageBaseUnicode(DefaultDrySiteTestCase):
 
-"""Test Page representation."""
+"""Base class for tests requring a page using a unicode title."""
 
-cached = True
+@classmethod
+def setUpClass(cls):
+"""Initialize page instance."""
+super(TestPageBaseUnicode, cls).setUpClass()
+cls.page = pywikibot.Page(cls.site, 'Ō')
+
+
+class TestPageRepr(TestPageBaseUnicode):
+
+"""Test for Page's repr implementation."""
+
+def setUp(self):
+"""Force the console encoding to UTF-8."""
+super(TestPageRepr, self).setUp()
+self._old_encoding = config.console_encoding
+config.console_encoding = 'utf8'
+
+def tearDown(self):
+"""Restore the original console encoding."""
+config.console_encoding = self._old_encoding
+super(TestPageRepr, self).tearDown()
 
 def test_mainpage_type(self):
 u"""Test the return type of repr(Page()) is str."""
@@ -523,7 +543,7 @@
 page = pywikibot.Page(self.get_site(), u'Ō')
 self.assertIsInstance(repr(page), str)
 
-@expected_failure_if(sys.version_info[0] > 2)
+@unittest.skipIf(sys.version_info[0] > 2, 'Python 2 specific test')
 def test_unicode_value(self):
 """Test repr(Page(u'')) is represented simply as utf8."""
 page = pywikibot.Page(self.get_site(), u'Ō')
@@ -539,10 +559,30 @@
 @unittest.skipIf(sys.version_info[0] < 3, 'Python 3+ specific test')
 def test_unicode_value_py3(self):
 """Test to capture actual Python 3 result pre unicode_literals."""
-page = pywikibot.Page(self.get_site(), u'Ō')
-self.assertEqual(repr(page), "Page(b'\\xc5\\x8c')")
-self.assertEqual(u'%r' % page, "Page(b'\\xc5\\x8c')")
-self.assertEqual(u'{0!r}'.format(page), "Page(b'\\xc5\\x8c')")
+self.assertEqual(repr(self.page), "Page('Ō')")
+self.assertEqual('%r' % self.page, "Page('Ō')")
+self.assertEqual('{0!r}'.format(self.page), "Page('Ō')")
+
+
+class TestPageReprASCII(TestPageBaseUnicode):
+
+"""Test for Page's repr implementation when using ASCII encoding."""
+
+def setUp(self):
+"""Patch the current console encoding to ASCII."""
+super(TestPageReprASCII, self).setUp()
+self._old_encoding = config.console_encoding
+config.console_encoding = 'ascii'

[MediaWiki-commits] [Gerrit] [IMPROV] Page repr tests: Enforce console encoding - change (pywikibot/core)

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

Change subject: [IMPROV] Page repr tests: Enforce console encoding
..


[IMPROV] Page repr tests: Enforce console encoding

When backporting 38589d3 to the 2.0 branch, an error occurred on the Jenkins
tests because the console encoding wasn't the expected value. Now for some
reason this is not a problem in the master branch, but in case someone uses a
custom console encoding it might fail even though it shouldn't. So this is now
enforcing the UTF-8 console encoding.

Change-Id: Ia642c34b67bf7edd0da9240a80552911b9e79918
---
M tests/page_tests.py
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/tests/page_tests.py b/tests/page_tests.py
index 1cc6248..48829f9 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -570,6 +570,17 @@
 
 """Test for Page's repr implementation."""
 
+def setUp(self):
+"""Force the console encoding to UTF-8."""
+super(TestPageRepr, self).setUp()
+self._old_encoding = config.console_encoding
+config.console_encoding = 'utf8'
+
+def tearDown(self):
+"""Restore the original console encoding."""
+config.console_encoding = self._old_encoding
+super(TestPageRepr, self).tearDown()
+
 def test_mainpage_type(self):
 u"""Test the return type of repr(Page()) is str."""
 mainpage = self.get_mainpage()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia642c34b67bf7edd0da9240a80552911b9e79918
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Reuse Language objects - change (mediawiki...Translate)

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

Change subject: Reuse Language objects
..


Reuse Language objects

* Generate anyway needed Language objects earlier.
* Use getHtmlCode() instead of wfBCP47() where possible.
* Avoid wfGetLangObj for Language objects.

Change-Id: I0c4177cb029e16fd6357914096a66c4b50c8ec14
---
M specials/SpecialSearchTranslations.php
M utils/MessageWebImporter.php
M utils/TranslationHelpers.php
3 files changed, 11 insertions(+), 9 deletions(-)

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



diff --git a/specials/SpecialSearchTranslations.php 
b/specials/SpecialSearchTranslations.php
index eac869d..bfd4c74 100644
--- a/specials/SpecialSearchTranslations.php
+++ b/specials/SpecialSearchTranslations.php
@@ -218,10 +218,11 @@
'dir' => 'ltr',
);
 
+   $language = Language::factory( $document['language'] );
$textAttribs = array(
'class' => 'row tux-text',
-   'lang' => wfBCP47( $document['language'] ),
-   'dir' => Language::factory( 
$document['language'] )->getDir(),
+   'lang' => $language->getHtmlCode(),
+   'dir' => $language->getDir(),
);
 
$resultsHtml = $resultsHtml
diff --git a/utils/MessageWebImporter.php b/utils/MessageWebImporter.php
index ec9c968..5005008 100644
--- a/utils/MessageWebImporter.php
+++ b/utils/MessageWebImporter.php
@@ -526,8 +526,8 @@
$legendParams = array( 'class' => 'mw-tpt-sp-legend' );
$contentParams = array( 'class' => 'mw-tpt-sp-content' );
if ( $lang ) {
-   $contentParams['dir'] = wfGetLangObj( $lang )->getDir();
-   $contentParams['lang'] = wfGetLangObj( $lang 
)->getCode();
+   $contentParams['dir'] = $lang->getDir();
+   $contentParams['lang'] = $lang->getCode();
}
 
$output = Html::rawElement( 'div', $containerParams,
diff --git a/utils/TranslationHelpers.php b/utils/TranslationHelpers.php
index a690f29..1a1d19d 100644
--- a/utils/TranslationHelpers.php
+++ b/utils/TranslationHelpers.php
@@ -367,10 +367,11 @@
continue;
}
 
+   $fbLanguage = Language::factory( $fbcode );
$context = RequestContext::getMain();
$label = TranslateUtils::getLanguageName( $fbcode, 
$context->getLanguage()->getCode() ) .
$context->msg( 'word-separator' )->text() .
-   $context->msg( 'parentheses', wfBCP47( $fbcode 
) )->text();
+   $context->msg( 'parentheses', 
$fbLanguage->getHtmlCode() )->text();
 
$target = Title::makeTitleSafe( $ns, "$page/$fbcode" );
if ( $target ) {
@@ -385,11 +386,11 @@
$display = TranslateUtils::convertWhiteSpaceToHTML( 
$text );
$display = Html::rawElement( 'div', array(
'lang' => $fbcode,
-   'dir' => Language::factory( $fbcode 
)->getDir() ),
+   'dir' => $fbLanguage->getDir() ),
$display
);
 
-   $contents = self::legend( $label ) . "\n" . 
$this->adder( $id, $fbcode ) .
+   $contents = self::legend( $label ) . "\n" . 
$this->adder( $id, $fbLanguage ) .
$display . self::clear();
 
$boxes[] = Html::rawElement( 'div', $params, $contents 
) .
@@ -583,7 +584,7 @@
 
/**
 * @param string $source jQuery selector for element containing the 
source
-* @param string|Language $lang Language code or object
+* @param Language $lang Language object
 * @return string
 */
public function adder( $source, $lang ) {
@@ -592,7 +593,7 @@
}
$target = self::jQueryPathId( $this->getTextareaId() );
$source = self::jQueryPathId( $source );
-   $dir = wfGetLangObj( $lang )->getDir();
+   $dir = $lang->getDir();
$params = array(
'onclick' => 
"jQuery($target).val(jQuery($source).text()).focus(); return false;",
'href' => '#',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c4177cb029e16fd6357914096a66c4b50c8ec14
Gerrit-PatchSet: 1
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] Fix to ignore default value in 'checkboxes' for existing pages - change (mediawiki...SemanticForms)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Fix to ignore default value in 'checkboxes' for existing pages
..


Fix to ignore default value in 'checkboxes' for existing pages

Change-Id: Ia3d8efb9566512acd3b7588f361efec0728dbd45
---
M includes/SF_FormField.php
M includes/SF_FormPrinter.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index 0f30401..659b725 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -413,7 +413,7 @@
return $f;
}
 
-   function getCurrentValue( $template_instance_query_values, 
$form_submitted ) {
+   function getCurrentValue( $template_instance_query_values, 
$form_submitted, $source_is_page ) {
// Get the value from the request, if
// it's there, and if it's not an array.
$cur_value = null;
@@ -487,7 +487,7 @@
}
}
 
-   if ( empty( $cur_value ) && !$form_submitted ) {
+   if ( !$source_is_page && empty( $cur_value ) && 
!$form_submitted ) {
if ( !is_null( $this->mDefaultValue ) ) {
// Set to the default value specified in the 
form, if it's there.
return $this->mDefaultValue;
diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index a51a67c..d9adedd 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -981,7 +981,7 @@
$field_name = trim( $tag_components[1] 
);
$form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $allow_multiple, $strict_parsing );
$fullFieldName = $template_name . '[' . 
$field_name . ']';
-   $cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted 
);
+   $cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted, 
$source_is_page );
 
// If the user is editing a page, and 
that page contains a call to
// the template being processed, get 
the current field's value

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

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

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


[MediaWiki-commits] [Gerrit] Fix to ignore default value in 'checkboxes' for existing pages - change (mediawiki...SemanticForms)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Fix to ignore default value in 'checkboxes' for existing pages
..

Fix to ignore default value in 'checkboxes' for existing pages

Change-Id: Ia3d8efb9566512acd3b7588f361efec0728dbd45
---
M includes/SF_FormField.php
M includes/SF_FormPrinter.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index 0f30401..659b725 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -413,7 +413,7 @@
return $f;
}
 
-   function getCurrentValue( $template_instance_query_values, 
$form_submitted ) {
+   function getCurrentValue( $template_instance_query_values, 
$form_submitted, $source_is_page ) {
// Get the value from the request, if
// it's there, and if it's not an array.
$cur_value = null;
@@ -487,7 +487,7 @@
}
}
 
-   if ( empty( $cur_value ) && !$form_submitted ) {
+   if ( !$source_is_page && empty( $cur_value ) && 
!$form_submitted ) {
if ( !is_null( $this->mDefaultValue ) ) {
// Set to the default value specified in the 
form, if it's there.
return $this->mDefaultValue;
diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index a51a67c..d9adedd 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -981,7 +981,7 @@
$field_name = trim( $tag_components[1] 
);
$form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $allow_multiple, $strict_parsing );
$fullFieldName = $template_name . '[' . 
$field_name . ']';
-   $cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted 
);
+   $cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted, 
$source_is_page );
 
// If the user is editing a page, and 
that page contains a call to
// the template being processed, get 
the current field's value

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3d8efb9566512acd3b7588f361efec0728dbd45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] partman:Changed lv_name from root to srv - change (operations/puppet)

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

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

Change subject: partman:Changed lv_name from root to srv
..

partman:Changed lv_name from root to srv

Change-Id: I8905d72158f4b97f88240a33d9b54861ceb64542
---
M modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/263158/1

diff --git a/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg 
b/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
index f2d0769..97e539b 100644
--- a/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
+++ b/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
@@ -12,7 +12,7 @@
 d-i partman-md/device_remove_md boolean true
 d-i partman-lvm/device_remove_lvm  boolean true
 
-# Use the first two disks
+# Use the first three disks
 d-i partman-auto/disk  string  /dev/sda /dev/sdb /dev/sdc
 
 # Don't stop if method isn't provided, e.g. in non used LVs
@@ -47,7 +47,7 @@
64  10001000 xfs   \
$lvmok{ }   
\
$defaultignore{ }   \
-   lv_name{ root } \
+   lv_name{ srv }  \
method{ format }\
format{ }   
\
use_filesystem{ }   \
@@ -61,7 +61,7 @@
 #  \
 #   
 d-i partman-auto-raid/recipe   string  \
-   1   3   0   ext3/boot   \
+   0   3   0   ext3/boot   \
/dev/sda2#/dev/sdb2#/dev/sdc2   \
.   \
0   3   0   lvm -   \

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

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

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


[MediaWiki-commits] [Gerrit] [IMPROV] Page repr tests: Enforce console encoding - change (pywikibot/core)

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

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

Change subject: [IMPROV] Page repr tests: Enforce console encoding
..

[IMPROV] Page repr tests: Enforce console encoding

When backporting 38589d3 to the 2.0 branch, an error occurred on the Jenkins
tests because the console encoding wasn't the expected value. Now for some
reason this is not a problem in the master branch, but in case someone uses a
custom console encoding it might fail even though it shouldn't. So this is now
enforcing the UTF-8 console encoding.

Change-Id: Ia642c34b67bf7edd0da9240a80552911b9e79918
---
M tests/page_tests.py
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/57/263157/1

diff --git a/tests/page_tests.py b/tests/page_tests.py
index 1cc6248..48829f9 100644
--- a/tests/page_tests.py
+++ b/tests/page_tests.py
@@ -570,6 +570,17 @@
 
 """Test for Page's repr implementation."""
 
+def setUp(self):
+"""Force the console encoding to UTF-8."""
+super(TestPageRepr, self).setUp()
+self._old_encoding = config.console_encoding
+config.console_encoding = 'utf8'
+
+def tearDown(self):
+"""Restore the original console encoding."""
+config.console_encoding = self._old_encoding
+super(TestPageRepr, self).tearDown()
+
 def test_mainpage_type(self):
 u"""Test the return type of repr(Page()) is str."""
 mainpage = self.get_mainpage()

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

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

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


[MediaWiki-commits] [Gerrit] Yet more fixes for formHTML() -> SFFormField refactor - change (mediawiki...SemanticForms)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Yet more fixes for formHTML() -> SFFormField refactor
..


Yet more fixes for formHTML() -> SFFormField refactor

Change-Id: Id01d8f7521b612906671d33ac3d75e77c89f0139
---
M includes/SF_FormField.php
M includes/SF_FormPrinter.php
2 files changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index 56aad57..0f30401 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -136,7 +136,7 @@
$this->mDescriptionArgs[$key] = $value;
}
 
-   static function newFromFormFieldTag( $tag_components, $template_name, 
$all_fields, $form_is_disabled, $strict_parsing ) {
+   static function newFromFormFieldTag( $tag_components, $template_name, 
$all_fields, $form_is_disabled, $allow_multiple, $strict_parsing ) {
global $wgParser;
 
$field_name = trim( $tag_components[1] );
@@ -367,7 +367,7 @@
$f->mFieldArgs['no autocomplete'] = true;
}
if ( $allow_multiple ) {
-   $f->mFieldArgs['part_of_multiple'] = $allow_multiple;
+   $f->mFieldArgs['part_of_multiple'] = true;
}
if ( count( $show_on_select ) > 0 ) {
$f->mFieldArgs['show on select'] = $show_on_select;
@@ -529,7 +529,7 @@
$this->hasFieldArg( 'mapping property' ) ||
( $this->hasFieldArg( 'mapping cargo table' ) &&
$this->hasFieldArg( 'mapping cargo field' ) ) ) {
-   if ( $allow_multiple ) {
+   if ( $this->hasFieldArg( 'part_of_multiple' ) ) {
$text .= Html::hidden( $template_name . 
'[num][map_field][' . $field_name . ']', 'true' );
} else {
$text .= Html::hidden( $template_name . 
'[map_field][' . $field_name . ']', 'true' );
diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index d90b1f1..a51a67c 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -979,7 +979,7 @@
// to deal with the  hack,
// among others.
$field_name = trim( $tag_components[1] 
);
-   $form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $strict_parsing );
+   $form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $allow_multiple, $strict_parsing );
$fullFieldName = $template_name . '[' . 
$field_name . ']';
$cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted 
);
 
@@ -1126,6 +1126,7 @@
// if the date 
is hidden, cur_value will already be set
// to the 
default value
( $cur_value == 
'' || $cur_value == 'now' ) ) {
+   $input_type = 
$form_field->getInputType();
if ( $input_type == 
'date' || $input_type == 'datetime' ||

$input_type == 'year' ||
( 
$input_type == '' && $form_field->getTemplateField()->getPropertyType() == 
'_dat' ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] Yet more fixes for formHTML() -> SFFormField refactor - change (mediawiki...SemanticForms)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Yet more fixes for formHTML() -> SFFormField refactor
..

Yet more fixes for formHTML() -> SFFormField refactor

Change-Id: Id01d8f7521b612906671d33ac3d75e77c89f0139
---
M includes/SF_FormField.php
M includes/SF_FormPrinter.php
2 files changed, 5 insertions(+), 4 deletions(-)


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

diff --git a/includes/SF_FormField.php b/includes/SF_FormField.php
index 56aad57..0f30401 100644
--- a/includes/SF_FormField.php
+++ b/includes/SF_FormField.php
@@ -136,7 +136,7 @@
$this->mDescriptionArgs[$key] = $value;
}
 
-   static function newFromFormFieldTag( $tag_components, $template_name, 
$all_fields, $form_is_disabled, $strict_parsing ) {
+   static function newFromFormFieldTag( $tag_components, $template_name, 
$all_fields, $form_is_disabled, $allow_multiple, $strict_parsing ) {
global $wgParser;
 
$field_name = trim( $tag_components[1] );
@@ -367,7 +367,7 @@
$f->mFieldArgs['no autocomplete'] = true;
}
if ( $allow_multiple ) {
-   $f->mFieldArgs['part_of_multiple'] = $allow_multiple;
+   $f->mFieldArgs['part_of_multiple'] = true;
}
if ( count( $show_on_select ) > 0 ) {
$f->mFieldArgs['show on select'] = $show_on_select;
@@ -529,7 +529,7 @@
$this->hasFieldArg( 'mapping property' ) ||
( $this->hasFieldArg( 'mapping cargo table' ) &&
$this->hasFieldArg( 'mapping cargo field' ) ) ) {
-   if ( $allow_multiple ) {
+   if ( $this->hasFieldArg( 'part_of_multiple' ) ) {
$text .= Html::hidden( $template_name . 
'[num][map_field][' . $field_name . ']', 'true' );
} else {
$text .= Html::hidden( $template_name . 
'[map_field][' . $field_name . ']', 'true' );
diff --git a/includes/SF_FormPrinter.php b/includes/SF_FormPrinter.php
index d90b1f1..a51a67c 100644
--- a/includes/SF_FormPrinter.php
+++ b/includes/SF_FormPrinter.php
@@ -979,7 +979,7 @@
// to deal with the  hack,
// among others.
$field_name = trim( $tag_components[1] 
);
-   $form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $strict_parsing );
+   $form_field = 
SFFormField::newFromFormFieldTag( $tag_components, $template_name, $all_fields, 
$form_is_disabled, $allow_multiple, $strict_parsing );
$fullFieldName = $template_name . '[' . 
$field_name . ']';
$cur_value = 
$form_field->getCurrentValue( $template_instance_query_values, $form_submitted 
);
 
@@ -1126,6 +1126,7 @@
// if the date 
is hidden, cur_value will already be set
// to the 
default value
( $cur_value == 
'' || $cur_value == 'now' ) ) {
+   $input_type = 
$form_field->getInputType();
if ( $input_type == 
'date' || $input_type == 'datetime' ||

$input_type == 'year' ||
( 
$input_type == '' && $form_field->getTemplateField()->getPropertyType() == 
'_dat' ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id01d8f7521b612906671d33ac3d75e77c89f0139
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Add Flow and VisualEditor scanning - change (wikimedia...automated-scanning)

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

Change subject: Add Flow and VisualEditor scanning
..


Add Flow and VisualEditor scanning

Change-Id: I4759c2fbe36a0d82b52535e9f06f0da3ee61e7ef
---
M bin/scan_from_cron.sh
1 file changed, 34 insertions(+), 2 deletions(-)

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



diff --git a/bin/scan_from_cron.sh b/bin/scan_from_cron.sh
index cd86a5a..f1755b7 100755
--- a/bin/scan_from_cron.sh
+++ b/bin/scan_from_cron.sh
@@ -11,8 +11,24 @@
popd
 }
 
-git_update ~/workspace/mediawiki
-git_update ~/workspace/mediawiki-extensions/MobileFrontend
+bundle_install() {
+   pushd $1
+   bundle install --path ~/gems/2.0.0
+   popd
+}
+
+repos=(
+   ~/workspace/mediawiki
+   ~/workspace/mediawiki-extensions/MobileFrontend
+   ~/workspace/mediawiki-extensions/Flow
+   ~/workspace/mediawiki-extensions/VisualEditor
+)
+
+for repo in "${repos[@]}"
+do
+   git_update $repo
+   bundle_install $repo
+done
 
 time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
-xH \
@@ -30,3 +46,19 @@
-b ~/workspace/mediawiki-extensions/MobileFrontend/tests/browser \
beta_en_mobile
 
+time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
+   -xH \
+   -c ~/.wmf.conf \
+   -C $config_path \
+   -p $zap_path \
+   -b ~/workspace/mediawiki-extensions/Flow/tests/browser \
+   beta_en
+
+time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
+   -xH \
+   -c ~/.wmf.conf \
+   -C $config_path \
+   -p $zap_path \
+   -b 
~/workspace/mediawiki-extensions/VisualEditor/modules/ve-mw/tests/browser \
+   beta_en
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4759c2fbe36a0d82b52535e9f06f0da3ee61e7ef
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/security/automated-scanning
Gerrit-Branch: master
Gerrit-Owner: Dpatrick 
Gerrit-Reviewer: Dpatrick 

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


[MediaWiki-commits] [Gerrit] Add Flow and VisualEditor scanning - change (wikimedia...automated-scanning)

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

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

Change subject: Add Flow and VisualEditor scanning
..

Add Flow and VisualEditor scanning

Change-Id: I4759c2fbe36a0d82b52535e9f06f0da3ee61e7ef
---
M bin/scan_from_cron.sh
1 file changed, 34 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/security/automated-scanning 
refs/changes/55/263155/1

diff --git a/bin/scan_from_cron.sh b/bin/scan_from_cron.sh
index cd86a5a..f1755b7 100755
--- a/bin/scan_from_cron.sh
+++ b/bin/scan_from_cron.sh
@@ -11,8 +11,24 @@
popd
 }
 
-git_update ~/workspace/mediawiki
-git_update ~/workspace/mediawiki-extensions/MobileFrontend
+bundle_install() {
+   pushd $1
+   bundle install --path ~/gems/2.0.0
+   popd
+}
+
+repos=(
+   ~/workspace/mediawiki
+   ~/workspace/mediawiki-extensions/MobileFrontend
+   ~/workspace/mediawiki-extensions/Flow
+   ~/workspace/mediawiki-extensions/VisualEditor
+)
+
+for repo in "${repos[@]}"
+do
+   git_update $repo
+   bundle_install $repo
+done
 
 time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
-xH \
@@ -30,3 +46,19 @@
-b ~/workspace/mediawiki-extensions/MobileFrontend/tests/browser \
beta_en_mobile
 
+time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
+   -xH \
+   -c ~/.wmf.conf \
+   -C $config_path \
+   -p $zap_path \
+   -b ~/workspace/mediawiki-extensions/Flow/tests/browser \
+   beta_en
+
+time ~/workspace/wikimedia-security-automated-scanning/bin/run_scan.pl \
+   -xH \
+   -c ~/.wmf.conf \
+   -C $config_path \
+   -p $zap_path \
+   -b 
~/workspace/mediawiki-extensions/VisualEditor/modules/ve-mw/tests/browser \
+   beta_en
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4759c2fbe36a0d82b52535e9f06f0da3ee61e7ef
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/security/automated-scanning
Gerrit-Branch: master
Gerrit-Owner: Dpatrick 

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


[MediaWiki-commits] [Gerrit] etherpad diamond collector: Fix a typo - change (operations/puppet)

2016-01-08 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: etherpad diamond collector: Fix a typo
..


etherpad diamond collector: Fix a typo

failedChangesets does not have a meter/count hierarchy

Change-Id: I94de3fcd042857d3356f04991f202f53b48813c3
---
M files/etherpad/etherpad.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/files/etherpad/etherpad.py b/files/etherpad/etherpad.py
index 6770bdc..42a667c 100644
--- a/files/etherpad/etherpad.py
+++ b/files/etherpad/etherpad.py
@@ -27,7 +27,7 @@
 'disconnects/count',
 'httpRequests/meter/count',
 'edits/meter/count',
-'failedChangesets/meter/count',
+'failedChangesets/count',
 ],
 })
 return config

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94de3fcd042857d3356f04991f202f53b48813c3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] etherpad diamond collector: Fix a typo - change (operations/puppet)

2016-01-08 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: etherpad diamond collector: Fix a typo
..

etherpad diamond collector: Fix a typo

failedChangesets does not have a meter/count hierarchy

Change-Id: I94de3fcd042857d3356f04991f202f53b48813c3
---
M files/etherpad/etherpad.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/263154/1

diff --git a/files/etherpad/etherpad.py b/files/etherpad/etherpad.py
index 6770bdc..42a667c 100644
--- a/files/etherpad/etherpad.py
+++ b/files/etherpad/etherpad.py
@@ -27,7 +27,7 @@
 'disconnects/count',
 'httpRequests/meter/count',
 'edits/meter/count',
-'failedChangesets/meter/count',
+'failedChangesets/count',
 ],
 })
 return config

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I94de3fcd042857d3356f04991f202f53b48813c3
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Replaced all spacing with tab Bug:T121879 - change (operations/puppet)

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

Change subject: Replaced all spacing with tab Bug:T121879
..


Replaced all spacing with tab
Bug:T121879

Change-Id: I7d4eafaf7e53de6517e8f6bd3158a2dfa6358ebd
---
M modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
1 file changed, 67 insertions(+), 67 deletions(-)

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



diff --git a/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg 
b/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
index fa55e9c..f2d0769 100644
--- a/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
+++ b/modules/install_server/files/autoinstall/partman/raid0-lvm-srv.cfg
@@ -1,81 +1,81 @@
-# Automatic software RAID 0 partitioning
+# Automatic software RAID partitioning
 #
-# * 3 disks, sda, sdb & sdc
+# * 3 disks, sda, sdb, sdc
 # * LVM
 # * GPT layout (large disks, > 2TB)
 # * layout:
-#   - /boot:  RAID0, 500MB
-#   - / :   ext3, RAID0, 50GB on LVM
-#   - rest is lvm RAID0
+#  - /boot:  RAID0, 500MB
+#  - / :   ext3, RAID0, 50GB on LVM
+#  - rest is lvm RAID0
 
-d-i partman-auto/method string  raid
-d-i partman-md/device_remove_md boolean true
-d-i partman-lvm/device_remove_lvm   boolean true
+d-i partman-auto/methodstring  raid
+d-i partman-md/device_remove_md boolean true
+d-i partman-lvm/device_remove_lvm  boolean true
 
-# Use the first  three disks
-d-i partman-auto/disk   string  /dev/sda /dev/sdb /dev/sdc
+# Use the first two disks
+d-i partman-auto/disk  string  /dev/sda /dev/sdb /dev/sdc
 
 # Don't stop if method isn't provided, e.g. in non used LVs
-d-i partman-basicmethods/method_onlyboolean false
+d-i partman-basicmethods/method_only   boolean false
 
 # Define physical partitions
-d-i partman-auto/expert_recipe  string  \
-multiraid ::\
-10  1   10  grub\
-$gptonly{ } \
-$bios_boot{ }   \
-$primary{ } method{ biosgrub }  \
-.   \
-500 1   500 raid\
-$primary{ } method{ raid }  \
-$lvmignore{ }   \
-.   \
-500 2   -1  raid\
-$primary{ } method{ raid }  \
-$lvmignore{ }   \
-.   \
-5   4   5  ext3 \
-$lvmok{ }   \
-$defaultignore{ }   \
-lv_name{ root } \
-method{ format }\
-format{ }   \
-use_filesystem{ }   \
-filesystem{ ext3 }  \
-mountpoint{ / } \
-   .
-  64 1000 1000   ext4  \
-$lvmok{ }   \
-$defaultignore{ }   \
-lv_name{ root } \
-method{ format }\
-format{ }   \
-use_filesystem{ }   \
-filesystem{ xfs }  \
-mountpoint{ /srv }  \
-   .   \
+d-i partman-auto/expert_recipe string  \
+   multiraid ::\
+   10  1   10  grub\
+   $gptonly{ } \
+   $bios_boot{ }   \
+   $primary{ } method{ biosgrub }  \
+   .   \
+   500 1   500 raid\
+   $primary{ } method{ raid }  \
+   $lvmignore{ }   \
+   .   \
+   500 2   -1  raid\
+   $primary{ } method{ raid }  \
+  

[MediaWiki-commits] [Gerrit] diamond: Introduce an etherpad plugin - change (operations/puppet)

2016-01-08 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: diamond: Introduce an etherpad plugin
..


diamond: Introduce an etherpad plugin

Provide an etherpad diamond plugin, that uses the "stats" URL provided
by etherpad to ship a number of configurable metrics to graphite. Those
are memory, users, edits, requests

Change-Id: Ie7abf5c3a5749c5489dcbb9b5870c3e30dae5be2
---
A files/etherpad/etherpad.py
M manifests/role/etherpad.pp
2 files changed, 56 insertions(+), 0 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/files/etherpad/etherpad.py b/files/etherpad/etherpad.py
new file mode 100644
index 000..6770bdc
--- /dev/null
+++ b/files/etherpad/etherpad.py
@@ -0,0 +1,52 @@
+'''
+Collect request status code metrics from etherad
+
+ Dependencies
+
+ * subprocess
+'''
+
+from diamond.collector import Collector
+import urllib2
+import json
+
+
+class EtherpadStatusCollector(Collector):
+
+def get_default_config(self):
+'''
+Returns the default collector settings
+'''
+config = super(EtherpadStatusCollector, self).get_default_config()
+config.update({
+'url': 'http://localhost:9001/stats',
+'path_prefix': 'etherpad',
+'gauges': ['memoryUsage', 'totalUsers', 'pendingEdits'],
+'counters': [
+'connects/count',
+'disconnects/count',
+'httpRequests/meter/count',
+'edits/meter/count',
+'failedChangesets/meter/count',
+],
+})
+return config
+
+def collect(self):
+'''
+Publishes stats to the configured path.
+'''
+url = urllib2.urlopen(self.config['url'])
+if url.code != 200:
+return
+stats = json.loads(url.read())
+for gauge in self.config['gauges']:
+self.publish_gauge(gauge, stats[gauge])
+# Use the / character as a split character
+for counter in self.config['counters']:
+parts = counter.split('/')
+name = parts[0]
+t = stats
+for part in parts:
+t = t.get(part)
+self.publish_counter(name, t)
diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp
index c17327c..8ffd9e2 100644
--- a/manifests/role/etherpad.pp
+++ b/manifests/role/etherpad.pp
@@ -68,4 +68,8 @@
 proto => 'tcp',
 port  => '9001',
 }
+
+diamond::collector { 'EtherpadStatus':
+source   => 'puppet:///files/etherpad/etherpad.py',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7abf5c3a5749c5489dcbb9b5870c3e30dae5be2
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 
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 for Special:ViewData for non-short URLs - change (mediawiki...Cargo)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Fix for Special:ViewData for non-short URLs
..


Fix for Special:ViewData for non-short URLs

Change-Id: Idfc527eb41716a4edd3538dcccad9570cc12bc13
---
M specials/CargoViewData.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/specials/CargoViewData.php b/specials/CargoViewData.php
index e4c5a5c..c940e1c 100644
--- a/specials/CargoViewData.php
+++ b/specials/CargoViewData.php
@@ -49,8 +49,12 @@
}
 
function displayInputForm() {
+   // Add the name of this special page as a hidden input, in
+   // case the wiki doesn't use nice URLs.
+   $hiddenTitleInput = Html::hidden( 'title', 
$this->getPageTitle()->getFullText() );
$text = <<
+$hiddenTitleInput
 
 
 

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

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

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


[MediaWiki-commits] [Gerrit] Add my (legoktm) new yubikey-based ssh key - change (operations/puppet)

2016-01-08 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: Add my (legoktm) new yubikey-based ssh key
..


Add my (legoktm) new yubikey-based ssh key

Change-Id: Ifa41e7e98af854d0fa583401ea5c625f70d911bf
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 177faa2..269b913 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1098,8 +1098,10 @@
 gid: 500
 name: legoktm
 realname: Kunal Mehta
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC17bogEBqaICwvnLi3RHl89/qqmliaQLkKMsMEubghU7Y0ntnRA5C1edkzzXT6fdGCRsubhflfSogSZLErSp0x9gR6YmPGYKn1OGbLK/FIpEdcbNd/zGBBF1U/9KSkJLgNKACXDRfMcqyMpnAaGDcUDdUZaRJ7nOJ703VH5pp1ommdv3acRWTPQ9hF1WUwlXPAD2VjIqJKrVPVMqVafcbPNO9FVyV94dOKURUPRmIPVxGWruLB2Dp+a2sZqh5KBR1PkV5wpBRev0IBOAFGE3aG9fAB+Xbj7bppTd5ov8EILU8xw0Xj9eFxiSuBWZ4b+rWGzKBj6OPm9TNg+pSGZr55
-lego...@wikimedia.org]
+ssh_keys:
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC17bogEBqaICwvnLi3RHl89/qqmliaQLkKMsMEubghU7Y0ntnRA5C1edkzzXT6fdGCRsubhflfSogSZLErSp0x9gR6YmPGYKn1OGbLK/FIpEdcbNd/zGBBF1U/9KSkJLgNKACXDRfMcqyMpnAaGDcUDdUZaRJ7nOJ703VH5pp1ommdv3acRWTPQ9hF1WUwlXPAD2VjIqJKrVPVMqVafcbPNO9FVyV94dOKURUPRmIPVxGWruLB2Dp+a2sZqh5KBR1PkV5wpBRev0IBOAFGE3aG9fAB+Xbj7bppTd5ov8EILU8xw0Xj9eFxiSuBWZ4b+rWGzKBj6OPm9TNg+pSGZr55
+lego...@wikimedia.org
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCV0JQ8i5ChreCkDyad+ozgBlPd7dBx97R3xzTSrYVWxJCXgCHfq+yR+umIvJlU5mRw9nFhTCD2NuIdSRKOdy+KWo7GRQQT9ZOTphkvC+TP5vhL7KUF/zg3wD/1lXlJceY4P8xgZ/O8t3XMfwjW7DP3A4WymTCqQ1IfxT6H427qVdckyU7O54tnvJlM14XTHYIL7Xu5AH/JfnzcgmftYv75MlLivyGfhJE/e4DG0AqcB7DZlj1zfL+3D070iPu1ZbyUjnRUzGsxSlpzMTc2s+BsZelBkOJFJ++L8k581GS3RGPsrqU6aSjobukSJqngswTPOJewuYT4liDKVR1+YF3B
 uid: 2552
   howief:
 ensure: absent

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifa41e7e98af854d0fa583401ea5c625f70d911bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] importImages.php runs input file names through UTF8 normaliz... - change (mediawiki/core)

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

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

Change subject: importImages.php runs input file names through UTF8 
normalization functions
..

importImages.php runs input file names through UTF8 normalization functions

Bug: T78060
Change-Id: I545ea8f28ff3a1aac03c29d27355c0371632ef4d
---
M maintenance/importImages.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/importImages.php b/maintenance/importImages.php
index a040248..701af62 100644
--- a/maintenance/importImages.php
+++ b/maintenance/importImages.php
@@ -136,7 +136,7 @@
 if ( $count > 0 ) {
 
foreach ( $files as $file ) {
-   $base = wfBaseName( $file );
+   $base = UtfNormal\Validator::cleanUp( wfBaseName( $file ) );
 
# Validate a title
$title = Title::makeTitleSafe( NS_FILE, $base );

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

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

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


[MediaWiki-commits] [Gerrit] Fix for Special:ViewData for non-short URLs - change (mediawiki...Cargo)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Fix for Special:ViewData for non-short URLs
..

Fix for Special:ViewData for non-short URLs

Change-Id: Idfc527eb41716a4edd3538dcccad9570cc12bc13
---
M specials/CargoViewData.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/specials/CargoViewData.php b/specials/CargoViewData.php
index e4c5a5c..c940e1c 100644
--- a/specials/CargoViewData.php
+++ b/specials/CargoViewData.php
@@ -49,8 +49,12 @@
}
 
function displayInputForm() {
+   // Add the name of this special page as a hidden input, in
+   // case the wiki doesn't use nice URLs.
+   $hiddenTitleInput = Html::hidden( 'title', 
$this->getPageTitle()->getFullText() );
$text = <<
+$hiddenTitleInput
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idfc527eb41716a4edd3538dcccad9570cc12bc13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Add my (legoktm) new yubikey-based ssh key - change (operations/puppet)

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

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

Change subject: Add my (legoktm) new yubikey-based ssh key
..

Add my (legoktm) new yubikey-based ssh key

Change-Id: Ifa41e7e98af854d0fa583401ea5c625f70d911bf
---
M modules/admin/data/data.yaml
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 177faa2..269b913 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -1098,8 +1098,10 @@
 gid: 500
 name: legoktm
 realname: Kunal Mehta
-ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC17bogEBqaICwvnLi3RHl89/qqmliaQLkKMsMEubghU7Y0ntnRA5C1edkzzXT6fdGCRsubhflfSogSZLErSp0x9gR6YmPGYKn1OGbLK/FIpEdcbNd/zGBBF1U/9KSkJLgNKACXDRfMcqyMpnAaGDcUDdUZaRJ7nOJ703VH5pp1ommdv3acRWTPQ9hF1WUwlXPAD2VjIqJKrVPVMqVafcbPNO9FVyV94dOKURUPRmIPVxGWruLB2Dp+a2sZqh5KBR1PkV5wpBRev0IBOAFGE3aG9fAB+Xbj7bppTd5ov8EILU8xw0Xj9eFxiSuBWZ4b+rWGzKBj6OPm9TNg+pSGZr55
-lego...@wikimedia.org]
+ssh_keys:
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC17bogEBqaICwvnLi3RHl89/qqmliaQLkKMsMEubghU7Y0ntnRA5C1edkzzXT6fdGCRsubhflfSogSZLErSp0x9gR6YmPGYKn1OGbLK/FIpEdcbNd/zGBBF1U/9KSkJLgNKACXDRfMcqyMpnAaGDcUDdUZaRJ7nOJ703VH5pp1ommdv3acRWTPQ9hF1WUwlXPAD2VjIqJKrVPVMqVafcbPNO9FVyV94dOKURUPRmIPVxGWruLB2Dp+a2sZqh5KBR1PkV5wpBRev0IBOAFGE3aG9fAB+Xbj7bppTd5ov8EILU8xw0Xj9eFxiSuBWZ4b+rWGzKBj6OPm9TNg+pSGZr55
+lego...@wikimedia.org
+  - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQCV0JQ8i5ChreCkDyad+ozgBlPd7dBx97R3xzTSrYVWxJCXgCHfq+yR+umIvJlU5mRw9nFhTCD2NuIdSRKOdy+KWo7GRQQT9ZOTphkvC+TP5vhL7KUF/zg3wD/1lXlJceY4P8xgZ/O8t3XMfwjW7DP3A4WymTCqQ1IfxT6H427qVdckyU7O54tnvJlM14XTHYIL7Xu5AH/JfnzcgmftYv75MlLivyGfhJE/e4DG0AqcB7DZlj1zfL+3D070iPu1ZbyUjnRUzGsxSlpzMTc2s+BsZelBkOJFJ++L8k581GS3RGPsrqU6aSjobukSJqngswTPOJewuYT4liDKVR1+YF3B
 uid: 2552
   howief:
 ensure: absent

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

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

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


[MediaWiki-commits] [Gerrit] Don't run cirrus jobs in UsageTrackingIntegrationTest - change (mediawiki...Wikibase)

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

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

Change subject: Don't run cirrus jobs in UsageTrackingIntegrationTest
..

Don't run cirrus jobs in UsageTrackingIntegrationTest

all this needs is to run refreshLinks

this will probably help make these tests faster, as well.

Bug: T123115
Change-Id: I449bab411efd69888a1cd8d8df1faf9c242a59c4
---
M client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git 
a/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php 
b/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php
index bf951f4..c3ee1b8 100644
--- a/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php
+++ b/client/tests/phpunit/includes/Usage/UsageTrackingIntegrationTest.php
@@ -67,7 +67,7 @@
$runner = new JobRunner();
 
$runner->run( array(
-   'type' => false,
+   'type' => 'refreshLinks',
'maxJobs'  => false,
'maxTime'  => false,
'throttle' => false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I449bab411efd69888a1cd8d8df1faf9c242a59c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] diamond: Introduce an etherpad plugin - change (operations/puppet)

2016-01-08 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review.

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

Change subject: diamond: Introduce an etherpad plugin
..

diamond: Introduce an etherpad plugin

Provide an etherpad diamond plugin, that uses the "stats" URL provided
by etherpad to ship a number of configurable metrics to graphite. Those
are memory, users, edits, requests

Change-Id: Ie7abf5c3a5749c5489dcbb9b5870c3e30dae5be2
---
A files/etherpad/etherpad.py
M manifests/role/etherpad.pp
2 files changed, 58 insertions(+), 0 deletions(-)


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

diff --git a/files/etherpad/etherpad.py b/files/etherpad/etherpad.py
new file mode 100644
index 000..dbb0ead
--- /dev/null
+++ b/files/etherpad/etherpad.py
@@ -0,0 +1,51 @@
+'''
+Collect request status code metrics from etherad
+
+ Dependencies
+
+ * subprocess
+'''
+
+from diamond.collector import Collector
+import urllib2
+import json
+
+
+class EtherpadStatusCollector(Collector):
+
+def get_default_config(self):
+'''
+Returns the default collector settings
+'''
+config = super(EtherpadStatusCollector, self).get_default_config()
+config.update({
+'url': 'http://localhost:9001/stats',
+'gauges': ['memoryUsage', 'totalUsers', 'pendingEdits'],
+'counters': [
+'connects/count',
+'disconnects/count',
+'httpRequests/meter/count',
+'edits/meter/count',
+'failedChangesets/meter/count',
+],
+})
+return config
+
+def collect(self):
+'''
+Publishes stats to the configured path.
+'''
+url = urllib2.urlopen(self.config['url'])
+if url.code != 200:
+return
+stats = json.loads(url.read())
+for gauge in self.config['gauges']:
+self.publish_gauge(gauge, stats[gauge])
+# Use the / character as a split character
+for counter in self.config['counters']:
+name = counter.replace('/', '_')
+parts = counter.split('/')
+t = stats
+for part in parts:
+t = t.get(part)
+self.publish_counter(name, t)
diff --git a/manifests/role/etherpad.pp b/manifests/role/etherpad.pp
index c17327c..60daa93 100644
--- a/manifests/role/etherpad.pp
+++ b/manifests/role/etherpad.pp
@@ -68,4 +68,11 @@
 proto => 'tcp',
 port  => '9001',
 }
+
+diamond::collector { 'EtherpadStatus':
+source   => 'puppet:///files/etherpad/etherpad.py',
+settings => {
+path_prefix => 'etherpad',
+}
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7abf5c3a5749c5489dcbb9b5870c3e30dae5be2
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] Fix Fatal error: Invalid operand type was used, Remove $wgPa... - change (mediawiki...SemanticDrilldown)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Fix Fatal error: Invalid operand type was used, Remove 
$wgPageProps removed config
..


Fix Fatal error: Invalid operand type was used, Remove $wgPageProps removed 
config

Add missing class SDBrowseDataPage to autoloader.

Spotted here
https://integration.wikimedia.org/ci/job/mwext-testextension-hhvm/960/console

Change-Id: I3b2506b1fa801cb379d935394243b74836ba8cd9
---
M SemanticDrilldown.php
1 file changed, 14 insertions(+), 11 deletions(-)

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



diff --git a/SemanticDrilldown.php b/SemanticDrilldown.php
index a98e3d5..c80ed01 100644
--- a/SemanticDrilldown.php
+++ b/SemanticDrilldown.php
@@ -52,9 +52,8 @@
 $wgExtensionMessagesFiles['SemanticDrilldownAlias'] = $sdgIP . 
'/languages/SD_Aliases.php';
 $wgExtensionMessagesFiles['SemanticDrilldownMagic'] = $sdgIP . 
'/languages/SemanticDrilldown.i18n.magic.php';
 
-// register all special pages and other classes
-$wgSpecialPages['BrowseData'] = 'SDBrowseData';
 $wgAutoloadClasses['SDBrowseData'] = $sdgIP . '/specials/SD_BrowseData.php';
+$wgAutoloadClasses['SDBrowseDataPage'] = $sdgIP . 
'/specials/SD_BrowseData.php';
 
 $wgAutoloadClasses['SDUtils'] = $sdgIP . '/includes/SD_Utils.php';
 $wgAutoloadClasses['SDFilter'] = $sdgIP . '/includes/SD_Filter.php';
@@ -63,6 +62,9 @@
 $wgAutoloadClasses['SDPageSchemas'] = $sdgIP . '/includes/SD_PageSchemas.php';
 $wgAutoloadClasses['SDParserFunctions'] = $sdgIP . 
'/includes/SD_ParserFunctions.php';
 
+// register all special pages and other classes
+$wgSpecialPages['BrowseData'] = 'SDBrowseData';
+
 $wgHooks['smwInitProperties'][] = 'sdfInitProperties';
 $wgHooks['AdminLinks'][] = 'SDUtils::addToAdminLinks';
 $wgHooks['MagicWordwgVariableIDs'][] = 'SDUtils::addMagicWordVariableIDs';
@@ -70,9 +72,6 @@
 $wgHooks['ParserBeforeTidy'][] = 'SDUtils::handleShowAndHide';
 $wgHooks['PageSchemasRegisterHandlers'][] = 'SDPageSchemas::registerClass';
 $wgHooks['ParserFirstCallInit'][] = 'SDParserFunctions::registerFunctions';
-
-$wgPageProps['hidefromdrilldown'] = 'Whether or not the page is set as 
HIDEFROMDRILLDOWN';
-$wgPageProps['showindrilldown'] = 'Whether or not the page is set as 
SHOWINDRILLDOWN';
 
 # ##
 # This is the path to your installation of Semantic Drilldown as
@@ -138,15 +137,15 @@
$wgNamespaceAliases = $wgNamespaceAliases + 
$sdgContLang->getNamespaceAliases();
 
// Support subpages only for talk pages by default
-   $wgNamespacesWithSubpages = $wgNamespacesWithSubpages + array(
+   $wgNamespacesWithSubpages = array_merge( $wgNamespacesWithSubpages, 
array(
SD_NS_FILTER_TALK => true
-   );
+   ) );
 
// Enable semantic links on filter pages
-   $smwgNamespacesWithSemanticLinks = $smwgNamespacesWithSemanticLinks + 
array(
+   $smwgNamespacesWithSemanticLinks = array_merge( 
$smwgNamespacesWithSemanticLinks, array(
SD_NS_FILTER => true,
SD_NS_FILTER_TALK => false
-   );
+   ) );
 }
 
 /**/
@@ -162,7 +161,9 @@
 function sdfInitContentLanguage( $langcode ) {
global $sdgIP, $sdgContLang;
 
-   if ( !empty( $sdgContLang ) ) { return; }
+   if ( !empty( $sdgContLang ) ) {
+   return;
+   }
 
$sdContLangClass = 'SD_Language' . str_replace( '-', '_', ucfirst( 
$langcode ) );
 
@@ -187,7 +188,9 @@
 function sdfInitUserLanguage( $langcode ) {
global $sdgIP, $sdgLang;
 
-   if ( !empty( $sdgLang ) ) { return; }
+   if ( !empty( $sdgLang ) ) {
+   return;
+   }
 
$sdLangClass = 'SD_Language' . str_replace( '-', '_', ucfirst( 
$langcode ) );
if ( file_exists( $sdgIP . '/languages/' . $sdLangClass . '.php' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b2506b1fa801cb379d935394243b74836ba8cd9
Gerrit-PatchSet: 7
Gerrit-Project: mediawiki/extensions/SemanticDrilldown
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix last direct usage of UtfNormal in MW core - change (mediawiki/core)

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

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

Change subject: Fix last direct usage of UtfNormal in MW core
..

Fix last direct usage of UtfNormal in MW core

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


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

diff --git a/includes/Xml.php b/includes/Xml.php
index 11f14db..63301ac 100644
--- a/includes/Xml.php
+++ b/includes/Xml.php
@@ -91,7 +91,7 @@
public static function elementClean( $element, $attribs = array(), 
$contents = '' ) {
global $wgContLang;
if ( $attribs ) {
-   $attribs = array_map( array( 'UtfNormal', 'cleanUp' ), 
$attribs );
+   $attribs = array_map( array( 'UtfNormal\Validator', 
'cleanUp' ), $attribs );
}
if ( $contents ) {
$contents = $wgContLang->normalize( $contents );

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

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

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


[MediaWiki-commits] [Gerrit] Set mobile flag for autologin js - change (mediawiki...CentralAuth)

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

Change subject: Set mobile flag for autologin js
..


Set mobile flag for autologin js

Set "mobile=1" when doing autologin from a mobile domain with
javascript.

Bug: T100413
Change-Id: Ib88ac635747db823fee7b38d92599ba7d50747bd
---
M includes/CentralAuthHooks.php
M modules/ext.centralauth.centralautologin.js
2 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/includes/CentralAuthHooks.php b/includes/CentralAuthHooks.php
index d1fc927..a1220c7 100644
--- a/includes/CentralAuthHooks.php
+++ b/includes/CentralAuthHooks.php
@@ -1491,6 +1491,11 @@
global $wgCentralAuthLoginWiki, $wgCentralAuthUseEventLogging;
if ( $out->getUser()->isAnon() ) {
if ( $wgCentralAuthLoginWiki && wfWikiID() !== 
$wgCentralAuthLoginWiki ) {
+   // Let the frontend know if this is a mobile 
domain, T100413
+   $out->addJsConfigVars(
+   'wgCentralAuthMobileDomain',
+   self::isMobileDomain()
+   );
$out->addModules( 
'ext.centralauth.centralautologin' );
 
// For non-JS clients. Use WikiMap to avoid 
localization of the
diff --git a/modules/ext.centralauth.centralautologin.js 
b/modules/ext.centralauth.centralautologin.js
index 215888a..b99099f 100644
--- a/modules/ext.centralauth.centralautologin.js
+++ b/modules/ext.centralauth.centralautologin.js
@@ -27,6 +27,9 @@
url = mw.config.get( 'wgCentralAuthCheckLoggedInURL' );
if ( url ) {
url += '&proto=' + encodeURIComponent( 
location.protocol.replace( ':', '' ) );
+   if ( mw.config.get( 'wgCentralAuthMobileDomain' ) === true ) {
+   url += '&mobile=1';
+   }
if ( mw.config.get( 'wgCanonicalSpecialPageName' ) === 
'Userlogin' ) {
url += '&return=1';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib88ac635747db823fee7b38d92599ba7d50747bd
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: CSteipp 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Do not cache less variables in static function - change (mediawiki/core)

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

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

Change subject: Do not cache less variables in static function
..

Do not cache less variables in static function

This is a micro-optimisation that will cache LESS variables
on first lookup. Whenever the
environment changes, it is necessary thus to refresh them e.g. for
variables introduced via an extension.
This also allows tests to run whenever ResourceLoaderLESSVars is different
to an empty array
(note !array() == true)

Change-Id: I95506b8bb20a4b2b3f82014a7b0fcee5f28973e6
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/263147/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 1f3085a..71f3481 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -1622,11 +1622,8 @@
 * @return array Map of variable names to string CSS values.
 */
public static function getLessVars( Config $config ) {
-   if ( !self::$lessVars ) {
-   $lessVars = $config->get( 'ResourceLoaderLESSVars' );
-   Hooks::run( 'ResourceLoaderGetLessVars', array( 
&$lessVars ) );
-   self::$lessVars = $lessVars;
-   }
-   return self::$lessVars;
+   $lessVars = $config->get( 'ResourceLoaderLESSVars' );
+   Hooks::run( 'ResourceLoaderGetLessVars', array( &$lessVars ) );
+   return $lessVars;
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] Fix false inclusion of FULLPAGENAME on Special:MobileDiff - change (mediawiki...MobileFrontend)

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

Change subject: Fix false inclusion of FULLPAGENAME on Special:MobileDiff
..


Fix false inclusion of FULLPAGENAME on Special:MobileDiff

Bug: T122984
Change-Id: I04c8ddeafa9b30648def69f96210c4a72bbc26db
---
M includes/diff/InlineDifferenceEngine.php
1 file changed, 19 insertions(+), 4 deletions(-)

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



diff --git a/includes/diff/InlineDifferenceEngine.php 
b/includes/diff/InlineDifferenceEngine.php
index b101347..01054f9 100644
--- a/includes/diff/InlineDifferenceEngine.php
+++ b/includes/diff/InlineDifferenceEngine.php
@@ -77,15 +77,30 @@
$allowed = $this->isUserAllowedToSee();
$suppressed = $this->isSuppressedDiff();
 
+   // This IContextSource object will be used to get a 
message object for the
+   // messages used in this function. We need to to this 
to allow the message to
+   // get the correct value for the FULLPAGENAME inclusion 
(which is used in
+   // rev-suppressed-no-diff, e.g.). Otherwise it would 
use Special:MobileDiff as
+   // the target for 
Special:Log/delete?page=Special:MobileDiff/..., which isn't
+   // correct and very helpful. To fix this bug, we create 
a new context from the
+   // current one and set the title object (which we can 
get from the new revision).
+   // Bug: T122984
+   $context = new DerivativeContext( $this->getContext() );
+   $revision = $this->mNewRev;
+   $context->setTitle( $revision->getTitle() );
+
if ( !$allowed ) {
-   $msg = $suppressed ? 'rev-suppressed-no-diff' : 
'rev-deleted-no-diff';
-   $msg = wfMessage( $msg )->parse();
+   $msg = $context->msg(
+   $suppressed ? 'rev-suppressed-no-diff' 
: 'rev-deleted-no-diff'
+   )->parse();
} else {
# Give explanation and add a link to view the 
diff...
$query = $this->getRequest()->appendQueryValue( 
'unhide', '1', true );
$link = $this->getTitle()->getFullURL( $query );
-   $msg = $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff';
-   $msg = wfMessage( $msg, $link )->parse();
+   $msg = $context->msg(
+   $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff',
+   $link
+   )->parse();
}
}
return $msg;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04c8ddeafa9b30648def69f96210c4a72bbc26db
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace usage of deprecated OutputPage::setSquidMaxage - change (mediawiki...Wikibase)

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

Change subject: Replace usage of deprecated OutputPage::setSquidMaxage
..


Replace usage of deprecated OutputPage::setSquidMaxage

The new OutputPage::setCdnMaxage does exactly the same.

Change-Id: I587972094e5687672345057345019388f2748e2b
---
M repo/includes/specials/SpecialListProperties.php
M repo/includes/specials/SpecialWikibaseQueryPage.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/repo/includes/specials/SpecialListProperties.php 
b/repo/includes/specials/SpecialListProperties.php
index cd77797..5773c86 100644
--- a/repo/includes/specials/SpecialListProperties.php
+++ b/repo/includes/specials/SpecialListProperties.php
@@ -121,7 +121,7 @@
parent::execute( $subPage );
 
$output = $this->getOutput();
-   $output->setSquidMaxage( static::CACHE_TTL_IN_SECONDS );
+   $output->setCdnMaxage( static::CACHE_TTL_IN_SECONDS );
 
$this->prepareArguments( $subPage );
$this->showForm();
diff --git a/repo/includes/specials/SpecialWikibaseQueryPage.php 
b/repo/includes/specials/SpecialWikibaseQueryPage.php
index b8c19c4..333129a 100644
--- a/repo/includes/specials/SpecialWikibaseQueryPage.php
+++ b/repo/includes/specials/SpecialWikibaseQueryPage.php
@@ -84,7 +84,7 @@
parent::execute( $subPage );
 
$output = $this->getOutput();
-   $output->setSquidMaxage( static::CACHE_TTL_IN_SECONDS );
+   $output->setCdnMaxage( static::CACHE_TTL_IN_SECONDS );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I587972094e5687672345057345019388f2748e2b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Ricordisamoa 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Replace our MockSiteStore with MediaWiki's HashSiteStore - change (mediawiki...Wikibase)

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

Change subject: Replace our MockSiteStore with MediaWiki's HashSiteStore
..


Replace our MockSiteStore with MediaWiki's HashSiteStore

Bug: T91511
Change-Id: I7af91946408a213ef1026f16a4242c3eec031a25
---
M 
client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
M client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
M client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
M client/tests/phpunit/includes/OtherProjectsSitesGeneratorTest.php
M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php
M client/tests/phpunit/includes/WikibaseClientTest.php
D lib/tests/phpunit/MockSiteStore.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpFactoryProviderTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
M repo/tests/phpunit/includes/ChangeOp/MergeChangeOpsFactoryTest.php
M repo/tests/phpunit/includes/Diff/DiffViewTest.php
M repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/MergeItemsTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
M repo/tests/phpunit/includes/specials/SpecialMergeItemsTest.php
M repo/tests/phpunit/includes/specials/SpecialWikibaseRepoPageTestBase.php
M repo/tests/phpunit/maintenance/dumpRdfTest.php
25 files changed, 70 insertions(+), 155 deletions(-)

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



diff --git 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
index 69e102f..668417c 100644
--- 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
+++ 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
@@ -2,10 +2,11 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
+use TestSites;
 use Wikibase\Client\Hooks\OtherProjectsSidebarGeneratorFactory;
 use Wikibase\SettingsArray;
 use Wikibase\Test\MockRepository;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\OtherProjectsSidebarGeneratorFactory
@@ -27,7 +28,7 @@
) );
 
$siteLinkLookup = new MockRepository();
-   $siteStore = MockSiteStore::newFromTestSites();
+   $siteStore = new HashSiteStore( TestSites::getSites() );
 
$factory = new OtherProjectsSidebarGeneratorFactory(
$settings,
diff --git 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
index 0f94e46..b121789 100644
--- a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
+++ b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
@@ -2,14 +2,15 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
 use MediaWikiSite;
 use SiteStore;
 use Title;
+use TestSites;
 use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\SiteLink;
 use Wikibase\Lib\Store\SiteLinkLookup;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\OtherProjectsSidebarGenerator
@@ -87,7 +88,7 @@
 * @return SiteStore
 */
private function getSiteStore() {
-   $siteStore = MockSiteStore::newFromTestSites();
+   $siteStore = new HashSiteStore( TestSites::getSites() );
 
$site = new MediaWikiSite();
$site->setGlobalId( 'enwikiquote' );
diff --git 
a/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
index 4c7374f..b042b0c 100644
--- a/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
 use Language;
 use MediaWikiSite;
 use MediaWikiTestCase;
@@ -27,7 +28,6 @@
 use Wikibase\Settings;
 use Wikibase\SettingsArray;
 use Wikibase\Test\MockRepository;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers
@@ -65,7 +65,7 @@
 * @return SiteStore
 */
p

[MediaWiki-commits] [Gerrit] Switched to using "middle dot" as delim for all list values - change (mediawiki...Cargo)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Switched to using "middle dot" as delim for all list values
..


Switched to using "middle dot" as delim for all list values

Change-Id: Iba1e2b84485b5eb58ffe095766e8f39891ee1701
---
M CargoQueryDisplayer.php
1 file changed, 10 insertions(+), 1 deletion(-)

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



diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 1221a2e..551ab48 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -108,7 +108,16 @@
continue;
}
if ( $i > 0 ) {
-   $text .= "$delimiter ";
+   // Use a "middle dot" as
+   // the list delimiter -
+   // it's better than 
using
+   // a comma, or the
+   // defined delimiter,
+   // because it's more
+   // consistent and makes
+   // it clearer whether
+   // list parsing worked.
+   $text .= " · ";
}
$text .= 
self::formatFieldValue( $fieldValue, $fieldType, $fieldDescription, 
$this->mParser );
}

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

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

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


[MediaWiki-commits] [Gerrit] Switched to using "middle dot" as delim for all list values - change (mediawiki...Cargo)

2016-01-08 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Switched to using "middle dot" as delim for all list values
..

Switched to using "middle dot" as delim for all list values

Change-Id: Iba1e2b84485b5eb58ffe095766e8f39891ee1701
---
M CargoQueryDisplayer.php
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/46/263146/1

diff --git a/CargoQueryDisplayer.php b/CargoQueryDisplayer.php
index 1221a2e..551ab48 100644
--- a/CargoQueryDisplayer.php
+++ b/CargoQueryDisplayer.php
@@ -108,7 +108,16 @@
continue;
}
if ( $i > 0 ) {
-   $text .= "$delimiter ";
+   // Use a "middle dot" as
+   // the list delimiter -
+   // it's better than 
using
+   // a comma, or the
+   // defined delimiter,
+   // because it's more
+   // consistent and makes
+   // it clearer whether
+   // list parsing worked.
+   $text .= " · ";
}
$text .= 
self::formatFieldValue( $fieldValue, $fieldType, $fieldDescription, 
$this->mParser );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba1e2b84485b5eb58ffe095766e8f39891ee1701
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Fix &diff=0 being treated as a non-diff page - change (mediawiki...WikidataPageBanner)

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

Change subject: Fix &diff=0 being treated as a non-diff page
..


Fix &diff=0 being treated as a non-diff page

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

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



diff --git a/includes/WikidataPageBanner.hooks.php 
b/includes/WikidataPageBanner.hooks.php
index f4fa63a..283c5c0 100644
--- a/includes/WikidataPageBanner.hooks.php
+++ b/includes/WikidataPageBanner.hooks.php
@@ -83,7 +83,7 @@
}
$config = WikidataPageBannerFunctions::getWPBConfig();
$title = $out->getTitle();
-   $isDiff = $out->getRequest()->getVal( 'diff' );
+   $isDiff = $out->getRequest()->getCheck( 'diff' );
$wpbFunctionsClass = self::$wpbFunctionsClass;
 
// if banner-options are set and not a diff page, add banner 
anyway

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec6d08bff3a2c6976300a910f42b173efcaa2104
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikidataPageBanner
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Log URL changes to EventLogging if configured - change (mediawiki...SpamBlacklist)

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

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

Change subject: Log URL changes to EventLogging if configured
..

Log URL changes to EventLogging if configured

If enabled, changes in URLs on a page will be logged to the
"ExternalLinkChange" schema. To avoid extra lookups, the diff of URLs is
calculated during the filter step of the SpamBlacklist, and stored in
the SpamBlacklist instance state until the post-save hook is called, and
then they are queued to go to EventLogging.

Bug: T115119
Change-Id: I9a5378dca5ab473961f9fe8f7a6d929dc6d32bba
---
M SpamBlacklistHooks.php
M SpamBlacklist_body.php
M extension.json
3 files changed, 115 insertions(+), 8 deletions(-)


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

diff --git a/SpamBlacklistHooks.php b/SpamBlacklistHooks.php
index 45942ea..d6c76f7 100755
--- a/SpamBlacklistHooks.php
+++ b/SpamBlacklistHooks.php
@@ -218,7 +218,7 @@
 * @param bool $isWatch
 * @param string   $section
 * @param int  $flags
-* @param int  $revision
+* @param Revision $revision
 * @param Status   $status
 * @param int  $baseRevId
 *
@@ -237,14 +237,19 @@
Status $status,
$baseRevId
) {
-   if ( !BaseBlacklist::isLocalSource( $wikiPage->getTitle() ) ) {
-   return true;
+   if ( BaseBlacklist::isLocalSource( $wikiPage->getTitle() ) ) {
+   // This sucks because every Blacklist needs to be 
cleared
+   foreach ( BaseBlacklist::getBlacklistTypes() as $type 
=> $class ) {
+   $blacklist = BaseBlacklist::getInstance( $type 
);
+   $blacklist->clearCache();
+   }
}
 
-   // This sucks because every Blacklist needs to be cleared
-   foreach ( BaseBlacklist::getBlacklistTypes() as $type => $class 
) {
-   $blacklist = BaseBlacklist::getInstance( $type );
-   $blacklist->clearCache();
+
+   if ( $revision ) {
+   /** @var SpamBlacklist $spamBlacklist */
+   $spamBlacklist = BaseBlacklist::getInstance( 'spam' );
+   $spamBlacklist->doLogging( $user, 
$wikiPage->getTitle(), $revision );
}
 
return true;
diff --git a/SpamBlacklist_body.php b/SpamBlacklist_body.php
index 8c270f4..35f4a70 100644
--- a/SpamBlacklist_body.php
+++ b/SpamBlacklist_body.php
@@ -6,6 +6,20 @@
 
 class SpamBlacklist extends BaseBlacklist {
 
+   private $doEventLogging;
+
+   /**
+* @var array[]
+*/
+   private $urlChanges = array();
+
+   public function __construct( array $settings ) {
+   global $wgSpamBlacklistEventLogging;
+
+   parent::__construct( $settings );
+   $this->doEventLogging = $wgSpamBlacklistEventLogging
+   }
+
/**
 * Returns the code for the blacklist implementation
 *
@@ -61,6 +75,8 @@
wfDebugLog( 'SpamBlacklist', "New URLs: " . implode( ', 
', $newLinks ) );
wfDebugLog( 'SpamBlacklist', "Added URLs: " . implode( 
', ', $addedLinks ) );
 
+   $this->logUrlChanges( $oldLinks, $newLinks, $addedLinks 
);
+
$links = implode( "\n", $addedLinks );
 
# Strip whitelisted URLs from the match
@@ -116,6 +132,91 @@
}
 
/**
+* Diff added/removed urls and generate events for them
+*
+* @param string[] $oldLinks
+* @param string[] $newLinks
+* @param string[] $addedLinks
+*/
+   private function logUrlChanges( $oldLinks, $newLinks, $addedLinks ) {
+   if ( !$this->doEventLogging ) {
+   return;
+   }
+
+   $removedLinks = array_diff( $oldLinks, $newLinks );
+   foreach ( $addedLinks as $url ) {
+   $this->logUrlChange( $url, 'insert' );
+   }
+
+   foreach ( $removedLinks as $url ) {
+   $this->logUrlChange( $url, 'remove' );
+   }
+   }
+
+   /**
+* Actually push the url change events post-save
+*
+* @param User $user
+* @param Title $title
+* @param Revision $rev
+*/
+   public function doLogging( User $user, Title $title, Revision $rev ) {
+   if ( !$this->doEventLogging ) {
+   return;
+   }
+
+   $baseInfo = array(
+   'revId' => $rev->getId(),
+   'pageId' => $title->getArticleID(),
+   'pageNamespace' 

[MediaWiki-commits] [Gerrit] partman: Replaced Tab with spoces - change (operations/puppet)

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

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

Change subject: partman: Replaced  Tab with spoces
..

partman: Replaced  Tab with spoces

Change-Id: Iffdd2742cc12945baf9b0bd302a70e03188949cf
---
M modules/install_server/files/autoinstall/partman/raid0-lvm.cfg
1 file changed, 63 insertions(+), 63 deletions(-)


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

diff --git a/modules/install_server/files/autoinstall/partman/raid0-lvm.cfg 
b/modules/install_server/files/autoinstall/partman/raid0-lvm.cfg
index f0616ac..fadebaf 100644
--- a/modules/install_server/files/autoinstall/partman/raid0-lvm.cfg
+++ b/modules/install_server/files/autoinstall/partman/raid0-lvm.cfg
@@ -5,81 +5,81 @@
 # * GPT layout (large disks, > 2TB)
 # * layout:
 #   - /boot:  RAID1, 500MB
-#   - /:   ext3, RAID0, 50GB on LVM
-#   - swap:  RAID0, 1G on LVM
+#   - / :   ext3, RAID0, 50GB on LVM
+#   - swap:   RAID0, 1G on LVM
 #   - rest is lvm RAID0
 
-d-ipartman-auto/method string  raid
-d-ipartman-md/device_remove_md boolean true
-d-ipartman-lvm/device_remove_lvm   boolean true
+d-i partman-auto/method string  raid
+d-i partman-md/device_remove_md boolean true
+d-i partman-lvm/device_remove_lvm   boolean true
 
 # Use the first two disks
-d-ipartman-auto/disk   string  /dev/sda /dev/sdb /dev/sdc /dev/sdd
+d-i partman-auto/disk   string  /dev/sda /dev/sdb /dev/sdc /dev/sdd
 
 # Don't stop if method isn't provided, e.g. in non used LVs
-d-ipartman-basicmethods/method_onlyboolean false
+d-i partman-basicmethods/method_onlyboolean false
 
 # Define physical partitions
-d-ipartman-auto/expert_recipe  string  \
-   multiraid ::\
-   10  1   10  grub\
-   $gptonly{ } \
-   $bios_boot{ }   \
-   $primary{ } method{ biosgrub }  \
-   .   \
-   500 1   500 raid\
-   $primary{ } method{ raid }  \
-   $lvmignore{ }   \
-   .   \
-   500 2   -1  raid\
-   $primary{ } method{ raid }  \
-   $lvmignore{ }   \
-   .   \
-   5   4   5  ext3 \
-   $lvmok{ }   \
-   $defaultignore{ }   \
-   lv_name{ root } \
-   method{ format }\
-   format{ }   \
-   use_filesystem{ }   \
-   filesystem{ ext3 }  \
-   mountpoint{ / } \
-   .   \
-   10003   1000linux-swap  \
-   $defaultignore{ }   \
-   $lvmok{ }   \
-   lv_name{ swap } \
-   method{ swap }  \
-   format{ }   \
-   .   \
-   5000200 -1  ext4\
-   $defaultignore{ }   \
-   $lvmok{ } lv_name{ _placeholder }   \
-   method{ keep }  \
-   .
+d-i partman-auto/expert_recipe  string  \
+multiraid ::\
+10  1   10  grub\
+$gptonly{ } \
+$bios_boot{ }   \
+$primary{ } method{ biosgrub }  \
+.   \
+500 1   500 raid\
+$primary{ } method{ raid }  \
+$lvmignore{ }   \
+.   \
+500 2   -1  raid\
+$primary{ } method{ raid }  \
+$lvmignore{ }   \
+.   \
+5   4   5  ext3 \
+$lvmok{ }   \
+$defaultignore{ }   \
+lv_name{ root } \
+method{ format }\
+format{ }   \
+use_filesystem{ } 

[MediaWiki-commits] [Gerrit] Refine design on New Talk overlay (MobileFrontend) - change (mediawiki...MobileFrontend)

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

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

Change subject: Refine design on New Talk overlay (MobileFrontend)
..

Refine design on New Talk overlay (MobileFrontend)

Changed some paddings and margins for fields and panels on New
Talk overlay from Mobile Frontend.

Bug: T104836
Change-Id: I691de9834f116cbe6c2c3c4c79509ba419752ebf
---
M includes/Resources.php
A resources/mobile.talk.overlays/newTalkOverlay.less
M resources/mobile.talk.overlays/talkSectionAdd.hogan
3 files changed, 20 insertions(+), 1 deletion(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index d4af611..5ea2520 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -661,6 +661,9 @@

'resources/mobile.talk.overlays/TalkSectionAddOverlay.js',
'resources/mobile.talk.overlays/TalkOverlay.js',
),
+   'styles' => array(
+   'resources/mobile.talk.overlays/newTalkOverlay.less',
+   ),
'templates' => array(
// talk.js
'content.hogan' => 
'resources/mobile.talk.overlays/content.hogan',
diff --git a/resources/mobile.talk.overlays/newTalkOverlay.less 
b/resources/mobile.talk.overlays/newTalkOverlay.less
new file mode 100644
index 000..b86240e
--- /dev/null
+++ b/resources/mobile.talk.overlays/newTalkOverlay.less
@@ -0,0 +1,16 @@
+.newtalk-overlay {
+   .panel.save-panel {
+   padding: 1em;
+   }
+
+   .panel {
+   padding: 0;
+
+   input[type=text],
+   textarea {
+   padding: 16px 1em;
+   margin: 0;
+   border-radius: 0;
+   }
+   }
+}
\ No newline at end of file
diff --git a/resources/mobile.talk.overlays/talkSectionAdd.hogan 
b/resources/mobile.talk.overlays/talkSectionAdd.hogan
index e95e1c8..ddb7ec1 100644
--- a/resources/mobile.talk.overlays/talkSectionAdd.hogan
+++ b/resources/mobile.talk.overlays/talkSectionAdd.hogan
@@ -3,7 +3,7 @@
{{>saveHeader}}
 
 
-
+

{{{licenseMsg}}}


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

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

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


[MediaWiki-commits] [Gerrit] Fixed verification-error due to incorrect timeout handling - change (mediawiki...GWToolset)

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

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

Change subject: Fixed verification-error due to incorrect timeout handling
..

Fixed verification-error due to incorrect timeout handling

Passed timeout variable from config directly into fetchFile method
and removed the redundant timeout code from WikiChecks.

Bug: T11905
Change-Id: Ib57f74cd69864d3419120d4e4e862934f18862e2
---
M includes/Handlers/UploadHandler.php
M includes/Helpers/WikiChecks.php
2 files changed, 3 insertions(+), 24 deletions(-)


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

diff --git a/includes/Handlers/UploadHandler.php 
b/includes/Handlers/UploadHandler.php
index 2191d4b..7df5d2a 100644
--- a/includes/Handlers/UploadHandler.php
+++ b/includes/Handlers/UploadHandler.php
@@ -864,7 +864,6 @@
) {
// Initialize the upload object
$upload = new UploadFromUrl();
-   WikiChecks::increaseHTTPTimeout();
 
$upload->initialize(
$Title->getBaseText(),
@@ -872,8 +871,10 @@
false
);
 
+   $httpOptions['timeout'] = Config::$http_timeout;
+
// Fetch the file - returns a Status Object
-   $status = $upload->fetchFile();
+   $status = $upload->fetchFile( $httpOptions );
if ( !$status->isOk() ) {
$upload->cleanupTempFile();
return $status;
diff --git a/includes/Helpers/WikiChecks.php b/includes/Helpers/WikiChecks.php
index e771c40..6860a9f 100644
--- a/includes/Helpers/WikiChecks.php
+++ b/includes/Helpers/WikiChecks.php
@@ -172,28 +172,6 @@
}
 
/**
-* UploadFromUrl & Api->upload timeout on large files that take a long 
time
-* to upload without this setting
-*
-* wiki default is 25 seconds
-* e.g., 
http://academia.lndb.lv/xmlui/bitstream/handle/1/231/k_001_ktl1-1-27.jpg
-* @todo: what is this limit set to on production?
-* @todo: does ui need a notice to user about this limitation?
-*/
-   public static function increaseHTTPTimeout( $timeout = 0 ) {
-   global $wgHTTPTimeout;
-
-   if ( empty( $timeout ) ) {
-   $timeout = Config::$http_timeout;
-   }
-
-   if ( $wgHTTPTimeout < $timeout ) {
-   self::$wgHTTPTimeout = $wgHTTPTimeout;
-   $wgHTTPTimeout = $timeout;
-   }
-   }
-
-   /**
 * @param {SpecialPage} $SpecialPage
 * @return {Status}
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib57f74cd69864d3419120d4e4e862934f18862e2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GWToolset
Gerrit-Branch: master
Gerrit-Owner: Mhutti1 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: d1386ae..f26501b - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: d1386ae..f26501b
..

Syncronize VisualEditor: d1386ae..f26501b

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


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

diff --git a/VisualEditor b/VisualEditor
index d1386ae..f26501b 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d1386ae5b8f6d2599bdb16bb7cdfabe67a130c48
+Subproject commit f26501b4f6483f251b9d23c3700c007ff2d345a9

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife17863e0440de92dc2ddea4dd9fb4dc067035d3
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] Syncronize VisualEditor: d1386ae..f26501b - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: d1386ae..f26501b
..


Syncronize VisualEditor: d1386ae..f26501b

Change-Id: Ife17863e0440de92dc2ddea4dd9fb4dc067035d3
---
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 d1386ae..f26501b 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit d1386ae5b8f6d2599bdb16bb7cdfabe67a130c48
+Subproject commit f26501b4f6483f251b9d23c3700c007ff2d345a9

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ife17863e0440de92dc2ddea4dd9fb4dc067035d3
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] Fix long lines in WikiPageEntityStore - change (mediawiki...Wikibase)

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

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

Change subject: Fix long lines in WikiPageEntityStore
..

Fix long lines in WikiPageEntityStore

and fixed a typo in one of the exception messages

Change-Id: I2f3f18339dff3a414e9b23a18e43158c8b6e9b34
---
M repo/includes/store/sql/WikiPageEntityStore.php
1 file changed, 22 insertions(+), 4 deletions(-)


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

diff --git a/repo/includes/store/sql/WikiPageEntityStore.php 
b/repo/includes/store/sql/WikiPageEntityStore.php
index 746f024..e73aeed 100644
--- a/repo/includes/store/sql/WikiPageEntityStore.php
+++ b/repo/includes/store/sql/WikiPageEntityStore.php
@@ -119,7 +119,13 @@
 * @throws StorageException
 * @return EntityRevision
 */
-   public function saveEntity( EntityDocument $entity, $summary, User 
$user, $flags = 0, $baseRevId = false ) {
+   public function saveEntity(
+   EntityDocument $entity,
+   $summary,
+   User $user,
+   $flags = 0,
+   $baseRevId = false
+   ) {
if ( $entity->getId() === null ) {
if ( ( $flags & EDIT_NEW ) !== EDIT_NEW ) {
throw new StorageException( Status::newFatal( 
'edit-gone-missing' ) );
@@ -131,7 +137,11 @@
$content = $this->contentFactory->newFromEntity( $entity );
$revision = $this->saveEntityContent( $content, $summary, 
$user, $flags, $baseRevId );
 
-   $entityRevision = new EntityRevision( $entity, 
$revision->getId(), $revision->getTimestamp() );
+   $entityRevision = new EntityRevision(
+   $entity,
+   $revision->getId(),
+   $revision->getTimestamp()
+   );
 
$this->dispatcher->dispatch( 'entityUpdated', $entityRevision );
 
@@ -151,7 +161,13 @@
 * @throws StorageException
 * @return int The new revision ID
 */
-   public function saveRedirect( EntityRedirect $redirect, $summary, User 
$user, $flags = 0, $baseRevId = false ) {
+   public function saveRedirect(
+   EntityRedirect $redirect,
+   $summary,
+   User $user,
+   $flags = 0,
+   $baseRevId = false
+   ) {
$content = $this->contentFactory->newFromRedirect( $redirect );
 
if ( !$content ) {
@@ -264,7 +280,9 @@
$ok = $page->doDeleteArticle( $reason, false, 0, true, $error, 
$user );
 
if ( !$ok ) {
-   throw new StorageException( 'Faield to delete ' . 
$entityId->getSerialization(). ': ' . $error );
+   throw new StorageException(
+   'Failed to delete ' . 
$entityId->getSerialization(). ': ' . $error
+   );
}
 
$this->dispatcher->dispatch( 'entityDeleted', $entityId );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f3f18339dff3a414e9b23a18e43158c8b6e9b34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Override source-is-missing for resources/lib/jquery/jquery.v... - change (mediawiki/debian)

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

Change subject: Override source-is-missing for 
resources/lib/jquery/jquery.validate.js
..


Override source-is-missing for resources/lib/jquery/jquery.validate.js

Change-Id: I6c5b848148c801af9b4dc7270dd7548c02d43ff8
---
M source/lintian-overrides
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/source/lintian-overrides b/source/lintian-overrides
index 65284de..b3ecd69 100644
--- a/source/lintian-overrides
+++ b/source/lintian-overrides
@@ -1,2 +1,3 @@
 # lintian bug
 mediawiki: source-is-missing vendor/oojs/oojs-ui/demos/pages/dialogs.js
+mediawiki: source-is-missing resources/lib/jquery/jquery.validate.js

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c5b848148c801af9b4dc7270dd7548c02d43ff8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] Override source-is-missing for resources/lib/jquery/jquery.v... - change (mediawiki/debian)

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

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

Change subject: Override source-is-missing for 
resources/lib/jquery/jquery.validate.js
..

Override source-is-missing for resources/lib/jquery/jquery.validate.js

Change-Id: I6c5b848148c801af9b4dc7270dd7548c02d43ff8
---
M source/lintian-overrides
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/82/263082/1

diff --git a/source/lintian-overrides b/source/lintian-overrides
index 65284de..b3ecd69 100644
--- a/source/lintian-overrides
+++ b/source/lintian-overrides
@@ -1,2 +1,3 @@
 # lintian bug
 mediawiki: source-is-missing vendor/oojs/oojs-ui/demos/pages/dialogs.js
+mediawiki: source-is-missing resources/lib/jquery/jquery.validate.js

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c5b848148c801af9b4dc7270dd7548c02d43ff8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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] Fix lead section handling in MobileFrontend - change (mediawiki...MobileFrontend)

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

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

Change subject: Fix lead section handling in MobileFrontend
..

Fix lead section handling in MobileFrontend

Page#getLeadSectionElement always assumes, that the lead section is wrapped in 
the
first div element under the .content class div element. This, in fact, isn't 
true,
it depends on more settings, because the lead section is makred within the 
process
of marking the expandable sections (which isn't done on special pages, category 
pages
and so on). In fact, getLeadSectionElement never worked reliable and the worst 
case
scenario would be "don't trust the value". This especailly makes problems for 
the editor,
which uses this information to determine where to link the top ca-edit button 
to. This
could result in the problem, that the top/lead section can't be edited, if the 
first div
element is empty (because it's not the "real" lead section (because it's not 
marked)).

This change rewrites the code a little bit, which handles the marking of the 
lead section
and the expandable section headings. Now, the lead section is always marked, no 
matter,
if expandable sections are enabled on this page or not. Furthermore, instead of 
relying
on the amount of div containers (which is very fuzzy), 
Page#getLeadSectionElement now uses
a newly added class for the lead section (mw-mobilefrontend-leadsection) to 
always return
the correct lead section element.

Bug: T122471
Change-Id: I310822cffd43115d56c1b253e564f79ca0acdf79
---
M includes/MobileFormatter.php
M resources/mobile.startup/Page.js
2 files changed, 43 insertions(+), 12 deletions(-)


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

diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index 3a9f0d8..573aefc 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -9,7 +9,7 @@
 class MobileFormatter extends HtmlFormatter {
/** @var string $pageTransformStart String prefixes to be
applied at start and end of output from Parser */
-   protected $pageTransformStart = '';
+   protected $pageTransformStart = '';
/** @var string $pageTransformEnd String prefixes to be
applied at start and end of output from Parser */
protected $pageTransformEnd = '';
@@ -272,14 +272,43 @@
);
}
 
-   // Makes sections expandable
+   // --- Start Lead section marker and enable expandable sections 
---
+
+   // $tagRegEx is a regex filter for any heading with the passed 
tagName.
$tagRegEx = '<' . $tagName . '.*';
+   // set the limit for the preg_replace call. In general, this is 
controlled by the  value,
+   // if expandable sections are enabled or not. If not, we have 
to make sure, that the lead
+   // section is marked correctly, so we loop through the matches, 
but limit it to 1 (which
+   // is the lead section marking). - bug T122471
+   $limit = $this->expandableSections ? -1 : 1;
+   // start the html with the lead section marker (div element)
$s = $this->pageTransformStart .
-   preg_replace(
-   '%(' . $tagRegEx . ')%sU', 
$this->headingTransformStart . '\1' . $this->headingTransformEnd,
-   $s
-   ) .
-   $this->pageTransformEnd;
+   preg_replace_callback(
+   '%(' . $tagRegEx . ')%sU', function ( $matches 
) {
+   // if the sections should be 
expandable, enable them
+   if ( $this->expandableSections ) {
+   return 
$this->headingTransformStart .
+   $matches[0] . 
$this->headingTransformEnd;
+   } else {
+   // otherwise, simply close the 
lead section div (this should be the
+   // first and last run for this 
function) and add the heading (the matched
+   // text), so we don't loose one
+   return 
$this->headingTransformStart . $matches[0];
+   }
+   },
+   $s,
+   // the limit we set earlier
+   $limit
+   );
+
+   // we need to close the div elements properly (inside the page 
html, the function inside
+   // preg_replace_callbac

[MediaWiki-commits] [Gerrit] Add a composer.local.json-sample - change (mediawiki/core)

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

Change subject: Add a composer.local.json-sample
..


Add a composer.local.json-sample

Bug: T122968
Change-Id: Ib13417b0c29b6fd2b3aaea6808fde3f3c12393e6
---
A composer.local.json-sample
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/composer.local.json-sample b/composer.local.json-sample
new file mode 100644
index 000..1315afc
--- /dev/null
+++ b/composer.local.json-sample
@@ -0,0 +1,9 @@
+{
+   "extra": {
+   "merge-plugin": {
+   "include": [
+   "extensions/example/composer.json"
+   ]
+   }
+   }
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib13417b0c29b6fd2b3aaea6808fde3f3c12393e6
Gerrit-PatchSet: 9
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ananay 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Ananay 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Hashar 
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] Modifies Play button and layover because the previous layove... - change (mediawiki...Graph)

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

Change subject: Modifies Play button and layover because the previous layover 
was hiding the static graph
..


Modifies Play button and layover because the previous layover was hiding the 
static graph

Bug: T120146
Change-Id: I3ab1deb9b491bf51ed161ec21094c3d3792690f5
---
M i18n/en.json
M i18n/qqq.json
M includes/Graph.body.php
A includes/ajax-loader.gif
M modules/graph-loader.js
M styles/common.less
6 files changed, 61 insertions(+), 49 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 70c9085..26531d8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -46,9 +46,5 @@
"graph-ve-dialog-edit-unknown-graph-type-warning": "The type of this 
graph is unsupported, and any modifications made to it may break its display. 
Please edit the graph through the raw data specification on the 
\"{{int:graph-ve-dialog-edit-page-raw}}\" tab.",
"graph-ve-no-spec": "No graph specification found",
"graph-ve-vega-error": "Vega has encountered an error rendering this 
graph",
-   "graph-ve-vega-error-no-render": "Vega was unable to render this graph",
-   "graph-interactive-title": "Interactive",
-   "graph-switch-button": "Play",
-   "graph-loading": "Loading...",
-   "graph-loading-done": "Done!"
+   "graph-ve-vega-error-no-render": "Vega was unable to render this graph"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index f63546c..a8222fb 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -48,9 +48,5 @@
"graph-ve-dialog-edit-unknown-graph-type-warning": "Warning label about 
unsupported graph types",
"graph-ve-no-spec": "Label to display on a graph node when no spec is 
found",
"graph-ve-vega-error": "Label to display on a graph node when Vega 
encounters an unknown error",
-   "graph-ve-vega-error-no-render": "Label to display on a graph node when 
Vega is unable to render",
-   "graph-interactive-title": "Label to display on the layover to indicate 
interactive graph",
-   "graph-switch-button": "Button to turn the static graph image into an 
interactive graph\n{{Identical|Play}}",
-   "graph-loading": "Label to indicate when the interactive graph is 
loading\n{{Identical|Loading}}",
-   "graph-loading-done": "Label to indicate when the interactive graph has 
loaded\n{{Identical|Done}}"
+   "graph-ve-vega-error-no-render": "Label to display on a graph node when 
Vega is unable to render"
 }
diff --git a/includes/Graph.body.php b/includes/Graph.body.php
index 6cf80c6..0c06206 100644
--- a/includes/Graph.body.php
+++ b/includes/Graph.body.php
@@ -204,7 +204,9 @@
$url = sprintf( $wgGraphImgServiceUrl, $server, $title, 
$revid, $hash );
$html = Html::rawElement( 'img', array(
'class' => 'mw-graph-img',
-   'src' => $url
+   'src' => $url,
+   'alt' => $graphTitle,
+   'title' => $graphTitle,
) );
 
if ( $isInteractive ) {
@@ -213,21 +215,19 @@
$attribs = self::buildDivAttributes( 
'interactable', $data, $hash );
 
// Add a "make interactive" button
-   $buttonSpan = Html::rawElement( 'span', null, 
wfMessage( 'graph-switch-button' )->inContentLanguage()->text() );
$buttonIcon = Html::rawElement( 'i', array( 
'class' => 'icon-play' ), '►' );
 
$button = Html::rawElement( 'div', array(
'class' => 'mw-graph-switch',
-   ), $buttonIcon . $buttonSpan );
+   ), $buttonIcon );
 
-   $layoverContent =
-   Html::rawElement( 'p', null, wfMessage( 
'graph-interactive-title' )->inContentLanguage()->text() ) .
-   Html::element( 'p', array( 'class' => 
'mw-graph-title' ), $graphTitle ) .
-   Html::rawElement( 'div', null, $button 
);
+   $hoverTitle = Html::element( 'div', array( 
'class' => 'mw-graph-hover-title' ), $graphTitle );
+
+   $layoverContent = $hoverTitle . $button;
 
$layover = Html::rawElement( 'div', array(
'class' => 'mw-graph-layover',
-   ), Html::rawElement( 'div', null, 
$layoverContent ) );
+   ), $layoverContent );
 
$html .= $layover;
   

[MediaWiki-commits] [Gerrit] Use ar_page_id in Special:Undelete - change (mediawiki/core)

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

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

Change subject: Use ar_page_id in Special:Undelete
..

Use ar_page_id in Special:Undelete

Bug: T28123
Change-Id: I79e3f7cd155634336d23fce445d91538641c9022
---
M includes/specials/SpecialUndelete.php
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/80/263080/1

diff --git a/includes/specials/SpecialUndelete.php 
b/includes/specials/SpecialUndelete.php
index aada064..53dc71c 100644
--- a/includes/specials/SpecialUndelete.php
+++ b/includes/specials/SpecialUndelete.php
@@ -567,9 +567,14 @@
if ( !$unsuppress && ( $row->ar_deleted & 
Revision::DELETED_TEXT ) ) {
return Status::newFatal( "undeleterevdel" );
}
-   // Safe to insert now...
-   $newid = $article->insertOn( $dbw );
-   $pageId = $newid;
+   // Safe to insert now
+   if ( $row->ar_page_id ) {
+   $newid = $row->ar_page_id->insertOn( $dbw );
+   $pageId = $newid;
+   } else {
+   $newid = $article->insertOn( $dbw );
+   $pageId = $newid;
+   }
} else {
// Check if a deleted revision will become the current 
revision...
if ( $row->ar_timestamp > $previousTimestamp ) {

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

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

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


[MediaWiki-commits] [Gerrit] Fix watch file - change (mediawiki/debian)

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

Change subject: Fix watch file
..


Fix watch file

The trailing \ at the end was preventing uscan from doing anything.

Change-Id: I041229d9e2cb5e24b0d5694da7fe66d51aa0d300
---
M watch
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/watch b/watch
index c448cf6..b62f727 100644
--- a/watch
+++ b/watch
@@ -1,4 +1,4 @@
 version=3
 
 opts="dversionmangle=s/^[0-9]+://;s/\+dfsg$//,pgpsigurlmangle=s/$/.sig/" \
-https://releases.wikimedia.org/mediawiki/1.25/ mediawiki-([0-9.]*).tar.gz \
+https://releases.wikimedia.org/mediawiki/1.25/ mediawiki-([0-9.]*).tar.gz

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I041229d9e2cb5e24b0d5694da7fe66d51aa0d300
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] Fix a bunch of executable-not-elf-or-script lintian warnings - change (mediawiki/debian)

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

Change subject: Fix a bunch of executable-not-elf-or-script lintian warnings
..


Fix a bunch of executable-not-elf-or-script lintian warnings

All of these have been fixed upstream, but weren't included in 1.25.5.

Change-Id: I333409ebafbfbc9885eb1d30c489e2e2bf919c28
---
M rules
1 file changed, 101 insertions(+), 0 deletions(-)

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



diff --git a/rules b/rules
index 667ce50..38cad33 100755
--- a/rules
+++ b/rules
@@ -11,6 +11,107 @@
chmod a-x 
debian/mediawiki/usr/share/mediawiki/maintenance/dev/includes/php.sh
chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/profiler/ProfilerSectionOnly.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/jobqueue/jobs/EnqueueJob.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Query/SimpleQueryStringTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/align-center.svg
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Suggest/CandidateGenerator/DirectGenerator.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdDataInterface.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/smaller-ltr.svg
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Sum.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Missing.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/DateRangeTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Bulk/Action/AbstractDocument.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/TermsTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Query/CommonTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Filter/Indices.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/ClientTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/RangeTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Node/Info.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/CardinalityTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Suggest/TermTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/IndexTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Query/SimpleQueryString.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Suggest/Term.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Cardinality.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/NestedTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Type/MappingTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Histogram.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/BulkTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/GeoDistanceTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Index/Status.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/align-float-left.svg
+   chmod a-x 
debian/mediawiki/usr/share/med

[MediaWiki-commits] [Gerrit] tor: set family config option - change (operations/puppet)

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

Change subject: tor: set family config option
..


tor: set family config option

"If you do decide to run more than one relay, please
set the "MyFamily" config option in the torrc of each relay,
listing all the relays (comma-separated) that are under your control:

MyFamily $fingerprint1,$fingerprint2,$fingerprint3

where each fingerprint is the 40 character identity fingerprint
(without spaces).

That way clients will know to avoid using more than one of your relays
in a single circuit. You should set MyFamily if you have administrative
control of the computers or of their network, even if they're not all
in the same geographic location."

https://www.torproject.org/docs/faq.html.en

Change-Id: I25cb2aa2794ae5ca35183b4db02b978331567911
---
M modules/tor/templates/torrc.erb
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/modules/tor/templates/torrc.erb b/modules/tor/templates/torrc.erb
index 07dfe8c..980d234 100644
--- a/modules/tor/templates/torrc.erb
+++ b/modules/tor/templates/torrc.erb
@@ -35,12 +35,10 @@
 # admin mail contact
 ContactInfo <%= @contact %>
 
-# if we run more than one relay we should set this
-# get it from /var/lib/tor/fingerprint
 # "You should set MyFamily if you have administrative control
 # of the computers or of their network, even if they're not
 # all in the same geographic location."
-# MyFamily $fingerprint1,$fingerprint2,$fingerprint3
+MyFamily 
DB19E709C9EDB903F75F2E6CA95C84D637B62A02,265E5ABBF2E5846443901E878146060148EFEA44
 
 # "try to write to disk less frequently than we would otherwise"
 # we enable this because we are on a box with SSD

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

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

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


[MediaWiki-commits] [Gerrit] Modifies Play button and layover because the previous layove... - change (mediawiki...Graph)

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

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

Change subject: Modifies Play button and layover because the previous layover 
was hiding the static graph
..

Modifies Play button and layover because the previous layover was hiding the 
static graph

Change-Id: I3ab1deb9b491bf51ed161ec21094c3d3792690f5
---
M includes/Graph.body.php
A includes/ajax-loader.gif
M modules/graph-loader.js
M styles/common.less
4 files changed, 59 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Graph 
refs/changes/79/263079/1

diff --git a/includes/Graph.body.php b/includes/Graph.body.php
index 6cf80c6..0c06206 100644
--- a/includes/Graph.body.php
+++ b/includes/Graph.body.php
@@ -204,7 +204,9 @@
$url = sprintf( $wgGraphImgServiceUrl, $server, $title, 
$revid, $hash );
$html = Html::rawElement( 'img', array(
'class' => 'mw-graph-img',
-   'src' => $url
+   'src' => $url,
+   'alt' => $graphTitle,
+   'title' => $graphTitle,
) );
 
if ( $isInteractive ) {
@@ -213,21 +215,19 @@
$attribs = self::buildDivAttributes( 
'interactable', $data, $hash );
 
// Add a "make interactive" button
-   $buttonSpan = Html::rawElement( 'span', null, 
wfMessage( 'graph-switch-button' )->inContentLanguage()->text() );
$buttonIcon = Html::rawElement( 'i', array( 
'class' => 'icon-play' ), '►' );
 
$button = Html::rawElement( 'div', array(
'class' => 'mw-graph-switch',
-   ), $buttonIcon . $buttonSpan );
+   ), $buttonIcon );
 
-   $layoverContent =
-   Html::rawElement( 'p', null, wfMessage( 
'graph-interactive-title' )->inContentLanguage()->text() ) .
-   Html::element( 'p', array( 'class' => 
'mw-graph-title' ), $graphTitle ) .
-   Html::rawElement( 'div', null, $button 
);
+   $hoverTitle = Html::element( 'div', array( 
'class' => 'mw-graph-hover-title' ), $graphTitle );
+
+   $layoverContent = $hoverTitle . $button;
 
$layover = Html::rawElement( 'div', array(
'class' => 'mw-graph-layover',
-   ), Html::rawElement( 'div', null, 
$layoverContent ) );
+   ), $layoverContent );
 
$html .= $layover;
} else {
diff --git a/includes/ajax-loader.gif b/includes/ajax-loader.gif
new file mode 100644
index 000..c519155
--- /dev/null
+++ b/includes/ajax-loader.gif
Binary files differ
diff --git a/modules/graph-loader.js b/modules/graph-loader.js
index 49a5506..a9163af 100644
--- a/modules/graph-loader.js
+++ b/modules/graph-loader.js
@@ -12,8 +12,8 @@
 
// Add a class to decorate loading
$button.hide()
+   .html( '' )
.addClass( 'mw-graph-loading' )
-   .text( mw.message( 'graph-loading' ).text() )
.show();
 
// Replace the image with the graph
@@ -39,15 +39,10 @@
hash: $el.data( 'graphId' )
} ).done( function ( data ) {
mw.drawVegaGraph( $el[ 0 ], data.graph, 
function ( error ) {
-   var $button = $el.find( 
'.mw-graph-switch' ),
-   $layover = $el.find( 
'.mw-graph-layover' );
+   var $layover = $el.find( 
'.mw-graph-layover' );
if ( !error ) {
$el.find( 'img' 
).remove();
-   $button.text( 
mw.message( 'graph-loading-done' ).text() );
-   setTimeout( function () 
{
-   
$layover.remove();
-   
$el.removeClass( 'mw-graph-loading mw-graph-interactable' );
-   }, 800 );
+   

[MediaWiki-commits] [Gerrit] setup shell/sudo access for new employee Luca Toscano - change (operations/puppet)

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

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

Change subject: setup shell/sudo access for new employee Luca Toscano
..

setup shell/sudo access for new employee Luca Toscano

This patchset includes both sudo and non-sudo access groups.  As such,
this has to be in the operations meeting review before it is merged.

DO NOT MERGE THIS WITHOUT REVIEW OF OPERATIONS TEAM MEETING AND REVIEW
OF THE TASK.

Bug:T122925
Change-Id: I7c344cca5ee57b0e4b40091dc099e3687606fac8
---
M modules/admin/data/data.yaml
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/263078/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 177faa2..bf15c6c 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -75,7 +75,7 @@
   pcoombe, mholloway-shell, madhuvishy, niedzielski, 
neilpquinn-wmf,
   gpaumier, moushira, aklapper, qchris, tjones, srijan, addshore,
   jminor, pt1979, asherman, etonkovidova, sbisson, zhousquared,
-  vbaranetsky, atgomez, jgirault, jdrewniak, matmarex]
+  vbaranetsky, atgomez, jgirault, jdrewniak, matmarex, elukey]
   cassandra-test-roots:
 gid: 708
 description: users with root on cassandra hosts
@@ -113,7 +113,7 @@
   mforns, jdlrobson, dr0ptp4kt, tgr, marktraceur, jhernandez, joal,
   daisy, tomasz, mholloway-shell, madhuvishy, ebernhardson, 
niedzielski,
   neilpquinn-wmf, tbayer, moushira, dbrant, maxsem, srijan, 
krenair,
-  jminor, asherman, etonkovidova, sbisson, addshore, matmarex]
+  jminor, asherman, etonkovidova, sbisson, addshore, matmarex, 
elukey]
   ldap-admins:
 gid: 715
 description: ldap admins
@@ -230,7 +230,7 @@
  Hadoop NameNodes.  Some files in HDFS have sensitive data in 
them.
  Those files are group readable by the 
analytics-privatedata-users group.
 members: [dartar, milimetric, yurik, dfoy,
-  halfak, dr0ptp4kt, tnegrin, ironholds, bearloga, cwdent,
+  halfak, dr0ptp4kt, tnegrin, ironholds, bearloga, cwdent, elukey,
   kleduc, nuria, haithams, otto, deskana, zhousquared,
   bsitzmann, dbrant, declerambaul, ellery, nettrom, leila,
   ezachte, mforns, reedy, west1, phuedx, awight, spage, junikowski,
@@ -243,14 +243,14 @@
 description: Admin access to analytics cluster.
  This will grant shell access on all Analytics Cluster nodes, 
as well
  as the ability to sudo to certain Analytics Cluster system 
users.
-members: [joal, madhuvishy]
+members: [joal, madhuvishy, elukey]
 privileges: ['ALL = (hdfs)  NOPASSWD: ALL',
  'ALL = (oozie) NOPASSWD: ALL',
  'ALL = (hive)  NOPASSWD: ALL']
   eventlogging-admins:
 gid: 733
 description: Login access for EventLogging deployment and investigation
-members: [nuria, milimetric, mforns, joal, legoktm, otto, madhuvishy]
+members: [nuria, milimetric, mforns, joal, legoktm, otto, madhuvishy, 
elukey]
   citoid-roots:
 gid: 735
 description: rights for debugging citoid
@@ -1736,3 +1736,10 @@
 realname: Casey Dentinger
 ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAABAQDhB5NxsYxf82q8N2/xUZXRUJNlgUB8moiLxFnrS8989pXs4wiilEFpYgMIZ0V30lu7xIeHzCWdJYEq0ySeQ8Wm5BVdM8APpiLZ4YNheG+gTtRaESSjyj6x/VcCxLjiXwzuXSEikmwXKhXeVFIO8s2FaOrb3JYizaWJxbA6DAQiD3ILR8pjuJtaUkZcmVO86qjdOFGqeRMMB1kVye9JYDRYow8QM13v0TDeP+5EY+6yTG5jlGNscTwYO6Xn/BPi+LS/X1AJYQ6qmWjUky3g6TJEREDmpZBmSfl5bGWBVohOZLuQWTxXAuQ/a5tuCbF+fVsJLZv4dRlEINgxyuEbTSwN]
 uid: 12179
+  elukey:
+ensure: present
+gid: 500
+name: elukey
+realname: Luca Toscano
+ssh_keys: [ssh-rsa 
B3NzaC1yc2EDAQABAAACAQC9rdkfGRw7mI6lt3UfwWcsWBn+qOV+xx7VhI5vB4rcjSgbiO8sI5aEpdOTHTsQm1DEIth3JzaJ66H5UAkUJrFHyDxbfqhoghOLe1+DTy3At/WldmP8QEuBGJZ2GDdhJvU0LyMd7eFVl8poQBWeVPz7Ds+9IFDc41YmCUNGJb0Z/Vwu8IkIutVFe58e3Q2hwAOgtta+QwT1x6TSzoQC+ElOkBxl+8XPjK1/lJ8+VK1HHpL8rl3XzGB4XEhLecVtnzLAkkm6qRvGV0iCTbDyF1VBDytcPIvMW+2NX4jcYXOj9C4zHMLdLLHjQr/4BuDEXa7WJQw4h+8I7/UjTC7FtSUt5OB2/pr9SPssLhHZaw3kQ3vwNTz7u6Fq0jX4c+cN0VDnnjF78cI77RmxbUZ4RPyTa9nrS+738utJ4fh06qNpx+B3tCq1Fu//PU5MepQq5zPczU4KUEBceQuzjXexpoXT5XOoMnZfWs3xhYzAyv9lmYC+RSq7+ZXHR5GH+DdRv1OOuJjVvWRSErav5kZ0g0SE/8tJ+QQUV4e4TldP+ru3sB34VGnAdrhnyoUQYKhFCv3iW6NA9KzceY+Fm6PWUQKXLjHYaL+Q2v9SrAztfQvzOUdxNre8GSXIanQLg/LSCYMd3SuLqBjlxCDm3Xed+T7zmNjAdLWD9gfnVxQwxZ0KNw==
 ltoscano@ltoscanowmf1553.local]
+uid: 13926

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

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

[MediaWiki-commits] [Gerrit] Fix watch file - change (mediawiki/debian)

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

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

Change subject: Fix watch file
..

Fix watch file

The trailing \ at the end was preventing uscan from doing anything.

Change-Id: I041229d9e2cb5e24b0d5694da7fe66d51aa0d300
---
M watch
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/77/263077/1

diff --git a/watch b/watch
index c448cf6..b62f727 100644
--- a/watch
+++ b/watch
@@ -1,4 +1,4 @@
 version=3
 
 opts="dversionmangle=s/^[0-9]+://;s/\+dfsg$//,pgpsigurlmangle=s/$/.sig/" \
-https://releases.wikimedia.org/mediawiki/1.25/ mediawiki-([0-9.]*).tar.gz \
+https://releases.wikimedia.org/mediawiki/1.25/ mediawiki-([0-9.]*).tar.gz

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I041229d9e2cb5e24b0d5694da7fe66d51aa0d300
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
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] Fix a bunch of executable-not-elf-or-script lintian warnings - change (mediawiki/debian)

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

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

Change subject: Fix a bunch of executable-not-elf-or-script lintian warnings
..

Fix a bunch of executable-not-elf-or-script lintian warnings

All of these have been fixed upstream, but weren't included in 1.25.5.

Change-Id: I333409ebafbfbc9885eb1d30c489e2e2bf919c28
---
M rules
1 file changed, 101 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/76/263076/1

diff --git a/rules b/rules
index 667ce50..38cad33 100755
--- a/rules
+++ b/rules
@@ -11,6 +11,107 @@
chmod a-x 
debian/mediawiki/usr/share/mediawiki/maintenance/dev/includes/php.sh
chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/profiler/ProfilerSectionOnly.php
chmod a-x 
debian/mediawiki/usr/share/mediawiki/includes/jobqueue/jobs/EnqueueJob.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdData.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Query/SimpleQueryStringTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/align-center.svg
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Suggest/CandidateGenerator/DirectGenerator.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/liuggio/statsd-php-client/src/Liuggio/StatsdClient/Entity/StatsdDataInterface.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/smaller-ltr.svg
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Sum.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Missing.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/DateRangeTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Bulk/Action/AbstractDocument.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Filter/TermsTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Query/CommonTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Filter/Indices.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/ClientTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/RangeTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Node/Info.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/CardinalityTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeohashGrid.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/GeoDistance.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Node/InfoTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Suggest/TermTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/IndexTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Avg.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Query/SimpleQueryString.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Suggest/Term.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Cardinality.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/NestedTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Type/MappingTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Aggregation/Histogram.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/BulkTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/test/lib/Elastica/Test/Aggregation/GeoDistanceTest.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/ruflin/elastica/lib/Elastica/Index/Status.php
+   chmod a-x 
debian/mediawiki/usr/share/mediawiki/vendor/oojs/oojs-ui/src/themes/mediawiki/images/icons/align-floa

[MediaWiki-commits] [Gerrit] DynamicPageListHooks: Set parser context title - change (mediawiki...intersection)

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

Change subject: DynamicPageListHooks: Set parser context title
..


DynamicPageListHooks: Set parser context title

This avoids the use of $wgTitle inside the Parser class.

Bug: T25307
Change-Id: I17cb16fc3f9912cff1832d7eec09c4d9048f146c
---
M DynamicPageList.hooks.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/DynamicPageList.hooks.php b/DynamicPageList.hooks.php
index 7abe1ae..38bb697 100644
--- a/DynamicPageList.hooks.php
+++ b/DynamicPageList.hooks.php
@@ -69,6 +69,7 @@
$parameters = explode( "\n", $input );
 
$parser = new Parser;
+   $parser->setTitle( $mwParser->getTitle() );
$poptions = new ParserOptions;
 
foreach ( $parameters as $parameter ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17cb16fc3f9912cff1832d7eec09c4d9048f146c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/intersection
Gerrit-Branch: master
Gerrit-Owner: TTO 
Gerrit-Reviewer: Brian Wolff 
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] Remove unused method. - change (apps...wikipedia)

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

Change subject: Remove unused method.
..


Remove unused method.

Slipped by me in the previous patch.

Change-Id: Id1236f8e7923d7166a3ce72d1a704f1c9efae0ff
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
1 file changed, 0 insertions(+), 14 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 1cdebad..115fa71 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -551,20 +551,6 @@
 updateProgressBar(false, true, 0);
 }
 
-/**
- * Remove the fragment that is currently at the top of the backstack, and 
go back to
- * the previous fragment.
- */
-public void popFragment() {
-getSupportFragmentManager().popBackStack();
-// make sure the ActionBar is showing, since we could be currently 
scrolled down far enough
-// within a Page fragment that the ActionBar is hidden, and if the 
previous fragment was
-// a different type of fragment (e.g. History), the ActionBar would 
remain hidden.
-showToolbar();
-//also make sure the progress bar is not showing
-updateProgressBar(false, true, 0);
-}
-
 public void resetAfterClearHistory() {
 removeAllFragments();
 Prefs.clearTabs();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1236f8e7923d7166a3ce72d1a704f1c9efae0ff
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [Spreadsheet] Update Jenkins tests - change (integration/config)

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

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

Change subject: [Spreadsheet] Update Jenkins tests
..

[Spreadsheet] Update Jenkins tests

Add npm and composer-test test.

Replace jslint test with jshint and jsonlint for non-whitelisted users and
move to check:

Change-Id: Iff49562bb3aa4f983859cf5eb27a6e2837ba2cf8
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/75/263075/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0255d64..4798c32 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -909,7 +909,6 @@
   - mwext-SpellingApi
   - mwext-SphinxSearch
   - mwext-SportsTeams
-  - mwext-Spreadsheet
   - mwext-SSLClientAuthentication
   - mwext-StaffEdits
   - mwext-StalkerLog
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b117bcb..37a8d4b 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -782,8 +782,6 @@
 voting: false
   - name: mwext-SideBarMenu-jslint # bug 61636
 voting: false
-  - name: mwext-Spreadsheet-jslint # bug 63668
-voting: false
   - name: mwext-Survey-jslint # bug 61637
 voting: false
   - name: wikimedia-fundraising-crm-jslint
@@ -6827,8 +6825,12 @@
 
   - name: mediawiki/extensions/Spreadsheet
 template:
-  - name: extension-jslint
+  - name: composer-test
   - name: extension-unittests
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/StickToThatLanguage
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iff49562bb3aa4f983859cf5eb27a6e2837ba2cf8
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] Fix lack of response when export fails - change (mediawiki...citoid)

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

Change subject: Fix lack of response when export fails
..


Fix lack of response when export fails

During failed export, no error was being
returned because fillBody function was
only filling the body with errors that
occured before export. This fills the body
with errors that occur after export.

Unfortunately, for some reason this
response is being returned as a Buffer
and therefore acts up in the browser,
although it demonstrates the correct
behaviour in curl.

Bug: T115271
Change-Id: I09e40682521f4d99775c4669238117b813985521
---
M lib/CitoidRequest.js
M lib/Exporter.js
A test/features/scraping/mockZotero.js
M test/features/scraping/noZotero.js
A test/utils/mockZoteroServer.js
5 files changed, 127 insertions(+), 50 deletions(-)

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



diff --git a/lib/CitoidRequest.js b/lib/CitoidRequest.js
index 2b2a490..624e6af 100644
--- a/lib/CitoidRequest.js
+++ b/lib/CitoidRequest.js
@@ -59,7 +59,6 @@
  */
 CitoidRequest.prototype.fillBody = BBPromise.method(function(){
 var self = this;
-
 // Prevent body from accidentally being overwritten
 if (this.response.body){
 return BBPromise.reject('Body already filled');
@@ -77,7 +76,13 @@
 if (!this.exporter){
 return BBPromise.reject('No exporter registered with citoid service.');
 }
-return this.exporter.export(this);
+return this.exporter.export(self).then(function(cr){
+if (cr.response.error){
+// Fill body with error gotten during export, if present, and 
return
+cr.response.body = cr.response.error;
+}
+return cr;
+});
 });
 
 CitoidRequest.prototype.getResponse = function(){
diff --git a/lib/Exporter.js b/lib/Exporter.js
index f7696a3..9ade946 100644
--- a/lib/Exporter.js
+++ b/lib/Exporter.js
@@ -33,6 +33,7 @@
 this.stats = app.metrics;
 
 this.zoteroService = null;
+
 this.types = new CachedTypes();
 
 defaultLogger = this.logger;
diff --git a/test/features/scraping/mockZotero.js 
b/test/features/scraping/mockZotero.js
new file mode 100644
index 000..b50b5df
--- /dev/null
+++ b/test/features/scraping/mockZotero.js
@@ -0,0 +1,42 @@
+'use strict';
+
+/**
+ * Tests for when Zotero can translate but not export
+ */
+
+var preq   = require('preq');
+var assert = require('../../utils/assert.js');
+var server = require('../../utils/server.js');
+var zotero = require('../../utils/mockZoteroServer.js');
+
+
+describe('mock Zotero service that cannot export', function() {
+
+this.timeout(4);
+
+// Give Zotero port which is it is not running from-
+// Mimics Zotero being down.
+before(function () {
+zotero.start(1968); // Start mock zotero server
+return server.start({zoteroPort:1968}); // Start citoid server using 
mock Zotero location
+});
+
+it('Get error for bibtex export from mock Zotero server', function() {
+return server.query('http://www.example.com', 'bibtex', 'en')
+.then(function(res) {
+assert.status(res, 404);
+}, function(err) {
+assert.deepEqual(JSON.parse(err.body.toString()).Error,'Unable to 
serve bibtex format at this time');
+assert.status(err, 404);
+//assert.checkError(err, 404, 'Unable to serve bibtex at this 
time');
+});
+});
+
+it('Success with bibtex export from mock Zotero server', function() {
+return server.query('http://www.example.com').then(function(res) {
+assert.status(res, 200);
+assert.checkCitation(res, 'Example Domain');
+});
+});
+
+});
\ No newline at end of file
diff --git a/test/features/scraping/noZotero.js 
b/test/features/scraping/noZotero.js
index 0882271..5d718e7 100644
--- a/test/features/scraping/noZotero.js
+++ b/test/features/scraping/noZotero.js
@@ -11,59 +11,59 @@
 
 describe('unreachable Zotero service', function() {
 
-   this.timeout(4);
+this.timeout(4);
 
-   // Give Zotero port which is it is not running from-
-   // Mimics Zotero being down.
-   before(function () { return server.start({zoteroPort:1971}); });
+// Give Zotero port which is it is not running from-
+// Mimics Zotero being down.
+before(function () { return server.start({zoteroPort:1971}); });
 
-   // PMID on NIH website that is not found in the id converter api
-   // This will fail when Zotero is disabled because we no longer directly 
scrape pubMed central URLs,
-   // as they have blocked our UA in the past.
-   it('PMID not in doi id converter api', function() {
-   var pmid = '14656957';
-   return server.query(pmid, 'mediawiki', 'en')
-   .then(function(res) {
-   assert.status(res, 404);
-   }, function(err) {
-   asser

[MediaWiki-commits] [Gerrit] Remove unused method. - change (apps...wikipedia)

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

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

Change subject: Remove unused method.
..

Remove unused method.

Slipped by me in the previous patch.

Change-Id: Id1236f8e7923d7166a3ce72d1a704f1c9efae0ff
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
1 file changed, 0 insertions(+), 14 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index 1cdebad..115fa71 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -551,20 +551,6 @@
 updateProgressBar(false, true, 0);
 }
 
-/**
- * Remove the fragment that is currently at the top of the backstack, and 
go back to
- * the previous fragment.
- */
-public void popFragment() {
-getSupportFragmentManager().popBackStack();
-// make sure the ActionBar is showing, since we could be currently 
scrolled down far enough
-// within a Page fragment that the ActionBar is hidden, and if the 
previous fragment was
-// a different type of fragment (e.g. History), the ActionBar would 
remain hidden.
-showToolbar();
-//also make sure the progress bar is not showing
-updateProgressBar(false, true, 0);
-}
-
 public void resetAfterClearHistory() {
 removeAllFragments();
 Prefs.clearTabs();

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

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

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


[MediaWiki-commits] [Gerrit] Only emit shared prefix bullets for the right parents - change (mediawiki...parsoid)

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

Change subject: Only emit shared prefix bullets for the right parents
..


Only emit shared prefix bullets for the right parents

 * In the other cases (ie. when this child doesn't match expectations),
   we'll have already emitted bullets for the parent node, which is why
   we're seeing duplicates.

 * Fixes a regression introduced in e7e1cf2dc8c5b7683b9207b268dea10d7dfd53f5

 * Identified in rt https://gerrit.wikimedia.org/r/#/c/262723/

 * A test case was added for this edge.

 * Also, add checks for literal html nodes (discussed in review) and a
   test for that as well, for good measure.

Change-Id: Iae4dc35fdfd3058ae3bb12bc950f57e416398cb2
---
M lib/html2wt/DOMHandlers.js
M tests/parserTests.txt
2 files changed, 72 insertions(+), 9 deletions(-)

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



diff --git a/lib/html2wt/DOMHandlers.js b/lib/html2wt/DOMHandlers.js
index ca66f51..adb029a 100644
--- a/lib/html2wt/DOMHandlers.js
+++ b/lib/html2wt/DOMHandlers.js
@@ -251,11 +251,12 @@
}
 }
 
+function isBuilderInsertedElt(node) {
+   var dp = DU.getDataParsoid(node);
+   return dp && dp.autoInsertedStart && dp.autoInsertedEnd;
+}
+
 function buildListHandler(firstChildNames) {
-   function isBuilderInsertedElt(node) {
-   var dp = DU.getDataParsoid(node);
-   return dp && dp.autoInsertedStart && dp.autoInsertedEnd;
-   }
return {
forceSOL: true,
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
@@ -272,7 +273,8 @@
firstChildElt = 
DU.firstNonSepChildNode(firstChildElt);
}
 
-   if (!firstChildElt || !(firstChildElt.nodeName in 
firstChildNames)) {
+   if (!firstChildElt || !(firstChildElt.nodeName in 
firstChildNames) ||
+   DU.isLiteralHTMLNode(firstChildElt)) {
state.emitChunk(getListBullets(state, node), 
node);
}
 
@@ -315,7 +317,8 @@
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
var firstChildElement = DU.firstNonSepChildNode(node);
var chunk = (stx === 'row') ? ':' : 
getListBullets(state, node);
-   if (!DU.isList(firstChildElement)) {
+   if (!DU.isList(firstChildElement) ||
+   
DU.isLiteralHTMLNode(firstChildElement)) {
state.emitChunk(chunk, node);
}
var liHandler = state.serializer.wteHandlers.liHandler
@@ -544,7 +547,8 @@
forceSOL: true,
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
var firstChildElement = DU.firstNonSepChildNode(node);
-   if (!DU.isList(firstChildElement)) {
+   if (!DU.isList(firstChildElement) ||
+   
DU.isLiteralHTMLNode(firstChildElement)) {
state.emitChunk(getListBullets(state, node), 
node);
}
var liHandler = state.serializer.wteHandlers.liHandler
@@ -578,7 +582,8 @@
forceSOL: true,
handle: Promise.method(function(node, state, wrapperUnmodified) 
{
var firstChildElement = DU.firstNonSepChildNode(node);
-   if (!DU.isList(firstChildElement)) {
+   if (!DU.isList(firstChildElement) ||
+   
DU.isLiteralHTMLNode(firstChildElement)) {
state.emitChunk(getListBullets(state, node), 
node);
}
var liHandler = state.serializer.wteHandlers.liHandler
@@ -1287,9 +1292,33 @@
},
 });
 
+var parentMap = {
+   LI: { UL: 1, OL: 1},
+   DT: { DL: 1 },
+   DD: { DL: 1 },
+};
+
+function parentBulletsHaveBeenEmitted(node) {
+   if (DU.isLiteralHTMLNode(node)) {
+   return true;
+   } else if (DU.isList(node)) {
+   return !DU.isListItem(node.parentNode);
+   } else {
+   console.assert(DU.isListItem(node));
+   var parentNode = node.parentNode;
+   // Skip builder-inserted wrappers
+   while (isBuilderInsertedElt(parentNode)) {
+   parentNode = parentNode.parentNode;
+   }
+   return !(parentNode.nodeName in parentMap[node.nodeName]);
+   }
+}
+
 function handleListPrefix(node, state) {
var bullets = '';
-   if (DU.isListOrListItem(node) && !DU.previousNonSepSibling(node) &&
+   if (DU.isListOrListItem(node

[MediaWiki-commits] [Gerrit] Fix lintian overrides for oojs-ui/demos/pages/dialogs.js - change (mediawiki/debian)

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

Change subject: Fix lintian overrides for oojs-ui/demos/pages/dialogs.js
..


Fix lintian overrides for oojs-ui/demos/pages/dialogs.js

The lintian override needs to be under source, not a binary override.

Also remove the outdated $Id stuff.

Change-Id: I6cde512dbcf2c33ea2adbcb326ef4cba071f8312
---
M mediawiki.lintian-overrides
M mediawiki.prerm
A source/lintian-overrides
3 files changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/mediawiki.lintian-overrides b/mediawiki.lintian-overrides
index 7959408..6d8ac94 100644
--- a/mediawiki.lintian-overrides
+++ b/mediawiki.lintian-overrides
@@ -1,6 +1,3 @@
-# $Id: mediawiki.lintian-overrides 554 2014-06-26 07:57:33Z tg $
-#-
-
 # this is ok, a Conflicts is not needed
 mediawiki: breaks-without-version mediawiki-extensions-fckeditor
 
@@ -36,6 +33,3 @@
 # MediaWiki has local patches and a newer version
 mediawiki: embedded-php-library 
usr/share/mediawiki/extensions-core/SyntaxHighlight_GeSHi/geshi/geshi.php 
please use php-geshi
 
-# These files are fine
-mediawiki: source-is-missing resources/lib/jquery/jquery.validate.js
-mediawiki: source-is-missing vendor/oojs/oojs-ui/demos/pages/dialogs.js
diff --git a/mediawiki.prerm b/mediawiki.prerm
index 535bcd2..051c146 100644
--- a/mediawiki.prerm
+++ b/mediawiki.prerm
@@ -1,5 +1,4 @@
 #!/bin/sh
-# $Id: mediawiki.prerm 522 2014-03-24 09:00:57Z tg $
 # From MirOS: contrib/hosted/tg/deb/jupp/debian/jupp.prerm,v 1.4 2011/09/06 
20:07:39 tg Exp $
 
 set -e
diff --git a/source/lintian-overrides b/source/lintian-overrides
new file mode 100644
index 000..65284de
--- /dev/null
+++ b/source/lintian-overrides
@@ -0,0 +1,2 @@
+# lintian bug
+mediawiki: source-is-missing vendor/oojs/oojs-ui/demos/pages/dialogs.js

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6cde512dbcf2c33ea2adbcb326ef4cba071f8312
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Muehlenhoff 

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


[MediaWiki-commits] [Gerrit] Default "Identifiers" statement section config - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Default "Identifiers" statement section config
..

Default "Identifiers" statement section config

This is an alternative for Ie4e28a9. Only one of these two patches
should be merged.

Bug: T123112
Change-Id: I39a023e0f59f6a7961c69d4fe67a51c19bc91140
---
M repo/config/Wikibase.default.php
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index a6d522a..b21db88 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -27,8 +27,16 @@
 
'entityNamespaces' => array(),
 
-   // See StatementGrouperBuilder for an example.
-   'statementSections' => array(),
+   // See StatementGrouperBuilder for more examples.
+   'statementSections' => array(
+   'item' => array(
+   'statements' => null,
+   'identifiers' => array(
+   'type' => 'dataType',
+   'dataTypes' => array( 'external-id' ),
+   ),
+   ),
+   ),
 
// Define constraints for multilingual terms (such as labels, 
descriptions and aliases).
'multilang-limits' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I39a023e0f59f6a7961c69d4fe67a51c19bc91140
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] Move default preferredGeoDataProperties config up - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Move default preferredGeoDataProperties config up
..

Move default preferredGeoDataProperties config up

Move it up, next to the closely related preferredPageImagesProperties
config. This got mixed up because we worked on both in parallel.

Change-Id: I5ef327df3e9884343a0545f5e3184ddaf76481bb
---
M repo/config/Wikibase.default.php
1 file changed, 4 insertions(+), 6 deletions(-)


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

diff --git a/repo/config/Wikibase.default.php b/repo/config/Wikibase.default.php
index a6d522a..8a6e060 100644
--- a/repo/config/Wikibase.default.php
+++ b/repo/config/Wikibase.default.php
@@ -41,6 +41,10 @@
// Items allowed to be used as badges pointing to their CSS 
class names
'badgeItems' => array(),
 
+   // List of globe-coordinate property id strings, in order of 
preference, to consider for
+   // primary coordinates when extracting coordinates from an 
entity for the GeoData extension.
+   'preferredGeoDataProperties' => array(),
+
// List of image property id strings, in order of preference, 
that should be considered for
// the "page_image" page property.
'preferredPageImagesProperties' => array(),
@@ -139,12 +143,6 @@
'de-formal'   => 'de-x-formal',
'nl-informal' => 'nl-x-informal',
),
-
-   // List of globe-coordinate properties (listed by id string), 
in order of preference,
-   // to consider for primary coordinates when extracting 
coordinates from an Entity
-   // for the GeoData extension.
-   // e.g. array( 'P625', 'P1259' )
-   'preferredGeoDataProperties' => array(),
 
// Mapping of globe uris to names, as recognized and used by 
GeoData extension
// when indexing and querying for coordinates.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5ef327df3e9884343a0545f5e3184ddaf76481bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] Don't parse wikitext in edit-user-talk snippets - change (mediawiki...Echo)

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

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

Change subject: Don't parse wikitext in edit-user-talk snippets
..

Don't parse wikitext in edit-user-talk snippets

Bug: T121994
Change-Id: I427def99f2773896feabaf6202e7f4eecd850be1
---
M includes/formatters/EditUserTalkPresentationModel.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/formatters/EditUserTalkPresentationModel.php 
b/includes/formatters/EditUserTalkPresentationModel.php
index 1a545ba..97ffdee 100644
--- a/includes/formatters/EditUserTalkPresentationModel.php
+++ b/includes/formatters/EditUserTalkPresentationModel.php
@@ -61,7 +61,7 @@
public function getBodyMessage() {
if ( $this->getBundleCount( true, array( $this,'getEventUser' ) 
) === 1 && $this->hasSection() ) {
$msg = $this->msg( 
'notification-body-edit-user-talk-with-section' );
-   $msg->params( $this->getRevisionSnippet() );
+   $msg->params( wfEscapeWikiText( 
$this->getRevisionSnippet() ) );
return $msg;
} else {
return false;

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

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

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


[MediaWiki-commits] [Gerrit] Fix documentation of StatementGrouperBuilder - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Fix documentation of StatementGrouperBuilder
..

Fix documentation of StatementGrouperBuilder

We talked about an "identifier" data type for months, and that's what
I still believed when I wrote this. But it's called "external-id" now.

Change-Id: Ibdcb1efc25b5034f0a16ab1bd0dad0daaaf26203
---
M repo/includes/StatementGrouperBuilder.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/includes/StatementGrouperBuilder.php 
b/repo/includes/StatementGrouperBuilder.php
index 0b399e4..568e29e 100644
--- a/repo/includes/StatementGrouperBuilder.php
+++ b/repo/includes/StatementGrouperBuilder.php
@@ -25,7 +25,7 @@
  * ),
  * 'identifiers' => array(
  * 'type' => 'dataType',
- * 'dataTypes' => array( 'identifier' ),
+ * 'dataTypes' => array( 'external-id' ),
  * ),
  * ),
  * 'property' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdcb1efc25b5034f0a16ab1bd0dad0daaaf26203
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] Add npm and composer-test tests - change (mediawiki...Spreadsheet)

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

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

Change subject: Add npm and composer-test tests
..

Add npm and composer-test tests

Also fix jslint tests.

Change-Id: I81c3be6973d660006b60f2ffadd85db5e7e919ff
---
A .gitignore
A .jshintignore
A .jshintrc
A Gruntfile.js
A composer.json
A package.json
6 files changed, 119 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000..53bbca6
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,42 @@
+# git-deploy status file:
+/.deploy
+
+# Editors
+*.kate-swp
+*~
+\#*#
+.#*
+.*.swp
+.project
+cscope.files
+cscope.out
+## NetBeans
+nbproject*
+project.index
+## Sublime
+sublime-*
+sftp-config.json
+
+# Building & testing
+node_modules/
+
+# Composer
+/vendor
+/composer.lock
+
+# Operating systems
+## Mac OS X
+.DS_Store
+## Windows
+Thumbs.db
+
+# Misc
+.buildpath
+.classpath
+.idea
+.metadata*
+.settings
+/static*
+/tags
+/.htaccess
+/.htpasswd
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..022b988
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+node_modules
+vendor
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..8a2a10c
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,23 @@
+{
+   // Enforcing
+   "bitwise": true,
+   "eqeqeq": true,
+   "freeze": true,
+   "latedef": true,
+   "noarg": true,
+   "nonew": true,
+   "undef": true,
+   "unused": true,
+   "strict": false,
+
+   // Relaxing
+   "es5": false,
+
+   // Environment
+   "browser": true,
+   "jquery": true,
+
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..1c63f9e
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 000..ebf5796
--- /dev/null
+++ b/package.json
@@ -0,0 +1,12 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-contrib-jshint": "0.11.3",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81c3be6973d660006b60f2ffadd85db5e7e919ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Spreadsheet
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] [Spreadsheet] Add dependance on extension PHPExcel for exten... - change (integration/config)

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

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

Change subject: [Spreadsheet] Add dependance on extension PHPExcel for 
extension unittests
..

[Spreadsheet] Add dependance on extension PHPExcel for extension unittests

Change-Id: I5b48d0526f1461087c3894fb4f40fc7c1b8feccc
---
M jjb/mediawiki-extensions.yaml
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/68/263068/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0255d64..ae92760 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -560,7 +560,8 @@
  - SolrStore
  - SpamBlacklist
  - SphinxSearch
- - Spreadsheet
+ - Spreadsheet:
+dependencies: 'PHPExcel'
  - SSLClientAuthentication
  - SubPageList
  - SwarmExport

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b48d0526f1461087c3894fb4f40fc7c1b8feccc
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] OO.ui.TextInputWidget: unsupport Internet Explorer 8 - change (oojs/ui)

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

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

Change subject: OO.ui.TextInputWidget: unsupport Internet Explorer 8
..

OO.ui.TextInputWidget: unsupport Internet Explorer 8

Courtesy of commit df1019c49d30b8c87b144ecfeea200684c5b4a73 in MediaWiki

Change-Id: Ie6d42e4990b38a04a83e71c71cea2225b0ae3a8f
---
M src/widgets/TextInputWidget.js
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/67/263067/1

diff --git a/src/widgets/TextInputWidget.js b/src/widgets/TextInputWidget.js
index 32feac8..5e38f71 100644
--- a/src/widgets/TextInputWidget.js
+++ b/src/widgets/TextInputWidget.js
@@ -526,16 +526,7 @@
 
this.focus();
 
-   if ( input.setSelectionRange ) {
-   input.setSelectionRange( start, end, isBackwards ? 'backward' : 
'forward' );
-   } else if ( input.createTextRange ) {
-   // IE 8 and below
-   textRange = input.createTextRange();
-   textRange.collapse( true );
-   textRange.moveStart( 'character', start );
-   textRange.moveEnd( 'character', end - start );
-   textRange.select();
-   }
+   input.setSelectionRange( start, end, isBackwards ? 'backward' : 
'forward' );
return this;
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] Test: DO NOT MERGE - change (mediawiki...Spreadsheet)

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

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

Change subject: Test: DO NOT MERGE
..

Test: DO NOT MERGE

Change-Id: I11b00a9b0a77db3d0ba6bfb8bfe62f129092a1b9
---
M js/spreadsheet.zip.adapter.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/js/spreadsheet.zip.adapter.js b/js/spreadsheet.zip.adapter.js
index 6eff7ce..bde5987 100644
--- a/js/spreadsheet.zip.adapter.js
+++ b/js/spreadsheet.zip.adapter.js
@@ -1,3 +1,4 @@
+
 function SpreadsheetZipAdapter(URL,sheet,dataCb,progressCb){
 
function getParsedText(text){

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11b00a9b0a77db3d0ba6bfb8bfe62f129092a1b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Spreadsheet
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] build: Update jscs to latest - change (mediawiki/core)

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

Change subject: build: Update jscs to latest
..


build: Update jscs to latest

* grunt-jscs: 2.5.0 → 2.6.0

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

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



diff --git a/package.json b/package.json
index 74eaac5..5a8257c 100644
--- a/package.json
+++ b/package.json
@@ -12,7 +12,7 @@
 "grunt-contrib-copy": "0.8.1",
 "grunt-contrib-jshint": "0.11.3",
 "grunt-contrib-watch": "0.6.1",
-"grunt-jscs": "2.5.0",
+"grunt-jscs": "2.6.0",
 "grunt-jsonlint": "1.0.7",
 "grunt-karma": "0.12.1",
 "karma": "0.13.19",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b1585c557b94927e593975e2e4696b88becd095
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
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] [SemanticDrilldown] Add npm and composer-test tests - change (integration/config)

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

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

Change subject: [SemanticDrilldown] Add npm and composer-test tests
..

[SemanticDrilldown] Add npm and composer-test tests

Move jshint and jsonlint to check: for non-whitelisted users.

Change-Id: I4ed361fee0740bfbd762c186ebea911e4386b259
---
M zuul/layout.yaml
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/65/263065/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b117bcb..01dfdee 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6628,9 +6628,12 @@
 
   - name: mediawiki/extensions/SemanticDrilldown
 template:
+  - name: composer-test
   - name: mw-checks-test
-  - name: jshint
-  - name: jsonlint
+  - name: npm
+check:
+  - jsonlint
+  - jshint
 
   - name: mediawiki/extensions/SemanticDummyEditor
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ed361fee0740bfbd762c186ebea911e4386b259
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] [SemanticDrilldown] Add extension-unittests-generic test - change (integration/config)

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

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

Change subject: [SemanticDrilldown] Add extension-unittests-generic test
..

[SemanticDrilldown] Add extension-unittests-generic test

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/64/263064/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b117bcb..4578019 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -6631,6 +6631,7 @@
   - name: mw-checks-test
   - name: jshint
   - name: jsonlint
+  - name: extension-unittests-generic
 
   - name: mediawiki/extensions/SemanticDummyEditor
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaface058ff632008607f6e04a18e31d01be5767f
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] Fix false inclusion of FULLPAGENAME on Special:MobileDiff - change (mediawiki...MobileFrontend)

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

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

Change subject: Fix false inclusion of FULLPAGENAME on Special:MobileDiff
..

Fix false inclusion of FULLPAGENAME on Special:MobileDiff

Bug: T122984
Change-Id: I04c8ddeafa9b30648def69f96210c4a72bbc26db
---
M includes/diff/InlineDifferenceEngine.php
1 file changed, 19 insertions(+), 4 deletions(-)


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

diff --git a/includes/diff/InlineDifferenceEngine.php 
b/includes/diff/InlineDifferenceEngine.php
index b101347..01054f9 100644
--- a/includes/diff/InlineDifferenceEngine.php
+++ b/includes/diff/InlineDifferenceEngine.php
@@ -77,15 +77,30 @@
$allowed = $this->isUserAllowedToSee();
$suppressed = $this->isSuppressedDiff();
 
+   // This IContextSource object will be used to get a 
message object for the
+   // messages used in this function. We need to to this 
to allow the message to
+   // get the correct value for the FULLPAGENAME inclusion 
(which is used in
+   // rev-suppressed-no-diff, e.g.). Otherwise it would 
use Special:MobileDiff as
+   // the target for 
Special:Log/delete?page=Special:MobileDiff/..., which isn't
+   // correct and very helpful. To fix this bug, we create 
a new context from the
+   // current one and set the title object (which we can 
get from the new revision).
+   // Bug: T122984
+   $context = new DerivativeContext( $this->getContext() );
+   $revision = $this->mNewRev;
+   $context->setTitle( $revision->getTitle() );
+
if ( !$allowed ) {
-   $msg = $suppressed ? 'rev-suppressed-no-diff' : 
'rev-deleted-no-diff';
-   $msg = wfMessage( $msg )->parse();
+   $msg = $context->msg(
+   $suppressed ? 'rev-suppressed-no-diff' 
: 'rev-deleted-no-diff'
+   )->parse();
} else {
# Give explanation and add a link to view the 
diff...
$query = $this->getRequest()->appendQueryValue( 
'unhide', '1', true );
$link = $this->getTitle()->getFullURL( $query );
-   $msg = $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff';
-   $msg = wfMessage( $msg, $link )->parse();
+   $msg = $context->msg(
+   $suppressed ? 
'rev-suppressed-unhide-diff' : 'rev-deleted-unhide-diff',
+   $link
+   )->parse();
}
}
return $msg;

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

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

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


[MediaWiki-commits] [Gerrit] Add npm and composer test support - change (mediawiki...SemanticDrilldown)

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

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

Change subject: Add npm and composer test support
..

Add npm and composer test support

Change-Id: I640b1bb2a2e5beb0c85741c672519df1c3218117
---
M .gitignore
A .jshintignore
A .jshintrc
A Gruntfile.js
A composer.json
M libs/SemanticDrilldown.js
A package.json
7 files changed, 111 insertions(+), 16 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 98b092a..dbcd3ee 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
-.svn
 *~
 *.kate-swp
 .*.swp
+/node_modules/
+/vendor/
diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..022b988
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+node_modules
+vendor
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..8b27caa
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,39 @@
+{
+   /* Common */
+
+   // Enforcing
+   "camelcase": true,
+   "curly": true,
+   "eqeqeq": true,
+   "immed": true,
+   "latedef": true,
+   "newcap": true,
+   "noarg": true,
+   "noempty": true,
+   "nonew": true,
+   "quotmark": "single",
+   "trailing": true,
+   "undef": true,
+   "unused": true,
+   // Legacy
+   "onevar": true,
+
+   /* Local */
+
+   // Enforcing
+   "bitwise": true,
+   "es3": true,
+   // Relaxing
+   "laxbreak": true,
+   "smarttabs": true,
+   "multistr": true,
+   // Environment
+   "browser": true,
+   // Legacy
+   "nomen": true,
+
+   "globals": {
+   "mediaWiki": false,
+   "jQuery": false
+   }
+}
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..36b6671
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,30 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   jshint: {
+   options: {
+   jshintrc: true
+   },
+   all: [
+   '**/*.js',
+   '!node_modules/**'
+   ]
+   },
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jshint', 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..1c63f9e
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,10 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor"
+   ]
+   }
+}
diff --git a/libs/SemanticDrilldown.js b/libs/SemanticDrilldown.js
index c9a18cd..77b5858 100644
--- a/libs/SemanticDrilldown.js
+++ b/libs/SemanticDrilldown.js
@@ -5,8 +5,8 @@
  *
  * @author Sanyam Goyal
  */
-(function(jQuery) {
-   jQuery.ui.autocomplete.prototype._renderItem = function( ul, item) {
+( function ( $ ) {
+   $.ui.autocomplete.prototype._renderItem = function( ul, item) {
var re = new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + 
this.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + 
")(?![^<>]*>)(?![^&;]+;)", "gi");
var loc = item.label.search(re);
var t;
@@ -15,25 +15,25 @@
} else {
t = item.label;
}
-   return jQuery( "" )
+   return $( "" )
.data( "item.autocomplete", item )
.append( " " + t + "" )
.appendTo( ul );
};
 
-   jQuery.widget("ui.combobox", {
+   $.widget("ui.combobox", {
_create: function() {
var self = this;
var select = this.element.hide();
var inp_id = select[0].options[0].value;
var curval = select[0].name;
-   var input = jQuery("")
+   var input = $("")
.insertAfter(select)
.autocomplete({
source: function(request, response) {
-   var matcher = new RegExp("\\b" 
+ request.term, "i" );
+ 

[MediaWiki-commits] [Gerrit] Remove not needed nullable/optional parameters in tests - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Remove not needed nullable/optional parameters in tests
..

Remove not needed nullable/optional parameters in tests

Since this is test code, it is not "used" anywhere. When the tests
succeed, this is fine.

Change-Id: I0d414623f0b2f003d7d324c47be6c5f661253a7c
---
M lib/tests/phpunit/store/EntityInfoBuilderTest.php
M repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
M repo/tests/phpunit/includes/api/SetQualifierTest.php
M repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
4 files changed, 12 insertions(+), 11 deletions(-)


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

diff --git a/lib/tests/phpunit/store/EntityInfoBuilderTest.php 
b/lib/tests/phpunit/store/EntityInfoBuilderTest.php
index 1050d9e..9f516a1 100644
--- a/lib/tests/phpunit/store/EntityInfoBuilderTest.php
+++ b/lib/tests/phpunit/store/EntityInfoBuilderTest.php
@@ -139,7 +139,7 @@
/**
 * @dataProvider resolveRedirectsProvider
 */
-   public function testResolveRedirects( array $ids, array $expected = 
null ) {
+   public function testResolveRedirects( array $ids, array $expected ) {
$builder = $this->newEntityInfoBuilder( $ids );
 
$builder->resolveRedirects();
@@ -253,7 +253,7 @@
/**
 * @dataProvider collectTermsProvider
 */
-   public function testCollectTerms( array $ids, array $types = null, 
array $languages = null, array $expected = null ) {
+   public function testCollectTerms( array $ids, array $types, array 
$languages, array $expected ) {
$builder = $this->newEntityInfoBuilder( $ids );
 
$builder->collectTerms( $types, $languages );
@@ -327,7 +327,7 @@
/**
 * @dataProvider collectDataTypesProvider
 */
-   public function testCollectDataTypes( array $ids, array $expected = 
null ) {
+   public function testCollectDataTypes( array $ids, array $expected ) {
$builder = $this->newEntityInfoBuilder( $ids );
 
$builder->collectDataTypes();
@@ -384,7 +384,7 @@
/**
 * @dataProvider removeMissingAndRedirectsProvider
 */
-   public function testRemoveMissingAndRedirects( array $ids, array 
$expected = null ) {
+   public function testRemoveMissingAndRedirects( array $ids, array 
$expected ) {
$builder = $this->newEntityInfoBuilder( $ids );
 
$builder->removeMissing( 'remove-redirects' );
@@ -437,7 +437,7 @@
/**
 * @dataProvider removeMissingButKeepRedirects
 */
-   public function testRemoveMissingButKeepRedirects( array $ids, array 
$expected = null ) {
+   public function testRemoveMissingButKeepRedirects( array $ids, array 
$expected ) {
$builder = $this->newEntityInfoBuilder( $ids );
 
$builder->removeMissing();
diff --git a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php 
b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
index df58c71..ffae5b0 100644
--- a/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
+++ b/repo/tests/phpunit/includes/api/ItemByTitleHelperTest.php
@@ -54,9 +54,10 @@
 
/**
 * @param mixed $itemId
+*
 * @return SiteLinkLookup
 */
-   public function getSiteLinkLookupMock( $itemId = null ) {
+   private function getSiteLinkLookupMock( $itemId ) {
$siteLinkLookupMock = $this->getMockBuilder( 
'\Wikibase\Lib\Store\SiteLinkLookup' )
->disableOriginalConstructor()
->getMock();
diff --git a/repo/tests/phpunit/includes/api/SetQualifierTest.php 
b/repo/tests/phpunit/includes/api/SetQualifierTest.php
index 1fc6850..7fa699d 100644
--- a/repo/tests/phpunit/includes/api/SetQualifierTest.php
+++ b/repo/tests/phpunit/includes/api/SetQualifierTest.php
@@ -55,7 +55,7 @@
 *
 * @return Snak
 */
-   public function getTestSnak( $type, $data = null ) {
+   private function getTestSnak( $type, $data ) {
static $snaks = array();
 
if ( !isset( $snaks[$type] ) ) {
@@ -141,7 +141,7 @@
/**
 * @dataProvider provideChangeRequests
 */
-   public function testChangeRequests( $snakType, $data = null ) {
+   public function testChangeRequests( $snakType, $data ) {
$item = $this->getTestItem();
$statements = $item->getStatements()->toArray();
/** @var Statement $statement */
diff --git 
a/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
 
b/repo/tests/phpunit/includes/specials/SpecialSetLabelDescriptionAliasesTest.php
index 552fd40..1667451 100644
--- 
a/repo/te

[MediaWiki-commits] [Gerrit] Add missing type hints to LanguageWithConversion - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Add missing type hints to LanguageWithConversion
..

Add missing type hints to LanguageWithConversion

Change-Id: I47e1947654b69582739b6b2d4c53d1108bef7386
---
M lib/includes/LanguageWithConversion.php
1 file changed, 46 insertions(+), 11 deletions(-)


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

diff --git a/lib/includes/LanguageWithConversion.php 
b/lib/includes/LanguageWithConversion.php
index 02e35bd..43461f6 100644
--- a/lib/includes/LanguageWithConversion.php
+++ b/lib/includes/LanguageWithConversion.php
@@ -13,16 +13,45 @@
  */
 class LanguageWithConversion {
 
-   static protected $objectCache = array();
+   /**
+* @var array[]
+*/
+   static private $objectCache = array();
 
-   protected $language;
-   protected $languageCode;
-   protected $sourceLanguage;
-   protected $sourceLanguageCode;
-   protected $parentLanguage;
+   /**
+* @var Language|null
+*/
+   private $language;
 
-   protected $translateCache = array();
-   protected $translatePool = array();
+   /**
+* @var string
+*/
+   private $languageCode;
+
+   /**
+* @var Language|null
+*/
+   private $sourceLanguage;
+
+   /**
+* @var string|null
+*/
+   private $sourceLanguageCode;
+
+   /**
+* @var Language|null
+*/
+   private $parentLanguage;
+
+   /**
+* @var string[]
+*/
+   private $translateCache = array();
+
+   /**
+* @var bool[]
+*/
+   private $translatePool = array();
 
/**
 * @param null|Language $language
@@ -31,7 +60,13 @@
 * @param null|string $sourceLanguageCode
 * @param null|Language $parentLanguage
 */
-   protected function __construct( $language, $languageCode, 
$sourceLanguage, $sourceLanguageCode, $parentLanguage ) {
+   private function __construct(
+   Language $language = null,
+   $languageCode,
+   Language $sourceLanguage = null,
+   $sourceLanguageCode = null,
+   Language $parentLanguage = null
+   ) {
$this->language = $language;
$this->languageCode = $languageCode;
$this->sourceLanguage = $sourceLanguage;
@@ -142,7 +177,7 @@
/**
 * Get the code of the source language defined.
 *
-* @return string
+* @return string|null
 */
public function getSourceLanguageCode() {
return $this->sourceLanguageCode;
@@ -244,7 +279,7 @@
/**
 * Really execute translation.
 */
-   protected function executeTranslate() {
+   private function executeTranslate() {
if ( $this->parentLanguage && count( $this->translatePool ) ) {
$pieces = array_keys( $this->translatePool );
$block = implode( "\0", $pieces );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47e1947654b69582739b6b2d4c53d1108bef7386
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] Properly document redirect mode as string instead of mixed - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Properly document redirect mode as string instead of mixed
..

Properly document redirect mode as string instead of mixed

Change-Id: Iba2860ee7488364b8e5ac6eade4b26f47143bec6
---
M repo/includes/store/EntityPerPage.php
M repo/includes/store/sql/EntityPerPageIdPager.php
M repo/includes/store/sql/EntityPerPageTable.php
M repo/tests/phpunit/MockEntityPerPage.php
4 files changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/repo/includes/store/EntityPerPage.php 
b/repo/includes/store/EntityPerPage.php
index 84175f8..e8233b4 100644
--- a/repo/includes/store/EntityPerPage.php
+++ b/repo/includes/store/EntityPerPage.php
@@ -64,7 +64,7 @@
 * @param null|string $entityType The entity type to look for.
 * @param int $limit The maximum number of IDs to return.
 * @param EntityId|null $after Only return entities with IDs greater 
than this.
-* @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
+* @param string $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
 *
 * @return EntityId[]
 */
diff --git a/repo/includes/store/sql/EntityPerPageIdPager.php 
b/repo/includes/store/sql/EntityPerPageIdPager.php
index 60ad2df..69ba2d7 100644
--- a/repo/includes/store/sql/EntityPerPageIdPager.php
+++ b/repo/includes/store/sql/EntityPerPageIdPager.php
@@ -31,14 +31,14 @@
private $position = null;
 
/**
-* @var mixed
+* @var string
 */
private $redirectMode;
 
/**
 * @param EntityPerPage $entityPerPage
 * @param null|string $entityType The desired entity type, or null for 
any type.
-* @param mixed $redirectMode A EntityPerPage::XXX_REDIRECTS constant 
(default is NO_REDIRECTS).
+* @param string $redirectMode A EntityPerPage::XXX_REDIRECTS constant 
(default is NO_REDIRECTS).
 */
public function __construct( EntityPerPage $entityPerPage, $entityType 
= null, $redirectMode = EntityPerPage::NO_REDIRECTS ) {
$this->entityPerPage = $entityPerPage;
diff --git a/repo/includes/store/sql/EntityPerPageTable.php 
b/repo/includes/store/sql/EntityPerPageTable.php
index b70537c..94b7b15 100644
--- a/repo/includes/store/sql/EntityPerPageTable.php
+++ b/repo/includes/store/sql/EntityPerPageTable.php
@@ -320,7 +320,7 @@
 * @param null|string $entityType The entity type to look for.
 * @param int $limit The maximum number of IDs to return.
 * @param EntityId|null $after Only return entities with IDs greater 
than this.
-* @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
+* @param string $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
 *
 * @throws InvalidArgumentException
 * @return EntityId[]
diff --git a/repo/tests/phpunit/MockEntityPerPage.php 
b/repo/tests/phpunit/MockEntityPerPage.php
index c6cd937..87784fb 100644
--- a/repo/tests/phpunit/MockEntityPerPage.php
+++ b/repo/tests/phpunit/MockEntityPerPage.php
@@ -58,7 +58,7 @@
 * @param null|string $entityType The entity type to look for.
 * @param int $limit The maximum number of IDs to return.
 * @param EntityId|null $after Only return entities with IDs greater 
than this.
-* @param mixed $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
+* @param string $redirects A XXX_REDIRECTS constant (default is 
NO_REDIRECTS).
 *
 * @return EntityId[]
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iba2860ee7488364b8e5ac6eade4b26f47143bec6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

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


[MediaWiki-commits] [Gerrit] Document nullable parameters as such via @param ...|null - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Document nullable parameters as such via @param ...|null
..

Document nullable parameters as such via @param ...|null

I'm also removing the |null in two or three cases where it was wrong.

Change-Id: I3980012501b15d5e12510f0b0e60606ff9830b4c
---
M client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/Hooks/DataUpdateHookHandlers.php
M client/includes/Hooks/SidebarHookHandlers.php
M client/includes/Hooks/UpdateRepoHookHandlers.php
M client/includes/recentchanges/ChangeLineFormatter.php
M client/includes/specials/SpecialUnconnectedPages.php
M client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
M lib/includes/PropertyInfoDataTypeLookup.php
M lib/includes/SnakFactory.php
M lib/includes/TypedValueFormatter.php
M lib/includes/formatters/DispatchingValueFormatter.php
M lib/includes/formatters/PropertyValueSnakFormatter.php
M lib/includes/serialization/CallbackFactory.php
M lib/includes/sites/SitesBuilder.php
M lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
M lib/tests/phpunit/formatters/EntityIdHtmlLinkFormatterTest.php
M lib/tests/phpunit/includes/modules/SitesModuleWorkerTest.php
M lib/tests/phpunit/store/MockTermIndex.php
M lib/tests/phpunit/store/RevisionBasedEntityLookupTest.php
M purtle/src/RdfWriter.php
M purtle/src/RdfWriterBase.php
M repo/Wikibase.hooks.php
M repo/includes/ChangeOp/ChangeOpLabel.php
M repo/includes/ChangeOp/ChangeOpQualifier.php
M repo/includes/ChangeOp/ChangeOpQualifierRemove.php
M repo/includes/ChangeOp/ChangeOpReference.php
M repo/includes/ChangeOp/ChangeOpReferenceRemove.php
M repo/includes/EditEntity.php
M repo/includes/api/ModifyEntity.php
M repo/includes/api/StatementModificationHelper.php
M repo/includes/content/ItemContent.php
M repo/includes/content/PropertyContent.php
M repo/includes/specials/SpecialItemDisambiguation.php
M repo/includes/specials/SpecialModifyEntity.php
M repo/includes/specials/SpecialModifyTerm.php
M repo/includes/specials/SpecialSetLabelDescriptionAliases.php
M repo/includes/specials/SpecialSetSiteLink.php
M repo/includes/store/EntityPerPage.php
M repo/includes/store/sql/ChangesSubscriptionTableBuilder.php
M repo/includes/store/sql/EntityPerPageTable.php
M repo/maintenance/dumpEntities.php
M repo/tests/phpunit/MockEntityPerPage.php
M repo/tests/phpunit/includes/ChangeDispatcherTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpTestMockProvider.php
M repo/tests/phpunit/includes/EditEntityTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/Validators/LabelUniquenessValidatorTest.php
M repo/tests/phpunit/includes/actions/ActionTestCase.php
M repo/tests/phpunit/includes/api/ApiModuleTestHelper.php
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/CreateRedirectTest.php
M repo/tests/phpunit/includes/api/EntityTestHelper.php
M repo/tests/phpunit/includes/api/SetClaimTest.php
M repo/tests/phpunit/includes/content/EntityContentTest.php
M repo/tests/phpunit/includes/content/EntityHandlerTest.php
M repo/tests/phpunit/includes/content/ItemContentTest.php
M repo/tests/phpunit/includes/content/ItemHandlerTest.php
M repo/tests/phpunit/includes/content/PropertyContentTest.php
M repo/tests/phpunit/includes/content/PropertyHandlerTest.php
M repo/tests/phpunit/includes/rdf/FullStatementsRdfBuilderTest.php
M repo/tests/phpunit/includes/store/sql/WikiPageEntityStoreTest.php
M view/src/EntityTermsView.php
M view/tests/phpunit/EntityViewPlaceholderExpanderTest.php
63 files changed, 80 insertions(+), 80 deletions(-)


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

diff --git 
a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
index 47e90d1..c1e6eb1 100644
--- a/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
+++ b/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
@@ -308,7 +308,7 @@
 *
 * @since 0.5
 *
-* @param string $pageTitle
+* @param string|null $pageTitle
 *
 * @return array
 */
diff --git a/client/includes/Hooks/DataUpdateHookHandlers.php 
b/client/includes/Hooks/DataUpdateHookHandlers.php
index 7f3b681..8ac3f83 100644
--- a/client/includes/Hooks/DataUpdateHookHandlers.php
+++ b/client/includes/Hooks/DataUpdateHookHandlers.php
@@ -70,7 +70,7 @@
 * @param User &$user
 * @param string $reason
 * @param int $id id of the article that was deleted
-* @param Content $content
+* @param Content|null $content
 * @param LogEntry $logEntry
 */
public static function onArticleDeleteComplete(
diff --git a/client/includes/Hooks/

[MediaWiki-commits] [Gerrit] Fix Fatal error: Invalid operand type was used, Remove $wgPa... - change (mediawiki...SemanticDrilldown)

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

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

Change subject: Fix Fatal error: Invalid operand type was used, Remove 
$wgPageProps removed config
..

Fix Fatal error: Invalid operand type was used, Remove $wgPageProps removed 
config

Spotted here
https://integration.wikimedia.org/ci/job/mwext-testextension-hhvm/960/console

Change-Id: I3b2506b1fa801cb379d935394243b74836ba8cd9
---
M SemanticDrilldown.php
1 file changed, 8 insertions(+), 7 deletions(-)


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

diff --git a/SemanticDrilldown.php b/SemanticDrilldown.php
index a98e3d5..8afcc66 100644
--- a/SemanticDrilldown.php
+++ b/SemanticDrilldown.php
@@ -71,9 +71,6 @@
 $wgHooks['PageSchemasRegisterHandlers'][] = 'SDPageSchemas::registerClass';
 $wgHooks['ParserFirstCallInit'][] = 'SDParserFunctions::registerFunctions';
 
-$wgPageProps['hidefromdrilldown'] = 'Whether or not the page is set as 
HIDEFROMDRILLDOWN';
-$wgPageProps['showindrilldown'] = 'Whether or not the page is set as 
SHOWINDRILLDOWN';
-
 # ##
 # This is the path to your installation of Semantic Drilldown as
 # seen from the web. Change it if required ($wgScriptPath is the
@@ -138,12 +135,12 @@
$wgNamespaceAliases = $wgNamespaceAliases + 
$sdgContLang->getNamespaceAliases();
 
// Support subpages only for talk pages by default
-   $wgNamespacesWithSubpages = $wgNamespacesWithSubpages + array(
+   $wgNamespacesWithSubpages = array(
SD_NS_FILTER_TALK => true
);
 
// Enable semantic links on filter pages
-   $smwgNamespacesWithSemanticLinks = $smwgNamespacesWithSemanticLinks + 
array(
+   $smwgNamespacesWithSemanticLinks = array(
SD_NS_FILTER => true,
SD_NS_FILTER_TALK => false
);
@@ -162,7 +159,9 @@
 function sdfInitContentLanguage( $langcode ) {
global $sdgIP, $sdgContLang;
 
-   if ( !empty( $sdgContLang ) ) { return; }
+   if ( !empty( $sdgContLang ) ) {
+   return;
+   }
 
$sdContLangClass = 'SD_Language' . str_replace( '-', '_', ucfirst( 
$langcode ) );
 
@@ -187,7 +186,9 @@
 function sdfInitUserLanguage( $langcode ) {
global $sdgIP, $sdgLang;
 
-   if ( !empty( $sdgLang ) ) { return; }
+   if ( !empty( $sdgLang ) ) {
+   return;
+   }
 
$sdLangClass = 'SD_Language' . str_replace( '-', '_', ucfirst( 
$langcode ) );
if ( file_exists( $sdgIP . '/languages/' . $sdLangClass . '.php' ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b2506b1fa801cb379d935394243b74836ba8cd9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticDrilldown
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] Flexiskin: New RL implementation - change (mediawiki...BlueSpiceExtensions)

2016-01-08 Thread Dvogel hallowelt (Code Review)
Dvogel hallowelt has uploaded a new change for review.

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

Change subject: Flexiskin: New RL implementation
..

Flexiskin: New RL implementation

Due to path traversal issues the resource loader implementation was
reworked.

Change-Id: I7657985030d2fdb2d1fa8da322febef373557bc2
---
M Flexiskin/Flexiskin.class.php
M Flexiskin/Flexiskin.setup.php
M Flexiskin/includes/FlexiskinApi.class.php
M Flexiskin/includes/FlexiskinFormatter.class.php
A Flexiskin/includes/resourceloader/ResourceLoaderFlexiskinModule.php
A Flexiskin/includes/resourceloader/ResourceLoaderFlexiskinPreviewModule.php
6 files changed, 158 insertions(+), 224 deletions(-)


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

diff --git a/Flexiskin/Flexiskin.class.php b/Flexiskin/Flexiskin.class.php
index e4f8912..c64a061 100644
--- a/Flexiskin/Flexiskin.class.php
+++ b/Flexiskin/Flexiskin.class.php
@@ -52,8 +52,7 @@
EXTINFO::VERSION => 'default',
EXTINFO::STATUS => 'default',
EXTINFO::PACKAGE => 'default',
-   EXTINFO::URL => 
'https://help.bluespice.com/index.php/FlexiSkin',
-   EXTINFO::DEPS => array( 'bluespice' => '2.22.0' )
+   EXTINFO::URL => 
'https://help.bluespice.com/index.php/FlexiSkin'
);
$this->mExtensionKey = 'MW::Flexiskin';
 
@@ -67,94 +66,15 @@
}
 
/**
-* Initialization of ArticleInfo extension
+* Initialization of Flexiskin extension
 */
public function initExt() {
wfProfileIn( 'BS::' . __METHOD__ );
+
BsConfig::registerVar( 'MW::Flexiskin::Active', "default", 
BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | 
BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-flexiskin-pref-active', 'select' );
-   BsConfig::registerVar( 'MW::Flexiskin::Logo', "", 
BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING | 
BsConfig::USE_PLUGIN_FOR_PREFS, 'bs-flexiskin-pref-logo', 'text' );
-
-   $sFlexiskin = $this->getRequest()->getVal( 'flexiskin', '' );
-   if( $this->getRequest()->getSessionData( "sPreviewSkin" ) !== 
NULL){
-   $sPreviewSkin = $this->getRequest()->getSessionData( 
"sPreviewSkin" );
-   } else {
-   $sPreviewSkin = FALSE;
-   }
-
-   $oResponse = $this->getRequest()->response();
-   $oRequest = $this->getRequest();
-   //this statemenet is just for setting the cookie, this is why 
we need to do some checks here
-   //check if the request comes via index.php, flexiskin is set in 
query and if you are in view mode (block some ajax requests)
-
-   $sPreview = false;
-   $sFlexiskin = $sFlexiskin == '' ? $sPreviewSkin : $sFlexiskin;
-   if ( strpos( wfGetScriptUrl(), "index.php" ) !== false && 
$sFlexiskin !== "" && $oRequest->getVal( 'action', 'view' ) === 'view' ) {
-   $bIsTemp = (bool) $oRequest->getBool( 'preview', false 
);
-   //is it in preview mode?
-   //set the session
-   if ( $bIsTemp ) {
-   $this->getRequest()->setSessionData( 
"sPreviewSkin", $sFlexiskin );
-   $sPreviewSkin = $sFlexiskin;
-   //or just unset it
-   } else {
-   $this->getRequest()->setSessionData( 
"sPreviewSkin", NULL );
-   $sPreviewSkin = false;
-   }
-   }
-   $sFlexiskin = $sFlexiskin == '' ? $sPreviewSkin : $sFlexiskin;
-   if ( $sFlexiskin != "" || BsConfig::get( 
'MW::Flexiskin::Active' ) != '' || $sPreviewSkin ) {
-   $sId = $sFlexiskin != '' ? $sFlexiskin : BsConfig::get( 
'MW::Flexiskin::Active' );
-   if ( $sId != "default" || $sPreviewSkin !== false ) {
-   $this->addCssFile( $sId, $sPreviewSkin !== 
false );
-   if ( $sPreviewSkin ) {
-   //reset resource loader cache for 
preview
-   global $wgResourceLoaderMaxage;
-   $wgResourceLoaderMaxage = array (
-   'versioned' => array ( 'server' 
=> 1, 'client' => 1 ),
-   'unversioned' => array ( 
'server' => 1, 'client' => 1 ),
-   );
-   }
-   }
-   }
$this->mCore->registerPermission( 'flexiskinedit', array(), 
array( 'type' => 'global' ) );
+
  

[MediaWiki-commits] [Gerrit] jjb: remove unused 'mwbranch' parameter for MW jobs - change (integration/config)

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

Change subject: jjb: remove unused 'mwbranch' parameter for MW jobs
..


jjb: remove unused 'mwbranch' parameter for MW jobs

Change-Id: Ib9808d7af033d6a4e9735713e4ab1b9b48cf711a
---
M jjb/mediawiki-extensions.yaml
1 file changed, 0 insertions(+), 6 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0703d5e..520d405 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -614,12 +614,6 @@
  - ZeroPortal:
 dependencies: 'Echo,JsonConfig,MobileFrontend,VisualEditor,ZeroBanner'
 
-mwbranch:
- - master
-# Commented out since they are not triggered for now.
-# - REL1_23
-# - REL1_19
-
 jobs:
  - '{name}-{ext-name}-testextension-{phpflavor}':
  phpflavor:

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

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

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


[MediaWiki-commits] [Gerrit] [WikibaseSolr] archive extension - change (integration/config)

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

Change subject: [WikibaseSolr] archive extension
..


[WikibaseSolr] archive extension

Wikibase uses ElasticSearch.

Change-Id: I69498c7c033e63aa21cbe250d8192254b29effd1
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 520d405..0255d64 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -597,7 +597,6 @@
  - VisualEditor
  - VoteNY
  - Widgets
- - WikibaseSolr
  - WikibaseJavaScriptApi
  - WikidataEntitySuggester
  - WikidataPageBanner
@@ -944,7 +943,6 @@
   - mwext-Widgets
   - mwext-WikiArticleFeeds
   - mwext-WikibaseMobile
-  - mwext-WikibaseSolr
   - mwext-WikiCategoryTagCloud
   - mwext-WikidataEntitySuggester
   - mwext-WikiLovesMonuments
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a916e69..b117bcb 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1008,8 +1008,6 @@
 voting: false
   - name: ^mwext-Widgets-testextension.*
 voting: false
-  - name: ^mwext-WikibaseSolr-testextension.*
-voting: false
   - name: ^mwext-WikidataEntitySuggester-testextension.*
 voting: false
   # Requires composer for autoloader
@@ -5778,8 +5776,7 @@
 
   - name: mediawiki/extensions/WikibaseSolr
 template:
-  - name: extension-jslint
-  - name: extension-unittests
+  - name: archived
 
   - name: mediawiki/extensions/WikiCategoryTagCloud
 template:

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

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

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


[MediaWiki-commits] [Gerrit] jjb: inline job-group having a single job - change (integration/config)

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

Change subject: jjb: inline job-group having a single job
..


jjb: inline job-group having a single job

No need for a jo-group when there is only a single job present.

Change-Id: I74f650aede8fc538b8dd7c9b62e22dd022b44d0b
---
M jjb/mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 14 deletions(-)

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



diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 5ffa765..0703d5e 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -429,19 +429,6 @@
  - shell: /srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve.sh
  - shell: sudo -u jenkins 
/srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve-push.sh
 
-# These are jobs we create for all of the extensions
-# listed below. If a job should only be created
-# for a select number of extensions or if it needs
-# custom parameters, add it below under "Extra jobs for specific extensions"
-# at the bottom of this file.
-- job-group:
-name: mwext-check-jobs
-jobs:
- - '{name}-{ext-name}-testextension-{phpflavor}':
- phpflavor:
- - hhvm
- - zend
-
 - project:
 name: mwext
 
@@ -634,7 +621,10 @@
 # - REL1_19
 
 jobs:
- - mwext-check-jobs
+ - '{name}-{ext-name}-testextension-{phpflavor}':
+ phpflavor:
+ - hhvm
+ - zend
 
  # deprecated qunit jobs for MediaWiki extensions
  # Should be migrated to use the generic 'mwext-qunit' job whith

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

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

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


[MediaWiki-commits] [Gerrit] Remove duplicate code from statementview.js - change (mediawiki...Wikibase)

2016-01-08 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Remove duplicate code from statementview.js
..


Remove duplicate code from statementview.js

Change-Id: I94e0a1154a17e4c0b05f2577d83bda0b3a24afd1
---
M view/resources/jquery/wikibase/jquery.wikibase.statementview.js
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Hoo man: Verified; Looks good to me, approved



diff --git a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
index b555063..1136f87 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
@@ -236,13 +236,7 @@
 
// Group qualifiers by property id:
if ( qualifiers && qualifiers.length ) {
-   var propertyIds = qualifiers.getPropertyOrder();
-
-   groupedQualifierSnaks = [];
-
-   for ( var i = 0; i < propertyIds.length; i++ ) {
-   groupedQualifierSnaks.push( 
qualifiers.getFilteredSnakList( propertyIds[i] ) );
-   }
+   groupedQualifierSnaks = 
qualifiers.getGroupedSnakLists();
}
 
// Using the property id, qualifier snaks are split into groups 
of snaklistviews. These

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94e0a1154a17e4c0b05f2577d83bda0b3a24afd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Hoo man 

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


[MediaWiki-commits] [Gerrit] Replace our MockSiteStore with MediaWiki's HashSiteStore - change (mediawiki...Wikibase)

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

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

Change subject: Replace our MockSiteStore with MediaWiki's HashSiteStore
..

Replace our MockSiteStore with MediaWiki's HashSiteStore

Bug: T91511
Change-Id: I7af91946408a213ef1026f16a4242c3eec031a25
---
M 
client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
M client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
M client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
M client/tests/phpunit/includes/OtherProjectsSitesGeneratorTest.php
M client/tests/phpunit/includes/SiteLinkCommentCreatorTest.php
M client/tests/phpunit/includes/WikibaseClientTest.php
D lib/tests/phpunit/MockSiteStore.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpFactoryProviderTest.php
M repo/tests/phpunit/includes/ChangeOp/ChangeOpsMergeTest.php
M repo/tests/phpunit/includes/ChangeOp/MergeChangeOpsFactoryTest.php
M repo/tests/phpunit/includes/Diff/DiffViewTest.php
M repo/tests/phpunit/includes/Diff/EntityDiffVisualizerTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataRequestHandlerTest.php
M repo/tests/phpunit/includes/LinkedData/EntityDataSerializationServiceTest.php
M repo/tests/phpunit/includes/api/ApiHelperFactoryTest.php
M repo/tests/phpunit/includes/api/ApiXmlFormatTest.php
M repo/tests/phpunit/includes/api/MergeItemsTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
M repo/tests/phpunit/includes/specials/SpecialEntityDataTest.php
M repo/tests/phpunit/includes/specials/SpecialMergeItemsTest.php
M repo/tests/phpunit/includes/specials/SpecialWikibaseRepoPageTestBase.php
M repo/tests/phpunit/maintenance/dumpRdfTest.php
25 files changed, 70 insertions(+), 155 deletions(-)


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

diff --git 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
index 69e102f..668417c 100644
--- 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
+++ 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
@@ -2,10 +2,11 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
+use TestSites;
 use Wikibase\Client\Hooks\OtherProjectsSidebarGeneratorFactory;
 use Wikibase\SettingsArray;
 use Wikibase\Test\MockRepository;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\OtherProjectsSidebarGeneratorFactory
@@ -27,7 +28,7 @@
) );
 
$siteLinkLookup = new MockRepository();
-   $siteStore = MockSiteStore::newFromTestSites();
+   $siteStore = new HashSiteStore( TestSites::getSites() );
 
$factory = new OtherProjectsSidebarGeneratorFactory(
$settings,
diff --git 
a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php 
b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
index 0f94e46..b121789 100644
--- a/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
+++ b/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorTest.php
@@ -2,14 +2,15 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
 use MediaWikiSite;
 use SiteStore;
 use Title;
+use TestSites;
 use Wikibase\Client\Hooks\OtherProjectsSidebarGenerator;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\SiteLink;
 use Wikibase\Lib\Store\SiteLinkLookup;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\OtherProjectsSidebarGenerator
@@ -87,7 +88,7 @@
 * @return SiteStore
 */
private function getSiteStore() {
-   $siteStore = MockSiteStore::newFromTestSites();
+   $siteStore = new HashSiteStore( TestSites::getSites() );
 
$site = new MediaWikiSite();
$site->setGlobalId( 'enwikiquote' );
diff --git 
a/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php 
b/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
index 4c7374f..b042b0c 100644
--- a/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
+++ b/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Client\Tests\Hooks;
 
+use HashSiteStore;
 use Language;
 use MediaWikiSite;
 use MediaWikiTestCase;
@@ -27,7 +28,6 @@
 use Wikibase\Settings;
 use Wikibase\SettingsArray;
 use Wikibase\Test\MockRepository;
-use Wikibase\Test\MockSiteStore;
 
 /**
  * @covers Wikibase\Client\Hooks\ParserOutputUpdateHookHandlers
@@ -65,7 +

[MediaWiki-commits] [Gerrit] [WikibaseSolr] archive extension - change (integration/config)

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

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

Change subject: [WikibaseSolr] archive extension
..

[WikibaseSolr] archive extension

Wikibase uses ElasticSearch.

Change-Id: I69498c7c033e63aa21cbe250d8192254b29effd1
---
M jjb/mediawiki-extensions.yaml
M zuul/layout.yaml
2 files changed, 1 insertion(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/54/263054/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 520d405..0255d64 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -597,7 +597,6 @@
  - VisualEditor
  - VoteNY
  - Widgets
- - WikibaseSolr
  - WikibaseJavaScriptApi
  - WikidataEntitySuggester
  - WikidataPageBanner
@@ -944,7 +943,6 @@
   - mwext-Widgets
   - mwext-WikiArticleFeeds
   - mwext-WikibaseMobile
-  - mwext-WikibaseSolr
   - mwext-WikiCategoryTagCloud
   - mwext-WikidataEntitySuggester
   - mwext-WikiLovesMonuments
diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index a916e69..e01b872 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -1008,8 +1008,6 @@
 voting: false
   - name: ^mwext-Widgets-testextension.*
 voting: false
-  - name: ^mwext-WikibaseSolr-testextension.*
-voting: false
   - name: ^mwext-WikidataEntitySuggester-testextension.*
 voting: false
   # Requires composer for autoloader
@@ -5778,8 +5776,7 @@
 
   - name: mediawiki/extensions/WikibaseSolr
 template:
-  - name: extension-jslint
-  - name: extension-unittests
+  - archived
 
   - name: mediawiki/extensions/WikiCategoryTagCloud
 template:

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

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

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


[MediaWiki-commits] [Gerrit] jjb: remove unused 'mwbranch' parameter for MW jobs - change (integration/config)

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

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

Change subject: jjb: remove unused 'mwbranch' parameter for MW jobs
..

jjb: remove unused 'mwbranch' parameter for MW jobs

Change-Id: Ib9808d7af033d6a4e9735713e4ab1b9b48cf711a
---
M jjb/mediawiki-extensions.yaml
1 file changed, 0 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/53/263053/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 0703d5e..520d405 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -614,12 +614,6 @@
  - ZeroPortal:
 dependencies: 'Echo,JsonConfig,MobileFrontend,VisualEditor,ZeroBanner'
 
-mwbranch:
- - master
-# Commented out since they are not triggered for now.
-# - REL1_23
-# - REL1_19
-
 jobs:
  - '{name}-{ext-name}-testextension-{phpflavor}':
  phpflavor:

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

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

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


[MediaWiki-commits] [Gerrit] jjb: inline job-group having a single job - change (integration/config)

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

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

Change subject: jjb: inline job-group having a single job
..

jjb: inline job-group having a single job

No need for a jo-group when there is only a single job present.

Change-Id: I74f650aede8fc538b8dd7c9b62e22dd022b44d0b
---
M jjb/mediawiki-extensions.yaml
1 file changed, 4 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/52/263052/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 5ffa765..0703d5e 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -429,19 +429,6 @@
  - shell: /srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve.sh
  - shell: sudo -u jenkins 
/srv/deployment/integration/slave-scripts/bin/gerrit-sync-ve-push.sh
 
-# These are jobs we create for all of the extensions
-# listed below. If a job should only be created
-# for a select number of extensions or if it needs
-# custom parameters, add it below under "Extra jobs for specific extensions"
-# at the bottom of this file.
-- job-group:
-name: mwext-check-jobs
-jobs:
- - '{name}-{ext-name}-testextension-{phpflavor}':
- phpflavor:
- - hhvm
- - zend
-
 - project:
 name: mwext
 
@@ -634,7 +621,10 @@
 # - REL1_19
 
 jobs:
- - mwext-check-jobs
+ - '{name}-{ext-name}-testextension-{phpflavor}':
+ phpflavor:
+ - hhvm
+ - zend
 
  # deprecated qunit jobs for MediaWiki extensions
  # Should be migrated to use the generic 'mwext-qunit' job whith

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

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

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


[MediaWiki-commits] [Gerrit] Config canges to wuu.wikipedia.org - change (operations/mediawiki-config)

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

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

Change subject: Config canges to wuu.wikipedia.org
..

Config canges to wuu.wikipedia.org

*Updating logo
*Setting correct default timezone
*Setting autoconfirm to 7 days and 10 edits.

Bug: T122476
Change-Id: I7c93824d2b8d72c1cc0888624077189c158b
---
M w/static/images/project-logos/wuuwiki.png
M wmf-config/InitialiseSettings.php
2 files changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/w/static/images/project-logos/wuuwiki.png 
b/w/static/images/project-logos/wuuwiki.png
index 479ab8a..c89ed9c 100644
--- a/w/static/images/project-logos/wuuwiki.png
+++ b/w/static/images/project-logos/wuuwiki.png
Binary files differ
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index d3b8a02..7d49477 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -417,6 +417,7 @@
'vepwiki' => 'Europe/Moscow',
'viwikivoyage' => 'Asia/Ho_Chi_Minh',
'xmfwiki' => 'Asia/Tbilisi',
+   'wuuwiki' => 'Asia/Shanghai', // T122476
'zhwikivoyage' => 'Asia/Shanghai', // T61077
 ),
 # @} end of wgLocaltimezone
@@ -4156,6 +4157,7 @@
'dewikibooks' => 7 * 86400,
'nowiki' => 7 * 86400, // T71302
'tenwiki' => 0, // T28554
+   'wuuwiki' => 7 * 86400, // T122476
'zhwiki' => 7 * 3600 * 24, // T16624
 ),
 
@@ -4183,6 +4185,7 @@
'ruwiki' => 15, // T43831
'simplewiki' => 10,
'wikidata' => 50, // T48461
+   'wuuwiki' => 10, // T122476
'zhwiki' => 50, // T16624
'zh_yuewiki' => 10, // T32538
 ),

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

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

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


[MediaWiki-commits] [Gerrit] Make use of EntityId::__toString for readability - change (mediawiki...Wikibase)

2016-01-08 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review.

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

Change subject: Make use of EntityId::__toString for readability
..

Make use of EntityId::__toString for readability

I believe this increases the readability of the code. EntityId does have
a well defined __toString method. Technically, __toString can change because
it's made for debugging and messages presented to the user. That's exactly
what I'm using it for in this patch. This and in test setups/mocks/dummies.

Practically, Entity::__toString is extremely unlikely to change. There is
nothing else in this object. But even with such a guarantee, __toString
should not be used in production code to form identifiers and such.

Change-Id: I8d309410109e2e3149e6d76f1b760eaa06190cb7
---
M client/includes/LangLinkHandler.php
M client/includes/ParserOutput/ClientParserOutputDataUpdater.php
M 
client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
M client/tests/phpunit/includes/specials/SpecialPagesWithBadgesTest.php
M lib/includes/store/sql/TermSqlIndex.php
M lib/tests/phpunit/Interactors/TermIndexSearchInteractorTest.php
M lib/tests/phpunit/MockRepository.php
M lib/tests/phpunit/formatters/EntityIdLinkFormatterTest.php
M lib/tests/phpunit/formatters/EntityIdPlainLinkFormatterTest.php
M lib/tests/phpunit/formatters/EntityIdTitleFormatterTest.php
M lib/tests/phpunit/formatters/VocabularyUriFormatterTest.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M lib/tests/phpunit/store/LanguageFallbackLabelDescriptionLookupFactoryTest.php
M lib/tests/phpunit/store/TermIndexTest.php
M repo/includes/Dumpers/JsonDumpGenerator.php
M repo/includes/Dumpers/RdfDumpGenerator.php
M repo/includes/EditEntity.php
M repo/includes/PropertyDataTypeChanger.php
M repo/includes/UpdateRepo/UpdateRepoJob.php
M repo/includes/api/CreateClaim.php
M repo/includes/api/EntityLoadingHelper.php
M repo/includes/api/SetQualifier.php
M repo/includes/store/sql/PropertyInfoTableBuilder.php
M repo/includes/store/sql/WikiPageEntityStore.php
M repo/tests/phpunit/includes/Dumpers/JsonDumpGeneratorTest.php
M repo/tests/phpunit/includes/Hooks/LinkBeginHookHandlerTest.php
M repo/tests/phpunit/includes/Interactors/ItemMergeInteractorTest.php
M repo/tests/phpunit/includes/Interactors/RedirectCreationInteractorTest.php
M repo/tests/phpunit/includes/api/ResultBuilderTest.php
M repo/tests/phpunit/includes/specials/SpecialListPropertiesTest.php
M repo/tests/phpunit/maintenance/dumpJsonTest.php
31 files changed, 51 insertions(+), 63 deletions(-)


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

diff --git a/client/includes/LangLinkHandler.php 
b/client/includes/LangLinkHandler.php
index ca4112d..a696e70 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -115,8 +115,7 @@
$links = iterator_to_array( 
$item->getSiteLinkList() );
$links = $this->indexLinksBySiteId( $links );
} else {
-   wfWarn( __METHOD__ . ": Could not load item " . 
$itemId->getSerialization()
-   . " for " . $title->getFullText() );
+   wfWarn( __METHOD__ . ": Could not load item 
$itemId for " . $title->getFullText() );
}
}
 
diff --git a/client/includes/ParserOutput/ClientParserOutputDataUpdater.php 
b/client/includes/ParserOutput/ClientParserOutputDataUpdater.php
index e9fb5e2..b4a7d60 100644
--- a/client/includes/ParserOutput/ClientParserOutputDataUpdater.php
+++ b/client/includes/ParserOutput/ClientParserOutputDataUpdater.php
@@ -130,10 +130,8 @@
 
if ( !$item || !$item->getSiteLinkList()->hasLinkWithSiteId( 
$this->siteId ) ) {
// Probably some sort of race condition or data 
inconsistency, better log a warning
-   wfLogWarning(
-   'According to a SiteLinkLookup ' . 
$itemId->getSerialization() .
-   ' is linked to ' . $this->siteId . ' while it 
is not or it does not exist.'
-   );
+   wfLogWarning( "According to a SiteLinkLookup $itemId is 
linked to " . $this->siteId
+   . ' while it is not or it does not exist.' );
 
return;
}
diff --git 
a/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
 
b/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
index ac147b3..a7a77db 100644
--- 
a/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
+++ 
b/client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
@@ -147,7 +147,7 @@

[MediaWiki-commits] [Gerrit] i18n: missing metadata block in aeb-arab - change (mediawiki...AntiSpoof)

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

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

Change subject: i18n: missing metadata block in aeb-arab
..

i18n: missing metadata block in aeb-arab

Change-Id: I8f674cda82e0721166dd5a465e34fafdcdfc510c
---
M i18n/aeb-arab.json
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AntiSpoof 
refs/changes/49/263049/1

diff --git a/i18n/aeb-arab.json b/i18n/aeb-arab.json
index 563d957..aaf18c3 100644
--- a/i18n/aeb-arab.json
+++ b/i18n/aeb-arab.json
@@ -1,4 +1,8 @@
 {
+   "@metadata": {
+   "authors": [
+   ]
+   },
"antispoof-desc": "يمنع إنشاء الحسابات بسكريبت مختلط، وبأسماء مشابهة 
ومربكة",
"antispoof-conflict-top": "الاسم \"$1\" شديد الشبه ب{{PLURAL:$2|الحساب 
الموجود|ال$2 حساب التالية}}:",
"antispoof-conflict-bottom": "من فضلك اختر اسما آخر.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f674cda82e0721166dd5a465e34fafdcdfc510c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AntiSpoof
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


[MediaWiki-commits] [Gerrit] Add jsonlint to 'npm test' - change (mediawiki...Babel)

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

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

Change subject: Add jsonlint to 'npm test'
..

Add jsonlint to 'npm test'

Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b
---
M Gruntfile.js
M package.json
2 files changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Babel 
refs/changes/48/263048/1

diff --git a/Gruntfile.js b/Gruntfile.js
index 95f763f..f49c925 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,12 +7,19 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-banana-checker' );
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
grunt.initConfig( {
banana: {
all: ["i18n/"]
-   }
+   },
+jsonlint: {
+all: [
+"**/*.json",
+"!node_modules/**"
+]
+}
} );
 
-   grunt.registerTask( 'test', [ 'banana' ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/package.json b/package.json
index 17b2cae..53f5214 100644
--- a/package.json
+++ b/package.json
@@ -9,6 +9,7 @@
   "devDependencies": {
 "grunt": "0.4.5",
 "grunt-cli": "0.1.13",
+"grunt-jsonlint": "1.0.7",
 "grunt-banana-checker": "0.4.0"
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id021bb07f98017c88a57f6af38d5a4f9e566879b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Babel
Gerrit-Branch: master
Gerrit-Owner: Hashar 

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


  1   2   >