[MediaWiki-commits] [Gerrit] operations...production-images[master]: Makefile: make "clean" fault-tolerant

2017-09-19 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378953 )

Change subject: Makefile: make "clean" fault-tolerant
..


Makefile: make "clean" fault-tolerant

Change-Id: I5f4718037e29b63024d2e1d80f9c707749b419e9
---
M Makefile
1 file changed, 4 insertions(+), 4 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/Makefile b/Makefile
index a790203..2a49868 100644
--- a/Makefile
+++ b/Makefile
@@ -38,13 +38,13 @@
 clean-artifacts:
 ifeq ($(DOCKER), 1)
-docker rmi production-images-build:latest
-   rm production-image.created
+   -rm production-image.created
 endif
-   rm -rf .artifacts
+   -rm -rf .artifacts
 
 clean: clean-artifacts clean-dev
-   rm -rf .venv
-   rm -rf frozen-requirements.txt
+   -rm -rf .venv
+   -rm -rf frozen-requirements.txt
 
 clean-dev:
rm -rf .venv-dev

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f4718037e29b63024d2e1d80f9c707749b419e9
Gerrit-PatchSet: 1
Gerrit-Project: operations/docker-images/production-images
Gerrit-Branch: master
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations...production-images[master]: Fixes to the build script:

2017-09-19 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/378952 )

Change subject: Fixes to the build script:
..


Fixes to the build script:

* Change the working directory to the one where the Dockerfile template
  is located
* Allow defining apt options in the config (for things like proxies)

Change-Id: If1f3c3a765819f96798e4ad8de2fd5a60558a4ce
---
M build
M config.yaml
2 files changed, 41 insertions(+), 23 deletions(-)

Approvals:
  Giuseppe Lavagetto: Verified; Looks good to me, approved



diff --git a/build b/build
index a7b18c4..50c5dba 100755
--- a/build
+++ b/build
@@ -2,7 +2,7 @@
 import argparse
 import os
 
-from io import BytesIO
+from contextlib import contextmanager
 
 import docker
 import docker.errors
@@ -14,6 +14,14 @@
 known_images = {}
 
 
+@contextmanager
+def pushd(dirname):
+cur_dir = os.getcwd()
+os.chdir(dirname)
+yield
+os.chdir(cur_dir)
+
+
 def find_image_tag(image_name):
 if image_name not in known_images:
 print('WARNING: image {name} not found'.format(name=image_name))
@@ -22,22 +30,26 @@
 return "{}:{}".format(image.name, image.tag)
 
 
-def apt_install(pkgs):
-return """
-RUN apt-get update && \
-DEBIAN_FRONTEND=noninteractive \
-apt-get install --yes {packages} --no-install-recommends \
-&& apt-get clean && rm -rf /var/lib/apt/lists/* """.format(packages=pkgs)
+def apt_installer(opts):
+def apt_install(pkgs):
+return """
+RUN apt-get update \
+&& DEBIAN_FRONTEND=noninteractive \
+apt-get install {apt_options} --yes {packages} --no-install-recommends \
+&& apt-get clean && rm -rf /var/lib/apt/lists/* """.format(
+apt_options=opts,
+packages=pkgs
+)
+return apt_install
 
 
 class DockerImage(object):
 
-def __init__(self, path, config, base):
-if not base.endswith('/'):
-base += '/'
+def __init__(self, path, config):
+self.path = path
 env = Environment(loader=FileSystemLoader(path))
 env.filters['image_tag'] = find_image_tag
-env.filters['apt_install'] = apt_install
+env.filters['apt_install'] = apt_installer(config['apt_options'])
 self.tpl = env.get_template('Dockerfile.template')
 self.config = config
 with open(os.path.join(path, 'changelog'), 'rb') as fh:
@@ -53,17 +65,18 @@
 print('===')
 print(dockerfile)
 print('===')
-return BytesIO(bytes(dockerfile, 'utf8'))
+return dockerfile
 
 
 class DockerBuilder(object):
 
 def __init__(self, directory, configfile):
-self.base_directory = directory
+self.base_directory = os.path.join(os.getcwd(), directory)
 self.config = {
 'registry': 'docker-registry.wikimedia.org',
 'username': None, 'password': None,
-'seed_image': 'wikimedia-stretch'
+'seed_image': 'wikimedia-stretch:latest',
+'apt_options': '',
 }
 self.config.update(self._read_config(configfile))
 self.client = docker.from_env(version='auto')
@@ -84,7 +97,7 @@
 print(
 'Processing the dockerfile template in 
{base}'.format(base=root)
 )
-yield DockerImage(root, self.config, self.base_directory)
+yield DockerImage(root, self.config)
 
 def image_exists(self, image):
 try:
@@ -95,14 +108,19 @@
 
 def build(self, image):
 print('Building image {name}:{version}'.format(name=image.name, 
version=image.tag))
+print('Build context: {path}'.format(path=image.path))
 image_ref = "{name}:{tag}".format(name=image.name, tag=image.tag)
-self.client.images.build(
-fileobj=image.dockerfile,
-tag=image_ref,
-nocache=True,
-rm=True,
-pull=False,
-)
+with pushd(image.path):
+with open('Dockerfile', 'w') as fh:
+fh.write(image.dockerfile)
+self.client.images.build(
+path='.',
+tag=image_ref,
+nocache=True,
+rm=True,
+pull=False,
+)
+os.remove('Dockerfile')
 print("Image built.")
 fullname = os.path.join(self.config['registry'], image.name)
 for tag in [image.tag, 'latest']:
diff --git a/config.yaml b/config.yaml
index f75608c..fe1370b 100644
--- a/config.yaml
+++ b/config.yaml
@@ -1,2 +1,2 @@
 registry: docker-registry.wikimedia.org
-seed_image: wikimedia-jessie:latest
+seed_image: wikimedia-stretch:latest

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

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

[MediaWiki-commits] [Gerrit] mediawiki...GlobalCssJs[master]: Avoid using EditPage::$isCssJsSubpage and related variables

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379171 )

Change subject: Avoid using EditPage::$isCssJsSubpage and related variables
..

Avoid using EditPage::$isCssJsSubpage and related variables

These are being deprecated in Ie374a5cd4c9255b5.

Change-Id: I54b15fbc135090f7323bddc89febaee51a46b8a2
---
M GlobalCssJs.hooks.php
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/GlobalCssJs.hooks.php b/GlobalCssJs.hooks.php
index 8491a77..66724a7 100644
--- a/GlobalCssJs.hooks.php
+++ b/GlobalCssJs.hooks.php
@@ -118,16 +118,17 @@
$gcssjsConfig = self::getConfig()->get( 'GlobalCssJsConfig' );
$config = $output->getConfig();
$user = $output->getUser();
+   $title = $editPage->getTitle();
if ( $gcssjsConfig['wiki'] === wfWikiID() && $user->isLoggedIn()
-   && $editPage->formtype == 'initial' && 
$editPage->isCssJsSubpage
+   && $editPage->formtype == 'initial' && 
$title->isCssJsSubpage()
) {
$title = $editPage->getTitle();
$name = $user->getName();
-   if ( $config->get( 'AllowUserJs' ) && 
$editPage->isJsSubpage &&
+   if ( $config->get( 'AllowUserJs' ) && 
$title->isJsSubpage() &&
$title->getText() == $name . '/global.js'
) {
$msg = 'globalcssjs-warning-js';
-   } elseif ( $config->get( 'AllowUserCss' ) && 
$editPage->isCssSubpage &&
+   } elseif ( $config->get( 'AllowUserCss' ) && 
$title->isCssSubpage() &&
$title->getText() == $name . '/global.css'
) {
$msg = 'globalcssjs-warning-css';

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Deprecate public isCssJsSubpage related member var...

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379170 )

Change subject: EditPage: Deprecate public isCssJsSubpage related member 
variables
..

EditPage: Deprecate public isCssJsSubpage related member variables

Just use the functions directly.

Change-Id: Ie374a5cd4c9255b595ff4a88025738720434a802
---
M includes/EditPage.php
1 file changed, 25 insertions(+), 11 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 7750b10..267feb1 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -220,16 +220,28 @@
/** @var bool */
public $isConflict = false;
 
-   /** @var bool */
+   /**
+* @deprecated since 1.30 use Title::isCssJsSubpage()
+* @var bool
+*/
public $isCssJsSubpage = false;
 
-   /** @var bool */
+   /**
+* @deprecated since 1.30 use Title::isCssSubpage()
+* @var bool
+*/
public $isCssSubpage = false;
 
-   /** @var bool */
+   /**
+* @deprecated since 1.30 use Title::isJsSubpage()
+* @var bool
+*/
public $isJsSubpage = false;
 
-   /** @var bool */
+   /**
+* @deprecated since 1.30
+* @var bool
+*/
public $isWrongCaseCssJsPage = false;
 
/** @var bool New page or new section */
@@ -612,10 +624,11 @@
 
$this->isConflict = false;
// css / js subpages of user pages get a special treatment
+   // The following member variables are deprecated since 1.30,
+   // the functions should be used instead.
$this->isCssJsSubpage = $this->mTitle->isCssJsSubpage();
$this->isCssSubpage = $this->mTitle->isCssSubpage();
$this->isJsSubpage = $this->mTitle->isJsSubpage();
-   // @todo FIXME: Silly assignment.
$this->isWrongCaseCssJsPage = $this->isWrongCaseCssJsPage();
 
# Show applicable editing introductions
@@ -2768,7 +2781,7 @@
 
$out->addHTML( $this->editFormTextBeforeContent );
 
-   if ( !$this->isCssJsSubpage && $showToolbar && 
$user->getOption( 'showtoolbar' ) ) {
+   if ( !$this->mTitle->isCssJsSubpage() && $showToolbar && 
$user->getOption( 'showtoolbar' ) ) {
$out->addHTML( self::getEditToolbar( $this->mTitle ) );
}
 
@@ -3008,27 +3021,28 @@
);
}
} else {
-   if ( $this->isCssJsSubpage ) {
+   if ( $this->mTitle->isCssJsSubpage() ) {
# Check the skin exists
-   if ( $this->isWrongCaseCssJsPage ) {
+   if ( $this->isWrongCaseCssJsPage() ) {
$out->wrapWikiMsg(
"\n$1\n",
[ 'userinvalidcssjstitle', 
$this->mTitle->getSkinFromCssJsSubpage() ]
);
}
if ( $this->getTitle()->isSubpageOf( 
$user->getUserPage() ) ) {
+   $isCssSubpage = 
$this->mTitle->isCssSubpage();
$out->wrapWikiMsg( '$1',
-   $this->isCssSubpage ? 
'usercssispublic' : 'userjsispublic'
+   $isCssSubpage ? 
'usercssispublic' : 'userjsispublic'
);
if ( $this->formtype !== 'preview' ) {
-   if ( $this->isCssSubpage && 
$wgAllowUserCss ) {
+   if ( $isCssSubpage && 
$wgAllowUserCss ) {
$out->wrapWikiMsg(
"\n$1\n",
[ 
'usercssyoucanpreview' ]
);
}
 
-   if ( $this->isJsSubpage && 
$wgAllowUserJs ) {
+   if ( 
$this->mTitle->isJsSubpage() && $wgAllowUserJs ) {
$out->wrapWikiMsg(
"\n$1\n",
[ 
'userjsyoucanpreview' ]

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

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Remove call codeMirror.save()

2017-09-19 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379169 )

Change subject: Remove call codeMirror.save()
..

Remove call codeMirror.save()

codeMirror.toTextArea() already calls codeMirror.save().

Change-Id: Ifeb8c482149540832d6389a9337baffbf9ec03fb
---
M resources/ext.CodeMirror.js
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index d5d4c3e..2cf1099 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -334,7 +334,6 @@
if ( codeMirror ) {
scrollTop = codeMirror.getScrollInfo().top;
setCodeEditorPreference( false );
-   codeMirror.save();
codeMirror.toTextArea();
codeMirror = null;
$.fn.textSelection = origTextSelection;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifeb8c482149540832d6389a9337baffbf9ec03fb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Use ::class syntax

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379168 )

Change subject: Use ::class syntax
..

Use ::class syntax

Change-Id: I7ae3827b971022ada4073b617ec1b4beb8af5824
---
M includes/index/IndexContentHandler.php
M includes/page/PageContentHandler.php
2 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/includes/index/IndexContentHandler.php 
b/includes/index/IndexContentHandler.php
index 2b1f606..c8c64e9 100644
--- a/includes/index/IndexContentHandler.php
+++ b/includes/index/IndexContentHandler.php
@@ -123,8 +123,8 @@
 */
public function getActionOverrides() {
return [
-   'edit' => '\ProofreadPage\Index\IndexEditAction',
-   'submit' => '\ProofreadPage\Index\IndexSubmitAction'
+   'edit' => IndexEditAction::class,
+   'submit' => IndexSubmitAction::class,
];
}
 
@@ -132,7 +132,7 @@
 * @see ContentHandler::getDiffEngineClass
 */
protected function getDiffEngineClass() {
-   return '\ProofreadPage\Index\IndexDifferenceEngine';
+   return IndexDifferenceEngine::class;
}
 
/**
diff --git a/includes/page/PageContentHandler.php 
b/includes/page/PageContentHandler.php
index d86cf58..be7ab6b 100644
--- a/includes/page/PageContentHandler.php
+++ b/includes/page/PageContentHandler.php
@@ -205,9 +205,9 @@
 */
public function getActionOverrides() {
return [
-   'edit' => '\ProofreadPage\Page\PageEditAction',
-   'submit' => '\ProofreadPage\Page\PageSubmitAction',
-   'view' => '\ProofreadPage\Page\PageViewAction'
+   'edit' => PageEditAction::class,
+   'submit' => PageSubmitAction::class,
+   'view' => PageViewAction::class,
];
}
 
@@ -215,7 +215,7 @@
 * @see ContentHandler::getDiffEngineClass
 */
protected function getDiffEngineClass() {
-   return '\ProofreadPage\Page\PageDifferenceEngine';
+   return PageDifferenceEngine::class;
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ParserMigration[master]: MigrationEditPage: Avoid using wfMessage()

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379167 )

Change subject: MigrationEditPage: Avoid using wfMessage()
..

MigrationEditPage: Avoid using wfMessage()

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserMigration 
refs/changes/67/379167/1

diff --git a/includes/MigrationEditPage.php b/includes/MigrationEditPage.php
index d936caa..2480fff 100644
--- a/includes/MigrationEditPage.php
+++ b/includes/MigrationEditPage.php
@@ -39,8 +39,8 @@
$outputs[1]->setEditSectionTokens( false );
 
$previewHTML = "\n" .
-   "" . wfMessage( 'parsermigration-current' 
)->parse() . "\n" .
-   "" . wfMessage( 'parsermigration-new' )->parse() . 
"\n" .
+   "" . $this->context->msg( 'parsermigration-current' 
)->parse() . "\n" .
+   "" . $this->context->msg( 'parsermigration-new' 
)->parse() . "\n" .
"\n" .
"\n\n" .
$outputs[0]->getText() .

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Do not run tests that depend on curl if it is not loaded

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

Change subject: Do not run tests that depend on curl if it is not loaded
..


Do not run tests that depend on curl if it is not loaded

Bug: T176193
Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
---
M tests/phpunit/includes/http/HttpTest.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/includes/http/HttpTest.php 
b/tests/phpunit/includes/http/HttpTest.php
index 3693a27..3790e3a 100644
--- a/tests/phpunit/includes/http/HttpTest.php
+++ b/tests/phpunit/includes/http/HttpTest.php
@@ -497,6 +497,10 @@
 * @dataProvider provideCurlConstants
 */
public function testCurlConstants( $value ) {
+   if ( !extension_loaded( 'curl' ) ) {
+   $this->markTestSkipped( "PHP extension 'curl' is not 
loaded, skipping." );
+   }
+
$this->assertTrue( defined( $value ), $value . ' not defined' );
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia7b9b0196f800eb14463acc2a24df5ac1e48f3ed
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Huji 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Try to avoid using $wgTitle

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379166 )

Change subject: EditPage: Try to avoid using $wgTitle
..

EditPage: Try to avoid using $wgTitle

The most common code path is from EditAction, so make sure
EditPage::setContextTitle() is called in that case.

Log any uses that fallback to $wgTitle in the GlobalTitleFail log group.

Bug: T144366
Change-Id: Ie6c7dfbaa432239389d210051372427b8fa045b4
---
M includes/EditPage.php
M includes/actions/EditAction.php
2 files changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/379166/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 6bcf293..7750b10 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -469,6 +469,10 @@
 */
public function getContextTitle() {
if ( is_null( $this->mContextTitle ) ) {
+   wfDebugLog(
+   'GlobalTitleFail',
+   __METHOD__ . ' called by ' . wfGetAllCallers( 5 
) . ' with no title set.'
+   );
global $wgTitle;
return $wgTitle;
} else {
diff --git a/includes/actions/EditAction.php b/includes/actions/EditAction.php
index acfd72e..f0bc8bf 100644
--- a/includes/actions/EditAction.php
+++ b/includes/actions/EditAction.php
@@ -56,6 +56,7 @@
 
if ( Hooks::run( 'CustomEditor', [ $page, $user ] ) ) {
$editor = new EditPage( $page );
+   $editor->setContextTitle( $this->getTitle() );
$editor->edit();
}
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEve...

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

Change subject: EditPage::getCheckboxes: Stop respecting 
wgUseMediaWikiUIEverywhere
..


EditPage::getCheckboxes: Stop respecting wgUseMediaWikiUIEverywhere

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

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 12966e5..248378c 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4185,8 +4185,6 @@
 * @return array
 */
public function getCheckboxes( &$tabindex, $checked ) {
-   global $wgUseMediaWikiUIEverywhere;
-
$checkboxes = [];
$checkboxesDef = $this->getCheckboxesDefinition( $checked );
 
@@ -4220,10 +4218,6 @@
Xml::check( $name, $options['default'], 
$attribs ) .
'' .
Xml::tags( 'label', $labelAttribs, $label );
-
-   if ( $wgUseMediaWikiUIEverywhere ) {
-   $checkboxHtml = Html::rawElement( 'div', [ 
'class' => 'mw-ui-checkbox' ], $checkboxHtml );
-   }
 
$checkboxes[ $legacyName ] = $checkboxHtml;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie61c523290c0eef324870f82a90fa852a57aac23
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
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] oojs/ui[master]: Remove vars covered by WikimediaUI Base

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379165 )

Change subject: Remove vars covered by WikimediaUI Base
..

Remove vars covered by WikimediaUI Base

Remove vars already covered by WikimediaUI Base and rename
`opacity--disabled` to `opacity-base--disabled` in the course.

Bug: T165650
Change-Id: I875cd6aa8797324af4431089519ddac966287b88
---
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/elements.less
M src/themes/wikimediaui/widgets.less
3 files changed, 8 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/379165/1

diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index 46babdd..3e498d0 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -25,7 +25,6 @@
 // Disabled Widgets
 @background-color-base--disabled: #eaecf0;
 @background-color-filled--disabled: #c8ccd1;
-@opacity--disabled: 0.51; // `0.51` equals `#7d7d7d` on background-color 
`#fff`, HSB 0°/0%/49%
 @opacity-filled--disabled: 1;
 @opacity-indicator--disabled: 0.15; // equals `#c7c8cc` on background-color 
`#fff`
 @opacity-tool--disabled: 0.34; // equals `#a9a9a9` on background-color `#fff`
@@ -140,8 +139,6 @@
 @padding-start-menu-icon-label: 38 / @oo-ui-font-size-browser / 
@oo-ui-font-size-base;
 @padding-end-tagitem-close: 21 / @oo-ui-font-size-browser / 
@oo-ui-font-size-base; // equals `1.640625em`≈`21px`;
 
-@box-shadow-dialog: 0 2px 2px 0 rgba( 0, 0, 0, 0.25 );
-@box-shadow-menu: @box-shadow-dialog;
 @box-shadow-toolbar-top: 0 1px 1px 0 rgba( 0, 0, 0, 0.1 );
 @box-shadow-toolbar-bottom: 0 -1px 1px 0 rgba( 0, 0, 0, 0.1 );
 @box-shadow-widget: inset 0 0 0 1px transparent;
@@ -151,7 +148,6 @@
 @box-shadow-action--focus: @box-shadow-widget--focus, 0 0 0 1px 
@color-progressive;
 @box-shadow-input-binary--active: inset 0 0 0 1px @color-progressive--active;
 @box-shadow-erroneous--focus: inset 0 0 0 1px @color-erroneous;
-@box-shadow-filled--disabled: inset 0 0 0 1px @color-filled--disabled;
 
 @font-size-fieldset-header: 1.15em; // equals `16.1px` at base `font-size: 
12.8px`. Todo: Not able to get unified `16px` due to T
 
@@ -163,10 +159,6 @@
 @line-height-widget-multiline: 1.275;
 @line-height-widget-singleline: 1.172em; // Firefox needs a value, Chrome the 
unit; equals `15px` at base `font-size: 12.8px`
 @line-height-tagmultiselect-input: 1.563em; // equals `20px` at base 
`font-size: 12.8px`
-
-@opacity-icon-base: 0.87; // equals `#222` on background-color `#fff`
-@opacity-icon-base--hover: 0.73; // equals `#454545` on background-color 
`#fff`, closest to `#444`
-@opacity-icon-base--selected: 1;
 
 // Transition variables
 // Some of these values are duplicated in OO.ui.WikimediaUITheme
diff --git a/src/themes/wikimediaui/elements.less 
b/src/themes/wikimediaui/elements.less
index 6b7e967..237244f 100644
--- a/src/themes/wikimediaui/elements.less
+++ b/src/themes/wikimediaui/elements.less
@@ -260,7 +260,7 @@
 
> .oo-ui-iconElement-icon,
> .oo-ui-indicatorElement-indicator {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
}
}
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index 4a9bed7..ad8973d 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -314,7 +314,7 @@
background-color: @background-color-base--disabled;
 
> .oo-ui-iconElement-icon {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
 
> .oo-ui-indicatorElement-indicator {
@@ -550,7 +550,7 @@
&.oo-ui-widget-disabled {
.oo-ui-iconElement-icon,
.oo-ui-indicatorElement-indicator {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
}
 }
@@ -744,7 +744,7 @@
line-height: 2.5;
 
&.oo-ui-widget-disabled {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
 }
 
@@ -753,7 +753,7 @@
margin: @size-indicator / 2;
 
&.oo-ui-widget-disabled {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
 }
 
@@ -1477,7 +1477,7 @@
text-shadow: @text-shadow-base--disabled;
 
> .oo-ui-iconElement-icon {
-   opacity: @opacity--disabled;
+   opacity: @opacity-base--disabled;
}
 
> .oo-ui-indicatorElement-indicator {
@@ 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: test_search_where_title: Also look into redirect titles

2017-09-19 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379164 )

Change subject: test_search_where_title: Also look into redirect titles
..

test_search_where_title: Also look into redirect titles

Bug: T176297
Change-Id: If75126526aaec6408462b500ca828d2e0bb96333
---
M tests/site_tests.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/64/379164/1

diff --git a/tests/site_tests.py b/tests/site_tests.py
index 996389d..3adc9ee 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -1487,7 +1487,11 @@
 get_redirects=True, where='title'):
 self.assertIsInstance(hit, pywikibot.Page)
 self.assertEqual(hit.namespace(), 0)
-self.assertIn('wiki', hit.title().lower())
+try:
+self.assertIn('wiki', hit.title().lower())
+except AssertionError:
+self.assertTrue(any('wiki' in r.title().lower() for r in
+hit.getReferences(redirectsOnly=True)))
 except pywikibot.data.api.APIError as e:
 if e.code in ('search-title-disabled', 'gsrsearch-title-disabled'):
 raise unittest.SkipTest(

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Don't use $wgRequest

2017-09-19 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379163 )

Change subject: EditPage: Don't use $wgRequest
..

EditPage: Don't use $wgRequest

Bug: T144366
Change-Id: I392e165a6ba3c913ce6e415dbfcfb3cd51178a4e
---
M includes/EditPage.php
1 file changed, 22 insertions(+), 23 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 12966e5..ca19e3e 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -527,7 +527,6 @@
 * the newly-edited page.
 */
public function edit() {
-   global $wgRequest;
// Allow extensions to modify/prevent this form or submission
if ( !Hooks::run( 'AlternateEdit', [ $this ] ) ) {
return;
@@ -535,13 +534,14 @@
 
wfDebug( __METHOD__ . ": enter\n" );
 
+   $request = $this->context->getRequest();
// If they used redlink=1 and the page exists, redirect to the 
main article
-   if ( $wgRequest->getBool( 'redlink' ) && 
$this->mTitle->exists() ) {
+   if ( $request->getBool( 'redlink' ) && $this->mTitle->exists() 
) {
$this->context->getOutput()->redirect( 
$this->mTitle->getFullURL() );
return;
}
 
-   $this->importFormData( $wgRequest );
+   $this->importFormData( $request );
$this->firsttime = false;
 
if ( wfReadOnly() && $this->save ) {
@@ -700,10 +700,8 @@
 * @throws PermissionsError
 */
protected function displayPermissionsError( array $permErrors ) {
-   global $wgRequest;
-
$out = $this->context->getOutput();
-   if ( $wgRequest->getBool( 'redlink' ) ) {
+   if ( $this->context->getRequest()->getBool( 'redlink' ) ) {
// The edit page was reached via a red link.
// Redirect to the article page and let them click the 
edit tab if
// they really want a permission error.
@@ -785,17 +783,18 @@
 * @return bool
 */
protected function previewOnOpen() {
-   global $wgRequest, $wgPreviewOnOpenNamespaces;
-   if ( $wgRequest->getVal( 'preview' ) == 'yes' ) {
+   global $wgPreviewOnOpenNamespaces;
+   $request = $this->context->getRequest();
+   if ( $request->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
return true;
-   } elseif ( $wgRequest->getVal( 'preview' ) == 'no' ) {
+   } elseif ( $request->getVal( 'preview' ) == 'no' ) {
// Explicit override from request
return false;
} elseif ( $this->section == 'new' ) {
// Nothing *to* preview for new sections
return false;
-   } elseif ( ( $wgRequest->getVal( 'preload' ) !== null || 
$this->mTitle->exists() )
+   } elseif ( ( $request->getVal( 'preload' ) !== null || 
$this->mTitle->exists() )
&& $this->context->getUser()->getOption( 
'previewonfirst' )
) {
// Standard preference behavior
@@ -1120,11 +1119,12 @@
 * @since 1.21
 */
protected function getContentObject( $def_content = null ) {
-   global $wgRequest, $wgContLang;
+   global $wgContLang;
 
$content = false;
 
$user = $this->context->getUser();
+   $request = $this->context->getRequest();
// For message page not locally set, use the i18n message.
// For other non-existent articles, use preload text if any.
if ( !$this->mTitle->exists() || $this->section == 'new' ) {
@@ -1136,10 +1136,10 @@
}
if ( $content === false ) {
# If requested, preload some text.
-   $preload = $wgRequest->getVal( 'preload',
+   $preload = $request->getVal( 'preload',
// Custom preload text for new sections
$this->section === 'new' ? 
'MediaWiki:addsection-preload' : '' );
-   $params = $wgRequest->getArray( 
'preloadparams', [] );
+   $params = $request->getArray( 'preloadparams', 
[] );
 
$content = $this->getPreloadedContent( 
$preload, $params );
}
@@ -1154,8 +1154,8 @@
$content = $def_content;
 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Restrict `opacity` to non-flagged icons only

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379162 )

Change subject: demos: Restrict `opacity` to non-flagged icons only
..

demos: Restrict `opacity` to non-flagged icons only

Also make opacity follow base text color.

Change-Id: I60532da11bcb52de314dc7f750c192839b0f31f6
---
M demos/styles/demo.css
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/62/379162/1

diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index 76cebb1..a3837b5 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -281,9 +281,9 @@
margin-right: 0;
 }
 
-.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement,
+.demo-icons .oo-ui-fieldLayout .oo-ui-iconElement:not( 
.oo-ui-image-progressive ):not( .oo-ui-image-destructive ),
 .demo-icons .oo-ui-fieldLayout .oo-ui-indicatorElement {
-   opacity: 0.8; /* brings icons/indicators closer to text color */
+   opacity: 0.87; /* brings icons/indicators closer to text color */
 }
 
 .demo-icons .oo-ui-fieldLayout:hover .oo-ui-labelElement-label {
@@ -291,7 +291,7 @@
 }
 .demo-icons .oo-ui-fieldLayout:hover .oo-ui-iconElement,
 .demo-icons .oo-ui-fieldLayout:hover .oo-ui-indicatorElement {
-   opacity: 1;
+   opacity: 1 !important; /* stylelint-disable-line 
declaration-no-important */
 }
 
 /* Widgets demo */

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update Omnimail Recipient.load to support offset & limit

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379161 )

Change subject: Update Omnimail Recipient.load to support offset & limit
..

Update Omnimail Recipient.load to support offset & limit

Change-Id: Iecf88cd36b0cd2a0d12e9eb5093cc0f6ffb32d66
---
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/api/v3/Omnirecipient/Load.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/tests/phpunit/OmnirecipientLoadTest.php
5 files changed, 76 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/61/379161/1

diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
index e58be97..bf2077b 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
@@ -46,11 +46,8 @@
 $startTimestamp = self::getStartTimestamp($params, $this->jobSettings);
 $this->endTimeStamp = 
self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, 
$startTimestamp);
 
-if (isset($this->jobSettings['retrieval_parameters'])) {
-  if (!empty($params['end_date']) || !empty($params['start_date'])) {
-throw new API_Exception('A prior retrieval is in progress. Do not pass 
in dates to complete a retrieval');
-  }
-  
$request->setRetrievalParameters($this->jobSettings['retrieval_parameters']);
+if ($this->getRetrievalParameters()) {
+  $request->setRetrievalParameters($this->getRetrievalParameters());
 }
 elseif ($startTimestamp) {
   $request->setStartTimeStamp($startTimestamp);
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
index 72aba34..981a757 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
@@ -45,10 +45,19 @@
* CRM_Omnimail_Omnimail constructor.
*
* @param array $params
+   *
+   * @throws \API_Exception
*/
   public function __construct($params) {
 $this->setJobSettings($params);
 $this->setOffset($params);
+
$this->setRetrievalParameters(CRM_Utils_Array::value('retrieval_parameters', 
$this->jobSettings));
+
+if ($this->getRetrievalParameters()) {
+  if (!empty($params['end_date']) || !empty($params['start_date'])) {
+throw new API_Exception('A prior retrieval is in progress. Do not pass 
in dates to complete a retrieval');
+  }
+}
   }
 
   /**
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
index 24a7c36..f03cb21 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
@@ -37,15 +37,13 @@
 
 /** @var Omnimail\Silverpop\Requests\RawRecipientDataExportRequest 
$request */
 $request = Omnimail::create($params['mail_provider'], 
$mailerCredentials)->getRecipients();
+$request->setOffset($this->offset);
 
 $startTimestamp = self::getStartTimestamp($params, $this->jobSettings);
 $this->endTimeStamp = 
self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, 
$startTimestamp);
 
-if (isset($this->jobSettings['retrieval_parameters'])) {
-  if (!empty($params['end_date']) || !empty($params['start_date'])) {
-throw new API_Exception('A prior retrieval is in progress. Do not pass 
in dates to complete a retrieval');
-  }
-  
$request->setRetrievalParameters($this->jobSettings['retrieval_parameters']);
+if ($this->getRetrievalParameters()) {
+  $request->setRetrievalParameters($this->getRetrievalParameters());
 }
 elseif ($startTimestamp) {
   if ($this->endTimeStamp < $startTimestamp) {
@@ -56,6 +54,7 @@
 }
 
 $result = $request->getResponse();
+$this->setRetrievalParameters($result->getRetrievalParameters());
 for ($i = 0; $i < $settings['omnimail_job_retry_number']; $i++) {
   if ($result->isCompleted()) {
 $data = $result->getData();
@@ -66,7 +65,7 @@
   }
 }
 throw new CRM_Omnimail_IncompleteDownloadException('Download incomplete', 
0, 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Improve populateIpChanges.php reporting

2017-09-19 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379160 )

Change subject: Improve populateIpChanges.php reporting
..

Improve populateIpChanges.php reporting

Instead of just the rows we attempted to insert, also count
actually inserted ones.

Change-Id: Ie747cb41873640776281794a90dbe3b6b8e3fa84
---
M maintenance/populateIpChanges.php
1 file changed, 6 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/60/379160/1

diff --git a/maintenance/populateIpChanges.php 
b/maintenance/populateIpChanges.php
index f7bcc12..2b2a2b4 100644
--- a/maintenance/populateIpChanges.php
+++ b/maintenance/populateIpChanges.php
@@ -72,7 +72,8 @@
? $maxRevId
: $dbw->selectField( 'revision', 'MAX(rev_id)', false, 
__METHOD__ );
$blockStart = $start;
-   $revCount = 0;
+   $attempted = 0;
+   $inserted = 0;
 
$this->output( "Copying IP revisions to ip_changes, from rev_id 
$start to rev_id $end\n" );
 
@@ -105,7 +106,7 @@
'ipc_hex' => IP::toHex( 
$row->rev_user_text ),
];
 
-   $revCount++;
+   $attempted++;
}
}
 
@@ -116,13 +117,15 @@
'IGNORE'
);
 
+   $inserted += $dbw->affectedRows();
+
$lbFactory->waitForReplication();
usleep( $throttle * 1000 );
 
$blockStart = $blockEnd + 1;
}
 
-   $this->output( "$revCount IP revisions copied.\n" );
+   $this->output( "Attempted to insert $attempted IP revisions, 
$inserted actually done.\n" );
 
return true;
}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: [WIP] Add cclike operator to normalize and compare a string ...

2017-09-19 Thread Dmaza (Code Review)
Dmaza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379159 )

Change subject: [WIP] Add cclike operator to normalize and compare a string to 
a list
..

[WIP] Add cclike operator to normalize and compare a string to a list

cclike operator will normalize the left operand and compare against
the normalized version of each of the elements in the right operand

Bug: T65242
Change-Id: I4034c0054a6849babbf2d96ea13dc97d3660d5b4
---
M i18n/en.json
M includes/AbuseFilter.class.php
M includes/parser/AFPData.php
M includes/parser/AbuseFilterParser.php
M includes/parser/AbuseFilterTokenizer.php
A tests/parserTests/cclike.r
A tests/parserTests/cclike.t
7 files changed, 33 insertions(+), 3 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 0d32b9f..b526401 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -220,6 +220,7 @@
"abusefilter-edit-builder-misc-stringlit": "String literal (\"\")",
"abusefilter-edit-builder-misc-tern": "Ternary operator (X ? Y : Z)",
"abusefilter-edit-builder-misc-cond": "Conditional (if X then Y else 
Z)",
+   "abusefilter-edit-builder-misc-cclike": "Normalize string and compare 
against list",
"abusefilter-edit-builder-group-funcs": "Functions",
"abusefilter-edit-builder-funcs-length": "String length (length)",
"abusefilter-edit-builder-funcs-lcase": "To lower case (lcase)",
diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index 3ce5cdb..6eac7db 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -56,6 +56,7 @@
],
'misc' => [
'in' => 'in',
+   'cclike' => 'cclike',
'contains' => 'contains',
'like' => 'like',
'""' => 'stringlit',
diff --git a/includes/parser/AFPData.php b/includes/parser/AFPData.php
index d5a0069..66f6a5e 100644
--- a/includes/parser/AFPData.php
+++ b/includes/parser/AFPData.php
@@ -156,6 +156,31 @@
}
 
/**
+* Normalizes operands and compares if they are equal
+*
+* @param $a AFPData
+* @param $b AFPData
+* @return AFPData
+*/
+   public static function keywordCclike( $a, $b ) {
+   $a = $a->toString();
+   $b = $b->toList();
+
+   if ( $a == '' || !$b ) {
+   return new AFPData( self::DBOOL, false );
+   }
+
+   $a = AbuseFilterParser::ccnorm( $a );
+   foreach ( $b as $val ) {
+   if ( $a === AbuseFilterParser::ccnorm( $val->toString() 
) ) {
+   return new AFPData( self::DBOOL, true );
+   }
+   }
+
+   return new AFPData( self::DBOOL, false );
+   }
+
+   /**
 * @param $a AFPData
 * @param $b AFPData
 * @return AFPData
diff --git a/includes/parser/AbuseFilterParser.php 
b/includes/parser/AbuseFilterParser.php
index f9bd15b..e94732f 100644
--- a/includes/parser/AbuseFilterParser.php
+++ b/includes/parser/AbuseFilterParser.php
@@ -48,7 +48,8 @@
'contains' => 'keywordContains',
'rlike' => 'keywordRegex',
'irlike' => 'keywordRegexInsensitive',
-   'regex' => 'keywordRegex'
+   'regex' => 'keywordRegex',
+   'cclike' => 'keywordCclike'
];
 
public static $funcCache = [];
@@ -1105,7 +1106,7 @@
 * @param $s
 * @return mixed
 */
-   protected function ccnorm( $s ) {
+   public static function ccnorm( $s ) {
if ( is_callable( 'AntiSpoof::normalizeString' ) ) {
$s = AntiSpoof::normalizeString( $s );
} else {
diff --git a/includes/parser/AbuseFilterTokenizer.php 
b/includes/parser/AbuseFilterTokenizer.php
index 025314e..0ce1969 100644
--- a/includes/parser/AbuseFilterTokenizer.php
+++ b/includes/parser/AbuseFilterTokenizer.php
@@ -54,7 +54,7 @@
 
public static $keywords = [
'in', 'like', 'true', 'false', 'null', 'contains', 'matches',
-   'rlike', 'irlike', 'regex', 'if', 'then', 'else', 'end',
+   'rlike', 'irlike', 'regex', 'if', 'then', 'else', 'end', 
'cclike',
];
 
/**
diff --git a/tests/parserTests/cclike.r b/tests/parserTests/cclike.r
new file mode 100644
index 000..4736e08
--- /dev/null
+++ b/tests/parserTests/cclike.r
@@ -0,0 +1 @@
+MATCH
diff --git a/tests/parserTests/cclike.t b/tests/parserTests/cclike.t
new file mode 100644
index 000..70646cd
--- /dev/null
+++ b/tests/parserTests/cclike.t
@@ -0,0 +1 @@
+"4any0ne" cclike ["FOO", "AANYONE"]

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update Omnimail vendor dir to support offset on recipients.

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379158 )

Change subject: Update Omnimail vendor dir to support offset on recipients.
..

Update Omnimail vendor dir to support offset on recipients.

Bug: T176255
Change-Id: If69008533ea2fd41a8f5b9b0c45ed6868389d0a8
---
M composer.lock
M sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/58/379158/1

diff --git a/composer.lock b/composer.lock
index 9ed29b5..d8d5255 100644
--- a/composer.lock
+++ b/composer.lock
@@ -2153,7 +2153,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "313ef51cc3990238438f5dc5207b25cb132ea131"
+"reference": "288f2602952468a4fd5874b11b1bd8da5b0dfb7b"
 },
 "require": {
 "league/csv": "^8.0",
@@ -2192,7 +2192,7 @@
 "omnimail",
 "silverpop"
 ],
-"time": "2017-09-12T23:04:53+00:00"
+"time": "2017-09-20 02:50:06"
 },
 {
 "name": "wikimedia/smash-pig",
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock
index b7d59a5..4289602 100644
--- a/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock
+++ b/sites/default/civicrm/extensions/org.wikimedia.omnimail/composer.lock
@@ -707,7 +707,7 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/eileenmcnaughton/omnimail-silverpop.git;,
-"reference": "313ef51cc3990238438f5dc5207b25cb132ea131"
+"reference": "288f2602952468a4fd5874b11b1bd8da5b0dfb7b"
 },
 "require": {
 "league/csv": "^8.0",
@@ -746,7 +746,7 @@
 "omnimail",
 "silverpop"
 ],
-"time": "2017-09-19 01:57:49"
+"time": "2017-09-20 02:50:06"
 }
 ],
 "packages-dev": [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Change progressive action to full opacity

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379157 )

Change subject: Change progressive action to full opacity
..

Change progressive action to full opacity

Changing progressive icon signified action over to align to
OOUI icon behavior.

Change-Id: I0d338aa2dea0e25d992f04fb5c9072b66689e5c9
---
M modules/styles/board/topic/watchlist.less
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/modules/styles/board/topic/watchlist.less 
b/modules/styles/board/topic/watchlist.less
index 185b058..a1cc833 100644
--- a/modules/styles/board/topic/watchlist.less
+++ b/modules/styles/board/topic/watchlist.less
@@ -61,6 +61,10 @@
}
}
 
+   .flow-unwatch.mw-ui-icon-unStar-progressive {
+   opacity: 1;
+   }
+
// Correct positioning for ltr/rtl content direction
.mw-content-ltr & {
/* @noflip */

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align added to watchlist tooltip to style guide and replace ...

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

Change subject: Align added to watchlist tooltip to style guide and replace 
deprecated icon
..


Align added to watchlist tooltip to style guide and replace deprecated icon

Aligning “This topic has been added to your watchlist.” tooltip to
style guide by:
- removing `opacity` of tooltip
- aligning `padding` with popups elsewhere
- limiting icon size to `32px` as it shouldn't be bigger than f.e.
“Browse topics” icon and
- aligning `box-shadow`.

Also exchanging deprecated 'watchlist' icon with 'unStar' icon &
using `strong` instead of CSS in preparation of screenreader usage.

Bug: T176296
Depends-on: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f
Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf
---
M handlebars/flow_subscribed.partial.handlebars
M modules/styles/board/topic/titlebar.less
M modules/styles/mediawiki.ui/tooltips.less
3 files changed, 24 insertions(+), 16 deletions(-)

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



diff --git a/handlebars/flow_subscribed.partial.handlebars 
b/handlebars/flow_subscribed.partial.handlebars
index 26a5947..cacf489 100644
--- a/handlebars/flow_subscribed.partial.handlebars
+++ b/handlebars/flow_subscribed.partial.handlebars
@@ -1,7 +1,9 @@
-
+
 
-   {{!-- flow-topic-notification-subscribe-title and 
flow-board-notification-subscribe-title --}}
-   {{l10n (concat "flow-" type "-notification-subscribe-title") user }}
+   
+   {{!-- flow-topic-notification-subscribe-title and 
flow-board-notification-subscribe-title --}}
+   {{l10n (concat "flow-" type "-notification-subscribe-title") 
user }}
+   
 
 
{{!-- flow-topic-notification-subscribe-description and 
flow-board-notification-subscribe-description --}}
diff --git a/modules/styles/board/topic/titlebar.less 
b/modules/styles/board/topic/titlebar.less
index 0097310..fb7ffc3 100644
--- a/modules/styles/board/topic/titlebar.less
+++ b/modules/styles/board/topic/titlebar.less
@@ -94,17 +94,25 @@
 .flow-notification-tooltip-topicsub {
width: 15em;
 }
-.flow-notification-tooltip-icon {
-   font-size: 2.5em;
-   text-align: center;
 
+.flow-notification-tooltip-icon {
.mw-ui-icon {
-   display: inline-block;
+   display: block;
+   margin-left: auto;
+   margin-right: auto;
+
+   &.mw-ui-icon-star { // Overwrite default `.mw-ui-icon` 
properties
+   min-width: 32px;
+   width: 32px;
+   max-width: 32px;
+   min-height: 32px;
+   font-size: 32px;
+   line-height: 1;
+   }
}
 }
 .flow-notification-tooltip-title {
font-size: 1em;
-   font-weight: bold;
 }
 
 .flow-undo {
diff --git a/modules/styles/mediawiki.ui/tooltips.less 
b/modules/styles/mediawiki.ui/tooltips.less
index 01f3dfa..9259ee2 100644
--- a/modules/styles/mediawiki.ui/tooltips.less
+++ b/modules/styles/mediawiki.ui/tooltips.less
@@ -16,16 +16,16 @@
 Styleguide 4.0.
  */
 .flow-ui-tooltip {
+   background-color: #fff;
+   color: @colorText;
position: relative;
top: 1px;
display: inline-block;
-   padding: 0.5em;
-   background: #fff;
-   color: @colorText;
-   word-wrap: break-word;
border-radius: @borderRadius;
-   .box-shadow( ~'0 2px 0 0 @{colorGray12}, 0 0 1px 0 @{colorGray12}' );
-   opacity: 0.9;
+   padding: 0.571em 0.857em; // equals to ~8px ~12px with base `font-size`
+   .box-shadow( ~'0 2px 2px 0 rgba(0, 0, 0, 0.25)' );
+   font-size: 0.875em; // not inherited from div#bodyContent, as we insert 
at body
+   word-wrap: break-word;
z-index: 99;
 
a {
@@ -34,8 +34,6 @@
color: #fff !important; /* stylelint-disable-line 
declaration-no-important */
font-weight: bold;
}
-
-   font-size: 0.875em; // not inherited from div#bodyContent, as we insert 
at body
 
#bodyContent & { /* stylelint-disable-line selector-no-id */
font-size: 1em;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align icon opacity to text color

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

Change subject: Align icon opacity to text color
..


Align icon opacity to text color

Similar to OOUI, we're aligning icon opacity of black
SVGs to be close to base text color of `#222`.

Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f
---
M modules/styles/common.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/styles/common.less b/modules/styles/common.less
index 7a69551..6e34c40 100644
--- a/modules/styles/common.less
+++ b/modules/styles/common.less
@@ -303,7 +303,7 @@
 /* stylelint-enable selector-no-id */
 
 span.mw-ui-icon {
-   opacity: 0.7;
+   opacity: 0.87; // equals `#222` on background-color `#fff`
 }
 
 span.mw-ui-icon.mw-ui-icon-before:before {

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Minor refactor on Omnimail classes.

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379156 )

Change subject: Minor refactor on Omnimail classes.
..

Minor refactor on Omnimail classes.

These classes have gotten a bit out of sync / duplicatey.

This is a minor commit to add a constructor & to start doing shared wrangling
in the constructor. Preliminary to changes to support offset.

Bug: T176255
Change-Id: I1974f8b2bc41ea2f1fd708cb8a365d0921395c74
---
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
M 
sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnirecipients.php
3 files changed, 65 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/56/379156/1

diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
index 3e8c48f..e58be97 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnigroupmembers.php
@@ -31,7 +31,6 @@
* @throws \API_Exception
*/
   public function getResult($params) {
-$jobSettings = self::getJobSettings($params);
 $settings = CRM_Omnimail_Helper::getSettings();
 
 $mailerCredentials = CRM_Omnimail_Helper::getCredentials($params);
@@ -40,23 +39,18 @@
   $jobParameters['exportType'] = 'OPT_IN';
 }
 
+/* @var \Omnimail\Silverpop\Requests\ExportListRequest $request */
 $request = Omnimail::create($params['mail_provider'], 
$mailerCredentials)->getGroupMembers($jobParameters);
-$offset = CRM_Utils_Array::value('offset', $jobSettings, 0);
-if (isset($params['options']['offset'])) {
-  $offset = $params['options']['offset'];
-}
-if ($offset) {
-  $request->setOffset((int) $offset);
-}
+$request->setOffset((int) $this->offset);
 
-$startTimestamp = self::getStartTimestamp($params, $jobSettings);
+$startTimestamp = self::getStartTimestamp($params, $this->jobSettings);
 $this->endTimeStamp = 
self::getEndTimestamp(CRM_Utils_Array::value('end_date', $params), $settings, 
$startTimestamp);
 
-if (isset($jobSettings['retrieval_parameters'])) {
+if (isset($this->jobSettings['retrieval_parameters'])) {
   if (!empty($params['end_date']) || !empty($params['start_date'])) {
 throw new API_Exception('A prior retrieval is in progress. Do not pass 
in dates to complete a retrieval');
   }
-  $request->setRetrievalParameters($jobSettings['retrieval_parameters']);
+  
$request->setRetrievalParameters($this->jobSettings['retrieval_parameters']);
 }
 elseif ($startTimestamp) {
   $request->setStartTimeStamp($startTimestamp);
@@ -129,6 +123,5 @@
 }
 return $value;
   }
-
 
 }
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
index 04a548f..6712965 100644
--- 
a/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.omnimail/CRM/Omnimail/Omnimail.php
@@ -26,11 +26,30 @@
*/
   public $endTimeStamp;
 
+  /**
+   * @var int
+   */
+  protected $offset;
+
+  /**
+   * @var array
+   */
+  protected $jobSettings = array();
 
   /**
* @var array
*/
   protected $retrievalParameters;
+
+  /**
+   * CRM_Omnimail_Omnimail constructor.
+   *
+   * @param array $params
+   */
+  public function __construct($params) {
+$this->setJobSettings($params);
+$this->setOffset($params);
+  }
 
   /**
* @return array
@@ -95,9 +114,42 @@
* @return array
*/
   public function getJobSettings($params) {
+if (empty($this->jobSettings)) {
+  $this->setJobSettings($params);
+}
+return $this->jobSettings;
+  }
+
+  /**
+   * @return int
+   */
+  public function getOffset() {
+return $this->offset;
+  }
+
+  /**
+   * Set the offset to start loading from.
+   *
+   * This is the row in the csv file to start from in csv jobs.
+   *
+   * @param array $params
+   * @param \Omnimail\Silverpop\Requests\SilverpopBaseRequest $request
+   *
+   * @return mixed
+   */
+  protected function setOffset($params, $request) {
+$this->offset = CRM_Utils_Array::value('offset', $this->jobSettings, 0);
+if (isset($params['options']['offset'])) {
+  $this->offset = $params['options']['offset'];
+}
+  }
+
+  /**
+   * @param $params
+   */
+  protected function setJobSettings($params) {
 $settings = CRM_Omnimail_Helper::getSettings();
-$jobSettings = CRM_Utils_Array::value($params['mail_provider'], 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't remove mw-changeslist-line-prefix in enhanc...

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

Change subject: RCFilters: Don't remove mw-changeslist-line-prefix in enhanced 
mode
..


RCFilters: Don't remove mw-changeslist-line-prefix in enhanced mode

It contains the 'x' buttons to unwatch pages when the relevant
preference is enabled, so we shouldn't remove it.

To make the table still work, we have to add an extra 
to the nested rows, and start the highlight one row later.

Bug: T176264
Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504
---
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
2 files changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
index b4e3b0e..6c8ebac 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.mixins.less
@@ -51,7 +51,7 @@
.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 ) ) {
+   .mw-rcfilters-ui-changesListWrapperWidget 
tr&.mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested:not(.mw-rcfilters-ui-changesListWrapperWidget-enhanced-grey)
 td:not( :nth-child( -n+4 ) ) {
background-color: @bgcolor;
}
 }
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
index f331f75..b0550b2 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
@@ -312,14 +312,17 @@
);
 
// We are adding and changing cells in a table that, 
despite having nested rows,
-   // is actually all one big table. To do that right, we 
want to remove the 'placeholder'
-   // cell from the top row, because we're actually adding 
that placeholder in the children
-   // with the highlights.
-   $content.find( 'table.mw-enhanced-rc tr:first-child 
td.mw-changeslist-line-prefix' )
-   .detach();
+   // is actually all one big table. To prevent the 
highlights cell in the "nested"
+   // rows from stretching out the cell with the flags and 
timestamp in the top row,
+   // we give the latter colspan=2. Then to make things 
line up again, we add
+   // an empty  to the "nested" rows.
+
+   // Set colspan=2 on cell with flags and timestamp in 
top row
$content.find( 'table.mw-enhanced-rc tr:first-child 
td.mw-enhanced-rc' )
.prop( 'colspan', '2' );
-
+   // Add empty  to nested rows to compensate
+   $enhancedNestedPagesCell.parent().prepend( $( '' ) 
);
+   // Add highlights cell to nested rows
$enhancedNestedPagesCell
.before(
$( '' )
@@ -329,7 +332,7 @@
// We need to target the nested rows differently than 
the top rows so that the
// LESS rules applies correctly. In top rows, the rule 
should highlight all but
// the first 2 cells td:not( :nth-child( -n+2 ) and the 
nested rows, the rule
-   // should highlight all but the first 3 cells td:not( 
:nth-child( -n+3 )
+   // should highlight all but the first 4 cells td:not( 
:nth-child( -n+4 )
$enhancedNestedPagesCell
.closest( 'tr' )
.addClass( 
'mw-rcfilters-ui-changesListWrapperWidget-enhanced-nested' );

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align icon opacity to text color

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379155 )

Change subject: Align icon opacity to text color
..

Align icon opacity to text color

Similar to OOUI, we're aligning icon opacity of black
SVGs to be close to base text color of `#222`.

Change-Id: I7e1cd4898d30a03da09defbb76e2fbe3be374b6f
---
M modules/styles/common.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/styles/common.less b/modules/styles/common.less
index 7a69551..6e34c40 100644
--- a/modules/styles/common.less
+++ b/modules/styles/common.less
@@ -303,7 +303,7 @@
 /* stylelint-enable selector-no-id */
 
 span.mw-ui-icon {
-   opacity: 0.7;
+   opacity: 0.87; // equals `#222` on background-color `#fff`
 }
 
 span.mw-ui-icon.mw-ui-icon-before:before {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Provide base href in Echo's HTML emails

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

Change subject: Provide base href in Echo's HTML emails
..


Provide base href in Echo's HTML emails

While working on my own Echo notifications for CategoryWatch, I came
across this bug.  I was happy to see that someone else identified this
a while back.

Wikitext-to-html production for the body of Echo messages does
not fully qualify urls.  This means that links are created pointing
to, for example, "/w/index.php..." instead of
"http://example.com/w/index.php...;.  Supplying a base URL in the html
for the message fixes this problem.

Bug: T141521
Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c
---
M includes/formatters/EchoHtmlEmailFormatter.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index 5cf41cd..4c28fe6 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -51,6 +51,7 @@
 
$iconImgSrc = Sanitizer::encodeAttribute( $emailIcon );
 
+   global $wgCanonicalServer;
return <<< EOF
 

@@ -60,6 +61,7 @@
table[id="email-container"]{max-width:600px !important; 
width:100% !important;}
}

+   
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: MarkAHershberger 
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]: RCFilters: Redo the way spinners and ready/loading states ar...

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

Change subject: RCFilters: Redo the way spinners and ready/loading states are 
managed
..


RCFilters: Redo the way spinners and ready/loading states are managed

The mw-rcfilters-ui-ready class was being set on no fewer than 4 elements,
all with different meanings, and some with no relevant styling at all.
It also did not distinguish between "the UI is initializing" and
"we are loading new results".

Remove mw-rcfilters-ui-ready completely (and remove some code that added
or removed it pointlessly), and create two new CSS classes on the .
mw-rcfilters-ui-initialized is added when the UI has initialized, and
is used to hide the old UI and display a spinner while the UI loads.
mw-rcfilters-ui-loading is added when we start loading new results
and removed when they arrive; it's used to grey out the results
area and add a spinner.

Bonus: make the spinner appear in a different place depending on why
it's being shown: when initializing, it's shown in the place where the
UI will soon appear; when loading, it's shown near the top of the
changes list.

Change-Id: Ib5c8a36654ba44880823fdade8cad52ffa59ed69
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
6 files changed, 37 insertions(+), 28 deletions(-)

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



diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
index 83e5796..13da97f 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
@@ -50,8 +50,9 @@
filtersModel, changesListModel, controller, $( 
'fieldset.cloptions' ) );
 
$( '.rcfilters-container' ).append( 
filtersWidget.$element );
-   $( 'body' ).append( $overlay );
-   $( '.rcfilters-head' ).addClass( 
'mw-rcfilters-ui-ready' );
+   $( 'body' )
+   .append( $overlay )
+   .addClass( 'mw-rcfilters-ui-initialized' );
 
$( 'a.mw-helplink' ).attr(
'href',
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
index cc5ecd4..0ab2c01 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
@@ -1,6 +1,9 @@
 @import 'mediawiki.mixins.animation';
 @import 'mw.rcfilters.mixins';
 
+@rcfilters-spinner-width: 70px;
+@rcfilters-head-min-height: 200px;
+
 // Corrections for the standard special page
 .client-js {
.cloptions {
@@ -8,15 +11,14 @@
}
 
.rcfilters-head {
-   min-height: 200px;
+   min-height: @rcfilters-head-min-height;
+   }
+   body:not( .mw-rcfilters-ui-initialized ) .rcfilters-head {
+   opacity: 0.5;
+   pointer-events: none;
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   opacity: 0.5;
-   pointer-events: none;
-
-   .cloptions {
-   display: none;
-   }
+   .cloptions {
+   display: none;
}
}
 
@@ -32,22 +34,23 @@
// message of our own
display: none;
}
+   }
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   opacity: 0.5;
-   }
+   body:not( .mw-rcfilters-ui-initialized ) .mw-changeslist,
+   body.mw-rcfilters-ui-loading .mw-changeslist {
+   opacity: 0.5;
}
 
.rcfilters-spinner {
-   margin: -2em auto 0;
-   width: 70px;
-   opacity: 0.8;
display: none;
-   white-space: nowrap;
+   position: absolute;
+   left: 50%;
+   width: @rcfilters-spinner-width;
+   // Make sure the middle of the spinner is centered, rather than 
its left edge
+   margin-left: -@rcfilters-spinner-width/2;
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   display: block;
-   }
+   opacity: 0.8;
+   white-space: nowrap;
 
& 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: Align added to watchlist tooltip to style guide and replace ...

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379154 )

Change subject: Align added to watchlist tooltip to style guide and replace 
deprecated icon
..

Align added to watchlist tooltip to style guide and replace deprecated icon

Aligning “This topic has been added to your watchlist.” tooltip to
style guide by:
- removing `opacity` of tooltip
- aligning `padding` with popups elsewhere
- make icon same color as surrounding text
- limiting icon size to `32px` as it shouldn't be bigger than f.e.
“Browse topics” icon

Also exchanging deprecated 'watchlist' icon with 'unStar' icon.

Bug: T176296
Change-Id: Ibb79740462a9c9a880cc71fbea70207ef47525bf
---
M handlebars/flow_subscribed.partial.handlebars
M modules/styles/board/topic/titlebar.less
M modules/styles/mediawiki.ui/tooltips.less
3 files changed, 23 insertions(+), 14 deletions(-)


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

diff --git a/handlebars/flow_subscribed.partial.handlebars 
b/handlebars/flow_subscribed.partial.handlebars
index 26a5947..ed0c051 100644
--- a/handlebars/flow_subscribed.partial.handlebars
+++ b/handlebars/flow_subscribed.partial.handlebars
@@ -1,7 +1,9 @@
-
+
 
+   
{{!-- flow-topic-notification-subscribe-title and 
flow-board-notification-subscribe-title --}}
{{l10n (concat "flow-" type "-notification-subscribe-title") user }}
+   
 
 
{{!-- flow-topic-notification-subscribe-description and 
flow-board-notification-subscribe-description --}}
diff --git a/modules/styles/board/topic/titlebar.less 
b/modules/styles/board/topic/titlebar.less
index 0097310..4abc566 100644
--- a/modules/styles/board/topic/titlebar.less
+++ b/modules/styles/board/topic/titlebar.less
@@ -94,17 +94,26 @@
 .flow-notification-tooltip-topicsub {
width: 15em;
 }
-.flow-notification-tooltip-icon {
-   font-size: 2.5em;
-   text-align: center;
 
+.flow-notification-tooltip-icon {
.mw-ui-icon {
-   display: inline-block;
+   display: block;
+   margin-left: auto;
+   margin-right: auto;
+   opacity: 0.87; // equals `#222` on background-color `#fff`
+
+   &.mw-ui-icon-star { // Overwrite default `.mw-ui-icon` 
properties
+   min-width: 32px;
+   width: 32px;
+   max-width: 32px;
+   min-height: 32px;
+   font-size: 32px;
+   line-height: 1;
+   }
}
 }
 .flow-notification-tooltip-title {
font-size: 1em;
-   font-weight: bold;
 }
 
 .flow-undo {
diff --git a/modules/styles/mediawiki.ui/tooltips.less 
b/modules/styles/mediawiki.ui/tooltips.less
index 01f3dfa..9259ee2 100644
--- a/modules/styles/mediawiki.ui/tooltips.less
+++ b/modules/styles/mediawiki.ui/tooltips.less
@@ -16,16 +16,16 @@
 Styleguide 4.0.
  */
 .flow-ui-tooltip {
+   background-color: #fff;
+   color: @colorText;
position: relative;
top: 1px;
display: inline-block;
-   padding: 0.5em;
-   background: #fff;
-   color: @colorText;
-   word-wrap: break-word;
border-radius: @borderRadius;
-   .box-shadow( ~'0 2px 0 0 @{colorGray12}, 0 0 1px 0 @{colorGray12}' );
-   opacity: 0.9;
+   padding: 0.571em 0.857em; // equals to ~8px ~12px with base `font-size`
+   .box-shadow( ~'0 2px 2px 0 rgba(0, 0, 0, 0.25)' );
+   font-size: 0.875em; // not inherited from div#bodyContent, as we insert 
at body
+   word-wrap: break-word;
z-index: 99;
 
a {
@@ -34,8 +34,6 @@
color: #fff !important; /* stylelint-disable-line 
declaration-no-important */
font-weight: bold;
}
-
-   font-size: 0.875em; // not inherited from div#bodyContent, as we insert 
at body
 
#bodyContent & { /* stylelint-disable-line selector-no-id */
font-size: 1em;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ParsoidBatchAPI[master]: Pass revid to parse request

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

Change subject: Pass revid to parse request
..


Pass revid to parse request

 * Ports the changes from core commit af3bd08f

Change-Id: I54d38ce423d702dbf4e446ee902fe55df08846cb
---
M includes/ApiParsoidBatch.php
1 file changed, 23 insertions(+), 5 deletions(-)

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



diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php
index 76643ce..7bbf4e9 100644
--- a/includes/ApiParsoidBatch.php
+++ b/includes/ApiParsoidBatch.php
@@ -123,11 +123,28 @@
$this->dieUsage( "Invalid title 
($itemIndex)", 'invalid_title' );
}
}
+   $revid = null;
+   if ( isset( $itemParams['revid'] ) ) {
+   $revid = intval( $itemParams['revid'] );
+   $rev = Revision::newFromId( $revid );
+   if ( !$rev ) {
+   if ( is_callable( [ $this, 
'dieWithError' ] ) ) {
+   $this->dieWithError( [ 
'apierror-nosuchrevid', $revid ] );
+   } else {
+   $this->dieUsage( "There 
is no revision ID $revid", 'missingrev' );
+   }
+   }
+   $pTitle = $title;
+   $title = $rev->getTitle();
+   if ( !$title->equals( $pTitle ) ) {
+   $this->addWarning( [ 
'apierror-revwrongpage', $rev->getId(),
+   wfEscapeWikiText( 
$pTitle->getPrefixedText() ) ] );
+   }
+   }
$text = $itemParams['text'];
-   $revid = isset( $itemParams['revid'] ) ? 
intval( $itemParams['revid'] ) : false;
switch ( $action ) {
case 'parse':
-   $itemResult = $this->parse( 
$text, $title );
+   $itemResult = $this->parse( 
$text, $title, $revid );
break;
case 'preprocess':
$itemResult = 
$this->preprocess( $text, $title, $revid );
@@ -212,12 +229,13 @@
/**
 * @param string $text
 * @param Title $title
+* @param int|null $revid
 *
 * @return array
 * @throws MWException
 * @throws MWUnknownContentModelException
 */
-   protected function parse( $text, Title $title ) {
+   protected function parse( $text, Title $title, $revid ) {
global $wgParser;
 
$contentHandler = ContentHandler::getForModelID( 
CONTENT_MODEL_WIKITEXT );
@@ -226,7 +244,7 @@
if ( is_callable( [ $options, 'setWrapOutputClass' ] ) ) {
$options->setWrapOutputClass( false ); // Parsoid 
doesn't want the output wrapper
}
-   $out = $wgParser->parse( $text, $title, $options );
+   $out = $wgParser->parse( $text, $title, $options, true, true, 
$revid );
return [
'text' => $out->getText(),
'modules' => array_values( array_unique( 
$out->getModules() ) ),
@@ -239,7 +257,7 @@
/**
 * @param string $text
 * @param Title $title
-* @param int|bool $revid
+* @param int|null $revid
 *
 * @return array
 * @throws MWException

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54d38ce423d702dbf4e446ee902fe55df08846cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Update diff test results

2017-09-19 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379152 )

Change subject: Update diff test results
..

Update diff test results

Another Parsoid deployment changed out HTML. Now reference lists
s are wrapped in a new :
  


Change-Id: Idef751c256a2bb8c7d037f28150f3f657a3b5629
---
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section25-text.html
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding/section3-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein/section25-text.html
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding/section3-text.html
8 files changed, 61 insertions(+), 53 deletions(-)


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

diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 3bea40b..b734a70 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -190,7 +190,7 @@
   },
   {
 "id": 25,
-"text": "\n\n↑  This 
sequence has been in place since at least http://en.wikipedia.org/w/index.php?title=Wikipedia:Layoutoldid=2166480\;>2003
 (when \"See also\" was called \"Related topics\"). See, for example, Wikipedia:Perennial proposals#Changes 
to standard appendices. The original rationale for this ordering is that, 
with the exception of Works, sections which contain material outside 
Wikipedia (including Further reading and External links) should 
come after sections that contain Wikipedia material (including See also) 
to help keep the distinction clear. The sections containing notes and 
references often contain both kinds of material and, consequently, appear after 
the See also section (if any) and before the Further reading 
section (if any). Whatever the validity of the original rationale, there is now 
the additional factor that readers have come to expect the appendices to appear 
in this order.↑  While 
categories are entered on the editing page ahead of stub templates, they appear 
on the visual page in a separate box after the stub templates. One of the 
reasons this happens is that every stub template generates a stub category, and 
those stub categories appear after the \"main\" categories. Another is that 
certain bots and scripts are set up to expect the categories, stubs and interlanguage links to appear in that order, and will reposition 
them if they don't. Therefore, any manual attempt to change the order is futile 
unless the bots and scripts are also altered.↑  For example, 
skipping heading levels, such as jumping from 
==Heading2== to 
Heading4 without 
===Heading3=== in the middle, violates Wikipedia:Accessibility as it reduces usability for 
readers on screen readers who use heading levels to navigate 
pages.↑  Syntax:\n\n==See also==\n* [[Wikipedia:How to edit a 
page]]\n* [[Wikipedia:Manual of 
Style]]\n\n\nWhich produces:\n\nSee also\n Wikipedia:How to edit a page\n Wikipedia:Manual of Style\n↑  The rationale 
for not printing navigation boxes is that these templates contain wikilinks that 
are of no use to print readers.[1] There are two problems with this rationale: 
First, other wikilink content does print, for example See 
also and succession 
boxes. Second, some navigation boxes contain useful information regarding 
the relationship of the article to the subjects of related 
articles.\n\n\n\n",
+"text": "\n\n↑  This 
sequence has been in place since at least http://en.wikipedia.org/w/index.php?title=Wikipedia:Layoutoldid=2166480\;>2003
 (when \"See also\" was called \"Related topics\"). See, for example, Wikipedia:Perennial proposals#Changes 
to standard appendices. The original rationale for this ordering is that, 
with the exception of Works, sections which contain material outside 
Wikipedia (including Further reading and External links) should 
come after sections that contain Wikipedia material (including See also) 
to help keep the distinction clear. The sections containing notes and 
references often contain both kinds of material and, consequently, appear after 
the See 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Provide base href in Echo's HTML emails

2017-09-19 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379151 )

Change subject: Provide base href in Echo's HTML emails
..

Provide base href in Echo's HTML emails

While working on my own Echo notifications for CategoryWatch, I came
across this bug.  I was happy to see that someone else identified this
a while back.

Wikitext-to-html production for the body of Echo messages does
not fully qualify urls.  This means that links are created pointing
to, for example, "/w/index.php..." instead of
"http://example.com/w/index.php;.  Supplying a base URL in the html
for the message fixes this problem.

Bug: T141521
Change-Id: Icfb9f3be58b83d2a441972adb58fef1169169d7c
---
M includes/formatters/EchoHtmlEmailFormatter.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/includes/formatters/EchoHtmlEmailFormatter.php 
b/includes/formatters/EchoHtmlEmailFormatter.php
index 5cf41cd..b1aae7d 100644
--- a/includes/formatters/EchoHtmlEmailFormatter.php
+++ b/includes/formatters/EchoHtmlEmailFormatter.php
@@ -51,6 +51,7 @@
 
$iconImgSrc = Sanitizer::encodeAttribute( $emailIcon );
 
+   global $wgServer;
return <<< EOF
 

@@ -60,6 +61,7 @@
table[id="email-container"]{max-width:600px !important; 
width:100% !important;}
}

+   
 
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.23.1

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

Change subject: Update OOjs UI to v0.23.1
..


Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Depends-on: If38f5a074d655542c5704a9b17617d299ee17921
Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c
---
M composer.json
M resources/lib/oojs-ui/i18n/ais.json
M resources/lib/oojs-ui/i18n/hu.json
M resources/lib/oojs-ui/i18n/ja.json
M resources/lib/oojs-ui/i18n/nb.json
M resources/lib/oojs-ui/i18n/roa-tara.json
A resources/lib/oojs-ui/i18n/tay.json
M resources/lib/oojs-ui/i18n/uk.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-core.js.map
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-widgets.js.map
M resources/lib/oojs-ui/oojs-ui-wikimediaui.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-windows.js
M resources/lib/oojs-ui/themes/apex/icons-interactions.json
M resources/lib/oojs-ui/themes/wikimediaui/icons-interactions.json
26 files changed, 242 insertions(+), 188 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.23.1

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

Change subject: Update OOjs UI to v0.23.1
..


Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Change-Id: If38f5a074d655542c5704a9b17617d299ee17921
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/demos/pages/icons.js
M oojs/oojs-ui/demos/pages/widgets.js
M oojs/oojs-ui/demos/styles/demo.css
M oojs/oojs-ui/i18n/ais.json
M oojs/oojs-ui/i18n/hu.json
M oojs/oojs-ui/i18n/ja.json
M oojs/oojs-ui/i18n/nb.json
M oojs/oojs-ui/i18n/roa-tara.json
A oojs/oojs-ui/i18n/tay.json
M oojs/oojs-ui/i18n/uk.json
M oojs/oojs-ui/package.json
M oojs/oojs-ui/php/HtmlSnippet.php
16 files changed, 127 insertions(+), 28 deletions(-)

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



diff --git a/composer.json b/composer.json
index 51a50db..e6dd1a3 100644
--- a/composer.json
+++ b/composer.json
@@ -45,7 +45,7 @@
"monolog/monolog": "1.22.1",
"mustangostang/spyc": "0.6.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.23.0",
+   "oojs/oojs-ui": "0.23.1",
"oyejorge/less.php": "1.7.0.14",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.4.1",
diff --git a/composer.lock b/composer.lock
index bed8429..7822ac2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "fea6db0235342e7a6b24285277ac6f12",
+"content-hash": "1129c0e8cd3e4bfcdd6c36f6a6fef8f0",
 "packages": [
 {
 "name": "composer/semver",
@@ -516,16 +516,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.23.0",
+"version": "v0.23.1",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af"
+"reference": "78a763891cab6e5af620e891f340141e75ceef84"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84;,
+"reference": "78a763891cab6e5af620e891f340141e75ceef84",
 "shasum": ""
 },
 "require": {
@@ -591,7 +591,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2017-09-05T21:04:47+00:00"
+"time": "2017-09-20T00:13:22+00:00"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index 26d7e22..d327ab5 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -2326,17 +2326,17 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.23.0",
-"version_normalized": "0.23.0.0",
+"version": "v0.23.1",
+"version_normalized": "0.23.1.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af"
+"reference": "78a763891cab6e5af620e891f340141e75ceef84"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84;,
+"reference": "78a763891cab6e5af620e891f340141e75ceef84",
 "shasum": ""
 },
 "require": {
@@ -2348,7 +2348,7 @@
 "mediawiki/mediawiki-codesniffer": "0.12.0",
 "phpunit/phpunit": "4.8.21"
 },
-"time": "2017-09-05T21:04:47+00:00",
+"time": "2017-09-20T00:13:22+00:00",
 "type": "library",
 "installation-source": "dist",
 "autoload": {
diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md
index 478480b..7c4e6b3 100644
--- a/oojs/oojs-ui/History.md
+++ b/oojs/oojs-ui/History.md
@@ -1,4 +1,29 @@
 # OOjs UI Release History
+## v0.23.1 / 2017-09-19
+### Deprecations
+* [DEPRECATING CHANGE] SelectWidget: 

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update OOjs UI to v0.23.1

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

Change subject: Update OOjs UI to v0.23.1
..


Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Change-Id: Ifc549bccfe69d2995628df8fa50ca55c59a02137
---
M .jsduck/eg-iframe.html
M demos/ve/desktop-dist.html
M demos/ve/desktop.html
M demos/ve/mobile-dist.html
M demos/ve/mobile.html
M lib/oojs-ui/i18n/ais.json
M lib/oojs-ui/i18n/hu.json
M lib/oojs-ui/i18n/ja.json
M lib/oojs-ui/i18n/nb.json
M lib/oojs-ui/i18n/roa-tara.json
A lib/oojs-ui/i18n/tay.json
M lib/oojs-ui/i18n/uk.json
M lib/oojs-ui/oojs-ui-apex-icons-accessibility.css
M lib/oojs-ui/oojs-ui-apex-icons-accessibility.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-alerts.css
M lib/oojs-ui/oojs-ui-apex-icons-alerts.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-content.css
M lib/oojs-ui/oojs-ui-apex-icons-content.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-core.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-core.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-list.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-list.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-interactions.css
M lib/oojs-ui/oojs-ui-apex-icons-interactions.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-layout.css
M lib/oojs-ui/oojs-ui-apex-icons-layout.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-media.css
M lib/oojs-ui/oojs-ui-apex-icons-media.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-moderation.css
M lib/oojs-ui/oojs-ui-apex-icons-moderation.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-movement.css
M lib/oojs-ui/oojs-ui-apex-icons-movement.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-user.css
M lib/oojs-ui/oojs-ui-apex-icons-user.rtl.css
M lib/oojs-ui/oojs-ui-apex.css
M lib/oojs-ui/oojs-ui-apex.js
M lib/oojs-ui/oojs-ui-apex.rtl.css
M lib/oojs-ui/oojs-ui-core-apex.css
M lib/oojs-ui/oojs-ui-core-apex.rtl.css
M lib/oojs-ui/oojs-ui-core-mediawiki.css
M lib/oojs-ui/oojs-ui-core-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-core-wikimediaui.css
M lib/oojs-ui/oojs-ui-core-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-core.js
M lib/oojs-ui/oojs-ui-core.js.map
M lib/oojs-ui/oojs-ui-images-apex.css
M lib/oojs-ui/oojs-ui-images-apex.rtl.css
M lib/oojs-ui/oojs-ui-images-wikimediaui.css
M lib/oojs-ui/oojs-ui-images-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-location.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-location.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.css
M lib/oojs-ui/oojs-ui-mediawiki.js
M lib/oojs-ui/oojs-ui-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-apex.css
M lib/oojs-ui/oojs-ui-toolbars-apex.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M lib/oojs-ui/oojs-ui-toolbars-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-toolbars.js
M lib/oojs-ui/oojs-ui-widgets-apex.css
M lib/oojs-ui/oojs-ui-widgets-apex.rtl.css
M lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M lib/oojs-ui/oojs-ui-widgets-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
M lib/oojs-ui/oojs-ui-widgets-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-widgets.js
M lib/oojs-ui/oojs-ui-widgets.js.map
M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.rtl.css
M 

[MediaWiki-commits] [Gerrit] wikimedia...wetzel[develop]: [WIP] Add maplink & mapframe prevalence graphs and modularize

2017-09-19 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379150 )

Change subject: [WIP] Add maplink & mapframe prevalence graphs and modularize
..

[WIP] Add maplink & mapframe prevalence graphs and modularize

- Splits up server.R into modules (like Search & Portal dashboards)
- Adds maplink & mapframe prevalence graphs
  - Overall prevalence
  - Language-project breakdown of prevalence

Bug: T170022
Change-Id: If1f1efa619037ce8adea873c148f9a1f78376506
---
M CHANGELOG.md
A modules/feature_usage.R
A modules/geographic_breakdown.R
A modules/kartographer/language-project_breakdown.R
A modules/kartographer/overall_prevalence.R
A modules/kartotherian.R
M server.R
A tab_documentation/overall_prevalence.md
A tab_documentation/prevalence_langproj.md
M tab_documentation/tiles_summary.md
M ui.R
M utils.R
12 files changed, 536 insertions(+), 161 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/wetzel 
refs/changes/50/379150/1

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 208e2ab..f3e77ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,10 @@
 # Change Log (Patch Notes)
 All notable changes to this project will be documented in this file.
 
+## 2017/09/18
+- Modularized the dashboard source code
+- Added maplink & mapframe prevalence graphs 
([T170022](https://phabricator.wikimedia.org/T170022))
+
 ## 2017/06/20
 - Added licensing info ([T167930](https://phabricator.wikimedia.org/T167930))
 
diff --git a/modules/feature_usage.R b/modules/feature_usage.R
new file mode 100644
index 000..ec2460e
--- /dev/null
+++ b/modules/feature_usage.R
@@ -0,0 +1,55 @@
+output$users_per_platform <- renderDygraph({
+  user_data %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_users_per_platform)) %>%
+polloi::make_dygraph("Date", "Events", "Unique users by platform, by day") 
%>%
+dyAxis("y", logscale = input$users_per_platform_logscale) %>%
+dyLegend(labelsDiv = "users_per_platform_legend", show = "always") %>%
+dyRangeSelector %>%
+dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>%
+dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+})
+
+output$geohack_feature_usage <- renderDygraph({
+  usage_data$GeoHack %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_geohack_feature_usage)) %>%
+polloi::make_dygraph("Date", "Events", "Feature usage for GeoHack") %>%
+dyRangeSelector %>%
+dyAxis("y", logscale = input$geohack_feature_usage_logscale) %>%
+dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>%
+dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+})
+
+output$wikiminiatlas_feature_usage <- renderDygraph({
+  usage_data$WikiMiniAtlas %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_wikiminiatlas_feature_usage)) %>%
+polloi::make_dygraph("Date", "Events", "Feature usage for WikiMiniAtlas") 
%>%
+dyRangeSelector %>%
+dyAxis("y", logscale = input$wikiminiatlas_feature_usage_logscale) %>%
+dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>%
+dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+})
+
+output$wikivoyage_feature_usage <- renderDygraph({
+  usage_data$Wikivoyage %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_wikivoyage_feature_usage)) %>%
+polloi::make_dygraph("Date", "Events", "Feature usage for Wikivoyage") %>%
+dyRangeSelector %>%
+dyAxis("y", logscale = input$wikivoyage_feature_usage_logscale) %>%
+dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>%
+dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+})
+
+output$wiwosm_feature_usage <- renderDygraph({
+  usage_data$WIWOSM %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_wiwosm_feature_usage)) %>%
+polloi::make_dygraph("Date", "Events", "Feature usage for WIWOSM") %>%
+dyRangeSelector %>%
+dyAxis("y", logscale = input$wiwosm_feature_usage_logscale) %>%
+dyEvent(as.Date("2016-04-15"), "A (Maps EL bug)", labelLoc = "bottom") %>%
+dyEvent(as.Date("2016-06-17"), "A (Maps EL patch)", labelLoc = "bottom") 
%>%
+dyEvent(as.Date("2017-01-01"), "R (reportupdater)", labelLoc = "bottom")
+})
diff --git a/modules/geographic_breakdown.R 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Mark various skin/OutputPage hooks as unabortable

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

Change subject: Mark various skin/OutputPage hooks as unabortable
..


Mark various skin/OutputPage hooks as unabortable

Follows-up I94c7ab656bd1a04. An initial pass of marking various
hooks as unabortable.

* BeforePageDisplay (T173411)
* OutputPageParserOutput
* AfterFinalPageOutput
* SkinTemplateNavigation (T107980)
* SkinTemplateNavigation::SpecialPage (T107980)
* SkinTemplateNavigation::Universal
* PersonalUrls

Bug: T173615
Change-Id: I0cb333dd5ff74f7dca725ff210200a0779a9a360
---
M includes/OutputPage.php
M includes/skins/SkinTemplate.php
2 files changed, 12 insertions(+), 8 deletions(-)

Approvals:
  Aaron Schulz: Looks good to me, approved
  jenkins-bot: Verified
  Jdlrobson: Looks good to me, but someone else must approve



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 5216146..7c463b6 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1852,7 +1852,7 @@
// Avoid PHP 7.1 warning of passing $this by reference
$outputPage = $this;
Hooks::run( 'LanguageLinks', [ $this->getTitle(), 
&$this->mLanguageLinks, &$linkFlags ] );
-   Hooks::run( 'OutputPageParserOutput', [ &$outputPage, 
$parserOutput ] );
+   Hooks::runWithoutAbort( 'OutputPageParserOutput', [ 
&$outputPage, $parserOutput ] );
 
// This check must be after 'OutputPageParserOutput' runs in 
addParserOutputMetadata
// so that extensions may modify ParserOutput to toggle TOC.
@@ -1890,7 +1890,7 @@
$text = $parserOutput->getText();
// Avoid PHP 7.1 warning of passing $this by reference
$outputPage = $this;
-   Hooks::run( 'OutputPageBeforeHTML', [ &$outputPage, &$text ] );
+   Hooks::runWithoutAbort( 'OutputPageBeforeHTML', [ &$outputPage, 
&$text ] );
$this->addHTML( $text );
}
 
@@ -2436,7 +2436,7 @@
$outputPage = $this;
// Hook that allows last minute changes to the output 
page, e.g.
// adding of CSS or Javascript by extensions.
-   Hooks::run( 'BeforePageDisplay', [ &$outputPage, &$sk ] 
);
+   Hooks::runWithoutAbort( 'BeforePageDisplay', [ 
&$outputPage, &$sk ] );
 
try {
$sk->outputPage();
@@ -2448,7 +2448,7 @@
 
try {
// This hook allows last minute changes to final 
overall output by modifying output buffer
-   Hooks::run( 'AfterFinalPageOutput', [ $this ] );
+   Hooks::runWithoutAbort( 'AfterFinalPageOutput', [ $this 
] );
} catch ( Exception $e ) {
ob_end_clean(); // bug T129657
throw $e;
diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 4fcc865..0690f03 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -729,7 +729,7 @@
}
}
 
-   Hooks::run( 'PersonalUrls', [ &$personal_urls, &$title, $this ] 
);
+   Hooks::runWithoutAbort( 'PersonalUrls', [ &$personal_urls, 
&$title, $this ] );
return $personal_urls;
}
 
@@ -1095,7 +1095,10 @@
 
// Avoid PHP 7.1 warning of passing $this by reference
$skinTemplate = $this;
-   Hooks::run( 'SkinTemplateNavigation', [ &$skinTemplate, 
&$content_navigation ] );
+   Hooks::runWithoutAbort(
+   'SkinTemplateNavigation',
+   [ &$skinTemplate, &$content_navigation ]
+   );
 
if ( $userCanRead && !$wgDisableLangConversion ) {
$pageLang = $title->getPageLanguage();
@@ -1139,14 +1142,15 @@
 
// Avoid PHP 7.1 warning of passing $this by reference
$skinTemplate = $this;
-   Hooks::run( 'SkinTemplateNavigation::SpecialPage',
+   Hooks::runWithoutAbort( 
'SkinTemplateNavigation::SpecialPage',
[ &$skinTemplate, &$content_navigation ] );
}
 
// Avoid PHP 7.1 warning of passing $this by reference
$skinTemplate = $this;
// Equiv to SkinTemplateContentActions
-   Hooks::run( 'SkinTemplateNavigation::Universal', [ 
&$skinTemplate, &$content_navigation ] );
+   Hooks::runWithoutAbort( 'SkinTemplateNavigation::Universal',
+   [ &$skinTemplate, &$content_navigation ] );
 
// Setup xml ids and tooltip 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Update OOjs UI to v0.23.1

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379149 )

Change subject: Update OOjs UI to v0.23.1
..

Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Depends-on: If38f5a074d655542c5704a9b17617d299ee17921
Change-Id: Iac39c51049266b302d66658bf1ea6b67c1bb4c8c
---
M composer.json
M resources/lib/oojs-ui/i18n/ais.json
M resources/lib/oojs-ui/i18n/hu.json
M resources/lib/oojs-ui/i18n/ja.json
M resources/lib/oojs-ui/i18n/nb.json
M resources/lib/oojs-ui/i18n/roa-tara.json
A resources/lib/oojs-ui/i18n/tay.json
M resources/lib/oojs-ui/i18n/uk.json
M resources/lib/oojs-ui/oojs-ui-apex.js
M resources/lib/oojs-ui/oojs-ui-core-apex.css
M resources/lib/oojs-ui/oojs-ui-core-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-core.js
M resources/lib/oojs-ui/oojs-ui-core.js.map
M resources/lib/oojs-ui/oojs-ui-toolbars-apex.css
M resources/lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-toolbars.js
M resources/lib/oojs-ui/oojs-ui-widgets-apex.css
M resources/lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-widgets.js
M resources/lib/oojs-ui/oojs-ui-widgets.js.map
M resources/lib/oojs-ui/oojs-ui-wikimediaui.js
M resources/lib/oojs-ui/oojs-ui-windows-apex.css
M resources/lib/oojs-ui/oojs-ui-windows-wikimediaui.css
M resources/lib/oojs-ui/oojs-ui-windows.js
M resources/lib/oojs-ui/themes/apex/icons-interactions.json
M resources/lib/oojs-ui/themes/wikimediaui/icons-interactions.json
26 files changed, 242 insertions(+), 188 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't grey out results area when initializing, un...

2017-09-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379148 )

Change subject: RCFilters: Don't grey out results area when initializing, 
unless there's a default saved query
..

RCFilters: Don't grey out results area when initializing, unless there's a 
default saved query

Check whether there is a default saved query on the server side, and if there 
is,
add a CSS class.

Also centralize the code related to the saved query preferences.

Bug: T173533
Change-Id: I4138fde22bdd8cc55c65846b91184c3ad3057244
---
M includes/specialpage/ChangesListSpecialPage.php
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
5 files changed, 29 insertions(+), 11 deletions(-)


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

diff --git a/includes/specialpage/ChangesListSpecialPage.php 
b/includes/specialpage/ChangesListSpecialPage.php
index 98b7aa1..020fcbf 100644
--- a/includes/specialpage/ChangesListSpecialPage.php
+++ b/includes/specialpage/ChangesListSpecialPage.php
@@ -32,6 +32,12 @@
  * @ingroup SpecialPage
  */
 abstract class ChangesListSpecialPage extends SpecialPage {
+   /**
+* Preference name for saved queries. Subclasses that use saved queries 
should override this.
+* @var string
+*/
+   protected static $savedQueriesPreferenceName;
+
/** @var string */
protected $rcSubpage;
 
@@ -602,6 +608,7 @@

'wgStructuredChangeFiltersEnableExperimentalViews',
$experimentalStructuredChangeFilters
);
+
$out->addJsConfigVars(
'wgRCFiltersChangeTags',
$this->buildChangeTagList()
@@ -616,6 +623,19 @@
'daysDefault' => 
$this->getDefaultDays(),
]
);
+
+   if ( static::$savedQueriesPreferenceName ) {
+   $savedQueries = FormatJson::decode(
+   $this->getUser()->getOption( 
static::$savedQueriesPreferenceName )
+   );
+   if ( $savedQueries && isset( 
$savedQueries->default ) ) {
+   $out->addBodyClasses( 
'mw-rcfilters-ui-default-saved-query' );
+   }
+   $out->addJsConfigVars(
+   
'wgStructuredChangeFiltersSavedQueriesPreferenceName',
+   static::$savedQueriesPreferenceName
+   );
+   }
} else {
$out->addBodyClasses( 'mw-rcfilters-disabled' );
}
diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 15c05ee..40834cb 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -32,6 +32,8 @@
  */
 class SpecialRecentChanges extends ChangesListSpecialPage {
 
+   protected static $savedQueriesPreferenceName = 
'rcfilters-saved-queries';
+
private $watchlistFilterGroupDefinition;
 
// @codingStandardsIgnoreStart Needed "useless" override to change 
parameters.
@@ -165,10 +167,6 @@
 
if ( $this->isStructuredFilterUiEnabled() ) {
$out->addJsConfigVars( 
'wgStructuredChangeFiltersLiveUpdateSupported', true );
-   $out->addJsConfigVars(
-   
'wgStructuredChangeFiltersSavedQueriesPreferenceName',
-   'rcfilters-saved-queries'
-   );
}
}
 
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index 8418865..4f4570e 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -32,6 +32,8 @@
  * @ingroup SpecialPage
  */
 class SpecialWatchlist extends ChangesListSpecialPage {
+   protected static $savedQueriesPreferenceName = 
'rcfilters-wl-saved-queries';
+
private $maxDays;
 
public function __construct( $page = 'Watchlist', $restriction = 
'viewmywatchlist' ) {
@@ -100,10 +102,6 @@
$output->addModuleStyles( [ 
'mediawiki.rcfilters.highlightCircles.seenunseen.styles' ] );
 
$output->addJsConfigVars( 
'wgStructuredChangeFiltersLiveUpdateSupported', false );
-   $output->addJsConfigVars(
-   
'wgStructuredChangeFiltersSavedQueriesPreferenceName',
-   

[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Update OOjs UI to v0.23.1

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379147 )

Change subject: Update OOjs UI to v0.23.1
..

Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Change-Id: If38f5a074d655542c5704a9b17617d299ee17921
---
M composer.json
M composer.lock
M composer/installed.json
M oojs/oojs-ui/History.md
M oojs/oojs-ui/demos/pages/icons.js
M oojs/oojs-ui/demos/pages/widgets.js
M oojs/oojs-ui/demos/styles/demo.css
M oojs/oojs-ui/i18n/ais.json
M oojs/oojs-ui/i18n/hu.json
M oojs/oojs-ui/i18n/ja.json
M oojs/oojs-ui/i18n/nb.json
M oojs/oojs-ui/i18n/roa-tara.json
A oojs/oojs-ui/i18n/tay.json
M oojs/oojs-ui/i18n/uk.json
M oojs/oojs-ui/package.json
M oojs/oojs-ui/php/HtmlSnippet.php
16 files changed, 127 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vendor 
refs/changes/47/379147/1

diff --git a/composer.json b/composer.json
index 51a50db..e6dd1a3 100644
--- a/composer.json
+++ b/composer.json
@@ -45,7 +45,7 @@
"monolog/monolog": "1.22.1",
"mustangostang/spyc": "0.6.2",
"nmred/kafka-php": "0.1.5",
-   "oojs/oojs-ui": "0.23.0",
+   "oojs/oojs-ui": "0.23.1",
"oyejorge/less.php": "1.7.0.14",
"pear/console_getopt": "1.4.1",
"pear/mail": "1.4.1",
diff --git a/composer.lock b/composer.lock
index bed8429..7822ac2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file;,
 "This file is @generated automatically"
 ],
-"content-hash": "fea6db0235342e7a6b24285277ac6f12",
+"content-hash": "1129c0e8cd3e4bfcdd6c36f6a6fef8f0",
 "packages": [
 {
 "name": "composer/semver",
@@ -516,16 +516,16 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.23.0",
+"version": "v0.23.1",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af"
+"reference": "78a763891cab6e5af620e891f340141e75ceef84"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84;,
+"reference": "78a763891cab6e5af620e891f340141e75ceef84",
 "shasum": ""
 },
 "require": {
@@ -591,7 +591,7 @@
 ],
 "description": "Provides library of common widgets, layouts, and 
windows.",
 "homepage": "https://www.mediawiki.org/wiki/OOjs_UI;,
-"time": "2017-09-05T21:04:47+00:00"
+"time": "2017-09-20T00:13:22+00:00"
 },
 {
 "name": "oyejorge/less.php",
diff --git a/composer/installed.json b/composer/installed.json
index 26d7e22..d327ab5 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -2326,17 +2326,17 @@
 },
 {
 "name": "oojs/oojs-ui",
-"version": "v0.23.0",
-"version_normalized": "0.23.0.0",
+"version": "v0.23.1",
+"version_normalized": "0.23.1.0",
 "source": {
 "type": "git",
 "url": "https://github.com/wikimedia/oojs-ui.git;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af"
+"reference": "78a763891cab6e5af620e891f340141e75ceef84"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/c1309b72963f618586d7577acf6119e6f387b8af;,
-"reference": "c1309b72963f618586d7577acf6119e6f387b8af",
+"url": 
"https://api.github.com/repos/wikimedia/oojs-ui/zipball/78a763891cab6e5af620e891f340141e75ceef84;,
+"reference": "78a763891cab6e5af620e891f340141e75ceef84",
 "shasum": ""
 },
 "require": {
@@ -2348,7 +2348,7 @@
 "mediawiki/mediawiki-codesniffer": "0.12.0",
 "phpunit/phpunit": "4.8.21"
 },
-"time": "2017-09-05T21:04:47+00:00",
+"time": "2017-09-20T00:13:22+00:00",
 "type": "library",
 "installation-source": "dist",
 "autoload": {
diff --git a/oojs/oojs-ui/History.md b/oojs/oojs-ui/History.md
index 478480b..7c4e6b3 100644
--- a/oojs/oojs-ui/History.md
+++ b/oojs/oojs-ui/History.md
@@ -1,4 +1,29 @@
 # OOjs UI Release History
+## v0.23.1 / 2017-09-19
+### Deprecations
+* [DEPRECATING CHANGE] SelectWidget: 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Yet another attempt to fix the populateIpChanges script

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

Change subject: Yet another attempt to fix the populateIpChanges script
..


Yet another attempt to fix the populateIpChanges script

It would seem we'd need to update $blockStart if there are no results
for a given block, and more importantly, continue and not break!

Bug: T175962
Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064
---
M maintenance/populateIpChanges.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/populateIpChanges.php 
b/maintenance/populateIpChanges.php
index 17f49ee..f7bcc12 100644
--- a/maintenance/populateIpChanges.php
+++ b/maintenance/populateIpChanges.php
@@ -88,7 +88,8 @@
$numRows = $rows->numRows();
 
if ( !$rows || $numRows === 0 ) {
-   break;
+   $blockStart = $blockEnd + 1;
+   continue;
}
 
$this->output( "...checking $numRows revisions for IP 
edits that need copying, " .

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MusikAnimal 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Update OOjs UI to v0.23.1

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379146 )

Change subject: Update OOjs UI to v0.23.1
..

Update OOjs UI to v0.23.1

Release notes:
 
https://phabricator.wikimedia.org/diffusion/GOJU/browse/master/History.md;v0.23.1

Change-Id: Ifc549bccfe69d2995628df8fa50ca55c59a02137
---
M .jsduck/eg-iframe.html
M demos/ve/desktop-dist.html
M demos/ve/desktop.html
M demos/ve/mobile-dist.html
M demos/ve/mobile.html
M lib/oojs-ui/i18n/ais.json
M lib/oojs-ui/i18n/hu.json
M lib/oojs-ui/i18n/ja.json
M lib/oojs-ui/i18n/nb.json
M lib/oojs-ui/i18n/roa-tara.json
A lib/oojs-ui/i18n/tay.json
M lib/oojs-ui/i18n/uk.json
M lib/oojs-ui/oojs-ui-apex-icons-accessibility.css
M lib/oojs-ui/oojs-ui-apex-icons-accessibility.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-alerts.css
M lib/oojs-ui/oojs-ui-apex-icons-alerts.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-content.css
M lib/oojs-ui/oojs-ui-apex-icons-content.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-advanced.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-core.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-core.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-list.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-list.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.css
M lib/oojs-ui/oojs-ui-apex-icons-editing-styling.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-interactions.css
M lib/oojs-ui/oojs-ui-apex-icons-interactions.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-layout.css
M lib/oojs-ui/oojs-ui-apex-icons-layout.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-media.css
M lib/oojs-ui/oojs-ui-apex-icons-media.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-moderation.css
M lib/oojs-ui/oojs-ui-apex-icons-moderation.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-movement.css
M lib/oojs-ui/oojs-ui-apex-icons-movement.rtl.css
M lib/oojs-ui/oojs-ui-apex-icons-user.css
M lib/oojs-ui/oojs-ui-apex-icons-user.rtl.css
M lib/oojs-ui/oojs-ui-apex.css
M lib/oojs-ui/oojs-ui-apex.js
M lib/oojs-ui/oojs-ui-apex.rtl.css
M lib/oojs-ui/oojs-ui-core-apex.css
M lib/oojs-ui/oojs-ui-core-apex.rtl.css
M lib/oojs-ui/oojs-ui-core-mediawiki.css
M lib/oojs-ui/oojs-ui-core-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-core-wikimediaui.css
M lib/oojs-ui/oojs-ui-core-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-core.js
M lib/oojs-ui/oojs-ui-core.js.map
M lib/oojs-ui/oojs-ui-images-apex.css
M lib/oojs-ui/oojs-ui-images-apex.rtl.css
M lib/oojs-ui/oojs-ui-images-wikimediaui.css
M lib/oojs-ui/oojs-ui-images-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-location.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-location.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.css
M lib/oojs-ui/oojs-ui-mediawiki-icons-wikimedia.rtl.css
M lib/oojs-ui/oojs-ui-mediawiki.css
M lib/oojs-ui/oojs-ui-mediawiki.js
M lib/oojs-ui/oojs-ui-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-apex.css
M lib/oojs-ui/oojs-ui-toolbars-apex.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-mediawiki.css
M lib/oojs-ui/oojs-ui-toolbars-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.css
M lib/oojs-ui/oojs-ui-toolbars-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-toolbars.js
M lib/oojs-ui/oojs-ui-widgets-apex.css
M lib/oojs-ui/oojs-ui-widgets-apex.rtl.css
M lib/oojs-ui/oojs-ui-widgets-mediawiki.css
M lib/oojs-ui/oojs-ui-widgets-mediawiki.rtl.css
M lib/oojs-ui/oojs-ui-widgets-wikimediaui.css
M lib/oojs-ui/oojs-ui-widgets-wikimediaui.rtl.css
M lib/oojs-ui/oojs-ui-widgets.js
M lib/oojs-ui/oojs-ui-widgets.js.map
M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-accessibility.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-alerts.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-content.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-advanced.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-core.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-list.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-editing-styling.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-interactions.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-layout.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-location.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-media.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-moderation.rtl.css
M lib/oojs-ui/oojs-ui-wikimediaui-icons-movement.css
M 

[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Add lexicon tool special page in Wikispeech extension

2017-09-19 Thread Eugene233 (Code Review)
Eugene233 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379145 )

Change subject: Add lexicon tool special page in Wikispeech extension
..

Add lexicon tool special page in Wikispeech extension

Added to the special page of the extension, the Wikispeech lexicon tool comes
in as another special page which sits on the extension.
This page is what the user will use as a basis of interraction with the tool in
order to add suggested words to the Wikispeech lexicon.

Bug: T175810
Change-Id: I3a43633ae500af49d7ef3a05fef97ab2c55df0f4
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A specials/SpecialWikispeechLexiconTool.php
4 files changed, 43 insertions(+), 2 deletions(-)


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

diff --git a/extension.json b/extension.json
index 6f7cebb..b519ff8 100644
--- a/extension.json
+++ b/extension.json
@@ -17,6 +17,7 @@
},
"AutoloadClasses": {
"SpecialWikispeech": "specials/SpecialWikispeech.php",
+   "SpecialWikispeechLexiconTool": 
"specials/SpecialWikispeechLexiconTool.php",
"WikispeechHooks": "Hooks.php",
"CleanedText": "includes/CleanedContent.php",
"SegmentBreak": "includes/CleanedContent.php",
@@ -52,7 +53,8 @@
"remoteExtPath": "Wikispeech/modules"
},
"SpecialPages": {
-   "Wikispeech": "SpecialWikispeech"
+   "Wikispeech": "SpecialWikispeech",
+   "WikispeechLexiconTool": "SpecialWikispeechLexiconTool"
},
"ExtensionMessagesFiles": {
"WikispeechAlias": "Wikispeech.alias.php"
diff --git a/i18n/en.json b/i18n/en.json
index fb98d2b..a4837b8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -17,5 +17,8 @@
"apihelp-wikispeech-param-removetags": "The tags that should be removed 
completely during cleaning, as a JSON object of the format:\n{\n  
\"tagName1\": true,\n  \"tagName2\": \"cssClass\"\n}\nwhere 
tagName1 is always removed and tagName2 is only 
removed if it also has the CSS class cssClass.",
"apihelp-wikispeech-param-segmentbreakingtags": "The tag names for tags 
that should add segment breaks.",
"apihelp-wikispeech-example-1": "Get segments for the Wikispeech 
extension. The tag sup is removed and so is div when 
it has the class toc. The tags h1 and h2 
break segments.",
-   "apihelp-wikispeech-example-2": "Get original HTML content and cleaned 
text."
+   "apihelp-wikispeech-example-2": "Get original HTML content and cleaned 
text.",
+   "wikispeechlexicontool": "Wikispeech Lexicon Tool",
+   "special-wikispeech-lexicon-tool-intro": "Wikispeech Lexicon Tool",
+   "special-wikispeech-lexicon-tool-title": "The tool used to add 
suggested words into the Wikispeech lexicon."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 17b1b58..14d25d4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,9 +5,12 @@
]
},
"wikispeech": "The name of the extension",
+   "wikispeechlexicontool": "The name of the tool which is used to add 
words to the lexicon",
"wikispeech-desc": 
"{{desc|name=Wikispeech|url=https://www.mediawiki.org/wiki/Extension:Wikispeech}};,
"special-wikispeech-intro": "Description appearing on top of 
Special:{{ll|Wikispeech}}.",
+   "special-wikispeech-lexicon-tool-intro": "Description appearing on top 
of Special:{{ll|WikispeechLexiconTool}}.",
"special-wikispeech-title": "Title of the special page 
Special:Wikispeech",
+   "special-wikispeech-lexicon-tool-title": "Title of the special page 
Special:WikispeechLexiconTool",
"apihelp-wikispeech-summary": "{{doc-apihelp-summary|wikispeech}}",
"apihelp-wikispeech-param-page": 
"{{doc-apihelp-param|wikispeech|page}}",
"apihelp-wikispeech-param-output": 
"{{doc-apihelp-param|wikispeech|output}}",
diff --git a/specials/SpecialWikispeechLexiconTool.php 
b/specials/SpecialWikispeechLexiconTool.php
new file mode 100644
index 000..147f4fa
--- /dev/null
+++ b/specials/SpecialWikispeechLexiconTool.php
@@ -0,0 +1,33 @@
+getOutput();
+   $out->setPageTitle( $this->msg( 
'special-wikispeech-lexicon-tool-title' ) );
+   $out->addHelpLink( 'How to become a MediaWiki hacker' );
+   $out->addWikiMsg( 'special-wikispeech-lexicon-tool-intro' );
+   }
+
+   /**
+* @see SpecialPage::getGroupName
+*
+* @return string
+*/
+   protected function getGroupName() {
+   return 'pagetools';
+   }
+}
\ No newline at end of file

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

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

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Tag v0.23.1

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

Change subject: Tag v0.23.1
..


Tag v0.23.1

Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5
---
M History.md
M package.json
2 files changed, 26 insertions(+), 1 deletion(-)

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



diff --git a/History.md b/History.md
index 478480b..7c4e6b3 100644
--- a/History.md
+++ b/History.md
@@ -1,4 +1,29 @@
 # OOjs UI Release History
+## v0.23.1 / 2017-09-19
+### Deprecations
+* [DEPRECATING CHANGE] SelectWidget: Rename `getFirstSelectableItem` to 
`findFirstSelectableItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] SelectWidget: Rename `getHighlightedItem` to 
`findHighlightedItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] SelectWidget: Rename `getRelativeSelectableItem` to 
`findRelativeSelectableItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed 
(Volker E.)
+
+### Styles
+* RadioOptionWidget, CheckboxMultioptionWidget: Support very long labels 
(Bartosz Dziewoński)
+* WikimediaUI theme: Harmonize toolbar icon/indicator opacity (Volker E.)
+* WikimediaUI theme: Improve ListToolGroup's color and opacity handling 
(Volker E.)
+* WikimediaUI theme: Simplify disabled tool opacity rules (Volker E.)
+
+### Code
+* BookletLayout#getClosestPage: Fix version number of deprecation (Prateek 
Saxena)
+* HtmlSnippet: Throw exception if given non-string content (Bartosz Dziewoński)
+* Use `findFirstSelectableItem` instead of `getFirstSelectableItem` (Prateek 
Saxena)
+* Use `findHighlightedItem` instead of `getHighlightedItem` (Prateek Saxena)
+* Use `findRelativeSelectableItem` instead of `getRelativeSelectableItem` 
(Prateek Saxena)
+* WikimediaUI theme: Concatenate constructive & progressive selectors (Volker 
E.)
+* WikimediaUI theme: Remove unnecessary properties (Volker E.)
+* demos: Add examples of FieldLayout with very long labels (Bartosz Dziewoński)
+* demos: Avoid menu's `box-shadow` from lurkin into toolbar (Volker E.)
+
+
 ## v0.23.0 / 2017-09-05
 ### Breaking changes
 * [BREAKING CHANGE] Remove CardLayout and references in IndexLayout (Volker E.)
diff --git a/package.json b/package.json
index 808e454..c06d083 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.23.0",
+  "version": "0.23.1",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
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] oojs/ui[master]: Tag v0.23.1

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379144 )

Change subject: Tag v0.23.1
..

Tag v0.23.1

Change-Id: I0ec2bb33feafbbc113a6604b65a2f450b0537db5
---
M History.md
M package.json
2 files changed, 26 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/44/379144/1

diff --git a/History.md b/History.md
index 478480b..7c4e6b3 100644
--- a/History.md
+++ b/History.md
@@ -1,4 +1,29 @@
 # OOjs UI Release History
+## v0.23.1 / 2017-09-19
+### Deprecations
+* [DEPRECATING CHANGE] SelectWidget: Rename `getFirstSelectableItem` to 
`findFirstSelectableItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] SelectWidget: Rename `getHighlightedItem` to 
`findHighlightedItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] SelectWidget: Rename `getRelativeSelectableItem` to 
`findRelativeSelectableItem` (Prateek Saxena)
+* [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed 
(Volker E.)
+
+### Styles
+* RadioOptionWidget, CheckboxMultioptionWidget: Support very long labels 
(Bartosz Dziewoński)
+* WikimediaUI theme: Harmonize toolbar icon/indicator opacity (Volker E.)
+* WikimediaUI theme: Improve ListToolGroup's color and opacity handling 
(Volker E.)
+* WikimediaUI theme: Simplify disabled tool opacity rules (Volker E.)
+
+### Code
+* BookletLayout#getClosestPage: Fix version number of deprecation (Prateek 
Saxena)
+* HtmlSnippet: Throw exception if given non-string content (Bartosz Dziewoński)
+* Use `findFirstSelectableItem` instead of `getFirstSelectableItem` (Prateek 
Saxena)
+* Use `findHighlightedItem` instead of `getHighlightedItem` (Prateek Saxena)
+* Use `findRelativeSelectableItem` instead of `getRelativeSelectableItem` 
(Prateek Saxena)
+* WikimediaUI theme: Concatenate constructive & progressive selectors (Volker 
E.)
+* WikimediaUI theme: Remove unnecessary properties (Volker E.)
+* demos: Add examples of FieldLayout with very long labels (Bartosz Dziewoński)
+* demos: Avoid menu's `box-shadow` from lurkin into toolbar (Volker E.)
+
+
 ## v0.23.0 / 2017-09-05
 ### Breaking changes
 * [BREAKING CHANGE] Remove CardLayout and references in IndexLayout (Volker E.)
diff --git a/package.json b/package.json
index 808e454..c06d083 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
 {
   "name": "oojs-ui",
-  "version": "0.23.0",
+  "version": "0.23.1",
   "description": "User interface classes built on the OOjs framework.",
   "keywords": [
 "oojs-plugin",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Redo the way spinners and ready/loading states ar...

2017-09-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379143 )

Change subject: RCFilters: Redo the way spinners and ready/loading states are 
managed
..

RCFilters: Redo the way spinners and ready/loading states are managed

The mw-rcfilters-ui-ready class was being set on no fewer than 4 elements,
all with different meanings, and some with no relevant styling at all.
It also did not distinguish between "the UI is initializing" and
"we are loading new results".

Remove mw-rcfilters-ui-ready completely (and remove some code that added
or removed it pointlessly), and create two new CSS classes on the .
mw-rcfilters-ui-initialized is added when the UI has initialized, and
is used to hide the old UI and display a spinner while the UI loads.
mw-rcfilters-ui-loading is added when we start loading new results
and removed when they arrive; it's used to grey out the results
area and add a spinner.

Bonus: make the spinner appear in a different place depending on why
it's being shown: when initializing, it's shown in the place where the
UI will soon appear; when loading, it's shown near the top of the
changes list.

Change-Id: Ib5c8a36654ba44880823fdade8cad52ffa59ed69
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FormWrapperWidget.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
6 files changed, 37 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/43/379143/1

diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
index 83e5796..13da97f 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
@@ -50,8 +50,9 @@
filtersModel, changesListModel, controller, $( 
'fieldset.cloptions' ) );
 
$( '.rcfilters-container' ).append( 
filtersWidget.$element );
-   $( 'body' ).append( $overlay );
-   $( '.rcfilters-head' ).addClass( 
'mw-rcfilters-ui-ready' );
+   $( 'body' )
+   .append( $overlay )
+   .addClass( 'mw-rcfilters-ui-initialized' );
 
$( 'a.mw-helplink' ).attr(
'href',
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
index cc5ecd4..0ab2c01 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
@@ -1,6 +1,9 @@
 @import 'mediawiki.mixins.animation';
 @import 'mw.rcfilters.mixins';
 
+@rcfilters-spinner-width: 70px;
+@rcfilters-head-min-height: 200px;
+
 // Corrections for the standard special page
 .client-js {
.cloptions {
@@ -8,15 +11,14 @@
}
 
.rcfilters-head {
-   min-height: 200px;
+   min-height: @rcfilters-head-min-height;
+   }
+   body:not( .mw-rcfilters-ui-initialized ) .rcfilters-head {
+   opacity: 0.5;
+   pointer-events: none;
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   opacity: 0.5;
-   pointer-events: none;
-
-   .cloptions {
-   display: none;
-   }
+   .cloptions {
+   display: none;
}
}
 
@@ -32,22 +34,23 @@
// message of our own
display: none;
}
+   }
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   opacity: 0.5;
-   }
+   body:not( .mw-rcfilters-ui-initialized ) .mw-changeslist,
+   body.mw-rcfilters-ui-loading .mw-changeslist {
+   opacity: 0.5;
}
 
.rcfilters-spinner {
-   margin: -2em auto 0;
-   width: 70px;
-   opacity: 0.8;
display: none;
-   white-space: nowrap;
+   position: absolute;
+   left: 50%;
+   width: @rcfilters-spinner-width;
+   // Make sure the middle of the spinner is centered, rather than 
its left edge
+   margin-left: -@rcfilters-spinner-width/2;
 
-   &:not( .mw-rcfilters-ui-ready ) {
-   display: block;
-   }
+   opacity: 0.8;
+   white-space: nowrap;
 
& 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Yet another attempt to fix the populateIpChanges script

2017-09-19 Thread MusikAnimal (Code Review)
MusikAnimal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379142 )

Change subject: Yet another attempt to fix the populateIpChanges script
..

Yet another attempt to fix the populateIpChanges script

It appears we'd need to update  if there are no results for
the given block.

Bug: T175962
Change-Id: Ice1bdae3d16cf365da14c6df0e8d91d2b954e064
---
M maintenance/populateIpChanges.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/maintenance/populateIpChanges.php 
b/maintenance/populateIpChanges.php
index 17f49ee..859c089 100644
--- a/maintenance/populateIpChanges.php
+++ b/maintenance/populateIpChanges.php
@@ -88,6 +88,7 @@
$numRows = $rows->numRows();
 
if ( !$rows || $numRows === 0 ) {
+   $blockStart = $blockEnd + 1;
break;
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update AUTHORS.txt

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

Change subject: Update AUTHORS.txt
..


Update AUTHORS.txt

Change-Id: Ifbd66135a8e91a910d5ea6554c56f0d6f75a089c
---
M .mailmap
M AUTHORS.txt
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/.mailmap b/.mailmap
index 1b4ff47..890b6ca 100644
--- a/.mailmap
+++ b/.mailmap
@@ -39,8 +39,9 @@
 Jeroen De Dauw 
 Joel Sahleen 
 Jon Robson  
-Lucie Kaffee 
 Katie Filbert 
+Lucie Kaffee 
+Mainframe98 
 Marko Obrovac 
 Mhutti1 
 Moritz Schubotz 
diff --git a/AUTHORS.txt b/AUTHORS.txt
index 78d66e3..3a448c2 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -30,6 +30,7 @@
 Darian Anthony Patrick 
 David Causse 
 Diederik van Liere 
+Dmitry Brant 
 Douglas Gardner 
 Dylan Grafmyre 
 Ebrahim Byagowi 
@@ -60,12 +61,15 @@
 Kunal Mehta 
 Lucie Kaffee 
 Luke Faraone 
+Mainframe98 
 Marcel Ruiz Forns 
 Mark A. Hershberger 
 Mark Holmquist 
 Marko Obrovac 
 Matthew Flaschen 
+Matthias Mullie 
 Max Semenik 
+Merlijn van Deen 
 Mhutti1 
 Michael Holloway 
 Moriel Schottlender 
@@ -82,12 +86,14 @@
 Pavel Astakhov 
 Peter Hedenskog 
 Petr Pchelko 
+Prateek Saxena 
 Rainer Rillke 
 Roan Kattouw 
 Rob Moen 
 S Page 
 Sage Ross 
 Sam Reed 
+Sam Smith 
 Sergey Leschina 
 Stanislav Malyshev 
 Stephane Bisson 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifbd66135a8e91a910d5ea6554c56f0d6f75a089c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Mainframe98 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as ...

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

Change subject: [DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to 
be removed
..


[DEPRECATING CHANGE] icons: Flag unused 'watchlist' icon as to be removed

Change-Id: I94cc0379b5ef138556cecae2a41cea8621d1b397
---
M demos/pages/icons.js
M src/themes/apex/icons-interactions.json
M src/themes/wikimediaui/icons-interactions.json
3 files changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/demos/pages/icons.js b/demos/pages/icons.js
index dbb266c..75a9f85 100644
--- a/demos/pages/icons.js
+++ b/demos/pages/icons.js
@@ -67,8 +67,7 @@
'printer',
'search',
'settings',
-   'subtract',
-   'watchlist'
+   'subtract'
],
moderation: [
'block',
diff --git a/src/themes/apex/icons-interactions.json 
b/src/themes/apex/icons-interactions.json
index c1695a7..8aa804e 100644
--- a/src/themes/apex/icons-interactions.json
+++ b/src/themes/apex/icons-interactions.json
@@ -66,6 +66,8 @@
"watchlist": { "file": {
"ltr": "images/icons/watchlist-ltr.svg",
"rtl": "images/icons/watchlist-rtl.svg"
-   } }
+   },
+   "deprecated": "This will be removed in v0.24.0."
+   }
}
 }
diff --git a/src/themes/wikimediaui/icons-interactions.json 
b/src/themes/wikimediaui/icons-interactions.json
index ab0ecef..1fb333a 100644
--- a/src/themes/wikimediaui/icons-interactions.json
+++ b/src/themes/wikimediaui/icons-interactions.json
@@ -89,6 +89,8 @@
"watchlist": { "file": {
"ltr": "images/icons/watchlist-ltr.svg",
"rtl": "images/icons/watchlist-rtl.svg"
-   } }
+   },
+   "deprecated": "This will be removed in v0.24.0."
+   }
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I94cc0379b5ef138556cecae2a41cea8621d1b397
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Pginer 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbar: Merge two selectors with same property

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

Change subject: Toolbar: Merge two selectors with same property
..


Toolbar: Merge two selectors with same property

Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a
---
M src/styles/Toolbar.less
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less
index 10a4d21..13ec632 100644
--- a/src/styles/Toolbar.less
+++ b/src/styles/Toolbar.less
@@ -17,10 +17,7 @@
display: inline;
white-space: nowrap;
 
-   .oo-ui-toolbar-narrow & {
-   white-space: normal;
-   }
-
+   .oo-ui-toolbar-narrow &,
// Tools like PopupToolGroup can have a lot of content, which 
should be wrapped normally
.oo-ui-tool {
white-space: normal;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.30.0-wmf.19]: ApiVisualEditor: Fix checkbox label message handling with Me...

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

Change subject: ApiVisualEditor: Fix checkbox label message handling with 
Message objects
..


ApiVisualEditor: Fix checkbox label message handling with Message objects

Follow-up to df9e564b735a96cb7bcc75eca83530bef312cc14. Eh, this is
hacky. I did not think this through when making the original change.

Bug: T176249
Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df
(cherry picked from commit 9c8eded5d9f1f05064220efec345e82a4adb1063)
---
M ApiVisualEditor.php
1 file changed, 22 insertions(+), 10 deletions(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 89e43e3..ec9fff4 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -477,20 +477,32 @@
$user->isWatched( $title ),
];
$checkboxesDef = 
$editPage->getCheckboxesDefinition( $states );
-   $checkboxesMessages = [];
-   foreach ( $checkboxesDef as $name => $options ) 
{
+   $checkboxesMessagesList = [];
+   foreach ( $checkboxesDef as $name => &$options 
) {
if ( isset( $options['tooltip'] ) ) {
-   $checkboxesMessages[ 
"accesskey-{$options['tooltip']}" ] =
-   $this->msg( 
"accesskey-{$options['tooltip']}" )->plain();
-   $checkboxesMessages[ 
"tooltip-{$options['tooltip']}" ] =
-   $this->msg( 
"tooltip-{$options['tooltip']}" )->plain();
+   $checkboxesMessagesList[] = 
"accesskey-{$options['tooltip']}";
+   $checkboxesMessagesList[] = 
"tooltip-{$options['tooltip']}";
}
if ( isset( $options['title-message'] ) 
) {
-   $checkboxesMessages[ 
$options['title-message'] ] =
-   $this->msg( 
$options['title-message'] )->plain();
+   $checkboxesMessagesList[] = 
$options['title-message'];
+   if ( !is_string( 
$options['title-message'] ) ) {
+   // Extract only the 
key. Any parameters are included in the fake message definition
+   // passed via 
$checkboxesMessages. (This changes $checkboxesDef by reference.)
+   
$options['title-message'] = $this->msg( $options['title-message'] )->getKey();
+   }
}
-   $checkboxesMessages[ 
$options['label-message'] ] =
-   $this->msg( 
$options['label-message'] )->plain();
+   $checkboxesMessagesList[] = 
$options['label-message'];
+   if ( !is_string( 
$options['label-message'] ) ) {
+   // Extract only the key. Any 
parameters are included in the fake message definition
+   // passed via 
$checkboxesMessages. (This changes $checkboxesDef by reference.)
+   $options['label-message'] = 
$this->msg( $options['label-message'] )->getKey();
+   }
+   }
+   $checkboxesMessages = [];
+   foreach ( $checkboxesMessagesList as 
$messageSpecifier ) {
+   // $messageSpecifier may be a string or 
a Message object
+   $message = $this->msg( 
$messageSpecifier );
+   $checkboxesMessages[ $message->getKey() 
] = $message->plain();
}
$templates = 
$editPage->makeTemplatesOnThisPageList( $editPage->getTemplates() );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: Jforrester 

[MediaWiki-commits] [Gerrit] labs...heritage[master]: [WIP]Group unused images per source page

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

Change subject: [WIP]Group unused images per source page
..

[WIP]Group unused images per source page

Also ensures that all candidates for a given monuments id are always
displayed even if this brings us over the max threshold.

WIP because:
* needs testing
* look over if more info can be sent to stats
* possibly integrate with T176200 update

Bug: T117327
Change-Id: Ifd1915eb7ce810d1ecfa0d6ce98007726593d1eb
---
M erfgoedbot/unused_monument_images.py
1 file changed, 56 insertions(+), 33 deletions(-)


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

diff --git a/erfgoedbot/unused_monument_images.py 
b/erfgoedbot/unused_monument_images.py
index 07676d5..5f60e80 100644
--- a/erfgoedbot/unused_monument_images.py
+++ b/erfgoedbot/unused_monument_images.py
@@ -24,30 +24,9 @@
 _logger = "unused_images"
 
 
-def processCountry(countrycode, lang, countryconfig, conn, cursor, conn2, 
cursor2, local_write):
-'''
-Work on a single country.
-'''
-if not countryconfig.get('unusedImagesPage'):
-# unusedImagesPage not set, just skip silently.
-return False
-
-unusedImagesPage = countryconfig.get('unusedImagesPage')
-project = countryconfig.get('project', u'wikipedia')
-commonsTrackerCategory = countryconfig.get(
-'commonsTrackerCategory').replace(u' ', u'_')
-
-withoutPhoto = getMonumentsWithoutPhoto(countrycode, lang, conn, cursor)
-photos = getMonumentPhotos(commonsTrackerCategory, conn2, cursor2)
-
-pywikibot.log(u'withoutPhoto %s elements' % (len(withoutPhoto),))
-pywikibot.log(u'photos %s elements' % (len(photos),))
-
-# People can add a /header template for with more info
-text = u'{{#ifexist:{{FULLPAGENAME}}/header | {{/header}} }}\n'
-text += u'\n'
-totalImages = 0
-maxImages = 1000
+def group_unused_images_by_source(photos, withoutPhoto, countryconfig):
+"""Identify all unused images and group them by source page and id."""
+unused_images = {}
 
 for catSortKey in sorted(photos.keys()):
 try:
@@ -74,24 +53,68 @@
 try:
 source_link = common.get_source_link(
 withoutPhoto.get(monumentId),
-countryconfig.get('type'),
-monumentId)
+countryconfig.get('type'))
+if source_link not in unused_images:
+unused_images[source_link] = {}
 except ValueError:
 pywikibot.warning(
 u'Could not find wikiSourceList for %s (%s)' % (
 monumentId, withoutPhoto.get(monumentId)))
 continue
 imageName = photos.get(catSortKey)
-# pywikibot.output(u'Key %s returned a result' % (monumentId,))
-# pywikibot.output(imageName)
-if totalImages <= maxImages:
-text += u'File:{0}|{1}\n'.format(
-unicode(imageName, 'utf-8'), source_link)
-totalImages += 1
+
+if monumentId not in unused_images[source_link]:
+unused_images[source_link][monumentId] = []
+
+unused_images[source_link][monumentId].append(imageName)
 except ValueError:
 pywikibot.warning(u'Got value error for %s' % (monumentId,))
 
-text += u''
+return unused_images
+
+
+#TODO send more stats back to main
+def processCountry(countrycode, lang, countryconfig, conn, cursor, conn2, 
cursor2, local_write):
+'''
+Work on a single country.
+'''
+if not countryconfig.get('unusedImagesPage'):
+# unusedImagesPage not set, just skip silently.
+return False
+
+unusedImagesPage = countryconfig.get('unusedImagesPage')
+project = countryconfig.get('project', u'wikipedia')
+commonsTrackerCategory = countryconfig.get(
+'commonsTrackerCategory').replace(u' ', u'_')
+
+withoutPhoto = getMonumentsWithoutPhoto(countrycode, lang, conn, cursor)
+photos = getMonumentPhotos(commonsTrackerCategory, conn2, cursor2)
+
+pywikibot.log(u'withoutPhoto %s elements' % (len(withoutPhoto),))
+pywikibot.log(u'photos %s elements' % (len(photos),))
+
+# People can add a /header template for with more info
+text = u'{{#ifexist:{{FULLPAGENAME}}/header | {{/header}} }}\n'
+totalImages = 0
+maxImages = 1000
+
+unused_images = group_unused_images_by_source(
+photos, withoutPhoto, countryconfig)
+
+for source_page, value in unused_images.iteritems():
+if totalImages <= maxImages:
+text += u'=== {0} ===\n'.format(source_page)
+text += u'\n'
+for monument_id, candidates in value.iteritems():
+  

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.30.0-wmf.18]: ApiVisualEditor: Fix checkbox label message handling with Me...

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

Change subject: ApiVisualEditor: Fix checkbox label message handling with 
Message objects
..


ApiVisualEditor: Fix checkbox label message handling with Message objects

Follow-up to df9e564b735a96cb7bcc75eca83530bef312cc14. Eh, this is
hacky. I did not think this through when making the original change.

Bug: T176249
Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df
(cherry picked from commit 9c8eded5d9f1f05064220efec345e82a4adb1063)
---
M ApiVisualEditor.php
1 file changed, 22 insertions(+), 10 deletions(-)

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



diff --git a/ApiVisualEditor.php b/ApiVisualEditor.php
index 1fee911..1a5d4f5 100644
--- a/ApiVisualEditor.php
+++ b/ApiVisualEditor.php
@@ -452,20 +452,32 @@
$checkboxes = method_exists( $editPage, 
'getCheckboxes' )
? $editPage->getCheckboxes( $tabindex, 
$states ) : '';
$checkboxesDef = 
$editPage->getCheckboxesDefinition( $states );
-   $checkboxesMessages = [];
-   foreach ( $checkboxesDef as $name => $options ) 
{
+   $checkboxesMessagesList = [];
+   foreach ( $checkboxesDef as $name => &$options 
) {
if ( isset( $options['tooltip'] ) ) {
-   $checkboxesMessages[ 
"accesskey-{$options['tooltip']}" ] =
-   $this->msg( 
"accesskey-{$options['tooltip']}" )->plain();
-   $checkboxesMessages[ 
"tooltip-{$options['tooltip']}" ] =
-   $this->msg( 
"tooltip-{$options['tooltip']}" )->plain();
+   $checkboxesMessagesList[] = 
"accesskey-{$options['tooltip']}";
+   $checkboxesMessagesList[] = 
"tooltip-{$options['tooltip']}";
}
if ( isset( $options['title-message'] ) 
) {
-   $checkboxesMessages[ 
$options['title-message'] ] =
-   $this->msg( 
$options['title-message'] )->plain();
+   $checkboxesMessagesList[] = 
$options['title-message'];
+   if ( !is_string( 
$options['title-message'] ) ) {
+   // Extract only the 
key. Any parameters are included in the fake message definition
+   // passed via 
$checkboxesMessages. (This changes $checkboxesDef by reference.)
+   
$options['title-message'] = $this->msg( $options['title-message'] )->getKey();
+   }
}
-   $checkboxesMessages[ 
$options['label-message'] ] =
-   $this->msg( 
$options['label-message'] )->plain();
+   $checkboxesMessagesList[] = 
$options['label-message'];
+   if ( !is_string( 
$options['label-message'] ) ) {
+   // Extract only the key. Any 
parameters are included in the fake message definition
+   // passed via 
$checkboxesMessages. (This changes $checkboxesDef by reference.)
+   $options['label-message'] = 
$this->msg( $options['label-message'] )->getKey();
+   }
+   }
+   $checkboxesMessages = [];
+   foreach ( $checkboxesMessagesList as 
$messageSpecifier ) {
+   // $messageSpecifier may be a string or 
a Message object
+   $message = $this->msg( 
$messageSpecifier );
+   $checkboxesMessages[ $message->getKey() 
] = $message->plain();
}
$templates = 
$editPage->makeTemplatesOnThisPageList( $editPage->getTemplates() );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieff2c3174479831797bd37a6b1d0df44ed6ce0df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Javascript timestamps are in ms, not s

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

Change subject: Javascript timestamps are in ms, not s
..


Javascript timestamps are in ms, not s

The timeout was intended to be set to 2 days, but due to
a mixup between millis and seconds it was only set to about
3 minutes.

Additionally add an early exit for navigator.doNotTrack, as
event logging won't send the events anyways.

Bug: T174106
Change-Id: I58517c23416822790d93ed714140b6294a8880ad
(cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5515399..0861666 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -19,6 +19,17 @@
return options[ Math.floor( parsed / step ) ];
}
 
+   // See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+   // Taken from https://www.npmjs.com/package/dnt-polyfill
+   if ( window.doNotTrack === '1' ||
+   window.navigator && (
+   window.navigator.doNotTrack === '1' ||
+   window.navigator.doNotTrack === 'yes' ||
+   window.navigator.msDoNotTrack === '1'
+   ) ) {
+   return;
+   }
+
// Page is not part of this test
if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) {
return;
@@ -93,7 +104,7 @@
}
// If we can't record that the survey shouldn't be 
duplicated, just
// opt them out of the survey all together.
-   if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) {
+   if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) 
) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: EBernhardson 
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...WikimediaEvents[wmf/1.30.0-wmf.18]: Javascript timestamps are in ms, not s

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

Change subject: Javascript timestamps are in ms, not s
..


Javascript timestamps are in ms, not s

The timeout was intended to be set to 2 days, but due to
a mixup between millis and seconds it was only set to about
3 minutes.

Additionally add an early exit for navigator.doNotTrack, as
event logging won't send the events anyways.

Bug: T174106
Change-Id: I58517c23416822790d93ed714140b6294a8880ad
(cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5515399..0861666 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -19,6 +19,17 @@
return options[ Math.floor( parsed / step ) ];
}
 
+   // See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+   // Taken from https://www.npmjs.com/package/dnt-polyfill
+   if ( window.doNotTrack === '1' ||
+   window.navigator && (
+   window.navigator.doNotTrack === '1' ||
+   window.navigator.doNotTrack === 'yes' ||
+   window.navigator.msDoNotTrack === '1'
+   ) ) {
+   return;
+   }
+
// Page is not part of this test
if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) {
return;
@@ -93,7 +104,7 @@
}
// If we can't record that the survey shouldn't be 
duplicated, just
// opt them out of the survey all together.
-   if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) {
+   if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) 
) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: EBernhardson 
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/core[wmf/1.30.0-wmf.19]: SpecialRecentchangeslinked: Unconditionally join on the page...

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

Change subject: SpecialRecentchangeslinked: Unconditionally join on the page 
table
..


SpecialRecentchangeslinked: Unconditionally join on the page table

As we do on SpecialRecentchanges and SpecialWatchlist already,
because the last revision filter needs it.

Bug: T176228
Change-Id: I65f0f971df24853999ca445f968dd49fb0640066
(cherry picked from commit b0897c3dee75b50b9dbf87dfd0651a43c9e905f7)
---
M includes/specials/SpecialRecentchangeslinked.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchangeslinked.php 
b/includes/specials/SpecialRecentchangeslinked.php
index e353f0c..a13af55 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -98,11 +98,11 @@
'wl_namespace=rc_namespace'
] ];
}
-   if ( $this->getUser()->isAllowed( 'rollback' ) ) {
-   $tables[] = 'page';
-   $join_conds['page'] = [ 'LEFT JOIN', 
'rc_cur_id=page_id' ];
-   $select[] = 'page_latest';
-   }
+
+   // JOIN on page, used for 'last revision' filter highlight
+   $tables[] = 'page';
+   $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
+   $select[] = 'page_latest';
 
$tagFilter = $opts['tagfilter'] ? explode( '|', 
$opts['tagfilter'] ) : [];
ChangeTags::modifyDisplayQuery(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65f0f971df24853999ca445f968dd49fb0640066
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
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/core[wmf/1.30.0-wmf.18]: SpecialRecentchangeslinked: Unconditionally join on the page...

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

Change subject: SpecialRecentchangeslinked: Unconditionally join on the page 
table
..


SpecialRecentchangeslinked: Unconditionally join on the page table

As we do on SpecialRecentchanges and SpecialWatchlist already,
because the last revision filter needs it.

Bug: T176228
Change-Id: I65f0f971df24853999ca445f968dd49fb0640066
(cherry picked from commit b0897c3dee75b50b9dbf87dfd0651a43c9e905f7)
---
M includes/specials/SpecialRecentchangeslinked.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchangeslinked.php 
b/includes/specials/SpecialRecentchangeslinked.php
index e353f0c..a13af55 100644
--- a/includes/specials/SpecialRecentchangeslinked.php
+++ b/includes/specials/SpecialRecentchangeslinked.php
@@ -98,11 +98,11 @@
'wl_namespace=rc_namespace'
] ];
}
-   if ( $this->getUser()->isAllowed( 'rollback' ) ) {
-   $tables[] = 'page';
-   $join_conds['page'] = [ 'LEFT JOIN', 
'rc_cur_id=page_id' ];
-   $select[] = 'page_latest';
-   }
+
+   // JOIN on page, used for 'last revision' filter highlight
+   $tables[] = 'page';
+   $join_conds['page'] = [ 'LEFT JOIN', 'rc_cur_id=page_id' ];
+   $select[] = 'page_latest';
 
$tagFilter = $opts['tagfilter'] ? explode( '|', 
$opts['tagfilter'] ) : [];
ChangeTags::modifyDisplayQuery(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65f0f971df24853999ca445f968dd49fb0640066
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Florianschmidtwelzow 
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...Timeless[master]: DB_SLAVE -> DB_REPLICA

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

Change subject: DB_SLAVE -> DB_REPLICA
..


DB_SLAVE -> DB_REPLICA

Timeless requires MW 1.29 or newer anyway, so this is perfectly fine,
given that DB_SLAVE is deprecated in modern versions of MW in favor of the
new DB_REPLICA constant (which was even backported to MW 1.27 branch).

Change-Id: I96635a042a7b149cc024f44f3383421a7c7fb721
---
M TimelessTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TimelessTemplate.php b/TimelessTemplate.php
index 5e4ad4f..bee568c 100644
--- a/TimelessTemplate.php
+++ b/TimelessTemplate.php
@@ -724,7 +724,7 @@
}
}
if ( count( $allCats ) > 0 ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select(
[ 'page', 'page_props' ],
[ 'page_id', 'page_title' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I96635a042a7b149cc024f44f3383421a7c7fb721
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Timeless
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Isarra 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: SamanthaNguyen 
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]: Enable jQuery 3 on meta.wikimedia.org

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

Change subject: Enable jQuery 3 on meta.wikimedia.org
..


Enable jQuery 3 on meta.wikimedia.org

Bug: T124742
Change-Id: Ie7531a88e0351b60e5f80423767e5acbf400d552
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 18062b1..0df27d7 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14930,14 +14930,15 @@
'mediawikiwiki' => true,
 
// opt-in (T124742)
-   'plwiki' => true, // @MatmaRex
-   'svwiki' => true, // @Nirmos
+   'metawiki' => true, // @Krinkle
'nlwiki' => true, // @Krinkle
'nlwikibooks' => true, // @Krinkle
'nlwikinews' => true, // @Krinkle
'nlwikiquote' => true, // @Krinkle
'nlwikisource' => true, // @Krinkle
'nlwiktionary' => true, // @Krinkle
+   'plwiki' => true, // @MatmaRex
+   'svwiki' => true, // @Nirmos
 ],
 
 'wgCiteResponsiveReferences' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7531a88e0351b60e5f80423767e5acbf400d552
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Thcipriani 
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...WikiCategoryTagCloud[master]: DB_SLAVE -> DB_REPLICA

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

Change subject: DB_SLAVE -> DB_REPLICA
..


DB_SLAVE -> DB_REPLICA

Change-Id: I6a6d5a6c31912041ae812d2997d52d806988ccaa
---
M WikiCategoryTagCloud.class.php
M extension.json
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/WikiCategoryTagCloud.class.php b/WikiCategoryTagCloud.class.php
index 81658e9..021437f 100644
--- a/WikiCategoryTagCloud.class.php
+++ b/WikiCategoryTagCloud.class.php
@@ -71,7 +71,7 @@
// Add CSS into the output via ResourceLoader
$parser->getOutput()->addModuleStyles( 
'ext.wikicategorytagcloud' );
 
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cloudStyle = ( isset( $params['style'] ) ? 
Sanitizer::checkCss( $params['style'] ) : '' );
$cloudClasses = preg_split( '/\s+/', ( isset( $params['class'] 
) ? htmlspecialchars( $params['class'], ENT_QUOTES ) : '' ) );
diff --git a/extension.json b/extension.json
index 2ab5bfc..21bb1c2 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Wiki Category Tag Cloud",
-   "version": "1.3.2",
+   "version": "1.3.3",
"author": [
"[http://danf.ca/mw/ Daniel Friesen]",
"Jack Phoenix"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a6d5a6c31912041ae812d2997d52d806988ccaa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiCategoryTagCloud
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: SamanthaNguyen 
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...WhosOnline[master]: DB_SLAVE -> DB_REPLICA

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

Change subject: DB_SLAVE -> DB_REPLICA
..


DB_SLAVE -> DB_REPLICA

Change-Id: I3a1b7719a8333b5237a5a8a61047cb6f8c9757bb
---
M WhosOnlineSpecialPage.php
M extension.json
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/WhosOnlineSpecialPage.php b/WhosOnlineSpecialPage.php
index 910bd58..aae2f84 100644
--- a/WhosOnlineSpecialPage.php
+++ b/WhosOnlineSpecialPage.php
@@ -105,7 +105,7 @@
 
// get list of logged-in users being online
protected function getAnonsOnline() {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$row = $dbr->selectRow(
'online',
diff --git a/extension.json b/extension.json
index 77f54eb..b7b1de8 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "WhosOnline",
-   "version": "1.7.1",
+   "version": "1.7.2",
"author": [
"Maciej Brencz"
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a1b7719a8333b5237a5a8a61047cb6f8c9757bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WhosOnline
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
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...RandomImageByCategory[master]: DB_SLAVE -> DB_REPLICA

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

Change subject: DB_SLAVE -> DB_REPLICA
..


DB_SLAVE -> DB_REPLICA

Change-Id: Ifb4023ef0fb88356e71efc7bbb9d7f411a89a29a
---
M RandomImageByCategory.class.php
M extension.json
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/RandomImageByCategory.class.php b/RandomImageByCategory.class.php
index c6fec14..01ce7a7 100644
--- a/RandomImageByCategory.class.php
+++ b/RandomImageByCategory.class.php
@@ -65,7 +65,7 @@
$params['LIMIT'] = $limit;
}
 
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select(
array( 'page', 'categorylinks' ),
array( 'page_title' ),
diff --git a/extension.json b/extension.json
index 1d1c96a..5d3479d 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "RandomImageByCategory",
-   "version": "1.3",
+   "version": "1.3.1",
"author": [
"Aaron Wright",
"David Pean",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb4023ef0fb88356e71efc7bbb9d7f411a89a29a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomImageByCategory
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: SamanthaNguyen 
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]: Gerrit: Update systemd script

2017-09-19 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379136 )

Change subject: Gerrit: Update systemd script
..

Gerrit: Update systemd script

Change-Id: I8577db4e09171e95b297ab5ab0b5aec392a7ef52
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/379136/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8577db4e09171e95b297ab5ab0b5aec392a7ef52
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Define a constant to allow switching dbs for phpunit

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

Change subject: Define a constant to allow switching dbs for phpunit
..


Define a constant to allow switching dbs for phpunit

Change-Id: I449b0fb8a430c4f42db1095975aa1de9989501ae
---
M sites/default/bootstrap-phpunit.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/sites/default/bootstrap-phpunit.php 
b/sites/default/bootstrap-phpunit.php
index 310d531..833e14c 100644
--- a/sites/default/bootstrap-phpunit.php
+++ b/sites/default/bootstrap-phpunit.php
@@ -1,5 +1,6 @@
 https://gerrit.wikimedia.org/r/359174
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I449b0fb8a430c4f42db1095975aa1de9989501ae
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Mepps 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Make all erfgoedbot scripts respect the skipping mechanisms.

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

Change subject: Make all erfgoedbot scripts respect the skipping mechanisms.
..

Make all erfgoedbot scripts respect the skipping mechanisms.

The skipping mechanisms (introduced through the merging of the
Wikidata branch) consist of the `skip` field in the config and
the `-skip_wd` command line argument.

Also: set nl-wd_(nl) to skip

Change-Id: I68f345cf09e555e2ea37c4db0197ccc11954abc1
---
M erfgoedbot/add_coord_to_articles.py
M erfgoedbot/add_object_location_monuments.py
M erfgoedbot/categorize_images.py
M erfgoedbot/images_of_monuments_without_id.py
M erfgoedbot/missing_commonscat_links.py
M erfgoedbot/monuments_config/nl-wd_nl.json
M erfgoedbot/populate_image_table.py
M erfgoedbot/unused_monument_images.py
M erfgoedbot/update_id_dump.py
9 files changed, 65 insertions(+), 12 deletions(-)


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

diff --git a/erfgoedbot/add_coord_to_articles.py 
b/erfgoedbot/add_coord_to_articles.py
index 5a9950e..58fa56e 100644
--- a/erfgoedbot/add_coord_to_articles.py
+++ b/erfgoedbot/add_coord_to_articles.py
@@ -291,6 +291,7 @@
 def main():
 countrycode = u''
 lang = u''
+skip_wd = False
 connMon = None
 cursorMon = None
 
@@ -302,10 +303,12 @@
 countrycode = value
 elif option == '-langcode':
 lang = value
+elif option == '-skip_wd':
+skip_wd = True
 else:
 raise Exception(
-u'Bad parameters. Expected "-countrycode", "-langcode" or '
-u'pywikibot args. Found "{}"'.format(option))
+u'Bad parameters. Expected "-countrycode", "-langcode", '
+u'"-skip_wd" or pywikibot args. Found "{}"'.format(option))
 
 if countrycode and lang:
 if not mconfig.countries.get((countrycode, lang)):
@@ -318,6 +321,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.output(u'Working on countrycode "%s" in language "%s"' % 
(countrycode, lang))
 processCountry(countrycode, lang, countryconfig, 
wikiData.get(lang), connMon, cursorMon)
 
diff --git a/erfgoedbot/add_object_location_monuments.py 
b/erfgoedbot/add_object_location_monuments.py
index 25816f4..ae780d9 100644
--- a/erfgoedbot/add_object_location_monuments.py
+++ b/erfgoedbot/add_object_location_monuments.py
@@ -206,6 +206,7 @@
 def main():
 countrycode = u''
 lang = u''
+skip_wd = False
 local_write = None
 
 # Connect database, we need that
@@ -218,12 +219,15 @@
 countrycode = value
 elif option == '-langcode':
 lang = value
+elif option == '-skip_wd':
+skip_wd = True
 elif option == '-local_write':
 local_write = value
 else:
 raise Exception(
 u'Bad parameters. Expected "-countrycode", "-langcode", '
-u'"-local_write" or pywikibot args. Found "{}"'.format(option))
+u'"-skip_wd", "-local_write" or pywikibot args. '
+u'Found "{}"'.format(option))
 
 pywikibot.setSite(pywikibot.getSite(u'commons', u'commons'))
 
@@ -241,6 +245,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
 if not countryconfig.get('autoGeocode'):
 pywikibot.output(
 u'"%s" in language "%s" is not supported in auto geocode 
mode (yet).' % (countrycode, lang))
diff --git a/erfgoedbot/categorize_images.py b/erfgoedbot/categorize_images.py
index 06c7b71..746dc59 100644
--- a/erfgoedbot/categorize_images.py
+++ b/erfgoedbot/categorize_images.py
@@ -531,6 +531,7 @@
 countrycode = u''
 lang = u''
 overridecat = u''
+skip_wd = False
 local_write = None
 conn = None
 cursor = None
@@ -545,13 +546,15 @@
 lang = value
 elif option == '-overridecat':
 overridecat = value
+elif option == '-skip_wd':
+skip_wd = True
 elif option == '-local_write':
 local_write = value
 else:
 raise Exception(
 u'Bad parameters. Expected "-countrycode", "-langcode", '
-u'"-overridecat", "-local_write" or pywikibot args. '
-u'Found "{}"'.format(option))
+u'"-overridecat", "-skip_wd", "-local_write" or pywikibot '
+  

[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update DNT check to support IE 11 and Safari 7

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

Change subject: Update DNT check to support IE 11 and Safari 7
..


Update DNT check to support IE 11 and Safari 7

Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf
---
M modules/ext.eventLogging.core.js
1 file changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index 1cb4b98..b5a1086 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -243,10 +243,20 @@
 * If the user expressed a preference not to be tracked, or if
 * $wgEventLoggingBaseUri is unset, this method is a no-op.
 *
+* See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+*
 * @param {string} url URL to request from the server.
 * @return undefined
 */
-   sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl )
+   sendBeacon: (
+   // Support: Firefox < 32 (yes/no)
+   /1|yes/.test( navigator.doNotTrack ) ||
+   // Support: IE 11, Safari 7.1.3+ 
(window.doNotTrack)
+   window.doNotTrack === '1' ||
+   // Support: IE 9, IE 10 (navigator.msDoNotTrack)
+   navigator.msDoNotTrack === '1' ||
+   !baseUrl
+   )
? $.noop
: navigator.sendBeacon
? function ( url ) { try { 
navigator.sendBeacon( url ); } catch ( e ) {} }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nuria 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Toolbar: Merge two selectors with same property

2017-09-19 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379139 )

Change subject: Toolbar: Merge two selectors with same property
..

Toolbar: Merge two selectors with same property

Change-Id: Ia18d2e905906682f598c9f86ac1e2c27ae1f818a
---
M src/styles/Toolbar.less
1 file changed, 1 insertion(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/39/379139/1

diff --git a/src/styles/Toolbar.less b/src/styles/Toolbar.less
index 10a4d21..13ec632 100644
--- a/src/styles/Toolbar.less
+++ b/src/styles/Toolbar.less
@@ -17,10 +17,7 @@
display: inline;
white-space: nowrap;
 
-   .oo-ui-toolbar-narrow & {
-   white-space: normal;
-   }
-
+   .oo-ui-toolbar-narrow &,
// Tools like PopupToolGroup can have a lot of content, which 
should be wrapped normally
.oo-ui-tool {
white-space: normal;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix empty( $thing->doStuff() ) use

2017-09-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379138 )

Change subject: Fix empty( $thing->doStuff() ) use
..

Fix empty( $thing->doStuff() ) use

Change-Id: Ibe97a3874f11f00eed950c527c3ddcdfe49a1de4
---
M gateway_common/GatewayPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 49520f1..da3bf0f 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -499,7 +499,7 @@
'ffname' => $form,
) );
$this->displayForm();
-   } elseif ( !empty( $result->getErrors() ) ) {
+   } elseif ( count( $result->getErrors() ) ) {
$this->displayForm();
} else {
// Success.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe97a3874f11f00eed950c527c3ddcdfe49a1de4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] mediawiki...WikimediaEvents[master]: [WIP] Removing instrumentation for outdated schemas

2017-09-19 Thread Nuria (Code Review)
Nuria has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379137 )

Change subject: [WIP] Removing instrumentation for outdated schemas
..

[WIP] Removing instrumentation for outdated schemas

Data provided by these schemas is avilable as part of EventBus and also
as part of the edit data lake created from mediawiki edit reconstruction:

Edit Data Lake:
https://wikitech.wikimedia.org/wiki/Analytics/Data_Lake/Edits

EventBus:
https://wikitech.wikimedia.org/wiki/EventBus#MediaWiki

Removing events for:
https://meta.wikimedia.org/wiki/Schema:PageCreation
https://meta.wikimedia.org/wiki/Schema:PageDeletion
https://meta.wikimedia.org/wiki/Schema:PageMove
https://meta.wikimedia.org/wiki/Schema:PageRestoration

Bug: T171629
Change-Id: Ia4d916761d29cf9e91a15956531ebca0f00ad95f
---
M WikimediaEventsHooks.php
1 file changed, 0 insertions(+), 133 deletions(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index d70b94f..ee71f06 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -253,139 +253,6 @@
return true;
}
 
-   /**
-* Logs article deletions using the PageDeletion schema.
-*
-* @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ArticleDeleteComplete
-* @see https://meta.wikimedia.org/wiki/Schema:PageDeletion
-* @param WikiPage $article The article that was deleted
-* @param User $user The user that deleted the article
-* @param string $reason The reason that the article was deleted
-* @param int $id The ID of the article that was deleted
-* @return true
-*/
-   public static function onArticleDeleteComplete( WikiPage $article, User 
$user, $reason, $id ) {
-   $title = $article->getTitle();
-   EventLogging::logEvent( 'PageDeletion', 7481655, [
-   'userId' => $user->getId(),
-   'userText' => $user->getName(),
-   'pageId' => $id,
-   'namespace' => $title->getNamespace(),
-   'title' => $title->getDBkey(),
-   'comment' => $reason,
-   ] );
-   return true;
-   }
-
-   /**
-* Logs article undelete using pageRestored schema
-*
-* @see http://www.mediawiki.org/wiki/Manual:Hooks/ArticleUndelete
-* @see https://meta.wikimedia.org/wiki/Schema:PageRestoration
-* @param Title $title Title of article restored
-* @param bool $created whether the revision created the page (default 
false)
-* @param string $comment Reason for undeleting the page
-* @param int $oldPageId The ID of the article that was deleted
-*/
-   public static function onArticleUndelete( $title, $created, $comment, 
$oldPageId ) {
-   global $wgUser;
-   EventLogging::logEvent( 'PageRestoration', 7758372, [
-   'userId' => $wgUser->getId(),
-   'userText' => $wgUser->getName(),
-   'oldPageId' => $oldPageId,
-   'newPageId' => $title->getArticleID(),
-   'namespace' => $title->getNamespace(),
-   'title' => $title->getDBkey(),
-   'comment' => $comment,
-   ] );
-   }
-
-   /**
-* Logs a page creation event, based on the given parameters.
-*
-* Currently, this is either a normal page creation, or an automatic 
creation
-* of a redirect when a page is moved.
-*
-* @see https://meta.wikimedia.org/wiki/Schema:PageCreation
-*
-* @param User $user user creating the page
-* @param int $pageId page ID of new page
-* @param Title $title title of created page
-* @param int $revId revision ID of first revision of created page
-*/
-   protected static function logPageCreation( User $user, $pageId, Title 
$title,
-   $revId ) {
-   EventLogging::logEvent( 'PageCreation', 7481635, [
-   'userId' => $user->getId(),
-   'userText' => $user->getName(),
-   'pageId' => $pageId,
-   'namespace' => $title->getNamespace(),
-   'title' => $title->getDBkey(),
-   'revId' => $revId,
-   ] );
-   }
-
-   /**
-* Logs title moves with the PageMove schema.
-*
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/TitleMoveComplete
-* @see 

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: Don't attempt to copy to ip_changes in PageArchive class.

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

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..


Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: MusikAnimal 
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]: Gerrit: Use strings in container.slave

2017-09-19 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379134 )

Change subject: Gerrit: Use strings in container.slave
..

Gerrit: Use --slave in systemd script if using slave

Change-Id: Idc207af7c1b17ff9e75073a08bdd0dab9c896a63
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/379134/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc207af7c1b17ff9e75073a08bdd0dab9c896a63
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.19]: Don't attempt to copy to ip_changes in PageArchive class.

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

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..


Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: MusikAnimal 
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]: Don't attempt to copy to ip_changes in PageArchive class.

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

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..


Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)

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



diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MusikAnimal 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: [WIP] Add add form summary

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

Change subject: [WIP] Add add form summary
..

[WIP] Add add form summary

Change-Id: I921f9e7356645ef9fb5dce4c6c1c771900c36cb4
TODO: Add message
---
M src/Api/AddForm.php
A src/Api/AddFormSummary.php
2 files changed, 78 insertions(+), 6 deletions(-)


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

diff --git a/src/Api/AddForm.php b/src/Api/AddForm.php
index 74df872..708024a 100644
--- a/src/Api/AddForm.php
+++ b/src/Api/AddForm.php
@@ -101,9 +101,7 @@
//FIXME: Module description message
//FIXME: Parameters messages
//FIXME: Examples
-   //FIXME: Serialize nextFormId
//FIXME: Response structure? - Added form
-   //FIXME: Don't show nextFormId in response
 
$params = $this->extractRequestParams();
$parserResult = $this->requestParser->parse( $params );
@@ -126,7 +124,8 @@
$lexemeId = $request->getLexemeId();
$lexeme = $this->entitySavingHelper->loadEntity( $lexemeId );
$newForm = $request->addFormTo( $lexeme );
-   $status = $this->entitySavingHelper->attemptSaveEntity( 
$lexeme, new Summary() );
+   $summary = new AddFormSummary( $lexemeId, $newForm );
+   $status = $this->entitySavingHelper->attemptSaveEntity( 
$lexeme, $summary );
 
$apiResult = $this->getResult();
 
@@ -151,9 +150,6 @@
self::PARAM_REQUIRED => true,
],
'token' => null,
-   'baserevid' => [
-   self::PARAM_TYPE => 'integer',
-   ],
'bot' => [
self::PARAM_TYPE => 'boolean',
self::PARAM_DFLT => false,
diff --git a/src/Api/AddFormSummary.php b/src/Api/AddFormSummary.php
new file mode 100644
index 000..e8eba16
--- /dev/null
+++ b/src/Api/AddFormSummary.php
@@ -0,0 +1,76 @@
+lexemeId = $lexemeId;
+   $this->addedForm = $addedForm;
+   }
+
+   public function getUserSummary() {
+   return null;
+   }
+
+   public function getLanguageCode() {
+   return null;
+   }
+
+   public function getMessageKey() {
+   return 'add-form';
+   }
+
+   public function getCommentArgs() {
+   return [ $this->addedForm->getId()->getSerialization() ];
+   }
+
+   public function getAutoSummaryArgs() {
+   return array_values( 
$this->addedForm->getRepresentations()->toTextArray() );
+   }
+
+   public function getModuleName() {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function getActionName() {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function addAutoCommentArgs( $args /*...*/ ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function addAutoSummaryArgs( $args /*...*/ ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function setUserSummary( $summary = null ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function setLanguage( $languageCode = null ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function setModuleName( $name ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+   public function setAction( $name ) {
+   throw new \LogicException( "Should not be called" );
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I921f9e7356645ef9fb5dce4c6c1c771900c36cb4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.18]: Don't attempt to copy to ip_changes in PageArchive class.

2017-09-19 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379133 )

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..

Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/379133/1

diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MusikAnimal 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.30.0-wmf.19]: Don't attempt to copy to ip_changes in PageArchive class.

2017-09-19 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379132 )

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..

Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)


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

diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MusikAnimal 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Fix last vendor commit

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

Change subject: Fix last vendor commit
..


Fix last vendor commit

It used my version of the submodule update, not the actual merged one

Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index c2ecf63..16e33f1 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70
+Subproject commit 16e33f174720fdeccf6c840cf2340ba8ce29a59b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Don't attempt to copy to ip_changes in PageArchive class.

2017-09-19 Thread MusikAnimal (Code Review)
MusikAnimal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379131 )

Change subject: Don't attempt to copy to ip_changes in PageArchive class.
..

Don't attempt to copy to ip_changes in PageArchive class.

This actually happens in Revision::insertOn, so the code is redundant,
but also shouldn't ever execute because it erroneously was checking
for ar_rev_id=0 and not ar_user=0.

This is sometimes causing errors in production, in the rare cases
where ar_rev_id is NULL, and hence (int)ar_rev_id evaluates to 0.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a2
---
M includes/page/PageArchive.php
1 file changed, 1 insertion(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/379131/1

diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php
index c98d4f7..af936cc 100644
--- a/includes/page/PageArchive.php
+++ b/includes/page/PageArchive.php
@@ -734,17 +734,8 @@
'deleted' => $unsuppress ? 0 : 
$row->ar_deleted
] );
 
+   // This will also copy the revision to 
ip_changes if it was an IP edit.
$revision->insertOn( $dbw );
-
-   // Also restore reference to the revision in 
ip_changes if it was an IP edit.
-   if ( (int)$row->ar_rev_id === 0 && IP::isValid( 
$row->ar_user_text ) ) {
-   $ipcRow = [
-   'ipc_rev_id' => $row->ar_rev_id,
-   'ipc_rev_timestamp' => 
$row->ar_timestamp,
-   'ipc_hex' => IP::toHex( 
$row->ar_user_text ),
-   ];
-   $dbw->insert( 'ip_changes', $ipcRow, 
__METHOD__ );
-   }
 
$restored++;
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update doNotTrack handling for IE 9-11 and Safari > 7.1.3

2017-09-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379130 )

Change subject: Update doNotTrack handling for IE 9-11 and Safari > 7.1.3
..

Update doNotTrack handling for IE 9-11 and Safari > 7.1.3

Per MDN docs various browser expose doNotTrack in slightly different
manners. Update our code to respect doNotTrack on mentioned browsers.

Change-Id: Ic8f18000c4935087f1623a524cc40c74777d73e5
---
M modules/ext.eventLogging.core.js
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/30/379130/1

diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index 1cb4b98..0f8e704 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -243,11 +243,16 @@
 * If the user expressed a preference not to be tracked, or if
 * $wgEventLoggingBaseUri is unset, this method is a no-op.
 *
+* See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+* for how various browsers expose doNotTrack is slightly 
different ways.
+*
 * @param {string} url URL to request from the server.
 * @return undefined
 */
-   sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl )
-   ? $.noop
+   sendBeacon: (
+   /1|yes/.test( navigator.doNotTrack ) || !baseUrl
+   || window.doNotTrack === '1' || 
navigator.msDoNotTrack === '1'
+   ) ? $.noop
: navigator.sendBeacon
? function ( url ) { try { 
navigator.sendBeacon( url ); } catch ( e ) {} }
: function ( url ) { document.createElement( 
'img' ).src = url; },

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Fix last vendor commit

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379128 )

Change subject: Fix last vendor commit
..

Fix last vendor commit

It used my version of the submodule update, not the actual merged one

Change-Id: Id277963d2e5aa6c61343fad7f075c8c6b0abffa0
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/28/379128/1

diff --git a/vendor b/vendor
index c2ecf63..16e33f1 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70
+Subproject commit 16e33f174720fdeccf6c840cf2340ba8ce29a59b

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...EventLogging[master]: Update DNT check to support IE 11 and Safari 7

2017-09-19 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379129 )

Change subject: Update DNT check to support IE 11 and Safari 7
..

Update DNT check to support IE 11 and Safari 7

Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf
---
M modules/ext.eventLogging.core.js
1 file changed, 11 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/29/379129/1

diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index 1cb4b98..41b8aca 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -243,10 +243,20 @@
 * If the user expressed a preference not to be tracked, or if
 * $wgEventLoggingBaseUri is unset, this method is a no-op.
 *
+* See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+*
 * @param {string} url URL to request from the server.
 * @return undefined
 */
-   sendBeacon: ( /1|yes/.test( navigator.doNotTrack ) || !baseUrl )
+   sendBeacon: (
+   // Support: IE 11, Safari 7.1.3+ (window.doNotTrack)
+   // Support: Firefox < 32 (yes/no)
+   // Support: IE 9, IE 10 (navigator.msDoNotTrack)
+   /1|yes/.test(
+   navigator.doNotTrack ||
+   window.doNotTrack ||
+   navigator.msDoNotTrack
+   ) || !baseUrl )
? $.noop
: navigator.sendBeacon
? function ( url ) { try { 
navigator.sendBeacon( url ); } catch ( e ) {} }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2341ffe6a596e8e16abb64d0587b788656894cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
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] wikimedia...crm[deployment]: Vendor submodule update

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

Change subject: Vendor submodule update
..


Vendor submodule update

Vendor updates, Omnimail, SmashPig, Donation interface, minfraud

Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/vendor b/vendor
index 05a1435..c2ecf63 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 05a14356a3e580c649301e5b705154c2cfe761f6
+Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Vendor submodule update

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379127 )

Change subject: Vendor submodule update
..

Vendor submodule update

Vendor updates, Omnimail, SmashPig, Donation interface, minfraud

Change-Id: Ie1e17b5c41812e645c8b39b6ae831a6b2481496f
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/27/379127/1

diff --git a/vendor b/vendor
index 05a1435..c2ecf63 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 05a14356a3e580c649301e5b705154c2cfe761f6
+Subproject commit c2ecf633ab8a51c06419102bde1a8d519e6d3f70

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Dont reach through window to access navigator

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

Change subject: Dont reach through window to access navigator
..


Dont reach through window to access navigator

Avoid accessing navigator via window.  (Causes errors to be missed by
ESLint static analysis, e.g. in case of typos it would normally produce
an lint warning for unknown global but now will not). The check is also
redundant given all browsers implement this global and have for a long
time.

Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 0861666..9e36352 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -22,11 +22,10 @@
// See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
// Taken from https://www.npmjs.com/package/dnt-polyfill
if ( window.doNotTrack === '1' ||
-   window.navigator && (
-   window.navigator.doNotTrack === '1' ||
-   window.navigator.doNotTrack === 'yes' ||
-   window.navigator.msDoNotTrack === '1'
-   ) ) {
+   navigator.doNotTrack === '1' ||
+   navigator.doNotTrack === 'yes' ||
+   navigator.msDoNotTrack === '1'
+   ) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Harvest the source page of unknown fields

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

Change subject: Harvest the source page of unknown fields
..

Harvest the source page of unknown fields

The UnknownFields report is as of now not actionable as it is very
hard to track down the location of the error. This stores all pages
that have a given field, and displays a subset of these as
wikilinks on the report in a third column.

Bug: T117330
Change-Id: Iad3517c0bce961317e493ffad8b34ee5c6f8e363
---
M erfgoedbot/update_database.py
M requirements-test.txt
M tests/test_update_database.py
3 files changed, 104 insertions(+), 10 deletions(-)


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

diff --git a/erfgoedbot/update_database.py b/erfgoedbot/update_database.py
index 11a8f83..08fc4d5 100755
--- a/erfgoedbot/update_database.py
+++ b/erfgoedbot/update_database.py
@@ -141,9 +141,10 @@
 
 def unknownFieldsStatistics(countryconfig, unknownFields, local_write):
 """
-Produce some unknown field statistics to debug.
+Outputs a list of any unknown fields as a wikitext table.
 
-This is still very raw data. Should be formatted and more information.
+The table contains the name and frequency of the field and a sample of
+source pages where this field was encountered.
 """
 site = pywikibot.Site(u'commons', u'commons')
 page = pywikibot.Page(
@@ -152,15 +153,42 @@
 summary = u'Updating the list of unknown fields'
 
 text = u'{| class="wikitable sortable"\n'
-text += u'! Field !! Count\n'
+text += u'! Field !! Count !! Sources\n'
 for key, value in unknownFields.items():
 text += u'|-\n'
-text += u'| %s || %s\n' % (key, value)
+text += u'| {0} || {1} || {2}\n'.format(
+key, value['count'], format_source_field(value['sources'], site))
 
 text += u'|}\n'
 text += u'[[Category:Commons:Monuments database/Unknown fields]]'
 
 common.save_to_wiki_or_local(page, summary, text, local_path=local_write)
+
+
+def format_source_field(sources, site, sample_size=4):
+"""
+Format a list of source pages to fit in the statistics field.
+
+@param sources: set of pywikibot.Page objects
+@param site: the site to which the output should be written (commons)
+@param sample_size: the number of source pages to output
+"""
+source_text = ''
+if len(sources) == 1:
+source_page = list(sources)[0]
+source_text = source_page.title(
+asLink=True, forceInterwiki=True, insite=site)
+else:
+source_slice = list(sources)[:sample_size]
+remaining = len(sources) - len(source_slice)
+for source_page in source_slice:
+source_text += u'\n* {0}'.format(
+source_page.title(
+asLink=True, forceInterwiki=True, insite=site))
+if remaining:
+source_text += u'\n* and {0} more page(s)'.format(remaining)
+
+return source_text
 
 
 def updateMonument(contents, source, countryconfig, conn, cursor, sourcePage):
@@ -338,8 +366,12 @@
 title, field, value),
 _logger)
 if field not in unknownFields:
-unknownFields[field] = 0
-unknownFields[field] += 1
+unknownFields[field] = {
+'count': 0,
+'sources': set()
+}
+unknownFields[field]['count'] += 1
+unknownFields[field]['sources'].add(sourcePage)
 # time.sleep(5)
 
 # If we truncate we don't have to check for primkey (it's a made up one)
diff --git a/requirements-test.txt b/requirements-test.txt
index 9f90b1c..ddd621b 100644
--- a/requirements-test.txt
+++ b/requirements-test.txt
@@ -5,3 +5,4 @@
 nose-cov
 coverage
 yamllint
+orderedset
diff --git a/tests/test_update_database.py b/tests/test_update_database.py
index 1145984..7435094 100644
--- a/tests/test_update_database.py
+++ b/tests/test_update_database.py
@@ -3,6 +3,7 @@
 import mock
 import unittest
 import pywikibot
+from orderedset import OrderedSet
 
 from erfgoedbot import update_database
 
@@ -49,13 +50,21 @@
 self.assertEqual(unknown_fields, {})
 
 def 
test_processMonument_with_one_unknown_param_correctly_returns_unknown_fields(self):
-params = [u'id=1234', u'name=A Monument Name', u'some_unknown_field=An 
unknown field value']
+params = [
+u'id=1234',
+u'name=A Monument Name',
+u'some_unknown_field=An unknown field value'
+]
 unknown_fields = {}
+expected_unknown = {'count': 1, 'sources': set([self.mock_page])}
 with self.assertRaises(update_database.NoPrimkeyException):
 update_database.processMonument(
 params, self.source, 

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

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

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..


Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

+ 9c66737cbd02e1cc343897e500d1ce7ec4b774ab Fix date miscalculation on 
retrieving mailings.
+ 75db28743331c41026431effaad77eca7d8d592f CiviCRM submodule update
  - 30eb051 CRM-21011 Sort out tag descriptions when displaying better

Change-Id: I299ca2535c92d60c8a33f547877656136174a01b
---
0 files changed, 0 insertions(+), 0 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I299ca2535c92d60c8a33f547877656136174a01b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
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...Cite[master]: Follow-up I1e0ae39: Set isResponsive on new ref lists

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

Change subject: Follow-up I1e0ae39: Set isResponsive on new ref lists
..


Follow-up I1e0ae39: Set isResponsive on new ref lists

Change-Id: Icd51637b28b44963eddd5d43323dbda329c6a2fc
---
M modules/ve-cite/ve.ui.MWReferencesListCommand.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/ve-cite/ve.ui.MWReferencesListCommand.js 
b/modules/ve-cite/ve.ui.MWReferencesListCommand.js
index 1e42344..eac79ea 100644
--- a/modules/ve-cite/ve.ui.MWReferencesListCommand.js
+++ b/modules/ve-cite/ve.ui.MWReferencesListCommand.js
@@ -34,8 +34,7 @@
  * @inheritdoc
  */
 ve.ui.MWReferencesListCommand.prototype.execute = function ( surface ) {
-   var
-   fragment = surface.getModel().getFragment(),
+   var fragment = surface.getModel().getFragment(),
selectedNode = fragment.getSelectedNode(),
isReflistNodeSelected = selectedNode && selectedNode instanceof 
ve.dm.MWReferencesListNode;
 
@@ -47,7 +46,8 @@
type: 'mwReferencesList',
attributes: {
listGroup: 'mwReference/',
-   refGroup: ''
+   refGroup: '',
+   isResponsive: mw.config.get( 
'wgCiteResponsiveReferences' )
}
},
{ type: '/mwReferencesList' }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd51637b28b44963eddd5d43323dbda329c6a2fc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Dont reach through window to access navigator

2017-09-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379125 )

Change subject: Dont reach through window to access navigator
..

Dont reach through window to access navigator

Avoid accessing navigator via window.  (Causes errors to be missed by
ESLint static analysis, e.g. in case of typos it would normally produce
an lint warning for unknown global but now will not). The check is also
redundant given all browsers implement this global and have for a long
time.

Change-Id: I4a66b1cb34c48c2f507e3c3689b611874777e8d1
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 0861666..a7a8e8d 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -22,10 +22,10 @@
// See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
// Taken from https://www.npmjs.com/package/dnt-polyfill
if ( window.doNotTrack === '1' ||
-   window.navigator && (
-   window.navigator.doNotTrack === '1' ||
-   window.navigator.doNotTrack === 'yes' ||
-   window.navigator.msDoNotTrack === '1'
+   navigator && (
+   navigator.doNotTrack === '1' ||
+   navigator.doNotTrack === 'yes' ||
+   navigator.msDoNotTrack === '1'
) ) {
return;
}

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' of https://gerrit.wikimedia.org/r/wiki...

2017-09-19 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379124 )

Change subject: Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment
..

Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wikimedia/fundraising/crm into deployment

+ 9c66737cbd02e1cc343897e500d1ce7ec4b774ab Fix date miscalculation on 
retrieving mailings.
+ 75db28743331c41026431effaad77eca7d8d592f CiviCRM submodule update
  - 30eb051 CRM-21011 Sort out tag descriptions when displaying better

Change-Id: I299ca2535c92d60c8a33f547877656136174a01b
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/24/379124/1


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Start to use deb packages to install elastic plugins

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

Change subject: Start to use deb packages to install elastic plugins
..


Start to use deb packages to install elastic plugins

Bug: T164367
Change-Id: Ic84345b89ebb9694621d813ed482740e35d4dd89
---
D puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin
M puppet/modules/elasticsearch/manifests/init.pp
D puppet/modules/elasticsearch/manifests/plugin.pp
M puppet/modules/role/manifests/cirrussearch.pp
4 files changed, 5 insertions(+), 198 deletions(-)

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



diff --git a/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin 
b/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin
deleted file mode 100644
index 53f627b..000
--- a/puppet/modules/elasticsearch/files/mwv-elasticsearch-plugin
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/bin/bash
-
-set -e
-
-ES_VERSION=$(dpkg -l elasticsearch 2>/dev/null | awk '$2 == "elasticsearch" { 
print $3 }')
-if [ -z "$ES_VERSION" ]; then
-  echo "Elasticsearch not installed"
-  exit 1
-fi
-
-ACTION="$1"
-PLUGIN_NAME="$2"
-if [ -z "$3" ]; then
-  INSTALL_ARGS="$PLUGIN_NAME"
-else
-  # Magic up a url to maven central that will download the appropriate version 
of the plugin
-  PLUGIN_GROUP="$3"
-  PLUGIN_ARTIFACT="$4"
-  
INSTALL_ARGS="https://repo1.maven.org/maven2/${PLUGIN_GROUP//.//}/${PLUGIN_ARTIFACT}/${ES_VERSION}/${PLUGIN_ARTIFACT}-${ES_VERSION}.zip;
-fi
-
-PLUGIN_DIR="/usr/share/elasticsearch/plugins/${PLUGIN_NAME}"
-if [ -d "$PLUGIN_DIR" ]; then
-  PLUGIN_INSTALLED="yes"
-  PLUGIN_VERSION=$(awk -F '=' '$1 == "elasticsearch.version" { print $2 }' < 
"$PLUGIN_DIR/plugin-descriptor.properties")
-else
-  PLUGIN_INSTALLED="no"
-  PLUGIN_VERSION=""
-fi
-
-
-case "$ACTION" in
-  check)
-# Check if install is required, used as the 'unless' case in puppet exec
-if [ "$PLUGIN_INSTALLED" = "yes" -a "$ES_VERSION" = "$PLUGIN_VERSION" ]; 
then
-  exit 0
-else
-  exit 1
-fi
-;;
-
-  install)
-if [ "$PLUGIN_INSTALLED" = "yes" -a "$ES_VERSION" = "$PLUGIN_VERSION" ]; 
then
-  echo "$PLUGIN_NAME already installed with version $PLUGIN_VERSION"
-else
-  if [ "$PLUGIN_INSTALLED" = "yes" ]; then
-echo "Pruning old version ($PLUGIN_VERSION) of $PLUGIN_NAME"
-/usr/share/elasticsearch/bin/elasticsearch-plugin remove "$PLUGIN_NAME"
-  fi
-
-  # We need to delete all old plugins before trying to install a new
-  # one, "bin/elasticsearch-plugin install" will simply fail if an 
unsupported one
-  # is found in the plugins directory.
-  find /usr/share/elasticsearch/plugins -mindepth 1 -maxdepth 1 -type d \
-'!' '(' -exec test -e '{}/plugin-descriptor.properties' ';' -a \
--exec egrep -q "^elasticsearch.version=${ES_VERSION}" \
-   '{}/plugin-descriptor.properties' ';' \
-')' \
--exec sh -c '/usr/share/elasticsearch/bin/elasticsearch-plugin remove 
`basename {}`' ';'
-
-  echo "Installing elasticsearch plugin: $INSTALL_ARGS"
-  /usr/share/elasticsearch/bin/elasticsearch-plugin install "$INSTALL_ARGS"
-fi
-;;
-
-  uninstall)
-if [ "$PLUGIN_INSTALLED" = "yes" ]; then
-  echo "Removing version $PLUGIN_VERSION of $PLUGIN_NAME"
-  /usr/share/elasticsearch/bin/elasticsearch-plugin remove "$PLUGIN_NAME"
-else
-  echo "$PLUGIN_NAME not installed, doing nothing"
-fi
-;;
-
-  *)
-echo "Unknown action provided. Use [check|install|uninstall]"
-exit 1
-;;
-
-esac
-
diff --git a/puppet/modules/elasticsearch/manifests/init.pp 
b/puppet/modules/elasticsearch/manifests/init.pp
index 8ec14c6..3525d9a 100644
--- a/puppet/modules/elasticsearch/manifests/init.pp
+++ b/puppet/modules/elasticsearch/manifests/init.pp
@@ -20,13 +20,6 @@
 require => Package['elasticsearch'],
 }
 
-file { '/usr/local/bin/mwv-elasticsearch-plugin':
-source => 'puppet:///modules/elasticsearch/mwv-elasticsearch-plugin',
-owner  => 'root',
-group  => 'root',
-mode   => '0555',
-}
-
 service { 'elasticsearch':
 ensure  => running,
 enable  => true,
diff --git a/puppet/modules/elasticsearch/manifests/plugin.pp 
b/puppet/modules/elasticsearch/manifests/plugin.pp
deleted file mode 100644
index d4d86d5..000
--- a/puppet/modules/elasticsearch/manifests/plugin.pp
+++ /dev/null
@@ -1,78 +0,0 @@
-# == Define: elasticsearch::plugin
-#
-# An Elasticsearch plugin.
-#
-# === Parameters
-#
-# [*title*]
-#   Name of the plugin (artifact).  Examples:
-# experimental-highlighter-elasticsearch-plugin
-# analysis-icu
-#
-# [*group*]
-#   Group of the plugin.  Examples:
-# org.wikimedia.search.highlighter
-#
-# [*esname*]
-#   Name of the plugin seen by elasticsearch
-#
-# [*core*]
-#   Set to true for plugins distributed by 

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove old test harness

2017-09-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379123 )

Change subject: Remove old test harness
..

Remove old test harness

Hasn't been touched since 2013, no longer does its job.

Change-Id: I1214a3302769724487b53ae3f7f1158b97347718
---
D tests/phpunit/unittest.conf.dist
D tests/phpunit/unittest.sh
2 files changed, 0 insertions(+), 387 deletions(-)


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

diff --git a/tests/phpunit/unittest.conf.dist b/tests/phpunit/unittest.conf.dist
deleted file mode 100644
index 174c558..000
--- a/tests/phpunit/unittest.conf.dist
+++ /dev/null
@@ -1,90 +0,0 @@
-#!/bin/sh
-
-#
-# Wikimedia Foundation
-#
-# LICENSE
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-#
-# @categoryUnitTesting
-# @package Fundraising_Miscellaneous
-# @license http://www.gnu.org/copyleft/gpl.html GNU GENERAL PUBLIC 
LICENSE
-# @since   r462
-# @author  Jeremy Postlethwaite 
-#
-
-#
-# This is the distributed configuration file. If you need to make changes to 
-# these settings, copy this file to this directory and remove the ".dist" 
-# extension.
-#
-
-#
-# @var string $UNITTEST_HOSTNAME   The hostname to the webserver.
-#
-: ${UNITTEST_HOSTNAME:="localhost"}
-#
-# @var string $UNITTEST_URLThe url to the webserver. You need the trailing 
-# slash.
-#
-: ${UNITTEST_URL:="http://localhost/queue_handling/tests/"}
-#
-# @var string $PHPUNIT If phpunit.php is not within your shell $PATH, you may
-# specify the full path here.
-#
-: ${PHPUNIT:="phpunit.php"}
-#
-# @var string $PHPUNIT_OPTSBy default, all testing will be run in verbose 
mode.
-#
-: ${PHPUNIT_OPTS:="--verbose"}
-#
-# @var string $PHPUNIT_LIST_GROUPS Specify the relative path to the file 
in 
-# which you want to list groups designated by the doctag @group
-#
-: ${PHPUNIT_LIST_GROUPS:"=AllTests.php"}
-#
-# @var string $PHPUNIT_FILESpecify the relative path to the test in which 
you 
-# want to run. You need to omit the ".php" extension.
-#
-: ${PHPUNIT_FILE:="AllTests"}
-#
-# @var string $PHPUNIT_COVERAGE_HTML   The relative path to the code coverage 
-# html directory 
-#
-# This is where code coverage will be saved if the flag -ch is passed. If you 
wish to specify a full path, use:
-# --coverage-html "/some/absolute/path"
-#
-# These directories will need to exist, they will not be created.
-#
-: ${PHPUNIT_COVERAGE_HTML:="logs/coverage/html"}
-#
-# @var string $PHPUNIT_COVERAGE_CLOVER The relative path to the code coverage 
-# clover directory 
-#
-# This is where code coverage will be saved if the flag -ch is passed. If you 
wish to specify a full path, use:
-# --coverage-clover "/some/absolute/path"
-#
-# These directories will need to exist, they will not be created.
-#
-: ${PHPUNIT_COVERAGE_CLOVER:="logs/coverage/clover/index.xml"}
-#
-# @var string $PHPUNIT_TESTDOX_HTMLThe relative path to the testdox output 
html
-# directory. It is okay to put this the same directory as html coverage. 
-#
-# This is where testdox will be saved if the flag -tdh is passed. If you wish 
to specify a full path, use:
-# --testdox-html "/some/absolute/path"
-#
-# These directories will need to exist, they will not be created.
-#
-: ${PHPUNIT_TESTDOX_HTML:="logs/coverage/html/testdox.html"}
-
diff --git a/tests/phpunit/unittest.sh b/tests/phpunit/unittest.sh
deleted file mode 100755
index f124229..000
--- a/tests/phpunit/unittest.sh
+++ /dev/null
@@ -1,297 +0,0 @@
-#!/bin/bash
-
-#
-# Wikimedia Foundation
-#
-# LICENSE
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adding a list of bogus ifNames

2017-09-19 Thread Ayounsi (Code Review)
Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379122 )

Change subject: Adding a list of bogus ifNames
..

Adding a list of bogus ifNames

Starting on 15.1X49-D110, Junos SRX have an interface named "vlan" that shows as
up/down and can't be disabled, commented, etc which triggers our
monitorings.

Change-Id: I35a7310f600a9db683d7dc0e730da8ff31e337a1
---
M modules/nagios_common/files/check_commands/check_ifstatus_nomon
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/379122/1

diff --git a/modules/nagios_common/files/check_commands/check_ifstatus_nomon 
b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
index 9e2becc..a9b912d 100755
--- a/modules/nagios_common/files/check_commands/check_ifstatus_nomon
+++ b/modules/nagios_common/files/check_commands/check_ifstatus_nomon
@@ -100,7 +100,7 @@
 my @unused_ports ;
 my %session_opts;
 
-
+my @ignoredIfNames = ["vlan"];
 
 
 
@@ -175,7 +175,7 @@
# check only if interface is administratively up
 if ($ifStatus{$key}{$snmpIfAdminStatus} == 1 ) {
# check only if interface type is not listed in 
%excluded
-   if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} && 
(!defined $ifXTable || $ifStatus{$key}{$snmpIfAlias} !~ /\bno-mon\b/)) {
+   if (!defined $excluded{$ifStatus{$key}{$snmpIfType}} && 
(!defined $ifXTable || $ifStatus{$key}{$snmpIfAlias} !~ /\bno-mon\b/) && 
!($ifStatus{$key}{$snmpIfName} ~~ @ignoredIfNames)) {
if ($ifStatus{$key}{$snmpIfOperStatus} == 1 ) { 
$ifup++ ;}
if ($ifStatus{$key}{$snmpIfOperStatus} == 2 ) {
$ifdown++ ;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Don't hide mw-changeslist-line-prefix in enhanced...

2017-09-19 Thread Catrope (Code Review)
Catrope has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379121 )

Change subject: RCFilters: Don't hide mw-changeslist-line-prefix in enhanced 
mode
..

RCFilters: Don't hide mw-changeslist-line-prefix in enhanced mode

It contains the 'x' buttons to unwatch pages when the relevant
preference is enabled.

Bug: T176264
Change-Id: Ie8eb913d55165ad2c548230cd61cd9ee189d9504
---
M 
resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
1 file changed, 0 insertions(+), 9 deletions(-)


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

diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
index f331f75..913f9a2 100644
--- 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
+++ 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.ChangesListWrapperWidget.js
@@ -311,15 +311,6 @@
.append( $highlights.clone() )
);
 
-   // We are adding and changing cells in a table that, 
despite having nested rows,
-   // is actually all one big table. To do that right, we 
want to remove the 'placeholder'
-   // cell from the top row, because we're actually adding 
that placeholder in the children
-   // with the highlights.
-   $content.find( 'table.mw-enhanced-rc tr:first-child 
td.mw-changeslist-line-prefix' )
-   .detach();
-   $content.find( 'table.mw-enhanced-rc tr:first-child 
td.mw-enhanced-rc' )
-   .prop( 'colspan', '2' );
-
$enhancedNestedPagesCell
.before(
$( '' )

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Don't send empty or '0' address fields to minFraud

2017-09-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379120 )

Change subject: Don't send empty or '0' address fields to minFraud
..

Don't send empty or '0' address fields to minFraud

Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765
---
M extras/custom_filters/filters/minfraud/minfraud.body.php
1 file changed, 12 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/20/379120/1

diff --git a/extras/custom_filters/filters/minfraud/minfraud.body.php 
b/extras/custom_filters/filters/minfraud/minfraud.body.php
index 828986e..e2f83cd 100644
--- a/extras/custom_filters/filters/minfraud/minfraud.body.php
+++ b/extras/custom_filters/filters/minfraud/minfraud.body.php
@@ -209,13 +209,19 @@
}
 
protected function getBillingParams( $data ) {
-   return [
-   'city' => $data['city'],
-   // FIXME: region should use the ISO 3166-2 code
-   'region' => $data['state_province'],
-   'postal' => $data['postal_code'],
-   'country' => $data['country'],
+   $map = [
+   'city' => 'city',
+   'region' => 'state_province',
+   'postal' => 'postal_code',
+   'country' => 'country'
];
+   $billingParams = [];
+   foreach ( $map as $theirs => $ours ) {
+   if ( !empty( $data[$ours] ) && $data[$ours] !== '0' ) {
+   $billingParams[$theirs] = $data[$ours];
+   }
+   }
+   return $billingParams;
}
 
protected function getEventParams( $data ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eb56ab704c1966349a23bd444e6228c578ca765
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
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] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.19]: Javascript timestamps are in ms, not s

2017-09-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379119 )

Change subject: Javascript timestamps are in ms, not s
..

Javascript timestamps are in ms, not s

The timeout was intended to be set to 2 days, but due to
a mixup between millis and seconds it was only set to about
3 minutes.

Additionally add an early exit for navigator.doNotTrack, as
event logging won't send the events anyways.

Bug: T174106
Change-Id: I58517c23416822790d93ed714140b6294a8880ad
(cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/19/379119/1

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5515399..0861666 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -19,6 +19,17 @@
return options[ Math.floor( parsed / step ) ];
}
 
+   // See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+   // Taken from https://www.npmjs.com/package/dnt-polyfill
+   if ( window.doNotTrack === '1' ||
+   window.navigator && (
+   window.navigator.doNotTrack === '1' ||
+   window.navigator.doNotTrack === 'yes' ||
+   window.navigator.msDoNotTrack === '1'
+   ) ) {
+   return;
+   }
+
// Page is not part of this test
if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) {
return;
@@ -93,7 +104,7 @@
}
// If we can't record that the survey shouldn't be 
duplicated, just
// opt them out of the survey all together.
-   if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) {
+   if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) 
) {
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.19
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[wmf/1.30.0-wmf.18]: Javascript timestamps are in ms, not s

2017-09-19 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379118 )

Change subject: Javascript timestamps are in ms, not s
..

Javascript timestamps are in ms, not s

The timeout was intended to be set to 2 days, but due to
a mixup between millis and seconds it was only set to about
3 minutes.

Additionally add an early exit for navigator.doNotTrack, as
event logging won't send the events anyways.

Bug: T174106
Change-Id: I58517c23416822790d93ed714140b6294a8880ad
(cherry picked from commit a3d63b999c3e1c15db66f524548dcddec85db998)
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 12 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/18/379118/1

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5515399..0861666 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -19,6 +19,17 @@
return options[ Math.floor( parsed / step ) ];
}
 
+   // See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+   // Taken from https://www.npmjs.com/package/dnt-polyfill
+   if ( window.doNotTrack === '1' ||
+   window.navigator && (
+   window.navigator.doNotTrack === '1' ||
+   window.navigator.doNotTrack === 'yes' ||
+   window.navigator.msDoNotTrack === '1'
+   ) ) {
+   return;
+   }
+
// Page is not part of this test
if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) {
return;
@@ -93,7 +104,7 @@
}
// If we can't record that the survey shouldn't be 
duplicated, just
// opt them out of the survey all together.
-   if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) {
+   if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) 
) {
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: wmf/1.30.0-wmf.18
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Javascript timestamps are in ms, not s

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

Change subject: Javascript timestamps are in ms, not s
..


Javascript timestamps are in ms, not s

The timeout was intended to be set to 2 days, but due to
a mixup between millis and seconds it was only set to about
3 minutes.

Additionally add an early exit for navigator.doNotTrack, as
event logging won't send the events anyways.

Bug: T174106
Change-Id: I58517c23416822790d93ed714140b6294a8880ad
---
M modules/ext.wikimediaEvents.humanSearchRelevance.js
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 5515399..0861666 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -19,6 +19,17 @@
return options[ Math.floor( parsed / step ) ];
}
 
+   // See 
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/doNotTrack
+   // Taken from https://www.npmjs.com/package/dnt-polyfill
+   if ( window.doNotTrack === '1' ||
+   window.navigator && (
+   window.navigator.doNotTrack === '1' ||
+   window.navigator.doNotTrack === 'yes' ||
+   window.navigator.msDoNotTrack === '1'
+   ) ) {
+   return;
+   }
+
// Page is not part of this test
if ( !mw.config.exists( 'wgWMESearchRelevancePages' ) ) {
return;
@@ -93,7 +104,7 @@
}
// If we can't record that the survey shouldn't be 
duplicated, just
// opt them out of the survey all together.
-   if ( !mw.storage.set( timeoutKey, now + 2 * 86400 ) ) {
+   if ( !mw.storage.set( timeoutKey, now + 2 * 8640 ) 
) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58517c23416822790d93ed714140b6294a8880ad
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Jdrewniak 
Gerrit-Reviewer: TheDJ 
Gerrit-Reviewer: Tjones 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lazy creation for heavy menu

2017-09-19 Thread Eranroz (Code Review)
Eranroz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379117 )

Change subject: Lazy creation for heavy menu
..

Lazy creation for heavy menu

Assumptions:
* Generally if we have a model we don't need UI
* UI can be created lazy if it is not shown to user

Bug: T176250
Change-Id: Iba7f889d8610de2eb3056248cd1c664b0cd90940
---
M resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
2 files changed, 30 insertions(+), 3 deletions(-)


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

diff --git a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js 
b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
index 83e5796..0c82f84 100644
--- a/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
+++ b/resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
@@ -90,7 +90,13 @@
}
};
 
-   $( rcfilters.init );
+   // Early execute of init
+   if ( document.readyState === 'interactive' ||  document.readyState === 
'complete' ) {
+   rcfilters.init();
+   } else {
+
+   $( rcfilters.init );
+   }
 
module.exports = rcfilters;
 
diff --git 
a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js 
b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
index 07d4506..4a6b131 100644
--- a/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
+++ b/resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.MenuSelectWidget.js
@@ -32,6 +32,7 @@
this.views = {};
this.userSelecting = false;
 
+   this.menuInitialized = false;
this.inputValue = '';
this.$overlay = config.$overlay || this.$element;
this.$body = $( '' ).addClass( 
'mw-rcfilters-ui-menuSelectWidget-body' );
@@ -128,10 +129,22 @@
this.switchView( this.model.getCurrentView() );
};
 
+
/**
-* Respond to model initialize event. Populate the menu from the model
+* Respond to toggle, popule the menu if not created yet
 */
-   mw.rcfilters.ui.MenuSelectWidget.prototype.onModelInitialize = function 
() {
+   mw.rcfilters.ui.MenuSelectWidget.prototype.toggle = function ( show ) {
+   this.lazyMenuCreation();
+   mw.rcfilters.ui.MenuSelectWidget.parent.prototype.toggle.call( 
this, show );
+   }
+
+   /**
+* lazy creation of the menu
+*/
+   mw.rcfilters.ui.MenuSelectWidget.prototype.lazyMenuCreation = function 
() {
+   if ( this.menuInitialized ) return;
+   this.menuInitialized  = true;
+
var widget = this,
viewGroupCount = {},
groups = this.model.getFilterGroups();
@@ -188,6 +201,14 @@
} );
 
this.switchView( this.model.getCurrentView() );
+
+   }
+
+   /**
+* Respond to model initialize event. Populate the menu from the model
+*/
+   mw.rcfilters.ui.MenuSelectWidget.prototype.onModelInitialize = function 
() {
+   this.menuInitialized = false;
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: CSSMin: Mangle whitespace in embedded SVGs

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

Change subject: CSSMin: Mangle whitespace in embedded SVGs
..


CSSMin: Mangle whitespace in embedded SVGs

Convert newlines and tabs to spaces (which can be unencoded),
and consolidate runs of multiple spaces into a single space.
Also remove any leading and trailing spaces that might result
(most files end in a newline, for example).

Bug: T175318
Change-Id: Ic66c6acb37079cae84dd80ab2d5f2c829cf2df96
---
M includes/libs/CSSMin.php
M tests/phpunit/includes/libs/CSSMinTest.php
2 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/includes/libs/CSSMin.php b/includes/libs/CSSMin.php
index adaae17..a9c021e 100644
--- a/includes/libs/CSSMin.php
+++ b/includes/libs/CSSMin.php
@@ -150,7 +150,14 @@
'%3A' => ':', // Unencode colons
'%3D' => '=', // Unencode equals signs
'%22' => '"', // Unencode double quotes
+   '%0A' => ' ', // Change newlines to spaces
+   '%0D' => ' ', // Change carriage returns to 
spaces
+   '%09' => ' ', // Change tabs to spaces
] );
+   // Consolidate runs of multiple spaces in a row
+   $encoded = preg_replace( '/ {2,}/', ' ', $encoded );
+   // Remove leading and trailing spaces
+   $encoded = preg_replace( '/^ | $/', '', $encoded );
$uri = 'data:' . $type . ',' . $encoded;
if ( !$ie8Compat || strlen( $uri ) < 
self::DATA_URI_SIZE_LIMIT ) {
return $uri;
diff --git a/tests/phpunit/includes/libs/CSSMinTest.php 
b/tests/phpunit/includes/libs/CSSMinTest.php
index 62f990b..a770fa4 100644
--- a/tests/phpunit/includes/libs/CSSMinTest.php
+++ b/tests/phpunit/includes/libs/CSSMinTest.php
@@ -271,9 +271,9 @@
// data: URIs for red.gif, green.gif, circle.svg
$red   = 
'data:image/gif;base64,R0lGODlhAQABAIAAAP8AADAAACwAAQABAAACAkQBADs=';
$green = 
'data:image/gif;base64,R0lGODlhAQABAICAADAAACwAAQABAAACAkQBADs=';
-   $svg = 'data:image/svg+xml,%3C%3Fxml version="1.0" 
encoding="UTF-8"%3F%3E%0A'
+   $svg = 'data:image/svg+xml,%3C%3Fxml version="1.0" 
encoding="UTF-8"%3F%3E '
. '%3Csvg xmlns="http://www.w3.org/2000/svg; width="8" 
height='
-   . '"8"%3E%0A%09%3Ccircle cx="4" cy="4" 
r="2"/%3E%0A%3C/svg%3E%0A';
+   . '"8"%3E %3Ccircle cx="4" cy="4" r="2"/%3E %3C/svg%3E';
 
// @codingStandardsIgnoreStart Generic.Files.LineLength
return [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic66c6acb37079cae84dd80ab2d5f2c829cf2df96
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Platonides 
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...Elastica[master]: Upgrade to Elastica 5.3.0

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

Change subject: Upgrade to Elastica 5.3.0
..


Upgrade to Elastica 5.3.0

Explicitly declare elasticsearch-php to apply the php version check
hack and not to download extra dependencies.
Extra deps seems to be used only by elasticsearch-php transport layer
which is not needed since we use Elastica transport.

Bug: T174654
Change-Id: I95abded2d17bb0387ccee70e8fb3924ceadb10c2
---
M composer.json
1 file changed, 29 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index f2df57e..7c5ba7b 100644
--- a/composer.json
+++ b/composer.json
@@ -16,15 +16,15 @@
"type": "package",
"package": {
"name": "ruflin/elastica",
-   "version": "5.1.0",
+   "version": "5.3.0",
"dist": {
-   "url": 
"https://github.com/ruflin/Elastica/archive/5.1.0.zip;,
+   "url": 
"https://github.com/ruflin/Elastica/archive/5.3.0.zip;,
"type": "zip"
},
"source": {
"url": 
"https://github.com/ruflin/Elastica.git;,
"type": "git",
-   "reference": "tags/5.1.0"
+   "reference": "tags/5.3.0"
},
"autoload": {
"psr-4": {
@@ -32,14 +32,39 @@
}
},
"require": {
+   "php": ">=5.5.0",
+   "elasticsearch/elasticsearch": "5.3.0"
+   }
+   }
+   },
+   {
+   "type": "package",
+   "package": {
+   "name": "elasticsearch/elasticsearch",
+   "version": "5.3.0",
+   "dist": {
+   "url": 
"https://api.github.com/repos/elastic/elasticsearch-php/zipball/50e5b1c63db68839b8acc1f4766769570a27a448;,
+   "type": "zip"
+   },
+   "source": {
+   "url": 
"https://github.com/elastic/elasticsearch-php.git;,
+   "type": "git",
+   "reference": "tags/v5.3.0"
+   },
+   "require": {
"php": ">=5.5.0"
+   },
+   "autoload": {
+   "psr-4": {
+   "Elasticsearch\\": 
"src/Elasticsearch/"
+   }
}
}
}
],
"require": {
"php": ">=5.5.9",
-   "ruflin/elastica": "5.1.0"
+   "ruflin/elastica": "5.3.0"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95abded2d17bb0387ccee70e8fb3924ceadb10c2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Elastica
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: EBernhardson 
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] apps...wikipedia[master]: Reduce preferred thumb size(s)

2017-09-19 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379116 )

Change subject: Reduce preferred thumb size(s)
..

Reduce preferred thumb size(s)

Currently we request 320px thumbnails, even for tiny list item thumbnails.
This is a poor use of often-expensive user data.

This patch splits the preferred thumbnail size into two new defaults, both
smaller than the current 320px:

(1) A much smaller 75px thumb size for use in list item cards (the most
common usage in the app); and

(2) A larger 240px thumb size for use in specific areas like news item
cards and link preview galleries.

This change should introduce little to no user-perceptible degradation in
the quality of images in the app.

Change-Id: I4de3a7c8b8f5defcdaab6d2aa78befec791464ad
---
M app/src/main/java/org/wikipedia/Constants.java
M app/src/main/java/org/wikipedia/feed/news/NewsItem.java
M app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java
4 files changed, 9 insertions(+), 8 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/Constants.java 
b/app/src/main/java/org/wikipedia/Constants.java
index aa25890..74caebe 100644
--- a/app/src/main/java/org/wikipedia/Constants.java
+++ b/app/src/main/java/org/wikipedia/Constants.java
@@ -42,7 +42,8 @@
 public static final int SUGGESTION_REQUEST_ITEMS = 5;
 public static final int API_QUERY_MAX_TITLES = 50;
 
-public static final int PREFERRED_THUMB_SIZE = 320;
+public static final int PREFERRED_THUMB_SIZE = 75;
+public static final int PREFERRED_GALLERY_THUMB_SIZE = 240;
 
 public static final int MAX_TABS = 100;
 
diff --git a/app/src/main/java/org/wikipedia/feed/news/NewsItem.java 
b/app/src/main/java/org/wikipedia/feed/news/NewsItem.java
index 7114760..2b2c66d 100644
--- a/app/src/main/java/org/wikipedia/feed/news/NewsItem.java
+++ b/app/src/main/java/org/wikipedia/feed/news/NewsItem.java
@@ -38,7 +38,7 @@
 
 @Nullable public Uri thumb() {
 Uri uri = getFirstImageUri(links);
-return uri != null ? getUrlForSize(uri, 
Constants.PREFERRED_THUMB_SIZE) : null;
+return uri != null ? getUrlForSize(uri, 
Constants.PREFERRED_GALLERY_THUMB_SIZE) : null;
 }
 
 @Nullable Uri featureImage() {
diff --git 
a/app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java 
b/app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java
index 1bc7f7a..bc12f67 100644
--- a/app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java
+++ b/app/src/main/java/org/wikipedia/gallery/GalleryCollectionClient.java
@@ -20,7 +20,7 @@
 import retrofit2.http.Query;
 import retrofit2.http.QueryMap;
 
-import static org.wikipedia.Constants.PREFERRED_THUMB_SIZE;
+import static org.wikipedia.Constants.PREFERRED_GALLERY_THUMB_SIZE;
 
 public class GalleryCollectionClient {
 // TODO: This limit seems pretty arbitrary.  Do we need or want to adjust 
it?
@@ -68,8 +68,8 @@
 private MwQueryResponse fetch(@NonNull Service service, @NonNull PageTitle 
title, boolean getThumbs)
 throws IOException {
 Call call = getThumbs
-? service.fetch("dimensions|mime|url", 
Integer.toString(PREFERRED_THUMB_SIZE),
-Integer.toString(PREFERRED_THUMB_SIZE), title.toString())
+? service.fetch("dimensions|mime|url", 
Integer.toString(PREFERRED_GALLERY_THUMB_SIZE),
+Integer.toString(PREFERRED_GALLERY_THUMB_SIZE), 
title.toString())
 : service.fetch("dimensions|mime", null, null, 
title.toString());
 return call.execute().body();
 }
@@ -78,8 +78,8 @@
   boolean getThumbs, @NonNull 
Map continuation)
 throws IOException {
 Call call = getThumbs
-? service.continueFetch("dimensions|mime|url", 
Integer.toString(PREFERRED_THUMB_SIZE),
-Integer.toString(PREFERRED_THUMB_SIZE), title.toString(), 
continuation)
+? service.continueFetch("dimensions|mime|url", 
Integer.toString(PREFERRED_GALLERY_THUMB_SIZE),
+Integer.toString(PREFERRED_GALLERY_THUMB_SIZE), 
title.toString(), continuation)
 : service.continueFetch("dimensions|mime", null, null, 
title.toString(), continuation);
 return call.execute().body();
 }
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java 
b/app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java
index d0ca49a..9908736 100644
--- a/app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java
+++ b/app/src/main/java/org/wikipedia/readinglist/ReadingListPageInfoClient.java
@@ -67,7 +67,7 @@
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add image response size logging

2017-09-19 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379115 )

Change subject: Add image response size logging
..

Add image response size logging

Provides for storing data on image response lengths in SessionData.

Adds a network interceptor that logs the content-length and running total
for responses with image content-types.  A network interceptor (rather
than an application interceptor) is used so that we don't count responses
served from cache.

Change-Id: I1eb695dabae74cf0870ab5e43157e2093a454adb
---
M app/src/main/java/org/wikipedia/analytics/SessionData.java
M app/src/main/java/org/wikipedia/analytics/SessionFunnel.java
A 
app/src/main/java/org/wikipedia/dataclient/okhttp/ImageResponseSizeLoggingInterceptor.java
M app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
4 files changed, 60 insertions(+), 0 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/analytics/SessionData.java 
b/app/src/main/java/org/wikipedia/analytics/SessionData.java
index 3ba006d..f5d4c02 100644
--- a/app/src/main/java/org/wikipedia/analytics/SessionData.java
+++ b/app/src/main/java/org/wikipedia/analytics/SessionData.java
@@ -20,6 +20,8 @@
 private int pagesFromBack;
 private int pagesWithNoDescription;
 
+private long imageResponseBytes; // not for Scheme:MobileWikiAppSessions 
logging
+
 public void addPageViewed(HistoryEntry entry) {
 switch (entry.getSource()) {
 case HistoryEntry.SOURCE_SEARCH:
@@ -135,6 +137,14 @@
 pagesWithNoDescription++;
 }
 
+public long getImageResponseBytes() {
+return imageResponseBytes;
+}
+
+public void addImageResponseBytes(long bytes) {
+imageResponseBytes += bytes;
+}
+
 public int getTotalPages() {
 return pagesFromSearch + pagesFromRandom + pagesFromLangLink + 
pagesFromInternal
 + pagesFromExternal + pagesFromHistory + pagesFromReadingList 
+ pagesFromNearby
diff --git a/app/src/main/java/org/wikipedia/analytics/SessionFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/SessionFunnel.java
index 71e00a4..9073ea5 100644
--- a/app/src/main/java/org/wikipedia/analytics/SessionFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/SessionFunnel.java
@@ -94,6 +94,14 @@
 sessionData.addRestLatency(System.currentTimeMillis() - 
restSectionsStartTime);
 }
 
+public void addImageResponseBytes(long bytes) {
+sessionData.addImageResponseBytes(bytes);
+}
+
+public long getTotalImageResponseBytes() {
+return sessionData.getImageResponseBytes();
+}
+
 private boolean hasTimedOut() {
 return System.currentTimeMillis() - sessionData.getLastTouchTime()
 > Prefs.getSessionTimeout() * DateUtils.MINUTE_IN_MILLIS;
diff --git 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/ImageResponseSizeLoggingInterceptor.java
 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/ImageResponseSizeLoggingInterceptor.java
new file mode 100644
index 000..d771457
--- /dev/null
+++ 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/ImageResponseSizeLoggingInterceptor.java
@@ -0,0 +1,41 @@
+package org.wikipedia.dataclient.okhttp;
+
+import org.wikipedia.WikipediaApp;
+import org.wikipedia.util.log.L;
+
+import java.io.IOException;
+
+import okhttp3.Interceptor;
+import okhttp3.MediaType;
+import okhttp3.Response;
+
+class ImageResponseSizeLoggingInterceptor implements Interceptor {
+private final WikipediaApp app = WikipediaApp.getInstance();
+
+@Override
+public Response intercept(Chain chain) throws IOException {
+Response rsp = chain.proceed(chain.request());
+
+if (rsp.body() != null) {
+// noinspection ConstantConditions
+MediaType contentType = rsp.body().contentType();
+if (contentType != null && "image".equals(contentType.type())) {
+// noinspection ConstantConditions
+long contentLength = rsp.body().contentLength();
+app.getSessionFunnel().addImageResponseBytes(contentLength);
+long totalImageBytes = 
app.getSessionFunnel().getTotalImageResponseBytes();
+L.v(getLoggingString(contentLength, totalImageBytes));
+}
+}
+
+return rsp;
+}
+
+private static String getLoggingString(long curBytes, long totalBytes) {
+return "Received " + str(curBytes) + " byte image; " + str(totalBytes) 
+ " total image bytes received";
+}
+
+private static String str(long l) {
+return Long.toString(l);
+}
+}
diff --git 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
index 8badaf2..3770bec 100644
--- 

  1   2   3   4   5   >