[MediaWiki-commits] [Gerrit] wikidata...gui[master]: Add original query str to the queryApi object

2017-10-13 Thread Yurik (Code Review)
Yurik has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384202 )

Change subject: Add original query str to the queryApi object
..

Add original query str to the queryApi object

In order to gain access to the original query string
inside the resultBrowsers, we need to preserve the query
string inside the queryApi object.  This is not ideal,
because the api object is both the API wrapper, with
the information HOW to get the data, as well as the
storage for the RESULT data itself.  I think the API
object should return an object with the request,
server's response, and any additional metrics,
thus allowing everyone to share in on it.  But such
change should probably happen after we migrate to Babel,
and start using proper Promises.

Change-Id: I4da3dd36ccec5ae5d91e210d8f344b8228008f9b
---
M wikibase/queryService/api/Sparql.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wikibase/queryService/api/Sparql.js 
b/wikibase/queryService/api/Sparql.js
index bd55824..2446876 100644
--- a/wikibase/queryService/api/Sparql.js
+++ b/wikibase/queryService/api/Sparql.js
@@ -156,12 +156,14 @@
self._resultLength = 
data.results.bindings.length || 0;
}
self._rawData = data;
+   self._originalQuery = query;
 
deferred.resolve( data );
}
function fail( request, options, exception ) {
self._executionTime = null;
self._rawData = null;
+   self._originalQuery = null;
self._resultLength = null;
self._generateErrorMessage( request, options, exception 
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4da3dd36ccec5ae5d91e210d8f344b8228008f9b
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Fix RC jumpiness due to expanded/collapsed commun...

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

Change subject: RCFilters: Fix RC jumpiness due to expanded/collapsed community 
links
..


RCFilters: Fix RC jumpiness due to expanded/collapsed community links

Bug: T177117
Change-Id: Ie0761613ff8c731226e26a78afa500aef9619d01
---
M includes/specials/SpecialRecentchanges.php
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
4 files changed, 32 insertions(+), 38 deletions(-)

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



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 6ce1968..f4135a4 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -621,18 +621,21 @@
// Check whether the widget is already 
collapsed or expanded
$collapsedState = 
$this->getRequest()->getCookie( 'rcfilters-toplinks-collapsed-state' );
// Note that an empty/unset cookie means 
collapsed, so check for !== 'expanded'
-   $collapsedClass = $collapsedState !== 
'expanded' ? 'mw-rcfilters-toplinks-collapsed' : '';
+   $topLinksAttributes[ 'class' ] .= 
$collapsedState !== 'expanded' ?
+   ' mw-recentchanges-toplinks-collapsed' 
: '';
 
-   $contentTitle = Html::rawElement( 'div',
-   [ 'class' => 
'mw-recentchanges-toplinks-title ' . $collapsedClass ],
-   $this->msg( 
'rcfilters-other-review-tools' )->parse()
-   );
+   $this->getOutput()->enableOOUI();
+   $contentTitle = new OOUI\ButtonWidget( [
+   'classes' => [ 
'mw-recentchanges-toplinks-title' ],
+   'label' => new OOUI\HtmlSnippet( 
$this->msg( 'rcfilters-other-review-tools' )->parse() ),
+   'framed' => false,
+   'indicator' => $collapsedState !== 
'expanded' ? 'down' : 'up',
+   'flags' => [ 'progressive' ],
+   ] );
+
$contentWrapper = Html::rawElement( 'div',
array_merge(
-   [
-   'class' => 
'mw-recentchanges-toplinks-content mw-collapsible-content ' .
-   $collapsedClass
-   ],
+   [ 'class' => 
'mw-recentchanges-toplinks-content mw-collapsible-content' ],
$langAttributes
),
$content
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
index ba7a70e..7410f98 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
@@ -21,14 +21,24 @@
min-height: @rcfilters-wl-head-min-height;
}
 
-   body:not( .mw-rcfilters-ui-initialized ) {
-   
.mw-recentchanges-toplinks-content.mw-rcfilters-toplinks-collapsed {
-   display: none;
-   }
+   .mw-recentchanges-toplinks {
+   margin-bottom: 0.5em;
 
-   
.mw-recentchanges-toplinks-title.mw-rcfilters-toplinks-collapsed {
-   // Hide, but keep the placement so we don't jump
-   visibility: hidden;
+   &:not( .mw-recentchanges-toplinks-collapsed ) {
+   // Same as the legend
+   border: 1px solid #ddd;
+   }
+   }
+
+   body:not( .mw-rcfilters-ui-initialized ) {
+   .mw-recentchanges-toplinks.mw-recentchanges-toplinks-collapsed {
+   // Similar to the watchlist-details hack, we are going 
to make this float left
+   // while loading to prevent jumpiness in the min-height 
calculation
+   float: left;
+
+   .mw-recentchanges-toplinks-content {
+   display: none;
+   }
}
 
.rcfilters-head {
diff --git 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: maintain-views: Add log types to logging_whitelist

2017-10-13 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384201 )

Change subject: maintain-views: Add log types to logging_whitelist
..

maintain-views: Add log types to logging_whitelist

Add contentmodel, gwtoolset, notifytranslators, pagelang,
pagetranslation, tag, timedmediahandler, translationreview, usermerge
log types to logging_whitelist. Document that spamblacklist, suppress,
and titleblacklist should always be excluded from the allowed set.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/384201/1

diff --git a/modules/role/templates/labs/db/views/maintain-views.yaml 
b/modules/role/templates/labs/db/views/maintain-views.yaml
index 515ead5..dd70ec2 100644
--- a/modules/role/templates/labs/db/views/maintain-views.yaml
+++ b/modules/role/templates/labs/db/views/maintain-views.yaml
@@ -143,11 +143,16 @@
   - wbs_propertypairs
   - watchlist_count
 
+# Deliberately excluded:
+# - spamblacklist   T178052
+# - suppressT178052
+# - titleblacklist  T178052
 logging_whitelist:
   - abusefilter
   - block
   - campus
   - close
+  - contentmodel
   - course
   - delete
   - eparticle
@@ -155,6 +160,7 @@
   - gblblock
   - gblrights
   - globalauth
+  - gwtoolset
   - import
   - institution
   - instructor
@@ -164,7 +170,10 @@
   - merge
   - move
   - newusers
+  - notifytranslators
   - online
+  - pagelang
+  - pagetranslation
   - pagetriage-curation
   - pagetriage-deletion
   - patrol
@@ -174,8 +183,12 @@
   - rights
   - stable
   - student
+  - tag
   - thanks
+  - timedmediahandler
+  - translationreview
   - upload
+  - usermerge
 
 customviews:
   abuse_filter:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...AddHTMLMetaAndTitle[master]: Convert to extension registration

2017-10-13 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384200 )

Change subject: Convert to extension registration
..

Convert to extension registration

This is a bit of a rewrite, to move to extension registration but
also remove some of the duplication of the code.

Change-Id: I9e980bf9a31286860972991f0b16d60485b85670
---
A .eslintrc.json
D AddHTMLMetaAndTitle.php
D Add_HTML_Meta_and_Title.php
M composer.json
A extension.json
A includes/Adder.php
A includes/Hooks.php
M phpcs.xml
8 files changed, 229 insertions(+), 219 deletions(-)


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

diff --git a/.eslintrc.json b/.eslintrc.json
new file mode 100644
index 000..4843240
--- /dev/null
+++ b/.eslintrc.json
@@ -0,0 +1,10 @@
+{
+   "extends": "wikimedia",
+   "env": {
+   "browser": true,
+   "jquery": true
+   },
+   "globals": {
+   "mediaWiki": false
+   }
+}
diff --git a/AddHTMLMetaAndTitle.php b/AddHTMLMetaAndTitle.php
deleted file mode 100644
index d24e03c..000
--- a/AddHTMLMetaAndTitle.php
+++ /dev/null
@@ -1,205 +0,0 @@
-https://www.mediawiki.org/wiki/Extension:Add_HTML_Meta_and_Title
-*
- */
-
-/**
- * Protect against register_globals vulnerabilities.
- * This line must be present before any global variable is referenced.
- */
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo << __FILE__,
-   'name' => 'AddHTMLMetaAndTitle',
-   'author' => [
-   'Vladimir Radulovski - vladradulovatgmail.com',
-   'Jim Wilson - wilson.jim.ratgmail.com',
-   'Dennis Roczek - dennisroczekatgmail.com'
-   ],
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:Add_HTML_Meta_and_Title',
-   'descriptionmsg' => 'addhtmlmetaandtitle-desc',
-   'version' => '0.7',
-   'license-name' => 'MIT'
-];
-
-# Add Extension Function
-$wgExtensionFunctions[] = 'wfSetupSEOParserHooks';
-$wgMessagesDirs['AddHTMLMetaAndTitle'] = __DIR__ . '/i18n';
-
-/**
- * Sets up the MetaKeywordsTag Parser hook and system messages
- */
-function wfSetupSEOParserHooks() {
-   global $wgParser;
-   # meta if empty
-   $wgParser->setHook( 'seo', 'wfRenderSEO' );
-}
-
-function wfParamEncode( $param_text, &$parser, $frame ) {
-   $expanded_param = $parser->recursiveTagParse( $param_text, $frame );
-
-   return base64_encode( $expanded_param );
-}
-
-/**
- * Renders the  tag.
- * @param String $text Incomming text - should always be null or empty (passed 
by value).
- * @param Array $params Attributes specified for tag - must contain 'content' 
(passed by value).
- * @param Parser $parser Reference to currently running parser (passed by 
reference).
- * @return String Always empty.
- */
-function wfRenderSEO( $text, $params = [], $parser, $frame ) {
-   # Short-circuit with error message if content is not specified.
-   $emt = '';
-   if ( ( isset( $params['title'] ) ) ||
-   ( isset( $params['metak'] ) ) ||
-   ( isset( $params['metad'] ) ) ||
-   ( isset( $params['metakeywords'] ) ) ||
-   ( isset( $params['metadescription'] ) ) ||
-   ( isset( $params['google-site-verification'] ) )
-   ) {
-   if ( isset( $params['title'] ) ) {
-   $emt .= "";
-   }
-   if ( isset( $params['metak'] ) ) {
-   $emt .= "";
-   }
-   if ( isset( $params['metakeywords'] ) ) {
-   $emt .= "";
-   }
-   if ( isset( $params['metad'] ) ) {
-   $emt .= "";
-   }
-   if ( isset( $params['metadescription'] ) ) {
-   $emt .= "";
-   }
-   if ( isset( $params['google-site-verification'] ) ) {
-   $emt .= "";
-   }
-
-   return $emt; // $encoded_metas_and_title;
-
-   } else {
-   return
-   '' .
-   wfMessage( 'addhtmlmetaandtitle-empty-attr' 
)->inContentLanguage()->text() .
-   '';
-   }
-}
-
-# Attach post-parser hook to extract metadata and alter headers
-$wgHooks['OutputPageBeforeHTML'][] = 'wfInsertMeta';
-$wgHooks['BeforePageDisplay'][] = 'wfInsertTitle';
-
-/**
- * Adds the  keywords to document head.
- * Usage: $wgHooks['OutputPageBeforeHTML'][] = 'insertMetaKeywords';
- * @param OutputPage $out Handle to an OutputPage object - presumably $wgOut 
(passed by reference).
- * @param String $text Output text.
- * @return Boolean Always true to allow other extensions to continue 
processing.
- */
-function wfInsertTitle( $out ) {
-   # Extract meta keywords
-   if ( preg_match_all(
-   '//m',
-   $out->mBodytext,
-

[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Invalid argument supplied for foreach all over MassMessageLi...

2017-10-13 Thread Noella94 (Code Review)
Noella94 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384199 )

Change subject: Invalid argument supplied for foreach all over 
MassMessageListContent
..

Invalid argument supplied for foreach all over MassMessageListContent

Supplied empty instead of null array to foreach for cases where ->targets is 
null.

Bug: T162734
Change-Id: I81c207eee36654b684ce52ccdb2df744210976e7
---
M includes/content/MassMessageListContent.php
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/99/384199/1

diff --git a/includes/content/MassMessageListContent.php 
b/includes/content/MassMessageListContent.php
index b74f544..f4f6e42 100644
--- a/includes/content/MassMessageListContent.php
+++ b/includes/content/MassMessageListContent.php
@@ -64,11 +64,14 @@
}
 
/**
-* @return array|null
+* @return array
 */
public function getTargets() {
$this->decode();
-   return $this->targets;
+   if ( is_array($this->targets) )
+   return $this->targets;
+   else 
+   return $arr = []; // empty array
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81c207eee36654b684ce52ccdb2df744210976e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Noella94 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Provide accurate DSR offsets for issues in extension...

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

Change subject: Linter: Provide accurate DSR offsets for issues in extension 
content
..

Linter: Provide accurate DSR offsets for issues in extension content

* DSR info was being blindly updated to entire extension range
  instead of looking inside the extension content.

* Updated mocha test that now has updated DSR offsets.

Bug: T178217
Change-Id: I7d99c1771fb4d55866d296ecd283202bfc62a8ed
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 17 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/98/384198/1

diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index fbd4d24..6f12352 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -229,8 +229,11 @@
var templateInfo;
 
if (tplInfo) {
-   dsr = tplInfo.dsr;
templateInfo = findEnclosingTemplateName(env, tplInfo);
+   }
+
+   if (templateInfo) {
+   dsr = tplInfo.dsr;
} else if (dp.tmp.origDSR) {
// During DSR computation, stripped meta tags
// surrender their width to its previous sibling.
@@ -420,15 +423,11 @@
// 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(maybeTable).dsr;
-   }
-   var lintObj = { dsr: dsr, templateInfo: templateInfo };
+   var templateInfo = tplInfo ? findEnclosingTemplateName(env, tplInfo) : 
null;
+   var lintObj = {
+   dsr: templateInfo ? tplInfo.dsr : 
DU.getDataParsoid(maybeTable).dsr,
+   templateInfo: templateInfo
+   };
env.log('lint/fostered', lintObj);
 
return maybeTable;
@@ -456,7 +455,7 @@
templateInfo = findEnclosingTemplateName(env, tplInfo);
}
var lintObj = {
-   dsr: tplInfo ? tplInfo.dsr : dp.dsr,
+   dsr: templateInfo ? tplInfo.dsr : dp.dsr,
templateInfo: templateInfo,
params: { name: c.nodeName.toLowerCase() },
};
@@ -482,7 +481,7 @@
templateInfo = findEnclosingTemplateName(env, 
tplInfo);
}
env.log('lint/bogus-image-options', {
-   dsr: tplInfo ? tplInfo.dsr : dp.dsr,
+   dsr: templateInfo ? tplInfo.dsr : dp.dsr,
templateInfo: templateInfo,
params: { items: items },
});
@@ -516,6 +515,9 @@
var dsr;
if (tplInfo) {
templateInfo = findEnclosingTemplateName(env, 
tplInfo);
+   }
+
+   if (templateInfo) {
dsr = tplInfo.dsr;
} else {
// Identify the dsr-span of the opening tag
@@ -569,12 +571,9 @@
var dsr, templateInfo;
if (tplInfo) {
templateInfo = 
findEnclosingTemplateName(env, tplInfo);
-   dsr = tplInfo.dsr;
-   } else {
-   dsr = dp.dsr;
}
var lintObj = {
-   dsr: dsr,
+   dsr: templateInfo ? tplInfo.dsr : 
dp.dsr,
templateInfo: templateInfo,
params: { root: 
node.parentNode.nodeName, child: node.nodeName },
};
@@ -701,17 +700,13 @@
var dsr, templateInfo;
if (tplInfo) {
templateInfo = findEnclosingTemplateName(env, tplInfo);
-   dsr = tplInfo.dsr;
}
var n = nowrapNodes.length - 1;
nowrapNodes.forEach(function(o, i) {
if (o.tidybug && i < n) {
-   if (!tplInfo) {
-   dsr = DU.getDataParsoid(o.node).dsr;
-   }
if (!nowrapNodes[i + 1].hasLeadingWS) {
var lintObj = {
-   dsr: dsr,
+   dsr: templateInfo ? tplInfo.dsr :  
DU.getDataParsoid(o.node).dsr,
  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: No longer special case 'patrol' in $wgFilterLogTypes

2017-10-13 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384197 )

Change subject: No longer special case 'patrol' in $wgFilterLogTypes
..

No longer special case 'patrol' in $wgFilterLogTypes

Previously, if you did not have the right to patrol/view patrolmarks,
you were not allowed to filter Special:Log to remove autopatrol
entries.

Now if wikiadmins want to disbale the filtering, they have to
directly change the config value.

This was stupid because:
* Users without patrol rights are just as likely to not care about
  autopatrol spam as users with the priv.
* Sometimes wikiadmins want to hide old patrol log entries even
  after they disabled the patrol feature.

It should be noted there have been two previously attempts at fixing
this issue that didn't go anywhere:
* I9de17fc197a06402a4999a9fb792b86657641f76
* I88448ca0f09069943fd514a5b8213dfdafa57299

Bug: T44246
Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
---
M RELEASE-NOTES-1.31
M includes/DefaultSettings.php
M includes/logging/LogPager.php
3 files changed, 10 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/384197/1

diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index 3fd1fc8..59711cb 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -6,6 +6,8 @@
 production.
 
 === Configuration changes in 1.31 ===
+* (T44246) $wgFilterLogTypes will no longer ignore patrol when user does
+  not have the right to mark things patrolled.
 * …
 
 === New features in 1.31 ===
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 780976a..80d45cd 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6803,6 +6803,9 @@
 /**
  * Use RC Patrolling to check for vandalism (from recent changes and 
watchlists)
  * New pages and new files are included.
+ *
+ * @note If you disable all patrolling features, you probably also want to
+ *  remove patrol from $wgFilterLogTypes.
  */
 $wgUseRCPatrol = true;
 
diff --git a/includes/logging/LogPager.php b/includes/logging/LogPager.php
index f79fcfa..df432e1 100644
--- a/includes/logging/LogPager.php
+++ b/includes/logging/LogPager.php
@@ -97,13 +97,11 @@
return $filters;
}
foreach ( $wgFilterLogTypes as $type => $default ) {
-   // Avoid silly filtering
-   if ( $type !== 'patrol' || 
$this->getUser()->useNPPatrol() ) {
-   $hide = $this->getRequest()->getInt( 
"hide_{$type}_log", $default );
-   $filters[$type] = $hide;
-   if ( $hide ) {
-   $this->mConds[] = 'log_type != ' . 
$this->mDb->addQuotes( $type );
-   }
+   $hide = $this->getRequest()->getInt( 
"hide_{$type}_log", $default );
+
+   $filters[$type] = $hide;
+   if ( $hide ) {
+   $this->mConds[] = 'log_type != ' . 
$this->mDb->addQuotes( $type );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I590db72c169f3a9ad96c710f088923419d40e48d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Allow filtering newusers log on Special:Log page

2017-10-13 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384196 )

Change subject: Allow filtering newusers log on Special:Log page
..

Allow filtering newusers log on Special:Log page

Newusers log can be really spammy on some wikis. This adds it
as a filter option (Like patrol, thanks and tag logs). However
it keeps the default to be show new user logs, so the default
behaviour stays the same.

Change-Id: I54b3bfe1afc2c1e500f4630e676465cec3ad8ce3
---
M includes/DefaultSettings.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/384196/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 780976a..43288e6 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -7620,6 +7620,7 @@
 $wgFilterLogTypes = [
'patrol' => true,
'tag' => true,
+   'newusers' => false,
 ];
 
 /**
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 6bf32b2..d2f1013 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -3038,6 +3038,7 @@
"patrol-log-header": "This is a log of patrolled revisions.",
"log-show-hide-patrol": "$1 patrol log",
"log-show-hide-tag": "$1 tag log",
+   "log-show-hide-newusers": "$1 new user log",
"confirm-markpatrolled-button": "OK",
"confirm-markpatrolled-top": "Mark revision $3 of $2 as patrolled?",
"deletedrevision": "Deleted old revision $1",
diff --git a/languages/i18n/qqq.json b/languages/i18n/qqq.json
index bb40e25..ac0e891 100644
--- a/languages/i18n/qqq.json
+++ b/languages/i18n/qqq.json
@@ -3231,6 +3231,7 @@
"patrol-log-header": "Text that appears above the log entries on the 
[[Special:log|patrol log]].",
"log-show-hide-patrol": "Used in [[Special:Log]]. Parameters:\n* $1 - 
link text; one of {{msg-mw|Show}} or 
{{msg-mw|Hide}}\n{{Related|Log-show-hide}}",
"log-show-hide-tag": "Used in [[Special:Log]]. Parameters:\n* $1 - link 
text; one of {{msg-mw|Show}} or {{msg-mw|Hide}}\n{{Related|Log-show-hide}}",
+   "log-show-hide-newusers": "Used in [[Special:Log]] as a toggle to show 
or hide account creations in the main log page. Parameters:\n* $1 - link text; 
one of {{msg-mw|Show}} or {{msg-mw|Hide}}\n{{Related|Log-show-hide}}",
"confirm-markpatrolled-button": "Used as Submit button 
text.\n{{Identical|OK}}",
"confirm-markpatrolled-top": "Confirmation message on interstitial 
form.\n\nParameters:\n* $1 - Target page title\n* $2 - Link to target page with 
page title as label\n* $3 - Link to recent change diff with revision ID as 
label",
"deletedrevision": "Used as log comment. Parameters:\n* $1 - archive 
name of old image",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54b3bfe1afc2c1e500f4630e676465cec3ad8ce3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialRunJobs: Use MediaWiki's built-in async/post-send mode

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

Change subject: SpecialRunJobs: Use MediaWiki's built-in async/post-send mode
..


SpecialRunJobs: Use MediaWiki's built-in async/post-send mode

Disabling OutputPage is fine, but disabling MediaWiki's own
output handling from MediaWiki.php as well (with ignore_user_abort
and ob_flush) made this code incompatible with becoming an API module.

Make use of DeferredUpdates instead, MediaWiki's built-in post-send
mechanism.

Bug: T175146
Change-Id: Ia131341d447fd6501a070da89cd3a2af470e0f7d
---
M includes/specials/SpecialRunJobs.php
1 file changed, 31 insertions(+), 32 deletions(-)

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



diff --git a/includes/specials/SpecialRunJobs.php 
b/includes/specials/SpecialRunJobs.php
index 73fe70f..375694b 100644
--- a/includes/specials/SpecialRunJobs.php
+++ b/includes/specials/SpecialRunJobs.php
@@ -39,17 +39,21 @@
 
public function execute( $par = '' ) {
$this->getOutput()->disable();
+
if ( wfReadOnly() ) {
wfHttpError( 423, 'Locked', 'Wiki is in read-only 
mode.' );
return;
-   } elseif ( !$this->getRequest()->wasPosted() ) {
+   }
+
+   // Validate request method
+   if ( !$this->getRequest()->wasPosted() ) {
wfHttpError( 400, 'Bad Request', 'Request must be 
POSTed.' );
return;
}
 
+   // Validate request parameters
$optional = [ 'maxjobs' => 0, 'maxtime' => 30, 'type' => false, 
'async' => true ];
$required = array_flip( [ 'title', 'tasks', 'signature', 
'sigexpiry' ] );
-
$params = array_intersect_key( 
$this->getRequest()->getValues(), $required + $optional );
$missing = array_diff_key( $required, $params );
if ( count( $missing ) ) {
@@ -59,11 +63,11 @@
return;
}
 
+   // Validate request signature
$squery = $params;
unset( $squery['signature'] );
$correctSignature = self::getQuerySignature( $squery, 
$this->getConfig()->get( 'SecretKey' ) );
$providedSignature = $params['signature'];
-
$verified = is_string( $providedSignature )
&& hash_equals( $correctSignature, $providedSignature );
if ( !$verified || $params['sigexpiry'] < time() ) {
@@ -75,39 +79,34 @@
$params += $optional;
 
if ( $params['async'] ) {
-   // Client will usually disconnect before checking the 
response,
-   // but it needs to know when it is safe to disconnect. 
Until this
-   // reaches ignore_user_abort(), it is not safe as the 
jobs won't run.
-   ignore_user_abort( true ); // jobs may take a bit of 
time
// HTTP 202 Accepted
HttpStatus::header( 202 );
-   ob_flush();
-   flush();
-   // Once the client receives this response, it can 
disconnect
-   set_error_handler( function ( $errno, $errstr ) {
-   if ( strpos( $errstr, 'Cannot modify header 
information' ) !== false ) {
-   return true; // bug T115413
-   }
-   // Delegate unhandled errors to the default 
MediaWiki handler
-   // so that fatal errors get proper logging 
(T89169)
-   return call_user_func_array(
-   'MWExceptionHandler::handleError', 
func_get_args()
-   );
-   } );
+   // Clients are meant to disconnect without waiting for 
the full response.
+   // Let the page output happen before the jobs start, so 
that clients know it's
+   // safe to disconnect. MediaWiki::preOutputCommit() 
calls ignore_user_abort()
+   // or similar to make sure we stay alive to run the 
deferred update.
+   DeferredUpdates::addUpdate(
+   new TransactionRoundDefiningUpdate(
+   function () use ( $params ) {
+   $this->doRun( $params );
+   },
+   __METHOD__
+   ),
+   DeferredUpdates::POSTSEND
+   );
+   } else {
+   

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Don't use deprecated wfCountDown()

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

Change subject: Don't use deprecated wfCountDown()
..


Don't use deprecated wfCountDown()

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

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



diff --git a/wmfManageJobs.php b/wmfManageJobs.php
index 88284b8..67bb94c 100644
--- a/wmfManageJobs.php
+++ b/wmfManageJobs.php
@@ -114,7 +114,7 @@
$this->output( "\n\nThe script will now try to delete $total 
job(s), " .
"from $count different queue(s), for this wiki: 
$target\n" );
$this->output( 'Abort with control-C in the next five 
seconds...' );
-   wfCountDown( 5 );
+   $this->countDown( 5 );
 
foreach ( $deleteTypes as $type => $queue ) {
$this->output( "$type: deleting...\n" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I740b4c31ecbb20eb7ace7d945616d49931258ade
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsStorage[master]: wfRunHooks() --> Hooks::run()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384195 )

Change subject: wfRunHooks() --> Hooks::run()
..

wfRunHooks() --> Hooks::run()

Change-Id: I0cc94ffd850d8392280efa561dd44f9eb3654bdc
---
M tests/phpunit/!!!firstInit_Test.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsStorage 
refs/changes/95/384195/1

diff --git "a/tests/phpunit/\041\041\041firstInit_Test.php" 
"b/tests/phpunit/\041\041\041firstInit_Test.php"
index 74f988a..3c52b47 100644
--- "a/tests/phpunit/\041\041\041firstInit_Test.php"
+++ "b/tests/phpunit/\041\041\041firstInit_Test.php"
@@ -1,7 +1,7 @@
 https://gerrit.wikimedia.org/r/384195
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cc94ffd850d8392280efa561dd44f9eb3654bdc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsStorage
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsStorage[master]: DB_SLAVE --> DB_REPLICA

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384194 )

Change subject: DB_SLAVE --> DB_REPLICA
..

DB_SLAVE --> DB_REPLICA

Change-Id: I92f3f29fb9a026a359b4bc00c1f5bc37807aa091
---
M includes/PageData.php
M includes/Storage/Schema.php
M tests/phpunit/StorageWikiPage_Test.php
3 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsStorage 
refs/changes/94/384194/1

diff --git a/includes/PageData.php b/includes/PageData.php
index 16f6fe8..616a728 100644
--- a/includes/PageData.php
+++ b/includes/PageData.php
@@ -94,7 +94,7 @@
}
 
\PhpTagsStorage\Schema::loadSchema( $templates );
-   $db = wfGetDB( DB_SLAVE, 'PhpTags' );
+   $db = wfGetDB( DB_REPLICA, 'PhpTags' );
foreach ( $templates as $t ) {
$fields = \PhpTagsStorage\Schema::getTemplateFields( $t 
);
$res = $db->select( 
\PhpTagsStorage\Schema::TABLE_PREFIX . $t, '*', array('page_id'=>$pageID) );
diff --git a/includes/Storage/Schema.php b/includes/Storage/Schema.php
index b2c8ae4..face60c 100644
--- a/includes/Storage/Schema.php
+++ b/includes/Storage/Schema.php
@@ -82,7 +82,7 @@
return self::$pageTemplates[$pageID];
}
 
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
$rowTemplates = $db->selectRow( self::TABLE_PAGE_TEMPLATES , 
'templates', array('page_id'=>$pageID) );
if ( $rowTemplates !== false ) {
$templates = \FormatJson::decode( 
$rowTemplates->templates, true );
@@ -106,7 +106,7 @@
return true;
}
 
-   $db = wfGetDB( DB_SLAVE );
+   $db = wfGetDB( DB_REPLICA );
$schemaRows = $db->select( self::TABLE_SCHEMA, 
array('template_id','table_schema'), array('template_id'=>$tmp) );
while ( $row = $schemaRows->fetchObject() ) {
self::$loadedRows[$row->template_id] = 
$row->table_schema;
diff --git a/tests/phpunit/StorageWikiPage_Test.php 
b/tests/phpunit/StorageWikiPage_Test.php
index 5c2076f..a2567e5 100644
--- a/tests/phpunit/StorageWikiPage_Test.php
+++ b/tests/phpunit/StorageWikiPage_Test.php
@@ -81,7 +81,7 @@
$templateStorageTagId = $this->createPage( $titleStorageTag, 
$text, CONTENT_MODEL_WIKITEXT )->getId();
 
# 
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$res = $dbr->select( PhpTagsStorage\Schema::TABLE_SCHEMA, '*', 
array('template_id' => $templateStorageTagId) );
$n = $res->numRows();
$res->free();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92f3f29fb9a026a359b4bc00c1f5bc37807aa091
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsStorage
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionCommentSupplement[master]: Don't use deprecated wfCountDown()

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

Change subject: Don't use deprecated wfCountDown()
..


Don't use deprecated wfCountDown()

Change-Id: I67e59169e92249ec7c2ada733655066b43717907
---
M maintenance/buildHistory.php
M maintenance/fixLogParams.php
M maintenance/fixUserGroupSupplement.php
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/maintenance/buildHistory.php b/maintenance/buildHistory.php
index 4bf6b18..de66818 100644
--- a/maintenance/buildHistory.php
+++ b/maintenance/buildHistory.php
@@ -21,7 +21,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will build 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
if ( $this->hasOption( 'log' ) ) {
$this->buildFromLogging();
}
diff --git a/maintenance/fixLogParams.php b/maintenance/fixLogParams.php
index d29a75b..4492c21 100644
--- a/maintenance/fixLogParams.php
+++ b/maintenance/fixLogParams.php
@@ -19,7 +19,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will update 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
$i = 0;
$dbw = $this->getDB( DB_MASTER );
$conds = array(
diff --git a/maintenance/fixUserGroupSupplement.php 
b/maintenance/fixUserGroupSupplement.php
index 6b52178..d3059b5 100644
--- a/maintenance/fixUserGroupSupplement.php
+++ b/maintenance/fixUserGroupSupplement.php
@@ -18,7 +18,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will replace 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
$i = 0;
$dbr = wfGetDB( DB_REPLICA );
$rows = $dbr->select(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67e59169e92249ec7c2ada733655066b43717907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionCommentSupplement
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: wfRunHooks() --> Hooks::run()

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

Change subject: wfRunHooks() --> Hooks::run()
..


wfRunHooks() --> Hooks::run()

Change-Id: I54115ed6902f3ba577bd0ce75a985531d4bd448b
---
M handler/HandlerDb.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/handler/HandlerDb.php b/handler/HandlerDb.php
index 002e9ca..f0369ce 100644
--- a/handler/HandlerDb.php
+++ b/handler/HandlerDb.php
@@ -253,7 +253,7 @@
);
}
 
-   wfRunHooks( 'ConfigureDBHandlerSaveSettingsForWiki', array( 
$settings ) );
+   Hooks::run( 'ConfigureDBHandlerSaveSettingsForWiki', array( 
$settings ) );
 
$dbw->insert( 'config_setting', $insert, __METHOD__ );
$dbw->commit( __METHOD__ );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54115ed6902f3ba577bd0ce75a985531d4bd448b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Configure
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionCommentSupplement[master]: DB_SLAVE --> DB_REPLICA

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

Change subject: DB_SLAVE --> DB_REPLICA
..


DB_SLAVE --> DB_REPLICA

Change-Id: I8d79833a1c5aaa1d31f94851fda9deefc2dd3c58
---
M RevisionCommentSupplement.class.php
M RevisionCommentSupplement.hook.php
M maintenance/fixUserGroupSupplement.php
M special/SpecialRevisionCommentSupplement.php
M special/ViewRevisionCommentSupplementEdit.php
M special/ViewRevisionCommentSupplementList.php
6 files changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/RevisionCommentSupplement.class.php 
b/RevisionCommentSupplement.class.php
index 04649e0..d4bc969 100644
--- a/RevisionCommentSupplement.class.php
+++ b/RevisionCommentSupplement.class.php
@@ -33,7 +33,7 @@
public static function insert( $revId, $newsupplement, $reason ) {
$oldsupplement = '';
$action = 'create';
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
@@ -139,7 +139,7 @@
 */
public static function delete( $revId, $reason = '' ) {
$oldsupplement = '';
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
@@ -168,7 +168,7 @@
 * @return object|bool
 */
public static function getRow( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'*',
@@ -188,7 +188,7 @@
 * @return bool
 */
public static function isExistRow( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_rev_id',
@@ -248,7 +248,7 @@
 * @return object|bool
 */
public static function getRow( $id ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'*',
@@ -268,7 +268,7 @@
 * @return bool
 */
public static function isExistRow( $id ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_id',
@@ -288,7 +288,7 @@
 * @return bool
 */
public static function isExistHistory( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_rev_id',
@@ -333,7 +333,7 @@
 * @return bool
 */
public static function hide( $id, $reason = '', $hide = 0 ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_rev_id,rcsh_hidden',
diff --git a/RevisionCommentSupplement.hook.php 
b/RevisionCommentSupplement.hook.php
index f55ef35..3de4f53 100644
--- a/RevisionCommentSupplement.hook.php
+++ b/RevisionCommentSupplement.hook.php
@@ -26,7 +26,7 @@
 
public static function onPageHistoryLineEnding( HistoryPager $history, 
$revRow, &$s ) {
$revId = (int)$revRow->rev_id;
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
diff --git a/maintenance/fixUserGroupSupplement.php 
b/maintenance/fixUserGroupSupplement.php
index 3e8fe07..6b52178 100644
--- a/maintenance/fixUserGroupSupplement.php
+++ b/maintenance/fixUserGroupSupplement.php
@@ -20,7 +20,7 @@
$this->output( "\nThis will replace 10 seconds after.\n" );
wfCountDown( 10 );
$i = 0;
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$rows = $dbr->select(
'user_groups',
'ug_user',
diff --git a/special/SpecialRevisionCommentSupplement.php 
b/special/SpecialRevisionCommentSupplement.php
index 8cd992e..151acda 100644
--- a/special/SpecialRevisionCommentSupplement.php
+++ b/special/SpecialRevisionCommentSupplement.php
@@ 

[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: DB_SLAVE --> DB_REPLICA

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

Change subject: DB_SLAVE --> DB_REPLICA
..


DB_SLAVE --> DB_REPLICA

Change-Id: Idf037c0f43d7abf57c021e31daeaa7f0cba84fcc
---
M handler/HandlerDb.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/handler/HandlerDb.php b/handler/HandlerDb.php
index f8b7ca0..002e9ca 100644
--- a/handler/HandlerDb.php
+++ b/handler/HandlerDb.php
@@ -26,7 +26,7 @@
 * @return Database object
 */
public function getSlaveDB() {
-   return wfGetDB( DB_SLAVE, 'config', $this->mDb );
+   return wfGetDB( DB_REPLICA, 'config', $this->mDb );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf037c0f43d7abf57c021e31daeaa7f0cba84fcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Configure
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Stop copy+pasting squid/reverse proxy settings

2017-10-13 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384193 )

Change subject: Stop copy+pasting squid/reverse proxy settings
..

Stop copy+pasting squid/reverse proxy settings

Follows up Iffd33559, but copy+pasting is just going to get these
files out of sync and harder to finish the migration.

Yes, symlinks suck (cf: T126306). But symlinking in the direction
of the final desired result should ease migration.

Bug: T104148
Change-Id: I320ec36534b7067b562719a5aee810389f629e58
---
D wmf-config/squid-labs.php
A wmf-config/squid-labs.php
D wmf-config/squid.php
A wmf-config/squid.php
4 files changed, 2 insertions(+), 103 deletions(-)


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

diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php
deleted file mode 100644
index 06d8480..000
--- a/wmf-config/squid-labs.php
+++ /dev/null
@@ -1,29 +0,0 @@
- [
-   'host' => '10.68.18.109',  # deployment-cache-upload04
-   'port' => 4827,
-   ],
-
-   # Fallback  (text)
-   '' => [
-   [
-   'host' => '10.68.18.103',  # deployment-cache-text04
-   'port' => 4827,
-   ],
-   ],
-];
diff --git a/wmf-config/squid-labs.php b/wmf-config/squid-labs.php
new file mode 12
index 000..5c724d4
--- /dev/null
+++ b/wmf-config/squid-labs.php
@@ -0,0 +1 @@
+reverse-proxy-staging.php
\ No newline at end of file
diff --git a/wmf-config/squid.php b/wmf-config/squid.php
deleted file mode 100644
index af7033a..000
--- a/wmf-config/squid.php
+++ /dev/null
@@ -1,74 +0,0 @@
- [
-   'host' => '239.128.0.112',
-   'port' => 4827
-   ]
-];
-$wgHTCPMulticastTTL = 8;
-
-# Accept XFF from these proxies
-$wgSquidServersNoPurge = [
-   # Note: the general idea here is to cover infrastructure space
-   # where e.g. Varnish and SSL servers could be located, but exclude
-   # other misc subnets (e.g. labs, analytics).
-
-   ## eqiad
-   '208.80.154.0/26',  # public1-a-eqiad
-   '2620:0:861:1::/64',# public1-a-eqiad
-   '208.80.154.128/26',# public1-b-eqiad
-   '2620:0:861:2::/64',# public1-b-eqiad
-   '208.80.154.64/26', # public1-c-eqiad
-   '2620:0:861:3::/64',# public1-c-eqiad
-   '208.80.155.96/27', # public1-d-eqiad
-   '2620:0:861:4::/64',# public1-d-eqiad
-   '10.64.0.0/22', # private1-a-eqiad
-   '2620:0:861:101::/64',  # private1-a-eqiad
-   '10.64.16.0/22',# private1-b-eqiad
-   '2620:0:861:102::/64',  # private1-b-eqiad
-   '10.64.32.0/22',# private1-c-eqiad
-   '2620:0:861:103::/64',  # private1-c-eqiad
-   '10.64.48.0/22',# private1-d-eqiad
-   '2620:0:861:107::/64',  # private1-d-eqiad
-
-   ## codfw
-   '208.80.153.0/27', # public1-a-codfw
-   '2620:0:860:1::/64', # public1-a-codfw
-   '208.80.153.32/27', # public1-b-codfw
-   '2620:0:860:2::/64', # public1-b-codfw
-   '208.80.153.64/27', # public1-c-codfw
-   '2620:0:860:3::/64', # public1-c-codfw
-   '208.80.153.96/27', # public1-d-codfw
-   '2620:0:860:4::/64', # public1-d-codfw
-   '10.192.0.0/22', # private1-a-codfw
-   '2620:0:860:101::/64', # private1-a-codfw
-   '10.192.16.0/22', # private1-b-codfw
-   '2620:0:860:102::/64', # private1-b-codfw
-   '10.192.32.0/22', # private1-c-codfw
-   '2620:0:860:103::/64', # private1-c-codfw
-   '10.192.48.0/22', # private1-d-codfw
-   '2620:0:860:104::/64', # private1-d-codfw
-
-   ## esams
-   '91.198.174.0/25',  # public1-esams
-   '2620:0:862:1::/64',# public1-esams
-   '10.20.0.0/24', # private1-esams
-   '2620:0:862:102::/64',  # private1-esams
-
-   ## ulsfo
-   '10.128.0.0/24',# private1-ulsfo
-   '2620:0:863:101::/64',  # private1-ulsfo
-   '10.2.4.26',# mobile.svc.ulsfo.wmnet, appears in XFF
-];
-
-# IP addresses that aren't proxies, regardless of what the other sources might 
say
-$wgProxyWhitelist = [
-   '68.124.59.186',
-   '202.63.61.242',
-   '62.214.230.86',
-   '217.94.171.96',
-];
-
-# Secondary purges to deal with DB replication lag
-$wgCdnReboundPurgeDelay = 11; // should be safely more than $wgLBFactoryConf 
'max lag'
diff --git a/wmf-config/squid.php b/wmf-config/squid.php
new file mode 12
index 000..f4cb21f
--- /dev/null
+++ b/wmf-config/squid.php
@@ -0,0 +1 @@
+reverse-proxy.php
\ No newline at end of file

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

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

[MediaWiki-commits] [Gerrit] mediawiki...GettingStarted[master]: Use standard close icon

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

Change subject: Use standard close icon
..


Use standard close icon

Making use of standard close icon and add `opacity` transition
for slight user feedback on states.

Bug: T50067
Change-Id: Ief0dc70d7a59ec1b21e0bcf6fea022c4f4394199
---
M resources/ext.gettingstarted.return.less
A resources/images/close.png
A resources/images/close.svg
D resources/images/x.png
D resources/images/x.svg
M resources/lightbulb/lightbulb.postEdit.less
6 files changed, 32 insertions(+), 13 deletions(-)

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



diff --git a/resources/ext.gettingstarted.return.less 
b/resources/ext.gettingstarted.return.less
index f77ce1c..3e6f08f 100644
--- a/resources/ext.gettingstarted.return.less
+++ b/resources/ext.gettingstarted.return.less
@@ -93,11 +93,22 @@
 }
 
 .mw-gettingstarted-cta-close {
+   .background-image-svg( 'images/close.svg', 'images/close.png' );
float: right;
-   width: 13px;
-   height: 13px;
+   width: 20px;
+   height: 20px;
+   margin-top: 4px;
margin-left: 20px; /* Prevents text from getting close */
-   .background-image-svg( 'images/x.svg', 'images/x.png' );
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: #fff`, 
closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
 }
 
 .mw-gettingstarted-cta-heading {
diff --git a/resources/images/close.png b/resources/images/close.png
new file mode 100644
index 000..80dde95
--- /dev/null
+++ b/resources/images/close.png
Binary files differ
diff --git a/resources/images/close.svg b/resources/images/close.svg
new file mode 100644
index 000..44df45b
--- /dev/null
+++ b/resources/images/close.svg
@@ -0,0 +1,5 @@
+
+http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 
20">
+   
+   
+
\ No newline at end of file
diff --git a/resources/images/x.png b/resources/images/x.png
deleted file mode 100644
index fd361f8..000
--- a/resources/images/x.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/x.svg b/resources/images/x.svg
deleted file mode 100644
index 938fd51..000
--- a/resources/images/x.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-viewBox="0 0 96 96" enable-background="new 0 0 96 96" 
xml:space="preserve">
-
-
diff --git a/resources/lightbulb/lightbulb.postEdit.less 
b/resources/lightbulb/lightbulb.postEdit.less
index 0180021..26b25e8 100644
--- a/resources/lightbulb/lightbulb.postEdit.less
+++ b/resources/lightbulb/lightbulb.postEdit.less
@@ -50,12 +50,22 @@
}
 
.mw-gettingstarted-lightbulb-notification-hide {
+   .background-image-svg( '../images/close.svg', 
'../images/close.png' );
position: absolute;
-   width: 13px;
-   height: 13px;
-   .background-image-svg( '../images/x.svg', '../images/x.png' );
+   width: 20px;
+   height: 20px;
top: 19px;
right: 19px;
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: 
#fff`, closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
}
 
.mw-gettingstarted-lightbulb-notification-body {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief0dc70d7a59ec1b21e0bcf6fea022c4f4394199
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Swalling 
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...GuidedTour[master]: Use standard close icon

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

Change subject: Use standard close icon
..


Use standard close icon

Making use of standard close icon and add `opacity` transition
for slight user feedback on states.

Bug: T50067
Bug: T178111
Change-Id: I32f4c96c6b46d4842563b9094a602942ec4990c6
---
M modules/ext.guidedTour.less
A modules/images/close.png
A modules/images/close.svg
D modules/images/ext.guidedTour.x.png
D modules/images/ext.guidedTour.x.svg
5 files changed, 21 insertions(+), 11 deletions(-)

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



diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index cf73eff..7c80cc5 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -54,7 +54,7 @@
 
h1 {
float: left;
-   width: 95%;
+   width: 92%;
font-size: 1.5em;
font-weight: bold;
padding: 0;
@@ -72,15 +72,24 @@
 
 .guider_close {
float: right;
-   padding: 0;
 
.x_button {
-   cursor: pointer;
-   display: block;
-   height: 13px;
-   width: 13px;
+   .background-image-svg( 'images/close.svg', 'images/close.png' );
background-repeat: no-repeat;
-   .background-image-svg( 'images/ext.guidedTour.x.svg', 
'images/ext.guidedTour.x.png' );
+   display: block;
+   height: 20px;
+   width: 20px;
+   cursor: pointer;
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: 
#fff`, closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
}
 }
 
diff --git a/modules/images/close.png b/modules/images/close.png
new file mode 100644
index 000..80dde95
--- /dev/null
+++ b/modules/images/close.png
Binary files differ
diff --git a/modules/images/close.svg b/modules/images/close.svg
new file mode 100644
index 000..44df45b
--- /dev/null
+++ b/modules/images/close.svg
@@ -0,0 +1,5 @@
+
+http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 
20">
+   
+   
+
\ No newline at end of file
diff --git a/modules/images/ext.guidedTour.x.png 
b/modules/images/ext.guidedTour.x.png
deleted file mode 100644
index fd361f8..000
--- a/modules/images/ext.guidedTour.x.png
+++ /dev/null
Binary files differ
diff --git a/modules/images/ext.guidedTour.x.svg 
b/modules/images/ext.guidedTour.x.svg
deleted file mode 100644
index 80be9a3..000
--- a/modules/images/ext.guidedTour.x.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
-http://www.w3.org/2000/svg; width="96" height="96" viewBox="0 0 96 
96">
-   
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32f4c96c6b46d4842563b9094a602942ec4990c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Swalling 
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]: Fix: Pastes text on search bar correctly

2017-10-13 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384192 )

Change subject: Fix: Pastes text on search bar correctly
..

Fix: Pastes text on search bar correctly

Simply adds !isSearching() on onActionModeStarted to sovle this issue.

Bug: T177904
Change-Id: I8bab94ff404947870b774e7f982af7612030b28e
---
M app/src/main/java/org/wikipedia/page/PageActivity.java
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index ad6fa6b..8a0427a 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -808,7 +808,7 @@
 @Override
 public void onActionModeStarted(ActionMode mode) {
 super.onActionModeStarted(mode);
-if (!isCabOpen() && mode.getTag() == null) {
+if (!isSearching() && !isCabOpen() && mode.getTag() == null) {
 Menu menu = mode.getMenu();
 menu.clear();
 mode.getMenuInflater().inflate(R.menu.menu_text_select, menu);

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...LoginNotify[master]: Remove support for per-group preference defaults

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

Change subject: Remove support for per-group preference defaults
..


Remove support for per-group preference defaults

Not used and introduces serious compexity, likely causing
the bug with users receiving notifications they've opted out of.

Bug: T174220
Change-Id: I888c6009fffad17121765678387022ed7d454cb0
---
M extension.json
M includes/Hooks.php
A maintenance/migratePreferences.php
3 files changed, 130 insertions(+), 120 deletions(-)

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



diff --git a/extension.json b/extension.json
index 90920e8..580334d 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"
]
@@ -72,8 +66,6 @@
"LoginNotifyCheckKnownIPs": true,
"@docLoginNotifyEnableOnSuccess": "Whether to trigger a 
notification after successful logins from unknown IPs.",
"LoginNotifyEnableOnSuccess": true,
-   "@docLoginNotifyEnableForPriv": "Set different default 
notification preferences for different user groups. For user groups that have 
any of the user rights listed in this array, the preferences specified in 
Hooks:getOverriddenOptions() are on by default.",
-   "LoginNotifyEnableForPriv": [ "editinterface", "userrights" ],
"@docLoginNotifySecretKey": "Override this to use a different 
secret than $wgSecretKey",
"LoginNotifySecretKey": null,
"@docLoginNotifyCookieExpire": "Expiry in seconds. Default is 
180 days",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 7fe5b72..88fb06e 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -15,10 +15,6 @@
 use User;
 
 class Hooks {
-
-   const OPTIONS_FAKE_TRUTH = 2;
-   const OPTIONS_FAKE_FALSE = 'fake-false';
-
/**
 * Add LoginNotify events to Echo
 *
@@ -198,113 +194,5 @@
$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();
-   

[MediaWiki-commits] [Gerrit] mediawiki...GuidedTour[master]: Use standard close icon

2017-10-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384191 )

Change subject: Use standard close icon
..

Use standard close icon

Making use of standard close icon and add `opacity` transition
for slight user feedback on states.

Bug: T50067
Bug: T178111
Change-Id: I32f4c96c6b46d4842563b9094a602942ec4990c6
---
M modules/ext.guidedTour.less
A modules/images/close.png
A modules/images/close.svg
D modules/images/ext.guidedTour.x.png
D modules/images/ext.guidedTour.x.svg
5 files changed, 21 insertions(+), 11 deletions(-)


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

diff --git a/modules/ext.guidedTour.less b/modules/ext.guidedTour.less
index cf73eff..7c80cc5 100644
--- a/modules/ext.guidedTour.less
+++ b/modules/ext.guidedTour.less
@@ -54,7 +54,7 @@
 
h1 {
float: left;
-   width: 95%;
+   width: 92%;
font-size: 1.5em;
font-weight: bold;
padding: 0;
@@ -72,15 +72,24 @@
 
 .guider_close {
float: right;
-   padding: 0;
 
.x_button {
-   cursor: pointer;
-   display: block;
-   height: 13px;
-   width: 13px;
+   .background-image-svg( 'images/close.svg', 'images/close.png' );
background-repeat: no-repeat;
-   .background-image-svg( 'images/ext.guidedTour.x.svg', 
'images/ext.guidedTour.x.png' );
+   display: block;
+   height: 20px;
+   width: 20px;
+   cursor: pointer;
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: 
#fff`, closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
}
 }
 
diff --git a/modules/images/close.png b/modules/images/close.png
new file mode 100644
index 000..80dde95
--- /dev/null
+++ b/modules/images/close.png
Binary files differ
diff --git a/modules/images/close.svg b/modules/images/close.svg
new file mode 100644
index 000..44df45b
--- /dev/null
+++ b/modules/images/close.svg
@@ -0,0 +1,5 @@
+
+http://www.w3.org/2000/svg; width="20" height="20" viewBox="0 0 20 
20">
+   
+   
+
\ No newline at end of file
diff --git a/modules/images/ext.guidedTour.x.png 
b/modules/images/ext.guidedTour.x.png
deleted file mode 100644
index fd361f8..000
--- a/modules/images/ext.guidedTour.x.png
+++ /dev/null
Binary files differ
diff --git a/modules/images/ext.guidedTour.x.svg 
b/modules/images/ext.guidedTour.x.svg
deleted file mode 100644
index 80be9a3..000
--- a/modules/images/ext.guidedTour.x.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-
-http://www.w3.org/2000/svg; width="96" height="96" viewBox="0 0 96 
96">
-   
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32f4c96c6b46d4842563b9094a602942ec4990c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GuidedTour
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] wikidata...rdf[master]: Update GUI

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

Change subject: Update GUI
..


Update GUI

Change-Id: Ia06570f70a761a684659b0a185d2b3e638ee315a
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/gui b/gui
index 3007a2a..b19a20f 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 3007a2aa07d25607186087fa92da3557b5563b74
+Subproject commit b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia06570f70a761a684659b0a185d2b3e638ee315a
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: [cirrus] Turn on recall A/B test on enwiki

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

Change subject: [cirrus] Turn on recall A/B test on enwiki
..


[cirrus] Turn on recall A/B test on enwiki

Test 2 variations of the retrieval query vs control.
- control : all terms must match
- rec_3t_80_66: 3+ terms with 80% of stems or 66% of plain
- rec_4t_80_66: 4+ terms with 80% of stems or 66% of plain

Bug: T177502
Change-Id: Ie64dd8e5b4d14ac6828c7016b2147d2f2a7b88ea
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 7 insertions(+), 8 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 25d8986..07d4b45 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -113,12 +113,11 @@
function initialize( session ) {
 
var sessionId = session.get( 'sessionId' ),
-   // LTR sub test
-   // Test is running on enwiki only, which 
reports ~14k sessions per day
-   // at the 1:2000 sampling. Sampling increased 
to 1:500, so 56k sessions
-   // per day.  Those 56k sessions will be split 
15k to dashboards, and
-   // 7k per bucket, for ~50k per bucket in a week.
-   validBuckets = [],
+   // Recall test, relax the default AND of the 
retrieval query filter
+   // rec_3t_66_80 affects only 3+ terms queries
+   // rec_4t_66_80 affects only 4+ terms queries
+   // Sampling at ~18k sessions per bucket
+   validBuckets = [ 'control', 'rec_3t_80_66', 
'rec_4t_80_66' ],
sampleSize = ( function () {
var dbName = mw.config.get( 'wgDBname' 
),
// Provides a place to handle 
wiki-specific sampling,
@@ -140,8 +139,8 @@
subTest: null
},
enwiki: {
-   test: 2000,
-   subTest: null
+   test: 500,
+   subTest: 0.75
},
enwiktionary: {
test: 40,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie64dd8e5b4d14ac6828c7016b2147d2f2a7b88ea
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: DCausse 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikidata...rdf[master]: Update GUI

2017-10-13 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384190 )

Change subject: Update GUI
..

Update GUI

Change-Id: Ia06570f70a761a684659b0a185d2b3e638ee315a
---
M gui
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/gui b/gui
index 3007a2a..b19a20f 16
--- a/gui
+++ b/gui
@@ -1 +1 @@
-Subproject commit 3007a2aa07d25607186087fa92da3557b5563b74
+Subproject commit b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design: Normalize/correct status bar color in all activities.

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

Change subject: Design: Normalize/correct status bar color in all activities.
..


Design: Normalize/correct status bar color in all activities.

Change-Id: I7333456e6edd2740cd1f54a8482abfc658303d71
---
M app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/language/LangLinksActivity.java
M app/src/main/java/org/wikipedia/main/MainActivity.java
M app/src/main/java/org/wikipedia/onboarding/InitialOnboardingActivity.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
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
12 files changed, 31 insertions(+), 22 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
index 6068706..d9d294d 100644
--- 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
+++ 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
@@ -9,7 +9,6 @@
 
 import org.wikipedia.R;
 import org.wikipedia.util.DimenUtil;
-import org.wikipedia.util.ResourceUtil;
 
 /**
  * Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
@@ -24,7 +23,6 @@
 getSupportActionBar().setTitle("");
 getSupportActionBar().setDisplayHomeAsUpEnabled(false);
 }
-setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.main_status_bar_color));
 }
 
 public void setWordmarkVisible(boolean visible) {
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
index df31ad6..4701125 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
@@ -2,15 +2,12 @@
 
 import android.content.Context;
 import android.content.Intent;
-import android.os.Bundle;
 import android.support.annotation.NonNull;
 
-import org.wikipedia.R;
 import org.wikipedia.activity.SingleFragmentActivity;
 import org.wikipedia.json.GsonMarshaller;
 import org.wikipedia.json.GsonUnmarshaller;
 import org.wikipedia.page.PageTitle;
-import org.wikipedia.util.ResourceUtil;
 
 import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard;
 
@@ -22,12 +19,6 @@
 public static Intent newIntent(@NonNull Context context, @NonNull 
PageTitle title) {
 return new Intent(context, DescriptionEditActivity.class)
 .putExtra(EXTRA_TITLE, GsonMarshaller.marshal(title));
-}
-
-@Override
-public void onCreate(Bundle savedInstanceState) {
-super.onCreate(savedInstanceState);
-setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.main_status_bar_color));
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java 
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index b300d54..81410cb 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -127,6 +127,7 @@
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_edit_section);
+setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.page_status_bar_color));
 
 if (!getIntent().getAction().equals(ACTION_EDIT_SECTION)) {
 throw new RuntimeException("Much wrong action. Such exception. 
Wow");
diff --git a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java 
b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
index 7dd8115..f33490f 100644
--- a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
+++ b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
@@ -25,6 +25,7 @@
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.page.PageActivity;
 import org.wikipedia.page.PageTitle;
+import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.views.ViewAnimations;
 import org.wikipedia.views.WikiErrorView;
 
@@ -66,6 +67,7 @@
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 app = WikipediaApp.getInstance();
+setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: RCFilters: Fix RC jumpiness due to expanded/collapsed commun...

2017-10-13 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384189 )

Change subject: RCFilters: Fix RC jumpiness due to expanded/collapsed community 
links
..

RCFilters: Fix RC jumpiness due to expanded/collapsed community links

Bug: T177117
Change-Id: Ie0761613ff8c731226e26a78afa500aef9619d01
---
M includes/specials/SpecialRecentchanges.php
M resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
M 
resources/src/mediawiki.rcfilters/styles/mw.rcfilters.ui.RcTopSectionWidget.less
M resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.RcTopSectionWidget.js
4 files changed, 32 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/384189/1

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 6ce1968..f8005e6 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -621,23 +621,26 @@
// Check whether the widget is already 
collapsed or expanded
$collapsedState = 
$this->getRequest()->getCookie( 'rcfilters-toplinks-collapsed-state' );
// Note that an empty/unset cookie means 
collapsed, so check for !== 'expanded'
-   $collapsedClass = $collapsedState !== 
'expanded' ? 'mw-rcfilters-toplinks-collapsed' : '';
+   $topLinksAttributes[ 'class' ] .= 
$collapsedState !== 'expanded' ? ' mw-recentchanges-toplinks-collapsed' : '';
 
-   $contentTitle = Html::rawElement( 'div',
-   [ 'class' => 
'mw-recentchanges-toplinks-title ' . $collapsedClass ],
-   $this->msg( 
'rcfilters-other-review-tools' )->parse()
-   );
+   $this->getOutput()->enableOOUI();
+   $contentTitle = new OOUI\ButtonWidget( [
+   'classes' => [ 
'mw-recentchanges-toplinks-title' ],
+   'label' => new OOUI\HtmlSnippet( 
$this->msg( 'rcfilters-other-review-tools' )->parse() ),
+   'framed' => false,
+   'indicator' => $collapsedState !== 
'expanded' ? 'down' : 'up',
+   'flags' => [ 'progressive' ],
+   ] );
+
$contentWrapper = Html::rawElement( 'div',
array_merge(
-   [
-   'class' => 
'mw-recentchanges-toplinks-content mw-collapsible-content ' .
-   $collapsedClass
-   ],
+   [ 'class' => 
'mw-recentchanges-toplinks-content mw-collapsible-content' ],
$langAttributes
),
$content
);
$content = $contentTitle . $contentWrapper;
+
} else {
// Language direction should be on the top div 
only
// if the title is not there. If it is there, 
it's
diff --git a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less 
b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
index ba7a70e..7410f98 100644
--- a/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
+++ b/resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
@@ -21,14 +21,24 @@
min-height: @rcfilters-wl-head-min-height;
}
 
-   body:not( .mw-rcfilters-ui-initialized ) {
-   
.mw-recentchanges-toplinks-content.mw-rcfilters-toplinks-collapsed {
-   display: none;
-   }
+   .mw-recentchanges-toplinks {
+   margin-bottom: 0.5em;
 
-   
.mw-recentchanges-toplinks-title.mw-rcfilters-toplinks-collapsed {
-   // Hide, but keep the placement so we don't jump
-   visibility: hidden;
+   &:not( .mw-recentchanges-toplinks-collapsed ) {
+   // Same as the legend
+   border: 1px solid #ddd;
+   }
+   }
+
+   body:not( .mw-rcfilters-ui-initialized ) {
+   .mw-recentchanges-toplinks.mw-recentchanges-toplinks-collapsed {
+   // Similar to the watchlist-details hack, we are going 
to make this float left
+   // while loading to prevent jumpiness in the min-height 
calculation
+

[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: DB_SLAVE --> DB_REPLICA

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384187 )

Change subject: DB_SLAVE --> DB_REPLICA
..

DB_SLAVE --> DB_REPLICA

Change-Id: Idf037c0f43d7abf57c021e31daeaa7f0cba84fcc
---
M handler/HandlerDb.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Configure 
refs/changes/87/384187/1

diff --git a/handler/HandlerDb.php b/handler/HandlerDb.php
index f8b7ca0..002e9ca 100644
--- a/handler/HandlerDb.php
+++ b/handler/HandlerDb.php
@@ -26,7 +26,7 @@
 * @return Database object
 */
public function getSlaveDB() {
-   return wfGetDB( DB_SLAVE, 'config', $this->mDb );
+   return wfGetDB( DB_REPLICA, 'config', $this->mDb );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf037c0f43d7abf57c021e31daeaa7f0cba84fcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Configure
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...Configure[master]: wfRunHooks() --> Hooks::run()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384188 )

Change subject: wfRunHooks() --> Hooks::run()
..

wfRunHooks() --> Hooks::run()

Change-Id: I54115ed6902f3ba577bd0ce75a985531d4bd448b
---
M handler/HandlerDb.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/handler/HandlerDb.php b/handler/HandlerDb.php
index 002e9ca..f0369ce 100644
--- a/handler/HandlerDb.php
+++ b/handler/HandlerDb.php
@@ -253,7 +253,7 @@
);
}
 
-   wfRunHooks( 'ConfigureDBHandlerSaveSettingsForWiki', array( 
$settings ) );
+   Hooks::run( 'ConfigureDBHandlerSaveSettingsForWiki', array( 
$settings ) );
 
$dbw->insert( 'config_setting', $insert, __METHOD__ );
$dbw->commit( __METHOD__ );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54115ed6902f3ba577bd0ce75a985531d4bd448b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Configure
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


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

2017-10-13 Thread Smalyshev (Code Review)
Smalyshev has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384186 )

Change subject: Merging from b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0:
..


Merging from b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0:

Merge "Change SPARQL endpoint URL to https://query.wikidata.org/sparql;

Change-Id: I8cfcb88ef187c519ba75a7e5081dc8cc43aa1cb1
---
R css/embed.style.min.db90adc06531d04a03a2.css
R css/style.min.0c3dbdb83a42ad6eba55.css
M embed.html
M i18n/el.json
M i18n/en.json
M i18n/qqq.json
M index.html
A js/embed.wdqs.min.82935cfb31f24280a7ac.js
D js/embed.wdqs.min.fb28c32d66b8acd05676.js
D js/vendor.min.36486d42309ebb56c3be.js
A js/vendor.min.476d4fc06106baf3acce.js
D js/wdqs.min.68b2b024ef7b75f881cb.js
A js/wdqs.min.87d72c67e7e4a0a15316.js
13 files changed, 11 insertions(+), 11 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8cfcb88ef187c519ba75a7e5081dc8cc43aa1cb1
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui-deploy
Gerrit-Branch: production
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Smalyshev 

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


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

2017-10-13 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384186 )

Change subject: Merging from b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0:
..

Merging from b19a20fb0058ddfd280a95fc1f8820d5a66cf0a0:

Merge "Change SPARQL endpoint URL to https://query.wikidata.org/sparql;

Change-Id: I8cfcb88ef187c519ba75a7e5081dc8cc43aa1cb1
---
R css/embed.style.min.db90adc06531d04a03a2.css
R css/style.min.0c3dbdb83a42ad6eba55.css
M embed.html
M i18n/el.json
M i18n/en.json
M i18n/qqq.json
M index.html
A js/embed.wdqs.min.82935cfb31f24280a7ac.js
D js/embed.wdqs.min.fb28c32d66b8acd05676.js
D js/vendor.min.36486d42309ebb56c3be.js
A js/vendor.min.476d4fc06106baf3acce.js
D js/wdqs.min.68b2b024ef7b75f881cb.js
A js/wdqs.min.87d72c67e7e4a0a15316.js
13 files changed, 11 insertions(+), 11 deletions(-)


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


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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Revert "WLFilters: Temporarily stop respecting hideNonDamagi...

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

Change subject: Revert "WLFilters: Temporarily stop respecting hideNonDamaging 
on WL with beta feature"
..


Revert "WLFilters: Temporarily stop respecting hideNonDamaging on WL with beta 
feature"

No longer needed.

This reverts commit 0d441a6ee913398a04589b46923e7e6e14d4e4f6.

Change-Id: I8d57f056c931e2c35cb225284d085fdf658d064d
---
M includes/Hooks.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/includes/Hooks.php b/includes/Hooks.php
index b914f05..ee11a4a 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -247,8 +247,7 @@
);
}
 
-   // temporarily disabled on Watchlist
-   if ( $damagingDefault && ( $clsp instanceof 
SpecialRecentChanges ) ) {
+   if ( $damagingDefault ) {
$newDamagingGroup->setDefault( 
self::getDamagingLevelPreference( $clsp->getUser() ) );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d57f056c931e2c35cb225284d085fdf658d064d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Revert "WLFilters: Temporarily stop respecting hideNonDamagi...

2017-10-13 Thread Catrope (Code Review)
Hello Sbisson, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "WLFilters: Temporarily stop respecting hideNonDamaging 
on WL with beta feature"
..

Revert "WLFilters: Temporarily stop respecting hideNonDamaging on WL with beta 
feature"

No longer needed.

This reverts commit 0d441a6ee913398a04589b46923e7e6e14d4e4f6.

Change-Id: I8d57f056c931e2c35cb225284d085fdf658d064d
---
M includes/Hooks.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/includes/Hooks.php b/includes/Hooks.php
index b914f05..ee11a4a 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -247,8 +247,7 @@
);
}
 
-   // temporarily disabled on Watchlist
-   if ( $damagingDefault && ( $clsp instanceof 
SpecialRecentChanges ) ) {
+   if ( $damagingDefault ) {
$newDamagingGroup->setDefault( 
self::getDamagingLevelPreference( $clsp->getUser() ) );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d57f056c931e2c35cb225284d085fdf658d064d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: WikimediaUI theme: Ensure hover feedback on TextInputWidget ...

2017-10-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384184 )

Change subject: WikimediaUI theme: Ensure hover feedback on TextInputWidget & 
descendors
..

WikimediaUI theme: Ensure hover feedback on TextInputWidget & descendors

Ensuring user receives visual `:hover` feedback while on
TextInputWidget overlying elements, as example SearchInputWidget's
clear button.
Also removing special casing of `readonly` TextInputWidget `border-color`
changes. We provide same `:focus` and there is no clear user benefit.

Bug: T178199
Change-Id: Ia732b72ed63928c5744455312769e6cd5019affe
---
M src/themes/wikimediaui/common.less
M src/themes/wikimediaui/widgets.less
2 files changed, 8 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/84/384184/1

diff --git a/src/themes/wikimediaui/common.less 
b/src/themes/wikimediaui/common.less
index 62c4f0b..2cd8ad1 100644
--- a/src/themes/wikimediaui/common.less
+++ b/src/themes/wikimediaui/common.less
@@ -104,7 +104,6 @@
 @border-color-focus-inset: @color-base--inverted;
 @border-color-erroneous: @color-erroneous;
 @border-color-base--disabled: #c8ccd1;
-@border-color-base--read-only: #c8ccd1;
 @border-color-input--hover: @border-color-base--active;
 @border-color-dialog-bar: #c8ccd1;
 
diff --git a/src/themes/wikimediaui/widgets.less 
b/src/themes/wikimediaui/widgets.less
index 3b82e9a..35761e5 100644
--- a/src/themes/wikimediaui/widgets.less
+++ b/src/themes/wikimediaui/widgets.less
@@ -1809,9 +1809,8 @@
box-shadow @transition-ease-out-sine-medium
);
 
-   &:hover {
-   border-color: @border-color-input--hover;
-   }
+   .mw-placeholder();
+
&:focus {
outline: 0;
border-color: @border-color-base--focus;
@@ -1820,16 +1819,14 @@
 
&[readonly] {
background-color: 
@background-color-base--read-only;
-
-   &:hover {
-   border-color: 
@border-color-base--read-only;
-   }
-   &:focus {
-   border-color: @border-color-base--focus;
-   }
}
+   }
 
-   .mw-placeholder();
+   &:hover {
+   input,
+   textarea {
+   border-color: @border-color-input--hover;
+   }
}
 
// HACK: Exclude IE/Edge (and Saf<6) from this selector as it

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia732b72ed63928c5744455312769e6cd5019affe
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...ORES[master]: Draftquality model work only on main namespace

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

Change subject: Draftquality model work only on main namespace
..


Draftquality model work only on main namespace

Otherwise it'll be a mess, it's configurable to add other ns.

Bug: T176183
Change-Id: Ia6edec439d9cf037888ed71257a86df964482fb8
---
M extension.json
M includes/Hooks.php
2 files changed, 6 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 72b4cf9..d6b1f1e 100644
--- a/extension.json
+++ b/extension.json
@@ -183,6 +183,7 @@
"_merge_strategy": "array_plus_2d"
},
"OresEnabledNamespaces": {},
+   "OresDraftQualityNS": { "0": true },
"OresWikiId": null,
"@OresRevisionsPerBatch": "Number of revisions to fetch scores 
for from the ORES API per request when the MediaWiki API is asked to score 
revisions which are not cached. Set to 0 to disable fetching (scores will still 
be fetched for new edits).",
"OresRevisionsPerBatch": 30,
diff --git a/includes/Hooks.php b/includes/Hooks.php
index dd14548..96f7223 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -58,7 +58,7 @@
 * @param RecentChange $rc
 */
public static function onRecentChange_save( RecentChange $rc ) {
-   global $wgOresExcludeBots, $wgOresEnabledNamespaces, 
$wgOresModels;
+   global $wgOresExcludeBots, $wgOresEnabledNamespaces, 
$wgOresModels, $wgOresDraftQualityNS;
if ( $rc->getAttribute( 'rc_bot' ) && $wgOresExcludeBots ) {
return;
}
@@ -75,8 +75,10 @@
$rc_type = $rc->getAttribute( 'rc_type' );
$models = array_keys( array_filter( $wgOresModels ) );
if ( $rc_type === RC_EDIT || $rc_type === RC_NEW ) {
-   // Do not store draftquality data when it's not a new 
page
-   if ( $rc_type !== RC_NEW ) {
+   // Do not store draftquality data when it's not a new 
page in article or draft ns
+   if ( $rc_type !== RC_NEW ||
+   !( isset( $wgOresDraftQualityNS[$ns] ) && 
$wgOresDraftQualityNS[$ns] )
+   ) {
$models = array_diff( $models, [ 'draftquality' 
] );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6edec439d9cf037888ed71257a86df964482fb8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: base/icinga: if on labs, don't page for mysql procs

2017-10-13 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384183 )

Change subject: base/icinga: if on labs, don't page for mysql procs
..

base/icinga: if on labs, don't page for mysql procs

If on labs/labtest hosts, set "is_critical" to false
for mariabd::monitor_process

which means nrpe::monitor_service will be used with "critical => false"

which means monitoring::service will be used with "critical => false"

which means $do_paging will be set to default

which means $real_contact_groups will _not_ have the 'sms' contact group

which means no SMS will be sent to anyone.

Bug: T178008
Change-Id: Ia490b4b25285cef912bf84edf9a38a24104ae713
---
M hieradata/regex.yaml
M modules/profile/manifests/base.pp
2 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/384183/1

diff --git a/hieradata/regex.yaml b/hieradata/regex.yaml
index 8f22550..0b72b8a 100644
--- a/hieradata/regex.yaml
+++ b/hieradata/regex.yaml
@@ -115,15 +115,14 @@
 labs:
   __regex: !ruby/regexp 
/^lab((net|nodepool|mon)100[1-9]\.eqiad\.wmnet|(services|control)100[1-9]\.wikimedia\.org)$/
   cluster: labs
-
+  mariadb::monitor_process::is_critical: false
 labtestvirt:
   __regex: !ruby/regexp /^labtestvirt20[0-9][0-9]\.codfw\.wmnet$/
   cluster: labtestvirt
-
 labtest:
   __regex: !ruby/regexp 
/^labtest(net200[1-9]\.codfw\.wmnet|(services|control)100[1-9]\.wikimedia\.org)$/
   cluster: labtest
-
+  mariadb::monitor_process::is_critical: false
 swift_be_codfw_dell:
   __regex: !ruby/regexp /^ms-be201[3-5]\.codfw\.wmnet$/
   swift_storage_drives: [
diff --git a/modules/profile/manifests/base.pp 
b/modules/profile/manifests/base.pp
index 997cadc..b15e403 100644
--- a/modules/profile/manifests/base.pp
+++ b/modules/profile/manifests/base.pp
@@ -8,6 +8,7 @@
 $remote_syslog = hiera('profile::base::remote_syslog', 
['syslog.eqiad.wmnet', 'syslog.codfw.wmnet']),
 $remote_syslog_tls = hiera('profile::base::remote_syslog_tls', []),
 $notifications_enabled = hiera('profile::base::notifications_enabled', 
'1'),
+$paging_enabled = hiera('profile::base::paging_enabled', '1'),
 $core_dump_pattern = hiera('profile::base::core_dump_pattern', 
'/var/tmp/core/core.%h.%e.%p.%t'),
 $ssh_server_settings = hiera('profile::base::ssh_server_settings', {}),
 $nrpe_allowed_hosts = hiera('profile::base::nrpe_allowed_hosts', 
'127.0.0.1,208.80.154.14,208.80.153.74,208.80.155.119'),
@@ -105,6 +106,7 @@
 raid_check_interval  => $check_raid_interval,
 raid_retry_interval  => $check_raid_retry,
 notifications_enabled=> $notifications_enabled,
+paging_enabled   => $paging_enabled,
 }
 
 if os_version('ubuntu == trusty') {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Choose more magical magic

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

Change subject: Choose more magical magic
..


Choose more magical magic

Empty array was returned in the legitimate case where nothing needs to be
fetched from the thresholds API, so I've changed the magic to a number, which
can never be returned by normal code.

Bug: T175053
Change-Id: If8064ddd4b229c090c3747698b83106aee17845b
---
M includes/Stats.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/Stats.php b/includes/Stats.php
index ab05320..8409ff3 100644
--- a/includes/Stats.php
+++ b/includes/Stats.php
@@ -95,13 +95,13 @@
return 
$this->fetchStatsFromApi( $model );
} catch ( \RuntimeException $ex ) {
// Magic to trigger an 
exception.
-   return [];
+   return -1;
}
}
);
// @deprecated Magic exception to allow caching of 
failure and
// falling back to StatsV1.
-   if ( count( $result ) === 0 ) {
+   if ( $result === -1 ) {
throw new \RuntimeException( 'Cached failure.' 
);
}
return $result;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If8064ddd4b229c090c3747698b83106aee17845b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: deferred: Introduce TransactionRoundDefiningUpdate

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

Change subject: deferred: Introduce TransactionRoundDefiningUpdate
..


deferred: Introduce TransactionRoundDefiningUpdate

This allows scheduling of updates that need to start their own
transaction round. Specifically for cases where the ability to
commit early is not enough (which is already possible via LBFactory
getEmptyTransactionTicket and commitAndWaitForReplication).

Change-Id: I0910587b61c8ddf825f91e92c2f93582cc7ebd80
---
M autoload.php
M includes/deferred/DeferredUpdates.php
A includes/deferred/TransactionRoundDefiningUpdate.php
M tests/phpunit/includes/deferred/DeferredUpdatesTest.php
A tests/phpunit/includes/deferred/TransactionRoundDefiningUpdateTest.php
5 files changed, 95 insertions(+), 0 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 0a2ecf0..ede520f 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1498,6 +1498,7 @@
'TrackBlobs' => __DIR__ . '/maintenance/storage/trackBlobs.php',
'TrackingCategories' => __DIR__ . '/includes/TrackingCategories.php',
'TraditionalImageGallery' => __DIR__ . 
'/includes/gallery/TraditionalImageGallery.php',
+   'TransactionRoundDefiningUpdate' => __DIR__ . 
'/includes/deferred/TransactionRoundDefiningUpdate.php',
'TransformParameterError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformTooBigImageAreaError' => __DIR__ . 
'/includes/media/MediaTransformOutput.php',
'TransformationalImageHandler' => __DIR__ . 
'/includes/media/TransformationalImageHandler.php',
diff --git a/includes/deferred/DeferredUpdates.php 
b/includes/deferred/DeferredUpdates.php
index e8e250b..3c4833c 100644
--- a/includes/deferred/DeferredUpdates.php
+++ b/includes/deferred/DeferredUpdates.php
@@ -250,6 +250,8 @@
// Run only the job enqueue logic to complete 
the update later
$spec = $update->getAsJobSpecification();
JobQueueGroup::singleton( $spec['wiki'] 
)->push( $spec['job'] );
+   } elseif ( $update instanceof 
TransactionRoundDefiningUpdate ) {
+   $update->doUpdate();
} else {
// Run the bulk of the update now
$fnameTrxOwner = get_class( $update ) . 
'::doUpdate';
diff --git a/includes/deferred/TransactionRoundDefiningUpdate.php 
b/includes/deferred/TransactionRoundDefiningUpdate.php
new file mode 100644
index 000..65baec5
--- /dev/null
+++ b/includes/deferred/TransactionRoundDefiningUpdate.php
@@ -0,0 +1,31 @@
+callback = $callback;
+   $this->fname = $fname;
+   }
+
+   public function doUpdate() {
+   call_user_func( $this->callback );
+   }
+
+   public function getOrigin() {
+   return $this->fname;
+   }
+}
diff --git a/tests/phpunit/includes/deferred/DeferredUpdatesTest.php 
b/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
index 999ad03..8332d2c 100644
--- a/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
+++ b/tests/phpunit/includes/deferred/DeferredUpdatesTest.php
@@ -1,5 +1,7 @@
 assertTrue( $x, "Outer POSTSEND update ran" );
$this->assertTrue( $y, "Nested PRESEND update ran" );
}
+
+   /**
+* @covers DeferredUpdates::runUpdate
+*/
+   public function testRunUpdateTransactionScope() {
+   $this->setMwGlobals( 'wgCommandLineMode', false );
+
+   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $this->assertFalse( $lbFactory->hasTransactionRound(), 'Initial 
state' );
+
+   $ran = 0;
+   DeferredUpdates::addCallableUpdate( function () use ( &$ran, 
$lbFactory ) {
+   $ran++;
+   $this->assertTrue( $lbFactory->hasTransactionRound(), 
'Has transaction' );
+   } );
+   DeferredUpdates::doUpdates();
+
+   $this->assertSame( 1, $ran, 'Update ran' );
+   $this->assertFalse( $lbFactory->hasTransactionRound(), 'Final 
state' );
+   }
+
+   /**
+* @covers DeferredUpdates::runUpdate
+* @covers TransactionRoundDefiningUpdate::getOrigin
+*/
+   public function testRunOuterScopeUpdate() {
+   $this->setMwGlobals( 'wgCommandLineMode', false );
+
+   $lbFactory = 
MediaWikiServices::getInstance()->getDBLoadBalancerFactory();
+   $this->assertFalse( $lbFactory->hasTransactionRound(), 'Initial 
state' );
+
+   $ran = 0;
+   DeferredUpdates::addUpdate( new TransactionRoundDefiningUpdate(
+   function () use ( &$ran, 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Change New translation input placeholder

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

Change subject: Change New translation input placeholder
..

Change New translation input placeholder

- Change placeholder message from "Search for source page" to
"Search for a page to translate", because New translation dialog
does not provide option to set target page title, therefore making
source page concept not very intuitive.

Bug: T111094
Change-Id: Ieb28e58e451f0394b0100b94c6eda76a145c9bcc
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/source/ext.cx.source.selector.js
4 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 1da09f5..402b8fb 100644
--- a/extension.json
+++ b/extension.json
@@ -362,6 +362,7 @@
"cx-sourceselector-dialog-button-cancel",

"cx-sourceselector-dialog-source-language-label",

"cx-sourceselector-dialog-target-language-label",
+   
"cx-sourceselector-embedded-source-page-placeholder",

"cx-sourceselector-dialog-source-title-placeholder",

"cx-sourceselector-dialog-target-title-placeholder",

"cx-sourceselector-dialog-error-page-and-title-exist",
diff --git a/i18n/en.json b/i18n/en.json
index 41d3cab..e9b2458 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -91,6 +91,7 @@
"cx-sourceselector-dialog-button-cancel": "Cancel",
"cx-sourceselector-dialog-source-language-label": "From:",
"cx-sourceselector-dialog-target-language-label": "To:",
+   "cx-sourceselector-embedded-source-page-placeholder": "Search for a 
page to translate",
"cx-sourceselector-dialog-source-title-placeholder": "Search for source 
page",
"cx-sourceselector-dialog-target-title-placeholder": "Translation 
title",
"cx-sourceselector-dialog-error-page-and-title-exist": "This title is 
already used in [$1 $2] for [$3 a different page]",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 550145d..9e84750 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -100,6 +100,7 @@
"cx-sourceselector-dialog-button-cancel": "Button label for translation 
selector. Clicking on it cancels new translation and hides dialog. Only appears 
when translation selector is presented as a dialog.\n{{Identical|Cancel}}",
"cx-sourceselector-dialog-source-language-label": "Label text for 
source language and title selector.\n{{Identical|From}}",
"cx-sourceselector-dialog-target-language-label": "Label text for 
target language and title selector.\n{{Identical|To}}",
+   "cx-sourceselector-embedded-source-page-placeholder": "Placeholder for 
the source page input field. Used on Content Translation page for new 
translation dialog and provides prompt to search for source page to start 
translation.",
"cx-sourceselector-dialog-source-title-placeholder": "Placeholder for 
the source title input. Provides prompt to search for source title.",
"cx-sourceselector-dialog-target-title-placeholder": "Placeholder for 
the target title input. Provides prompt to enter translation title (optional).",
"cx-sourceselector-dialog-error-page-and-title-exist": "An error 
message that indicates that there is page in the target wiki with the same 
title as the proposed source title and the target title is used 
elsewhere.\n\nParameters:\n* $1 - link to existing target page.\n* $2 - target 
language name.\n* $3 - link to article using proposed target title.",
diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index 7018a0c..7bd4eb1 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -1362,7 +1362,7 @@
siteMapper: this.siteMapper,
value: this.options.sourceTitle,
validateTitle: true,
-   placeholder: mw.msg( 
'cx-sourceselector-dialog-source-title-placeholder' ),
+   placeholder: mw.msg( 
'cx-sourceselector-embedded-source-page-placeholder' ),
showRedirectTargets: true,
$overlay: this.$searchResults,
$container: this.$searchResults

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb28e58e451f0394b0100b94c6eda76a145c9bcc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic 

___

[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Suppress wrapping around our ...

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

Change subject: Suppress wrapping  around our 
 tags
..


Suppress wrapping  around our  tags

This wrapping and the ability to disable it was introduced in MW 1.30.

Bug: T171389
Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
---
M SpecialCiteThisPage.php
M extension.json
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php
index 41455a6..d7f5adb 100644
--- a/SpecialCiteThisPage.php
+++ b/SpecialCiteThisPage.php
@@ -184,10 +184,14 @@
 * @return string
 */
public function citationTag( $text, $params, Parser $parser ) {
+   $parserOptions = $this->getParserOptions();
+   // This will be inserted into the output of another parser, so 
there will actually be a wrapper
+   $parserOptions->setWrapOutputClass( false );
+
$ret = $this->citationParser->parse(
$text,
$this->getPageTitle(),
-   $this->getParserOptions(),
+   $parserOptions,
/* $linestart = */ false
);
 
diff --git a/extension.json b/extension.json
index 3f9bbd3..0736a74 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,9 @@
"descriptionmsg": "citethispage-desc",
"license-name": "GPL-2.0+",
"type": "specialpage",
+   "requires": {
+   "MediaWiki": ">= 1.30.0"
+   },
"ExtensionMessagesFiles": {
"CiteThisPageAliases": "CiteThisPage.alias.php"
},

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Remove orphaned TitleBlacklistHooks::acceptNewUserName

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

Change subject: Remove orphaned TitleBlacklistHooks::acceptNewUserName
..


Remove orphaned TitleBlacklistHooks::acceptNewUserName

Change-Id: I1e181531307d98dcc061c10ec5371d9e2d78c8b9
---
M TitleBlacklist.hooks.php
1 file changed, 0 insertions(+), 24 deletions(-)

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



diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index f24ee94..0f29b33 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -129,30 +129,6 @@
}
 
/**
-* Check whether a user name is acceptable,
-* and set a message if unacceptable.
-*
-* Used by abortNewAccount and centralAuthAutoCreate.
-* May also be called externally to vet alternate account names.
-*
-* @param string $userName
-* @param User $permissionsUser
-* @param string &$err
-* @param bool $override
-* @param bool $log
-* @return bool Acceptable
-*/
-   public static function acceptNewUserName(
-   $userName, $permissionsUser, &$err, $override = true, $log = 
false
-   ) {
-   $sv = self::testUserName( $userName, $permissionsUser, 
$override, $log );
-   if ( !$sv->isGood() ) {
-   $err = Status::wrap( $sv )->getMessage()->parse();
-   }
-   return $sv->isGood();
-   }
-
-   /**
 * Check whether a user name is acceptable for account creation or 
autocreation, and explain
 * why not if that's the case.
 *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1e181531307d98dcc061c10ec5371d9e2d78c8b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Update search relevance survey based on feedback from last test

2017-10-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384178 )

Change subject: Update search relevance survey based on feedback from last test
..

Update search relevance survey based on feedback from last test

* Increase time survey is displayed from 30s to 60s
* Only show question-c, the best performing from previous tests
* Re-order survey answers to: yes, i don't know, no
* Add a link for 'why are we asking this?'
* Reset notification auto-hide timer when user clicks an external
 link (privacy policy, why are we asking) and extend the timeout
 to four minutes. If I7d8ea856 is merged the time extension
 shouldn't be necessary as the timeout would be based on page
 visible time instead of wall clock time.

TODO:
* Need a real link target for the 'why' page.

Bug: T176428
Change-Id: I32535022ef81f304fe26077a93896a48323904db
---
M .jshintignore
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ext.wikimediaEvents.humanSearchRelevance.css
M modules/ext.wikimediaEvents.humanSearchRelevance.js
6 files changed, 145 insertions(+), 101 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
index 3c3629e..022b988 100644
--- a/.jshintignore
+++ b/.jshintignore
@@ -1 +1,2 @@
 node_modules
+vendor
diff --git a/extension.json b/extension.json
index 1463295..492032c 100644
--- a/extension.json
+++ b/extension.json
@@ -158,7 +158,7 @@
"schema.HumanSearchRelevance": {
"class": "ResourceLoaderSchemaModule",
"schema": "HumanSearchRelevance",
-   "revision": 17073843
+   "revision": 17320055
},
"ext.wikimediaEvents": {
"scripts": [
@@ -172,7 +172,8 @@
],
"skinScripts": {
"default": [
-   
"ext.wikimediaEvents.searchSatisfaction.js"
+   
"ext.wikimediaEvents.searchSatisfaction.js",
+   
"ext.wikimediaEvents.humanSearchRelevance.js"
],
"minerva": []
},
@@ -203,13 +204,11 @@
},
"ext.wikimediaEvents.humanSearchRel": {
"messages": [
-   "wikimediaevents-humanrel-question-a",
-   "wikimediaevents-humanrel-question-b",
"wikimediaevents-humanrel-question-c",
-   "wikimediaevents-humanrel-question-d",
"wikimediaevents-humanrel-yes",
"wikimediaevents-humanrel-no",
"wikimediaevents-humanrel-unsure",
+   "wikimediaevents-humanrel-why",
"wikimediaevents-humanrel-privacy-statement"
],
"styles": [
diff --git a/i18n/en.json b/i18n/en.json
index ae02eec..1916a3d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,12 +14,10 @@
"tag-HHVM": "[[mw:Special:MyLanguage/HHVM/About|HHVM]]",
"tag-HHVM-description": "Revisions made with the HipHop Virtual Machine 
enabled instead of the Zend PHP interpreter (expected to improve performance, 
tagged for debugging/analysis)",
"abusefilter-edit-builder-vars-user-wpzero": "Whether or not a user is 
editing through a zero-rated carrier via Wikipedia Zero",
-   "wikimediaevents-humanrel-question-a": "Would you click on this page 
when searching for '$1'?",
-   "wikimediaevents-humanrel-question-b": "If you searched for '$1', would 
this article be a good result?",
-   "wikimediaevents-humanrel-question-c": "If you searched for '$1', would 
this article be relevant?",
-   "wikimediaevents-humanrel-question-d": "If someone searched for '$1', 
would they want to read this article?",
+   "wikimediaevents-humanrel-question-c": "If you searched for '$1' would 
this article be relevant?",
"wikimediaevents-humanrel-yes": "Yes",
"wikimediaevents-humanrel-no": "No",
"wikimediaevents-humanrel-unsure": "I don't know",
+   "wikimediaevents-humanrel-why": "Why we are asking this?",
"wikimediaevents-humanrel-privacy-statement": "Privacy Statement"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ccfa0e9..05fd94e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -17,12 +17,10 @@
"tag-HHVM": "{{notranslate}} Tag on edits made via HHVM",
"tag-HHVM-description": "Description for the HHVM tag.",
"abusefilter-edit-builder-vars-user-wpzero": "Description for an 
AbuseFilter variable about whether the user is 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add opt out to relevance survey

2017-10-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384180 )

Change subject: Add opt out to relevance survey
..

Add opt out to relevance survey

* Opt-out for anonymous users is tracked in local storage, so
 is only handled on a best-effort basis.
* Opt-out for logged in users is tracked in the mediawiki user
 options so should be a strong guarantee.

Bug: T176428
Change-Id: Ic08d0362ea26beb2e1e6d996e4b48c46a14d9d15
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/ApiRelevanceSurvey.php
M modules/ext.wikimediaEvents.humanSearchRelevance.css
M modules/ext.wikimediaEvents.humanSearchRelevance.js
6 files changed, 83 insertions(+), 10 deletions(-)


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

diff --git a/extension.json b/extension.json
index 37bd3bf..290382b 100644
--- a/extension.json
+++ b/extension.json
@@ -19,7 +19,8 @@
"relevancesurvey": 
"MediaWiki\\WikimediaEvents\\ApiRelevanceSurvey"
},
"DefaultUserOptions": {
-   "wme-relevance-filter": ""
+   "wme-relevance-filter": "",
+   "wme-relevance-optout": false
},
"Hooks": {
"BeforeInitialize": [
@@ -166,7 +167,7 @@
"schema.HumanSearchRelevance": {
"class": "ResourceLoaderSchemaModule",
"schema": "HumanSearchRelevance",
-   "revision": 17320055
+   "revision": 17322925
},
"ext.wikimediaEvents": {
"scripts": [
@@ -217,7 +218,8 @@
"wikimediaevents-humanrel-no",
"wikimediaevents-humanrel-unsure",
"wikimediaevents-humanrel-why",
-   "wikimediaevents-humanrel-privacy-statement"
+   "wikimediaevents-humanrel-privacy-statement",
+   "wikimediaevents-humanrel-opt-out"
],
"styles": [
"ext.wikimediaEvents.humanSearchRelevance.css"
diff --git a/i18n/en.json b/i18n/en.json
index 1916a3d..eddd96b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -19,5 +19,6 @@
"wikimediaevents-humanrel-no": "No",
"wikimediaevents-humanrel-unsure": "I don't know",
"wikimediaevents-humanrel-why": "Why we are asking this?",
-   "wikimediaevents-humanrel-privacy-statement": "Privacy Statement"
+   "wikimediaevents-humanrel-privacy-statement": "Privacy Statement",
+   "wikimediaevents-humanrel-opt-out": "Opt out of survey"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 05fd94e..b3d5488 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -22,5 +22,6 @@
"wikimediaevents-humanrel-no": "Negative answer to articles relevance 
to a search query.\n\nAppears with the question: 
{{msg-mw|wikimediaevents-humanrel-question-c}}\n\n{{Identical|No}}",
"wikimediaevents-humanrel-unsure": "Indecisive answer to articles 
relevance to a search query.\n\nSee also: 
{{msg-mw|wikimediaevents-humanrel-question-c}}, 
{{msg-mw|wikimediaevents-humanrel-yes}}, 
{{msg-mw|wikimediaevents-humanrel-no}}",
"wikimediaevents-humanrel-why": "Link text to wiki page describing the 
purpose of the survey.",
-   "wikimediaevents-humanrel-privacy-statement": "Text for link to the 
survey privacy statement."
+   "wikimediaevents-humanrel-privacy-statement": "Text for link to the 
survey privacy statement.",
+   "wikimediaevents-humanrel-opt-out": "Text for link to opt out (never 
see again) the search relevance survey."
 }
diff --git a/includes/ApiRelevanceSurvey.php b/includes/ApiRelevanceSurvey.php
index 48b7424..c547732 100644
--- a/includes/ApiRelevanceSurvey.php
+++ b/includes/ApiRelevanceSurvey.php
@@ -4,12 +4,16 @@
 
 use ApiBase;
 use InvalidArgumentException;
+use MediaWiki\Logger\LoggerFactory;
+use MWException;
 use Title;
 use User;
 
 class ApiRelevanceSurvey extends ApiBase {
// User option that stores the per-user bloom filter
const USER_OPTION_FILTER = 'wme-relevance-filter';
+   // User option to opt out of surveys
+   const USER_OPTION_OPTOUT = 'wme-relevance-optout';
 
// A bloom filter with 180 bytes and 6 hashes gives a false positive 
rate
// of 0.01% at 58 items, 1% at 150 items, and 10% at 275 items.
@@ -18,6 +22,29 @@
 
public function execute() {
$params = $this->extractRequestParams();
+
+   $user = $this->getUser();
+   if ( $params['optout'] ) {
+   if ( $user->isAnon() ) {
+   $this->dieWithError( 
'apierror-musbeloggedin-generic' );
+   }
+   // There is a small 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add close button to relevance survey notification

2017-10-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384181 )

Change subject: Add close button to relevance survey notification
..

Add close button to relevance survey notification

Basic close button hinting users at how to close the survey. It's not
strictly necessary as clicking anywhere (except the external links)
closes the notification, but that's not particularly obvious.

Bug: T176428
Change-Id: Id98de9ac6f3be14b6d48dad4fa5460a6860a93d0
---
M modules/ext.wikimediaEvents.humanSearchRelevance.css
M modules/ext.wikimediaEvents.humanSearchRelevance.js
2 files changed, 18 insertions(+), 1 deletion(-)


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

diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.css 
b/modules/ext.wikimediaEvents.humanSearchRelevance.css
index 1f670b0..4fe35be 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.css
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.css
@@ -24,8 +24,17 @@
 }
 
 /* Center the buttons and footer */
-.mw-wme-humanrel-question > .oo-ui-buttonGroupWidget,
+.mw-wme-humanrel-question > .buttons,
 .mw-wme-humanrel-question > .footer {
text-align: center;
width: 100%;
 }
+
+/* Put the close button in the top right. The icon
+ * has enough built-in whitespace we can kill the rest */
+.mw-wme-humanrel-question > .close {
+   position: absolute;
+   top: 0;
+   right: 0;
+   margin: 0;
+}
diff --git a/modules/ext.wikimediaEvents.humanSearchRelevance.js 
b/modules/ext.wikimediaEvents.humanSearchRelevance.js
index 14f043d..5cd7ac5 100644
--- a/modules/ext.wikimediaEvents.humanSearchRelevance.js
+++ b/modules/ext.wikimediaEvents.humanSearchRelevance.js
@@ -82,6 +82,7 @@
var question = 'wikimediaevents-humanrel-question-c',
/* global OO */
buttons = new OO.ui.ButtonGroupWidget( {
+   classes: [ 'buttons' ],
items: [ 'yes', 'unsure', 'no' ].map( function 
( choice ) {
return new OO.ui.ButtonWidget( {
label: mw.message( 
'wikimediaevents-humanrel-' + choice ).text()
@@ -89,6 +90,12 @@
click: [ onClick, choice ]
} );
} )
+   } ),
+   closeIcon = new OO.ui.IconWidget( {
+   icon: 'close',
+   classes: [ 'close' ],
+   } ).connect( {}, {
+   click: [ onClick, 'dismiss' ]
} ),
footer = $( '', { 'class': 'footer' } ).append(
$( '', {
@@ -110,6 +117,7 @@
return $( '' ).attr( {
'class': 'mw-wme-humanrel-question'
} ).append(
+   closeIcon.$element,
document.createTextNode( mw.message( question, 
query ) ),
buttons.$element,
footer

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Track search survey history in backend

2017-10-13 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384179 )

Change subject: Track search survey history in backend
..

Track search survey history in backend

Try even harder to not show users the same question twice by tracking
this information in a user option. Adds a small per-user bloom filter
that tracks if a user has been asked a question. This is probabilistic,
so a user might be flagged as already having seen a question that they
have not, but it will never allow asking a user the same question twice.

* Add bloom filter implementation in php
* Store bloom filter in new user option
* New backend API to decide what question to ask users
* Page HTML output no-longer contains queries, only the sampling
  rates. This also means tests turn off immediately on config change.
  Turning on still waits for pages to get new sampling rates into
  edge caches.

Bug: T176428
Change-Id: Iaecd09d612545d1127472544b576437cc29bbd55
---
M WikimediaEventsHooks.php
M extension.json
A includes/ApiRelevanceSurvey.php
A includes/BloomFilter.php
M modules/ext.wikimediaEvents.humanSearchRelevance.js
A tests/phpunit/BloomFilterTest.php
6 files changed, 422 insertions(+), 14 deletions(-)


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

diff --git a/WikimediaEventsHooks.php b/WikimediaEventsHooks.php
index 2fd34d1..cf8eb1b 100644
--- a/WikimediaEventsHooks.php
+++ b/WikimediaEventsHooks.php
@@ -504,7 +504,7 @@
if ( $vars['wgAction'] === 'view' ) {
$articleId = $out->getTitle()->getArticleID();
if ( isset( $wgWMESearchRelevancePages[$articleId] ) ) {
-   $vars['wgWMESearchRelevancePages'] = 
$wgWMESearchRelevancePages[$articleId];
+   $vars['wgWMESearchRelevancePages'] = 
$wgWMESearchRelevancePages[$articleId]['sampleRate'];
}
}
return true;
diff --git a/extension.json b/extension.json
index 492032c..37bd3bf 100644
--- a/extension.json
+++ b/extension.json
@@ -11,7 +11,15 @@
"license-name": "GPL-2.0+",
"AutoloadClasses": {
"WikimediaEventsHooks": "WikimediaEventsHooks.php",
-   "AuthManagerStatsdHandler": 
"includes/AuthManagerStatsdHandler.php"
+   "AuthManagerStatsdHandler": 
"includes/AuthManagerStatsdHandler.php",
+   "MediaWiki\\WikimediaEvents\\ApiRelevanceSurvey": 
"includes/ApiRelevanceSurvey.php",
+   "MediaWiki\\WikimediaEvents\\BloomFilter": 
"includes/BloomFilter.php"
+   },
+   "APIModules": {
+   "relevancesurvey": 
"MediaWiki\\WikimediaEvents\\ApiRelevanceSurvey"
+   },
+   "DefaultUserOptions": {
+   "wme-relevance-filter": ""
},
"Hooks": {
"BeforeInitialize": [
diff --git a/includes/ApiRelevanceSurvey.php b/includes/ApiRelevanceSurvey.php
new file mode 100644
index 000..48b7424
--- /dev/null
+++ b/includes/ApiRelevanceSurvey.php
@@ -0,0 +1,106 @@
+extractRequestParams();
+   $title = Title::newFromText( $params['title'] );
+   if ( !$title ) {
+   $this->dieWithError( [ 'apierror-invalidtitle', 
$params['title'] ] );
+   }
+
+   if ( !$title->getArticleID() ) {
+   $this->dieWithError( 'apierror-missingtitle' );
+   }
+
+   $config = $this->getConfig()->get( 'WMESearchRelevancePages' );
+   if ( !isset( $config[ $title->getArticleID() ] ) ) {
+   $this->applyResult( false );
+   return;
+   }
+
+   $queries = $config[ $title->getArticleID() ][ 'queries' ];
+   shuffle( $queries );
+
+   if ( $user->isAnon() ) {
+   $this->applyResult( reset( $queries ) );
+   return;
+   }
+
+   // Use the article id so the page being renamed doesn't change
+   // it's inclusion in the filter.
+   $keyPrefix = $title->getArticleID() . '|';
+   $filter = $this->loadBloomFilter( $user );
+   foreach ( $queries as $query ) {
+   $key = $keyPrefix . $query;
+   if ( !$filter->contains( $key ) ) {
+   $filter->insert( $key );
+   $user->setOption( self::USER_OPTION_FILTER, 
$filter->stringify() );
+   // There is potential for CAS errors if this 
api is hit
+   // multiple times in succession. The failure 
case is probably
+   // acceptable: the api request will error and 
the user
+   // will not be shown a survey.
+   

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use OOjs UI widget for discard button

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

Change subject: Use OOjs UI widget for discard button
..

Use OOjs UI widget for discard button

Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc
---
M modules/source/ext.cx.source.selector.js
M modules/source/styles/ext.cx.source.selector.less
2 files changed, 6 insertions(+), 17 deletions(-)


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

diff --git a/modules/source/ext.cx.source.selector.js 
b/modules/source/ext.cx.source.selector.js
index 7018a0c..c7f946e 100644
--- a/modules/source/ext.cx.source.selector.js
+++ b/modules/source/ext.cx.source.selector.js
@@ -1368,8 +1368,11 @@
$container: this.$searchResults
} );
 
-   this.$discardButton = $( '' )
-   .addClass( 'cx-sourceselector-embedded-discard' );
+   this.$discardButton = new OO.ui.ButtonWidget( {
+   framed: false,
+   icon: 'close',
+   classes: [ 'cx-sourceselector-embedded-discard' ]
+   } ).$element;
 
this.$sourceInputs = $( '' )
.addClass( 'cx-sourceselector-embedded__source-inputs' )
diff --git a/modules/source/styles/ext.cx.source.selector.less 
b/modules/source/styles/ext.cx.source.selector.less
index 586927d..1fe4520 100644
--- a/modules/source/styles/ext.cx.source.selector.less
+++ b/modules/source/styles/ext.cx.source.selector.less
@@ -209,21 +209,7 @@
}
 
.cx-sourceselector-embedded-discard {
-   .background-image-svg('../../tools/images/clear.svg', 
'../../tools/images/clear.png');
-   background-position: center center;
-   background-repeat: no-repeat;
-   background-size: 16px;
-   opacity: 0.8;
-
-   float: right;
-   width: 24px;
-   height: 24px;
-   margin: 0 8px 0 16px;
-   cursor: pointer;
-
-   &:hover {
-   opacity: 1;
-   }
+   margin-left: 8px;
}
 
.cx-sourceselector__license,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab6ffbfcb55b035ca7e1e863ca9d869321bd57dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic 

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


[MediaWiki-commits] [Gerrit] mediawiki...AntiSpoof[master]: Uncomment wfWarn in deprecated PHP entry point

2017-10-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384176 )

Change subject: Uncomment wfWarn in deprecated PHP entry point
..

Uncomment wfWarn in deprecated PHP entry point

Change-Id: Ifc455833721fc1ad9592f2356d33783f828294fa
---
M AntiSpoof.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AntiSpoof 
refs/changes/76/384176/1

diff --git a/AntiSpoof.php b/AntiSpoof.php
index 151756e..2dd75fe 100644
--- a/AntiSpoof.php
+++ b/AntiSpoof.php
@@ -3,11 +3,11 @@
wfLoadExtension( 'AntiSpoof' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['AntiSpoof'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for AntiSpoof extension. ' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the AntiSpoof extension requires MediaWiki 1.25+' 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc455833721fc1ad9592f2356d33783f828294fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AntiSpoof
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...Campaigns[master]: Uncomment wfWarn in deprecated PHP entry point

2017-10-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384175 )

Change subject: Uncomment wfWarn in deprecated PHP entry point
..

Uncomment wfWarn in deprecated PHP entry point

Change-Id: I2d46590f22b9f944a1be94804beeea00d381d7aa
---
M Campaigns.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Campaigns 
refs/changes/75/384175/1

diff --git a/Campaigns.php b/Campaigns.php
index 209039e..1b73bb0 100644
--- a/Campaigns.php
+++ b/Campaigns.php
@@ -3,10 +3,10 @@
wfLoadExtension( 'Campaigns' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['Campaigns'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for Campaigns extension. 
Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the Campaigns extension requires MediaWiki 1.25+' 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d46590f22b9f944a1be94804beeea00d381d7aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Campaigns
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Uncomment wfWarn in deprecated PHP entry point

2017-10-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384174 )

Change subject: Uncomment wfWarn in deprecated PHP entry point
..

Uncomment wfWarn in deprecated PHP entry point

Change-Id: I75ddd651c6b25f25f7c67d5c18af986d2d7b1abb
---
M TitleBlacklist.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TitleBlacklist 
refs/changes/74/384174/1

diff --git a/TitleBlacklist.php b/TitleBlacklist.php
index 6eaef24..105f2d2 100644
--- a/TitleBlacklist.php
+++ b/TitleBlacklist.php
@@ -12,11 +12,11 @@
wfLoadExtension( 'TitleBlacklist' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['TitleBlacklist'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for TitleBlacklist extension. 
' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the TitleBlacklist extension requires MediaWiki 
1.25+' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75ddd651c6b25f25f7c67d5c18af986d2d7b1abb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TitleBlacklist
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki...CiteThisPage[master]: Suppress wrapping around our ...

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

Change subject: Suppress wrapping  around our 
 tags
..

Suppress wrapping  around our  tags

This wrapping and the ability to disable it was introduced in MW 1.30.

Bug: T171389
Change-Id: Id2eeda5602c75cafea293abd125989c29d3fc314
---
M SpecialCiteThisPage.php
M extension.json
2 files changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/SpecialCiteThisPage.php b/SpecialCiteThisPage.php
index 41455a6..d7f5adb 100644
--- a/SpecialCiteThisPage.php
+++ b/SpecialCiteThisPage.php
@@ -184,10 +184,14 @@
 * @return string
 */
public function citationTag( $text, $params, Parser $parser ) {
+   $parserOptions = $this->getParserOptions();
+   // This will be inserted into the output of another parser, so 
there will actually be a wrapper
+   $parserOptions->setWrapOutputClass( false );
+
$ret = $this->citationParser->parse(
$text,
$this->getPageTitle(),
-   $this->getParserOptions(),
+   $parserOptions,
/* $linestart = */ false
);
 
diff --git a/extension.json b/extension.json
index 3f9bbd3..0736a74 100644
--- a/extension.json
+++ b/extension.json
@@ -8,6 +8,9 @@
"descriptionmsg": "citethispage-desc",
"license-name": "GPL-2.0+",
"type": "specialpage",
+   "requires": {
+   "MediaWiki": ">= 1.30.0"
+   },
"ExtensionMessagesFiles": {
"CiteThisPageAliases": "CiteThisPage.alias.php"
},

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TitleBlacklist[master]: Re-instate "Remove pre-authmanager code"

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

Change subject: Re-instate "Remove pre-authmanager code"
..


Re-instate "Remove pre-authmanager code"

This reverts commit ecf9bc4424595d2d8e038c57fe8402a2bc20e7f7.

Fixes copy paste fail from Id686d75e0a6b475a79f7f715791d867dc6fb400c,
should've been preauth, not primary

Change-Id: I8c5456af1ca3bf89c4fd1791b113ac3a16350989
---
M TitleBlacklist.hooks.php
M extension.json
2 files changed, 7 insertions(+), 110 deletions(-)

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



diff --git a/TitleBlacklist.hooks.php b/TitleBlacklist.hooks.php
index fa8c1a8..f24ee94 100644
--- a/TitleBlacklist.hooks.php
+++ b/TitleBlacklist.hooks.php
@@ -6,33 +6,12 @@
  * @license GNU General Public License 2.0 or later
  */
 
-use MediaWiki\Auth\AuthManager;
-
 /**
  * Hooks for the TitleBlacklist class
  *
  * @ingroup Extensions
  */
 class TitleBlacklistHooks {
-
-   /**
-* Called right after configuration variables have been set.
-*/
-   public static function onRegistration() {
-   global $wgDisableAuthManager, $wgAuthManagerAutoConfig;
-
-   if ( class_exists( AuthManager::class ) && 
!$wgDisableAuthManager ) {
-   
$wgAuthManagerAutoConfig['preauth'][TitleBlacklistPreAuthenticationProvider::class]
 =
-   [ 'class' => 
TitleBlacklistPreAuthenticationProvider::class ];
-   } else {
-   Hooks::register( 'AbortNewAccount', 
'TitleBlacklistHooks::abortNewAccount' );
-   Hooks::register( 'AbortAutoAccount', 
'TitleBlacklistHooks::abortAutoAccount' );
-   Hooks::register( 'UserCreateForm', 
'TitleBlacklistHooks::addOverrideCheckbox' );
-   Hooks::register( 'APIGetAllowedParams', 
'TitleBlacklistHooks::onAPIGetAllowedParams' );
-   Hooks::register( 'AddNewAccountApiForm',
-   'TitleBlacklistHooks::onAddNewAccountApiForm' );
-   }
-   }
 
/**
 * getUserPermissionsErrorsExpensive hook
@@ -217,40 +196,6 @@
}
 
/**
-* AbortNewAccount hook
-*
-* @param User $user
-* @param string &$message
-* @param Status &$status
-* @return bool
-*/
-   public static function abortNewAccount( $user, &$message, &$status ) {
-   global $wgUser, $wgRequest;
-   $override = $wgRequest->getCheck( 'wpIgnoreTitleBlacklist' );
-   $sv = self::testUserName( $user->getName(), $wgUser, $override, 
true );
-   if ( !$sv->isGood() ) {
-   $status = Status::wrap( $sv );
-   $message = $status->getMessage()->parse();
-   }
-   return $sv->isGood();
-   }
-
-   /**
-* AbortAutoAccount hook
-*
-* @param User $user
-* @param string &$message
-* @return bool
-*/
-   public static function abortAutoAccount( $user, &$message ) {
-   global $wgTitleBlacklistBlockAutoAccountCreation;
-   if ( $wgTitleBlacklistBlockAutoAccountCreation ) {
-   return self::abortNewAccount( $user, $message );
-   }
-   return true;
-   }
-
-   /**
 * EditFilter hook
 *
 * @param EditPage $editor
@@ -305,60 +250,6 @@
if ( $title->getNamespace() == NS_MEDIAWIKI && 
$title->getDBkey() == 'Titleblacklist' ) {
TitleBlacklist::singleton()->invalidate();
}
-   return true;
-   }
-
-   /**
-* UserCreateForm hook based on the one from AntiSpoof extension
-* @param UsercreateTemplate &$template
-* @return true
-*/
-   public static function addOverrideCheckbox( &$template ) {
-   global $wgRequest, $wgUser;
-
-   if ( TitleBlacklist::userCanOverride( $wgUser, 'new-account' ) 
) {
-   $template->addInputItem( 'wpIgnoreTitleBlacklist',
-   $wgRequest->getCheck( 'wpIgnoreTitleBlacklist' 
),
-   'checkbox', 'titleblacklist-override' );
-   }
-   return true;
-   }
-
-   /**
-* @param ApiBase &$module
-* @param array &$params
-* @return bool
-*/
-   public static function onAPIGetAllowedParams( ApiBase &$module, array 
&$params ) {
-   if ( $module instanceof ApiCreateAccount ) {
-   $params['ignoretitleblacklist'] = [
-   ApiBase::PARAM_TYPE => 'boolean',
- 

[MediaWiki-commits] [Gerrit] mediawiki...ConfirmEdit[master]: Uncomment wfWarn in deprecated PHP entry point

2017-10-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384172 )

Change subject: Uncomment wfWarn in deprecated PHP entry point
..

Uncomment wfWarn in deprecated PHP entry point

Change-Id: Ic6cba1dab5c0f7f09ba5479f15fb81bb2d869cb1
---
M ConfirmEdit.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/ConfirmEdit.php b/ConfirmEdit.php
index 8116e5a..22cb25f 100644
--- a/ConfirmEdit.php
+++ b/ConfirmEdit.php
@@ -35,11 +35,11 @@
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['ConfirmEdit'] = __DIR__ . '/i18n';
$wgExtensionMessagesFiles['ConfirmEditAlias'] = __DIR__ . 
'/ConfirmEdit.alias.php';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for ConfirmEdit extension. ' .
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the ConfirmEdit extension requires MediaWiki 
1.25+' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6cba1dab5c0f7f09ba5479f15fb81bb2d869cb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmEdit
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Newer composer works fine too...

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

Change subject: Newer composer works fine too...
..


Newer composer works fine too...

Change-Id: Ia88fbcc1a53512e603104de60ec1a0958dbe513f
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index 8ee8ff3..54baf60 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@
 
 
 0. Read the [documentation] on the process for adding new libraries.
-1. Ensure you're using the 1.4.1 version of composer via `composer --version`.
+1. Ensure you're using version 1.4.3 (or later) of composer via `composer 
--version`.
 2. Edit the composer.json file to add/update the libraries you want to change.
 3. Run `composer update --no-dev --ignore-platform-reqs` to download files and
update the autoloader.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia88fbcc1a53512e603104de60ec1a0958dbe513f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vendor
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update reverse interwiki map to prefer language prefixes ove...

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

Change subject: Update reverse interwiki map to prefer language prefixes over 
others
..

Update reverse interwiki map to prefer language prefixes over others

* Updated a bunch of parser tests to reflect the change.

Bug: T177784
Change-Id: I5cf93950a6da69263fb9da59fba2b33cc2e8931f
---
M lib/config/WikiConfig.js
M tests/parserTests-blacklist.js
M tests/parserTests.txt
3 files changed, 38 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/71/384171/1

diff --git a/lib/config/WikiConfig.js b/lib/config/WikiConfig.js
index e9f8e48..52e1c4f 100644
--- a/lib/config/WikiConfig.js
+++ b/lib/config/WikiConfig.js
@@ -232,14 +232,12 @@
}
});
 
-   var cachedMatcher = null;
-   this.interWikiMatcher = function() {
-   if (cachedMatcher) {
-   return cachedMatcher;
-   }
-   var keys = [];
-   var patterns = [];
+   var updatePatterns = function(keys, patterns, filter) {
conf.interwikiMap.forEach(function(val, key) {
+   if (!filter(val)) {
+   return;
+   }
+
var url = val.url;
var protocolRelative = url.startsWith('//');
if (val.protorel !== undefined) {
@@ -271,6 +269,20 @@
patterns.push('^' + val.prefix + '%3A(.*?)');
}
});
+   }
+
+   var cachedMatcher = null;
+   this.interWikiMatcher = function() {
+   if (cachedMatcher) {
+   return cachedMatcher;
+   }
+   var keys = [];
+   var patterns = [];
+   // For html -> wt reverse mapping, prefer language interwiki 
prefixes
+   // over other interwiki prefixes. So, use "en" instead of 
"wikipedia"
+   // for English wikipedia interwiki links.
+   updatePatterns(keys, patterns, function(val) { return 
!!val.language; });
+   updatePatterns(keys, patterns, function(val) { return 
!val.language; });
var reString = '^(?:' + patterns.join('|') + ')$';
var regExp = new RegExp(reString, 'i');
var matchFunc = function(s) {
diff --git a/tests/parserTests-blacklist.js b/tests/parserTests-blacklist.js
index 0c418d9..0cd0c61 100644
--- a/tests/parserTests-blacklist.js
+++ b/tests/parserTests-blacklist.js
@@ -358,6 +358,7 @@
 add("html2html", "Internal link with is link prefix", "Aðrir mótmælendasöfnuðir
 og\n");
 add("html2html", "Internal link with is link trail and link prefix", "xxxar\nmótmælendatrúar\nmótmælendasöfnuður\nmótmælendasöfnuðir\nmótmælendasöfnuðirxxx\n");
 add("html2html", "Parsoid-centric test: Whitespace in ext- and wiki-links 
should be preserved", "
  bar\n\n
  bar\n\nhttp://wp.org\; 
data-parsoid='{\"targetOff\":59,\"contentOffsets\":[59,62],\"dsr\":[44,63,15,1]}'>foo\n\nhttp://wp.org\; 
data-parsoid='{\"targetOff\":80,\"contentOffsets\":[80,87],\"dsr\":[65,88,15,1]}'>foo\n");
+add("html2html", "Interwiki link encoding conversion (T3636)\n+!! 
options\n+parsoid=wt2html,wt2wt\n+## html2wt and html2html will fail because we 
will prefer the :en: interwiki prefix over wikipedia:", " Wikipedia:ro:Olteniţa\n Wikipedia:ro:Olteniţa\n");
 add("html2html", "Space and question mark encoding in interlanguage links 
(T95473)", "Blah blah blah\nhttp://es.wikipedia.org/wiki/Foo_bar?\; 
data-parsoid='{\"stx\":\"simple\",\"a\":{\"href\":\"http://es.wikipedia.org/wiki/Foo_bar?\"},\"sa\":{\"href\":\"es:Foo_bar?\"},\"dsr\":[15,30,null,null]}'/>");
 add("html2html", "Parsoid-specific test: Wikilinks with  should RT 
properly", "[/index.php?title=WW_IIaction=editredlink=1
 WW II]\n");
 add("html2html", " to ", "1\n2\n3\n");
@@ -652,7 +653,7 @@
 add("html2wt", "Internal link with is link prefix", "Aðrir 
[[wiki/Söfnuður|mótmælendasöfnuðir]] og\n");
 add("html2wt", "Internal link with is link trail and link prefix", 
"[[wiki/Mótmælendatrú|xxxar]]\n[[wiki/Mótmælendatrú|mótmælendatrúar]]\n[[wiki/Söfnuður|mótmælendasöfnuður]]\n[[wiki/Söfnuður|mótmælendasöfnuðir]]\n[[wiki/Söfnuður|mótmælendasöfnuðirxxx]]\n");
 add("html2wt", "Parsoid-centric test: Whitespace in ext- and wiki-links should 
be preserved", "[[wiki/Foo|  bar]]\n\n[[wiki/Foo|  ''bar'']]\n\n[http://wp.org 
foo]\n\n[http://wp.org ''foo'']\n");
-add("html2wt", "Interwiki link encoding conversion (T3636)", "* 
[[wikipedia:ro:Olteniţa|Wikipedia:ro:Olteniţa]]\n* 
[[wikipedia:ro:Olteniţa|Wikipedia:ro:Olteniţa]]\n");
+add("html2wt", "Interwiki link encoding conversion (T3636)\n+!! 
options\n+parsoid=wt2html,wt2wt\n+## html2wt and html2html will fail because we 
will prefer the :en: 

[MediaWiki-commits] [Gerrit] mediawiki...SpamBlacklist[master]: Uncomment wfWarn in deprecated PHP entry point

2017-10-13 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384170 )

Change subject: Uncomment wfWarn in deprecated PHP entry point
..

Uncomment wfWarn in deprecated PHP entry point

Change-Id: Id4c6b5897b47406082d7398111bdb03bd0b9dba1
---
M SpamBlacklist.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/SpamBlacklist.php b/SpamBlacklist.php
index 0b703b5..bade5f5 100644
--- a/SpamBlacklist.php
+++ b/SpamBlacklist.php
@@ -3,11 +3,11 @@
wfLoadExtension( 'SpamBlacklist' );
// Keep i18n globals so mergeMessageFileList.php doesn't break
$wgMessagesDirs['SpamBlackList'] = __DIR__ . '/i18n';
-   /* wfWarn(
+   wfWarn(
'Deprecated PHP entry point used for SpamBlacklist extension. ' 
.
'Please use wfLoadExtension instead, ' .
'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
-   ); */
+   );
return;
 } else {
die( 'This version of the SpamBlacklist extension requires MediaWiki 
1.25+' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4c6b5897b47406082d7398111bdb03bd0b9dba1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix margin of #jump-to-nav

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

Change subject: Fix margin of #jump-to-nav
..


Fix margin of #jump-to-nav

The top margin is a correction for the bottom margin.
Follow-up to: Id58972b

Bug: T176444
Change-Id: Icfedfa1ede49de96210b8662a1886ab52c78b006
---
M resources/src/mediawiki.skinning/interface.css
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/resources/src/mediawiki.skinning/interface.css 
b/resources/src/mediawiki.skinning/interface.css
index 916c463..bf92086 100644
--- a/resources/src/mediawiki.skinning/interface.css
+++ b/resources/src/mediawiki.skinning/interface.css
@@ -84,6 +84,7 @@
 #contentSub:empty ~ #jump-to-nav,
 #contentSub2:empty ~ #jump-to-nav {
margin-top: 0;
+   margin-bottom: 0;
 }
 
 span.subpages {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icfedfa1ede49de96210b8662a1886ab52c78b006
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: Bartosz Dziewoński 
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...CentralAuth[master]: Don't use deprecated wfCountDown()

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

Change subject: Don't use deprecated wfCountDown()
..


Don't use deprecated wfCountDown()

Change-Id: I7ef656d3207b5c511a6041be72dea70ca0ffc203
---
M maintenance/resetGlobalUserTokens.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/maintenance/resetGlobalUserTokens.php 
b/maintenance/resetGlobalUserTokens.php
index 7d281b7..90fc90e 100644
--- a/maintenance/resetGlobalUserTokens.php
+++ b/maintenance/resetGlobalUserTokens.php
@@ -63,7 +63,7 @@
"Abort with control-c in the next five seconds 
" .
"(skip this countdown with --nowarn) 
... "
);
-   wfCountDown( 5 );
+   $this->countDown( 5 );
}
 
// We list user by user_id from one of the slave database

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ef656d3207b5c511a6041be72dea70ca0ffc203
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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...OAuthAuthentication[master]: Replace deprecated wfRunHooks() with Hooks::run()

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

Change subject: Replace deprecated wfRunHooks() with Hooks::run()
..


Replace deprecated wfRunHooks() with Hooks::run()

Change-Id: I0cb724aee17949e86a045ab616407351afb4ca63
---
M handlers/AuthenticationHandler.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/handlers/AuthenticationHandler.php 
b/handlers/AuthenticationHandler.php
index 7e944f4..78a5470 100644
--- a/handlers/AuthenticationHandler.php
+++ b/handlers/AuthenticationHandler.php
@@ -2,6 +2,7 @@
 
 namespace MediaWiki\Extensions\OAuthAuthentication;
 
+use Hooks;
 use MediaWiki\OAuthClient\Token;
 
 class AuthenticationHandler {
@@ -79,7 +80,7 @@
$u->addWatch( $u->getUserPage(), 
\WatchedItem::IGNORE_USER_RIGHTS );
$u->saveSettings();
 
-   wfRunHooks( 'AddNewAccount', [ $u, false ] );
+   Hooks::run( 'AddNewAccount', [ $u, false ] );
 
$exUser->setLocalId( $u->getId() );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0cb724aee17949e86a045ab616407351afb4ca63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuthAuthentication
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
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...VisualEditor[master]: Efficiency improvement for MWLanguageVariantNode#hasRendering

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

Change subject: Efficiency improvement for MWLanguageVariantNode#hasRendering
..


Efficiency improvement for MWLanguageVariantNode#hasRendering

Override ve.ce.FocusableNode#hasRendering with a model-based test to
improve efficiency and avoid some unnecessary DOM measurements.

Change-Id: Ice7aebcc2f30dc73ef049a6ed0d4a0cffe86d8e2
---
M modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js
1 file changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Bartosz Dziewoński: Looks good to me, approved
  jenkins-bot: Verified
  Jforrester: Looks good to me, but someone else must approve



diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js
index 1298647..91edfcf 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWLanguageVariantNode.js
@@ -163,6 +163,16 @@
 };
 
 /**
+ * @inheritdoc
+ */
+ve.ce.MWLanguageVariantNode.prototype.hasRendering = function () {
+   // Efficiency improvement: the superclass implementation does a bunch
+   // of DOM measurement to determine if the node is empty.
+   // Instead consult the model for a definitive answer.
+   return !this.model.isHidden();
+};
+
+/**
  * ContentEditable MediaWiki language variant block node.
  *
  * @class

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice7aebcc2f30dc73ef049a6ed0d4a0cffe86d8e2
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: C. Scott Ananian 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...vhtcpd[master]: Refactor/improve purging code

2017-10-13 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384167 )

Change subject: Refactor/improve purging code
..

Refactor/improve purging code

This refactor removes the PST_NOTCONN_WAIT state from the state
machine.  The code no longer has such a state as it always
reconnects immediately, even if there is no currently-pending
output.

Much of the rest of the logic was de-duplicated into a few new
helper functions, and some of the internal state magic was made a
bit more idempotent.

Change-Id: Icd5e96a1bae4dac65c81f80b07f99e9388608fe0
---
M src/main.c
M src/purger.c
M src/purger.h
M src/receiver.c
4 files changed, 172 insertions(+), 265 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/varnish/vhtcpd 
refs/changes/67/384167/1

diff --git a/src/main.c b/src/main.c
index 23896f7..aa338a2 100644
--- a/src/main.c
+++ b/src/main.c
@@ -34,7 +34,7 @@
 /* global libev priorities:
  *  2) receiver input
  *  1) purger i/o
- *  0) purger idle timer
+ *  0) purger timeouts/timers
  * -1) strq excess space reclamation
  * -2) stats/monitor stuff...
  */
diff --git a/src/purger.c b/src/purger.c
index 80e6ff8..e0e5713 100644
--- a/src/purger.c
+++ b/src/purger.c
@@ -38,9 +38,6 @@
 #include "http-parser/http_parser.h"
 
 // XXX some of the below could be configurable as well
-// XXX note that while this is set up to try to take advantage
-//   of keep-alive, apparently varnish closes after every
-//   response to a PURGE, currently.
 
 // this buffer holds the complete HTTP response we get, and can grow at runtime
 #define INBUF_INITSIZE 4096U
@@ -59,7 +56,7 @@
 #define PERSIST_REQS 10U
 #define PERSIST_TIME 900.0
 
-// These are the 6 possible states of the purger object.
+// These are the 5 possible states of the purger object.
 // Note in the state transition code that we often *could* skip
 //   straight through multiple states without returning to libev
 //   (at least try and see if the next call doesn't EAGAIN),
@@ -71,62 +68,46 @@
 //   but we still fully update the ev watcher states during these
 //   to keep the code simpler to follow, even when it's likely
 //   to be pointless churn.
+// Note that all states use the timeout watcher, so we use it
+// ev_timer_again() mode for efficiency (method 2 in the libev docs)
 
 typedef enum {
-// In this state, no message is pending in outbuf or the queue,
-//   and we have no active connection and no active libev watchers.
-// The only way out of NOTCONN_IDLE is a new purger_enqueue() call
-//   from the receiver code.
-PST_NOTCONN_IDLE = 0,
-
-// In this state, there's a message pending in outbuf, and there
-//   may or may not be more in the queue, and we're in the process
-//   of trying to establish the outbound connection (waiting on
-//   nonblock connect() success).
+// In this state we're in the process of trying to establish the
+//   outbound connection (waiting on nonblock connect() success).
+// Possible next states: PST_CONN_IDLE, PST_NOTCONN_WAIT
+// Active watchers: write, timeout
 PST_CONNECTING,
 
-// This is an exception state that occurs when the connect()
-//   attempt above fails.  We wait a short timeout before moving
-//   back to CONNECTING and trying again.  Note that in other
-//   connection failure cases (during read/write), we immediately
-//   retry the connection first, and don't wait until that
-//   connect() attempt fails.
+// While disconnects that occur from other states (send, recv, idle)
+//   result in an immediate reconnect attempt (connecting, above), a
+//   failure during connecting itself results in exponential backoff
+//   delays between reconnection attempts, and they wait out their
+//   timers in this state.
+// Possible next states: PST_CONNECTING
+// Active watchers: timeout
 PST_NOTCONN_WAIT,
 
-// In these two states, outbuf has a complete message pending,
-//   and we have a live connection to use.
-// In the SENDWAIT state we've written less than all bytes.
-// In the RECVWAIT state we've written all bytes and haven't
-//   yet read a complete response.
-// If we eventually succeed in both sending the complete message
-//   and receiving an acceptable response code, the transaction
-//   will finish and outbuf will be cleared.  Whether we immediately
-//   shift back to SENDWAIT or CONN_IDLE depends on the queue.
-// Various failure scenarios lead to other outcomes.  Some bad
-//   status returns from the server should lead to dropping the
-//   current outbuf and moving on (possible bad URL).  Some
-//   should result in terminating the connection but trying
-//   the same URL again on the next connection.
+// SENDWAIT means we're waiting to send request bytes to the purger.
+// Possible next states: PST_RECVWAIT, 

[MediaWiki-commits] [Gerrit] operations...vhtcpd[master]: purger: optimize write watcher churn

2017-10-13 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384168 )

Change subject: purger: optimize write watcher churn
..

purger: optimize write watcher churn

Change-Id: I4cec1f237334ac93c26049ca3999c4c5515f837a
---
M src/purger.c
1 file changed, 34 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/varnish/vhtcpd 
refs/changes/68/384168/1

diff --git a/src/purger.c b/src/purger.c
index e0e5713..2375c95 100644
--- a/src/purger.c
+++ b/src/purger.c
@@ -89,7 +89,7 @@
 
 // SENDWAIT means we're waiting to send request bytes to the purger.
 // Possible next states: PST_RECVWAIT, PST_CONN_IDLE, PST_CONNECTING
-// Active watchers: read, write, timeout
+// Active watchers: read, write?, timeout
 PST_SENDWAIT,
 
 // Possible next states: PST_SENDWAIT, PST_CONN_IDLE, PST_CONNECTING
@@ -214,7 +214,6 @@
 dmn_assert(s->outbuf_bytes);
 dmn_assert(s->outbuf_written < s->outbuf_bytes);
 dmn_assert(!s->inbuf_parsed);
-dmn_assert(ev_is_active(s->write_watcher));
 dmn_assert(ev_is_active(s->read_watcher));
 break;
 case PST_RECVWAIT:
@@ -289,6 +288,8 @@
 return idle;
 }
 
+static void purger_write_req(purger_t* s, const bool via_watcher);
+
 // Called at any txn/connection boundary (purge success/fail, connection 
success).
 // Not called while cycling within reconnect attempt callbacks.
 // If the "reconnect" argument is present, this causes a disconnect->reconnect 
cycle,
@@ -310,10 +311,9 @@
 ev_timer_again(s->loop, s->timeout_watcher);
 } else {
 s->state = PST_SENDWAIT;
-ev_io_start(s->loop, s->write_watcher);
 s->timeout_watcher->repeat = s->io_timeout;
 ev_timer_again(s->loop, s->timeout_watcher);
-ev_invoke(s->loop, s->write_watcher, EV_WRITE);
+purger_write_req(s, true);
 }
 }
 
@@ -323,6 +323,7 @@
 
 s->fd_expire = ev_now(s->loop) + PERSIST_TIME;
 s->conn_wait_timeout = CONN_WAIT_INIT;
+ev_io_stop(s->loop, s->write_watcher);
 ev_io_set(s->read_watcher, s->fd, EV_READ);
 ev_io_start(s->loop, s->read_watcher);
 on_txn_boundary(s, false, false);
@@ -401,27 +402,10 @@
 }
 }
 
-static void purger_write_cb(struct ev_loop* loop, ev_io* w, int revents) {
-dmn_assert(loop); dmn_assert(w); dmn_assert(revents == EV_WRITE);
-
-purger_t* s = w->data;
-dmn_log_debug("purger: %s/%s -> purger_write_cb()", 
dmn_logf_anysin(>daddr), state_strs[s->state]);
-purger_assert_sanity(s);
-
-// This callback only happens in two states: CONNECTING and SENDWAIT...
-
-if(s->state == PST_CONNECTING) { // CONNECTING state, called back after 
EINPROGRESS wait
-int so_error = 0;
-unsigned int so_error_len = sizeof(so_error);
-getsockopt(s->fd, SOL_SOCKET, SO_ERROR, _error, _error_len);
-if(so_error)
-on_connect_fail(s, "nonblock", so_error);
-else
-on_connect_success(s);
-return;
-}
-
+static void purger_write_req(purger_t* s, const bool via_watcher) {
+dmn_assert(s);
 dmn_assert(s->state == PST_SENDWAIT);
+
 const unsigned to_send = s->outbuf_bytes - s->outbuf_written;
 int writerv = send(s->fd, >outbuf[s->outbuf_written], to_send, 0);
 if(writerv == -1) {
@@ -450,17 +434,42 @@
 if(writerv < (int)to_send) {
 // maintain same state, have to send more next iteration
 s->outbuf_written += writerv;
+if (!via_watcher)
+ev_io_start(s->loop, s->write_watcher);
 }
 else {
 dmn_assert(writerv == (int)to_send);
 s->outbuf_written += writerv;
 dmn_assert(s->outbuf_written == s->outbuf_bytes);
 s->state = PST_RECVWAIT;
-ev_io_stop(s->loop, s->write_watcher);
+if (via_watcher)
+ev_io_stop(s->loop, s->write_watcher);
 }
 }
 }
 
+static void purger_write_cb(struct ev_loop* loop, ev_io* w, int revents) {
+dmn_assert(loop); dmn_assert(w); dmn_assert(revents == EV_WRITE);
+
+purger_t* s = w->data;
+dmn_log_debug("purger: %s/%s -> purger_write_cb()", 
dmn_logf_anysin(>daddr), state_strs[s->state]);
+purger_assert_sanity(s);
+
+// This callback only happens in two states: CONNECTING and SENDWAIT...
+
+if(s->state == PST_CONNECTING) { // CONNECTING state, called back after 
EINPROGRESS wait
+int so_error = 0;
+unsigned int so_error_len = sizeof(so_error);
+getsockopt(s->fd, SOL_SOCKET, SO_ERROR, _error, _error_len);
+if(so_error)
+on_connect_fail(s, "nonblock", so_error);
+else
+on_connect_success(s);
+} else {
+purger_write_req(s, true);
+}
+}
+
 static void purger_read_cb(struct ev_loop* loop, ev_io* w, int revents) {
 

[MediaWiki-commits] [Gerrit] operations...vhtcpd[master]: use def loop w/ select()

2017-10-13 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384165 )

Change subject: use def loop w/ select()
..

use def loop w/ select()

Change-Id: Ieea938fb07f78f28a06b0b8b52b65fb80599c886
---
M src/main.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/varnish/vhtcpd 
refs/changes/65/384165/1

diff --git a/src/main.c b/src/main.c
index 803edc4..c5f4762 100644
--- a/src/main.c
+++ b/src/main.c
@@ -393,7 +393,7 @@
 
 // Basic libev setup
 ev_set_syserr_cb(syserr_for_ev);
-struct ev_loop* loop = ev_loop_new(0);
+struct ev_loop* loop = ev_default_loop(EVBACKEND_SELECT);
 setup_signals(loop);
 ev_set_timeout_collect_interval(loop, 0.1);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieea938fb07f78f28a06b0b8b52b65fb80599c886
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/vhtcpd
Gerrit-Branch: master
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] operations...vhtcpd[master]: reduce CONN_WAIT_MAX to 8s

2017-10-13 Thread BBlack (Code Review)
BBlack has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384164 )

Change subject: reduce CONN_WAIT_MAX to 8s
..

reduce CONN_WAIT_MAX to 8s

At modern event rates, 32s is too long to be pausing on
exponential backoff of reconnects.  Limit to 8s.

Change-Id: Ibf4172500278b60b34c18eafcd27288f127913e4
---
M src/purger.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/varnish/vhtcpd 
refs/changes/64/384164/1

diff --git a/src/purger.c b/src/purger.c
index 1814fc8..1520d98 100644
--- a/src/purger.c
+++ b/src/purger.c
@@ -51,7 +51,7 @@
 //  and/or timing out.  The wait doubles after every failure (but limited to 
the
 //  max), and is reset to initial value on connection success.
 #define CONN_WAIT_INIT 1U
-#define CONN_WAIT_MAX 32U
+#define CONN_WAIT_MAX 8U
 
 // Limits on time/purges per purging socket.  It seems that Varnish imposes no
 //   limit here other than inter-purge idle time, so it's a good idea that we

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf4172500278b60b34c18eafcd27288f127913e4
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/vhtcpd
Gerrit-Branch: master
Gerrit-Owner: BBlack 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove unnecessary View casts.

2017-10-13 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384160 )

Change subject: Hygiene: remove unnecessary View casts.
..

Hygiene: remove unnecessary View casts.

Change-Id: I907965ce6ad7b13b7cc53abcd5bc4dde9bb143fe
---
M app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/edit/preview/EditPreviewFragment.java
M app/src/main/java/org/wikipedia/edit/summaries/EditSummaryFragment.java
M app/src/main/java/org/wikipedia/gallery/GalleryActivity.java
M app/src/main/java/org/wikipedia/gallery/GalleryItemFragment.java
M app/src/main/java/org/wikipedia/gallery/GalleryThumbnailScrollView.java
M app/src/main/java/org/wikipedia/history/SearchActionModeCallback.java
M app/src/main/java/org/wikipedia/language/LangLinksActivity.java
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/page/FindInPageActionProvider.java
M app/src/main/java/org/wikipedia/page/IssuesListAdapter.java
M app/src/main/java/org/wikipedia/page/NoDimBottomSheetDialog.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/PageInfoDialog.java
M app/src/main/java/org/wikipedia/page/ReferenceDialog.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/java/org/wikipedia/page/shareafact/ShareHandler.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.java
M app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
M app/src/main/java/org/wikipedia/search/SearchFragment.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
M app/src/main/java/org/wikipedia/settings/AboutActivity.java
M app/src/main/java/org/wikipedia/settings/LanguagePreferenceDialog.java
M app/src/main/java/org/wikipedia/settings/LicenseActivity.java
M app/src/main/java/org/wikipedia/util/FeedbackUtil.java
M app/src/main/java/org/wikipedia/views/TextInputDialog.java
M app/src/main/java/org/wikipedia/wiktionary/WiktionaryDialog.java
31 files changed, 93 insertions(+), 94 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java 
b/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
index 5587857..7553fb2 100644
--- a/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
+++ b/app/src/main/java/org/wikipedia/captcha/CaptchaHandler.java
@@ -49,10 +49,10 @@
 this.prevTitle = prevTitle;
 
 captchaContainer = activity.findViewById(R.id.captcha_container);
-captchaImage = (SimpleDraweeView) 
activity.findViewById(R.id.captcha_image);
+captchaImage = activity.findViewById(R.id.captcha_image);
 captchaText = ((TextInputLayout) 
activity.findViewById(R.id.captcha_text)).getEditText();
 captchaProgress = activity.findViewById(R.id.captcha_image_progress);
-TextView submitButton = (TextView) 
activity.findViewById(R.id.captcha_submit_button);
+TextView submitButton = 
activity.findViewById(R.id.captcha_submit_button);
 
 if (submitButtonText != null) {
 submitButton.setText(submitButtonText);
diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java 
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index b300d54..a78878f 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -148,19 +148,19 @@
 supportActionBar.setTitle("");
 }
 
-sectionText = (EditText) findViewById(R.id.edit_section_text);
+sectionText = findViewById(R.id.edit_section_text);
 
 syntaxHighlighter = new SyntaxHighlighter(this, sectionText);
 
 sectionProgress = findViewById(R.id.edit_section_load_progress);
-sectionContainer = (ScrollView) 
findViewById(R.id.edit_section_container);
+sectionContainer = findViewById(R.id.edit_section_container);
 sectionContainer.setSmoothScrollingEnabled(false);
-errorView = (WikiErrorView) findViewById(R.id.view_edit_section_error);
+errorView = findViewById(R.id.view_edit_section_error);
 
 abusefilterContainer = 
findViewById(R.id.edit_section_abusefilter_container);
-abuseFilterImage = (ImageView) 
findViewById(R.id.edit_section_abusefilter_image);
-abusefilterTitle = (TextView) 
findViewById(R.id.edit_section_abusefilter_title);
-abusefilterText = (TextView) 
findViewById(R.id.edit_section_abusefilter_text);
+abuseFilterImage = 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionCommentSupplement[master]: DB_SLAVE --> DB_REPLICA

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384146 )

Change subject: DB_SLAVE --> DB_REPLICA
..

DB_SLAVE --> DB_REPLICA

Change-Id: I8d79833a1c5aaa1d31f94851fda9deefc2dd3c58
---
M RevisionCommentSupplement.class.php
M RevisionCommentSupplement.hook.php
M maintenance/fixUserGroupSupplement.php
M special/SpecialRevisionCommentSupplement.php
M special/ViewRevisionCommentSupplementEdit.php
M special/ViewRevisionCommentSupplementList.php
6 files changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/RevisionCommentSupplement.class.php 
b/RevisionCommentSupplement.class.php
index 04649e0..d4bc969 100644
--- a/RevisionCommentSupplement.class.php
+++ b/RevisionCommentSupplement.class.php
@@ -33,7 +33,7 @@
public static function insert( $revId, $newsupplement, $reason ) {
$oldsupplement = '';
$action = 'create';
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
@@ -139,7 +139,7 @@
 */
public static function delete( $revId, $reason = '' ) {
$oldsupplement = '';
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
@@ -168,7 +168,7 @@
 * @return object|bool
 */
public static function getRow( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'*',
@@ -188,7 +188,7 @@
 * @return bool
 */
public static function isExistRow( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_rev_id',
@@ -248,7 +248,7 @@
 * @return object|bool
 */
public static function getRow( $id ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'*',
@@ -268,7 +268,7 @@
 * @return bool
 */
public static function isExistRow( $id ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_id',
@@ -288,7 +288,7 @@
 * @return bool
 */
public static function isExistHistory( $revId ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_rev_id',
@@ -333,7 +333,7 @@
 * @return bool
 */
public static function hide( $id, $reason = '', $hide = 0 ) {
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp_history',
'rcsh_rev_id,rcsh_hidden',
diff --git a/RevisionCommentSupplement.hook.php 
b/RevisionCommentSupplement.hook.php
index f55ef35..3de4f53 100644
--- a/RevisionCommentSupplement.hook.php
+++ b/RevisionCommentSupplement.hook.php
@@ -26,7 +26,7 @@
 
public static function onPageHistoryLineEnding( HistoryPager $history, 
$revRow, &$s ) {
$revId = (int)$revRow->rev_id;
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$dbRow = $dbr->selectRow(
'rev_comment_supp',
'rcs_supplement',
diff --git a/maintenance/fixUserGroupSupplement.php 
b/maintenance/fixUserGroupSupplement.php
index 3e8fe07..6b52178 100644
--- a/maintenance/fixUserGroupSupplement.php
+++ b/maintenance/fixUserGroupSupplement.php
@@ -20,7 +20,7 @@
$this->output( "\nThis will replace 10 seconds after.\n" );
wfCountDown( 10 );
$i = 0;
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$rows = $dbr->select(
'user_groups',
'ug_user',
diff --git a/special/SpecialRevisionCommentSupplement.php 
b/special/SpecialRevisionCommentSupplement.php
index 8cd992e..151acda 100644
--- a/special/SpecialRevisionCommentSupplement.php
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...RevisionCommentSupplement[master]: Don't use deprecated wfCountDown()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384147 )

Change subject: Don't use deprecated wfCountDown()
..

Don't use deprecated wfCountDown()

Change-Id: I67e59169e92249ec7c2ada733655066b43717907
---
M maintenance/buildHistory.php
M maintenance/fixLogParams.php
M maintenance/fixUserGroupSupplement.php
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RevisionCommentSupplement 
refs/changes/47/384147/1

diff --git a/maintenance/buildHistory.php b/maintenance/buildHistory.php
index 4bf6b18..de66818 100644
--- a/maintenance/buildHistory.php
+++ b/maintenance/buildHistory.php
@@ -21,7 +21,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will build 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
if ( $this->hasOption( 'log' ) ) {
$this->buildFromLogging();
}
diff --git a/maintenance/fixLogParams.php b/maintenance/fixLogParams.php
index d29a75b..4492c21 100644
--- a/maintenance/fixLogParams.php
+++ b/maintenance/fixLogParams.php
@@ -19,7 +19,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will update 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
$i = 0;
$dbw = $this->getDB( DB_MASTER );
$conds = array(
diff --git a/maintenance/fixUserGroupSupplement.php 
b/maintenance/fixUserGroupSupplement.php
index 6b52178..d3059b5 100644
--- a/maintenance/fixUserGroupSupplement.php
+++ b/maintenance/fixUserGroupSupplement.php
@@ -18,7 +18,7 @@
public function execute() {
$this->output( $this->mDescription );
$this->output( "\nThis will replace 10 seconds after.\n" );
-   wfCountDown( 10 );
+   $this->countDown( 10 );
$i = 0;
$dbr = wfGetDB( DB_REPLICA );
$rows = $dbr->select(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I67e59169e92249ec7c2ada733655066b43717907
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionCommentSupplement
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Design: Normalize/correct status bar color in all activities.

2017-10-13 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384143 )

Change subject: Design: Normalize/correct status bar color in all activities.
..

Design: Normalize/correct status bar color in all activities.

Change-Id: I7333456e6edd2740cd1f54a8482abfc658303d71
---
M app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
M app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
M app/src/main/java/org/wikipedia/language/LangLinksActivity.java
M app/src/main/java/org/wikipedia/main/MainActivity.java
M app/src/main/java/org/wikipedia/onboarding/InitialOnboardingActivity.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/page/PageToolbarHideHandler.java
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
12 files changed, 31 insertions(+), 22 deletions(-)


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

diff --git 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
index 6068706..d9d294d 100644
--- 
a/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
+++ 
b/app/src/main/java/org/wikipedia/activity/SingleFragmentToolbarActivity.java
@@ -9,7 +9,6 @@
 
 import org.wikipedia.R;
 import org.wikipedia.util.DimenUtil;
-import org.wikipedia.util.ResourceUtil;
 
 /**
  * Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
@@ -24,7 +23,6 @@
 getSupportActionBar().setTitle("");
 getSupportActionBar().setDisplayHomeAsUpEnabled(false);
 }
-setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.main_status_bar_color));
 }
 
 public void setWordmarkVisible(boolean visible) {
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
index df31ad6..4701125 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditActivity.java
@@ -2,15 +2,12 @@
 
 import android.content.Context;
 import android.content.Intent;
-import android.os.Bundle;
 import android.support.annotation.NonNull;
 
-import org.wikipedia.R;
 import org.wikipedia.activity.SingleFragmentActivity;
 import org.wikipedia.json.GsonMarshaller;
 import org.wikipedia.json.GsonUnmarshaller;
 import org.wikipedia.page.PageTitle;
-import org.wikipedia.util.ResourceUtil;
 
 import static org.wikipedia.util.DeviceUtil.hideSoftKeyboard;
 
@@ -22,12 +19,6 @@
 public static Intent newIntent(@NonNull Context context, @NonNull 
PageTitle title) {
 return new Intent(context, DescriptionEditActivity.class)
 .putExtra(EXTRA_TITLE, GsonMarshaller.marshal(title));
-}
-
-@Override
-public void onCreate(Bundle savedInstanceState) {
-super.onCreate(savedInstanceState);
-setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.main_status_bar_color));
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java 
b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
index b300d54..81410cb 100644
--- a/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
+++ b/app/src/main/java/org/wikipedia/edit/EditSectionActivity.java
@@ -127,6 +127,7 @@
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 setContentView(R.layout.activity_edit_section);
+setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 
R.attr.page_status_bar_color));
 
 if (!getIntent().getAction().equals(ACTION_EDIT_SECTION)) {
 throw new RuntimeException("Much wrong action. Such exception. 
Wow");
diff --git a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java 
b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
index 7dd8115..f33490f 100644
--- a/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
+++ b/app/src/main/java/org/wikipedia/language/LangLinksActivity.java
@@ -25,6 +25,7 @@
 import org.wikipedia.history.HistoryEntry;
 import org.wikipedia.page.PageActivity;
 import org.wikipedia.page.PageTitle;
+import org.wikipedia.util.ResourceUtil;
 import org.wikipedia.views.ViewAnimations;
 import org.wikipedia.views.WikiErrorView;
 
@@ -66,6 +67,7 @@
 public void onCreate(Bundle savedInstanceState) {
 super.onCreate(savedInstanceState);
 app = WikipediaApp.getInstance();
+setStatusBarColor(ResourceUtil.getThemedAttributeId(this, 

[MediaWiki-commits] [Gerrit] analytics/aqs[master]: Correct bug in druid URI building

2017-10-13 Thread Milimetric (Code Review)
Milimetric has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/384103 )

Change subject: Correct bug in druid URI building
..


Correct bug in druid URI building

Change-Id: I799d84ba23c2b7df0a262fada755bb8c3b1f424f
---
M sys/mediawiki-history-metrics.js
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/sys/mediawiki-history-metrics.js b/sys/mediawiki-history-metrics.js
index 7a7b916..54e9fec 100644
--- a/sys/mediawiki-history-metrics.js
+++ b/sys/mediawiki-history-metrics.js
@@ -44,7 +44,6 @@
 uri += (druid.scheme) ? druid.scheme + '://' : '';
 uri += druid.host || '';
 uri += (druid.port) ? ':' + druid.port : '';
-uri += druid.host || '';
 uri += druid.query_path || '';
 
 return uri;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I799d84ba23c2b7df0a262fada755bb8c3b1f424f
Gerrit-PatchSet: 2
Gerrit-Project: analytics/aqs
Gerrit-Branch: master
Gerrit-Owner: Joal 
Gerrit-Reviewer: Milimetric 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralAuth[master]: Don't use deprecated wfCountDown()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384139 )

Change subject: Don't use deprecated wfCountDown()
..

Don't use deprecated wfCountDown()

Change-Id: I7ef656d3207b5c511a6041be72dea70ca0ffc203
---
M maintenance/resetGlobalUserTokens.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/39/384139/1

diff --git a/maintenance/resetGlobalUserTokens.php 
b/maintenance/resetGlobalUserTokens.php
index 7d281b7..90fc90e 100644
--- a/maintenance/resetGlobalUserTokens.php
+++ b/maintenance/resetGlobalUserTokens.php
@@ -63,7 +63,7 @@
"Abort with control-c in the next five seconds 
" .
"(skip this countdown with --nowarn) 
... "
);
-   wfCountDown( 5 );
+   $this->countDown( 5 );
}
 
// We list user by user_id from one of the slave database

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ef656d3207b5c511a6041be72dea70ca0ffc203
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix margin of #jump-to-nav

2017-10-13 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384129 )

Change subject: Fix margin of #jump-to-nav
..

Fix margin of #jump-to-nav

The top margin is a correction for the bottom margin.

Follow-up to: Id58972b
Bug: T176444

Change-Id: Icfedfa1ede49de96210b8662a1886ab52c78b006
---
M resources/src/mediawiki.skinning/interface.css
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/384129/1

diff --git a/resources/src/mediawiki.skinning/interface.css 
b/resources/src/mediawiki.skinning/interface.css
index 916c463..bf92086 100644
--- a/resources/src/mediawiki.skinning/interface.css
+++ b/resources/src/mediawiki.skinning/interface.css
@@ -84,6 +84,7 @@
 #contentSub:empty ~ #jump-to-nav,
 #contentSub2:empty ~ #jump-to-nav {
margin-top: 0;
+   margin-bottom: 0;
 }
 
 span.subpages {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: Don't use deprecated wfCountDown()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384131 )

Change subject: Don't use deprecated wfCountDown()
..

Don't use deprecated wfCountDown()

Change-Id: Ibaa7dcfeb10d065c2ffcbc0197c724341c44f3ca
---
M maintenance/update.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/maintenance/update.php b/maintenance/update.php
index 848334a..5441f25 100644
--- a/maintenance/update.php
+++ b/maintenance/update.php
@@ -35,7 +35,7 @@
 
if ( !$this->hasOption( 'quick' ) ) {
$this->output( "Abort with control-c in the next five 
seconds (skip this countdown with --quick) ... " );
-   wfCountDown( 5 );
+   $this->countDown( 5 );
}
 
// process the base database

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibaa7dcfeb10d065c2ffcbc0197c724341c44f3ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiLexicalData
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: DB_SLAVE --> DB_REPLICA

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384130 )

Change subject: DB_SLAVE --> DB_REPLICA
..

DB_SLAVE --> DB_REPLICA

Change-Id: I54eb9b86f02096960f93c4a643c73a8474daa98d
---
M Console/removeDuplicateExpression.php
M Console/removeDuplicateSyntrans.php
M Database scripts/Convenience/Create wikidata.php
M Database scripts/Convenience/RecreateIndexes.php
M Database scripts/Convenience/addcollection.php
M Database scripts/Incremental/23 - Bootstrap class attribute meanings.php
M Database scripts/Incremental/ReadPatch.php
M OmegaWiki/Alert.php
M OmegaWiki/Attribute.php
M OmegaWiki/DefinedMeaning.php
M OmegaWiki/DefinedMeaningModel.php
M OmegaWiki/Editor.php
M OmegaWiki/Expression.php
M OmegaWiki/OmegaWikiDatabaseAPI.php
M OmegaWiki/OmegaWikiRecordSets.php
M OmegaWiki/RecordSetQueries.php
M OmegaWiki/Search.php
M OmegaWiki/SpecialImportLangNames.php
M OmegaWiki/SpecialNeedsTranslation.php
M OmegaWiki/SpecialSuggest.php
M OmegaWiki/SpecialTransaction.php
M OmegaWiki/Transaction.php
M OmegaWiki/WikiDataAPI.php
M OmegaWiki/WikiDataGlobals.php
M OmegaWiki/WikiDataTables.php
M OmegaWiki/Wikidata.php
M OmegaWiki/languages.php
M includes/OmegaWikiTags.php
M includes/api/ApiWikiData.php
M includes/api/owAddAnnotation.php
M includes/api/owSyntrans.php
M includes/jobs/OWOwdListJob.php
M includes/jobs/WldJobs.php
M includes/specials/SpecialDatasearch.php
M includes/specials/SpecialExportTSV.php
M includes/specials/SpecialOWStatistics.php
M php-tools/DataImport.php
M php-tools/UMLSImport.php
M php-tools/UMLSMainImport.php
39 files changed, 172 insertions(+), 172 deletions(-)


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

diff --git a/Console/removeDuplicateExpression.php 
b/Console/removeDuplicateExpression.php
index b560b62..b6fcbdb 100644
--- a/Console/removeDuplicateExpression.php
+++ b/Console/removeDuplicateExpression.php
@@ -96,7 +96,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond = null;
 
@@ -136,7 +136,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond = null;
 
@@ -160,7 +160,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond = null;
 
@@ -192,7 +192,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond['ORDER BY'] = 'expression_id';
$cond['LIMIT']= 2;
@@ -225,7 +225,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond['ORDER BY'] = 'count(spelling) DESC';
$cond['GROUP BY'] = array(
diff --git a/Console/removeDuplicateSyntrans.php 
b/Console/removeDuplicateSyntrans.php
index 6a73879..c71df0f 100644
--- a/Console/removeDuplicateSyntrans.php
+++ b/Console/removeDuplicateSyntrans.php
@@ -60,7 +60,7 @@
$dc = 
wdGetDataSetContext();
}
 
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$queryResult = $dbr->delete(
"{$dc}_syntrans",
@@ -124,7 +124,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond = null;
 
@@ -374,7 +374,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond = null;
 
@@ -407,7 +407,7 @@
if ( is_null( $dc ) ) {
$dc = wdGetDataSetContext();
}
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
 
$cond['ORDER BY'] = 'count(*) DESC';
$cond['GROUP BY'] = array(
diff --git a/Database scripts/Convenience/Create wikidata.php b/Database 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: Don't use deprecated wfCountDown()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384116 )

Change subject: Don't use deprecated wfCountDown()
..

Don't use deprecated wfCountDown()

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/16/384116/1

diff --git a/wmfManageJobs.php b/wmfManageJobs.php
index 88284b8..67bb94c 100644
--- a/wmfManageJobs.php
+++ b/wmfManageJobs.php
@@ -114,7 +114,7 @@
$this->output( "\n\nThe script will now try to delete $total 
job(s), " .
"from $count different queue(s), for this wiki: 
$target\n" );
$this->output( 'Abort with control-C in the next five 
seconds...' );
-   wfCountDown( 5 );
+   $this->countDown( 5 );
 
foreach ( $deleteTypes as $type => $queue ) {
$this->output( "$type: deleting...\n" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I740b4c31ecbb20eb7ace7d945616d49931258ade
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Temporarily silence noisy warnings for dictionary upgrade

2017-10-13 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384114 )

Change subject: Temporarily silence noisy warnings for dictionary upgrade
..

Temporarily silence noisy warnings for dictionary upgrade

Bug: T175948
Change-Id: I3bb75be1d497780ced1f356bfb3e8cc81cf8faaa
---
M modules/wdqs/templates/logback.xml.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/384114/1

diff --git a/modules/wdqs/templates/logback.xml.erb 
b/modules/wdqs/templates/logback.xml.erb
index 4057019..fa9b4ca5 100644
--- a/modules/wdqs/templates/logback.xml.erb
+++ b/modules/wdqs/templates/logback.xml.erb
@@ -23,4 +23,7 @@
 
 
 
+
+
+
 

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

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

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


[MediaWiki-commits] [Gerrit] analytics/aqs[master]: [FUN] AQS for druid only

2017-10-13 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384113 )

Change subject: [FUN] AQS for druid only
..

[FUN] AQS for druid only

This patch allow lauching AQS in druid-only mode, not
requiring cassandra:
  node server.js -c config.example.druid.yaml

THIS PATCH IS NOT TO BE MERGED !!!

Change-Id: I321af524d5b6e7b6128227d5bec56cb65fc640b7
---
A config.example.druid.yaml
A projects/aqs_druid.yaml
2 files changed, 76 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/aqs 
refs/changes/13/384113/1

diff --git a/config.example.druid.yaml b/config.example.druid.yaml
new file mode 100644
index 000..bfc4f7e
--- /dev/null
+++ b/config.example.druid.yaml
@@ -0,0 +1,41 @@
+# Analytics Query Service config
+aqs_project: _project
+  x-modules:
+/:
+  - path: projects/aqs_druid.yaml
+options: _options
+  druid:
+scheme: http
+host: localhost
+port: 8082
+query_path: /druid/v2/
+
+# Swagger spec root.
+spec: _root
+  title: "The Analytics Query Service root"
+  paths:
+/{domain:analytics.wikimedia.org}: *aqs_project
+
+# The main service setup. Each worker can offer one or more services.
+services:
+  - name: aqs
+module: hyperswitch
+conf:
+  port: 7231
+  spec: *spec_root
+  salt: secret
+  default_page_size: 125
+
+logging:
+  name: aqs
+  level: info
+  #streams:
+  #- type: gelf
+  #  host: <%= @logstash_host %>
+  #  port: <%= @logstash_port %>
+
+metrics:
+  #type: txstatsd
+  #host: localhost
+  #port: 8125
+  #batch: true
diff --git a/projects/aqs_druid.yaml b/projects/aqs_druid.yaml
new file mode 100644
index 000..ba7dfef
--- /dev/null
+++ b/projects/aqs_druid.yaml
@@ -0,0 +1,35 @@
+swagger: '2.0'
+paths:
+  /{api:v1}: _project_paths_v1
+swagger: '2.0'
+# swagger options, overriding the shared ones from the merged specs (?)
+info:
+  version: 1.0.0-beta
+  title: Analytics REST API
+  description: >
+  Analytics Query Service setup
+  x-is-api-root: true
+
+x-host-basePath: /api/rest_v1
+
+x-modules:
+  /edited-pages:
+- path: v1/edited-pages.yaml
+  /editors:
+- path: v1/editors.yaml
+  /registered-users:
+- path: v1/registered-users.yaml
+  /edits:
+- path: v1/edits.yaml
+  /bytes-difference:
+- path: v1/bytes-difference.yaml
+
+  /{api:sys}:
+swagger: 2.0
+info:
+  x-is-api-root: true
+x-modules:
+  /mediawiki-history-metrics:
+- path: sys/mediawiki-history-metrics.js
+  options:
+druid: '{{options.druid}}'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I321af524d5b6e7b6128227d5bec56cb65fc640b7
Gerrit-PatchSet: 1
Gerrit-Project: analytics/aqs
Gerrit-Branch: master
Gerrit-Owner: Joal 

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


[MediaWiki-commits] [Gerrit] mediawiki/vendor[master]: Add psy/psysh 0.8.11

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

Change subject: Add psy/psysh 0.8.11
..


Add psy/psysh 0.8.11

Also improve README a bit.

Bug: T162181
Change-Id: I375c9d681999e8ff46d8bbf2120194e7a4612011
---
M README.md
M composer.json
M composer.lock
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/autoload_static.php
M composer/installed.json
A dnoegel/php-xdg-base-dir/.gitignore
A dnoegel/php-xdg-base-dir/LICENSE
A dnoegel/php-xdg-base-dir/README.md
A dnoegel/php-xdg-base-dir/composer.json
A dnoegel/php-xdg-base-dir/phpunit.xml.dist
A dnoegel/php-xdg-base-dir/src/Xdg.php
A dnoegel/php-xdg-base-dir/tests/XdgTest.php
A jakub-onderka/php-console-color/.gitignore
A jakub-onderka/php-console-color/.travis.yml
A jakub-onderka/php-console-color/build.xml
A jakub-onderka/php-console-color/composer.json
A jakub-onderka/php-console-color/example.php
A jakub-onderka/php-console-color/phpunit.xml
A 
jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/ConsoleColor.php
A 
jakub-onderka/php-console-color/src/JakubOnderka/PhpConsoleColor/InvalidStyleException.php
A 
jakub-onderka/php-console-color/tests/JakubOnderka/PhpConsoleColor/ConsoleColorTest.php
A jakub-onderka/php-console-color/tests/bootstrap.php
A jakub-onderka/php-console-highlighter/.gitignore
A jakub-onderka/php-console-highlighter/.travis.yml
A jakub-onderka/php-console-highlighter/LICENSE
A jakub-onderka/php-console-highlighter/README.md
A jakub-onderka/php-console-highlighter/build.xml
A jakub-onderka/php-console-highlighter/composer.json
A jakub-onderka/php-console-highlighter/examples/snippet.php
A jakub-onderka/php-console-highlighter/examples/whole_file.php
A jakub-onderka/php-console-highlighter/examples/whole_file_line_numbers.php
A jakub-onderka/php-console-highlighter/phpunit.xml
A 
jakub-onderka/php-console-highlighter/src/JakubOnderka/PhpConsoleHighlighter/Highlighter.php
A 
jakub-onderka/php-console-highlighter/tests/JakubOnderka/PhpConsoleHighligter/HigligterTest.php
A jakub-onderka/php-console-highlighter/tests/bootstrap.php
A nikic/php-parser/.gitignore
A nikic/php-parser/.travis.yml
A nikic/php-parser/CHANGELOG.md
A nikic/php-parser/LICENSE
A nikic/php-parser/README.md
A nikic/php-parser/UPGRADE-1.0.md
A nikic/php-parser/UPGRADE-2.0.md
A nikic/php-parser/UPGRADE-3.0.md
A nikic/php-parser/bin/php-parse
A nikic/php-parser/composer.json
A nikic/php-parser/doc/0_Introduction.markdown
A nikic/php-parser/doc/2_Usage_of_basic_components.markdown
A nikic/php-parser/doc/3_Other_node_tree_representations.markdown
A nikic/php-parser/doc/4_Code_generation.markdown
A nikic/php-parser/doc/component/Error_handling.markdown
A nikic/php-parser/doc/component/Lexer.markdown
A nikic/php-parser/grammar/README.md
A nikic/php-parser/grammar/parser.template
A nikic/php-parser/grammar/php5.y
A nikic/php-parser/grammar/php7.y
A nikic/php-parser/grammar/rebuildParsers.php
A nikic/php-parser/grammar/tokens.template
A nikic/php-parser/grammar/tokens.y
A nikic/php-parser/lib/PhpParser/Autoloader.php
A nikic/php-parser/lib/PhpParser/Builder.php
A nikic/php-parser/lib/PhpParser/Builder/Class_.php
A nikic/php-parser/lib/PhpParser/Builder/Declaration.php
A nikic/php-parser/lib/PhpParser/Builder/FunctionLike.php
A nikic/php-parser/lib/PhpParser/Builder/Function_.php
A nikic/php-parser/lib/PhpParser/Builder/Interface_.php
A nikic/php-parser/lib/PhpParser/Builder/Method.php
A nikic/php-parser/lib/PhpParser/Builder/Namespace_.php
A nikic/php-parser/lib/PhpParser/Builder/Param.php
A nikic/php-parser/lib/PhpParser/Builder/Property.php
A nikic/php-parser/lib/PhpParser/Builder/Trait_.php
A nikic/php-parser/lib/PhpParser/Builder/Use_.php
A nikic/php-parser/lib/PhpParser/BuilderAbstract.php
A nikic/php-parser/lib/PhpParser/BuilderFactory.php
A nikic/php-parser/lib/PhpParser/Comment.php
A nikic/php-parser/lib/PhpParser/Comment/Doc.php
A nikic/php-parser/lib/PhpParser/Error.php
A nikic/php-parser/lib/PhpParser/ErrorHandler.php
A nikic/php-parser/lib/PhpParser/ErrorHandler/Collecting.php
A nikic/php-parser/lib/PhpParser/ErrorHandler/Throwing.php
A nikic/php-parser/lib/PhpParser/Lexer.php
A nikic/php-parser/lib/PhpParser/Lexer/Emulative.php
A nikic/php-parser/lib/PhpParser/Node.php
A nikic/php-parser/lib/PhpParser/Node/Arg.php
A nikic/php-parser/lib/PhpParser/Node/Const_.php
A nikic/php-parser/lib/PhpParser/Node/Expr.php
A nikic/php-parser/lib/PhpParser/Node/Expr/ArrayDimFetch.php
A nikic/php-parser/lib/PhpParser/Node/Expr/ArrayItem.php
A nikic/php-parser/lib/PhpParser/Node/Expr/Array_.php
A nikic/php-parser/lib/PhpParser/Node/Expr/Assign.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseAnd.php
A nikic/php-parser/lib/PhpParser/Node/Expr/AssignOp/BitwiseOr.php
A 

[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Use upstream icon for refresh on CX dashboard

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

Change subject: Use upstream icon for refresh on CX dashboard
..

Use upstream icon for refresh on CX dashboard

Change-Id: I0aad1d7b719deb6c15bf24d65d2f4f8c9bbb25af
---
M extension.json
M modules/dashboard/ext.cx.suggestionlist.js
D modules/dashboard/images/refresh.png
D modules/dashboard/images/refresh.svg
M modules/dashboard/styles/ext.cx.suggestionlist.less
5 files changed, 39 insertions(+), 24 deletions(-)


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

diff --git a/extension.json b/extension.json
index 1da09f5..eab4bc5 100644
--- a/extension.json
+++ b/extension.json
@@ -941,7 +941,9 @@
"ext.cx.recommendtool.client",
"ext.cx.util",
"jquery.uls.data",
-   "mediawiki.storage"
+   "mediawiki.storage",
+   "oojs-ui-widgets",
+   "oojs-ui.styles.icons-interactions"
],
"messages": [
"ellipsis",
diff --git a/modules/dashboard/ext.cx.suggestionlist.js 
b/modules/dashboard/ext.cx.suggestionlist.js
index 04e539c..5e99161 100644
--- a/modules/dashboard/ext.cx.suggestionlist.js
+++ b/modules/dashboard/ext.cx.suggestionlist.js
@@ -914,11 +914,15 @@
this.$refreshTrigger.show();
return;
}
-
-   this.$refreshTrigger = $( '' )
-   .addClass( 'cx-suggestionlist__refresh' )
-   .text( mw.msg( 'cx-suggestionlist-refresh' ) )
-   .on( 'click', this.refreshPublicLists.bind( this ) );
+   this.$refreshTrigger = new OO.ui.ButtonWidget( {
+   framed: false,
+   classes: [ 'cx-suggestionlist__refresh' ],
+   flags: [
+   'progressive'
+   ],
+   icon: 'reload',
+   label: mw.msg( 'cx-suggestionlist-refresh' )
+   } ).on( 'click', this.refreshPublicLists.bind( this ) 
).$element;
 
this.$publicCollectionContainer.append( this.$refreshTrigger );
};
diff --git a/modules/dashboard/images/refresh.png 
b/modules/dashboard/images/refresh.png
deleted file mode 100644
index 96ee533..000
--- a/modules/dashboard/images/refresh.png
+++ /dev/null
Binary files differ
diff --git a/modules/dashboard/images/refresh.svg 
b/modules/dashboard/images/refresh.svg
deleted file mode 100644
index 8177d78..000
--- a/modules/dashboard/images/refresh.svg
+++ /dev/null
@@ -1 +0,0 @@
-http://www.w3.org/2000/svg; 
width="20" height="20" viewBox="0 0 20 20">refresh
\ No newline at end of file
diff --git a/modules/dashboard/styles/ext.cx.suggestionlist.less 
b/modules/dashboard/styles/ext.cx.suggestionlist.less
index 7fb6ec8..e892bfc 100644
--- a/modules/dashboard/styles/ext.cx.suggestionlist.less
+++ b/modules/dashboard/styles/ext.cx.suggestionlist.less
@@ -58,8 +58,7 @@
 }
 
 .cx-suggestionlist__collapse,
-.cx-suggestionlist__expand,
-.cx-suggestionlist__refresh {
+.cx-suggestionlist__expand {
.mw-ui-one-whole;
background-color: #fff;
border: 1px solid @colorGray12;
@@ -74,27 +73,38 @@
 }
 
 .cx-suggestionlist__refresh {
-   color: @colorProgressive;
+   background-color: #fff;
+   width: 100%;
margin-top: -10px;
+   border: 1px solid @colorGray12;
border-width: 1px 0;
border-radius: 0 0 @borderRadius @borderRadius;
-   padding: 20px;
.box-shadow-card;
-   font-weight: bold;
+   text-align: center;
 
-   &:before {
-   @iconSize: 16px;
+   &:hover {
+   background-color: #eff3fb;
+   }
 
-   content: '';
-   .background-image-svg('../images/refresh.svg', 
'../images/refresh.png');
-   background-repeat: no-repeat;
-   background-size: @iconSize;
-   display: inline-block;
-   position: relative;
-   top: 2px;
-   width: @iconSize;
-   height: @iconSize;
-   margin-right: 8px;
+   > .oo-ui-buttonElement-button {
+   width: 100%;
+   border: 0;
+
+   .oo-ui-iconElement-icon,
+   .oo-ui-labelElement-label {
+   display: inline-block;
+   position: static;
+   vertical-align: middle;
+   }
+
+   .oo-ui-iconElement-icon {
+   min-height: 20px;
+   }
+   }
+
+   // Needed to beat specificity for padding
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Simplify OutputPage constructor

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

Change subject: Simplify OutputPage constructor
..


Simplify OutputPage constructor

Make it impossible to instantiate this class without passing it
context. This appears to be the oldest wfDeprecated() in MediaWiki.
All callers have been updated.

Change-Id: I00b9e283ad22c6274b358063b9f9e60fe93d5ee7
---
M RELEASE-NOTES-1.31
M includes/OutputPage.php
2 files changed, 6 insertions(+), 9 deletions(-)

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



diff --git a/RELEASE-NOTES-1.31 b/RELEASE-NOTES-1.31
index efadf9a..498c473 100644
--- a/RELEASE-NOTES-1.31
+++ b/RELEASE-NOTES-1.31
@@ -45,7 +45,9 @@
 * The global function wfBCP47 was renamed to LanguageCode::bcp47.
 * The global function wfBCP47 is now deprecated.
 * The global function wfCountDown() is now deprecated in favor of
-  Maintenance::countDown().
+  Maintenance::countDown()
+* The OutputPage class constructor now requires a context parameter,
+  (instantiating without context was deprecated in 1.18)
 
 == Compatibility ==
 MediaWiki 1.31 requires PHP 5.5.9 or later. There is experimental support for
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 20b2c3c..7a2b7df 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -314,15 +314,10 @@
 * Constructor for OutputPage. This should not be called directly.
 * Instead a new RequestContext should be created and it will 
implicitly create
 * a OutputPage tied to that context.
-* @param IContextSource|null $context
+* @param IContextSource $context
 */
-   function __construct( IContextSource $context = null ) {
-   if ( $context === null ) {
-   # Extensions should use `new RequestContext` instead of 
`new OutputPage` now.
-   wfDeprecated( __METHOD__, '1.18' );
-   } else {
-   $this->setContext( $context );
-   }
+   function __construct( IContextSource $context ) {
+   $this->setContext( $context );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00b9e283ad22c6274b358063b9f9e60fe93d5ee7
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
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] oojs/ui[master]: [BREAKING CHANGE] Drop 'MediaWiki' backwards-compatibility t...

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

Change subject: [BREAKING CHANGE] Drop 'MediaWiki' backwards-compatibility theme
..


[BREAKING CHANGE] Drop 'MediaWiki' backwards-compatibility theme

Deprecated since v0.22.0.

Change-Id: I931638ceb91afbb678868f108ffcd65481adda6f
---
M Gruntfile.js
M README.md
M bin/testsuitegenerator.rb
M build/modules.yaml
D php/themes/MediaWikiTheme.php
D src/themes/mediawiki/MediaWikiTheme.js
D src/themes/mediawiki/theme.less
7 files changed, 1 insertion(+), 41 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index d825bf4..ad7c4cb 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -7,7 +7,6 @@
pkg = grunt.file.readJSON( 'package.json' ),
themes = {
wikimediaui: 'WikimediaUI', // Do not change this line 
or you'll break `grunt add-theme`
-   mediawiki: 'MediaWiki', // Backwards-compatibility 
wrapper
apex: 'Apex'
},
lessFiles = {},
diff --git a/README.md b/README.md
index 6ee88c4..b893890 100644
--- a/README.md
+++ b/README.md
@@ -39,7 +39,7 @@
 * One of `oojs-ui-wikimediaui.css` or `oojs-ui-apex.css`, containing 
theme-specific styles; and
 * One of `oojs-ui-wikimediaui.js` or  `oojs-ui-apex.js`, containing 
theme-specific code
 
-You can load additional icon packs from files named 
`oojs-ui-mediawiki-icons-*.css` or  `oojs-ui-apex-icons-*.css`.
+You can load additional icon packs from files named 
`oojs-ui-wikimediaui-icons-*.css` or  `oojs-ui-apex-icons-*.css`.
 
 The remaining files make it possible to load only parts of the whole library.
 
diff --git a/bin/testsuitegenerator.rb b/bin/testsuitegenerator.rb
index 3770661..5c7da37 100644
--- a/bin/testsuitegenerator.rb
+++ b/bin/testsuitegenerator.rb
@@ -21,7 +21,6 @@
testable_classes = classes
.reject{|c| c[:abstract] } # can't test abstract classes
.reject{|c| !c[:parent] || c[:trait] || c[:parent] == 'Theme' } 
# can't test abstract
-   .reject{|c| c[:name] == 'MediaWikiTheme' } # can't test abstract
.reject{|c| %w[Element Widget Layout Theme].include? c[:name] } 
# no toplevel
 
make_class_instance_placeholder = lambda do |klass, config|
diff --git a/build/modules.yaml b/build/modules.yaml
index 209ceb9..009d003 100644
--- a/build/modules.yaml
+++ b/build/modules.yaml
@@ -260,12 +260,6 @@
],
"theme": "wikimediaui"
},
-   "oojs-ui-mediawiki-icons-location": {
-   "styles": [
-   "src/themes/wikimediaui/icons-location.json"
-   ],
-   "theme": "wikimediaui"
-   },
"oojs-ui-{theme}-icons-user": {
"styles": [
"src/themes/{theme}/icons-user.json"
@@ -277,12 +271,6 @@
]
},
"oojs-ui-wikimediaui-icons-wikimedia": {
-   "styles": [
-   "src/themes/wikimediaui/icons-wikimedia.json"
-   ],
-   "theme": "wikimediaui"
-   },
-   "oojs-ui-mediawiki-icons-wikimedia": {
"styles": [
"src/themes/wikimediaui/icons-wikimedia.json"
],
diff --git a/php/themes/MediaWikiTheme.php b/php/themes/MediaWikiTheme.php
deleted file mode 100644
index 1c37218..000
--- a/php/themes/MediaWikiTheme.php
+++ /dev/null
@@ -1,6 +0,0 @@
-https://gerrit.wikimedia.org/r/354620
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I931638ceb91afbb678868f108ffcd65481adda6f
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Jforrester 
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...parsoid[master]: New run of fetch-sitematrix

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

Change subject: New run of fetch-sitematrix
..


New run of fetch-sitematrix

To add amwikimedia

Bug: T176042:
Change-Id: I112c279aa0b5e70101a586e985502f16048e63c0
---
M lib/config/sitematrix.json
1 file changed, 307 insertions(+), 1 deletion(-)

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



diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index 77ee989..3f115ae 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -26,6 +26,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Afar"
},
"1": {
@@ -46,6 +47,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Abkhazian"
},
"2": {
@@ -59,6 +61,7 @@
"sitename": "Wikipedia"
}
],
+   "dir": "ltr",
"localname": "Achinese"
},
"3": {
@@ -72,6 +75,7 @@
"sitename": "Википедие"
}
],
+   "dir": "ltr",
"localname": "Adyghe"
},
"4": {
@@ -103,6 +107,7 @@
"sitename": "Wikiquote"
}
],
+   "dir": "ltr",
"localname": "Afrikaans"
},
"5": {
@@ -130,6 +135,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Akan"
},
"6": {
@@ -164,6 +170,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Alemannisch"
},
"7": {
@@ -190,6 +197,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Amharic"
},
"8": {
@@ -209,6 +217,7 @@
"sitename": "Wiktionary"
}
],
+   "dir": "ltr",
"localname": "Aragonese"
},
"9": {
@@ -249,6 +258,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Old English"
},
"10": {
@@ -298,6 +308,7 @@
"sitename": "ويكي الجامعة"
}
],
+   "dir": "rtl",
"localname": "Arabic"
},
"11": {
@@ -311,6 +322,7 @@
"sitename": "ܘܝܩܝܦܕܝܐ"
}
],
+   "dir": "rtl",
"localname": "Aramaic"
},
"12": {
@@ -324,6 +336,7 @@
"sitename": "ويكيبيديا"
}
],
+   "dir": "rtl",
"localname": "Egyptian Arabic"
},
"13": {
@@ -357,6 +370,7 @@
"sitename": "ৱিকিউৎস"
}
],
+   "dir": "ltr",
"localname": "Assamese"
},
"14": {
@@ -390,6 +404,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Asturian"
},
"15": {
@@ -403,6 +418,7 @@
"sitename": "Wikipetcia"
}
],
+   "dir": "ltr",
"localname": "Atikamekw"
},
"16": {
@@ -423,6 +439,7 @@

[MediaWiki-commits] [Gerrit] marvin[master]: Chore: fix ESLint max length ignore directives

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384106 )

Change subject: Chore: fix ESLint max length ignore directives
..

Chore: fix ESLint max length ignore directives

`// eslint-disable-line max-len` disables the max-len rule for the given
line. However, this rule also included an `ignorePattern` for any line
with an ESLint directive. This caused the rule to be disabled AND the
line to be ignored which triggered --report-unused-disable-directives.
Remove the ignore pattern for max-len specifically so only the rule will
be disabled and the line can be checked accurately for disable directive
usage.

Change-Id: I154335c7504dc0e73339acb285e9842291a858d5
---
M .eslintrc.json
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/06/384106/1

diff --git a/.eslintrc.json b/.eslintrc.json
index 3cf0d28..0b7e2f4 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -14,7 +14,12 @@
   {
 "tabWidth": 2,
 "ignoreUrls": true,
-"ignorePattern": "^/// .+|// eslint-.+"
+// Note: exclude all eslint- directives except for max-len itself since
+//   `// eslint-disable-line max-len` would cause this line to be
+//   ignored AND this rule to be disabled which would trigger
+//   --report-unused-disable-directives. By excluding max-len, the
+//   effect is to consider the line but disable this rule.
+"ignorePattern": "^/// .+|// (?!eslint-.+max-len)eslint-.+"
   }
 ],
 "sort-imports": "off",

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Chore: add slash page test to wiki and summary tests

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384109 )

Change subject: Chore: add slash page test to wiki and summary tests
..

Chore: add slash page test to wiki and summary tests

Add tests for the slash article. RESTBase itself does not support this
specific page when used with a revision except through its redirect
which doesn't seem worth special casing.

Unsupported by RESTBase (the last case is supported by Marvin):

  https://en.wikipedia.org/api/rest_v1/page/mobile-sections///803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/%2f/803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections//

Supported by RESTBase and Marvin:

  
https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Slash_(punctuation)/803604755
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/Slash_(punctuation)
  https://en.wikipedia.org/api/rest_v1/page/mobile-sections/%2f

Bug: T177870
Change-Id: Ia63927569a946fe8f524d5135c107f1e519f0844
---
M src/common/routers/api.test.ts
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/09/384109/1

diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts
index a1023b0..1af1f34 100644
--- a/src/common/routers/api.test.ts
+++ b/src/common/routers/api.test.ts
@@ -109,6 +109,18 @@
 params: { title: "title/text", revision: "123456789" }
   },
   {
+name: "wiki (title is a slash)",
+route: wiki,
+path: "/wiki//",
+params: { title: "/", revision: undefined }
+  },
+  {
+name: "wiki (title is a slash, revision)",
+route: wiki,
+path: "/wiki///123456789/",
+params: { title: "/", revision: "123456789" }
+  },
+  {
 name: "wiki (title with every supported character class)",
 route: wiki,
 path: "/wiki/ %!\"$&'()*,-./0:;=?@A\\^_`a~\x80+",
@@ -145,6 +157,12 @@
 params: { title: "title" }
   },
   {
+name: "summary (title is a slash)",
+route: summary,
+path: "/page/summary//",
+params: { title: "/" }
+  },
+  {
 name: "summary (title with slash and trailing slash)",
 route: summary,
 path: "/page/summary/title/text/",

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Fix: page titles containing slashes

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384105 )

Change subject: Fix: page titles containing slashes
..

Fix: page titles containing slashes

Reencode page titles containing slashes for RESTBase. The following URLs
are understood by RESTBase:

  https://en.wikipedia.org/api/rest_v1/page/summary/Either%2fOr_(album)
  
https://en.wikipedia.org/api/rest_v1/page/summary/1_%2B_1_%2B_1_%2B_1_%2B_%E2%8B%AF
  https://en.wikipedia.org/api/rest_v1/page/summary/1_%2B_1_%2B_1_%2B_1_%2B_⋯
  https://en.wikipedia.org/api/rest_v1/page/summary/%2f

But URLs containing slashes are not:

  https://en.wikipedia.org/api/rest_v1/page/summary/Either/Or_(album)
  https://en.wikipedia.org/api/rest_v1/page/summary//

Bug: T177870
Change-Id: Ie5c36be54a05079ec9c6d2f04c028789ca690f25
---
M src/common/data-clients/page-data-client.ts
M src/common/data-clients/page-summary-data-client.ts
A src/common/data-clients/restbase-title-encoder.test.ts
A src/common/data-clients/restbase-title-encoder.ts
M src/common/marshallers/page-unmarshaller.ts
M src/common/pages/home.tsx
M src/common/pages/summary.tsx
M src/common/pages/wiki.tsx
M src/common/routers/route.ts
9 files changed, 54 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/05/384105/1

diff --git a/src/common/data-clients/page-data-client.ts 
b/src/common/data-clients/page-data-client.ts
index 912560d..11ca228 100644
--- a/src/common/data-clients/page-data-client.ts
+++ b/src/common/data-clients/page-data-client.ts
@@ -10,6 +10,7 @@
 import { IsomorphicHeaders } from "../types/isomorphic-unfetch-extras";
 import { JSONObject } from "../types/json";
 import { PageRedirect } from "./page-redirect";
+import reencodeRESTBaseTitlePath from "./restbase-title-encoder";
 
 // 
https://en.wikipedia.org/api/rest_v1/#!/Mobile/get_page_mobile_sections_title_revision
 export interface Params {
@@ -47,8 +48,9 @@
   const revisionPath = revision === undefined ? "" : `/${revision}`;
   const redirectParam = redirect === undefined ? "" : `=${redirect}`;
 
-  // eslint-disable-next-line max-len
-  return 
`${RESTBase.BASE_URL}/${section.path}/${titlePath}${revisionPath}${redirectParam}`;
+  return `${RESTBase.BASE_URL}/${section.path}/${reencodeRESTBaseTitlePath(
+titlePath
+  )}${revisionPath}${redirectParam}`;
 };
 
 const HEADERS = {
diff --git a/src/common/data-clients/page-summary-data-client.ts 
b/src/common/data-clients/page-summary-data-client.ts
index b22912f..5777ac9 100644
--- a/src/common/data-clients/page-summary-data-client.ts
+++ b/src/common/data-clients/page-summary-data-client.ts
@@ -4,6 +4,7 @@
 import { RESTBase } from "../marshallers/restbase";
 import { unmarshalPageSummary } from "../marshallers/page-unmarshaller";
 import { PageRedirect } from "./page-redirect";
+import reencodeRESTBaseTitlePath from "./restbase-title-encoder";
 
 // https://en.wikipedia.org/api/rest_v1/#!/Page_content/get_page_summary_title
 export interface Params {
@@ -13,7 +14,9 @@
 
 const url = ({ titlePath, redirect }: Params) => {
   const redirectParam = redirect === undefined ? "" : `=${redirect}`;
-  return `${RESTBase.BASE_URL}/page/summary/${titlePath}${redirectParam}`;
+  return `${RESTBase.BASE_URL}/page/summary/${reencodeRESTBaseTitlePath(
+titlePath
+  )}${redirectParam}`;
 };
 
 const HEADERS = {
diff --git a/src/common/data-clients/restbase-title-encoder.test.ts 
b/src/common/data-clients/restbase-title-encoder.test.ts
new file mode 100644
index 000..ae6938a
--- /dev/null
+++ b/src/common/data-clients/restbase-title-encoder.test.ts
@@ -0,0 +1,17 @@
+import * as assert from "assert";
+import reencodeRESTBaseTitlePath from "./restbase-title-encoder";
+
+describe("restbase-title-encoder", () => {
+  describe(".reencodeRESTBaseTitlePath()", () => {
+it("encodes slashes and nothing else", () => {
+  assert.deepStrictEqual(
+reencodeRESTBaseTitlePath("path/path"),
+"path%2fpath"
+  );
+});
+
+it("doesn't reencode already encoded slashes", () => {
+  assert.deepStrictEqual(reencodeRESTBaseTitlePath("%2f"), "%2f");
+});
+  });
+});
diff --git a/src/common/data-clients/restbase-title-encoder.ts 
b/src/common/data-clients/restbase-title-encoder.ts
new file mode 100644
index 000..6dfab56
--- /dev/null
+++ b/src/common/data-clients/restbase-title-encoder.ts
@@ -0,0 +1,11 @@
+import { PageTitlePath } from "../models/page/title";
+
+export default function reencodeRESTBaseTitlePath(
+  title: PageTitlePath
+): PageTitlePath {
+  // RESTBase doesn't understand page titles with slashes in them. An encoded
+  // path cannot be blindly reencoded with encodeURIComponent() because that 
may
+  // doubly encode characters which gives different meaning when its unencoded
+  // only once. Instead, target slashes specifically.
+  return title.replace("/", "%2f");
+}
diff --git 

[MediaWiki-commits] [Gerrit] marvin[master]: POC: Chore: upgrade Webpack v3.6.0 → 3.7.1

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384111 )

Change subject: POC: Chore: upgrade Webpack v3.6.0 → 3.7.1
..

POC: Chore: upgrade Webpack v3.6.0 → 3.7.1

This version dramatically increases bundle sizes.

• deepChildren option added to CommonChunkPlugin (applied in this
  patch but no change observed).
• New ContextExclusionPlugin to exclude files in a context.
• And it sounds like some important (but poorly summarized) fixes.

https://github.com/webpack/webpack/releases/tag/v3.7.0
https://github.com/webpack/webpack/releases/tag/v3.7.1

Change-Id: I3a91ee0c214624f3f8f3c38f9c51317ae6d9b01d
---
M package-lock.json
M package.json
M webpack.config.ts
3 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/11/384111/1

diff --git a/package-lock.json b/package-lock.json
index 3107df2..f089417 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -7100,9 +7100,9 @@
   }
 },
 "webpack": {
-  "version": "3.6.0",
-  "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.6.0.tgz;,
-  "integrity": 
"sha512-OsHT3D0W0KmPPh60tC7asNnOmST6bKTiR90UyEdT9QYoaJ4OYN4Gg7WK1k3VxHK07ZoiYWPsKvlS/gAjwL/vRA==",
+  "version": "3.7.1",
+  "resolved": "https://registry.npmjs.org/webpack/-/webpack-3.7.1.tgz;,
+  "integrity": 
"sha512-8MR+gVfxsvtx4J1UlbRGkUJEpDQUBFmisRmpPO5cVLgF21R8UMChX39OOjDz63a+m/iswGoqATszdZB2VCsYuA==",
   "dev": true,
   "requires": {
 "acorn": "5.1.1",
diff --git a/package.json b/package.json
index ff2b3c2..5edf547 100644
--- a/package.json
+++ b/package.json
@@ -89,7 +89,7 @@
 "ts-node": "3.3.0",
 "typescript": "2.5.3",
 "typescript-eslint-parser": "8.0.0",
-"webpack": "3.6.0",
+"webpack": "3.7.1",
 "webpack-dev-server": "2.9.1",
 "wikimedia-ui-base": "0.9.2"
   }
diff --git a/webpack.config.ts b/webpack.config.ts
index e5c960c..aa064cc 100644
--- a/webpack.config.ts
+++ b/webpack.config.ts
@@ -247,6 +247,7 @@
   // 
https://webpack.js.org/plugins/commons-chunk-plugin/#move-common-modules-into-the-parent-chunk
   new webpack.optimize.CommonsChunkPlugin({
 children: true,
+...({ deepChildren: true } as {}), // Include all descendants too.
 minChunks: 3
   }),
 

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Chore: upgrade server and dev dependencies

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384110 )

Change subject: Chore: upgrade server and dev dependencies
..

Chore: upgrade server and dev dependencies

No changes to bundle sizes observed.

• preact-render-to-string v3.6.3 → 3.7.0
  New TypeScript definitions (this patch removes the old ones).

  https://github.com/developit/preact-render-to-string/releases/tag/3.7.0

• Express v4.16.1 → 4.16.2
  https://github.com/expressjs/express/releases/tag/4.16.2

• @types/node v8.0.32 → 8.0.34

Change-Id: I62a419650dd1e16719472e42e44d0dcb9002c6ea
---
M package-lock.json
M package.json
D src/server/types/preact-render-to-string.d.ts
3 files changed, 53 insertions(+), 79 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/10/384110/1

diff --git a/package-lock.json b/package-lock.json
index 8d26de0..3107df2 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -38,7 +38,7 @@
   "integrity": 
"sha512-UpN389YLcQEIn1t4Kxc8TlCrg43r6o8IcF57LvmbCGNhWzz0dEg4AaUsN6IHrrSjPzPmmJ1FLYXGPP/expXOWg==",
   "dev": true,
   "requires": {
-"@types/node": "8.0.32"
+"@types/node": "8.0.34"
   }
 },
 "@types/extract-text-webpack-plugin": {
@@ -69,9 +69,9 @@
   "dev": true
 },
 "@types/node": {
-  "version": "8.0.32",
-  "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.32.tgz;,
-  "integrity": 
"sha512-n1zzgeQehndikZc/8N4rGSZc99cO6Tb3OInKzvWYniJsT/jet3m57buaBFa5cMeVNFosN4PKZ2LM1y16CFD7Rg==",
+  "version": "8.0.34",
+  "resolved": "https://registry.npmjs.org/@types/node/-/node-8.0.34.tgz;,
+  "integrity": 
"sha512-Jnmm57+nHqvJUPwUzt1CLoLzFtF2B2vgG7cWFut+a4nqTp9/L6pL0N+o0Jt3V7AQnCKMsPEqQpLFZYleBCdq3w==",
   "dev": true
 },
 "@types/node-fetch": {
@@ -80,7 +80,7 @@
   "integrity": "sha1-UhB46PDGmhWOUCIAWsqS0mIPbVc=",
   "dev": true,
   "requires": {
-"@types/node": "8.0.32"
+"@types/node": "8.0.34"
   }
 },
 "@types/serve-static": {
@@ -111,7 +111,7 @@
   "integrity": 
"sha512-Bskfd5wztYbQ/mvU4rgHUB3fKcjW2hA6o/F0JN8O+jRPJQDN/2pPV6SmdIiFm2vLyyN/XQzoCULTE05ZOpnNbQ==",
   "dev": true,
   "requires": {
-"@types/node": "8.0.32"
+"@types/node": "8.0.34"
   }
 },
 "@types/uglify-js": {
@@ -129,7 +129,7 @@
   "integrity": 
"sha512-xXqusBBKbYb8fA1jtE3iO75uRW1ejqGuH93V+6fhbfNY59ndKjfhftJVxcSaYAMDjmFTRBHy82d+513JKuHD5g==",
   "dev": true,
   "requires": {
-"@types/node": "8.0.32",
+"@types/node": "8.0.34",
 "@types/tapable": "0.2.3",
 "@types/uglify-js": "2.6.29"
   }
@@ -631,9 +631,9 @@
   "dev": true
 },
 "browserify-aes": {
-  "version": "1.0.8",
-  "resolved": 
"https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.0.8.tgz;,
-  "integrity": 
"sha512-WYCMOT/PtGTlpOKFht0YJFYcPy6pLCR98CtWfzK13zoynLlBMvAdEMSRGmgnJCw2M2j/5qxBkinZQFobieM8dQ==",
+  "version": "1.1.0",
+  "resolved": 
"https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.1.0.tgz;,
+  "integrity": 
"sha512-W2bIMLYoZ9oow7TyePpMJk9l9LY7O3R61a/68bVCDOtnJynnwe3ZeW2IzzSkrQnPKNdJrxVDn3ALZNisSBwb7g==",
   "dev": true,
   "requires": {
 "buffer-xor": "1.0.3",
@@ -650,7 +650,7 @@
   "integrity": "sha1-mYgkSHS/XtTijalWZtzWasj8Njo=",
   "dev": true,
   "requires": {
-"browserify-aes": "1.0.8",
+"browserify-aes": "1.1.0",
 "browserify-des": "1.0.0",
 "evp_bytestokey": "1.0.3"
   }
@@ -1171,7 +1171,7 @@
 "cipher-base": "1.0.4",
 "inherits": "2.0.3",
 "ripemd160": "2.0.1",
-"sha.js": "2.4.8"
+"sha.js": "2.4.9"
   }
 },
 "create-hmac": {
@@ -1185,7 +1185,7 @@
 "inherits": "2.0.3",
 "ripemd160": "2.0.1",
 "safe-buffer": "5.1.1",
-"sha.js": "2.4.8"
+"sha.js": "2.4.9"
   }
 },
 "cross-spawn": {
@@ -1333,7 +1333,7 @@
   "integrity": "sha1-dUu1v+VUUdpppYuU1F9MWwRi1Y8=",
   "dev": true,
   "requires": {
-"es5-ext": "0.10.30"
+"es5-ext": "0.10.35"
   }
 },
 "date-now": {
@@ -1445,7 +1445,7 @@
   "dev": true,
   "requires": {
 "bn.js": "4.11.8",
-"miller-rabin": "4.0.0",
+"miller-rabin": "4.0.1",
 "randombytes": "2.0.5"
   }
 },
@@ -1671,9 +1671,9 @@
   }
 },
 "es5-ext": {
-  "version": "0.10.30",
-  "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.30.tgz;,
-  "integrity": "sha1-cUGhaDZpfbq/qq7uQUlc4p9SyTk=",
+  "version": "0.10.35",
+  "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.35.tgz;,
+  "integrity": "sha1-GO6FjOajxFx9eekcFfzKnsVoSU8=",
   "dev": true,
   "requires": {
 "es6-iterator": "2.0.1",
@@ -1687,7 +1687,7 @@
   "dev": true,
   "requires": 

[MediaWiki-commits] [Gerrit] marvin[master]: Fix: accept all valid title characters for summaries

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384108 )

Change subject: Fix: accept all valid title characters for summaries
..

Fix: accept all valid title characters for summaries

Accept slashes and other valid wiki page titles when interpreting
summary endpoint URLs.

Bug: T177870
Change-Id: I50b4a9821dcaa162e707634798fc6f65c1220156
---
M src/common/routers/api.test.ts
M src/common/routers/api.ts
2 files changed, 32 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/08/384108/1

diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts
index 73eba6a..a1023b0 100644
--- a/src/common/routers/api.test.ts
+++ b/src/common/routers/api.test.ts
@@ -127,12 +127,36 @@
 }
   },
   {
-name: "summary",
+name: "summary (title)",
 route: summary,
 path: "/page/summary/title",
 params: { title: "title" }
   },
   {
+name: "summary (title with slash)",
+route: summary,
+path: "/page/summary/title/text",
+params: { title: "title/text" }
+  },
+  {
+name: "summary (title with trailing slash)",
+route: summary,
+path: "/page/summary/title/",
+params: { title: "title" }
+  },
+  {
+name: "summary (title with slash and trailing slash)",
+route: summary,
+path: "/page/summary/title/text/",
+params: { title: "title/text" }
+  },
+  {
+name: "summary (title with every supported character class)",
+route: summary,
+path: "/page/summary/ %!\"$&'()*,-./0:;=?@A\\^_`a~\x80+",
+params: { title: " %!\"$&'()*,-./0:;=?@A\\^_`a~\x80+" }
+  },
+  {
 name: "random (wiki)",
 route: randomWiki,
 path: "/random/wiki",
diff --git a/src/common/routers/api.ts b/src/common/routers/api.ts
index dc79930..9473781 100644
--- a/src/common/routers/api.ts
+++ b/src/common/routers/api.ts
@@ -25,18 +25,22 @@
   chunkName: "pages/about"
 });
 
+const TITLE_CHARACTER_REGEX_STRING =
+  "[ %!\"$&'\\(\\)*,\\-.\\/0-9:;=?@A-Z^_`a-z~\\x80-\\xFF+]";
+
 export const wiki: Route = newRoute({
   // https://www.mediawiki.org/wiki/Manual:$wgLegalTitleChars
   // https://en.wikipedia.org/w/api.php?action=query=siteinfo
-  path:
-"/wiki/:title([ 
%!\"$&'\\(\\)*,\\-.\\/0-9:;=?@A-Z^_`a-z~\\x80-\\xFF+]+?)/:revision(\\d+)?", 
// eslint-disable-line max-len
+  path: `/wiki/:title(${TITLE_CHARACTER_REGEX_STRING}+?)/:revision(\\d+)?`, // 
eslint-disable-line max-len
   importModule: () =>
 import(/* webpackChunkName: "pages/wiki" */ "../pages/wiki"),
   chunkName: "pages/wiki"
 });
 
 export const summary: Route = newRoute({
-  path: "/page/summary/:title",
+  // Note: title is specified as non-greedy here only to omit a trailing slash
+  //   from the title as the wiki endpoint does.
+  path: `/page/summary/:title(${TITLE_CHARACTER_REGEX_STRING}+?)`,
   importModule: () =>
 import(/* webpackChunkName: "pages/summary" */ "../pages/summary"),
   chunkName: "pages/summary"

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

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

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


[MediaWiki-commits] [Gerrit] marvin[master]: Fix: accept all valid title characters for wiki pages

2017-10-13 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384107 )

Change subject: Fix: accept all valid title characters for wiki pages
..

Fix: accept all valid title characters for wiki pages

Accept slashes and other valid wiki page titles when interpreting wiki
endpoint URLs. The following URLs were tested manually:

  http://localhost:3000/wiki/Either/Or_(album)/800159225
  http://localhost:3000/wiki/Dog/
  http://localhost:3000/wiki/Ice_cream_cake/24242119
  http://localhost:3000/wiki/Planet
  http://localhost:3000/wiki/1%20+%201%20+%201%20+%201%20+%20%E2%8B%AF
  http://localhost:3000/wiki/1_+_1_+_1_+_1_+_⋯
  http://localhost:3000/wiki/1 + 1 + 1 + 1 + ⋯

Bug: T177870
Change-Id: I040caff1fdc956d870e94d05c56e81e51a3886e2
---
M src/common/routers/api.test.ts
M src/common/routers/api.ts
2 files changed, 127 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/07/384107/1

diff --git a/src/common/routers/api.test.ts b/src/common/routers/api.test.ts
index 99d2d3b..73eba6a 100644
--- a/src/common/routers/api.test.ts
+++ b/src/common/routers/api.test.ts
@@ -11,16 +11,24 @@
 } from "./api";
 import { Route, RouteParams } from "./route";
 
-const testPathParams = ({
+interface TestParams {
+  name: string;
+  route: Route;
+  // The raw path. Only path-to-regexp knows how to construct a path from 
params
+  // but escapes the inputs in the process. Since Route.toParams() is usually
+  // passed an unescaped string, it's worth manually assembling an unescaped
+  // path to test this scenario.
+  path: string;
+  params: Params;
+}
+
+const testPathParams = ({
   name,
   route,
+  path,
   params
-}: {
-  name: string;
-  route: Route;
-  params: Params;
-}) =>
-  it(name, () => {
+}: TestParams) => {
+  it(`${name} path and parameter types are in sync`, () => {
 const expected: RouteParams = {};
 Object.keys((params as RouteParams) || {}).forEach(name => {
   const value = (params as RouteParams)[name];
@@ -33,26 +41,125 @@
 assert.deepStrictEqual(result, expected);
   });
 
+  it(`${name} unescaped path matches`, () => {
+const expected: RouteParams = {};
+Object.keys((params as RouteParams) || {}).forEach(name => {
+  const value = (params as RouteParams)[name];
+  expected[name] = value;
+});
+
+const result = route.toParams(path);
+assert.deepStrictEqual(result, expected);
+  });
+};
+
 describe("api", () => {
   describe("each route's path and URL path parameters match:", () => {
 [
-  { name: "home", route: home, params: undefined },
-  { name: "about", route: about, params: undefined },
+  // Note: these types are verified to be RouteParams but not verified
+  //   to be their specific route's type.
+  { name: "home", route: home, path: "/", params: undefined },
+  { name: "about", route: about, path: "/about", params: undefined },
   {
-name: "wiki (latest)",
+name: "wiki (title)",
 route: wiki,
+path: "/wiki/title",
 params: { title: "title", revision: undefined }
   },
   {
-name: "wiki (revision)",
+name: "wiki (title, revision)",
 route: wiki,
+path: "/wiki/title/1",
 params: { title: "title", revision: "1" }
   },
-  { name: "summary", route: summary, params: { title: "title" } },
-  { name: "random (wiki)", route: randomWiki, params: undefined },
-  { name: "random (summary)", route: randomSummary, params: undefined },
-  { name: "styleGuide", route: styleGuide, params: undefined },
-  { name: "notFound", route: notFound, params: { 0: "/404" } }
+  {
+name: "wiki (title with slash)",
+route: wiki,
+path: "/wiki/title/text",
+params: { title: "title/text", revision: undefined }
+  },
+  {
+name: "wiki (title with slash, revision)",
+route: wiki,
+path: "/wiki/title/text/123456789",
+params: { title: "title/text", revision: "123456789" }
+  },
+  {
+name: "wiki (title with trailing slash)",
+route: wiki,
+path: "/wiki/title/",
+params: { title: "title", revision: undefined }
+  },
+  {
+name: "wiki (title with trailing slash, revision)",
+route: wiki,
+path: "/wiki/title/123456789/",
+params: { title: "title", revision: "123456789" }
+  },
+  {
+name: "wiki (title with slash and trailing slash)",
+route: wiki,
+path: "/wiki/title/text/",
+params: { title: "title/text", revision: undefined }
+  },
+  {
+name: "wiki (title with slash and trailing slash, revision)",
+route: wiki,
+path: "/wiki/title/text/123456789/",
+params: { title: "title/text", revision: "123456789" }
+  },
+  {
+name: "wiki 

[MediaWiki-commits] [Gerrit] mediawiki...OAuthAuthentication[master]: Replace deprecated wfRunHooks() with Hooks::run()

2017-10-13 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384104 )

Change subject: Replace deprecated wfRunHooks() with Hooks::run()
..

Replace deprecated wfRunHooks() with Hooks::run()

Change-Id: I0cb724aee17949e86a045ab616407351afb4ca63
---
M handlers/AuthenticationHandler.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/handlers/AuthenticationHandler.php 
b/handlers/AuthenticationHandler.php
index 7e944f4..78a5470 100644
--- a/handlers/AuthenticationHandler.php
+++ b/handlers/AuthenticationHandler.php
@@ -2,6 +2,7 @@
 
 namespace MediaWiki\Extensions\OAuthAuthentication;
 
+use Hooks;
 use MediaWiki\OAuthClient\Token;
 
 class AuthenticationHandler {
@@ -79,7 +80,7 @@
$u->addWatch( $u->getUserPage(), 
\WatchedItem::IGNORE_USER_RIGHTS );
$u->saveSettings();
 
-   wfRunHooks( 'AddNewAccount', [ $u, false ] );
+   Hooks::run( 'AddNewAccount', [ $u, false ] );
 
$exUser->setLocalId( $u->getId() );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cb724aee17949e86a045ab616407351afb4ca63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuthAuthentication
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] analytics/aqs[master]: Correct bug in druid URI building

2017-10-13 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384103 )

Change subject: Correct bug in druid URI building
..

Correct bug in druid URI building

Change-Id: I799d84ba23c2b7df0a262fada755bb8c3b1f424f
---
M sys/mediawiki-history-metrics.js
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/aqs 
refs/changes/03/384103/1

diff --git a/sys/mediawiki-history-metrics.js b/sys/mediawiki-history-metrics.js
index 7a7b916..54e9fec 100644
--- a/sys/mediawiki-history-metrics.js
+++ b/sys/mediawiki-history-metrics.js
@@ -44,7 +44,6 @@
 uri += (druid.scheme) ? druid.scheme + '://' : '';
 uri += druid.host || '';
 uri += (druid.port) ? ':' + druid.port : '';
-uri += druid.host || '';
 uri += druid.query_path || '';
 
 return uri;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I799d84ba23c2b7df0a262fada755bb8c3b1f424f
Gerrit-PatchSet: 1
Gerrit-Project: analytics/aqs
Gerrit-Branch: master
Gerrit-Owner: Joal 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: New run of fetch-sitematrix

2017-10-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384098 )

Change subject: New run of fetch-sitematrix
..

New run of fetch-sitematrix

To add amwikimedia

Bug: T176042:
Change-Id: I112c279aa0b5e70101a586e985502f16048e63c0
---
M lib/config/sitematrix.json
1 file changed, 307 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/98/384098/1

diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index 77ee989..3f115ae 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -26,6 +26,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Afar"
},
"1": {
@@ -46,6 +47,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Abkhazian"
},
"2": {
@@ -59,6 +61,7 @@
"sitename": "Wikipedia"
}
],
+   "dir": "ltr",
"localname": "Achinese"
},
"3": {
@@ -72,6 +75,7 @@
"sitename": "Википедие"
}
],
+   "dir": "ltr",
"localname": "Adyghe"
},
"4": {
@@ -103,6 +107,7 @@
"sitename": "Wikiquote"
}
],
+   "dir": "ltr",
"localname": "Afrikaans"
},
"5": {
@@ -130,6 +135,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Akan"
},
"6": {
@@ -164,6 +170,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Alemannisch"
},
"7": {
@@ -190,6 +197,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Amharic"
},
"8": {
@@ -209,6 +217,7 @@
"sitename": "Wiktionary"
}
],
+   "dir": "ltr",
"localname": "Aragonese"
},
"9": {
@@ -249,6 +258,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Old English"
},
"10": {
@@ -298,6 +308,7 @@
"sitename": "ويكي الجامعة"
}
],
+   "dir": "rtl",
"localname": "Arabic"
},
"11": {
@@ -311,6 +322,7 @@
"sitename": "ܘܝܩܝܦܕܝܐ"
}
],
+   "dir": "rtl",
"localname": "Aramaic"
},
"12": {
@@ -324,6 +336,7 @@
"sitename": "ويكيبيديا"
}
],
+   "dir": "rtl",
"localname": "Egyptian Arabic"
},
"13": {
@@ -357,6 +370,7 @@
"sitename": "ৱিকিউৎস"
}
],
+   "dir": "ltr",
"localname": "Assamese"
},
"14": {
@@ -390,6 +404,7 @@
"closed": ""
}
],
+   "dir": "ltr",
"localname": "Asturian"
},
"15": {
@@ -403,6 +418,7 @@
"sitename": "Wikipetcia"
}
],
+   "dir": "ltr",
"localname": "Atikamekw"
},
"16": {
@@ -423,6 +439,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use ContentHandler to get proper MIME type in RawAction

2017-10-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384096 )

Change subject: Use ContentHandler to get proper MIME type in RawAction
..

Use ContentHandler to get proper MIME type in RawAction

Bug: T178060
Change-Id: Ief135af917b58ea119b1ed1ee21acb187170ba5e
---
M includes/actions/RawAction.php
M includes/content/ContentHandler.php
M includes/content/CssContentHandler.php
M includes/content/JavaScriptContentHandler.php
M includes/content/JsonContentHandler.php
5 files changed, 41 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/384096/1

diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php
index d8c8bc3..f058570 100644
--- a/includes/actions/RawAction.php
+++ b/includes/actions/RawAction.php
@@ -33,6 +33,9 @@
  * @ingroup Actions
  */
 class RawAction extends FormlessAction {
+
+   private $contentType;
+
public function getName() {
return 'raw';
}
@@ -64,12 +67,16 @@
$this->gen = true;
}
 
-   $contentType = $this->getContentType();
+   $text = $this->getRawText();
+   // Sanity check
+   if ( $this->contentType === null ) {
+   $this->contentType = 'text/x-wiki';
+   }
 
$maxage = $request->getInt( 'maxage', $config->get( 
'SquidMaxage' ) );
$smaxage = $request->getIntOrNull( 'smaxage' );
if ( $smaxage === null ) {
-   if ( $contentType == 'text/css' || $contentType == 
'text/javascript' ) {
+   if ( $this->contentType == 'text/css' || 
$this->contentType == 'text/javascript' ) {
// CSS/JS raw content has its own CDN max age 
configuration.
// Note: Title::getCdnUrls() includes 
action=raw for css/js pages,
// so if using the canonical url, this will get 
HTCP purges.
@@ -86,7 +93,7 @@
$response->header( $this->getOutput()->getKeyHeader() );
}
 
-   $response->header( 'Content-type: ' . $contentType . '; 
charset=UTF-8' );
+   $response->header( 'Content-type: ' . $this->contentType . '; 
charset=UTF-8' );
// Output may contain user-specific data;
// vary generated content for open sessions on private wikis
$privateCache = !User::isEveryoneAllowed( 'read' ) &&
@@ -98,13 +105,11 @@
'Cache-Control: ' . $mode . ', s-maxage=' . $smaxage . 
', max-age=' . $maxage
);
 
-   $text = $this->getRawText();
-
// Don't return a 404 response for CSS or JavaScript;
// 404s aren't generally cached and it would create
// extra hits when user CSS/JS are on and the user doesn't
// have the pages.
-   if ( $text === false && $contentType == 'text/x-wiki' ) {
+   if ( $text === false && $this->contentType == 'text/x-wiki' ) {
$response->statusHeader( 404 );
}
 
@@ -161,6 +166,7 @@
} else {
// want a section?
$section = $request->getIntOrNull( 
'section' );
+   $this->updateContentType( $content );
if ( $section !== null ) {
$content = 
$content->getSection( $section );
}
@@ -219,28 +225,25 @@
return $oldid;
}
 
-   /**
-* Get the content type to use for the response
-*
-* @return string
-*/
-   public function getContentType() {
-   $ctype = $this->getRequest()->getVal( 'ctype' );
+   private function updateContentType( Content $content ) {
+   $cType = $this->getRequest()->getVal( 'ctype' );
 
-   if ( $ctype == '' ) {
+   if ( $cType == '' ) {
$gen = $this->getRequest()->getVal( 'gen' );
if ( $gen == 'js' ) {
-   $ctype = 'text/javascript';
+   $cType = 'text/javascript';
} elseif ( $gen == 'css' ) {
-   $ctype = 'text/css';
+   $cType = 'text/css';
}
}
 
$allowedCTypes = [ 'text/x-wiki', 'text/javascript', 
'text/css', 'application/x-zope-edit' ];
-   if ( $ctype == '' || !in_array( $ctype, $allowedCTypes ) ) {
-   $ctype = 'text/x-wiki';
+   if ( $cType == 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Add amwikimedia to restbase domains

2017-10-13 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384095 )

Change subject: Add amwikimedia to restbase domains
..

Add amwikimedia to restbase domains

Bug: T176042
Change-Id: I5e2c35b9a9fae5ea33210520c15a1609a832240b
---
M scap/vars.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/restbase/deploy 
refs/changes/95/384095/1

diff --git a/scap/vars.yaml b/scap/vars.yaml
index 870caa0..656fc15 100644
--- a/scap/vars.yaml
+++ b/scap/vars.yaml
@@ -783,6 +783,7 @@
 vi.wikivoyage.org: default_project
 zh.wikivoyage.org: default_project
   Wikimedia:
+am.wikimedia.org: default_project
 ar.wikimedia.org: default_project
 bd.wikimedia.org: default_project
 be.wikimedia.org: default_project

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e2c35b9a9fae5ea33210520c15a1609a832240b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/restbase/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove old workaround for HHVM

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

Change subject: Remove old workaround for HHVM
..


Remove old workaround for HHVM

The bug in question was fixed in HHVM 3.6.0, our minimum requirement is 3.6.5.

Change-Id: Id1d65cf438c7148064d747f09728ef4cb5f51b52
---
M maintenance/Maintenance.php
1 file changed, 1 insertion(+), 7 deletions(-)

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



diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index ecbbb85..4ad6e6e 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -1444,13 +1444,7 @@
}
 
if ( $isatty && function_exists( 'readline' ) ) {
-   $resp = readline( $prompt );
-   if ( $resp === null ) {
-   // Workaround for 
https://github.com/facebook/hhvm/issues/4776
-   return false;
-   } else {
-   return $resp;
-   }
+   return readline( $prompt );
} else {
if ( $isatty ) {
$st = self::readlineEmulation( $prompt );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id1d65cf438c7148064d747f09728ef4cb5f51b52
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Reedy 
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]: Fix collapsing of References.

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

Change subject: Fix collapsing of References.
..


Fix collapsing of References.

The page library collapses tables that are contained in a  element.
However, the list of references at the bottom of articles is not actually
a table, so it needs to be manually wrapped in a  tag.

The iOS app actually does this in native code (?) before passing the HTML
to the WebView, but we can do it as part of our transforms.

Bug: T177863
Change-Id: I1212b8336635cf6d6742ff659c0794ea6ea93254
---
M app/src/main/assets/bundle.js
M www/js/transforms/hideRefs.js
2 files changed, 25 insertions(+), 73 deletions(-)

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



diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index 6baef47..5aeed8d 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -769,51 +769,27 @@
 
 
},{"../transformer":11,"wikimedia-page-library":19}],13:[function(require,module,exports){
 var transformer = require("../transformer");
-var collapseTables = require("./collapseTables");
 
 transformer.register( "hideRefs", function( content ) {
 var refLists = content.querySelectorAll( "div.reflist" );
 for (var i = 0; i < refLists.length; i++) {
-var caption = "" + 
window.string_expand_refs + "";
+// Wrap this div in a , so that it will be caught by the 
pagelibrary for collapsing.
+var table = document.createElement( 'table' );
+var tr = document.createElement( 'tr' );
+var th = document.createElement( 'th' );
+var td = document.createElement( 'td' );
+th.style.display = "none";
+th.innerHTML = window.string_expand_refs;
+table.appendChild(th);
+table.appendChild(tr);
+tr.appendChild(td);
 
-//create the container div that will contain both the original table
-//and the collapsed version.
-var containerDiv = document.createElement( 'div' );
-containerDiv.className = 'app_table_container';
-refLists[i].parentNode.insertBefore(containerDiv, refLists[i]);
+refLists[i].parentNode.insertBefore(table, refLists[i]);
 refLists[i].parentNode.removeChild(refLists[i]);
-
-//create the collapsed div
-var collapsedDiv = document.createElement( 'div' );
-collapsedDiv.classList.add('app_table_collapsed_container');
-collapsedDiv.classList.add('app_table_collapsed_open');
-collapsedDiv.innerHTML = caption;
-
-//create the bottom collapsed div
-var bottomDiv = document.createElement( 'div' );
-bottomDiv.classList.add('app_table_collapsed_bottom');
-bottomDiv.classList.add('app_table_collapse_icon');
-bottomDiv.innerHTML = window.string_table_close;
-
-//add our stuff to the container
-containerDiv.appendChild(collapsedDiv);
-containerDiv.appendChild(refLists[i]);
-containerDiv.appendChild(bottomDiv);
-
-//give it just a little padding
-refLists[i].style.padding = "4px";
-
-//set initial visibility
-refLists[i].style.display = 'none';
-collapsedDiv.style.display = 'block';
-bottomDiv.style.display = 'none';
-
-//assign click handler to the collapsed divs
-collapsedDiv.onclick = collapseTables.handleTableCollapseOrExpandClick;
-bottomDiv.onclick = collapseTables.handleTableCollapseOrExpandClick;
+td.appendChild(refLists[i]);
 }
 } );
-},{"../transformer":11,"./collapseTables":12}],14:[function(require,module,exports){
+},{"../transformer":11}],14:[function(require,module,exports){
 var transformer = require("../../transformer");
 
 transformer.register( "anchorPopUpMediaTransforms", function( content ) {
diff --git a/www/js/transforms/hideRefs.js b/www/js/transforms/hideRefs.js
index 98e1e59..6700b19 100644
--- a/www/js/transforms/hideRefs.js
+++ b/www/js/transforms/hideRefs.js
@@ -1,45 +1,21 @@
 var transformer = require("../transformer");
-var collapseTables = require("./collapseTables");
 
 transformer.register( "hideRefs", function( content ) {
 var refLists = content.querySelectorAll( "div.reflist" );
 for (var i = 0; i < refLists.length; i++) {
-var caption = "" + 
window.string_expand_refs + "";
+// Wrap this div in a , so that it will be caught by the 
pagelibrary for collapsing.
+var table = document.createElement( 'table' );
+var tr = document.createElement( 'tr' );
+var th = document.createElement( 'th' );
+var td = document.createElement( 'td' );
+th.style.display = "none";
+th.innerHTML = window.string_expand_refs;
+table.appendChild(th);
+table.appendChild(tr);
+tr.appendChild(td);
 
-//create the container div that will contain both 

[MediaWiki-commits] [Gerrit] mediawiki...GettingStarted[master]: Use standard close icon

2017-10-13 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/384094 )

Change subject: Use standard close icon
..

Use standard close icon

Making use of standard close icon and add `opacity` transition
for slight user feedback on states.

Bug: T50067
Change-Id: Ief0dc70d7a59ec1b21e0bcf6fea022c4f4394199
---
M resources/ext.gettingstarted.return.less
D resources/images/x.png
D resources/images/x.svg
M resources/lightbulb/lightbulb.postEdit.less
4 files changed, 26 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GettingStarted 
refs/changes/94/384094/1

diff --git a/resources/ext.gettingstarted.return.less 
b/resources/ext.gettingstarted.return.less
index f77ce1c..bef28b6 100644
--- a/resources/ext.gettingstarted.return.less
+++ b/resources/ext.gettingstarted.return.less
@@ -93,11 +93,21 @@
 }
 
 .mw-gettingstarted-cta-close {
+   .background-image-svg( 'images/close.svg', 'images/close.png' );
float: right;
-   width: 13px;
-   height: 13px;
+   width: 20px;
+   height: 20px;
margin-left: 20px; /* Prevents text from getting close */
-   .background-image-svg( 'images/x.svg', 'images/x.png' );
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: #fff`, 
closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
 }
 
 .mw-gettingstarted-cta-heading {
diff --git a/resources/images/x.png b/resources/images/x.png
deleted file mode 100644
index fd361f8..000
--- a/resources/images/x.png
+++ /dev/null
Binary files differ
diff --git a/resources/images/x.svg b/resources/images/x.svg
deleted file mode 100644
index 938fd51..000
--- a/resources/images/x.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd;>
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; x="0px" y="0px"
-viewBox="0 0 96 96" enable-background="new 0 0 96 96" 
xml:space="preserve">
-
-
diff --git a/resources/lightbulb/lightbulb.postEdit.less 
b/resources/lightbulb/lightbulb.postEdit.less
index 0180021..26b25e8 100644
--- a/resources/lightbulb/lightbulb.postEdit.less
+++ b/resources/lightbulb/lightbulb.postEdit.less
@@ -50,12 +50,22 @@
}
 
.mw-gettingstarted-lightbulb-notification-hide {
+   .background-image-svg( '../images/close.svg', 
'../images/close.png' );
position: absolute;
-   width: 13px;
-   height: 13px;
-   .background-image-svg( '../images/x.svg', '../images/x.png' );
+   width: 20px;
+   height: 20px;
top: 19px;
right: 19px;
+   opacity: 0.87; // = `#222` on `background-color: #fff`
+   .transition( opacity 100ms );
+
+   &:hover {
+   opacity: 0.73; // = `#454545` on `background-color: 
#fff`, closest to `#444`
+   }
+
+   &:active {
+   opacity: 1;
+   }
}
 
.mw-gettingstarted-lightbulb-notification-body {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ief0dc70d7a59ec1b21e0bcf6fea022c4f4394199
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
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...WikimediaMaintenance[master]: Remove migrateWlmUploads.php

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

Change subject: Remove migrateWlmUploads.php
..


Remove migrateWlmUploads.php

It was a one-off script to move a bunch of files across wikis for
a very specific use case. It served its purpose so it can go.

Change-Id: Ie339aa7695137454e16449c649afc42db8eebfdd
---
D migrateWlmUploads.php
1 file changed, 0 insertions(+), 200 deletions(-)

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



diff --git a/migrateWlmUploads.php b/migrateWlmUploads.php
deleted file mode 100644
index 0a1e51c..000
--- a/migrateWlmUploads.php
+++ /dev/null
@@ -1,200 +0,0 @@
-http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- * @ingroup Maintenance
- * @ingroup Wikimedia
- */
-
-require_once __DIR__ . '/WikimediaMaintenance.php';
-
-class MigrateWlmUploads extends Maintenance {
-   private $dryRun,
-   $testerUsernames = [
-   'Jdlrobson',
-   'Tfinc',
-   'Brion VIBBER',
-   'Awjrichards',
-   'Philinje',
-   ],
-   $home,
-   $logFiles = [ 'found', 'done', 'exists', 'nouser' ],
-   $tmpDir,
-   $deletingUser;
-
-   /* @var IDatabase */
-   private $commonsDbw;
-
-   public function __construct() {
-   parent::__construct();
-   $this->addDescription( 'Migrate botched up uploads from 
testwiki to Commons' );
-   $this->addOption( 'do-it', 'Actually perform the migration 
(otherwise a dry run will be performed)' );
-   }
-
-   public function execute() {
-   global $wgDBname;
-   if ( $wgDBname != 'testwiki' ) {
-   $this->error( 'This script must be run on testwiki', 1 
);
-   }
-
-   wfSuppressWarnings();
-   // Make an empty temp directory
-   $this->tmpDir = wfTempDir() . '/wlmcleanup';
-   unlink( $this->tmpDir );
-   mkdir( $this->tmpDir );
-   // Delete all log files from previous runs
-   foreach ( $this->logFiles as $file ) {
-   unlink( $this->fileName( $file ) );
-   }
-   wfRestoreWarnings();
-
-   $this->home = getenv( 'HOME' );
-   $this->dryRun = !$this->hasOption( 'do-it' );
-
-   $dbw = $this->getDB( DB_MASTER );
-   $this->commonsDbw = $this->getDB( DB_MASTER, [], 'commonswiki' 
);
-   $wlmTemplate = Title::newFromText( 'Template:Uploaded with WLM 
Mobile' );
-   $this->deletingUser = User::newFromName( 'Maintenance script' );
-
-   $res = $dbw->select(
-   [ 'templatelinks', 'page', 'image' ],
-   [ 'page_title', 'img_user_text', 'img_timestamp' ],
-   [
-   'tl_namespace' => $wlmTemplate->getNamespace(),
-   'tl_title' => $wlmTemplate->getDBkey(),
-   'tl_from = page_id',
-   'page_namespace' => NS_FILE,
-   'page_title = img_name',
-   ],
-   __METHOD__
-   );
-
-   foreach ( $res as $row ) {
-   $title = $row->page_title;
-   $user = $row->img_user_text;
-   $timestamp = $row->img_timestamp;
-
-   $this->logToFile( 'found', [ $title, $user ] );
-   $this->output( "$title by $user uploaded at 
$timestamp\n" );
-   if ( in_array( $user, $this->testerUsernames ) ) {
-   $this->output( "   ...this user is an app 
tester, rejecting\n" );
-   continue;
-   }
-   $this->migrateFile( $title, $user, $timestamp );
-   }
-
-   if ( $this->dryRun ) {
-   $this->output( "\nDry run complete\n" );
-   }
-
-   wfSuppressWarnings();
-   rmdir( $this->tmpDir );
-   wfRestoreWarnings();
-   }
-
-   private function fileName( $group ) {
-   return "{$this->home}/{$group}.log";
-   }
-
-   /**
-* @param string $name: Name of file to log to, relative to user's home 
directory
-* @param string|array $what: What to log
-*/
-   private function logToFile( $name, $what ) {
-   if ( !in_array( $name, $this->logFiles ) ) {
-   throw new MWException( "Unexpected logging group 
'$name'!" );
-   }
-
-   $file = fopen( $this->fileName( $name ), 'at' );
-   if ( is_array( 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Reincorporate autoincremented numbering for links without di...

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

Change subject: Reincorporate autoincremented numbering for links without 
display text
..


Reincorporate autoincremented numbering for links without display text

We used to pull in mediawiki.skinning.content.parsoid for this but it
started breaking other stuff (T163738) and also stopped working for our
content service output, regressing T162116.  This pulls in a new snippet,
added to MobileApp extension, that works for us.

Bug: T162116
Change-Id: If1e34ed046c3fd5d9fd502cba6e5ed6ba578555b
Depends-On: I6083bbdcd3c4d36b466981f1ddaacd3536820d54
---
M app/src/main/assets/preview.css
M app/src/main/assets/styles.css
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/app/src/main/assets/preview.css b/app/src/main/assets/preview.css
index d28f739..fce8468 100644
--- a/app/src/main/assets/preview.css
+++ b/app/src/main/assets/preview.css
@@ -1 +1 @@
-html,body,div,span,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,ins,em,img,small,strike,strong,sub,sup,tt,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,input,textarea,button,select,audio,video{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline;background:none}table,caption,tbody,tfoot,thead,tr,th,td{font-size:100%}caption{font-weight:bold}button{border:0;background-color:transparent}body{line-height:1;-webkit-tap-highlight-color:transparent}input{line-height:normal}ol,ul{list-style:none}table{border-collapse:collapse}html{-webkit-text-size-adjust:none;font-size:100%}body{font-family:'Helvetica
 Neue','Helvetica','Nimbus Sans L','Arial','Liberation 
Sans',sans-serif;line-height:1.4;color:#22;background:#fff}.content{line-height:1.65;word-wrap:break-word}@media
 all and (max-width:320px - 1){body{font-size:0.8em}.content{margin:0 
12px}}.client-js .collapsible-block{display:none}.client-js 
.collapsible-block.open-block{display:block}.nomobile{display:none 
!important}@media all and (min-width:720px){.client-js [onclick] + 
.collapsible-block{display:block}}.content figure,.content .thumb{margin:0.6em 
0}.content figure .thumbinner,.content .thumb .thumbinner{margin:0 
auto;max-width:100% !important}.content figcaption,.content 
.thumbcaption{margin:0.5em 0 0;font-size:0.8em;line-height:1.5;padding:0 
!important;color:#54595d}.content .thumbcaption{width:auto !important}.content 
.thumbborder{border:1px solid #c8ccd1}.content .magnify,.content 
figure[typeof*='mw:Image/Thumb'] > a:after,.content 
figure[typeof*='mw:Video/Thumb'] > a:after,.content 
figure[typeof*='mw:Audio/Thumb'] > a:after{display:none}.content 
img{vertical-align:middle}.content .floatright{clear:right;float:right;margin:0 
0 0.6em 0.6em}.content .floatleft{clear:left;float:left;margin:0 0.6em 0.6em 
0}.content a > img{max-width:100% !important;height:auto !important}.content 
.noresize{max-width:100%;overflow-x:auto}.content .noresize a > 
img{max-width:none 
!important}h1{font-size:1.7em}h2{font-size:1.5em}h3{font-size:1.2em;font-weight:bold}h4{font-weight:bold}.pre-content
 h1,.content h1,.content h2{font-family:'Linux 
Libertine','Georgia','Times',serif}h3,h4,h5,h6{font-family:'Helvetica 
Neue','Helvetica','Nimbus Sans L','Arial','Liberation 
Sans',sans-serif}.pre-content h1,.content h1,.content 
h2,h3,h4,h5,h6{line-height:1.3;word-wrap:break-word;word-break:break-word}.content
 h2,.content h3,.content h4,.content h5,.content h6{padding:0.5em 
0}blockquote{border-left:3px solid #c8ccd1;font-family:'Linux 
Libertine','Georgia','Times',serif;font-size:1.1em;padding:1em 25px 1em 
30px;position:relative;overflow:hidden}.content{}.content ul{list-style:square 
inside}.content ul > li > ul{list-style-type:disc}.content ul > li > ul > li > 
ul{list-style-type:circle}.content ol{list-style:decimal inside}.content ol 
ol,.content ul ol,.content ol ul,.content ul ul{margin-left:1em}.content ol 
li,.content ul li{margin-bottom:10px}.content ol li:last-child,.content ul 
li:last-child{margin-bottom:inherit}dl{margin-left:1em}dl 
dt{font-weight:bold}dl dd{display:block;overflow:auto}body.mw-hide-empty-elt 
.mw-empty-elt{display:none}a{text-decoration:none;color:#002bb8}a:visited{color:#5a3696}a:active{color:#faa700}a:hover{text-decoration:underline}a.new,a.new:visited,a.new:hover{color:#dd}a.new
 > *,a.new:visited > *,a.new:hover > 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix issues with reading lists.

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

Change subject: Fix issues with reading lists.
..


Fix issues with reading lists.

- Harden the outer-loop logic of the SavedPageSyncService, where it now
  re-queries the db to get an updated status of the current page after the
  long-running operation of saving the page contents is finished. This way,
  if the page was deleted in the meantime, or added to other lists, we
  won't overwrite its db row with a stale copy.

- No longer update reading list details (over the network) from each
  individual ItemView. This can cause race conditions when an ItemView is
  part of a RecyclerView and gets invalidated based on Window-level
  events. Fetching from the network is now handled at the Fragment level,
  where the lifecycle is more controlled.

- Fix adding an article to a reading list from the long-press menu in
  PageFragment. (It was incorrectly adding the current article, not the
  link.)

Bug: T177292
Bug: T177307
Change-Id: Iabde86c657e44de58c7669ff26e8fd4ce040b91a
---
M app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListFragment.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListHeaderView.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListItemView.java
M app/src/main/java/org/wikipedia/readinglist/ReadingLists.java
M app/src/main/java/org/wikipedia/readinglist/ReadingListsFragment.java
M 
app/src/main/java/org/wikipedia/readinglist/page/database/ReadingListPageDao.java
M app/src/main/java/org/wikipedia/savedpages/SavedPageSyncService.java
10 files changed, 103 insertions(+), 51 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.java 
b/app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.java
index 26ccfbb..3a71ad9 100644
--- a/app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.java
+++ b/app/src/main/java/org/wikipedia/page/PageContainerLongPressHandler.java
@@ -43,7 +43,7 @@
 
 @Override
 public void onAddToList(PageTitle title, 
AddToReadingListDialog.InvokeSource source) {
-fragment.addToReadingList(source);
+fragment.addToReadingList(title, source);
 }
 
 @Override
diff --git a/app/src/main/java/org/wikipedia/page/PageFragment.java 
b/app/src/main/java/org/wikipedia/page/PageFragment.java
index 0a659c4..f44ef1a 100755
--- a/app/src/main/java/org/wikipedia/page/PageFragment.java
+++ b/app/src/main/java/org/wikipedia/page/PageFragment.java
@@ -205,7 +205,7 @@
 new ReadingListBookmarkMenu(tabLayout, new 
ReadingListBookmarkMenu.Callback() {
 @Override
 public void onAddRequest(@Nullable ReadingListPage page) {
-
addToReadingList(AddToReadingListDialog.InvokeSource.BOOKMARK_BUTTON);
+addToReadingList(getTitle(), 
AddToReadingListDialog.InvokeSource.BOOKMARK_BUTTON);
 }
 
 @Override
@@ -216,7 +216,7 @@
 }
 }).show(getTitle());
 } else {
-
addToReadingList(AddToReadingListDialog.InvokeSource.BOOKMARK_BUTTON);
+addToReadingList(getTitle(), 
AddToReadingListDialog.InvokeSource.BOOKMARK_BUTTON);
 }
 }
 
@@ -766,7 +766,7 @@
 sharePageLink();
 return true;
 case R.id.menu_page_add_to_list:
-
addToReadingList(AddToReadingListDialog.InvokeSource.PAGE_OVERFLOW_MENU);
+addToReadingList(getTitle(), 
AddToReadingListDialog.InvokeSource.PAGE_OVERFLOW_MENU);
 return true;
 case R.id.menu_page_find_in_page:
 showFindInPage();
@@ -1313,10 +1313,10 @@
 }
 }
 
-public void addToReadingList(@NonNull AddToReadingListDialog.InvokeSource 
source) {
+public void addToReadingList(@NonNull PageTitle title, @NonNull 
AddToReadingListDialog.InvokeSource source) {
 Callback callback = callback();
 if (callback != null) {
-callback.onPageAddToReadingList(getTitle(), source);
+callback.onPageAddToReadingList(title, source);
 }
 }
 
diff --git 
a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java 
b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
index f122a8c..76c8912 100644
--- a/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
+++ b/app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
@@ -172,6 +172,22 @@
 

[MediaWiki-commits] [Gerrit] operations/dns[master]: add IPv6 records for puppetcompiler1001

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

Change subject: add IPv6 records for puppetcompiler1001
..


add IPv6 records for puppetcompiler1001

Bug: T177843
Change-Id: I5b427639352f1bc888b6191359854ac002f7b646
---
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 85346ae..079c7bc 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -137,6 +137,7 @@
 $ORIGIN 3.0.1.0.{{ zonename }}.
 
 3.1.0.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   terbium.eqiad.wmnet.
+7.1.0.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   puppetcompiler1001.eqiad.wmnet.
 0.2.0.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   neodymium.eqiad.wmnet.
 5.3.2.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   kubestagetcd1001.eqiad.wmnet. ; VM 
on ganeti01.svc.eqiad.wmnet
 1.8.0.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   cp1099.eqiad.wmnet.
diff --git a/templates/wmnet b/templates/wmnet
index 13cb08e..c6c626f 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -790,6 +790,7 @@
 prometheus1004  1H  IN  2620:0:861:102:10:64:16:38
 promethium  1H  IN A10.64.20.12
 puppetcompiler1001 1H IN A  10.64.32.17 ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
+puppetcompiler1001 1H IN    2620:0:861:103:10:64:32:17
 puppetmaster1001 1H IN A10.64.16.73
 puppetmaster1001 1H IN  2620:0:861:102:10:64:16:73
 puppetmaster1002 1H IN A10.64.48.45

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MobileApp[master]: Add autoincremented numbering for links without display text

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

Change subject: Add autoincremented numbering for links without display text
..


Add autoincremented numbering for links without display text

We used to pull in mediawiki.skinning.content.parsoid for this but it
started breaking other stuff (T163738) and also stopped working for our
content service output, regressing T162116.  This incorporates a snippet
that works for us.

Change-Id: I6083bbdcd3c4d36b466981f1ddaacd3536820d54
---
M styles/android/parsoid.less
1 file changed, 15 insertions(+), 0 deletions(-)

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



diff --git a/styles/android/parsoid.less b/styles/android/parsoid.less
index 54284e6..c5d55c0 100644
--- a/styles/android/parsoid.less
+++ b/styles/android/parsoid.less
@@ -1,3 +1,18 @@
+/*
+ * Auto-numbered external links
+ * Parsoid renders those as link without content, and lets CSS do the
+ * counting. This way the counting style can be customized, and counts update
+ * automatically when content is modified.
+ */
+.mw-body-content {
+   counter-reset: mw-numbered-ext-link;
+}
+
+.mw-body-content a[rel~='mw:ExtLink']:empty:after {
+   content: '[' counter( mw-numbered-ext-link ) ']';
+   counter-increment: mw-numbered-ext-link;
+}
+
 .content figure {
img,
video {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6083bbdcd3c4d36b466981f1ddaacd3536820d54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileApp
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: Dbrant 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >