[MediaWiki-commits] [Gerrit] mediawiki...examples[master]: Trying out things

2017-09-22 Thread Omidfi (Code Review)
Omidfi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379958 )

Change subject: Trying out things
..

Trying out things

This is very nice to try: things.

Bug: 1243
Change-Id: I8de1195f917609177deb29827d449650b3d023f0
---
M Example/Example.hooks.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/Example/Example.hooks.php b/Example/Example.hooks.php
index 0e2b4f5..2de857b 100644
--- a/Example/Example.hooks.php
+++ b/Example/Example.hooks.php
@@ -153,4 +153,5 @@
. htmlspecialchars( FormatJson::encode( $showme, 
/*prettyPrint=*/true ) )
. '';
}
+/* easy right? */
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8de1195f917609177deb29827d449650b3d023f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Omidfi 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: registration: Fix caching of load_composer_autoloader

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

Change subject: registration: Fix caching of load_composer_autoloader
..

registration: Fix caching of load_composer_autoloader

Move the file_exists() check out of the extension processor and into the
extension registry so that it is evaluated at run time instead of during
caching. The prior way is problematic since we don't invalidate the
cache if the existence of the file were to change.

Bug: T176534
Change-Id: I98e4ffdfac9f98397a103966824519afe1375356
---
M includes/registration/ExtensionProcessor.php
M includes/registration/ExtensionRegistry.php
2 files changed, 4 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/57/379957/1

diff --git a/includes/registration/ExtensionProcessor.php 
b/includes/registration/ExtensionProcessor.php
index ce262bd..ffc7a7e 100644
--- a/includes/registration/ExtensionProcessor.php
+++ b/includes/registration/ExtensionProcessor.php
@@ -520,10 +520,7 @@
public function getExtraAutoloaderPaths( $dir, array $info ) {
$paths = [];
if ( isset( $info['load_composer_autoloader'] ) && 
$info['load_composer_autoloader'] === true ) {
-   $path = "$dir/vendor/autoload.php";
-   if ( file_exists( $path ) ) {
-   $paths[] = $path;
-   }
+   $paths[] = "$dir/vendor/autoload.php";
}
return $paths;
}
diff --git a/includes/registration/ExtensionRegistry.php 
b/includes/registration/ExtensionRegistry.php
index bf33c6c..740fed4 100644
--- a/includes/registration/ExtensionRegistry.php
+++ b/includes/registration/ExtensionRegistry.php
@@ -319,7 +319,9 @@
define( $name, $val );
}
foreach ( $info['autoloaderPaths'] as $path ) {
-   require_once $path;
+   if ( file_exists( $path ) ) {
+   require_once $path;
+   }
}
 
$this->loaded += $info['credits'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I98e4ffdfac9f98397a103966824519afe1375356
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...CommentStreams[master]: Improve handling of invalid associated page ids.

2017-09-22 Thread Cicalese (Code Review)
Cicalese has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379780 )

Change subject: Improve handling of invalid associated page ids.
..


Improve handling of invalid associated page ids.

Fix Special:AllComments query. Fix moderator edit permission bug.

Change-Id: I9307edee53f8e53d5229dec4964a74ad34b4f1e2
---
M includes/Comment.php
M includes/CommentStreamsAllComments.php
M includes/CommentStreamsHooks.php
3 files changed, 31 insertions(+), 25 deletions(-)

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



diff --git a/includes/Comment.php b/includes/Comment.php
index 2a99b0a..4f6de3d 100644
--- a/includes/Comment.php
+++ b/includes/Comment.php
@@ -695,9 +695,6 @@
 * @return boolean true if successful
 */
public function update( $comment_title, $wikitext, $user ) {
-   if ( !$this->wikipage->getTitle()->userCan( 'cs-comment' ) ) {
-   return false;
-   }
if ( is_null( $comment_title ) && is_null( $this->getParentId() 
) ) {
return false;
}
diff --git a/includes/CommentStreamsAllComments.php 
b/includes/CommentStreamsAllComments.php
index 8ed5827..594399d 100644
--- a/includes/CommentStreamsAllComments.php
+++ b/includes/CommentStreamsAllComments.php
@@ -76,26 +76,27 @@
$pagename = 
$comment->getWikiPage()->getTitle()->getPrefixedText() ;
$associatedpageid = 
$comment->getAssociatedId();
$associatedpage = WikiPage::newFromId( 
$associatedpageid );
+   $associatedpagename = '';
if ( !is_null( $associatedpage ) ) {
$associatedpagename =
-   
$associatedpage->getTitle()->getPrefixedText();
-   $author = 
$comment->getUser()->getName();
-   $lasteditor =
-   User::newFromId( 
$wikipage->getRevision()->getUser() )->getName();
-   if ( $lasteditor === $author ) {
-   $lasteditor = '';
-   }
-   $wikitext .= '|-' . PHP_EOL;
-   $wikitext .= '|[[' . $pagename 
. ']]' . PHP_EOL;
-   $wikitext .= '|[[' . 
$associatedpagename . ']]' . PHP_EOL;
-   $wikitext .= '|' . 
$comment->getCommentTitle() . PHP_EOL;
-   $wikitext .= '|' . 
$comment->getWikiText() . PHP_EOL;
-   $wikitext .= '|' . $author . 
PHP_EOL;
-   $wikitext .= '|' . $lasteditor 
. PHP_EOL;
-   $wikitext .= '|' . 
$comment->getCreationDate() . PHP_EOL;
-   $wikitext .= '|' . 
$comment->getModificationDate() . PHP_EOL;
-   $index ++;
+   '[[' . 
$associatedpage->getTitle()->getPrefixedText() . ']]';
}
+   $author = 
$comment->getUser()->getName();
+   $lasteditor =
+   User::newFromId( 
$wikipage->getRevision()->getUser() )->getName();
+   if ( $lasteditor === $author ) {
+   $lasteditor = '';
+   }
+   $wikitext .= '|-' . PHP_EOL;
+   $wikitext .= '|[[' . $pagename . ']]' . 
PHP_EOL;
+   $wikitext .= '|' . $associatedpagename 
. PHP_EOL;
+   $wikitext .= '|' . 
$comment->getCommentTitle() . PHP_EOL;
+   $wikitext .= '|' . 
$comment->getWikiText() . PHP_EOL;
+   $wikitext .= '|' . $author . PHP_EOL;
+   $wikitext .= '|' . $lasteditor . 
PHP_EOL;
+   $wikitext .= '|' . 
$comment->getCreationDate() . PHP_EOL;
+   $wikitext .= '|' . 
$comment->getModificationDate() . PHP_EOL;
+   $index ++;
}

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update Butterknife to 8.8.1 and add option 'debuggable = false'

2017-09-22 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379956 )

Change subject: Update Butterknife to 8.8.1 and add option 'debuggable = false'
..

Update Butterknife to 8.8.1 and add option 'debuggable = false'

From the release notes:

Processor option butterknife.debuggable controls whether debug information
is generated. When specified as false, checks for required views being non-
null are elided and casts are no longer guarded with user-friendly error
messages. This reduces the amount of generated code for release builds at
the expense of less friendly exceptions when something breaks.

https://github.com/JakeWharton/butterknife/blob/master/CHANGELOG.md

Change-Id: If7f585d2d796d506dbd8d429993142178ff129be
---
M app/build.gradle
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index 15a1ef6..2880c53 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -62,7 +62,8 @@
 
 javaCompileOptions {
 annotationProcessorOptions {
-argument('butterknife.minSdk', minSdkVersion.apiString)
+arguments('butterknife.minSdk': minSdkVersion.apiString,
+  'butterknife.debuggable': 'false')
 }
 }
 }
@@ -159,7 +160,7 @@
 String retrofitVersion = '2.3.0'
 String supportVersion = '26.0.2'
 String espressoVersion = '2.2.2'
-String butterKnifeVersion = '8.5.1'
+String butterKnifeVersion = '8.8.1'
 String frescoVersion = '1.5.0' // When updating this version, resync file 
copies under
// app/src/main/java/com/facebook
 String testingSupportVersion = '0.5'

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: update diff tests

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

Change subject: Hygiene: update diff tests
..

Hygiene: update diff tests

userinfo is removed now. MW API returns en error in this case, because
it our code assumes the user name is the title, even for subpages in
User namespace. In a follow-up patch we should decide how we want to
handle these cases. This patch is just to get the build fixed.

Change-Id: Ia76d2c4c84d1e5e8c5ae53a87085e9aa996f334e
---
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_TitleLinkEncoding.json
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_TitleLinkEncoding.json
4 files changed, 0 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/54/379954/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 b734a70..53f7bed 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"
@@ -1,9 +1,6 @@
 {
   "lead": {
 "ns": 2,
-"userinfo": {
-  "missing": ""
-},
 "id": 53626841,
 "revision": "77813",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
index 1b13172..9debcfd 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
@@ -1,9 +1,6 @@
 {
   "lead": {
 "ns": 2,
-"userinfo": {
-  "missing": ""
-},
 "id": 51184092,
 "revision": "743079682",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 4e95c58..924b604 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -1,9 +1,6 @@
 {
   "lead": {
 "ns": 2,
-"userinfo": {
-  "missing": ""
-},
 "id": 53626841,
 "revision": "77813",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
index dd2431a..fbacf44 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
@@ -1,9 +1,6 @@
 {
   "lead": {
 "ns": 2,
-"userinfo": {
-  "missing": ""
-},
 "id": 51184092,
 "revision": "743079682",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia76d2c4c84d1e5e8c5ae53a87085e9aa996f334e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Don't try to get userinfo for subpages

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

Change subject: Don't try to get userinfo for subpages
..

Don't try to get userinfo for subpages

The MW API query action would result in an error.

Change-Id: I86c22a4e2433cae16c2e5e5aded050d02b2ef591
---
M routes/mobile-sections.js
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 2680880..a7239e3 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -273,6 +273,10 @@
 });
 }
 
+function isSubpage(title) {
+return title.indexOf('/') > -1;
+}
+
 /**
  * Handles special cases such as main page and different
  * namespaces, preparing for output.
@@ -284,7 +288,7 @@
 const ns = res.meta.ns;
 if (res.meta.mainpage) {
 return mainPageFixPromise(req, res);
-} else if (ns === 2) {
+} else if (ns === 2 && !isSubpage(req.params.title)) {
 return handleUserPagePromise(req, res);
 } else if (ns === 6) {
 return handleFilePagePromise(req, res);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I86c22a4e2433cae16c2e5e5aded050d02b2ef591
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use native ES5 Array prototype methods instead of jQuery

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

Change subject: Use native ES5 Array prototype methods instead of jQuery
..


Use native ES5 Array prototype methods instead of jQuery

Replace
* $.each( array, function ( index, value ) { ... } ) by
  array.forEach( function ( value ) { ... } )

* $.grep( array, function ( value ) { ... } ) by
  array.filter( function ( value ) { ... } )

* $.map( array, function ( value ) { ... } ) by
  array.map( function ( value ) { ... } )

Change-Id: I985ddf710e13c9ae788245349e2791571aeec97e
---
M resources/src/jquery/jquery.accessKeyLabel.js
M resources/src/jquery/jquery.color.js
M resources/src/jquery/jquery.localize.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.language/mediawiki.language.months.js
M resources/src/mediawiki.legacy/wikibits.js
M resources/src/mediawiki.special/mediawiki.special.apisandbox.js
M resources/src/mediawiki.special/mediawiki.special.import.js
M resources/src/mediawiki/api.js
M resources/src/mediawiki/mediawiki.inspect.js
M resources/src/mediawiki/mediawiki.js
11 files changed, 25 insertions(+), 25 deletions(-)

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



diff --git a/resources/src/jquery/jquery.accessKeyLabel.js 
b/resources/src/jquery/jquery.accessKeyLabel.js
index 4f900a4..91b7035 100644
--- a/resources/src/jquery/jquery.accessKeyLabel.js
+++ b/resources/src/jquery/jquery.accessKeyLabel.js
@@ -137,7 +137,7 @@
}
 
parts = ( mw.msg( 'word-separator' ) + mw.msg( 'brackets' ) 
).split( '$1' );
-   regexp = new RegExp( $.map( parts, mw.RegExp.escape ).join( 
'.*?' ) + '$' );
+   regexp = new RegExp( parts.map( mw.RegExp.escape ).join( '.*?' 
) + '$' );
newTitle = oldTitle.replace( regexp, '' );
accessKeyLabel = getAccessKeyLabel( element );
 
diff --git a/resources/src/jquery/jquery.color.js 
b/resources/src/jquery/jquery.color.js
index 847afd4..894cf86 100644
--- a/resources/src/jquery/jquery.color.js
+++ b/resources/src/jquery/jquery.color.js
@@ -28,7 +28,7 @@
}
 
// We override the animation for all of these color styles
-   $.each( [
+   [
'backgroundColor',
'borderBottomColor',
'borderLeftColor',
@@ -36,7 +36,7 @@
'borderTopColor',
'color',
'outlineColor'
-   ], function ( i, attr ) {
+   ].forEach( function ( attr ) {
$.fx.step[ attr ] = function ( fx ) {
if ( !fx.colorInit ) {
fx.start = getColor( fx.elem, attr );
diff --git a/resources/src/jquery/jquery.localize.js 
b/resources/src/jquery/jquery.localize.js
index 05b3891..b1bf0f4 100644
--- a/resources/src/jquery/jquery.localize.js
+++ b/resources/src/jquery/jquery.localize.js
@@ -137,7 +137,7 @@
// Attributes
// Note: there's no way to prevent escaping of values being 
injected into attributes, this is
// on purpose, not a design flaw.
-   $.each( attributes, function ( i, attr ) {
+   attributes.forEach( function ( attr ) {
var msgAttr = attr + '-msg';
$target.find( '[' + msgAttr + ']' ).each( function () {
var $el = $( this );
diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index ecd376a..cac103e 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -77,7 +77,7 @@
if ( node.tagName.toLowerCase() === 'img' ) {
return $node.attr( 'alt' ) || ''; // handle undefined 
alt
}
-   return $.map( $.makeArray( node.childNodes ), function ( elem ) 
{
+   return $.makeArray( node.childNodes ).map( function ( elem ) {
if ( elem.nodeType === Node.ELEMENT_NODE ) {
return getElementSortKey( elem );
}
diff --git a/resources/src/mediawiki.language/mediawiki.language.months.js 
b/resources/src/mediawiki.language/mediawiki.language.months.js
index 5a1a5cb..7b78562 100644
--- a/resources/src/mediawiki.language/mediawiki.language.months.js
+++ b/resources/src/mediawiki.language/mediawiki.language.months.js
@@ -3,7 +3,7 @@
  *
  * Loading this module also ensures the availability of appropriate messages 
via mw.msg.
  */
-( function ( mw, $ ) {
+( function ( mw ) {
var
monthMessages = [
'january', 'february', 'march', 'april',
@@ -21,8 +21,8 @@
'sep', 'oct', 'nov', 'dec'
];
 
-   // Function suitable for passing to jQuery.map
-   // Can't 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mediawiki/hhvm: Move fatal-error.php to Puppet

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

Change subject: mediawiki/hhvm: Move fatal-error.php to Puppet
..

mediawiki/hhvm: Move fatal-error.php to Puppet

Moved here from operations/mediawiki-config.git:/errorpages.
Not used there, but referenced here in Puppet config with the
assumption that a clone of it will exist at /srv/mediawiki.

Path '/srv/mediawiki' could/should be injected as parameter at
some point for purpose of docroot, but even then it'd be nice
not to require the path to be a clone of mediawiki-config.git.

In addition, moving them to Puppet helps centralise the error
pages. Next step: Generate from errorpage template.

Bug: T113114
Change-Id: If534171fd59cf70e37ed4924274674d0d34cd3c8
---
A modules/mediawiki/files/hhvm-fatal-error.php
M modules/mediawiki/manifests/hhvm.pp
2 files changed, 61 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/53/379953/1

diff --git a/modules/mediawiki/files/hhvm-fatal-error.php 
b/modules/mediawiki/files/hhvm-fatal-error.php
new file mode 100644
index 000..f0842f3
--- /dev/null
+++ b/modules/mediawiki/files/hhvm-fatal-error.php
@@ -0,0 +1,51 @@
+
+
+
+Wikimedia Error
+
+* { margin: 0; padding: 0; }
+body { background: #fff; font: 15px/1.6 sans-serif; color: #333; }
+.content { margin: 7% auto 0; padding: 2em 1em 1em; max-width: 640px; }
+.footer { clear: both; margin-top: 14%; border-top: 1px solid #e5e5e5; 
background: #f9f9f9; padding: 2em 0; font-size: 0.8em; text-align: center; }
+img { float: left; margin: 0 2em 2em 0; }
+a img { border: 0; }
+h1 { margin-top: 1em; font-size: 1.2em; }
+p { margin: 0.7em 0 1em 0; }
+a { color: #0645AD; text-decoration: none; }
+a:hover { text-decoration: underline; }
+code { font-family: inherit; }
+.text-muted { color: #777; }
+
+
+https://www.wikimedia.org;>https://www.wikimedia.org/static/images/wmf.png; 
srcset="https://www.wikimedia.org/static/images/wmf-2x.png 2x" alt=Wikimedia 
width=135 height=135>
+Error
+Our servers are currently under maintenance or experiencing a technical 
problem. Please try again in a 
fewminutes.See the error message at the bottom of this page for 
moreinformation.
+
+
+If you report this error to the Wikimedia System Administrators, please 
include the details below.
+
+  PHP fatal error '(no error)' ];
+   $message = $err['message'];
+   # error_get_last() doesn't return a fully populated array in HHVM,
+   # capture file and line manually
+   if ( preg_match( '/#0\\s+(\\S+?)\\((\\d+)\\)/', $message, $matches ) ) {
+ echo ' ' . htmlspecialchars( $matches[1] ) . ' line ' . $matches[2];
+   }
+   $parts = explode( "\n", $message );
+   $message = $parts[0];
+   $message = preg_replace( "/^.*?exception '.*?' with message 
'(.*?)'.*$/im", '\1', $message );
+
+   // Increment a counter.
+   $sock = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
+   $stat = 'MediaWiki.errors.fatal:1|c';
+   @socket_sendto( $sock, $stat, strlen( $stat ), 0, 'statsd.eqiad.wmnet', 
8125 );
+
+  ?>: 
+  
+
+
diff --git a/modules/mediawiki/manifests/hhvm.pp 
b/modules/mediawiki/manifests/hhvm.pp
index 5fec78a..f515c8c 100644
--- a/modules/mediawiki/manifests/hhvm.pp
+++ b/modules/mediawiki/manifests/hhvm.pp
@@ -36,7 +36,7 @@
 },
 server => {
 source_root   => '/srv/mediawiki/docroot',
-error_document500 => 
'/srv/mediawiki/errorpages/hhvm-fatal-error.php',
+error_document500 => '/etc/hhvm/fatal-error.php',
 error_document404 => 
'/srv/mediawiki/errorpages/404.php',
 request_init_document => 
'/srv/mediawiki/wmf-config/HHVMRequestInit.php',
 thread_count  => $max_threads,
@@ -75,6 +75,15 @@
 mode   => '0555',
 }
 
+file { '/etc/hhvm/fatal-error.php':
+source  => 'puppet:///modules/mediawiki/hhvm-fatal-error.php',
+owner   => 'root',
+group   => 'root',
+mode=> '0444',
+require => File['/etc/hhvm'],
+before  => Service['hhvm'],
+}
+
 if os_version('ubuntu >= trusty') {
 # Provision an Upstart task (a short-running process) that runs
 # when HHVM is started and that warms up the JIT by repeatedly

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: sister_search::prevalence: Label & notes fixes

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

Change subject: sister_search::prevalence: Label & notes fixes
..


sister_search::prevalence: Label & notes fixes

Change-Id: I91e1dd0a73a99f7efa3e9a54740941c6bdddc632
---
M tab_documentation/sister_search_prevalence.md
M ui.R
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/tab_documentation/sister_search_prevalence.md 
b/tab_documentation/sister_search_prevalence.md
index 84b58fc..5617a5f 100644
--- a/tab_documentation/sister_search_prevalence.md
+++ b/tab_documentation/sister_search_prevalence.md
@@ -9,6 +9,7 @@
 
 Notes, outages, and inaccuracies
 -
+* * You can select multiple languages to compare simultaneously. (Hold down 
Ctrl on Windows or Command on Mac.)
 * English Wikipedia has a different display than all the other languages due 
to community feedback. Specifically, it does not show results from 
Commons/multimedia, Wikinews, and Wikiversity. Refer to 
[T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more 
details.
 * Languages without a lot of traffic also yield less (sampled) event logging 
data. In order to show somewhat-reliable numbers, languages with less than 20 
recorded searches per day were excluded. Data on them is still available, 
though.
 
diff --git a/ui.R b/ui.R
index 1187242..d91732a 100644
--- a/ui.R
+++ b/ui.R
@@ -376,7 +376,7 @@
   ),
   column(
 dygraphOutput("sister_search_prevalence_plot"),
-div(id = "sister_search_prevalence_plot_legend"),
+div(id = "sister_search_prevalence_plot_legend", style = 
"text-align: right;"),
 width = 9
   )
 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91e1dd0a73a99f7efa3e9a54740941c6bdddc632
Gerrit-PatchSet: 2
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: develop
Gerrit-Owner: Bearloga 
Gerrit-Reviewer: Bearloga 

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


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: sister_search::prevalence: Label & notes fixes

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

Change subject: sister_search::prevalence: Label & notes fixes
..

sister_search::prevalence: Label & notes fixes

Change-Id: I91e1dd0a73a99f7efa3e9a54740941c6bdddc632
---
M tab_documentation/sister_search_prevalence.md
M ui.R
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/52/379952/1

diff --git a/tab_documentation/sister_search_prevalence.md 
b/tab_documentation/sister_search_prevalence.md
index 84b58fc..b0e0f09 100644
--- a/tab_documentation/sister_search_prevalence.md
+++ b/tab_documentation/sister_search_prevalence.md
@@ -9,6 +9,7 @@
 
 Notes, outages, and inaccuracies
 -
+* * You can select multiple projects and multiple languages to compare 
simultaneously. (Hold down Ctrl on Windows or Command on Mac.)
 * English Wikipedia has a different display than all the other languages due 
to community feedback. Specifically, it does not show results from 
Commons/multimedia, Wikinews, and Wikiversity. Refer to 
[T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more 
details.
 * Languages without a lot of traffic also yield less (sampled) event logging 
data. In order to show somewhat-reliable numbers, languages with less than 20 
recorded searches per day were excluded. Data on them is still available, 
though.
 
diff --git a/ui.R b/ui.R
index 1187242..d91732a 100644
--- a/ui.R
+++ b/ui.R
@@ -376,7 +376,7 @@
   ),
   column(
 dygraphOutput("sister_search_prevalence_plot"),
-div(id = "sister_search_prevalence_plot_legend"),
+div(id = "sister_search_prevalence_plot_legend", style = 
"text-align: right;"),
 width = 9
   )
 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91e1dd0a73a99f7efa3e9a54740941c6bdddc632
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/rainbow
Gerrit-Branch: develop
Gerrit-Owner: Bearloga 

___
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 load all of OOUI

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

Change subject: RCFilters: Don't load all of OOUI
..

RCFilters: Don't load all of OOUI

Just the widgets module is enough, we don't need
the windows or toolbars modules.

Change-Id: Ie8ce45f0d46fbc759d4579d619ab8c99c13cb0d5
---
M resources/Resources.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/51/379951/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 818112f..014e6a1 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1917,7 +1917,7 @@
'quotation-marks',
],
'dependencies' => [
-   'oojs-ui',
+   'oojs-ui-widgets',
'jquery.makeCollapsible',
'mediawiki.language',
'mediawiki.user',
@@ -1927,7 +1927,6 @@
'oojs-ui.styles.icons-editing-core',
'oojs-ui.styles.icons-editing-styling',
'oojs-ui.styles.icons-interactions',
-   'oojs-ui.styles.icons-content',
'oojs-ui.styles.icons-layout',
'oojs-ui.styles.icons-media',
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8ce45f0d46fbc759d4579d619ab8c99c13cb0d5
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] apps...wikipedia[master]: Hygiene: Clean up interactions between PageFragment and Page...

2017-09-22 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379950 )

Change subject: Hygiene: Clean up interactions between PageFragment and 
PageLoadState
..

Hygiene: Clean up interactions between PageFragment and PageLoadState

Rename PageFragmentLoadState to PageLoadState and have it interact with
PageFragment alone, rather than with several of PageFragment's fields as
well.

Ultimately this should be redesigned around a callback interface, but this
is a step in that direction.

Change-Id: Ie4dc6d87f85296fac068174338e5795817726908
---
M app/src/main/java/org/wikipedia/page/PageFragment.java
R app/src/main/java/org/wikipedia/page/PageLoadState.java
2 files changed, 116 insertions(+), 111 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index f6310c8..d903d11 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -170,7 +170,7 @@
 private TabsProvider tabsProvider;
 private ActiveTimer activeTimer = new ActiveTimer();
 private WikipediaApp app = WikipediaApp.getInstance();
-private PageFragmentLoadState loadState;
+private PageLoadState loadState;
 private PageViewModel model;
 private PageInfo pageInfo;
 private Unbinder unbinder;
@@ -187,6 +187,10 @@
 return model.getTitle();
 }
 
+void setTitle(@NonNull PageTitle title) {
+model.setTitle(title);
+}
+
 public PageTitle getTitleOriginal() {
 return model.getTitleOriginal();
 }
@@ -199,6 +203,10 @@
 return model.getPage();
 }
 
+void setPage(@NonNull Page page) {
+model.setPage(page);
+}
+
 public EditHandler getEditHandler() {
 return editHandler;
 }
@@ -207,11 +215,30 @@
 return errorState;
 }
 
+LeadImagesHandler getLeadImagesHandler() {
+return leadImagesHandler;
+}
+
+SwipeRefreshLayoutWithScroll getRefreshView() {
+return refreshView;
+}
+
+HistoryEntry getCurEntry() {
+return model.getCurEntry();
+}
+
+void setCurEntry(@NonNull HistoryEntry entry) {
+model.setCurEntry(entry);
+}
+
+boolean shouldSaveOffline() {
+return model.shouldSaveOffline();
+}
+
 @Override
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 model = new PageViewModel();
-loadState = new PageFragmentLoadState();
 initTabs();
 }
 
@@ -299,9 +326,6 @@
 }
 });
 
-editHandler = new EditHandler(this, bridge);
-loadState.setEditHandler(editHandler);
-
 tocHandler = new ToCHandler(this, tocDrawer, bridge);
 bottomContentHandler = new BottomContentHandler(this, bridge, webView, 
getLinkHandler(),
 bottomContentContainer);
@@ -314,13 +338,15 @@
 tabsProvider = new TabsProvider(this, tabList);
 tabsProvider.setTabsProviderListener(tabsProviderListener);
 
+loadState = new PageLoadState(this);
+editHandler = new EditHandler(this, bridge);
+loadState.setEditHandler(editHandler);
+
 if (callback() != null) {
 LongPressHandler.WebViewContextMenuListener contextMenuListener
 = new PageContainerLongPressHandler(this);
 new LongPressHandler(webView, HistoryEntry.SOURCE_INTERNAL_LINK, 
contextMenuListener);
 }
-
-loadState.setUp(model, this, refreshView, webView, bridge, 
leadImagesHandler, getCurrentTab().getBackStack());
 
 if (shouldLoadFromBackstack(getActivity())) {
 loadFromBackStack();
@@ -343,6 +369,10 @@
 }
 }
 
+void setReadingListPage(@Nullable ReadingListPage page) {
+model.setReadingListPage(page);
+}
+
 private void layoutBottomContent() {
 // Check to see if the page title has changed (e.g. due to following a 
redirect),
 // because if it has then the handler needs the new title to make sure 
it doesn't
diff --git a/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java 
b/app/src/main/java/org/wikipedia/page/PageLoadState.java
similarity index 81%
rename from app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
rename to app/src/main/java/org/wikipedia/page/PageLoadState.java
index 9faf6db..4f84b6b 100644
--- a/app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
+++ b/app/src/main/java/org/wikipedia/page/PageLoadState.java
@@ -47,8 +47,6 @@
 import org.wikipedia.util.ReleaseUtil;
 import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.util.log.L;
-import org.wikipedia.views.ObservableWebView;
-import org.wikipedia.views.SwipeRefreshLayoutWithScroll;
 
 import 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Add "data saving" mode

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

Change subject: Add "data saving" mode
..


Add "data saving" mode

Adds a "prefer offline content" preference that allows users to prefer
loading cached page content.  In data saving mode, users can refresh page
content via the pull-down action, which will force a net request; other-
wise, page content will be loaded from cache, if available in cache.

With data saving mode off (the default), page content requests will mostly
if not always involve a conditional network request.

Bug: T166596
Change-Id: I61c5560596a3ece3dbdc94c4cd89ddff626e4b74
---
R 
app/src/main/java/org/wikipedia/dataclient/okhttp/CacheControlRequestInterceptor.java
M app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/PageViewModel.java
M app/src/main/java/org/wikipedia/settings/Prefs.java
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values/preference_keys.xml
M app/src/main/res/values/strings.xml
M app/src/main/res/xml/preferences.xml
M app/src/test/java/org/wikipedia/test/MockWebServerTest.java
11 files changed, 42 insertions(+), 11 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/CacheIfErrorInterceptor.java
 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/CacheControlRequestInterceptor.java
similarity index 67%
rename from 
app/src/main/java/org/wikipedia/dataclient/okhttp/CacheIfErrorInterceptor.java
rename to 
app/src/main/java/org/wikipedia/dataclient/okhttp/CacheControlRequestInterceptor.java
index 73e27a4..4e9bc61 100644
--- 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/CacheIfErrorInterceptor.java
+++ 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/CacheControlRequestInterceptor.java
@@ -2,17 +2,20 @@
 
 import android.support.annotation.NonNull;
 
+import org.wikipedia.settings.Prefs;
+
 import java.io.IOException;
 
 import okhttp3.Interceptor;
 import okhttp3.Request;
 import okhttp3.Response;
 
-public class CacheIfErrorInterceptor implements Interceptor {
+public class CacheControlRequestInterceptor implements Interceptor {
+// When max-stale is set (as is the case for us in order to allow loading 
cached content),
+// OkHttp's CacheStrategy class forbids a conditional network request; 
hence, we'll need to
+// manually force a network request where needed, and fall back if it 
fails.
 @Override public Response intercept(Chain chain) throws IOException {
-// when max-stale is set, CacheStrategy forbids a conditional network 
request in
-// CacheInterceptor
-if (!chain.request().cacheControl().onlyIfCached()) {
+if (!Prefs.preferOfflineContent() || 
chain.request().cacheControl().noCache()) {
 Request req = forceNetRequest(chain.request());
 Response rsp = null;
 try {
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..eff4e7e 100644
--- 
a/app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
+++ 
b/app/src/main/java/org/wikipedia/dataclient/okhttp/OkHttpConnectionFactory.java
@@ -48,7 +48,7 @@
 .addNetworkInterceptor(new 
StripMustRevalidateResponseInterceptor())
 .addInterceptor(new CommonHeaderRequestInterceptor())
 .addInterceptor(new DefaultMaxStaleRequestInterceptor())
-.addInterceptor(new CacheIfErrorInterceptor())
+.addInterceptor(new CacheControlRequestInterceptor())
 .addInterceptor(new 
CacheDelegateInterceptor(CacheDelegate.internalCache(SAVE_CACHE), 
CacheDelegate.internalCache(NET_CACHE)))
 .addInterceptor(new 
WikipediaZeroResponseInterceptor(WikipediaApp.getInstance().getWikipediaZeroHandler()))
 .build();
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 60efb76..7046c9a 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -636,7 +636,7 @@
  * @param pushBackStack Whether to push the new page onto the backstack.
  */
 public void loadPage(@NonNull PageTitle title, @NonNull HistoryEntry entry,
- boolean pushBackStack, int stagedScrollY, boolean 
pageRefreshed) {
+ boolean pushBackStack, int stagedScrollY, boolean 
isRefresh) {
 // clear the title in case the previous page load had failed.
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable jQuery 3 on Wiktionary sites

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

Change subject: Enable jQuery 3 on Wiktionary sites
..

Enable jQuery 3 on Wiktionary sites

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 1b2373e..8c7dec1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14975,6 +14975,9 @@
'nlwiktionary' => true, // @Krinkle
'plwiki' => true, // @MatmaRex
'svwiki' => true, // @Nirmos
+
+   // Roll out
+   'wiktionary' => true,
 ],
 
 'wgCiteResponsiveReferences' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I48cedceab210518eb64f7526a007b88398bf10c8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] operations/mediawiki-config[master]: Enable jQuery 3 on all wikis

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

Change subject: Enable jQuery 3 on all wikis
..

Enable jQuery 3 on all wikis

This effectively enables it for Wikipedia sites and various
special sites not previously covered (incl. chapter wikis).

Change-Id: I1ef9abc83d9036fc2ac404e9f49818ec38d94428
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 30 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index c5c488e..f41f9a4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14954,37 +14954,9 @@
 // --- VisualEditor end ---
 
 // Whether to use jQuery 3.x or keep using the 1.x series.
-// Temporarily disabled during testing of the feature, 2017-04-13 – T124742.
+// See T124742.
 'wgUsejQueryThree' => [
-   'default' => false,
-
-   // group 0
-   'testwiki' => true,
-   'test2wiki' => true,
-   'testwikidatawiki' => true,
-   'mediawikiwiki' => true,
-
-   // opt-in (T124742)
-   'commonswiki' => true, // @Krinkle
-   '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
-
-   // Roll out
-   'wiktionary' => true,
-   'wikiquote' => true,
-   'wikibooks' => true,
-   'wikisource' => true,
-   'wikinews' => true,
-   'wikiversity' => true,
-   'wikivoyage' => true,
-   'wikidatawiki' => true,
+   'default' => true,
 ],
 
 'wgCiteResponsiveReferences' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ef9abc83d9036fc2ac404e9f49818ec38d94428
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] operations/mediawiki-config[master]: Enable jQuery 3 on most group1 wikis (non-Wikipedia)

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

Change subject: Enable jQuery 3 on most group1 wikis (non-Wikipedia)
..

Enable jQuery 3 on most group1 wikis (non-Wikipedia)

Bug: T124742
Change-Id: I9fefc2930c29f17d1b769a8967dc6c4912421185
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8c7dec1..c5c488e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14978,6 +14978,13 @@
 
// Roll out
'wiktionary' => true,
+   'wikiquote' => true,
+   'wikibooks' => true,
+   'wikisource' => true,
+   'wikinews' => true,
+   'wikiversity' => true,
+   'wikivoyage' => true,
+   'wikidatawiki' => true,
 ],
 
 'wgCiteResponsiveReferences' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9fefc2930c29f17d1b769a8967dc6c4912421185
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] operations/puppet[production]: Gerrit: Remove gc logging

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

Change subject: Gerrit: Remove gc logging
..

Gerrit: Remove gc logging

Not needed now that we have stabilised things.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/46/379946/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2676c1e527846eff44900a4a95b5b67de64fdebd
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...rainbow[develop]: Sister search prevalence by language

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

Change subject: Sister search prevalence by language
..


Sister search prevalence by language

Adds the percentage of searches where the sister project search
results were shown to the user.

Change-Id: I4c59f2e693570b92d63d66826ca23400fc90be61
---
M CHANGELOG.md
A modules/sister_search/prevalence.R
M server.R
A tab_documentation/sister_search_prevalence.md
M ui.R
M utils.R
6 files changed, 111 insertions(+), 1 deletion(-)

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



diff --git a/CHANGELOG.md b/CHANGELOG.md
index 099e8a1..7ecd033 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
 
 All notable changes to this project will be documented in this file.
 
+## 2017/09/25
+- Added sister project search result prevalence
+
 ## 2017/08/30
 - Added SRP visit times ([T170468](https://phabricator.wikimedia.org/T170468))
 - Added [dygraph-based rolling 
periods](https://rstudio.github.io/dygraphs/gallery-roll-periods.html) to page 
visit times modules
diff --git a/modules/sister_search/prevalence.R 
b/modules/sister_search/prevalence.R
new file mode 100644
index 000..0bedfa8
--- /dev/null
+++ b/modules/sister_search/prevalence.R
@@ -0,0 +1,37 @@
+output$sister_search_prevalence_lang_container <- renderUI({
+  languages_to_display <- sister_search_averages$language
+  names(languages_to_display) <- sprintf("%s (%.1f%%)", 
sister_search_averages$language, sister_search_averages$avg)
+  if (input$sister_search_prevalence_lang_order != "alphabet") {
+languages_to_display <- languages_to_display[order(
+  sister_search_averages$avg,
+  decreasing = input$sister_search_prevalence_lang_order == "high2low"
+)]
+  }
+  if (!is.null(input$language_selector)) {
+selected_language <- input$language_selector
+  } else {
+selected_language <- languages_to_display[1]
+  }
+  return(selectInput(
+"sister_search_prevalence_lang_selector", "Language",
+multiple = TRUE, selectize = FALSE, size = 19,
+choices = languages_to_display, selected = selected_language
+  ))
+})
+
+output$sister_search_prevalence_plot <- renderDygraph({
+  req(input$sister_search_prevalence_lang_selector)
+  sister_search_prevalence %>%
+dplyr::filter(language %in% input$sister_search_prevalence_lang_selector) 
%>%
+tidyr::spread(language, prevalence, fill = 0) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_sister_search_prevalence_plot)) %>%
+polloi::make_dygraph("Date", "Prevalence (%)", "Wikipedia searches that 
showed sister project search results") %>%
+dyLegend(show = "always", width = 400, labelsDiv = 
"sister_search_prevalence_plot_legend") %>%
+dyAxis("y",
+  axisLabelFormatter = "function(x) { return x + '%'; }",
+  valueFormatter = "function(x) { return Math.round(x * 100)/100 + '%'; }"
+) %>%
+dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter) %>%
+dyRangeSelector(fillColor = "", strokeColor = "")
+})
diff --git a/server.R b/server.R
index b91bcf9..21d45a2 100644
--- a/server.R
+++ b/server.R
@@ -66,6 +66,7 @@
   source("modules/zero_results.R", local = TRUE)
   # Sister Search
   source("modules/sister_search/traffic.R", local = TRUE)
+  source("modules/sister_search/prevalence.R", local = TRUE)
   # Survival
   source("modules/page_visit_times.R", local = TRUE)
   # Language/Project Breakdown
diff --git a/tab_documentation/sister_search_prevalence.md 
b/tab_documentation/sister_search_prevalence.md
new file mode 100644
index 000..84b58fc
--- /dev/null
+++ b/tab_documentation/sister_search_prevalence.md
@@ -0,0 +1,26 @@
+Sister project search results prevalence
+===
+Sister project (cross-wiki) snippets is a feature that adds search results 
from sister projects of Wikipedia to a sidebar on the search engine results 
page (SERP). If a query results in matches from the sister projects, users will 
be shown snippets from Wiktionary, Wikisource, Wikiquote and/or other projects. 
See [T162276](https://phabricator.wikimedia.org/T162276) for more details.
+
+General trends
+-
+* English Wikipedia has the highest prevalence with 75% of searches showing 
sister project results on average, followed by Chinese (73%) and French (70%) 
Wikipedias.
+* 38% of languages show the sister project results in at least 50% of the 
searches made.
+
+Notes, outages, and inaccuracies
+-
+* English Wikipedia has a different display than all the other languages due 
to community feedback. Specifically, it does not show results from 
Commons/multimedia, Wikinews, and Wikiversity. Refer to 
[T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more 
details.
+* Languages without a lot of traffic also yield less (sampled) event logging 
data. In order to show 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Alternate solution to losing duplicate invoice IDs

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

Change subject: Alternate solution to losing duplicate invoice IDs
..

Alternate solution to losing duplicate invoice IDs

This avoids the lookup before each insert, but adds special case
handling to the base queue consumer.

Ugliness vs performance tradeoff.

This is an alternative to Ie72abfbe73451bc4be000a19

Bug: T171349
Change-Id: Ide9b64e5a4d896290e13d82fccc90cbf66035109
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
M sites/all/modules/wmf_common/WmfException.php
M sites/all/modules/wmf_common/WmfQueueConsumer.php
3 files changed, 33 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/45/379945/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index aa4b536..d337231 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -454,11 +454,16 @@
 $duplicate = civicrm_api3( "Contribution", "getcount", array( 
"invoice_id" => $invoice_id ) );
 }
 if ( $duplicate > 0 ) {
-$contribution['invoice_id'] = $contribution['invoice_id'] . 
'|dup-' . UtcDate::getUtcTimeStamp();
-watchdog( 'wmf_civicrm', 'Found duplicate invoice ID, changing 
this one to ' . $contribution['invoice_id'], NULL, WATCHDOG_INFO );
-$contribution_result = civicrm_api3( "Contribution", "Create", 
$contribution );
-watchdog( 'wmf_civicrm', 'Contribution result from 
civicrm_contribution_add(): ' . print_r( $contribution_result, TRUE ), NULL, 
WATCHDOG_DEBUG );
-$msg['contribution_tags'][] = 'DuplicateInvoiceId';
+// We can't retry the insert here because the original API
+// error has marked the Civi transaction for rollback.
+// This WmfException code has special handling in the
+// WmfQueueConsumer that will alter the invoice_id before
+// re-queueing the message.
+throw new WmfException(
+'DUPLICATE INVOICE',
+'Duplicate invoice ID, should modify and retry',
+$e->getExtraParams()
+);
 } else {
 throw new WmfException(
 'INVALID_MESSAGE',
diff --git a/sites/all/modules/wmf_common/WmfException.php 
b/sites/all/modules/wmf_common/WmfException.php
index a8d7a4e..1ab193d 100644
--- a/sites/all/modules/wmf_common/WmfException.php
+++ b/sites/all/modules/wmf_common/WmfException.php
@@ -23,7 +23,8 @@
 const BANNER_HISTORY = 20;
 const GET_CONTACT = 21;
 const EMAIL_SYSTEM_FAILURE = 22;
-const BAD_EMAIL = 22;
+const BAD_EMAIL = 23;
+   const DUPLICATE_INVOICE = 24;
 
 //XXX shit we aren't using the 'rollback' attribute
 // and it's not correct in most of these cases
@@ -56,6 +57,10 @@
 'drop' => TRUE,
 'no-email' => TRUE,
 ),
+   'DUPLICATE_INVOICE' => array(
+   'requeue' => TRUE,
+   'no-email' => TRUE,
+   ),
 'GET_CONTRIBUTION' => array(
 'reject' => TRUE,
 ),
@@ -113,7 +118,7 @@
* WmfException constructor.
*
* @param string $type Error type
-   * @param int $message A WMF constructed message.
+   * @param string $message A WMF constructed message.
* @param array $extra Extra parameters.
*   If error_message is included then it will be included in the User Error 
message.
*   If you are working with a CiviCRM Exception ($e) then you can pass in 
$e->getExtraParams()
diff --git a/sites/all/modules/wmf_common/WmfQueueConsumer.php 
b/sites/all/modules/wmf_common/WmfQueueConsumer.php
index 2a109d1..2442f06 100644
--- a/sites/all/modules/wmf_common/WmfQueueConsumer.php
+++ b/sites/all/modules/wmf_common/WmfQueueConsumer.php
@@ -2,6 +2,7 @@
 
 use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 use Exception;
+use SmashPig\Core\UtcDate;
 use SmashPig\CrmLink\Messages\DateFields;
 use WmfException;
 
@@ -49,6 +50,11 @@
$delay = intval( variable_get( 
'wmf_common_requeue_delay', 20 * 60 ) );
$maxTries = intval( variable_get( 
'wmf_common_requeue_max', 10 ) );
$ageLimit = $delay * $maxTries;
+   if ( $ex->getCode() === WmfException::DUPLICATE_INVOICE 
) {
+   // Crappy special-case handling that we can't 
handle at
+   // lower levels.
+   $message = $this->modifyDuplicateInvoice( 
$message );
+   }
// Defaulting to 0 means we'll always go the reject 
route
 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Various minor no-op cleaning (conventions, perf)

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

Change subject: Various minor no-op cleaning (conventions, perf)
..

Various minor no-op cleaning (conventions, perf)

* Consistently use `/**` for block comments. `/*!` was a
  workaround for something that no longer applies.

* deprecate: Update doc (schema no longer used).

* geoFeatures:
  - Use ES5 Date.now() instead of more costly object construction
(was compat for older ES3 browsers).
  - Use location.href for getting and setting of address for current
browsing contexts, for consistency.

* humanSearchRelevance:
  - Remove outdated `undefined`.
  - Use ES5 Date.now().
  - Use `` to create plain elements in jQuery.

  - Avoid `$(,attributes)` signature. Those are first checked against
plugin and method names, before falling back to attribute setting.
Commonly causes issues on wikis when extensions or gadgets register
jQuery plugins that match the name of an attribute.
E.g. calling $obj.foo(val) instead of setting attr foo=val.


* kartographer: Avoid $.type() overhead where a typeof suffices.
  

* searchSatisfaction:
  - Remove redundant `undefined`.
  - Use ES5 Date.now().
  - Use $(fn) instead of deprecated $(anything).ready(fn).

Change-Id: I5242156683f5d0b29004085653da7a9ce71ede38
---
M modules/ext.wikimediaEvents.deprecate.js
M modules/ext.wikimediaEvents.events.js
M modules/ext.wikimediaEvents.geoFeatures.js
M modules/ext.wikimediaEvents.humanSearchRelevance.js
M modules/ext.wikimediaEvents.kartographer.js
M modules/ext.wikimediaEvents.print.js
M modules/ext.wikimediaEvents.readingDepth.js
M modules/ext.wikimediaEvents.recentChangesClicks.js
M modules/ext.wikimediaEvents.searchSatisfaction.js
9 files changed, 31 insertions(+), 30 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.deprecate.js 
b/modules/ext.wikimediaEvents.deprecate.js
index 97bee04..ef6aa9a 100644
--- a/modules/ext.wikimediaEvents.deprecate.js
+++ b/modules/ext.wikimediaEvents.deprecate.js
@@ -1,7 +1,7 @@
-/*!
+/**
  * Track usage of deprecated JavaScript functionality
  *
- * @see https://meta.wikimedia.org/wiki/Schema:DeprecatedUsage
+ * @see https://grafana.wikimedia.org/dashboard/db/mw-js-deprecate
  */
 ( function ( mw ) {
function oneIn( populationSize ) {
diff --git a/modules/ext.wikimediaEvents.events.js 
b/modules/ext.wikimediaEvents.events.js
index bd038d3..9a0700d 100644
--- a/modules/ext.wikimediaEvents.events.js
+++ b/modules/ext.wikimediaEvents.events.js
@@ -1,5 +1,6 @@
-/*!
- * Make mw.track( 'wikimedia.event.foo' ) an alias of mw.track( 'event.foo' ).
+/**
+ * Alias `mw.track( 'wikimedia.event.foo' )` to `mw.track( 'event.foo' )`.
+ *
  * This allows logging of events without making the logging code depend on
  * Wikimedia infrastrucutre: if WikimediaEvents is not installed, the event
  * will be ignored.
diff --git a/modules/ext.wikimediaEvents.geoFeatures.js 
b/modules/ext.wikimediaEvents.geoFeatures.js
index f1f07e4..d2df5e8 100644
--- a/modules/ext.wikimediaEvents.geoFeatures.js
+++ b/modules/ext.wikimediaEvents.geoFeatures.js
@@ -1,4 +1,4 @@
-/*!
+/**
  * Track geo/mapping feature usage
  *
  * @see https://phabricator.wikimedia.org/T103017
@@ -39,7 +39,7 @@
var keyName = 'wmE-GeoFeaturesUser',
token = mw.storage.session.get( keyName ),
parts = token && token.split( '|' ),
-   now = ( new Date() ).getTime(),
+   now = Date.now(),
cut = now - ( 10 * 60 * 1000 ); // 10 minutes ago
 
if ( parts && parts[ 1 ] >= cut ) {
@@ -73,7 +73,7 @@
if ( url ) {
setTimeout(
function () {
-   document.location = url;
+   location.href = url;
},
200
);
diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 9e36352..e2419ec 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -1,4 +1,4 @@
-( function ( mw, $, undefined ) {
+( function ( mw, $ ) {
'use strict';
 
function sample( acceptPercentage ) {
@@ -84,12 +84,12 @@
} );
} )
} ),
-   content = $( '', {
+   content = $( '' ).attr( {
 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: ext.wikimediaEvents.statsd: Return early in case of DNT

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

Change subject: ext.wikimediaEvents.statsd: Return early in case of DNT
..

ext.wikimediaEvents.statsd: Return early in case of DNT

Change-Id: Ie54774a10992a8c994cea2747ec973253c3a4371
---
M modules/ext.wikimediaEvents.statsd.js
1 file changed, 7 insertions(+), 8 deletions(-)


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

diff --git a/modules/ext.wikimediaEvents.statsd.js 
b/modules/ext.wikimediaEvents.statsd.js
index aee2dbe..a05fb35 100644
--- a/modules/ext.wikimediaEvents.statsd.js
+++ b/modules/ext.wikimediaEvents.statsd.js
@@ -1,4 +1,4 @@
-/*!
+/**
  * mw.track subscribers for statsd timers and counters.
  *
  * Track events of the form mw.track( 'timing.foo', 1234.56 ); are logged as 
foo=1235ms
@@ -18,14 +18,13 @@
batchSize = 50,
baseUrl = mw.config.get( 'wgWMEStatsdBaseUri' ),
// Based on mw.eventLog.Core#sendBeacon
-   sendBeacon = ( /1|yes/.test( navigator.doNotTrack ) )
-   ? function () { /* noop */ }
-   : navigator.sendBeacon
-   ? function ( url ) { try { 
navigator.sendBeacon( url ); } catch ( e ) {} }
-   : function ( url ) { ( new Image() ).src = url; 
};
+   sendBeacon = navigator.sendBeacon
+   ? function ( url ) { try { navigator.sendBeacon( url ); 
} catch ( e ) {} }
+   : function ( url ) { ( new Image() ).src = url; };
 
-   // Not configured, do nothing
-   if ( !baseUrl ) {
+   // Statsv not configured, or DNT enabled
+   if ( !baseUrl || /1|yes/.test( navigator.doNotTrack ) ) {
+   // Do nothing
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie54774a10992a8c994cea2747ec973253c3a4371
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
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] search/extra[master]: Checkstyle corrections

2017-09-22 Thread Gehel (Code Review)
Gehel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379942 )

Change subject: Checkstyle corrections
..

Checkstyle corrections

Change-Id: I134c6626a3c8d35e654791dd09fb4c3713e5432f
---
M 
src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
M 
src/test/java/org/wikimedia/search/extra/analysis/filters/PreserveOriginalFilterTest.java
M 
src/test/java/org/wikimedia/search/extra/latency/GetLatencyStatsIntegrationTest.java
M 
src/test/java/org/wikimedia/search/extra/latency/SearchLatencyListenerTest.java
M src/test/java/org/wikimedia/search/extra/regex/SourceRegexBuilderESTest.java
M 
src/test/java/org/wikimedia/search/extra/regex/SourceRegexQueryIntegrationTest.java
M src/test/java/org/wikimedia/search/extra/regex/TimeoutCheckerTest.java
M src/test/java/org/wikimedia/search/extra/regex/expression/ExpressionTest.java
M src/test/java/org/wikimedia/search/extra/regex/ngram/NGramAutomatonTest.java
M 
src/test/java/org/wikimedia/search/extra/router/DegradedRouterBuilderESTest.java
M 
src/test/java/org/wikimedia/search/extra/router/DegradedRouterQueryBuilderParserTest.java
M 
src/test/java/org/wikimedia/search/extra/router/TokenCountRouterBuilderESTest.java
M 
src/test/java/org/wikimedia/search/extra/router/TokenCountRouterParserTest.java
M 
src/test/java/org/wikimedia/search/extra/superdetectnoop/SuperDetectNoopScriptIntegrationTest.java
14 files changed, 37 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/extra 
refs/changes/42/379942/1

diff --git 
a/src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
 
b/src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
index 5da5037..dc01088 100644
--- 
a/src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
+++ 
b/src/main/java/org/wikimedia/search/extra/regex/UnacceleratedSourceRegexQuery.java
@@ -1,6 +1,5 @@
 package org.wikimedia.search.extra.regex;
 
-
 import lombok.EqualsAndHashCode;
 import org.apache.lucene.index.LeafReaderContext;
 import org.apache.lucene.search.Collector;
diff --git 
a/src/test/java/org/wikimedia/search/extra/analysis/filters/PreserveOriginalFilterTest.java
 
b/src/test/java/org/wikimedia/search/extra/analysis/filters/PreserveOriginalFilterTest.java
index e306c45..4746bea 100644
--- 
a/src/test/java/org/wikimedia/search/extra/analysis/filters/PreserveOriginalFilterTest.java
+++ 
b/src/test/java/org/wikimedia/search/extra/analysis/filters/PreserveOriginalFilterTest.java
@@ -34,7 +34,7 @@
 
 public class PreserveOriginalFilterTest extends BaseTokenStreamTestCase {
 private final int shingleMaxSize = random().nextInt(3) + 3;
-private final int shingleMinSize = random().nextInt(shingleMaxSize-2) + 2;
+private final int shingleMinSize = random().nextInt(shingleMaxSize - 2) + 
2;
 @Test
 public void simpleTest() throws IOException {
 String input = "Hello the World";
@@ -100,7 +100,7 @@
 }
 
 
-@Test(expected=IllegalArgumentException.class)
+@Test(expected = IllegalArgumentException.class)
 public void testBadSetup() throws IOException {
 try (Analyzer a = new Analyzer() {
  @Override
@@ -177,12 +177,12 @@
 private final PositionIncrementAttribute pattr = 
getAttribute(PositionIncrementAttribute.class);
 @Override
 public final boolean incrementToken() throws IOException {
-if(state != null) {
+if (state != null) {
 restoreState(state);
 pattr.setPositionIncrement(0);
 state = null;
 return true;
-} else if(input.incrementToken()) {
+} else if (input.incrementToken()) {
 state = captureState();
 int posInc = pattr.getPositionIncrement();
 assert input.incrementToken();
@@ -269,7 +269,7 @@
 CharTermAttribute cattr = 
expected.getAttribute(CharTermAttribute.class);
 PositionIncrementAttribute pInc = 
expected.getAttribute(PositionIncrementAttribute.class);
 OffsetAttribute oattr = 
expected.getAttribute(OffsetAttribute.class);
-while(expected.incrementToken()) {
+while (expected.incrementToken()) {
 output.add(cattr.toString());
 posInc.add(pInc.getPositionIncrement());
 startOffsets.add(oattr.startOffset());
diff --git 
a/src/test/java/org/wikimedia/search/extra/latency/GetLatencyStatsIntegrationTest.java
 
b/src/test/java/org/wikimedia/search/extra/latency/GetLatencyStatsIntegrationTest.java
index f04be7e..2299a34 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Lint multiple colon escaped links

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

Change subject: Lint multiple colon escaped links
..


Lint multiple colon escaped links

 * From the wikitech-ambassador's thread,
   
https://lists.wikimedia.org/pipermail/wikitech-ambassadors/2017-September/001675.html

 * For now, omit dsr info for lints coming from templates.

Depends-On: I9f21f3128b78e7b2459c18a9121605dffd5a1bc4
Change-Id: Ibee7875bb93b11d80099b3f690b0a61824e36c24
---
M lib/wt2html/tt/LinkHandler.js
M tests/mocha/linter.js
2 files changed, 50 insertions(+), 3 deletions(-)

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



diff --git a/lib/wt2html/tt/LinkHandler.js b/lib/wt2html/tt/LinkHandler.js
index 554f5f4..36a2b99 100644
--- a/lib/wt2html/tt/LinkHandler.js
+++ b/lib/wt2html/tt/LinkHandler.js
@@ -72,7 +72,7 @@
  *
  * @return {Object} The target info
  */
-WikiLinkHandler.prototype.getWikiLinkTargetInfo = function(hrefKV) {
+WikiLinkHandler.prototype.getWikiLinkTargetInfo = function(token, hrefKV) {
var env = this.manager.env;
 
var info = {
@@ -86,6 +86,25 @@
info.href = info.href.substr(1);
}
if (/^:/.test(info.href)) {
+   if (env.conf.parsoid.linting) {
+   var lint = {
+   dsr: token.dataAttribs.tsr,
+   params: { href: ':' + info.href },
+   templateInfo: undefined,
+   };
+   if (this.options.inTemplate) {
+   // `frame.title` is already the result of 
calling
+   // `getPrefixedDBKey`, but for the sake of 
consistency with
+   // `findEnclosingTemplateName`, we do a little 
more work to
+   // match `env.makeLink`.
+   var name = 
Util.sanitizeTitleURI(env.page.relativeLinkPrefix +
+   
this.manager.frame.title).replace(/^\.\//, '');
+   lint.templateInfo = { name: name };
+   // TODO(arlolra): Pass tsr info to the frame
+   lint.dsr = [0, 0];
+   }
+   env.log('lint/multi-colon-escape', lint);
+   }
// This will get caught by the caller, and mark the target as 
invalid
throw new Error('Multiple colons prefixing href.');
}
@@ -112,7 +131,7 @@
// Recurse!
hrefKV = new KV('href', (/:/.test(info.href) ? 
':' : '') + info.href);
hrefKV.vsrc = info.hrefSrc;
-   info = this.getWikiLinkTargetInfo(hrefKV);
+   info = this.getWikiLinkTargetInfo(token, 
hrefKV);
info.localprefix = nsPrefix +
(info.localprefix ? (':' + 
info.localprefix) : '');
}
@@ -199,7 +218,7 @@
var target, tokens, tsr;
 
try {
-   target = this.getWikiLinkTargetInfo(hrefKV);
+   target = this.getWikiLinkTargetInfo(token, hrefKV);
} catch (e) {
// Invalid title
target = null;
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index 572862b..857bd91 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -611,4 +611,32 @@
return expectEmptyResults(wt, { tweakEnv: tweakEnv });
});
});
+
+   describe('MULTIPLE COLON ESCAPE', function() {
+   it('should lint links prefixed with multiple colons', 
function() {
+   return 
parseWT('[[None]]\n[[:One]]\n[[::Two]]\n[[:::Three]]')
+   .then(function(result) {
+   result.should.have.length(2);
+   result[0].dsr.should.deep.equal([ 18, 27 ]);
+   result[0].should.have.a.property('params');
+   result[0].params.should.have.a.property('href', 
'::Two');
+   result[1].dsr.should.deep.equal([ 28, 40 ]);
+   result[1].should.have.a.property('params');
+   result[1].params.should.have.a.property('href', 
':::Three');
+   });
+   });
+   it('should lint links prefixed with multiple colons from 
templates', function() {
+   return parseWT('{{1x|[[:One]]}}\n{{1x|[[::Two]]}}')
+   .then(function(result) {
+   result.should.have.length(1);
+  

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labtest: include salt profile on labtestcontrol

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

Change subject: labtest: include salt profile on labtestcontrol
..


labtest: include salt profile on labtestcontrol

I know we're about to kill off salt, but in the meantime
lacking this on labcontrol breaks designate's cert-handling

Change-Id: If07667d50f972d66afecf73f9a4246e60cf70a74
---
A modules/profile/manifests/openstack/labtest/salt.pp
M modules/role/manifests/wmcs/openstack/labtest/control.pp
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/modules/profile/manifests/openstack/labtest/salt.pp 
b/modules/profile/manifests/openstack/labtest/salt.pp
new file mode 100644
index 000..46527b1
--- /dev/null
+++ b/modules/profile/manifests/openstack/labtest/salt.pp
@@ -0,0 +1,10 @@
+class profile::openstack::labtest::salt(
+$instance_range = hiera('profile::openstack::labtest::nova::fixed_range'),
+$designate_host = hiera('profile::openstack::labtest::designate_host'),
+) {
+
+class {'::profile::openstack::base::salt':
+instance_range => $instance_range,
+designate_host => $designate_host,
+}
+}
diff --git a/modules/role/manifests/wmcs/openstack/labtest/control.pp 
b/modules/role/manifests/wmcs/openstack/labtest/control.pp
index 9da1977..81cdb7a 100644
--- a/modules/role/manifests/wmcs/openstack/labtest/control.pp
+++ b/modules/role/manifests/wmcs/openstack/labtest/control.pp
@@ -6,4 +6,5 @@
 include ::profile::openstack::labtest::nova::common
 include ::profile::openstack::labtest::nova::conductor::service
 include ::profile::openstack::labtest::nova::scheduler::service
+include ::profile::openstack::labtest::salt
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If07667d50f972d66afecf73f9a4246e60cf70a74
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Giuseppe Lavagetto 
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]: Search for invoice ID before inserting

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

Change subject: Search for invoice ID before inserting
..

Search for invoice ID before inserting

Catching the exception on insert and retrying doesn't actually work.
The donation queue consumer starts a Civi native transaction before
the whole import, and the initial failed contribution insert marks
that transaction for rollback. When we think we're committing the
transaction at the end, it actually rolls it back.

This will slow down imports a bit, but it's the most straightforward
way to get the expected duplicate handling. If the slowdown is too
bad, we could try throwing a new WmfException code that makes the
re-queue logic add the invoice suffix and duplicate tag

Bug: T171349
Change-Id: Ie72abfbe73451bc4be000a19d27ed388ff7b9a2d
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 27 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/41/379941/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index aa4b536..46430ae 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -438,44 +438,41 @@
 }
 }
 
-watchdog( 'wmf_civicrm', 'Contribution array for 
civicrm_contribution_add(): ' . print_r($contribution, TRUE), NULL, 
WATCHDOG_DEBUG);
+watchdog( 'wmf_civicrm', 'Contribution array for 
civicrm_contribution_add(): ' . print_r($contribution, TRUE), NULL, 
WATCHDOG_DEBUG );
 try {
-  $contribution_result = civicrm_api3("Contribution", "Create", 
$contribution);
-  watchdog('wmf_civicrm', 'Contribution result from 
civicrm_contribution_add(): ' . print_r($contribution_result, TRUE), NULL, 
WATCHDOG_DEBUG);
-}
-catch (CiviCRM_API3_Exception $e) {
-watchdog( 'wmf_civicrm', 'Error inserting contribution: ' . 
$e->getMessage(), NULL, WATCHDOG_INFO );
-$duplicate = 0;
-
-try {
-if ( array_key_exists( 'invoice_id', $contribution ) ) {
-watchdog( 'wmf_civicrm', 'Checking for duplicate on invoice ID 
' . $contribution['invoice_id'], NULL, WATCHDOG_INFO );
-$invoice_id = $contribution['invoice_id'];
-$duplicate = civicrm_api3( "Contribution", "getcount", array( 
"invoice_id" => $invoice_id ) );
-}
+if ( array_key_exists( 'invoice_id', $contribution ) ) {
+watchdog( 'wmf_civicrm', 'Checking for duplicate on invoice ID ' . 
$contribution['invoice_id'] );
+$invoice_id = $contribution['invoice_id'];
+$duplicate = civicrm_api3( "Contribution", "getcount", array( 
"invoice_id" => $invoice_id ) );
 if ( $duplicate > 0 ) {
 $contribution['invoice_id'] = $contribution['invoice_id'] . 
'|dup-' . UtcDate::getUtcTimeStamp();
-watchdog( 'wmf_civicrm', 'Found duplicate invoice ID, changing 
this one to ' . $contribution['invoice_id'], NULL, WATCHDOG_INFO );
-$contribution_result = civicrm_api3( "Contribution", "Create", 
$contribution );
-watchdog( 'wmf_civicrm', 'Contribution result from 
civicrm_contribution_add(): ' . print_r( $contribution_result, TRUE ), NULL, 
WATCHDOG_DEBUG );
-$msg['contribution_tags'][] = 'DuplicateInvoiceId';
-} else {
-throw new WmfException(
-'INVALID_MESSAGE',
-'Cannot create contribution, civi error!',
-$e->getExtraParams()
+watchdog(
+'wmf_civicrm',
+'Found duplicate invoice ID, changing this one to ' . 
$contribution['invoice_id']
 );
+$msg['contribution_tags'][] = 'DuplicateInvoiceId';
 }
 }
-catch ( CiviCRM_API3_Exception $eInner ) {
-throw new WmfException(
-'INVALID_MESSAGE',
-'Cannot create contribution, civi error!',
-$eInner->getExtraParams()
-);
-}
+$contribution_result = civicrm_api3( "Contribution", "Create", 
$contribution );
+watchdog(
+'wmf_civicrm',
+'Contribution result from civicrm_contribution_add(): ' . print_r( 
$contribution_result, TRUE ),
+NULL,
+WATCHDOG_DEBUG
+);
 }
+catch ( CiviCRM_API3_Exception $e ) {
+watchdog( 'wmf_civicrm', 'Error inserting contribution: ' . 
$e->getMessage(), NULL, WATCHDOG_INFO );
 
+// NOTE: The API will have already marked the Civi transaction for 
rollback.
+// We can't recover, so throw an exception that will trigger rollbacks 
on
+// the other databases.
+throw new WmfException(
+'INVALID_MESSAGE',
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labtest: include salt profile on labtestcontrol

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

Change subject: labtest: include salt profile on labtestcontrol
..

labtest: include salt profile on labtestcontrol

I know we're about to kill off salt, but in the meantime
lacking this on labcontrol breaks designate's cert-handling

Change-Id: If07667d50f972d66afecf73f9a4246e60cf70a74
---
A modules/profile/manifests/openstack/labtest/salt.pp
M modules/role/manifests/wmcs/openstack/labtest/control.pp
2 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/modules/profile/manifests/openstack/labtest/salt.pp 
b/modules/profile/manifests/openstack/labtest/salt.pp
new file mode 100644
index 000..3caec1e
--- /dev/null
+++ b/modules/profile/manifests/openstack/labtest/salt.pp
@@ -0,0 +1,10 @@
+class profile::openstack::main::salt(
+$instance_range = hiera('profile::openstack::labtest::nova::fixed_range'),
+$designate_host = hiera('profile::openstack::labtest::designate_host'),
+) {
+
+class {'::profile::openstack::base::salt':
+instance_range => $instance_range,
+designate_host => $designate_host,
+}
+}
diff --git a/modules/role/manifests/wmcs/openstack/labtest/control.pp 
b/modules/role/manifests/wmcs/openstack/labtest/control.pp
index 9da1977..81cdb7a 100644
--- a/modules/role/manifests/wmcs/openstack/labtest/control.pp
+++ b/modules/role/manifests/wmcs/openstack/labtest/control.pp
@@ -6,4 +6,5 @@
 include ::profile::openstack::labtest::nova::common
 include ::profile::openstack::labtest::nova::conductor::service
 include ::profile::openstack::labtest::nova::scheduler::service
+include ::profile::openstack::labtest::salt
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: registration: Fix typo in validator

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

Change subject: registration: Fix typo in validator
..


registration: Fix typo in validator

Change-Id: Ic4f0eb5f05504922c20213e1d321fa14c979b6f8
(cherry picked from commit f704bd42cad62ebf360eb26b673dcc521e5c3715)
---
M includes/registration/ExtensionJsonValidator.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/registration/ExtensionJsonValidator.php 
b/includes/registration/ExtensionJsonValidator.php
index 8142111..c8e5e19 100644
--- a/includes/registration/ExtensionJsonValidator.php
+++ b/includes/registration/ExtensionJsonValidator.php
@@ -105,7 +105,7 @@
// All good.
return true;
} else {
-   $out = "$path did pass validation.\n";
+   $out = "$path did not pass validation.\n";
foreach ( $validator->getErrors() as $error ) {
$out .= "[{$error['property']}] 
{$error['message']}\n";
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4f0eb5f05504922c20213e1d321fa14c979b6f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...rainbow[develop]: Sister search prevalence by language

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

Change subject: Sister search prevalence by language
..

Sister search prevalence by language

Adds the percentage of searches where the sister project search
results were shown to the user.

Change-Id: I4c59f2e693570b92d63d66826ca23400fc90be61
---
M CHANGELOG.md
A modules/sister_search/prevalence.R
M server.R
A tab_documentation/sister_search_prevalence.md
M ui.R
M utils.R
6 files changed, 111 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/rainbow 
refs/changes/39/379939/1

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 099e8a1..7ecd033 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,9 @@
 
 All notable changes to this project will be documented in this file.
 
+## 2017/09/25
+- Added sister project search result prevalence
+
 ## 2017/08/30
 - Added SRP visit times ([T170468](https://phabricator.wikimedia.org/T170468))
 - Added [dygraph-based rolling 
periods](https://rstudio.github.io/dygraphs/gallery-roll-periods.html) to page 
visit times modules
diff --git a/modules/sister_search/prevalence.R 
b/modules/sister_search/prevalence.R
new file mode 100644
index 000..0bedfa8
--- /dev/null
+++ b/modules/sister_search/prevalence.R
@@ -0,0 +1,37 @@
+output$sister_search_prevalence_lang_container <- renderUI({
+  languages_to_display <- sister_search_averages$language
+  names(languages_to_display) <- sprintf("%s (%.1f%%)", 
sister_search_averages$language, sister_search_averages$avg)
+  if (input$sister_search_prevalence_lang_order != "alphabet") {
+languages_to_display <- languages_to_display[order(
+  sister_search_averages$avg,
+  decreasing = input$sister_search_prevalence_lang_order == "high2low"
+)]
+  }
+  if (!is.null(input$language_selector)) {
+selected_language <- input$language_selector
+  } else {
+selected_language <- languages_to_display[1]
+  }
+  return(selectInput(
+"sister_search_prevalence_lang_selector", "Language",
+multiple = TRUE, selectize = FALSE, size = 19,
+choices = languages_to_display, selected = selected_language
+  ))
+})
+
+output$sister_search_prevalence_plot <- renderDygraph({
+  req(input$sister_search_prevalence_lang_selector)
+  sister_search_prevalence %>%
+dplyr::filter(language %in% input$sister_search_prevalence_lang_selector) 
%>%
+tidyr::spread(language, prevalence, fill = 0) %>%
+polloi::reorder_columns() %>%
+polloi::smoother(smooth_level = 
polloi::smooth_switch(input$smoothing_global, 
input$smoothing_sister_search_prevalence_plot)) %>%
+polloi::make_dygraph("Date", "Prevalence (%)", "Wikipedia searches that 
showed sister project search results") %>%
+dyLegend(show = "always", width = 400, labelsDiv = 
"sister_search_prevalence_plot_legend") %>%
+dyAxis("y",
+  axisLabelFormatter = "function(x) { return x + '%'; }",
+  valueFormatter = "function(x) { return Math.round(x * 100)/100 + '%'; }"
+) %>%
+dyAxis("x", axisLabelFormatter = polloi::custom_axis_formatter) %>%
+dyRangeSelector(fillColor = "", strokeColor = "")
+})
diff --git a/server.R b/server.R
index b91bcf9..21d45a2 100644
--- a/server.R
+++ b/server.R
@@ -66,6 +66,7 @@
   source("modules/zero_results.R", local = TRUE)
   # Sister Search
   source("modules/sister_search/traffic.R", local = TRUE)
+  source("modules/sister_search/prevalence.R", local = TRUE)
   # Survival
   source("modules/page_visit_times.R", local = TRUE)
   # Language/Project Breakdown
diff --git a/tab_documentation/sister_search_prevalence.md 
b/tab_documentation/sister_search_prevalence.md
new file mode 100644
index 000..84b58fc
--- /dev/null
+++ b/tab_documentation/sister_search_prevalence.md
@@ -0,0 +1,26 @@
+Sister project search results prevalence
+===
+Sister project (cross-wiki) snippets is a feature that adds search results 
from sister projects of Wikipedia to a sidebar on the search engine results 
page (SERP). If a query results in matches from the sister projects, users will 
be shown snippets from Wiktionary, Wikisource, Wikiquote and/or other projects. 
See [T162276](https://phabricator.wikimedia.org/T162276) for more details.
+
+General trends
+-
+* English Wikipedia has the highest prevalence with 75% of searches showing 
sister project results on average, followed by Chinese (73%) and French (70%) 
Wikipedias.
+* 38% of languages show the sister project results in at least 50% of the 
searches made.
+
+Notes, outages, and inaccuracies
+-
+* English Wikipedia has a different display than all the other languages due 
to community feedback. Specifically, it does not show results from 
Commons/multimedia, Wikinews, and Wikiversity. Refer to 
[T162276#3278689](https://phabricator.wikimedia.org/T162276#3278689) for more 
details.
+* Languages without a lot of traffic also yield less (sampled) event logging 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: registration: Fix typo in validator

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

Change subject: registration: Fix typo in validator
..

registration: Fix typo in validator

Change-Id: Ic4f0eb5f05504922c20213e1d321fa14c979b6f8
(cherry picked from commit f704bd42cad62ebf360eb26b673dcc521e5c3715)
---
M includes/registration/ExtensionJsonValidator.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/379938/1

diff --git a/includes/registration/ExtensionJsonValidator.php 
b/includes/registration/ExtensionJsonValidator.php
index 8142111..c8e5e19 100644
--- a/includes/registration/ExtensionJsonValidator.php
+++ b/includes/registration/ExtensionJsonValidator.php
@@ -105,7 +105,7 @@
// All good.
return true;
} else {
-   $out = "$path did pass validation.\n";
+   $out = "$path did not pass validation.\n";
foreach ( $validator->getErrors() as $error ) {
$out .= "[{$error['property']}] 
{$error['message']}\n";
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic4f0eb5f05504922c20213e1d321fa14c979b6f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
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]: Improve "selfmove" message's wording

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

Change subject: Improve "selfmove" message's wording
..


Improve "selfmove" message's wording

The error shown when a page is to be moved (renamed) with the same
title is not immediately obvious to the user, so use simpler
and clearer language.

Bug: T164987
Change-Id: I639c4ae27866234fed9bcc5f2afc4684155418f8
---
M languages/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 4d51c9e..c688eff 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -2632,7 +2632,7 @@
"delete_and_move_text": "The destination page \"[[:$1]]\" already 
exists.\nDo you want to delete it to make way for the move?",
"delete_and_move_confirm": "Yes, delete the page",
"delete_and_move_reason": "Deleted to make way for move from 
\"[[$1]]\"",
-   "selfmove": "Source and destination titles are the same;\ncannot move a 
page over itself.",
+   "selfmove": " The title is the same;\ncannot move a page over itself.",
"immobile-source-namespace": "Cannot move pages in namespace \"$1\".",
"immobile-target-namespace": "Cannot move pages into namespace \"$1\".",
"immobile-target-namespace-iw": "Interwiki link is not a valid target 
for page move.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I639c4ae27866234fed9bcc5f2afc4684155418f8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Eugene233 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex theme: Simplify Radio- & Checkbox*optionWidget label rules

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

Change subject: Apex theme: Simplify Radio- & Checkbox*optionWidget label rules
..

Apex theme: Simplify Radio- & Checkbox*optionWidget label rules

Simplify RadioOptionWidget and CheckboxMultioptionWidget label's
vertical spacing rules, also introducing new LESS variable and
cleanup leftover not applied or duplicated selectors & properties.

Change-Id: Ic369814c69a75912a9ef10c558fca976711bf9bd
---
M src/themes/apex/common.less
M src/themes/apex/widgets.less
2 files changed, 12 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/37/379937/1

diff --git a/src/themes/apex/common.less b/src/themes/apex/common.less
index 6886fbc..79affd4 100644
--- a/src/themes/apex/common.less
+++ b/src/themes/apex/common.less
@@ -54,6 +54,7 @@
 @padding-horizontal-base: unit( 10 / 16 / 0.8, em );
 @padding-horizontal-frameless: unit( 4 / 16 / 0.8, em );
 @padding-vertical-frameless: unit( 4 / 16 / 0.8, em );
+@padding-vertical-label: @padding-vertical-frameless;
 @padding-top-textinput: unit( 7 / 16 / 0.8, em );
 @padding-bottom-textinput: unit( 8 / 16 / 0.8, em );
 
diff --git a/src/themes/apex/widgets.less b/src/themes/apex/widgets.less
index ea8f67a..c0849e6 100644
--- a/src/themes/apex/widgets.less
+++ b/src/themes/apex/widgets.less
@@ -149,7 +149,7 @@
 .theme-oo-ui-checkboxInputWidget () {}
 
 .theme-oo-ui-checkboxMultioptionWidget () {
-   padding: 0;
+   padding: @padding-vertical-label 0;
 
&.oo-ui-labelElement .oo-ui-labelElement-label {
padding-left: 0.5em;
@@ -165,6 +165,10 @@
 .theme-oo-ui-checkboxMultiselectInputWidget () {
.oo-ui-fieldLayout {
margin-bottom: 0;
+
+   .oo-ui-fieldLayout-body {
+   padding: @padding-vertical-label 0;
+   }
}
 }
 
@@ -590,7 +594,6 @@
 }
 
 .theme-oo-ui-optionWidget () {
-   padding: 0.25em 0.5em;
border: 0;
 
&-highlighted {
@@ -865,12 +868,9 @@
 .theme-oo-ui-radioInputWidget () {}
 
 .theme-oo-ui-radioOptionWidget () {
-   padding: 0;
-   background-color: transparent;
+   padding: @padding-vertical-label 0;
 
-   &.oo-ui-optionWidget-selected,
-   &.oo-ui-optionWidget-pressed,
-   &.oo-ui-optionWidget-highlighted {
+   &.oo-ui-optionWidget-selected {
background-color: transparent;
}
 
@@ -888,6 +888,10 @@
 .theme-oo-ui-radioSelectInputWidget () {
.oo-ui-fieldLayout {
margin-bottom: 0;
+
+   .oo-ui-fieldLayout-body {
+   padding: @padding-vertical-label 0;
+   }
}
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic369814c69a75912a9ef10c558fca976711bf9bd
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...mobileapps[master]: Fix definition of lead introduction

2017-09-22 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379936 )

Change subject: Fix definition of lead introduction
..

Fix definition of lead introduction

Bug: T176522
Change-Id: I43d1bf38d284dbf908b21d7c87b86c5f9aab2d38
---
M lib/transformations/extractLeadIntroduction.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/transformations/extractLeadIntroduction.js 
b/lib/transformations/extractLeadIntroduction.js
index 55d7509..b1a72b5 100644
--- a/lib/transformations/extractLeadIntroduction.js
+++ b/lib/transformations/extractLeadIntroduction.js
@@ -20,7 +20,7 @@
 function extractLeadIntroduction(doc, removeNodes) {
 let p = '';
 const remove = [];
-const blacklist = [ 'P', 'TABLE' ];
+const blacklist = [ 'P', 'TABLE', 'CENTER', 'FIGURE', 'DIV' ];
 const nodes = doc.querySelectorAll('body > p');
 
 Array.prototype.forEach.call(nodes, (node) => {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43d1bf38d284dbf908b21d7c87b86c5f9aab2d38
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add ElectronVirtualRestService config to offline role

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

Change subject: Add ElectronVirtualRestService config to offline role
..


Add ElectronVirtualRestService config to offline role

Bug: T174430
Change-Id: I10aa26afd7116e9f63c1d95f38e43d2da12e4bcd
---
M puppet/modules/role/manifests/offline.pp
M puppet/modules/role/templates/offline/VagrantRoleOffline.wiki.erb
A puppet/modules/role/templates/offline/electron-vrs.php.erb
3 files changed, 26 insertions(+), 2 deletions(-)

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



diff --git a/puppet/modules/role/manifests/offline.pp 
b/puppet/modules/role/manifests/offline.pp
index 852cc7c..b95d6c0 100644
--- a/puppet/modules/role/manifests/offline.pp
+++ b/puppet/modules/role/manifests/offline.pp
@@ -9,6 +9,11 @@
 require ::ocg
 require ::electron
 
+mediawiki::settings { 'Electron-VRS':
+values   => template('role/offline/electron-vrs.php.erb'),
+priority => $::LOAD_FIRST,
+}
+
 mediawiki::extension { 'Collection':
 settings => template('role/offline/Collection.php.erb'),
 }
@@ -18,7 +23,7 @@
 },
 }
 
-$hostname = $::electron::vhost_name
+$electron_hostname = $::electron::vhost_name
 mediawiki::import::text { 'VagrantRoleOffline':
 content => template('role/offline/VagrantRoleOffline.wiki.erb'),
 }
diff --git a/puppet/modules/role/templates/offline/VagrantRoleOffline.wiki.erb 
b/puppet/modules/role/templates/offline/VagrantRoleOffline.wiki.erb
index ba87b25..3665fd4 100644
--- a/puppet/modules/role/templates/offline/VagrantRoleOffline.wiki.erb
+++ b/puppet/modules/role/templates/offline/VagrantRoleOffline.wiki.erb
@@ -8,5 +8,5 @@
 * 
[https://github.com/wikimedia/mediawiki-services-electron-render/blob/master/README.md
 electron]
 
 Services:
-* electron: http://<%= @hostname %><%= scope['::port_fragment'] %>/ 
([http://<%= @hostname %><%= scope['::port_fragment'] 
%>/pdf?accessKey=secret=https%3A%2F%2Fen.wikipedia.org/wiki/Barack_Obama 
test])
+* electron: http://<%= @electron_hostname %><%= scope['::port_fragment'] %>/ 
([http://<%= @electron_hostname %><%= scope['::port_fragment'] 
%>/pdf?accessKey=secret=https%3A%2F%2Fen.wikipedia.org/wiki/Barack_Obama 
test])
 
diff --git a/puppet/modules/role/templates/offline/electron-vrs.php.erb 
b/puppet/modules/role/templates/offline/electron-vrs.php.erb
new file mode 100644
index 000..d2057d8
--- /dev/null
+++ b/puppet/modules/role/templates/offline/electron-vrs.php.erb
@@ -0,0 +1,19 @@
+
+if( !isset( $wgVirtualRestConfig ) ) {
+   $wgVirtualRestConfig = array(
+   'modules' => array(),
+   'global' => array(
+   'timeout' => 360,
+   'forwardCookies' => false,
+   'HTTPProxy' => null
+   )
+   );
+}
+
+$wgVirtualRestConfig['modules']['electron'] = array(
+   'url' => 'http://127.0.0.1:<%= scope.lookupvar('::electron::port') %>',
+   'options' => array(
+'accessKey' => '<%= scope.lookupvar('::electron::secret') %>',
+),
+);
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I10aa26afd7116e9f63c1d95f38e43d2da12e4bcd
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Pmiazga 
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...Vector[master]: Consolidate duplicate CSS properties

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

Change subject: Consolidate duplicate CSS properties
..


Consolidate duplicate CSS properties

I really should not have merged I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649
without getting this fixed first.

Bug: T56919
Change-Id: I870591e63b89f05d7e3714081340c76dcf9f55ac
---
M components/watchstar.less
1 file changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/components/watchstar.less b/components/watchstar.less
index cdea9bc..1c9f21a 100644
--- a/components/watchstar.less
+++ b/components/watchstar.less
@@ -15,28 +15,24 @@
height: 0;
overflow: hidden;
background-position: 5px 60%;
+   background-repeat: no-repeat;
 }
 #ca-unwatch.icon a {
-   background-repeat: no-repeat;
.background-image-svg( 'images/unwatch-icon.svg', 
'images/unwatch-icon.png' );
 }
 #ca-watch.icon a {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon.svg', 'images/watch-icon.png' 
);
 }
 #ca-unwatch.icon a:hover,
 #ca-unwatch.icon a:focus {
-   background-repeat: no-repeat;
.background-image-svg( 'images/unwatch-icon-hl.svg', 
'images/unwatch-icon-hl.png' );
 }
 #ca-watch.icon a:hover,
 #ca-watch.icon a:focus {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon-hl.svg', 
'images/watch-icon-hl.png' );
 }
 #ca-unwatch.icon a.loading,
 #ca-watch.icon a.loading {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon-loading.svg', 
'images/watch-icon-loading.png' );
.rotation( 700ms );
/* Suppress the hilarious rotating focus outline on Firefox */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I870591e63b89f05d7e3714081340c76dcf9f55ac
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: 20after4 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Rammanojpotla 
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] mediawiki...WikimediaMessages[master]: Move overrides to wikimediaoverrides json files (en.json and...

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

Change subject: Move overrides to wikimediaoverrides json files (en.json and 
qqq.json)
..


Move overrides to wikimediaoverrides json files (en.json and qqq.json)

* Moved messages found in array keys(WikimediaMessages.hooks.php) to 
i18n/wikimediaoverrides/en.json.
* Moved messages found in array keys(WikimediaMessages.hooks.php) to  
i18n/wikimediaoverrides/qqq.json.
* Deleted moved messages from the source files in i18n/wikimedia(en.json and 
qqq.json).

Checked for tests that failed and corrected the changes.

Bug: T119217
Change-Id: Ib579a7e88fed1efd4f27f1bcb0d5929c81c18722
---
M i18n/wikimedia/en.json
M i18n/wikimedia/qqq.json
M i18n/wikimediaoverrides/en.json
M i18n/wikimediaoverrides/qqq.json
4 files changed, 35 insertions(+), 35 deletions(-)

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



diff --git a/i18n/wikimedia/en.json b/i18n/wikimedia/en.json
index 421ceb6..17545de 100644
--- a/i18n/wikimedia/en.json
+++ b/i18n/wikimedia/en.json
@@ -227,9 +227,7 @@
"cant-delete-main-page": "You cannot delete or move the main page.",
"wikimedia-translationnotifications-signup-legal": "You agree that by 
providing the Wikimedia Foundation with this information we may contact you 
regarding translations or other topics related to the Wikimedia movement we 
think may be of interest to you. You agree your data may be stored in the 
United States of America and is subject to our 
[https://wikimediafoundation.org/wiki/Privacy_policy privacy policy].",
"upload-more-photos-of-this-monument": "Upload more photos of this 
monument",
-   "createacct-helpusername-url": "{{ns:Project}}:Username_policy",
"createacct-captcha-help-url": "{{ns:Project}}:Request an account",
-   "wikimedia-delete-toobig": "This page has a large edit history, over $1 
{{PLURAL:$1|revision|revisions}}.\nDeletion of pages with very large edit 
histories is restricted to prevent accidental disruption of 
{{SITENAME}}.\nPlease contact the [[m:Special:MyLanguage/Stewards|stewards]] at 
[[m:Steward requests/Miscellaneous|Steward requests/Miscellaneous on Meta]] to 
request the deletion of this page.",
"wikimedia-developers": "Developers",
"wikimedia-developers-url": 
"https://www.mediawiki.org/wiki/Special:MyLanguage/How_to_contribute;,
"wikimedia-globalblocking-ipblocked": "'''Your IP address has been 
[[m:Special:MyLanguage/Global blocks|blocked on all wikis]].'''\n\nThe block 
was made by $1 ($2).\nThe reason given is ''$3''.\n\n* Start of block: $4\n* 
Expiry of block: $5\n\nYour current IP address is $6.\nPlease include all above 
details in any queries you make.\n\nIf you believe you were blocked by mistake, 
you can find additional information and instructions in the 
[[m:Special:MyLanguage/No open proxies|No open proxies]] global 
policy.\nOtherwise, to discuss the block please [[m:Steward 
requests/Global|post a request for review on Meta-Wiki]].",
@@ -238,12 +236,6 @@
"wikimedia-mobile-terms-url": 
"//m.wikimediafoundation.org/wiki/Terms_of_Use",
"wikimedia-oauth-privacy-link": 
"[https://wikimediafoundation.org/wiki/Privacy_policy Privacy Policy]",
"grant-checkuser": "Access checkuser data",
-   "wikimedia-flow-terms-of-use-new-topic": "By clicking 
\"{{int:flow-newtopic-save}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-reply": "By clicking 
\"{{int:flow-reply-link}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-edit": "By saving changes, you agree to 
our [//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   "wikimedia-flow-terms-of-use-summarize": "By clicking 
\"{{int:flow-topic-action-update-topic-summary}}\", you agree to our 
[//wikimediafoundation.org/wiki/Terms_of_Use Terms of Use] and agree to 
irrevocably release your text under the 
[//creativecommons.org/licenses/by-sa/3.0 CC BY-SA 3.0 License] and 
[//en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License 
GFDL]",
-   

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: SpecialSearch: Fix unintended `margin` when zoom level is ab...

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

Change subject: SpecialSearch: Fix unintended `margin` when zoom level is above 
100%
..


SpecialSearch: Fix unintended `margin` when zoom level is above 100%

With zoom level > 100% on Firefox, `#mw-searchoptions` which is a
`fieldset` element adds unintended `margin` with negative `margin-top`
applied. This is a workaround for wrong browser behaviour and
regression of I4bda42c03a5.

Bug: T176499
Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
(cherry picked from commit 2582641fcfa2f5ead7697ae32d417327f4a8362f)
---
M resources/src/mediawiki.special/mediawiki.special.search.styles.css
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.styles.css 
b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
index b37cf2f..ea9b987 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
@@ -94,6 +94,8 @@
 /*==*/
 
 #mw-searchoptions {
+   /* Support: Firefox, needs `clear: both` on `fieldset` when zoom level 
> 100%, see T176499 */
+   clear: both;
padding: 0.5em 0.75em 0.75em 0.75em;
background-color: #f8f9fa;
margin: -1px 0 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Legoktm 
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] mediawiki/core[REL1_30]: EditPage: Mark getSubmitButtonLabel() as @since 1.30

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

Change subject: EditPage: Mark getSubmitButtonLabel() as @since 1.30
..


EditPage: Mark getSubmitButtonLabel() as @since 1.30

Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
(cherry picked from commit 5965c25eed62166b9895683256e9849e3cc9)
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index f68fd92..22e8566 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4358,6 +4358,7 @@
/**
 * Get the message key of the label for the button to save the page
 *
+* @since 1.30
 * @return string
 */
protected function getSubmitButtonLabel() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki...deploy[master]: Updates for revscoring 2.0.x

2017-09-22 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379935 )

Change subject: Updates for revscoring 2.0.x
..

Updates for revscoring 2.0.x

* Newly built models
* New 'thresholds' pattern
* Revscoring 2.0.7

Bug: T175180
Change-Id: Iff2bef1e405bd4017f57f7ee010bdbaa4df62f0c
---
M config/00-main.yaml
M requirements.txt
M submodules/draftquality
M submodules/editquality
M submodules/ores
M submodules/wheels
M submodules/wikiclass
7 files changed, 26 insertions(+), 92 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/ores/deploy 
refs/changes/35/379935/1

diff --git a/config/00-main.yaml b/config/00-main.yaml
index 86789dd..379f188 100644
--- a/config/00-main.yaml
+++ b/config/00-main.yaml
@@ -108,12 +108,9 @@
   cswiki:
 extractor: cswiki_api
 scorer_models:
-  reverted: cswiki_revert
   damaging: cswiki_damaging
   goodfaith: cswiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -135,15 +132,12 @@
   enwiki:
 extractor: enwiki_api
 scorer_models:
-  reverted: enwiki_revert
   wp10: enwiki_wp10
   draftquality: enwiki_draftquality
   damaging: enwiki_damaging
   goodfaith: enwiki_goodfaith
 precache:
   damaging:
-"on": ["edit"]
-  reverted:
 "on": ["edit"]
   goodfaith:
 "on": ["edit"]
@@ -171,12 +165,9 @@
   etwiki:
 extractor: etwiki_api
 scorer_models:
-  reverted: etwiki_revert
   damaging: etwiki_damaging
   goodfaith: etwiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -184,25 +175,19 @@
   fawiki:
 extractor: fawiki_api
 scorer_models:
-  reverted: fawiki_revert
   damaging: fawiki_damaging
   goodfaith: fawiki_goodfaith
 precache:
   damaging:
-"on": ["edit"]
-  reverted:
 "on": ["edit"]
   goodfaith:
 "on": ["edit"]
   fiwiki:
 extractor: fiwiki_api
 scorer_models:
-  reverted: fiwiki_revert
   damaging: fiwiki_damaging
   goodfaith: fiwiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -210,13 +195,10 @@
   frwiki:
 extractor: frwiki_api
 scorer_models:
-  reverted: frwiki_revert
-  wp10: frwiki_wp10
   damaging: frwiki_damaging
   goodfaith: frwiki_goodfaith
+  wp10: frwiki_wp10
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -231,12 +213,9 @@
   hewiki:
 extractor: hewiki_api
 scorer_models:
-  reverted: hewiki_revert
   damaging: hewiki_damaging
   goodfaith: hewiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -272,12 +251,9 @@
   nlwiki:
 extractor: nlwiki_api
 scorer_models:
-  reverted: nlwiki_revert
   damaging: nlwiki_damaging
   goodfaith: nlwiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -292,12 +268,9 @@
   plwiki:
 extractor: plwiki_api
 scorer_models:
-  reverted: plwiki_revert
-  damaging: plwiki_damaging
-  goodfaith: plwiki_goodfaith
+  goodfaith: plwiki_damaging
+  damaging: plwiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -305,25 +278,19 @@
   ptwiki:
 extractor: ptwiki_api
 scorer_models:
-  reverted: ptwiki_revert
   damaging: ptwiki_damaging
   goodfaith: ptwiki_goodfaith
 precache:
   damaging:
-"on": ["edit"]
-  reverted:
 "on": ["edit"]
   goodfaith:
 "on": ["edit"]
   rowiki:
 extractor: rowiki_api
 scorer_models:
-  reverted: rowiki_revert
   damaging: rowiki_damaging
   goodfaith: rowiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -331,26 +298,20 @@
   ruwiki:
 extractor: ruwiki_api
 scorer_models:
-  reverted: ruwiki_revert
   damaging: ruwiki_damaging
   goodfaith: ruwiki_goodfaith
   wp10: ruwiki_wp10
 precache:
   damaging:
 "on": ["edit"]
-  reverted:
-"on": ["edit"]
   goodfaith:
 "on": ["edit"]
   sqwiki:
 extractor: sqwiki_api
 scorer_models:
-  reverted: sqwiki_revert
   damaging: sqwiki_damaging
   goodfaith: sqwiki_goodfaith
 precache:
-  reverted:
-"on": ["edit"]
   damaging:
 "on": ["edit"]
   goodfaith:
@@ -375,19 +336,15 @@
   reverted: testwiki_revert
   damaging: testwiki_revert
   goodfaith: testwiki_revert
- 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Add release notes for EditPage changes in 1.30

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

Change subject: Add release notes for EditPage changes in 1.30
..


Add release notes for EditPage changes in 1.30

Change-Id: I42368cd97a2b25fb5d31c551442a527465157ce8
(cherry picked from commit b2441fc57d6edc944b8390b17ac0ca33a15fb6f7)
---
M RELEASE-NOTES-1.30
1 file changed, 22 insertions(+), 6 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 513dc3a..e8e3404 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,7 +73,11 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* $wgBrowserBlacklist is deprecated, and changing it will have no effect.
+* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
+  edit interface.
+* (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
+  Instead, users using browsers that do not support unicode will be unable to 
edit
+  and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===
 
@@ -196,11 +200,23 @@
   RunningStat\RunningStat should be used instead.
 * MWMemcached and MemCachedClientforWiki classes (deprecated in 1.27) were 
removed.
   The MemcachedClient class should be used instead.
-* EditPage::isOouiEnabled() is deprecated and will always return true.
-* EditPage::getSummaryInput() and ::getSummaryInputOOUI() are deprecated. 
Please
-  use ::getSummaryInputWidget() instead.
-* EditPage::getCheckboxes() and ::getCheckboxesOOUI() are deprecated. Please
-  use ::getCheckboxesWidget() instead.
+* EditPage underwent some refactoring and deprecations:
+  * EditPage::isOouiEnabled() is deprecated and will always return true.
+  * EditPage::getSummaryInput() and ::getSummaryInputOOUI() are deprecated. 
Please
+use ::getSummaryInputWidget() instead.
+  * EditPage::getCheckboxes() and ::getCheckboxesOOUI() are deprecated. Please
+use ::getCheckboxesWidget() instead.
+  * Creating an EditPage instance without calling EditPage::setContextTitle() 
should
+be avoided and will be deprecated in a future release.
+  * EditPage::safeUnicodeInput() and ::safeUnicodeOutput() are deprecated and 
no-ops.
+  * EditPage::$isCssJsSubpage, ::$isCssSubpage, and ::$isJsSubpage are 
deprecated. The
+corresponding methods from Title should be used instead.
+  * EditPage::$isWrongCaseCssJsPage is deprecated. There is no replacement.
+  * EditPage::$mArticle and ::$mTitle are deprecated for public usage. The 
getters
+::getArticle() and ::getTitle() should be used instead.
+  * Trying to control or fake EditPage context by overriding $wgUser, 
$wgRequest, $wgOut,
+and $wgLang is no longer supported and won't work. The IContextSource 
returned from
+EditPage::getContext() must be modified instead.
 * Parser::getRandomString() (deprecated in 1.26) was removed.
 * Parser::uniqPrefix() (deprecated in 1.26) was removed.
 * Parser::extractTagsAndParams() now only accepts three arguments. The fourth,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42368cd97a2b25fb5d31c551442a527465157ce8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Remove duplicate release note for $wgOOUIEditPage removal

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

Change subject: Remove duplicate release note for $wgOOUIEditPage removal
..


Remove duplicate release note for $wgOOUIEditPage removal

And capitalize Unicode properly.

Follows-up b2441fc57d6e.

Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
(cherry picked from commit c526e3b5fa22f22c299e4f59827b695693b80ff2)
---
M RELEASE-NOTES-1.30
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index e8e3404..2090ce9 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,10 +73,8 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
-  edit interface.
 * (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
-  Instead, users using browsers that do not support unicode will be unable to 
edit
+  Instead, users using browsers that do not support Unicode will be unable to 
edit
   and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Deprecate $mArticle and $mTitle for public usage

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

Change subject: EditPage: Deprecate $mArticle and $mTitle for public usage
..


EditPage: Deprecate $mArticle and $mTitle for public usage

Change-Id: I2a931826ea142f2214c5f29944c3c3b18da19bad
(cherry picked from commit a154a28c7a4442a7d08689036dc54688b0867a64)
---
M includes/EditPage.php
1 file changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index b910a0a..6d918e6 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -213,12 +213,18 @@
 */
const POST_EDIT_COOKIE_DURATION = 1200;
 
-   /** @var Article */
+   /**
+* @deprecated for public usage since 1.30 use EditPage::getArticle()
+* @var Article
+*/
public $mArticle;
/** @var WikiPage */
private $page;
 
-   /** @var Title */
+   /**
+* @deprecated for public usage since 1.30 use EditPage::getTitle()
+* @var Title
+*/
public $mTitle;
 
/** @var null|Title */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a931826ea142f2214c5f29944c3c3b18da19bad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki/core[REL1_30]: EditPage: Deprecate public isCssJsSubpage related member var...

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

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


EditPage: Deprecate public isCssJsSubpage related member variables

Just use the functions directly.

Change-Id: Ie374a5cd4c9255b595ff4a88025738720434a802
(cherry picked from commit 59485d984c1645b7494d1a7d7528c36d44f3e1d8)
---
M includes/EditPage.php
1 file changed, 25 insertions(+), 11 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 23b206b..b910a0a 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -230,16 +230,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 */
@@ -627,10 +639,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
@@ -2795,7 +2808,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 ) );
}
 
@@ -3031,27 +3044,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 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Avoid unnecessary calls to Article::getContext()

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

Change subject: EditPage: Avoid unnecessary calls to Article::getContext()
..


EditPage: Avoid unnecessary calls to Article::getContext()

Change-Id: I18a7f3b3eb1a9b18ea6ca20ad43878f4740f4e47
(cherry picked from commit f8d58ec3eaf6ad37899ee33b00517a151ab8b29e)
---
M includes/EditPage.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index bb82d93..f68fd92 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1684,7 +1684,7 @@
 
// Run new style post-section-merge edit filter
if ( !Hooks::run( 'EditFilterMergedContent',
-   [ $this->mArticle->getContext(), $content, 
$status, $this->summary,
+   [ $this->context, $content, $status, 
$this->summary,
$user, $this->minoredit ] )
) {
# Error messages etc. could be handled within the 
hook...
@@ -3477,7 +3477,7 @@
$newContent = 
$oldContent->getContentHandler()->makeEmptyContent();
}
 
-   $de = 
$oldContent->getContentHandler()->createDifferenceEngine( 
$this->mArticle->getContext() );
+   $de = 
$oldContent->getContentHandler()->createDifferenceEngine( $this->context );
$de->setContent( $oldContent, $newContent );
 
$difftext = $de->getDiff( $oldtitle, $newtitle );
@@ -3685,7 +3685,7 @@
$content2 = $this->toEditContent( $this->textbox2 );
 
$handler = ContentHandler::getForModelID( 
$this->contentModel );
-   $de = $handler->createDifferenceEngine( 
$this->mArticle->getContext() );
+   $de = $handler->createDifferenceEngine( $this->context 
);
$de->setContent( $content2, $content1 );
$de->showDiff(
$this->context->msg( 'yourtext' )->parse(),
@@ -3968,7 +3968,7 @@
 * @return ParserOptions
 */
protected function getPreviewParserOptions() {
-   $parserOptions = $this->page->makeParserOptions( 
$this->mArticle->getContext() );
+   $parserOptions = $this->page->makeParserOptions( $this->context 
);
$parserOptions->setIsPreview( true );
$parserOptions->setIsSectionPreview( !is_null( $this->section ) 
&& $this->section !== '' );
$parserOptions->enableLimitReport();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I18a7f3b3eb1a9b18ea6ca20ad43878f4740f4e47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki/core[REL1_30]: EditPage: Stop using globals for configuration in non-static...

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

Change subject: EditPage: Stop using globals for configuration in non-static 
functions
..


EditPage: Stop using globals for configuration in non-static functions

Bug: T144366
Change-Id: Ie884527b64f86b6a989117a45c6ffa6d1893d2b7
(cherry picked from commit 85ea1246308b10b54c42292e3b43ca9380fd0e7f)
---
M includes/EditPage.php
1 file changed, 19 insertions(+), 26 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 6d918e6..bb82d93 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -821,7 +821,7 @@
 * @return bool
 */
protected function previewOnOpen() {
-   global $wgPreviewOnOpenNamespaces;
+   $previewOnOpenNamespaces = $this->context->getConfig()->get( 
'PreviewOnOpenNamespaces' );
$request = $this->context->getRequest();
if ( $request->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
@@ -838,8 +838,8 @@
// Standard preference behavior
return true;
} elseif ( !$this->mTitle->exists()
-   && isset( 
$wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
-   && 
$wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()]
+   && isset( 
$previewOnOpenNamespaces[$this->mTitle->getNamespace()] )
+   && 
$previewOnOpenNamespaces[$this->mTitle->getNamespace()]
) {
// Categories are special
return true;
@@ -1769,9 +1769,6 @@
 * time.
 */
public function internalAttemptSave( &$result, $bot = false ) {
-   global $wgMaxArticleSize;
-   global $wgContentHandlerUseDB;
-
$status = Status::newGood();
$user = $this->context->getUser();
 
@@ -1883,7 +1880,9 @@
}
 
$this->contentLength = strlen( $this->textbox1 );
-   if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
+   $config = $this->context->getConfig();
+   $maxArticleSize = $config->get( 'MaxArticleSize' );
+   if ( $this->contentLength > $maxArticleSize * 1024 ) {
// Error will be displayed by showEditForm()
$this->tooBig = true;
$status->setResult( false, self::AS_CONTENT_TOO_BIG );
@@ -1903,7 +1902,7 @@
 
$changingContentModel = false;
if ( $this->contentModel !== $this->mTitle->getContentModel() ) 
{
-   if ( !$wgContentHandlerUseDB ) {
+   if ( !$config->get( 'ContentHandlerUseDB' ) ) {
$status->fatal( 
'editpage-cannot-use-custom-model' );
$status->value = 
self::AS_CANNOT_USE_CUSTOM_MODEL;
return $status;
@@ -2182,7 +2181,7 @@
 
// Check for length errors again now that the section is merged 
in
$this->contentLength = strlen( $this->toEditText( $content ) );
-   if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
+   if ( $this->contentLength > $maxArticleSize * 1024 ) {
$this->tooBig = true;
$status->setResult( false, 
self::AS_MAX_ARTICLE_SIZE_EXCEEDED );
return $status;
@@ -2383,8 +2382,6 @@
}
 
public function setHeaders() {
-   global $wgAjaxEditStash;
-
$out = $this->context->getOutput();
 
$out->addModules( 'mediawiki.action.edit' );
@@ -2436,7 +2433,7 @@
# Keep Resources.php/mediawiki.action.edit.preview in sync with 
the possible keys
$out->addJsConfigVars( [
'wgEditMessage' => $msg,
-   'wgAjaxEditStash' => $wgAjaxEditStash,
+   'wgAjaxEditStash' => $this->context->getConfig()->get( 
'AjaxEditStash' ),
] );
}
 
@@ -2938,8 +2935,6 @@
}
 
protected function showHeader() {
-   global $wgAllowUserCss, $wgAllowUserJs;
-
$out = $this->context->getOutput();
$user = $this->context->getUser();
if ( $this->isConflict ) {
@@ -3064,14 +3059,15 @@
$isCssSubpage ? 
'usercssispublic' : 'userjsispublic'
);
if ( $this->formtype !== 'preview' ) {
-   if ( $isCssSubpage && 
$wgAllowUserCss ) {
+  

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Don't allow clients that mangle unicode to edit

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

Change subject: EditPage: Don't allow clients that mangle unicode to edit
..


EditPage: Don't allow clients that mangle unicode to edit

Get rid of the hack that turns unicode into hexadecimal codes for
browsers that don't support unicode, and prevent their edits entirely.

And instead of relying on $wgBrowserBlacklist, use a hidden HTML form
field - if the contents are mangled and don't match the original, then
reject the edit.

Bug: T67297
Change-Id: I20c2e396d7dfd6a3b23b94b218f94a847522576b
(cherry picked from commit 19b739bd19c437c5a637d85f431f139da7521508)
---
M RELEASE-NOTES-1.30
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/api/ApiEditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/EditPageTest.php
7 files changed, 48 insertions(+), 166 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 8517a8f..513dc3a 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,6 +73,7 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
+* $wgBrowserBlacklist is deprecated, and changing it will have no effect.
 
 === External library changes in 1.30 ===
 
@@ -221,6 +222,7 @@
 * wfShellExec() and related functions are deprecated, use Shell::command().
 * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
   user object. Using the method without the second argument is deprecated.
+* (T67297) Browsers that don't support Unicode will have their edits rejected.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5ffa064..5ec61d7 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2980,46 +2980,9 @@
 $wgLegacyEncoding = false;
 
 /**
- * Browser Blacklist for unicode non compliant browsers. Contains a list of
- * regexps : "/regexp/"  matching problematic browsers. These browsers will
- * be served encoded unicode in the edit box instead of real unicode.
+ * @deprecated since 1.30, does nothing
  */
-$wgBrowserBlackList = [
-   /**
-* Netscape 2-4 detection
-* The minor version may contain strings such as "Gold" or "SGoldC-SGI"
-* Lots of non-netscape user agents have "compatible", so it's useful 
to check for that
-* with a negative assertion. The [UIN] identifier specifies the level 
of security
-* in a Netscape/Mozilla browser, checking for it rules out a number of 
fakers.
-* The language string is unreliable, it is missing on NS4 Mac.
-*
-* Reference: http://www.psychedelix.com/agents/index.shtml
-*/
-   '/^Mozilla\/2\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-   '/^Mozilla\/3\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-   '/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-
-   /**
-* MSIE on Mac OS 9 is teh sux0r, converts þ to , ð to ,
-* Þ to  and Ð to 
-*
-* Known useragents:
-* - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
-* - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
-* - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
-* - [...]
-*
-* @link 
https://en.wikipedia.org/w/index.php?diff=12356041=12355864
-* @link https://en.wikipedia.org/wiki/Template%3AOS9
-*/
-   '/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
-
-   /**
-* Google wireless transcoder, seems to eat a lot of chars alive
-* 
https://it.wikipedia.org/w/index.php?title=Luciano_Ligabue=prev=8857361
-*/
-   '/^Mozilla\/4\.0 \(compatible; MSIE 6.0; Windows NT 5.0; Google 
Wireless Transcoder;\)/'
-];
+$wgBrowserBlackList = [];
 
 /**
  * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 7750b10..23b206b 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -41,6 +41,11 @@
  */
 class EditPage {
/**
+* Used for Unicode support checks
+*/
+   const UNICODE_CHECK = 'ℳ풲♥퓊퓃풾풸ℴ풹ℯ';
+
+   /**
 * Status: Article successfully updated
 */
const AS_SUCCESS_UPDATE = 200;
@@ -176,6 +181,11 @@
 * $wgContentHandlerUseDB being false
 */
const AS_CANNOT_USE_CUSTOM_MODEL = 241;
+
+   /**
+* Status: edit rejected because browser doesn't support Unicode.
+*/
+   const AS_UNICODE_NOT_SUPPORTED = 242;
 
/**
 * HTML id and name for the beginning of the edit form.
@@ -412,6 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: Clean up PageFragment callbacks

2017-09-22 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379934 )

Change subject: Hygiene: Clean up PageFragment callbacks
..

Hygiene: Clean up PageFragment callbacks

Clears out all of the getters in disguise, and makes them into proper
callbacks.

Change-Id: Ie7a7606767fbbf8e214482506d1abc182fb2642b
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageFragmentLoadState.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
5 files changed, 220 insertions(+), 234 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index df94009..5f7e8ce 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -46,7 +46,9 @@
 import org.wikipedia.theme.ThemeChooserDialog;
 import org.wikipedia.util.ClipboardUtil;
 import org.wikipedia.util.FeedbackUtil;
+import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.util.ShareUtil;
+import org.wikipedia.views.ObservableWebView;
 import org.wikipedia.wiktionary.WiktionaryDialog;
 
 import butterknife.BindView;
@@ -139,6 +141,54 @@
 currentActionMode.finish();
 }
 super.onPause();
+}
+
+@Override
+public boolean onCreateOptionsMenu(Menu menu) {
+if (!isSearching()) {
+getMenuInflater().inflate(R.menu.menu_page_actions, menu);
+return true;
+}
+return false;
+}
+
+@Override
+public boolean onPrepareOptionsMenu(Menu menu) {
+super.onPrepareOptionsMenu(menu);
+if (isSearching()) {
+return false;
+}
+
+MenuItem otherLangItem = menu.findItem(R.id.menu_page_other_languages);
+MenuItem shareItem = menu.findItem(R.id.menu_page_share);
+MenuItem addToListItem = menu.findItem(R.id.menu_page_add_to_list);
+MenuItem findInPageItem = menu.findItem(R.id.menu_page_find_in_page);
+MenuItem contentIssues = menu.findItem(R.id.menu_page_content_issues);
+MenuItem similarTitles = menu.findItem(R.id.menu_page_similar_titles);
+MenuItem themeChooserItem = 
menu.findItem(R.id.menu_page_font_and_theme);
+MenuItem tabsItem = menu.findItem(R.id.menu_page_show_tabs);
+
+
tabsItem.setIcon(ResourceUtil.getTabListIcon(pageFragment.getTabCount()));
+
+if (pageFragment.isLoading() || pageFragment.getErrorState()) {
+otherLangItem.setEnabled(false);
+shareItem.setEnabled(false);
+addToListItem.setEnabled(false);
+findInPageItem.setEnabled(false);
+contentIssues.setEnabled(false);
+similarTitles.setEnabled(false);
+themeChooserItem.setEnabled(false);
+} else {
+// Only display "Read in other languages" if the article is in 
other languages
+otherLangItem.setVisible(pageFragment.getPage() != null && 
pageFragment.getPage().getPageProperties().getLanguageCount() != 0);
+otherLangItem.setEnabled(true);
+shareItem.setEnabled(pageFragment.getPage() != null && 
pageFragment.getPage().isArticle());
+addToListItem.setEnabled(pageFragment.getPage() != null && 
pageFragment.getPage().isArticle());
+findInPageItem.setEnabled(true);
+updateMenuPageInfo(menu);
+themeChooserItem.setEnabled(true);
+}
+return true;
 }
 
 @Override
@@ -354,15 +404,15 @@
 bottomSheetPresenter.dismiss(getSupportFragmentManager());
 }
 
-@Nullable
 @Override
-public PageToolbarHideHandler onPageGetToolbarHideHandler() {
-return toolbarHideHandler;
+public void onPageInitWebView(@NonNull ObservableWebView webView) {
+toolbarHideHandler.setScrollView(webView);
 }
 
 @Override
 public void onPageLoadPage(@NonNull HistoryEntry entry) {
 hideLinkPreview();
+toolbarHideHandler.setFadeEnabled(false);
 app.getSessionFunnel().pageViewed(entry);
 }
 
@@ -377,25 +427,14 @@
 }
 
 @Override
-public boolean onPageIsSearching() {
-return isSearching();
-}
-
-@Nullable
-@Override
-public Fragment onPageGetTopFragment() {
-return pageFragment;
-}
-
-@Override
 public void onPageShowThemeChooser() {
 bottomSheetPresenter.show(getSupportFragmentManager(), new 
ThemeChooserDialog());
 }
 
 @Nullable
 @Override
-public ActionMode onPageStartSupportActionMode(@NonNull 
ActionMode.Callback callback) {
-return startActionMode(callback);
+public void 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: clean up a couple of attributes.

2017-09-22 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379933 )

Change subject: Hygiene: clean up a couple of attributes.
..

Hygiene: clean up a couple of attributes.

Change-Id: I6aa015da5fa04c57f18a5c72a0baa127674322dc
---
M app/src/main/res/layout/dialog_link_preview.xml
M app/src/main/res/layout/dialog_share_preview.xml
M app/src/main/res/layout/item_page_list_entry.xml
M app/src/main/res/layout/view_compilation_download_widget.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
7 files changed, 4 insertions(+), 10 deletions(-)


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

diff --git a/app/src/main/res/layout/dialog_link_preview.xml 
b/app/src/main/res/layout/dialog_link_preview.xml
index 8d824a7..5396970 100755
--- a/app/src/main/res/layout/dialog_link_preview.xml
+++ b/app/src/main/res/layout/dialog_link_preview.xml
@@ -58,7 +58,7 @@
 android:background="?attr/actionBarItemBackground"
 
android:contentDescription="@string/abc_action_menu_overflow_description"
 app:srcCompat="@drawable/ic_more_vert_white_24dp"
-android:tint="?attr/menu_icon_color"/>
+android:tint="?attr/material_theme_secondary_color"/>
 
 
 
 
diff --git a/app/src/main/res/layout/item_page_list_entry.xml 
b/app/src/main/res/layout/item_page_list_entry.xml
index e0f62a8..a19140f 100644
--- a/app/src/main/res/layout/item_page_list_entry.xml
+++ b/app/src/main/res/layout/item_page_list_entry.xml
@@ -116,7 +116,7 @@
 android:clickable="true"
 android:background="?attr/selectableItemBackgroundBorderless"
 app:srcCompat="@drawable/ic_favorite_white_24dp"
-android:tint="@color/material_icon_default_gray"
+android:tint="?attr/material_theme_de_emphasised_color"
 android:contentDescription="@null"
 android:visibility="gone"
 tools:visibility="visible"/>
diff --git a/app/src/main/res/layout/view_compilation_download_widget.xml 
b/app/src/main/res/layout/view_compilation_download_widget.xml
index c53aab6..ab3a93f 100644
--- a/app/src/main/res/layout/view_compilation_download_widget.xml
+++ b/app/src/main/res/layout/view_compilation_download_widget.xml
@@ -51,7 +51,7 @@
 android:layout_width="wrap_content"
 android:layout_height="match_parent"
 android:padding="2dp"
-android:tint="?attr/menu_icon_color"
+android:tint="?attr/material_theme_secondary_color"
 app:srcCompat="@drawable/ic_clear_white_24px"
 android:clickable="true"
 android:background="?attr/selectableItemBackgroundBorderless"
diff --git a/app/src/main/res/values/attrs.xml 
b/app/src/main/res/values/attrs.xml
index 8291d83..3049884 100644
--- a/app/src/main/res/values/attrs.xml
+++ b/app/src/main/res/values/attrs.xml
@@ -13,7 +13,6 @@
 
 
 
-
 
 
 
@@ -24,7 +23,6 @@
 
 
 
-
 
 
 
diff --git a/app/src/main/res/values/styles_dark.xml 
b/app/src/main/res/values/styles_dark.xml
index 17d187a..d150723 100644
--- a/app/src/main/res/values/styles_dark.xml
+++ b/app/src/main/res/values/styles_dark.xml
@@ -34,7 +34,6 @@
 @color/accent30
 @color/accent20
 @color/base90
-1.0
 @color/base18
 @color/color_state_nav_tab_dark
 @color/accent30
@@ -42,7 +41,6 @@
 @color/base14
 @style/HeaderEditButtonDark
 @color/accent75
-@color/white70
 @color/accent75
 @color/base100
 @color/white70
diff --git a/app/src/main/res/values/styles_light.xml 
b/app/src/main/res/values/styles_light.xml
index 565a845..78900ab 100644
--- a/app/src/main/res/values/styles_light.xml
+++ b/app/src/main/res/values/styles_light.xml
@@ -34,7 +34,6 @@
 @color/accent50
 @color/accent30
 @color/base0
-0.55
 @android:color/white
 @color/color_state_nav_tab_light
 @color/accent90
@@ -42,7 +41,6 @@
 @color/base100
 @style/HeaderEditButtonLight
 @color/accent50
-@color/black54
 @color/accent50
 @color/black87
 @color/black54

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: admin: Add gjg to contint-admin

2017-09-22 Thread Greg Grossmeier (Code Review)
Greg Grossmeier has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379932 )

Change subject: admin: Add gjg to contint-admin
..

admin: Add gjg to contint-admin

I could have used this to better debug the CI issue last night.

Change-Id: Ie445802d7bd5c362ea7e2c90a932143aa4354a49
---
M modules/admin/data/data.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/379932/1

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 14a98fd..746bf51 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -140,7 +140,7 @@
 gid: 719
 description: users with some sudo permissions on jenkins and nodepool hosts
 members: [bd808, cscott, dduvall, demon, krinkle, reedy, marktraceur,
-  twentyafterfour, zfilipin, thcipriani, legoktm,
+  twentyafterfour, zfilipin, thcipriani, legoktm, gjg,
   hashar, niedzielski, addshore]
 privileges: ['ALL = (jenkins) NOPASSWD: ALL',
  'ALL = (jenkins-slave) NOPASSWD: ALL',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add html5-misnesting high-priority category

2017-09-22 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379931 )

Change subject: Add html5-misnesting high-priority category
..

Add html5-misnesting high-priority category

Change-Id: I840c4dfc14308dffd02dd8a89ab4dcac13f6141a
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index a8275ac..6ce3aa3 100644
--- a/extension.json
+++ b/extension.json
@@ -111,6 +111,11 @@
"multi-colon-escape": {
"enabled": true,
"priority": "medium"
+   },
+   "html5-misnesting": {
+   "enabled": true,
+   "priority": "high",
+   "parser-migration": true
}
},
"LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index 542d2dd..bb90b07 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -42,6 +42,8 @@
"linter-category-pwrap-bug-workaround-desc": "These pages have a 
paragraph wrapping bug that could be worked around.",
"linter-category-tidy-whitespace-bug": "Tidy whitespace bug",
"linter-category-tidy-whitespace-bug-desc": "These pages trigger a tidy 
whitespace bug that should be worked around.",
+   "linter-category-html5-misnesting": "Misnested tag with different 
rendering in HTML5 and HTML4",
+   "linter-category-html5-misnesting-desc": "These misnested tags will 
behave differently in HTML5 compared to HTML4.",
"linter-numerrors": "($1 {{PLURAL:$1|error|errors}})",
"linker-page-title-edit": "$1 ($2)",
"linker-page-edit": "edit",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a06715f..8597bfa 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -46,6 +46,8 @@
"linter-category-pwrap-bug-workaround-desc": "Description of category.",
"linter-category-tidy-whitespace-bug": "Name of lint error category. 
See [[:mw:Help:Extension:Linter/tidy-whitespace-bug]]",
"linter-category-tidy-whitespace-bug-desc": "Description of category.",
+   "linter-category-html5-misnesting": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/html5-misnesting]]",
+   "linter-category-html5-misnesting-desc": "Description of category",
"linter-numerrors": "Shown after a category link to indicate how many 
errors are in that category. $1 is the number of errors, and can be used for 
PLURAL.\n{{Identical|Error}}",
"linker-page-title-edit": "Used in a table cell. $1 is a link to the 
page, $2 is pipe separated links to the edit and history pages, the link text 
is {{msg-mw|linker-page-edit}} and {{msg-mw|linker-page-history}}",
"linker-page-edit": "Link text for edit link in 
{{msg-mw|linker-page-title-edit}}\n{{Identical|Edit}}",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index 23527c7..614bf17 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -47,6 +47,7 @@
'pwrap-bug-workaround' => 9,
'tidy-whitespace-bug' => 10,
'multi-colon-escape' => 11,
+   'html5-misnesting' => 12,
];
 
/**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index dbf206f..43b6473 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -142,6 +142,7 @@
'self-closed-tag',
'misnested-tag',
'stripped-tag',
+   'html5-misnesting',
];
if ( in_array( $this->category, $hasNameCats ) 
&& isset( $lintError->params['name'] ) ) {
return Html::element( 'code', [], 
$lintError->params['name'] );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I840c4dfc14308dffd02dd8a89ab4dcac13f6141a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: WIP: Improve parenthetical handling

2017-09-22 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379930 )

Change subject: WIP: Improve parenthetical handling
..

WIP: Improve parenthetical handling

New test case shows current logic can be improved.

Change-Id: I145ebd61bc6615e1cd848226f70df96b53a94deb
---
M test/lib/transformations/summarize.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index b58e3a3..25f3903 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -43,6 +43,10 @@
 'The Planck–Einstein relation connects the particulate 
photon energy E with its associated wave 
frequency f:\n\nhttp://www.w3.org/1998/Math/MathML\;>\n  \n
\n  \nE\n=\n
h\nf\n  \n\n{\\displaystyle E=hf}\n  
\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\;
 class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" 
style=\"vertical-align: -0.671ex; width:7.533ex; 
height:2.509ex;\">',
 'The Planck–Einstein relation connects the particulate 
photon energy E with its associated wave 
frequency f:\n\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\;
 class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" 
style=\"vertical-align: -0.671ex; width:7.533ex; 
height:2.509ex;\">'
 ],
+[
+'Azerbaijan (æ(listen) AZ; 
Azerbaijani:  Azərbaycan, officially the Republic of 
Azerbaijan (Azerbaijani: Azərbaycan Respublikası)), is a country.',
+'Azerbaijan, is a country.'
+],
 // Any parentheticals inside a data-mw attribute are ignored.
 [
 'Shakira Isabel Mebarak Ripoll (pronounced[(t)ʃaˈkiɾa isaˈβel meβaˈɾak riˈpol]; 
English: /ʃəˈkiːrə/;
 born 2 February 1977) is a Colombian singer, songwriter, dancer.',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I145ebd61bc6615e1cd848226f70df96b53a94deb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[REL1_27]: Read whitelist using file_get_contents to read it all at once

2017-09-22 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379904 )

Change subject: Read whitelist using file_get_contents to read it all at once
..

Read whitelist using file_get_contents to read it all at once

Bug reported at 
https://www.mediawiki.org/w/index.php?title=Topic:S27v0luobpyhyjl9_showPostId=trjfnwig076af8hp#flow-post-trjfnwig076af8hp

Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
---
M BanPests.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/BanPests.php b/BanPests.php
index 68e9f24..fc7e882 100644
--- a/BanPests.php
+++ b/BanPests.php
@@ -12,10 +12,15 @@
throw new MWException( 'You need to specify a 
whitelist!  $wgBaNwhitelist should point to a filename that contains the 
whitelist.' );
}
 
+<<< HEAD
$fh = fopen($wgBaNwhitelist, 'r');
$file = fread($fh,200);
fclose($fh);
return (preg_split('/\r\n|\r|\n/', $file));
+===
+   $file = file_get_contents( $wgBaNwhitelist );
+   return preg_split( '/\r\n|\r|\n/', $file );
+>>> a9858b9... Read whitelist using file_get_contents to read it all at 
once
}
 
static function getBannableUsers() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: REL1_27
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Niharika29 

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


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

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

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
(cherry picked from commit 5cd20435dc1aa512e2033041b09e026c342f8516)
---
M includes/EditPage.php
M includes/actions/EditAction.php
2 files changed, 5 insertions(+), 0 deletions(-)

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



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/379859
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6c7dfbaa432239389d210051372427b8fa045b4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jackmcbarn 
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] mediawiki/core[REL1_30]: SpecialSearch: Fix unintended `margin` when zoom level is ab...

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

Change subject: SpecialSearch: Fix unintended `margin` when zoom level is above 
100%
..

SpecialSearch: Fix unintended `margin` when zoom level is above 100%

With zoom level > 100% on Firefox, `#mw-searchoptions` which is a
`fieldset` element adds unintended `margin` with negative `margin-top`
applied. This is a workaround for wrong browser behaviour and
regression of I4bda42c03a5.

Bug: T176499
Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
(cherry picked from commit 2582641fcfa2f5ead7697ae32d417327f4a8362f)
---
M resources/src/mediawiki.special/mediawiki.special.search.styles.css
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/379903/1

diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.styles.css 
b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
index b37cf2f..ea9b987 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
@@ -94,6 +94,8 @@
 /*==*/
 
 #mw-searchoptions {
+   /* Support: Firefox, needs `clear: both` on `fieldset` when zoom level 
> 100%, see T176499 */
+   clear: both;
padding: 0.5em 0.75em 0.75em 0.75em;
background-color: #f8f9fa;
margin: -1px 0 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Test case for T176521

2017-09-22 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379902 )

Change subject: Test case for T176521
..

Test case for T176521

Bug: T176521
Change-Id: Ifd0c47114973fd7c1cc1c2231a52947b5dfcbe34
---
M test/lib/transformations/summarize.js
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index 75d3532..b58e3a3 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -43,6 +43,11 @@
 'The Planck–Einstein relation connects the particulate 
photon energy E with its associated wave 
frequency f:\n\nhttp://www.w3.org/1998/Math/MathML\;>\n  \n
\n  \nE\n=\n
h\nf\n  \n\n{\\displaystyle E=hf}\n  
\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\;
 class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" 
style=\"vertical-align: -0.671ex; width:7.533ex; 
height:2.509ex;\">',
 'The Planck–Einstein relation connects the particulate 
photon energy E with its associated wave 
frequency f:\n\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\;
 class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" 
style=\"vertical-align: -0.671ex; width:7.533ex; 
height:2.509ex;\">'
 ],
+// Any parentheticals inside a data-mw attribute are ignored.
+[
+'Shakira Isabel Mebarak Ripoll (pronounced[(t)ʃaˈkiɾa isaˈβel meβaˈɾak riˈpol]; 
English: /ʃəˈkiːrə/;
 born 2 February 1977) is a Colombian singer, songwriter, dancer.',
+'Shakira Isabel Mebarak Ripoll is a Colombian 
singer, songwriter, dancer.'
+],
 // Any content in parentheticals is stripped and no double spaces 
are left in the output
 [
 'Epistemology (/ᵻˌpɪstᵻˈmɒlədʒi/(listen);
 from Greek ἐπιστήμη, epistēmē, meaning \'knowledge\', and λόγος, logos, 
meaning \'logical discourse\') is the branch of 
philosophy concerned with the theory of 
knowledge.',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd0c47114973fd7c1cc1c2231a52947b5dfcbe34
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


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

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

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


EditPage: Don't use $wgRequest

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

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 12966e5..6bcf293 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 @@

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix Amazon token timeout

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

Change subject: Fix Amazon token timeout
..

Fix Amazon token timeout

Oops, setTimeout takes the fn first, time second

Change-Id: Id5317f26ca3685356ed056a4af0e19fbeb7fb37d
---
M amazon_gateway/amazon.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/amazon_gateway/amazon.js b/amazon_gateway/amazon.js
index 7f6a1dd..99d978a 100644
--- a/amazon_gateway/amazon.js
+++ b/amazon_gateway/amazon.js
@@ -106,7 +106,7 @@
if ( loggedIn ) {
tokenLifetime = parseInt( getURLParameter( 
'expires_in', location.hash ), 10 );
createWalletWidget();
-   setTimeout( tokenLifetime * 1000, tokenExpired );
+   setTimeout( tokenExpired, tokenLifetime * 1000 );
} else {
if ( loginError ) {
showErrorAndLoginButton(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id5317f26ca3685356ed056a4af0e19fbeb7fb37d
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] research...wheels[master]: Bumps revscoring to 2.0.7

2017-09-22 Thread Halfak (Code Review)
Halfak has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379883 )

Change subject: Bumps revscoring to 2.0.7
..


Bumps revscoring to 2.0.7

Change-Id: I91c3d2f1055fdd7ca2da02eec88d790c0d2d6637
---
R revscoring-2.0.7-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/revscoring-2.0.6-py2.py3-none-any.whl 
b/revscoring-2.0.7-py2.py3-none-any.whl
similarity index 79%
rename from revscoring-2.0.6-py2.py3-none-any.whl
rename to revscoring-2.0.7-py2.py3-none-any.whl
index a1ce2d2..b7b2013 100644
--- a/revscoring-2.0.6-py2.py3-none-any.whl
+++ b/revscoring-2.0.7-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91c3d2f1055fdd7ca2da02eec88d790c0d2d6637
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 
Gerrit-Reviewer: Halfak 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Bumps revscoring to 2.0.7

2017-09-22 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379883 )

Change subject: Bumps revscoring to 2.0.7
..

Bumps revscoring to 2.0.7

Change-Id: I91c3d2f1055fdd7ca2da02eec88d790c0d2d6637
---
R revscoring-2.0.7-py2.py3-none-any.whl
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/research/ores/wheels 
refs/changes/83/379883/1

diff --git a/revscoring-2.0.6-py2.py3-none-any.whl 
b/revscoring-2.0.7-py2.py3-none-any.whl
similarity index 79%
rename from revscoring-2.0.6-py2.py3-none-any.whl
rename to revscoring-2.0.7-py2.py3-none-any.whl
index a1ce2d2..b7b2013 100644
--- a/revscoring-2.0.6-py2.py3-none-any.whl
+++ b/revscoring-2.0.7-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91c3d2f1055fdd7ca2da02eec88d790c0d2d6637
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Halfak 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Access for Slaporte (Stephen LaPorte) to stat1005

2017-09-22 Thread Zoranzoki21 (Code Review)
Zoranzoki21 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379851 )

Change subject: Access for Slaporte (Stephen LaPorte) to stat1005
..

Access for Slaporte (Stephen LaPorte) to stat1005

Bug: T176518
Change-Id: I157906f9c401c4b6b04b79634d3b0a105e34ea51
---
M modules/admin/data/data.yaml
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/379851/2

diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index 14a98fd..9a7b793 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -2233,6 +2233,15 @@
   - ssh-rsa 
B3NzaC1yc2EDAQABAAABAQD3yvsX9fUZX7B14Rzko/VbDfdrDZvHUBP/SmKM9oxKI5bcCaIa6u7l+faDjEfAte+SgMSj+jl1azOZYtJ/+fdRVrIRAkS0heL9DDNSdJxuOcWdY3QCOWu6CmcAPWNfo2DxR4FZit0CbFtyH0s6CTOoiG0reF8uiQR+Oyt4mZKSecfk8zX1N5B50hkvbUArrNUg1fLNED1SuJxtBVo73+tEWUOaYyDovy5D0UU8LH0hFp0pKwDeYnlRJxHTV4h+AQ2SqECQ2wg+k5WX8Kd7MYO/7hVuZMkoD9wlHnPMgTSthy4AzGcliO3mNHa0mfHlZtcf/ck0bm75mZhyrXlUewKD
 ovasil...@wmf1395.corp.wikimedia.org
 uid: 15207
 email: ovasil...@wikimedia.org
+  slaporte:
+ensure: present
+gid: 500
+name: ovasileva
+realname: Stephen LaPorte
+ssh_keys:
+  - ssh-rsa 
B3NzaC1yc2EBIwAAAQEArci9cR3XiDsHZ6KlagctW6ky/bPz3ArsNx621VhfGx9L+c/oNcU0tOAorjVQGrg0fSmaF45r/kOtyE5aE4wQY8mB7C8wCqzj9bWaeSwY54pmIAXwEyV50xiR1+MhFWSi7DolJGgRlUX21dztWNwX60SZEDQXoJNrhp091v5DeFRkI/0+84Yz8/F2PvPsh7fxKtdaK/427n6lO5eWtOhdHI9y6pIJ2wnygg1H70hsthRrWadXkyBr7hiMt+pvwGNHJIqC5cauQ6TgcvYd0fH+8Lxd7gZBBNb1S09HrUq94GY28U5x1gHI+SI3hpDYckRYy80ZZgzapftavPbCqAJlmw==
 stephen.lapo...@gmail.com
+uid: 176518
+email: stephen.lapo...@gmail.com
 ## Users mtizzoni, panisson, paolotti, & ciro have been added as ISI 
Foundation members for analytics access.
 ## Access will be revoked by request from Dario Taraborelli when it is no 
longer needed, see T141634 for details.
   mtizzoni:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I157906f9c401c4b6b04b79634d3b0a105e34ea51
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Zoranzoki21 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: dib: php5.5 packages are now in contint::packages::php

2017-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379875 )

Change subject: dib: php5.5 packages are now in contint::packages::php
..

dib: php5.5 packages are now in contint::packages::php

Got upstreamed in operations/puppet.git

Bug: T174972
Change-Id: Ie21ed2154105ba3591773005c8a875009fb14f6d
Depends-On: Ice93b75c8c74c04970707f831fca7c0d71748fd8
---
M dib/puppet/ciimage.pp
1 file changed, 1 insertion(+), 27 deletions(-)


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

diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index e0b531b..5059920 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -40,33 +40,7 @@
 
 if os_version('debian == jessie') {
 apt::repository { 'jessie-ci-php55':
-uri=> 'http://apt.wikimedia.org/wikimedia',
-dist   => 'jessie-wikimedia',
-components => 'component/ci',
-source => false,
-}
-package { [
-'php5.5-cli',
-'php5.5-common',
-'php5.5-curl',
-'php5.5-dev',
-'php5.5-gd',
-'php5.5-gmp',
-'php5.5-intl',
-'php5.5-ldap',
-'php5.5-luasandbox',
-'php5.5-mbstring',
-'php5.5-mcrypt',
-'php5.5-mysql',
-'php5.5-redis',
-'php5.5-sqlite3',
-'php5.5-tidy',
-'php5.5-xsl',
-]: ensure => present,
-require   => [
-  Apt::Repository['jessie-ci-php55'],
-  Exec['apt-get update'],
-],
+ensure   => absent,
 }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[REL1_29]: Read whitelist using file_get_contents to read it all at once

2017-09-22 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379871 )

Change subject: Read whitelist using file_get_contents to read it all at once
..

Read whitelist using file_get_contents to read it all at once

Bug reported at 
https://www.mediawiki.org/w/index.php?title=Topic:S27v0luobpyhyjl9_showPostId=trjfnwig076af8hp#flow-post-trjfnwig076af8hp

Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
(cherry picked from commit a9858b9dadc1569328883af71654880f0873abc6)
---
M BanPests.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/BanPests.php b/BanPests.php
index 92193a0..46440c2 100644
--- a/BanPests.php
+++ b/BanPests.php
@@ -14,9 +14,7 @@
);
}
 
-   $fh = fopen( $wgBaNwhitelist, 'r' );
-   $file = fread( $fh, 200 );
-   fclose( $fh );
+   $file = file_get_contents( $wgBaNwhitelist );
return preg_split( '/\r\n|\r|\n/', $file );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: REL1_29
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Niharika29 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Avoid unnecessary calls to Article::getContext()

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

Change subject: EditPage: Avoid unnecessary calls to Article::getContext()
..

EditPage: Avoid unnecessary calls to Article::getContext()

Change-Id: I18a7f3b3eb1a9b18ea6ca20ad43878f4740f4e47
(cherry picked from commit f8d58ec3eaf6ad37899ee33b00517a151ab8b29e)
---
M includes/EditPage.php
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/379865/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index bb82d93..f68fd92 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -1684,7 +1684,7 @@
 
// Run new style post-section-merge edit filter
if ( !Hooks::run( 'EditFilterMergedContent',
-   [ $this->mArticle->getContext(), $content, 
$status, $this->summary,
+   [ $this->context, $content, $status, 
$this->summary,
$user, $this->minoredit ] )
) {
# Error messages etc. could be handled within the 
hook...
@@ -3477,7 +3477,7 @@
$newContent = 
$oldContent->getContentHandler()->makeEmptyContent();
}
 
-   $de = 
$oldContent->getContentHandler()->createDifferenceEngine( 
$this->mArticle->getContext() );
+   $de = 
$oldContent->getContentHandler()->createDifferenceEngine( $this->context );
$de->setContent( $oldContent, $newContent );
 
$difftext = $de->getDiff( $oldtitle, $newtitle );
@@ -3685,7 +3685,7 @@
$content2 = $this->toEditContent( $this->textbox2 );
 
$handler = ContentHandler::getForModelID( 
$this->contentModel );
-   $de = $handler->createDifferenceEngine( 
$this->mArticle->getContext() );
+   $de = $handler->createDifferenceEngine( $this->context 
);
$de->setContent( $content2, $content1 );
$de->showDiff(
$this->context->msg( 'yourtext' )->parse(),
@@ -3968,7 +3968,7 @@
 * @return ParserOptions
 */
protected function getPreviewParserOptions() {
-   $parserOptions = $this->page->makeParserOptions( 
$this->mArticle->getContext() );
+   $parserOptions = $this->page->makeParserOptions( $this->context 
);
$parserOptions->setIsPreview( true );
$parserOptions->setIsSectionPreview( !is_null( $this->section ) 
&& $this->section !== '' );
$parserOptions->enableLimitReport();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I18a7f3b3eb1a9b18ea6ca20ad43878f4740f4e47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


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

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

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

EditPage: Deprecate public isCssJsSubpage related member variables

Just use the functions directly.

Change-Id: Ie374a5cd4c9255b595ff4a88025738720434a802
(cherry picked from commit 59485d984c1645b7494d1a7d7528c36d44f3e1d8)
---
M includes/EditPage.php
1 file changed, 25 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/379861/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 23b206b..b910a0a 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -230,16 +230,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 */
@@ -627,10 +639,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
@@ -2795,7 +2808,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 ) );
}
 
@@ -3031,27 +3044,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 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Mark getSubmitButtonLabel() as @since 1.30

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

Change subject: EditPage: Mark getSubmitButtonLabel() as @since 1.30
..

EditPage: Mark getSubmitButtonLabel() as @since 1.30

Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
(cherry picked from commit 5965c25eed62166b9895683256e9849e3cc9)
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index f68fd92..22e8566 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4358,6 +4358,7 @@
/**
 * Get the message key of the label for the button to save the page
 *
+* @since 1.30
 * @return string
 */
protected function getSubmitButtonLabel() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Deprecate $mArticle and $mTitle for public usage

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

Change subject: EditPage: Deprecate $mArticle and $mTitle for public usage
..

EditPage: Deprecate $mArticle and $mTitle for public usage

Change-Id: I2a931826ea142f2214c5f29944c3c3b18da19bad
(cherry picked from commit a154a28c7a4442a7d08689036dc54688b0867a64)
---
M includes/EditPage.php
1 file changed, 8 insertions(+), 2 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index b910a0a..6d918e6 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -213,12 +213,18 @@
 */
const POST_EDIT_COOKIE_DURATION = 1200;
 
-   /** @var Article */
+   /**
+* @deprecated for public usage since 1.30 use EditPage::getArticle()
+* @var Article
+*/
public $mArticle;
/** @var WikiPage */
private $page;
 
-   /** @var Title */
+   /**
+* @deprecated for public usage since 1.30 use EditPage::getTitle()
+* @var Title
+*/
public $mTitle;
 
/** @var null|Title */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a931826ea142f2214c5f29944c3c3b18da19bad
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Remove duplicate release note for $wgOOUIEditPage removal

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

Change subject: Remove duplicate release note for $wgOOUIEditPage removal
..

Remove duplicate release note for $wgOOUIEditPage removal

And capitalize Unicode properly.

Follows-up b2441fc57d6e.

Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
(cherry picked from commit c526e3b5fa22f22c299e4f59827b695693b80ff2)
---
M RELEASE-NOTES-1.30
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index e8e3404..2090ce9 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,10 +73,8 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
-  edit interface.
 * (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
-  Instead, users using browsers that do not support unicode will be unable to 
edit
+  Instead, users using browsers that do not support Unicode will be unable to 
edit
   and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlockAndNuke[REL1_28]: Read whitelist using file_get_contents to read it all at once

2017-09-22 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379869 )

Change subject: Read whitelist using file_get_contents to read it all at once
..

Read whitelist using file_get_contents to read it all at once

Bug reported at 
https://www.mediawiki.org/w/index.php?title=Topic:S27v0luobpyhyjl9_showPostId=trjfnwig076af8hp#flow-post-trjfnwig076af8hp

Bug: T173687
Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
(cherry picked from commit a9858b9dadc1569328883af71654880f0873abc6)
---
M BanPests.php
1 file changed, 1 insertion(+), 3 deletions(-)


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

diff --git a/BanPests.php b/BanPests.php
index 73425fe..d5c63ac 100644
--- a/BanPests.php
+++ b/BanPests.php
@@ -14,9 +14,7 @@
);
}
 
-   $fh = fopen( $wgBaNwhitelist, 'r' );
-   $file = fread( $fh, 200 );
-   fclose( $fh );
+   $file = file_get_contents( $wgBaNwhitelist );
return preg_split( '/\r\n|\r|\n/', $file );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4599b81ddc12de5bb6d548a840a33b2161d72a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlockAndNuke
Gerrit-Branch: REL1_28
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: Niharika29 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Don't allow clients that mangle unicode to edit

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

Change subject: EditPage: Don't allow clients that mangle unicode to edit
..

EditPage: Don't allow clients that mangle unicode to edit

Get rid of the hack that turns unicode into hexadecimal codes for
browsers that don't support unicode, and prevent their edits entirely.

And instead of relying on $wgBrowserBlacklist, use a hidden HTML form
field - if the contents are mangled and don't match the original, then
reject the edit.

Bug: T67297
Change-Id: I20c2e396d7dfd6a3b23b94b218f94a847522576b
(cherry picked from commit 19b739bd19c437c5a637d85f431f139da7521508)
---
M RELEASE-NOTES-1.30
M includes/DefaultSettings.php
M includes/EditPage.php
M includes/api/ApiEditPage.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/EditPageTest.php
7 files changed, 48 insertions(+), 166 deletions(-)


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

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 8517a8f..513dc3a 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,6 +73,7 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
+* $wgBrowserBlacklist is deprecated, and changing it will have no effect.
 
 === External library changes in 1.30 ===
 
@@ -221,6 +222,7 @@
 * wfShellExec() and related functions are deprecated, use Shell::command().
 * (T138166) SpecialEmailUser::getTarget() now requires a second argument, the 
sending
   user object. Using the method without the second argument is deprecated.
+* (T67297) Browsers that don't support Unicode will have their edits rejected.
 
 == Compatibility ==
 MediaWiki 1.30 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 5ffa064..5ec61d7 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2980,46 +2980,9 @@
 $wgLegacyEncoding = false;
 
 /**
- * Browser Blacklist for unicode non compliant browsers. Contains a list of
- * regexps : "/regexp/"  matching problematic browsers. These browsers will
- * be served encoded unicode in the edit box instead of real unicode.
+ * @deprecated since 1.30, does nothing
  */
-$wgBrowserBlackList = [
-   /**
-* Netscape 2-4 detection
-* The minor version may contain strings such as "Gold" or "SGoldC-SGI"
-* Lots of non-netscape user agents have "compatible", so it's useful 
to check for that
-* with a negative assertion. The [UIN] identifier specifies the level 
of security
-* in a Netscape/Mozilla browser, checking for it rules out a number of 
fakers.
-* The language string is unreliable, it is missing on NS4 Mac.
-*
-* Reference: http://www.psychedelix.com/agents/index.shtml
-*/
-   '/^Mozilla\/2\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-   '/^Mozilla\/3\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-   '/^Mozilla\/4\.[^ ]+ [^(]*?\((?!compatible).*; [UIN]/',
-
-   /**
-* MSIE on Mac OS 9 is teh sux0r, converts þ to , ð to ,
-* Þ to  and Ð to 
-*
-* Known useragents:
-* - Mozilla/4.0 (compatible; MSIE 5.0; Mac_PowerPC)
-* - Mozilla/4.0 (compatible; MSIE 5.15; Mac_PowerPC)
-* - Mozilla/4.0 (compatible; MSIE 5.23; Mac_PowerPC)
-* - [...]
-*
-* @link 
https://en.wikipedia.org/w/index.php?diff=12356041=12355864
-* @link https://en.wikipedia.org/wiki/Template%3AOS9
-*/
-   '/^Mozilla\/4\.0 \(compatible; MSIE \d+\.\d+; Mac_PowerPC\)/',
-
-   /**
-* Google wireless transcoder, seems to eat a lot of chars alive
-* 
https://it.wikipedia.org/w/index.php?title=Luciano_Ligabue=prev=8857361
-*/
-   '/^Mozilla\/4\.0 \(compatible; MSIE 6.0; Windows NT 5.0; Google 
Wireless Transcoder;\)/'
-];
+$wgBrowserBlackList = [];
 
 /**
  * If set to true, the MediaWiki 1.4 to 1.5 schema conversion will
diff --git a/includes/EditPage.php b/includes/EditPage.php
index 7750b10..23b206b 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -41,6 +41,11 @@
  */
 class EditPage {
/**
+* Used for Unicode support checks
+*/
+   const UNICODE_CHECK = 'ℳ풲♥퓊퓃풾풸ℴ풹ℯ';
+
+   /**
 * Status: Article successfully updated
 */
const AS_SUCCESS_UPDATE = 200;
@@ -176,6 +181,11 @@
 * $wgContentHandlerUseDB being false
 */
const AS_CANNOT_USE_CUSTOM_MODEL = 241;
+
+   /**
+* Status: edit rejected because browser doesn't support Unicode.
+*/
+   const AS_UNICODE_NOT_SUPPORTED = 242;
 
/**
 * HTML id and name for the beginning of the edit form.
@@ -412,6 

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

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

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
(cherry picked from commit 5cd20435dc1aa512e2033041b09e026c342f8516)
---
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/59/379859/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/379859
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: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: EditPage: Stop using globals for configuration in non-static...

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

Change subject: EditPage: Stop using globals for configuration in non-static 
functions
..

EditPage: Stop using globals for configuration in non-static functions

Bug: T144366
Change-Id: Ie884527b64f86b6a989117a45c6ffa6d1893d2b7
(cherry picked from commit 85ea1246308b10b54c42292e3b43ca9380fd0e7f)
---
M includes/EditPage.php
1 file changed, 19 insertions(+), 26 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 6d918e6..bb82d93 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -821,7 +821,7 @@
 * @return bool
 */
protected function previewOnOpen() {
-   global $wgPreviewOnOpenNamespaces;
+   $previewOnOpenNamespaces = $this->context->getConfig()->get( 
'PreviewOnOpenNamespaces' );
$request = $this->context->getRequest();
if ( $request->getVal( 'preview' ) == 'yes' ) {
// Explicit override from request
@@ -838,8 +838,8 @@
// Standard preference behavior
return true;
} elseif ( !$this->mTitle->exists()
-   && isset( 
$wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()] )
-   && 
$wgPreviewOnOpenNamespaces[$this->mTitle->getNamespace()]
+   && isset( 
$previewOnOpenNamespaces[$this->mTitle->getNamespace()] )
+   && 
$previewOnOpenNamespaces[$this->mTitle->getNamespace()]
) {
// Categories are special
return true;
@@ -1769,9 +1769,6 @@
 * time.
 */
public function internalAttemptSave( &$result, $bot = false ) {
-   global $wgMaxArticleSize;
-   global $wgContentHandlerUseDB;
-
$status = Status::newGood();
$user = $this->context->getUser();
 
@@ -1883,7 +1880,9 @@
}
 
$this->contentLength = strlen( $this->textbox1 );
-   if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
+   $config = $this->context->getConfig();
+   $maxArticleSize = $config->get( 'MaxArticleSize' );
+   if ( $this->contentLength > $maxArticleSize * 1024 ) {
// Error will be displayed by showEditForm()
$this->tooBig = true;
$status->setResult( false, self::AS_CONTENT_TOO_BIG );
@@ -1903,7 +1902,7 @@
 
$changingContentModel = false;
if ( $this->contentModel !== $this->mTitle->getContentModel() ) 
{
-   if ( !$wgContentHandlerUseDB ) {
+   if ( !$config->get( 'ContentHandlerUseDB' ) ) {
$status->fatal( 
'editpage-cannot-use-custom-model' );
$status->value = 
self::AS_CANNOT_USE_CUSTOM_MODEL;
return $status;
@@ -2182,7 +2181,7 @@
 
// Check for length errors again now that the section is merged 
in
$this->contentLength = strlen( $this->toEditText( $content ) );
-   if ( $this->contentLength > $wgMaxArticleSize * 1024 ) {
+   if ( $this->contentLength > $maxArticleSize * 1024 ) {
$this->tooBig = true;
$status->setResult( false, 
self::AS_MAX_ARTICLE_SIZE_EXCEEDED );
return $status;
@@ -2383,8 +2382,6 @@
}
 
public function setHeaders() {
-   global $wgAjaxEditStash;
-
$out = $this->context->getOutput();
 
$out->addModules( 'mediawiki.action.edit' );
@@ -2436,7 +2433,7 @@
# Keep Resources.php/mediawiki.action.edit.preview in sync with 
the possible keys
$out->addJsConfigVars( [
'wgEditMessage' => $msg,
-   'wgAjaxEditStash' => $wgAjaxEditStash,
+   'wgAjaxEditStash' => $this->context->getConfig()->get( 
'AjaxEditStash' ),
] );
}
 
@@ -2938,8 +2935,6 @@
}
 
protected function showHeader() {
-   global $wgAllowUserCss, $wgAllowUserJs;
-
$out = $this->context->getOutput();
$user = $this->context->getUser();
if ( $this->isConflict ) {
@@ -3064,14 +3059,15 @@
$isCssSubpage ? 
'usercssispublic' : 'userjsispublic'
);
if ( $this->formtype !== 'preview' ) {
-   if ( $isCssSubpage && 
$wgAllowUserCss ) {
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_30]: Add release notes for EditPage changes in 1.30

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

Change subject: Add release notes for EditPage changes in 1.30
..

Add release notes for EditPage changes in 1.30

Change-Id: I42368cd97a2b25fb5d31c551442a527465157ce8
(cherry picked from commit b2441fc57d6edc944b8390b17ac0ca33a15fb6f7)
---
M RELEASE-NOTES-1.30
1 file changed, 22 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/379864/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index 513dc3a..e8e3404 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,7 +73,11 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* $wgBrowserBlacklist is deprecated, and changing it will have no effect.
+* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
+  edit interface.
+* (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
+  Instead, users using browsers that do not support unicode will be unable to 
edit
+  and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===
 
@@ -196,11 +200,23 @@
   RunningStat\RunningStat should be used instead.
 * MWMemcached and MemCachedClientforWiki classes (deprecated in 1.27) were 
removed.
   The MemcachedClient class should be used instead.
-* EditPage::isOouiEnabled() is deprecated and will always return true.
-* EditPage::getSummaryInput() and ::getSummaryInputOOUI() are deprecated. 
Please
-  use ::getSummaryInputWidget() instead.
-* EditPage::getCheckboxes() and ::getCheckboxesOOUI() are deprecated. Please
-  use ::getCheckboxesWidget() instead.
+* EditPage underwent some refactoring and deprecations:
+  * EditPage::isOouiEnabled() is deprecated and will always return true.
+  * EditPage::getSummaryInput() and ::getSummaryInputOOUI() are deprecated. 
Please
+use ::getSummaryInputWidget() instead.
+  * EditPage::getCheckboxes() and ::getCheckboxesOOUI() are deprecated. Please
+use ::getCheckboxesWidget() instead.
+  * Creating an EditPage instance without calling EditPage::setContextTitle() 
should
+be avoided and will be deprecated in a future release.
+  * EditPage::safeUnicodeInput() and ::safeUnicodeOutput() are deprecated and 
no-ops.
+  * EditPage::$isCssJsSubpage, ::$isCssSubpage, and ::$isJsSubpage are 
deprecated. The
+corresponding methods from Title should be used instead.
+  * EditPage::$isWrongCaseCssJsPage is deprecated. There is no replacement.
+  * EditPage::$mArticle and ::$mTitle are deprecated for public usage. The 
getters
+::getArticle() and ::getTitle() should be used instead.
+  * Trying to control or fake EditPage context by overriding $wgUser, 
$wgRequest, $wgOut,
+and $wgLang is no longer supported and won't work. The IContextSource 
returned from
+EditPage::getContext() must be modified instead.
 * Parser::getRandomString() (deprecated in 1.26) was removed.
 * Parser::uniqPrefix() (deprecated in 1.26) was removed.
 * Parser::extractTagsAndParams() now only accepts three arguments. The fourth,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42368cd97a2b25fb5d31c551442a527465157ce8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_30
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Legoktm 

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


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

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

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

EditPage: Don't use $wgRequest

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/58/379858/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 12966e5..6bcf293 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 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: Add multi-colon-escape linter medium-priority category

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

Change subject: Add multi-colon-escape linter medium-priority category
..


Add multi-colon-escape linter medium-priority category

Change-Id: I9f21f3128b78e7b2459c18a9121605dffd5a1bc4
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/CategoryManager.php
M includes/LintErrorsPager.php
5 files changed, 15 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 11364b9..a8275ac 100644
--- a/extension.json
+++ b/extension.json
@@ -107,6 +107,10 @@
"enabled": true,
"priority": "high",
"parser-migration": true
+   },
+   "multi-colon-escape": {
+   "enabled": true,
+   "priority": "medium"
}
},
"LinterSubmitterWhitelist": {
diff --git a/i18n/en.json b/i18n/en.json
index c92cb3a..542d2dd 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -13,6 +13,7 @@
"linter-pager-obsolete-tag-details": "Obsolete HTML tag",
"linter-pager-bogus-image-options-details": "Bogus file option",
"linter-pager-missing-end-tag-details": "Missing end tag",
+   "linter-pager-multi-colon-escape-details": "Multi colon escape",
"linter-pager-stripped-tag-details": "Stripped tag",
"linter-pager-self-closed-tag-details": "Self-closed tag",
"linter-pager-deletable-table-tag-details": "Table tag that should be 
deleted",
@@ -27,6 +28,8 @@
"linter-category-bogus-image-options-desc": "These pages have files 
with bogus options.",
"linter-category-missing-end-tag": "Missing end tag",
"linter-category-missing-end-tag-desc": "These pages have missing end 
tags.",
+   "linter-category-multi-colon-escape": "Multi colon escape",
+   "linter-category-multi-colon-escape-desc": "These pages have links 
prefixed with multiple colons.",
"linter-category-stripped-tag": "Stripped tags",
"linter-category-stripped-tag-desc": "These pages have stripped tags.",
"linter-category-self-closed-tag": "Self-closed tags",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index c3f7a71..a06715f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,6 +17,7 @@
"linter-pager-obsolete-tag-details": "Table column heading",
"linter-pager-bogus-image-options-details": "Table column heading",
"linter-pager-missing-end-tag-details": "Table column heading",
+   "linter-pager-multi-colon-escape-details": "Table column heading",
"linter-pager-stripped-tag-details": "Table column heading",
"linter-pager-self-closed-tag-details": "Table column heading",
"linter-pager-deletable-table-tag-details": "Table column heading",
@@ -31,6 +32,8 @@
"linter-category-bogus-image-options-desc": "Description of category",
"linter-category-missing-end-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/missing-end-tag]]",
"linter-category-missing-end-tag-desc": "Description of category",
+   "linter-category-multi-colon-escape": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/multi-colon-escape]]",
+   "linter-category-multi-colon-escape-desc": "Description of category",
"linter-category-stripped-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/stripped-tag]]",
"linter-category-stripped-tag-desc": "Description of category",
"linter-category-self-closed-tag": "Name of lint error category. See 
[[:mw:Help:Extension:Linter/self-closed-tag]]",
diff --git a/includes/CategoryManager.php b/includes/CategoryManager.php
index f3692a5..23527c7 100644
--- a/includes/CategoryManager.php
+++ b/includes/CategoryManager.php
@@ -45,7 +45,8 @@
'deletable-table-tag' => 7,
'misnested-tag' => 8,
'pwrap-bug-workaround' => 9,
-   'tidy-whitespace-bug' => 10
+   'tidy-whitespace-bug' => 10,
+   'multi-colon-escape' => 11,
];
 
/**
diff --git a/includes/LintErrorsPager.php b/includes/LintErrorsPager.php
index 068ef94..dbf206f 100644
--- a/includes/LintErrorsPager.php
+++ b/includes/LintErrorsPager.php
@@ -160,6 +160,9 @@
isset( $lintError->params['sibling'] ) 
) {
return Html::element( 'code', [],
$lintError->params['node'] . " 
+ " . $lintError->params['sibling'] );
+   } elseif ( $this->category === 
'multi-colon-escape' &&
+   isset( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialSearch: Fix unintended `margin` when zoom level is ab...

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

Change subject: SpecialSearch: Fix unintended `margin` when zoom level is above 
100%
..


SpecialSearch: Fix unintended `margin` when zoom level is above 100%

With zoom level > 100% on Firefox, `#mw-searchoptions` which is a
`fieldset` element adds unintended `margin` with negative `margin-top`
applied. This is a workaround for wrong browser behaviour and
regression of I4bda42c03a5.

Bug: T176499
Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
---
M resources/src/mediawiki.special/mediawiki.special.search.styles.css
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.styles.css 
b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
index b37cf2f..ea9b987 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
@@ -94,6 +94,8 @@
 /*==*/
 
 #mw-searchoptions {
+   /* Support: Firefox, needs `clear: both` on `fieldset` when zoom level 
> 100%, see T176499 */
+   clear: both;
padding: 0.5em 0.75em 0.75em 0.75em;
background-color: #f8f9fa;
margin: -1px 0 0;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
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...mobileapps[master]: Strip any .reference elements

2017-09-22 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379852 )

Change subject: Strip any .reference elements
..

Strip any .reference elements

Bug: T176519
Change-Id: I9313a9458d8445d8a2d85c47b52687c45c73dcff
---
M lib/transformations/summarize.js
M test/lib/transformations/summarize.js
2 files changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/lib/transformations/summarize.js b/lib/transformations/summarize.js
index bd5fb43..342371c 100644
--- a/lib/transformations/summarize.js
+++ b/lib/transformations/summarize.js
@@ -29,7 +29,7 @@
 module.exports = function(html) {
 const doc = domino.createDocument(html);
 flattenElements(doc, 'a');
-rmElementsWithSelector(doc, '.mw-ref');
+rmElementsWithSelector(doc, '.mw-ref, .reference');
 rmElementsWithSelector(doc, '.noexcerpts');
 rmElementsWithSelector(doc, 'math');
 rmElementsWithSelector(doc, 'span:empty,b:empty,i:empty,p:empty');
diff --git a/test/lib/transformations/summarize.js 
b/test/lib/transformations/summarize.js
index 1d1cf1e..f2c72dd 100644
--- a/test/lib/transformations/summarize.js
+++ b/test/lib/transformations/summarize.js
@@ -33,6 +33,11 @@
 'France is a country with territory status in 
western Europe and several overseas regions and territories.[upper-roman 13]',
 'France is a country with territory status in 
western Europe and several overseas regions and territories.'
 ],
+// Any element with .reference class is stripped (T176519)
+[
+'Charles Milles Manson :136–7 is an American convicted mass 
murderer',
+'Charles Milles Manson is an American convicted mass 
murderer'
+]
 // math tags are stripped but any math images are shown
 [
 'The Planck–Einstein relation connects the particulate 
photon energy E with its associated wave 
frequency f:\n\nhttp://www.w3.org/1998/Math/MathML\;>\n  \n
\n  \nE\n=\n
h\nf\n  \n\n{\\displaystyle E=hf}\n  
\nhttps://wikimedia.org/api/rest_v1/media/math/render/svg/f39fac3593bb1e2dec0282c112c4dff7a99007f6\;
 class=\"mwe-math-fallback-image-inline\" aria-hidden=\"true\" 
style=\"vertical-align: -0.671ex; width:7.533ex; 
height:2.509ex;\">',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9313a9458d8445d8a2d85c47b52687c45c73dcff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Track sister search prevalence

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

Change subject: Track sister search prevalence
..


Track sister search prevalence

Number of searches that have sister project results vs
number of searches that do not, by language.

Change-Id: I413d37930d959a212fa8fd7c1dfb35898a5f793f
---
M CHANGELOG.md
M docs/README.md
M modules/metrics/search/config.yaml
A modules/metrics/search/sister_search_prevalence.sql
4 files changed, 49 insertions(+), 3 deletions(-)

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



diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8610ba9..f983f48 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,6 +1,18 @@
 # Change Log (Patch Notes)
 All notable changes to this project will be documented in this file.
 
+## 2017/09/22
+- Added sister project search results prevalence
+
+## 2017/09/21
+- Added new datasets in search and portal 
([T172453](https://phabricator.wikimedia.org/T172453)):
+  - wikipedia portal pageview by device (desktop vs mobile)
+  - wikipedia portal clickthrough rate by device (desktop vs mobile)
+  - proportion of wikipedia portal visitors on mobile devices in US vs 
elsewhere
+  - pageviews from full-text search (desktop vs mobile)
+  - search return rate on desktop
+  - SERPs by access method
+
 ## 2017/08/29
 - Switched Hive queries to use the "nice" queue 
([T156841](https://phabricator.wikimedia.org/T156841)). See [this 
section](https://wikitech.wikimedia.org/wiki/Analytics/Systems/Cluster/Hive/Queries#Run_long_queries_in_a_screen_session_and_in_the_nice_queue)
 for additional details.
 
diff --git a/docs/README.md b/docs/README.md
index 88bec45..e5cc336 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -8,7 +8,7 @@
 infrastructure. These datasets provide the metrics that are used by
 [Discovery's Dashboards](https://discovery.wmflabs.org/)
 
-Last updated on 14 September 2017
+Last updated on 22 September 2017
 
 Daily Metrics
 -
@@ -186,6 +186,8 @@
 Wikipedia search results pages; broken up by language, destination
 type (SERP vs not), and access method (desktop vs mobile web);
 exlcudes known automata
+-   **sister\_search\_prevalence.tsv**: Prevalence of sister search
+results on Wikipedia search result pages; broken up by language
 -   **srp\_survtime.tsv**: Estimates (via survival analysis) of how long
 Wikipedia searchers stay on full-text search results page after
 getting there from autocomplete search, split by English vs French
@@ -193,10 +195,10 @@
 -   **pageviews\_from\_fulltext\_search.tsv**: Number of searches,
 pageviews and users to articles from full-text search, broken down
 by access method (desktop vs mobile web) and agent type (user vs
-spider)
+spider).
 -   **search\_result\_pages.tsv**: Number of searches, search result
 pages and users, broken down by access method (desktop vs mobile
-web) and agent type (user vs spider)
+web) and agent type (user vs spider).
 -   **desktop\_return\_rate.tsv**: Number of searches with at least a
 click and the number of searches that return to the same search page
 after clickthrough; Number of sessions with at least a click and the
diff --git a/modules/metrics/search/config.yaml 
b/modules/metrics/search/config.yaml
index 00c4524..2181168 100644
--- a/modules/metrics/search/config.yaml
+++ b/modules/metrics/search/config.yaml
@@ -204,6 +204,12 @@
 starts: 2017-06-01
 funnel: true
 type: script
+sister_search_prevalence:
+description: Prevalence of sister search results on Wikipedia search 
result pages; broken up by language
+granularity: days
+starts: 2017-07-01
+funnel: true
+type: sql
 srp_survtime:
 description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search, split by English vs French and Catalan vs other languages.
 granularity: days
diff --git a/modules/metrics/search/sister_search_prevalence.sql 
b/modules/metrics/search/sister_search_prevalence.sql
new file mode 100644
index 000..40ae915
--- /dev/null
+++ b/modules/metrics/search/sister_search_prevalence.sql
@@ -0,0 +1,26 @@
+SELECT
+  DATE('{from_timestamp}') AS date, wiki_id,
+  SUM(has_iw) AS has_sister_results,
+  SUM(IF(has_iw, 0, 1)) AS no_sister_results
+FROM (
+  SELECT DISTINCT
+wiki_id, session_id, query_hash, has_iw
+  FROM (
+SELECT DISTINCT
+  wiki AS wiki_id,
+  event_uniqueId AS event_id,
+  event_searchSessionId AS session_id,
+  MD5(LOWER(TRIM(event_query))) AS query_hash,
+  INSTR(event_extraParams, '"iw":') > 0 AS has_iw -- sister project 
results shown
+FROM TestSearchSatisfaction2_16909631
+WHERE timestamp >= '{from_timestamp}' AND timestamp < '{to_timestamp}'
+  AND event_source = 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T176151: Handle linting in the presence of fostering and tem...

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

Change subject: T176151: Handle linting in the presence of fostering and 
templating
..


T176151: Handle linting in the presence of fostering and templating

While linting fostered content, we were sometimes skipping past
the first node of template-wrapped content. This prevented the
DOM visitor from passing the right tplInfo for templated nodes
=> missing DSR for those nodes => crashers.

The following command doesn't crash anymore and properly emits
a whole bunch of lint errors.

parse.js --prefix plwiki --page Wikipedia:Dzień_Nowego_Artykułu/szablony --lint

Change-Id: I2eeba089048b450c6b924cd1eb33ffaebb4e776c
---
M lib/wt2html/pp/handlers/linter.js
1 file changed, 25 insertions(+), 6 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 8aa419d..305b023 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -265,24 +265,43 @@
  * Here 'foo' gets fostered out.
  */
 function logFosteredContent(env, node, dp, tplInfo) {
-   var nextSibling = node.nextSibling;
-   while (nextSibling && !DU.hasNodeName(nextSibling, 'table')) {
-   if (tplInfo && nextSibling === tplInfo.last) {
+   var maybeTable = node.nextSibling;
+   while (maybeTable && !DU.hasNodeName(maybeTable, 'table')) {
+   if (tplInfo && maybeTable === tplInfo.last) {
tplInfo.clear = true;
}
-   nextSibling = nextSibling.nextSibling;
+   maybeTable = maybeTable.nextSibling;
}
+
+   // In pathological cases, we might walk past fostered nodes
+   // that carry templating information. This then triggers
+   // other errors downstream. So, walk back to that first node
+   // and ignore this fostered content error. The new node will
+   // trigger fostered content lint error.
+   if (!tplInfo && DU.hasParsoidAboutId(maybeTable) &&
+   !DU.isFirstEncapsulationWrapperNode(maybeTable)
+   ) {
+   var tplNode = DU.findFirstEncapsulationWrapperNode(maybeTable);
+   if (tplNode !== null) {
+   return tplNode;
+   }
+
+   // We got misled by the about id on 'maybeTable'.
+   // Let us carry on with regularly scheduled programming.
+   }
+
var dsr;
var templateInfo;
if (tplInfo) {
dsr = tplInfo.dsr;
templateInfo = findEnclosingTemplateName(env, tplInfo);
} else {
-   dsr = DU.getDataParsoid(nextSibling).dsr;
+   dsr = DU.getDataParsoid(maybeTable).dsr;
}
var lintObj = { dsr: dsr, templateInfo: templateInfo };
env.log('lint/fostered', lintObj);
-   return nextSibling;
+
+   return maybeTable;
 }
 
 var obsoleteTagsRE = null;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2eeba089048b450c6b924cd1eb33ffaebb4e776c
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix unintended `margin` when zoom level is above 100%

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

Change subject: Fix unintended `margin` when zoom level is above 100%
..

Fix unintended `margin` when zoom level is above 100%

With zoom level > 100% on Firefox, `#mw-searchoptions` which is a
`fieldset` element adds unintended `margin` with negative `margin-top`
applied. This is a workaround for wrong browser behaviour and
regression of I4bda42c03a5.

Bug: T176499
Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
---
M resources/src/mediawiki.special/mediawiki.special.search.styles.css
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/379841/1

diff --git 
a/resources/src/mediawiki.special/mediawiki.special.search.styles.css 
b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
index b37cf2f..ea9b987 100644
--- a/resources/src/mediawiki.special/mediawiki.special.search.styles.css
+++ b/resources/src/mediawiki.special/mediawiki.special.search.styles.css
@@ -94,6 +94,8 @@
 /*==*/
 
 #mw-searchoptions {
+   /* Support: Firefox, needs `clear: both` on `fieldset` when zoom level 
> 100%, see T176499 */
+   clear: both;
padding: 0.5em 0.75em 0.75em 0.75em;
background-color: #f8f9fa;
margin: -1px 0 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I329f83e6063460dc11ff45583e335280c9257ef7
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] integration/config[master]: nodepool: force upgrade packages in snapshots

2017-09-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379839 )

Change subject: nodepool: force upgrade packages in snapshots
..


nodepool: force upgrade packages in snapshots

The DIB elements force the upgrade (T133528). Do the same when running
dist-upgrade in the snapshot.  Else we get weird situations such as:

The following packages will be DOWNGRADED:
   php-common (52+0~20170614061851.1+jessie~1.gbpd2ab76 =>
51~bpo8+1+wmf1)
E: There are problems and -y was used without --force-yes

Change-Id: Idf3da0fc1508a821c15db03a41f67421cafb28e3
---
M nodepool/scripts/setup_node.sh
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified



diff --git a/nodepool/scripts/setup_node.sh b/nodepool/scripts/setup_node.sh
index cb2fb62..fa14ff8 100755
--- a/nodepool/scripts/setup_node.sh
+++ b/nodepool/scripts/setup_node.sh
@@ -37,7 +37,7 @@
 sudo /usr/local/bin/puppet-apply 
/opt/git/integration/config/dib/puppet/ciimage.pp
 
 echo "apt-get dist-upgrade && clean"
-sudo apt-get -V -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade
+sudo apt-get -V -q -y --force-yes -o 'DPkg::Options::=--force-confold' 
dist-upgrade
 sudo apt-get clean
 
 # T113342, left over leases delay instances boot

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design consolidation

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

Change subject: Design consolidation
..


Design consolidation

- Repetition of style attributes has been removed.
- Standard background colors have been used.

Bug: T172984
Change-Id: Ia5d9772cb9570456d732f2d7433445bea0c413b2
---
M app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
M app/src/main/java/org/wikipedia/offline/DiskUsageView.java
M app/src/main/java/org/wikipedia/offline/LocalCompilationsFragment.java
M app/src/main/java/org/wikipedia/offline/RemoteCompilationsFragment.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M app/src/main/java/org/wikipedia/page/leadimages/PageHeaderView.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListItemActionsDialog.java
M app/src/main/res/layout-land/fragment_crash_report.xml
M app/src/main/res/layout/activity_about.xml
M app/src/main/res/layout/activity_edit_section.xml
M app/src/main/res/layout/activity_login.xml
M app/src/main/res/layout/dialog_add_to_reading_list.xml
M app/src/main/res/layout/dialog_link_preview.xml
M app/src/main/res/layout/dialog_page_info.xml
M app/src/main/res/layout/dialog_reference.xml
M app/src/main/res/layout/dialog_share_preview.xml
M app/src/main/res/layout/dialog_theme_chooser.xml
M app/src/main/res/layout/dialog_wiktionary.xml
M app/src/main/res/layout/fragment_compilation_detail.xml
M app/src/main/res/layout/fragment_crash_report.xml
M app/src/main/res/layout/fragment_feed.xml
M app/src/main/res/layout/fragment_history.xml
M app/src/main/res/layout/fragment_local_compilations.xml
M app/src/main/res/layout/fragment_nearby.xml
M app/src/main/res/layout/fragment_page.xml
M app/src/main/res/layout/fragment_page_toc.xml
M app/src/main/res/layout/fragment_reading_list.xml
M app/src/main/res/layout/fragment_reading_lists.xml
M app/src/main/res/layout/fragment_search.xml
M app/src/main/res/layout/fragment_search_recent.xml
M app/src/main/res/layout/header_toc_list.xml
M app/src/main/res/layout/include_add_to_reading_list_onboarding.xml
M app/src/main/res/layout/include_compilation_info.xml
M app/src/main/res/layout/inflate_create_account_onboarding.xml
M app/src/main/res/layout/item_issue.xml
M app/src/main/res/layout/item_page_list_entry.xml
M app/src/main/res/layout/item_reading_list.xml
M app/src/main/res/layout/item_search_result.xml
M app/src/main/res/layout/item_wiktionary_definition_with_examples.xml
M app/src/main/res/layout/item_wiktionary_example.xml
M app/src/main/res/layout/view_card_announcement.xml
M app/src/main/res/layout/view_card_featured_article.xml
M app/src/main/res/layout/view_card_header.xml
M app/src/main/res/layout/view_compilation_download_widget.xml
M app/src/main/res/layout/view_disk_usage.xml
M app/src/main/res/layout/view_horizontal_scroll_list_item_card.xml
M app/src/main/res/layout/view_link_preview_error.xml
M app/src/main/res/layout/view_link_preview_overlay.xml
M app/src/main/res/layout/view_list_card_item.xml
M app/src/main/res/layout/view_page_header.xml
M app/src/main/res/layout/view_reading_list_page_actions.xml
M app/src/main/res/layout/view_search_bar.xml
M app/src/main/res/layout/view_static_card.xml
M app/src/main/res/values/attrs.xml
M app/src/main/res/values/styles.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
59 files changed, 178 insertions(+), 253 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java 
b/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
index 6bc546d..296da95 100644
--- a/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
+++ b/app/src/main/java/org/wikipedia/edit/richtext/SyntaxRuleStyle.java
@@ -15,7 +15,7 @@
 TEMPLATE {
 @NonNull @Override public SpanExtents createSpan(@NonNull Context ctx, 
int spanStart,
  SyntaxRule 
syntaxItem) {
-@ColorInt int color = getThemedColor(ctx, 
R.attr.syntax_highlight_template_color);
+@ColorInt int color = getThemedColor(ctx, 
R.attr.material_theme_secondary_color);
 return new ColorSpanEx(color, Color.TRANSPARENT, spanStart, 
syntaxItem);
 }
 },
diff --git a/app/src/main/java/org/wikipedia/offline/DiskUsageView.java 
b/app/src/main/java/org/wikipedia/offline/DiskUsageView.java
index 710db1f..1c32063 100644
--- a/app/src/main/java/org/wikipedia/offline/DiskUsageView.java
+++ b/app/src/main/java/org/wikipedia/offline/DiskUsageView.java
@@ -76,7 +76,7 @@
 setOrientation(VERTICAL);
 
 usageAppText.setText(R.string.app_name);
-setDotTint(otherDot, R.attr.window_inverse_color);
+

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseQualityConstraints[master]: Fix spelling mistake in config description

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

Change subject: Fix spelling mistake in config description
..


Fix spelling mistake in config description

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

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



diff --git a/extension.json b/extension.json
index e955e4a..fe69c85 100644
--- a/extension.json
+++ b/extension.json
@@ -118,7 +118,7 @@
},
"WBQualityConstraintsNewApiOutputFormat": {
"value": false,
-   "description": "Whether to use the new API output 
format, based on the Wikibase entity JSON format, which can accomodate 
constraint results on qualifiers and references.",
+   "description": "Whether to use the new API output 
format, based on the Wikibase entity JSON format, which can accommodate 
constraint results on qualifiers and references.",
"public": true
},
"WBQualityConstraintsSparqlEndpoint": {

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: nodepool: force upgrade packages in snapshots

2017-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379839 )

Change subject: nodepool: force upgrade packages in snapshots
..

nodepool: force upgrade packages in snapshots

The DIB elements force the upgrade (T133528). Do the same when running
dist-upgrade in the snapshot.  Else we get weird situations such as:

The following packages will be DOWNGRADED:
   php-common (52+0~20170614061851.1+jessie~1.gbpd2ab76 =>
51~bpo8+1+wmf1)
E: There are problems and -y was used without --force-yes

Change-Id: Idf3da0fc1508a821c15db03a41f67421cafb28e3
---
M nodepool/scripts/setup_node.sh
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/39/379839/1

diff --git a/nodepool/scripts/setup_node.sh b/nodepool/scripts/setup_node.sh
index cb2fb62..fa14ff8 100755
--- a/nodepool/scripts/setup_node.sh
+++ b/nodepool/scripts/setup_node.sh
@@ -37,7 +37,7 @@
 sudo /usr/local/bin/puppet-apply 
/opt/git/integration/config/dib/puppet/ciimage.pp
 
 echo "apt-get dist-upgrade && clean"
-sudo apt-get -V -q -y -o 'DPkg::Options::=--force-confold' dist-upgrade
+sudo apt-get -V -q -y --force-yes -o 'DPkg::Options::=--force-confold' 
dist-upgrade
 sudo apt-get clean
 
 # T113342, left over leases delay instances boot

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: WIP: remove all the artificial messing with preferences

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

Change subject: WIP: remove all the artificial messing with preferences
..

WIP: remove all the artificial messing with preferences

Bug: T174220
Change-Id: I888c6009fffad17121765678387022ed7d454cb0
---
M extension.json
M includes/Hooks.php
2 files changed, 5 insertions(+), 86 deletions(-)


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

diff --git a/extension.json b/extension.json
index 90920e8..51ddb80 100644
--- a/extension.json
+++ b/extension.json
@@ -46,12 +46,6 @@
"AddNewAccount": [
"LoginNotify\\Hooks::onAddNewAccount"
],
-   "UserLoadOptions": [
-   "LoginNotify\\Hooks::onUserLoadOptions"
-   ],
-   "UserSaveOptions": [
-   "LoginNotify\\Hooks::onUserSaveOptions"
-   ],
"LocalUserCreated": [
"LoginNotify\\Hooks::onLocalUserCreated"
]
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 7fe5b72..67ff100 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -12,6 +12,7 @@
 use EchoEvent;
 use LoginForm;
 use MediaWiki\Auth\AuthenticationResponse;
+use RequestContext;
 use User;
 
 class Hooks {
@@ -81,6 +82,10 @@
$notifications['login-success'] = [
'category' => 'login-success',
] + $loginBase;
+   $user = RequestContext::getMain()->getUser();
+   if ( self::isUserOptionOverridden( $user ) ) {
+   
$notifications['login-success']['notify-type-availability'] = [ 'web' => false 
];
+   }
}
 
return true;
@@ -198,86 +203,6 @@
$loginNotify = new LoginNotify();
$loginNotify->setCurrentAddressAsKnown( $user );
}
-   }
-
-   /**
-* Hook for loading options.
-*
-* This is a bit hacky. Used to be able to set a different
-* default for admins than other users
-*
-* @param User $user The user in question.
-* @param mixed[] &$options The options.
-* @return bool
-*/
-   public static function onUserLoadOptions( User $user, array &$options ) 
{
-   global $wgLoginNotifyEnableForPriv;
-   if ( !is_array( $wgLoginNotifyEnableForPriv ) ) {
-   return true;
-   }
-
-   if ( !self::isUserOptionOverridden( $user ) ) {
-   return true;
-   }
-
-   $defaultOpts = User::getDefaultOptions();
-   $optionsToCheck = self::getOverriddenOptions();
-
-   foreach ( $optionsToCheck as $opt ) {
-   if ( $options[$opt] === self::OPTIONS_FAKE_FALSE ) {
-   $options[$opt] = '0';
-   }
-   if ( $defaultOpts[$opt] !== false ) {
-   continue;
-   }
-   if ( $options[$opt] === false ) {
-   $options[$opt] = self::OPTIONS_FAKE_TRUTH;
-   }
-   }
-   return true;
-   }
-
-   /**
-* Hook for saving options.
-*
-* This is a bit hacky. Used to be able to set a different
-* default for admins than other users. Since admins are higher value
-* targets, it may make sense to have notices enabled by default for
-* them, but disabled for normal users.
-*
-* @todo This is a bit icky. Need to decide if we really want to do 
this.
-* @todo If someone explicitly enables, gets admin rights, gets 
de-admined,
-*   this will then disable the preference, which is definitely 
non-ideal.
-* @param User $user The user that is being saved.
-* @param mixed[] &$options The options.
-* @return bool
-*/
-   public static function onUserSaveOptions( User $user, array &$options ) 
{
-   $optionsToCheck = self::getOverriddenOptions();
-   $defaultOpts = User::getDefaultOptions();
-   if ( !self::isUserOptionOverridden( $user ) ) {
-   return true;
-   }
-   foreach ( $optionsToCheck as $opt ) {
-   if ( $defaultOpts[$opt] !== false ) {
-   continue;
-   }
-
-   if ( $options[$opt] === self::OPTIONS_FAKE_TRUTH ) {
-   $options[$opt] = false;
-   }
-   if ( $options[$opt] !== 

[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Add stored query for category traversal

2017-09-22 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379838 )

Change subject: Add stored query for category traversal
..

Add stored query for category traversal

Example:
 SELECT ?out ?depth WHERE {
  SERVICE mediawiki:categoryTree {
  bd:serviceParam mediawiki:start 
 .
  bd:serviceParam mediawiki:direction "Reverse" .
  bd:serviceParam mediawiki:depth 5 .
  }
} ORDER BY ASC(?depth)

Change-Id: Ice1615d3d75e47beb9943ca6ca9fb39f6fe27588
---
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
A 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/categories/CategoriesStoredQuery.java
M 
blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/mwapi/MWApiServiceFactory.java
A common/src/main/java/org/wikidata/query/rdf/common/uri/Mediawiki.java
M common/src/main/java/org/wikidata/query/rdf/common/uri/Ontology.java
M dist/src/script/loadCategoryDump.sh
M dist/src/script/prefixes.conf
7 files changed, 115 insertions(+), 7 deletions(-)


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

diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
index 3a6abe7..d17a0d2 100644
--- 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/WikibaseContextListener.java
@@ -14,6 +14,7 @@
 import org.openrdf.query.resultio.TupleQueryResultFormat;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+import org.wikidata.query.rdf.blazegraph.categories.CategoriesStoredQuery;
 import org.wikidata.query.rdf.blazegraph.constraints.CoordinatePartBOp;
 import org.wikidata.query.rdf.blazegraph.constraints.DecodeUriBOp;
 import org.wikidata.query.rdf.blazegraph.constraints.WikibaseCornerBOp;
@@ -88,6 +89,7 @@
 LabelService.register();
 GeoService.register();
 MWApiServiceFactory.register();
+CategoriesStoredQuery.register();
 
 // Whitelist services we like by default
 reg.addWhitelistURL(GASService.Options.SERVICE_KEY.toString());
diff --git 
a/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/categories/CategoriesStoredQuery.java
 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/categories/CategoriesStoredQuery.java
new file mode 100644
index 000..5fe4719
--- /dev/null
+++ 
b/blazegraph/src/main/java/org/wikidata/query/rdf/blazegraph/categories/CategoriesStoredQuery.java
@@ -0,0 +1,84 @@
+package org.wikidata.query.rdf.blazegraph.categories;
+
+import org.openrdf.model.URI;
+import org.openrdf.model.impl.URIImpl;
+import org.wikidata.query.rdf.common.uri.Mediawiki;
+
+import com.bigdata.rdf.sparql.ast.eval.ServiceParams;
+import com.bigdata.rdf.sparql.ast.service.ServiceCallCreateParams;
+import com.bigdata.rdf.sparql.ast.service.ServiceRegistry;
+import com.bigdata.rdf.sparql.ast.service.storedquery.SimpleStoredQueryService;
+
+/**
+ * Stored query for categories:
+ * SELECT ?out ?depth WHERE {
+ *  SERVICE mediawiki:categoryTree {
+ *  bd:serviceParam mediawiki:start 
 .
+ *  bd:serviceParam mediawiki:direction "Reverse" .
+ *  bd:serviceParam mediawiki:depth 5 .
+ *  }
+ * } ORDER BY ASC(?depth)
+ *
+ * Directions are:
+ * - Forward: get parent category tree
+ * - Reverse: get subcategory tree
+ * - Undirected: both directions
+ */
+public class CategoriesStoredQuery extends SimpleStoredQueryService {
+/**
+ * The URI service key.
+ */
+public static final URI SERVICE_KEY = new URIImpl(Mediawiki.NAMESPACE + 
"categoryTree");
+/**
+ * start parameter.
+ */
+public static final URI START_PARAM = new URIImpl(Mediawiki.NAMESPACE + 
"start");
+/**
+ * direction parameter.
+ */
+public static final URI DIRECTION_PARAM = new URIImpl(Mediawiki.NAMESPACE 
+ "direction");
+/**
+ * max depth parameter.
+ */
+public static final URI DEPTH_PARAM = new URIImpl(Mediawiki.NAMESPACE + 
"depth");
+/**
+ * Default max depth.
+ */
+public static final int MAX_DEPTH = 8;
+/**
+ * Register the service so it is recognized by Blazegraph.
+ */
+public static void register() {
+ServiceRegistry reg = ServiceRegistry.getInstance();
+reg.add(SERVICE_KEY, new CategoriesStoredQuery());
+reg.addWhitelistURL(SERVICE_KEY.toString());
+}
+
+@Override
+protected String getQuery(ServiceCallCreateParams createParams,
+ServiceParams serviceParams) {
+final StringBuilder sb = new StringBuilder();
+
+final URI start = serviceParams.getAsURI(START_PARAM);
+final String direction = 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove duplicate release note for $wgOOUIEditPage removal

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

Change subject: Remove duplicate release note for $wgOOUIEditPage removal
..


Remove duplicate release note for $wgOOUIEditPage removal

And capitalize Unicode properly.

Follows-up b2441fc57d6e.

Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
---
M RELEASE-NOTES-1.30
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index e8e3404..2090ce9 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,10 +73,8 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
-  edit interface.
 * (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
-  Instead, users using browsers that do not support unicode will be unable to 
edit
+  Instead, users using browsers that do not support Unicode will be unable to 
edit
   and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] analytics/refinery[master]: Correct field names in mediawiki-history jobs

2017-09-22 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379836 )

Change subject: Correct field names in mediawiki-history jobs
..

Correct field names in mediawiki-history jobs

Names were inconsistent between data generation and hive table,
leading to data not being accessible. This patch solves the issue
and provides better names for the fields.
To be merged in addition of https://gerrit.wikimedia.org/r/#/c/379835/

Change-Id: I39c786b875dcd69e0f3dca44c9bc9614abba987a
---
M hive/mediawiki/history/create_mediawiki_history_table.hql
M oozie/mediawiki/history/druid/generate_json_mediawiki_history.hql
M oozie/mediawiki/history/druid/load_mediawiki_history.json.template
3 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/36/379836/1

diff --git a/hive/mediawiki/history/create_mediawiki_history_table.hql 
b/hive/mediawiki/history/create_mediawiki_history_table.hql
index 8d4ce62..74e9e5d 100644
--- a/hive/mediawiki/history/create_mediawiki_history_table.hql
+++ b/hive/mediawiki/history/create_mediawiki_history_table.hql
@@ -28,7 +28,7 @@
   `event_user_is_bot_by_name` boolean   COMMENT 
'Whether the event_user\'s name matches patterns we use to identify bots',
   `event_user_creation_timestamp` timestamp COMMENT 
'Registration timestamp of the user that caused the event',
   `event_user_revision_count` bigintCOMMENT 
'Cumulative revision count per user for the current event_user_id (only 
available in revision-create events so far)',
-  `event_user_seconds_from_previous_revision` bigintCOMMENT 'In 
revision events: seconds elapsed since the previous revision made by the 
current event_user_id (only available in revision-create events so far)',
+  `event_user_seconds_since_previous_revision`bigintCOMMENT 'In 
revision events: seconds elapsed since the previous revision made by the 
current event_user_id (only available in revision-create events so far)',
 
   `page_id`   bigintCOMMENT 'In 
revision/page events: id of the page',
   `page_title`stringCOMMENT 'In 
revision/page events: historical title of the page',
@@ -40,7 +40,7 @@
   `page_is_redirect_latest`   boolean   COMMENT 'In 
revision/page events: whether the page is currently a redirect',
   `page_creation_timestamp`   timestamp COMMENT 'In 
revision/page events: creation timestamp of the page',
   `page_revision_count`   bigintCOMMENT 'In 
revision/page events: Cumulative revision count per page for the current 
page_id (only available in revision-create events so far)',
-  `page_seconds_from_previous_revision`   bigintCOMMENT 'In 
revision/page events: seconds elapsed since the previous revision made on the 
current page_id (only available in revision-create events so far)',
+  `page_seconds_since_previous_revision`  bigintCOMMENT 'In 
revision/page events: seconds elapsed since the previous revision made on the 
current page_id (only available in revision-create events so far)',
 
   `user_id`   bigintCOMMENT 'In 
user events: id of the user',
   `user_text` stringCOMMENT 'In 
user events: historical user text',
diff --git a/oozie/mediawiki/history/druid/generate_json_mediawiki_history.hql 
b/oozie/mediawiki/history/druid/generate_json_mediawiki_history.hql
index 0334538..fc32a1a 100644
--- a/oozie/mediawiki/history/druid/generate_json_mediawiki_history.hql
+++ b/oozie/mediawiki/history/druid/generate_json_mediawiki_history.hql
@@ -44,7 +44,7 @@
   `event_user_creation_timestamp` stringCOMMENT 
'Registration timestamp of the user that caused the event',
   --`event_user_creation_timestamp` timestamp COMMENT 
'Registration timestamp of the user that caused the event',
   `event_user_revision_count` bigintCOMMENT 
'Cumulative revision count per user for the current event_user_id (only 
available in revision-create events so far)',
-  `event_user_seconds_to_previous_revision`   bigintCOMMENT 'In 
revision events: seconds elapsed since the previous revision made by the 
current event_user_id (only available in revision-create events so far)',
+  `event_user_seconds_since_previous_revision`bigintCOMMENT 'In 
revision events: seconds elapsed since the previous revision made by the 
current event_user_id (only available in revision-create events so far)',
 
   `page_id`   bigintCOMMENT 'In 
revision/page events: id of the page',
   `page_title`

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: EditPage: Mark getSubmitButtonLabel() as @since 1.30

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

Change subject: EditPage: Mark getSubmitButtonLabel() as @since 1.30
..


EditPage: Mark getSubmitButtonLabel() as @since 1.30

Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index a8ed19d..aa1f205 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4352,6 +4352,7 @@
/**
 * Get the message key of the label for the button to save the page
 *
+* @since 1.30
 * @return string
 */
protected function getSubmitButtonLabel() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
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] analytics...source[master]: Correct field names in mediawiki-history spark job

2017-09-22 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379835 )

Change subject: Correct field names in mediawiki-history spark job
..

Correct field names in mediawiki-history spark job

Names were not best, and inconsistent with hive table, leading
to data being non-accessible. This patch updates the names to
better ones that match Hive table ones.

Change-Id: I05cf3a029e52704da4940ba0bdafe1f73c8afbb5
---
M 
refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/MediawikiEvent.scala
1 file changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery/source 
refs/changes/35/379835/1

diff --git 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/MediawikiEvent.scala
 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/MediawikiEvent.scala
index b9b1d55..1af27d5 100644
--- 
a/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/MediawikiEvent.scala
+++ 
b/refinery-job/src/main/scala/org/wikimedia/analytics/refinery/job/mediawikihistory/denormalized/MediawikiEvent.scala
@@ -28,7 +28,7 @@
  pageIsRedirectLatest: Option[Boolean] = 
None,
  pageCreationTimestamp: Option[Timestamp] 
= None,
  pageRevisionCount: Option[Long] = None,
- pageSecondsFromPreviousRevision: 
Option[Long] = None
+ pageSecondsSincePreviousRevision: 
Option[Long] = None
 )
 
 case class MediawikiEventUserDetails(userId: Option[Long] = None,
@@ -46,7 +46,7 @@
  userCreationTimestamp: Option[Timestamp] 
= None,
  // Next two fields are used in event_user
  userRevisionCount: Option[Long] = None,
- userSecondsFromPreviousRevision: 
Option[Long] = None
+ userSecondsSincePreviousRevision: 
Option[Long] = None
 )
 
 case class MediawikiEventRevisionDetails(revId: Option[Long] = None,
@@ -99,7 +99,7 @@
 eventUserDetails.userCreationTimestamp.map(_.toString).orNull,
 //eventUserDetails.userCreationTimestamp.orNull,
 eventUserDetails.userRevisionCount.orNull,
-eventUserDetails.userSecondsFromPreviousRevision.orNull,
+eventUserDetails.userSecondsSincePreviousRevision.orNull,
 
 pageDetails.pageId.orNull,
 pageDetails.pageTitle.orNull,
@@ -112,7 +112,7 @@
 pageDetails.pageCreationTimestamp.map(_.toString).orNull,
 //pageDetails.pageCreationTimestamp.orNull,
 pageDetails.pageRevisionCount.orNull,
-pageDetails.pageSecondsFromPreviousRevision.orNull,
+pageDetails.pageSecondsSincePreviousRevision.orNull,
 
 userDetails.userId.orNull,
 userDetails.userText.orNull,
@@ -160,13 +160,13 @@
   def updateWithUserPreviousRevision(userPreviousRevision: 
Option[MediawikiEvent]) = this.copy(
 eventUserDetails = this.eventUserDetails.copy(
   userRevisionCount = 
Some(userPreviousRevision.map(_.eventUserDetails.userRevisionCount.getOrElse(0L)).getOrElse(0L)
 + 1),
-  userSecondsFromPreviousRevision =
+  userSecondsSincePreviousRevision =
 TimestampHelpers.getTimestampDifference(this.eventTimestamp, 
userPreviousRevision.map(_.eventTimestamp).getOrElse(None))
 ))
   def updateWithPagePreviousRevision(pagePreviousRevision: 
Option[MediawikiEvent]) = this.copy(
 pageDetails = this.pageDetails.copy(
   pageRevisionCount = 
Some(pagePreviousRevision.map(_.pageDetails.pageRevisionCount.getOrElse(0L)).getOrElse(0L)
 + 1),
-  pageSecondsFromPreviousRevision =
+  pageSecondsSincePreviousRevision =
 TimestampHelpers.getTimestampDifference(this.eventTimestamp, 
pagePreviousRevision.map(_.eventTimestamp).getOrElse(None))
 ))
   def updateEventUserDetails(userState: UserState) = this.copy(
@@ -224,7 +224,7 @@
   StructField("event_user_creation_timestamp", StringType, nullable = 
true),
   //StructField("event_user_creation_timestamp", TimestampType, nullable = 
true),
   StructField("event_user_revision_count", LongType, nullable = true),
-  StructField("event_user_seconds_from_previous_revision", LongType, 
nullable = true),
+  StructField("event_user_seconds_since_previous_revision", LongType, 
nullable = true),
 
   StructField("page_id", LongType, nullable = true),
   StructField("page_title", StringType, nullable = true),
@@ -237,7 +237,7 @@
   StructField("page_creation_timestamp", StringType, nullable = true),
   //StructField("page_creation_timestamp", TimestampType, nullable = true),
   

[MediaWiki-commits] [Gerrit] wikimedia...golden[master]: Track sister search prevalence

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

Change subject: Track sister search prevalence
..

Track sister search prevalence

Change-Id: I413d37930d959a212fa8fd7c1dfb35898a5f793f
---
M modules/metrics/search/config.yaml
A modules/metrics/search/sister_search_prevalence.sql
2 files changed, 33 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/golden 
refs/changes/34/379834/1

diff --git a/modules/metrics/search/config.yaml 
b/modules/metrics/search/config.yaml
index 00c4524..2181168 100644
--- a/modules/metrics/search/config.yaml
+++ b/modules/metrics/search/config.yaml
@@ -204,6 +204,12 @@
 starts: 2017-06-01
 funnel: true
 type: script
+sister_search_prevalence:
+description: Prevalence of sister search results on Wikipedia search 
result pages; broken up by language
+granularity: days
+starts: 2017-07-01
+funnel: true
+type: sql
 srp_survtime:
 description: Estimates (via survival analysis) of how long Wikipedia 
searchers stay on full-text search results page after getting there from 
autocomplete search, split by English vs French and Catalan vs other languages.
 granularity: days
diff --git a/modules/metrics/search/sister_search_prevalence.sql 
b/modules/metrics/search/sister_search_prevalence.sql
new file mode 100644
index 000..7b85464
--- /dev/null
+++ b/modules/metrics/search/sister_search_prevalence.sql
@@ -0,0 +1,27 @@
+SELECT
+  DATE('{from_timestamp}') AS date, wiki_id,
+  SUM(has_iw) AS `has sister results`,
+  SUM(IF(has_iw, 0, 1)) AS `no sister results`
+FROM (
+  SELECT DISTINCT
+wiki_id, session_id, query_hash, has_iw
+  FROM (
+SELECT DISTINCT
+  wiki AS wiki_id,
+  event_uniqueId AS event_id,
+  event_searchSessionId AS session_id,
+  MD5(LOWER(TRIM(event_query))) AS query_hash,
+  INSTR(event_extraParams, '"iw":') > 0 AS has_iw -- sister project 
results shown
+FROM TestSearchSatisfaction2_16909631
+WHERE timestamp >= '{from_timestamp}' AND timestamp < '{to_timestamp}'
+  AND event_source = 'fulltext'
+  AND event_action = 'searchResultPage'
+  AND event_subTest IS NULL
+  ) AS events
+) AS searches
+GROUP BY date, wiki_id
+HAVING wiki_id RLIKE 'wiki$'
+   AND `has sister results` > 0
+   AND `no sister results` > 0
+   AND (`has sister results` + `no sister results`) > 20
+ORDER BY date, wiki_id;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I413d37930d959a212fa8fd7c1dfb35898a5f793f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/discovery/golden
Gerrit-Branch: master
Gerrit-Owner: Bearloga 

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleIcon[master]: Fix rendering in search results

2017-09-22 Thread Matthew-a-thompson (Code Review)
Matthew-a-thompson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379833 )

Change subject: Fix rendering in search results
..

Fix rendering in search results

Wrap the string containing the title icon and link text
in an instance of HtmlArmor in order to prevent the html
from being escaped when it is rendered. Note that using
HtmlArmor increases the required MediaWiki version
to 1.28.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleIcon 
refs/changes/33/379833/1

diff --git a/TitleIcon.php b/TitleIcon.php
index 1365971..cc8b2f6 100644
--- a/TitleIcon.php
+++ b/TitleIcon.php
@@ -160,7 +160,7 @@
public function handleSearchTitle( &$text ) {
$iconhtml = $this->getIconHTML();
if ( strlen( $iconhtml ) > 0 ) {
-   $text = $iconhtml . Linker::link( $this->title );
+   $text = new HtmlArmor($iconhtml . Linker::link( 
$this->title ));
}
}
 
diff --git a/extension.json b/extension.json
index da5bb4b..b5a6762 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "Title Icon",
-   "version": "3.0",
+   "version": "3.0.1",
"author": [
"[https://www.mediawiki.org/wiki/User:Cindy.cicalese Cindy 
Cicalese]"
],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifd38a19d18c96339180ade7d56aad3ffd043ce6e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleIcon
Gerrit-Branch: master
Gerrit-Owner: Matthew-a-thompson 

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


[MediaWiki-commits] [Gerrit] mediawiki...SiteMatrix[master]: Add some docs for SiteMatrixApi

2017-09-22 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379832 )

Change subject: Add some docs for SiteMatrixApi
..

Add some docs for SiteMatrixApi

Change-Id: I59ed4a7a95074786df89bf3798acec062aeca35f
---
M SiteMatrixApi.php
1 file changed, 46 insertions(+), 9 deletions(-)


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

diff --git a/SiteMatrixApi.php b/SiteMatrixApi.php
index 2debcdd..891bc06 100644
--- a/SiteMatrixApi.php
+++ b/SiteMatrixApi.php
@@ -6,19 +6,31 @@
  */
 class ApiSiteMatrix extends ApiBase {
 
+   /**
+* ApiSiteMatrix constructor.
+*
+* @param \ApiMain $main
+* @param string $moduleName
+*/
public function __construct( ApiMain $main, $moduleName ) {
parent::__construct( $main, $moduleName, 'sm' );
}
 
+   /**
+* Execute API request
+*/
public function execute() {
$result = $this->getResult();
$matrix = new SiteMatrix();
+   // Fetch list of language codes and names
$langNames = Language::fetchLanguageNames();
 
$matrix_out = [ 'count' => $matrix->getCount() ];
 
+   // Fetch list of language names in given language, if they exist
$localLanguageNames = Language::fetchLanguageNames( 
$this->getLanguage()->getCode() );
 
+   // Extract request params
$params = $this->extractRequestParams();
$type = array_flip( $params['type'] );
$state = array_flip( $params['state'] );
@@ -37,6 +49,7 @@
$nonglobal = isset( $state['nonglobal'] );
 
$count = 0;
+   // For smtype=language, fetch info about all language wikis
if ( isset( $type['language'] ) && $continue[0] == 'language' ) 
{
foreach ( $matrix->getLangList() as $lang ) {
$langhost = str_replace( '_', '-', $lang );
@@ -47,17 +60,21 @@
$this->setContinueEnumParameter( 
'continue', "language|$langhost" );
break;
}
+   // Compute the language property values to 
return
$language = [
-   'code' => $langhost,
-   'name' => isset( $langNames[$lang] ) ? 
$langNames[$lang] : null,
-   'site' => [],
-   'dir' => Language::factory( $langhost 
)->getDir()
+   'code' => $langhost, // Language code
+   'name' => isset( $langNames[$lang] ) ? 
$langNames[$lang] : null, // Language name
+   'site' => [], // Site(s) info (see 
below)
+   'dir' => Language::factory( $langhost 
)->getDir() // Language direction
];
+   // Add language name in local language, if 
available
if ( isset( $localLanguageNames[$lang] ) ) {
$language['localname'] = 
$localLanguageNames[$lang];
}
+   // Return stuff user asked for
$language = array_intersect_key( $language, 
$langProp );
 
+   // Generate site information
if ( isset( $language['site'] ) ) {
foreach ( $matrix->getSites() as $site 
) {
if ( $matrix->exist( $lang, 
$site ) ) {
@@ -69,11 +86,12 @@
 
$url = 
$matrix->getCanonicalUrl( $lang, $site );
$site_out = [
-   'url' => $url,
-   'dbname' => 
$matrix->getDBName( $lang, $site ),
-   'code' => $site,
-   'sitename' => 
$matrix->getSitename( $lang, $site ),
+   'url' => $url, 
// Website url
+   'dbname' => 
$matrix->getDBName( $lang, $site ), // Shortcode for the wiki
+   'code' => 
$site, // Wiki type (wiktionary, wiki, wikibooks etc.)
+   'sitename' 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: [WIP] webperf: Add navtiming tests to puppet.git:/tox.ini

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

Change subject: [WIP] webperf: Add navtiming tests to puppet.git:/tox.ini
..

[WIP] webperf: Add navtiming tests to puppet.git:/tox.ini

Change-Id: I2fdb8e0b978b2406ebc386c716c6c4321aeff0d8
---
M modules/webperf/files/navtiming.py
M tox.ini
2 files changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/30/379830/1

diff --git a/modules/webperf/files/navtiming.py 
b/modules/webperf/files/navtiming.py
index d288852..b000395 100755
--- a/modules/webperf/files/navtiming.py
+++ b/modules/webperf/files/navtiming.py
@@ -13,8 +13,6 @@
 import unittest
 import yaml
 
-from kafka import KafkaConsumer
-
 handlers = {}
 
 # Mapping of continent names to ISO 3166 country codes.
@@ -402,6 +400,8 @@
 
 
 if __name__ == '__main__':
+from kafka import KafkaConsumer
+
 ap = argparse.ArgumentParser(description='NavigationTiming subscriber')
 ap.add_argument('--brokers', required=True,
 help='Comma-separated list of kafka brokers')
diff --git a/tox.ini b/tox.ini
index b32a194..8f4eb50 100644
--- a/tox.ini
+++ b/tox.ini
@@ -31,6 +31,9 @@
 -rmodules/admin/data/requirements.txt
 commands = nosetests modules/admin/data 
modules/mediawiki/files/apache/sites/redirects
 
+[testenv:webperf]
+commands = nosetests modules/webperf/files
+
 [testenv:commit-message]
 deps = commit-message-validator
 commands = commit-message-validator

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Implement Schema:Print purging strategy

2017-09-22 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379829 )

Change subject: Implement Schema:Print purging strategy
..

Implement Schema:Print purging strategy

Auto-purge just EventCapsule PII after 90 days, keep the rest indefinitely.

Bug: T175395
Change-Id: Ic4fba93fcae6e6e1e6e1d6b0acd060b76a3caaf5
---
M modules/role/files/mariadb/eventlogging_purging_whitelist.tsv
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/379829/1

diff --git a/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv 
b/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv
index b0dd574..3cc1ff8 100644
--- a/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv
+++ b/modules/role/files/mariadb/eventlogging_purging_whitelist.tsv
@@ -761,6 +761,12 @@
 PrefUpdate isTruncated
 PrefUpdate webHost
 PrefUpdate wiki
+Print  event_action
+Print  event_isAnon
+Print  event_namespaceId
+Print  event_pageTitle
+Print  event_sessionToken
+Print  event_skin
 RelatedArticleswebHost
 RelatedArticleswiki
 RelatedArticlesevent_clickIndex

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Turn off ignored-table-attr output

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

Change subject: Linter: Turn off ignored-table-attr output
..


Linter: Turn off ignored-table-attr output

* Buggy
* Not exposed via Linter extension
* Source of logspam in Kibana

Change-Id: I2fa5602907c671962722407442f0aa510aeed6b5
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 35 insertions(+), 32 deletions(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 2a8bb3d..8aa419d 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -212,47 +212,45 @@
  *
  * Here foo gets ignored and is found in the data-parsoid of  tags.
  */
-function logIgnoredTableAttr(env, c, dp, tplInfo) {
+
+/* --
+ * Comment out this whole thing to satisfy eslint
+ *
+function logIgnoredTableAttr(env, node, dp, tplInfo) {
var dsr;
var templateInfo;
-   if (DU.hasNodeName(c, "table")) {
-   var fc = c.firstChild;
-   while (fc) {
-   if (DU.hasNodeName(fc, "tbody")) {
-   var trfc = fc.firstChild;
-   while (trfc) {
-   if (DU.hasNodeName(trfc, "tr")) {
-   dp = DU.getDataParsoid(trfc);
-   if (dp.sa) {
-   var wc = false;
-   // Discard attributes 
that are only whitespace and comments
-   for (var key in dp.sa) {
-   var re = 
/^\s*$|^([ \t]|)*$/;
-   if 
((!re.test(key) || !re.test(dp.sa[key]))) {
-   wc = 
true;
-   break;
-   }
-   }
+   if (!node.nodeName === 'TABLE') {
+   return;
+   }
 
-   if (wc) {
-   if (tplInfo) {
-   dsr = 
tplInfo.dsr;
-   
templateInfo = findEnclosingTemplateName(env, tplInfo);
-   } else {
-   dsr = 
dp.dsr;
-   }
-   var lintObj = { 
dsr: dsr, templateInfo: templateInfo };
-   
env.log('lint/ignored-table-attr', lintObj);
-   }
+   var tbody = DU.firstNonSepChildNode(node);
+   var c = tbody.firstChild;
+   while (c) {
+   if (c.nodeName === 'TR') {
+   dp = DU.getDataParsoid(c);
+   if (dp.sa) {
+   // Discard attributes that are only whitespace 
and comments
+   for (var key in dp.sa) {
+   var re = 
/^\s*$|^([ \t]|)*$/;
+   if (!re.test(key) || 
!re.test(dp.sa[key])) {
+   // FIXME: This is incorrect.
+   // We need to check if the key 
is absent in dp.a / in the node's attribute
+   if (tplInfo) {
+   dsr = tplInfo.dsr;
+   templateInfo = 
findEnclosingTemplateName(env, tplInfo);
+   } else {
+   dsr = dp.dsr;
}
+   var lintObj = { dsr: dsr, 
templateInfo: templateInfo };
+   
env.log('lint/ignored-table-attr', lintObj);
}
-   trfc = trfc.nextSibling;
}
}
-   fc = fc.nextSibling;
}
+   c = c.nextSibling;
   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove duplicate release note for $wgOOUIEditPage removal

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

Change subject: Remove duplicate release note for $wgOOUIEditPage removal
..

Remove duplicate release note for $wgOOUIEditPage removal

And capitalize Unicode properly.

Follows-up b2441fc57d6e.

Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
---
M RELEASE-NOTES-1.30
1 file changed, 1 insertion(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/379828/1

diff --git a/RELEASE-NOTES-1.30 b/RELEASE-NOTES-1.30
index e8e3404..2090ce9 100644
--- a/RELEASE-NOTES-1.30
+++ b/RELEASE-NOTES-1.30
@@ -73,10 +73,8 @@
 * (T138166) Added ability for users to prohibit other users from sending them
   emails with Special:Emailuser. Can be enabled by setting
   $wgEnableUserEmailBlacklist to true.
-* (T172315) $wgOOUIEditPage was removed, OOUI is the only display option for 
the
-  edit interface.
 * (T67297) $wgBrowserBlacklist is deprecated, and changing it will have no 
effect.
-  Instead, users using browsers that do not support unicode will be unable to 
edit
+  Instead, users using browsers that do not support Unicode will be unable to 
edit
   and should upgrade to a modern browser instead.
 
 === External library changes in 1.30 ===

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d68ff1abb0497eae046bd984d2a182066956325
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: Mark getSubmitButtonLabel() as @since 1.30

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

Change subject: EditPage: Mark getSubmitButtonLabel() as @since 1.30
..

EditPage: Mark getSubmitButtonLabel() as @since 1.30

Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/379827/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index a8ed19d..aa1f205 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4352,6 +4352,7 @@
/**
 * Get the message key of the label for the button to save the page
 *
+* @since 1.30
 * @return string
 */
protected function getSubmitButtonLabel() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I801e98b9f42636a46cdfa5cf7de4de2b59f9e46d
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...DonationInterface[master]: Fix amount warnings

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

Change subject: Fix amount warnings
..

Fix amount warnings

Also correctly round 3-digit currencies.
Tests pass strings to round(), because that's what previously
triggered the warnings.

Bug: T160962
Change-Id: I1bd722279e2ce955b886cb1d86f54a42c3b962ac
---
M gateway_common/Amount.php
M tests/phpunit/AmountTest.php
2 files changed, 23 insertions(+), 2 deletions(-)


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

diff --git a/gateway_common/Amount.php b/gateway_common/Amount.php
index 1070a24..f02d0f5 100644
--- a/gateway_common/Amount.php
+++ b/gateway_common/Amount.php
@@ -115,8 +115,13 @@
 * @return string rounded amount
 */
public static function round( $amount, $currencyCode ) {
+   $amount = floatval( $amount );
if ( self::is_fractional_currency( $currencyCode ) ) {
-   return number_format( $amount, 2, '.', '' );
+   $precision = 2;
+   if ( self::is_exponent3_currency( $currencyCode ) ) {
+   $precision = 3;
+   }
+   return number_format( $amount, $precision, '.', '' );
} else {
return (string)floor( $amount );
}
@@ -170,7 +175,7 @@
if ( class_exists( 'NumberFormatter' ) ) {
$formatter = new NumberFormatter( $locale, 
NumberFormatter::CURRENCY );
return $formatter->formatCurrency(
-   $amount,
+   floatval( $amount ),
$currencyCode
);
} else {
diff --git a/tests/phpunit/AmountTest.php b/tests/phpunit/AmountTest.php
index 4eab27b..886802b 100644
--- a/tests/phpunit/AmountTest.php
+++ b/tests/phpunit/AmountTest.php
@@ -244,4 +244,20 @@
'Wrong error message for diminutive amount (BBD)'
);
}
+
+   public function testRoundNoDigit() {
+   $rounded = Amount::round( '100.01', 'JPY' );
+   $this->assertEquals( 100, $rounded );
+   }
+
+   public function testRoundTwoDigit() {
+   $rounded = Amount::round( '2.762', 'CAD' );
+   $this->assertEquals( 2.76, $rounded );
+   }
+
+   public function testRoundThreeDigit() {
+   $rounded = Amount::round( '19.5437', 'KWD' );
+   $this->assertEquals( 19.544, $rounded );
+
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1bd722279e2ce955b886cb1d86f54a42c3b962ac
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] integration/config[master]: dib: drop aptly repository for php5.5

2017-09-22 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/379824 )

Change subject: dib: drop aptly repository for php5.5
..


dib: drop aptly repository for php5.5

The php5.5 packages have been rebuild and published on jessie-wikimedia
component/ci

Bug: T174972
Change-Id: I2d71a3fdf1764b1ed3175b56875f7b988b862a4b
---
M dib/puppet/ciimage.pp
1 file changed, 5 insertions(+), 6 deletions(-)

Approvals:
  jenkins-bot: Verified



diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index 51e5c3a..e0b531b 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -39,12 +39,11 @@
 include contint::packages::php
 
 if os_version('debian == jessie') {
-apt::repository { 'aptly-integration-php55':
-uri=> 'https://integration-aptly.wmflabs.org/repo/',
-dist   => 'jessie-integration',
-components => 'php55',
+apt::repository { 'jessie-ci-php55':
+uri=> 'http://apt.wikimedia.org/wikimedia',
+dist   => 'jessie-wikimedia',
+components => 'component/ci',
 source => false,
-trust_repo => true,
 }
 package { [
 'php5.5-cli',
@@ -65,7 +64,7 @@
 'php5.5-xsl',
 ]: ensure => present,
 require   => [
-  Apt::Repository['aptly-integration-php55'],
+  Apt::Repository['jessie-ci-php55'],
   Exec['apt-get update'],
 ],
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Vector[master]: Consolodate duplicate css rules.

2017-09-22 Thread 20after4 (Code Review)
20after4 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379825 )

Change subject: Consolodate duplicate css rules.
..

Consolodate duplicate css rules.

I really shoud not have merged I30e0642d3cb93c4d9a8b2bdfb7f04912d8ca8649
without getting this fixed first.

Bug: T56919
Change-Id: I870591e63b89f05d7e3714081340c76dcf9f55ac
---
M components/watchstar.less
1 file changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Vector 
refs/changes/25/379825/1

diff --git a/components/watchstar.less b/components/watchstar.less
index cdea9bc..1c9f21a 100644
--- a/components/watchstar.less
+++ b/components/watchstar.less
@@ -15,28 +15,24 @@
height: 0;
overflow: hidden;
background-position: 5px 60%;
+   background-repeat: no-repeat;
 }
 #ca-unwatch.icon a {
-   background-repeat: no-repeat;
.background-image-svg( 'images/unwatch-icon.svg', 
'images/unwatch-icon.png' );
 }
 #ca-watch.icon a {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon.svg', 'images/watch-icon.png' 
);
 }
 #ca-unwatch.icon a:hover,
 #ca-unwatch.icon a:focus {
-   background-repeat: no-repeat;
.background-image-svg( 'images/unwatch-icon-hl.svg', 
'images/unwatch-icon-hl.png' );
 }
 #ca-watch.icon a:hover,
 #ca-watch.icon a:focus {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon-hl.svg', 
'images/watch-icon-hl.png' );
 }
 #ca-unwatch.icon a.loading,
 #ca-watch.icon a.loading {
-   background-repeat: no-repeat;
.background-image-svg( 'images/watch-icon-loading.svg', 
'images/watch-icon-loading.png' );
.rotation( 700ms );
/* Suppress the hilarious rotating focus outline on Firefox */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I870591e63b89f05d7e3714081340c76dcf9f55ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/Vector
Gerrit-Branch: master
Gerrit-Owner: 20after4 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: dib: drop aptly repository for php5.5

2017-09-22 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/379824 )

Change subject: dib: drop aptly repository for php5.5
..

dib: drop aptly repository for php5.5

The php5.5 packages have been rebuild and published on jessie-wikimedia
component/ci

Bug: T174972
Change-Id: I2d71a3fdf1764b1ed3175b56875f7b988b862a4b
---
M dib/puppet/ciimage.pp
1 file changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/24/379824/1

diff --git a/dib/puppet/ciimage.pp b/dib/puppet/ciimage.pp
index 51e5c3a..e0b531b 100644
--- a/dib/puppet/ciimage.pp
+++ b/dib/puppet/ciimage.pp
@@ -39,12 +39,11 @@
 include contint::packages::php
 
 if os_version('debian == jessie') {
-apt::repository { 'aptly-integration-php55':
-uri=> 'https://integration-aptly.wmflabs.org/repo/',
-dist   => 'jessie-integration',
-components => 'php55',
+apt::repository { 'jessie-ci-php55':
+uri=> 'http://apt.wikimedia.org/wikimedia',
+dist   => 'jessie-wikimedia',
+components => 'component/ci',
 source => false,
-trust_repo => true,
 }
 package { [
 'php5.5-cli',
@@ -65,7 +64,7 @@
 'php5.5-xsl',
 ]: ensure => present,
 require   => [
-  Apt::Repository['aptly-integration-php55'],
+  Apt::Repository['jessie-ci-php55'],
   Exec['apt-get update'],
 ],
 }

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

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

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


  1   2   3   4   >