[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: Order legends according to the last observed values

2017-08-30 Thread Chelsyx (Code Review)
Chelsyx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374924 )

Change subject: Order legends according to the last observed values
..

Order legends according to the last observed values

Bug: T172452
Change-Id: I1552b8f5adf8dde941b567154b08f9d9c674eb5d
---
M modules/api.R
M modules/key_performance_metrics/api_usage.R
2 files changed, 49 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/24/374924/1

diff --git a/modules/api.R b/modules/api.R
index 5fd6cd1..6ec9d1d 100644
--- a/modules/api.R
+++ b/modules/api.R
@@ -1,6 +1,11 @@
 output$cirrus_aggregate <- renderDygraph({
   split_dataset$cirrus %>%
 tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_fulltext_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Full-text search API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
@@ -12,6 +17,11 @@
 output$morelike_aggregate <- renderDygraph({
   split_dataset$`cirrus (more like)` %>%
 tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_morelike_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Morelike search API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
@@ -21,6 +31,11 @@
 output$open_aggregate <- renderDygraph({
   split_dataset$open %>%
 tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_open_search)) %>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
OpenSearch API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
@@ -31,7 +46,13 @@
 
 output$geo_aggregate <- renderDygraph({
   split_dataset$geo %>%
-tidyr::spread(referrer, calls) %>%polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_geo_search)) %>%
+tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_geo_search)) %>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily Geo 
Search API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
@@ -41,7 +62,13 @@
 
 output$language_aggregate <- renderDygraph({
   split_dataset$language %>%
-tidyr::spread(referrer, calls) %>%polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_language_search)) 
%>%
+tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_language_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Language search API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
@@ -52,6 +79,11 @@
 output$prefix_aggregate <- renderDygraph({
   split_dataset$prefix %>%
 tidyr::spread(referrer, calls) %>%
+{
+  # Reorder columns according to the last observed values:
+  cols <- unlist(polloi::safe_tail(., 1)[, -1])
+  .[, c(1, order(cols, decreasing = TRUE) + 1)]
+} %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_prefix_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Prefix search API usage by referrer", legend_name = "Searches") %>%
 dyLegend(width = 1000, show = "always") %>%
@@ -71,6 +103,11 @@
 temp <- cbind(temp$date, purrr::map_df(temp[, -c(1, 2)], function(x) 
round(100 * x / temp$All, 2)))
   }
   temp %>%
+{
+ 

[MediaWiki-commits] [Gerrit] marvin[master]: WIP: Chore: replace page.js with custom router

2017-08-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374923 )

Change subject: WIP: Chore: replace page.js with custom router
..

WIP: Chore: replace page.js with custom router

Change-Id: I906268458bf72b1c91ed7a0faab18aa0e7592deb
---
M package-lock.json
M package.json
M src/client/index.tsx
A src/client/routers/router.test.ts
A src/client/routers/router.ts
M src/common/components/app/index.tsx
A src/common/components/pages/wiki.tsx
A src/common/routers/api.test.ts
M src/common/routers/api.tsx
A src/common/routers/http-status.ts
M src/common/routers/route.ts
M src/server/index.ts
12 files changed, 128 insertions(+), 64 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/23/374923/1

diff --git a/package-lock.json b/package-lock.json
index b309dbc..61557d1 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1890,6 +1890,13 @@
 "type-is": "1.6.15",
 "utils-merge": "1.0.0",
 "vary": "1.1.1"
+  },
+  "dependencies": {
+"path-to-regexp": {
+  "version": "0.1.7",
+  "resolved": 
"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz;,
+  "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+}
   }
 },
 "external-editor": {
@@ -4114,32 +4121,6 @@
 "registry-url": "3.1.0"
   }
 },
-"page": {
-  "version": "1.7.1",
-  "resolved": "https://registry.npmjs.org/page/-/page-1.7.1.tgz;,
-  "integrity": "sha1-OIbBR7iVSHeDdZs36AChEhO8OO0=",
-  "dev": true,
-  "requires": {
-"path-to-regexp": "1.2.1"
-  },
-  "dependencies": {
-"isarray": {
-  "version": "0.0.1",
-  "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz;,
-  "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=",
-  "dev": true
-},
-"path-to-regexp": {
-  "version": "1.2.1",
-  "resolved": 
"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.2.1.tgz;,
-  "integrity": "sha1-szcFwUAjTYc8hyHHuf2LVB7Tr/k=",
-  "dev": true,
-  "requires": {
-"isarray": "0.0.1"
-  }
-}
-  }
-},
 "pako": {
   "version": "0.2.9",
   "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz;,
@@ -4216,9 +4197,9 @@
   "dev": true
 },
 "path-to-regexp": {
-  "version": "0.1.7",
-  "resolved": 
"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz;,
-  "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w="
+  "version": "2.0.0",
+  "resolved": 
"https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-2.0.0.tgz;,
+  "integrity": 
"sha512-DPZblKdQsbV6B3fHknj89h6Nw/Z5zFK0nFX+DVN7y8a+IUHf9taJWvMK+ue0+AEjXrke0KVRCcfm2pOYGSRk8g=="
 },
 "path-type": {
   "version": "2.0.0",
diff --git a/package.json b/package.json
index 1fad3e0..75b2aa6 100644
--- a/package.json
+++ b/package.json
@@ -45,6 +45,7 @@
   },
   "dependencies": {
 "express": "^4.15.3",
+"path-to-regexp": "^2.0.0",
 "preact": "^8.2.1",
 "preact-render-to-string": "^3.6.3"
   },
@@ -70,7 +71,6 @@
 "mocha": "^3.5.0",
 "nodemon": "^1.11.0",
 "npm-run-all": "^4.0.2",
-"page": "^1.7.1",
 "prettier": "^1.6.1",
 "sinon": "^3.0.0",
 "style-loader": "^0.18.2",
diff --git a/src/client/index.tsx b/src/client/index.tsx
index 16fc844..657e09d 100644
--- a/src/client/index.tsx
+++ b/src/client/index.tsx
@@ -1,20 +1,15 @@
 import "./index.css";
-import * as page from "page";
-import { api } from "../common/routers/api";
 import { render } from "preact";
+import { router } from "./routers/router";
+import { routes } from "../common/routers/api";
 
 const root = document.getElementById("root");
 if (!root) {
   throw new Error('Missing element with "root" ID.');
 }
 
-Object.keys(api).forEach(name => {
-  const route = api[name];
-  page(route.path, () =>
-route
-  .response()
-  .then((m: any) =>
-render(m.default(), root, root.lastElementChild || undefined)
-  )
+router(routes)
+  .route(window.location.pathname)
+  .then((module: any) =>
+render(module.default(), root, root.lastElementChild || undefined)
   );
-});
diff --git a/src/client/routers/router.test.ts 
b/src/client/routers/router.test.ts
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/src/client/routers/router.test.ts
diff --git a/src/client/routers/router.ts b/src/client/routers/router.ts
new file mode 100644
index 000..c75e4be
--- /dev/null
+++ b/src/client/routers/router.ts
@@ -0,0 +1,13 @@
+import { Route } from "../../common/routers/route";
+
+export const router = (routes: Route[]) => {
+  return {
+route(path: string) {
+  const route = routes.find(route => !!route.path.exec(path));
+  if (route) {
+return route.response();
+  }
+  return Promise.reject(new 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalPreferences[master]: Globalize preferences that specify class instead of type

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

Change subject: Globalize preferences that specify class instead of type
..


Globalize preferences that specify class instead of type

Bug: T172083
Change-Id: I33bb4fabe6156c3d35a776d6ca2d68ba832c86b7
---
M includes/Hooks.php
1 file changed, 36 insertions(+), 9 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index a9dda1b..f18f1f1 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -15,7 +15,7 @@
 * Special:GlobalPrefs
 * @var array
 */
-   protected static $badPrefs = [
+   protected static $prefsBlacklist = [
// Stored in user table, doesn't work yet
'realname',
// @todo Show CA user id / shared user table id?
@@ -31,10 +31,21 @@
 * Preference types that we should not add a checkbox for
 * @var array
 */
-   protected static $badTypes = [
+   protected static $typeBlacklist = [
'info',
'hidden',
'api',
+   ];
+
+   /**
+* Preference classes that are allowed to be global
+* @var array
+*/
+   protected static $classWhitelist = [
+   'HTMLSelectOrOtherField',
+   'CirrusSearch\HTMLCompletionProfileSettings',
+   'NewHTMLCheckField',
+   'HTMLFeatureField',
];
 
/**
@@ -134,7 +145,7 @@
foreach ( $formData as $name => $value ) {
if ( substr( $name, -strlen( 'global' ) ) === 'global' 
&& $value === true ) {
$realName = substr( $name, 0, -strlen( 
'-global' ) );
-   if ( isset( $formData[$realName] ) && 
!in_array( $realName, self::$badPrefs ) ) {
+   if ( isset( $formData[$realName] ) && 
!in_array( $realName, self::$prefsBlacklist ) ) {
$prefs[$realName] = 
$formData[$realName];
} else {
// FIXME: Handle checkbox matrixes 
properly
@@ -205,11 +216,8 @@
}
foreach ( $prefs as $name => $info ) {
// FIXME: This whole code section sucks
-   if ( isset( $info['type'] )
-   && substr( $name, -strlen( 'global' ) ) 
!== 'global'
-   && !isset( $prefs["$name-global"] )
-   && !in_array( $info['type'], 
self::$badTypes )
-   && !in_array( $name, self::$badPrefs )
+   if ( !isset( $prefs["$name-global"] )
+   && self::isGlobalizablePreference( 
$name, $info )
) {
$prefs = wfArrayInsertAfter( $prefs, [
"$name-global" => [
@@ -220,7 +228,7 @@
'cssclass' => 
'mw-globalprefs-global-check',
]
], $name );
-   } elseif ( in_array( $name, self::$badPrefs ) ) 
{
+   } elseif ( in_array( $name, 
self::$prefsBlacklist ) ) {
$prefs[$name]['type'] = 'hidden';
}
}
@@ -265,4 +273,23 @@
 
return true;
}
+
+   /**
+* Checks whether the given preference is localizable
+*
+* @param string $name Preference name
+* @param array|mixed $info Preference description, by reference to 
avoid unnecessary cloning
+* @return bool
+*/
+   private static function isGlobalizablePreference( $name, &$info ) {
+   $isAllowedType = isset( $info['type'] )
+   && !in_array( $info['type'], self::$typeBlacklist )
+   && !in_array( $name, self::$prefsBlacklist );
+
+   $isAllowedClass = isset( $info['class'] )
+   && in_array( $info['class'], self::$classWhitelist );
+
+   return substr( $name, -strlen( 'global' ) ) !== 'global'
+   && ( $isAllowedType || $isAllowedClass );
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33bb4fabe6156c3d35a776d6ca2d68ba832c86b7
Gerrit-PatchSet: 2
Gerrit-Project: 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add mysql_strict role

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

Change subject: Add mysql_strict role
..


Add mysql_strict role

Adds a role called 'mysql_strict' which configures MediaWiki
to use MySQL/MariaDB in strict mode (TRADITIONAL,ONLY_FULL_GROUP_BY).

Change-Id: Ie4cfcb78324d9d3672662893b09ef69779aa03c7
---
A puppet/modules/role/manifests/mysql_strict.pp
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/puppet/modules/role/manifests/mysql_strict.pp 
b/puppet/modules/role/manifests/mysql_strict.pp
new file mode 100644
index 000..8db70ac
--- /dev/null
+++ b/puppet/modules/role/manifests/mysql_strict.pp
@@ -0,0 +1,14 @@
+# == Class: role::mysql_strict
+# Configures MySQL/MariaDB to use strict mode.
+# See https://phabricator.wikimedia.org/T112637
+# Note: this is meant for testing new code.
+# Not all old code is updated to work in strict mode yet.
+#
+class role::mysql_strict {
+mediawiki::settings { 'mysql_strict':
+values => {
+wgSQLMode => 'TRADITIONAL,ONLY_FULL_GROUP_BY',
+},
+}
+}
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4cfcb78324d9d3672662893b09ef69779aa03c7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Fix interwiki links on Labs

2017-08-30 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374922 )

Change subject: Fix interwiki links on Labs
..

Fix interwiki links on Labs

Bug: T69931
Change-Id: I4b383d07d023aef34cedebf1ac4c72f175e7a8be
---
M wmf-config/CommonSettings.php
A wmf-config/interwiki-labs.php
2 files changed, 978 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fa7af44..9c3cd35 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1353,7 +1353,11 @@
$wgDiff = false;
 }
 
-$wgInterwikiCache = include_once "$wmfConfigDir/interwiki.php";
+if ( $wmfRealm === 'labs' ) {
+   include_once "$wmfConfigDir/interwiki-labs.php";
+} else {
+   include_once "$wmfConfigDir/interwiki.php";
+}
 
 $wgEnotifUseJobQ = true;
 
diff --git a/wmf-config/interwiki-labs.php b/wmf-config/interwiki-labs.php
new file mode 100644
index 000..996f357
--- /dev/null
+++ b/wmf-config/interwiki-labs.php
@@ -0,0 +1,973 @@
+ '0 https://www.acronymfinder.com/$1.html',
+   '__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
+   '__global:advogato' => '0 http://www.advogato.org/$1',
+   '__global:aew' => '0 https://wiki.arabeyes.org/$1',
+   '__global:appropedia' => '0 http://www.appropedia.org/$1',
+   '__global:aquariumwiki' => '0 http://www.theaquariumwiki.com/$1',
+   '__global:arborwiki' => '0 https://localwiki.org/ann-arbor/$1',
+   '__global:arxiv' => '0 https://arxiv.org/abs/$1',
+   '__global:atmwiki' => '0 http://www.otterstedt.de/wiki/index.php/$1',
+   '__global:baden' => '0 http://www.stadtwiki-baden-baden.de/wiki/$1/',
+   '__global:battlestarwiki' => '0 http://en.battlestarwiki.org/wiki/$1',
+   '__global:bcnbio' => '0 
http://historiapolitica.bcn.cl/resenas_parlamentarias/wiki/$1',
+   '__global:beacha' => '0 http://www.beachapedia.org/$1',
+   '__global:betawiki' => '0 https://translatewiki.net/wiki/$1',
+   '__global:bibcode' => '0 http://adsabs.harvard.edu/abs/$1',
+   '__global:bibliowiki' => '0 https://biblio.wiki/wiki/$1',
+   '__global:bluwiki' => '0 http://bluwiki.com/go/$1',
+   '__global:blw' => '0 http://britainloveswikipedia.org/wiki/$1',
+   '__global:botwiki' => '0 http://botwiki.sno.cc/wiki/$1',
+   '__global:boxrec' => '0 http://www.boxrec.com/media/index.php?$1',
+   '__global:brickwiki' => '0 http://www.brickwiki.info/wiki/$1',
+   '__global:bugzilla' => '1 
https://bugzilla.wikimedia.org/show_bug.cgi?id=$1',
+   '__global:bulba' => '0 http://bulbapedia.bulbagarden.net/wiki/$1',
+   '__global:c' => '1 https://commons.wikimedia.org/wiki/$1',
+   '__global:c2' => '0 http://c2.com/cgi/wiki?$1',
+   '__global:c2find' => '0 http://c2.com/cgi/wiki?FindPage=$1',
+   '__global:cache' => '0 //www.google.com/search?q=cache:$1',
+   '__global:ĉej' => '0 
http://esperanto.blahus.cz/cxej/vikio/index.php/$1',
+   '__global:cellwiki' => '0 http://cell.wikia.com/wiki/$1',
+   '__global:centralwikia' => '0 http://community.wikia.com/wiki/$1',
+   '__global:chej' => '0 
http://esperanto.blahus.cz/cxej/vikio/index.php/$1',
+   '__global:choralwiki' => '0 http://www.cpdl.org/wiki/index.php/$1',
+   '__global:citizendium' => '0 http://en.citizendium.org/wiki/$1',
+   '__global:ckwiss' => '0 
http://www.ck-wissen.de/ckwiki/index.php?title=$1',
+   '__global:comixpedia' => '0 
http://www.comixpedia.org/index.php?title=$1',
+   '__global:commons' => '1 https://commons.wikimedia.org/wiki/$1',
+   '__global:communityscheme' => '0 
http://community.schemewiki.org/?c=s=$1',
+   '__global:communitywiki' => '0 http://www.communitywiki.org/$1',
+   '__global:comune' => '0 http://rete.comuni-italiani.it/wiki/$1',
+   '__global:creativecommons' => '0 //creativecommons.org/licenses/$1',
+   '__global:creativecommonswiki' => '0 
https://wiki.creativecommons.org/$1',
+   '__global:cxej' => '0 
http://esperanto.blahus.cz/cxej/vikio/index.php/$1',
+   '__global:dcc' => '0 http://www.dccwiki.com/$1',
+   '__global:dcdatabase' => '0 http://dc.wikia.com/$1',
+   '__global:dcma' => '0 
http://christian-morgenstern.de/dcma/index.php?title=$1',
+   '__global:delicious' => '0 //www.delicious.com/tag/$1',
+   '__global:devmo' => '0 https://developer.mozilla.org/en/docs/$1',
+   '__global:dictionary' => '0 
http://www.dict.org/bin/Dict?Database=*=Dict1=*=$1',
+   '__global:dict' => '0 
http://www.dict.org/bin/Dict?Database=*=Dict1=*=$1',
+   '__global:disinfopedia' => '0 http://www.sourcewatch.org/index.php/$1',
+   '__global:distributedproofreaders' => '0 http://www.pgdp.net/wiki/$1',
+   '__global:distributedproofreadersca' => '0 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Give ores-admin users lsof, rather than the deployment user

2017-08-30 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374832 )

Change subject: Give ores-admin users lsof, rather than the deployment user
..


Give ores-admin users lsof, rather than the deployment user

Bug: T174402
Change-Id: I1d0d14c8fb0c968f65ecc67b2f112a3813b393df
---
M modules/admin/data/data.yaml
M modules/ores/manifests/web.pp
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index b26e87f..5a4bca1 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -550,7 +550,8 @@
 gid: 782
 members: [awight, halfak, ladsgroup]
 privileges: ['ALL = NOPASSWD: /usr/sbin/service uwsgi-ores *',
- 'ALL = NOPASSWD: /usr/sbin/service celery-ores-worker *']
+ 'ALL = NOPASSWD: /usr/sbin/service celery-ores-worker *',
+ 'ALL = NOPASSWD: /usr/bin/lsof *']
   sectools-roots:
 description: root access on servers for security tools
 gid: 783
diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp
index 5cdcd4c..5378bf7 100644
--- a/modules/ores/manifests/web.pp
+++ b/modules/ores/manifests/web.pp
@@ -21,7 +21,6 @@
 $sudo_rules = [
 'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-ores *',
 'ALL=(root) NOPASSWD: /usr/sbin/service celery-ores-worker *',
-'ALL=(root) NOPASSWD: /usr/bin/lsof *',
 ]
 
 $processes = $::processorcount * $workers_per_core

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d0d14c8fb0c968f65ecc67b2f112a3813b393df
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Awight 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: Ottomata 
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...rainbow[develop]: SRP visit times

2017-08-30 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374920 )

Change subject: SRP visit times
..


SRP visit times

Functional but still has the following TODOs:
- reorder how the %-lang combos show up in the legend
- once more of the data has been backfilled, need to add some
  general comments on trends

Bug: T170468
Change-Id: I690230e3d3a7a41156f5878169577a62f52ddeb6
---
M CHANGELOG.md
M modules/page_visit_times.R
A tab_documentation/srp_surv.md
M tab_documentation/survival.md
M ui.R
M utils.R
6 files changed, 127 insertions(+), 7 deletions(-)

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



diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7cb188e..099e8a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## 2017/08/30
+- Added SRP visit times ([T170468](https://phabricator.wikimedia.org/T170468))
+- Added [dygraph-based rolling 
periods](https://rstudio.github.io/dygraphs/gallery-roll-periods.html) to page 
visit times modules
+
 ## 2017/08/29
 - Added support for breakdown of API usage by referrer 
([T172452](https://phabricator.wikimedia.org/T172452))
 - Added morelike API usage (see [Gerrit change 
345863](https://gerrit.wikimedia.org/r/#/c/345863/)) for more details
diff --git a/modules/page_visit_times.R b/modules/page_visit_times.R
index 115cbb4..d312fcc 100644
--- a/modules/page_visit_times.R
+++ b/modules/page_visit_times.R
@@ -1,11 +1,34 @@
 output$lethal_dose_plot <- renderDygraph({
-  user_page_visit_dataset %>%
+  req(length(input$filter_lethal_dose_plot) > 0)
+  user_page_visit_dataset[, c("date", input$filter_lethal_dose_plot)] %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot)) %>%
-polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
we have lost N% of the users") %>%
+polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
N% users leave the visited page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
+dyRoller(rollPeriod = input$rolling_lethal_dose_plot) %>%
 dyLegend(labelsDiv = "lethal_dose_plot_legend") %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-04-25"), "S (rates)", labelLoc = "bottom")
 })
+
+output$srp_ld_plot <- renderDygraph({
+  req(length(input$filter_srp_ld_plot) > 0 && 
length(input$language_srp_ld_plot) > 0)
+  serp_page_visit_dataset[, c("date", "language", input$filter_srp_ld_plot)] 
%>%
+tidyr::gather(LD, time, -c(date, language)) %>%
+dplyr::filter(language %in% input$language_srp_ld_plot) %>%
+dplyr::transmute(
+  date = date, time = time,
+  label = paste0(LD, " (", language, ")")
+) %>%
+tidyr::spread(label, time) %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot)) %>%
+polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at N% 
users leave the search results page") %>%
+dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
+   axisLabelWidth = 100, pixelsPerLabel = 80) %>%
+dyRoller(rollPeriod = input$rolling_srp_ld_plot) %>%
+dyLegend(labelsDiv = "srp_ld_plot_legend") %>%
+dyRangeSelector(fillColor = "", strokeColor = "") %>%
+dyEvent(as.Date("2017-04-25"), "S (sampling rates)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-06-15"), "SS (sister search)", labelLoc = "bottom")
+})
diff --git a/tab_documentation/srp_surv.md b/tab_documentation/srp_surv.md
new file mode 100644
index 000..254818f
--- /dev/null
+++ b/tab_documentation/srp_surv.md
@@ -0,0 +1,23 @@
+How long Wikipedia searchers stay on the search result pages
+===
+
+When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a full-text search results page (SRP), we can track how long that page is 
"alive" before the user either closes the tab, clicks on a result, or navigates 
elsewhere.
+
+To summarize the results on a daily basis, we record a set of statistics based 
on a measure formally known as "[median lethal 
dose](https://en.wikipedia.org/wiki/Median_lethal_dose)". This graph shows the 
length of time that must pass before N% of the users leave the search results 
page. When the number goes up, we can infer that users are staying on the pages 
longer.
+
+Outages and 

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

2017-08-30 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374921 )

Change subject: Merging from 89099128e9ff47389b17e33032bc45cbc3b43f4e:
..

Merging from 89099128e9ff47389b17e33032bc45cbc3b43f4e:

Merge "Refactor embed.html to use ResultView"

Change-Id: If8b1807e45a369fdaf4e34bea119f2a01de98d7e
---
M embed.html
M i18n/arab.json
M i18n/bg.json
M i18n/br.json
M i18n/da.json
M i18n/es.json
M i18n/it.json
M i18n/kp.json
M i18n/lb.json
A i18n/mwl.json
M i18n/pl.json
M i18n/pt.json
M i18n/su.json
M i18n/uk.json
M index.html
R js/embed.vendor.min.83c07f3aeb6783df16e8.js
A js/embed.wdqs.min.93db9e5da53305b92813.js
D js/embed.wdqs.min.e30b2988935354028587.js
A js/wdqs.min.6999b60ebc8506c74556.js
D js/wdqs.min.f0676a64b044fcf35d70.js
20 files changed, 73 insertions(+), 127 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui-deploy 
refs/changes/21/374921/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8b1807e45a369fdaf4e34bea119f2a01de98d7e
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: Breakdown API calls by referer class

2017-08-30 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374669 )

Change subject: Breakdown API calls by referer class
..


Breakdown API calls by referer class

Bug: T172452
Change-Id: Ic70d7054e02569eb8545dd347026c7f77321ab2c
---
M modules/api.R
M modules/key_performance_metrics/api_usage.R
A tab_documentation/referer_breakdown.md
M ui.R
M utils.R
5 files changed, 95 insertions(+), 27 deletions(-)

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



diff --git a/modules/api.R b/modules/api.R
index dc8e332..5fd6cd1 100644
--- a/modules/api.R
+++ b/modules/api.R
@@ -3,6 +3,7 @@
 tidyr::spread(referrer, calls) %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_fulltext_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Full-text search API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-29"), "U (new UDF)", labelLoc = "bottom")
@@ -13,6 +14,7 @@
 tidyr::spread(referrer, calls) %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_morelike_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Morelike search API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector
 })
 
@@ -21,6 +23,7 @@
 tidyr::spread(referrer, calls) %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_open_search)) %>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
OpenSearch API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-29"), "U (new UDF)", labelLoc = "bottom")
@@ -30,6 +33,7 @@
   split_dataset$geo %>%
 tidyr::spread(referrer, calls) %>%polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_geo_search)) %>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily Geo 
Search API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-29"), "U (new UDF)", labelLoc = "bottom")
@@ -39,6 +43,7 @@
   split_dataset$language %>%
 tidyr::spread(referrer, calls) %>%polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_language_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Language search API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-29"), "U (new UDF)", labelLoc = "bottom")
@@ -49,7 +54,27 @@
 tidyr::spread(referrer, calls) %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_prefix_search)) 
%>%
 polloi::make_dygraph(xlab = "Date", ylab = "Searches", title = "Daily 
Prefix search API usage by referrer", legend_name = "Searches") %>%
+dyLegend(width = 1000, show = "always") %>%
 dyRangeSelector %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-06-29"), "U (new UDF)", labelLoc = "bottom")
 })
+
+output$referer_breakdown_plot <- renderDygraph({
+  temp <- split_dataset %>%
+dplyr::bind_rows(.id = "api") %>%
+dplyr::filter(date >= "2017-06-29") %>%
+dplyr::group_by(date, referrer) %>%
+dplyr::summarize(calls = sum(calls, na.rm = TRUE)) %>%
+tidyr::spread(referrer, calls)
+  if (input$referer_breakdown_prop) {
+temp <- cbind(temp$date, purrr::map_df(temp[, -c(1, 2)], function(x) 
round(100 * x / temp$All, 2)))
+  }
+  temp %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_referer_breakdown)) %>%
+polloi::make_dygraph(xlab = "Date",
+ ylab = ifelse(input$referer_breakdown_prop, "API 
Calls Share (%)", "API Calls"),
+ title = "Daily API usage by referrer", legend_name = 
"API Calls") %>%
+dyLegend(width = 1000, show = "always") %>%
+dyRangeSelector
+})
diff --git a/modules/key_performance_metrics/api_usage.R 
b/modules/key_performance_metrics/api_usage.R
index 3732619..1980dda 100644
--- a/modules/key_performance_metrics/api_usage.R
+++ 

[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: [WIP] SRP visit times

2017-08-30 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374920 )

Change subject: [WIP] SRP visit times
..

[WIP] SRP visit times

Functional but still has the following TODOs:
- reorder how the %-lang combos show up in the legend
- once more of the data has been backfilled, need to add some
  general comments on trends

Bug: T170468
Change-Id: I690230e3d3a7a41156f5878169577a62f52ddeb6
---
M CHANGELOG.md
M modules/page_visit_times.R
A tab_documentation/srp_surv.md
M tab_documentation/survival.md
M ui.R
M utils.R
6 files changed, 127 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/20/374920/1

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7cb188e..099e8a1 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 All notable changes to this project will be documented in this file.
 
+## 2017/08/30
+- Added SRP visit times ([T170468](https://phabricator.wikimedia.org/T170468))
+- Added [dygraph-based rolling 
periods](https://rstudio.github.io/dygraphs/gallery-roll-periods.html) to page 
visit times modules
+
 ## 2017/08/29
 - Added support for breakdown of API usage by referrer 
([T172452](https://phabricator.wikimedia.org/T172452))
 - Added morelike API usage (see [Gerrit change 
345863](https://gerrit.wikimedia.org/r/#/c/345863/)) for more details
diff --git a/modules/page_visit_times.R b/modules/page_visit_times.R
index 115cbb4..d312fcc 100644
--- a/modules/page_visit_times.R
+++ b/modules/page_visit_times.R
@@ -1,11 +1,34 @@
 output$lethal_dose_plot <- renderDygraph({
-  user_page_visit_dataset %>%
+  req(length(input$filter_lethal_dose_plot) > 0)
+  user_page_visit_dataset[, c("date", input$filter_lethal_dose_plot)] %>%
 polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_lethal_dose_plot)) %>%
-polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
we have lost N% of the users") %>%
+polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at which 
N% users leave the visited page") %>%
 dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
axisLabelWidth = 100, pixelsPerLabel = 80) %>%
+dyRoller(rollPeriod = input$rolling_lethal_dose_plot) %>%
 dyLegend(labelsDiv = "lethal_dose_plot_legend") %>%
 dyRangeSelector(fillColor = "", strokeColor = "") %>%
 dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom") 
%>%
 dyEvent(as.Date("2017-04-25"), "S (rates)", labelLoc = "bottom")
 })
+
+output$srp_ld_plot <- renderDygraph({
+  req(length(input$filter_srp_ld_plot) > 0 && 
length(input$language_srp_ld_plot) > 0)
+  serp_page_visit_dataset[, c("date", "language", input$filter_srp_ld_plot)] 
%>%
+tidyr::gather(LD, time, -c(date, language)) %>%
+dplyr::filter(language %in% input$language_srp_ld_plot) %>%
+dplyr::transmute(
+  date = date, time = time,
+  label = paste0(LD, " (", language, ")")
+) %>%
+tidyr::spread(label, time) %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, input$smoothing_srp_ld_plot)) %>%
+polloi::make_dygraph(xlab = "", ylab = "Time (s)", title = "Time at N% 
users leave the search results page") %>%
+dyAxis("x", ticker = "Dygraph.dateTicker", axisLabelFormatter = 
polloi::custom_axis_formatter,
+   axisLabelWidth = 100, pixelsPerLabel = 80) %>%
+dyRoller(rollPeriod = input$rolling_srp_ld_plot) %>%
+dyLegend(labelsDiv = "srp_ld_plot_legend") %>%
+dyRangeSelector(fillColor = "", strokeColor = "") %>%
+dyEvent(as.Date("2017-04-25"), "S (sampling rates)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-06-15"), "SS (sister search)", labelLoc = "bottom")
+})
diff --git a/tab_documentation/srp_surv.md b/tab_documentation/srp_surv.md
new file mode 100644
index 000..254818f
--- /dev/null
+++ b/tab_documentation/srp_surv.md
@@ -0,0 +1,23 @@
+How long Wikipedia searchers stay on the search result pages
+===
+
+When someone is randomly selected for search satisfaction tracking (using our 
[TSS2 schema](https://meta.wikimedia.org/wiki/Schema:TestSearchSatisfaction2)), 
we use a check-in system and survival analysis to estimate how long users stay 
on visited pages. When a Wikipedia visitor searches using autocomplete and ends 
up on a full-text search results page (SRP), we can track how long that page is 
"alive" before the user either closes the tab, clicks on a result, or navigates 
elsewhere.
+
+To summarize the results on a daily basis, we record a set of statistics based 
on a measure formally known as "[median lethal 
dose](https://en.wikipedia.org/wiki/Median_lethal_dose)". This graph shows the 
length of time that must pass before N% of the users leave the search results 
page. When the number goes up, we can infer that users are staying 

[MediaWiki-commits] [Gerrit] marvin[master]: Chore: convert Webpack configuration to TypeScript

2017-08-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374919 )

Change subject: Chore: convert Webpack configuration to TypeScript
..

Chore: convert Webpack configuration to TypeScript

Change-Id: Ib4085cc6780e7c7bbabe2e97c2af943472216e1f
---
M package-lock.json
M package.json
R webpack.config.ts
3 files changed, 33 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/19/374919/1

diff --git a/package-lock.json b/package-lock.json
index 5e46a5e..bb7dd26 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -32,6 +32,15 @@
 "@types/node": "8.0.24"
   }
 },
+"@types/extract-text-webpack-plugin": {
+  "version": "2.1.0",
+  "resolved": 
"https://registry.npmjs.org/@types/extract-text-webpack-plugin/-/extract-text-webpack-plugin-2.1.0.tgz;,
+  "integrity": "sha1-2w64WdG2HqXSoLda00tP8xehg3k=",
+  "dev": true,
+  "requires": {
+"@types/webpack": "3.0.9"
+  }
+},
 "@types/mime": {
   "version": "1.3.1",
   "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.1.tgz;,
diff --git a/package.json b/package.json
index 580b676..d7a1462 100644
--- a/package.json
+++ b/package.json
@@ -51,6 +51,7 @@
   "devDependencies": {
 "@types/assets-webpack-plugin": "^3.5.0",
 "@types/express": "^4.0.36",
+"@types/extract-text-webpack-plugin": "^2.1.0",
 "@types/mocha": "^2.2.41",
 "@types/node": "^8.0.20",
 "@types/touch": "^3.1.0",
diff --git a/webpack.config.js b/webpack.config.ts
similarity index 79%
rename from webpack.config.js
rename to webpack.config.ts
index d496471..0bb11f2 100644
--- a/webpack.config.js
+++ b/webpack.config.ts
@@ -1,7 +1,8 @@
 /* eslint-env node */
-const path = require("path");
-const AssetsPlugin = require("assets-webpack-plugin");
-const ExtractTextPlugin = require("extract-text-webpack-plugin");
+import * as AssetsPlugin from "assets-webpack-plugin";
+import * as ExtractTextPlugin from "extract-text-webpack-plugin";
+import * as path from "path";
+import * as webpack from "webpack";
 
 const isProd = process.env.NODE_ENV === "production";
 const isVerbose = Boolean(JSON.parse(process.env.VERBOSE || "false"));
@@ -15,24 +16,19 @@
 // There is no builtin Stats "warnings" preset.
 // https://github.com/webpack/webpack/blob/7fe0371/lib/Stats.js#L886
 // https://github.com/webpack/webpack/blob/7fe0371/lib/Stats.js#L101-L131
-const STATS = isVerbose
-  ? {
-  all: true
-}
-  : {
-  all: false, // Default all options to false.
-  errors: true,
-  errorDetails: true,
-  moduleTrace: true,
-  warnings: true
-};
+const stats = {
+  all: isVerbose, // Default all outputs to verbosity.
+  errors: true,
+  errorDetails: true,
+  warnings: true
+};
 
-module.exports = {
+const configuration: webpack.Configuration = {
   entry: {
 index: "./src/client/index"
   },
 
-  stats: STATS,
+  stats,
 
   output: {
 path: paths.client.output,
@@ -90,20 +86,20 @@
 // browser.
 overlay: { warnings: true, errors: true },
 
-stats: STATS
-  },
-
-  plugins: [
-new ExtractTextPlugin({
-  filename: isProd ? "[name].[contenthash].css" : "[name].css"
-})
-  ]
+stats
+  }
 };
+
+configuration.plugins = [
+  new ExtractTextPlugin({
+filename: isProd ? "[name].[contenthash].css" : "[name].css"
+  })
+];
 
 if (isProd) {
   // Generate a json manifest with the entry points and assets names to use
   // in the server to pass to the HTML page template
-  module.exports.plugins.push(
+  configuration.plugins.push(
 new AssetsPlugin({
   prettyPrint: true,
   filename: "assets-manifest.json",
@@ -111,3 +107,5 @@
 })
   );
 }
+
+export default configuration;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4085cc6780e7c7bbabe2e97c2af943472216e1f
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Chore: lower Prettier violations to warnings

2017-08-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374918 )

Change subject: Chore: lower Prettier violations to warnings
..

Chore: lower Prettier violations to warnings

Reduce Prettier style offenses to warnings, not errors. Errors should
be reserved for in-your-face, don't compile, it's too dangerous to
continue type problems not whitespace concerns. Since we forbid warnings
on master, this has no impact to the end result but does allow for quick
functional iteration with styles resolution reserved for a final
`npm -s run format` pass.

Syntax note: also replace all priority codes (0-2) with text (`off`,
`warn`, or `erorr`) for consistency.

Change-Id: Ie53037c0f651f1e7ec6d1489435d9915d50a5482
---
M .eslintrc.json
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/18/374918/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 25c8bbd..55ca5e1 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -7,9 +7,9 @@
 "prettier"
   ],
   "rules": {
-"prettier/prettier": "error",
+"prettier/prettier": "warn",
 "max-len": [
-  1,
+  "warn",
   {
 "tabWidth": 2,
 "ignoreUrls": true,
@@ -35,14 +35,14 @@
   "files": [ "*.ts", "*.tsx" ],
   "rules": {
 // Unnecessary for a typed language.
-"jsdoc/require-returns-type": 0,
+"jsdoc/require-returns-type": "off",
 
 // Disable rules with known issues.
 // https://github.com/eslint/typescript-eslint-parser#known-issues
-"no-undef": 0,
-"no-unused-vars": 0,
-"no-useless-constructor": 0,
-"space-infix-ops": 0
+"no-undef": "off",
+"no-unused-vars": "off",
+"no-useless-constructor": "off",
+"space-infix-ops": "off"
   }
 }
   ]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie53037c0f651f1e7ec6d1489435d9915d50a5482
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Chore: use verb:noun for package scripts

2017-08-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374917 )

Change subject: Chore: use verb:noun for package scripts
..

Chore: use verb:noun for package scripts

Flip noun:verb for build and start NPM sub-scripts. This seems more
consistent with other scripts in the package.

Change-Id: I77ff5676e97d4674091393b1b3b364ba07694dc3
---
M package.json
M test/server/templates/page.test.ts
2 files changed, 7 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/17/374917/1

diff --git a/package.json b/package.json
index 9b1b86d..580b676 100644
--- a/package.json
+++ b/package.json
@@ -4,9 +4,9 @@
   "description": "An API driven skin for MediaWiki",
   "scripts": {
 "--- PRIMARY ---": "# Frequent user scripts.",
-"start": "npm-run-all --silent clean --parallel 'client:watch -- -d' 
server:watch",
-"watch": "run-p -s start test:watch",
-"build": "NODE_ENV=production npm-run-all --silent clean --parallel 
server:build 'client:build -- -p'",
+"start": "npm-run-all --silent clean --parallel start:\\*",
+"watch": "run-p -s start:\\* test:watch",
+"build": "NODE_ENV=production npm-run-all --silent clean --parallel 
build:\\*",
 "format": "npm run -s lint -- --fix",
 "lint": "eslint --cache --max-warnings 0 --ext ts,tsx,js,json .",
 "test": "run-p -s lint build mocha",
@@ -17,10 +17,10 @@
 "--- HOOKS ---": "# Triggered scripts.",
 "precommit": "npm test -s",
 "--- INTERNAL ---": "# Private scripts.",
-"server:watch": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node -P src/server src/server'",
-"server:build": "tsc -p src/server",
-"client:watch": "webpack-dev-server -w",
-"client:build": "webpack"
+"start:server": "nodemon -i dist -i src/client -e js,json,ts,tsx 
${VERBOSE:--q} -x 'ts-node -P src/server src/server'",
+"start:client": "webpack-dev-server -dw",
+"build:server": "tsc -p src/server",
+"build:client": "webpack -p"
   },
   "repository": {
 "type": "git",
diff --git a/test/server/templates/page.test.ts 
b/test/server/templates/page.test.ts
index 4b0bb29..a993a22 100644
--- a/test/server/templates/page.test.ts
+++ b/test/server/templates/page.test.ts
@@ -1,4 +1,3 @@
-/* eslint-env mocha */
 import * as assert from "assert";
 import page from "../../../src/server/templates/page";
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77ff5676e97d4674091393b1b3b364ba07694dc3
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] marvin[master]: Doc: add environment variables

2017-08-30 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374916 )

Change subject: Doc: add environment variables
..

Doc: add environment variables

- Document environment variables considered.
- Add examples for silent and verbose NPM task execution.
- Include URL protocol in staging example.
- Use "and" consistently.
- Fix typo.

Change-Id: I6cf2a5810cf0bb9d7df4831bad9674b523bd6a22
---
M docs/development.md
M docs/setting-a-staging-server.md
2 files changed, 20 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/16/374916/1

diff --git a/docs/development.md b/docs/development.md
index c239748..df8208b 100644
--- a/docs/development.md
+++ b/docs/development.md
@@ -32,7 +32,7 @@
 will detect changes and re-compile and re-launch the application, so just
 go and refresh the browser window when it is done.
 
-* To run **linting & tests**:
+* To run **linting and tests**:
   * `npm test`
   * If you want to watch files and run the linting and tests when some change,
 you can run:
@@ -40,6 +40,12 @@
 
 * To automatically format source code and fix linting errors, you can run:
   * `npm run format`
+
+* To suppress NPM-specific output, run the command with the `-s` option. e.g.:
+  * `npm -s start`.
+
+* To debug the build process, enable verbose output. e.g.:
+  * `VERBOSE=true npm run test:watch`.
 
 ## Running the production version
 
@@ -109,3 +115,12 @@
   response.status(404).send("Not found");
 });
 ```
+
+## Environment variables
+
+* `NODE_ENV`: unset or `production`; defaults to development. Controls debug
+  functionality.
+* `PORT`: unset or a natural number; defaults to 3000. Controls server port.
+* `VERBOSE`: unset or `1`; defaults to disabled. Controls build output.
+* `WEBPACK_DEV_SERVER_PORT`: unset or a natural number; defaults to 8080.
+  Controls debug client port.
diff --git a/docs/setting-a-staging-server.md b/docs/setting-a-staging-server.md
index 2267746..fda3076 100644
--- a/docs/setting-a-staging-server.md
+++ b/docs/setting-a-staging-server.md
@@ -21,8 +21,8 @@
 * Fill up the details (name)
 * Under **Source**, choose a debian based image. Debian 8.9-jessie at the time
   of writing this is the recommended one with included node source 
repositories.
-* Under **Flavor**, choose an appropiate size depending on your group's 
capacity
-  and who is going to use the server.
+* Under **Flavor**, choose an appropriate size depending on your group's
+  capacity and who is going to use the server.
 * Under **Security Groups**, add the **web** group so that web ports on the VM
   are exposed.
 * Click on **Launch Instance** and wait!
@@ -58,8 +58,8 @@
 $ nodejs -e "require('http').createServer((req, res) => res.end('hello world 
marvin')).listen(8080)"
 ```
 
-Open your browser and go to your web proxy url (ex: `marvin.wmflabs.org`), and
-you should see in your browser:
+Open your browser and go to your web proxy url (ex:
+https://marvin.wmflabs.org/), and you should see in your browser:
 
 ```
 hello world marvin

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cf2a5810cf0bb9d7df4831bad9674b523bd6a22
Gerrit-PatchSet: 1
Gerrit-Project: marvin
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 
Gerrit-Reviewer: Sniedzielski 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: TY mailer: skip extra queries to look up custom fields

2017-08-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374915 )

Change subject: TY mailer: skip extra queries to look up custom fields
..

TY mailer: skip extra queries to look up custom fields

Turns out we already have them from the civicrm_api call at the
top. We just need to map the names over.

Change-Id: Idf77f9cdf7022c8e2faaf5d1eb318026f32e6205
---
M sites/all/modules/thank_you/thank_you.module
1 file changed, 9 insertions(+), 4 deletions(-)


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

diff --git a/sites/all/modules/thank_you/thank_you.module 
b/sites/all/modules/thank_you/thank_you.module
index 9ee8255..5051b68 100644
--- a/sites/all/modules/thank_you/thank_you.module
+++ b/sites/all/modules/thank_you/thank_you.module
@@ -234,7 +234,7 @@
  * TODO: rewrite the civi api stuff to work like other code
  */
 function thank_you_for_contribution( $contribution_id ) {
-   civicrm_initialize( true );
+   civicrm_initialize();
$contribution = civicrm_api("Contribution","get",
array (
  'version' =>'3',
@@ -298,11 +298,16 @@
 return false;
 }
 
-$custom_values = wmf_civicrm_get_custom_values( $contribution_id, array(
+$custom_fields = array(
 'no_thank_you',
 'original_amount',
-'original_currency',
-) );
+'original_currency'
+);
+$custom_values = array();
+foreach ( $custom_fields as $field ) {
+$mapped = wmf_civicrm_get_custom_field_name( $field );
+$custom_values[$field] = $contribution[$mapped];
+}
 
 if ( $custom_values['no_thank_you'] ) {
 watchdog('thank_you', "Contribution has been marked 
no_thank_you={$custom_values['no_thank_you']}, skipping.", array(), 
WATCHDOG_INFO);

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Docs: Add staging repo setup and running server docs

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

Change subject: Docs: Add staging repo setup and running server docs
..


Docs: Add staging repo setup and running server docs

Initial version, running the server raw with node (no auto restarting,
processes cluster, or start on VM restart).

Next steps:
* Periodically running git pull on the repository with a cron job

Bug: T172913
Change-Id: Ib0568ba3ad338784520f051555a25d57b1954f09
---
M docs/setting-a-staging-server.md
1 file changed, 126 insertions(+), 2 deletions(-)

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



diff --git a/docs/setting-a-staging-server.md b/docs/setting-a-staging-server.md
index 2267746..9822f96 100644
--- a/docs/setting-a-staging-server.md
+++ b/docs/setting-a-staging-server.md
@@ -40,7 +40,7 @@
   the url will be forwarded.
 * Click **Create proxy**
 
-## 2. Set up the server
+## 2. Check server and initial setup
 
 ```
 $ sudo apt-get update
@@ -51,11 +51,17 @@
 Verify node is properly installed, `nodejs -v` should output something like
 `v6.11.0`.
 
+Alias `nodejs` as `node` so that we can upgrade npm later by doing:
+
+```
+sudo ln -s /usr/bin/nodejs /usr/bin/node
+```
+
 Verify your server is accesible from the web browser by running a dummy http
 server (instead of 8080 use the port you specified when creating the web 
proxy):
 
 ```
-$ nodejs -e "require('http').createServer((req, res) => res.end('hello world 
marvin')).listen(8080)"
+$ node -e "require('http').createServer((req, res) => res.end('hello world 
marvin')).listen(8080)"
 ```
 
 Open your browser and go to your web proxy url (ex: `marvin.wmflabs.org`), and
@@ -67,3 +73,121 @@
 
 If so, you have a VM where you can run a server, and it can be accessible from
 web browser clients, so we are ready to go!
+
+Remember to kill the server before you do anything else (`killall node`)
+
+## 3. Install dependencies for building the app
+
+Install npm:
+
+```
+$ sudo apt-get install npm
+$ npm -v
+1.4.21
+```
+
+We need npm 5 to reproducibly install and build our app in staging, so lets
+upgrade npm:
+
+```
+$ sudo npm install -g npm@5
+$ bash # Start a new shell so that it picks up the new npm install
+$ npm -v
+5.3.0
+```
+
+## 4. Setting up the repository and running the server
+
+First, let's create a user which will have limited privileges (no sudo for
+example) and own the repository and processes:
+
+```
+$ sudo adduser marvin
+# Answer the questions and set a password up
+```
+
+And switch out from your account to its account:
+
+```
+$ sudo su marvin
+marvin@marvin-staging $ cd ~
+```
+
+Let's create a folder for the repository (`sources/`), and a folder for the app
+tarball (`dist/`):
+
+```
+marvin@marvin-staging:~$ mkdir sources/
+marvin@marvin-staging:~$ mkdir dist/
+marvin@marvin-staging:~$ ls
+dist  sources
+```
+
+Let's clone the repo into sources
+
+```
+marvin@marvin-staging:~$ git clone 
https://phabricator.wikimedia.org/source/marvin.git sources/
+Cloning into 'sources'...
+#...[redacted]
+Checking connectivity... done.
+marvin@marvin-staging:~$ ls sources/
+docs  package.json  package-lock.json  readme.md  src  test  tsconfig.json  
webpack.config.js
+```
+
+Create a post-merge hook in the repo so that we can build and re-run the server
+on git pull:
+
+```
+marvin@marvin-staging:~$ cd sources/
+marvin@marvin-staging:~/sources$ vim .git/hooks/post-merge
+```
+
+```sh
+#!/bin/bash
+
+#~/sources/.git/hooks/post-merge
+set -e
+set -o pipefail
+
+echo "Running post-merge hook"
+
+echo "Installing and building server bundle"
+npm install
+npm run build
+
+echo "Removing previously started server processes"
+killall node || true
+
+echo "Copying new tarball"
+rm -rf /home/marvin/dist
+cp -R dist/ /home/marvin/dist
+cp -R node_modules/ /home/marvin/dist/node_modules
+
+echo "Running new server version"
+NODE_ENV=production node /home/marvin/dist/server/index.js &
+```
+
+And make it executable
+
+```
+marvin@marvin-staging:~/sources$ chmod +x .git/hooks/post-merge
+```
+
+You can try it out by running it directly:
+
+```
+marvin@marvin-staging:~/sources$ ./.git/hooks/post-merge
+Running post-merge hook
+Installing and building server bundle
+added 115 packages in 12.848s
+
+> marvin@0.0.0 build /home/marvin/sources
+> NODE_ENV=production npm-run-all --silent clean --parallel server:build 
'client:build -- -p'
+
+Removing previously started server processes
+Copying new tarball
+Running new server version
+Server started on http://localhost:8080/
+```
+
+Then you should be able to access your site from the browser!
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib0568ba3ad338784520f051555a25d57b1954f09
Gerrit-PatchSet: 2
Gerrit-Project: marvin
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Refactor embed.html to use ResultView

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

Change subject: Refactor embed.html to use ResultView
..


Refactor embed.html to use ResultView

Will enable i18n, switching views and config settings.

Bug:T173778
Change-Id: I56aea2101a78f9bf17db6e4b8bb7740535b89aad
---
M embed.html
1 file changed, 119 insertions(+), 122 deletions(-)

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



diff --git a/embed.html b/embed.html
index 0e8bb47..62cc520 100644
--- a/embed.html
+++ b/embed.html
@@ -43,17 +43,15 @@

url(https://upload.wikimedia.org/wikipedia/commons/6/66/Wikidata-logo-en.svg);
background-repeat: no-repeat;
background-position: center;
+   z-index: -1;
 }
 
 #error {
display: none;
 }
 
-.progress {
-   height: 30px;;
-}
-
-.progress-bar {
+.action-bar {
+   height: 30px;
width: 100%;
line-height: 30px;
font-size: 18px;
@@ -92,23 +90,71 @@
 .tooltip {
z-index: 2001;
 }
+
+.header-toolbar {
+   z-index: 1000;
+   position: fixed;
+   top: 0;
+   left: 40vw;
+   opacity: 0.2;
+}
+.header-toolbar:hover {
+   opacity: 1;
+}
+
 
 
-
-   
-   
-   Loading
+   
+   
+   
+   
+   
+   Please enable JavaScript or use 
a browser that supports it.
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/Wikidata_Query_Help/Result_Views;>
+   
+   
+   
+   
+   
+   
+Results in  ms  
+   
+   
+   

-   
-   
-   
-   Error
-   
+   
+   
+   
+   Test result
+   Test error
 
-   
+   
+   
+ Explorer
+ 
+   Close
+ 
+   
+   
+   
+   
Edit on query.Wikidata.org

-
 


@@ -133,9 +179,21 @@



+   
+   
+   
+   
+   
+   
+   
+   
+   
+   
+   

 

+   



@@ -154,6 +212,7 @@



+   



@@ -162,123 +221,61 @@



+   
+   

 

-   // TODO: Put this to config and consolidate with the one in 
app.js
-   var RESULT_BROWSER = {
-   Table: {
-   class: 'TableResultBrowser'
-   },
-   ImageGrid: {
-   class: 'ImageResultBrowser'
-   },
-   Map: {
-   class: 'CoordinateResultBrowser'
-   },
-   BubbleChart: {
-   class: 'BubbleChartResultBrowser'
-   },
-   LineChart: {
-   class: 'LineChartResultBrowser',
-   },
-   BarChart: {
-   class: 'BarChartResultBrowser',
-   },
-   ScatterChart: {
-   class: 'ScatterChartResultBrowser',
-   },
-   AreaChart: {
-   class: 'AreaChartResultBrowser',
-   },
-   TreeMap: {
-   class: 'TreeMapResultBrowser'
-   },
-   Tree: {
-   class: 'TreeResultBrowser'
-   },
-   Timeline: {
-

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: DB excepions: consistently declare constructors as public

2017-08-30 Thread Chad (Code Review)
Hello Aaron Schulz,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: DB excepions: consistently declare constructors as public
..

DB excepions: consistently declare constructors as public

Also DBTransactionSizeError::getKey() while we're here

Change-Id: Ic76abf3ca0bf74dd96018d67da466365957bf3b1
---
M includes/libs/rdbms/exception/DBConnectionError.php
M includes/libs/rdbms/exception/DBError.php
M includes/libs/rdbms/exception/DBExpectedError.php
M includes/libs/rdbms/exception/DBQueryError.php
M includes/libs/rdbms/exception/DBTransactionSizeError.php
5 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/374914/1

diff --git a/includes/libs/rdbms/exception/DBConnectionError.php 
b/includes/libs/rdbms/exception/DBConnectionError.php
index 0091524..91d98dc 100644
--- a/includes/libs/rdbms/exception/DBConnectionError.php
+++ b/includes/libs/rdbms/exception/DBConnectionError.php
@@ -28,7 +28,7 @@
 * @param IDatabase $db Object throwing the error
 * @param string $error Error text
 */
-   function __construct( IDatabase $db = null, $error = 'unknown error' ) {
+   public function __construct( IDatabase $db = null, $error = 'unknown 
error' ) {
$msg = 'Cannot access the database';
if ( trim( $error ) != '' ) {
$msg .= ": $error";
diff --git a/includes/libs/rdbms/exception/DBError.php 
b/includes/libs/rdbms/exception/DBError.php
index d65e2d3..2f7499b 100644
--- a/includes/libs/rdbms/exception/DBError.php
+++ b/includes/libs/rdbms/exception/DBError.php
@@ -36,7 +36,7 @@
 * @param IDatabase $db Object which threw the error
 * @param string $error A simple error message to be used for debugging
 */
-   function __construct( IDatabase $db = null, $error ) {
+   public function __construct( IDatabase $db = null, $error ) {
$this->db = $db;
parent::__construct( $error );
}
diff --git a/includes/libs/rdbms/exception/DBExpectedError.php 
b/includes/libs/rdbms/exception/DBExpectedError.php
index 4f65efa..31d8c27 100644
--- a/includes/libs/rdbms/exception/DBExpectedError.php
+++ b/includes/libs/rdbms/exception/DBExpectedError.php
@@ -36,7 +36,7 @@
/** @var string[] Message parameters */
protected $params;
 
-   function __construct( IDatabase $db = null, $error, array $params = [] 
) {
+   public function __construct( IDatabase $db = null, $error, array 
$params = [] ) {
parent::__construct( $db, $error );
$this->params = $params;
}
diff --git a/includes/libs/rdbms/exception/DBQueryError.php 
b/includes/libs/rdbms/exception/DBQueryError.php
index 6a4076f..a8ea3ad 100644
--- a/includes/libs/rdbms/exception/DBQueryError.php
+++ b/includes/libs/rdbms/exception/DBQueryError.php
@@ -41,7 +41,7 @@
 * @param string $sql
 * @param string $fname
 */
-   function __construct( IDatabase $db, $error, $errno, $sql, $fname ) {
+   public function __construct( IDatabase $db, $error, $errno, $sql, 
$fname ) {
if ( $db instanceof Database && $db->wasConnectionError( $errno 
) ) {
$message = "A connection error occured. \n" .
"Query: $sql\n" .
diff --git a/includes/libs/rdbms/exception/DBTransactionSizeError.php 
b/includes/libs/rdbms/exception/DBTransactionSizeError.php
index e45b9f3..d2622e1 100644
--- a/includes/libs/rdbms/exception/DBTransactionSizeError.php
+++ b/includes/libs/rdbms/exception/DBTransactionSizeError.php
@@ -25,7 +25,7 @@
  * @ingroup Database
  */
 class DBTransactionSizeError extends DBTransactionError {
-   function getKey() {
+   public function getKey() {
return 'transaction-duration-limit-exceeded';
}
 }

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP Fix PayPal Gateway Tagging

2017-08-30 Thread XenoRyet (Code Review)
XenoRyet has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374913 )

Change subject: WIP  Fix PayPal Gateway Tagging
..

WIP  Fix PayPal Gateway Tagging

Former assumptions are no longer true, fixing that.
Also allow for more reason_codes that mean 'refund'.

WIP while I figure out if the new assumption about legacy is always true.

Bug: T1713351
Change-Id: If555903aac93ad8e58da3d2d9e8ea7cb4608b790
---
M PaymentProviders/PayPal/RefundMessage.php
M PaymentProviders/PayPal/Tests/Data/refund.json
M PaymentProviders/PayPal/Tests/Data/refund_transformed.json
3 files changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/13/374913/1

diff --git a/PaymentProviders/PayPal/RefundMessage.php 
b/PaymentProviders/PayPal/RefundMessage.php
index 1520594..0afd0ee 100644
--- a/PaymentProviders/PayPal/RefundMessage.php
+++ b/PaymentProviders/PayPal/RefundMessage.php
@@ -16,15 +16,14 @@
} else {
$message['gateway'] = 'paypal';
}
-   } elseif ( isset( $ipnMessage['reason_code'] ) && 
$ipnMessage['reason_code'] === 'refund' ) {
+   } elseif ( isset( $ipnMessage['reason_code'] ) && in_array( 
$ipnMessage['reason_code'], array( 'refund', 'buyer_complaint', 'other' ) ) ) {
$message['type'] = 'refund';
 
-   // For refunds, express checkout puts a description in 
transaction_subject,
-   // but legacy puts a contribution tracking ID there.
-   if ( isset( $ipnMessage['transaction_subject'] ) && 
!is_numeric( $ipnMessage['transaction_subject'] ) ) {
-   $message['gateway'] = 'paypal_ec';
-   } else {
+   // Legacy sets subscr_id, EC does not.
+   if ( isset( $ipnMessage['subscr_id'] ) ) {
$message['gateway'] = 'paypal';
+   } else {
+   $message['gateway'] = 'paypal_ec';
}
}
}
diff --git a/PaymentProviders/PayPal/Tests/Data/refund.json 
b/PaymentProviders/PayPal/Tests/Data/refund.json
index ed3f61b..b82ff44 100644
--- a/PaymentProviders/PayPal/Tests/Data/refund.json
+++ b/PaymentProviders/PayPal/Tests/Data/refund.json
@@ -13,6 +13,7 @@
 "address_name":"Clyde Barrow",
 "notify_version":"3.8",
 "reason_code":"refund",
+"subscr_id":"S-2L576314R8742400A",
 "custom":"93731212",
 "business":"gimmedoll...@wikimedia.org",
 "address_country":"United States",
diff --git a/PaymentProviders/PayPal/Tests/Data/refund_transformed.json 
b/PaymentProviders/PayPal/Tests/Data/refund_transformed.json
index ace9db6..fce95a0 100644
--- a/PaymentProviders/PayPal/Tests/Data/refund_transformed.json
+++ b/PaymentProviders/PayPal/Tests/Data/refund_transformed.json
@@ -18,5 +18,6 @@
   "order_id": "93731212",
   "gateway_refund_id": "99E56789RR1234222",
   "gross_currency": "USD",
-  "gateway": "paypal"
+  "gateway": "paypal",
+  "subscr_id": "S-2L576314R8742400A"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If555903aac93ad8e58da3d2d9e8ea7cb4608b790
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: XenoRyet 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Show only relevant languages in translation lists

2017-08-30 Thread Petar.petkovic (Code Review)
Petar.petkovic has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374912 )

Change subject: Show only relevant languages in translation lists
..

Show only relevant languages in translation lists

- Show only languages that are actually used in the language selectors
of translation lists.
- Hide the language selector if only one combination is possible
- Allow to select 'Any language' when a specific language
has been already selected

Bug: T169970
Bug: T169973
Change-Id: I2c47a5c615884cff8c5909483e7497a164073f4e
---
M extension.json
M hooks.md
M i18n/en.json
M i18n/qqq.json
M modules/dashboard/ext.cx.dashboard.js
M modules/dashboard/ext.cx.translationlist.js
6 files changed, 227 insertions(+), 43 deletions(-)


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

diff --git a/extension.json b/extension.json
index 6a9ff0c..21b7410 100644
--- a/extension.json
+++ b/extension.json
@@ -295,7 +295,8 @@
"cx-translation-filter-published-translations",
"cx-translation-filter-draft-translations",
"cx-translation-filter-from-any-language",
-   "cx-translation-filter-to-any-language"
+   "cx-translation-filter-to-any-language",
+   "cx-translation-filter-any-language"
]
},
"ext.cx.util": {
diff --git a/hooks.md b/hooks.md
index ff858bb..7d91cad 100644
--- a/hooks.md
+++ b/hooks.md
@@ -184,3 +184,7 @@
 ## mw.cx.translation.validation.success
 
 Fired when there are no AbuseFilter based validation errors for the section.
+
+## mw.cx.translationlist.items.changed
+
+Fired when items for translation list ('In progress' or 'Published') are 
fetched from the server
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
index 449d4af..8545d3b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -118,6 +118,7 @@
"cx-suggestionlist-view-source-page": "View source page",
"cx-translation-filter-from-any-language": "From any language",
"cx-translation-filter-to-any-language": "To any language",
+   "cx-translation-filter-any-language": "Any language",
"cx-create-new-translation": "New translation",
"cx-save-draft-save-success": "Saved {{PLURAL:$1|a minute ago|$1 
minutes ago|0=just now}}",
"cx-save-draft-saving": "Saving...",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index edb9401..cb0b39f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -127,6 +127,7 @@
"cx-suggestionlist-view-source-page": "Tooltip text in for source 
language label for every suggestion item displayed.",
"cx-translation-filter-from-any-language": "Shown in translation filter 
in Content Translation dashboard. Selects source language as any language.",
"cx-translation-filter-to-any-language": "Shown in translation filter 
in Content Translation dashboard. Selects target language as any language.",
+   "cx-translation-filter-any-language": "Shown in translation filter in 
Content Translation dashboard. Allows user to select 'Any language' as source 
or target language",
"cx-create-new-translation": "Button label for creating new translation 
in the Content Translation dashboard.",
"cx-save-draft-save-success": "\"Saved\" refers to a draft of a 
translated page that was saved recently.\nParameters:\n* $1 - number of 
minutes",
"cx-save-draft-saving": "Label of button to save the translation as 
draft while saving is in progress\n{{Identical|Saving}}",
diff --git a/modules/dashboard/ext.cx.dashboard.js 
b/modules/dashboard/ext.cx.dashboard.js
index 1a42d34..a015a07 100644
--- a/modules/dashboard/ext.cx.dashboard.js
+++ b/modules/dashboard/ext.cx.dashboard.js
@@ -27,10 +27,65 @@
this.$sourceSelector = null;
}
 
+   /**
+* Return an object of languages indexed by language code.
+*
+* @param {Array} languages An array of language codes.
+* @return {Object} autonyms indexed by language code.
+*/
+   function getAutonyms( languages ) {
+   var i,
+   autonyms = {};
+
+   for ( i = 0; i < languages.length; i++ ) {
+   autonyms[ languages[ i ] ] = $.uls.data.getAutonym( 
languages[ i ] );
+   }
+
+   return autonyms;
+   }
+
+   /**
+* Calculate position for ULS, depending on directionality
+*/
+   function calculateUlsPosition() {
+   if ( $( 'html' ).prop( 'dir' ) === 'rtl' ) {
+   this.left = this.$element.offset().left + 
this.$element.parent().width() - this.$menu.width();
+   } else {
+   this.left = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Make top links in RecentChanges expand to full-width

2017-08-30 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374911 )

Change subject: RCFilters: Make top links in RecentChanges expand to full-width
..

RCFilters: Make top links in RecentChanges expand to full-width

Bug: T174617
Change-Id: Iff4c563b894eaaf713d3818a97928d0342b1ca23
---
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
3 files changed, 68 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/374911/1

diff --git 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
index 38f6f28..9d1cc23 100644
--- 
a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
+++ 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
@@ -1,6 +1,17 @@
 .mw-rcfilters-ui-rcTopSectionWidget {
&-topLinks {
-   width: 100%;
+   &-table {
+   width: 100%;
+   }
+
+   &-top {
+   display: block;
+   width: 100%;
+
+   .mw-recentchanges-toplinks {
+   margin-bottom: 0.5em;
+   }
+   }
}
 
&-savedLinks {
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
index 0bee2f1..f7081af 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.less
@@ -2,6 +2,10 @@
&-table {
display: table;
width: 100%;
+
+   &-placeholder {
+   width: 100%;
+   }
}
 
&-row {
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
index 706c888..623f266 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
@@ -12,14 +12,18 @@
mw.rcfilters.ui.RcTopSectionWidget = function 
MwRcfiltersUiRcTopSectionWidget(
savedLinksListWidget, $topLinks, config
) {
-   var topLinksCookieName = 'rcfilters-toplinks-collapsed-state',
+   var toplinksTitle,
+   topLinksCookieName = 
'rcfilters-toplinks-collapsed-state',
topLinksCookie = mw.cookie.get( topLinksCookieName ),
topLinksCookieValue = topLinksCookie || 'collapsed',
-   toplinksTitle;
+   widget = this;
+
config = config || {};
 
// Parent
mw.rcfilters.ui.RcTopSectionWidget.parent.call( this, config );
+
+   this.$topLinks = $topLinks;
 
toplinksTitle = new OO.ui.ButtonWidget( {
framed: false,
@@ -28,7 +32,8 @@
label: $( '' ).append( mw.message( 
'rcfilters-other-review-tools' ).parse() ).contents()
} );
 
-   $topLinks
+
+   this.$topLinks
.addClass( 'mw-rcfilters-ui-ready' )
.makeCollapsible( {
collapsed: topLinksCookieValue === 'collapsed',
@@ -37,38 +42,68 @@
.on( 'beforeExpand.mw-collapsible', function () {
mw.cookie.set( topLinksCookieName, 'expanded' );
toplinksTitle.setIndicator( 'up' );
+   widget.switchTopLinks( 'expanded' );
} )
.on( 'beforeCollapse.mw-collapsible', function () {
mw.cookie.set( topLinksCookieName, 'collapsed' 
);
toplinksTitle.setIndicator( 'down' );
+   widget.switchTopLinks( 'collapsed' );
} );
 
-   $topLinks.find( '.mw-recentchanges-toplinks-title' 
).replaceWith( toplinksTitle.$element );
+   this.$topLinks.find( '.mw-recentchanges-toplinks-title' 
).replaceWith( toplinksTitle.$element );
 
+   // Create two positions for the toplinks to toggle between
+   // in the table (first cell) or up above it
+   this.$top = $( '' )
+   .addClass( 
'mw-rcfilters-ui-rcTopSectionWidget-topLinks-top' );
+   this.$tableTopLinks = $( '' )
+ 

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Hygiene: Bring missing SVGO config file from MobileFrontend

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

Change subject: Hygiene: Bring missing SVGO config file from MobileFrontend
..


Hygiene: Bring missing SVGO config file from MobileFrontend

During MobileFrontend/MinervaNeue split we forgot to copy the
SVGO config file. This files is required for proper svgo execution,
othwerwise it complains that file is missing and
dev-scripts/svg_check.sh script fails

Change-Id: Ic68257091486b001126974833088666754652291
---
A .svgo.yml
1 file changed, 12 insertions(+), 0 deletions(-)

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



diff --git a/.svgo.yml b/.svgo.yml
new file mode 100644
index 000..dd58499
--- /dev/null
+++ b/.svgo.yml
@@ -0,0 +1,12 @@
+plugins:
+
+  # If the SVG doesn't start with an XML declaration, then it's MIME type will
+  # be detected as "text/plain" rather than "image/svg+xml" by libmagic and,
+  # consequently, MediaWiki's CSSMin CSS minifier. libmagic's default database
+  # currently requires that SVGs contain an XML declaration
+  # .
+  - removeXMLProcInst: false
+
+  - cleanupIDs: false
+  - collapseGroups: false
+  - mergePaths: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic68257091486b001126974833088666754652291
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: Pmiazga 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hygiene: Remove checks for Android2

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

Change subject: Hygiene: Remove checks for Android2
..


Hygiene: Remove checks for Android2

Android2 is now a grade C browser, so we don't run JS there,
thus this code is dead.

Change-Id: I2086f7083e94e4ea5a79436317ac43fc31a622fa
---
M resources/mobile.editor.common/EditorOverlayBase.js
M resources/mobile.editor.common/editor.less
M resources/mobile.startup/browser.js
M tests/qunit/mobile.startup/test_browser.js
4 files changed, 1 insertion(+), 44 deletions(-)

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



diff --git a/resources/mobile.editor.common/EditorOverlayBase.js 
b/resources/mobile.editor.common/EditorOverlayBase.js
index ebb2f9f..6a64da2 100644
--- a/resources/mobile.editor.common/EditorOverlayBase.js
+++ b/resources/mobile.editor.common/EditorOverlayBase.js
@@ -1,7 +1,6 @@
 ( function ( M, $ ) {
var Overlay = M.require( 'mobile.startup/Overlay' ),
PageGateway = M.require( 'mobile.startup/PageGateway' ),
-   browser = M.require( 'mobile.startup/Browser' ).getSingleton(),
Icon = M.require( 'mobile.startup/Icon' ),
toast = M.require( 'mobile.startup/toast' ),
user = M.require( 'mobile.startup/user' );
@@ -258,10 +257,6 @@
},
/** @inheritdoc **/
postRender: function () {
-   // Add a class so editor can make some Android 2 
specific customisations.
-   if ( browser.isAndroid2() ) {
-   this.$el.addClass( 'android-2' );
-   }
// log edit attempt
this.log( {
action: 'ready'
diff --git a/resources/mobile.editor.common/editor.less 
b/resources/mobile.editor.common/editor.less
index 264ac8d..57df50a 100644
--- a/resources/mobile.editor.common/editor.less
+++ b/resources/mobile.editor.common/editor.less
@@ -58,9 +58,3 @@
min-width: 30px;
}
 }
-
-// FIXME: high line-height (1.5) causes weird behavior in textareas on
-// Android 2.x, remove this if we don't want to support editor there
-.android2.editor-overlay textarea {
-   line-height: 1.2;
-}
diff --git a/resources/mobile.startup/browser.js 
b/resources/mobile.startup/browser.js
index faa2c23..1675301 100644
--- a/resources/mobile.startup/browser.js
+++ b/resources/mobile.startup/browser.js
@@ -36,9 +36,6 @@
function Browser( ua, $container ) {
this.userAgent = ua;
this.$el = $container;
-   if ( this.isAndroid2() ) {
-   this.lockViewport();
-   }
this._fixIosLandscapeBug();
}
 
@@ -97,14 +94,6 @@
}
},
/**
-* Determine if a device is Android 2.
-* @method
-* @return {boolean}
-*/
-   isAndroid2: memoize( function () {
-   return /Android 2/.test( this.userAgent );
-   } ),
-   /**
 * Determine if a device has a widescreen.
 * @method
 * @return {boolean}
@@ -138,13 +127,6 @@
 * @return {boolean}
 */
supportsAnimations: memoize( function () {
-   // don't trust Android 2.x, really
-   // animations cause textareas to misbehave on it
-   // (http://stackoverflow.com/a/5734984/365238)
-   if ( this.isAndroid2() ) {
-   return false;
-   }
-
return this.supportsCSSProperty( 'animationName' ) &&
this.supportsCSSProperty( 'transform' ) &&
this.supportsCSSProperty( 'transition' );
diff --git a/tests/qunit/mobile.startup/test_browser.js 
b/tests/qunit/mobile.startup/test_browser.js
index 319a731..bc86891 100644
--- a/tests/qunit/mobile.startup/test_browser.js
+++ b/tests/qunit/mobile.startup/test_browser.js
@@ -21,7 +21,7 @@
assert.strictEqual( browser5.isIos( 5 ), true );
} );
 
-   QUnit.test( 'Methods are cached', 15, function ( assert ) {
+   QUnit.test( 'Methods are cached', 8, function ( assert ) {
var ipad = new Browser( 'Mozilla/5.0 (iPad; CPU OS 7_0 like Mac 
OS X) AppleWebKit/537.51.1 (KHTML, like Gecko)', $html ),
iphone = new Browser( 'Mozilla/5.0 (iPhone; CPU iPhone 
OS 8_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/8.0 
Mobile/11A465 Safari/9537.53', $html ),
android2 = new Browser( 'Android 2', $html );
@@ -34,28 +34,14 @@
  

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Show watchdog messages on failed tests

2017-08-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374910 )

Change subject: Show watchdog messages on failed tests
..

Show watchdog messages on failed tests

Change-Id: I95051178d84b7ef6c3ff8fa29f97f8ffb3395323
---
M sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
1 file changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/10/374910/1

diff --git 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
index 508cd29..232e949 100644
--- 
a/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
+++ 
b/sites/all/modules/wmf_common/tests/includes/BaseWmfDrupalPhpUnitTestCase.php
@@ -193,4 +193,14 @@
   'id' => $contactId
 ) );
   }
+
+  public function onNotSuccessfulTest( Exception $e ) {
+// show the last 10 watchdog messages
+   $where = core_watchdog_query();
+   $rsc = drush_db_select('watchdog', '*', $where['where'], 
$where['args'], 0, 10, 'wid', 'DESC');
+   while ( $result = drush_db_fetch_object( $rsc ) ) {
+ echo core_watchdog_format_result( $result );
+   }
+throw $e;
+  }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Group1 to wmf.16""

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

Change subject: Revert "Revert "Group1 to wmf.16""
..


Revert "Revert "Group1 to wmf.16""

This reverts commit f750c8930fe8a8ff1a3dc11446136b2021a7b69c.

Change-Id: Ieba65cca6023301885ab80025f59c44bd8a37ee1
---
M php
M wikiversions.json
2 files changed, 603 insertions(+), 603 deletions(-)

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



diff --git a/php b/php
index 5a64e5f..633715f 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.15
\ No newline at end of file
+php-1.30.0-wmf.16
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 370a2ce..8b6959d 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.15",
-"aawikibooks": "php-1.30.0-wmf.15",
-"aawiktionary": "php-1.30.0-wmf.15",
+"aawikibooks": "php-1.30.0-wmf.16",
+"aawiktionary": "php-1.30.0-wmf.16",
 "abwiki": "php-1.30.0-wmf.15",
-"abwiktionary": "php-1.30.0-wmf.15",
+"abwiktionary": "php-1.30.0-wmf.16",
 "acewiki": "php-1.30.0-wmf.15",
-"advisorywiki": "php-1.30.0-wmf.15",
+"advisorywiki": "php-1.30.0-wmf.16",
 "adywiki": "php-1.30.0-wmf.15",
 "afwiki": "php-1.30.0-wmf.15",
-"afwikibooks": "php-1.30.0-wmf.15",
-"afwikiquote": "php-1.30.0-wmf.15",
-"afwiktionary": "php-1.30.0-wmf.15",
+"afwikibooks": "php-1.30.0-wmf.16",
+"afwikiquote": "php-1.30.0-wmf.16",
+"afwiktionary": "php-1.30.0-wmf.16",
 "akwiki": "php-1.30.0-wmf.15",
-"akwikibooks": "php-1.30.0-wmf.15",
-"akwiktionary": "php-1.30.0-wmf.15",
+"akwikibooks": "php-1.30.0-wmf.16",
+"akwiktionary": "php-1.30.0-wmf.16",
 "alswiki": "php-1.30.0-wmf.15",
-"alswikibooks": "php-1.30.0-wmf.15",
-"alswikiquote": "php-1.30.0-wmf.15",
-"alswiktionary": "php-1.30.0-wmf.15",
+"alswikibooks": "php-1.30.0-wmf.16",
+"alswikiquote": "php-1.30.0-wmf.16",
+"alswiktionary": "php-1.30.0-wmf.16",
 "amwiki": "php-1.30.0-wmf.15",
-"amwikiquote": "php-1.30.0-wmf.15",
-"amwiktionary": "php-1.30.0-wmf.15",
+"amwikiquote": "php-1.30.0-wmf.16",
+"amwiktionary": "php-1.30.0-wmf.16",
 "angwiki": "php-1.30.0-wmf.15",
-"angwikibooks": "php-1.30.0-wmf.15",
-"angwikiquote": "php-1.30.0-wmf.15",
-"angwikisource": "php-1.30.0-wmf.15",
-"angwiktionary": "php-1.30.0-wmf.15",
+"angwikibooks": "php-1.30.0-wmf.16",
+"angwikiquote": "php-1.30.0-wmf.16",
+"angwikisource": "php-1.30.0-wmf.16",
+"angwiktionary": "php-1.30.0-wmf.16",
 "anwiki": "php-1.30.0-wmf.15",
-"anwiktionary": "php-1.30.0-wmf.15",
+"anwiktionary": "php-1.30.0-wmf.16",
 "arbcom_cswiki": "php-1.30.0-wmf.15",
 "arbcom_dewiki": "php-1.30.0-wmf.15",
 "arbcom_enwiki": "php-1.30.0-wmf.15",
@@ -35,880 +35,880 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.15",
 "arcwiki": "php-1.30.0-wmf.15",
 "arwiki": "php-1.30.0-wmf.15",
-"arwikibooks": "php-1.30.0-wmf.15",
-"arwikimedia": "php-1.30.0-wmf.15",
-"arwikinews": "php-1.30.0-wmf.15",
-"arwikiquote": "php-1.30.0-wmf.15",
-"arwikisource": "php-1.30.0-wmf.15",
-"arwikiversity": "php-1.30.0-wmf.15",
-"arwiktionary": "php-1.30.0-wmf.15",
+"arwikibooks": "php-1.30.0-wmf.16",
+"arwikimedia": "php-1.30.0-wmf.16",
+"arwikinews": "php-1.30.0-wmf.16",
+"arwikiquote": "php-1.30.0-wmf.16",
+"arwikisource": "php-1.30.0-wmf.16",
+"arwikiversity": "php-1.30.0-wmf.16",
+"arwiktionary": "php-1.30.0-wmf.16",
 "arzwiki": "php-1.30.0-wmf.15",
 "astwiki": "php-1.30.0-wmf.15",
-"astwikibooks": "php-1.30.0-wmf.15",
-"astwikiquote": "php-1.30.0-wmf.15",
-"astwiktionary": "php-1.30.0-wmf.15",
+"astwikibooks": "php-1.30.0-wmf.16",
+"astwikiquote": "php-1.30.0-wmf.16",
+"astwiktionary": "php-1.30.0-wmf.16",
 "aswiki": "php-1.30.0-wmf.15",
-"aswikibooks": "php-1.30.0-wmf.15",
-"aswikisource": "php-1.30.0-wmf.15",
-"aswiktionary": "php-1.30.0-wmf.15",
+"aswikibooks": "php-1.30.0-wmf.16",
+"aswikisource": "php-1.30.0-wmf.16",
+"aswiktionary": "php-1.30.0-wmf.16",
 "atjwiki": "php-1.30.0-wmf.15",
-"auditcomwiki": "php-1.30.0-wmf.15",
+"auditcomwiki": "php-1.30.0-wmf.16",
 "avwiki": "php-1.30.0-wmf.15",
-"avwiktionary": "php-1.30.0-wmf.15",
+"avwiktionary": "php-1.30.0-wmf.16",
 "aywiki": "php-1.30.0-wmf.15",
-"aywikibooks": "php-1.30.0-wmf.15",
-"aywiktionary": "php-1.30.0-wmf.15",
+"aywikibooks": "php-1.30.0-wmf.16",
+"aywiktionary": "php-1.30.0-wmf.16",
 "azbwiki": "php-1.30.0-wmf.15",
 "azwiki": "php-1.30.0-wmf.15",
-"azwikibooks": "php-1.30.0-wmf.15",
-"azwikiquote": "php-1.30.0-wmf.15",
-"azwikisource": "php-1.30.0-wmf.15",
-"azwiktionary": "php-1.30.0-wmf.15",
+"azwikibooks": 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Revert "Group1 to wmf.16""

2017-08-30 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374909 )

Change subject: Revert "Revert "Group1 to wmf.16""
..

Revert "Revert "Group1 to wmf.16""

This reverts commit f750c8930fe8a8ff1a3dc11446136b2021a7b69c.

Change-Id: Ieba65cca6023301885ab80025f59c44bd8a37ee1
---
M php
M wikiversions.json
2 files changed, 603 insertions(+), 603 deletions(-)


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

diff --git a/php b/php
index 5a64e5f..633715f 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.15
\ No newline at end of file
+php-1.30.0-wmf.16
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 370a2ce..8b6959d 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.15",
-"aawikibooks": "php-1.30.0-wmf.15",
-"aawiktionary": "php-1.30.0-wmf.15",
+"aawikibooks": "php-1.30.0-wmf.16",
+"aawiktionary": "php-1.30.0-wmf.16",
 "abwiki": "php-1.30.0-wmf.15",
-"abwiktionary": "php-1.30.0-wmf.15",
+"abwiktionary": "php-1.30.0-wmf.16",
 "acewiki": "php-1.30.0-wmf.15",
-"advisorywiki": "php-1.30.0-wmf.15",
+"advisorywiki": "php-1.30.0-wmf.16",
 "adywiki": "php-1.30.0-wmf.15",
 "afwiki": "php-1.30.0-wmf.15",
-"afwikibooks": "php-1.30.0-wmf.15",
-"afwikiquote": "php-1.30.0-wmf.15",
-"afwiktionary": "php-1.30.0-wmf.15",
+"afwikibooks": "php-1.30.0-wmf.16",
+"afwikiquote": "php-1.30.0-wmf.16",
+"afwiktionary": "php-1.30.0-wmf.16",
 "akwiki": "php-1.30.0-wmf.15",
-"akwikibooks": "php-1.30.0-wmf.15",
-"akwiktionary": "php-1.30.0-wmf.15",
+"akwikibooks": "php-1.30.0-wmf.16",
+"akwiktionary": "php-1.30.0-wmf.16",
 "alswiki": "php-1.30.0-wmf.15",
-"alswikibooks": "php-1.30.0-wmf.15",
-"alswikiquote": "php-1.30.0-wmf.15",
-"alswiktionary": "php-1.30.0-wmf.15",
+"alswikibooks": "php-1.30.0-wmf.16",
+"alswikiquote": "php-1.30.0-wmf.16",
+"alswiktionary": "php-1.30.0-wmf.16",
 "amwiki": "php-1.30.0-wmf.15",
-"amwikiquote": "php-1.30.0-wmf.15",
-"amwiktionary": "php-1.30.0-wmf.15",
+"amwikiquote": "php-1.30.0-wmf.16",
+"amwiktionary": "php-1.30.0-wmf.16",
 "angwiki": "php-1.30.0-wmf.15",
-"angwikibooks": "php-1.30.0-wmf.15",
-"angwikiquote": "php-1.30.0-wmf.15",
-"angwikisource": "php-1.30.0-wmf.15",
-"angwiktionary": "php-1.30.0-wmf.15",
+"angwikibooks": "php-1.30.0-wmf.16",
+"angwikiquote": "php-1.30.0-wmf.16",
+"angwikisource": "php-1.30.0-wmf.16",
+"angwiktionary": "php-1.30.0-wmf.16",
 "anwiki": "php-1.30.0-wmf.15",
-"anwiktionary": "php-1.30.0-wmf.15",
+"anwiktionary": "php-1.30.0-wmf.16",
 "arbcom_cswiki": "php-1.30.0-wmf.15",
 "arbcom_dewiki": "php-1.30.0-wmf.15",
 "arbcom_enwiki": "php-1.30.0-wmf.15",
@@ -35,880 +35,880 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.15",
 "arcwiki": "php-1.30.0-wmf.15",
 "arwiki": "php-1.30.0-wmf.15",
-"arwikibooks": "php-1.30.0-wmf.15",
-"arwikimedia": "php-1.30.0-wmf.15",
-"arwikinews": "php-1.30.0-wmf.15",
-"arwikiquote": "php-1.30.0-wmf.15",
-"arwikisource": "php-1.30.0-wmf.15",
-"arwikiversity": "php-1.30.0-wmf.15",
-"arwiktionary": "php-1.30.0-wmf.15",
+"arwikibooks": "php-1.30.0-wmf.16",
+"arwikimedia": "php-1.30.0-wmf.16",
+"arwikinews": "php-1.30.0-wmf.16",
+"arwikiquote": "php-1.30.0-wmf.16",
+"arwikisource": "php-1.30.0-wmf.16",
+"arwikiversity": "php-1.30.0-wmf.16",
+"arwiktionary": "php-1.30.0-wmf.16",
 "arzwiki": "php-1.30.0-wmf.15",
 "astwiki": "php-1.30.0-wmf.15",
-"astwikibooks": "php-1.30.0-wmf.15",
-"astwikiquote": "php-1.30.0-wmf.15",
-"astwiktionary": "php-1.30.0-wmf.15",
+"astwikibooks": "php-1.30.0-wmf.16",
+"astwikiquote": "php-1.30.0-wmf.16",
+"astwiktionary": "php-1.30.0-wmf.16",
 "aswiki": "php-1.30.0-wmf.15",
-"aswikibooks": "php-1.30.0-wmf.15",
-"aswikisource": "php-1.30.0-wmf.15",
-"aswiktionary": "php-1.30.0-wmf.15",
+"aswikibooks": "php-1.30.0-wmf.16",
+"aswikisource": "php-1.30.0-wmf.16",
+"aswiktionary": "php-1.30.0-wmf.16",
 "atjwiki": "php-1.30.0-wmf.15",
-"auditcomwiki": "php-1.30.0-wmf.15",
+"auditcomwiki": "php-1.30.0-wmf.16",
 "avwiki": "php-1.30.0-wmf.15",
-"avwiktionary": "php-1.30.0-wmf.15",
+"avwiktionary": "php-1.30.0-wmf.16",
 "aywiki": "php-1.30.0-wmf.15",
-"aywikibooks": "php-1.30.0-wmf.15",
-"aywiktionary": "php-1.30.0-wmf.15",
+"aywikibooks": "php-1.30.0-wmf.16",
+"aywiktionary": "php-1.30.0-wmf.16",
 "azbwiki": "php-1.30.0-wmf.15",
 "azwiki": "php-1.30.0-wmf.15",
-"azwikibooks": "php-1.30.0-wmf.15",
-"azwikiquote": "php-1.30.0-wmf.15",
-"azwikisource": "php-1.30.0-wmf.15",
-"azwiktionary": "php-1.30.0-wmf.15",
+

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[wmf/1.30.0-wmf.16]: Typo in calling $this->newsletter->getSubscribersCount()

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

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..


Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Chad 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: QUnit: Drop assertions for expected number of tests

2017-08-30 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374908 )

Change subject: QUnit: Drop assertions for expected number of tests
..

QUnit: Drop assertions for expected number of tests

Drop assertions for expected number of tests
These are no longer necessary nor supported inside
Special:JavaScript/qunit

Drop usage of .async - return promises from all existing
async tests

Bug: T174598
Change-Id: I50ac2b9595416e9142d8b973caf1deb360714891
---
M tests/qunit/mobile.editor.api/test_EditorGateway.js
M tests/qunit/mobile.editor.overlay/test_EditorOverlay.js
M tests/qunit/mobile.infiniteScroll/test_InfiniteScroll.js
M tests/qunit/mobile.languages.structured/test_LanguageOverlay.js
M tests/qunit/mobile.languages.structured/test_util.js
M tests/qunit/mobile.mediaViewer/test_ImageGateway.js
M tests/qunit/mobile.mediaViewer/test_ImageOverlay.js
M tests/qunit/mobile.nearby/test_Nearby.js
M tests/qunit/mobile.nearby/test_NearbyGateway.js
M tests/qunit/mobile.pagelist.scripts/test_WatchstarPageList.js
M tests/qunit/mobile.references.gateway/test_ReferencesHtmlScraperGateway.js
M tests/qunit/mobile.references.gateway/test_ReferencesMobileViewGateway.js
M tests/qunit/mobile.search.api/test_SearchGateway.js
M tests/qunit/mobile.search.util/test_extendSearchParams.js
M tests/qunit/mobile.search/test_MobileWebSearchLogger.js
M tests/qunit/mobile.startup/test_Overlay.js
M tests/qunit/mobile.startup/test_OverlayManager.js
M tests/qunit/mobile.startup/test_Page.js
M tests/qunit/mobile.startup/test_PageGateway.js
M tests/qunit/mobile.startup/test_Skin.js
M tests/qunit/mobile.startup/test_View.js
M tests/qunit/mobile.startup/test_browser.js
M tests/qunit/mobile.startup/test_modules.js
M tests/qunit/mobile.startup/test_time.js
M tests/qunit/mobile.startup/test_user.js
M tests/qunit/mobile.talk.overlays/test_TalkOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionAddOverlay.js
M tests/qunit/mobile.talk.overlays/test_TalkSectionOverlay.js
M tests/qunit/mobile.toggle/test_toggle.js
M tests/qunit/mobile.watchlist/test_WatchList.js
M tests/qunit/mobile.watchlist/test_WatchListGateway.js
M tests/qunit/mobile.watchstar/test_Watchstar.js
M tests/qunit/mobile.watchstar/test_WatchstarGateway.js
33 files changed, 214 insertions(+), 198 deletions(-)


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

diff --git a/tests/qunit/mobile.editor.api/test_EditorGateway.js 
b/tests/qunit/mobile.editor.api/test_EditorGateway.js
index a16d23a..5475089 100644
--- a/tests/qunit/mobile.editor.api/test_EditorGateway.js
+++ b/tests/qunit/mobile.editor.api/test_EditorGateway.js
@@ -24,7 +24,7 @@
}
} );
 
-   QUnit.test( '#getContent (no section)', 1, function ( assert ) {
+   QUnit.test( '#getContent (no section)', function ( assert ) {
var gateway = new EditorGateway( {
api: new mw.Api(),
title: 'MediaWiki:Test.css'
@@ -42,21 +42,26 @@
} ), 'rvsection not passed to api request' );
} );
 
-   QUnit.test( '#getContent', 2, function ( assert ) {
-   var gateway = new EditorGateway( {
+   QUnit.test( '#getContent', function ( assert ) {
+   var gateway,
+   spy = this.spy;
+
+   gateway = new EditorGateway( {
api: new mw.Api(),
title: 'test',
sectionId: 1
} );
 
-   gateway.getContent().done( function ( resp ) {
+   return gateway.getContent().then( function ( resp ) {
assert.strictEqual( resp, 'section', 'return section 
content' );
-   } );
-   gateway.getContent();
-   assert.ok( this.spy.calledOnce, 'cache content' );
+   } ).then( function () {
+   return gateway.getContent();
+   } ).then( function () {
+   assert.ok( spy.calledOnce, 'cache content' );
+   } )
} );
 
-   QUnit.test( '#getContent, new page', 2, function ( assert ) {
+   QUnit.test( '#getContent, new page', function ( assert ) {
var gateway = new EditorGateway( {
api: new mw.Api(),
title: 'test',
@@ -69,7 +74,7 @@
assert.ok( !this.spy.called, 'don\'t try to retrieve content 
using API' );
} );
 
-   QUnit.test( '#getContent, missing section', 2, function ( assert ) {
+   QUnit.test( '#getContent, missing section', function ( assert ) {
var gateway = new EditorGateway( {
api: new mw.Api(),
title: 'test',
@@ -90,7 +95,7 @@
assert.ok( !doneSpy.called, 'don\'t call done' );
} );
 
-   

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[wmf/1.30.0-wmf.15]: Typo in calling $this->newsletter->getSubscribersCount()

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

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..


Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: wmf/1.30.0-wmf.15
Gerrit-Owner: Chad 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove Q25267 (degree Celsius) from conversion config.

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

Change subject: Remove Q25267 (degree Celsius) from conversion config.
..


Remove Q25267 (degree Celsius) from conversion config.

degC is not a SI unit, it is derived from actual system unit (kelvin).
However, we do not support non-multiplicative unit conversions for now,
so we can not normalize such values correctly. We should not pretend
normalizing degC values to themselves is a correct normalization.
Correct normalization would be to convert to kelvins.

Bug: T174353
Change-Id: If3c68317f649adcd62ad3deb7a51ef676ef4c4ec
---
M wmf-config/unitConversionConfig.json
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Chad: Looks good to me, approved
  Lucas Werkmeister (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/unitConversionConfig.json 
b/wmf-config/unitConversionConfig.json
index 6f3b21e..e6444ec 100644
--- a/wmf-config/unitConversionConfig.json
+++ b/wmf-config/unitConversionConfig.json
@@ -101,12 +101,6 @@
 "label": "volt",
 "siLabel": "volt"
 },
-"Q25267": {
-"factor": "1",
-"unit": "Q25267",
-"label": "degrees Celsius",
-"siLabel": "degrees Celsius"
-},
 "Q25269": {
 "factor": "1",
 "unit": "Q25269",
@@ -2645,4 +2639,4 @@
 "label": "radian per metre",
 "siLabel": "radian per metre"
 }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3c68317f649adcd62ad3deb7a51ef676ef4c4ec
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Lucas Werkmeister (WMDE) 
Gerrit-Reviewer: Urbanecm 
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...Newsletter[master]: Typo in calling $this->newsletter->getSubscribersCount()

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

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..


Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[wmf/1.30.0-wmf.15]: Typo in calling $this->newsletter->getSubscribersCount()

2017-08-30 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374907 )

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..

Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/07/374907/1

diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: wmf/1.30.0-wmf.15
Gerrit-Owner: Chad 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[wmf/1.30.0-wmf.16]: Typo in calling $this->newsletter->getSubscribersCount()

2017-08-30 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374906 )

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..

Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/06/374906/1

diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Chad 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Duplicate reports without max data points limit to keep data...

2017-08-30 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374900 )

Change subject: Duplicate reports without max data points limit to keep data 
longer
..


Duplicate reports without max data points limit to keep data longer

Bug: T172453
Change-Id: Iabadd6af646cf186aff811aef8f91d2d9106a3dd
---
A modules/metrics/portal/all_country_data_history
M modules/metrics/portal/config.yaml
A modules/metrics/portal/first_visits_country_history
A modules/metrics/portal/last_action_country_history
A modules/metrics/portal/most_common_country_history
A modules/metrics/search/app_event_counts_langproj_breakdown_history
A modules/metrics/search/cirrus_langproj_breakdown_no_automata_history
A modules/metrics/search/cirrus_langproj_breakdown_with_automata_history
M modules/metrics/search/config.yaml
A modules/metrics/search/desktop_event_counts_langproj_breakdown_history
A modules/metrics/search/mobile_event_counts_langproj_breakdown_history
A 
modules/metrics/search/paulscore_approximations_fulltext_langproj_breakdown_history
A modules/metrics/search/search_threshold_pass_rate_langproj_breakdown_history
13 files changed, 99 insertions(+), 0 deletions(-)

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



diff --git a/modules/metrics/portal/all_country_data_history 
b/modules/metrics/portal/all_country_data_history
new file mode 100755
index 000..d295ff7
--- /dev/null
+++ b/modules/metrics/portal/all_country_data_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/geographic_breakdown.R -d $1 --include_all
diff --git a/modules/metrics/portal/config.yaml 
b/modules/metrics/portal/config.yaml
index b980a64..3a44813 100644
--- a/modules/metrics/portal/config.yaml
+++ b/modules/metrics/portal/config.yaml
@@ -53,6 +53,12 @@
 max_data_points: 60
 funnel: true
 type: script
+all_country_data_history:
+description: Sampled traffic to Wikipedia.org Portal, broken down by 
country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 app_link_clicks:
 description: Clicks to Wikipedia mobile apps and list of apps
 granularity: days
@@ -66,6 +72,12 @@
 max_data_points: 60
 funnel: true
 type: script
+last_action_country_history:
+description: Last action performed on Wikipedia.org Portal per user 
session. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 most_common_country:
 description: Most common action performed on Wikipedia.org Portal per 
user session, broken down by country
 granularity: days
@@ -73,6 +85,12 @@
 max_data_points: 60
 funnel: true
 type: script
+most_common_country_history:
+description: Most common action performed on Wikipedia.org Portal per 
user session, broken down by country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 first_visits_country:
 description: Action performed on Wikipedia.org Portal on each user's 
initial visit, broken down by country
 granularity: days
@@ -80,6 +98,12 @@
 max_data_points: 60
 funnel: true
 type: script
+first_visits_country_history:
+description: Action performed on Wikipedia.org Portal on each user's 
initial visit, broken down by country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 clickthrough_rate:
 description: Last action (no action vs clickthrough) by Wikipedia.org 
Portal visitors
 granularity: days
diff --git a/modules/metrics/portal/first_visits_country_history 
b/modules/metrics/portal/first_visits_country_history
new file mode 100755
index 000..2312008
--- /dev/null
+++ b/modules/metrics/portal/first_visits_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o clickthrough_firstvisit 
--by_country
diff --git a/modules/metrics/portal/last_action_country_history 
b/modules/metrics/portal/last_action_country_history
new file mode 100755
index 000..dd3d177
--- /dev/null
+++ b/modules/metrics/portal/last_action_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o clickthrough_breakdown 
--by_country
diff --git a/modules/metrics/portal/most_common_country_history 
b/modules/metrics/portal/most_common_country_history
new file mode 100755
index 000..d17ce0b
--- /dev/null
+++ b/modules/metrics/portal/most_common_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o most_common_per_visit 
--by_country
diff --git 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Only count .json as message files

2017-08-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374905 )

Change subject: Only count .json as message files
..

Only count .json as message files

Filter when building the list, so the language load function doesn't
have to check all the random pngs to see if they're the language
files it's looking for.
Could be more efficient, building the hash table of language=>files
up front

Change-Id: I558258a01e0f00f69bf9e061a931af42ef599803
---
M sites/all/modules/wmf_communication/MediaWikiMessages.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/05/374905/1

diff --git a/sites/all/modules/wmf_communication/MediaWikiMessages.php 
b/sites/all/modules/wmf_communication/MediaWikiMessages.php
index afe9207..57a2968 100644
--- a/sites/all/modules/wmf_communication/MediaWikiMessages.php
+++ b/sites/all/modules/wmf_communication/MediaWikiMessages.php
@@ -136,7 +136,7 @@
 $dir_iterator = new RecursiveDirectoryIterator( $this->baseMessagesDir 
);
 $iterator = new RecursiveIteratorIterator( $dir_iterator, 
RecursiveIteratorIterator::LEAVES_ONLY );
 foreach ( $iterator as $path => $fileObject ) {
-if ( is_readable( $path ) ) {
+if ( is_readable( $path ) && substr( $path, -5 ) === '.json' ) {
 $messageFiles[] = $path;
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Use dates in the ZIM metadata format (ISO 8601)

2017-08-30 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374904 )

Change subject: Use dates in the ZIM metadata format (ISO 8601)
..

Use dates in the ZIM metadata format (ISO 8601)

ZIM files contain as metadata the creation date string in ISO 8601 format
(-MM-dd).  This updates the Compilation object to parse a Date object
from this String and hold it rather than a long timestamp.

The hardcoded metadata is updated with accurate date strings in this
format.

Change-Id: I74e764ba94c5ce0b5d5d08d151049d17fdeec719
---
M app/src/main/assets/zims.tsv
M app/src/main/java/org/wikipedia/offline/Compilation.java
M app/src/main/java/org/wikipedia/offline/CompilationDetailFragment.java
M app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
M app/src/main/java/org/wikipedia/offline/RemoteCompilationsFragment.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/test/java/org/wikipedia/offline/OfflineManagerTest.java
10 files changed, 116 insertions(+), 112 deletions(-)


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

diff --git a/app/src/main/assets/zims.tsv b/app/src/main/assets/zims.tsv
index 763c1d4..166c90d 100644
--- a/app/src/main/assets/zims.tsv
+++ b/app/src/main/assets/zims.tsv
@@ -1,72 +1,72 @@
-Wikipedia EN/English   
http://download.kiwix.org/zim/wikipedia_en_all_novid.zimen  With 
over 5 million articles, download the entire English Wikipedia for exploring 
offline.  NOVID   
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/320px-Wikipedia-logo-v2-en.svg.png
   
https://upload.wikimedia.org/wikipedia/commons/thumb/b/b3/Wikipedia-logo-v2-en.svg/640px-Wikipedia-logo-v2-en.svg.png
   64048847318 149886720
-Wikipedia EN/English (no pictures) 
http://download.kiwix.org/zim/wikipedia_en_all_nopic.zimen  Save 
storage space with this text-only version of the entire English Wikipedia for 
exploring offline.   NOPIC   
https://upload.wikimedia.org/wikipedia/commons/thumb/3/39/Nomedia-Thumb-EN.svg/320px-Nomedia-Thumb-EN.svg.png
   
https://upload.wikimedia.org/wikipedia/commons/thumb/f/f5/Nomedia-Large_image-EN.svg/640px-Nomedia-Large_image-EN.svg.png
   20180173311 148322880
-Medical Wiki EN/English
http://download.kiwix.org/zim/wikipedia_en_medicine.zim en  With 51,000+ 
medical articles, Wikimed is the largest and most comprehensive collection of 
health-related articles available. It includes content on diseases, 
medications, anatomy, and sanitation. As an encyclopedic medical dictionary, 
Wikimed is perfect for practicing physicians, as well as medicine and other 
healthcare students.If you are in the developing world without access to 
the Internet or on a boat in the middle of nowhere you can now access one of 
the foremost and up-to-date medical dictionaries, for free.   ALL 
https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Wiki_Project_Med_Foundation_logo.svg/320px-Wiki_Project_Med_Foundation_logo.svg.png
   
https://upload.wikimedia.org/wikipedia/commons/thumb/4/4e/WikiMedicine-Large_image-EN%404x.png/640px-WikiMedicine-Large_image-EN%404x.png
   4627268005  150154560
-Medical Wiki EN/English (no video) 
http://download.kiwix.org/zim/wikipedia_en_medicine_novid.zim   en  With 
51,000+ medical articles, Wikimed is the largest and most comprehensive 
collection of health-related articles available. It includes content on 
diseases, medications, anatomy, and sanitation. As an encyclopedic medical 
dictionary, Wikimed is perfect for practicing physicians, as well as medicine 
and other healthcare students.If you are in the developing world without 
access to the Internet or on a boat in the middle of nowhere you can now access 
one of the foremost and up-to-date medical dictionaries, for free.   NOVID   
https://upload.wikimedia.org/wikipedia/commons/thumb/5/58/Wiki_Project_Med_Foundation_logo.svg/320px-Wiki_Project_Med_Foundation_logo.svg.png
   
https://upload.wikimedia.org/wikipedia/commons/thumb/3/35/WikiMedicine-nomedia-Large_image-EN.svg/640px-WikiMedicine-nomedia-Large_image-EN.svg.png
 1181464899  150154560
-English Wikipedia for Schools  
http://download.kiwix.org/zim/wikipedia_en_for-schools.zim  en  This 
selection of articles from English Wikipedia matches the UK National Curriculum 
and can be used by school children around the world.   The 2013 edition of 
Wikipedia for Schools contains 6,000 articles comprising 26 million words, as 
well as 50,000 images. Taking the UK National Curriculum as its starting point, 
articles 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviMailStore: stop using deprecated Civi fn

2017-08-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374902 )

Change subject: CiviMailStore: stop using deprecated Civi fn
..

CiviMailStore: stop using deprecated Civi fn

Change-Id: If59ee9a7f5e6f67f20f6891b514b647b2e326455
---
M sites/all/modules/wmf_communication/CiviMail/CiviMailStore.php
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/02/374902/1

diff --git a/sites/all/modules/wmf_communication/CiviMail/CiviMailStore.php 
b/sites/all/modules/wmf_communication/CiviMail/CiviMailStore.php
index 4942b6a..414f5c1 100644
--- a/sites/all/modules/wmf_communication/CiviMail/CiviMailStore.php
+++ b/sites/all/modules/wmf_communication/CiviMail/CiviMailStore.php
@@ -4,7 +4,7 @@
 use \CRM_Activity_BAO_Activity;
 use \CRM_Core_DAO;
 use \CRM_Core_DAO_Email;
-use \CRM_Core_OptionGroup;
+use \CRM_Core_PseudoConstant;
 use \CRM_Core_Transaction;
 use \CRM_Mailing_BAO_MailingJob;
 use \CRM_Mailing_BAO_Mailing;
@@ -178,9 +178,10 @@
$date = gmdate( 'YmdHis' );
}
if ( self::$emailActivityTypeId == -1 ) {
-   self::$emailActivityTypeId = 
CRM_Core_OptionGroup::getValue('activity_type',
-   'Email',
-   'name'
+   self::$emailActivityTypeId = 
CRM_Core_PseudoConstant::getKey(
+   'CRM_Activity_BAO_Activity',
+   'activity_type_id',
+   'Email'
);
}
$activity = array(

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add unit tests for Thank You mailer

2017-08-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374903 )

Change subject: Add unit tests for Thank You mailer
..

Add unit tests for Thank You mailer

Change-Id: If2046ab1ab6632eb9cfa4bb36d28b24b22d21bab
---
M phpunit.xml
A sites/all/modules/thank_you/tests/phpunit/ThankYouTest.php
2 files changed, 99 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/03/374903/1

diff --git a/phpunit.xml b/phpunit.xml
index 2f3e236..06e7423 100644
--- a/phpunit.xml
+++ b/phpunit.xml
@@ -21,6 +21,9 @@
   
 sites/all/modules/recurring_globalcollect/tests
   
+  
+sites/all/modules/thank_you/tests/phpunit
+  
   
 sites/all/modules/wmf_audit/tests
   
diff --git a/sites/all/modules/thank_you/tests/phpunit/ThankYouTest.php 
b/sites/all/modules/thank_you/tests/phpunit/ThankYouTest.php
new file mode 100644
index 000..2425364
--- /dev/null
+++ b/sites/all/modules/thank_you/tests/phpunit/ThankYouTest.php
@@ -0,0 +1,96 @@
+message = array(
+   'city' => 'Somerville',
+   'country' => 'US',
+   'currency' => 'USD',
+   'date' => '2012-05-01 00:00:00',
+   'email' => 'generousdo...@example.org',
+   'first_name' => 'Test',
+   'last_name' => 'Es',
+   'language' => 'en',
+   'gateway' => 'test_gateway',
+   'gateway_txn_id' => mt_rand(),
+   'gross' => '1.23',
+   'payment_method' => 'cc',
+   'postal_code' => '02144',
+   'state_province' => 'MA',
+   'street_address' => '1 Davis Square',
+   );
+   $this->old_civimail = variable_get( 
'thank_you_add_civimail_records', 'false' );
+   $this->old_civimail_rate = variable_get( 
'thank_you_civimail_rate', 1.0 );
+
+   $contribution = wmf_civicrm_contribution_message_import( 
$this->message );
+
+   $this->contact_id = $contribution['contact_id'];
+   $this->contribution_id = $contribution['id'];
+   }
+
+   public function tearDown() {
+   parent::cleanUpContact( $this->contact_id );
+   variable_set( 'thank_you_add_civimail_records', 
$this->old_civimail );
+   variable_get( 'thank_you_civimail_rate', 
$this->old_civimail_rate );
+   parent::tearDown();
+   }
+
+   public function testSendThankYou() {
+   variable_set( 'thank_you_add_civimail_records', 'false' );
+   $result = thank_you_for_contribution( $this->contribution_id );
+   $this->assertTrue( $result );
+   $this->assertEquals( 1, TestMailer::countMailings() );
+   $sent = TestMailer::getMailing( 0 );
+   $this->assertEquals( $this->message['email'], 
$sent['to_address'] );
+   $this->assertEquals(
+   "{$this->message['first_name']} 
{$this->message['last_name']}",
+   $sent['to_name']
+   );
+   $expectedBounce = 'bounce-' .
+   str_replace( '@', '=', $this->message['email'] ) .
+   '@donate.wikimedia.org';
+   $this->assertEquals( $expectedBounce, $sent['reply_to'] );
+   $this->assertRegExp( '/\$ 1.23/', $sent['html'] );
+   }
+
+   public function testSendThankYouAddCiviMailActivity() {
+   variable_set( 'thank_you_add_civimail_records', 'true' );
+   variable_set( 'thank_you_civimail_rate', 1.0 );
+   $result = thank_you_for_contribution( $this->contribution_id );
+   $this->assertTrue( $result );
+   $activity = civicrm_api3( 'Activity', 'getSingle', array(
+   'contact_id' => $this->contact_id,
+   'activity_type_id' => CRM_Core_PseudoConstant::getKey(
+   'CRM_Activity_BAO_Activity',
+   'activity_type_id',
+   'Email'
+   )
+   ) );
+   $this->assertEquals( 1, TestMailer::countMailings() );
+   $sent = TestMailer::getMailing( 0 );
+   $this->assertEquals( $activity['details'], $sent['html'] );
+   }
+}

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

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

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] labs...heritage[master]: Make handling of wikidata urls more compatible with other ha...

2017-08-30 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374901 )

Change subject: Make handling of wikidata urls more compatible with other 
handlers
..

Make handling of wikidata urls more compatible with other handlers

Changes the parser for wikidata urls so as to output a result
compatible with that of the wikiproject url parser.

Change-Id: I966ad0e37173264efd175bc4fa5dfcf343486eb9
---
M api/includes/CommonFunctions.php
M api/includes/FormatHtml.php
M api/includes/FormatHtmllist.php
M api/includes/FormatWikitable.php
M api/tests/CommonFunctionsTest.php
5 files changed, 63 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/01/374901/1

diff --git a/api/includes/CommonFunctions.php b/api/includes/CommonFunctions.php
index 164f665..37bae77 100644
--- a/api/includes/CommonFunctions.php
+++ b/api/includes/CommonFunctions.php
@@ -45,8 +45,28 @@
 }
 
 //Separates the parsing from the prettifying
+function matchWikidataLink($url) {
+   /* Determine if a string is a Wikidata page or entity link
+* If the pattern matches, returns an array with the matching parts
+* If the pattern doesn't match, returns NULL
+*
+* The format of the array is designed to be compatible with that for
+* matchWikiprojectLink().
+*/
+   $var = NULL;
+   $pattern = 
'/(https?:)?\/\/((www)\.(wikidata)\.org\/(wiki|entity)\/(.*))/';
+   if ( !preg_match( $pattern, $url, $var )) {
+   throw new Exception('The provided url was not a wikidata 
link.');
+   }
+   else {
+   unset( $var[5] );
+   $var = array_values( $var );  // rebase array
+   }
+   return $var;
+}
+
 function matchWikiprojectLink($text) {
-   /* Determine if a string is a wikipedia link
+   /* Determine if a string is a Wikipedia link
 * If the pattern matches, returns an array with the matching parts
 * If the pattern doesn't match, returns NULL
 */
@@ -60,13 +80,31 @@
return $var;
 }
 
+/**
+ * Return a mathing wikiproject or wikidata url
+ */
+function matchUrl( $url ) {
+   try {
+   $m = matchWikiprojectLink( $url );
+   } catch ( Exception $e ) {
+   // Possibly a wikidata entity/wiki link
+   try {
+   $m = matchWikidataLink( $url );
+   } catch ( Exception $e ) {
+   // Normal text
+   $m = null;
+   }
+   }
+   return $m;
+}
+
 function urlencodeWikiprojectLink($var, $drop_oldid = false) {
/* Takes a matching group from matchWikiprojectLink
 * and returns an url with the pagename urlencoded.
 */
$site = $var[3] . '.' . $var[4] . '.org';
$title = urlencode( $var[5] );
-   if ( $drop_oldid ){
+   if ( $drop_oldid or !isset( $var[6] ) ){
return $site . '/w/index.php?title=' . $title;
}
return $site . '/w/index.php?title=' . $title . '=' . $var[6];
@@ -74,16 +112,6 @@
 
 function replaceSpaces( $in_string ) {
return str_replace(' ', '_', $in_string);
-}
-
-function matchWikidataQid($url) {
-   /* Extract the Qid from a Wikidata page or entity link */
-   $var = NULL;
-   $pattern = '/(https?:)?\/\/(www\.wikidata\.org\/(wiki|entity)\/(.*))/';
-   if ( !preg_match( $pattern, $url, $var )) {
-   throw new Exception('The provided url was not a wikidata 
link.');
-   }
-   return $var;
 }
 
 function makeWikidataUrl($qid) {
diff --git a/api/includes/FormatHtml.php b/api/includes/FormatHtml.php
index c0a9403..7401c9a 100644
--- a/api/includes/FormatHtml.php
+++ b/api/includes/FormatHtml.php
@@ -128,20 +128,13 @@
 * Make this a nice link if it is a url (source column)
 */
static function prettifyUrls( $text ) {
-   try {
-   $m = matchWikiprojectLink( $text );
+   $m = matchUrl( $text );
+   if ( $m ) {
$linkText = str_replace( '_', ' ', $m[5] );
$encodedLink = urlencodeWikiprojectLink( $m );
return makeHTMLlink( 'https://' . $encodedLink, 
$linkText );
-   } catch ( Exception $e ) {
-   // Possibly a wikidata entity/wiki link
-   try {
-   $m = matchWikidataQid( $text );
-   return self::makeHTMLlink( 'https://' . $m[2], 
$m[4] );
-   } catch ( Exception $e ) {
-   // Normal text
-   return htmlspecialchars( $text );
-   }
+   } else {
+   return htmlspecialchars( $text );
}
}
 
diff --git 

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Duplicate reports without max data points limit to keep data...

2017-08-30 Thread Chelsyx (Code Review)
Chelsyx has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374900 )

Change subject: Duplicate reports without max data points limit to keep data 
longer
..

Duplicate reports without max data points limit to keep data longer

Bug: T172453
Change-Id: Iabadd6af646cf186aff811aef8f91d2d9106a3dd
---
A modules/metrics/portal/all_country_data_history
M modules/metrics/portal/config.yaml
A modules/metrics/portal/first_visits_country_history
A modules/metrics/portal/last_action_country_history
A modules/metrics/portal/most_common_country_history
A modules/metrics/search/app_event_counts_langproj_breakdown_history
A modules/metrics/search/cirrus_langproj_breakdown_no_automata_history
A modules/metrics/search/cirrus_langproj_breakdown_with_automata_history
M modules/metrics/search/config.yaml
A modules/metrics/search/desktop_event_counts_langproj_breakdown_history
A modules/metrics/search/mobile_event_counts_langproj_breakdown_history
A 
modules/metrics/search/paulscore_approximations_fulltext_langproj_breakdown_history
A modules/metrics/search/search_threshold_pass_rate_langproj_breakdown_history
13 files changed, 99 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/00/374900/1

diff --git a/modules/metrics/portal/all_country_data_history 
b/modules/metrics/portal/all_country_data_history
new file mode 100755
index 000..d295ff7
--- /dev/null
+++ b/modules/metrics/portal/all_country_data_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/geographic_breakdown.R -d $1 --include_all
diff --git a/modules/metrics/portal/config.yaml 
b/modules/metrics/portal/config.yaml
index b980a64..3a44813 100644
--- a/modules/metrics/portal/config.yaml
+++ b/modules/metrics/portal/config.yaml
@@ -53,6 +53,12 @@
 max_data_points: 60
 funnel: true
 type: script
+all_country_data_history:
+description: Sampled traffic to Wikipedia.org Portal, broken down by 
country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 app_link_clicks:
 description: Clicks to Wikipedia mobile apps and list of apps
 granularity: days
@@ -66,6 +72,12 @@
 max_data_points: 60
 funnel: true
 type: script
+last_action_country_history:
+description: Last action performed on Wikipedia.org Portal per user 
session. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 most_common_country:
 description: Most common action performed on Wikipedia.org Portal per 
user session, broken down by country
 granularity: days
@@ -73,6 +85,12 @@
 max_data_points: 60
 funnel: true
 type: script
+most_common_country_history:
+description: Most common action performed on Wikipedia.org Portal per 
user session, broken down by country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 first_visits_country:
 description: Action performed on Wikipedia.org Portal on each user's 
initial visit, broken down by country
 granularity: days
@@ -80,6 +98,12 @@
 max_data_points: 60
 funnel: true
 type: script
+first_visits_country_history:
+description: Action performed on Wikipedia.org Portal on each user's 
initial visit, broken down by country. Historical data store.
+granularity: days
+starts: 2017-04-01
+funnel: true
+type: script
 clickthrough_rate:
 description: Last action (no action vs clickthrough) by Wikipedia.org 
Portal visitors
 granularity: days
diff --git a/modules/metrics/portal/first_visits_country_history 
b/modules/metrics/portal/first_visits_country_history
new file mode 100755
index 000..2312008
--- /dev/null
+++ b/modules/metrics/portal/first_visits_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o clickthrough_firstvisit 
--by_country
diff --git a/modules/metrics/portal/last_action_country_history 
b/modules/metrics/portal/last_action_country_history
new file mode 100755
index 000..dd3d177
--- /dev/null
+++ b/modules/metrics/portal/last_action_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o clickthrough_breakdown 
--by_country
diff --git a/modules/metrics/portal/most_common_country_history 
b/modules/metrics/portal/most_common_country_history
new file mode 100755
index 000..d17ce0b
--- /dev/null
+++ b/modules/metrics/portal/most_common_country_history
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+Rscript modules/metrics/portal/engagement.R -d $1 -o most_common_per_visit 
--by_country
diff --git 

[MediaWiki-commits] [Gerrit] labs...heritage[master]: [WIP]Merge Wikidata branch into master

2017-08-30 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374899 )

Change subject: [WIP]Merge Wikidata branch into master
..

[WIP]Merge Wikidata branch into master

Introduces harvesting capabilities for Wikidata via sparql.
An extra "type" parameter is added to monuments_config to
determine if it a sparql or wiki list harvest is needed.

`project` (in combination with `lang`) now gives the project where report
pages should live.

`sparql` in monuments_config contains the dataset specific select bit

A new command line argument `-skip_wd` is added to opt out of harvesting
from wikidata during a "harvest all" run.

Also:
* Moves sql template files out of sql dir into the template dir
* Ensure sql transactions are committed (needed with db upgrade)
* Don't crash just because we cannot save (unknown field reports)
* Handle sparql read timeout issues (stop-gap measure awaiting
  https://gerrit.wikimedia.org/r/371697 )
* Add the `skip` config setting which, when set to true, skips that
  particular config file from harvesting.

This rebases the following commits in the Wikidata branch:
a2e9633 An example wikidata config
6990bf7 Construct country sqls for wikidata configs
b1c1b66 Create fill monuments_all sql for wikidata configs
ed3e133 Repair broken skip
8b2f94c fix
00eeca4 Only strip on one side and fix whitespace in the demo config
584eb78 Moving sql template files out of sql dir into the template dir
6ebf501 Ensure sql transactions are committed
3cef00c Don't crash just because we cannot save
ed3c812 Add address to handled wikidata fields.
ce7ab5d Proof of concept to harvest Wikidata into monuments database
f3da0f4 Make scripts dealing with the sparql source field deal with sparql 
harvested data
f5fb78b Make api handle sparql harvested source fields
07cbf9c Harvest monument_article via sparql
c6c000c Handle sparql http timeout issue
df91ce0 Allow skipping some configs during full harvest.

Bug: T174146
Change-Id: Iba5a8cbb493707d07d415bc24c042d3d4e2173e0
---
M README.md
M api/includes/ApiMonuments.php
M api/includes/CommonFunctions.php
M api/includes/FormatHtml.php
M api/includes/FormatHtmllist.php
M api/includes/FormatJson.php
M api/includes/FormatWikitable.php
M api/tests/CommonFunctionsTest.php
M erfgoedbot/add_coord_to_articles.py
M erfgoedbot/add_object_location_monuments.py
M erfgoedbot/categorize_images.py
A erfgoedbot/common.py
M erfgoedbot/database_connection.py
M erfgoedbot/database_statistics.py
M erfgoedbot/fill_table_monuments_all.py
M erfgoedbot/images_of_monuments_without_id.py
M erfgoedbot/missing_commonscat_links.py
M erfgoedbot/monument_tables.py
M erfgoedbot/monuments_config.py
A erfgoedbot/monuments_config/nl-wd_nl.json
M erfgoedbot/populate_image_table.py
A erfgoedbot/template/classic_table.sql.template
A erfgoedbot/template/fill_monument_all_wikidata.sql.template
R erfgoedbot/template/monuments_all_intro.sql
R erfgoedbot/template/monuments_all_outro.sql
A erfgoedbot/template/wikidata_query.sparql
A erfgoedbot/template/wikidata_table.sql.template
M erfgoedbot/top_streets.py
M erfgoedbot/unused_monument_images.py
M erfgoedbot/update_database.py
M erfgoedbot/update_id_dump.py
M tests/custom_assertions.py
A tests/test_common.py
M tests/test_fill_table.py
M tests/test_monument_tables.py
M tests/test_monuments_config.py
M tests/test_populate_image_table.py
37 files changed, 919 insertions(+), 255 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/99/374899/1

diff --git a/README.md b/README.md
index 6c6db8f..50b5352 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@
 ```
 # Create database tables
 python erfgoedbot/monument_tables.py
-python fill_table_monuments_all.py
+python erfgoedbot/fill_table_monuments_all.py
 
 # Build and start the Docker containers
 docker-compose -f docker-compose-bot.yml up --build -d
diff --git a/api/includes/ApiMonuments.php b/api/includes/ApiMonuments.php
index a4a3713..5efa5f4 100644
--- a/api/includes/ApiMonuments.php
+++ b/api/includes/ApiMonuments.php
@@ -121,7 +121,7 @@
$fulltextColumns = [ 'name' => 1 ];
 
if ( $this->getParam( 'format' ) == 'dynamickml' ) {
-   # don't search just pass along the search parameters to 
kml network link file
+   // don't search just pass along the search parameters 
to kml network link file
$DynKml = new DynamicKml;
$reqUrl = 'http://' . $_SERVER['SERVER_NAME'] . 
$_SERVER['REQUEST_URI'];
$DynKml->output( $reqUrl );
diff --git a/api/includes/CommonFunctions.php b/api/includes/CommonFunctions.php
index e56b382..164f665 100644
--- a/api/includes/CommonFunctions.php
+++ b/api/includes/CommonFunctions.php
@@ -53,7 +53,8 @@
$projects = array("wikipedia", "wikivoyage", "wikidata", "wikimedia");
$projectRegex = "(" . join("|", 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Respect beta feature in new wikitext editor

2017-08-30 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374898 )

Change subject: Respect beta feature in new wikitext editor
..

Respect beta feature in new wikitext editor

Bug: T173480
Change-Id: I2ca5a33f09aefe0c3d31082270869a13cee14fc4
---
M CodeMirror.hooks.php
M resources/modules/ve-cm/ve.ui.CodeMirror.init.js
2 files changed, 28 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CodeMirror 
refs/changes/98/374898/1

diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index ef61fbf..dd2725e 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -3,7 +3,7 @@
 class CodeMirrorHooks {
 
/**
-* Checks, if CodeMirror should be loaded on this page or not.
+* Checks if CodeMirror is enabled for this user
 *
 * @param IContextSource $context The current ContextSource object
 * @staticvar null|boolean $isEnabled Saves, if CodeMirror should be 
loaded on this page or not
@@ -16,10 +16,9 @@
// Check, if we already checked, if page action is editing, if 
not, do it now
if ( $isEnabled === null ) {
if ( !$wgCodeMirrorBetaFeature ) {
-   $isEnabled = in_array( Action::getActionName( 
$context ), [ 'edit', 'submit' ] );
+   $isEnabled = true;
} else {
-   $isEnabled = in_array( Action::getActionName( 
$context ), [ 'edit', 'submit' ] ) &&
-   $wgCodeMirrorBetaFeature &&
+   $isEnabled = $wgCodeMirrorBetaFeature &&

ExtensionRegistry::getInstance()->isLoaded( 'BetaFeatures' ) &&
BetaFeatures::isFeatureEnabled(
$context->getUser(), 
'codemirror-syntax-highlight' );
@@ -27,6 +26,18 @@
}
 
return $isEnabled;
+   }
+
+   /**
+* Checks if CodeMirror for textarea wikitext editor should be loaded 
on this page or not.
+*
+* @param IContextSource $context The current ContextSource object
+* @staticvar null|boolean $isEnabled Saves, if CodeMirror should be 
loaded on this page or not
+* @return bool
+*/
+   private static function isCodeMirrorOnPage( IContextSource $context ) {
+   return in_array( Action::getActionName( $context ), [ 'edit', 
'submit' ] ) &&
+   self::isCodeMirrorEnabled( $context );
}
 
/**
@@ -38,9 +49,10 @@
 * @param Skin $skin
 */
public static function onBeforePageDisplay( OutputPage &$out, Skin 
&$skin ) {
-   if ( self::isCodeMirrorEnabled( $out->getContext() ) ) {
+   if ( self::isCodeMirrorOnPage( $out->getContext() ) ) {
$out->addModules( 'ext.CodeMirror' );
}
+   $out->addJsConfigVars( 'wgCodeMirrorEnabled', 
self::isCodeMirrorEnabled( $out->getContext() ) );
}
 
/**
diff --git a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js 
b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js
index 4708879..11a85e4 100644
--- a/resources/modules/ve-cm/ve.ui.CodeMirror.init.js
+++ b/resources/modules/ve-cm/ve.ui.CodeMirror.init.js
@@ -1,12 +1,14 @@
 ( function ( ve, mw ) {
-   mw.libs.ve.targetLoader.addPlugin( function () {
-   var i, target, index;
-   for ( i in ve.init.mw ) {
-   target = ve.init.mw[ i ];
-   if ( target === ve.init.mw.DesktopArticleTarget ) {
-   index = target.static.actionGroups[ 1 
].include.indexOf( 'changeDirectionality' );
-   target.static.actionGroups[ 1 ].include.splice( 
index, 0, 'codeMirror' );
+   if ( mw.config.get( 'wgCodeMirrorEnabled' ) ) {
+   mw.libs.ve.targetLoader.addPlugin( function () {
+   var i, target, index;
+   for ( i in ve.init.mw ) {
+   target = ve.init.mw[ i ];
+   if ( target === ve.init.mw.DesktopArticleTarget 
) {
+   index = target.static.actionGroups[ 1 
].include.indexOf( 'changeDirectionality' );
+   target.static.actionGroups[ 1 
].include.splice( index, 0, 'codeMirror' );
+   }
}
-   }
-   } );
+   } );
+   }
 }( ve, mediaWiki ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ca5a33f09aefe0c3d31082270869a13cee14fc4
Gerrit-PatchSet: 1

[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] shinkengen for all projects

2017-08-30 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374897 )

Change subject: [WIP] shinkengen for all projects
..

[WIP] shinkengen for all projects

Untested!

Cleans up some now-unused config and heira etc.

Bug: T166845
Change-Id: Idcf1e283c0dfdd8546cd46c76155b836b7c7677c
---
M hieradata/labs.yaml
M modules/shinken/files/shinkengen
M modules/shinken/templates/shinkengen.yaml.erb
3 files changed, 24 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/374897/1

diff --git a/hieradata/labs.yaml b/hieradata/labs.yaml
index d085d2e..e5b9569 100644
--- a/hieradata/labs.yaml
+++ b/hieradata/labs.yaml
@@ -86,7 +86,6 @@
 puppetmaster: "labs-puppetmaster.wikimedia.org"
 saltmaster: "labcontrol1001.wikimedia.org"
 mysql::server::use_apparmor: false  # The images we have for debian don't 
support it
-keystone_public_port: '5000'
 
 # All labs instances have internet connectivity, so do not bother with proxies
 profile::base::use_apt_proxy: false
diff --git a/modules/shinken/files/shinkengen b/modules/shinken/files/shinkengen
index 619f172..40b0539 100755
--- a/modules/shinken/files/shinkengen
+++ b/modules/shinken/files/shinkengen
@@ -40,6 +40,7 @@
 from keystoneclient.session import Session as KeystoneSession
 from keystoneclient.auth.identity.v3 import Password as KeystonePassword
 
+from keystoneclient.v3 import Client as KeystoneClient
 from novaclient import client as novaclient
 
 
@@ -61,21 +62,18 @@
  for key, value in self.properties.iteritems())
 return 'define %s {\n%s}\n' % (self.type, config_str)
 
+def get_keystone_session(project, observer_config):
+return KeystoneSession(auth=KeystonePassword(
+auth_url=observer_config['OS_AUTH_URL'],
+username=observer_config['OS_USERNAME'],
+password=observer_config['OS_PASSWORD'],
+project_name=project,
+user_domain_name='default',
+project_domain_name='default'
+))
 
-def get_instances(project, observer_pass, keystone_host, keystone_port):
-client = novaclient.Client(
-"2.0",
-session=KeystoneSession(auth=KeystonePassword(
-auth_url="http://{host}:{port}/v3".format(host=keystone_host,
-  port=keystone_port),
-username="novaobserver",
-password=observer_pass,
-project_name=project,
-user_domain_name='default',
-project_domain_name='default'
-))
-)
-
+def get_instances(project, keystone_session):
+client = novaclient.Client("2.0", session=keystone_session)
 hosts = []
 for instance in client.servers.list():
 hosts.append({
@@ -112,10 +110,14 @@
 nova_observer = yaml.safe_load(n)
 observer_pass = nova_observer['OS_PASSWORD']
 
-for project in config['projects']:
-instances = get_instances(project, observer_pass,
-  config['keystone_host'],
-  config['keystone_port'])
+client = KeystoneClient(
+session=get_keystone_session('bastion', nova_observer),
+endpoint=nova_observer['OS_AUTH_URL'],
+interface='public'
+)
+
+for project in client.projects.list():
+instances = get_instances(project.name, 
get_keystone_session(project.name, nova_observer))
 host_configs = []
 for instance in instances:
 co = ConfigObject('host')
@@ -127,7 +129,7 @@
 # particular roles with checks.  role::labs::instance is
 # implicitly applied to all instances via
 # manifests/site.pp, so we need to add it here explicitly.
-hostgroups = [project, 'role::labs::instance']
+hostgroups = [project.name, 'role::labs::instance']
 hostgroups += get_instance_roles(instance['project'],
  instance['fqdn'],
  config['puppet_enc_host'])
@@ -135,13 +137,13 @@
 # For each project added to monitoring we expect a contactgroup 
with the same
 # name added.
 # FIXME: Implement access mechanism more fine grained than 
per-project
-co.properties['contact_groups'] = project
+co.properties['contact_groups'] = project.name
 # Used to auto derive metric paths in graphite, which is of the 
form
 # ...
-co.properties['notes'] = project  # Used for auto deriving 
graphite path
+co.properties['notes'] = project.name  # Used for auto deriving 
graphite path
 host_configs.append(co)
 hosts_config_path = '%s/%s.cfg' % (
-config['output_path'], project
+config['output_path'], project.name
 )
 file_content = ''.join([str(hc) 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: noreferences.py: arwiki config

2017-08-30 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374896 )

Change subject: noreferences.py: arwiki config
..

noreferences.py: arwiki config

Bug: T174615
Change-Id: Ibb553f0bf3282cdf264ca31a2c31c050d79e6ee0
---
M scripts/noreferences.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/96/374896/1

diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index b2e83f5..504c638 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -380,7 +380,7 @@
 referencesTemplates = {
 'wikipedia': {
 'ar': ['Reflist', 'مراجع', 'ثبت المراجع', 'ثبت_المراجع',
-   'بداية المراجع', 'نهاية المراجع'],
+   'بداية المراجع', 'نهاية المراجع', 'المراجع'],
 'be': [u'Зноскі', u'Примечания', u'Reflist', u'Спіс заўваг',
u'Заўвагі'],
 'be-tarask': [u'Зноскі'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix various PostgreSQL failures

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

Change subject: Fix various PostgreSQL failures
..


Fix various PostgreSQL failures

* Fix schema for image_comment_temp.
* Provide values in CommentStoreTest::provideInsertRoundTrip() for
  columns where the PG schema doesn't have a default value but the MySQL
  schema does.
* Call nextSequenceValue() from CommentStoreTest::testInsertRoundTrip().
* Correctly handle $options being the string 'FOR UPDATE' in
  DatabasePostgres::selectSQLText()
* Correctly handle the initial table in DatabasePostgres::selectSQLText() FOR
  UPDATE mangling.
* Correctly handle aliases in DatabasePostgres::selectSQLText() FOR
  UPDATE mangling.

Tests in PG are still going to be broken thanks to the fact that
nextSequenceValue() and insertId() can't be separated by another
nextSequenceValue()/insertId() pair. That should be taken care of by
T164898/T164900.

Change-Id: Ia770a003ca9170ab8bcc1436d8afe30700e00ada
---
M includes/libs/rdbms/database/DatabasePostgres.php
M maintenance/postgres/archives/patch-comment-table.sql
M maintenance/postgres/tables.sql
M tests/phpunit/includes/CommentStoreTest.php
4 files changed, 33 insertions(+), 4 deletions(-)

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



diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index bdac06c..fcfd937 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -521,6 +521,10 @@
public function selectSQLText(
$table, $vars, $conds = '', $fname = __METHOD__, $options = [], 
$join_conds = []
) {
+   if ( is_string( $options ) ) {
+   $options = [ $options ];
+   }
+
// Change the FOR UPDATE option as necessary based on the join 
conditions. Then pass
// to the parent function to get the actual SQL text.
// In Postgres when using FOR UPDATE, only the main table and 
tables that are inner joined
@@ -532,12 +536,28 @@
$forUpdateKey = array_search( 'FOR UPDATE', $options, 
true );
if ( $forUpdateKey !== false && $join_conds ) {
unset( $options[$forUpdateKey] );
+   $options['FOR UPDATE'] = [];
+
+   // All tables not in $join_conds are good
+   foreach ( $table as $alias => $name ) {
+   if ( is_numeric( $alias ) ) {
+   $alias = $name;
+   }
+   if ( !isset( $join_conds[$alias] ) ) {
+   $options['FOR UPDATE'][] = 
$alias;
+   }
+   }
 
foreach ( $join_conds as $table_cond => 
$join_cond ) {
if ( 0 === preg_match( 
'/^(?:LEFT|RIGHT|FULL)(?: OUTER)? JOIN$/i', $join_cond[0] ) ) {
$options['FOR UPDATE'][] = 
$table_cond;
}
}
+
+   // Quote alias names so $this->tableName() 
won't mangle them
+   $options['FOR UPDATE'] = array_map( function ( 
$name ) use ( $table ) {
+   return isset( $table[$name] ) ? 
$this->addIdentifierQuotes( $name ) : $name;
+   }, $options['FOR UPDATE'] );
}
 
if ( isset( $options['ORDER BY'] ) && $options['ORDER 
BY'] == 'NULL' ) {
diff --git a/maintenance/postgres/archives/patch-comment-table.sql 
b/maintenance/postgres/archives/patch-comment-table.sql
index 8f2b3f3..243a3b3 100644
--- a/maintenance/postgres/archives/patch-comment-table.sql
+++ b/maintenance/postgres/archives/patch-comment-table.sql
@@ -21,7 +21,7 @@
 
 CREATE TABLE image_comment_temp (
imgcomment_name   TEXT NOT NULL,
-   imgcomment_comment_id INTEGER NOT NULL,
-   PRIMARY KEY (imgcomment_name, imgcomment_comment_id)
+   imgcomment_description_id INTEGER NOT NULL,
+   PRIMARY KEY (imgcomment_name, imgcomment_description_id)
 );
 CREATE UNIQUE INDEX imgcomment_name ON image_comment_temp (imgcomment_name);
diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql
index c7ace89..eea9e68 100644
--- a/maintenance/postgres/tables.sql
+++ b/maintenance/postgres/tables.sql
@@ -358,8 +358,8 @@
 
 CREATE TABLE image_comment_temp (
imgcomment_name   TEXT NOT NULL,
-   imgcomment_comment_id INTEGER NOT NULL,
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: exception: Support message normalisation for structured logging

2017-08-30 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374895 )

Change subject: exception: Support message normalisation for structured logging
..

exception: Support message normalisation for structured logging

Let Monolog insert exception_id and exception_url so that consumers
of logging data (such as Logstash) may provide a normalised message
that does not contain these variants, for ease of aggregation
and message trend counting.

Bug: T45086
Change-Id: I7cc8f8c9e68031ad6771593d390079c0a3a535b9
---
M includes/exception/MWExceptionHandler.php
1 file changed, 21 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/374895/1

diff --git a/includes/exception/MWExceptionHandler.php 
b/includes/exception/MWExceptionHandler.php
index bf232e9..a2ec391 100644
--- a/includes/exception/MWExceptionHandler.php
+++ b/includes/exception/MWExceptionHandler.php
@@ -442,6 +442,24 @@
}
 
/**
+* Get a normalised message for formatting with PSR-3 log event context.
+*
+* Must be used together with `getLogContext()` to be useful.
+*
+* @since 1.30
+* @param Exception|Throwable $e
+* @return string
+*/
+   public static function getLogNormalMessage( $e ) {
+   $type = get_class( $e );
+   $file = $e->getFile();
+   $line = $e->getLine();
+   $message = $e->getMessage();
+
+   return "[{exception_id}] {exception_url}   $type from line 
$line of $file: $message";
+   }
+
+   /**
 * @param Exception|Throwable $e
 * @return string
 */
@@ -468,6 +486,7 @@
return [
'exception' => $e,
'exception_id' => WebRequest::getRequestId(),
+   'exception_url' => self::getURL() ?: '[no req]',
'caught_by' => $catcher
];
}
@@ -595,7 +614,7 @@
if ( !( $e instanceof MWException ) || $e->isLoggable() ) {
$logger = LoggerFactory::getInstance( 'exception' );
$logger->error(
-   self::getLogMessage( $e ),
+   self::getLogNormalMessage( $e ),
self::getLogContext( $e, $catcher )
);
 
@@ -629,7 +648,7 @@
$logger = LoggerFactory::getInstance( $channel );
$logger->log(
$level,
-   self::getLogMessage( $e ),
+   self::getLogNormalMessage( $e ),
self::getLogContext( $e, $catcher )
);
}

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Include the request URL in an HttpStatusException message

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

Change subject: Include the request URL in an HttpStatusException message
..


Include the request URL in an HttpStatusException message

A fair number of users are encountering 404s when attempting to save
pages, which shouldn't happen.  This adds the request URL to the
HttpStatusException message for remote logging in order to help surface
any hidden problems.

Change-Id: I8a64f6ace03e1cf5f1325abb5828ee8e40bbb908
---
M app/src/main/java/org/wikipedia/dataclient/okhttp/HttpStatusException.java
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/HttpStatusException.java 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/HttpStatusException.java
index 705eefe..fbc3672 100644
--- a/app/src/main/java/org/wikipedia/dataclient/okhttp/HttpStatusException.java
+++ b/app/src/main/java/org/wikipedia/dataclient/okhttp/HttpStatusException.java
@@ -8,9 +8,11 @@
 
 public class HttpStatusException extends IOException {
 private final int code;
+private final String url;
 
 public HttpStatusException(@NonNull Response rsp) {
 this.code = rsp.code();
+this.url = rsp.request().url().uri().toString();
 }
 
 public int code() {
@@ -19,6 +21,6 @@
 
 @Override
 public String getMessage() {
-return "Code: " + Integer.toString(code);
+return "Code: " + Integer.toString(code) + ", URL: " + url;
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a64f6ace03e1cf5f1325abb5828ee8e40bbb908
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Cooltey 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Sharvaniharan 
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]: replace.py: Temporary comment unessential wrong count output

2017-08-30 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374894 )

Change subject: replace.py: Temporary comment unessential wrong count output
..

replace.py: Temporary comment unessential wrong count output

Bug: T147178
Change-Id: Iacff6984093d8062cb9dc6ad8e6b72923107b216
---
M scripts/replace.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/94/374894/1

diff --git a/scripts/replace.py b/scripts/replace.py
index c1e7bcb..bb2cbbc 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -1177,7 +1177,9 @@
 # Explicitly call pywikibot.stopme(). It will make sure the callback is
 # triggered before replace.py is unloaded.
 pywikibot.stopme()
-pywikibot.output(u'\n%s pages changed.' % bot.changed_pages)
+
+# TODO: T147178: Fix the edit counter that gives wrong result
+# pywikibot.output(u'\n%s pages changed.' % bot.changed_pages)
 
 
 if __name__ == "__main__":

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix various PostgreSQL failures

2017-08-30 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374893 )

Change subject: Fix various PostgreSQL failures
..

Fix various PostgreSQL failures

* Fix schema for image_comment_temp.
* Provide values in CommentStoreTest::provideInsertRoundTrip() for
  columns where the PG schema doesn't have a default value but the MySQL
  schema does.
* Call nextSequenceValue() from CommentStoreTest::testInsertRoundTrip().
* Correctly handle $options being the string 'FOR UPDATE' in
  DatabasePostgres::selectSQLText()
* Correctly handle the initial table in DatabasePostgres::selectSQLText() FOR
  UPDATE mangling.
* Correctly handle aliases in DatabasePostgres::selectSQLText() FOR
  UPDATE mangling.

Tests in PG are still going to be broken thanks to the fact that
nextSequenceValue() and insertId() can't be separated by another
nextSequenceValue()/insertId() pair. That should be taken care of by
T164898/T164900.

Change-Id: Ia770a003ca9170ab8bcc1436d8afe30700e00ada
---
M includes/libs/rdbms/database/DatabasePostgres.php
M maintenance/postgres/archives/patch-comment-table.sql
M maintenance/postgres/tables.sql
M tests/phpunit/includes/CommentStoreTest.php
4 files changed, 33 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/93/374893/1

diff --git a/includes/libs/rdbms/database/DatabasePostgres.php 
b/includes/libs/rdbms/database/DatabasePostgres.php
index bdac06c..fcfd937 100644
--- a/includes/libs/rdbms/database/DatabasePostgres.php
+++ b/includes/libs/rdbms/database/DatabasePostgres.php
@@ -521,6 +521,10 @@
public function selectSQLText(
$table, $vars, $conds = '', $fname = __METHOD__, $options = [], 
$join_conds = []
) {
+   if ( is_string( $options ) ) {
+   $options = [ $options ];
+   }
+
// Change the FOR UPDATE option as necessary based on the join 
conditions. Then pass
// to the parent function to get the actual SQL text.
// In Postgres when using FOR UPDATE, only the main table and 
tables that are inner joined
@@ -532,12 +536,28 @@
$forUpdateKey = array_search( 'FOR UPDATE', $options, 
true );
if ( $forUpdateKey !== false && $join_conds ) {
unset( $options[$forUpdateKey] );
+   $options['FOR UPDATE'] = [];
+
+   // All tables not in $join_conds are good
+   foreach ( $table as $alias => $name ) {
+   if ( is_numeric( $alias ) ) {
+   $alias = $name;
+   }
+   if ( !isset( $join_conds[$alias] ) ) {
+   $options['FOR UPDATE'][] = 
$alias;
+   }
+   }
 
foreach ( $join_conds as $table_cond => 
$join_cond ) {
if ( 0 === preg_match( 
'/^(?:LEFT|RIGHT|FULL)(?: OUTER)? JOIN$/i', $join_cond[0] ) ) {
$options['FOR UPDATE'][] = 
$table_cond;
}
}
+
+   // Quote alias names so $this->tableName() 
won't mangle them
+   $options['FOR UPDATE'] = array_map( function ( 
$name ) use ( $table ) {
+   return isset( $table[$name] ) ? 
$this->addIdentifierQuotes( $name ) : $name;
+   }, $options['FOR UPDATE'] );
}
 
if ( isset( $options['ORDER BY'] ) && $options['ORDER 
BY'] == 'NULL' ) {
diff --git a/maintenance/postgres/archives/patch-comment-table.sql 
b/maintenance/postgres/archives/patch-comment-table.sql
index 8f2b3f3..243a3b3 100644
--- a/maintenance/postgres/archives/patch-comment-table.sql
+++ b/maintenance/postgres/archives/patch-comment-table.sql
@@ -21,7 +21,7 @@
 
 CREATE TABLE image_comment_temp (
imgcomment_name   TEXT NOT NULL,
-   imgcomment_comment_id INTEGER NOT NULL,
-   PRIMARY KEY (imgcomment_name, imgcomment_comment_id)
+   imgcomment_description_id INTEGER NOT NULL,
+   PRIMARY KEY (imgcomment_name, imgcomment_description_id)
 );
 CREATE UNIQUE INDEX imgcomment_name ON image_comment_temp (imgcomment_name);
diff --git a/maintenance/postgres/tables.sql b/maintenance/postgres/tables.sql
index c7ace89..eea9e68 100644
--- a/maintenance/postgres/tables.sql
+++ b/maintenance/postgres/tables.sql
@@ -358,8 +358,8 @@
 
 CREATE TABLE image_comment_temp (
imgcomment_name   TEXT NOT NULL,
-   imgcomment_comment_id INTEGER NOT NULL,
-   

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.30.0-wmf.16]: Revert "Revert "Avoids a stack overflow""

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

Change subject: Revert "Revert "Avoids a stack overflow""
..


Revert "Revert "Avoids a stack overflow""

This reverts commit 8cdfd60f92f657de88d59d4a0c82a6f27f2109bc.

Change-Id: I1cdf2f1ae958317c8039d07be1232a718e7cf0cd
---
M ProofreadPage.body.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..dbae3ab 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,6 +25,7 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
+use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -41,7 +42,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return Context::getDefaultContext()->getPageNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'page' );
}
 
/**
@@ -52,7 +53,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return Context::getDefaultContext()->getIndexNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'index' );
}
 
/**
@@ -89,6 +90,7 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
+   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1cdf2f1ae958317c8039d07be1232a718e7cf0cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove Q25267 (degree Celsius) from conversion config.

2017-08-30 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374892 )

Change subject: Remove Q25267 (degree Celsius) from conversion config.
..

Remove Q25267 (degree Celsius) from conversion config.

degC is not a SI unit, it is derived from actual system unit (kelvin).
However, we do not support non-multiplicative unit conversions for now,
so we can not normalize such values correctly. We should not pretend
normalizing degC values to themselves is a correct normalization.
Correct normalization would be to convert to kelvins.

Bug: T174353
Change-Id: If3c68317f649adcd62ad3deb7a51ef676ef4c4ec
---
M wmf-config/unitConversionConfig.json
1 file changed, 1 insertion(+), 7 deletions(-)


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

diff --git a/wmf-config/unitConversionConfig.json 
b/wmf-config/unitConversionConfig.json
index 6f3b21e..e6444ec 100644
--- a/wmf-config/unitConversionConfig.json
+++ b/wmf-config/unitConversionConfig.json
@@ -101,12 +101,6 @@
 "label": "volt",
 "siLabel": "volt"
 },
-"Q25267": {
-"factor": "1",
-"unit": "Q25267",
-"label": "degrees Celsius",
-"siLabel": "degrees Celsius"
-},
 "Q25269": {
 "factor": "1",
 "unit": "Q25269",
@@ -2645,4 +2639,4 @@
 "label": "radian per metre",
 "siLabel": "radian per metre"
 }
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3c68317f649adcd62ad3deb7a51ef676ef4c4ec
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Avoids a stack overflow

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

Change subject: Avoids a stack overflow
..


Avoids a stack overflow

The cause of this error is that CustomIndexFieldsParser
setup by the context relies on the ContentHandler system
and the ContentHandler default model hook relies on Context.

Bug: T173520
Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
---
M ProofreadPage.body.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..dbae3ab 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,6 +25,7 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
+use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -41,7 +42,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return Context::getDefaultContext()->getPageNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'page' );
}
 
/**
@@ -52,7 +53,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return Context::getDefaultContext()->getIndexNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'index' );
}
 
/**
@@ -89,6 +90,7 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
+   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thcipriani 
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...ProofreadPage[wmf/1.30.0-wmf.16]: Revert "Revert "Avoids a stack overflow""

2017-08-30 Thread Thcipriani (Code Review)
Hello jenkins-bot, Tpt,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Revert "Avoids a stack overflow""
..

Revert "Revert "Avoids a stack overflow""

This reverts commit 8cdfd60f92f657de88d59d4a0c82a6f27f2109bc.

Change-Id: I1cdf2f1ae958317c8039d07be1232a718e7cf0cd
---
M ProofreadPage.body.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/91/374891/1

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..dbae3ab 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,6 +25,7 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
+use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -41,7 +42,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return Context::getDefaultContext()->getPageNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'page' );
}
 
/**
@@ -52,7 +53,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return Context::getDefaultContext()->getIndexNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'index' );
}
 
/**
@@ -89,6 +90,7 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
+   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cdf2f1ae958317c8039d07be1232a718e7cf0cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Group1 to wmf.16"

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

Change subject: Revert "Group1 to wmf.16"
..


Revert "Group1 to wmf.16"

This reverts commit 38edfdf470f336c2ba99e40d746fba9a8fe2ba0a.

Change-Id: I51700bc1cfc0beecc61f8d5be1f4283332778f7d
---
M php
M wikiversions.json
2 files changed, 603 insertions(+), 603 deletions(-)

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



diff --git a/php b/php
index 633715f..5a64e5f 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.16
\ No newline at end of file
+php-1.30.0-wmf.15
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 8b6959d..370a2ce 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.15",
-"aawikibooks": "php-1.30.0-wmf.16",
-"aawiktionary": "php-1.30.0-wmf.16",
+"aawikibooks": "php-1.30.0-wmf.15",
+"aawiktionary": "php-1.30.0-wmf.15",
 "abwiki": "php-1.30.0-wmf.15",
-"abwiktionary": "php-1.30.0-wmf.16",
+"abwiktionary": "php-1.30.0-wmf.15",
 "acewiki": "php-1.30.0-wmf.15",
-"advisorywiki": "php-1.30.0-wmf.16",
+"advisorywiki": "php-1.30.0-wmf.15",
 "adywiki": "php-1.30.0-wmf.15",
 "afwiki": "php-1.30.0-wmf.15",
-"afwikibooks": "php-1.30.0-wmf.16",
-"afwikiquote": "php-1.30.0-wmf.16",
-"afwiktionary": "php-1.30.0-wmf.16",
+"afwikibooks": "php-1.30.0-wmf.15",
+"afwikiquote": "php-1.30.0-wmf.15",
+"afwiktionary": "php-1.30.0-wmf.15",
 "akwiki": "php-1.30.0-wmf.15",
-"akwikibooks": "php-1.30.0-wmf.16",
-"akwiktionary": "php-1.30.0-wmf.16",
+"akwikibooks": "php-1.30.0-wmf.15",
+"akwiktionary": "php-1.30.0-wmf.15",
 "alswiki": "php-1.30.0-wmf.15",
-"alswikibooks": "php-1.30.0-wmf.16",
-"alswikiquote": "php-1.30.0-wmf.16",
-"alswiktionary": "php-1.30.0-wmf.16",
+"alswikibooks": "php-1.30.0-wmf.15",
+"alswikiquote": "php-1.30.0-wmf.15",
+"alswiktionary": "php-1.30.0-wmf.15",
 "amwiki": "php-1.30.0-wmf.15",
-"amwikiquote": "php-1.30.0-wmf.16",
-"amwiktionary": "php-1.30.0-wmf.16",
+"amwikiquote": "php-1.30.0-wmf.15",
+"amwiktionary": "php-1.30.0-wmf.15",
 "angwiki": "php-1.30.0-wmf.15",
-"angwikibooks": "php-1.30.0-wmf.16",
-"angwikiquote": "php-1.30.0-wmf.16",
-"angwikisource": "php-1.30.0-wmf.16",
-"angwiktionary": "php-1.30.0-wmf.16",
+"angwikibooks": "php-1.30.0-wmf.15",
+"angwikiquote": "php-1.30.0-wmf.15",
+"angwikisource": "php-1.30.0-wmf.15",
+"angwiktionary": "php-1.30.0-wmf.15",
 "anwiki": "php-1.30.0-wmf.15",
-"anwiktionary": "php-1.30.0-wmf.16",
+"anwiktionary": "php-1.30.0-wmf.15",
 "arbcom_cswiki": "php-1.30.0-wmf.15",
 "arbcom_dewiki": "php-1.30.0-wmf.15",
 "arbcom_enwiki": "php-1.30.0-wmf.15",
@@ -35,880 +35,880 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.15",
 "arcwiki": "php-1.30.0-wmf.15",
 "arwiki": "php-1.30.0-wmf.15",
-"arwikibooks": "php-1.30.0-wmf.16",
-"arwikimedia": "php-1.30.0-wmf.16",
-"arwikinews": "php-1.30.0-wmf.16",
-"arwikiquote": "php-1.30.0-wmf.16",
-"arwikisource": "php-1.30.0-wmf.16",
-"arwikiversity": "php-1.30.0-wmf.16",
-"arwiktionary": "php-1.30.0-wmf.16",
+"arwikibooks": "php-1.30.0-wmf.15",
+"arwikimedia": "php-1.30.0-wmf.15",
+"arwikinews": "php-1.30.0-wmf.15",
+"arwikiquote": "php-1.30.0-wmf.15",
+"arwikisource": "php-1.30.0-wmf.15",
+"arwikiversity": "php-1.30.0-wmf.15",
+"arwiktionary": "php-1.30.0-wmf.15",
 "arzwiki": "php-1.30.0-wmf.15",
 "astwiki": "php-1.30.0-wmf.15",
-"astwikibooks": "php-1.30.0-wmf.16",
-"astwikiquote": "php-1.30.0-wmf.16",
-"astwiktionary": "php-1.30.0-wmf.16",
+"astwikibooks": "php-1.30.0-wmf.15",
+"astwikiquote": "php-1.30.0-wmf.15",
+"astwiktionary": "php-1.30.0-wmf.15",
 "aswiki": "php-1.30.0-wmf.15",
-"aswikibooks": "php-1.30.0-wmf.16",
-"aswikisource": "php-1.30.0-wmf.16",
-"aswiktionary": "php-1.30.0-wmf.16",
+"aswikibooks": "php-1.30.0-wmf.15",
+"aswikisource": "php-1.30.0-wmf.15",
+"aswiktionary": "php-1.30.0-wmf.15",
 "atjwiki": "php-1.30.0-wmf.15",
-"auditcomwiki": "php-1.30.0-wmf.16",
+"auditcomwiki": "php-1.30.0-wmf.15",
 "avwiki": "php-1.30.0-wmf.15",
-"avwiktionary": "php-1.30.0-wmf.16",
+"avwiktionary": "php-1.30.0-wmf.15",
 "aywiki": "php-1.30.0-wmf.15",
-"aywikibooks": "php-1.30.0-wmf.16",
-"aywiktionary": "php-1.30.0-wmf.16",
+"aywikibooks": "php-1.30.0-wmf.15",
+"aywiktionary": "php-1.30.0-wmf.15",
 "azbwiki": "php-1.30.0-wmf.15",
 "azwiki": "php-1.30.0-wmf.15",
-"azwikibooks": "php-1.30.0-wmf.16",
-"azwikiquote": "php-1.30.0-wmf.16",
-"azwikisource": "php-1.30.0-wmf.16",
-"azwiktionary": "php-1.30.0-wmf.16",
+"azwikibooks": "php-1.30.0-wmf.15",
+

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Revert "Group1 to wmf.16"

2017-08-30 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374890 )

Change subject: Revert "Group1 to wmf.16"
..

Revert "Group1 to wmf.16"

This reverts commit 38edfdf470f336c2ba99e40d746fba9a8fe2ba0a.

Change-Id: I51700bc1cfc0beecc61f8d5be1f4283332778f7d
---
M php
M wikiversions.json
2 files changed, 603 insertions(+), 603 deletions(-)


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

diff --git a/php b/php
index 633715f..5a64e5f 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.16
\ No newline at end of file
+php-1.30.0-wmf.15
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 8b6959d..370a2ce 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.15",
-"aawikibooks": "php-1.30.0-wmf.16",
-"aawiktionary": "php-1.30.0-wmf.16",
+"aawikibooks": "php-1.30.0-wmf.15",
+"aawiktionary": "php-1.30.0-wmf.15",
 "abwiki": "php-1.30.0-wmf.15",
-"abwiktionary": "php-1.30.0-wmf.16",
+"abwiktionary": "php-1.30.0-wmf.15",
 "acewiki": "php-1.30.0-wmf.15",
-"advisorywiki": "php-1.30.0-wmf.16",
+"advisorywiki": "php-1.30.0-wmf.15",
 "adywiki": "php-1.30.0-wmf.15",
 "afwiki": "php-1.30.0-wmf.15",
-"afwikibooks": "php-1.30.0-wmf.16",
-"afwikiquote": "php-1.30.0-wmf.16",
-"afwiktionary": "php-1.30.0-wmf.16",
+"afwikibooks": "php-1.30.0-wmf.15",
+"afwikiquote": "php-1.30.0-wmf.15",
+"afwiktionary": "php-1.30.0-wmf.15",
 "akwiki": "php-1.30.0-wmf.15",
-"akwikibooks": "php-1.30.0-wmf.16",
-"akwiktionary": "php-1.30.0-wmf.16",
+"akwikibooks": "php-1.30.0-wmf.15",
+"akwiktionary": "php-1.30.0-wmf.15",
 "alswiki": "php-1.30.0-wmf.15",
-"alswikibooks": "php-1.30.0-wmf.16",
-"alswikiquote": "php-1.30.0-wmf.16",
-"alswiktionary": "php-1.30.0-wmf.16",
+"alswikibooks": "php-1.30.0-wmf.15",
+"alswikiquote": "php-1.30.0-wmf.15",
+"alswiktionary": "php-1.30.0-wmf.15",
 "amwiki": "php-1.30.0-wmf.15",
-"amwikiquote": "php-1.30.0-wmf.16",
-"amwiktionary": "php-1.30.0-wmf.16",
+"amwikiquote": "php-1.30.0-wmf.15",
+"amwiktionary": "php-1.30.0-wmf.15",
 "angwiki": "php-1.30.0-wmf.15",
-"angwikibooks": "php-1.30.0-wmf.16",
-"angwikiquote": "php-1.30.0-wmf.16",
-"angwikisource": "php-1.30.0-wmf.16",
-"angwiktionary": "php-1.30.0-wmf.16",
+"angwikibooks": "php-1.30.0-wmf.15",
+"angwikiquote": "php-1.30.0-wmf.15",
+"angwikisource": "php-1.30.0-wmf.15",
+"angwiktionary": "php-1.30.0-wmf.15",
 "anwiki": "php-1.30.0-wmf.15",
-"anwiktionary": "php-1.30.0-wmf.16",
+"anwiktionary": "php-1.30.0-wmf.15",
 "arbcom_cswiki": "php-1.30.0-wmf.15",
 "arbcom_dewiki": "php-1.30.0-wmf.15",
 "arbcom_enwiki": "php-1.30.0-wmf.15",
@@ -35,880 +35,880 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.15",
 "arcwiki": "php-1.30.0-wmf.15",
 "arwiki": "php-1.30.0-wmf.15",
-"arwikibooks": "php-1.30.0-wmf.16",
-"arwikimedia": "php-1.30.0-wmf.16",
-"arwikinews": "php-1.30.0-wmf.16",
-"arwikiquote": "php-1.30.0-wmf.16",
-"arwikisource": "php-1.30.0-wmf.16",
-"arwikiversity": "php-1.30.0-wmf.16",
-"arwiktionary": "php-1.30.0-wmf.16",
+"arwikibooks": "php-1.30.0-wmf.15",
+"arwikimedia": "php-1.30.0-wmf.15",
+"arwikinews": "php-1.30.0-wmf.15",
+"arwikiquote": "php-1.30.0-wmf.15",
+"arwikisource": "php-1.30.0-wmf.15",
+"arwikiversity": "php-1.30.0-wmf.15",
+"arwiktionary": "php-1.30.0-wmf.15",
 "arzwiki": "php-1.30.0-wmf.15",
 "astwiki": "php-1.30.0-wmf.15",
-"astwikibooks": "php-1.30.0-wmf.16",
-"astwikiquote": "php-1.30.0-wmf.16",
-"astwiktionary": "php-1.30.0-wmf.16",
+"astwikibooks": "php-1.30.0-wmf.15",
+"astwikiquote": "php-1.30.0-wmf.15",
+"astwiktionary": "php-1.30.0-wmf.15",
 "aswiki": "php-1.30.0-wmf.15",
-"aswikibooks": "php-1.30.0-wmf.16",
-"aswikisource": "php-1.30.0-wmf.16",
-"aswiktionary": "php-1.30.0-wmf.16",
+"aswikibooks": "php-1.30.0-wmf.15",
+"aswikisource": "php-1.30.0-wmf.15",
+"aswiktionary": "php-1.30.0-wmf.15",
 "atjwiki": "php-1.30.0-wmf.15",
-"auditcomwiki": "php-1.30.0-wmf.16",
+"auditcomwiki": "php-1.30.0-wmf.15",
 "avwiki": "php-1.30.0-wmf.15",
-"avwiktionary": "php-1.30.0-wmf.16",
+"avwiktionary": "php-1.30.0-wmf.15",
 "aywiki": "php-1.30.0-wmf.15",
-"aywikibooks": "php-1.30.0-wmf.16",
-"aywiktionary": "php-1.30.0-wmf.16",
+"aywikibooks": "php-1.30.0-wmf.15",
+"aywiktionary": "php-1.30.0-wmf.15",
 "azbwiki": "php-1.30.0-wmf.15",
 "azwiki": "php-1.30.0-wmf.15",
-"azwikibooks": "php-1.30.0-wmf.16",
-"azwikiquote": "php-1.30.0-wmf.16",
-"azwikisource": "php-1.30.0-wmf.16",
-"azwiktionary": "php-1.30.0-wmf.16",
+"azwikibooks": 

[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.30.0-wmf.16]: Revert "Avoids a stack overflow"

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

Change subject: Revert "Avoids a stack overflow"
..


Revert "Avoids a stack overflow"

This reverts commit 6298f6598fe0680ad062c31be892db273d484526.

Change-Id: I0fc725f7710e2d806ecbdd4bcd07ec960f504395
---
M ProofreadPage.body.php
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index dbae3ab..56b01ed 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,7 +25,6 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
-use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -42,7 +41,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return ProofreadPageInit::getNamespaceId( 'page' );
+   return Context::getDefaultContext()->getPageNamespaceId();
}
 
/**
@@ -53,7 +52,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return ProofreadPageInit::getNamespaceId( 'index' );
+   return Context::getDefaultContext()->getIndexNamespaceId();
}
 
/**
@@ -90,7 +89,6 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
-   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fc725f7710e2d806ecbdd4bcd07ec960f504395
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Tpt 
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...ProofreadPage[wmf/1.30.0-wmf.16]: Revert "Avoids a stack overflow"

2017-08-30 Thread Thcipriani (Code Review)
Hello jenkins-bot, Tpt,

I'd like you to do a code review.  Please visit

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

to review the following change.


Change subject: Revert "Avoids a stack overflow"
..

Revert "Avoids a stack overflow"

This reverts commit 6298f6598fe0680ad062c31be892db273d484526.

Change-Id: I0fc725f7710e2d806ecbdd4bcd07ec960f504395
---
M ProofreadPage.body.php
1 file changed, 2 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/89/374889/1

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index dbae3ab..56b01ed 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,7 +25,6 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
-use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -42,7 +41,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return ProofreadPageInit::getNamespaceId( 'page' );
+   return Context::getDefaultContext()->getPageNamespaceId();
}
 
/**
@@ -53,7 +52,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return ProofreadPageInit::getNamespaceId( 'index' );
+   return Context::getDefaultContext()->getIndexNamespaceId();
}
 
/**
@@ -90,7 +89,6 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
-   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0fc725f7710e2d806ecbdd4bcd07ec960f504395
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Tpt 
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...Newsletter[master]: Typo in calling $this->newsletter->getSubscribersCount()

2017-08-30 Thread 01tonythomas (Code Review)
01tonythomas has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374888 )

Change subject: Typo in calling $this->newsletter->getSubscribersCount()
..

Typo in calling $this->newsletter->getSubscribersCount()

Bug: T174605
Bug: T174604
Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
---
M includes/specials/SpecialNewsletter.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Newsletter 
refs/changes/88/374888/1

diff --git a/includes/specials/SpecialNewsletter.php 
b/includes/specials/SpecialNewsletter.php
index 2b77eea..9442fb6 100644
--- a/includes/specials/SpecialNewsletter.php
+++ b/includes/specials/SpecialNewsletter.php
@@ -328,7 +328,7 @@
$out->addHTML(
$this->msg( 'newsletter-announce-success' )
->rawParams( $this->getEscapedName() )
-   ->numParams( 
$this->newsletter->getSubscriberCount() )
+   ->numParams( 
$this->newsletter->getSubscribersCount() )
->parseAsBlock()
);
$out->addReturnTo( Title::makeTitleSafe( NS_NEWSLETTER, 
$this->newsletter->getName() ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9d5915f9afc00d8efb331c132b59de790b020e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: 01tonythomas <01tonytho...@gmail.com>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WLFilters: describe how unseen changes should look

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

Change subject: WLFilters: describe how unseen changes should look
..


WLFilters: describe how unseen changes should look

Makes the unseen changes description customizable
based on whether or not the beta feature is enabled.

Bug: T172030
Change-Id: I0cef7e5fb261e12f3ca069e7409f3aea3fc874cf
---
M includes/specials/SpecialWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index dcd2ffa..d0d1b61 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -830,7 +830,11 @@
$watchlistHeader .= $this->msg( 
'wlheader-enotif' )->parse() . "\n";
}
if ( $showUpdatedMarker ) {
-   $watchlistHeader .= $this->msg( 
'wlheader-showupdated' )->parse() . "\n";
+   $watchlistHeader .= $this->msg(
+   $this->isStructuredFilterUiEnabled() ?
+   
'rcfilters-watchlist-showupdated' :
+   'wlheader-showupdated'
+   )->parse() . "\n";
}
}
$form .= Html::rawElement(
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 816c9be..b280488 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1470,6 +1470,7 @@
"rcfilters-liveupdates-button-title-off": "Display new changes as they 
happen",
"rcfilters-watchlist-markSeen-button": "Mark all changes as seen",
"rcfilters-watchlist-editWatchlist-button": "Edit your list of watched 
pages",
+   "rcfilters-watchlist-showupdated": "Changes to pages you haven't 
visited since the changes occurred are in bold, with solid 
markers.",
"rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since 
$3, $4 (up to $1 shown).",
"rclistfromreset": "Reset date selection",
"rclistfrom": "Show new changes starting from $2, $3",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index dfe69a9..1105d15 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1660,6 +1660,7 @@
"rcfilters-liveupdates-button-title-off": "Title for the button to 
enable or disable live updates on [[Special:RecentChanges]] when the feature is 
OFF.",
"rcfilters-watchlist-markSeen-button": "Label for the button to mark 
all changes as seen on [[Special:Watchlist]] when using the structured filters 
interface.",
"rcfilters-watchlist-editWatchlist-button": "Label for the button to 
edit the watched pages on [[Special:Watchlist]] when using the structured 
filters interface.",
+   "rcfilters-watchlist-showupdated": "Message at the top of 
[[Special:Watchlist]] when the Structured filters are enabled that describes 
what unseen changes look like.",
"rcnotefrom": "This message is displayed at [[Special:RecentChanges]] 
when viewing recentchanges from some specific time.\n\nThe corresponding 
message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of 
changes that are displayed\n* $2 - (Optional) a date and time\n* $3 - a date\n* 
$4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
"rclistfromreset": "Used on [[Special:RecentChanges]] to reset a 
selection of a certain date range.",
"rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - 
(Currently not use) date and time. The date and the time adds to the rclistfrom 
description.\n* $2 - time. The time adds to the rclistfrom link description 
(with split of date and time).\n* $3 - date. The date adds to the rclistfrom 
link description (with split of date and time).\n\nThe corresponding message is 
{{msg-mw|Rcnotefrom}}.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cef7e5fb261e12f3ca069e7409f3aea3fc874cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics/reportupdater-queries[master]: Add page creation configuration and queries

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

Change subject: Add page creation configuration and queries
..


Add page creation configuration and queries

Initial ReportUpdater setup for capturing page creation measurements in
accordance with T170850. Individual files for each SQL query, a file
listing all wikis, and the corresponding configuration file.

Change-Id: I9530076a6449a2f3658435748691d351e7576e85
---
A page-creation/all_dbs.txt
A page-creation/config.yaml
A page-creation/pagecreations.sql
A page-creation/pagecreations_main.sql
A page-creation/pagecreations_main_autoconfirmed.sql
A page-creation/pagecreations_main_autopatrolled.sql
A page-creation/pagecreations_main_bots.sql
A page-creation/pagecreations_main_non-autoconfirmed.sql
A page-creation/pagecreations_main_noredirects.sql
9 files changed, 1,035 insertions(+), 0 deletions(-)

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



diff --git a/page-creation/all_dbs.txt b/page-creation/all_dbs.txt
new file mode 100644
index 000..1786cf9
--- /dev/null
+++ b/page-creation/all_dbs.txt
@@ -0,0 +1,912 @@
+aawiki
+aawikibooks
+aawiktionary
+abwiki
+abwiktionary
+acewiki
+advisorywiki
+adywiki
+afwiki
+afwikibooks
+afwikiquote
+afwiktionary
+akwiki
+akwikibooks
+akwiktionary
+alswiki
+alswikibooks
+alswikiquote
+alswiktionary
+amwiki
+amwikiquote
+amwiktionary
+angwiki
+angwikibooks
+angwikiquote
+angwikisource
+angwiktionary
+anwiki
+anwiktionary
+arbcom_cswiki
+arbcom_dewiki
+arbcom_enwiki
+arbcom_fiwiki
+arbcom_nlwiki
+arcwiki
+arwiki
+arwikibooks
+arwikimedia
+arwikinews
+arwikiquote
+arwikisource
+arwikiversity
+arwiktionary
+arzwiki
+astwiki
+astwikibooks
+astwikiquote
+astwiktionary
+aswiki
+aswikibooks
+aswikisource
+aswiktionary
+atjwiki
+auditcomwiki
+avwiki
+avwiktionary
+aywiki
+aywikibooks
+aywiktionary
+azwiki
+azwikibooks
+azwikiquote
+azwikisource
+azwiktionary
+azbwiki
+barwiki
+bat_smgwiki
+bawiki
+bawikibooks
+bclwiki
+bdwikimedia
+be_x_oldwiki
+betawikiversity
+bewiki
+bewikibooks
+bewikimedia
+bewikiquote
+bewikisource
+bewiktionary
+bgwiki
+bgwikibooks
+bgwikinews
+bgwikiquote
+bgwikisource
+bgwiktionary
+bhwiki
+bhwiktionary
+biwiki
+biwikibooks
+biwiktionary
+bjnwiki
+bmwiki
+bmwikibooks
+bmwikiquote
+bmwiktionary
+bnwiki
+bnwikibooks
+bnwikisource
+bnwiktionary
+boardgovcomwiki
+boardwiki
+bowiki
+bowikibooks
+bowiktionary
+bpywiki
+brwiki
+brwikimedia
+brwikiquote
+brwikisource
+brwiktionary
+bswiki
+bswikibooks
+bswikinews
+bswikiquote
+bswikisource
+bswiktionary
+bugwiki
+bxrwiki
+cawiki
+cawikibooks
+cawikimedia
+cawikinews
+cawikiquote
+cawikisource
+cawiktionary
+cbk_zamwiki
+cdowiki
+cebwiki
+cewiki
+chairwiki
+chapcomwiki
+checkuserwiki
+chowiki
+chrwiki
+chrwiktionary
+chwiki
+chwikibooks
+chwiktionary
+chywiki
+ckbwiki
+cnwikimedia
+collabwiki
+commonswiki
+cowiki
+cowikibooks
+cowikimedia
+cowikiquote
+cowiktionary
+crhwiki
+crwiki
+crwikiquote
+crwiktionary
+csbwiki
+csbwiktionary
+cswiki
+cswikibooks
+cswikinews
+cswikiquote
+cswikisource
+cswikiversity
+cswiktionary
+cuwiki
+cvwiki
+cvwikibooks
+cywiki
+cywikibooks
+cywikiquote
+cywikisource
+cywiktionary
+dawiki
+dawikibooks
+dawikiquote
+dawikisource
+dawiktionary
+dewiki
+dewikibooks
+dewikinews
+dewikiquote
+dewikisource
+dewikiversity
+dewikivoyage
+dewiktionary
+dinwiki
+diqwiki
+dkwikimedia
+donatewiki
+dsbwiki
+dtywiki
+dvwiki
+dvwiktionary
+dzwiki
+dzwiktionary
+ecwikimedia
+eewiki
+elwiki
+elwikibooks
+elwikinews
+elwikiquote
+elwikisource
+elwikiversity
+elwikivoyage
+elwiktionary
+emlwiki
+enwiki
+enwikibooks
+enwikinews
+enwikiquote
+enwikisource
+enwikiversity
+enwikivoyage
+enwiktionary
+eowiki
+eowikibooks
+eowikinews
+eowikiquote
+eowikisource
+eowiktionary
+eswiki
+eswikibooks
+eswikinews
+eswikiquote
+eswikisource
+eswikiversity
+eswikivoyage
+eswiktionary
+etwiki
+etwikibooks
+etwikimedia
+etwikiquote
+etwikisource
+etwiktionary
+euwiki
+euwikibooks
+euwikiquote
+euwiktionary
+execwiki
+extwiki
+fawiki
+fawikibooks
+fawikinews
+fawikiquote
+fawikisource
+fawikivoyage
+fawiktionary
+fdcwiki
+ffwiki
+fiu_vrowiki
+fiwiki
+fiwikibooks
+fiwikimedia
+fiwikinews
+fiwikiquote
+fiwikisource
+fiwikiversity
+fiwikivoyage
+fiwiktionary
+fjwiki
+fjwiktionary
+foundationwiki
+fowiki
+fowikisource
+fowiktionary
+frpwiki
+frrwiki
+frwiki
+frwikibooks
+frwikinews
+frwikiquote
+frwikisource
+frwikiversity
+frwikivoyage
+frwiktionary
+furwiki
+fywiki
+fywikibooks
+fywiktionary
+gagwiki
+ganwiki
+gawiki
+gawikibooks
+gawikiquote
+gawiktionary
+gdwiki
+gdwiktionary
+glkwiki
+glwiki
+glwikibooks
+glwikiquote
+glwikisource
+glwiktionary
+gnwiki
+gnwikibooks
+gnwiktionary
+gomwiki
+gotwiki
+gotwikibooks
+grantswiki
+guwiki
+guwikibooks
+guwikiquote
+guwikisource
+guwiktionary
+gvwiki
+gvwiktionary
+hakwiki
+hawiki
+hawiktionary
+hawwiki
+hewiki
+hewikibooks
+hewikinews
+hewikiquote
+hewikisource
+hewikivoyage
+hewiktionary
+hifwiki

[MediaWiki-commits] [Gerrit] mediawiki...UIFeedback[master]: Remove same named entry point

2017-08-30 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374887 )

Change subject: Remove same named entry point
..

Remove same named entry point

Having two files with different case is not a good idea on a windows machine.

Change-Id: I456130fb0dbcd7acf01b031ff304ca6afeaf59f1
---
D UiFeedback.php
1 file changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UIFeedback 
refs/changes/87/374887/2

diff --git a/UiFeedback.php b/UiFeedback.php
deleted file mode 100644
index b5f58d2..000
--- a/UiFeedback.php
+++ /dev/null
@@ -1,5 +0,0 @@
-https://gerrit.wikimedia.org/r/374887
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I456130fb0dbcd7acf01b031ff304ca6afeaf59f1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UIFeedback
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...ProofreadPage[wmf/1.30.0-wmf.16]: Avoids a stack overflow

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

Change subject: Avoids a stack overflow
..


Avoids a stack overflow

The cause of this error is that CustomIndexFieldsParser
setup by the context relies on the ContentHandler system
and the ContentHandler default model hook relies on Context.

Bug: T173520
Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
---
M ProofreadPage.body.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..dbae3ab 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,6 +25,7 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
+use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -41,7 +42,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return Context::getDefaultContext()->getPageNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'page' );
}
 
/**
@@ -52,7 +53,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return Context::getDefaultContext()->getIndexNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'index' );
}
 
/**
@@ -89,6 +90,7 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
+   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Make distance between very close points equal to 0

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

Change subject: Make distance between very close points equal to 0
..


Make distance between very close points equal to 0

Current formula in CoordinateDD.distance is bad for small distances
and produces NaNs, so add a check that small distance will evaluate to 0.
This is not a big change since sligtly larger distances already evaluate to
0 - e.g. between Point(-96.0775581 46.2830151) and Point(-96.077558 46.283015).

Bug: T174414
Change-Id: Icce81c251f02913496c7f200b5d2fbb2e8138755
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDistanceBOp.java
M 
tools/src/test/java/org/wikidata/query/rdf/tool/WikibaseGeoExtensionIntegrationTest.java
2 files changed, 44 insertions(+), 2 deletions(-)

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



diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDistanceBOp.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDistanceBOp.java
index a42b6f3..47ceca5 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDistanceBOp.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/constraints/WikibaseDistanceBOp.java
@@ -62,14 +62,43 @@
 final CoordinateDD leftPoint = getCoordinateFromIV(left);
 final CoordinateDD rightPoint = getCoordinateFromIV(right);
 // TODO: allow to supply Units
-final double distance = leftPoint.equals(rightPoint) ? 0 :
-leftPoint.distance(rightPoint, UNITS.Kilometers);
+final double distance;
+if (leftPoint.equals(rightPoint) || veryClose(leftPoint, rightPoint)) {
+distance = 0;
+} else {
+distance = leftPoint.distance(rightPoint, UNITS.Kilometers);
+}
 
 final BigdataLiteral dist = getValueFactory().createLiteral(distance);
 return super.asIV(dist, bindingSet);
 }
 
 /**
+ * Distance where the points are considered to be the same.
+ * Distance equivalent of degrees (on equator):
+ * 0.001   is about 110 m
+ * 0.0001  is about 11 m
+ * 0.1 is about 1 m
+ * See: https://en.wikipedia.org/wiki/WP:OPCOORD
+ */
+public static final double SMALL_DISTANCE = 0.1;
+
+/**
+ * Check whether two points are very close to each other, so distance 
between them
+ * can be considered zero.
+ * Current CoordinateDD.distance does not work well with small distances,
+ * so we take a shortcut here in order not to get the NaN.
+ * @param p1
+ * @param p2
+ * @return Whether the points are very close.
+ */
+protected boolean veryClose(CoordinateDD p1, CoordinateDD p2) {
+double dLon = p1.eastWest - p2.eastWest;
+double dLat = p1.northSouth - p2.northSouth;
+return Math.abs(dLon) < SMALL_DISTANCE && Math.abs(dLat) < 
SMALL_DISTANCE;
+}
+
+/**
  * Get coordinate from IV value.
  * @param iv
  * @return Coordinate
diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/WikibaseGeoExtensionIntegrationTest.java
 
b/tools/src/test/java/org/wikidata/query/rdf/tool/WikibaseGeoExtensionIntegrationTest.java
index 2613d86..3a01e61 100644
--- 
a/tools/src/test/java/org/wikidata/query/rdf/tool/WikibaseGeoExtensionIntegrationTest.java
+++ 
b/tools/src/test/java/org/wikidata/query/rdf/tool/WikibaseGeoExtensionIntegrationTest.java
@@ -233,4 +233,17 @@
 new LiteralImpl("17.42", XMLSchema.DOUBLE)));
 assertThat(result, binds("globe", new URIImpl(moonURI)));
 }
+
+// Check distance between close points
+@Test
+public void distanceClosePoints() throws QueryEvaluationException {
+TupleQueryResult results = rdfRepository().query("SELECT * WHERE {"
++ "BIND(\"Point(-96.0775581 46.2830152)\"^^geo:wktLiteral as 
?b1)\n"
++ "BIND(\"Point(-96.077558 46.283015)\"^^geo:wktLiteral as 
?b2)\n"
++ "BIND(geof:distance(?b1, ?b2) as ?distance)\n"
++ "}");
+BindingSet result = results.next();
+assertThat(result, binds("distance",
+new LiteralImpl("0.0", XMLSchema.DOUBLE)));
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icce81c251f02913496c7f200b5d2fbb2e8138755
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Yurik 
Gerrit-Reviewer: jenkins-bot <>

___

[MediaWiki-commits] [Gerrit] mediawiki...Link_Attributes[master]: Add extension entry point for testing

2017-08-30 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374886 )

Change subject: Add extension entry point for testing
..

Add extension entry point for testing

The jenkins unit test job needs a entry point
which is same named as the git repository

Change-Id: Iad0e6942d167ddf53d3d7df0133d96cfe114967b
---
A Link_Attributes.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Link_Attributes 
refs/changes/86/374886/1

diff --git a/Link_Attributes.php b/Link_Attributes.php
new file mode 100644
index 000..f2583c3
--- /dev/null
+++ b/Link_Attributes.php
@@ -0,0 +1,5 @@
+https://gerrit.wikimedia.org/r/374886
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad0e6942d167ddf53d3d7df0133d96cfe114967b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Link_Attributes
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...SSLClientAuthentication[master]: Add extension entry point for testing

2017-08-30 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374885 )

Change subject: Add extension entry point for testing
..

Add extension entry point for testing

The jenkins unit test job needs a entry point
which is same named as the git repository

Change-Id: I72696529ac9ed8e12b4169962f3c2317d4b4bda7
---
A SSLClientAuthentication.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/SSLClientAuthentication.php b/SSLClientAuthentication.php
new file mode 100644
index 000..a5d97ee
--- /dev/null
+++ b/SSLClientAuthentication.php
@@ -0,0 +1,5 @@
+https://gerrit.wikimedia.org/r/374885
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72696529ac9ed8e12b4169962f3c2317d4b4bda7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SSLClientAuthentication
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...deploy[master]: [Config] Add a 1% sampleing for dedupe logs

2017-08-30 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374874 )

Change subject: [Config] Add a 1% sampleing for dedupe logs
..


[Config] Add a 1% sampleing for dedupe logs

Change-Id: Ibd9d3368952927b49904522469ea815e4220be51
---
M scap/templates/config.yaml.j2
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 4acb2cc..3a54adb 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -753,6 +753,8 @@
 - level: info
   path: <%= log_file %>
   type: file
+  sampled_levels:
+trace/dedupe: 0.01
 
 # Statsd metrics reporter
 metrics:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd9d3368952927b49904522469ea815e4220be51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 7b42eb2

2017-08-30 Thread Ppchelko (Code Review)
Ppchelko has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374884 )

Change subject: Update change-propagation to 7b42eb2
..


Update change-propagation to 7b42eb2

List of changes:
3c94e81 Actually drop duplicated messages
a536af4 Increment a metrics when deduplication happens
366a583 Add more info to the dedupe logging and rely on sampled logging for it
xxx Update node module dependencies

Change-Id: Ia29c6bcaa5fc7f6fa6915d882d3c41565ee6aef6
---
M node_modules/kad/package.json
M node_modules/swagger-ui/package.json
M src
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 9e21cef..ed6e63a 100644
--- a/node_modules/kad/package.json
+++ b/node_modules/kad/package.json
@@ -49,7 +49,7 @@
 "/limitation"
   ],
   "_resolved": 
"git+https://github.com/gwicke/kad.git#936c91652d757ea6f9dd30e44698afb0daaa1d17;,
-  "_shasum": "4d23194f1fcc9806e1723d335504c54646ecea86",
+  "_shasum": "466f8831254d056242158f614ac12dfa295503c3",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/node_modules/swagger-ui/package.json 
b/node_modules/swagger-ui/package.json
index 67f2878..463b0f9 100644
--- a/node_modules/swagger-ui/package.json
+++ b/node_modules/swagger-ui/package.json
@@ -49,7 +49,7 @@
 "/hyperswitch"
   ],
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;,
-  "_shasum": "ee262d00a0f7cdb7727d9a27efb9efdfa37c38bd",
+  "_shasum": "230abebb7dd83d8703d736f5e1d63c922eafaa7b",
   "_shrinkwrap": null,
   "_spec": "swagger-ui@git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_where": "/opt/service/node_modules/hyperswitch",
diff --git a/src b/src
index 26c2562..7b42eb2 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 26c25624fe324f924a68d608fb8238fd7f6f7a5f
+Subproject commit 7b42eb21c752809adc8a492d7d697a1615c1e781

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia29c6bcaa5fc7f6fa6915d882d3c41565ee6aef6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update change-propagation to 7b42eb2

2017-08-30 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374884 )

Change subject: Update change-propagation to 7b42eb2
..

Update change-propagation to 7b42eb2

List of changes:
3c94e81 Actually drop duplicated messages
a536af4 Increment a metrics when deduplication happens
366a583 Add more info to the dedupe logging and rely on sampled logging for it
xxx Update node module dependencies

Change-Id: Ia29c6bcaa5fc7f6fa6915d882d3c41565ee6aef6
---
M node_modules/kad/package.json
M node_modules/swagger-ui/package.json
M src
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/84/374884/1

diff --git a/node_modules/kad/package.json b/node_modules/kad/package.json
index 9e21cef..ed6e63a 100644
--- a/node_modules/kad/package.json
+++ b/node_modules/kad/package.json
@@ -49,7 +49,7 @@
 "/limitation"
   ],
   "_resolved": 
"git+https://github.com/gwicke/kad.git#936c91652d757ea6f9dd30e44698afb0daaa1d17;,
-  "_shasum": "4d23194f1fcc9806e1723d335504c54646ecea86",
+  "_shasum": "466f8831254d056242158f614ac12dfa295503c3",
   "_shrinkwrap": null,
   "_spec": "kad@git+https://github.com/gwicke/kad.git#master;,
   "_where": "/opt/service/node_modules/limitation",
diff --git a/node_modules/swagger-ui/package.json 
b/node_modules/swagger-ui/package.json
index 67f2878..463b0f9 100644
--- a/node_modules/swagger-ui/package.json
+++ b/node_modules/swagger-ui/package.json
@@ -49,7 +49,7 @@
 "/hyperswitch"
   ],
   "_resolved": 
"git+https://github.com/wikimedia/swagger-ui.git#b9b40dc8e00caeb24c19fe636b93250a7e335541;,
-  "_shasum": "ee262d00a0f7cdb7727d9a27efb9efdfa37c38bd",
+  "_shasum": "230abebb7dd83d8703d736f5e1d63c922eafaa7b",
   "_shrinkwrap": null,
   "_spec": "swagger-ui@git+https://github.com/wikimedia/swagger-ui.git#master;,
   "_where": "/opt/service/node_modules/hyperswitch",
diff --git a/src b/src
index 26c2562..7b42eb2 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 26c25624fe324f924a68d608fb8238fd7f6f7a5f
+Subproject commit 7b42eb21c752809adc8a492d7d697a1615c1e781

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia29c6bcaa5fc7f6fa6915d882d3c41565ee6aef6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki...Sarcasm[master]: Rename entry point to match extension name

2017-08-30 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374883 )

Change subject: Rename entry point to match extension name
..

Rename entry point to match extension name

The jenkins unit test job needs a entry point
which is same named as the git repository

Change-Id: Ia9622af63602d2e011e6facde12771a35f33995d
---
R Sarcasm.php
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Sarcasm 
refs/changes/83/374883/2

diff --git a/sarcasm.php b/Sarcasm.php
similarity index 100%
rename from sarcasm.php
rename to Sarcasm.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9622af63602d2e011e6facde12771a35f33995d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Sarcasm
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[wmf/1.30.0-wmf.16]: Avoids a stack overflow

2017-08-30 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374882 )

Change subject: Avoids a stack overflow
..

Avoids a stack overflow

The cause of this error is that CustomIndexFieldsParser
setup by the context relies on the ContentHandler system
and the ContentHandler default model hook relies on Context.

Bug: T173520
Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
---
M ProofreadPage.body.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ProofreadPage 
refs/changes/82/374882/1

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..dbae3ab 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -25,6 +25,7 @@
 use ProofreadPage\Page\PageContent;
 use ProofreadPage\Page\PageContentBuilder;
 use ProofreadPage\Pagination\PageNotInPaginationException;
+use ProofreadPage\ProofreadPageInit;
 
 /*
  @todo :
@@ -41,7 +42,7 @@
 * @return int
 */
public static function getPageNamespaceId() {
-   return Context::getDefaultContext()->getPageNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'page' );
}
 
/**
@@ -52,7 +53,7 @@
 * @return int
 */
public static function getIndexNamespaceId() {
-   return Context::getDefaultContext()->getIndexNamespaceId();
+   return ProofreadPageInit::getNamespaceId( 'index' );
}
 
/**
@@ -89,6 +90,7 @@
 * @return bool if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
+   // Warning: do not use Context here because it assumes 
ContentHandler is already initialized
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
$model = CONTENT_MODEL_PROOFREAD_PAGE;
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe065a8df9e7fa49b85a789b59f3d3569a87eb8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Thcipriani 
Gerrit-Reviewer: Tpt 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: Add extension entry point for testing

2017-08-30 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374881 )

Change subject: Add extension entry point for testing
..

Add extension entry point for testing

The jenkins unit test job needs a entry point
which is same named as the git repository

Change-Id: I377eadcec0a95d2005275deb46f8a0c55413
---
A WikiLexicalData.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/WikiLexicalData.php b/WikiLexicalData.php
new file mode 100644
index 000..da5d30e
--- /dev/null
+++ b/WikiLexicalData.php
@@ -0,0 +1,5 @@
+https://gerrit.wikimedia.org/r/374881
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I377eadcec0a95d2005275deb46f8a0c55413
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
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] labs...heritage[master]: Do not crash when unkwnown_fields report cannot be created

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

Change subject: Do not crash when unkwnown_fields report cannot be created
..


Do not crash when unkwnown_fields report cannot be created

The bot tries to write on wikis some reporting (here on Commons).
It is annoying when running locally as the local bot cannot do it.

This catches the Exception to avoid bubbling all the way up.

Change-Id: I3174bd82dc8a6ccb4c4a36eee8c7d4dfc3bbe5f5
---
M erfgoedbot/update_database.py
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Lokal Profil: Looks good to me, but someone else must approve
  Jean-Frédéric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index 01751da..45de6d3 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -16,6 +16,7 @@
 
 import pywikibot
 from pywikibot import pagegenerators
+from pywikibot.exceptions import OtherPageSaveError
 
 import monuments_config as mconfig
 from converters import (
@@ -149,7 +150,10 @@
 text += u'|}\n'
 text += u'[[Category:Commons:Monuments database/Unknown fields]]'
 comment = u'Updating the list of unknown fields'
-page.put(text, comment)
+try:
+page.put(text, comment)
+except OtherPageSaveError:
+pywikibot.warning("Could not save page %s (%s)" % (page, comment))
 
 
 def updateMonument(contents, source, countryconfig, conn, cursor, sourcePage):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3174bd82dc8a6ccb4c4a36eee8c7d4dfc3bbe5f5
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Jean-Frédéric 
Gerrit-Reviewer: Jean-Frédéric 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Multichill 
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...ProofreadPage[wmf/1.30.0-wmf.16]: Revert to db7507246665e69384c1d92af2aedc62263a5116

2017-08-30 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374879 )

Change subject: Revert to db7507246665e69384c1d92af2aedc62263a5116
..

Revert to db7507246665e69384c1d92af2aedc62263a5116

Moves function related to display out of PageDisplayHandler

This reverts commit 9e21fdabc8278889ea5f04c62931bdeee1a4db18.
This reverts commit e596fbd97018b2b9c476ec32406e4914d3e583d3
This reverts commit c98a61b1d8517cd6a255f71aaba5ca959bc81002
This reverts commit ab2eaeb9fbd51de38c6e2acf8018430ec7b0a89c
This reverts commit f6ca5179d7eec5ee72c0bd29607e4c0de22b03bc
This reverts commit 24f9d414fe856d21b16f54074d5130e9b9251198
This reverts commit 760d213788061dc8d6dfbc7724dfe4c8ad18ef6a
This reverts commit b48f361d7d606eff5ab48cc2a64c1cae4e794c84.

Bug: T173520
Change-Id: Ia419c028f1578792e1d7dc9c6e14d192d4264f38
(cherry picked from commit db5ee90de0038b528b9448cbd808eb190a66df95)
(cherry picked from commit a7c6487015557c9c2d33633c40f989237f07b46c)
---
M ProofreadPage.body.php
M ProofreadPage.namespaces.php
M composer.json
M extension.json
M i18n/mr.json
M i18n/ug-arab.json
M includes/Context.php
M includes/Pagination/PageList.php
M includes/Pagination/PageNumber.php
M includes/Pagination/Pagination.php
M includes/Parser/PagesTagParser.php
M includes/ProofreadPageInit.php
D includes/index/CustomIndexFieldsParser.php
M includes/index/EditIndexPage.php
M includes/index/IndexContent.php
M includes/index/IndexContentHandler.php
D includes/index/IndexDifferenceEngine.php
M includes/index/ProofreadIndexDbConnector.php
R includes/index/ProofreadIndexEntry.php
M includes/index/ProofreadIndexPage.php
M includes/page/PageContentBuilder.php
M includes/page/PageDifferenceEngine.php
M includes/page/PageDisplayHandler.php
M includes/page/PageLevel.php
M includes/page/ProofreadPageDbConnector.php
M includes/page/ProofreadPagePage.php
M phpcs.xml
M tests/phpunit/ContextTest.php
M tests/phpunit/FileProviderTest.php
M tests/phpunit/Pagination/FilePaginationTest.php
M tests/phpunit/Pagination/PagePaginationTest.php
M tests/phpunit/Pagination/PaginationFactoryTest.php
M tests/phpunit/ProofreadPageInitTest.php
M tests/phpunit/ProofreadPageTestCase.php
D tests/phpunit/index/CustomIndexFieldsParserTest.php
M tests/phpunit/index/IndexContentTest.php
M tests/phpunit/index/IndexRedirectContentTest.php
M tests/phpunit/index/ProofreadIndexPageTest.php
M tests/phpunit/page/PageContentBuilderTest.php
M tests/phpunit/page/PageContentTest.php
M tests/phpunit/page/PageDisplayHandlerTest.php
M tests/phpunit/page/PageLevelTest.php
M tests/phpunit/page/ProofreadPagePageTest.php
43 files changed, 738 insertions(+), 934 deletions(-)


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

diff --git a/ProofreadPage.body.php b/ProofreadPage.body.php
index 56b01ed..eda957a 100644
--- a/ProofreadPage.body.php
+++ b/ProofreadPage.body.php
@@ -38,7 +38,7 @@
 *
 * Returns id of Page namespace.
 *
-* @return int
+* @return integer
 */
public static function getPageNamespaceId() {
return Context::getDefaultContext()->getPageNamespaceId();
@@ -49,7 +49,7 @@
 *
 * Returns id of Index namespace.
 *
-* @return int
+* @return integer
 */
public static function getIndexNamespaceId() {
return Context::getDefaultContext()->getIndexNamespaceId();
@@ -86,7 +86,7 @@
 *
 * @param Title $title the title page
 * @param string $model the content model for the page
-* @return bool if we have to continue the research for a content 
handler
+* @return boolean if we have to continue the research for a content 
handler
 */
public static function onContentHandlerDefaultModelFor( Title $title, 
&$model ) {
if ( $title->inNamespace( self::getPageNamespaceId() ) ) {
@@ -104,7 +104,7 @@
 * Set up our custom parser hooks when initializing parser.
 *
 * @param Parser $parser
-* @return bool hook return value
+* @return boolean hook return value
 */
public static function onParserFirstCallInit( Parser $parser ) {
$parser->setHook(
diff --git a/ProofreadPage.namespaces.php b/ProofreadPage.namespaces.php
index 63216c2..572dcd7 100644
--- a/ProofreadPage.namespaces.php
+++ b/ProofreadPage.namespaces.php
@@ -240,7 +240,7 @@
'page' => 'ಪುಟ',
'page_talk' => 'ಪುಟ_ಚರ್ಚೆ',
'index' => 'ಪರಿವಿಡಿ',
-   'index_talk' => 'ಪರಿವಿಡಿ_ಚರ್ಚೆ'
+   'index_talk' =>  'ಪರಿವಿಡಿ_ಚರ್ಚೆ'
 ];
 
 /** Korean (한국어) */
@@ -264,7 +264,7 @@
'page' => 'താൾ',
'page_talk' => 'താളിന്റെ_സംവാദം',
'index' => 'സൂചിക',
-   'index_talk' => 'സൂചികയുടെ_സംവാദം'
+   'index_talk' =>  'സൂചികയുടെ_സംവാദം'
 ];
 
 /** Marathi (मराठी) */
@@ -272,7 +272,7 @@

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: WLFilters: describe how unseen changes should look

2017-08-30 Thread Sbisson (Code Review)
Sbisson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374880 )

Change subject: WLFilters: describe how unseen changes should look
..

WLFilters: describe how unseen changes should look

Makes the unseen changes description customizable
based on whether or not the beta feature is enabled.

Bug: T172030
Change-Id: I0cef7e5fb261e12f3ca069e7409f3aea3fc874cf
---
M includes/specials/SpecialWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index dcd2ffa..d0d1b61 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -830,7 +830,11 @@
$watchlistHeader .= $this->msg( 
'wlheader-enotif' )->parse() . "\n";
}
if ( $showUpdatedMarker ) {
-   $watchlistHeader .= $this->msg( 
'wlheader-showupdated' )->parse() . "\n";
+   $watchlistHeader .= $this->msg(
+   $this->isStructuredFilterUiEnabled() ?
+   
'rcfilters-watchlist-showupdated' :
+   'wlheader-showupdated'
+   )->parse() . "\n";
}
}
$form .= Html::rawElement(
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 816c9be..b280488 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1470,6 +1470,7 @@
"rcfilters-liveupdates-button-title-off": "Display new changes as they 
happen",
"rcfilters-watchlist-markSeen-button": "Mark all changes as seen",
"rcfilters-watchlist-editWatchlist-button": "Edit your list of watched 
pages",
+   "rcfilters-watchlist-showupdated": "Changes to pages you haven't 
visited since the changes occurred are in bold, with solid 
markers.",
"rcnotefrom": "Below {{PLURAL:$5|is the change|are the changes}} since 
$3, $4 (up to $1 shown).",
"rclistfromreset": "Reset date selection",
"rclistfrom": "Show new changes starting from $2, $3",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index dfe69a9..1105d15 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -1660,6 +1660,7 @@
"rcfilters-liveupdates-button-title-off": "Title for the button to 
enable or disable live updates on [[Special:RecentChanges]] when the feature is 
OFF.",
"rcfilters-watchlist-markSeen-button": "Label for the button to mark 
all changes as seen on [[Special:Watchlist]] when using the structured filters 
interface.",
"rcfilters-watchlist-editWatchlist-button": "Label for the button to 
edit the watched pages on [[Special:Watchlist]] when using the structured 
filters interface.",
+   "rcfilters-watchlist-showupdated": "Message at the top of 
[[Special:Watchlist]] when the Structured filters are enabled that describes 
what unseen changes look like.",
"rcnotefrom": "This message is displayed at [[Special:RecentChanges]] 
when viewing recentchanges from some specific time.\n\nThe corresponding 
message is {{msg-mw|Rclistfrom}}.\n\nParameters:\n* $1 - the maximum number of 
changes that are displayed\n* $2 - (Optional) a date and time\n* $3 - a date\n* 
$4 - a time\n* $5 - Number of changes are displayed, for use with PLURAL",
"rclistfromreset": "Used on [[Special:RecentChanges]] to reset a 
selection of a certain date range.",
"rclistfrom": "Used on [[Special:RecentChanges]]. Parameters:\n* $1 - 
(Currently not use) date and time. The date and the time adds to the rclistfrom 
description.\n* $2 - time. The time adds to the rclistfrom link description 
(with split of date and time).\n* $3 - date. The date adds to the rclistfrom 
link description (with split of date and time).\n\nThe corresponding message is 
{{msg-mw|Rcnotefrom}}.",

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] Add reportupdater job to trigger page-creation metrics

2017-08-30 Thread Mforns (Code Review)
Mforns has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374878 )

Change subject: [WIP] Add reportupdater job to trigger page-creation metrics
..

[WIP] Add reportupdater job to trigger page-creation metrics

Bug: T170850
Change-Id: I4f13143a6c8716726459c445c962e47d19f4b35f
---
M modules/profile/manifests/reportupdater/jobs/mysql.pp
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/profile/manifests/reportupdater/jobs/mysql.pp 
b/modules/profile/manifests/reportupdater/jobs/mysql.pp
index cba6fe7..7b02ad0 100644
--- a/modules/profile/manifests/reportupdater/jobs/mysql.pp
+++ b/modules/profile/manifests/reportupdater/jobs/mysql.pp
@@ -71,4 +71,8 @@
 repository => 'discovery-stats',
 output_dir => 'metrics/interactive',
 }
+reportupdater::job { 'page-creation':
+repository => 'reportupdater-queries',
+output_dir => 'metrics/page-creation',
+}
 }
\ No newline at end of file

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...DjangoBannerStats[master]: Fix flake8 error

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

Change subject: Fix flake8 error
..


Fix flake8 error

F841 local variable 'e' is assigned to but never used

All caused by blocks such as:

  except Exception as e:
  foo

Bug: T121723
Change-Id: Iaeafa438e5b5814ca01840d379bfac49193f7724
---
M fundraiser/analytics/management/commands/LoadBannerImpressions.py
M fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
M fundraiser/analytics/management/commands/LoadLPImpressions.py
3 files changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/fundraiser/analytics/management/commands/LoadBannerImpressions.py 
b/fundraiser/analytics/management/commands/LoadBannerImpressions.py
index 2aaf679..fdf7072 100644
--- a/fundraiser/analytics/management/commands/LoadBannerImpressions.py
+++ b/fundraiser/analytics/management/commands/LoadBannerImpressions.py
@@ -452,7 +452,7 @@
 finally:
 self.pending_impressions = []
 
-except Exception as e:
+except Exception:
 results["impression"]["error"] += 1
 self.logger.exception("** UNHANDLED EXCEPTION WHILE 
PROCESSING BANNER IMPRESSION **")
 
self.logger.error("\n%s\n" % l.strip())
@@ -466,7 +466,7 @@
 self.pending_impressions = []
 self.pending_hidden = []
 
-except Exception as e:
+except Exception:
 self.logger.exception("** UNHANDLED EXCEPTION WHILE PROCESSING 
LANDING PAGE IMPRESSION **")
 self.logger.error("")
 
@@ -500,7 +500,7 @@
 
 transaction.commit('default')
 
-except IntegrityError as e:
+except IntegrityError:
 # some impression was not happy
 transaction.rollback('default')
 
@@ -510,7 +510,7 @@
 for i in impressions:
 self.write([i])
 
-except Exception as e:
+except Exception:
 transaction.rollback()
 
 self.logger.exception("UNHANDLED EXCEPTION")
@@ -550,7 +550,7 @@
 
 transaction.commit('default')
 
-except IntegrityError as e:
+except IntegrityError:
 # some impression was not happy
 transaction.rollback('default')
 
@@ -560,7 +560,7 @@
 for i in impressions:
 self.write([i])
 
-except Exception as e:
+except Exception:
 transaction.rollback()
 
 self.logger.exception("UNHANDLED EXCEPTION")
diff --git 
a/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py 
b/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
index c643207..f593c64 100644
--- 
a/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
+++ 
b/fundraiser/analytics/management/commands/LoadBannerImpressions2Aggregate.py
@@ -406,7 +406,7 @@
 if not self.debug:
 self.write(counts)
 
-except Exception as e:
+except Exception:
 self.logger.exception("** UNHANDLED EXCEPTION WHILE PROCESSING 
LANDING PAGE IMPRESSION **")
 self.logger.error("")
 
diff --git a/fundraiser/analytics/management/commands/LoadLPImpressions.py 
b/fundraiser/analytics/management/commands/LoadLPImpressions.py
index 1c116c3..1d87a38 100644
--- a/fundraiser/analytics/management/commands/LoadLPImpressions.py
+++ b/fundraiser/analytics/management/commands/LoadLPImpressions.py
@@ -451,7 +451,7 @@
 finally:
 self.pending_uniques = []
 
-except Exception as e:
+except Exception:
 results["impression"]["error"] += 1
 self.logger.exception("** UNHANDLED EXCEPTION WHILE 
PROCESSING LANDING PAGE IMPRESSION **")
 
self.logger.error("\n%s\n" % l)
@@ -464,7 +464,7 @@
 self.pending_impressions = []
 self.pending_uniques = []
 
-except Exception as e:
+except Exception:
 self.logger.exception("** UNHANDLED EXCEPTION WHILE PROCESSING 
LANDING PAGE IMPRESSION **")
 self.logger.error("")
 
@@ -496,7 +496,7 @@
 cursor.execute(base_sql % ', '.join(impressions))
 transaction.commit('default')
 
-except IntegrityError as e:
+except IntegrityError:
 # some impression was not happy
 transaction.rollback('default')
 
@@ -506,7 +506,7 @@
 for i in impressions:
 self.write(base_sql, 

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: metrics::search::srp_survtime: Split by language

2017-08-30 Thread Chelsyx (Code Review)
Chelsyx has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374876 )

Change subject: metrics::search::srp_survtime: Split by language
..


metrics::search::srp_survtime: Split by language

Bug: T170468
Change-Id: I2b935be14eeb26350dea6d9c31a66977c531c052
---
M docs/README.md
M modules/metrics/search/config.yaml
M modules/metrics/search/sample_page_visit_ld.R
M modules/metrics/search/srp_survtime.R
4 files changed, 49 insertions(+), 29 deletions(-)

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



diff --git a/docs/README.md b/docs/README.md
index 8af2aa3..1b2abe6 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -8,7 +8,7 @@
 infrastructure. These datasets provide the metrics that are used by
 [Discovery's Dashboards](https://discovery.wmflabs.org/)
 
-Last updated on 28 August 2017
+Last updated on 30 August 2017
 
 Daily Metrics
 -
@@ -147,7 +147,8 @@
 exlcudes known automata
 -   **srp\_survtime.tsv**: Estimates (via survival analysis) of how long
 Wikipedia searchers stay on full-text search results page after
-getting there from autocomplete search.
+getting there from autocomplete search, split by English vs French
+and Catalan vs other languages.
 
 wdqs/
 -
diff --git a/modules/metrics/search/config.yaml 
b/modules/metrics/search/config.yaml
index bfa78ab..7514982 100644
--- a/modules/metrics/search/config.yaml
+++ b/modules/metrics/search/config.yaml
@@ -163,8 +163,8 @@
 funnel: true
 type: script
 srp_survtime:
-description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search.
+description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search, split by English vs French and Catalan vs other languages.
 granularity: days
 starts: 2017-04-01
-funnel: false
+funnel: true
 type: script
diff --git a/modules/metrics/search/sample_page_visit_ld.R 
b/modules/metrics/search/sample_page_visit_ld.R
index ee425f6..dc04dac 100644
--- a/modules/metrics/search/sample_page_visit_ld.R
+++ b/modules/metrics/search/sample_page_visit_ld.R
@@ -40,10 +40,8 @@
   }
 )
 
-if (nrow(results) == 0) {
-  # Here we make the script output tab-separated
-  # column names, as required by Reportupdater:
-  page_visit_survivorship <- data.frame(
+empty_df <- function() {
+  data.frame(
 date = character(),
 LD10 = character(),
 LD25 = character(),
@@ -53,6 +51,12 @@
 LD95 = character(),
 LD99 = character()
   )
+}
+
+if (nrow(results) == 0) {
+  # Here we make the script output tab-separated
+  # column names, as required by Reportupdater:
+  page_visit_survivorship <- empty_df()
 } else {
   # De-duplicate, clean, and sort:
   results$timestamp <- as.POSIXct(results$timestamp, format = "%Y%m%d%H%M%S")
@@ -69,7 +73,7 @@
   # Treat each individual search session as its own thing, rather than 
belonging
   #   to a set of other search sessions by the same user.
   page_visits <- results[, {
-if (all(!is.na(.SD$checkin))) {
+if (any(.SD$event == "checkin")) {
   last_checkin <- max(.SD$checkin, na.rm = TRUE)
   idx <- which(checkins > last_checkin)
   if (length(idx) == 0) idx <- 16 # length(checkins) = 16
@@ -82,13 +86,19 @@
   )
 }
   }, by = c("session_id", "page_id")]
-  surv <- survival::Surv(time = page_visits$`last check-in`,
- time2 = page_visits$`next check-in`,
- event = page_visits$status,
- type = "interval")
-  fit <- survival::survfit(surv ~ 1)
-  page_visit_survivorship <- data.frame(date = opt$date, rbind(quantile(fit, 
probs = c(0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99))$quantile))
-  colnames(page_visit_survivorship) <- c('date', 'LD10', 'LD25', 'LD50', 
'LD75', 'LD90', 'LD95', 'LD99')
+  if (nrow(page_visits) == 0) {
+page_visit_survivorship <- empty_df()
+  } else {
+surv <- survival::Surv(
+  time = page_visits$`last check-in`,
+  time2 = page_visits$`next check-in`,
+  event = page_visits$status,
+  type = "interval"
+)
+fit <- survival::survfit(surv ~ 1)
+page_visit_survivorship <- data.frame(date = opt$date, rbind(quantile(fit, 
probs = c(0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99))$quantile))
+colnames(page_visit_survivorship) <- c('date', 'LD10', 'LD25', 'LD50', 
'LD75', 'LD90', 'LD95', 'LD99')
+  }
 }
 
 write.table(page_visit_survivorship, file = "", append = FALSE, sep = "\t", 
row.names = FALSE, quote = FALSE)
diff --git a/modules/metrics/search/srp_survtime.R 
b/modules/metrics/search/srp_survtime.R
index a4ca9cb..985a392 100644
--- a/modules/metrics/search/srp_survtime.R
+++ b/modules/metrics/search/srp_survtime.R
@@ -56,6 +56,7 @@
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove/collapse a few conditionals in CentralNotice config

2017-08-30 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374877 )

Change subject: Remove/collapse a few conditionals in CentralNotice config
..

Remove/collapse a few conditionals in CentralNotice config

Change-Id: I333da7c1d66a733021aedc31a534505202cb5186
---
M wmf-config/CommonSettings.php
1 file changed, 8 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index fa7af44..1ddf786 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1711,6 +1711,10 @@
if ( $wgDBname === 'testwiki' ) {
$wgCentralPagePath = "//test.wikipedia.org/w/index.php";
$wgCentralSelectedBannerDispatcher = 
"//test.wikipedia.org/w/index.php?title=Special:BannerLoader";
+
+   // No caching for banners on testwiki, so we can develop them 
there a bit faster - NeilK 2012-01-16
+   // Never set this to zero on a highly trafficked wiki, there 
are server-melting consequences
+   $wgNoticeBannerMaxAge = 0;
} else {
$wgCentralPagePath = "//{$wmfHostnames['meta']}/w/index.php";
$wgCentralSelectedBannerDispatcher = 
"//{$wmfHostnames['meta']}/w/index.php?title=Special:BannerLoader";
@@ -1722,27 +1726,17 @@
$wgNoticeReporterDomains = 'https://donate.wikimedia.org';
 
$wgCentralDBname = 'metawiki';
-   if ( $wmfRealm == 'production' && $wgDBname === 'testwiki' ) {
-   # test.wikipedia.org has its own central database:
-   $wgCentralDBname = 'testwiki';
-   }
-
$wgNoticeInfrastructure = false;
-   if ( $wgDBname === 'metawiki' ) {
-   $wgNoticeInfrastructure = true;
-   }
if ( $wmfRealm == 'production' && $wgDBname === 'testwiki' ) {
+   // test.wikipedia.org has its own central database:
+   $wgCentralDBname = 'testwiki';
+   $wgNoticeInfrastructure = true;
+   } elseif ( $wgDBname === 'metawiki' ) {
$wgNoticeInfrastructure = true;
}
 
// Set fundraising banners to use HTTPS on foundation wiki
$wgNoticeFundraisingUrl = 
'https://donate.wikimedia.org/wiki/Special:LandingCheck';
-
-   // No caching for banners on testwiki, so we can develop them there a 
bit faster - NeilK 2012-01-16
-   // Never set this to zero on a highly trafficked wiki, there are 
server-melting consequences
-   if ( $wgDBname === 'testwiki' ) {
-   $wgNoticeBannerMaxAge = 0;
-   }
 
// Enable the CentralNotice/Translate integration
$wgNoticeUseTranslateExtension = true;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I333da7c1d66a733021aedc31a534505202cb5186
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Replace filter 'tabs' with OOUI button select widget

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

Change subject: Replace filter 'tabs' with OOUI button select widget
..


Replace filter 'tabs' with OOUI button select widget

The OOUI widget is functionally identical and visually
almost identical, so not a big change.

Change-Id: I9ed001ee94d55bd8e3912f478b49df06006ab5d3
---
M modules/dashboard/ext.cx.dashboard.js
M modules/dashboard/styles/ext.cx.dashboard.less
2 files changed, 21 insertions(+), 70 deletions(-)

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



diff --git a/modules/dashboard/ext.cx.dashboard.js 
b/modules/dashboard/ext.cx.dashboard.js
index 6fdfbfe..e61cb2f 100644
--- a/modules/dashboard/ext.cx.dashboard.js
+++ b/modules/dashboard/ext.cx.dashboard.js
@@ -23,7 +23,6 @@
this.lists = {};
this.$translationListContainer = null;
this.$newTranslationButton = null;
-   this.$filter = null;
this.$listHeader = null;
this.$sourceSelector = null;
}
@@ -221,22 +220,25 @@
};
 
CXDashboard.prototype.buildTranslationList = function () {
-   var $filterTabs = [],
-   newTranslationButton;
+   var newTranslationButton,
+   filterButtons = [];
 
if ( mw.config.get( 'wgContentTranslationEnableSuggestions' ) ) 
{
-   $filterTabs.push( $( '' )
-   .addClass( 'cx-filter cx-filter--suggestions' )
-   .text( mw.msg( 
'cx-translation-filter-suggested-translations' ) ) );
+   filterButtons.push( new OO.ui.ButtonOptionWidget( {
+   data: 'suggested',
+   label: mw.msg( 
'cx-translation-filter-suggested-translations' )
+   } ) );
}
 
-   $filterTabs.push( $( '' )
-   .addClass( 'cx-filter cx-filter--draft' )
-   .text( mw.msg( 
'cx-translation-filter-draft-translations' ) ) );
+   filterButtons.push( new OO.ui.ButtonOptionWidget( {
+   data: 'draft',
+   label: mw.msg( 
'cx-translation-filter-draft-translations' )
+   } ) );
 
-   $filterTabs.push( $( '' )
-   .addClass( 'cx-filter cx-filter--published' )
-   .text( mw.msg( 
'cx-translation-filter-published-translations' ) ) );
+   filterButtons.push( new OO.ui.ButtonOptionWidget( {
+   data: 'published',
+   label: mw.msg( 
'cx-translation-filter-published-translations' )
+   } ) );
 
this.$listHeader = $( '' ).addClass( 'translation-filter' 
);
 
@@ -250,13 +252,13 @@
} );
this.$newTranslationButton = newTranslationButton.$element;
 
-   this.$filter = $( '' )
-   .addClass( 'cx-filters' )
-   .append( $filterTabs );
+   this.filter = new OO.ui.ButtonSelectWidget( {
+   items: filterButtons
+   } );
 
this.$listHeader.append(
this.$newTranslationButton,
-   this.$filter
+   this.filter.$element
);
 
this.$sourceSelector = $( '' )
@@ -271,12 +273,7 @@
var self = this;
 
this.activeList = type;
-   this.$filter
-   .find( '.cx-filter--selected' )
-   .removeClass( 'cx-filter--selected' );
-   this.$filter
-   .find( '.cx-filter--' + type )
-   .addClass( 'cx-filter--selected' );
+   this.filter.selectItemByData( type );
$.each( this.lists, function ( name, list ) {
if ( name === type ) {
list.show();
@@ -293,27 +290,8 @@
var self = this,
onVisibleCallback;
 
-   this.$filter.click( '.cx-filter', function ( e ) {
-   var $filter = $( e.target );
-
-   if ( $filter.is( '.cx-filter--selected' ) ) {
-   // Do not do anything on click of already 
selected filter.
-   return;
-   }
-
-   self.$filter
-   .find( '.cx-filter--selected' )
-   .removeClass( 'cx-filter--selected' );
-
-   $filter.addClass( 'cx-filter--selected' );
-
-   if ( $filter.is( '.cx-filter--draft' ) ) {
-   self.setActiveList( 

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: metrics::search::srp_survtime: Split by language

2017-08-30 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374876 )

Change subject: metrics::search::srp_survtime: Split by language
..

metrics::search::srp_survtime: Split by language

Bug: T170468
Change-Id: I2b935be14eeb26350dea6d9c31a66977c531c052
---
M docs/README.md
M modules/metrics/search/config.yaml
M modules/metrics/search/sample_page_visit_ld.R
M modules/metrics/search/srp_survtime.R
4 files changed, 49 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/76/374876/1

diff --git a/docs/README.md b/docs/README.md
index 8af2aa3..1b2abe6 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -8,7 +8,7 @@
 infrastructure. These datasets provide the metrics that are used by
 [Discovery's Dashboards](https://discovery.wmflabs.org/)
 
-Last updated on 28 August 2017
+Last updated on 30 August 2017
 
 Daily Metrics
 -
@@ -147,7 +147,8 @@
 exlcudes known automata
 -   **srp\_survtime.tsv**: Estimates (via survival analysis) of how long
 Wikipedia searchers stay on full-text search results page after
-getting there from autocomplete search.
+getting there from autocomplete search, split by English vs French
+and Catalan vs other languages.
 
 wdqs/
 -
diff --git a/modules/metrics/search/config.yaml 
b/modules/metrics/search/config.yaml
index bfa78ab..7514982 100644
--- a/modules/metrics/search/config.yaml
+++ b/modules/metrics/search/config.yaml
@@ -163,8 +163,8 @@
 funnel: true
 type: script
 srp_survtime:
-description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search.
+description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search, split by English vs French and Catalan vs other languages.
 granularity: days
 starts: 2017-04-01
-funnel: false
+funnel: true
 type: script
diff --git a/modules/metrics/search/sample_page_visit_ld.R 
b/modules/metrics/search/sample_page_visit_ld.R
index ee425f6..dc04dac 100644
--- a/modules/metrics/search/sample_page_visit_ld.R
+++ b/modules/metrics/search/sample_page_visit_ld.R
@@ -40,10 +40,8 @@
   }
 )
 
-if (nrow(results) == 0) {
-  # Here we make the script output tab-separated
-  # column names, as required by Reportupdater:
-  page_visit_survivorship <- data.frame(
+empty_df <- function() {
+  data.frame(
 date = character(),
 LD10 = character(),
 LD25 = character(),
@@ -53,6 +51,12 @@
 LD95 = character(),
 LD99 = character()
   )
+}
+
+if (nrow(results) == 0) {
+  # Here we make the script output tab-separated
+  # column names, as required by Reportupdater:
+  page_visit_survivorship <- empty_df()
 } else {
   # De-duplicate, clean, and sort:
   results$timestamp <- as.POSIXct(results$timestamp, format = "%Y%m%d%H%M%S")
@@ -69,7 +73,7 @@
   # Treat each individual search session as its own thing, rather than 
belonging
   #   to a set of other search sessions by the same user.
   page_visits <- results[, {
-if (all(!is.na(.SD$checkin))) {
+if (any(.SD$event == "checkin")) {
   last_checkin <- max(.SD$checkin, na.rm = TRUE)
   idx <- which(checkins > last_checkin)
   if (length(idx) == 0) idx <- 16 # length(checkins) = 16
@@ -82,13 +86,19 @@
   )
 }
   }, by = c("session_id", "page_id")]
-  surv <- survival::Surv(time = page_visits$`last check-in`,
- time2 = page_visits$`next check-in`,
- event = page_visits$status,
- type = "interval")
-  fit <- survival::survfit(surv ~ 1)
-  page_visit_survivorship <- data.frame(date = opt$date, rbind(quantile(fit, 
probs = c(0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99))$quantile))
-  colnames(page_visit_survivorship) <- c('date', 'LD10', 'LD25', 'LD50', 
'LD75', 'LD90', 'LD95', 'LD99')
+  if (nrow(page_visits) == 0) {
+page_visit_survivorship <- empty_df()
+  } else {
+surv <- survival::Surv(
+  time = page_visits$`last check-in`,
+  time2 = page_visits$`next check-in`,
+  event = page_visits$status,
+  type = "interval"
+)
+fit <- survival::survfit(surv ~ 1)
+page_visit_survivorship <- data.frame(date = opt$date, rbind(quantile(fit, 
probs = c(0.10, 0.25, 0.50, 0.75, 0.90, 0.95, 0.99))$quantile))
+colnames(page_visit_survivorship) <- c('date', 'LD10', 'LD25', 'LD50', 
'LD75', 'LD90', 'LD95', 'LD99')
+  }
 }
 
 write.table(page_visit_survivorship, file = "", append = FALSE, sep = "\t", 
row.names = FALSE, quote = FALSE)
diff --git a/modules/metrics/search/srp_survtime.R 
b/modules/metrics/search/srp_survtime.R
index a4ca9cb..985a392 100644
--- a/modules/metrics/search/srp_survtime.R
+++ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add centralnotice tables to maintain-views.yaml

2017-08-30 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374875 )

Change subject: Add centralnotice tables to maintain-views.yaml
..

Add centralnotice tables to maintain-views.yaml

Bug: T135405
Change-Id: I59e2b0c08be5b87e8cb62d5432eda5e51e97e644
---
M modules/role/templates/labs/db/views/maintain-views.yaml
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/374875/1

diff --git a/modules/role/templates/labs/db/views/maintain-views.yaml 
b/modules/role/templates/labs/db/views/maintain-views.yaml
index 4059e04..8d8b8ab 100644
--- a/modules/role/templates/labs/db/views/maintain-views.yaml
+++ b/modules/role/templates/labs/db/views/maintain-views.yaml
@@ -36,6 +36,21 @@
   - category
   - categorylinks
   - change_tag
+  - cn_assignments
+  - cn_known_devices
+  - cn_known_mobile_carriers
+  - cn_notice_countries
+  - cn_notice_languages
+  - cn_notice_log
+  - cn_notice_mixin_params
+  - cn_notice_mixins
+  - cn_notice_mobile_carriers
+  - cn_notice_projects
+  - cn_notices
+  - cn_template_devices
+  - cn_template_log
+  - cn_template_mixins
+  - cn_templates
   - ep_articles
   - ep_cas
   - ep_events

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: [Config] Add a 1% sampleing for dedupe logs

2017-08-30 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374874 )

Change subject: [Config] Add a 1% sampleing for dedupe logs
..

[Config] Add a 1% sampleing for dedupe logs

Change-Id: Ibd9d3368952927b49904522469ea815e4220be51
---
M scap/templates/config.yaml.j2
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/change-propagation/deploy 
refs/changes/74/374874/1

diff --git a/scap/templates/config.yaml.j2 b/scap/templates/config.yaml.j2
index 4acb2cc..3a54adb 100644
--- a/scap/templates/config.yaml.j2
+++ b/scap/templates/config.yaml.j2
@@ -753,6 +753,8 @@
 - level: info
   path: <%= log_file %>
   type: file
+  sampled_levels:
+trace/dedupe: 0.01
 
 # Statsd metrics reporter
 metrics:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd9d3368952927b49904522469ea815e4220be51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/change-propagation/deploy
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: new *.wmflabs.org certificate for cert expiry on 2017-10-16

2017-08-30 Thread RobH (Code Review)
RobH has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374873 )

Change subject: new *.wmflabs.org certificate for cert expiry on 2017-10-16
..

new *.wmflabs.org certificate for cert expiry on 2017-10-16

READ BEFORE MERGE!
Do not merge this without fully understanding the ramifications.  At the
time this is merged, the private repo will need update, as the
new.star.wmflabs.org.key file contents will need to be moved into the
star.wmflabs.org.key file.  All servers/services using this
certificate/key pair will be affected by this change.

It is recommended this patchset be pushed live by the cloud team.

The existing certificate expires on 2017-10-16.  This new certificate is
valid from 2017-08-30 onwards.  (GS renewals add on the existing certs
time to the year cert purchase.)

Bug: T174053
Change-Id: I5679e31348804240f8f1e36a7780e997e5b8dce4
---
M files/ssl/star.wmflabs.org.crt
1 file changed, 16 insertions(+), 16 deletions(-)


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

diff --git a/files/ssl/star.wmflabs.org.crt b/files/ssl/star.wmflabs.org.crt
index 288caa6..05affe6 100644
--- a/files/ssl/star.wmflabs.org.crt
+++ b/files/ssl/star.wmflabs.org.crt
@@ -1,17 +1,17 @@
 -BEGIN CERTIFICATE-
-MIIFUDCCBDigAwIBAgIMJ/Pc1rZTn2X665otMA0GCSqGSIb3DQEBCwUAMGYxCzAJ
+MIIFUDCCBDigAwIBAgIMMCrAgF7FksZSIBUJMA0GCSqGSIb3DQEBCwUAMGYxCzAJ
 BgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYDVQQDEzNH
 bG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hBMjU2IC0g
-RzIwHhcNMTYwOTA4MTkzMTA0WhcNMTcxMDE2MTU0MTA1WjB3MQswCQYDVQQGEwJV
+RzIwHhcNMTcwODMwMTkyMTAxWhcNMTgxMTE2MTU0MTA1WjB3MQswCQYDVQQGEwJV
 UzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEj
 MCEGA1UEChMaV2lraW1lZGlhIEZvdW5kYXRpb24sIEluYy4xFjAUBgNVBAMMDSou
-d21mbGFicy5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDvj5dK
-pmbYx3MxtByzkQz/5FtBh1GiZrFePnGy0X77sse3yle0ls7pIbdZJq9uwz1lnG7x
-kI3c1W7ddbsW+bfTQr8qeOwK95Yef8ltvZzU2sMX8JiYZ1iq0DZbeSTNUG/dxMex
-3vDLhz6mqepLI0wFplkwsmgJkbyp/n+MYzqIaVqthMkNSh1Mxnxc+96N9lQ6BHZF
-DKQnPewhjWF4uQHxOpnoBwYpvivbsMKvr07Zj3VgbewPOIN2bTCPvGdtx2BKtuf0
-vFRWUl/X9IEMS+elBv3zkuj5/+202dCCntu1BQCKVmDmgtN33kn1vtgwrEPvNIM6
-V16B+iRfpzaci1wvAgMBAAGjggHrMIIB5zAOBgNVHQ8BAf8EBAMCBaAwgaAGCCsG
+d21mbGFicy5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC0mlIp
+5zxZUC8QZHeKCFvHHEeWxDHsZMzwYxqTPCWB0qezR8EGl51T25moYJHiJmmZilW6
+ajVnsPhFDUdNcRuMcWdiswe/wOiql+OHqcbRJlWXC6KWS96VLq51yA7qbwl/m8JS
+oDDu10EYOHVTn/zjpbDYry9a7Hp5zrqiB2YPzCtrJNSWk9xZa0N0LD5WudGf8/dB
+GaiJGKTWl89+qIETKQVzRJmqmYapMuZ/DxHAfJm6k9U2goj5hl103zEhUyWKgix7
+kgQO1mkALToK41RMLDr+VO/sH6glLUE1o7kjObfgNntw27V0j9vvWCJzP8lTROfC
+rZUO5Bevr2gdZ805AgMBAAGjggHrMIIB5zAOBgNVHQ8BAf8EBAMCBaAwgaAGCCsG
 AQUFBwEBBIGTMIGQME0GCCsGAQUFBzAChkFodHRwOi8vc2VjdXJlLmdsb2JhbHNp
 Z24uY29tL2NhY2VydC9nc29yZ2FuaXphdGlvbnZhbHNoYTJnMnIxLmNydDA/Bggr
 BgEFBQcwAYYzaHR0cDovL29jc3AyLmdsb2JhbHNpZ24uY29tL2dzb3JnYW5pemF0
@@ -20,12 +20,12 @@
 DAECAjAJBgNVHRMEAjAAMEkGA1UdHwRCMEAwPqA8oDqGOGh0dHA6Ly9jcmwuZ2xv
 YmFsc2lnbi5jb20vZ3MvZ3Nvcmdhbml6YXRpb252YWxzaGEyZzIuY3JsMCUGA1Ud
 EQQeMByCDSoud21mbGFicy5vcmeCC3dtZmxhYnMub3JnMB0GA1UdJQQWMBQGCCsG
-AQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUIsMdpXtzD7Ap/BiCnIaxO4gYFLcw
+AQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQUg91hHPFB3K0l3T0JBTrG1zBLZt0w
 HwYDVR0jBBgwFoAUlt5h8b0cFilTHMDMfTuDAEDmGnwwDQYJKoZIhvcNAQELBQAD
-ggEBAI/7wEVnp5m6KVMX6Ric+oTp2vKj4Dvun9yUheTDdtMO9vZN0nVwuvgCc8wE
-QLY5YQKL0iagL59KQSmQMYB0i6H5W00ZJd8o5dETGgCk4Jug2yC5fjqoG5zFqAss
-dKVI+SRxbR1gQ94MDbaNzox/k+bhqxB0ca6vKX0nlVExMr6WfQsODu8SWSDavclo
-j6VyJYb3Oig9G3fZdMCVMOt7jnH9PytiC3edMfvaMIf/tl7m58BhhG9vL8Sr+7oB
-A5DJg7NcR/Gq7t178gtGbTnHphBFOohvSZNvPQxS4Q6fSgon7J9RarkW7nYdPqQ6
-WS2V0yuO4jAO2l9sEiy7DiOoIEA=
+ggEBABcho7EUEhV/Fo/4bp/WGLFBkf4vp9NP0TRufJrZJk0gSBHW0oA80/nUz4ND
+1+du3X9BWsQkI1GmQ8/KMJMkxmKOdA9DkEiqzaeMSegfG2PsjXflFJuW9BleAAU5
+T4KV+1hL1e3QB7IPeDNomJ+5TJdxq6kV/rOGuQXKC6M+NmqWj7xYtzLtdXrmX6ZL
+WIejHNgldCDeMPwQBTXfrqfg6dUTpOgN3VQapbKgBO+NO4SehMmCnQeuo7sEMUac
+9tdKwT31HLdESmuYd56ZMxHYwY4o5hFvGOABVvSv5FmaHgEjMYdiVjy+zCyzKY9D
+Jdb6WhSWD3eZ144uHMBIywk0z1c=
 -END CERTIFICATE-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5679e31348804240f8f1e36a7780e997e5b8dce4
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] mediawiki/core[master]: Only do one query for page ids in PageProps::getGoodIDs

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

Change subject: Only do one query for page ids in PageProps::getGoodIDs
..


Only do one query for page ids in PageProps::getGoodIDs

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

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



diff --git a/includes/PageProps.php b/includes/PageProps.php
index dac756e..ff8deee 100644
--- a/includes/PageProps.php
+++ b/includes/PageProps.php
@@ -242,6 +242,8 @@
private function getGoodIDs( $titles ) {
$result = [];
if ( is_array( $titles ) ) {
+   ( new LinkBatch( $titles ) )->execute();
+
foreach ( $titles as $title ) {
$pageID = $title->getArticleID();
if ( $pageID > 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d1cff3173d54de0b8fadb5bf9766789ffe030a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Daniel Kinzler 
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]: mediawiki: Fix cronspam

2017-08-30 Thread Volans (Code Review)
Volans has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374872 )

Change subject: mediawiki: Fix cronspam
..


mediawiki: Fix cronspam

Change-Id: I4c35ed467084dadd7b5e4d8802f13ad6aa31b8e1
---
M modules/mediawiki/manifests/maintenance/wikidata.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/mediawiki/manifests/maintenance/wikidata.pp 
b/modules/mediawiki/manifests/maintenance/wikidata.pp
index 89251fb..32821d6 100644
--- a/modules/mediawiki/manifests/maintenance/wikidata.pp
+++ b/modules/mediawiki/manifests/maintenance/wikidata.pp
@@ -67,7 +67,7 @@
 # rebuildTermSqlIndex is temporarilly stopped
 cron { 'wikibase-rebuildTermSqlIndex':
 ensure  => $ensure,
-command => '/usr/bin/timeout 3500s /usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/rebuildTermSqlIndex.php
 --wiki wikidatawiki --entity-type=item --batch-size 500 --sleep 50 --from-id 
$(/bin/ls -t /var/log/wikidata/rebuildTermSqlIndex.log 
/var/log/wikidata/rebuildTermSqlIndex.log*[0-9] | /usr/bin/xargs -d "\n" 
/usr/bin/tac | /usr/bin/awk \'/Processed up to page (\d+?)/ { print $5; exit 
}\') >> /var/log/wikidata/rebuildTermSqlIndex.log 2>&1',
+command => '/usr/bin/timeout 3500s /usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/rebuildTermSqlIndex.php
 --wiki wikidatawiki --entity-type=item --batch-size 500 --sleep 40 --from-id 
$(/bin/ls -t /var/log/wikidata/rebuildTermSqlIndex.log 
/var/log/wikidata/rebuildTermSqlIndex.log*[0-9] | /usr/bin/xargs -d "\n" 
/usr/bin/tac | /usr/bin/awk \'/Processed up to page (\d+?)/ { print $5 }\' | 
head -n1) >> /var/log/wikidata/rebuildTermSqlIndex.log 2>&1',
 user=> $::mediawiki::users::web,
 minute  => 30,
 hour=> '*',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Fix cronspam

2017-08-30 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374872 )

Change subject: Fix cronspam
..

Fix cronspam

Change-Id: I4c35ed467084dadd7b5e4d8802f13ad6aa31b8e1
---
M modules/mediawiki/manifests/maintenance/wikidata.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/374872/1

diff --git a/modules/mediawiki/manifests/maintenance/wikidata.pp 
b/modules/mediawiki/manifests/maintenance/wikidata.pp
index 89251fb..32821d6 100644
--- a/modules/mediawiki/manifests/maintenance/wikidata.pp
+++ b/modules/mediawiki/manifests/maintenance/wikidata.pp
@@ -67,7 +67,7 @@
 # rebuildTermSqlIndex is temporarilly stopped
 cron { 'wikibase-rebuildTermSqlIndex':
 ensure  => $ensure,
-command => '/usr/bin/timeout 3500s /usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/rebuildTermSqlIndex.php
 --wiki wikidatawiki --entity-type=item --batch-size 500 --sleep 50 --from-id 
$(/bin/ls -t /var/log/wikidata/rebuildTermSqlIndex.log 
/var/log/wikidata/rebuildTermSqlIndex.log*[0-9] | /usr/bin/xargs -d "\n" 
/usr/bin/tac | /usr/bin/awk \'/Processed up to page (\d+?)/ { print $5; exit 
}\') >> /var/log/wikidata/rebuildTermSqlIndex.log 2>&1',
+command => '/usr/bin/timeout 3500s /usr/local/bin/mwscript 
extensions/Wikidata/extensions/Wikibase/repo/maintenance/rebuildTermSqlIndex.php
 --wiki wikidatawiki --entity-type=item --batch-size 500 --sleep 40 --from-id 
$(/bin/ls -t /var/log/wikidata/rebuildTermSqlIndex.log 
/var/log/wikidata/rebuildTermSqlIndex.log*[0-9] | /usr/bin/xargs -d "\n" 
/usr/bin/tac | /usr/bin/awk \'/Processed up to page (\d+?)/ { print $5 }\' | 
head -n1) >> /var/log/wikidata/rebuildTermSqlIndex.log 2>&1',
 user=> $::mediawiki::users::web,
 minute  => 30,
 hour=> '*',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Give target column a z-index so inspectors are on top

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

Change subject: Give target column a z-index so inspectors are on top
..


Give target column a z-index so inspectors are on top

Change-Id: I446ca17a9787cb38f2205e4f3524ec76ca16afaa
---
M modules/ui/styles/mw.cx.ui.TargetColumn.less
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ui/styles/mw.cx.ui.TargetColumn.less 
b/modules/ui/styles/mw.cx.ui.TargetColumn.less
index a94b3c0..39df23e 100644
--- a/modules/ui/styles/mw.cx.ui.TargetColumn.less
+++ b/modules/ui/styles/mw.cx.ui.TargetColumn.less
@@ -2,6 +2,8 @@
 @import '../../widgets/common/ext.cx.highlight.less';
 
 .cx-column--translation {
+   // Layer inspectors above right column
+   z-index: 1;
.cx-column-target-title {
padding: 0;
padding-top: 0.5em;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I446ca17a9787cb38f2205e4f3524ec76ca16afaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...heritage[wikidata]: Allow skipping some configs during full harvest.

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

Change subject: Allow skipping some configs during full harvest.
..


Allow skipping some configs during full harvest.

Adds the `-skip_wd` command line argument which skips all wikidata/sparql
harvesting.
Adds the `skip` config setting which, when set to true, skips that
particular config file from harvesting.

In both cases harvesting is allowed if a particular language-country
combination is provided.

Bug: T174334
Change-Id: I79cba7c655e68c6814838f59ba5b96a858a79505
---
M erfgoedbot/update_database.py
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Jean-Frédéric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index c459085..be9b80f 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -503,6 +503,7 @@
 countrycode = u''
 lang = u''
 fullUpdate = True
+skip_wd = False
 daysBack = 2  # Default 2 days. Runs every night so can miss one night.
 conn = None
 cursor = None
@@ -518,6 +519,8 @@
 daysBack = int(value)
 elif option == u'-fullupdate':  # does nothing since already default
 fullUpdate = True
+elif option == u'-skip_wd':
+skip_wd = True
 else:
 raise Exception(
 u'Bad parameters. Expected "-countrycode", "-langcode", '
@@ -547,6 +550,9 @@
 u'be used together.')
 else:
 for (countrycode, lang), countryconfig in 
mconfig.countries.iteritems():
+if (countryconfig.get('skip') or
+(skip_wd and (countryconfig.get('type') == 'sparql'))):
+continue
 pywikibot.log(
 u'Working on countrycode "%s" in language "%s"' % (
 countrycode, lang))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79cba7c655e68c6814838f59ba5b96a858a79505
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: wikidata
Gerrit-Owner: Lokal Profil 
Gerrit-Reviewer: Jean-Frédéric 
Gerrit-Reviewer: Lokal Profil 
Gerrit-Reviewer: Multichill 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Use User Ids instead of User Names for Echo Mute

2017-08-30 Thread Dbarratt (Code Review)
Dbarratt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374871 )

Change subject: Use User Ids instead of User Names for Echo Mute
..

Use User Ids instead of User Names for Echo Mute

The echo mute list uses user names which are not stable. User ids should be 
used instead.

Bug: T173475
Change-Id: I947bcf37a8f85aaa105776d368dbd0ab76823aeb
---
M Hooks.php
M extension.json
M includes/ContainmentSet.php
A maintenance/updatePerUserBlacklist.php
4 files changed, 134 insertions(+), 5 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 8e3db35..8c310b0 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -490,10 +490,14 @@
}
 
if ( $wgEchoPerUserBlacklist ) {
+   $lookup = CentralIdLookup::factory();
+   $ids = $user->getOption( 
'echo-notifications-blacklist', [] );
+   $names = $ids ? $lookup->lookupCentralIds( array_flip( 
$ids ), $user ) : [];
$preferences['echo-notifications-blacklist'] = [
'type' => 'usersmultiselect',
'label-message' => 
'echo-pref-notifications-blacklist',
'section' => 'echo/blocknotificationslist',
+   'default' => implode( "\n", array_values( 
$names ) )
];
}
 
@@ -1252,6 +1256,10 @@
$options['echo-subscriptions-email-edit-user-talk'] = 
$options['enotifusertalkpages'];
}
 
+   if ( isset( $options['echo-notifications-blacklist'] ) ) {
+   $options['echo-notifications-blacklist'] = array_map( 
'intval', explode( "\n", $options['echo-notifications-blacklist'] ) );
+   }
+
return true;
}
 
@@ -1270,6 +1278,31 @@
unset( 
$options['echo-subscriptions-email-edit-user-talk'] );
}
 
+   // Convert usernames to ids.
+   if ( isset( $options['echo-notifications-blacklist'] ) ) {
+   if ( $options['echo-notifications-blacklist'] ) {
+   $value = 
$options['echo-notifications-blacklist'];
+   // Notification Blacklist may be an array of 
ids or a string of new line
+   // delimnated user names.
+   if ( is_array( $value ) ) {
+   $ids = array_filter( $value, 
'is_numeric' );
+   } else {
+   $lookup = CentralIdLookup::factory();
+   $names = explode( "\n", $value );
+   $nameToId = array_flip( $names );
+   $nameToId = array_fill_keys( 
array_keys( $nameToId ), false );
+   $ids = array_filter( 
$lookup->lookupUserNames( $nameToId, $this ), function ( $id ) {
+   return $id !== false;
+   } );
+   }
+   $user->setOption( 
'echo-notifications-blacklist', array_unique( array_values( $ids ) ) );
+   $options['echo-notifications-blacklist'] = 
implode( "\n", $user->getOption( 'echo-notifications-blacklist' ) );
+   } else {
+   // If the blacklist is empty, set it to null 
rather than an empty string.
+   $options['echo-notifications-blacklist'] = null;
+   }
+   }
+
return true;
}
 
diff --git a/extension.json b/extension.json
index 39606db..2ae045f 100644
--- a/extension.json
+++ b/extension.json
@@ -1019,6 +1019,7 @@
"SpecialNotificationsMarkRead": 
"includes/special/SpecialNotificationsMarkRead.php",
"SuppressionMaintenanceTest": 
"tests/phpunit/maintenance/SupressionMaintenanceTest.php",
"TestDiscussionParser": "maintenance/testDiscussionParser.php",
-   "UpdateEchoSchemaForSuppression": 
"maintenance/updateEchoSchemaForSuppression.php"
+   "UpdateEchoSchemaForSuppression": 
"maintenance/updateEchoSchemaForSuppression.php",
+   "EchoUpdatePerUserBlocklist": 
"maintenance/updatePerUserBlocklist.php"
}
 }
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
index 4b6ce1f..d5cfff5 100644
--- a/includes/ContainmentSet.php
+++ b/includes/ContainmentSet.php
@@ -71,12 +71,12 @@
 * @param string $preferenceName
 */
public function addFromUserOption( $preferenceName ) {
-   

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Toolbar style improvements

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

Change subject: Toolbar style improvements
..


Toolbar style improvements

Move publish button into VE toolbar, so we only
have one floating toolbar.

Try to position and size things correctly.

Change-Id: Ia74ddbe3afac587413291d152d95c77e56eb4065
---
M modules/ui/legacy/mw.cx.ui.TranslationView.js
M modules/ui/mw.cx.ui.Header.js
M modules/ui/mw.cx.ui.TranslationView.js
M modules/ui/styles/mw.cx.ui.Header.less
M modules/ui/styles/mw.cx.ui.ToolsColumn.less
M modules/ui/styles/mw.cx.ui.TranslationView.less
M modules/ve-cx/ui/styles/ve.ui.CXSurface.css
7 files changed, 9 insertions(+), 48 deletions(-)

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



diff --git a/modules/ui/legacy/mw.cx.ui.TranslationView.js 
b/modules/ui/legacy/mw.cx.ui.TranslationView.js
index 95a2320..155c7cf 100644
--- a/modules/ui/legacy/mw.cx.ui.TranslationView.js
+++ b/modules/ui/legacy/mw.cx.ui.TranslationView.js
@@ -46,7 +46,6 @@
this.publishButton = new OO.ui.ButtonWidget( {
disabled: true,
flags: [ 'progressive', 'primary' ],
-   classes: [ 'cx-header__publish-button' ],
label: mw.msg( 'cx-publish-button' )
} );
 
diff --git a/modules/ui/mw.cx.ui.Header.js b/modules/ui/mw.cx.ui.Header.js
index 18f34c5..efa3485 100644
--- a/modules/ui/mw.cx.ui.Header.js
+++ b/modules/ui/mw.cx.ui.Header.js
@@ -101,19 +101,8 @@
this.setStatusMessage( mw.msg( 'cx-draft-restore-failed' ) );
$( '.cx-widget__columns' ).addClass( 'disabled' );
}.bind( this ) );
-   $( window ).on( 'scroll resize', this.onWindowScroll.bind( this ) );
 };
 
 mw.cx.ui.Header.prototype.setStatusMessage = function ( message ) {
this.statusbar.setLabel( message );
-};
-
-mw.cx.ui.Header.prototype.onWindowScroll = function () {
-   var scrollTop = $( window ).scrollTop();
-
-   if ( scrollTop > 0 ) {
-   this.$element.addClass( 'sticky' );
-   } else {
-   this.$element.removeClass( 'sticky' );
-   }
 };
diff --git a/modules/ui/mw.cx.ui.TranslationView.js 
b/modules/ui/mw.cx.ui.TranslationView.js
index e25c151..51dc15f 100644
--- a/modules/ui/mw.cx.ui.TranslationView.js
+++ b/modules/ui/mw.cx.ui.TranslationView.js
@@ -127,7 +127,8 @@
} );
this.publishButton = publishButton;
this.publishSettings = publishSettings;
-   this.header.$toolbar.prepend( this.publishSettings.$element, 
this.publishButton.$element );
+   // this.header.$toolbar.prepend( this.publishSettings.$element, 
this.publishButton.$element );
+   this.getToolbar().$actions.append( this.publishSettings.$element, 
this.publishButton.$element );
 };
 
 mw.cx.ui.TranslationView.prototype.unbindHandlers = function () {
diff --git a/modules/ui/styles/mw.cx.ui.Header.less 
b/modules/ui/styles/mw.cx.ui.Header.less
index 6c66aa2..c6ea1cc 100644
--- a/modules/ui/styles/mw.cx.ui.Header.less
+++ b/modules/ui/styles/mw.cx.ui.Header.less
@@ -30,12 +30,10 @@
 .cx-header__bar {
.mw-ui-item;
.mw-ui-one-whole;
-   border-bottom: 1px solid #eee;
border-top: 1px solid #eee;
-   padding: 5px;
+   padding: 0;
/* Trick to get items vertically aligned */
line-height: 2em;
-   box-shadow: 0 1px rgba( 0, 0, 0, 0.05 );
 }
 
 .cx-header__translation-center {
@@ -60,27 +58,4 @@
.mw-ui-one-third;
color: @gray-dark;
font-size: normal;
-}
-
-.cx-header.sticky {
-   .mw-ui-one-whole;
-   position: fixed;
-   top: 0;
-   left: 0;
-   background: #fff;
-   background: rgba( 255, 255, 255, 0.95 );
-   z-index: 10;
-
-   .cx-header__publish {
-   text-align: right;
-   }
-
-   .cx-header__translation-center,
-   .cx-header__draft-status,
-   .cx-header__logo,
-   .cx-header__user-details,
-   .cx-header__publish-button,
-   .cx-header__title {
-   display: none;
-   }
 }
diff --git a/modules/ui/styles/mw.cx.ui.ToolsColumn.less 
b/modules/ui/styles/mw.cx.ui.ToolsColumn.less
index 4a1..4658fe0 100644
--- a/modules/ui/styles/mw.cx.ui.ToolsColumn.less
+++ b/modules/ui/styles/mw.cx.ui.ToolsColumn.less
@@ -12,7 +12,7 @@
border-left: 1px solid #ccc;
 
&.sticky {
-   top: 55px;
+   top: 41px;
}
 
@media @palm {
diff --git a/modules/ui/styles/mw.cx.ui.TranslationView.less 
b/modules/ui/styles/mw.cx.ui.TranslationView.less
index ca63439..1839387 100644
--- a/modules/ui/styles/mw.cx.ui.TranslationView.less
+++ b/modules/ui/styles/mw.cx.ui.TranslationView.less
@@ -44,11 +44,3 @@
padding: 10px;
margin: 2px 0;
 }
-
-.cx-header__publish-button {
-   .mw-ui-item;
-   width: auto;
- 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove deprecated hook EditPageBeforeEditChecks

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

Change subject: Remove deprecated hook EditPageBeforeEditChecks
..

Remove deprecated hook EditPageBeforeEditChecks

Change-Id: I525a3a81787214dae42d3ce641d8c62761d17797
---
M RELEASE-NOTES-1.32
M docs/hooks.txt
M includes/EditPage.php
3 files changed, 3 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/70/374870/1

diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32
index f0ee8c2..153829a 100644
--- a/RELEASE-NOTES-1.32
+++ b/RELEASE-NOTES-1.32
@@ -1,3 +1,6 @@
 * EditPage::isOouiEnabled() was removed.
 * EditPage::getSummaryInput() was removed. Use getSummaryInputOOUI() instead.
 * EditPage::getCheckboxes() was removed. Use getCheckboxesOOUI() instead.
+
+* Hook 'EditPageBeforeEditChecks' was removed,
+  use 'EditPageGetCheckboxesDefinition' instead.
diff --git a/docs/hooks.txt b/docs/hooks.txt
index 8912b82..f2748f3 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1418,14 +1418,6 @@
 &$buttons: Array of edit buttons "Save", "Preview", "Live", and "Diff"
 &$tabindex: HTML tabindex of the last edit check/button
 
-'EditPageBeforeEditChecks': DEPRECATED! Use 'EditPageGetCheckboxesDefinition' 
instead,
-or 'EditPage::showStandardInputs:options' if you don't actually care about 
checkboxes
-and just want to add some HTML to the page.
-Allows modifying the edit checks below the textarea in the edit form.
-&$editpage: The current EditPage object
-&$checks: Array of the HTML for edit checks like "watch this page"/"minor edit"
-&$tabindex: HTML tabindex of the last edit check/button
-
 'EditPageBeforeEditToolbar': Allows modifying the edit toolbar above the
 textarea in the edit form.
 &$toolbar: The toolbar HTML
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 08add32..929b2ed 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4158,28 +4158,6 @@
);
}
 
-   // Backwards-compatibility hack to run the 
EditPageBeforeEditChecks hook. It's important,
-   // people have used it for the weirdest things completely 
unrelated to checkboxes...
-   // And if we're gonna run it, might as well allow its legacy 
checkboxes to be shown.
-   $legacyCheckboxes = [];
-   if ( !$this->isNew ) {
-   $legacyCheckboxes['minor'] = '';
-   }
-   $legacyCheckboxes['watch'] = '';
-   // Copy new-style checkboxes into an old-style structure
-   foreach ( $checkboxes as $name => $oouiLayout ) {
-   $legacyCheckboxes[$name] = (string)$oouiLayout;
-   }
-   // Avoid PHP 7.1 warning of passing $this by reference
-   $ep = $this;
-   Hooks::run( 'EditPageBeforeEditChecks', [ &$ep, 
&$legacyCheckboxes, &$tabindex ], '1.29' );
-   // Copy back any additional old-style checkboxes into the 
new-style structure
-   foreach ( $legacyCheckboxes as $name => $html ) {
-   if ( $html && !isset( $checkboxes[$name] ) ) {
-   $checkboxes[$name] = new OOUI\Widget( [ 
'content' => new OOUI\HtmlSnippet( $html ) ] );
-   }
-   }
-
return $checkboxes;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I525a3a81787214dae42d3ce641d8c62761d17797
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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/core[master]: EditPage: Remove deprecated isOouiEnabled(), getSummaryInput...

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

Change subject: EditPage: Remove deprecated isOouiEnabled(), getSummaryInput(), 
getCheckboxes()
..

EditPage: Remove deprecated isOouiEnabled(), getSummaryInput(), getCheckboxes()

Change-Id: I0ca2960ca4da5f7ec5acb254b30254809857bafa
---
A RELEASE-NOTES-1.32
M includes/EditPage.php
2 files changed, 3 insertions(+), 111 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/69/374869/1

diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32
new file mode 100644
index 000..f0ee8c2
--- /dev/null
+++ b/RELEASE-NOTES-1.32
@@ -0,0 +1,3 @@
+* EditPage::isOouiEnabled() was removed.
+* EditPage::getSummaryInput() was removed. Use getSummaryInputOOUI() instead.
+* EditPage::getCheckboxes() was removed. Use getCheckboxesOOUI() instead.
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 883e4ab..08add32 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -477,16 +477,6 @@
}
 
/**
-* Check if the edit page is using OOUI controls
-* @return bool Always true
-* @deprecated since 1.30
-*/
-   public function isOouiEnabled() {
-   wfDeprecated( __METHOD__, '1.30' );
-   return true;
-   }
-
-   /**
 * Returns if the given content model is editable.
 *
 * @param string $modelId The ID of the content model to test. Use 
CONTENT_MODEL_XXX constants.
@@ -3067,47 +3057,6 @@
}
 
/**
-* Standard summary input and label (wgSummary), abstracted so EditPage
-* subclasses may reorganize the form.
-* Note that you do not need to worry about the label's for=, it will be
-* inferred by the id given to the input. You can remove them both by
-* passing [ 'id' => false ] to $userInputAttrs.
-*
-* @deprecated since 1.30 Use getSummaryInputOOUI() instead
-* @param string $summary The value of the summary input
-* @param string $labelText The html to place inside the label
-* @param array $inputAttrs Array of attrs to use on the input
-* @param array $spanLabelAttrs Array of attrs to use on the span 
inside the label
-* @return array An array in the format [ $label, $input ]
-*/
-   public function getSummaryInput( $summary = "", $labelText = null,
-   $inputAttrs = null, $spanLabelAttrs = null
-   ) {
-   wfDeprecated( __METHOD__, '1.30' );
-   $inputAttrs = $this->getSummaryInputAttributes( $inputAttrs );
-   $inputAttrs += Linker::tooltipAndAccesskeyAttribs( 'summary' );
-
-   $spanLabelAttrs = ( is_array( $spanLabelAttrs ) ? 
$spanLabelAttrs : [] ) + [
-   'class' => $this->missingSummary ? 'mw-summarymissed' : 
'mw-summary',
-   'id' => "wpSummaryLabel"
-   ];
-
-   $label = null;
-   if ( $labelText ) {
-   $label = Xml::tags(
-   'label',
-   $inputAttrs['id'] ? [ 'for' => 
$inputAttrs['id'] ] : null,
-   $labelText
-   );
-   $label = Xml::tags( 'span', $spanLabelAttrs, $label );
-   }
-
-   $input = Html::input( 'wpSummary', $summary, 'text', 
$inputAttrs );
-
-   return [ $label, $input ];
-   }
-
-   /**
 * Builds a standard summary input with a label.
 *
 * @param string $summary The value of the summary input
@@ -4157,66 +4106,6 @@
$editPage = $this;
Hooks::run( 'EditPageGetCheckboxesDefinition', [ $editPage, 
&$checkboxes ] );
 
-   return $checkboxes;
-   }
-
-   /**
-* Returns an array of html code of the following checkboxes old style:
-* minor and watch
-*
-* @deprecated since 1.30 Use getCheckboxesOOUI() or 
getCheckboxesDefinition() instead
-* @param int &$tabindex Current tabindex
-* @param array $checked See getCheckboxesDefinition()
-* @return array
-*/
-   public function getCheckboxes( &$tabindex, $checked ) {
-   global $wgUseMediaWikiUIEverywhere;
-   wfDeprecated( __METHOD__, '1.30' );
-
-   $checkboxes = [];
-   $checkboxesDef = $this->getCheckboxesDefinition( $checked );
-
-   // Backwards-compatibility for the EditPageBeforeEditChecks hook
-   if ( !$this->isNew ) {
-   $checkboxes['minor'] = '';
-   }
-   $checkboxes['watch'] = '';
-
-   foreach ( $checkboxesDef as $name => $options ) {
-   $legacyName = isset( $options['legacy-name'] ) ? 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Restore and deprecate getSummaryInput()

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

Change subject: EditPage: Restore and deprecate getSummaryInput()
..

EditPage: Restore and deprecate getSummaryInput()

Follow-up to 478caa076f75fde935c66eb9334410d868c30818.
We can't just remove it without a deprecation.

Change-Id: I3286e8de12bacb50a6d080477adbecf09b3be71c
---
M RELEASE-NOTES-1.30
M includes/EditPage.php
2 files changed, 41 insertions(+), 0 deletions(-)


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

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 7fff8ad..fc188cd 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -183,6 +183,7 @@
 * MWMemcached and MemCachedClientforWiki classes (deprecated in 1.27) were 
removed.
   The MemcachedClient class should be used instead.
 * EditPage::isOouiEnabled() is deprecated and will always return true.
+* EditPage::getSummaryInput() is deprecated in favor of getSummaryInputOOUI().
 * Parser::getRandomString() (deprecated in 1.26) was removed.
 * Parser::uniqPrefix() (deprecated in 1.26) was removed.
 * Parser::extractTagsAndParams() now only accepts three arguments.  The fourth,
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 0e1438f..361ed7f 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3066,6 +3066,46 @@
}
 
/**
+* Standard summary input and label (wgSummary), abstracted so EditPage
+* subclasses may reorganize the form.
+* Note that you do not need to worry about the label's for=, it will be
+* inferred by the id given to the input. You can remove them both by
+* passing [ 'id' => false ] to $userInputAttrs.
+*
+* @deprecated since 1.30 Use getSummaryInputOOUI() instead
+* @param string $summary The value of the summary input
+* @param string $labelText The html to place inside the label
+* @param array $inputAttrs Array of attrs to use on the input
+* @param array $spanLabelAttrs Array of attrs to use on the span 
inside the label
+* @return array An array in the format [ $label, $input ]
+*/
+   public function getSummaryInput( $summary = "", $labelText = null,
+   $inputAttrs = null, $spanLabelAttrs = null
+   ) {
+   $inputAttrs = $this->getSummaryInputAttributes( $inputAttrs );
+   $inputAttrs += Linker::tooltipAndAccesskeyAttribs( 'summary' );
+
+   $spanLabelAttrs = ( is_array( $spanLabelAttrs ) ? 
$spanLabelAttrs : [] ) + [
+   'class' => $this->missingSummary ? 'mw-summarymissed' : 
'mw-summary',
+   'id' => "wpSummaryLabel"
+   ];
+
+   $label = null;
+   if ( $labelText ) {
+   $label = Xml::tags(
+   'label',
+   $inputAttrs['id'] ? [ 'for' => 
$inputAttrs['id'] ] : null,
+   $labelText
+   );
+   $label = Xml::tags( 'span', $spanLabelAttrs, $label );
+   }
+
+   $input = Html::input( 'wpSummary', $summary, 'text', 
$inputAttrs );
+
+   return [ $label, $input ];
+   }
+
+   /**
 * Builds a standard summary input with a label.
 *
 * @param string $summary The value of the summary input

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3286e8de12bacb50a6d080477adbecf09b3be71c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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/core[master]: EditPage: Hard-deprecate isOouiEnabled(), getSummaryInput(), ...

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

Change subject: EditPage: Hard-deprecate isOouiEnabled(), getSummaryInput(), 
getCheckboxes()
..

EditPage: Hard-deprecate isOouiEnabled(), getSummaryInput(), getCheckboxes()

Change-Id: Id94eca12f16decfada113a46ffb6b29e52c14493
---
M includes/EditPage.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index fc52934..883e4ab 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -482,6 +482,7 @@
 * @deprecated since 1.30
 */
public function isOouiEnabled() {
+   wfDeprecated( __METHOD__, '1.30' );
return true;
}
 
@@ -3082,6 +3083,7 @@
public function getSummaryInput( $summary = "", $labelText = null,
$inputAttrs = null, $spanLabelAttrs = null
) {
+   wfDeprecated( __METHOD__, '1.30' );
$inputAttrs = $this->getSummaryInputAttributes( $inputAttrs );
$inputAttrs += Linker::tooltipAndAccesskeyAttribs( 'summary' );
 
@@ -4169,6 +4171,7 @@
 */
public function getCheckboxes( &$tabindex, $checked ) {
global $wgUseMediaWikiUIEverywhere;
+   wfDeprecated( __METHOD__, '1.30' );
 
$checkboxes = [];
$checkboxesDef = $this->getCheckboxesDefinition( $checked );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id94eca12f16decfada113a46ffb6b29e52c14493
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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...Spreadsheet[master]: Fix unit tests

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

Change subject: Fix unit tests
..


Fix unit tests

Fix path to images in css file
Exclude lib dir from buidl tools, git submodules only

Change-Id: Idb0b07ab70c733b2bd23b2a536ac851f6e08386c
---
M Gruntfile.js
M composer.json
M css/slick.grid.css
3 files changed, 9 insertions(+), 5 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index 36b6671..7f1477f 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,7 +11,9 @@
},
all: [
'**/*.js',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**',
+   '!lib/**'
]
},
banana: {
@@ -20,7 +22,9 @@
jsonlint: {
all: [
'**/*.json',
-   '!node_modules/**'
+   '!node_modules/**',
+   '!vendor/**',
+   '!lib/**'
]
}
} );
diff --git a/composer.json b/composer.json
index 686b65b..08bbf70 100644
--- a/composer.json
+++ b/composer.json
@@ -5,7 +5,7 @@
},
"scripts": {
"test": [
-   "parallel-lint . --exclude vendor"
+   "parallel-lint . --exclude vendor --exclude 
node_modules --exclude lib"
]
}
 }
diff --git a/css/slick.grid.css b/css/slick.grid.css
index f5d40c4..493c44e 100644
--- a/css/slick.grid.css
+++ b/css/slick.grid.css
@@ -50,11 +50,11 @@
 }
 
 .slick-sort-indicator-desc {
-  background: url(images/sort-desc.gif);
+  background: url(../lib/spreadsheet-js/lib/slickgrid/images/sort-desc.gif);
 }
 
 .slick-sort-indicator-asc {
-  background: url(images/sort-asc.gif);
+  background: url(../lib/spreadsheet-js/lib/slickgrid/images/sort-asc.gif);
 }
 
 .slick-resizable-handle {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb0b07ab70c733b2bd23b2a536ac851f6e08386c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Spreadsheet
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix highlight display for enhanced mode

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

Change subject: Fix highlight display for enhanced mode
..


Fix highlight display for enhanced mode

Bug: T170875
Change-Id: Ibd7d447aba1ae5576ea637a2d5ef06cb3f622b26
---
M resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
M resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.ChangesListWrapperWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
5 files changed, 235 insertions(+), 68 deletions(-)

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



diff --git 
a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
index a8ee06b..62ba002 100644
--- a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
@@ -725,6 +725,25 @@
};
 
/**
+* Get an array of currently applied highlight colors
+*
+* @return {string[]} Currently applied highlight colors
+*/
+   
mw.rcfilters.dm.FiltersViewModel.prototype.getCurrentlyUsedHighlightColors = 
function () {
+   var result = [];
+
+   this.getHighlightedItems().forEach( function ( filterItem ) {
+   var color = filterItem.getHighlightColor();
+
+   if ( result.indexOf( color ) === -1 ) {
+   result.push( color );
+   }
+   } );
+
+   return result;
+   };
+
+   /**
 * Sanitize value group of a string_option groups type
 * Remove duplicates and make sure to only use valid
 * values.
diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
index a1ef981..1894b61 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.UriProcessor.js
@@ -110,7 +110,6 @@
this.filtersModel.toggleInvertedNamespaces( !!Number( 
parameters.invert ) );
 
// Update highlight state
-   this.filtersModel.toggleHighlight( !!Number( 
parameters.highlight ) );
this.filtersModel.getItems().forEach( function ( filterItem ) {
var color = parameters[ filterItem.getName() + '_color' 
];
if ( color ) {
@@ -119,6 +118,7 @@
filterItem.clearHighlightColor();
}
} );
+   this.filtersModel.toggleHighlight( !!Number( 
parameters.highlight ) );
 
// Check all filter interactions
this.filtersModel.reassessFilterInteractions();
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
index 5a885ec..796cf2a 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
@@ -37,6 +37,19 @@
}
 }
 
+// A mixin just for changesListWrapperWidget page, to output the scope of the 
widget
+// so it is before the rest of the rule; we need the li& to be in
+// between the wrapper scope and the color-cX class, which doesn't
+// work if the rules are inside the above widget LESS scope
+.highlight-changesListWrapperWidget( @bgcolor ) {
+   .mw-rcfilters-ui-changesListWrapperWidget li&,
+   .mw-rcfilters-ui-changesListWrapperWidget & tr:first-child,
+   .mw-rcfilters-ui-changesListWrapperWidget 
tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-toplevel:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey)
 td:not( :nth-child( -n+2 ) ),
+   .mw-rcfilters-ui-changesListWrapperWidget 
tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey)
 td:not( :nth-child( -n+3 ) ) {
+   background-color: @bgcolor;
+   }
+}
+
 // This mixin produces color mixes for two, three and four colors
 .highlight-color-mix( @color1, @color2, @color3: false, @color4: false ) {
@highlight-color-class-var: 
~'.mw-rcfilters-highlight-color-@{color1}.mw-rcfilters-highlight-color-@{color2}';
@@ -51,18 +64,18 @@
 
// Two colors
@{highlight-color-class-var} when ( @color3 = false ) and ( @color4 = 
false ) and not ( @color1 = false ), ( @color2 = false ) {
-   background-color: tint( average( @@c1var, @@c2var ), 50% );
+   

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use Target#parseDocument

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

Change subject: Use Target#parseDocument
..


Use Target#parseDocument

This applies the base URL fix, so links work correctly.

Change-Id: I45a13e788901607399f7505c10fc6a3ac20b4631
---
M modules/dm/mw.cx.dm.Translation.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/dm/mw.cx.dm.Translation.js 
b/modules/dm/mw.cx.dm.Translation.js
index c5faac3..c74781c 100644
--- a/modules/dm/mw.cx.dm.Translation.js
+++ b/modules/dm/mw.cx.dm.Translation.js
@@ -67,7 +67,7 @@
 mw.cx.dm.Translation.static.getSourceDom = function ( sourceHtml, forTarget ) {
var nextSectionId = 1,
sectionIdPrefix = forTarget ? 'cxTargetSection' : 
'cxSourceSection',
-   domDoc = ve.createDocumentFromHtml( sourceHtml );
+   domDoc = ve.init.target.parseDocument( sourceHtml, 'visual' );
// Wrap each top-level element with a 
// TODO: it would be better to do section wrapping on the CX server
Array.prototype.forEach.call( domDoc.body.childNodes, function ( node ) 
{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45a13e788901607399f7505c10fc6a3ac20b4631
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Group1 to wmf.16

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

Change subject: Group1 to wmf.16
..


Group1 to wmf.16

Change-Id: I18f5dfce2d5412711515ef0ba511fa21b3a1f5db
---
M php
M wikiversions.json
2 files changed, 603 insertions(+), 603 deletions(-)

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



diff --git a/php b/php
index 5a64e5f..633715f 12
--- a/php
+++ b/php
@@ -1 +1 @@
-php-1.30.0-wmf.15
\ No newline at end of file
+php-1.30.0-wmf.16
\ No newline at end of file
diff --git a/wikiversions.json b/wikiversions.json
index 370a2ce..8b6959d 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -1,33 +1,33 @@
 {
 "aawiki": "php-1.30.0-wmf.15",
-"aawikibooks": "php-1.30.0-wmf.15",
-"aawiktionary": "php-1.30.0-wmf.15",
+"aawikibooks": "php-1.30.0-wmf.16",
+"aawiktionary": "php-1.30.0-wmf.16",
 "abwiki": "php-1.30.0-wmf.15",
-"abwiktionary": "php-1.30.0-wmf.15",
+"abwiktionary": "php-1.30.0-wmf.16",
 "acewiki": "php-1.30.0-wmf.15",
-"advisorywiki": "php-1.30.0-wmf.15",
+"advisorywiki": "php-1.30.0-wmf.16",
 "adywiki": "php-1.30.0-wmf.15",
 "afwiki": "php-1.30.0-wmf.15",
-"afwikibooks": "php-1.30.0-wmf.15",
-"afwikiquote": "php-1.30.0-wmf.15",
-"afwiktionary": "php-1.30.0-wmf.15",
+"afwikibooks": "php-1.30.0-wmf.16",
+"afwikiquote": "php-1.30.0-wmf.16",
+"afwiktionary": "php-1.30.0-wmf.16",
 "akwiki": "php-1.30.0-wmf.15",
-"akwikibooks": "php-1.30.0-wmf.15",
-"akwiktionary": "php-1.30.0-wmf.15",
+"akwikibooks": "php-1.30.0-wmf.16",
+"akwiktionary": "php-1.30.0-wmf.16",
 "alswiki": "php-1.30.0-wmf.15",
-"alswikibooks": "php-1.30.0-wmf.15",
-"alswikiquote": "php-1.30.0-wmf.15",
-"alswiktionary": "php-1.30.0-wmf.15",
+"alswikibooks": "php-1.30.0-wmf.16",
+"alswikiquote": "php-1.30.0-wmf.16",
+"alswiktionary": "php-1.30.0-wmf.16",
 "amwiki": "php-1.30.0-wmf.15",
-"amwikiquote": "php-1.30.0-wmf.15",
-"amwiktionary": "php-1.30.0-wmf.15",
+"amwikiquote": "php-1.30.0-wmf.16",
+"amwiktionary": "php-1.30.0-wmf.16",
 "angwiki": "php-1.30.0-wmf.15",
-"angwikibooks": "php-1.30.0-wmf.15",
-"angwikiquote": "php-1.30.0-wmf.15",
-"angwikisource": "php-1.30.0-wmf.15",
-"angwiktionary": "php-1.30.0-wmf.15",
+"angwikibooks": "php-1.30.0-wmf.16",
+"angwikiquote": "php-1.30.0-wmf.16",
+"angwikisource": "php-1.30.0-wmf.16",
+"angwiktionary": "php-1.30.0-wmf.16",
 "anwiki": "php-1.30.0-wmf.15",
-"anwiktionary": "php-1.30.0-wmf.15",
+"anwiktionary": "php-1.30.0-wmf.16",
 "arbcom_cswiki": "php-1.30.0-wmf.15",
 "arbcom_dewiki": "php-1.30.0-wmf.15",
 "arbcom_enwiki": "php-1.30.0-wmf.15",
@@ -35,880 +35,880 @@
 "arbcom_nlwiki": "php-1.30.0-wmf.15",
 "arcwiki": "php-1.30.0-wmf.15",
 "arwiki": "php-1.30.0-wmf.15",
-"arwikibooks": "php-1.30.0-wmf.15",
-"arwikimedia": "php-1.30.0-wmf.15",
-"arwikinews": "php-1.30.0-wmf.15",
-"arwikiquote": "php-1.30.0-wmf.15",
-"arwikisource": "php-1.30.0-wmf.15",
-"arwikiversity": "php-1.30.0-wmf.15",
-"arwiktionary": "php-1.30.0-wmf.15",
+"arwikibooks": "php-1.30.0-wmf.16",
+"arwikimedia": "php-1.30.0-wmf.16",
+"arwikinews": "php-1.30.0-wmf.16",
+"arwikiquote": "php-1.30.0-wmf.16",
+"arwikisource": "php-1.30.0-wmf.16",
+"arwikiversity": "php-1.30.0-wmf.16",
+"arwiktionary": "php-1.30.0-wmf.16",
 "arzwiki": "php-1.30.0-wmf.15",
 "astwiki": "php-1.30.0-wmf.15",
-"astwikibooks": "php-1.30.0-wmf.15",
-"astwikiquote": "php-1.30.0-wmf.15",
-"astwiktionary": "php-1.30.0-wmf.15",
+"astwikibooks": "php-1.30.0-wmf.16",
+"astwikiquote": "php-1.30.0-wmf.16",
+"astwiktionary": "php-1.30.0-wmf.16",
 "aswiki": "php-1.30.0-wmf.15",
-"aswikibooks": "php-1.30.0-wmf.15",
-"aswikisource": "php-1.30.0-wmf.15",
-"aswiktionary": "php-1.30.0-wmf.15",
+"aswikibooks": "php-1.30.0-wmf.16",
+"aswikisource": "php-1.30.0-wmf.16",
+"aswiktionary": "php-1.30.0-wmf.16",
 "atjwiki": "php-1.30.0-wmf.15",
-"auditcomwiki": "php-1.30.0-wmf.15",
+"auditcomwiki": "php-1.30.0-wmf.16",
 "avwiki": "php-1.30.0-wmf.15",
-"avwiktionary": "php-1.30.0-wmf.15",
+"avwiktionary": "php-1.30.0-wmf.16",
 "aywiki": "php-1.30.0-wmf.15",
-"aywikibooks": "php-1.30.0-wmf.15",
-"aywiktionary": "php-1.30.0-wmf.15",
+"aywikibooks": "php-1.30.0-wmf.16",
+"aywiktionary": "php-1.30.0-wmf.16",
 "azbwiki": "php-1.30.0-wmf.15",
 "azwiki": "php-1.30.0-wmf.15",
-"azwikibooks": "php-1.30.0-wmf.15",
-"azwikiquote": "php-1.30.0-wmf.15",
-"azwikisource": "php-1.30.0-wmf.15",
-"azwiktionary": "php-1.30.0-wmf.15",
+"azwikibooks": "php-1.30.0-wmf.16",
+"azwikiquote": "php-1.30.0-wmf.16",
+"azwikisource": "php-1.30.0-wmf.16",
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add me back to deployment-prep shinken contacts

2017-08-30 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374866 )

Change subject: Add me back to deployment-prep shinken contacts
..

Add me back to deployment-prep shinken contacts

Change-Id: I13a492e4fd2423e9dc49b8bdab4b9b352948f527
---
M modules/nagios_common/files/contactgroups-labs.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/nagios_common/files/contactgroups-labs.cfg 
b/modules/nagios_common/files/contactgroups-labs.cfg
index 2165ca9..76f0f5f 100644
--- a/modules/nagios_common/files/contactgroups-labs.cfg
+++ b/modules/nagios_common/files/contactgroups-labs.cfg
@@ -16,7 +16,7 @@
 define contactgroup {
 contactgroup_name   deployment-prep
 alias   Beta Cluster Administrators
-members 
guest,greg_g,twentyafterfour,betacluster-alerts-list,irc-releng,kart_,gehel
+members 
guest,greg_g,twentyafterfour,betacluster-alerts-list,irc-releng,kart_,gehel,krenair
 }
 
 define contactgroup {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Use CommentStore to access core comment fields

2017-08-30 Thread Anomie (Code Review)
Anomie has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/374865 )

Change subject: Use CommentStore to access core comment fields
..

Use CommentStore to access core comment fields

See core change Ic3a434c0.

Bug: T166732
Change-Id: I875640b2e78e3e8936d8f40292ac07519692c847
---
M bug-53687/fixOrphans.php
1 file changed, 23 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/65/374865/1

diff --git a/bug-53687/fixOrphans.php b/bug-53687/fixOrphans.php
index ad18695..e7f35a0 100644
--- a/bug-53687/fixOrphans.php
+++ b/bug-53687/fixOrphans.php
@@ -10,6 +10,11 @@
}
 
function execute() {
+   global $wgCommentTableSchemaMigrationStage;
+
+   $commentMigrationStage = isset( 
$wgCommentTableSchemaMigrationStage )
+   ? $wgCommentTableSchemaMigrationStage : MIGRATION_NEW;
+
$fileName = $this->getArg( 0 );
$f = fopen( $fileName, 'r' );
if ( !$f ) {
@@ -24,7 +29,6 @@
$dbw = wfGetDB( DB_MASTER );
 
$verifyPairs = [
-   'ar_comment' => 'rev_comment',
'ar_user' => 'rev_user',
'ar_user_text' => 'rev_user_text',
'ar_timestamp' => 'rev_timestamp',
@@ -36,6 +40,15 @@
'ar_parent_id' => 'rev_parent_id',
'ar_sha1' => 'rev_sha1',
];
+   if ( $commentMigrationStage <= MIGRATION_WRITE_BOTH ) {
+   $verifyPairs['ar_comment'] = 'rev_comment';
+   }
+   if ( $commentMigrationStage >= MIGRATION_WRITE_BOTH ) {
+   $verifyPairs['ar_comment_id'] = 'revcomment_comment_id';
+   }
+   $revCommentStore = CommentStore::newKey( 'rev_comment' );
+   $commentQuery = $revCommentStore->getJoin();
+   $arCommentStore = CommentStore::newKey( 'ar_comment' );
 
while ( !feof( $f ) ) {
$line = fgets( $f );
@@ -57,8 +70,14 @@
$revId = $info['rev_id'];
 
$this->beginTransaction( $dbw, __METHOD__ );
-   $revRow = $dbw->selectRow( 'revision', '*', [ 'rev_id' 
=> $revId ],
-   __METHOD__, [ 'FOR UPDATE' ] );
+   $revRow = $dbw->selectRow(
+   [ 'revision' ] + $commentQuery['tables'],
+   [ $dbr->tableName( 'revision' ) . '.*' ] + 
$commentQuery['fields'],
+   [ 'rev_id' => $revId ],
+   __METHOD__,
+   [ 'FOR UPDATE' ],
+   $commentQuery['joins']
+   );
if ( !$revRow ) {
$this->error( "$revId: ERROR revision row has 
disappeared!" );
$this->commitTransaction( $dbw, __METHOD__ );
@@ -129,7 +148,6 @@
[
'ar_namespace'  => 
$info['log_namespace'],
'ar_title'  => 
$info['log_title'],
-   'ar_comment'=> 
$revRow->rev_comment,
'ar_user'   => 
$revRow->rev_user,
'ar_user_text'  => 
$revRow->rev_user_text,
'ar_timestamp'  => 
$revRow->rev_timestamp,
@@ -143,7 +161,7 @@
'ar_page_id'=> 
$revRow->rev_page,
'ar_deleted'=> 
$revRow->rev_deleted,
'ar_sha1'   => 
$revRow->rev_sha1,
-   ],
+   ] + $arCommentStore->insert( $dbw, 
$revCommentStore->getComment( $revRow ) ),
__METHOD__ );
$dbw->delete( 'revision', [ 'rev_id' => $revId 
], __METHOD__ );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I875640b2e78e3e8936d8f40292ac07519692c847
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Anomie 

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


  1   2   3   4   >