[MediaWiki-commits] [Gerrit] operations/puppet[production]: Lists: Add exim filter for spam observed from qq.com

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

Change subject: Lists: Add exim filter for spam observed from qq.com
..


Lists: Add exim filter for spam observed from qq.com

Filter in exim messages with attributes seen in spam sent to list -owners
addresses.

Bug: T170601
Change-Id: I649a27fb0850f0de6755af1bd8f9497bb684d006
---
M modules/profile/templates/exim/system_filter.conf.mailman.erb
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/profile/templates/exim/system_filter.conf.mailman.erb 
b/modules/profile/templates/exim/system_filter.conf.mailman.erb
index 83d20fc..5c39455 100644
--- a/modules/profile/templates/exim/system_filter.conf.mailman.erb
+++ b/modules/profile/templates/exim/system_filter.conf.mailman.erb
@@ -17,3 +17,8 @@
fail text "Message rejected for privacy protection: The list of 
recipients contains both private and public mail lists"
endif
 endif
+
+# Filter spam observed from qq.com with matching subject.
+if $header_subject: contains "只要投紸荭宝天天" and $header_from: ends "qq.com" then
+fail text "Message rejected"
+endif

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Lists: Add exim filter for spam observed from qq.com

2017-07-14 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365279 )

Change subject: Lists: Add exim filter for spam observed from qq.com
..

Lists: Add exim filter for spam observed from qq.com

Filter in exim messages with attributes seen in spam sent to list -owners
addresses.

Bug: T170601
Change-Id: I649a27fb0850f0de6755af1bd8f9497bb684d006
---
M modules/profile/templates/exim/system_filter.conf.mailman.erb
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/365279/1

diff --git a/modules/profile/templates/exim/system_filter.conf.mailman.erb 
b/modules/profile/templates/exim/system_filter.conf.mailman.erb
index 83d20fc..c1589ad 100644
--- a/modules/profile/templates/exim/system_filter.conf.mailman.erb
+++ b/modules/profile/templates/exim/system_filter.conf.mailman.erb
@@ -17,3 +17,8 @@
fail text "Message rejected for privacy protection: The list of 
recipients contains both private and public mail lists"
endif
 endif
+
+# Filter spam observed from qq.com with matching subject. 
+if $header_subject: contains "只要投紸荭宝天天" and $header_from: ends "qq.com" then
+fail text "Message rejected"
+endif

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: install_server: add netmon1003 to DHCP/partman

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

Change subject: install_server: add netmon1003 to DHCP/partman
..


install_server: add netmon1003 to DHCP/partman

Bug: T170655
Change-Id: I463056f3b68aa27910886c1ef0745d5120e5b631
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 115bbff..80bd1b7 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -77,7 +77,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon1001|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|releases1001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases1001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 5b9abd1..991ea20 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5571,6 +5571,13 @@
 filename "stretch-installer/debian-installer/amd64/pxelinux.0";
 }
 
+host netmon1003 {
+hardware ethernet aa:00:00:79:17:b5;
+fixed-address netmon1003.wikimedia.org;
+option pxelinux.pathprefix "stretch-installer/";
+filename "stretch-installer/debian-installer/amd64/pxelinux.0";
+}
+
 host netmon2001 {
 hardware ethernet 30:e1:71:70:2b:94;
 fixed-address netmon2001.wikimedia.org;

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove ChangeLog file

2017-07-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365278 )

Change subject: Remove ChangeLog file
..

Remove ChangeLog file

it is very time consuming to keep ChangeLog file up-to-date.
But there is no benefit for this file. The changes could be
easily observed by the git log.

Change-Id: I72b45c50aae9ff057a9464fc129160b73658acf7
---
D ChangeLog
1 file changed, 0 insertions(+), 382 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/78/365278/1

diff --git a/ChangeLog b/ChangeLog
deleted file mode 100644
index 2e75305..000
--- a/ChangeLog
+++ /dev/null
@@ -1,382 +0,0 @@
-Release 3.0.20170521 (21 Mai 2017)
-
-
-Bugfixes (core)

-a79ce64 Increase the default socket_timeout to 75 seconds (T163635)
-4c8acd8 use repr() of exceptions to prevent UnicodeDecodeErrors (T120222)
-3727717 Handle offset mismatches during chunked upload (T156402)
-f4cc5ee Correct _wbtypes equality comparison (T160282)
-46dff29 Re-enable getFileVersionHistoryTable() method (T162528)
-6f7ecb4 Replaced the word 'async' with 'asynchronous' due to py3.7 (T106230)
-ac1d5ed Raise ImportError if no editor is available (T163632)
-489741f templatesWithParams: cache and standardise params (T113892)
-31eb055 getInternetArchiveURL: Retry http.fetch if there is a ConnectionError 
(T164208)
-6d8c9e7 Remove wikidataquery from pywikibot (T162585)
-
-Improvements (core)

-345e677 Introduce user_add_claim and allow asynchronous ItemPage.addClaim 
(T87493)
-eade449 Enable private edit summary in specialbots (T162527)
-d74cb73 Make a decorator for asynchronous methods
-4159a9c Provide options by a separate handler class
-ccdb71a Show a warning when a LogEntry type is not known (T135505)
-aa74f5c Add Wikibase Client extension requirement to APISite.unconnectedpages()
-894d5b9 Update content after editing entity
-ae0d3f9 Make WbTime from Timestamp and vice versa (T131624)
-feaffb7 Add support for geo-shape Wikibase data type (T161726)
-f8fe0a1 Add async parameter to ItemPage.editEntity (T86074)
-a7c02e5 Make sparql use Site to access sparql endpoint and entity_url (T159956)
-df7ab6d timestripper: search wikilinks to reduce false matches
-e54e584 Set Coordinate globe via item
-4e824eb use extract_templates_and_params_regex_simple for template validation
-e26c9b4 Add _items for WbMonolingualText
-c67e069 Allow date-versioned pypi releases from setup.py (T152907)
-2b6509f Provide site to WbTime via WbTime.fromWikibase
-165adc2 Provide preloading via GeneratorFactory.getCombinedGenerator() 
(T135331)
-f4af75f Accept QuitKeyboardInterrupt in specialbots.Uploadbot (T163970)
-a0c75d8 Remove unnecessary description change message when uploading a file 
(T163108)
-b5b721b Add 'OptionHandler' to bot.__all__ tuple
-6a56c23 Use FilePage.upload inside UploadRobot
-b6962ab Add support for tabular-data Wikibase data type (T163981)
-2d9e841 Get thumburl information in FilePage() (T137011)
-
-Updates (core)
---
-ec33c23 Update languages_by_size in family files
-d9b9913 wikisource_family.py: Add "pa" to languages_by_size
-6f159c5 Config2: limit the number of retries to 15 (T165898)
-
-Bugfixes (scripts)
---
-3c3bfb8 Remove comments when parsing template in harvest_template.py (T127691)
-b6e5218 Assign object to Tkdialog if it cannot be imported from gui module 
(T164163)
-a8aa142 weblinkchecker.py: Retry get_memento_info if there is a 
ConnectionError (T164365)
-09142d7 newitem.py: Test if the page actually exists (T86491)
-
-Improvements (scripts)
---
-d6dad3c use OptionHandler class for PageFromFileReader
-b6567e4 Do not use the deprecated pywikibot.setAction() in makecat.py
-88bbb2a Update newitem.py to use WikidataBot.user_edit_entity (T87493)
-07a4344 Improve redirect.py (T153883)
-da9021c use OptionHandler for redirect.RedirectGenerator
-bc59339 Enable a new option sdtemplate for customized sd template (T140624)
-cfaf7c0 Rewrite claimit.py (T69284)
-2487c75 Replace private mylang variables with mycode in misspelling.py
-37a4846 Use input_yn in states_redirect.py
-0809a60 Use bot classes for table2wiki.py
-
-Updates (scripts)
--
-f819ef4 Update cfr templates for cswiki
-
-
-Release 3.0.20170403 (03 April 2017)
-
-This is a major release from master branch.
-All previous 2.0 branches and tags are deprecated.
-The following list shows main changes since 01 January 2017.
-
-Bugfixes (core)

-0319439 Use default summary when summary value does not contain a string 
(T160823)
-303ff08 Enable specialbots.py for PY3 (T161457)
-2ddf680 Change tw(n)translate from Site.code to Site.lang dependency (T140624)
-dcf7567 Do not use the `imp` module in Python 3 (T158640)
-6773f74 Make sure the order of parameters does not change (T161291)
-3ff30a0 Use 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Add tooling for svg size checking

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

Change subject: Add tooling for svg size checking
..


Add tooling for svg size checking

also add pre-commit hook to ensure svgs are
compressed on commit

since extensions are accessible via http an .htaccess
is added to the dev-scripts folder for safety.

Bug: T170639
Change-Id: Ibcd5c29340d16c9cffc6e2eb90d33ee89b69874f
---
A dev-scripts/.htaccess
A dev-scripts/pre-commit
A dev-scripts/svg_check.sh
M package.json
4 files changed, 95 insertions(+), 2 deletions(-)

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



diff --git a/dev-scripts/.htaccess b/dev-scripts/.htaccess
new file mode 100644
index 000..3a42882
--- /dev/null
+++ b/dev-scripts/.htaccess
@@ -0,0 +1 @@
+Deny from all
diff --git a/dev-scripts/pre-commit b/dev-scripts/pre-commit
new file mode 100755
index 000..66d8854
--- /dev/null
+++ b/dev-scripts/pre-commit
@@ -0,0 +1,75 @@
+#!/usr/bin/env bash
+# Enable this pre-commit hook by running 'make installhooks'
+set -euo pipefail
+
+git-staged-files() {
+   git diff --cached -C -C -z --name-only --diff-filter=ACMRTUXB "$@"
+}
+
+git-is-staged() {
+   local diff=0
+   git-staged-files --quiet "$@" 2> /dev/null || diff=$?
+   [[ diff -eq 1 ]] || return 1
+}
+
+map() { IFS= read -rd $'\0' "$@"; }
+
+compress-png() {
+   git-staged-files \*.png|while map file; do
+   echo "Compressing $file"
+   optipng -q -o7 "$file" && advpng -z -4 "$file" && advdef -z -4 
"$file" | grep Output
+   git add "$file"
+   done
+}
+
+compress-svg() {
+   git-staged-files \*.svg|while map file; do
+   make nodecheck
+   echo "Compressing $file"
+   node_modules/.bin/svgo --config=.svgo.yml "$file"
+   git add "$file"
+   done
+}
+
+test-whitespace() { git diff --cached --check; }
+
+test-js() {
+   local err=0
+
+   make eslint || err+=1
+
+   if git-is-staged \*.js; then
+   make qunit || err+=1
+   fi
+
+   return $err
+}
+
+test-php() {
+   local err=0
+   if git-is-staged \*.php; then
+   make phplint || err+=1
+   fi
+
+   # todo: where is result set?
+   if git-is-staged 'includes/skins/*.php'; then
+   make validatehtml > $result || err+=1
+   fi
+
+   return $err
+}
+
+main() {
+   local err=0
+
+   compress-png
+   compress-svg
+
+   test-whitespace || err+=1
+   test-js || err+=1
+   test-php || err+=1
+
+   return $err
+}
+
+main "$@"
diff --git a/dev-scripts/svg_check.sh b/dev-scripts/svg_check.sh
new file mode 100755
index 000..3c7ef64
--- /dev/null
+++ b/dev-scripts/svg_check.sh
@@ -0,0 +1,17 @@
+#!/usr/bin/env bash
+found=0
+
+for svgfile in `find resources -type f -name "*.svg"`; do
+  outfile="$svgfile.tmp"
+  node_modules/.bin/svgo --config .svgo.yml -i $svgfile -o $outfile -q
+  if [ $(wc -c $svgfile | awk '{print $1}') -gt $(wc -c $outfile | awk '{print 
$1}') ]; then
+echo "File $svgfile is not compressed"
+found=$((found + 1))
+  fi
+  rm $outfile
+done
+
+if [ $found -gt 0 ]; then
+  echo "Found $found uncompressed SVG files. Please compress the files and 
re-submit the patch"
+  exit 1
+fi
\ No newline at end of file
diff --git a/package.json b/package.json
index 9ae3ac4..7184a14 100644
--- a/package.json
+++ b/package.json
@@ -1,13 +1,13 @@
 {
"private": true,
"scripts": {
-   "test": "grunt test"
+   "test": "grunt test && dev-scripts/svg_check.sh"
},
"dependencies": {
"svgo": ">=0.4.4"
},
"devDependencies": {
-   "eslint-config-wikimedia": "0.3.0",
+   "eslint-config-wikimedia": "0.4.0",
"grunt": "^1.0.1",
"grunt-banana-checker": "^0.5.0",
"grunt-contrib-watch": "^1.0.0",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcd5c29340d16c9cffc6e2eb90d33ee89b69874f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Jdlrobson 
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] mediawiki...WikibaseQualityConstraints[master]: Add tracking for cached query results

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

Change subject: Add tracking for cached query results
..


Add tracking for cached query results

Knowing how often the constraint checks use cached query results should
help us make a more informed decision about T170672.

Change-Id: I3ce135d03fde2251d83b2555ca867ad9064ae21f
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
1 file changed, 17 insertions(+), 10 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 11a877b..d73a042 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -3,9 +3,9 @@
 namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper;
 
 use Config;
-use Http;
 use IBufferingStatsdDataFactory;
 use MediaWiki\MediaWikiServices;
+use MWHttpRequest;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Statement\Statement;
@@ -212,25 +212,32 @@
PHP_QUERY_RFC3986
);
 
+   $options = [
+   'method' => 'GET',
+   'timeout' => (int)round( ( $maxQueryTimeMillis + 1000 ) 
/ 1000 ),
+   'connectTimeout' => 'default',
+   ];
+   $request = MWHttpRequest::factory( $url, $options );
$startTime = microtime( true );
-   $json = Http::get(
-   $url,
-   [
-   'timeout' => (int)round( ( $maxQueryTimeMillis 
+ 1000 ) / 1000 ),
-   ]
-   );
+   $status = $request->execute();
$endTime = microtime( true );
$this->dataFactory->timing(
'wikibase.quality.constraints.sparql.timing',
( $endTime - $startTime ) * 1000
);
 
-   if ( $json === false ) {
+   if ( $request->getResponseHeader( 'X-Cache-Status' ) === 'hit' 
) {
+   $this->dataFactory->increment( 
'wikibase.quality.constraints.sparql.cached' );
+   }
+
+   if ( $status->isOk() ) {
+   $json = $request->getContent();
+   $arr = json_decode( $json, true );
+   return $arr;
+   } else {
$this->dataFactory->increment( 
'wikibase.quality.constraints.sparql.error' );
throw new SparqlHelperException();
}
-   $arr = json_decode( $json, true );
-   return $arr;
}
 
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ce135d03fde2251d83b2555ca867ad9064ae21f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Refactor: rmElementsWithSelector transform is in its own file

2017-07-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365277 )

Change subject: Refactor: rmElementsWithSelector transform is in its own file
..

Refactor: rmElementsWithSelector transform is in its own file

Allows easier importing by other transformations

Change-Id: Ie84146e3dd4783be5e50ac0669e32688fa60e035
---
A lib/transformations/rmElementsWithSelector.js
M lib/transforms.js
2 files changed, 16 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/77/365277/1

diff --git a/lib/transformations/rmElementsWithSelector.js 
b/lib/transformations/rmElementsWithSelector.js
new file mode 100644
index 000..6cc9dd6
--- /dev/null
+++ b/lib/transformations/rmElementsWithSelector.js
@@ -0,0 +1,14 @@
+'use strict';
+
+/**
+ * Remove any elements matching selector from doc
+ * @param {Document} doc
+ * @param {string} selector
+ */
+module.exports = function(doc, selector) {
+const ps = doc.querySelectorAll(selector) || [];
+for (let idx = 0; idx < ps.length; idx++) {
+const node = ps[idx];
+node.parentNode.removeChild(node);
+}
+};
diff --git a/lib/transforms.js b/lib/transforms.js
index be7ff1e..9a6f797 100644
--- a/lib/transforms.js
+++ b/lib/transforms.js
@@ -6,6 +6,7 @@
 'use strict';
 
 const domino = require('domino');
+const rmElementsWithSelector = 
require('./transformations/rmElementsWithSelector');
 const anchorPopUpMediaTransforms = 
require('./transformations/anchorPopUpMediaTransforms');
 const hideRedLinks = require('./transformations/hideRedLinks');
 const hideIPA = require('./transformations/hideIPA');
@@ -324,13 +325,7 @@
 return doc.body.innerHTML;
 };
 
-transforms.rmElementsWithSelector = function(doc, selector) {
-const ps = doc.querySelectorAll(selector) || [];
-for (let idx = 0; idx < ps.length; idx++) {
-const node = ps[idx];
-node.parentNode.removeChild(node);
-}
-};
+transforms.rmElementsWithSelector = rmElementsWithSelector;
 
 // Make two internal functions visible for testing
 transforms._rmBracketSpans = _rmBracketSpans;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie84146e3dd4783be5e50ac0669e32688fa60e035
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
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] operations/puppet[production]: install_server: add netmon1003 to DHCP/partman

2017-07-14 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365276 )

Change subject: install_server: add netmon1003 to DHCP/partman
..

install_server: add netmon1003 to DHCP/partman

Bug: T170655
Change-Id: I463056f3b68aa27910886c1ef0745d5120e5b631
---
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/365276/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index b39bc85..618f0c9 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -77,7 +77,7 @@
 elastic20[0-2][0-9]|elastic203[0-6]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg ;; \
 
labcontrol100[34]|labmon1001|mwlog[12]001|relforge100[12]|scb200[1-6]|stat100[56])
 echo partman/raid10-gpt-srv-lvm-ext4.cfg ;; \
 analytics1003|cobalt|thorium) echo partman/raid10-gpt-srv-lvm-ext4.cfg 
;; \
-
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|releases1001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
+
acrab|acrux|actinium|alcyone|aluminium|argon|chlorine|bromine|bohrium|darmstadtium|dbmonitor[12]001|dubnium|etcd100[1-6]|etherpad[12]001|fermium|hassaleh|hassium|krypton|kubetcd[12]00[1-3]|meitnerium|mendelevium|mwdebug100[12]|netmon1003|releases1001|nihal|nitrogen|planet[12]001|pollux|roentgenium|rutherfordium|sca[12]00[34]|seaborgium|serpens|tureis|alsafi|kraz|install[12]00[12]|ununpentium|zosma)
 echo partman/flat.cfg virtual.cfg ;; \
 diadem|dysprosium) echo partman/flat.cfg virtual.cfg ;; \
 kubestagetcd100[123]|neon) echo partman/flat.cfg virtual.cfg ;; \
 eventlog[1-2]001|ocg100[1-2]|scb100[1-4]) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 9f9b323..158943f 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -5551,6 +5551,13 @@
 filename "stretch-installer/debian-installer/amd64/pxelinux.0";
 }
 
+host netmon1003 {
+hardware ethernet aa:00:00:79:17:b5;
+fixed-address netmon1003.wikimedia.org;
+option pxelinux.pathprefix "stretch-installer/";
+filename "stretch-installer/debian-installer/amd64/pxelinux.0";
+}
+
 host netmon2001 {
 hardware ethernet 30:e1:71:70:2b:94;
 fixed-address netmon2001.wikimedia.org;

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: add dinwiki to pywikibot

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

Change subject: add dinwiki to pywikibot
..


add dinwiki to pywikibot

Bug: T170695
Change-Id: I883d649d1661e81ed245dfed313286871ce0a649
---
M pywikibot/families/wikipedia_family.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 6775928..255eb09 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -64,7 +64,7 @@
 'bi', 'srn', 'zu', 'ltg', 'chr', 'tcy', 'sm', 'om', 'xh', 'tn',
 'chy', 'rmy', 'tw', 'cu', 'tum', 'pih', 'st', 'got', 'rn', 'pnt',
 'ss', 'bm', 'ch', 'ts', 'ady', 'iu', 'fj', 'ny', 'ee', 'ks', 'ak',
-'ik', 'sg', 've', 'dz', 'ff', 'kbp', 'ti', 'cr', 'atj',
+'ik', 'sg', 've', 'dz', 'ff', 'kbp', 'ti', 'cr', 'atj', 'din',
 ]
 
 # Sites we want to edit but not count as real languages

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I883d649d1661e81ed245dfed313286871ce0a649
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Activate perfield_builder by default on relforge profiles

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

Change subject: Activate perfield_builder by default on relforge profiles
..


Activate perfield_builder by default on relforge profiles

this is closer to production defaults.

Change-Id: Ibc3f292c297961da35df88a1c33b28be5e60e55f
---
M tests/relforge/RelForgeSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/tests/relforge/RelForgeSettings.php 
b/tests/relforge/RelForgeSettings.php
index edc12ef..d20e365 100644
--- a/tests/relforge/RelForgeSettings.php
+++ b/tests/relforge/RelForgeSettings.php
@@ -40,6 +40,7 @@
 // Move to prod like defaults now
 $wgCirrusSearchSimilarityProfile = 'wmf_defaults';
 $wgCirrusSearchRescoreProfile = 'wsum_inclinks';
+$wgCirrusSearchFullTextQueryBuilderProfile = 'perfield_builder';
 
 // Activate devel options useful for relforge
 $wgCirrusSearchDevelOptions = [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc3f292c297961da35df88a1c33b28be5e60e55f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Remove all CSS classes from indicator to avoid collision

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

Change subject: Remove all CSS classes from indicator to avoid collision
..

Remove all CSS classes from indicator to avoid collision

When you tested filter against the change (with failure) and then
checked the syntax (with success), the new CSS class was overriden by
the old one, that's why the red X stayed.

Bug: T129753
Change-Id: I34cdba72f0b0e24e97083ba6b47554d0c8b826cf
---
M modules/ext.abuseFilter.edit.js
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/74/365274/2

diff --git a/modules/ext.abuseFilter.edit.js b/modules/ext.abuseFilter.edit.js
index c5b0577..cc15ec9 100644
--- a/modules/ext.abuseFilter.edit.js
+++ b/modules/ext.abuseFilter.edit.js
@@ -63,9 +63,8 @@
 
$( '#mw-abusefilter-syntaxresult' )
.show()
-   .removeClass( 'mw-abusefilter-syntaxresult-ok 
mw-abusefilter-syntaxresult-error' )
+   .attr( 'class', className )
.text( resultText )
-   .addClass( className )
.data( 'syntaxOk', syntaxOk );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34cdba72f0b0e24e97083ba6b47554d0c8b826cf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex theme: Add play icon (copied from WikimediaUI theme)

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

Change subject: Apex theme: Add play icon (copied from WikimediaUI theme)
..


Apex theme: Add play icon (copied from WikimediaUI theme)

Change-Id: Icbe015289e6c0c369267b60b475d68576cd6e088
---
M src/themes/apex/icons-media.json
A src/themes/apex/images/icons/play-ltr.svg
A src/themes/apex/images/icons/play-rtl.svg
3 files changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/src/themes/apex/icons-media.json b/src/themes/apex/icons-media.json
index 809cd02..dc4ca10 100644
--- a/src/themes/apex/icons-media.json
+++ b/src/themes/apex/icons-media.json
@@ -7,6 +7,10 @@
"imageGallery": { "file": {
"ltr": "images/icons/imageGallery-ltr.svg",
"rtl": "images/icons/imageGallery-rtl.svg"
+   } },
+   "play": { "file": {
+   "ltr": "images/icons/play-ltr.svg",
+   "rtl": "images/icons/play-rtl.svg"
} }
}
 }
diff --git a/src/themes/apex/images/icons/play-ltr.svg 
b/src/themes/apex/images/icons/play-ltr.svg
new file mode 100644
index 000..82a16a4
--- /dev/null
+++ b/src/themes/apex/images/icons/play-ltr.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
diff --git a/src/themes/apex/images/icons/play-rtl.svg 
b/src/themes/apex/images/icons/play-rtl.svg
new file mode 100644
index 000..dae95c4
--- /dev/null
+++ b/src/themes/apex/images/icons/play-rtl.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icbe015289e6c0c369267b60b475d68576cd6e088
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: add netmon1003, v4 and v6

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

Change subject: add netmon1003, v4 and v6
..


add netmon1003, v4 and v6

Bug: T170653
Change-Id: I4da3cfeff4d77ba504d1c8e7c63e6cb874bba1c3
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/154.80.208.in-addr.arpa
M templates/wikimedia.org
3 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 246d26d..a18a68c 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -23,6 +23,7 @@
 
 9.4.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   actinium.wikimedia.org.
 5.0.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   netmon1002.wikimedia.org.
+6.0.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   netmon1003.wikimedia.org.
 
 7.1.0.0.4.5.1.0.0.8.0.0.8.0.2.0 1H IN PTR   contint1001.wikimedia.org.
 
diff --git a/templates/154.80.208.in-addr.arpa 
b/templates/154.80.208.in-addr.arpa
index f41d212..accd65a 100644
--- a/templates/154.80.208.in-addr.arpa
+++ b/templates/154.80.208.in-addr.arpa
@@ -18,6 +18,7 @@
 2   1H  IN PTR  ae1-1001.cr1-eqiad.wikimedia.org.
 3   1H  IN PTR  ae1-1001.cr2-eqiad.wikimedia.org.
 5   1H  IN PTR  netmon1002.wikimedia.org.
+6   1H  IN PTR  netmon1003.wikimedia.org.
 
 11  1H  IN PTR  dataset1001.wikimedia.org.
 12  1H  IN PTR  labservices1002.wikimedia.org.
diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index ea547a8..21b67d7 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -194,6 +194,8 @@
 netmon1001  1H  IN  2620:0:861:2:208:80:154:159
 netmon1002  1H  IN A208.80.154.5
 netmon1002  1H  IN  2620:0:861:1:208:80:154:5
+netmon1003  1H  IN A208.80.154.6
+netmon1003  1H  IN  2620:0:861:1:208:80:154:6
 netmon2001  1H  IN A208.80.153.110
 netmon2001  1H  IN  2620:0:860:4:208:80:153:110
 pay-lvs1001 1H  IN A208.80.155.2

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...civicrm[master]: Do not add id if the field does not exist

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

Change subject: Do not add id if the field does not exist
..


Do not add id if the field does not exist

https://github.com/civicrm/civicrm-core/pull/10599

Change-Id: I64f2e5a7ed0200cc1f489ebfd30ad8d241cdad8b
---
M Civi/API/SelectQuery.php
M api/v3/utils.php
2 files changed, 8 insertions(+), 4 deletions(-)

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



diff --git a/Civi/API/SelectQuery.php b/Civi/API/SelectQuery.php
index 7e047bd..22a9c97 100644
--- a/Civi/API/SelectQuery.php
+++ b/Civi/API/SelectQuery.php
@@ -467,8 +467,10 @@
   }
 }
 
-// Always select the ID.
-$this->selectFields[self::MAIN_TABLE_ALIAS . ".id"] = "id";
+// Always select the ID if it exists.
+if (array_key_exists('id', $this->apiFieldSpec)) {
+  $this->selectFields[self::MAIN_TABLE_ALIAS . ".id"] = "id";
+}
 
 // core return fields
 foreach ($return as $fieldName) {
diff --git a/api/v3/utils.php b/api/v3/utils.php
index 7f0c00c..9f42886 100644
--- a/api/v3/utils.php
+++ b/api/v3/utils.php
@@ -922,8 +922,10 @@
   if ($unique) {
 if (empty($fields['id'])) {
   $lowercase_entity = 
_civicrm_api_get_entity_name_from_camel(_civicrm_api_get_entity_name_from_dao($bao));
-  $fields['id'] = $fields[$lowercase_entity . '_id'];
-  unset($fields[$lowercase_entity . '_id']);
+  if (isset($fields[$lowercase_entity . '_id'])) {
+$fields['id'] = $fields[$lowercase_entity . '_id'];
+unset($fields[$lowercase_entity . '_id']);
+  }
 }
 return $fields;
   }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64f2e5a7ed0200cc1f489ebfd30ad8d241cdad8b
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm/civicrm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: add dinwiki to pywikibot

2017-07-14 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365269 )

Change subject: add dinwiki to pywikibot
..

add dinwiki to pywikibot

Bug:T170695
Change-Id: I883d649d1661e81ed245dfed313286871ce0a649
---
M pywikibot/families/wikipedia_family.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/69/365269/2

diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 6775928..255eb09 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -64,7 +64,7 @@
 'bi', 'srn', 'zu', 'ltg', 'chr', 'tcy', 'sm', 'om', 'xh', 'tn',
 'chy', 'rmy', 'tw', 'cu', 'tum', 'pih', 'st', 'got', 'rn', 'pnt',
 'ss', 'bm', 'ch', 'ts', 'ady', 'iu', 'fj', 'ny', 'ee', 'ks', 'ak',
-'ik', 'sg', 've', 'dz', 'ff', 'kbp', 'ti', 'cr', 'atj',
+'ik', 'sg', 've', 'dz', 'ff', 'kbp', 'ti', 'cr', 'atj', 'din',
 ]
 
 # Sites we want to edit but not count as real languages

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I883d649d1661e81ed245dfed313286871ce0a649
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Sfic 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add newline between namespace and use statements

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

Change subject: Add newline between namespace and use statements
..

Add newline between namespace and use statements


FOUND 1 ERROR AFFECTING 1 LINE
--
 3 | ERROR | [x] There must be one blank line after the namespace
   |   | declaration
   |   | (PSR2.Namespaces.NamespaceDeclaration.BlankLineAfter)
--
PHPCBF CAN FIX THE 1 MARKED SNIFF VIOLATIONS AUTOMATICALLY
--

Change-Id: I6ce7f1545329ed529ed8ff858ce5eb9c0144e4c0
---
M tests/phpunit/api/ApiFlowEditHeaderTest.php
M tests/phpunit/api/ApiFlowEditPostTest.php
M tests/phpunit/api/ApiFlowEditTopicSummaryTest.php
M tests/phpunit/api/ApiFlowReplyTest.php
M tests/phpunit/api/ApiFlowViewHeaderTest.php
5 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/api/ApiFlowEditHeaderTest.php 
b/tests/phpunit/api/ApiFlowEditHeaderTest.php
index d894694..da1a676 100644
--- a/tests/phpunit/api/ApiFlowEditHeaderTest.php
+++ b/tests/phpunit/api/ApiFlowEditHeaderTest.php
@@ -1,6 +1,7 @@
 https://gerrit.wikimedia.org/r/365273
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add urlencode for URL encoding of lang values

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

Change subject: Add urlencode for URL encoding of lang values
..


Add urlencode for URL encoding of lang values

Change-Id: I3ebeff2b947543a40b502403b47346a1b9a4
---
M includes/filerepo/FileRepo.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php
index 8edf81f..f89d96b 100644
--- a/includes/filerepo/FileRepo.php
+++ b/includes/filerepo/FileRepo.php
@@ -776,7 +776,7 @@
public function getDescriptionRenderUrl( $name, $lang = null ) {
$query = 'action=render';
if ( !is_null( $lang ) ) {
-   $query .= '=' . $lang;
+   $query .= '=' . urlencode( $lang );
}
if ( isset( $this->scriptDirUrl ) ) {
return $this->makeUrl(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ebeff2b947543a40b502403b47346a1b9a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add namespace name translation for Dinka

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

Change subject: Add namespace name translation for Dinka
..


Add namespace name translation for Dinka

Change-Id: I12e9dd703820ef3c8dd6d1897caf51cc1b40b61c
---
M Flow.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index 2754310..bb5969b 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -54,6 +54,11 @@
NS_TOPIC =>  'Thema',
 ];
 
+/** Dinka */
+$namespaceNames['din'] = [
+   NS_TOPIC =>  'Këjamic',
+];
+
 /** Zazaki */
 $namespaceNames['diq'] = [
NS_TOPIC =>  'Mewzu',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove unnecessary whitespace in Flow.namespaces.php

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

Change subject: Remove unnecessary whitespace in Flow.namespaces.php
..


Remove unnecessary whitespace in Flow.namespaces.php

Change-Id: Iebc7934494855a9530690d13e1d72007daeaa82b
---
M Flow.namespaces.php
1 file changed, 37 insertions(+), 37 deletions(-)

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



diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index bb5969b..3e6b55a 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -11,7 +11,7 @@
 
 /** English */
 $namespaceNames['en'] = [
-   NS_TOPIC =>  'Topic',
+   NS_TOPIC => 'Topic',
 ];
 
 /** Arabic */
@@ -21,72 +21,72 @@
 
 /** Asturian */
 $namespaceNames['ast'] = [
-   NS_TOPIC =>  'Asuntu',
+   NS_TOPIC => 'Asuntu',
 ];
 
 /** South Azerbaijani */
 $namespaceNames['azb'] = [
-   NS_TOPIC =>  'مبحث',
+   NS_TOPIC => 'مبحث',
 ];
 
 /** Western Balochi */
 $namespaceNames['bgn'] = [
-   NS_TOPIC =>  'سر_ئو_بُن',
+   NS_TOPIC => 'سر_ئو_بُن',
 ];
 
 /** Bengali */
 $namespaceNames['bn'] = [
-   NS_TOPIC =>  'প্রসঙ্গ',
+   NS_TOPIC => 'প্রসঙ্গ',
 ];
 
 /** Catalan */
 $namespaceNames['ca'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Central Kurdish */
 $namespaceNames['ckb'] = [
-   NS_TOPIC =>  'بابه‌ت',
+   NS_TOPIC => 'بابه‌ت',
 ];
 
 /** German */
 $namespaceNames['de'] = [
-   NS_TOPIC =>  'Thema',
+   NS_TOPIC => 'Thema',
 ];
 
 /** Dinka */
 $namespaceNames['din'] = [
-   NS_TOPIC =>  'Këjamic',
+   NS_TOPIC => 'Këjamic',
 ];
 
 /** Zazaki */
 $namespaceNames['diq'] = [
-   NS_TOPIC =>  'Mewzu',
+   NS_TOPIC => 'Mewzu',
 ];
 
 /** Spanish */
 $namespaceNames['es'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Estonian */
 $namespaceNames['et'] = [
-   NS_TOPIC =>  'Teema',
+   NS_TOPIC => 'Teema',
 ];
 
 /** Persian */
 $namespaceNames['fa'] = [
-   NS_TOPIC =>  'مبحث',
+   NS_TOPIC => 'مبحث',
 ];
 
 /** Finnish */
 $namespaceNames['fi'] = [
-   NS_TOPIC =>  'Aihe',
+   NS_TOPIC => 'Aihe',
 ];
 
 /** French */
 $namespaceNames['fr'] = [
-   NS_TOPIC =>  'Sujet',
+   NS_TOPIC => 'Sujet',
 ];
 
 $namespaceNames['gom'] = [
@@ -95,12 +95,12 @@
 
 /** Hebrew */
 $namespaceNames['he'] = [
-   NS_TOPIC =>  'נושא',
+   NS_TOPIC => 'נושא',
 ];
 
 /** Hungarian */
 $namespaceNames['hu'] = [
-   NS_TOPIC =>  'Téma',
+   NS_TOPIC => 'Téma',
 ];
 
 /** Indonesian */
@@ -110,7 +110,7 @@
 
 /** Italian */
 $namespaceNames['it'] = [
-   NS_TOPIC =>  'Argomento',
+   NS_TOPIC => 'Argomento',
 ];
 
 /** Korean */
@@ -120,95 +120,95 @@
 
 /** Luxembourgish */
 $namespaceNames['lb'] = [
-   NS_TOPIC =>  'Thema',
+   NS_TOPIC => 'Thema',
 ];
 
 /** Northern Luri */
 $namespaceNames['lrc'] = [
-   NS_TOPIC =>  'گأپئسئن',
+   NS_TOPIC => 'گأپئسئن',
 ];
 
 /** Latvian */
 $namespaceNames['lv'] = [
-   NS_TOPIC =>  'Tēma',
+   NS_TOPIC => 'Tēma',
 ];
 
 /** Macedonian */
 $namespaceNames['mk'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Mazandarani */
 $namespaceNames['mzn'] = [
-   NS_TOPIC =>  'تاپیک',
+   NS_TOPIC => 'تاپیک',
 ];
 
 /** Norwegian Bokmål (norsk bokmål) */
 $namespaceNames['nb'] = [
-   NS_TOPIC =>  'Sak',
+   NS_TOPIC => 'Sak',
 ];
 
 /** Dutch */
 $namespaceNames['nl'] = [
-   NS_TOPIC =>  'Onderwerp',
+   NS_TOPIC => 'Onderwerp',
 ];
 
 /** Occitan */
 $namespaceNames['oc'] = [
-   NS_TOPIC =>  'Subjècte',
+   NS_TOPIC => 'Subjècte',
 ];
 
 /** Orya */
 $namespaceNames['or'] = [
-   NS_TOPIC =>  'ବିଷୟ',
+   NS_TOPIC => 'ବିଷୟ',
 ];
 
 /** Polish */
 $namespaceNames['pl'] = [
-   NS_TOPIC =>  'Wątek',
+   NS_TOPIC => 'Wątek',
 ];
 
 /** Western Punjabi */
 $namespaceNames['pnb'] = [
-   NS_TOPIC =>  'موضوع',
+   NS_TOPIC => 'موضوع',
 ];
 
 /** Portuguese */
 $namespaceNames['pt'] = [
-   NS_TOPIC =>  'Tópico',
+   NS_TOPIC => 'Tópico',
 ];
 
 /** Russian */
 $namespaceNames['ru'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Slovenian */
 $namespaceNames['sl'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Swedish */
 $namespaceNames['sv'] = [
-   NS_TOPIC =>  'Ämne',
+   NS_TOPIC => 'Ämne',
 ];
 
 /** Ukrainian */
 $namespaceNames['uk'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Urdu */
 $namespaceNames['ur'] = [
-   NS_TOPIC =>  'موضوع',
+   NS_TOPIC => 'موضوع',
 ];
 
 /** Vietnamese */
 $namespaceNames['vi'] = [
-   NS_TOPIC =>  'Đề_tài',
+   NS_TOPIC => 'Đề_tài',
 ];
 
 /** Yiddish */
 $namespaceNames['yi'] = [
-   NS_TOPIC =>  'טעמע',
+   NS_TOPIC => 'טעמע',
 ];

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

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex theme: Add play icon (copied from WikimediaUI theme)

2017-07-14 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365272 )

Change subject: Apex theme: Add play icon (copied from WikimediaUI theme)
..

Apex theme: Add play icon (copied from WikimediaUI theme)

Change-Id: Icbe015289e6c0c369267b60b475d68576cd6e088
---
M src/themes/apex/icons-media.json
A src/themes/apex/images/icons/play-ltr.svg
A src/themes/apex/images/icons/play-rtl.svg
3 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/72/365272/1

diff --git a/src/themes/apex/icons-media.json b/src/themes/apex/icons-media.json
index 809cd02..dc4ca10 100644
--- a/src/themes/apex/icons-media.json
+++ b/src/themes/apex/icons-media.json
@@ -7,6 +7,10 @@
"imageGallery": { "file": {
"ltr": "images/icons/imageGallery-ltr.svg",
"rtl": "images/icons/imageGallery-rtl.svg"
+   } },
+   "play": { "file": {
+   "ltr": "images/icons/play-ltr.svg",
+   "rtl": "images/icons/play-rtl.svg"
} }
}
 }
diff --git a/src/themes/apex/images/icons/play-ltr.svg 
b/src/themes/apex/images/icons/play-ltr.svg
new file mode 100644
index 000..82a16a4
--- /dev/null
+++ b/src/themes/apex/images/icons/play-ltr.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+
diff --git a/src/themes/apex/images/icons/play-rtl.svg 
b/src/themes/apex/images/icons/play-rtl.svg
new file mode 100644
index 000..dae95c4
--- /dev/null
+++ b/src/themes/apex/images/icons/play-rtl.svg
@@ -0,0 +1,4 @@
+
+http://www.w3.org/2000/svg; width="24" height="24" viewBox="0 0 24 
24">
+
+

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: setting labnet100[34] install params

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

Change subject: setting labnet100[34] install params
..


setting labnet100[34] install params

set dhcpd lease, netboot partitioning, and basic site.pp inclusion for
firewalling

Bug:T165779
Change-Id: I62fbf742bd4e1b10d1c604aa2b4356ed33cb2cc5
---
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
3 files changed, 17 insertions(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 7b67bc7..c0e1157 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1235,6 +1235,12 @@
 include ::standard
 }
 
+node /labnet1001[34]\.eqiad\.wmnet/ {
+include ::standard
+include ::base::firewall
+}
+
+
 node 'labnet1002.eqiad.wmnet' {
 role(labs::openstack::nova::api)
 include ::standard
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index d9291ea..115bbff 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -98,7 +98,7 @@
 labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \
 labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \
 sodium) echo partman/lvm-ext-srv.cfg ;; \
-labpuppetmaster100[12]|labnodepool1002|labweb100[12]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg;; \
+labpuppetmaster100[12]|labnet100[34]|labnodepool1002|labweb100[12]) 
echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
 labstore200[1-4]) echo partman/labstore-lvm-noraid.cfg ;; \
 labtestneutron2001) echo partman/mw.cfg ;; \
 labtestnet2001) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index d358ca8..5b9abd1 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2682,6 +2682,16 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labnet1003 {
+hardware ethernet 30:e1:71:60:52:40;
+fixed-address labnet1003.eqiad.wmnet;
+}
+
+host labnet1004 {
+hardware ethernet 30:e1:71:60:42:20;
+fixed-address labnet1004.eqiad.wmnet;
+}
+
 host labnodepool1001 {
 hardware ethernet 84:2b:2b:fd:be:fd;
 fixed-address labnodepool1001.eqiad.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...NewSignupPage[master]: Reorganize directory structure + file renaming

2017-07-14 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365271 )

Change subject: Reorganize directory structure + file renaming
..

Reorganize directory structure + file renaming

Bug: T160849
Change-Id: Ibf2f6f6cb03283afb5e77c30b7addfccc09f95e0
---
M extension.json
R includes/NewSignupPage.class.php
R includes/auth/NewSignupPageAuthenticationRequest.php
R includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
R resources/js/NewSignupPage.js
R sql/user_register_track.sql
6 files changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/extension.json b/extension.json
index fdc..ef54025 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "New Signup Page",
-   "version": "0.9.1",
+   "version": "1.0.0",
"author": [
"Jack Phoenix"
],
@@ -20,9 +20,9 @@
]
},
"AutoloadClasses": {
-   "NewSignupPage": "NewSignupPage.class.php",
-   "NewSignupPageAuthenticationRequest": 
"NewSignupPageAuthenticationRequest.php",
-   "NewSignupPageSecondaryAuthenticationProvider": 
"NewSignupPageSecondaryAuthenticationProvider.php"
+   "NewSignupPage": "includes/NewSignupPage.class.php",
+   "NewSignupPageAuthenticationRequest": 
"includes/auth/NewSignupPageAuthenticationRequest.php",
+   "NewSignupPageSecondaryAuthenticationProvider": 
"includes/auth/NewSignupPageSecondaryAuthenticationProvider.php"
},
"Hooks": {
"BeforePageDisplay": [
@@ -35,7 +35,7 @@
},
"ResourceModules": {
"ext.newsignuppage": {
-   "scripts": "NewSignupPage.js",
+   "scripts": "resources/js/NewSignupPage.js",
"messages": [
"badretype"
],
diff --git a/NewSignupPage.class.php b/includes/NewSignupPage.class.php
similarity index 100%
rename from NewSignupPage.class.php
rename to includes/NewSignupPage.class.php
diff --git a/NewSignupPageAuthenticationRequest.php 
b/includes/auth/NewSignupPageAuthenticationRequest.php
similarity index 100%
rename from NewSignupPageAuthenticationRequest.php
rename to includes/auth/NewSignupPageAuthenticationRequest.php
diff --git a/NewSignupPageSecondaryAuthenticationProvider.php 
b/includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
similarity index 100%
rename from NewSignupPageSecondaryAuthenticationProvider.php
rename to includes/auth/NewSignupPageSecondaryAuthenticationProvider.php
diff --git a/NewSignupPage.js b/resources/js/NewSignupPage.js
similarity index 100%
rename from NewSignupPage.js
rename to resources/js/NewSignupPage.js
diff --git a/user_register_track.sql b/sql/user_register_track.sql
similarity index 100%
rename from user_register_track.sql
rename to sql/user_register_track.sql

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf2f6f6cb03283afb5e77c30b7addfccc09f95e0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/NewSignupPage
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: setting labnet100[34] install params

2017-07-14 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365270 )

Change subject: setting labnet100[34] install params
..

setting labnet100[34] install params

set dhcpd lease, netboot partitioning, and basic site.pp inclusion for
firewalling

Bug:T165779
Change-Id: I62fbf742bd4e1b10d1c604aa2b4356ed33cb2cc5
---
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
3 files changed, 17 insertions(+), 1 deletion(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 7b67bc7..c0e1157 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1235,6 +1235,12 @@
 include ::standard
 }
 
+node /labnet1001[34]\.eqiad\.wmnet/ {
+include ::standard
+include ::base::firewall
+}
+
+
 node 'labnet1002.eqiad.wmnet' {
 role(labs::openstack::nova::api)
 include ::standard
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index d9291ea..115bbff 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -98,7 +98,7 @@
 labsdb100[67]) echo partman/raid5-gpt-lvm.cfg ;; \
 labsdb[1-3]|labsdb100[1-3]) echo partman/mw.cfg ;; \
 sodium) echo partman/lvm-ext-srv.cfg ;; \
-labpuppetmaster100[12]|labnodepool1002|labweb100[12]) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg;; \
+labpuppetmaster100[12]|labnet100[34]|labnodepool1002|labweb100[12]) 
echo partman/raid1-lvm-ext4-srv-noswap.cfg;; \
 labstore200[1-4]) echo partman/labstore-lvm-noraid.cfg ;; \
 labtestneutron2001) echo partman/mw.cfg ;; \
 labtestnet2001) echo partman/raid1.cfg ;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index d358ca8..5b9abd1 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2682,6 +2682,16 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
+host labnet1003 {
+hardware ethernet 30:e1:71:60:52:40;
+fixed-address labnet1003.eqiad.wmnet;
+}
+
+host labnet1004 {
+hardware ethernet 30:e1:71:60:42:20;
+fixed-address labnet1004.eqiad.wmnet;
+}
+
 host labnodepool1001 {
 hardware ethernet 84:2b:2b:fd:be:fd;
 fixed-address labnodepool1001.eqiad.wmnet;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Change lists to reject spam score of 6 or greater via exim acl

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

Change subject: Change lists to reject spam score of 6 or greater via exim acl
..


Change lists to reject spam score of 6 or greater via exim acl

Exim on lists currently rejects mail with a spam score of 12 or greater.
Lowering to 6 will more aggressively filter spam at the lists MTA.

Bug: T170601
Change-Id: I34aa0952a2198f2172df76dfa979a3278375db65
---
M modules/profile/templates/exim/exim4.conf.mailman.erb
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/modules/profile/templates/exim/exim4.conf.mailman.erb 
b/modules/profile/templates/exim/exim4.conf.mailman.erb
index 3c53fd2..410ecb8 100644
--- a/modules/profile/templates/exim/exim4.conf.mailman.erb
+++ b/modules/profile/templates/exim/exim4.conf.mailman.erb
@@ -146,11 +146,12 @@
condition = ${if >{$spam_score_int}{10}{1}{0}}
set acl_m0 = $spam_score ($spam_bar)
set acl_m1 = $spam_report
+   log_message = Spam-score: $spam_score
 
-   # Reject spam at high scores (> 12)
+   # Reject spam at high scores (> 6)
deny message = This message scored $spam_score spam points.
spam = nonexistent/defer_ok
-   condition = ${if >{$spam_score_int}{120}{1}{0}}
+   condition = ${if >{$spam_score_int}{60}{1}{0}}
 
accept
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update pypi description

2017-07-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365268 )

Change subject: Update pypi description
..

Update pypi description

README.rst does not contain a valid desciption fpr pypi because it also
contains root files and scripts but these files aren't shipped with the
pypi package. Use a new file "pypi_description.rst" for it.

Change-Id: I1b536ef30ce772124e0ae52472e5848b0e28867b
---
A pypi_description.rst
M setup.py
2 files changed, 90 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/68/365268/1

diff --git a/pypi_description.rst b/pypi_description.rst
new file mode 100644
index 000..25af392
--- /dev/null
+++ b/pypi_description.rst
@@ -0,0 +1,89 @@
+Pywikibot
+=
+
+The Pywikibot framework is a Python library that interfaces with the
+`MediaWiki API 
`_
+version 1.14 or higher.
+
+Also included are various general function scripts that can be adapted for
+different tasks.
+
+For further information about the library excluding scripts see
+the full `code documentation `_.
+
+Quick start
+---
+
+::
+
+git clone https://gerrit.wikimedia.org/r/pywikibot/core.git
+cd core
+git submodule update --init
+python pwb.py script_name
+
+Or to install using PyPI (excluding scripts)
+::
+
+pip install pywikibot --pre
+
+Our `installation
+guide 
`_
+has more details for advanced usage.
+
+Basic Usage
+---
+
+If you wish to write your own script it's very easy to get started:
+
+::
+
+import pywikibot
+site = pywikibot.Site('en', 'wikipedia')  # The site we want to run our 
bot on
+page = pywikibot.Page(site, 'Wikipedia:Sandbox')
+page.text = page.text.replace('foo', 'bar')
+page.save('Replacing "foo" with "bar"')  # Saves the page
+
+---
+
+For more documentation on pywikibot see our `docs 
`_.
+
+
+The contents of the package
+
+
+
+--+
+|  Directories 
|
+
+===+==+
+|  pywikibot| Library routines, control files and global 
settings  |
+
+---+--+
+|  pywikibot/comms  | Communication layer  
|
+
+---+--+
+|  pywikibot/compat | Package to provide compatibility with compat 
scripts |
+
+---+--+
+|  pywikibot/data   | Module with several layers for data access 
to wiki   |
+
+---+--+
+|  pywikibot/families   | wiki-specific information and settings   
|
+
+---+--+
+|  pywikibot/tools  | Miscellaneous helper functions (not 
wiki-dependent)  |
+
+---+--+
+|  pywikibot/userinterfaces | GUI and terminal interface   
|
+
+---+--+
+
+
+Required external programs
+---
+
+It may require the following programs to function properly:
+
+* `7za`: To extract 7z files
+
+Contributing
+
+
+Our code is maintained on Wikimedia's `Gerrit installation 
`_,
+`learn `_ 
how to get
+started.
+
+.. image:: 
https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master
+   :alt: Build Status
+   :target: https://travis-ci.org/wikimedia/pywikibot-core
diff --git a/setup.py b/setup.py
index cb74bca..169c28a 100644
--- a/setup.py
+++ b/setup.py
@@ -208,7 +208,7 @@
 name=name,
 version=version,
 description='Python MediaWiki Bot Framework',
-long_description=open('README.rst').read(),
+long_description=open('pypi_description.rst').read(),
 keywords=('pywikibot python mediawiki bot wiki framework '
   'wikimedia wikipedia pwb pywikipedia API'),
 maintainer='The Pywikibot team',

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

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Set result browser SPARQL API in embed mode

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

Change subject: Set result browser SPARQL API in embed mode
..


Set result browser SPARQL API in embed mode

embed.html did not fully initialize the result browsers it instantiated
(compare with ResultView.js), resulting in errors when those browsers
tried to use their SPARQL API (getSparqlApi()) to run queries.

Bug: T170670
Change-Id: Ie9567d2b84a2e9dc631c58410b7ba897a6c07efc
---
M embed.html
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/embed.html b/embed.html
index 3a8c2ac..62891ee 100644
--- a/embed.html
+++ b/embed.html
@@ -198,6 +198,8 @@
};
 
$( document ).ready( function() {
+   var sparqlApi = new wikibase.queryService.api.Sparql();
+
function getResultBrowser( query ) {
var browser = null;
var browserPackage = 
wikibase.queryService.ui.resultBrowser;
@@ -210,6 +212,7 @@
var browserClass = 
RESULT_BROWSER.Table.class;
browser = new 
browserPackage[browserClass]();
}
+   browser.setSparqlApi( sparqlApi );
 
var tracking = new 
wikibase.queryService.api.Tracking();
tracking.track( 
'wikibase.queryService.ui.embed.' + ( browserKey || 'default' ) );
@@ -243,13 +246,12 @@
window.location.hash = '#' + 
encodeURIComponent( query )
 
var browser = getResultBrowser( query );
-   var api = new 
wikibase.queryService.api.Sparql();
$( '#query-result' ).hide();
$( '#query-result' ).empty();
$( '#progress' ).show();
-   api.query( query ).done( function() {
+   sparqlApi.query( query ).done( function() {
try {
-   browser.setResult( 
api.getResultRawData() );
+   browser.setResult( 
sparqlApi.getResultRawData() );
$( '#query-result' ).show();
browser.draw( $( 
'#query-result' ) );
$( '#progress' ).hide();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9567d2b84a2e9dc631c58410b7ba897a6c07efc
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Change lists to reject spam score of 6 or greater via exim acl

2017-07-14 Thread Herron (Code Review)
Herron has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365267 )

Change subject: Change lists to reject spam score of 6 or greater via exim acl
..

Change lists to reject spam score of 6 or greater via exim acl

Exim on lists currently rejects mail with a spam score of 12 or greater.
Lowering to 6 will more aggressively filter spam at the lists MTA.

Bug: T170601
Change-Id: I34aa0952a2198f2172df76dfa979a3278375db65
---
M modules/profile/templates/exim/exim4.conf.mailman.erb
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/67/365267/1

diff --git a/modules/profile/templates/exim/exim4.conf.mailman.erb 
b/modules/profile/templates/exim/exim4.conf.mailman.erb
index 3c53fd2..410ecb8 100644
--- a/modules/profile/templates/exim/exim4.conf.mailman.erb
+++ b/modules/profile/templates/exim/exim4.conf.mailman.erb
@@ -146,11 +146,12 @@
condition = ${if >{$spam_score_int}{10}{1}{0}}
set acl_m0 = $spam_score ($spam_bar)
set acl_m1 = $spam_report
+   log_message = Spam-score: $spam_score
 
-   # Reject spam at high scores (> 12)
+   # Reject spam at high scores (> 6)
deny message = This message scored $spam_score spam points.
spam = nonexistent/defer_ok
-   condition = ${if >{$spam_score_int}{120}{1}{0}}
+   condition = ${if >{$spam_score_int}{60}{1}{0}}
 
accept
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: move external_url to class parameter

2017-07-14 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365266 )

Change subject: prometheus: move external_url to class parameter
..

prometheus: move external_url to class parameter

Change-Id: Ic88db2d8a3143bfcd683403bf7c5dec2aa6a6174
---
M modules/prometheus/manifests/server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/66/365266/1

diff --git a/modules/prometheus/manifests/server.pp 
b/modules/prometheus/manifests/server.pp
index 3d42d33..0139e70 100644
--- a/modules/prometheus/manifests/server.pp
+++ b/modules/prometheus/manifests/server.pp
@@ -60,6 +60,7 @@
 $scrape_configs_extra = [],
 $rule_files_extra = [],
 $alertmanager_url = undef,
+$external_url = "http://prometheus/${title};,
 ) {
 include ::prometheus
 
@@ -71,7 +72,6 @@
   'scrape_interval' => $scrape_interval,
 }
 $global_config = merge($global_config_default, $global_config_extra)
-$external_url = "http://prometheus/${title};
 $metrics_path = "${base_path}/metrics"
 $targets_path = "${base_path}/targets"
 $service_name = "prometheus@${title}"

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove time command from statistics::wmde crons

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

Change subject: Remove time command from statistics::wmde crons
..


Remove time command from statistics::wmde crons

It looks like this can't be found on stat1005
for this user, so just remove it.

Bug: T170282
Bug: T170472
Change-Id: Ieeb88f7f821e08173535473d55ef84b229e6677e
---
M modules/statistics/manifests/wmde.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/statistics/manifests/wmde.pp 
b/modules/statistics/manifests/wmde.pp
index 8e4520b..f1bb980 100644
--- a/modules/statistics/manifests/wmde.pp
+++ b/modules/statistics/manifests/wmde.pp
@@ -125,7 +125,7 @@
 # Note: some of the scripts run by this cron need access to secrets!
 # Docs can be seen at 
https://github.com/wikimedia/analytics-wmde-scripts/blob/master/README.md
 cron { 'daily.03':
-command => "time ${scripts_dir}/cron/daily.03.sh ${scripts_dir} >> 
${log_dir}/daily.03.log 2>&1",
+command => "${scripts_dir}/cron/daily.03.sh ${scripts_dir} >> 
${log_dir}/daily.03.log 2>&1",
 hour=> '3',
 minute  => '0',
 require => [
@@ -136,7 +136,7 @@
 }
 
 cron { 'daily.12':
-command => "time ${scripts_dir}/cron/daily.12.sh ${scripts_dir} >> 
${log_dir}/daily.12.log 2>&1",
+command => "${scripts_dir}/cron/daily.12.sh ${scripts_dir} >> 
${log_dir}/daily.12.log 2>&1",
 hour=> '12',
 minute  => '0',
 require => [
@@ -146,7 +146,7 @@
 }
 
 cron { 'weekly':
-command => "time ${scripts_dir}/cron/weekly.sh ${scripts_dir} >> 
${log_dir}/weekly.log 2>&1",
+command => "${scripts_dir}/cron/weekly.sh ${scripts_dir} >> 
${log_dir}/weekly.log 2>&1",
 weekday => '7',
 hour=> '01',
 minute  => '0',
@@ -157,7 +157,7 @@
 }
 
 cron { 'wmde/toolkit-analyzer-build':
-command => "time java -Xmx2g -jar 
${dir}/src/toolkit-analyzer-build/toolkit-analyzer.jar --processors Metric 
--store ${dir}/data --latest >> ${log_dir}/toolkit-analyzer.log 2>&1",
+command => "java -Xmx2g -jar 
${dir}/src/toolkit-analyzer-build/toolkit-analyzer.jar --processors Metric 
--store ${dir}/data --latest >> ${log_dir}/toolkit-analyzer.log 2>&1",
 hour=> '12',
 minute  => '0',
 }

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [bugfix] keywords must be iterable, not a string

2017-07-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365265 )

Change subject: [bugfix] keywords must be iterable, not a string
..

[bugfix] keywords must be iterable, not a string

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


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/65/365265/1

diff --git a/setup.py b/setup.py
index cb74bca..e172af0 100644
--- a/setup.py
+++ b/setup.py
@@ -209,8 +209,8 @@
 version=version,
 description='Python MediaWiki Bot Framework',
 long_description=open('README.rst').read(),
-keywords=('pywikibot python mediawiki bot wiki framework '
-  'wikimedia wikipedia pwb pywikipedia API'),
+keywords=('pywikibot', 'python', 'mediawiki', 'bot', 'wiki', 'framework',
+  'wikimedia', 'wikipedia', 'pwb', 'pywikipedia', 'API'),
 maintainer='The Pywikibot team',
 maintainer_email='pywiki...@lists.wikimedia.org',
 license='MIT License',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove time command from statistics::wmde crons

2017-07-14 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365264 )

Change subject: Remove time command from statistics::wmde crons
..

Remove time command from statistics::wmde crons

It looks like this can't be found on stat1005
for this user, so just remove it.

Bug: T170282
Bug: T170472
Change-Id: Ieeb88f7f821e08173535473d55ef84b229e6677e
---
M modules/statistics/manifests/wmde.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/64/365264/1

diff --git a/modules/statistics/manifests/wmde.pp 
b/modules/statistics/manifests/wmde.pp
index 8e4520b..f1bb980 100644
--- a/modules/statistics/manifests/wmde.pp
+++ b/modules/statistics/manifests/wmde.pp
@@ -125,7 +125,7 @@
 # Note: some of the scripts run by this cron need access to secrets!
 # Docs can be seen at 
https://github.com/wikimedia/analytics-wmde-scripts/blob/master/README.md
 cron { 'daily.03':
-command => "time ${scripts_dir}/cron/daily.03.sh ${scripts_dir} >> 
${log_dir}/daily.03.log 2>&1",
+command => "${scripts_dir}/cron/daily.03.sh ${scripts_dir} >> 
${log_dir}/daily.03.log 2>&1",
 hour=> '3',
 minute  => '0',
 require => [
@@ -136,7 +136,7 @@
 }
 
 cron { 'daily.12':
-command => "time ${scripts_dir}/cron/daily.12.sh ${scripts_dir} >> 
${log_dir}/daily.12.log 2>&1",
+command => "${scripts_dir}/cron/daily.12.sh ${scripts_dir} >> 
${log_dir}/daily.12.log 2>&1",
 hour=> '12',
 minute  => '0',
 require => [
@@ -146,7 +146,7 @@
 }
 
 cron { 'weekly':
-command => "time ${scripts_dir}/cron/weekly.sh ${scripts_dir} >> 
${log_dir}/weekly.log 2>&1",
+command => "${scripts_dir}/cron/weekly.sh ${scripts_dir} >> 
${log_dir}/weekly.log 2>&1",
 weekday => '7',
 hour=> '01',
 minute  => '0',
@@ -157,7 +157,7 @@
 }
 
 cron { 'wmde/toolkit-analyzer-build':
-command => "time java -Xmx2g -jar 
${dir}/src/toolkit-analyzer-build/toolkit-analyzer.jar --processors Metric 
--store ${dir}/data --latest >> ${log_dir}/toolkit-analyzer.log 2>&1",
+command => "java -Xmx2g -jar 
${dir}/src/toolkit-analyzer-build/toolkit-analyzer.jar --processors Metric 
--store ${dir}/data --latest >> ${log_dir}/toolkit-analyzer.log 2>&1",
 hour=> '12',
 minute  => '0',
 }

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Advise users when they are reading an article from an offlin...

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

Change subject: Advise users when they are reading an article from an offline 
compilation
..


Advise users when they are reading an article from an offline compilation

* Shows a toast with the date downloaded upon loading the article
* Substitutes the footer "last modified" HTML with a download date string

Bug: T166652
Change-Id: I7b95f830224023493c860b8099f1563daf53
---
M app/src/main/java/org/wikipedia/offline/Compilation.java
M app/src/main/java/org/wikipedia/offline/OfflineManager.java
M app/src/main/java/org/wikipedia/page/Page.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/util/DateUtil.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
M app/src/test/java/org/wikipedia/offline/OfflineManagerTest.java
9 files changed, 88 insertions(+), 14 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/offline/Compilation.java 
b/app/src/main/java/org/wikipedia/offline/Compilation.java
index 03d7c9a..ec354dd 100644
--- a/app/src/main/java/org/wikipedia/offline/Compilation.java
+++ b/app/src/main/java/org/wikipedia/offline/Compilation.java
@@ -57,6 +57,10 @@
 return "";
 }
 
+public long timestamp() {
+return file.lastModified();
+}
+
 @NonNull public String description() {
 try {
 return reader.getZimDescription();
diff --git a/app/src/main/java/org/wikipedia/offline/OfflineManager.java 
b/app/src/main/java/org/wikipedia/offline/OfflineManager.java
index 6aeb69b..aa51a0d 100644
--- a/app/src/main/java/org/wikipedia/offline/OfflineManager.java
+++ b/app/src/main/java/org/wikipedia/offline/OfflineManager.java
@@ -98,11 +98,11 @@
 return null;
 }
 
-@NonNull public String getHtmlForTitle(@NonNull String title) throws 
IOException {
+@NonNull public HtmlResult getHtmlForTitle(@NonNull String title) throws 
IOException {
 for (Compilation c : compilations) {
 ByteArrayOutputStream stream = c.getDataForTitle(title);
 if (stream != null) {
-return stream.toString("utf-8");
+return new HtmlResult(c, stream.toString("utf-8"));
 }
 }
 throw new IOException("Content not found in any compilation for " + 
title);
@@ -135,6 +135,24 @@
 this.compilations = compilations;
 }
 
+public static class HtmlResult {
+@NonNull private String html;
+@NonNull private Compilation comp;
+
+public HtmlResult(@NonNull Compilation comp, @NonNull String html) {
+this.html = html;
+this.comp = comp;
+}
+
+public Compilation compilation() {
+return comp;
+}
+
+public String html() {
+return html;
+}
+}
+
 private OfflineManager() {
 }
 }
diff --git a/app/src/main/java/org/wikipedia/page/Page.java 
b/app/src/main/java/org/wikipedia/page/Page.java
index e3db2fd..30836a7 100755
--- a/app/src/main/java/org/wikipedia/page/Page.java
+++ b/app/src/main/java/org/wikipedia/page/Page.java
@@ -6,6 +6,7 @@
 
 import org.wikipedia.settings.RbSwitch;
 
+import java.util.Date;
 import java.util.List;
 
 /**
@@ -18,6 +19,8 @@
 @NonNull private final PageTitle title;
 @NonNull private final List sections;
 @NonNull private final PageProperties pageProperties;
+
+@Nullable private Date compilationDownloadDate;
 
 /**
  * An indicator what payload version the page content was originally 
retrieved from.
@@ -90,6 +93,18 @@
 return !isMainPage() && getTitle().namespace() == Namespace.MAIN;
 }
 
+public boolean isFromOfflineCompilation() {
+return compilationDownloadDate != null;
+}
+
+@Nullable public Date getCompilationDownloadDate() {
+return compilationDownloadDate;
+}
+
+public void setCompilationDownloadDate(@NonNull Date date) {
+this.compilationDownloadDate = date;
+}
+
 /** For old PHP API */
 public void addRemainingSections(List remainingSections) {
 sections.addAll(remainingSections);
diff --git a/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java 
b/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
index 6cdd65d..47911cf 100644
--- a/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
@@ -54,6 +54,7 @@
 import java.text.ParseException;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.Date;
 import java.util.List;
 import java.util.Locale;
 import java.util.Map;
@@ -435,9 +436,13 @@
 try {
  

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: FormId property type with demo data

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

Change subject: FormId property type with demo data
..


FormId property type with demo data

Didn't want to introduce extra complexity, so just put test data in both
Form.js and FormIdFormatter.php
If you will need to add something don't forget that you need to add in both.

Bug: T168373
Change-Id: Ie131f174175fa7b97bdbbc1f2af7eadf25f71753
---
M WikibaseLexeme.datatypes.php
M extension.json
M i18n/en.json
M i18n/qqq.json
A resources/experts/Form.js
A src/PropertyType/FormIdFormatter.php
6 files changed, 259 insertions(+), 2 deletions(-)

Approvals:
  WMDE-leszek: Checked; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/WikibaseLexeme.datatypes.php b/WikibaseLexeme.datatypes.php
index 7d27897..55bb50c 100644
--- a/WikibaseLexeme.datatypes.php
+++ b/WikibaseLexeme.datatypes.php
@@ -17,7 +17,10 @@
  * @license GPL-2.0+
  */
 
+use ValueFormatters\FormatterOptions;
 use Wikibase\Lexeme\DataModel\Lexeme;
+use Wikibase\Lexeme\PropertyType\FormIdFormatter;
+use Wikibase\Lexeme\PropertyType\FormIdParser;
 use Wikibase\Repo\WikibaseRepo;
 
 return [
@@ -29,4 +32,14 @@
},
'value-type' => 'wikibase-entityid',
],
+   'PT:wikibase-lexeme-form' => [
+   'expert-module' => 'wikibase.experts.Form',
+   'validator-factory-callback' => function() {
+   return [];
+   },
+   'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
+   return new FormIdFormatter();
+   },
+   'value-type' => 'string',
+   ],
 ];
diff --git a/extension.json b/extension.json
index ac879ba..62912b6 100644
--- a/extension.json
+++ b/extension.json
@@ -337,6 +337,15 @@
"wikibase.experts.Entity"
]
},
+   "wikibase.experts.Form": {
+   "scripts": [
+   "experts/Form.js"
+   ],
+   "dependencies": [
+   "jquery.valueview.Expert",
+   "wikibase.experts.Entity"
+   ]
+   },
"wikibase.lexeme.styles": {
"position": "top",
"styles": [
diff --git a/i18n/en.json b/i18n/en.json
index afd3cbc..423d1de 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,5 +19,6 @@
"wikibase-lexeme-view-senses": "Senses",
"wikibase-lexeme-gloss-empty": "No gloss defined",
"wikibase-lexeme-summary-wbeditentity-update": "Changed a lexeme",
-   "datatypes-type-wikibase-lexeme": "Lexeme"
+   "datatypes-type-wikibase-lexeme": "Lexeme",
+   "datatypes-type-wikibase-lexeme-form": "Lexeme Form"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d14fef6..ba2e92e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -24,5 +24,6 @@
"wikibase-lexeme-view-senses": "Subheading for the senses section on a 
lexeme page.\n{{Identical|Sense}}",
"wikibase-lexeme-gloss-empty": "Placeholder message displayed instead 
of the gloss of the sense in case the gloss in the display language has not 
been specified yet.",
"wikibase-lexeme-summary-wbeditentity-update": "Auto-generated edit 
summary when editing a lexeme",
-   "datatypes-type-wikibase-lexeme": "The name of a data type for lexemes 
in Wikibase.\n{{Identical|Lexeme}}"
+   "datatypes-type-wikibase-lexeme": "The name of a data type for lexemes 
in Wikibase.\n{{Identical|Lexeme}}",
+   "datatypes-type-wikibase-lexeme-form": "The name of a data type for 
lexeme forms in Wikibase."
 }
diff --git a/resources/experts/Form.js b/resources/experts/Form.js
new file mode 100644
index 000..c0d66c3
--- /dev/null
+++ b/resources/experts/Form.js
@@ -0,0 +1,132 @@
+module.exports = ( function ( wb, vv ) {
+   'use strict';
+
+   var PARENT = wb.experts.Entity;
+
+   //Basically, copy-paste of src/PropertyType/FormIdFormatter.php:19-51
+   //If you change something here, change also there
+   var existingForms = [
+   new Form( 'L13', 'hard English adjective', 'F1', 'hard', [ 
'normative' ] ),
+   new Form( 'L13', 'hard English adjective', 'F2', 'harder', [ 
'comparative' ] ),
+   new Form( 'L456', 'card English noun', 'F4', 'card', [ 
'normative' ] ),
+   new Form( 'L888', 'bard English noun', 'F1', 'bard', [ 
'normative' ] ),
+   new Form(
+   'L14',
+   'Leiter German noun',
+   'F1',
+   'Leiter',
+   [ 'nominative', 'singular' ]
+   ),
+   new Form(
+   'L14',
+   

[MediaWiki-commits] [Gerrit] operations...debdeploy[master]: Migrate former Salt minion to standalone tools executed via ...

2017-07-14 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365263 )

Change subject: Migrate former Salt minion to standalone tools executed via 
Cumin (WIP)
..

Migrate former Salt minion to standalone tools executed via Cumin (WIP)

WIP and fully untested.

Change-Id: I772b3eaff0d5075627952dddf953608b795e8f1d
---
A clients/debdeploy-deploy
M debian/changelog
2 files changed, 300 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/debdeploy 
refs/changes/63/365263/1

diff --git a/clients/debdeploy-deploy b/clients/debdeploy-deploy
new file mode 100755
index 000..5b00dc4
--- /dev/null
+++ b/clients/debdeploy-deploy
@@ -0,0 +1,273 @@
+#! /usr/bin/python
+# -*- coding: utf-8 -*-
+'''
+Module for deploying DEB packages on wide scale
+'''
+
+import logging
+import pickle
+import subprocess
+import os
+import re
+import platform
+import sys
+import argparse
+import json
+import ConfigParser
+from logging.handlers import RotatingFileHandler
+from debian import deb822
+
+logger = logging.getLogger('debdeploy')
+
+
+def parse_args():
+p = argparse.ArgumentParser(
+description='debdeploy-deploy - Deploy a software update')
+p.add_argument('--run-apt-update', action='store_true', default=False,
+   help='If enabled, run apt-get update during deployments')
+p.add_argument('--verbose', action='store_true', default=False,
+   help='Include full output of apt')
+p.add_argument('--console', action='store_true', default=False,
+   help='Enable additional console output')
+p.add_argument('--json', action='store_true', default=False,
+   help='Return a JSONIf enabled, run apt-get update during 
deployments')
+p.add_argument('--source', action='store', required=True,
+   help='The name of the source package to be updated')
+p.add_argument('--updatespec', action='store', nargs='+', required=True)
+
+args = p.parse_args(sys.argv[1:])
+
+for i in args.updatespec:
+if len(i.split("_")) != 3:
+p.error("Malformed update spec: " + i)
+
+return args
+
+
+def setup_logger(verbose=False, console_output=False):
+log_file = "/var/log/debdeploy/updates.log"
+
+log_path = os.path.dirname(log_file)
+if not os.path.exists(log_path):
+os.makedirs(log_path, 0770)
+
+log_formatter = logging.Formatter(fmt='%(asctime)s (%(levelname)s) 
%(message)s')
+log_handler = RotatingFileHandler(log_file, maxBytes=(5 * (1024**2)), 
backupCount=30)
+log_handler.setFormatter(log_formatter)
+logger.addHandler(log_handler)
+logger.raiseExceptions = False
+
+if console_output:
+console = logging.StreamHandler()
+logging.getLogger('debdeploy').addHandler(console)
+
+if verbose:
+logger.setLevel(logging.DEBUG)
+else:
+logger.setLevel(logging.INFO)
+
+
+def get_os_version():
+os_id = ""
+os_version = "undef"  # Usually not used, but can be used to track unstable
+
+try:
+with open('/etc/os-release', 'r') as data:
+for i in data.readlines():
+if i.startswith("ID"):
+os_id = i.split("=")[1].strip().replace('"', 
"").replace("\n", "")
+if i.startswith("VERSION_ID"):
+os_version = i.split("=")[1].strip().replace('"', 
"").replace("\n", "")
+except IOError:
+logger.info("Could not open /etc/os-release")
+return "invalid"
+
+if not os_id:
+logger.info("Failed to parse OS release, no distro ID specified")
+return "invalid"
+
+return os_id + "_" + os_version
+
+
+def get_installed_binary_packages(source):
+# Detect all locally installed binary packages of a given source package
+# The only resource we can use for that is parsing the /var/lib/dpkg/status
+# file. The format is a bit erratic: The Source: line is only present for
+# binary packages not having the same name as the binary package
+installed_binary_packages = []
+for pkg in deb822.Packages.iter_paragraphs(file('/var/lib/dpkg/status')):
+
+# skip packages in deinstalled status ("rc" in dpkg). These are 
irrelevant for
+# upgrades and cause problems when binary package names have changed 
(since
+# package installations are forced with a specific version which is 
not available
+# for those outdated binary package names)
+installation_status = pkg['Status'].split()[0]
+if installation_status == "deinstall":
+continue
+
+# Source packages which have had a binNMU have a Source: entry with 
the source
+# package version in brackets, so strip these
+# If no Source: entry is present in /var/lib/dpkg/status, then the 
source package
+# name is identical to the binary package name
+if 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Introduce activity for managing offline compilations.

2017-07-14 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365262 )

Change subject: Introduce activity for managing offline compilations.
..

Introduce activity for managing offline compilations.

This activity is accessible by tapping the "My compilations" button in the
Feed card when the user is offline. (More ways to access this activity may
be added later.)

TODO: Create custom view that shows disk usage, per design mock.

Bug: T163587
Bug: T163589
Bug: T163591
Change-Id: If497045640646f7333163a2674344179d5140837
---
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/activity/BaseActivity.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
A app/src/main/java/org/wikipedia/offline/LocalCompilationsActivity.java
A app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
A app/src/main/res/layout/fragment_local_compilations.xml
A app/src/main/res/menu/menu_local_compilations.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/strings.xml
9 files changed, 399 insertions(+), 1 deletion(-)


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

diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1d6b7be..20e98c9 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -185,6 +185,11 @@
 android:name=".onboarding.InitialOnboardingActivity"
 android:theme="@style/AppTheme"/>
 
+
+
  {
+
+public static Intent newIntent(@NonNull Context context) {
+return new Intent(context, LocalCompilationsActivity.class);
+}
+
+@Override
+public void onCreate(@Nullable Bundle savedInstanceState) {
+super.onCreate(savedInstanceState);
+setWordmarkVisible(false);
+if (getSupportActionBar() != null) {
+getSupportActionBar().setDisplayHomeAsUpEnabled(true);
+
getSupportActionBar().setTitle(R.string.offline_compilations_title);
+}
+}
+
+@Override
+public LocalCompilationsFragment createFragment() {
+return LocalCompilationsFragment.newInstance();
+}
+
+@Override
+protected void onOfflineCompilationsFound() {
+getFragment().onCompilationsRefreshed();
+}
+
+@Override
+protected void onOfflineCompilationsError(Throwable t) {
+getFragment().onCompilationsError(t);
+}
+}
diff --git 
a/app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java 
b/app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
new file mode 100644
index 000..3d8b502
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
@@ -0,0 +1,258 @@
+package org.wikipedia.offline;
+
+import android.os.Bundle;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+import android.support.v7.view.ActionMode;
+import android.support.v7.widget.LinearLayoutManager;
+import android.support.v7.widget.RecyclerView;
+import android.text.TextUtils;
+import android.view.LayoutInflater;
+import android.view.Menu;
+import android.view.MenuInflater;
+import android.view.MenuItem;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ProgressBar;
+import android.widget.TextView;
+
+import org.wikipedia.R;
+import org.wikipedia.activity.BaseActivity;
+import org.wikipedia.history.SearchActionModeCallback;
+import org.wikipedia.util.ResourceUtil;
+import org.wikipedia.views.DefaultViewHolder;
+import org.wikipedia.views.DrawableItemDecoration;
+import org.wikipedia.views.PageItemView;
+import org.wikipedia.views.SearchEmptyView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import butterknife.BindView;
+import butterknife.ButterKnife;
+import butterknife.Unbinder;
+
+public class LocalCompilationsFragment extends Fragment {
+@BindView(R.id.compilation_list_container) View listContainer;
+@BindView(R.id.compilation_list) RecyclerView recyclerView;
+@BindView(R.id.search_empty_view) SearchEmptyView searchEmptyView;
+@BindView(R.id.compilation_search_progress_bar) ProgressBar progressBar;
+@BindView(R.id.compilations_count_text) TextView countText;
+private Unbinder unbinder;
+
+private boolean updating;
+private CompilationItemAdapter adapter = new CompilationItemAdapter();
+private ItemCallback itemCallback = new ItemCallback();
+
+private SearchCallback searchActionModeCallback = new SearchCallback();
+@NonNull private List displayedItems = new ArrayList<>();
+private String currentSearchQuery;
+
+@NonNull
+public static LocalCompilationsFragment newInstance() {
+LocalCompilationsFragment instance = new LocalCompilationsFragment();
+return instance;
+}
+
+@Nullable
+@Override
+public View 

[MediaWiki-commits] [Gerrit] mediawiki...AdvancedSearch[master]: Address some non-security issues from T168860

2017-07-14 Thread Gabriel Birke (Code Review)
Gabriel Birke has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365261 )

Change subject: Address some non-security issues from T168860
..

Address some non-security issues from T168860

* Use correct return type for onSpecialPageBeforeExecute
* Fix indentation
* Move file-local i18n content to i18n files
* Add license file

Change-Id: Ibb250c94a9989db53e1ee5d0b7f533f98e2d6249
---
M AdvancedSearch.hooks.php
A LICENSE
M extension.json
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.advancedSearch.init.js
7 files changed, 362 insertions(+), 42 deletions(-)


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

diff --git a/AdvancedSearch.hooks.php b/AdvancedSearch.hooks.php
index a03a0df..a6214cc 100644
--- a/AdvancedSearch.hooks.php
+++ b/AdvancedSearch.hooks.php
@@ -25,14 +25,12 @@
class_exists( BetaFeatures::class ) &&
!BetaFeatures::isFeatureEnabled( $special->getUser(), 
'advancedsearch' )
) {
-   return true;
+   return;
}
if ( $special->getName() === 'Search' ) {
$special->getOutput()->addModules( 
'ext.advancedSearch.init' );
$special->getOutput()->addModuleStyles( 
'ext.advancedSearch.initialstyles' );
}
-
-   return true;
}
 
/**
@@ -70,10 +68,8 @@
'ltr' => 
"$extensionAssetsPath/AdvancedSearch/resources/AdvancedSearch-beta-features-ltr.svg",
'rtl' => 
"$extensionAssetsPath/AdvancedSearch/resources/AdvancedSearch-beta-features-rtl.svg",
],
-   'info-link'
-   => 
'https://www.mediawiki.org/wiki/Extension:AdvancedSearch',
-   'discussion-link'
-   => 
'https://www.mediawiki.org/wiki/Extension_talk:AdvancedSearch',
+   'info-link' => 
'https://www.mediawiki.org/wiki/Extension:AdvancedSearch',
+   'discussion-link' => 
'https://www.mediawiki.org/wiki/Extension_talk:AdvancedSearch',
];
}
 
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000..d159169
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,339 @@
+GNU GENERAL PUBLIC LICENSE
+   Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: ZIM Compilations: load html content from ZIM files!

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

Change subject: ZIM Compilations: load html content from ZIM files!
..


ZIM Compilations: load html content from ZIM files!

This handles the actual work of loading the html content from a ZIM
compilation into our WebView.  This necessarily requires us to do some
postprocessing on the html before it can be rendered in the WebView, which
is done in sections.js.

- The logic is: if a page fails to load over the network or cache, then
  check if the page title exists in an offline compilation. And if it does
  exist, then load it.  This logic can be tweaked or expanded-upon when we
  introduce configurable settings (i.e. offline-first vs network-first).
- Link previews are not shown for offline titles. This is a necessary
  limitation because a ZIM file contains only the full html text of the
  article, and it would be too expensive to load all of it for the purpose
  of showing a link preview.

Bug: T163584
Change-Id: I9d82b7d46aca7a33285a47c672a3bab100b5b1bf
---
M app/src/main/AndroidManifest.xml
M app/src/main/assets/bundle.js
M app/src/main/java/org/wikipedia/LongPressHandler.java
M app/src/main/java/org/wikipedia/activity/BaseActivity.java
A app/src/main/java/org/wikipedia/offline/OfflineContentProvider.java
M app/src/main/java/org/wikipedia/page/LinkHandler.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/PageProperties.java
M app/src/main/java/org/wikipedia/util/UriUtil.java
M www/js/sections.js
11 files changed, 509 insertions(+), 126 deletions(-)

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



diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index cc26730..1d6b7be 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -207,6 +207,11 @@
 android:resource="@xml/file_paths" />
 
 
+
+
  0) {
+window.scrollTo( 0, payload.scrollY );
+}
+document.getElementById( "loading_sections").className = "";
+bridge.sendMessage( "pageLoadComplete", {
+  "sequence": payload.sequence,
+  "savedPage": payload.savedPage,
+  "sections": sectionsJson });
+});
+
+function performZimSectionTransforms( sectionIndex, currentSectionNode ) {
+applySectionTransforms(currentSectionNode, sectionIndex === 0);
+
+var i;
+var imgTags = currentSectionNode.querySelectorAll( 'img' );
+for ( i = 0; i < imgTags.length; i++ ) {
+var imgSrc = imgTags[i].getAttribute( 'src' );
+if (imgSrc !== null) {
+imgTags[i].setAttribute( 'src', imgSrc.replace("../I/", 
window.offlineContentProvider + "I/") );
+}
+}
+}
+
+// -- End custom processing of ZIM html data --
+
 bridge.registerListener( "scrollToSection", function ( payload ) {
 scrollToSection( payload.anchor );
 });
diff --git a/app/src/main/java/org/wikipedia/LongPressHandler.java 
b/app/src/main/java/org/wikipedia/LongPressHandler.java
index b71899e..a7b812e 100644
--- a/app/src/main/java/org/wikipedia/LongPressHandler.java
+++ b/app/src/main/java/org/wikipedia/LongPressHandler.java
@@ -12,10 +12,12 @@
 
 import org.wikipedia.dataclient.WikiSite;
 import org.wikipedia.history.HistoryEntry;
+import org.wikipedia.offline.OfflineManager;
 import org.wikipedia.page.PageTitle;
 import org.wikipedia.readinglist.AddToReadingListDialog;
 
 import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard;
+import static org.wikipedia.util.UriUtil.isValidOfflinePageLink;
 import static org.wikipedia.util.UriUtil.isValidPageLink;
 
 public class LongPressHandler implements View.OnCreateContextMenuListener,
@@ -45,6 +47,9 @@
 if (isValidPageLink(uri)) {
 title = ((WebViewContextMenuListener) 
contextMenuListener).getWikiSite()
 .titleForInternalLink(uri.getPath());
+} else if (OfflineManager.hasCompilation() && 
isValidOfflinePageLink(uri)) {
+title = ((WebViewContextMenuListener) 
contextMenuListener).getWikiSite()
+
.titleForInternalLink(uri.getLastPathSegment().replace(".html", ""));
 }
 }
 } else if (view instanceof ListView) {
diff --git a/app/src/main/java/org/wikipedia/activity/BaseActivity.java 
b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
index 9fba61c..ef253d4 100644
--- a/app/src/main/java/org/wikipedia/activity/BaseActivity.java
+++ b/app/src/main/java/org/wikipedia/activity/BaseActivity.java
@@ -31,6 +31,7 @@
 import org.wikipedia.util.DeviceUtil;
 import org.wikipedia.util.FeedbackUtil;
 import org.wikipedia.util.PermissionUtil;
+import org.wikipedia.util.ReleaseUtil;
 import org.wikipedia.util.log.L;
 
 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: [DNM][EXPERIMENT] Require *-term permissions to edit entity ...

2017-07-14 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365259 )

Change subject: [DNM][EXPERIMENT] Require *-term permissions to edit entity 
terms using wbeditentity
..

[DNM][EXPERIMENT] Require *-term permissions to edit entity terms using 
wbeditentity

This is a rough experiment to see what it takes to make wbeditentity
be more accurate about permission its changes require.

T170673 suggests other way to solve this issue.

This makes EditEntity get information required to decide on what permissions
are required from EntityChangeOpProvider, which in turn gets this from
entity-level ChangeOpDeserializers (using PermissionAwareChangeOpDeserializer
interface).

Possible advantage compared to what T170673 suggests: as the issue
seems to be only relevant to wbeditentity, ChangeOp interface is not
"polluted" with permission-related stuff, and stays simple.

On the flip side: solution here is a bit messy.

Also adds permission-related tests for creating an entity using
setX API actions which have not been there before. Also adjusts
WikiPageEntityStorePermissionChecker to handle the case of creating
the entity when peforming ACTION_EDIT_TERMS.

TODO:
 - resolve TODOs (e.g. what about wbeditentity's "clear" param?)
 - add tests for missing new bits
 - this is probably too much change for a single patch!

Change-Id: I294f7bcfbd0e10b6a6ad82c80ddd8a4ed5eb637e
---
M repo/includes/Api/EditEntity.php
M repo/includes/Api/ModifyEntity.php
M repo/includes/Api/ModifyTerm.php
M repo/includes/Api/SetAliases.php
M repo/includes/ChangeOp/Deserialization/ItemChangeOpDeserializer.php
A repo/includes/ChangeOp/Deserialization/PermissionAwareChangeOpDeserializer.php
M repo/includes/ChangeOp/Deserialization/PropertyChangeOpDeserializer.php
M repo/includes/ChangeOp/EntityChangeOpProvider.php
M repo/includes/Store/EntityPermissionChecker.php
M repo/includes/Store/WikiPageEntityStorePermissionChecker.php
M repo/tests/phpunit/includes/Api/EditEntityTest.php
M repo/tests/phpunit/includes/Api/SetAliasesTest.php
M repo/tests/phpunit/includes/Api/SetDescriptionTest.php
M repo/tests/phpunit/includes/Api/SetLabelTest.php
M repo/tests/phpunit/includes/Api/SetSiteLinkTest.php
M repo/tests/phpunit/includes/Store/WikiPageEntityStorePermissionCheckerTest.php
16 files changed, 432 insertions(+), 39 deletions(-)


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

diff --git a/repo/includes/Api/EditEntity.php b/repo/includes/Api/EditEntity.php
index 63a2dcd..e4404f6 100644
--- a/repo/includes/Api/EditEntity.php
+++ b/repo/includes/Api/EditEntity.php
@@ -25,6 +25,7 @@
 use Wikibase\Lib\Store\EntityRevisionLookup;
 use Wikibase\Repo\ChangeOp\Deserialization\ChangeOpDeserializationException;
 use Wikibase\Repo\ChangeOp\EntityChangeOpProvider;
+use Wikibase\Repo\Store\EntityPermissionChecker;
 use Wikibase\Summary;
 
 /**
@@ -150,6 +151,24 @@
}
 
/**
+* @param EntityDocument $entity
+*
+* @throws InvalidArgumentException
+* @return string[] A list of permissions
+*/
+   protected function getRequiredPermissions( EntityDocument $entity, 
array $params ) {
+   $data = json_decode( $params['data'], true );
+   if ( 
$this->entityChangeOpProvider->includesChangesToEntityTerms( 
$entity->getType(), $data ) ) {
+   return [ EntityPermissionChecker::ACTION_EDIT_TERMS ];
+   }
+   // TODO: if "clear" parameter provided, always assume $entity 
might have some terms that will be removed?
+   // TODO: or do it 100% right and check if there are any terms 
on $entity that would change? That'd be
+   // becoming a bit of an overkill...
+
+   return [ EntityPermissionChecker::ACTION_EDIT ];
+   }
+
+   /**
 * @param EntityId $entityId
 *
 * @return bool
@@ -190,6 +209,9 @@
'param-illegal'
);
}
+
+   $this->validateDataParameter( $params );
+   $this->checkValidJson( json_decode( $params['data'], true ) );
}
 
/**
@@ -202,7 +224,6 @@
 * @return Summary
 */
protected function modifyEntity( EntityDocument &$entity, array 
$params, $baseRevId ) {
-   $this->validateDataParameter( $params );
$data = json_decode( $params['data'], true );
$this->validateDataProperties( $data, $entity, $baseRevId );
 
@@ -341,7 +362,6 @@
$entityId = $entity->getId();
$title = $entityId === null ? null : 
$this->getTitleLookup()->getTitleForId( $entityId );
 
-   $this->checkValidJson( $data );
$this->checkEntityId( $data, $entityId );
$this->checkEntityType( $data, $entity );

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Include labsrootpass on labs puppetmasters

2017-07-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365258 )

Change subject: Include labsrootpass on labs puppetmasters
..


Include labsrootpass on labs puppetmasters

Change-Id: I7359611818e9591c027fcc19a1b2be15ebd7353b
---
M modules/role/manifests/labs/puppetmaster/backend.pp
M modules/role/manifests/labs/puppetmaster/frontend.pp
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/labs/puppetmaster/backend.pp 
b/modules/role/manifests/labs/puppetmaster/backend.pp
index 5483e32..17cfe3e 100644
--- a/modules/role/manifests/labs/puppetmaster/backend.pp
+++ b/modules/role/manifests/labs/puppetmaster/backend.pp
@@ -11,6 +11,8 @@
 include ::profile::puppetmaster::labsenc
 include ::profile::puppetmaster::labsencapi
 
+include puppetmaster::labsrootpass
+
 $config = {
 'node_terminus' => 'exec',
 'external_nodes'=> '/usr/local/bin/puppet-enc',
diff --git a/modules/role/manifests/labs/puppetmaster/frontend.pp 
b/modules/role/manifests/labs/puppetmaster/frontend.pp
index c9251e2..3780bf6 100644
--- a/modules/role/manifests/labs/puppetmaster/frontend.pp
+++ b/modules/role/manifests/labs/puppetmaster/frontend.pp
@@ -26,6 +26,8 @@
 include ::profile::conftool::client
 include ::profile::conftool::master
 
+include puppetmaster::labsrootpass
+
 # config-master.wikimedia.org
 include ::profile::configmaster
 include ::profile::discovery::client

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Include labsrootpass on labs puppetmasters

2017-07-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365258 )

Change subject: Include labsrootpass on labs puppetmasters
..

Include labsrootpass on labs puppetmasters

Change-Id: I7359611818e9591c027fcc19a1b2be15ebd7353b
---
M modules/role/manifests/labs/puppetmaster/backend.pp
M modules/role/manifests/labs/puppetmaster/frontend.pp
2 files changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/role/manifests/labs/puppetmaster/backend.pp 
b/modules/role/manifests/labs/puppetmaster/backend.pp
index 5483e32..17cfe3e 100644
--- a/modules/role/manifests/labs/puppetmaster/backend.pp
+++ b/modules/role/manifests/labs/puppetmaster/backend.pp
@@ -11,6 +11,8 @@
 include ::profile::puppetmaster::labsenc
 include ::profile::puppetmaster::labsencapi
 
+include puppetmaster::labsrootpass
+
 $config = {
 'node_terminus' => 'exec',
 'external_nodes'=> '/usr/local/bin/puppet-enc',
diff --git a/modules/role/manifests/labs/puppetmaster/frontend.pp 
b/modules/role/manifests/labs/puppetmaster/frontend.pp
index c9251e2..3780bf6 100644
--- a/modules/role/manifests/labs/puppetmaster/frontend.pp
+++ b/modules/role/manifests/labs/puppetmaster/frontend.pp
@@ -26,6 +26,8 @@
 include ::profile::conftool::client
 include ::profile::conftool::master
 
+include puppetmaster::labsrootpass
+
 # config-master.wikimedia.org
 include ::profile::configmaster
 include ::profile::discovery::client

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Puppetmaster profile: Support switching off active records

2017-07-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365257 )

Change subject: Puppetmaster profile:  Support switching off active records
..

Puppetmaster profile:  Support switching off active records

We want this for the labs puppetmaster -- no db needed.

Change-Id: If08d30df67247673eee14c177b5b732387efb073
---
M hieradata/hosts/labtestpuppetmaster2001.yaml
M modules/profile/manifests/puppetmaster/common.pp
2 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/365257/1

diff --git a/hieradata/hosts/labtestpuppetmaster2001.yaml 
b/hieradata/hosts/labtestpuppetmaster2001.yaml
index 0dee198..247c955 100644
--- a/hieradata/hosts/labtestpuppetmaster2001.yaml
+++ b/hieradata/hosts/labtestpuppetmaster2001.yaml
@@ -11,6 +11,7 @@
 profile::puppetmaster::labsencapi::statsd_prefix: labtest.puppetbackend
 
 profile::puppetmaster::common::use_puppetdb: false
+profile::puppetmaster::common::use_active_record: false
 
 puppetmaster::ca_server: labtestpuppetmaster2001.wikimedia.org
 
diff --git a/modules/profile/manifests/puppetmaster/common.pp 
b/modules/profile/manifests/puppetmaster/common.pp
index ece6b9e..d352636 100644
--- a/modules/profile/manifests/puppetmaster/common.pp
+++ b/modules/profile/manifests/puppetmaster/common.pp
@@ -2,6 +2,7 @@
 $base_config,
 $directory_environments = 
hiera('profile::puppetmaster::common::directory_environments', false),
 $use_puppetdb = hiera('profile::puppetmaster::common::use_puppetdb', 
false),
+$use_active_record = 
hiera('profile::puppetmaster::common::use_active_record', true),
 ) {
 include passwords::puppet::database
 
@@ -43,6 +44,10 @@
 $config = merge($base_config, $puppetdb_config, $active_record_db, 
$env_config)
 }
 else {
-$config = merge($base_config, $activerecord_config, $active_record_db, 
$env_config)
+if $use_active_record {
+$config = merge($base_config, $activerecord_config, 
$active_record_db, $env_config)
+} else {
+$config = merge($base_config, $env_config, {'thin_storeconfigs' => 
true} )
+}
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix login / create account onboarding colors for dark mode.

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

Change subject: Fix login / create account onboarding colors for dark mode.
..


Fix login / create account onboarding colors for dark mode.

* Also consolidate a few other colors.

Bug: T169117
Change-Id: I1d351e473b8c8122095999e805b9e62e083cc7e7
---
M app/src/main/res/layout/activity_create_account.xml
M app/src/main/res/layout/activity_login.xml
M app/src/main/res/layout/fragment_page_bottom_content.xml
M app/src/main/res/layout/inflate_create_account_onboarding.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/colors.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
8 files changed, 25 insertions(+), 34 deletions(-)

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



diff --git a/app/src/main/res/layout/activity_create_account.xml 
b/app/src/main/res/layout/activity_create_account.xml
index f807b53..9411108 100644
--- a/app/src/main/res/layout/activity_create_account.xml
+++ b/app/src/main/res/layout/activity_create_account.xml
@@ -104,7 +104,7 @@
 android:layout_width="match_parent"
 android:layout_height="match_parent"
 android:layout_gravity="center"
-android:background="@color/base80"
+android:background="?attr/window_background_color"
 android:orientation="vertical"
 android:visibility="gone"/>
 
diff --git a/app/src/main/res/layout/activity_login.xml 
b/app/src/main/res/layout/activity_login.xml
index f2c5693..738a408 100644
--- a/app/src/main/res/layout/activity_login.xml
+++ b/app/src/main/res/layout/activity_login.xml
@@ -6,15 +6,6 @@
 android:layout_height="match_parent"
 android:background="?attr/window_background_color">
 
-
-
 
@@ -27,7 +18,7 @@
 
@@ -35,7 +26,7 @@
 
 
 
 
 
+
+
 
diff --git a/app/src/main/res/layout/fragment_page_bottom_content.xml 
b/app/src/main/res/layout/fragment_page_bottom_content.xml
index bf0f967..afc7dad 100644
--- a/app/src/main/res/layout/fragment_page_bottom_content.xml
+++ b/app/src/main/res/layout/fragment_page_bottom_content.xml
@@ -5,7 +5,7 @@
 android:layout_height="wrap_content"
 android:orientation="vertical"
 android:paddingBottom="16dp"
-android:background="?attr/subtle_gray_color">
+android:background="?attr/window_background_color">
 
 
@@ -27,14 +27,14 @@
 android:layout_marginLeft="16dp"
 android:layout_marginRight="16dp"
 android:contentDescription="@null"
-android:tint="@color/base30"
+android:tint="?attr/feed_text_tertiary_color"
 app:srcCompat="@drawable/ic_check_black_24dp" />
 
 
+android:textColor="?attr/feed_text_tertiary_color" />
 
 
 
 
 
+android:textColor="?attr/feed_text_tertiary_color" />
 
 
 
 
 
+android:textColor="?attr/feed_text_tertiary_color" />
 
 
 
+android:background="?attr/feed_text_tertiary_color" />
 
 
 
 
 
 
 
 
+
 
 
 
@@ -16,14 +17,11 @@
 
 
 
-
 
 
 
 
-
 
-
 
 
 
diff --git a/app/src/main/res/values/colors.xml 
b/app/src/main/res/values/colors.xml
index d4824a2..0453fbd 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -76,11 +76,9 @@
 #898989
 #000
 #e8e8e8
-#f0f0f0
 #ccc
 #c0c0c0
 @android:color/black
-#404040
 #505050
 #898989
 #333
@@ -89,17 +87,14 @@
 
 #000
 #000
-#303030
 #0c0c0c
 #d0d0d0
 #a0a0a0
 #909090
 #505050
-#141414
 #606060
 #505050
 #303030
-#606060
 #d0d0d0
 #a0a0a0
 #d0d0d0
diff --git a/app/src/main/res/values/styles_dark.xml 
b/app/src/main/res/values/styles_dark.xml
index 3dc8ee5..5b0135e 100644
--- a/app/src/main/res/values/styles_dark.xml
+++ b/app/src/main/res/values/styles_dark.xml
@@ -33,6 +33,7 @@
 @color/page_background_dark
 @color/accent30
 @color/accent20
+@color/base14
 @color/toc_background_dark
 @color/toc_section_text_dark
 @color/toc_subsection_text_dark
@@ -43,12 +44,10 @@
 @color/list_separator_dark
 @drawable/divider_dark
 @color/syntax_highlight_template_dark
-@color/subtle_gray_dark
 @drawable/tab_item_selector_dark
 @drawable/tab_item_bottom_gradient_light
 @color/tab_shadow_dark
 @color/tool_tip_default_dark
-@color/link_preview_toolbar_dark
 @color/base14
 @color/link_preview_text_dark
 @color/link_preview_offline_text_dark
diff --git 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update ChangeLog for release 3.0.20170713

2017-07-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365256 )

Change subject: Update ChangeLog for release 3.0.20170713
..

Update ChangeLog for release 3.0.20170713

Change-Id: I099a7e525c0257bdff55a2a50ab4ac6b220a88df
---
M ChangeLog
1 file changed, 105 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/56/365256/1

diff --git a/ChangeLog b/ChangeLog
index 2e75305..e0ef799 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,108 @@
+Release 3.0.20170713 (13 July 2017)
+
+
+Bugfixes (core)
+---
+d9d1d02 Manage temporary readonly error (T154011)
+e533425 Unbreak wbGeoShape and WbTabularData (T166362)
+3834b6c Clean up issue with _WbDataPage (T166362)
+b8a9c2f Re-enable xml for WikiStats with py2 (T165830)
+461ffb0 Solve httplib.IncompleteRead exception in eventstreams (T168535)
+c697bfe Only force input_choise if self.always is given (T161483)
+5ed60e0 Add colon when replacing category and file weblink (T127745)
+df097a6 API Request: set uiprop only when ensuring 'userinfo' in meta (T169202)
+39843e8 Fix TestLazyLoginNotExistUsername test for Stewardwiki (T169458)
+
+Improvements (core)
+---
+8b74d51 Introduce the new WbUnknown data type for Wikibase (T165961)
+461f747 djvu.py: add replace_page() and delete_page()
+ee30a68 Build GeoShape and TabularData from shared base class
+9aee0e0 Remove non-breaking spaces when tidying up a link (T130818)
+aef1b24 Replace private mylang variables with mycode in generate_user_files.py
+a5e5a3f FilePage: remove deprecated use of fileUrl
+e236757 Make socket_timeout recalculation reusable (T166539)
+b022690 FilePage.download(): add revision parameter to download arbitrary 
revision (T166939)
+737b037 Make pywikibot.Error more precise (T166982)
+a0a6d16 Implement pywikibot support for adding thanks to normal revisions 
(T135409)
+ed61b0f Implement EventStreams (T158943)
+f5f4a60 Add -titleregexnot page filter
+eddcc95 Add exception for -namepace option (T167580)
+4ea8d38 InteractiveReplace: Allow no replacements by default
+633e69a Encode default globe in family file
+3321a40 Add on to pywikibot support for thanking normal revisions (T135409)
+98783dc Add log entry code for thanks log (T135413)
+4be9336 Create superclass for log entries with user targets
+f6b0c7b Use relative reference to class attribute
+d12f60b Allow pywikibot to authenticate against a private wiki (T153903)
+42443c5 Make WbRepresentations hashable (T167827)
+
+Updates (core)
+--
+a6337f7 Update linktails
+173becb Update languages_by_size
+be75fb9 Update cross_allowed (global bot wikis group)
+1fbcccb Add atjwiki to wikipedia family file (T168049)
+beacf44 remove closed sites from languages_by_size list
+447b045 Update category_redirect_templates for wikipedia and commons Family
+7945c4a Update logevent type parameter list
+bc01242 Disable cleanUpSectionHeaders on jbo.wiktionary (T168399)
+54b4f90 Add kbpwiki to wikipedia family file (T169216)
+0679efa Remove anarchopedia family out of the framework (T167534)
+
+Bugfixes (scripts)
+--
+1d8c1bd Fix ResourceWarning in wikimedia_sites.py (T166459)
+02dbe77 imagecopy.py: page.site is not callable (T167062)
+38d645d weblinkchecker.py: Use https for web.archive.org (T167463)
+ea80e13 redirect.py: Adjust _treat_counter (T167254)
+f24c082 misspelling.py: Fix comparing template name (T125328)
+74f6c36 piper.py: fix bytes/str handling in python3 (T157215)
+fa830d6 Enable exceptions from fixes file (T142324)
+e229a13 revertbot.py: Don't loop over user contribs (T168666)
+e8bdc42 Use correct iterator method in interwikidata.py (T168575)
+86f623f Don't fail TestProofreadPageValidSite.test_url_image (T169542)
+54d24f7 Fix some of the invalid escape sequences (T164575)
+f577676 redirect.py: Handle PageSaveRelatedError exception (T169859)
+48431e7 illustratewikidata: rename page_image key in page_image_free (T169447)
+2684ffc checkimages: format string must be concatenated first (T170087)
+7f2b925 interwikidata:  Fix interwiki conflict detection (T168575)
+f645523 Fix ResourceWarning in wikimedia_sites.py with python3 (T166459)
+
+Improvements (scripts)
+--
+3343a7f Port followlive.py to core (T66854)
+92f66ff replace.py: allow to edit modified text
+4ee7fda Catch KeyboardInterrupt and finally print execution time in 
checkimages.py
+e79af64 proofreadpage.py: raise TypeError, not ValueError
+7c5a078 category.py/tidy: Show page title at the bottom of the output (T166468)
+8355c22 checkimages: Use site.namespaces.FILE.custom_name instead of "File:"
+e2c92e2 weblinkchecker.py: Sorting of carriage returns (T166934)
+a78df27 Stopme is done at exit time by default
+a360417 standardize spamremove.py
+cd5665a replace.py: do not overwrite exceptions given via CLI (T142324)
+280f0a9 Create items with interwiki using 

[MediaWiki-commits] [Gerrit] operations/software[master]: mariadb.service: Set start/stop timeout to 10 minutes

2017-07-14 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365255 )

Change subject: mariadb.service: Set start/stop timeout to 10 minutes
..

mariadb.service: Set start/stop timeout to 10 minutes

It currently timeouts with the default value, and says the unit
failed even if it stopped cleanly.

We may have to override it for large datasets/small IOPS servers
to make it even larger (e.g. 30 minutes).

Change-Id: Ie62f522aeb0eee0fdfdf58788476defa3e0e2b75
---
M dbtools/mariadb.service
M dbtools/mariadb@.service
2 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/55/365255/1

diff --git a/dbtools/mariadb.service b/dbtools/mariadb.service
index 68feea1..0da7f4f 100644
--- a/dbtools/mariadb.service
+++ b/dbtools/mariadb.service
@@ -60,6 +60,9 @@
 # Execute pre and post scripts as root, otherwise it does it as User=
 PermissionsStartOnly=true
 
+# Set TimeoutStartSec and TimeoutStopSec to 10 minutes (sometimes it
+# can take a very long time to stop a server or start it if it crashed)
+TimeoutSec=600
 
 # WE DISABLE ALL GALERA RELATED FUNCTIONALITY
 
diff --git a/dbtools/mariadb@.service b/dbtools/mariadb@.service
index d3293fd..1c3ada0 100644
--- a/dbtools/mariadb@.service
+++ b/dbtools/mariadb@.service
@@ -67,6 +67,10 @@
 # Execute pre and post scripts as root, otherwise it does it as User=
 PermissionsStartOnly=true
 
+# Set TimeoutStartSec and TimeoutStopSec to 10 minutes (sometimes it
+# can take a very long time to stop a server or start it if it crashed)
+TimeoutSec=600
+
 # WE DISABLE ALL GALERA RELATED FUNCTIONALITY
 
 # Perform automatic wsrep recovery. When server is started without wsrep,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie62f522aeb0eee0fdfdf58788476defa3e0e2b75
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Jcrespo 

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Set result browser SPARQL API in embed mode

2017-07-14 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365254 )

Change subject: Set result browser SPARQL API in embed mode
..

Set result browser SPARQL API in embed mode

embed.html did not fully initialize the result browsers it instantiated
(compare with ResultView.js), resulting in errors when those browsers
tried to use their SPARQL API (getSparqlApi()) to run queries.

Bug: T170670
Change-Id: Ie9567d2b84a2e9dc631c58410b7ba897a6c07efc
---
M embed.html
1 file changed, 5 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/54/365254/1

diff --git a/embed.html b/embed.html
index 3a8c2ac..62891ee 100644
--- a/embed.html
+++ b/embed.html
@@ -198,6 +198,8 @@
};
 
$( document ).ready( function() {
+   var sparqlApi = new wikibase.queryService.api.Sparql();
+
function getResultBrowser( query ) {
var browser = null;
var browserPackage = 
wikibase.queryService.ui.resultBrowser;
@@ -210,6 +212,7 @@
var browserClass = 
RESULT_BROWSER.Table.class;
browser = new 
browserPackage[browserClass]();
}
+   browser.setSparqlApi( sparqlApi );
 
var tracking = new 
wikibase.queryService.api.Tracking();
tracking.track( 
'wikibase.queryService.ui.embed.' + ( browserKey || 'default' ) );
@@ -243,13 +246,12 @@
window.location.hash = '#' + 
encodeURIComponent( query )
 
var browser = getResultBrowser( query );
-   var api = new 
wikibase.queryService.api.Sparql();
$( '#query-result' ).hide();
$( '#query-result' ).empty();
$( '#progress' ).show();
-   api.query( query ).done( function() {
+   sparqlApi.query( query ).done( function() {
try {
-   browser.setResult( 
api.getResultRawData() );
+   browser.setResult( 
sparqlApi.getResultRawData() );
$( '#query-result' ).show();
browser.draw( $( 
'#query-result' ) );
$( '#progress' ).hide();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9567d2b84a2e9dc631c58410b7ba897a6c07efc
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: T169045: Implement the upload service

2017-07-14 Thread Hjfocs (Code Review)
Hjfocs has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365253 )

Change subject: T169045: Implement the upload service
..

T169045: Implement the upload service

'/upload' REST endpoint of the primary sources tool ingestion API.
This allows a third-party data provider to upload its dataset via
a POST request.
The dataset undergoes Wikidata RDF data model validation and its
valid subset is uploaded to a Blazegraph instance through
the Blazegraph data loader service.
If the dataset does not pass RDF syntax checking, the service
returns a bad request response.

Change-Id: I33dde366ee41a118aeec5c863f9157a9ab31b291
---
M tools/pom.xml
A 
tools/src/main/java/org/wikidata/query/rdf/tool/primarysources/WikibaseDataModelValidator.java
A 
tools/src/main/java/org/wikidata/query/rdf/tool/primarysources/ingestion/UploadServlet.java
A 
tools/src/test/java/org/wikidata/query/rdf/tool/primarysources/WikibaseDataModelValidatorUnitTest.java
A 
tools/src/test/java/org/wikidata/query/rdf/tool/primarysources/ingestion/IngestionAPIIntegrationTest.java
A tools/src/test/resources/bad_chuck_berry.ttl
A tools/src/test/resources/good_chuck_berry.ttl
A tools/src/test/resources/just_bad_rdf.ttl
M war/pom.xml
M war/src/main/webapp/WEB-INF/web.xml
10 files changed, 1,269 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/53/365253/1

diff --git a/tools/pom.xml b/tools/pom.xml
index faeca64..da95ae0 100644
--- a/tools/pom.xml
+++ b/tools/pom.xml
@@ -55,8 +55,18 @@
   nanohttpd
 
 
+  commons-fileupload
+  commons-fileupload
+  1.3.1
+
+
   io.dropwizard.metrics
   metrics-core
+
+
+  javax.servlet
+  javax.servlet-api
+  3.1.0
 
 
   org.apache.commons
@@ -120,6 +130,12 @@
   runtime
 
 
+  org.apache.httpcomponents
+  httpmime
+  4.4
+  test
+
+
   org.hamcrest
   hamcrest-core
   test
diff --git 
a/tools/src/main/java/org/wikidata/query/rdf/tool/primarysources/WikibaseDataModelValidator.java
 
b/tools/src/main/java/org/wikidata/query/rdf/tool/primarysources/WikibaseDataModelValidator.java
new file mode 100644
index 000..153283b
--- /dev/null
+++ 
b/tools/src/main/java/org/wikidata/query/rdf/tool/primarysources/WikibaseDataModelValidator.java
@@ -0,0 +1,443 @@
+package org.wikidata.query.rdf.tool.primarysources;
+
+import com.google.common.collect.ImmutableMap;
+import org.openrdf.model.Model;
+import org.openrdf.model.Statement;
+import org.openrdf.model.URI;
+import org.openrdf.model.Value;
+import org.openrdf.model.impl.TreeModel;
+import org.openrdf.rio.RDFFormat;
+import org.openrdf.rio.RDFParseException;
+import org.openrdf.rio.Rio;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.wikidata.query.rdf.common.uri.Provenance;
+import org.wikidata.query.rdf.common.uri.WikibaseUris;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.util.AbstractMap;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+/**
+ * Validates a given dataset against the https://www.mediawiki.org/wiki/Wikibase/Indexing/RDF_Dump_Format#Data_model;>Wikidata
 RDF data model
+ * The dataset undergoes RDF syntax check first, then the actual data model 
validation.
+ *
+ * @author Marco Fossati - User:Hjfocs
+ * @since 0.2.4
+ * Created on Jun 19, 2017.
+ */
+public class WikibaseDataModelValidator {
+
+/**
+ * Map of regular expressions that validate the following Wikidata terms:
+ * 
+ * item, e.g., Q9521;
+ * property, e.g., P18;
+ * reified statement, e.g., 
Q5921-583C7277-B344-4C96-8CF2-0557C2D0CD34;
+ * reified reference, e.g., 
288ab581e7d2d02995a26dfa8b091d96e78457fc.
+ * 
+ */
+public static final Map TERM_VALIDATORS = ImmutableMap.of(
+"item", Pattern.compile("^Q\\d+$"),
+"property", Pattern.compile("^P\\d+$"),
+"statement", 
Pattern.compile("^Q\\d+-[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$"),
+"reference", Pattern.compile("^[0-9a-f]{40}$"));
+
+/**
+ * The set of Wikidata namespaces.
+ */
+static final WikibaseUris VALID_NAMESPACES = WikibaseUris.WIKIDATA;
+
+/**
+ * 3 characters is the maximum value to consider a given resource as 
invalid due to a typo.
+ */
+private static final int EDIT_DISTANCE_THRESHOLD = 3;
+private static final Logger log = 
LoggerFactory.getLogger(WikibaseDataModelValidator.class);
+
+/**
+ * Check the RDF syntax correctness of a given dataset.
+ * Note that parsing is done in memory over the whole dataset.
+ *
+ * @param dataset - the input stream of the dataset to 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Workarounds to fix the project build

2017-07-14 Thread Hjfocs (Code Review)
Hjfocs has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365252 )

Change subject: Workarounds to fix the project build
..

Workarounds to fix the project build

Blazegraph snapshot dependencies do not seem to be deployed
in the Wikimedia repos, so add the OSS one.
Linked Data Fragments -wmf2 version does not seem to be available
at all, so use -wmf.
The duplicate finder Maven plugin fails the build due to the following 
duplicates
in the 'war' and 'tools' modules respectively:
com.codahale.metrics:metrics-core:3.0.0 VS 
io.dropwizard.metrics:metrics-core:3.1.0
and
war/src/main/resources/logback.xml VS tools/src/main/resources/logback.xml
The codahale dependency is now ignored by the Maven plugin, while the 
logback.xml
resource in the 'tools' module is deleted.

Change-Id: I8f18af22a230472680ce55ae519a3022dfe17195
---
M pom.xml
D tools/src/main/resources/logback.xml
2 files changed, 10 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/52/365252/1

diff --git a/pom.xml b/pom.xml
index 7d65391..f0d358c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -430,7 +430,7 @@
   
 org.linkeddatafragments
 ldfserver
-0.1.1-wmf2
+0.1.1-wmf
 classes
 
   
@@ -466,7 +466,7 @@
   
 org.linkeddatafragments
 ldfserver
-0.1.1-wmf2
+0.1.1-wmf
 war
   
   
@@ -627,6 +627,10 @@
 
   wmf.releases
   http://archiva.wikimedia.org/repository/releases
+
+
+  ossrh
+  https://oss.sonatype.org/content/repositories/snapshots
 
   
 
@@ -1047,6 +1051,10 @@
   clean, it will come in a second time...
 -->
 
+  com.codahale.metrics
+  metrics-core
+
+
   colt
   colt
 
diff --git a/tools/src/main/resources/logback.xml 
b/tools/src/main/resources/logback.xml
deleted file mode 100644
index 206a188..000
--- a/tools/src/main/resources/logback.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - 
%msg%n
-true
-
-
-
-
-
-
-
-
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f18af22a230472680ce55ae519a3022dfe17195
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Hjfocs 

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Rearrange folders - move source code to lib folder

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

Change subject: Rearrange folders - move source code to lib folder
..


Rearrange folders - move source code to lib folder

cxserver's top folder had all kind of folders. Following the pattern
of other mediawiki services, let us put all source code for cxserver
under new lib folder.

* registry/index.js - the only file inside registry folder now moved
to lib/registry.js
* util/utils.js now moved under lib folder.

No change on any functionality. All tests should pass and no change
to any APIs.

Change-Id: I6472fd5bfff6e54b41a0ca36e22c28d43aa340a0
---
M app.js
M bin/linearize
R doc/Registry.md
R lib/api-util.js
R lib/dictionary/dict/Dict.js
R lib/dictionary/dict/DictClient.js
R lib/dictionary/dict/DictRegistry.json
R lib/dictionary/dict/Readme.md
R lib/dictionary/index.js
R lib/dictionary/jsondict/JsonDict.js
R lib/dictionary/jsondict/JsonDictRegistry.json
R lib/dictionary/jsondict/dictionaries/apertium-ca-es.json
R lib/dictionary/jsondict/dictionaries/apertium-es-ca.json
R lib/dictionary/jsondict/dictionaries/freedict-eng-spa.json
R lib/index.js
R lib/lineardoc/Builder.js
R lib/lineardoc/Doc.js
R lib/lineardoc/Normalizer.js
R lib/lineardoc/Parser.js
R lib/lineardoc/TextBlock.js
R lib/lineardoc/TextChunk.js
R lib/lineardoc/Utils.js
R lib/lineardoc/index.js
R lib/mt/Apertium.js
R lib/mt/Apertium.languagenames.json
R lib/mt/MTClient.js
R lib/mt/Yandex.js
R lib/mt/Youdao.js
R lib/mt/annotationmapper/LevenshteinDistance.js
R lib/mt/annotationmapper/SubsequenceMatcher.js
R lib/mt/index.js
R lib/pageloader/PageLoader.js
R lib/registry.js
R lib/routes/doc.js
R lib/routes/info.js
R lib/routes/root.js
R lib/routes/v1.js
R lib/segmentation/CXSegmenter.js
R lib/segmentation/languages/SegmenterAm.js
R lib/segmentation/languages/SegmenterDefault.js
R lib/segmentation/languages/SegmenterHi.js
R lib/segmentation/languages/SegmenterHy.js
R lib/segmentation/languages/SegmenterJa.js
R lib/segmentation/languages/SegmenterZh.js
R lib/segmentation/languages/index.js
R lib/util.js
M test/dictionary/JsonDict.test.js
M test/index.js
M test/lineardoc/LinearDoc.test.js
M test/mt/Apertium.test.js
M test/segmentation/CXSegmenter.test.js
51 files changed, 23 insertions(+), 25 deletions(-)

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



diff --git a/app.js b/app.js
index f6ddda8..648c001 100644
--- a/app.js
+++ b/app.js
@@ -6,8 +6,8 @@
compression = require( 'compression' ),
bodyParser = require( 'body-parser' ),
fs = BBPromise.promisifyAll( require( 'fs' ) ),
-   sUtil = require( './utils/util' ),
-   apiUtil = require( './utils/api-util' ),
+   sUtil = require( './lib/util' ),
+   apiUtil = require( './lib/api-util' ),
packageInfo = require( './package.json' ),
path = require( 'path' ),
yaml = require( 'js-yaml' );
@@ -159,7 +159,7 @@
  */
 function loadRoutes( app ) {
// get the list of files in routes/
-   return fs.readdirAsync( __dirname + '/routes' )
+   return fs.readdirAsync( __dirname + '/lib/routes' )
.map( function ( fname ) {
var route;
 
@@ -170,7 +170,7 @@
return undefined;
}
// import the route file
-   route = require( __dirname + '/routes/' + fname 
);
+   route = require( __dirname + '/lib/routes/' + 
fname );
return route( app );
} ).then( function ( route ) {
if ( route === undefined ) {
diff --git a/bin/linearize b/bin/linearize
index c65b709..257717b 100755
--- a/bin/linearize
+++ b/bin/linearize
@@ -1,7 +1,7 @@
 #!/usr/bin/env node
 var script, xhtmlSource, xhtml, parser,
fs = require( 'fs' ),
-   LinearDoc = require( __dirname + '/../lineardoc' );
+   LinearDoc = require( __dirname + '/../lib/lineardoc' );
 
 script = process.argv[ 1 ];
 if ( process.argv.length !== 3 ) {
diff --git a/registry/README.md b/doc/Registry.md
similarity index 100%
rename from registry/README.md
rename to doc/Registry.md
diff --git a/utils/api-util.js b/lib/api-util.js
similarity index 100%
rename from utils/api-util.js
rename to lib/api-util.js
diff --git a/dictionary/dict/Dict.js b/lib/dictionary/dict/Dict.js
similarity index 100%
rename from dictionary/dict/Dict.js
rename to lib/dictionary/dict/Dict.js
diff --git a/dictionary/dict/DictClient.js b/lib/dictionary/dict/DictClient.js
similarity index 100%
rename from dictionary/dict/DictClient.js
rename to lib/dictionary/dict/DictClient.js
diff --git a/dictionary/dict/DictRegistry.json 
b/lib/dictionary/dict/DictRegistry.json
similarity index 100%
rename from dictionary/dict/DictRegistry.json
rename to 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Configure Japanese Language Analysis with Kuromoji

2017-07-14 Thread Tjones (Code Review)
Tjones has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365251 )

Change subject: Configure Japanese Language Analysis with Kuromoji
..

Configure Japanese Language Analysis with Kuromoji

With community input, it was decided that the Kuromoji language analyzer
should not be deployed. However, if it ever were deployed, this is the
baseline configuration that I would recommend.

It fixes problems Kuromoji has:
 - inconsistent treatment of fullwidth numbers
 - many non-Japanese, non-Latin words are not indexed

Incidentally re-format italian_elision not to take up so much vertical
space.

Bug: T166731
Change-Id: I133cdc9affa3ed308a46a87892e069cd7461848e
---
M includes/Maintenance/AnalysisConfigBuilder.php
1 file changed, 32 insertions(+), 22 deletions(-)


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

diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 86bbf83..43519bb 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -716,27 +716,9 @@
$config[ 'filter' ][ 'italian_elision' ] = [
'type' => 'elision',
'articles' => [
-   'c',
-   'l',
-   'all',
-   'dall',
-   'dell',
-   'nell',
-   'sull',
-   'coll',
-   'pell',
-   'gl',
-   'agl',
-   'dagl',
-   'degl',
-   'negl',
-   'sugl',
-   'un',
-   'm',
-   't',
-   's',
-   'v',
-   'd'
+   'c', 'l', 'all', 'dall', 'dell', 
'nell', 'sull',
+   'coll', 'pell', 'gl', 'agl', 'dagl', 
'degl', 'negl',
+   'sugl', 'un', 'm', 't', 's', 'v', 'd'
],
];
$config[ 'filter' ][ 'italian_stop' ] = [
@@ -768,6 +750,34 @@
$config[ 'analyzer' ][ 'lowercase_keyword' ][ 'filter' 
][] = 'asciifolding_preserve';
 
// In Italian text_search is just a copy of text
+   $config[ 'analyzer' ][ 'text_search' ] = $config[ 
'analyzer' ][ 'text' ];
+   break;
+   case 'japanese':
+   // See 
https://www.mediawiki.org/wiki/User:TJones_(WMF)/T166731
+   $config[ 'char_filter' ][ 'fullwidthnumfix' ] = [
+   // pre-convert fullwidth numbers because 
Kuromoji tokenizer treats them weirdly
+   'type' => 'mapping',
+   'mappings' => [
+   "\uff10=>0", "\uff11=>1", "\uff12=>2", 
"\uff13=>3",
+   "\uff14=>4", "\uff15=>5", "\uff16=>6", 
"\uff17=>7",
+   "\uff18=>8", "\uff19=>9",
+   ],
+   ];
+
+   $config[ 'analyzer' ][ 'text' ] = [
+   'type' => 'custom',
+   'char_filter' => [ 'fullwidthnumfix' ],
+   'tokenizer' => 'kuromoji_tokenizer',
+   ];
+
+   $filters = [];
+   $filters[] = 'kuromoji_baseform';
+   $filters[] = 'cjk_width';
+   $filters[] = 'ja_stop';
+   $filters[] = 'kuromoji_stemmer';
+   $filters[] = 'lowercase';
+   $config[ 'analyzer' ][ 'text' ][ 'filter' ] = $filters;
+
$config[ 'analyzer' ][ 'text_search' ] = $config[ 
'analyzer' ][ 'text' ];
break;
case 'russian':
@@ -1050,7 +1060,7 @@
// For Hebrew, see 
https://www.mediawiki.org/wiki/User:TJones_(WMF)/T162741
 
'analysis-stempel' => [ 'pl' => 'polish' ],
-   'analysis-kuromoji' => [ 'ja' => 'kuromoji' ],
+   'analysis-kuromoji' => [ 'ja' => 'japanese' ],

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ChangesListSpecialPage: Don't short-circuit the ChangesList, ...

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

Change subject: ChangesListSpecialPage: Don't short-circuit the ChangesList, 
instead format zero rows
..


ChangesListSpecialPage: Don't short-circuit the ChangesList, instead format 
zero rows

Short-circuiting the ChangesList causes bugs, because it causes
ChangesList::beginRecentChangesList() to be bypassed. This function
adds important styles and RL modules, especially when enhanced RC is enabled.

Instead, fake an empty result and let the ChangesList format it.
This will add styles and modules but otherwise produce no output.
(It does produce an empty div, but the idiosyncratic way in which the
subclasses deal with empty results causes that div not to be output.)

Bug: T169835
Change-Id: Ib831c781f4fe91eef787aef3d17e71780be9da51
---
M includes/specialpage/ChangesListSpecialPage.php
1 file changed, 2 insertions(+), 7 deletions(-)

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



diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 0be0646..eb431a4 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -22,6 +22,7 @@
  */
 use MediaWiki\Logger\LoggerFactory;
 use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\FakeResultWrapper;
 use Wikimedia\Rdbms\IDatabase;
 
 /**
@@ -518,13 +519,7 @@
$rows = $this->getRows();
$opts = $this->getOptions();
if ( $rows === false ) {
-   if ( !$this->including() ) {
-   $this->doHeader( $opts, 0 );
-   $this->outputNoResults();
-   $this->getOutput()->setStatusCode( 404 );
-   }
-
-   return;
+   $rows = new FakeResultWrapper( [] );
}
 
$batch = new LinkBatch;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib831c781f4fe91eef787aef3d17e71780be9da51
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CheckUser[master]: Replace deprecated User::makeGroupLinkHTML with the alternat...

2017-07-14 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365250 )

Change subject: Replace deprecated User::makeGroupLinkHTML with the alternative 
method from UserGroupMembership class
..

Replace deprecated User::makeGroupLinkHTML with the alternative
method from UserGroupMembership class

Bug: T170675
Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90
---
M specials/SpecialCheckUser.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/specials/SpecialCheckUser.php b/specials/SpecialCheckUser.php
index ea1c84b..952f23e 100644
--- a/specials/SpecialCheckUser.php
+++ b/specials/SpecialCheckUser.php
@@ -1509,8 +1509,8 @@
protected static function buildGroupLink( $group, $username ) {
static $cache = [];
if ( !isset( $cache[$group] ) ) {
-   $cache[$group] = User::makeGroupLinkHTML(
-   $group, User::getGroupMember( $group, $username 
)
+   $cache[$group] = UserGroupMembership::getLink(
+   $group, RequestContext::getMain(), 'html'
);
}
return $cache[$group];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53a741b270ba34f05edd05fd27512515e05e7e90
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CheckUser
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: VisualEditor: Rollback of change 364988

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

Change subject: VisualEditor: Rollback of change 364988
..


VisualEditor: Rollback of change 364988

Seems that in some special case when mixed with tables, this change also
breaks the text in another way.

Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
ERM: #6826, #6743
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 7464a03..8ec0ea5 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -1812,7 +1812,7 @@
 
specialTagsList = 
mw.config.get('BsVisualEditorConfigDefault').specialtaglist;
// Tags without innerHTML need /> as end marker. Maybe this 
should be task of a preprocessor, in order to allow mw style tags without /.
-   regex = '<(' + specialTagsList + ')( 
*[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
+   regex = '<(' + specialTagsList + ')( 
[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
 
matcher = new RegExp(regex, 'gmi');
mtext = text;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: ItSpiderman 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: VisualEditor: Rollback of change 364988

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

Change subject: VisualEditor: Rollback of change 364988
..


VisualEditor: Rollback of change 364988

Seems that in some special case when mixed with tables, this change also
breaks the text in another way.

Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
ERM: #6826, #6743
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 7464a03..8ec0ea5 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -1812,7 +1812,7 @@
 
specialTagsList = 
mw.config.get('BsVisualEditorConfigDefault').specialtaglist;
// Tags without innerHTML need /> as end marker. Maybe this 
should be task of a preprocessor, in order to allow mw style tags without /.
-   regex = '<(' + specialTagsList + ')( 
*[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
+   regex = '<(' + specialTagsList + ')( 
[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
 
matcher = new RegExp(regex, 'gmi');
mtext = text;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: VisualEditor: Rollback of change 364988

2017-07-14 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365249 )

Change subject: VisualEditor: Rollback of change 364988
..

VisualEditor: Rollback of change 364988

Seems that in some special case when mixed with tables, this change also
breaks the text in another way.

Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
ERM: #6826, #6743
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 7464a03..8ec0ea5 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -1812,7 +1812,7 @@
 
specialTagsList = 
mw.config.get('BsVisualEditorConfigDefault').specialtaglist;
// Tags without innerHTML need /> as end marker. Maybe this 
should be task of a preprocessor, in order to allow mw style tags without /.
-   regex = '<(' + specialTagsList + ')( 
*[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
+   regex = '<(' + specialTagsList + ')( 
[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
 
matcher = new RegExp(regex, 'gmi');
mtext = text;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: ItSpiderman 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add labpuppetmaster* to site.pp to enable base::firewall

2017-07-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365209 )

Change subject: Add labpuppetmaster* to site.pp to enable base::firewall
..


Add labpuppetmaster* to site.pp to enable base::firewall

Installed with a public IP, add it to site.pp to apply base::firewall.

Bug: T167905

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

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



diff --git a/manifests/site.pp b/manifests/site.pp
index a0e56ad..7b67bc7 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -970,6 +970,12 @@
 interface::add_ip6_mapped { 'main': }
 }
 
+
+node /labpuppetmaster100[12]\.wikimedia\.org/ {
+include ::standard
+include ::base::firewall
+}
+
 # labservices1001 hosts openstack-designate, the labs DNS service.
 node 'labservices1001.wikimedia.org' {
 role(labs::dns, labs::openstack::designate::server, labs::dnsrecursor,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibcb54500e4bb691465068804085453f189894c50
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Ayounsi 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: BSExtendedSearch: New hook for search param manipulation

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

Change subject: BSExtendedSearch: New hook for search param manipulation
..


BSExtendedSearch: New hook for search param manipulation

This change is neccessary for ERM6068

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
---
M ExtendedSearch/doc/Hooks.txt
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/ExtendedSearch/doc/Hooks.txt b/ExtendedSearch/doc/Hooks.txt
index 2bd6a6b..4d0e78f 100644
--- a/ExtendedSearch/doc/Hooks.txt
+++ b/ExtendedSearch/doc/Hooks.txt
@@ -70,6 +70,13 @@
 $sFieldName
 $sTagName
 
+'BSExtendedSearchSearchOptionsAssembleSearchOptions': Allows to adjust the
+parameters send to the SOLR backend. E.g. for security trimming.
+$oSearchOptions The SearchOptions instance
+&$aOptions All kind of collected options from the current search request
+&$aFq The list of filter queries
+&$aFacetFields The list of facet fields
+
 ==SearchRequest.class==
 
 'BSExtendedSearchRequestProcessInputs':
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index ee6bdc9..913783d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -499,6 +499,10 @@
}
 
protected function assembleSearchOptions() {
+   Hooks::run(
+   'BSExtendedSearchSearchOptionsAssembleSearchOptions',
+   [ $this, &$this->aOptions, &$this->aFq, 
&$this->aFacetFields ]
+   );
$this->aSearchOptions['defType'] = 'edismax';
$this->aSearchOptions['fl'] = 
'uid,type,title,path,namespace,cat,ts,redirects,overall_type';
$this->aSearchOptions['fq'] = $this->aFq;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add labweb* to site.pp to enable base::firewall

2017-07-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365207 )

Change subject: Add labweb* to site.pp to enable base::firewall
..


Add labweb* to site.pp to enable base::firewall

Installed with a public IP, add it to site.pp to apply base::firewall.

Bug: T167820
Change-Id: I878348c20bcaec94e1f54f63258761ef0963eadc
---
M manifests/site.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 5db5aa4..a0e56ad 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1055,6 +1055,11 @@
 include ::standard
 }
 
+node /labweb100[12]\.wikimedia\.org/ {
+include ::base::firewall
+include ::standard
+}
+
 # Primary graphite machines
 node 'graphite1001.eqiad.wmnet' {
 role(graphite::production, statsd, performance::site, graphite::alerts,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I878348c20bcaec94e1f54f63258761ef0963eadc
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Ayounsi 
Gerrit-Reviewer: RobH 
Gerrit-Reviewer: Rush 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BSExtendedSearch: New hook for search param manipulation

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

Change subject: BSExtendedSearch: New hook for search param manipulation
..


BSExtendedSearch: New hook for search param manipulation

This change is neccessary for ERM6068

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
---
M ExtendedSearch/doc/Hooks.txt
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/ExtendedSearch/doc/Hooks.txt b/ExtendedSearch/doc/Hooks.txt
index 2bd6a6b..4d0e78f 100644
--- a/ExtendedSearch/doc/Hooks.txt
+++ b/ExtendedSearch/doc/Hooks.txt
@@ -70,6 +70,13 @@
 $sFieldName
 $sTagName
 
+'BSExtendedSearchSearchOptionsAssembleSearchOptions': Allows to adjust the
+parameters send to the SOLR backend. E.g. for security trimming.
+$oSearchOptions The SearchOptions instance
+&$aOptions All kind of collected options from the current search request
+&$aFq The list of filter queries
+&$aFacetFields The list of facet fields
+
 ==SearchRequest.class==
 
 'BSExtendedSearchRequestProcessInputs':
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index ee6bdc9..913783d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -499,6 +499,10 @@
}
 
protected function assembleSearchOptions() {
+   Hooks::run(
+   'BSExtendedSearchSearchOptionsAssembleSearchOptions',
+   [ $this, &$this->aOptions, &$this->aFq, 
&$this->aFacetFields ]
+   );
$this->aSearchOptions['defType'] = 'edismax';
$this->aSearchOptions['fl'] = 
'uid,type,title,path,namespace,cat,ts,redirects,overall_type';
$this->aSearchOptions['fq'] = $this->aFq;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: BSExtendedSearch: New hook for search param manipulation

2017-07-14 Thread Pwirth (Code Review)
Pwirth has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365248 )

Change subject: BSExtendedSearch: New hook for search param manipulation
..

BSExtendedSearch: New hook for search param manipulation

This change is neccessary for ERM6068

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
---
M ExtendedSearch/doc/Hooks.txt
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
2 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/ExtendedSearch/doc/Hooks.txt b/ExtendedSearch/doc/Hooks.txt
index 2bd6a6b..4d0e78f 100644
--- a/ExtendedSearch/doc/Hooks.txt
+++ b/ExtendedSearch/doc/Hooks.txt
@@ -70,6 +70,13 @@
 $sFieldName
 $sTagName
 
+'BSExtendedSearchSearchOptionsAssembleSearchOptions': Allows to adjust the
+parameters send to the SOLR backend. E.g. for security trimming.
+$oSearchOptions The SearchOptions instance
+&$aOptions All kind of collected options from the current search request
+&$aFq The list of filter queries
+&$aFacetFields The list of facet fields
+
 ==SearchRequest.class==
 
 'BSExtendedSearchRequestProcessInputs':
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index ee6bdc9..913783d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -499,6 +499,10 @@
}
 
protected function assembleSearchOptions() {
+   Hooks::run(
+   'BSExtendedSearchSearchOptionsAssembleSearchOptions',
+   [ $this, &$this->aOptions, &$this->aFq, 
&$this->aFacetFields ]
+   );
$this->aSearchOptions['defType'] = 'edismax';
$this->aSearchOptions['fl'] = 
'uid,type,title,path,namespace,cat,ts,redirects,overall_type';
$this->aSearchOptions['fq'] = $this->aFq;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: kafkatee: send 4xx to logstash as well

2017-07-14 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365247 )

Change subject: kafkatee: send 4xx to logstash as well
..

kafkatee: send 4xx to logstash as well

Change-Id: Id87dc1c721cceb59f6f1c069838a73a728abc150
---
M modules/role/manifests/logging/kafkatee/webrequest/ops.pp
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/47/365247/1

diff --git a/modules/role/manifests/logging/kafkatee/webrequest/ops.pp 
b/modules/role/manifests/logging/kafkatee/webrequest/ops.pp
index 3698ee0..df5fb46 100644
--- a/modules/role/manifests/logging/kafkatee/webrequest/ops.pp
+++ b/modules/role/manifests/logging/kafkatee/webrequest/ops.pp
@@ -23,9 +23,15 @@
 type=> 'pipe',
 }
 
-# Send 5xx to logstash, append "type: webrequest" for logstash to pick up
+# Send 5xx and 4xx (but not 404s due to volume) to logstash
+# Append "type: webrequest" to JSON records for logstash to pick up
 kafkatee::output { 'logstash-5xx':
 destination => "/bin/grep --line-buffered '\"http_status\":\"5' | jq 
--compact-output --arg type webrequest '. + {type: \$type}' | socat - 
TCP:${logstash_host}:${logstash_port}",
 type=> 'pipe',
 }
+
+kafkatee::output { 'logstash-4xx':
+destination => "/bin/grep --extended-regexp --line-buffered 
'\"http_status\":\"4(0[^4]|[1-9][0-9])' | jq --compact-output --arg type 
webrequest '. + {type: \$type}' | socat - 
TCP:${logstash_host}:${logstash_port}",
+type=> 'pipe',
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: SenseId property type with demo data

2017-07-14 Thread Aleksey Bekh-Ivanov (WMDE) (Code Review)
Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365246 )

Change subject: SenseId property type with demo data
..

SenseId property type with demo data

Didn't want to introduce extra complexity, so just put test data in both
Sense.js and SenseIdFormatter.php
If you will need to add something don't forget that you need to add in both.

Change-Id: I1d91aae24c4aa9577d08690ddc32ac2be7ebb6e3
---
M WikibaseLexeme.datatypes.php
M extension.json
M i18n/en.json
M i18n/qqq.json
A resources/experts/Sense.js
A src/PropertyType/SenseIdFormatter.php
6 files changed, 242 insertions(+), 2 deletions(-)


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

diff --git a/WikibaseLexeme.datatypes.php b/WikibaseLexeme.datatypes.php
index 5f140fa..68669de 100644
--- a/WikibaseLexeme.datatypes.php
+++ b/WikibaseLexeme.datatypes.php
@@ -21,6 +21,7 @@
 use Wikibase\Lexeme\DataModel\Lexeme;
 use Wikibase\Lexeme\PropertyType\FormIdFormatter;
 use Wikibase\Lexeme\PropertyType\FormIdParser;
+use Wikibase\Lexeme\PropertyType\SenseIdFormatter;
 use Wikibase\Repo\WikibaseRepo;
 
 return [
@@ -45,4 +46,14 @@
},
'value-type' => 'string',
],
+   'PT:wikibase-lexeme-sense' => [
+   'expert-module' => 'wikibase.experts.Sense',
+   'validator-factory-callback' => function() {
+   return [];
+   },
+   'formatter-factory-callback' => function( $format, 
FormatterOptions $options ) {
+   return new SenseIdFormatter();
+   },
+   'value-type' => 'string',
+   ],
 ];
diff --git a/extension.json b/extension.json
index 62912b6..5199467 100644
--- a/extension.json
+++ b/extension.json
@@ -346,6 +346,15 @@
"wikibase.experts.Entity"
]
},
+   "wikibase.experts.Sense": {
+   "scripts": [
+   "experts/Sense.js"
+   ],
+   "dependencies": [
+   "jquery.valueview.Expert",
+   "wikibase.experts.Entity"
+   ]
+   },
"wikibase.lexeme.styles": {
"position": "top",
"styles": [
diff --git a/i18n/en.json b/i18n/en.json
index 423d1de..42a7abb 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,5 +20,6 @@
"wikibase-lexeme-gloss-empty": "No gloss defined",
"wikibase-lexeme-summary-wbeditentity-update": "Changed a lexeme",
"datatypes-type-wikibase-lexeme": "Lexeme",
-   "datatypes-type-wikibase-lexeme-form": "Lexeme Form"
+   "datatypes-type-wikibase-lexeme-form": "Lexeme Form",
+   "datatypes-type-wikibase-lexeme-sense": "Lexeme Sense"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ba2e92e..0f2a3cc 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -25,5 +25,6 @@
"wikibase-lexeme-gloss-empty": "Placeholder message displayed instead 
of the gloss of the sense in case the gloss in the display language has not 
been specified yet.",
"wikibase-lexeme-summary-wbeditentity-update": "Auto-generated edit 
summary when editing a lexeme",
"datatypes-type-wikibase-lexeme": "The name of a data type for lexemes 
in Wikibase.\n{{Identical|Lexeme}}",
-   "datatypes-type-wikibase-lexeme-form": "The name of a data type for 
lexeme forms in Wikibase."
+   "datatypes-type-wikibase-lexeme-form": "The name of a data type for 
lexeme forms in Wikibase.",
+   "datatypes-type-wikibase-lexeme-sense": "The name of a data type for 
lexeme senses in Wikibase."
 }
diff --git a/resources/experts/Sense.js b/resources/experts/Sense.js
new file mode 100644
index 000..9f54e87
--- /dev/null
+++ b/resources/experts/Sense.js
@@ -0,0 +1,123 @@
+module.exports = ( function ( wb, vv ) {
+   'use strict';
+
+   var PARENT = wb.experts.Entity;
+
+   //Basically, copy-paste of src/PropertyType/SenseIdFormatter.php:18-48
+   //If you change something here, change also there
+   var existingSenses = [
+   new Sense( 'L13', 'hard', 'English adjective', 'S1', 
'presenting difficulty' ),
+   new Sense( 'L13', 'hard', 'English adjective', 'S2', 'resisting 
deformation' ),
+   new Sense( 'L3627', 'difficult', 'English adjective', 'S4', 
'not easy, requiring skill' ),
+   new Sense( 'L283', 'schwierig', 'German adjective', 'S2', 
'complicated' ),
+   new Sense( 'L465', 'dur', 'French adjective', 'S1', 'hard' ),
+   new Sense( 'L801', 'easy', 'English adjective', 'S1', 'not 
difficult' ),
+   new Sense( 'L802', 'simple', 'English adjective', 'S1', 'not 
difficult' ),
+   new 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix wikitext preview in IE and Edge

2017-07-14 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365245 )

Change subject: Fix wikitext preview in IE and Edge
..

Fix wikitext preview in IE and Edge

In Internet Explorer and Edge, NodeList objects do not have the
'forEach' method. However, Array's 'forEach' can be applied to them,
as we do elsewhere in the code.

https://developer.mozilla.org/en-US/docs/Web/API/NodeList/forEach

Bug: T170466
Change-Id: Icb19995e140607d45c47fb6ae8d60ac80b664d02
---
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js 
b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
index 7312479..925f637 100644
--- a/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
+++ b/modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
@@ -185,7 +185,7 @@
if ( docOrMsg instanceof HTMLDocument ) {
body = docOrMsg.body;
// Take a snapshot of all categories
-   body.querySelectorAll( 'link[rel="mw:PageProp/Category"]' 
).forEach( function ( element ) {
+   Array.prototype.forEach.call( body.querySelectorAll( 
'link[rel="mw:PageProp/Category"]' ), function ( element ) {
categories.push( 
ve.dm.MWCategoryMetaItem.static.toDataElement( [ element ] 
).attributes.category );
} );
// Import body to current document, then resolve attributes 
against original document (parseDocument called #fixBase)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb19995e140607d45c47fb6ae8d60ac80b664d02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: updates diff test results for Media links

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

Change subject: Hygiene: updates diff test results for Media links
..


Hygiene: updates diff test results for Media links

Bug: T169293
Change-Id: I3f7d7e7dfdb55a12026e9c6bc2cf5a19bac0f1f5
---
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section4-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section4-text.html
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index b205e80..d80bea7 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -43,7 +43,7 @@
   },
   {
 "id": 4,
-"text": "\nSound\n\n",
+"text": "\nSound\n\n",
 "toclevel": 1,
 "line": "Media",
 "anchor": "Media"
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
index ce2629e..9f797cf 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
@@ -1,2 +1,2 @@
 
-  Sound
+  Sound
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 07cf030..7676792 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -197,7 +197,7 @@
   },
   {
 "id": 4,
-"text": "\nSound\n\n",
+"text": "\nSound\n\n",
 "toclevel": 1,
 "line": "Media",
 "anchor": "Media"
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
index ce2629e..9f797cf 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein/section4-text.html"
@@ -1,2 +1,2 @@
 
-  Sound
+  Sound

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f7d7e7dfdb55a12026e9c6bc2cf5a19bac0f1f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jhernandez 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: VisualEditor: Rollback of change 364988

2017-07-14 Thread ItSpiderman (Code Review)
ItSpiderman has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365244 )

Change subject: VisualEditor: Rollback of change 364988
..

VisualEditor: Rollback of change 364988

Seems that in some special case when mixed with tables, this change also
breaks the text in another way.

Change-Id: Ia45a17875cfeb589719c7bddfd32eebca9a56019
ERM: #6826, #6743
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 7464a03..8ec0ea5 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -1812,7 +1812,7 @@
 
specialTagsList = 
mw.config.get('BsVisualEditorConfigDefault').specialtaglist;
// Tags without innerHTML need /> as end marker. Maybe this 
should be task of a preprocessor, in order to allow mw style tags without /.
-   regex = '<(' + specialTagsList + ')( 
*[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
+   regex = '<(' + specialTagsList + ')( 
[^>]*)*?((\\s\\/>)|(\\/>)|(>([\\S\\s]*?((<\\/\\1>)|(<\\/ \\1>)';
 
matcher = new RegExp(regex, 'gmi');
mtext = text;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Add tracking for cached query results

2017-07-14 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365243 )

Change subject: Add tracking for cached query results
..

Add tracking for cached query results

Knowing how often the constraint checks use cached query results should
help us make a more informed decision about T170672.

Change-Id: I3ce135d03fde2251d83b2555ca867ad9064ae21f
---
M includes/ConstraintCheck/Helper/SparqlHelper.php
1 file changed, 17 insertions(+), 10 deletions(-)


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

diff --git a/includes/ConstraintCheck/Helper/SparqlHelper.php 
b/includes/ConstraintCheck/Helper/SparqlHelper.php
index 11a877b..d73a042 100644
--- a/includes/ConstraintCheck/Helper/SparqlHelper.php
+++ b/includes/ConstraintCheck/Helper/SparqlHelper.php
@@ -3,9 +3,9 @@
 namespace WikibaseQuality\ConstraintReport\ConstraintCheck\Helper;
 
 use Config;
-use Http;
 use IBufferingStatsdDataFactory;
 use MediaWiki\MediaWikiServices;
+use MWHttpRequest;
 use Wikibase\DataModel\Entity\EntityIdParser;
 use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Statement\Statement;
@@ -212,25 +212,32 @@
PHP_QUERY_RFC3986
);
 
+   $options = [
+   'method' => 'GET',
+   'timeout' => (int)round( ( $maxQueryTimeMillis + 1000 ) 
/ 1000 ),
+   'connectTimeout' => 'default',
+   ];
+   $request = MWHttpRequest::factory( $url, $options );
$startTime = microtime( true );
-   $json = Http::get(
-   $url,
-   [
-   'timeout' => (int)round( ( $maxQueryTimeMillis 
+ 1000 ) / 1000 ),
-   ]
-   );
+   $status = $request->execute();
$endTime = microtime( true );
$this->dataFactory->timing(
'wikibase.quality.constraints.sparql.timing',
( $endTime - $startTime ) * 1000
);
 
-   if ( $json === false ) {
+   if ( $request->getResponseHeader( 'X-Cache-Status' ) === 'hit' 
) {
+   $this->dataFactory->increment( 
'wikibase.quality.constraints.sparql.cached' );
+   }
+
+   if ( $status->isOk() ) {
+   $json = $request->getContent();
+   $arr = json_decode( $json, true );
+   return $arr;
+   } else {
$this->dataFactory->increment( 
'wikibase.quality.constraints.sparql.error' );
throw new SparqlHelperException();
}
-   $arr = json_decode( $json, true );
-   return $arr;
}
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ce135d03fde2251d83b2555ca867ad9064ae21f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: DateTimeInputWidget: Ignore wheel when not focused

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

Change subject: DateTimeInputWidget: Ignore wheel when not focused
..

DateTimeInputWidget: Ignore wheel when not focused

Much like I6c9f4679, it's probably best that the widget only use wheel
input when it's focused so it won't accidentally trigger when scrolling
through a form.

Bug: T170607
Change-Id: I46dc3eb01733be939c62e7e7f3f044f21ef1e6d8
---
M resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
1 file changed, 13 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/42/365242/1

diff --git a/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js 
b/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
index e42ab25..9233eef 100644
--- a/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
+++ b/resources/src/mediawiki.widgets.datetime/DateTimeInputWidget.js
@@ -184,6 +184,16 @@
/* Methods */
 
/**
+* Get the currently focused field, if any
+*
+* @private
+* @return {jQuery}
+*/
+   mw.widgets.datetime.DateTimeInputWidget.prototype.getFocusedField = 
function () {
+   return this.$fields.find( 
this.getElementDocument().activeElement );
+   };
+
+   /**
 * Convert a date string to a Date
 *
 * @private
@@ -717,7 +727,7 @@
var delta = 0,
spec = $field.data( 
'mw-widgets-datetime-dateTimeInputWidget-fieldSpec' );
 
-   if ( this.isDisabled() ) {
+   if ( this.isDisabled() || !this.getFocusedField().length ) {
return;
}
 
@@ -803,7 +813,7 @@
 * @inheritdoc
 */
mw.widgets.datetime.DateTimeInputWidget.prototype.focus = function () {
-   if ( !this.$fields.find( document.activeElement ).length ) {
+   if ( !this.getFocusedField().length ) {
this.$fields.find( 
'.mw-widgets-datetime-dateTimeInputWidget-editField' ).first().focus();
}
return this;
@@ -813,7 +823,7 @@
 * @inheritdoc
 */
mw.widgets.datetime.DateTimeInputWidget.prototype.blur = function () {
-   this.$fields.find( document.activeElement ).blur();
+   this.getFocusedField().blur();
return this;
};
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: ShoutBox: usernames with a blank space between didn't work.

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

Change subject: ShoutBox: usernames with a blank space between didn't work.
..


ShoutBox: usernames with a blank space between didn't work.

Fixed issue from ERM#6680

Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
---
M ShoutBox/resources/bluespice.shoutBox.mention.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ShoutBox/resources/bluespice.shoutBox.mention.js 
b/ShoutBox/resources/bluespice.shoutBox.mention.js
index 8cc6802..34e2b8a 100644
--- a/ShoutBox/resources/bluespice.shoutBox.mention.js
+++ b/ShoutBox/resources/bluespice.shoutBox.mention.js
@@ -18,7 +18,7 @@
replace: function ( mention ) {
//put the username in the shoutbox, not the displayname 
for better usage later
var username = mention.match( /\((.*?)\)/ );
-   return '@' + username[1] + ' ';
+   return '@' + username[1].replace(' ', '_') + ' ';
},
getUsers: function () {
$.getJSON( bs.api.makeUrl( 'bs-user-store', { limit: 
999 } ), function ( data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Nasty 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: ShoutBox: usernames with a blank space between didn't work.

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

Change subject: ShoutBox: usernames with a blank space between didn't work.
..


ShoutBox: usernames with a blank space between didn't work.

Fixed issue from ERM#6680

Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
---
M ShoutBox/resources/bluespice.shoutBox.mention.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ShoutBox/resources/bluespice.shoutBox.mention.js 
b/ShoutBox/resources/bluespice.shoutBox.mention.js
index 8cc6802..34e2b8a 100644
--- a/ShoutBox/resources/bluespice.shoutBox.mention.js
+++ b/ShoutBox/resources/bluespice.shoutBox.mention.js
@@ -18,7 +18,7 @@
replace: function ( mention ) {
//put the username in the shoutbox, not the displayname 
for better usage later
var username = mention.match( /\((.*?)\)/ );
-   return '@' + username[1] + ' ';
+   return '@' + username[1].replace(' ', '_') + ' ';
},
getUsers: function () {
$.getJSON( bs.api.makeUrl( 'bs-user-store', { limit: 
999 } ), function ( data ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: ShoutBox: usernames with a blank space between didn't work.

2017-07-14 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365241 )

Change subject: ShoutBox: usernames with a blank space between didn't work.
..

ShoutBox: usernames with a blank space between didn't work.

Fixed issue from ERM#6680

Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
---
M ShoutBox/resources/bluespice.shoutBox.mention.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/ShoutBox/resources/bluespice.shoutBox.mention.js 
b/ShoutBox/resources/bluespice.shoutBox.mention.js
index 8cc6802..34e2b8a 100644
--- a/ShoutBox/resources/bluespice.shoutBox.mention.js
+++ b/ShoutBox/resources/bluespice.shoutBox.mention.js
@@ -18,7 +18,7 @@
replace: function ( mention ) {
//put the username in the shoutbox, not the displayname 
for better usage later
var username = mention.match( /\((.*?)\)/ );
-   return '@' + username[1] + ' ';
+   return '@' + username[1].replace(' ', '_') + ' ';
},
getUsers: function () {
$.getJSON( bs.api.makeUrl( 'bs-user-store', { limit: 
999 } ), function ( data ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Nasty 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: use blackbox-exporter package from Debian

2017-07-14 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365239 )

Change subject: prometheus: use blackbox-exporter package from Debian
..

prometheus: use blackbox-exporter package from Debian

Drop our custom systemd unit in favour of the standard one shipped by Debian
package. In the past we used to have a custom package for blackbox-exporter.
Also adjust the configuration path.

Bug: T169860
Change-Id: Id5238f79af0ca8b1010e28d54082fa07f543581f
---
M modules/prometheus/manifests/blackbox_exporter.pp
D 
modules/prometheus/templates/initscripts/prometheus-blackbox-exporter.systemd.erb
2 files changed, 1 insertion(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/39/365239/1

diff --git a/modules/prometheus/manifests/blackbox_exporter.pp 
b/modules/prometheus/manifests/blackbox_exporter.pp
index fa7446f..de34c60 100644
--- a/modules/prometheus/manifests/blackbox_exporter.pp
+++ b/modules/prometheus/manifests/blackbox_exporter.pp
@@ -9,19 +9,12 @@
 
 require_package('prometheus-blackbox-exporter')
 
-file { '/etc/prometheus-blackbox_exporter.yml':
+file { '/etc/prometheus/blackbox.yml':
 ensure  => present,
 mode=> '0444',
 owner   => 'root',
 group   => 'root',
 content => template('prometheus/blackbox_exporter.yml.erb'),
 notify  => Service['prometheus-blackbox-exporter'],
-}
-
-base::service_unit { 'prometheus-blackbox-exporter':
-ensure  => present,
-refresh => true,
-systemd => true,
-require => Package['prometheus-blackbox-exporter'],
 }
 }
diff --git 
a/modules/prometheus/templates/initscripts/prometheus-blackbox-exporter.systemd.erb
 
b/modules/prometheus/templates/initscripts/prometheus-blackbox-exporter.systemd.erb
deleted file mode 100644
index 2f35925..000
--- 
a/modules/prometheus/templates/initscripts/prometheus-blackbox-exporter.systemd.erb
+++ /dev/null
@@ -1,7 +0,0 @@
-[Unit]
-Description=prometheus-blackbox-exporter
-
-[Service]
-User=prometheus
-ExecStart=/usr/bin/blackbox_exporter -config.file 
/etc/prometheus-blackbox_exporter.yml
-Restart=on-failure

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Remove unnecessary whitespace in Flow.namespaces.php

2017-07-14 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365238 )

Change subject: Remove unnecessary whitespace in Flow.namespaces.php
..

Remove unnecessary whitespace in Flow.namespaces.php

Change-Id: Iebc7934494855a9530690d13e1d72007daeaa82b
---
M Flow.namespaces.php
1 file changed, 37 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/38/365238/1

diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index bb5969b..3e6b55a 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -11,7 +11,7 @@
 
 /** English */
 $namespaceNames['en'] = [
-   NS_TOPIC =>  'Topic',
+   NS_TOPIC => 'Topic',
 ];
 
 /** Arabic */
@@ -21,72 +21,72 @@
 
 /** Asturian */
 $namespaceNames['ast'] = [
-   NS_TOPIC =>  'Asuntu',
+   NS_TOPIC => 'Asuntu',
 ];
 
 /** South Azerbaijani */
 $namespaceNames['azb'] = [
-   NS_TOPIC =>  'مبحث',
+   NS_TOPIC => 'مبحث',
 ];
 
 /** Western Balochi */
 $namespaceNames['bgn'] = [
-   NS_TOPIC =>  'سر_ئو_بُن',
+   NS_TOPIC => 'سر_ئو_بُن',
 ];
 
 /** Bengali */
 $namespaceNames['bn'] = [
-   NS_TOPIC =>  'প্রসঙ্গ',
+   NS_TOPIC => 'প্রসঙ্গ',
 ];
 
 /** Catalan */
 $namespaceNames['ca'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Central Kurdish */
 $namespaceNames['ckb'] = [
-   NS_TOPIC =>  'بابه‌ت',
+   NS_TOPIC => 'بابه‌ت',
 ];
 
 /** German */
 $namespaceNames['de'] = [
-   NS_TOPIC =>  'Thema',
+   NS_TOPIC => 'Thema',
 ];
 
 /** Dinka */
 $namespaceNames['din'] = [
-   NS_TOPIC =>  'Këjamic',
+   NS_TOPIC => 'Këjamic',
 ];
 
 /** Zazaki */
 $namespaceNames['diq'] = [
-   NS_TOPIC =>  'Mewzu',
+   NS_TOPIC => 'Mewzu',
 ];
 
 /** Spanish */
 $namespaceNames['es'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Estonian */
 $namespaceNames['et'] = [
-   NS_TOPIC =>  'Teema',
+   NS_TOPIC => 'Teema',
 ];
 
 /** Persian */
 $namespaceNames['fa'] = [
-   NS_TOPIC =>  'مبحث',
+   NS_TOPIC => 'مبحث',
 ];
 
 /** Finnish */
 $namespaceNames['fi'] = [
-   NS_TOPIC =>  'Aihe',
+   NS_TOPIC => 'Aihe',
 ];
 
 /** French */
 $namespaceNames['fr'] = [
-   NS_TOPIC =>  'Sujet',
+   NS_TOPIC => 'Sujet',
 ];
 
 $namespaceNames['gom'] = [
@@ -95,12 +95,12 @@
 
 /** Hebrew */
 $namespaceNames['he'] = [
-   NS_TOPIC =>  'נושא',
+   NS_TOPIC => 'נושא',
 ];
 
 /** Hungarian */
 $namespaceNames['hu'] = [
-   NS_TOPIC =>  'Téma',
+   NS_TOPIC => 'Téma',
 ];
 
 /** Indonesian */
@@ -110,7 +110,7 @@
 
 /** Italian */
 $namespaceNames['it'] = [
-   NS_TOPIC =>  'Argomento',
+   NS_TOPIC => 'Argomento',
 ];
 
 /** Korean */
@@ -120,95 +120,95 @@
 
 /** Luxembourgish */
 $namespaceNames['lb'] = [
-   NS_TOPIC =>  'Thema',
+   NS_TOPIC => 'Thema',
 ];
 
 /** Northern Luri */
 $namespaceNames['lrc'] = [
-   NS_TOPIC =>  'گأپئسئن',
+   NS_TOPIC => 'گأپئسئن',
 ];
 
 /** Latvian */
 $namespaceNames['lv'] = [
-   NS_TOPIC =>  'Tēma',
+   NS_TOPIC => 'Tēma',
 ];
 
 /** Macedonian */
 $namespaceNames['mk'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Mazandarani */
 $namespaceNames['mzn'] = [
-   NS_TOPIC =>  'تاپیک',
+   NS_TOPIC => 'تاپیک',
 ];
 
 /** Norwegian Bokmål (norsk bokmål) */
 $namespaceNames['nb'] = [
-   NS_TOPIC =>  'Sak',
+   NS_TOPIC => 'Sak',
 ];
 
 /** Dutch */
 $namespaceNames['nl'] = [
-   NS_TOPIC =>  'Onderwerp',
+   NS_TOPIC => 'Onderwerp',
 ];
 
 /** Occitan */
 $namespaceNames['oc'] = [
-   NS_TOPIC =>  'Subjècte',
+   NS_TOPIC => 'Subjècte',
 ];
 
 /** Orya */
 $namespaceNames['or'] = [
-   NS_TOPIC =>  'ବିଷୟ',
+   NS_TOPIC => 'ବିଷୟ',
 ];
 
 /** Polish */
 $namespaceNames['pl'] = [
-   NS_TOPIC =>  'Wątek',
+   NS_TOPIC => 'Wątek',
 ];
 
 /** Western Punjabi */
 $namespaceNames['pnb'] = [
-   NS_TOPIC =>  'موضوع',
+   NS_TOPIC => 'موضوع',
 ];
 
 /** Portuguese */
 $namespaceNames['pt'] = [
-   NS_TOPIC =>  'Tópico',
+   NS_TOPIC => 'Tópico',
 ];
 
 /** Russian */
 $namespaceNames['ru'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Slovenian */
 $namespaceNames['sl'] = [
-   NS_TOPIC =>  'Tema',
+   NS_TOPIC => 'Tema',
 ];
 
 /** Swedish */
 $namespaceNames['sv'] = [
-   NS_TOPIC =>  'Ämne',
+   NS_TOPIC => 'Ämne',
 ];
 
 /** Ukrainian */
 $namespaceNames['uk'] = [
-   NS_TOPIC =>  'Тема',
+   NS_TOPIC => 'Тема',
 ];
 
 /** Urdu */
 $namespaceNames['ur'] = [
-   NS_TOPIC =>  'موضوع',
+   NS_TOPIC => 'موضوع',
 ];
 
 /** Vietnamese */
 $namespaceNames['vi'] = [
-   NS_TOPIC =>  'Đề_tài',
+   NS_TOPIC => 'Đề_tài',
 ];
 
 /** Yiddish */
 $namespaceNames['yi'] = [
-   NS_TOPIC =>  'טעמע',
+   NS_TOPIC => 'טעמע',
 ];

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

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Add namespace name translation for Dinka

2017-07-14 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365237 )

Change subject: Add namespace name translation for Dinka
..

Add namespace name translation for Dinka

Change-Id: I12e9dd703820ef3c8dd6d1897caf51cc1b40b61c
---
M Flow.namespaces.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/Flow.namespaces.php b/Flow.namespaces.php
index 2754310..bb5969b 100644
--- a/Flow.namespaces.php
+++ b/Flow.namespaces.php
@@ -54,6 +54,11 @@
NS_TOPIC =>  'Thema',
 ];
 
+/** Dinka */
+$namespaceNames['din'] = [
+   NS_TOPIC =>  'Këjamic',
+];
+
 /** Zazaki */
 $namespaceNames['diq'] = [
NS_TOPIC =>  'Mewzu',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12e9dd703820ef3c8dd6d1897caf51cc1b40b61c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: prometheus: additional blackbox checks

2017-07-14 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365240 )

Change subject: prometheus: additional blackbox checks
..

prometheus: additional blackbox checks

Modeled after the current checks in shinken for labs

Bug: T169860
Change-Id: I31d086f54459a7a47ff02097c2dec1f50c9d693f
---
M modules/prometheus/templates/blackbox_exporter.yml.erb
1 file changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/40/365240/1

diff --git a/modules/prometheus/templates/blackbox_exporter.yml.erb 
b/modules/prometheus/templates/blackbox_exporter.yml.erb
index 55b6d5a..73e255d 100644
--- a/modules/prometheus/templates/blackbox_exporter.yml.erb
+++ b/modules/prometheus/templates/blackbox_exporter.yml.erb
@@ -11,3 +11,40 @@
   icmp:
 prober: icmp
 timeout: 5s
+  http_connect:
+prober: http
+timeout: 5s
+http:
+  preferred_ip_protocol: "ip4"
+  no_follow_redirects: false
+  fail_if_ssl: true
+  https_connect:
+prober: http
+timeout: 5s
+http:
+  preferred_ip_protocol: "ip4"
+  no_follow_redirects: false
+  fail_if_not_ssl: true
+  tls_config:
+insecure_skip_verify: false
+  # Check for a MediaWiki page, hosted by WMF
+  https_mediawiki:
+prober: http
+timeout: 5s
+http:
+  preferred_ip_protocol: "ip4"
+  no_follow_redirects: false
+  fail_if_not_ssl: true
+  fail_if_not_matches_regexp:
+- 'href="https://(m\.)?wikimediafoundation.org/wiki/Terms_of_Use"'
+  tls_config:
+insecure_skip_verify: false
+  # Mimick check_http_url_at_address_for_string!tools.wmflabs.org!/!Magnus
+  http_tools:
+prober: http
+timeout: 5s
+http:
+  preferred_ip_protocol: "ip4"
+  no_follow_redirects: false
+  fail_if_not_matches_regexp:
+- 'Magnus'

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

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

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


[MediaWiki-commits] [Gerrit] analytics/reportupdater-queries[master]: Add "desktop by browser" tab to browser reports

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

Change subject: Add "desktop by browser" tab to browser reports
..


Add "desktop by browser" tab to browser reports

Reports will populate since data is available

Bug: T170286
Change-Id: Ic4990bc1da8271247a967d6d5e0397ecaaef4816
---
M browser/config.yaml
A browser/desktop_site_by_browser_family_and_major_percent
A browser/desktop_site_by_browser_family_percent
3 files changed, 74 insertions(+), 0 deletions(-)

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



diff --git a/browser/config.yaml b/browser/config.yaml
index def5647..26985fa 100644
--- a/browser/config.yaml
+++ b/browser/config.yaml
@@ -113,3 +113,17 @@
 granularity: weeks
 starts: 2015-06-07
 lag: 86400 # wait 1 day to compute last week
+
+desktop_site_by_browser_family_and_major_percent:
+type: script
+granularity: weeks
+funnel: true
+starts: 2015-06-07
+lag: 86400 # wait 1 day to compute last week
+
+desktop_site_by_browser_family_percent:
+type: script
+granularity: weeks
+starts: 2015-06-07
+lag: 86400 # wait 1 day to compute last week
+
diff --git a/browser/desktop_site_by_browser_family_and_major_percent 
b/browser/desktop_site_by_browser_family_and_major_percent
new file mode 100755
index 000..77c43a3
--- /dev/null
+++ b/browser/desktop_site_by_browser_family_and_major_percent
@@ -0,0 +1,31 @@
+#!/bin/bash
+hive -e "
+SET hive.mapred.mode = nonstrict;
+WITH
+slice AS (
+SELECT *
+FROM wmf.browser_general
+WHERE
+access_method = 'desktop' AND
+CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) 
>= '$1' AND
+CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) 
< '$2'
+),
+total AS (
+SELECT SUM(view_count) as view_count_total
+FROM slice
+)
+SELECT
+'$1' AS date,
+browser_family,
+browser_major,
+SUM(view_count) / view_count_total AS percent
+FROM slice JOIN total
+GROUP BY
+'$1',
+browser_family,
+browser_major,
+view_count_total
+ORDER BY percent DESC
+LIMIT 1000
+;
+" 2> /dev/null | grep -v parquet.hadoop
diff --git a/browser/desktop_site_by_browser_family_percent 
b/browser/desktop_site_by_browser_family_percent
new file mode 100755
index 000..e722d35
--- /dev/null
+++ b/browser/desktop_site_by_browser_family_percent
@@ -0,0 +1,29 @@
+#!/bin/bash
+hive -e "
+SET hive.mapred.mode = nonstrict;
+WITH
+slice AS (
+SELECT *
+FROM wmf.browser_general
+WHERE
+access_method = 'desktop' AND
+CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) 
>= '$1' AND
+CONCAT(year, '-', LPAD(month, 2, '0'), '-', LPAD(day, 2, '0')) 
< '$2'
+),
+total AS (
+SELECT SUM(view_count) as view_count_total
+FROM slice
+)
+SELECT
+'$1' AS date,
+browser_family,
+SUM(view_count) / view_count_total AS percent
+FROM slice JOIN total
+GROUP BY
+'$1',
+browser_family,
+view_count_total
+ORDER BY percent DESC
+LIMIT 1000
+;
+" 2> /dev/null | grep -v parquet.hadoop | python $3/dynamic_pivot.py

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4990bc1da8271247a967d6d5e0397ecaaef4816
Gerrit-PatchSet: 5
Gerrit-Project: analytics/reportupdater-queries
Gerrit-Branch: master
Gerrit-Owner: Nuria 
Gerrit-Reviewer: Mforns 
Gerrit-Reviewer: Milimetric 
Gerrit-Reviewer: Nuria 

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Basic Unit Tests for Quiz Extension

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

Change subject: Basic Unit Tests for Quiz Extension
..


Basic Unit Tests for Quiz Extension

Initial tests class for Quiz.class.php and Question.php is added.

Bug:T159691
Change-Id: Ide874476812dba70c1d2a56aa8a27dfbb99f
---
M Question.php
M Quiz.class.php
A tests/phpunit/QuestionTest.php
A tests/phpunit/QuizTest.php
4 files changed, 301 insertions(+), 5 deletions(-)

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



diff --git a/Question.php b/Question.php
index c73a33d..9065c3f 100644
--- a/Question.php
+++ b/Question.php
@@ -80,9 +80,10 @@
);
$splitHeaderPattern = '`\n\|\|`';
$unparsedHeader = preg_split( $splitHeaderPattern, $input );
-$output = $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[0] ) . "\n" );
+$output = $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[0] ) );
if ( array_key_exists( 1, $unparsedHeader ) && 
$this->mBeingCorrected ) {
-$output .= '';
+   $output .="\n";
+   $output .= '';
$output .= '';
$output .= $this->mParser->recursiveTagParse( trim( 
$unparsedHeader[1] ) );
$output .= '';
@@ -326,7 +327,6 @@
$this->mProposalPattern .= '([+-])? ?';
}
}
-   $output .= '';
$output .= '' . "\n";
$this->mProposalPattern .= '(.*)`';
return $output;
@@ -509,7 +509,6 @@
}
}
$name = $wqInputId;
-
$temp = $templateParser->processTemplate(
'Answer',
[
diff --git a/Quiz.class.php b/Quiz.class.php
index 0a1aadd..0a43cfa 100644
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -26,7 +26,7 @@
$this->mParser = $parser;
$this->mRequest = &$wgRequest;
// Allot a unique identifier to the quiz.
-   $this->mQuizId = self::$sQuizId;
+   $this->mQuizId = $this->getQuizId();
self::$sQuizId++;
// Reset the unique identifier of the questions.
$this->mQuestionId = 0;
@@ -95,6 +95,13 @@
}
 
/**
+* @return int Quiz Id
+*/
+   public function getQuizId() {
+   return self::$sQuizId;
+   }
+
+   /**
 * Accessor for the color array
 * Displays an error message if the colorId doesn't exists.
 *
diff --git a/tests/phpunit/QuestionTest.php b/tests/phpunit/QuestionTest.php
new file mode 100644
index 000..1761954
--- /dev/null
+++ b/tests/phpunit/QuestionTest.php
@@ -0,0 +1,234 @@
+getParser();
+   $title = $wgParser->getTitle();
+   $this->parser = &$wgParser;
+   $this->parser->startExternalParse( $title, $options, 'text', 
true );
+   }
+
+   protected function tearDown() {
+   parent::tearDown();
+   unset( $this->parser );
+   }
+
+   private function getParser() {
+   return new StubObject(
+   'wgParser', $GLOBALS['wgParserConf']['class'],
+   [ $GLOBALS['wgParserConf'] ]
+   );
+   }
+
+   private function getQuestion( $beingCorrected, $caseSensitive, 
$questionId ) {
+   return new Question( $beingCorrected, $caseSensitive, 
$questionId, $this->parser );
+   }
+
+   private function getRequest() {
+   global $wgRequest;
+   return $wgRequest;
+   }
+   public function testGetState() {
+   $this->question = $this->getQuestion( 1, 1, 2 );
+   $state = $this->question->getState();
+   $this->assertThat(
+   $state,
+   $this->logicalOr(
+   $this->equalTo( 'right' ),
+   $this->equalTo( 'error' ),
+   $this->equalTo( 'NA' ),
+   $this->equalTo( 'wrong' )
+   )
+   );
+   }
+
+   public function provideSetState() {
+   return [
+   [ 'NA', 'error', 'error' ],
+   [ 'NA', 'na_wrong', 'na_wrong' ],
+   [ 'na_right', 'na_wrong', 'na_wrong' ],
+   [ 'na_wrong', 'na_right', 'na_wrong' ],
+   [ 'right', 'na_wrong', 'wrong' ],
+   [ 'na_wrong', 'right', 'wrong' ],
+   [ 'error', 'na_wrong', 'error' ]
+   ];
+   }
+
+   /**
+* @dataProvider 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Scroll to top on view switch

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

Change subject: RCFilters: Scroll to top on view switch
..


RCFilters: Scroll to top on view switch

Bug: T170651
Change-Id: I07376569397651ebee0815c1e1d6e945ef1704dc
---
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
index 2bb0fdf..64b9ac9 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
@@ -210,6 +210,7 @@
.addClass( 
'mw-rcfilters-ui-menuSelectWidget-view-' + viewName );
 
this.currentView = viewName;
+   this.scrollToTop();
this.clip();
}
};

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07376569397651ebee0815c1e1d6e945ef1704dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Rename incorrectly named Api\SetAliases and Api\SetDescripti...

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

Change subject: Rename incorrectly named Api\SetAliases and Api\SetDescription 
tests
..


Rename incorrectly named Api\SetAliases and Api\SetDescription tests

Change-Id: I4ad64c53875a82980e0c441681f9fca88f04c1ec
---
M repo/tests/phpunit/includes/Api/SetAliasesTest.php
M repo/tests/phpunit/includes/Api/SetDescriptionTest.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/Api/SetAliasesTest.php 
b/repo/tests/phpunit/includes/Api/SetAliasesTest.php
index a7ce46a..c64df6a 100644
--- a/repo/tests/phpunit/includes/Api/SetAliasesTest.php
+++ b/repo/tests/phpunit/includes/Api/SetAliasesTest.php
@@ -258,7 +258,7 @@
$this->doTestSetTermExceptions( $params, $expected );
}
 
-   public function testUserCanEditWhenTheyHaveSufficientPermission() {
+   public function testUserCanSetAliasesWhenTheyHaveSufficientPermission() 
{
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
$this->setMwGlobals( 'wgGroupPermissions', [
@@ -277,7 +277,7 @@
$this->assertEquals( 1, $result['success'] );
}
 
-   public function testUserCannotSetLabelWhenTheyLackPermission() {
+   public function testUserCannotSetAliasesWhenTheyLackPermission() {
$userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
diff --git a/repo/tests/phpunit/includes/Api/SetDescriptionTest.php 
b/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
index 319067a..99e8998 100644
--- a/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
+++ b/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
@@ -53,7 +53,7 @@
self::doTestSetTermExceptions( $params, $expected );
}
 
-   public function testUserCanEditWhenTheyHaveSufficientPermission() {
+   public function 
testUserCanSetDescriptionWhenTheyHaveSufficientPermission() {
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
$this->setMwGlobals( 'wgGroupPermissions', [
@@ -72,7 +72,7 @@
$this->assertEquals( 1, $result['success'] );
}
 
-   public function testUserCannotSetLabelWhenTheyLackPermission() {
+   public function testUserCannotSetDescriptionWhenTheyLackPermission() {
$userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ad64c53875a82980e0c441681f9fca88f04c1ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add permission-related tests to Api\SetSiteLink tests

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

Change subject: Add permission-related tests to Api\SetSiteLink tests
..


Add permission-related tests to Api\SetSiteLink tests

Change-Id: Icb082d061ca35a71f9e8c816db385b16db893e9a
---
M repo/tests/phpunit/includes/Api/SetSiteLinkTest.php
1 file changed, 73 insertions(+), 0 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/Api/SetSiteLinkTest.php 
b/repo/tests/phpunit/includes/Api/SetSiteLinkTest.php
index a4e7beb..4ae4ecd 100644
--- a/repo/tests/phpunit/includes/Api/SetSiteLinkTest.php
+++ b/repo/tests/phpunit/includes/Api/SetSiteLinkTest.php
@@ -3,6 +3,7 @@
 namespace Wikibase\Repo\Tests\Api;
 
 use ApiUsageException;
+use User;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Repo\WikibaseRepo;
@@ -564,4 +565,76 @@
$this->assertContains( 'Unrecognized value for parameter 
"badges"', $warning );
}
 
+   public function 
testUserCanSetSiteLinkWhenTheyHaveSufficientPermission() {
+   $userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
+
+   $this->setMwGlobals( 'wgGroupPermissions', [
+   'all-permission' => [ 'edit' => true, ],
+   '*' => [ 'read' => true, 'writeapi' => true ]
+   ] );
+
+   $newItem = $this->createItemUsing( $userWithAllPermissions );
+
+   list ( $result, ) = $this->doApiRequestWithToken(
+   $this->getSetSiteLinkRequestParams( $newItem->getId() ),
+   null,
+   $userWithAllPermissions
+   );
+
+   $this->assertEquals( 1, $result['success'] );
+   }
+
+   public function testUserCannotSetSiteLinkWhenTheyLackPermission() {
+   $userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
+   $userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
+
+   $this->setMwGlobals( 'wgGroupPermissions', [
+   'no-permission' => [ 'edit' => false ],
+   'all-permission' => [ 'edit' => true, ],
+   '*' => [ 'read' => true, 'writeapi' => true ]
+   ] );
+
+   // And an item
+   $newItem = $this->createItemUsing( $userWithAllPermissions );
+
+   // Then the request is denied
+   $expected = [
+   'type' => ApiUsageException::class,
+   'code' => 'permissiondenied'
+   ];
+
+   $this->doTestQueryExceptions(
+   $this->getSetSiteLinkRequestParams( $newItem->getId() ),
+   $expected,
+   $userWithInsufficientPermissions
+   );
+   }
+
+   /**
+* @param User $user
+* @return Item
+*/
+   private function createItemUsing( User $user ) {
+   $store = WikibaseRepo::getDefaultInstance()->getEntityStore();
+
+   $itemRevision = $store->saveEntity( new Item(), 
'SetSiteLinkTest', $user, EDIT_NEW );
+   return $itemRevision->getEntity();
+   }
+
+   private function createUserWithGroup( $groupName ) {
+   $user = $this->createTestUser()->getUser();
+   $user->addGroup( $groupName );
+   return $user;
+
+   }
+
+   private function getSetSiteLinkRequestParams( ItemId $id ) {
+   return [
+   'action' => 'wbsetsitelink',
+   'id' => $id->getSerialization(),
+   'linksite' => 'enwiki',
+   'linktitle' => 'Come Cool Page',
+   ];
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb082d061ca35a71f9e8c816db385b16db893e9a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: Adaptation code in cxserver and provide adaptation API - fra...

2017-07-14 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365236 )

Change subject: Adaptation code in cxserver and provide adaptation API - 
framework
..

Adaptation code in cxserver and provide adaptation API - framework

This provides basic framwork for the adaptation of content including
machine translation. Real adaptation is to be done in follow up
commits.

A new api /translate/from/to is defined. That will provide machine
translation, adaptation of translation units. This output will be
readily usable in a target wiki domain. Previously with cxserver,
client side processing, adaptation was required to make the content
usable in target language wiki.

Bug: T170674
Change-Id: I92dba54620ba1be15c3fa3c89f7cf0888c9287ba
---
M .eslintrc.json
A lib/Adapter.js
M lib/lineardoc/Doc.js
M lib/lineardoc/TextBlock.js
M lib/routes/v1.js
A lib/translationunits/MWLink.js
A lib/translationunits/TranslationUnit.js
A lib/translationunits/index.js
M lib/util.js
M spec.yaml
A test/adaptation/AdaptationTest.js
A test/adaptation/AdaptationTests.json
12 files changed, 365 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver 
refs/changes/36/365236/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 1cc15b0..dbb2dc5 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,6 +1,7 @@
 {
"extends": "wikimedia",
"env": {
+   "es6": true,
"browser": true,
"jquery": true,
"qunit": true,
diff --git a/lib/Adapter.js b/lib/Adapter.js
new file mode 100644
index 000..5535800
--- /dev/null
+++ b/lib/Adapter.js
@@ -0,0 +1,52 @@
+'use strict';
+
+var LinearDoc = require( './lineardoc' );
+
+function Adapter( sourceLanguage, targetLanguage, context ) {
+   this.parser = new LinearDoc.Parser();
+   this.parser.init();
+   this.sourceLanguage = sourceLanguage;
+   this.targetLanguage = targetLanguage;
+   this.originalDoc = null;
+   this.adaptedDoc = null;
+   this.context = context;
+   this.logger = context.logger;
+}
+
+Adapter.prototype.adapt = function ( content ) {
+   this.parser.write( content );
+   this.originalDoc = this.parser.builder.doc;
+   return this.originalDoc.adapt( this.getAdapter.bind( this ) );
+};
+
+/**
+ * Get the adapter for the given tag(translation unit).
+ * @param {Object} element
+ * @return {Object} translationUnit
+ */
+Adapter.prototype.getAdapter = function ( element ) {
+   var name, match = false, translationUnit, translationUnits;
+
+   translationUnits = require( __dirname + '/translationunits/' );
+   for ( name in translationUnits ) {
+   translationUnit = translationUnits[ name ];
+   if ( translationUnit.matchTagNames ) {
+   match = translationUnit.matchTagNames.includes( 
element.name );
+   }
+   if ( translationUnit.matchRdfaTypes ) {
+   match = translationUnit.matchRdfaTypes.includes( 
element.attributes.rel ) || translationUnit.matchRdfaTypes.includes( 
element.attributes.typeof );
+   }
+   if ( match ) {
+   break;
+   }
+   }
+
+   if ( !match ) {
+   // this.logger.log( 'debug', 'No adapter for ' + element.name );
+   return null;
+   }
+
+   return new translationUnits[ name ]( element, this.sourceLanguage, 
this.targetLanguage, this.context );
+};
+
+module.exports = Adapter;
diff --git a/lib/lineardoc/Doc.js b/lib/lineardoc/Doc.js
index a5d1661..87b153d 100644
--- a/lib/lineardoc/Doc.js
+++ b/lib/lineardoc/Doc.js
@@ -1,6 +1,7 @@
 'use strict';
 
 var Utils = require( './Utils.js' ),
+   cxutil = require( './../util.js' ),
crypto = require( 'crypto' );
 
 /**
@@ -251,4 +252,48 @@
return segments;
 };
 
+/**
+ * Segment the document into sentences
+ *
+ * @method
+ * @param {Function} getAdapter Function taking a tag, returning adapted output
+ * @return {Doc} Segmented version of document TODO: warning: *shallow copied*.
+ */
+Doc.prototype.adapt = cxutil.async( function* ( getAdapter ) {
+   var i, len, item, tag, textBlock, adapter,
+   newDoc = new Doc();
+
+   if ( this.wrapperTag ) {
+   adapter = getAdapter( this.wrapperTag );
+   if ( adapter ) {
+   newDoc = new Doc( yield adapter.adapt() );
+   }
+   }
+   for ( i = 0, len = this.items.length; i < len; i++ ) {
+   item = this.items[ i ];
+   if ( this.items[ i ].type === 'open' ) {
+   tag = Utils.cloneOpenTag( item.item );
+   if ( i + 1 < len && this.items[ i + 1 ].type === 
'textblock' ) {
+   tag.children = this.items[ i + 1 ].item;
+   }
+

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: ShoutBox: usernames with a blank space between didn't work.

2017-07-14 Thread Nasty (Code Review)
Nasty has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365235 )

Change subject: ShoutBox: usernames with a blank space between didn't work.
..

ShoutBox: usernames with a blank space between didn't work.

Fixed issue from ERM#6680

Change-Id: Ib4d0bcb5a2566866ddd6a9230434ac0f6f2c8687
---
M ShoutBox/resources/bluespice.shoutBox.mention.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/ShoutBox/resources/bluespice.shoutBox.mention.js 
b/ShoutBox/resources/bluespice.shoutBox.mention.js
index 8cc6802..34e2b8a 100644
--- a/ShoutBox/resources/bluespice.shoutBox.mention.js
+++ b/ShoutBox/resources/bluespice.shoutBox.mention.js
@@ -18,7 +18,7 @@
replace: function ( mention ) {
//put the username in the shoutbox, not the displayname 
for better usage later
var username = mention.match( /\((.*?)\)/ );
-   return '@' + username[1] + ' ';
+   return '@' + username[1].replace(' ', '_') + ' ';
},
getUsers: function () {
$.getJSON( bs.api.makeUrl( 'bs-user-store', { limit: 
999 } ), function ( data ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RC Filters: combine user registration and experience level f...

2017-07-14 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365234 )

Change subject: RC Filters: combine user registration and experience level 
filters
..

RC Filters: combine user registration and experience level filters

Add 'registered' and 'unregistered' filters to
user experience group.

Keep minimal definitions of user registration to
support hideanons and hideliu for no-js and
users who are not using ERI filters.

Reword all user exprience levels description according
to the phab task.

Bug: T165160
Change-Id: Ie6b1795d7cbdb1692f8eeb13db7afb89ea4e5bbc
---
M includes/specialpage/ChangesListSpecialPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/specialpage/ChangesListSpecialPageTest.php
4 files changed, 180 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/365234/1

diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 8c4cc11..fdea48d 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -85,8 +85,6 @@
'filters' => [
[
'name' => 'hideliu',
-   'label' => 
'rcfilters-filter-registered-label',
-   'description' => 
'rcfilters-filter-registered-description',
// rcshowhideliu-show, 
rcshowhideliu-hide,
// wlshowhideliu
'showHideSuffix' => 
'showhideliu',
@@ -96,16 +94,11 @@
) {
$conds[] = 'rc_user = 
0';
},
-   'cssClassSuffix' => 'liu',
-   'isRowApplicableCallable' => 
function ( $ctx, $rc ) {
-   return 
$rc->getAttribute( 'rc_user' );
-   },
+   'isReplacedInStructuredUi' => 
true,
 
],
[
'name' => 'hideanons',
-   'label' => 
'rcfilters-filter-unregistered-label',
-   'description' => 
'rcfilters-filter-unregistered-description',
// rcshowhideanons-show, 
rcshowhideanons-hide,
// wlshowhideanons
'showHideSuffix' => 
'showhideanons',
@@ -115,10 +108,7 @@
) {
$conds[] = 'rc_user != 
0';
},
-   'cssClassSuffix' => 'anon',
-   'isRowApplicableCallable' => 
function ( $ctx, $rc ) {
-   return 
!$rc->getAttribute( 'rc_user' );
-   },
+   'isReplacedInStructuredUi' => 
true,
]
],
],
@@ -128,8 +118,26 @@
'title' => 'rcfilters-filtergroup-userExpLevel',
'class' => 
ChangesListStringOptionsFilterGroup::class,
// Excludes unregistered users
-   'isFullCoverage' => false,
+   'isFullCoverage' => true,
'filters' => [
+   [
+   'name' => 'unregistered',
+   'label' => 
'rcfilters-filter-user-experience-level-unregistered-label',
+   'description' => 
'rcfilters-filter-user-experience-level-unregistered-description',
+   'cssClassSuffix' => 
'user-unregistered',
+   'isRowApplicableCallable' => 
function ( $ctx, $rc ) {
+   return 
!$rc->getAttribute( 'rc_user' );
+   }
+   ],
+ 

[MediaWiki-commits] [Gerrit] mediawiki...FileImporter[master]: Add stylelint checks, bump banana version and fix issues

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

Change subject: Add stylelint checks, bump banana version and fix issues
..


Add stylelint checks, bump banana version and fix issues

- default in our projects is using tabs in CSS, did that

Change-Id: I80ecffc31e55b86ecd4cd9c4738911bca83c4166
---
A .stylelintrc
M Gruntfile.js
M modules/ext.FileImporter.Special.css
M package.json
4 files changed, 38 insertions(+), 25 deletions(-)

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



diff --git a/.stylelintrc b/.stylelintrc
new file mode 100644
index 000..2c90730
--- /dev/null
+++ b/.stylelintrc
@@ -0,0 +1,3 @@
+{
+   "extends": "stylelint-config-wikimedia"
+}
diff --git a/Gruntfile.js b/Gruntfile.js
index bc7fca9..d2ee5a2 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,6 +1,7 @@
 /*jshint node:true */
 module.exports = function ( grunt ) {
grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.loadNpmTasks( 'grunt-banana-checker' );
 
var conf = grunt.file.readJSON( 'extension.json' );
@@ -12,9 +13,16 @@
'!node_modules/**',
'!vendor/**'
]
+   },
+   stylelint: {
+   all: [
+   '**/*.css',
+   '!node_modules/**',
+   '!vendor/**'
+   ]
}
} );
 
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'test', [ 'jsonlint', 'stylelint', 'banana' ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/modules/ext.FileImporter.Special.css 
b/modules/ext.FileImporter.Special.css
index e75b48f..446fc41 100644
--- a/modules/ext.FileImporter.Special.css
+++ b/modules/ext.FileImporter.Special.css
@@ -1,45 +1,45 @@
 .mw-fileimporter-url-text {
-margin-bottom: 14px;
+   margin-bottom: 14px;
 }
 
 .mw-importfile-import-summary {
-margin-bottom: 14px;
+   margin-bottom: 14px;
 }
 
 .mw-importfile-import-newtitle {
-margin-bottom: 14px;
+   margin-bottom: 14px;
 }
 
 .mw-importfile-parsedContent {
-background-color: #f8f9fa;
-border: 1px solid #c8ccd1;
-padding: 1em 1em 1.5em 1em;
+   background-color: #f8f9fa;
+   border: 1px solid #c8ccd1;
+   padding: 1em 1em 1.5em 1em;
 }
 
 .mw-importfile-importOptions {
-background-color: #f8f9fa;
-border: 1px solid #c8ccd1;
-padding: 1em 1em 1.5em 1em;
+   background-color: #f8f9fa;
+   border: 1px solid #c8ccd1;
+   padding: 1em 1em 1.5em 1em;
 }
 
 .mw-importfile-header {
-margin: 1em 0 0.25em 0;
-padding-bottom: 0.2em;
-border-bottom: 1px solid #a2a9b1;
-overflow: auto;
-position: relative;
+   margin: 1em 0 0.25em 0;
+   padding-bottom: 0.2em;
+   border-bottom: 1px solid #a2a9b1;
+   overflow: auto;
+   position: relative;
 }
 
 .mw-body-content .mw-importfile-header-title {
-display: inline-block;
-position: absolute;
-border: none;
-bottom: 0;
-margin: 0
+   display: inline-block;
+   position: absolute;
+   border: 0;
+   bottom: 0;
+   margin: 0;
 }
 
 .mw-importfile-rightAlign {
-position: relative;
-bottom: 0;
-float: right;
+   position: relative;
+   bottom: 0;
+   float: right;
 }
diff --git a/package.json b/package.json
index bcf5b13..e98fea9 100644
--- a/package.json
+++ b/package.json
@@ -5,7 +5,9 @@
},
"devDependencies": {
"grunt": "1.0.1",
-   "grunt-banana-checker": "0.5.0",
-   "grunt-jsonlint": "1.1.0"
+   "grunt-banana-checker": "0.6.0",
+   "grunt-jsonlint": "1.1.0",
+   "grunt-stylelint": "0.7.0",
+   "stylelint-config-wikimedia": "0.4.1"
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80ecffc31e55b86ecd4cd9c4738911bca83c4166
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FileImporter
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Andrew-WMDE 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Update eslint and fix issues

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

Change subject: Update eslint and fix issues
..


Update eslint and fix issues

Change-Id: I0e3ad763398430608c30bb22741a57c81b2b7062
---
M modules/ext.RevisionSlider.RevisionListView.js
M modules/ext.RevisionSlider.SliderView.js
M modules/ext.RevisionSlider.init.js
M package.json
4 files changed, 18 insertions(+), 18 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.RevisionListView.js 
b/modules/ext.RevisionSlider.RevisionListView.js
index d674d72..9d9a3b6 100644
--- a/modules/ext.RevisionSlider.RevisionListView.js
+++ b/modules/ext.RevisionSlider.RevisionListView.js
@@ -122,9 +122,9 @@
return 0;
}
return Math.ceil(
-   ( this.maxRevisionHeight - 
this.minRevisionHeight ) *
-   Math.log( Math.abs( diffSize ) ) / 
maxChangeSizeLogged
-   ) + this.minRevisionHeight;
+   ( this.maxRevisionHeight - 
this.minRevisionHeight ) *
+   Math.log( Math.abs( diffSize ) ) / 
maxChangeSizeLogged ) +
+   this.minRevisionHeight;
},
 
/**
diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index a05aea0..093d02c 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -234,14 +234,14 @@
);
 
$pointerOlder.draggable( this.buildDraggableOptions(
-   $revisions,
-   '.mw-revslider-pointer-container-older'
-   ) );
+   $revisions,
+   '.mw-revslider-pointer-container-older'
+   ) );
 
$pointerNewer.draggable( this.buildDraggableOptions(
-   $revisions,
-   '.mw-revslider-pointer-container-newer'
-   ) );
+   $revisions,
+   '.mw-revslider-pointer-container-newer'
+   ) );
},
 
getOlderPointerPos: function () {
@@ -674,9 +674,9 @@
 */
calculateSliderContainerWidth: function () {
return Math.min(
-   this.slider.getRevisions().getLength(),
-   
mw.libs.revisionSlider.calculateRevisionsPerWindow( this.containerMargin + 
this.outerMargin, this.revisionWidth )
-   ) * this.revisionWidth;
+   this.slider.getRevisions().getLength(),
+   
mw.libs.revisionSlider.calculateRevisionsPerWindow( this.containerMargin + 
this.outerMargin, this.revisionWidth )
+   ) * this.revisionWidth;
},
 
/**
diff --git a/modules/ext.RevisionSlider.init.js 
b/modules/ext.RevisionSlider.init.js
index e394c0f..e95356d 100644
--- a/modules/ext.RevisionSlider.init.js
+++ b/modules/ext.RevisionSlider.init.js
@@ -96,9 +96,10 @@
autoExpandButton.$element.children().attr(
'aria-label',
mw.msg( autoExpand ?
-   'revisionslider-turn-off-auto-expand-title' :
-   'revisionslider-turn-on-auto-expand-title'
-   ) );
+   'revisionslider-turn-off-auto-expand-title' :
+   'revisionslider-turn-on-auto-expand-title'
+   )
+   );
 
autoExpandButton.connect( this, {
click: function () {
diff --git a/package.json b/package.json
index 8406b3d..042e82a 100644
--- a/package.json
+++ b/package.json
@@ -11,11 +11,10 @@
"test": "grunt test"
},
"devDependencies": {
-   "eslint": "3.12.2",
-   "eslint-config-wikimedia": "0.4.0",
"grunt": "1.0.1",
"grunt-banana-checker": "0.6.0",
-   "grunt-eslint": "19.0.0",
+   "grunt-eslint": "20.0.0",
+   "eslint-config-wikimedia": "0.4.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.7.0",
"stylelint-config-wikimedia": "0.4.1"

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

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

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Populate "Ask out" (modeling 1) Lexeme for demo system

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

Change subject: Populate "Ask out" (modeling 1) Lexeme for demo system
..


Populate "Ask out" (modeling 1) Lexeme for demo system

Bug: T168373
Change-Id: I45f501f19a12439c3e814576394692dd9348a730
---
M src/Content/LexemeContent.php
A src/DemoData/AskOut1Populator.php
2 files changed, 27 insertions(+), 0 deletions(-)

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



diff --git a/src/Content/LexemeContent.php b/src/Content/LexemeContent.php
index d2e0605..c6c3af3 100644
--- a/src/Content/LexemeContent.php
+++ b/src/Content/LexemeContent.php
@@ -60,6 +60,8 @@
( new DemoData\HardLexemePopulator() )->populate( 
$lexeme );
} elseif ( $id === DemoData\Id::L_LEITER ) {
( new DemoData\LeiterLexemePopulator() )->populate( 
$lexeme );
+   } elseif ( $id === DemoData\Id::L_ASK_1 ) {
+   ( new DemoData\AskOut1Populator() )->populate( $lexeme 
);
} else {
( new DemoData\DefaultPopulator() )->populate( $lexeme 
);
}
diff --git a/src/DemoData/AskOut1Populator.php 
b/src/DemoData/AskOut1Populator.php
new file mode 100644
index 000..15ab63b
--- /dev/null
+++ b/src/DemoData/AskOut1Populator.php
@@ -0,0 +1,25 @@
+buildDefaultSense();
+
+   $lexeme->setSenses( [ $defaultSense ] );
+   }
+
+   /**
+* @return \Wikibase\Lexeme\DataModel\Sense
+*/
+   private function buildDefaultSense() {
+   return NewSense::havingId( 'S5' )
+   ->withGloss( 'en', 'To ask somebody out’: To request a 
romantic date' )
+   ->build();
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45f501f19a12439c3e814576394692dd9348a730
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/software[master]: s6.hosts: Add labsdb1011

2017-07-14 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365233 )

Change subject: s6.hosts: Add labsdb1011
..

s6.hosts: Add labsdb1011

labsdb1011 has now s6 data

Bug: T153743
Change-Id: I0872f2d510bf01ee30d3ad1de028c906ed54bdb4
---
M dbtools/s6.hosts
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/33/365233/1

diff --git a/dbtools/s6.hosts b/dbtools/s6.hosts
index 3aa5395..d4524ea 100644
--- a/dbtools/s6.hosts
+++ b/dbtools/s6.hosts
@@ -7,6 +7,7 @@
 db2028.codfw.wmnet 3306
 labsdb1009.eqiad.wmnet 3306
 labsdb1010.eqiad.wmnet 3306
+labsdb1011.eqiad.wmnet 3306
 db1102.eqiad.wmnet 3316
 labsdb1001.eqiad.wmnet 3306
 labsdb1003.eqiad.wmnet 3306

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0872f2d510bf01ee30d3ad1de028c906ed54bdb4
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Marostegui 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Support properties with symmetric and inverse constraints

2017-07-14 Thread Lucas Werkmeister (WMDE) (Code Review)
Lucas Werkmeister (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365232 )

Change subject: Support properties with symmetric and inverse constraints
..

Support properties with symmetric and inverse constraints

SymmetricChecker and InverseChecker used
ConnectionCheckerHelper::findStatement, which only supported item ID
values, not property ID values.

ConnectionCheckerHelper is essentially rewritten. It now has three
methods to find statements by different criteria, each of which returns
either the first matching statement or null to indicate that there is no
matching statement.

- findStatementWithProperty is the replacement for hasProperty, and is
  used by ItemChecker, TargetRequiredClaimChecker and
  ConflictsWithChecker if the items parameter is not set.
- findStatementWithPropertyAndEntityIdValue is the replacement for
  findStatement that is used by SymmetricChecker and InverseChecker. It
  supports property IDs as well as item IDs, but not somevalue and
  novalue, since this is not necessary for those checkers.
- findStatementWithPropertyAndItemIdSnakValues is the replacement for
  findStatement that is used by ItemChecker, TargetRequiredClaimChecker
  and ConflictsWithChecker if the items parameter is set.

Since the methods all return a statement and not an ItemIdSnakValue,
ItemIdSnakValue gains a method to turn a Snak into an ItemIdSnakValue.
This is used by ConflictsWithChecker to render the offending statement
into the violation message. All other checkers merely check if the
returned statement exists or not.

Bug: T170626
Change-Id: Iac23aa144342148a028213afd16ffc175cabc1e7
---
M includes/ConstraintCheck/Checker/ConflictsWithChecker.php
M includes/ConstraintCheck/Checker/InverseChecker.php
M includes/ConstraintCheck/Checker/ItemChecker.php
M includes/ConstraintCheck/Checker/SymmetricChecker.php
M includes/ConstraintCheck/Checker/TargetRequiredClaimChecker.php
M includes/ConstraintCheck/Helper/ConnectionCheckerHelper.php
M includes/ConstraintCheck/ItemIdSnakValue.php
M tests/phpunit/Checker/ConnectionChecker/ConnectionCheckerHelperTest.php
M tests/phpunit/Checker/ConnectionChecker/InverseCheckerTest.php
A tests/phpunit/Checker/ConnectionChecker/P2.json
M tests/phpunit/Checker/ConnectionChecker/SymmetricCheckerTest.php
11 files changed, 312 insertions(+), 113 deletions(-)


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

diff --git a/includes/ConstraintCheck/Checker/ConflictsWithChecker.php 
b/includes/ConstraintCheck/Checker/ConflictsWithChecker.php
index 96b8c7f..2f646c1 100644
--- a/includes/ConstraintCheck/Checker/ConflictsWithChecker.php
+++ b/includes/ConstraintCheck/Checker/ConflictsWithChecker.php
@@ -10,6 +10,7 @@
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConnectionCheckerHelper;
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConstraintParameterException;
 use 
WikibaseQuality\ConstraintReport\ConstraintCheck\Helper\ConstraintParameterParser;
+use WikibaseQuality\ConstraintReport\ConstraintCheck\ItemIdSnakValue;
 use WikibaseQuality\ConstraintReport\ConstraintCheck\Result\CheckResult;
 use WikibaseQuality\ConstraintReport\ConstraintParameterRenderer;
 use Wikibase\DataModel\Statement\Statement;
@@ -84,7 +85,11 @@
 *   b) a property and a number of items (each combination of 
property and item forming an individual claim)
 */
if ( $items === [] ) {
-   if ( $this->connectionCheckerHelper->hasProperty( 
$entity->getStatements(), $propertyId->getSerialization() ) ) {
+   $offendingStatement = 
$this->connectionCheckerHelper->findStatementWithProperty(
+   $entity->getStatements(),
+   $propertyId
+   );
+   if ( $offendingStatement !== null ) {
$message = wfMessage( 
"wbqc-violation-message-conflicts-with-property" )
 ->rawParams(
 
$this->constraintParameterRenderer->formatEntityId( 
$statement->getPropertyId(), 
ConstraintParameterRenderer::ROLE_CONSTRAINT_PROPERTY ),
@@ -97,13 +102,18 @@
$status = CheckResult::STATUS_COMPLIANCE;
}
} else {
-   $result = 
$this->connectionCheckerHelper->findStatement( $entity->getStatements(), 
$propertyId->getSerialization(), $items );
-   if ( $result !== null ) {
+   $offendingStatement = 
$this->connectionCheckerHelper->findStatementWithPropertyAndItemIdSnakValues(
+   $entity->getStatements(),
+   $propertyId,
+   

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Improve doc, naming and pointer updates

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

Change subject: Improve doc, naming and pointer updates
..


Improve doc, naming and pointer updates

Several improvments including documentation, naming and refactoring:
- bundeling of methods setting, redrawing and loading new diffs
- renamed and improved documentation around some methods in that area
- fixed some leftovers from past refactoring not using new methods

Change-Id: Idf1afcd6ce9210951d28655128a47150f6b7a2aa
---
M modules/ext.RevisionSlider.DiffPage.js
M modules/ext.RevisionSlider.PointerView.js
M modules/ext.RevisionSlider.Slider.js
M modules/ext.RevisionSlider.SliderArrowView.js
M modules/ext.RevisionSlider.SliderView.js
5 files changed, 74 insertions(+), 49 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.DiffPage.js 
b/modules/ext.RevisionSlider.DiffPage.js
index cb4712a..bcbb668 100644
--- a/modules/ext.RevisionSlider.DiffPage.js
+++ b/modules/ext.RevisionSlider.DiffPage.js
@@ -186,21 +186,17 @@
 * @param {SliderView} sliderView
 */
initOnPopState: function ( sliderView ) {
-   var self = this;
window.addEventListener( 'popstate', function ( event ) 
{
if ( event.state === null ) {
return;
}
mw.track( 
'counter.MediaWiki.RevisionSlider.event.historyChange' );
-   sliderView.pointerOlder.setPosition( 
event.state.pointerOlderPos );
-   sliderView.pointerNewer.setPosition( 
event.state.pointerNewerPos );
sliderView.slider.setFirstVisibleRevisionIndex( 
event.state.sliderPos );
-   sliderView.slide( 0 );
-   sliderView.resetSliderLines();
-   
sliderView.resetRevisionStylesBasedOnPointerPosition(
-   sliderView.$element.find( 
'div.mw-revslider-revisions' )
+   sliderView.updatePointersAndDiffView(
+   event.state.pointerNewerPos,
+   event.state.pointerOlderPos,
+   false
);
-   self.refresh( event.state.diff, 
event.state.oldid );
} );
},
 
diff --git a/modules/ext.RevisionSlider.PointerView.js 
b/modules/ext.RevisionSlider.PointerView.js
index 49774c1..f2e654a 100644
--- a/modules/ext.RevisionSlider.PointerView.js
+++ b/modules/ext.RevisionSlider.PointerView.js
@@ -90,7 +90,7 @@
 * Moves the pointer to a position
 *
 * @param {number} posInPx
-* @param {number} duration
+* @param {number|string} duration
 * @return {jQuery}
 */
animateTo: function ( posInPx, duration ) {
@@ -105,7 +105,7 @@
 * Slides the pointer to the revision it's pointing at
 *
 * @param {Slider} slider
-* @param {number} duration
+* @param {number|string} duration
 * @return {jQuery}
 */
slideToPosition: function ( slider, duration ) {
@@ -118,7 +118,7 @@
 *
 * @param {Slider} slider
 * @param {boolean} posBeforeSlider
-* @param {number} duration
+* @param {number|string} duration
 * @return {jQuery}
 */
slideToSide: function ( slider, posBeforeSlider, duration ) {
@@ -133,7 +133,7 @@
 * Decides based on its position whether the pointer should be 
sliding to the side or to its position
 *
 * @param {Slider} slider
-* @param {number} duration
+* @param {number|string} duration
 * @return {jQuery}
 */
slideToSideOrPosition: function ( slider, duration ) {
diff --git a/modules/ext.RevisionSlider.Slider.js 
b/modules/ext.RevisionSlider.Slider.js
index 5bf7818..6939de2 100644
--- a/modules/ext.RevisionSlider.Slider.js
+++ b/modules/ext.RevisionSlider.Slider.js
@@ -105,7 +105,7 @@
/**
 * Sets the new oldestVisibleRevisionIndex after sliding in a 
direction
 *
-* @param {number} direction - Either -1 or 1
+* @param {number} direction - Either -1, 0 or 1
 */
slide: function ( direction ) {
  

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add test verifying editing entity terms using Api\EditEntity...

2017-07-14 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365231 )

Change subject: Add test verifying editing entity terms using Api\EditEntity 
requires *-term permissions
..

Add test verifying editing entity terms using Api\EditEntity requires *-term 
permissions

Note: this behaviour is currently NOT implemented in Api\EditEntity,
thus the test is temporarily skipped.

Change-Id: I72d33d3c4607fd1dcef849edc8ff7daa61cd1a69
---
M repo/tests/phpunit/includes/Api/EditEntityTest.php
1 file changed, 36 insertions(+), 0 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/Api/EditEntityTest.php 
b/repo/tests/phpunit/includes/Api/EditEntityTest.php
index 0c53e60..a097a8b 100644
--- a/repo/tests/phpunit/includes/Api/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/Api/EditEntityTest.php
@@ -451,6 +451,34 @@
];
 
$this->doTestQueryExceptions(
+   $this->addSiteLink( $newItem['id'] ),
+   $expected,
+   $userWithInsufficientPermissions
+   );
+   }
+
+   public function testEditingLabelRequiresEntityTermEditPermissions() {
+   $this->markTestSkipped( 'Api\EditEntity currently does not 
check term edit permissions when editing terms!' );
+
+   $userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
+   $userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
+
+   $this->setMwGlobals( 'wgGroupPermissions', [
+   'no-permission' => [ 'read' => true, 'edit' => true, 
'item-term' => false, ],
+   'all-permission' => [ 'read' => true, 'edit' => true, 
'createpage' => true ],
+   '*' => [ 'read' => true, 'edit' => false, 'writeapi' => 
true ]
+   ] );
+
+   // And an existing item
+   $newItem = $this->createItemUsing( $userWithAllPermissions );
+
+   // Then the request is denied
+   $expected = [
+   'type' => ApiUsageException::class,
+   'code' => 'permissiondenied'
+   ];
+
+   $this->doTestQueryExceptions(
$this->removeLabel( $newItem['id'] ),
$expected,
$userWithInsufficientPermissions );
@@ -472,6 +500,14 @@
 
}
 
+   private function addSiteLink( $id ) {
+   return [
+   'action' => 'wbeditentity',
+   'id' => $id,
+   'data' => '{"sitelinks":{"site":"enwiki","title":"Hello 
World"}}'
+   ];
+   }
+
private function removeLabel( $id ) {
return [
'action' => 'wbeditentity',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72d33d3c4607fd1dcef849edc8ff7daa61cd1a69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Move scrollType detection to utils

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

Change subject: Move scrollType detection to utils
..


Move scrollType detection to utils

Change-Id: I465e0b74a7d7a6682b22bdd6e7aafb794bce9b24
---
M modules/ext.RevisionSlider.SliderView.js
M modules/ext.RevisionSlider.util.js
2 files changed, 38 insertions(+), 38 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 7611310..62058df 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -93,7 +93,7 @@
this.dir = $container.css( 'direction' ) || 'ltr';
 
if ( this.dir === 'rtl' ) {
-   this.rtlScrollLeftType = 
this.determineRtlScrollType();
+   this.rtlScrollLeftType = 
mw.libs.revisionSlider.determineRtlScrollType();
}
 
this.pointerOlder = this.pointerOlder || new 
mw.libs.revisionSlider.Pointer( 'mw-revslider-pointer-older' );
@@ -704,43 +704,6 @@
);
 
this.alignPointers( duration );
-   },
-
-   /**
-* Based on jQuery RTL Scroll Type Detector plugin by othree: 
https://github.com/othree/jquery.rtl-scroll-type
-*
-* @return {string} - 'default', 'negative' or 'reverse'
-*/
-   determineRtlScrollType: function () {
-   var isChrome = /chrom(e|ium)/.test( 
navigator.userAgent.toLowerCase() ),
-   $dummy;
-
-   // in Chrome V8 5.8.283 and 5.9.211 the detection below 
gives wrong results leading to strange behavior
-   // Chrome V8 6.0 seems to fix that issue so this 
workaround can be removed then
-   if ( isChrome ) {
-   return 'default';
-   }
-
-   $dummy = $( '' )
-   .css( {
-   dir: 'rtl',
-   width: '1px',
-   height: '1px',
-   position: 'absolute',
-   top: '-1000px',
-   overflow: 'scroll'
-   } )
-   .text( 'A' )
-   .appendTo( 'body' )[ 0 ];
-   if ( $dummy.scrollLeft > 0 ) {
-   return 'default';
-   } else {
-   $dummy.scrollLeft = 1;
-   if ( $dummy.scrollLeft === 0 ) {
-   return 'negative';
-   }
-   }
-   return 'reverse';
},
 
/**
diff --git a/modules/ext.RevisionSlider.util.js 
b/modules/ext.RevisionSlider.util.js
index d161897..6d9450d 100644
--- a/modules/ext.RevisionSlider.util.js
+++ b/modules/ext.RevisionSlider.util.js
@@ -77,6 +77,43 @@
return offset;
};
 
+   /**
+* Based on jQuery RTL Scroll Type Detector plugin by othree: 
https://github.com/othree/jquery.rtl-scroll-type
+*
+* @return {string} - 'default', 'negative' or 'reverse'
+*/
+   mw.libs.revisionSlider.determineRtlScrollType = function () {
+   var isChrome = /chrom(e|ium)/.test( 
navigator.userAgent.toLowerCase() ),
+   $dummy;
+
+   // in Chrome V8 5.8.283 and 5.9.211 the detection below gives 
wrong results leading to strange behavior
+   // Chrome V8 6.0 seems to fix that issue so this workaround can 
be removed then
+   if ( isChrome ) {
+   return 'default';
+   }
+
+   $dummy = $( '' )
+   .css( {
+   dir: 'rtl',
+   width: '1px',
+   height: '1px',
+   position: 'absolute',
+   top: '-1000px',
+   overflow: 'scroll'
+   } )
+   .text( 'A' )
+   .appendTo( 'body' )[ 0 ];
+   if ( $dummy.scrollLeft > 0 ) {
+   return 'default';
+   } else {
+   $dummy.scrollLeft = 1;
+   if ( $dummy.scrollLeft === 0 ) {
+   return 'negative';
+   }
+   }
+   

[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Move data pos attr to PointerView

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

Change subject: Move data pos attr to PointerView
..


Move data pos attr to PointerView

Change-Id: I46c3dceaddae84b279625caec3349aa10d931048
---
M modules/ext.RevisionSlider.DiffPage.js
M modules/ext.RevisionSlider.Pointer.js
M modules/ext.RevisionSlider.PointerView.js
M modules/ext.RevisionSlider.SliderView.js
4 files changed, 13 insertions(+), 21 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.DiffPage.js 
b/modules/ext.RevisionSlider.DiffPage.js
index 2c8f6f6..cb4712a 100644
--- a/modules/ext.RevisionSlider.DiffPage.js
+++ b/modules/ext.RevisionSlider.DiffPage.js
@@ -200,7 +200,6 @@

sliderView.resetRevisionStylesBasedOnPointerPosition(
sliderView.$element.find( 
'div.mw-revslider-revisions' )
);
-   sliderView.updatePointerPositionAttributes();
self.refresh( event.state.diff, 
event.state.oldid );
} );
},
diff --git a/modules/ext.RevisionSlider.Pointer.js 
b/modules/ext.RevisionSlider.Pointer.js
index 3f53e88..8388e3a 100644
--- a/modules/ext.RevisionSlider.Pointer.js
+++ b/modules/ext.RevisionSlider.Pointer.js
@@ -31,6 +31,7 @@
 */
setPosition: function ( p ) {
this.position = p;
+   this.getView().setDataPositionAttribute( p );
},
 
/**
diff --git a/modules/ext.RevisionSlider.PointerView.js 
b/modules/ext.RevisionSlider.PointerView.js
index 6e2db5f..49774c1 100644
--- a/modules/ext.RevisionSlider.PointerView.js
+++ b/modules/ext.RevisionSlider.PointerView.js
@@ -75,6 +75,18 @@
},
 
/**
+* Sets the HTML attribute for the position
+*
+* @param {number} pos
+*/
+   setDataPositionAttribute: function ( pos ) {
+   if ( this.getElement() === null ) {
+   this.initialize();
+   }
+   this.getElement().attr( 'data-pos', pos );
+   },
+
+   /**
 * Moves the pointer to a position
 *
 * @param {number} posInPx
diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index ce35d6d..7611310 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -294,7 +294,6 @@
$clickedRev = this.getRevElementAtPosition( $revisions, 
pos );
 
pointerMoved.setPosition( pos );
-   this.updatePointerPositionAttributes();
if ( $line.hasClass( 
'mw-revslider-pointer-container-newer' ) ) {
this.refreshRevisions(
$clickedRev.attr( 'data-revid' ),
@@ -344,14 +343,12 @@
self.removePointerDragCursor();
 
if ( self.escapePressed ) {
-   
self.updatePointerPositionAttributes();
self.resetSliderLines();
return;
}
 
mw.track( 
'counter.MediaWiki.RevisionSlider.event.pointerMove' );
pointer.setPosition( 
self.slider.getOldestVisibleRevisionIndex() + relativeIndex );
-   self.updatePointerPositionAttributes();
self.resetSliderLines();

self.resetRevisionStylesBasedOnPointerPosition( $revisions );
 
@@ -490,7 +487,6 @@
this.resetRevisionStylesBasedOnPointerPosition(
this.$element.find( 
'div.mw-revslider-revisions' )
);
-   this.updatePointerPositionAttributes();
this.refreshRevisions(
$( '.mw-revslider-revision[data-pos="' + 
this.getNewerPointerPos() + '"]' ).attr( 'data-revid' ),
$( '.mw-revslider-revision[data-pos="' + 
this.getOlderPointerPos() + '"]' ).attr( 'data-revid' )
@@ -547,7 +543,6 @@
}
this.setNewerPointerPos( $newRevElement.data( 'pos' ) );
this.resetSliderLines();
-   this.updatePointerPositionAttributes();
},
 
 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Rename incorrectly named Api\SetAliases and Api\SetDescripti...

2017-07-14 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365230 )

Change subject: Rename incorrectly named Api\SetAliases and Api\SetDescription 
tests
..

Rename incorrectly named Api\SetAliases and Api\SetDescription tests

Change-Id: I4ad64c53875a82980e0c441681f9fca88f04c1ec
---
M repo/tests/phpunit/includes/Api/SetAliasesTest.php
M repo/tests/phpunit/includes/Api/SetDescriptionTest.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/Api/SetAliasesTest.php 
b/repo/tests/phpunit/includes/Api/SetAliasesTest.php
index a7ce46a..c64df6a 100644
--- a/repo/tests/phpunit/includes/Api/SetAliasesTest.php
+++ b/repo/tests/phpunit/includes/Api/SetAliasesTest.php
@@ -258,7 +258,7 @@
$this->doTestSetTermExceptions( $params, $expected );
}
 
-   public function testUserCanEditWhenTheyHaveSufficientPermission() {
+   public function testUserCanSetAliasesWhenTheyHaveSufficientPermission() 
{
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
$this->setMwGlobals( 'wgGroupPermissions', [
@@ -277,7 +277,7 @@
$this->assertEquals( 1, $result['success'] );
}
 
-   public function testUserCannotSetLabelWhenTheyLackPermission() {
+   public function testUserCannotSetAliasesWhenTheyLackPermission() {
$userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
diff --git a/repo/tests/phpunit/includes/Api/SetDescriptionTest.php 
b/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
index 319067a..99e8998 100644
--- a/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
+++ b/repo/tests/phpunit/includes/Api/SetDescriptionTest.php
@@ -53,7 +53,7 @@
self::doTestSetTermExceptions( $params, $expected );
}
 
-   public function testUserCanEditWhenTheyHaveSufficientPermission() {
+   public function 
testUserCanSetDescriptionWhenTheyHaveSufficientPermission() {
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 
$this->setMwGlobals( 'wgGroupPermissions', [
@@ -72,7 +72,7 @@
$this->assertEquals( 1, $result['success'] );
}
 
-   public function testUserCannotSetLabelWhenTheyLackPermission() {
+   public function testUserCannotSetDescriptionWhenTheyLackPermission() {
$userWithInsufficientPermissions = $this->createUserWithGroup( 
'no-permission' );
$userWithAllPermissions = $this->createUserWithGroup( 
'all-permission' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ad64c53875a82980e0c441681f9fca88f04c1ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Automatically check indentation of JS files

2017-07-14 Thread WMDE-leszek (Code Review)
WMDE-leszek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365229 )

Change subject: Automatically check indentation of JS files
..

Automatically check indentation of JS files

Change-Id: I1d67f1ad833bcb11f030cdcfa0c87120073a1d17
---
M .eslintrc.json
M resources/datamodel/Lexeme.js
M resources/jquery.wikibase.lexemeview.js
M resources/jquery.wikibase.senselistview.js
M resources/view/ControllerViewFactory.js
5 files changed, 75 insertions(+), 66 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
index 7fad51f..52b1755 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -17,7 +17,7 @@
},
"rules": {
"dot-notation": "off",
-   "indent": "off",
+   "indent": [ "error", "tab", { "CallExpression": { "arguments": 
"first" } } ],
"new-cap": "off",
"no-unused-vars": "off",
"no-underscore-dangle": "off",
diff --git a/resources/datamodel/Lexeme.js b/resources/datamodel/Lexeme.js
index d58fd2d..ad24da4 100644
--- a/resources/datamodel/Lexeme.js
+++ b/resources/datamodel/Lexeme.js
@@ -37,41 +37,42 @@
this._statementGroupSet = statementGroupSet;
this._fingerprint = new wb.datamodel.Fingerprint( 
labels, new wb.datamodel.TermMap() );
},
-   {
+   {
 
-   /**
-* @property {wikibase.datamodel.StatementGroupSet}
-* @private
-*/
-   _statementGroupSet: null,
+   /**
+* @property {wikibase.datamodel.StatementGroupSet}
+* @private
+*/
+   _statementGroupSet: null,
 
-   /**
-* @return {wikibase.datamodel.StatementGroupSet}
-*/
-   getStatements: function () {
-   return this._statementGroupSet;
-   },
+   /**
+* @return {wikibase.datamodel.StatementGroupSet}
+*/
+   getStatements: function () {
+   return this._statementGroupSet;
+   },
 
-   /**
-* @return {boolean}
-*/
-   isEmpty: function () {
-   return this._statementGroupSet.isEmpty() && 
this._fingerprint.isEmpty();
-   },
+   /**
+* @return {boolean}
+*/
+   isEmpty: function () {
+   return this._statementGroupSet.isEmpty() && 
this._fingerprint.isEmpty();
+   },
 
-   /**
-* @param {*} lexeme
-* @return {boolean}
-*/
-   equals: function ( lexeme ) {
-   return lexeme === this ||
-   ( lexeme instanceof SELF &&
-   this._id === lexeme.getId() &&
-   this._statementGroupSet.equals( 
lexeme.getStatements() ) &&
-   this._fingerprint.equals( 
lexeme.getFingerprint() )
-   );
+   /**
+* @param {*} lexeme
+* @return {boolean}
+*/
+   equals: function ( lexeme ) {
+   return lexeme === this ||
+   ( lexeme instanceof SELF &&
+   this._id === lexeme.getId() &&
+   this._statementGroupSet.equals( 
lexeme.getStatements() ) &&
+   this._fingerprint.equals( 
lexeme.getFingerprint() )
+   );
+   }
}
-   } );
+   );
 
/**
 * @inheritdoc
diff --git a/resources/jquery.wikibase.lexemeview.js 
b/resources/jquery.wikibase.lexemeview.js
index b40e918..42a3bbb 100644
--- a/resources/jquery.wikibase.lexemeview.js
+++ b/resources/jquery.wikibase.lexemeview.js
@@ -92,25 +92,33 @@
 
var self = this;
 
-   this.element
-   .on( [
+   var startEditingEvents = [
'statementviewafterstartediting.' + 
this.widgetName,
'referenceviewafterstartediting.' + 
this.widgetName
-   ].join( ' ' ),
-   function () {
-   self._trigger( 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove unused SnakFormatter::FORMAT_HTML_WIDGET

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

Change subject: Remove unused SnakFormatter::FORMAT_HTML_WIDGET
..


Remove unused SnakFormatter::FORMAT_HTML_WIDGET

There is a single reference in the Math extension, thats why I keep
the constant as a @deprecated one for a while.

One could argue this is a breaking change because of the removed option
from the wbformatvalue API. I say: Let's not care about this to much.
It's not used anyway. It never ever did anything different that the
HTML mode. But feel free to disagree if you think this needs to go
through the official deprecation process.

Change-Id: Icb446783a6c27090095e66492a75fcb3bb0f66c1
---
M 
client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M lib/includes/Formatters/SnakFormatter.php
M lib/includes/Formatters/WikibaseSnakFormatterBuilders.php
M lib/includes/Formatters/WikibaseValueFormatterBuilders.php
M lib/tests/phpunit/Formatters/MessageSnakFormatterTest.php
M lib/tests/phpunit/Formatters/WikibaseValueFormatterBuildersTest.php
M repo/includes/Api/FormatSnakValue.php
M repo/includes/View/WikibaseHtmlSnakFormatterFactory.php
M repo/tests/phpunit/includes/View/WikibaseHtmlSnakFormatterFactoryTest.php
M view/src/SnakHtmlGenerator.php
M view/src/ViewFactory.php
11 files changed, 9 insertions(+), 12 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  WMDE-leszek: Looks good to me, approved
  Jonas Kress (WMDE): Looks good to me, but someone else must approve
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
index f498f7c..c224a60 100644
--- 
a/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
+++ 
b/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
@@ -42,7 +42,6 @@
[ SnakFormatter::FORMAT_PLAIN, 'a kitten!, two 
kittens!!' ],
[ SnakFormatter::FORMAT_WIKI, 'a kitten!, two 
kittens!!' ],
[ SnakFormatter::FORMAT_HTML, 'a kitten!, two 
kittens!!' ],
-   [ SnakFormatter::FORMAT_HTML_WIDGET, 'a kitten!, 
two kittens!!' ],
[ SnakFormatter::FORMAT_HTML_DIFF, 'a kitten!, 
two kittens!!' ],
];
}
diff --git a/lib/includes/Formatters/SnakFormatter.php 
b/lib/includes/Formatters/SnakFormatter.php
index c9c5d14..58244e7 100644
--- a/lib/includes/Formatters/SnakFormatter.php
+++ b/lib/includes/Formatters/SnakFormatter.php
@@ -23,7 +23,12 @@
const FORMAT_PLAIN = 'text/plain';
const FORMAT_WIKI = 'text/x-wiki';
const FORMAT_HTML = 'text/html';
-   const FORMAT_HTML_WIDGET = 'text/html; disposition=widget';
+
+   /**
+* @deprecated Just use FORMAT_HTML.
+*/
+   const FORMAT_HTML_WIDGET = self::FORMAT_HTML;
+
const FORMAT_HTML_DIFF = 'text/html; disposition=diff';
 
/**
diff --git a/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php 
b/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php
index 31af10e..c49d004 100644
--- a/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php
+++ b/lib/includes/Formatters/WikibaseSnakFormatterBuilders.php
@@ -64,7 +64,6 @@
switch ( $format ) {
case SnakFormatter::FORMAT_HTML:
case SnakFormatter::FORMAT_HTML_DIFF:
-   case SnakFormatter::FORMAT_HTML_WIDGET:
return SnakFormatter::FORMAT_HTML;
case SnakFormatter::FORMAT_WIKI:
case SnakFormatter::FORMAT_PLAIN:
diff --git a/lib/includes/Formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
index 03bbf2b..d92aabf 100644
--- a/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/Formatters/WikibaseValueFormatterBuilders.php
@@ -138,7 +138,6 @@
switch ( $format ) {
case SnakFormatter::FORMAT_HTML:
case SnakFormatter::FORMAT_HTML_DIFF:
-   case SnakFormatter::FORMAT_HTML_WIDGET:
return SnakFormatter::FORMAT_HTML;
case SnakFormatter::FORMAT_WIKI:
case SnakFormatter::FORMAT_PLAIN:
diff --git a/lib/tests/phpunit/Formatters/MessageSnakFormatterTest.php 
b/lib/tests/phpunit/Formatters/MessageSnakFormatterTest.php
index c5220a7..4f9ba62 100644
--- a/lib/tests/phpunit/Formatters/MessageSnakFormatterTest.php
+++ b/lib/tests/phpunit/Formatters/MessageSnakFormatterTest.php
@@ -97,7 +97,6 @@
[ 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Fix demo page populators

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

Change subject: Fix demo page populators
..


Fix demo page populators

Use item ids in item reference statements.
Set random GUID for statements, so they don't render in edit mode.

Change-Id: Ia276256e122a27eebca4a3c5887ead00ab4f6f1a
---
M src/DemoData/HardLexemePopulator.php
M src/DemoData/LeiterLexemePopulator.php
2 files changed, 18 insertions(+), 4 deletions(-)

Approvals:
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/DemoData/HardLexemePopulator.php 
b/src/DemoData/HardLexemePopulator.php
index c294c11..19d81f5 100644
--- a/src/DemoData/HardLexemePopulator.php
+++ b/src/DemoData/HardLexemePopulator.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Lexeme\DemoData;
 
+use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Lexeme\DataModel\Lexeme;
 use Wikibase\Lexeme\Tests\DataModel\NewForm;
 use Wikibase\Lexeme\Tests\DataModel\NewSense;
@@ -30,12 +31,15 @@
->andStatement(
NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
->withValue( '/hɑːd/' )
+   ->withSomeGuid()
)->andStatement(
NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
->withValue( '/hɑɹd/' )
+   ->withSomeGuid()
)->andStatement(
NewStatement::forProperty( 
Id::P_PRONUNCIATION_AUDIO )
->withValue( 'hard.ogg' )
+   ->withSomeGuid()
)->build();
}
 
@@ -59,14 +63,17 @@
 // ->withStatement(
 // NewStatement::forProperty(Id::P_SYNONYM_OF)
 // ->withValue(Id::___difficult)
+// ->withSomeGuid()
 // )
->withStatement(
NewStatement::forProperty( Id::P_REGISTER )
-   ->withValue( Id::Q_COLLOQUIALISM )
+   ->withValue( new ItemId( 
Id::Q_COLLOQUIALISM ) )
+   ->withSomeGuid()
)
 // ->withStatement(
 // NewStatement::forProperty(Id::P_Translation)
 // ->withValue(Id::S_schwierig)
+// ->withSomeGuid()
 // )
->build();
}
@@ -81,22 +88,27 @@
 // ->withStatement(
 // NewStatement::forProperty(Id::P_SYNONYM_OF)
 // ->withValue(Id::___difficult)
+// ->withSomeGuid()
 // )
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-   ->withValue( Id::Q_ELASTICITY )
+   ->withValue( new ItemId( 
Id::Q_ELASTICITY ) )
+   ->withSomeGuid()
)
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-   ->withValue( Id::Q_DUCTILITY )
+   ->withValue( new ItemId( 
Id::Q_DUCTILITY ) )
+   ->withSomeGuid()
)
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
-   ->withValue( Id::Q_HARDNESS )
+   ->withValue( new ItemId( Id::Q_HARDNESS 
) )
+   ->withSomeGuid()
)
 // ->withStatement(
 // NewStatement::forProperty(Id::P_Translation)
 // ->withValue(Id::S_schwierig)
+// ->withSomeGuid()
 // )
->build();
}
diff --git a/src/DemoData/LeiterLexemePopulator.php 
b/src/DemoData/LeiterLexemePopulator.php
index f0447db..923dadb 100644
--- a/src/DemoData/LeiterLexemePopulator.php
+++ b/src/DemoData/LeiterLexemePopulator.php
@@ -32,9 +32,11 @@
->andStatement(
NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
->withValue( '/.../' )
+   ->withSomeGuid()

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Add Guid related methods to `NewStatement`

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

Change subject: Add Guid related methods to `NewStatement`
..


Add Guid related methods to `NewStatement`

Change-Id: Ief497288f19c69e11295659492568ef4c794b951
---
M repo/tests/phpunit/includes/NewStatement.php
1 file changed, 55 insertions(+), 0 deletions(-)

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



diff --git a/repo/tests/phpunit/includes/NewStatement.php 
b/repo/tests/phpunit/includes/NewStatement.php
index a3860d7..bc206a8 100644
--- a/repo/tests/phpunit/includes/NewStatement.php
+++ b/repo/tests/phpunit/includes/NewStatement.php
@@ -15,6 +15,8 @@
 
 class NewStatement {
 
+   const GENERATE_GUID = true;
+
/**
 * @var PropertyId
 */
@@ -34,6 +36,8 @@
 * @var int
 */
private $rank = Statement::RANK_NORMAL;
+
+   private $guid;
 
/**
 * @param PropertyId|string $propertyId
@@ -117,6 +121,35 @@
return $this->withRank( Statement::RANK_PREFERRED );
}
 
+   /**
+* @param string $guid
+* @return self
+*/
+   public function withGuid( $guid ) {
+   $result = clone $this;
+   if ( $result->guid !== null ) {
+   throw new \LogicException( 'Cannot redefine GUID' );
+   }
+
+   $result->guid = (string)$guid;
+
+   return $result;
+   }
+
+   /**
+* @return self
+*/
+   public function withSomeGuid() {
+   $result = clone $this;
+   if ( $result->guid !== null ) {
+   throw new \LogicException( 'Cannot redefine GUID' );
+   }
+
+   $result->guid = self::GENERATE_GUID;
+
+   return $result;
+   }
+
private function __construct() {
}
 
@@ -148,7 +181,29 @@
$result = new Statement( $snack );
$result->setRank( $this->rank );
 
+   if ( $this->guid ) {
+   if ( $this->guid === self::GENERATE_GUID ) {
+   $result->setGuid( $this->generateUuidV4() );
+   } else {
+   $result->setGuid( $this->guid );
+   }
+   }
+
return $result;
}
 
+   private function generateUuidV4() {
+   return sprintf(
+   '%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
+   mt_rand( 0, 0x ),
+   mt_rand( 0, 0x ),
+   mt_rand( 0, 0x ),
+   mt_rand( 0, 0x0fff ) | 0x4000,
+   mt_rand( 0, 0x3fff ) | 0x8000,
+   mt_rand( 0, 0x ),
+   mt_rand( 0, 0x ),
+   mt_rand( 0, 0x )
+   );
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief497288f19c69e11295659492568ef4c794b951
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: analytics-store: Ban Aria/MyISAM tables from WMF infrastructure

2017-07-14 Thread Jcrespo (Code Review)
Jcrespo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365228 )

Change subject: analytics-store: Ban Aria/MyISAM tables from WMF infrastructure
..

analytics-store: Ban Aria/MyISAM tables from WMF infrastructure

This creates replication lag on the servers.

Change-Id: I5461bd7983ebabf995319d11f1c502f58ed80777
---
M modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
1 file changed, 3 insertions(+), 17 deletions(-)


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

diff --git a/modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb 
b/modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
index 011f2d6..be52d4e 100644
--- a/modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
+++ b/modules/role/templates/mariadb/mysqld_config/dbstore.my.cnf.erb
@@ -5,15 +5,7 @@
 [client]
 port   = 3306
 socket = /tmp/mysql.sock
-<% if @ssl == 'on' %>
-# ssl
-ssl-ca=/etc/mysql/ssl/cacert.pem
-ssl-cert=/etc/mysql/ssl/server-cert.pem
-ssl-key=/etc/mysql/ssl/server-key.pem
-# skip server cert validation until we generate one cert per server
-# it would check the cert's common name against the host
-# ssl-verify-server-cert
-<% elsif @ssl == 'puppet-cert' %>
+<% if @ssl == 'on' or @ssl == 'puppet-cert' %>
 # ssl
 ssl-ca=/etc/ssl/certs/Puppet_Internal_CA.pem
 ssl-cert=/etc/mysql/ssl/cert.pem
@@ -58,7 +50,7 @@
 
 table_open_cache   = 5
 table_definition_cache = 5
-default-storage-engine = Aria
+default-storage-engine = TokuDB
 
 # InnoDB file-per-table + TokuDB love those file descriptors
 open-files-limit = 40
@@ -126,13 +118,7 @@
 innodb_read_io_threads = 16
 innodb_write_io_threads= 8
 <% end %>
-<% if @ssl == 'on' %>
-# ssl
-ssl-ca=/etc/mysql/ssl/cacert.pem
-ssl-cert=/etc/mysql/ssl/server-cert.pem
-ssl-key=/etc/mysql/ssl/server-key.pem
-ssl-cipher=TLSv1.2
-<% elsif @ssl == 'puppet-cert' %>
+<% if @ssl == 'on' or @ssl == 'puppet-cert' %>
 # ssl
 ssl-ca=/etc/ssl/certs/Puppet_Internal_CA.pem
 ssl-cert=/etc/mysql/ssl/cert.pem

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BSExtendedSearch: New hook for search param manipulation

2017-07-14 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365227 )

Change subject: BSExtendedSearch: New hook for search param manipulation
..

BSExtendedSearch: New hook for search param manipulation

This change is neccessary for ERM6068

NEEDS CHERRY-PICK TO REL1_27

Change-Id: I9b30d840063277fa3312296bebe84fef456d9f5b
---
M ExtendedSearch/doc/Hooks.txt
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
2 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/ExtendedSearch/doc/Hooks.txt b/ExtendedSearch/doc/Hooks.txt
index 2bd6a6b..4d0e78f 100644
--- a/ExtendedSearch/doc/Hooks.txt
+++ b/ExtendedSearch/doc/Hooks.txt
@@ -70,6 +70,13 @@
 $sFieldName
 $sTagName
 
+'BSExtendedSearchSearchOptionsAssembleSearchOptions': Allows to adjust the
+parameters send to the SOLR backend. E.g. for security trimming.
+$oSearchOptions The SearchOptions instance
+&$aOptions All kind of collected options from the current search request
+&$aFq The list of filter queries
+&$aFacetFields The list of facet fields
+
 ==SearchRequest.class==
 
 'BSExtendedSearchRequestProcessInputs':
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index ee6bdc9..913783d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -499,6 +499,10 @@
}
 
protected function assembleSearchOptions() {
+   Hooks::run(
+   'BSExtendedSearchSearchOptionsAssembleSearchOptions',
+   [ $this, &$this->aOptions, &$this->aFq, 
&$this->aFacetFields ]
+   );
$this->aSearchOptions['defType'] = 'edismax';
$this->aSearchOptions['fl'] = 
'uid,type,title,path,namespace,cat,ts,redirects,overall_type';
$this->aSearchOptions['fq'] = $this->aFq;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Fix Form statements so they won't switch to edit mode on load

2017-07-14 Thread Aleksey Bekh-Ivanov (WMDE) (Code Review)
Aleksey Bekh-Ivanov (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365226 )

Change subject: Fix Form statements so they won't switch to edit mode on load
..

Fix Form statements so they won't switch to edit mode on load

Bug: T168373
Change-Id: I503aebacca0f5d4e2e390f778347e57447c8074b
Depends-On: Ief497288f19c69e11295659492568ef4c794b951
---
M src/DemoData/HardLexemePopulator.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/src/DemoData/HardLexemePopulator.php 
b/src/DemoData/HardLexemePopulator.php
index c294c11..199e255 100644
--- a/src/DemoData/HardLexemePopulator.php
+++ b/src/DemoData/HardLexemePopulator.php
@@ -30,12 +30,15 @@
->andStatement(
NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
->withValue( '/hɑːd/' )
+   ->withSomeGuid()
)->andStatement(
NewStatement::forProperty( 
Id::P_IPA_PRONUNCIATION )
->withValue( '/hɑɹd/' )
+   ->withSomeGuid()
)->andStatement(
NewStatement::forProperty( 
Id::P_PRONUNCIATION_AUDIO )
->withValue( 'hard.ogg' )
+   ->withSomeGuid()
)->build();
}
 
@@ -63,6 +66,7 @@
->withStatement(
NewStatement::forProperty( Id::P_REGISTER )
->withValue( Id::Q_COLLOQUIALISM )
+   ->withSomeGuid()
)
 // ->withStatement(
 // NewStatement::forProperty(Id::P_Translation)
@@ -85,14 +89,17 @@
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
->withValue( Id::Q_ELASTICITY )
+   ->withSomeGuid()
)
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
->withValue( Id::Q_DUCTILITY )
+   ->withSomeGuid()
)
->withStatement(
NewStatement::forProperty( 
Id::P_RELATED_CONCEPT )
->withValue( Id::Q_HARDNESS )
+   ->withSomeGuid()
)
 // ->withStatement(
 // NewStatement::forProperty(Id::P_Translation)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I503aebacca0f5d4e2e390f778347e57447c8074b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[REL1_23]: Add checking for warnings before uploading

2017-07-14 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/365205 )

Change subject: Add checking for warnings before uploading
..


Add checking for warnings before uploading

Add $bIgnoreWarnings param that can be passed to uploadLocalFile to
indicate wether warnings (if exist) should be returned or not

This is a late commit to REL1_23 because this change was not previoursly
merget to REL1_23 (conflict on cherry-pick)

Change-Id: I171d2fb4eb93adbd750d340dd3d3b52d1df21b74
ERM: #4275
---
M includes/utility/FileSystemHelper.class.php
1 file changed, 24 insertions(+), 12 deletions(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved



diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index 6748b6c..8d5a46e 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -550,44 +550,56 @@
}
}
 
-   public static function uploadLocalFile($sFilename, $bDeleteSrc = false, 
$sComment = "", $sPageText = "", $bWatch = false){
+   public static function uploadLocalFile($sFilename, $bDeleteSrc = false, 
$sComment = "", $sPageText = "", $bWatch = false, $bIgnoreWarnings = true ){
global $wgLocalFileRepo, $wgUser;
-   $oUploadStash = new UploadStash(new 
LocalRepo($wgLocalFileRepo));
+   $oUploadStash = new UploadStash( new LocalRepo( 
$wgLocalFileRepo ) );
$oUploadFile = $oUploadStash->stashFile( $sFilename, "file" );
$sTargetFileName = basename( self::restoreFileName( $sFilename 
) );
 
if ($oUploadFile === false) {
-   return 
Status::newFailure(wfMessage('bs-filesystemhelper-upload-local-error-stash-file')->plain());
+   return Status::newFailure( wfMessage( 
'bs-filesystemhelper-upload-local-error-stash-file' )->plain() );
}
 
$oUploadFromStash = new UploadFromStash( $wgUser, 
$oUploadStash, $wgLocalFileRepo );
$oUploadFromStash->initialize( $oUploadFile->getFileKey(), 
$sTargetFileName );
$aStatus = $oUploadFromStash->verifyUpload();
-   if ($aStatus['status'] != UploadBase::OK) {
+
+   if( $bIgnoreWarnings === false ) {
+   $aWarnings = $oUploadFromStash->checkWarnings();
+   if( !empty( $aWarnings ) ) {
+   $oStatus = new Status();
+   foreach( $aWarnings as $sKey => $vValue ) {
+   $oStatus->warning( $sKey, $vValue );
+   }
+   return $oStatus;
+   }
+   }
+
+   if ( $aStatus['status'] != UploadBase::OK ) {
return Status::newFatal(
-   
wfMessage('bs-filesystemhelper-upload-err-code', '{{int:' . 
UploadBase::getVerificationErrorCode($aStatus['status']) . '}}')->parse()
+   wfMessage( 
'bs-filesystemhelper-upload-err-code', '{{int:' . 
UploadBase::getVerificationErrorCode($aStatus['status'] ) . '}}' )->parse()
);
}
-   $status = $oUploadFromStash->performUpload($sComment, 
$sPageText, $bWatch, $wgUser);
+   $status = $oUploadFromStash->performUpload( $sComment, 
$sPageText, $bWatch, $wgUser );
$oUploadFromStash->cleanupTempFile();
 
-   if (file_exists($sFilename) && $bDeleteSrc) {
-   unlink($sFilename);
+   if ( file_exists( $sFilename ) && $bDeleteSrc ) {
+   unlink( $sFilename );
}
 
$oRepoFile = wfFindFile( $sTargetFileName );
-   if ($status->isGood() && $oRepoFile !== false){
+   if ( $status->isGood() && $oRepoFile !== false ){
$oPage = WikiPage::factory( $oRepoFile->getTitle() );
$oPage->doEditContent( new WikitextContent( $sPageText 
), '' );
if ( BsExtensionManager::isContextActive( 
'MW::SecureFileStore::Active' ) ) {
-   return 
Status::newGood(SecureFileStore::secureStuff($oRepoFile->getUrl(), true));
+   return Status::newGood( 
SecureFileStore::secureStuff($oRepoFile->getUrl(), true) );
}
else{
-   return Status::newGood($oRepoFile->getUrl(), 
true);
+   return Status::newGood( $oRepoFile->getUrl(), 
true );
}
}
else{
-   return Status::newFatal 
(wfMessage('bs-filesystemhelper-upload-local-error-create')->plain());
+ 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] retry after a cirrussearch-too-busy-error

2017-07-14 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/365225 )

Change subject: [IMPR] retry after a cirrussearch-too-busy-error
..

[IMPR] retry after a cirrussearch-too-busy-error

Bug: T170647
Change-Id: Iefed5270e6b51cfe7a6f70af81d35c49633901bf
---
M pywikibot/data/api.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/25/365225/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index acb0d19..7f4c80b 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -2188,6 +2188,9 @@
 continue
 raise NoUsername('Failed OAuth authentication for %s: %s'
  % (self.site, info))
+if code == 'cirrussearch-too-busy-error':  # T170647
+self.wait()
+continue
 # raise error
 try:
 # Due to bug T66958, Page's repr may return non ASCII bytes

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

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

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


<    1   2   3   >