[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Update jquery.uls from upstream

2017-04-01 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346036 )

Change subject: Update jquery.uls from upstream
..

Update jquery.uls from upstream

* Changes:
** Added Nyungar (nys) language.
** Localization update.

Change-Id: Iae72f59a28bf2ffa3946aa7da004ece56619119b
---
M lib/jquery.uls/i18n/et.json
M lib/jquery.uls/src/jquery.uls.data.js
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UniversalLanguageSelector 
refs/changes/36/346036/1

diff --git a/lib/jquery.uls/i18n/et.json b/lib/jquery.uls/i18n/et.json
index ac3ef66..738a985 100644
--- a/lib/jquery.uls/i18n/et.json
+++ b/lib/jquery.uls/i18n/et.json
@@ -12,8 +12,9 @@
"uls-region-AS": "Aasia",
"uls-region-ME": "Lähis-Ida",
"uls-region-PA": "Vaikne ookean",
+   "uls-region-all": "Kõik keeled",
"uls-no-results-found": "Tulemusi ei leitud.",
-   "uls-common-languages": "Eelistatavad keeled",
+   "uls-common-languages": "Soovitatavad keeled",
"uls-no-results-suggestion-title": "Võid eelistada neid:",
"uls-search-help": "Saad otsida keeli keelenimetuse, kirjanimetuse või 
keele ISO-koodi järgi või sirvida keeli piirkonna järgi.",
"uls-search-placeholder": "Keeleotsing"
diff --git a/lib/jquery.uls/src/jquery.uls.data.js 
b/lib/jquery.uls/src/jquery.uls.data.js
index 537c21d..52108cc 100644
--- a/lib/jquery.uls/src/jquery.uls.data.js
+++ b/lib/jquery.uls/src/jquery.uls.data.js
@@ -3,5 +3,5 @@
'use strict';
$.uls = $.uls || {};
//noinspection JSHint
-   $.uls.data = {"languages":{"aa":["Latn",["AF"],"Qafár 
af"],"ab":["Cyrl",["EU"],"Аҧсшәа"],"abs":["Latn",["AS"],"Bahasa 
Ambon"],"ace":["Latn",["AS","PA"],"Acèh"],"acf":["Latn",["AM"],"kwéyòl"],"ady":["Cyrl",["EU","ME"],"Адыгабзэ"],"ady-cyrl":["ady"],"ady-latn":["Latn",["EU","ME"],"Adygabze"],"aeb":["aeb-arab"],"aeb-arab":["Arab",["AF"],"تونسي"],"aeb-latn":["Latn",["AF"],"Tûnsî"],"af":["Latn",["AF"],"Afrikaans"],"ahr":["Deva",["AS"],"अहिराणी"],"ak":["Latn",["AF"],"Akan"],"akz":["Latn",["AM"],"Albaamo
 
innaaɬiilka"],"aln":["Latn",["EU"],"Gegë"],"am":["Ethi",["AF"],"አማርኛ"],"an":["Latn",["EU"],"aragonés"],"ang":["Latn",["EU"],"Ænglisc"],"anp":["Deva",["AS"],"अङ्गिका"],"ar":["Arab",["ME"],"العربية"],"arc":["Syrc",["ME"],"ܐܪܡܝܐ"],"arn":["Latn",["AM"],"mapudungun"],"aro":["Latn",["AM"],"Araona"],"arq":["Arab",["AF"],"جازايرية"],"ary":["Latn",["ME"],"Maġribi"],"arz":["Arab",["ME"],"مصرى"],"as":["Beng",["AS"],"অসমীয়া"],"ase":["Sgnw",["AM"],"American
 sign 
language"],"ast":["Latn",["EU"],"asturianu"],"atj":["Latn",["AM"],"atikamekw"],"av":["Cyrl",["EU"],"авар"],"avk":["Latn",["WW"],"Kotava"],"ay":["Latn",["AM"],"Aymar
 
aru"],"az":["az-latn"],"az-arab":["Arab",["AS","ME"],"تۆرکجه"],"az-latn":["Latn",["EU","ME"],"azərbaycanca"],"az-cyrl":["Cyrl",["EU","ME"],"азәрбајҹанҹа"],"azb":["az-arab"],"azj":["az-latn"],"ba":["Cyrl",["EU"],"башҡортса"],"ban":["Bali",["AS"],"ᬩᬲᬩᬮᬶ"],"bar":["Latn",["EU"],"Boarisch"],"bat-smg":["sgs"],"bbc-latn":["Latn",["AS"],"Batak
 Toba"],"bbc-batk":["Batk",["AS"],"Batak Toba"],"bbc":["Latn",["AS"],"Batak 
Toba"],"bcc":["Arab",["AS","ME"],"جهلسری بلوچی"],"bcl":["Latn",["AS"],"Bikol 
Central"],"be-tarask":["Cyrl",["EU"],"беларуская 
(тарашкевіца)"],"be-x-old":["be-tarask"],"be":["Cyrl",["EU"],"беларуская"],"bew":["Latn",["AS"],"Bahasa
 
Betawi"],"bfa":["Latn",["AF"],"Bari"],"bft":["Arab",["AS"],"بلتی"],"bfq":["Taml",["AS"],"படகா"],"bg":["Cyrl",["EU"],"български"],"bgn":["Arab",["AS","ME"],"روچ
 کپتین 
بلوچی"],"bh":["bho"],"bho":["Deva",["AS"],"भोजपुरी"],"bi":["Latn",["PA"],"Bislama"],"bjn":["Latn",["AS"],"Bahasa
 
Banjar"],"bm":["Latn",["AF"],"bamanankan"],"bn":["Beng",["AS"],"বাংলা"],"bo":["Tibt",["AS"],"བོད་ཡིག"],"bpy":["Beng",["AS"],"বিষ্ণুপ্রিয়া
 
মণিপুরী"],"bqi":["Arab",["AS","ME"],"بختیاری"],"br":["Latn",["EU"],"brezhoneg"],"brh":["Latn",["ME","AS"],"Bráhuí"],"brx":["Deva",["AS"],"बड़ो"],"bs":["Latn",["EU"],"bosanski"],"bto":["Latn",["AS"],"Iriga
 Bicolano"],"bug":["Bugi",["AS"],"ᨅᨔ 
ᨕᨘᨁᨗ"],"bxr":["Cyrl",["AS"],"буряад"],"ca":["Latn",["EU"],"català"],"cbk-zam":["Latn",["AS"],"Chavacano
 de 
Zamboanga"],"cdo":["Latn",["AS"],"Mìng-dĕ̤ng-ngṳ̄"],"ce":["Cyrl",["EU"],"нохчийн"],"ceb":["Latn",["AS"],"Cebuano"],"ch":["Latn",["PA"],"Chamoru"],"chm":["mhr"],"cho":["Latn",["AM"],"Choctaw"],"chr":["Cher",["AM"],"ᏣᎳᎩ"],"chy":["Latn",["AM"],"Tsetsêhestâhese"],"ciw":["Latn",["AM"],"Ojibwemowin"],"cjy":["cjy-hant"],"cjy-hans":["Hans",["AS"],"晋语(简化字)"],"cjy-hant":["Hant",["AS"],"晉語"],"ckb":["Arab",["ME"],"کوردیی
 ناوەندی"],"cnh":["Latn",["AS"],"Lai 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Tweak Parsoid CSS for images with borders

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

Change subject: Tweak Parsoid CSS for images with borders
..

Tweak Parsoid CSS for images with borders

* This fixes rendering diffs seen in visual diff testing.

Change-Id: I15f469b580d5d05d764a22d88b06237ce3571b62
---
M resources/src/mediawiki.skinning/content.parsoid.less
1 file changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/346035/1

diff --git a/resources/src/mediawiki.skinning/content.parsoid.less 
b/resources/src/mediawiki.skinning/content.parsoid.less
index ec5b429..ee18979 100644
--- a/resources/src/mediawiki.skinning/content.parsoid.less
+++ b/resources/src/mediawiki.skinning/content.parsoid.less
@@ -125,13 +125,17 @@
 }
 
 figure[typeof~='mw:Image/Thumb'] > *:first-child > img,
-figure[typeof~='mw:Image/Frame'] > *:first-child > img,
-.mw-image-border > *:first-child > img {
+figure[typeof~='mw:Image/Frame'] > *:first-child > img {
border: 1px solid #c8ccd1;
margin: 3px;
background: #fff;
 }
 
+/* Same as img.thumbborder in content.css */
+.mw-image-border > *:first-child > img {
+   border: 1px solid #eaecf0;
+}
+
 /* Hide the caption for frameless and plain floated images */
 figure[typeof~='mw:Image/Frameless'] > figcaption,
 figure[typeof~='mw:Image'] > figcaption {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15f469b580d5d05d764a22d88b06237ce3571b62
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Admin UI campaign editor: Isolate and selectively load js/css

2017-04-01 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346034 )

Change subject: Admin UI campaign editor: Isolate and selectively load js/css
..

Admin UI campaign editor: Isolate and selectively load js/css

Bug: T144453
Change-Id: Id03d141775c227bd3dcf081bfc6b7dbd51bac01f
---
M resources/infrastructure/campaignManager.css
M resources/infrastructure/ext.centralNotice.adminUi.css
M special/SpecialCentralNotice.php
3 files changed, 17 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/34/346034/1

diff --git a/resources/infrastructure/campaignManager.css 
b/resources/infrastructure/campaignManager.css
index a7da508..7bf3470 100644
--- a/resources/infrastructure/campaignManager.css
+++ b/resources/infrastructure/campaignManager.css
@@ -22,9 +22,6 @@
  *
  * @file
  */
-.cn-buttons {
-   text-align: right;
-}
 
 #preferences .ui-slider {
width: 50%;
diff --git a/resources/infrastructure/ext.centralNotice.adminUi.css 
b/resources/infrastructure/ext.centralNotice.adminUi.css
index f4a2125..d3f5be4 100644
--- a/resources/infrastructure/ext.centralNotice.adminUi.css
+++ b/resources/infrastructure/ext.centralNotice.adminUi.css
@@ -1,8 +1,8 @@
 /* Common styles CentralNotice extension admin UI
  * @licence GNU General Public Licence 2.0 or later
  *
- * FIXME This file combines styles previously in centralnotice.css and 
adminui.common.css.
- * Check for coherence.
+ * FIXME This file combines styles previously in centralnotice.css and 
adminui.common.css,
+ * as well as one from campaignManager.css. Check for coherence.
  */
 
  /* Styles previously in centralnotice.css */
@@ -219,4 +219,10 @@
 }
 #mw-htmlform-banner-list .mw-label {
display: none;
-}
\ No newline at end of file
+}
+
+/* Styles from campaignManager.css */
+
+.cn-buttons {
+   text-align: right;
+}
diff --git a/special/SpecialCentralNotice.php b/special/SpecialCentralNotice.php
index b455ba6..c5a35b1 100644
--- a/special/SpecialCentralNotice.php
+++ b/special/SpecialCentralNotice.php
@@ -37,8 +37,6 @@
$out = $this->getOutput();
$request = $this->getRequest();
 
-   // Output ResourceLoader module for styling and javascript 
functions
-   $out->addModules( 'ext.centralNotice.adminUi.campaignManager' );
$this->addHelpLink( 
'//meta.wikimedia.org/wiki/Special:MyLanguage/Help:CentralNotice', true );
 
// Check permissions
@@ -473,12 +471,18 @@
 * @param $notice string The name of the campaign to view
 */
function outputNoticeDetail( $notice ) {
+
+   $out = $this->getOutput();
+
+   // Output specific ResourceLoader module
+   $out->addModules( 'ext.centralNotice.adminUi.campaignManager' );
+
$this->outputEnclosingDivStartTag();
 
$this->campaign = new Campaign( $notice ); // Todo: Convert the 
rest of this page to use this object
try {
if ( $this->campaign->isArchived() || 
$this->campaign->isLocked() ) {
-   $this->getOutput()->setSubtitle( $this->msg( 
'centralnotice-archive-edit-prevented' ) );
+   $out->setSubtitle( $this->msg( 
'centralnotice-archive-edit-prevented' ) );
$this->editable = false; // Todo: Fix this 
gross hack to prevent editing
}
} catch ( CampaignExistenceException $ex ) {
@@ -557,7 +561,7 @@
 
$this->displayCampaignWarnings();
 
-   $this->getOutput()->addHTML( $htmlOut );
+   $out->addHTML( $htmlOut );
$this->outputEnclosingDivEndTag();
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id03d141775c227bd3dcf081bfc6b7dbd51bac01f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Admin UI: Consolidate common css

2017-04-01 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346033 )

Change subject: Admin UI: Consolidate common css
..

Admin UI: Consolidate common css

Bug: T144453
Change-Id: Ib229bfc2c16e35222a6037334495505966817680
---
M extension.json
D resources/infrastructure/adminui.common.css
R resources/infrastructure/ext.centralNotice.adminUi.css
3 files changed, 83 insertions(+), 81 deletions(-)


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

diff --git a/extension.json b/extension.json
index d220b41..294490c 100644
--- a/extension.json
+++ b/extension.json
@@ -120,8 +120,7 @@
],
"scripts": "infrastructure/centralnotice.js",
"styles": [
-   "infrastructure/centralnotice.css",
-   "infrastructure/adminui.common.css"
+   "infrastructure/ext.centralNotice.adminUi.css"
],
"messages": [
"centralnotice-documentwrite-error",
diff --git a/resources/infrastructure/adminui.common.css 
b/resources/infrastructure/adminui.common.css
deleted file mode 100644
index 9495750..000
--- a/resources/infrastructure/adminui.common.css
+++ /dev/null
@@ -1,73 +0,0 @@
-#cn-js-error-warn {
-   padding: 0.5em;
-   background-color: #FF;
-   border: 2px solid #FF;
-   margin-bottom: 0.5em;
-   font-weight: bold;
-   text-align: center;
-}
-
-#cn-formsection-preview {
-   border: none;
-   margin: 0;
-   padding: 0;
-}
-#cn-formsection-preview legend {
-   display: none;
-}
-
-div.separate-form-element {
-   margin: 0.5em 0;
-}
-
-fieldset#cn-formsection-form-actions {
-   padding: 0.5em;
-   background-color: #F9F9F9;
-   border: 1px solid #2F6FAB;
-}
-fieldset#cn-formsection-form-actions legend {
-   display: none;
-}
-.cn-formbutton {
-   clear: none;
-   float: right;
-   display: inline;
-}
-
-input#mw-input-wpsummary,
-.cn-change-summary-input {
-   float: left;
-   margin-left: 3px;
-}
-
-label[for=mw-input-wpsummary],
-.cn-change-summary-label {
-   float: left;
-   position: relative;
-   top: 0.15em;
-   font-weight: bold;
-}
-
-.cn-dialog-message {
-   margin-bottom: 0.6em;
-}
-
-/* --- Banner preview list --- */
-#mw-htmlform-banner-list {
-   margin-left: 0.9em;
-}
-.cn-banner-list-element {
-   margin: 0.25em 0 0.5em 0.25em;
-}
-.cn-banner-preview-div {
-   border: 1px solid #A7D7F9;
-   padding: 1em;
-   margin-top: 0.5em;
-}
-#mw-htmlform-banner-list .mw-htmlform-field-HTMLCheckField {
-   display: inline-block;
-   float: left;
-}
-#mw-htmlform-banner-list .mw-label {
-   display: none;
-}
\ No newline at end of file
diff --git a/resources/infrastructure/centralnotice.css 
b/resources/infrastructure/ext.centralNotice.adminUi.css
similarity index 66%
rename from resources/infrastructure/centralnotice.css
rename to resources/infrastructure/ext.centralNotice.adminUi.css
index f6d33a5..f4a2125 100644
--- a/resources/infrastructure/centralnotice.css
+++ b/resources/infrastructure/ext.centralNotice.adminUi.css
@@ -1,11 +1,11 @@
-/* Stylesheet for the CentralNotice extension.
- *
- * @file
- * @ingroup Extensions
- * @author Ryan Kaldari 
- * @copyright © 2010 by Ryan Kaldari
+/* Common styles CentralNotice extension admin UI
  * @licence GNU General Public Licence 2.0 or later
+ *
+ * FIXME This file combines styles previously in centralnotice.css and 
adminui.common.css.
+ * Check for coherence.
  */
+
+ /* Styles previously in centralnotice.css */
 
 fieldset.prefsection {
margin:0;
@@ -143,4 +143,80 @@
padding: 0.5em;
background-color: #FF;
border: 2px solid #FF;
+}
+
+/* Styles previously in adminui.common.css */
+
+#cn-js-error-warn {
+   padding: 0.5em;
+   background-color: #FF;
+   border: 2px solid #FF;
+   margin-bottom: 0.5em;
+   font-weight: bold;
+   text-align: center;
+}
+
+#cn-formsection-preview {
+   border: none;
+   margin: 0;
+   padding: 0;
+}
+#cn-formsection-preview legend {
+   display: none;
+}
+
+div.separate-form-element {
+   margin: 0.5em 0;
+}
+
+fieldset#cn-formsection-form-actions {
+   padding: 0.5em;
+   background-color: #F9F9F9;
+   border: 1px solid #2F6FAB;
+}
+fieldset#cn-formsection-form-actions legend {
+   display: none;
+}
+.cn-formbutton {
+   clear: none;
+   float: right;
+   display: inline;
+}
+
+input#mw-input-wpsummary,
+.cn-change-summary-input {
+   float: left;
+   margin-left: 3px;
+}
+
+label[for=mw-input-wpsummary],
+.cn-change-summary-label {
+   float: left;
+   position: relative;
+   

[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: Fix typeahead occasionally using wrong thumbnail and descrip...

2017-04-01 Thread Aaron1011 (Code Review)
Aaron1011 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346032 )

Change subject: Fix typeahead occasionally using wrong thumbnail and description
..

Fix typeahead occasionally using wrong thumbnail and description

The 'sanitizedThumbURL' and 'descriptionText' variables can be carried
over from a previous iteration of the loop, if not explicitly set. Both
are now explicitly reset to their default values, ensuring that a
typeahead entry with a missing thumbnail or description cannot be given
the thumbnail and/or description of a previous entry.

Change-Id: I069854ffca7c48e19a219939c4ddb01c53f263b6
---
M dev/wikipedia.org/assets/js/wm-typeahead.js
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/portals 
refs/changes/32/346032/1

diff --git a/dev/wikipedia.org/assets/js/wm-typeahead.js 
b/dev/wikipedia.org/assets/js/wm-typeahead.js
index 9cad438..7eaf9d7 100644
--- a/dev/wikipedia.org/assets/js/wm-typeahead.js
+++ b/dev/wikipedia.org/assets/js/wm-typeahead.js
@@ -259,11 +259,17 @@
page = suggestions[ i ];
pageDescription = ( page.terms && 
page.terms.description ) ? page.terms.description : '';
 
+   // Ensure that the value from the previous iteration 
isn't used
+   sanitizedThumbURL = false;
+
if ( page.thumbnail && page.thumbnail.source ) {
sanitizedThumbURL = 
page.thumbnail.source.replace( /\"/g, '%22' );
sanitizedThumbURL = sanitizedThumbURL.replace( 
/'/g, '%27' );
}
 
+   // Ensure that the value from the previous iteration 
isn't used
+   descriptionText = '';
+
// check if description exists
if ( pageDescription ) {
// if the description is an array, use the 
first item

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I069854ffca7c48e19a219939c4ddb01c53f263b6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/portals
Gerrit-Branch: master
Gerrit-Owner: Aaron1011 

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


[MediaWiki-commits] [Gerrit] mediawiki...RandomGameUnit[master]: Use tabs to indent in json

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

Change subject: Use tabs to indent in json
..


Use tabs to indent in json

Change-Id: I9526bcf2da3c2b8ff529c14a16e122bcf76d9414
---
M i18n/fi.json
M i18n/nl.json
M i18n/qqq.json
3 files changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/i18n/fi.json b/i18n/fi.json
index 821277b..6765df2 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -7,4 +7,4 @@
"game-unit-poll-title": "Ota osaa äänestykseen",
"game-unit-quiz-title": "Pelaa tietovisapeliä",
"game-unit-picturegame-title": "Pelaa kuvapeliä"
-}
\ No newline at end of file
+}
diff --git a/i18n/nl.json b/i18n/nl.json
index 69f2ee1..0a0bec2 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -7,4 +7,4 @@
"game-unit-poll-title": "Doe mee aan een peiling",
"game-unit-quiz-title": "Speel het quiz spel",
"game-unit-picturegame-title": "Speel het foto spel"
-}
\ No newline at end of file
+}
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 4ee7a76..7cfc693 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,11 +1,11 @@
 {
-  "@metadata": {
-"authors": [
-  "Lewis Cawte "
-]
-  },
-  "game-unit-desc": 
"{{desc|name=RandomGameUnit|url=https://www.mediawiki.org/wiki/Extension:RandomGameUnit}};,
-  "game-unit-poll-title": "Take a Poll",
-  "game-unit-quiz-title": "Play the Quiz Game",
-  "game-unit-picturegame-title": "Play the Picture Game"
-}
\ No newline at end of file
+   "@metadata": {
+   "authors": [
+   "Lewis Cawte "
+   ]
+   },
+   "game-unit-desc": 
"{{desc|name=RandomGameUnit|url=https://www.mediawiki.org/wiki/Extension:RandomGameUnit}};,
+   "game-unit-poll-title": "Take a Poll",
+   "game-unit-quiz-title": "Play the Quiz Game",
+   "game-unit-picturegame-title": "Play the Picture Game"
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9526bcf2da3c2b8ff529c14a16e122bcf76d9414
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RandomGameUnit
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SportsTeams[master]: Use tabs to indent in json

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

Change subject: Use tabs to indent in json
..


Use tabs to indent in json

Change-Id: Ib384afdce986e327b2a2733a8a29ac17aefd075f
---
M i18n/fi.json
M i18n/qqq.json
2 files changed, 143 insertions(+), 143 deletions(-)

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



diff --git a/i18n/fi.json b/i18n/fi.json
index 52065eb..1a6147d 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,138 +1,138 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"topnetworks": "Verkostojen tilastoja",
-"similarfans": "Samankaltaiset fanit",
-"sportsteamsmanager": "Hallinnoi urheilutiimejä",
-"sportsteams-add-button": "lisää",
-"sportsteams-articles-votes": "{{PLURAL:$1|ääni|ääntä}}",
-"sportsteams-no-articles": "No articles.",
-"sportsteams-count-fans": "{{PLURAL:$1|'''Yksi''' fani|'''$1''' fania}}",
-"sportsteams-similar-fans": "Samankaltaiset fanit",
-"sportsteams-num-similar": "{{PLURAL:$1|Yksi fani on kanssasi 
samankaltainen.|$1 fania ovat kanssasi samankaltaisia.}}",
-"sportsteams-invite-friends": "Kutsu ystäviäsi",
-"sportsteams-your-friend": "ystäväsi",
-"sportsteams-your-foe": "vihollisesi",
-"sportsteams-add-as-friend": "Lisää ystäväksi",
-"sportsteams-remove-as-friend": "Poista ystävistä",
-"sportsteams-add-as-foe": "Lisää viholliseksi",
-"sportsteams-remove-as-foe": "Poista vihollisista",
-"sportsteams-give-a-gift": "Anna lahja",
-"sportsteams-prev": "edell.",
-"sportsteams-next": "seur.",
-"sportsteams-woops": "Ups!",
-"sportsteams-network-woops-title": "Ups, astuit harhaan!",
-"sportsteams-network-woops-text": "Määritelty URL on väärin.",
-"sportsteams-network-fan-network": "$1-faniverkosto",
-"sportsteams-network-you-are-fan": "Olet fani",
-"sportsteams-network-leave-network": "Poistu tästä verkostosta",
-"sportsteams-network-join-network": "Liity tähän verkostoon",
-"sportsteams-network-info": "Tietoa verkostosta",
-"sportsteams-network-logo": "(Virallinen logo)",
-"sportsteams-network-fans-col": "Fanit:",
-"sportsteams-network-friends-col": "Ystäviä: $1",
-"sportsteams-network-fans": "$1-fanit",
-"sportsteams-network-fan": "Fan",
-"sportsteams-network-fan-display": "{{PLURAL:$3|Näytetään $1 fani; 
yhteensä $3|Näytetään $1 fania; yhteensä $3}}",
-"sportsteams-network-latest-thoughts": "Viimeisimmät ajatukset",
-"sportsteams-network-all-thoughts": "Kaikki ajatukset",
-"sportsteams-network-fan-locations": "Fanien sijainnit",
-"sportsteams-network-top-fans": "Huippufanit",
-"sportsteams-network-top-fans-week": "Tämän viikon huippufanit",
-"sportsteams-network-complete-list": "Täydellinen lista",
-"sportsteams-network-articles": "Artikkelit aiheesta $1",
-"sportsteams-network-write-article": "Kirjoita artikkeli",
-"sportsteams-network-main-page": "Etusivu",
-"sportsteams-network-your-profile": "Profiilisi",
-"sportsteams-network-points": "{{PLURAL:$1|Yksi piste|$1 pistettä}}",
-"sportsteams-network-newest": "Uusimmat fanit alueelta $1",
-"sportsteams-network-clicktozoom": "(Napsauta suurentaaksesi)",
-"sportsteams-network-now-member": "Olet nyt $1-verkoston jäsen!",
-"sportsteams-network-invite-more": "Kutsu lisää $1-faneja",
-"sportsteams-network-find-other": "Löydä muita $1-faneja",
-"sportsteams-network-already-member": "Olet jo $1-verkoston jäsen!",
-"sportsteams-network-no-need-join": "Ei tarvitse liittyä uudelleen!",
-"sportsteams-network-join-named-network": "Liity $1-faniverkostoon",
-"sportsteams-network-join-are-you-sure": "Oletko varma, että haluat 
liittyä $1-faniverkostoon?",
-"sportsteams-network-alt-logo": "logo",
-"sportsteams-network-network-fans": "$1-fanit",
-"sportsteams-network-back-to-network": " Takaisin verkoston \"$1\" 
sivulle",
-"sportsteams-network-num-fans": "$1-sivulla on $2 
{{PLURAL:$2|fani|fania}}.",
-"sportsteams-network-num-fans-sport": "Urheilulajilla $1 on $2 
{{PLURAL:$2|fani|fania}}.",
-"sportsteams-network-no-longer-member": "Et ole enää $1-verkoston jäsen!",
-"sportsteams-network-not-member": "Et ole $1-verkoston jäsen!",
-"sportsteams-network-leave": "Poistu $1-verkostosta!",
-"sportsteams-network-leave-are-you-sure": "Oletko varma, että haluat 
poistua $1-faniverkostosta?",
-"sportsteams-network-remove-me": "Poista minut",
-"sportsteams-top-network-sports": "Urheilulajit",
-"sportsteams-top-network-teams": "Joukkueet",
-"sportsteams-top-network-least": "Epäsuosituimmat",
-"sportsteams-top-network-most": "Eniten",
-"sportsteams-top-network-team-title-least-sports": "Epäsuosituimmat 
urheilulajit",
-

[MediaWiki-commits] [Gerrit] mediawiki...StaffEdits[master]: Use tabs to indent in json

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

Change subject: Use tabs to indent in json
..


Use tabs to indent in json

Change-Id: I5f6b314c831a902815e8ffc86a47806b83005aef
---
M i18n/fi.json
M i18n/qqq.json
2 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/i18n/fi.json b/i18n/fi.json
index cf8682f..9625383 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,14 +1,14 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"staffedit-desc": "Mahdollistaa muokkausten merkitsemisen virallisiksi 
[[Special:ListUsers/staff|henkilökunnan]] muokkauksiksi muokkausnäkymässä",
-"right-staffedit": "Merkitä muokkauksia virallisiksi henkilökunnan 
tekemiksi muokkauksiksi",
-"swstaffedit": "Viralliseksi ShoutWikin henkilökunnan muokkaukseksi",
-"staffedit-selector": "Merkitse tämä muokkaus:",
-"staffedit-none": "ei miksikään",
-"tag-swstaffedit": "[[s:w:fi:ShoutWikin henkilökunta|ShoutWikin 
henkilökunnan muokkaus]]",
-"tag-swstaffedit-description": "[[s:w:fi:ShoutWikin 
henkilökunta|ShoutWikin henkilökunnan]] virallisessa roolissaan tekemä muokkaus"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "staffedit-desc": "Mahdollistaa muokkausten merkitsemisen virallisiksi 
[[Special:ListUsers/staff|henkilökunnan]] muokkauksiksi muokkausnäkymässä",
+   "right-staffedit": "Merkitä muokkauksia virallisiksi henkilökunnan 
tekemiksi muokkauksiksi",
+   "swstaffedit": "Viralliseksi ShoutWikin henkilökunnan muokkaukseksi",
+   "staffedit-selector": "Merkitse tämä muokkaus:",
+   "staffedit-none": "ei miksikään",
+   "tag-swstaffedit": "[[s:w:fi:ShoutWikin henkilökunta|ShoutWikin 
henkilökunnan muokkaus]]",
+   "tag-swstaffedit-description": "[[s:w:fi:ShoutWikin 
henkilökunta|ShoutWikin henkilökunnan]] virallisessa roolissaan tekemä muokkaus"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 3fe1746..34fa6ce 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -1,14 +1,14 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix "
-]
-},
-"staffedit-desc": 
"{{desc|name=StaffEdits|url=https://www.mediawiki.org/wiki/Extension:StaffEdits}}\nDo
 not translate the \"Special:ListUsers/staff\" part of the link.",
-"right-staffedit": "{{doc-right|staffedit}}",
-"swstaffedit": "A drop-down menu choice, which indicates that the current 
edit will be tagged as an officail staff edit. See also 
[[MediaWiki:Staffedit-selector]], [[MediaWiki:Staffedit-none]] and 
[[mw:Extension:StaffEdits|the extension documentation and screenshots on 
MediaWiki.org]].",
-"staffedit-selector": "Label for the drop-down menu shown on the edit 
view; in the user interface, this is followed by a drop-down menu (HTML 
select element) which contains items such as 
[[MediaWiki:Staffedit-none]], [[MediaWiki:Swstaffedit]], etc.",
-"staffedit-none": "Default drop-down menu choice, which indicates that no 
tag will be applied to the edit. See also [[MediaWiki:Staffedit-selector]], 
[[MediaWiki:Swstaffedit]] and [[mw:Extension:StaffEdits|the extension 
documentation and screenshots on MediaWiki.org]].",
-"tag-swstaffedit": "Tag, as shown on [[Special:RecentChanges]]. See the 
[[commons:File:StaffEdits.png|screenshot]] for more info on how it's used.",
-"tag-swstaffedit-description": "Tag description for the 
[[MediaWiki:Tag-swstaffedit]] tag; shown on [[Special:Tags]]"
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix "
+   ]
+   },
+   "staffedit-desc": 
"{{desc|name=StaffEdits|url=https://www.mediawiki.org/wiki/Extension:StaffEdits}}\nDo
 not translate the \"Special:ListUsers/staff\" part of the link.",
+   "right-staffedit": "{{doc-right|staffedit}}",
+   "swstaffedit": "A drop-down menu choice, which indicates that the 
current edit will be tagged as an officail staff edit. See also 
[[MediaWiki:Staffedit-selector]], [[MediaWiki:Staffedit-none]] and 
[[mw:Extension:StaffEdits|the extension documentation and screenshots on 
MediaWiki.org]].",
+   "staffedit-selector": "Label for the drop-down menu shown on the edit 
view; in the user interface, this is followed by a drop-down menu (HTML 
select element) which contains items such as 
[[MediaWiki:Staffedit-none]], [[MediaWiki:Swstaffedit]], etc.",
+   "staffedit-none": "Default drop-down menu choice, which indicates that 
no tag will be applied to the edit. See also [[MediaWiki:Staffedit-selector]], 
[[MediaWiki:Swstaffedit]] and [[mw:Extension:StaffEdits|the extension 
documentation and screenshots 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: objectcache: Never use CACHE_NONE for CACHE_ANYTHING

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

Change subject: objectcache: Never use CACHE_NONE for CACHE_ANYTHING
..


objectcache: Never use CACHE_NONE for CACHE_ANYTHING

If $wgMainCacheType = CACHE_ACCEL, but there is no APC, then its
possible that CACHE_ANYTHING will default to CACHE_NONE because
that's what CACHE_ACCEL would do.

Possibly also T147161

Bug: T160519
Change-Id: I9ac2d071437b35a0f9cd3678e2279628f7b1931e
(cherry picked from commit c5a0fa5bed4c5aafdf0721c1d05978576107bd85)
---
M RELEASE-NOTES-1.27
M includes/objectcache/ObjectCache.php
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 34d3d77..3a496f2 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -22,6 +22,7 @@
 * (T158766) Avoid SQL error on MSSQL when using selectRowCount()
 * (T145635) Fix too long index error when installing with MSSQL.
 * (T156184) $wgRawHtml will no longer apply to internationalization messages.
+* (T160519) CACHE_ANYTHING will not be CACHE_ACCEL if no accelerator is 
installed.
 
 == MediaWiki 1.27.1 ==
 
diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 29df5af6..6881062 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -222,8 +222,14 @@
global $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType;
$candidates = [ $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType ];
foreach ( $candidates as $candidate ) {
+   $cache = false;
if ( $candidate !== CACHE_NONE && $candidate !== 
CACHE_ANYTHING ) {
-   return self::getInstance( $candidate );
+   $cache = self::getInstance( $candidate );
+   // CACHE_ACCEL might default to nothing if no 
APCu
+   // See includes/ServiceWiring.php
+   if ( !( $cache instanceof EmptyBagOStuff ) ) {
+   return $cache;
+   }
}
}
return self::getInstance( CACHE_DB );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ac2d071437b35a0f9cd3678e2279628f7b1931e
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_27
Gerrit-Owner: Martineznovo 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Martineznovo 
Gerrit-Reviewer: Paladox 
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] mediawiki/core[REL1_28]: objectcache: Never use CACHE_NONE for CACHE_ANYTHING

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

Change subject: objectcache: Never use CACHE_NONE for CACHE_ANYTHING
..


objectcache: Never use CACHE_NONE for CACHE_ANYTHING

If $wgMainCacheType = CACHE_ACCEL, but there is no APC, then its
possible that CACHE_ANYTHING will default to CACHE_NONE because
that's what CACHE_ACCEL would do.

Possibly also T147161

Bug: T160519
Change-Id: I9ac2d071437b35a0f9cd3678e2279628f7b1931e
(cherry picked from commit c5a0fa5bed4c5aafdf0721c1d05978576107bd85)
---
M RELEASE-NOTES-1.28
M includes/objectcache/ObjectCache.php
A tests/phpunit/includes/objectcache/ObjectCacheTest.php
3 files changed, 90 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 327a624..265c5b2 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -14,6 +14,7 @@
 * (T158766) Avoid SQL error on MSSQL when using selectRowCount()
 * (T145635) Fix too long index error when installing with MSSQL
 * (T156184) $wgRawHtml will no longer apply to internationalization messages.
+* (T160519) CACHE_ANYTHING will not be CACHE_ACCEL if no accelerator is 
installed.
 
 == MediaWiki 1.28 ==
 
diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 0a4f0ed..a253c36 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -246,8 +246,14 @@
global $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType;
$candidates = [ $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType ];
foreach ( $candidates as $candidate ) {
+   $cache = false;
if ( $candidate !== CACHE_NONE && $candidate !== 
CACHE_ANYTHING ) {
-   return self::getInstance( $candidate );
+   $cache = self::getInstance( $candidate );
+   // CACHE_ACCEL might default to nothing if no 
APCu
+   // See includes/ServiceWiring.php
+   if ( !( $cache instanceof EmptyBagOStuff ) ) {
+   return $cache;
+   }
}
}
 
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheTest.php 
b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
new file mode 100644
index 000..d132183
--- /dev/null
+++ b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
@@ -0,0 +1,82 @@
+setCacheConfig();
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_NONE,
+   'wgMessageCacheType' => CACHE_NONE,
+   'wgParserCacheType' => CACHE_NONE,
+   ] );
+   }
+
+   private function setCacheConfig( $arr = [] ) {
+   $defaults = [
+   CACHE_NONE => [ 'class' => 'EmptyBagOStuff' ],
+   CACHE_DB => [ 'class' => 'SqlBagOStuff' ],
+   CACHE_ANYTHING => [ 'factory' => 
'ObjectCache::newAnything' ],
+   // Mock ACCEL with 'hash' as being installed.
+   // This makes tests deterministic regardless of APC.
+   CACHE_ACCEL => [ 'class' => 'HashBagOStuff' ],
+   'hash' => [ 'class' => 'HashBagOStuff' ],
+   ];
+   $this->setMwGlobals( 'wgObjectCaches', $arr + $defaults );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingNothing() {
+   $this->assertInstanceOf(
+   SqlBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'No available types. Fallback to DB'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingHash() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => 'hash'
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (hash)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingAccel() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_ACCEL
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (CACHE_ACCEL)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function txestNewAnythingNoAccel() {

[MediaWiki-commits] [Gerrit] mediawiki...Newsletter[master]: Use data-mw-newsletter-id instead of data-newsletter-id

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

Change subject: Use data-mw-newsletter-id instead of data-newsletter-id
..


Use data-mw-newsletter-id instead of data-newsletter-id

According to Bawolff, data attributes that are not user controlled
should use data-mw. This prevents users from forging data attributes.
Although this may not actually be an issue, following convention will
help future proof things that might change in future patches.

Bug: T159085
Change-Id: I71739ce1f262a40d58ab931d7c84a5ce98b1ad2b
---
M includes/specials/pagers/NewsletterTablePager.php
M modules/ext.newsletter.newsletters.js
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/specials/pagers/NewsletterTablePager.php 
b/includes/specials/pagers/NewsletterTablePager.php
index 1e85d51..62f9679 100644
--- a/includes/specials/pagers/NewsletterTablePager.php
+++ b/includes/specials/pagers/NewsletterTablePager.php
@@ -109,7 +109,7 @@
$this->msg( 
'newsletter-unsubscribe-button' )->text(),
array(
'class' => 
'newsletter-subscription newsletter-subscribed',
-   'data-newsletter-id' => 
$id
+   'data-mw-newsletter-id' 
=> $id
)
);
} else {
@@ -121,7 +121,7 @@
$this->msg( 
'newsletter-subscribe-button' )->text(),
array(
'class' => 
'newsletter-subscription newsletter-unsubscribed',
-   'data-newsletter-id' => 
$id
+   'data-mw-newsletter-id' 
=> $id
)
);
}
diff --git a/modules/ext.newsletter.newsletters.js 
b/modules/ext.newsletter.newsletters.js
index 3fb655c..bbac194 100644
--- a/modules/ext.newsletter.newsletters.js
+++ b/modules/ext.newsletter.newsletters.js
@@ -51,11 +51,11 @@
$( function () {
$( '.newsletter-subscription' ).click( function ( event ) {
var $link = $( this ),
-   newsletterId = $link.data( 'newsletter-id' ),
+   newsletterId = $link.data( 'mw-newsletter-id' ),
$subscriberCount, promise;
 
if ( /\D/.test( newsletterId ) ) {
-   throw new Error( '"data-newsletter-id" 
attribute must be numeric' );
+   throw new Error( '"data-mw-newsletter-id" 
attribute must be numeric' );
}
$subscriberCount = $( '#nl-count-' + newsletterId );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71739ce1f262a40d58ab931d7c84a5ce98b1ad2b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Newsletter
Gerrit-Branch: master
Gerrit-Owner: MtDu 
Gerrit-Reviewer: 01tonythomas <01tonytho...@gmail.com>
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MtDu 
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]: Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5be...

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

Change subject: Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5bed4c)
..


Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5bed4c)

Change-Id: I88d967b73e623d25249a14c286eee7a9a98bd3f3
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index bf85fea..2371ed3 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -83,6 +83,7 @@
   highlight prefix matches in the results.
 * (T157035) "new mw.Uri()" was ignoring options when using default URI.
 * Special:Allpages can no longer be filtered by redirect in miser mode.
+* (T160519) CACHE_ANYTHING will not be CACHE_ACCEL if no accelerator is 
installed.
 
 === Action API changes in 1.29 ===
 * Submitting sensitive authentication request parameters to action=login,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88d967b73e623d25249a14c286eee7a9a98bd3f3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
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] mediawiki/core[master]: Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5be...

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

Change subject: Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5bed4c)
..

Release notes for CACHE_ANYTHING being CACHE_NONE (c5a0fa5bed4c)

Change-Id: I88d967b73e623d25249a14c286eee7a9a98bd3f3
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index bf85fea..2371ed3 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -83,6 +83,7 @@
   highlight prefix matches in the results.
 * (T157035) "new mw.Uri()" was ignoring options when using default URI.
 * Special:Allpages can no longer be filtered by redirect in miser mode.
+* (T160519) CACHE_ANYTHING will not be CACHE_ACCEL if no accelerator is 
installed.
 
 === Action API changes in 1.29 ===
 * Submitting sensitive authentication request parameters to action=login,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88d967b73e623d25249a14c286eee7a9a98bd3f3
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[REL1_28]: SECURITY: Disable tag on system messages despite $wgR...

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

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..


SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M RELEASE-NOTES-1.28
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
8 files changed, 78 insertions(+), 4 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index cf11699..327a624 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -13,6 +13,7 @@
 * (T154672) Un-deprecate ArticleAfterFetchContentObject hook.
 * (T158766) Avoid SQL error on MSSQL when using selectRowCount()
 * (T145635) Fix too long index error when installing with MSSQL
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == MediaWiki 1.28 ==
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index a8be748..40de17d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1515,6 +1515,7 @@
// been changed somehow, and keep it if so.
$anonPO = ParserOptions::newFromAnon();
$anonPO->setEditSection( false );
+   $anonPO->setAllowUnsafeRawHtml( false );
if ( !$options->matches( $anonPO ) ) {
wfLogWarning( __METHOD__ . ': Setting a changed 
bogus ParserOptions: ' . wfGetAllCallers( 5 ) );
$options->isBogus = false;
@@ -1528,6 +1529,7 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
$po->isBogus = true;
if ( $options !== null ) {
$this->mParserOptions = empty( 
$options->isBogus ) ? $options : null;
@@ -1537,6 +1539,7 @@
 
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
if ( $options !== null && !empty( $options->isBogus ) ) {
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index dc8c589..d6a0e8a 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -179,11 +179,16 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
return $po;
}
 
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index c943b7c..438603a 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -79,12 +79,25 @@
 * @param array $attributes
 * @param Parser $parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
public static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return [ $content, 'markerType' => 'nowiki' ];
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return [ $content, 'markerType' => 'nowiki' ];
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: SECURITY: Disable tag on system messages despite $wgR...

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

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..


SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M RELEASE-NOTES-1.27
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
8 files changed, 77 insertions(+), 4 deletions(-)

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



diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index 5193e51..34d3d77 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -21,6 +21,7 @@
   submitted in the POST body instead.
 * (T158766) Avoid SQL error on MSSQL when using selectRowCount()
 * (T145635) Fix too long index error when installing with MSSQL.
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == MediaWiki 1.27.1 ==
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3c13fa9..1985ab4 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1541,6 +1541,7 @@
// been changed somehow, and keep it if so.
$anonPO = ParserOptions::newFromAnon();
$anonPO->setEditSection( false );
+   $anonPO->setAllowUnsafeRawHtml( false );
if ( !$options->matches( $anonPO ) ) {
wfLogWarning( __METHOD__ . ': Setting a changed 
bogus ParserOptions: ' . wfGetAllCallers( 5 ) );
$options->isBogus = false;
@@ -1554,6 +1555,7 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
$po->isBogus = true;
if ( $options !== null ) {
$this->mParserOptions = empty( 
$options->isBogus ) ? $options : null;
@@ -1563,6 +1565,7 @@
 
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
if ( $options !== null && !empty( $options->isBogus ) ) {
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 62fab5f..3910bd3 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -177,11 +177,16 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
return $po;
}
 
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index c943b7c..438603a 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -79,12 +79,25 @@
 * @param array $attributes
 * @param Parser $parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
public static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return [ $content, 'markerType' => 'nowiki' ];
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return [ $content, 'markerType' => 'nowiki' ];
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_23]: SECURITY: Disable tag on system messages despite $wgR...

2017-04-01 Thread Brian Wolff (Code Review)
Brian Wolff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/346025 )

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..


SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M RELEASE-NOTES-1.23
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
8 files changed, 75 insertions(+), 4 deletions(-)

Approvals:
  Brian Wolff: Verified; Looks good to me, approved



diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 4e1116a..1e5ba7e 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -7,6 +7,7 @@
 === Changes since 1.23.15 ===
 * (T68404) CSS3 attr() function with url type is no longer allowed
   in inline styles.
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == MediaWiki 1.23.15 ==
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index b3e724a..e978d6b 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1418,6 +1418,7 @@
if ( !$this->mParserOptions ) {
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
return wfSetVar( $this->mParserOptions, $options );
}
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index daaa915..49e665c 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -147,6 +147,10 @@
if ( !$this->mParserOptions ) {
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index 71f3faa..1f2ea82 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -78,12 +78,25 @@
 * @param $attributes array
 * @param $parser Parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return array( $content, 'markerType' => 'nowiki' );
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return array( $content, 'markerType' => 
'nowiki' );
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+   // contexts).
+   return Html::rawElement(
+   'span',
+   array( 'class' => 'error' ),
+   // Using ->text() not ->parse() as
+   // a paranoia measure against a loop.
+   wfMessage( 'rawhtml-notallowed' 
)->escaped()
+   );
+   }
} else {
throw new MWException( ' extension tag 
encountered unexpectedly' );
}
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index edd4911..9039203 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -226,6 +226,22 @@
function getMaxGeneratedPPNodeCount()   { return 
$this->mMaxGeneratedPPNodeCount; }
function getMaxPPExpandDepth()  { return 
$this->mMaxPPExpandDepth; }
function getMaxTemplateDepth()  { return 
$this->mMaxTemplateDepth; }
+
+   /**
+* If the wiki is configured to allow raw html ($wgRawHtml = true)
+* is it allowed in the specific case of parsing this page.
+*
+* 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Release notes for no in system messages (1c7889446)

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

Change subject: Release notes for no  in system messages (1c7889446)
..


Release notes for no  in system messages (1c7889446)

Change-Id: I501d00974c6a5c00b36d070ca3d0495971529ed7
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 2ced8a5..bf85fea 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -279,6 +279,7 @@
 * Selflinks are now rendered as href-less  tags with the class mw-selflink
   rather than  tags. The old class name, "selflink", was deprecated
   and will be removed in a future release. (T160480)
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == Compatibility ==
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I501d00974c6a5c00b36d070ca3d0495971529ed7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: EddieGP 
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] mediawiki/core[REL1_23]: SECURITY: Disable tag on system messages despite $wgR...

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

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..

SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M RELEASE-NOTES-1.23
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
8 files changed, 75 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/346025/1

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 4e1116a..1e5ba7e 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -7,6 +7,7 @@
 === Changes since 1.23.15 ===
 * (T68404) CSS3 attr() function with url type is no longer allowed
   in inline styles.
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == MediaWiki 1.23.15 ==
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index b3e724a..e978d6b 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1418,6 +1418,7 @@
if ( !$this->mParserOptions ) {
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
return wfSetVar( $this->mParserOptions, $options );
}
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index daaa915..49e665c 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -147,6 +147,10 @@
if ( !$this->mParserOptions ) {
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index 71f3faa..1f2ea82 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -78,12 +78,25 @@
 * @param $attributes array
 * @param $parser Parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return array( $content, 'markerType' => 'nowiki' );
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return array( $content, 'markerType' => 
'nowiki' );
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+   // contexts).
+   return Html::rawElement(
+   'span',
+   array( 'class' => 'error' ),
+   // Using ->text() not ->parse() as
+   // a paranoia measure against a loop.
+   wfMessage( 'rawhtml-notallowed' 
)->escaped()
+   );
+   }
} else {
throw new MWException( ' extension tag 
encountered unexpectedly' );
}
diff --git a/includes/parser/ParserOptions.php 
b/includes/parser/ParserOptions.php
index edd4911..9039203 100644
--- a/includes/parser/ParserOptions.php
+++ b/includes/parser/ParserOptions.php
@@ -226,6 +226,22 @@
function getMaxGeneratedPPNodeCount()   { return 
$this->mMaxGeneratedPPNodeCount; }
function getMaxPPExpandDepth()  { return 
$this->mMaxPPExpandDepth; }
function getMaxTemplateDepth()  { return 
$this->mMaxTemplateDepth; }
+
+   /**
+* If the wiki is configured to allow raw html ($wgRawHtml = true)
+* is it allowed in the specific case of parsing this page.
+*
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Release notes for no in system messages (1c7889446)

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

Change subject: Release notes for no  in system messages (1c7889446)
..

Release notes for no  in system messages (1c7889446)

Change-Id: I501d00974c6a5c00b36d070ca3d0495971529ed7
---
M RELEASE-NOTES-1.29
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/345999/1

diff --git a/RELEASE-NOTES-1.29 b/RELEASE-NOTES-1.29
index 2ced8a5..bf85fea 100644
--- a/RELEASE-NOTES-1.29
+++ b/RELEASE-NOTES-1.29
@@ -279,6 +279,7 @@
 * Selflinks are now rendered as href-less  tags with the class mw-selflink
   rather than  tags. The old class name, "selflink", was deprecated
   and will be removed in a future release. (T160480)
+* (T156184) $wgRawHtml will no longer apply to internationalization messages.
 
 == Compatibility ==
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I501d00974c6a5c00b36d070ca3d0495971529ed7
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...cldr[master]: Translate Atikamekw language name in French

2017-04-01 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345988 )

Change subject: Translate Atikamekw language name in French
..

Translate Atikamekw language name in French

MediaWiki recently added support for Atikamekw, but CLDR doesn't
provide translation into French.

Fralambert provided 'atikamekw', with the following reference:
http://www.atlas-ling.ca/pdf/ATIKAMEKW_Manuel_Conversation.pdf

Change-Id: I8a74c4f6c97615010d5ef403003b7e40ace5bf04
---
A LocalNames/LocalNamesFr.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/LocalNames/LocalNamesFr.php b/LocalNames/LocalNamesFr.php
new file mode 100644
index 000..eda59bc
--- /dev/null
+++ b/LocalNames/LocalNamesFr.php
@@ -0,0 +1,8 @@
+ 'atikamekw',
+
+];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a74c4f6c97615010d5ef403003b7e40ace5bf04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: master
Gerrit-Owner: Dereckson 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: retry failed page content pieces immediately after page cont...

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345985 )

Change subject: retry failed page content pieces immediately after page content 
step completes
..

retry failed page content pieces immediately after page content step completes

This means we don't regenerate partial stubs, we just put the failed
commands back in the queue and retry until success or we hit max retry
limit.

There are several new config settings as a result of this update.

Bug: T160507
Change-Id: I7db012f3ca8670e3274d33c7ff860962a7eae8f2
---
M xmldumps-backup/defaults.conf
M xmldumps-backup/dumps/CommandManagement.py
M xmldumps-backup/dumps/WikiDump.py
M xmldumps-backup/dumps/apijobs.py
M xmldumps-backup/dumps/flowjob.py
M xmldumps-backup/dumps/pagerange.py
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/recompressjobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/tablesjobs.py
M xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
12 files changed, 72 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/85/345985/1

diff --git a/xmldumps-backup/defaults.conf b/xmldumps-backup/defaults.conf
index 4025b62..d17cbbb 100644
--- a/xmldumps-backup/defaults.conf
+++ b/xmldumps-backup/defaults.conf
@@ -62,6 +62,9 @@
 pagesPerChunkAbstract=0
 jobsperbatch=""
 revsPerJob=100
+maxRetries=0
+retryWait=30
+revsMargin=100
 
 [otherformats]
 multistream=0
diff --git a/xmldumps-backup/dumps/CommandManagement.py 
b/xmldumps-backup/dumps/CommandManagement.py
index 9b054bb..8877eca 100644
--- a/xmldumps-backup/dumps/CommandManagement.py
+++ b/xmldumps-backup/dumps/CommandManagement.py
@@ -173,11 +173,14 @@
 return False
 return True
 
-def exited_with_errors(self):
+def exited_with_errors(self, stringfmt=True):
 if not self.exited_successfully():
 # we wil return the whole pipeline I guess, they might as well
 # see it in the error report instead of the specific issue in the 
pipe.
-return self.pipeline_string()
+if stringfmt:
+return self.pipeline_string()
+else:
+return self._commands
 return None
 
 # Checks the exit values of the individual commands in the
@@ -352,12 +355,12 @@
 return False
 return True
 
-def exited_with_errors(self):
+def exited_with_errors(self, stringfmt=True):
 """Return list of commands that exited with errors."""
 commands = []
 for pipeline in self._command_pipelines:
 if not pipeline.exited_successfully():
-command = pipeline.exited_with_errors()
+command = pipeline.exited_with_errors(stringfmt)
 if command is not None:
 commands.append(command)
 return commands
@@ -575,11 +578,11 @@
 return False
 return True
 
-def commands_with_errors(self):
+def commands_with_errors(self, stringfmt=True):
 commands = []
 for series in self._command_serieses:
 if not series.exited_successfully():
-commands.extend(series.exited_with_errors())
+commands.extend(series.exited_with_errors(stringfmt))
 return commands
 
 def watch_output_queue(self):
diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 9c4801e..09d3b6a 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -210,6 +210,12 @@
 "chunks", "checkpointTime", 1)
 self.revs_per_job = self.get_opt_for_proj_or_default(
 "chunks", "revsPerJob", 1)
+self.max_retries = self.get_opt_for_proj_or_default(
+"chunks", "maxRetries", 1)
+self.retry_wait = self.get_opt_for_proj_or_default(
+"chunks", "retryWait", 1)
+self.revs_margin = self.get_opt_for_proj_or_default(
+"chunks", "revsMargin", 1)
 
 if not self.conf.has_section('otherformats'):
 self.conf.add_section('otherformats')
diff --git a/xmldumps-backup/dumps/apijobs.py b/xmldumps-backup/dumps/apijobs.py
index 089a4da..341be04 100644
--- a/xmldumps-backup/dumps/apijobs.py
+++ b/xmldumps-backup/dumps/apijobs.py
@@ -27,17 +27,17 @@
 raise BackupError("siteinfo dump %s trying to produce more than 
one file" %
   self.dumpname)
 output_dfname = dfnames[0]
-error = self.get_siteinfo(
+error, broken = self.get_siteinfo(
 runner.dump_dir.filename_public_path(output_dfname), runner)
 while error and retries < maxretries:
 retries = retries + 1
 time.sleep(5)
-error = self.get_siteinfo(
+error, broken = self.get_siteinfo(
   

[MediaWiki-commits] [Gerrit] operations/dumps[master]: convert to using page ranges for all checkpoint stuff and no...

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343542 )

Change subject: convert to using page ranges for all checkpoint stuff and no 
checkpoints whatsoever, for checkpoint-file enabled wikis
..


convert to using page ranges for all checkpoint stuff and
no checkpoints whatsoever, for checkpoint-file enabled wikis

this is a large refactor but it can't be helped.

Bug: T160507
Change-Id: I58eb8b5006bfb3b9e7b5274816c1c92b62bc3524
---
M xmldumps-backup/defaults.conf
M xmldumps-backup/dumps/WikiDump.py
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/jobs.py
A xmldumps-backup/dumps/pagerange.py
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/tablesjobs.py
M xmldumps-backup/dumps/utils.py
M xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
11 files changed, 1,260 insertions(+), 501 deletions(-)

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



diff --git a/xmldumps-backup/defaults.conf b/xmldumps-backup/defaults.conf
index c513028..4025b62 100644
--- a/xmldumps-backup/defaults.conf
+++ b/xmldumps-backup/defaults.conf
@@ -61,6 +61,7 @@
 revsPerChunkHistory=0
 pagesPerChunkAbstract=0
 jobsperbatch=""
+revsPerJob=100
 
 [otherformats]
 multistream=0
diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index 6c3b809..9c4801e 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -208,6 +208,8 @@
 "chunks", "recombineHistory", 1)
 self.checkpoint_time = self.get_opt_for_proj_or_default(
 "chunks", "checkpointTime", 1)
+self.revs_per_job = self.get_opt_for_proj_or_default(
+"chunks", "revsPerJob", 1)
 
 if not self.conf.has_section('otherformats'):
 self.conf.add_section('otherformats')
diff --git a/xmldumps-backup/dumps/fileutils.py 
b/xmldumps-backup/dumps/fileutils.py
index ed02de4..f25f2eb 100644
--- a/xmldumps-backup/dumps/fileutils.py
+++ b/xmldumps-backup/dumps/fileutils.py
@@ -332,6 +332,7 @@
 find_first_page_id_in_file(): set self.first_page_id by examining the 
contents,
returning the value, or None if there is no pageID.  We uncompress the 
file
if needed and look through the first 500 lines.
+def find_last_page_id_in_file(self): set self.last_page_id by examining 
the contents
 
 useful variables:
 
@@ -352,6 +353,7 @@
 self.is_truncated = None
 self.is_empty = None
 self.first_page_id = None
+self.last_page_id = None
 self.dirname = os.path.dirname(filename)
 if dfname:
 self.dfname = dfname
@@ -467,6 +469,90 @@
 if result:
 self.first_page_id = result.group('pageid')
 return self.first_page_id
+
+def get_last_lines(self, runner, count):
+"""
+read last count lines from compressed file,
+using tail to get the lines, and return the content
+as one long string
+
+args: Runner, number of lines to read
+"""
+pipeline = self.setup_uncompression_command()
+
+tail = self._wiki.config.tail
+if not exists(tail):
+raise BackupError("tail command %s not found" % tail)
+tail_esc = MiscUtils.shell_escape(tail)
+pipeline.append([tail, "-n", "+%s" % count])
+# without shell
+proc = CommandPipeline(pipeline, quiet=True)
+proc.run_pipeline_get_output()
+last_lines = ""
+if (proc.exited_successfully() or
+(proc.get_failed_cmds_with_retcode() ==
+ [[-signal.SIGPIPE, pipeline[0]]]) or
+(proc.get_failed_cmds_with_retcode() ==
+ [[signal.SIGPIPE + 128, pipeline[0]]])):
+last_lines = proc.output()
+return last_lines
+
+def get_lineno_last_page(self, runner):
+"""
+find and return the line number of the last page tag
+in the file
+
+args: Runner
+"""
+pipeline = self.setup_uncompression_command()
+grep = self._wiki.config.grep
+if not exists(grep):
+raise BackupError("grep command %s not found" % grep)
+pipeline.append([grep, "-n", ""])
+tail = self._wiki.config.tail
+if not exists(tail):
+raise BackupError("tail command %s not found" % tail)
+pipeline.append([tail, "-1"])
+# without shell
+proc = CommandPipeline(pipeline, quiet=True)
+proc.run_pipeline_get_output()
+if (proc.exited_successfully() or
+(proc.get_failed_cmds_with_retcode() ==
+ [[-signal.SIGPIPE, pipeline[0]]]) or
+(proc.get_failed_cmds_with_retcode() ==
+ [[signal.SIGPIPE + 128, pipeline[0]]])):
+output = proc.output()
+   

[MediaWiki-commits] [Gerrit] oojs/ui[master]: Accept proposed size dialog on getSetupProcess

2017-04-01 Thread Ebrahim (Code Review)
Ebrahim has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345984 )

Change subject: Accept proposed size dialog on getSetupProcess
..

Accept proposed size dialog on getSetupProcess

Bug: T161959
Change-Id: I5d660bc6e67b539511b017c4cdf250185fde27c7
---
M src/dialogs/MessageDialog.js
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/src/dialogs/MessageDialog.js b/src/dialogs/MessageDialog.js
index 19078a8..0bc94c8 100644
--- a/src/dialogs/MessageDialog.js
+++ b/src/dialogs/MessageDialog.js
@@ -185,6 +185,7 @@
this.message.setLabel(
data.message !== undefined ? data.message : 
this.constructor.static.message
);
+   this.size = data.size !== undefined ? data.size : 
this.constructor.static.size;
}, this );
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable AbuseFilter blocks on tr.wikipedia

2017-04-01 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345983 )

Change subject: Enable AbuseFilter blocks on tr.wikipedia
..

Enable AbuseFilter blocks on tr.wikipedia

Bug: T161960
Change-Id: I6d1ca245e42916d9d088c53d988b6ea4ecbcc23a
---
M wmf-config/abusefilter.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/abusefilter.php b/wmf-config/abusefilter.php
index 212cdde..c100e53 100644
--- a/wmf-config/abusefilter.php
+++ b/wmf-config/abusefilter.php
@@ -362,6 +362,10 @@
$wgGroupPermissions['autoconfirmed']['abusefilter-log-detail'] 
= true; // T48154
$wgAbuseFilterNotifications = false;
break;
+   case 'trwiki':
+   $wgAbuseFilterBlockDuration = 'indefinite'; // T161960
+   $wgAbuseFilterAnonBlockDuration = '24 hours';
+   break;
case 'ukwiki':
$wgGroupPermissions['*']['abusefilter-log'] = false;
$wgGroupPermissions['*']['abusefilter-view'] = false;

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable NewUserMessage on tr.wikiquote

2017-04-01 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345982 )

Change subject: Enable NewUserMessage on tr.wikiquote
..

Enable NewUserMessage on tr.wikiquote

Bug: T161962
Change-Id: Icdf7ddf96e1fa9e01103df6deb94ff40f1567457
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8501028..3579cb6 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12493,6 +12493,7 @@
'thwikisource' => true, // T33600
'thwikibooks' => true, // T33600
'thwikiquote' => true, // T33600
+   'trwikiquote' => true, // T161962
'ukwiki' => true, // T67125
'urwiki' => true, // T64398
'zhwiki' => true, // T32362

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-04-01T10:00:01+0000

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

Change subject: New Wikidata Build - 2017-04-01T10:00:01+
..


New Wikidata Build - 2017-04-01T10:00:01+

Change-Id: I4e1e46368e05ab206f94701140a786cf99f4
---
M composer.lock
M extensions/ArticlePlaceholder/i18n/sv.json
M vendor/composer/installed.json
3 files changed, 12 insertions(+), 9 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 5b6c9c0..c7cd143 100644
--- a/composer.lock
+++ b/composer.lock
@@ -742,12 +742,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301"
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0a9801be4a9d97e2d29e853c54f2412ed0d0e301;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/19f26ba194a45a305de0970d7b21ab216e117af2;,
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2",
 "shasum": ""
 },
 "require-dev": {
@@ -772,7 +772,7 @@
 ],
 "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
 "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;,
-"time": "2017-03-28 20:38:29"
+"time": "2017-03-31 21:18:23"
 },
 {
 "name": "propertysuggester/property-suggester",
diff --git a/extensions/ArticlePlaceholder/i18n/sv.json 
b/extensions/ArticlePlaceholder/i18n/sv.json
index 1f2228d..b84aa3b 100644
--- a/extensions/ArticlePlaceholder/i18n/sv.json
+++ b/extensions/ArticlePlaceholder/i18n/sv.json
@@ -17,6 +17,7 @@
"articleplaceholder-abouttopic-create-article-label": "Artikelns titel",
"articleplaceholder-abouttopic-create-article-mandatory": "Artikelns 
titel är nödvändig.",
"articleplaceholder-abouttopic-create-article-button": "Skapa en 
artikel",
+   "articleplaceholder-abouttopic-create-emtpy-article-button": "Starta en 
ny artikel",
"articleplaceholder-abouttopic-translate-article-label": "Källspråk:",
"articleplaceholder-abouttopic-translate-article-button": "Översätt 
artikel",
"articleplaceholder-abouttopic-create-article-submit-button": "Skicka",
@@ -26,5 +27,7 @@
"articleplaceholder-abouttopic-lua-identifier": "Externa resurser",
"articleplaceholder-search-header": "Upptäck data om ämnet",
"articleplaceholder-createpage-title": "Skapa $1",
-   "articleplaceholder-createpage-alreadyexists": "Sidan med titeln $1 
finns redan. Välj en annan."
+   "articleplaceholder-createpage-alreadyexists": "Sidan med titeln $1 
finns redan. Välj en annan.",
+   "articleplaceholder-createpage-notitleprovided": "Ingen titel har 
angivits, ange en titel för sidan du vill skapa.",
+   "articleplaceholder-createpage-invalidtitleprovided": "Titeln du angav 
är ogiltig. Tillhandahåll en giltig titel."
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ed0c5d0..a47b4dc 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -115,19 +115,19 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301"
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0a9801be4a9d97e2d29e853c54f2412ed0d0e301;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/19f26ba194a45a305de0970d7b21ab216e117af2;,
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2",
 "shasum": ""
 },
 "require-dev": {
 "jakub-onderka/php-parallel-lint": "0.9.2",
 "mediawiki/mediawiki-codesniffer": "0.7.2"
 },
-"time": "2017-03-28 20:38:29",
+"time": "2017-03-31 21:18:23",
 "type": "mediawiki-extension",
 "installation-source": "dist",
 "autoload": {

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T161936: Apply all the valid gallery attributes

2017-04-01 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345981 )

Change subject: T161936: Apply all the valid gallery attributes
..

T161936: Apply all the valid gallery attributes

 * Fixes the noted rendering difference at,
   /el.wikipedia.org/v3/page/html/Γέλων_ο_Συρακούσιος/6059047

 * Adds a parsoid section to the test from 
I8c52477dc65499d0c8a1ee5cc661a5f9ae78cc07

Change-Id: I31a70256815c519b760e717f2931fae94f79c572
---
M lib/ext/Gallery/index.js
M lib/ext/Gallery/modes.js
M lib/ext/Nowiki/index.js
M lib/wt2html/tt/Sanitizer.js
M tests/parserTests.txt
5 files changed, 49 insertions(+), 13 deletions(-)


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

diff --git a/lib/ext/Gallery/index.js b/lib/ext/Gallery/index.js
index a039d22..7afc827 100644
--- a/lib/ext/Gallery/index.js
+++ b/lib/ext/Gallery/index.js
@@ -13,6 +13,12 @@
 var Util = ParsoidExtApi.Util;
 var DU = ParsoidExtApi.DOMUtils;
 
+// Use a relative include since it's questionably whether we want to expose
+// this through the extensions api, and galleries are ostensibly core
+// functionality.  See T156099
+var Sanitizer = require('../../wt2html/tt/sanitizer.js').Sanitizer;
+var SanitizerConstants = 
require('../../wt2html/tt/sanitizer.js').SanitizerConstants;
+
 var modes = require('./modes.js');
 
 var Opts = function(env, attrs) {
@@ -33,7 +39,19 @@
this.showfilename = (attrs.showfilename !== undefined);
this.showthumbnails = (attrs.showthumbnails !== undefined);
this.caption = attrs.caption;
-   this.class = attrs.class;
+
+   // TODO: Good contender for T54941
+   var ulAttrs = SanitizerConstants.attrWhiteList.ul;
+   this.attrs = Object.keys(attrs)
+   .filter(function(k) { return ulAttrs.includes(k); })
+   .reduce(function(o, k) {
+   if (k === 'style') {
+   o[k] = Sanitizer.checkCss(attrs[k]);
+   } else {
+   o[k] = attrs[k];
+   }
+   return o;
+   }, {});
 };
 
 // FIXME: This is too permissive.  The php implementation only calls
diff --git a/lib/ext/Gallery/modes.js b/lib/ext/Gallery/modes.js
index dbbdb85..c00c9ff 100644
--- a/lib/ext/Gallery/modes.js
+++ b/lib/ext/Gallery/modes.js
@@ -18,8 +18,12 @@
 Traditional.prototype.ul = function(opts, doc) {
var ul = doc.createElement('ul');
var cl = 'gallery mw-gallery-' + opts.mode;
-   if (opts.class) { cl += ' ' + opts.class; }
ul.setAttribute('class', cl);
+   Object.keys(opts.attrs).forEach(function(k) {
+   var v = ul.getAttribute(k) || '';
+   if (v) { v += ' '; }
+   ul.setAttribute(k, v + opts.attrs[k]);
+   });
doc.body.appendChild(ul);
this.perRow(opts, ul);
this.setAdditionalOptions(opts, ul);
@@ -31,7 +35,9 @@
var padding = this.padding;
var total = opts.imageWidth + padding.thumb + padding.box + 
padding.border;
total *= opts.imagesPerRow;
-   ul.setAttribute('style', [
+   var style = ul.getAttribute('style') || '';
+   if (style) { style += ' '; }
+   ul.setAttribute('style', style + [
'max-width: ' + total + 'px;',
'_width: ' + total + 'px;',
].join(' '));
diff --git a/lib/ext/Nowiki/index.js b/lib/ext/Nowiki/index.js
index 4aea917..dffd03e 100644
--- a/lib/ext/Nowiki/index.js
+++ b/lib/ext/Nowiki/index.js
@@ -5,7 +5,7 @@
 
 // Use a relative include since it's questionably whether we want to expose
 // this through the extensions api, and nowikis are ostensibly core
-// functionality.
+// functionality.  See T156099
 var PegTokenizer = require('../../wt2html/tokenizer.js').PegTokenizer;
 
 var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.6.1');
diff --git a/lib/wt2html/tt/Sanitizer.js b/lib/wt2html/tt/Sanitizer.js
index 7c17d98..3563e89 100644
--- a/lib/wt2html/tt/Sanitizer.js
+++ b/lib/wt2html/tt/Sanitizer.js
@@ -812,11 +812,11 @@
'₍': '(',
 }));
 
-Sanitizer.prototype.normalizeCss = function(text) {
+Sanitizer.normalizeCss = function(text) {
// Decode character references like 
text = Sanitizer.decodeCharReferences(text);
 
-   text = text.replace(this.constants.cssDecodeRE, function 
cssDecodeCallback() {
+   text = text.replace(SanitizerConstants.cssDecodeRE, function 
cssDecodeCallback() {
var c;
if (arguments[1] !== undefined) {
// Line continuation
@@ -904,8 +904,8 @@
"i"
 );
 
-Sanitizer.prototype.checkCss = function(text) {
-   text = this.normalizeCss(text);
+Sanitizer.checkCss = function(text) {
+   text = Sanitizer.normalizeCss(text);
// \000-\010\013\016-\037\177 are the octal escape 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: clean up some unused escaped command strings

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345980 )

Change subject: clean up some unused escaped command strings
..


clean up some unused escaped command strings

also, remove a few dead comments and tighten up needless
local var creation

Change-Id: Id42eb650fa661e041f9316879321554d3da8a423
---
M xmldumps-backup/dumps/jobs.py
1 file changed, 9 insertions(+), 29 deletions(-)

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



diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index b661f15..53c13f8 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -12,7 +12,7 @@
 
 from dumps.exceptions import BackupError, BackupPrereqError
 from dumps.fileutils import DumpContents, DumpFilename
-from dumps.utils import TimeUtils, MiscUtils
+from dumps.utils import TimeUtils
 
 
 def get_checkpt_files(dump_dir, dump_names, file_type, file_ext, date=None, 
parts=None):
@@ -261,42 +261,22 @@
 output_filename = runner.dump_dir.filename_public_path(output_file)
 partnum = 0
 recombines = []
-if not exists(runner.wiki.config.head):
-raise BackupError("head command %s not found" % 
runner.wiki.config.head)
+for utility in [runner.wiki.config.head, runner.wiki.config.tail, 
runner.wiki.config.grep]:
+if not exists(utility):
+raise BackupError("command %s not found" % utility)
 head = runner.wiki.config.head
-if not exists(runner.wiki.config.tail):
-raise BackupError("tail command %s not found" % 
runner.wiki.config.tail)
 tail = runner.wiki.config.tail
-if not exists(runner.wiki.config.grep):
-raise BackupError("grep command %s not found" % 
runner.wiki.config.grep)
 grep = runner.wiki.config.grep
-
-# we assume the result is always going to be run in a subshell.
-# much quicker than this script trying to read output
-# and pass it to a subprocess
-output_filename_esc = MiscUtils.shell_escape(output_filename)
-head_esc = MiscUtils.shell_escape(head)
-tail_esc = MiscUtils.shell_escape(tail)
-grep_esc = MiscUtils.shell_escape(grep)
-
-uncompression_command_esc = uncompression_command[:]
-for command in uncompression_command_esc:
-command = MiscUtils.shell_escape(command)
-for command in compression_command:
-command = MiscUtils.shell_escape(command)
 
 if not dfnames:
 raise BackupError("No files for the recombine step found in %s." % 
self.name())
 
 for dfname in dfnames:
-# uh oh FIXME
-# f = MiscUtils.shell_escape(dfname.filename)
 fpath = runner.dump_dir.filename_public_path(dfname)
 partnum = partnum + 1
 pipeline = []
-uncompress_this_file = uncompression_command[:]
-uncompress_this_file.append(fpath)
-pipeline.append(uncompress_this_file)
+uncompression_command.append(fpath)
+pipeline.append(uncompression_command)
 # warning: we figure any header (...)
 # is going to be less than 2000 lines!
 pipeline.append([head, "-2000"])
@@ -307,14 +287,14 @@
 if ((proc.output()) and
 (proc.exited_successfully() or
  proc.get_failed_cmds_with_retcode() ==
- [[-signal.SIGPIPE, uncompress_this_file]] or
+ [[-signal.SIGPIPE, uncompression_command]] or
  proc.get_failed_cmds_with_retcode() ==
- [[signal.SIGPIPE + 128, uncompress_this_file]])):
+ [[signal.SIGPIPE + 128, uncompression_command]])):
 (header_end_num, junk_unused) = proc.output().split(":", 1)
 # get header_end_num
 else:
 raise BackupError("Could not find 'end of header' marker for 
%s" % fpath)
-recombine = " ".join(uncompress_this_file)
+recombine = " ".join(uncompression_command)
 header_end_num = int(header_end_num) + 1
 if partnum == 1:
 # first file, put header and contents

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id42eb650fa661e041f9316879321554d3da8a423
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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/dumps[master]: clean up some unused escaped command strings

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345980 )

Change subject: clean up some unused escaped command strings
..

clean up some unused escaped command strings

also, remove a few dead comments and tighten up needless
local var creation

Change-Id: Id42eb650fa661e041f9316879321554d3da8a423
---
M xmldumps-backup/dumps/jobs.py
1 file changed, 8 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/80/345980/1

diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index b661f15..72c23d6 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -261,42 +261,22 @@
 output_filename = runner.dump_dir.filename_public_path(output_file)
 partnum = 0
 recombines = []
-if not exists(runner.wiki.config.head):
-raise BackupError("head command %s not found" % 
runner.wiki.config.head)
+for utility in [runner.wiki.config.head, runner.wiki.config.tail, 
runner.wiki.config.grep]:
+if not exists(utility):
+raise BackupError("command %s not found" % utility)
 head = runner.wiki.config.head
-if not exists(runner.wiki.config.tail):
-raise BackupError("tail command %s not found" % 
runner.wiki.config.tail)
 tail = runner.wiki.config.tail
-if not exists(runner.wiki.config.grep):
-raise BackupError("grep command %s not found" % 
runner.wiki.config.grep)
 grep = runner.wiki.config.grep
-
-# we assume the result is always going to be run in a subshell.
-# much quicker than this script trying to read output
-# and pass it to a subprocess
-output_filename_esc = MiscUtils.shell_escape(output_filename)
-head_esc = MiscUtils.shell_escape(head)
-tail_esc = MiscUtils.shell_escape(tail)
-grep_esc = MiscUtils.shell_escape(grep)
-
-uncompression_command_esc = uncompression_command[:]
-for command in uncompression_command_esc:
-command = MiscUtils.shell_escape(command)
-for command in compression_command:
-command = MiscUtils.shell_escape(command)
 
 if not dfnames:
 raise BackupError("No files for the recombine step found in %s." % 
self.name())
 
 for dfname in dfnames:
-# uh oh FIXME
-# f = MiscUtils.shell_escape(dfname.filename)
 fpath = runner.dump_dir.filename_public_path(dfname)
 partnum = partnum + 1
 pipeline = []
-uncompress_this_file = uncompression_command[:]
-uncompress_this_file.append(fpath)
-pipeline.append(uncompress_this_file)
+uncompression_command.append(fpath)
+pipeline.append(uncompression_command)
 # warning: we figure any header (...)
 # is going to be less than 2000 lines!
 pipeline.append([head, "-2000"])
@@ -307,14 +287,14 @@
 if ((proc.output()) and
 (proc.exited_successfully() or
  proc.get_failed_cmds_with_retcode() ==
- [[-signal.SIGPIPE, uncompress_this_file]] or
+ [[-signal.SIGPIPE, uncompression_command]] or
  proc.get_failed_cmds_with_retcode() ==
- [[signal.SIGPIPE + 128, uncompress_this_file]])):
+ [[signal.SIGPIPE + 128, uncompression_command]])):
 (header_end_num, junk_unused) = proc.output().split(":", 1)
 # get header_end_num
 else:
 raise BackupError("Could not find 'end of header' marker for 
%s" % fpath)
-recombine = " ".join(uncompress_this_file)
+recombine = " ".join(uncompression_command)
 header_end_num = int(header_end_num) + 1
 if partnum == 1:
 # first file, put header and contents

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id42eb650fa661e041f9316879321554d3da8a423
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: clean up use of fdesc, fhandle varnames

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345977 )

Change subject: clean up use of fdesc, fhandle varnames
..


clean up use of fdesc, fhandle varnames

only use fdesc as varname when we have an actual file descriptor, not handle
only use fhandle when we have an actual file handle and not a descriptor
also use path for variables that describe the full path to a file
a bit more dfname varname cleanup
use dcontents for varnames that are DumpContents instances

Change-Id: I8145043a05e0c6dde2e54b265c071be07e62bc73
---
M xmldumps-backup/dumps/CommandManagement.py
M xmldumps-backup/dumps/WikiDump.py
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/flowjob.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/recompressjobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/dumps/tablesjobs.py
M xmldumps-backup/dumps/utils.py
M xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
M xmldumps-backup/monitor.py
M xmldumps-backup/xmlstreams.py
16 files changed, 232 insertions(+), 197 deletions(-)

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



diff --git a/xmldumps-backup/dumps/CommandManagement.py 
b/xmldumps-backup/dumps/CommandManagement.py
index 3f9af4b..9b054bb 100644
--- a/xmldumps-backup/dumps/CommandManagement.py
+++ b/xmldumps-backup/dumps/CommandManagement.py
@@ -32,7 +32,7 @@
 self._first_process_in_pipe = None
 self._last_poll_state = None
 self._processes = []
-self._save_file = None
+self._save_fhandle = None
 self._save_filename = None
 self._quiet = quiet
 self._poller = None
@@ -73,16 +73,16 @@
 return self._pipeline_string
 
 def save_file(self):
-return self._save_file
+return self._save_fhandle
 
 # note that this (no "b" mode) probably means bad data on windoze...
 # but then this whole module won't run over there :-P
 def open_save_file(self):
 if self._save_filename:
 if self._append:
-self._save_file = open(self._save_filename, "a")
+self._save_fhandle = open(self._save_filename, "a")
 else:
-self._save_file = open(self._save_filename, "w")
+self._save_fhandle = open(self._save_filename, "w")
 
 def subprocess_setup(self):
 # Python installs a SIGPIPE handler by default. This is usually not 
what
diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index e1d0cc3..6c3b809 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -75,9 +75,9 @@
 db_password = default_dbpassword
 return db_user, db_password
 
-adminfile = open(os.path.join(wiki_dir, conf.get("wiki", 
"adminsettings")), "r")
-lines = adminfile.readlines()
-adminfile.close()
+adminfhandle = open(os.path.join(wiki_dir, conf.get("wiki", 
"adminsettings")), "r")
+lines = adminfhandle.readlines()
+adminfhandle.close()
 
 # we are digging through a php file and expecting to find
 # lines more or less like the below.. anything more complicated we're 
not going to handle.
@@ -566,8 +566,8 @@
 return True
 
 try:
-with open(lockfile, "r") as fdesc:
-lines = fdesc.read().splitlines()
+with open(lockfile, "r") as fhandle:
+lines = fhandle.read().splitlines()
 # if there's more than one line it's garbage or wrong file,
 # don't touch
 if len(lines) == 1:
diff --git a/xmldumps-backup/dumps/fileutils.py 
b/xmldumps-backup/dumps/fileutils.py
index 6599a15..ed02de4 100644
--- a/xmldumps-backup/dumps/fileutils.py
+++ b/xmldumps-backup/dumps/fileutils.py
@@ -19,21 +19,21 @@
 class FileUtils(object):
 
 @staticmethod
-def file_age(filename):
-return time.time() - os.stat(filename).st_mtime
+def file_age(filepath):
+return time.time() - os.stat(filepath).st_mtime
 
 @staticmethod
-def atomic_create(filename, mode='w'):
+def atomic_create(filepath, mode='w'):
 """Create a file, aborting if it already exists..."""
-fhandle = os.open(filename, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
-return os.fdopen(fhandle, mode)
+fdesc = os.open(filepath, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
+return os.fdopen(fdesc, mode)
 
 @staticmethod
-def write_file(dirname, filename, text, perms=0):
+def write_file(dirname, filepath, text, perms=0):
 """Write text to a file, as atomically as possible,
 via a temporary file in a specified directory.
 Arguments: dirname = where temp 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: SECURITY: Disable tag on system messages despite $wgR...

2017-04-01 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345979 )

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..

SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
7 files changed, 76 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/345979/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 3c13fa9..1985ab4 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1541,6 +1541,7 @@
// been changed somehow, and keep it if so.
$anonPO = ParserOptions::newFromAnon();
$anonPO->setEditSection( false );
+   $anonPO->setAllowUnsafeRawHtml( false );
if ( !$options->matches( $anonPO ) ) {
wfLogWarning( __METHOD__ . ': Setting a changed 
bogus ParserOptions: ' . wfGetAllCallers( 5 ) );
$options->isBogus = false;
@@ -1554,6 +1555,7 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
$po->isBogus = true;
if ( $options !== null ) {
$this->mParserOptions = empty( 
$options->isBogus ) ? $options : null;
@@ -1563,6 +1565,7 @@
 
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
if ( $options !== null && !empty( $options->isBogus ) ) {
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 62fab5f..3910bd3 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -177,11 +177,16 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
return $po;
}
 
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index c943b7c..438603a 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -79,12 +79,25 @@
 * @param array $attributes
 * @param Parser $parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
public static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return [ $content, 'markerType' => 'nowiki' ];
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return [ $content, 'markerType' => 'nowiki' ];
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+   // contexts).
+   return Html::rawElement(
+   'span',
+   [ 'class' => 'error' ],
+   // Using ->text() not ->parse() as
+   // a paranoia measure against a loop.
+   wfMessage( 'rawhtml-notallowed' 
)->escaped()
+   );
+ 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: SECURITY: Disable tag on system messages despite $wgR...

2017-04-01 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345978 )

Change subject: SECURITY: Disable  tag on system messages despite 
$wgRawHtml = true;
..

SECURITY: Disable  tag on system messages despite $wgRawHtml = true;

System messages may take parameters from untrusted sources. This
may include taking parameters from urls given by unauthenticated
users even if the wiki is a read-only wiki. Allowing  tags
in such a context seems like an accident waiting to happen.

Bug: T156184
Change-Id: I661f482986d319cf41da1d3e7b20a0f028a42e90
---
M includes/OutputPage.php
M includes/cache/MessageCache.php
M includes/parser/CoreTagHooks.php
M includes/parser/ParserOptions.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M tests/phpunit/includes/MessageTest.php
7 files changed, 77 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/345978/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index a8be748..40de17d 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1515,6 +1515,7 @@
// been changed somehow, and keep it if so.
$anonPO = ParserOptions::newFromAnon();
$anonPO->setEditSection( false );
+   $anonPO->setAllowUnsafeRawHtml( false );
if ( !$options->matches( $anonPO ) ) {
wfLogWarning( __METHOD__ . ': Setting a changed 
bogus ParserOptions: ' . wfGetAllCallers( 5 ) );
$options->isBogus = false;
@@ -1528,6 +1529,7 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
$po->isBogus = true;
if ( $options !== null ) {
$this->mParserOptions = empty( 
$options->isBogus ) ? $options : null;
@@ -1537,6 +1539,7 @@
 
$this->mParserOptions = ParserOptions::newFromContext( 
$this->getContext() );
$this->mParserOptions->setEditSection( false );
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
if ( $options !== null && !empty( $options->isBogus ) ) {
diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index dc8c589..d6a0e8a 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -179,11 +179,16 @@
// either.
$po = ParserOptions::newFromAnon();
$po->setEditSection( false );
+   $po->setAllowUnsafeRawHtml( false );
return $po;
}
 
$this->mParserOptions = new ParserOptions;
$this->mParserOptions->setEditSection( false );
+   // Messages may take parameters that could come
+   // from malicious sources. As a precaution, disable
+   // the  parser tag when parsing messages.
+   $this->mParserOptions->setAllowUnsafeRawHtml( false );
}
 
return $this->mParserOptions;
diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php
index c943b7c..438603a 100644
--- a/includes/parser/CoreTagHooks.php
+++ b/includes/parser/CoreTagHooks.php
@@ -79,12 +79,25 @@
 * @param array $attributes
 * @param Parser $parser
 * @throws MWException
-* @return array
+* @return array|string Output of tag hook
 */
public static function html( $content, $attributes, $parser ) {
global $wgRawHtml;
if ( $wgRawHtml ) {
-   return [ $content, 'markerType' => 'nowiki' ];
+   if ( $parser->getOptions()->getAllowUnsafeRawHtml() ) {
+   return [ $content, 'markerType' => 'nowiki' ];
+   } else {
+   // In a system message where raw html is
+   // not allowed (but it is allowed in other
+   // contexts).
+   return Html::rawElement(
+   'span',
+   [ 'class' => 'error' ],
+   // Using ->text() not ->parse() as
+   // a paranoia measure against a loop.
+   wfMessage( 'rawhtml-notallowed' 
)->escaped()
+   );
+ 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiAuth[master]: Use tabs to indent in json

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

Change subject: Use tabs to indent in json
..


Use tabs to indent in json

Change-Id: I4920ce014270f2b629a224857669a424c927f80c
---
M i18n/fi.json
M i18n/nl.json
M package.json
3 files changed, 29 insertions(+), 29 deletions(-)

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



diff --git a/i18n/fi.json b/i18n/fi.json
index 4100abd..7c4ee25 100644
--- a/i18n/fi.json
+++ b/i18n/fi.json
@@ -1,12 +1,12 @@
 {
-"@metadata": {
-"authors": [
-"Jack Phoenix"
-]
-},
-"mwa-autocreate-blocked": "Tunnuksen automaattinen luominen tälle IP:lle 
on estetty etäwikissä.",
-"mwa-error-unknown": "Tuntematon virhe kirjautuessa sisään etäwikiin.",
-"mwa-must-be-imported": "Tunnuksesi täytyy tuoda. http://www.wikia.com/wiki/Special:UserLogin\;>Aseta itsellesi uusi 
salasana Wikiassa, ja sen jälkeen käytä uutta salasanaa täällä.\nHuomioi: Sinun tulee käyttää salasanaa, jonka Wikia lähettää sinulle 
sähköpostitse kirjautuessasi sisään sinne. Sen jälkeen sinua pyydetään 
asettamaan uusi salasana, jota voi käyttää täällä.",
-"mwa-resetpass": "Et voi kirjautua sisään tilapäisellä salasanalla. Ole 
hyvä ja käytä sitä etäwikissä luodaksesi pysyvän salasanan.",
-"mwa-wait": "Ole hyvä ja odota $1 sekuntia ennen kuin yrität uudelleen."
+   "@metadata": {
+   "authors": [
+   "Jack Phoenix"
+   ]
+   },
+   "mwa-autocreate-blocked": "Tunnuksen automaattinen luominen tälle 
IP:lle on estetty etäwikissä.",
+   "mwa-error-unknown": "Tuntematon virhe kirjautuessa sisään etäwikiin.",
+   "mwa-must-be-imported": "Tunnuksesi täytyy tuoda. http://www.wikia.com/wiki/Special:UserLogin\;>Aseta itsellesi uusi 
salasana Wikiassa, ja sen jälkeen käytä uutta salasanaa täällä.\nHuomioi: Sinun tulee käyttää salasanaa, jonka Wikia lähettää sinulle 
sähköpostitse kirjautuessasi sisään sinne. Sen jälkeen sinua pyydetään 
asettamaan uusi salasana, jota voi käyttää täällä.",
+   "mwa-resetpass": "Et voi kirjautua sisään tilapäisellä salasanalla. Ole 
hyvä ja käytä sitä etäwikissä luodaksesi pysyvän salasanan.",
+   "mwa-wait": "Ole hyvä ja odota $1 sekuntia ennen kuin yrität uudelleen."
 }
\ No newline at end of file
diff --git a/i18n/nl.json b/i18n/nl.json
index 80550cf..4e83512 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -1,13 +1,13 @@
 {
-"@metadata": {
-"authors": [
-"Jedimca0"
-]
-},
-"mwa-autocreate-blocked": "Automatische account creatie is voor dit IP 
adres geblokkeerd",
-"mwa-error-unknown": "Er heeft zich een onbekende fout voorgedaan tijdens 
het inloggen.",
-"mwa-error-wrong-token": "Er heeft zich een login token error voorgedaan. 
Probeer het alstublieft opnieuw, en neem contact op met een administrator als 
het dan nog niet lukt.",
-"mwa-must-be-imported": "Uw account moet geïmporteerd worden.\nhttp://www.wikia.com/wiki/Special:UserLogin\;>Reset uw 
wachtwoord op Wikia en gebruik het dan hier.\nNote: U 
moet het wachtwoord gebruiken dat Wikia u per email gestuurd heeft, daarna moet 
u uw wachtwoord wijzigen.",
-"mwa-resetpass": "U kunt niet inloggen met een tijdelijk wachtwoord. 
Gebruik het om de \"remote wiki\" om een nieuw, permanent, wachtwoord in te 
stellen.",
-"mwa-wait": "Wacht alstublieft $1 seconden en probeer het dan opnieuw."
+   "@metadata": {
+   "authors": [
+   "Jedimca0"
+   ]
+   },
+   "mwa-autocreate-blocked": "Automatische account creatie is voor dit IP 
adres geblokkeerd",
+   "mwa-error-unknown": "Er heeft zich een onbekende fout voorgedaan 
tijdens het inloggen.",
+   "mwa-error-wrong-token": "Er heeft zich een login token error 
voorgedaan. Probeer het alstublieft opnieuw, en neem contact op met een 
administrator als het dan nog niet lukt.",
+   "mwa-must-be-imported": "Uw account moet geïmporteerd worden.\nhttp://www.wikia.com/wiki/Special:UserLogin\;>Reset uw 
wachtwoord op Wikia en gebruik het dan hier.\nNote: U 
moet het wachtwoord gebruiken dat Wikia u per email gestuurd heeft, daarna moet 
u uw wachtwoord wijzigen.",
+   "mwa-resetpass": "U kunt niet inloggen met een tijdelijk wachtwoord. 
Gebruik het om de \"remote wiki\" om een nieuw, permanent, wachtwoord in te 
stellen.",
+   "mwa-wait": "Wacht alstublieft $1 seconden en probeer het dan opnieuw."
 }
\ No newline at end of file
diff --git a/package.json b/package.json
index 1819ae0..9534400 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
 {
-  "scripts": {
-"test": "grunt test"
-  },
-  "devDependencies": {
-"grunt": "0.4.5",
-"grunt-cli": "0.1.13",
-"grunt-jsonlint": "1.0.7"
-  }
+   "scripts": {
+   "test": "grunt test"
+   },
+   "devDependencies": 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: clean up use of fdesc, fhandle varnames

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345977 )

Change subject: clean up use of fdesc, fhandle varnames
..

clean up use of fdesc, fhandle varnames

only use fdesc as varname when we have an actual file descriptor, not handle
only use fhandle when we have an actual file handle and not a descriptor
also use path for variables that describe the full path to a file
a bit more dfname varname cleanup
use dcontents for varnames that are DumpContents instances

Change-Id: I8145043a05e0c6dde2e54b265c071be07e62bc73
---
M xmldumps-backup/dumps/CommandManagement.py
M xmldumps-backup/dumps/WikiDump.py
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/flowjob.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/recompressjobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/dumps/tablesjobs.py
M xmldumps-backup/dumps/utils.py
M xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
M xmldumps-backup/monitor.py
M xmldumps-backup/xmlstreams.py
16 files changed, 233 insertions(+), 198 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/77/345977/1

diff --git a/xmldumps-backup/dumps/CommandManagement.py 
b/xmldumps-backup/dumps/CommandManagement.py
index 3f9af4b..9b054bb 100644
--- a/xmldumps-backup/dumps/CommandManagement.py
+++ b/xmldumps-backup/dumps/CommandManagement.py
@@ -32,7 +32,7 @@
 self._first_process_in_pipe = None
 self._last_poll_state = None
 self._processes = []
-self._save_file = None
+self._save_fhandle = None
 self._save_filename = None
 self._quiet = quiet
 self._poller = None
@@ -73,16 +73,16 @@
 return self._pipeline_string
 
 def save_file(self):
-return self._save_file
+return self._save_fhandle
 
 # note that this (no "b" mode) probably means bad data on windoze...
 # but then this whole module won't run over there :-P
 def open_save_file(self):
 if self._save_filename:
 if self._append:
-self._save_file = open(self._save_filename, "a")
+self._save_fhandle = open(self._save_filename, "a")
 else:
-self._save_file = open(self._save_filename, "w")
+self._save_fhandle = open(self._save_filename, "w")
 
 def subprocess_setup(self):
 # Python installs a SIGPIPE handler by default. This is usually not 
what
diff --git a/xmldumps-backup/dumps/WikiDump.py 
b/xmldumps-backup/dumps/WikiDump.py
index e1d0cc3..6c3b809 100644
--- a/xmldumps-backup/dumps/WikiDump.py
+++ b/xmldumps-backup/dumps/WikiDump.py
@@ -75,9 +75,9 @@
 db_password = default_dbpassword
 return db_user, db_password
 
-adminfile = open(os.path.join(wiki_dir, conf.get("wiki", 
"adminsettings")), "r")
-lines = adminfile.readlines()
-adminfile.close()
+adminfhandle = open(os.path.join(wiki_dir, conf.get("wiki", 
"adminsettings")), "r")
+lines = adminfhandle.readlines()
+adminfhandle.close()
 
 # we are digging through a php file and expecting to find
 # lines more or less like the below.. anything more complicated we're 
not going to handle.
@@ -566,8 +566,8 @@
 return True
 
 try:
-with open(lockfile, "r") as fdesc:
-lines = fdesc.read().splitlines()
+with open(lockfile, "r") as fhandle:
+lines = fhandle.read().splitlines()
 # if there's more than one line it's garbage or wrong file,
 # don't touch
 if len(lines) == 1:
diff --git a/xmldumps-backup/dumps/fileutils.py 
b/xmldumps-backup/dumps/fileutils.py
index 6599a15..ed02de4 100644
--- a/xmldumps-backup/dumps/fileutils.py
+++ b/xmldumps-backup/dumps/fileutils.py
@@ -19,21 +19,21 @@
 class FileUtils(object):
 
 @staticmethod
-def file_age(filename):
-return time.time() - os.stat(filename).st_mtime
+def file_age(filepath):
+return time.time() - os.stat(filepath).st_mtime
 
 @staticmethod
-def atomic_create(filename, mode='w'):
+def atomic_create(filepath, mode='w'):
 """Create a file, aborting if it already exists..."""
-fhandle = os.open(filename, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
-return os.fdopen(fhandle, mode)
+fdesc = os.open(filepath, os.O_EXCL + os.O_CREAT + os.O_WRONLY)
+return os.fdopen(fdesc, mode)
 
 @staticmethod
-def write_file(dirname, filename, text, perms=0):
+def write_file(dirname, filepath, text, perms=0):
 """Write text to a file, as atomically as possible,
 via a temporary file in a specified directory.
 Arguments: dirname = where 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: array() -> []

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

Change subject: array() -> []
..


array() -> []

Remove invalid "returns bool always true" comments

Remove return true from other hooks too, update their comments

Check for WikiEditor in a nicer way

Change-Id: I694e3b25f20e35cfc55ba269977047a9c52a2fca
---
M CodeMirror.hooks.php
1 file changed, 29 insertions(+), 40 deletions(-)

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



diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index ab74eba..4dc334a 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -4,10 +4,12 @@
 
/** @var null|array Cached version of global variables, if available, 
otherwise null */
private static $globalVariableScript = null;
+
/** @var null|boolean Saves, if CodeMirror should be loaded on this 
page or not */
private static $isEnabled = null;
+
/** @var array values passed from other extensions for use in 
self::getGlobalVariables() */
-   private static $extModes = array();
+   private static $extModes = [];
 
/**
 * ResourceLoaderRegisterModules hook handler to conditionally register 
CodeMirror modules
@@ -15,59 +17,53 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
 *
 * @param ResourceLoader &$rl The ResourceLoader object
-*
-* @return bool Always true
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$rl ) {
-   $codeMirrorResourceTemplate = array(
+   $codeMirrorResourceTemplate = [
'localBasePath' => __DIR__ . '/resources',
'remoteExtPath' => 'CodeMirror/resources',
-   );
+   ];
 
-   self::$extModes = array(
-   'tag' => array(
+   self::$extModes = [
+   'tag' => [
'pre' => 'mw-tag-pre',
'nowiki' => 'mw-tag-nowiki',
-   ),
-   'func' => array(),
-   'data' => array(),
-   );
-   $extResources = array(
-   'scripts' => array(),
-   'styles' => array(),
-   'messages' => array(),
-   'dependencies' => array( 'ext.CodeMirror.lib' => true ),
-   );
+   ],
+   'func' => [],
+   'data' => [],
+   ];
+   $extResources = [
+   'scripts' => [],
+   'styles' => [],
+   'messages' => [],
+   'dependencies' => [ 'ext.CodeMirror.lib' => true ],
+   ];
 
// Check if WikiEditor is installed and add it as a dependency
-   // FIXME: Is there no better solution doing it?
-   $resourceModules = $rl->getConfig()->get( 'ResourceModules' );
-   if ( isset( $resourceModules['ext.wikiEditor'] ) ) {
+   if ( \ExtensionRegistry::getInstance()->isLoaded( 'WikiEditor' 
) ) {
$extResources['dependencies']['ext.wikiEditor'] = true;
}
 
// enable other extensions to add additional resources and modes
-   Hooks::run( 'CodeMirrorGetAdditionalResources', array( 
&$extResources, ::$extModes ) );
+   Hooks::run( 'CodeMirrorGetAdditionalResources', [ 
&$extResources, ::$extModes ] );
 
// Prepare array of resources for ResourceLoader
-   $codeMirror = array(
+   $codeMirror = [
'scripts' => array_keys( $extResources['scripts'] ),
'styles' => array_keys( $extResources['styles'] ),
'messages' => array_keys( $extResources['messages'] ),
'dependencies' => array_keys( 
$extResources['dependencies'] ),
'group' => 'ext.CodeMirror',
-   ) + $codeMirrorResourceTemplate;
+   ] + $codeMirrorResourceTemplate;
 
-   $rl->register( array( 'ext.CodeMirror.other' => $codeMirror ) );
-
-   return true;
+   $rl->register( [ 'ext.CodeMirror.other' => $codeMirror ] );
}
 
/**
 * Checks, if CodeMirror should be loaded on this page or not.
 *
 * @param IContextSource $context The current ContextSource object
-* @return boolean
+* @return bool
 */
private static function isCodeMirrorEnabled( IContextSource $context ) {
global $wgCodeMirrorEnableFrontend;
@@ -78,7 +74,7 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.widgets.TitleOptionWidget: Apply styles for redirects/dis...

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

Change subject: mw.widgets.TitleOptionWidget: Apply styles for 
redirects/disambiguation links
..


mw.widgets.TitleOptionWidget: Apply styles for redirects/disambiguation links

Bug: T63072
Change-Id: I3e0b67b021c6ad42f131a5c9d3d0d5053d4316a0
---
M resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
index 3583e5e..51508ab 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.TitleOptionWidget.js
@@ -71,6 +71,10 @@
 
if ( config.missing ) {
this.$label.addClass( 'new' );
+   } else if ( config.redirect ) {
+   this.$label.addClass( 'mw-redirect' );
+   } else if ( config.disambiguation ) {
+   this.$label.addClass( 'mw-disambig' );
}
 
if ( config.imageUrl ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e0b67b021c6ad42f131a5c9d3d0d5053d4316a0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: core.js: Add detail to documentation of utilities

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

Change subject: core.js: Add detail to documentation of utilities
..


core.js: Add detail to documentation of utilities

Change-Id: I5846301859936ae02860ce2c01b41ad28d891fa4
---
M src/core.js
1 file changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/src/core.js b/src/core.js
index f3296b1..5e0b2a4 100644
--- a/src/core.js
+++ b/src/core.js
@@ -59,10 +59,10 @@
 
 /**
  * Check if an element is focusable.
- * Inspired from :focusable in jQueryUI v1.11.4 - 2015-04-14
+ * Inspired by :focusable in jQueryUI v1.11.4 - 2015-04-14
  *
  * @param {jQuery} $element Element to test
- * @return {boolean}
+ * @return {boolean} Element is focusable
  */
 OO.ui.isFocusableElement = function ( $element ) {
var nodeName,
@@ -117,7 +117,7 @@
  *
  * @param {jQuery} $container Container to search in
  * @param {boolean} [backwards] Search backwards
- * @return {jQuery} Focusable child, an empty jQuery object if none found
+ * @return {jQuery} Focusable child, or an empty jQuery object if none found
  */
 OO.ui.findFocusable = function ( $container, backwards ) {
var $focusable = $( [] ),
@@ -221,10 +221,10 @@
  *
  * Ported from: http://underscorejs.org/underscore.js
  *
- * @param {Function} func
- * @param {number} wait
- * @param {boolean} immediate
- * @return {Function}
+ * @param {Function} func Function to debounce
+ * @param {number} [wait=0] Wait period in milliseconds
+ * @param {boolean} [immediate] Trigger on leading edge
+ * @return {Function} Debounced function
  */
 OO.ui.debounce = function ( func, wait, immediate ) {
var timeout;
@@ -250,7 +250,7 @@
 /**
  * Puts a console warning with provided message.
  *
- * @param {string} message
+ * @param {string} message Message
  */
 OO.ui.warnDeprecation = function ( message ) {
if ( OO.getProp( window, 'console', 'warn' ) !== undefined ) {
@@ -268,9 +268,9 @@
  * when the wrapper is called, return values from the function are entirely
  * discarded.
  *
- * @param {Function} func
- * @param {number} wait
- * @return {Function}
+ * @param {Function} func Function to throttle
+ * @param {number} wait Throttle window length, in milliseconds
+ * @return {Function} Throttled function
  */
 OO.ui.throttle = function ( func, wait ) {
var context, args, timeout,
@@ -305,7 +305,7 @@
 /**
  * A (possibly faster) way to get the current timestamp as an integer
  *
- * @return {number} Current timestamp
+ * @return {number} Current timestamp, in milliseconds since the Unix epoch
  */
 OO.ui.now = Date.now || function () {
return new Date().getTime();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5846301859936ae02860ce2c01b41ad28d891fa4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: 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] mediawiki...VisualEditor[master]: MWSaveDialog: Run links through a render function for previe...

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

Change subject: MWSaveDialog: Run links through a render function for preview & 
visual diff
..


MWSaveDialog: Run links through a render function for preview & visual diff

Provide a utility funcition in ve.init.mw.LinkCache to do this.

Also use this in ve.ce.MWTransclusionNode/ve.ui.MWPreviewElement, and
introduce to ve.ce.MWExtenionNode

Bug: T73900
Bug: T153535
Change-Id: Ieb9a0274b8c5ae1932c431546f09d18000fa6dd9
---
M modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
M modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
M modules/ve-mw/init/ve.init.mw.LinkCache.js
M modules/ve-mw/ui/dialogs/ve.ui.MWSaveDialog.js
M modules/ve-mw/ui/elements/ve.ui.MWPreviewElement.js
6 files changed, 108 insertions(+), 36 deletions(-)

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



diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
index 2c9df42..6386da7 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWExtensionNode.js
@@ -86,6 +86,22 @@
 };
 
 /**
+ * @inheritdoc
+ */
+ve.ce.MWExtensionNode.prototype.getRenderedDomElements = function () {
+   // Parent method
+   var elements = 
ve.ce.GeneratedContentNode.prototype.getRenderedDomElements.apply( this, 
arguments );
+
+   if ( this.getModelHtmlDocument() ) {
+   ve.init.platform.linkCache.styleParsoidElements(
+   $( elements ),
+   this.getModelHtmlDocument()
+   );
+   }
+   return elements;
+};
+
+/**
  * Handle a successful response from the parser for the wikitext fragment.
  *
  * @param {jQuery.Deferred} deferred The Deferred object created by 
generateContents
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
index 2450d9a..816bf46 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTransclusionNode.js
@@ -191,24 +191,17 @@
 /**
  * @inheritdoc
  */
-ve.ce.MWTransclusionNode.prototype.getRenderedDomElements = function ( 
domElements ) {
-   var $elements = $( 
ve.ce.GeneratedContentNode.prototype.getRenderedDomElements.call( this, 
domElements ) ),
-   transclusionNode = this;
+ve.ce.MWTransclusionNode.prototype.getRenderedDomElements = function () {
+   // Parent method
+   var elements = 
ve.ce.GeneratedContentNode.prototype.getRenderedDomElements.apply( this, 
arguments );
+
if ( this.getModelHtmlDocument() ) {
-   $elements
-   .find( 'a[href][rel="mw:WikiLink"]' ).addBack( 
'a[href][rel="mw:WikiLink"]' )
-   .each( function () {
-   var targetData = 
ve.dm.MWInternalLinkAnnotation.static.getTargetDataFromHref(
-   this.href, 
transclusionNode.getModelHtmlDocument()
-   ),
-   normalisedHref = targetData.title;
-   if ( mw.Title.newFromText( normalisedHref ) ) {
-   normalisedHref = mw.Title.newFromText( 
normalisedHref ).getPrefixedText();
-   }
-   ve.init.platform.linkCache.styleElement( 
normalisedHref, $( this ) );
-   } );
+   ve.init.platform.linkCache.styleParsoidElements(
+   $( elements ),
+   this.getModelHtmlDocument()
+   );
}
-   return $elements.toArray();
+   return elements;
 };
 
 /**
diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index d158fe2..53c67a9 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -744,7 +744,11 @@
this.getSurface().getModel().getDocument().once( 'transact',
this.saveDialog.clearDiff.bind( this.saveDialog )
);
-   this.saveDialog.setDiffAndReview( diffHtml, this.getVisualDiff() );
+   this.saveDialog.setDiffAndReview(
+   diffHtml,
+   this.getVisualDiff(),
+   this.getSurface().getModel().getDocument().getHtmlDocument()
+   );
 };
 
 /**
@@ -1091,6 +1095,7 @@
 ve.init.mw.ArticleTarget.prototype.onSaveDialogPreview = function () {
var wikitext,
target = this;
+
if ( !this.saveDialog.$previewViewer.children().length ) {
this.emit( 'savePreview' );
this.saveDialog.getActions().setAbilities( { approve: 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: array() -> []

2017-04-01 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345976 )

Change subject: array() -> []
..

array() -> []

Remove invalid "returns bool always true" comments

Remove return true from other hooks too, update their comments

Check for WikiEditor in a nicer way

Change-Id: I694e3b25f20e35cfc55ba269977047a9c52a2fca
---
M CodeMirror.hooks.php
1 file changed, 29 insertions(+), 40 deletions(-)


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

diff --git a/CodeMirror.hooks.php b/CodeMirror.hooks.php
index ab74eba..4dc334a 100644
--- a/CodeMirror.hooks.php
+++ b/CodeMirror.hooks.php
@@ -4,10 +4,12 @@
 
/** @var null|array Cached version of global variables, if available, 
otherwise null */
private static $globalVariableScript = null;
+
/** @var null|boolean Saves, if CodeMirror should be loaded on this 
page or not */
private static $isEnabled = null;
+
/** @var array values passed from other extensions for use in 
self::getGlobalVariables() */
-   private static $extModes = array();
+   private static $extModes = [];
 
/**
 * ResourceLoaderRegisterModules hook handler to conditionally register 
CodeMirror modules
@@ -15,59 +17,53 @@
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/ResourceLoaderRegisterModules
 *
 * @param ResourceLoader &$rl The ResourceLoader object
-*
-* @return bool Always true
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
$rl ) {
-   $codeMirrorResourceTemplate = array(
+   $codeMirrorResourceTemplate = [
'localBasePath' => __DIR__ . '/resources',
'remoteExtPath' => 'CodeMirror/resources',
-   );
+   ];
 
-   self::$extModes = array(
-   'tag' => array(
+   self::$extModes = [
+   'tag' => [
'pre' => 'mw-tag-pre',
'nowiki' => 'mw-tag-nowiki',
-   ),
-   'func' => array(),
-   'data' => array(),
-   );
-   $extResources = array(
-   'scripts' => array(),
-   'styles' => array(),
-   'messages' => array(),
-   'dependencies' => array( 'ext.CodeMirror.lib' => true ),
-   );
+   ],
+   'func' => [],
+   'data' => [],
+   ];
+   $extResources = [
+   'scripts' => [],
+   'styles' => [],
+   'messages' => [],
+   'dependencies' => [ 'ext.CodeMirror.lib' => true ],
+   ];
 
// Check if WikiEditor is installed and add it as a dependency
-   // FIXME: Is there no better solution doing it?
-   $resourceModules = $rl->getConfig()->get( 'ResourceModules' );
-   if ( isset( $resourceModules['ext.wikiEditor'] ) ) {
+   if ( \ExtensionRegistry::getInstance()->isLoaded( 'WikiEditor' 
) ) {
$extResources['dependencies']['ext.wikiEditor'] = true;
}
 
// enable other extensions to add additional resources and modes
-   Hooks::run( 'CodeMirrorGetAdditionalResources', array( 
&$extResources, ::$extModes ) );
+   Hooks::run( 'CodeMirrorGetAdditionalResources', [ 
&$extResources, ::$extModes ] );
 
// Prepare array of resources for ResourceLoader
-   $codeMirror = array(
+   $codeMirror = [
'scripts' => array_keys( $extResources['scripts'] ),
'styles' => array_keys( $extResources['styles'] ),
'messages' => array_keys( $extResources['messages'] ),
'dependencies' => array_keys( 
$extResources['dependencies'] ),
'group' => 'ext.CodeMirror',
-   ) + $codeMirrorResourceTemplate;
+   ] + $codeMirrorResourceTemplate;
 
-   $rl->register( array( 'ext.CodeMirror.other' => $codeMirror ) );
-
-   return true;
+   $rl->register( [ 'ext.CodeMirror.other' => $codeMirror ] );
}
 
/**
 * Checks, if CodeMirror should be loaded on this page or not.
 *
 * @param IContextSource $context The current ContextSource object
-* @return boolean
+* @return bool
 */
private static function isCodeMirrorEnabled( IContextSource $context ) {
global $wgCodeMirrorEnableFrontend;
@@ -78,7 +74,7 @@
self::$isEnabled = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: persistent iowait issues

2017-04-01 Thread Rush (Code Review)
Rush has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345975 )

Change subject: tools: persistent iowait issues
..


tools: persistent iowait issues

We have a theory that on reducing nodes we have reduced
aggregate available io here and we are bumping up to evaluate
effect.

Change-Id: I6142677e26fe41f3599968357dbb675ababca295
---
M modules/labstore/manifests/traffic_shaping.pp
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Andrew Bogott: Looks good to me, but someone else must approve
  Rush: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/labstore/manifests/traffic_shaping.pp 
b/modules/labstore/manifests/traffic_shaping.pp
index 4c87e29..742c152 100644
--- a/modules/labstore/manifests/traffic_shaping.pp
+++ b/modules/labstore/manifests/traffic_shaping.pp
@@ -1,6 +1,6 @@
 class labstore::traffic_shaping(
-$nfs_write = '7000kbps',
-$nfs_read = '9500kbps',
+$nfs_write = '8500kbps',
+$nfs_read = '1000kbps',
 $nfs_dumps_read = '15000kbps',
 $eth0_egress = '3kbps',
 ) {

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: tools: persistent iowait issues

2017-04-01 Thread Rush (Code Review)
Rush has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345975 )

Change subject: tools: persistent iowait issues
..

tools: persistent iowait issues

We have a theory that on reducing nodes we have reduced
aggregate available io here and we are bumping up to evaluate
effect.

Change-Id: I6142677e26fe41f3599968357dbb675ababca295
---
M modules/labstore/manifests/traffic_shaping.pp
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/labstore/manifests/traffic_shaping.pp 
b/modules/labstore/manifests/traffic_shaping.pp
index 4c87e29..742c152 100644
--- a/modules/labstore/manifests/traffic_shaping.pp
+++ b/modules/labstore/manifests/traffic_shaping.pp
@@ -1,6 +1,6 @@
 class labstore::traffic_shaping(
-$nfs_write = '7000kbps',
-$nfs_read = '9500kbps',
+$nfs_write = '8500kbps',
+$nfs_read = '1000kbps',
 $nfs_dumps_read = '15000kbps',
 $eth0_egress = '3kbps',
 ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: [WIP] Add tests for adding wb-identifiers to page_props

2017-04-01 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345974 )

Change subject: [WIP] Add tests for adding wb-identifiers to page_props
..

[WIP] Add tests for adding wb-identifiers to page_props

Bug: T114617
Change-Id: I174bcddf837697233765f3212874ad07bb48d6bb
---
M repo/tests/phpunit/includes/Content/ItemContentTest.php
1 file changed, 32 insertions(+), 0 deletions(-)


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

diff --git a/repo/tests/phpunit/includes/Content/ItemContentTest.php 
b/repo/tests/phpunit/includes/Content/ItemContentTest.php
index 6920db6..31c6746 100644
--- a/repo/tests/phpunit/includes/Content/ItemContentTest.php
+++ b/repo/tests/phpunit/includes/Content/ItemContentTest.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase\Repo\Tests\Content;
 
+use DataValues\StringValue;
 use Diff\DiffOp\Diff\Diff;
 use Diff\DiffOp\DiffOpAdd;
 use Diff\DiffOp\DiffOpRemove;
@@ -13,9 +14,11 @@
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Services\Diff\EntityDiff;
+use Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup;
 use Wikibase\DataModel\SiteLink;
 use Wikibase\DataModel\SiteLinkList;
 use Wikibase\DataModel\Snak\PropertyNoValueSnak;
+use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\EntityContent;
 use Wikibase\ItemContent;
 use Wikibase\Repo\Content\EntityContentDiff;
@@ -109,6 +112,7 @@
$itemContent->getEntity()->setLabel( 'en', "cake" );
$itemContent->getEntity()->getSiteLinkList()->addNewSiteLink( 
'dewiki', 'Berlin' );
 
+
return array(
array( $itemContent, "cake\nBerlin" ),
);
@@ -155,6 +159,25 @@
);
 
return $itemContent;
+   }
+
+   private function getItemContentWithIdentifierClaims() {
+   $itemContent = $this->newEmpty( new ItemId( 'Q2' ) );
+   $item = $itemContent->getItem();
+
+   $snak = new PropertyValueSnak( new PropertyId( 'P11' ), new 
StringValue( 'Tehran' ) );
+   $guid = $item->getId()->getSerialization() . 
'$D8404CDA-25E4-4334-AG93-A3290BCD9C0P';
+   $item->getStatements()->addNewStatement( $snak, null, null, 
$guid );
+
+   return $itemContent;
+   }
+
+   private function getPropertyDataTypeLookup() {
+   $dataTypeLookup = new InMemoryDataTypeLookup();
+
+   $dataTypeLookup->setDataTypeForProperty( new PropertyId( 'P11' 
), 'external-id' );
+
+   return $dataTypeLookup;
}
 
/**
@@ -206,6 +229,15 @@
)
);
 
+   $cases['identifiers'] = [
+   $this->getItemContentWithIdentifierClaims(),
+   [
+   'wb-claims' => 1,
+   'wb-identifiers' => 1,
+   'wb-sitelinks' => 0,
+   ]
+   ];
+
return $cases;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I174bcddf837697233765f3212874ad07bb48d6bb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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]: Valid tags on a gallery should correspond to unordered list

2017-04-01 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345973 )

Change subject: Valid tags on a gallery should correspond to unordered list
..

Valid tags on a gallery should correspond to unordered list

 * This was introduced in 4d3446a8e3e when galleries were tables.
   However, in 05579cf0e60, it switched to ul's, but missed updating the
   sanitization.

 * As an example, the test shows that summary is currently wrongly
   permitted.

Change-Id: I8c52477dc65499d0c8a1ee5cc661a5f9ae78cc07
---
M includes/parser/Parser.php
M tests/parser/parserTests.txt
2 files changed, 18 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/73/345973/1

diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 47d9a62..be4557d 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -4975,7 +4975,7 @@
$ig->setShowFilename( false );
$ig->setParser( $this );
$ig->setHideBadImages();
-   $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 
'table' ) );
+   $ig->setAttributes( Sanitizer::validateTagAttributes( $params, 
'ul' ) );
 
if ( isset( $params['showfilename'] ) ) {
$ig->setShowFilename( true );
diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 2def875..3a31351 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -19069,6 +19069,23 @@
 !! end
 ### Note: Above tests excludes the "{{NUMBEROFADMINS}}" magic word because it 
generates a MySQL error when included.
 
+!! test
+Gallery with valid attributes
+!! wikitext
+
+File:File:Foobar.jpg
+
+!! html/php
+
+   
+   File:Foobar.jpg
+   
+   
+   
+
+
+!! end
+
 ## Parsoid thinks the "centre" here is a property, not a caption.
 !! test
 Gallery

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Slideshow does not support per row option

2017-04-01 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345971 )

Change subject: Slideshow does not support per row option
..

Slideshow does not support per row option

Change-Id: I007dc51bb894baa9417364048dbc432212a0ccce
---
M lib/ext/Gallery/modes.js
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/lib/ext/Gallery/modes.js b/lib/ext/Gallery/modes.js
index 78ec7e7..dbbdb85 100644
--- a/lib/ext/Gallery/modes.js
+++ b/lib/ext/Gallery/modes.js
@@ -203,6 +203,8 @@
ul.setAttribute('data-showthumbnails', opts.showthumbnails ? "1" : "");
 };
 
+Slideshow.prototype.perRow = function() {};
+
 var modes = JSUtils.mapObject({
traditional: new Traditional({}),
nolines: new Traditional({

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I007dc51bb894baa9417364048dbc432212a0ccce
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add additional options to slideshow gallery

2017-04-01 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345970 )

Change subject: Add additional options to slideshow gallery
..

Add additional options to slideshow gallery

Change-Id: I23b9afca9e74e9cd2e732efc3a5a2659eb36132a
---
M lib/ext/Gallery/index.js
M lib/ext/Gallery/modes.js
M tests/parserTests.txt
3 files changed, 39 insertions(+), 1 deletion(-)


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

diff --git a/lib/ext/Gallery/index.js b/lib/ext/Gallery/index.js
index 39ceaeb..a039d22 100644
--- a/lib/ext/Gallery/index.js
+++ b/lib/ext/Gallery/index.js
@@ -31,6 +31,7 @@
if (modes.has(mode)) { this.mode = mode; }
 
this.showfilename = (attrs.showfilename !== undefined);
+   this.showthumbnails = (attrs.showthumbnails !== undefined);
this.caption = attrs.caption;
this.class = attrs.class;
 };
diff --git a/lib/ext/Gallery/modes.js b/lib/ext/Gallery/modes.js
index 1f7c7a4..78ec7e7 100644
--- a/lib/ext/Gallery/modes.js
+++ b/lib/ext/Gallery/modes.js
@@ -22,6 +22,7 @@
ul.setAttribute('class', cl);
doc.body.appendChild(ul);
this.perRow(opts, ul);
+   this.setAdditionalOptions(opts, ul);
return ul;
 };
 
@@ -36,6 +37,8 @@
].join(' '));
}
 };
+
+Traditional.prototype.setAdditionalOptions = function(opts, ul) {};
 
 Traditional.prototype.caption = function(opts, doc, ul, caption) {
var li = doc.createElement('li');
@@ -191,13 +194,22 @@
box.appendChild(wrapper);
 };
 
+var Slideshow = function(options) {
+   Traditional.call(this, options);
+};
+coreutil.inherits(Slideshow, Traditional);
+
+Slideshow.prototype.setAdditionalOptions = function(opts, ul) {
+   ul.setAttribute('data-showthumbnails', opts.showthumbnails ? "1" : "");
+};
+
 var modes = JSUtils.mapObject({
traditional: new Traditional({}),
nolines: new Traditional({
mode: 'nolines',
padding: { thumb: 0, box: 5, border: 4 },
}),
-   slideshow: new Traditional({ mode: 'slideshow' }),
+   slideshow: new Slideshow({ mode: 'slideshow' }),
packed: new Packed({}),
'packed-hover': new Packed({ mode: 'packed-hover' }),
'packed-overlay': new Packed({ mode: 'packed-overlay' }),
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index cb0001f..029de3a 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -19684,6 +19684,31 @@
 !! end
 
 !! test
+Gallery in slideshow mode
+!! options
+parsoid={
+  "nativeGallery": true
+}
+!! wikitext
+
+File:Foobar.jpg
+
+!! html/php
+
+   
+   http://example.com/images/thumb/3/3a/Foobar.jpg/120px-Foobar.jpg; 
width="120" height="14" 
srcset="http://example.com/images/thumb/3/3a/Foobar.jpg/180px-Foobar.jpg 1.5x, 
http://example.com/images/thumb/3/3a/Foobar.jpg/240px-Foobar.jpg 2x" 
/>
+   
+   
+   
+
+
+!! html/parsoid
+
+
+
+!! end
+
+!! test
 HTML Hex character encoding (spells the word "JavaScript")
 !! options
 parsoid=wt2html,wt2wt,html2html

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23b9afca9e74e9cd2e732efc3a5a2659eb36132a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Do not use fancy styled badge on Modern and CologneBlue

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

Change subject: Do not use fancy styled badge on Modern and CologneBlue
..

Do not use fancy styled badge on Modern and CologneBlue

Just show the textual "Alerts (1)" and "Notices (1)".

Updated NotificationBadgeWidget to use that internally as label,
same as the PHP-generated list item does after d4d325e7.

Bug: T141944
Change-Id: I468c67b0866530e21c9af32cd02816075a3693a1
---
M extension.json
D modules/nojs/mw.echo.badge.modern.less
M modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
M modules/ui/mw.echo.ui.NotificationBadgeWidget.js
4 files changed, 30 insertions(+), 31 deletions(-)


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

diff --git a/extension.json b/extension.json
index 2dec0f1..fa04e3a 100644
--- a/extension.json
+++ b/extension.json
@@ -193,6 +193,8 @@
"mediawiki.api.options"
],
"messages": [
+   "echo-notification-notice",
+   "echo-notification-alert",
"echo-popup-footer-special-page-invitation",
"echo-popup-footer-special-page-invitation-link"
],
@@ -405,19 +407,20 @@
},
"ext.echo.styles.badge": {
"position": "top",
-   "styles": [
-   "nojs/mw.echo.badge.less"
-   ],
"skinStyles": {
+   "default": [
+   "nojs/mw.echo.badge.less"
+   ],
"monobook": [
+   "nojs/mw.echo.badge.less",
"nojs/mw.echo.badge.monobook.less"
],
"vector": [
+   "nojs/mw.echo.badge.less",
"nojs/mw.echo.badge.vector.less"
],
-   "modern": [
-   "nojs/mw.echo.badge.modern.less"
-   ]
+   "cologneblue": [],
+   "modern": []
},
"targets": [
"desktop",
diff --git a/modules/nojs/mw.echo.badge.modern.less 
b/modules/nojs/mw.echo.badge.modern.less
deleted file mode 100644
index 4848401..000
--- a/modules/nojs/mw.echo.badge.modern.less
+++ /dev/null
@@ -1,8 +0,0 @@
-.mw-echo-notifications-badge {
-   #pt-notifications-alert &,
-   #pt-notifications-notice & {
-   &:before {
-   z-index: 0;
-   }
-   }
-}
diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
index 6dc5914..96c5a7d 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.modern.less
@@ -3,16 +3,15 @@
 }
 
 #p-personal li.mw-echo-ui-notificationBadgeButtonPopupWidget {
-   font-variant: normal;
-   text-transform: none;
-   font-weight: normal;
-   // Badge
-   > .oo-ui-buttonElement-button {
-   border-radius: 0;
-   }
-   // Popup buttons
-   .oo-ui-buttonElement-button:hover {
-   // In modern, the hover color is white, which is unhelpful.
-   color: #666;
+   .mw-echo-ui-notificationBadgeButtonPopupWidget-popup {
+   font-variant: normal;
+   text-transform: none;
+   font-weight: normal;
+
+   // Popup buttons
+   .oo-ui-buttonElement-button:hover {
+   // In modern, the hover color is white, which is 
unhelpful.
+   color: #666;
+   }
}
 }
diff --git a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js 
b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
index 25170f4..46bcbc9 100644
--- a/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
+++ b/modules/ui/mw.echo.ui.NotificationBadgeWidget.js
@@ -24,7 +24,7 @@
 */
mw.echo.ui.NotificationBadgeWidget = function 
MwEchoUiNotificationBadgeButtonPopupWidget( controller, manager, config ) {
var buttonFlags, allNotificationsButton, preferencesButton, 
footerButtonGroupWidget, $footer,
-   notice, adjustedTypeString;
+   notice, adjustedTypeString, wrappedBadgeLabel;
 
config = config || {};
config.links = config.links || {};
@@ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add primary key qc_type and qc_value

2017-04-01 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345968 )

Change subject: Add primary key qc_type and qc_value
..

Add primary key qc_type and qc_value

Bug: T146571
Change-Id: I92518d2f14fa100b887aa02e9615e4513b9eb59b
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I92518d2f14fa100b887aa02e9615e4513b9eb59b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Pickle] Update keys

2017-04-01 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345967 )

Change subject: [Pickle] Update keys
..

[Pickle] Update keys

Change-Id: I3233a5bb05099c9cf5b62d09e93656dab12fc608
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/67/345967/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 17ee55f..408808e 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2007,10 +2007,9 @@
 optional = pickle-testspec-subpage, pickle-testcase-subpage, 
pickle-default-subpage
 ignored = pickle-testspec-invoke, pickle-testcase-invoke, pickle-default-invoke
 ignored = pickle-frame-full-header, pickle-frame-vivid-header
-ignored = pickle-report-adapt-compact-wrap-description
-ignored = pickle-report-adapt-compact-wrap-line, 
pickle-report-adapt-vivid-wrap-line
-ignored = pickle-report-adapt-full-wrap-description, 
pickle-report-adapt-full-wrap-line
-ignored = pickle-report-adapt-vivid-wrap-description
+ignored = pickle-report-frame-wrap-description
+ignored = pickle-report-adapt-wrap-line
+ignored = Pickle-report-adapt-wrap-description, 
pickle-report-adapt-full-wrap-line
 
 Pipe Escape
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3233a5bb05099c9cf5b62d09e93656dab12fc608
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: [Pickle] Update keys

2017-04-01 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345967 )

Change subject: [Pickle] Update keys
..


[Pickle] Update keys

Change-Id: I3233a5bb05099c9cf5b62d09e93656dab12fc608
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 3 insertions(+), 4 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 17ee55f..408808e 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -2007,10 +2007,9 @@
 optional = pickle-testspec-subpage, pickle-testcase-subpage, 
pickle-default-subpage
 ignored = pickle-testspec-invoke, pickle-testcase-invoke, pickle-default-invoke
 ignored = pickle-frame-full-header, pickle-frame-vivid-header
-ignored = pickle-report-adapt-compact-wrap-description
-ignored = pickle-report-adapt-compact-wrap-line, 
pickle-report-adapt-vivid-wrap-line
-ignored = pickle-report-adapt-full-wrap-description, 
pickle-report-adapt-full-wrap-line
-ignored = pickle-report-adapt-vivid-wrap-description
+ignored = pickle-report-frame-wrap-description
+ignored = pickle-report-adapt-wrap-line
+ignored = Pickle-report-adapt-wrap-description, 
pickle-report-adapt-full-wrap-line
 
 Pipe Escape
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3233a5bb05099c9cf5b62d09e93656dab12fc608
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: DumpFile class name change; too confusing when we also have ...

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345966 )

Change subject: DumpFile class name change; too confusing when we also have 
DumpFilename
..


DumpFile class name change; too confusing when we also have DumpFilename

Change-Id: Ia80414ba0392ff4586f8ec9af464095ad0f73ad8
---
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/xmlcontentjobs.py
4 files changed, 25 insertions(+), 28 deletions(-)

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



diff --git a/xmldumps-backup/dumps/fileutils.py 
b/xmldumps-backup/dumps/fileutils.py
index d9ece53..de1ed66 100644
--- a/xmldumps-backup/dumps/fileutils.py
+++ b/xmldumps-backup/dumps/fileutils.py
@@ -309,30 +309,29 @@
 return filename
 
 
-class DumpFile(object):
-"""File containing output created by any job of a jump run.  This includes
+class DumpContents(object):
+"""Methods for dealing with dump contents in a file containing output
+created by any job of a jump run.  This includes
 any file that follows the standard naming convention, i.e.
 projectname-date-dumpname.sql/xml.gz/bz2/7z (possibly with a file part
 number, possibly with start/end page id information embedded in the name).
 
 Methods:
 
-md5sum(): return md5sum of the file contents.
-sha1sum(): return sha1sum of the file contents.
-checksum(htype): return checksum of the specified type, of the file 
contents.
+md5sum(): return md5sum of the contents.
+sha1sum(): return sha1sum of the contents.
+checksum(htype): return checksum of the specified type, of the contents.
 check_if_truncated(): for compressed files, check if the file is truncated 
(stops
abruptly before the end of the compressed data) or not, and set and 
return
  self.is_truncated accordingly.  This is fast for bzip2 files
and slow for gz and 7z fles, since for the latter two types it must 
serially
read through the file to determine if it is truncated or not.
-get_size(): returns the current size of the file in bytes
+get_size(): returns the current size of the file contents in bytes
 rename(newname): rename the file. Arguments: the new name of the file 
without
the directory.
-find_first_page_id_in_file(): set self.first_page_id by examining the file 
contents,
+find_first_page_id_in_file(): set self.first_page_id by examining the 
contents,
returning the value, or None if there is no pageID.  We uncompress the 
file
if needed and look through the first 500 lines.
-
-#plus the usual file methods (read, write, open, close)
 
 useful variables:
 
@@ -356,8 +355,6 @@
 self.file_obj.new_from_filename(os.path.basename(filename))
 if verbose:
 sys.stderr.write("setting up info for %s\n" % filename)
-
-#super(DumpFile,self).__init__(ops, args, s3Sess)
 
 def _checksum(self, summer):
 if not self.filename:
diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index 5125c18..e0d689d 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -11,7 +11,7 @@
 from dumps.CommandManagement import CommandPipeline
 
 from dumps.exceptions import BackupError, BackupPrereqError
-from dumps.fileutils import DumpFile, DumpFilename
+from dumps.fileutils import DumpContents, DumpFilename
 from dumps.utils import TimeUtils, MiscUtils
 
 
@@ -192,7 +192,7 @@
 
 for dump_fname in self.list_outfiles_to_check_for_truncation(
 runner.dump_dir):
-dfile = DumpFile(runner.wiki, runner.dump_dir.filename_public_path(
+dfile = DumpContents(runner.wiki, 
runner.dump_dir.filename_public_path(
 dump_fname), dump_fname)
 
 file_truncated = True
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index 0a74fd2..ad49055 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ b/xmldumps-backup/dumps/runnerutils.py
@@ -10,7 +10,7 @@
 import json
 
 from dumps.exceptions import BackupError
-from dumps.fileutils import DumpFile, DumpFilename, FileUtils
+from dumps.fileutils import DumpContents, DumpFilename, FileUtils
 from dumps.utils import TimeUtils
 
 
@@ -122,8 +122,8 @@
 output = {htype: {"files": {}}}
 output_json = file(checksum_filename_json, "w")
 dumpjobdata.debugfn("Checksumming %s via %s" % 
(file_obj.filename, htype))
-dumpfile = DumpFile(self.wiki, 
dumpjobdata.dump_dir.filename_public_path(file_obj),
-None, self.verbose)
+dumpfile = DumpContents(self.wiki, 
dumpjobdata.dump_dir.filename_public_path(file_obj),
+None, self.verbose)

[MediaWiki-commits] [Gerrit] operations/dumps[master]: DumpFile class name change; too confusing when we also have ...

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345966 )

Change subject: DumpFile class name change; too confusing when we also have 
DumpFilename
..

DumpFile class name change; too confusing when we also have DumpFilename

Change-Id: Ia80414ba0392ff4586f8ec9af464095ad0f73ad8
---
M xmldumps-backup/dumps/fileutils.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/xmlcontentjobs.py
4 files changed, 25 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/66/345966/1

diff --git a/xmldumps-backup/dumps/fileutils.py 
b/xmldumps-backup/dumps/fileutils.py
index d9ece53..de1ed66 100644
--- a/xmldumps-backup/dumps/fileutils.py
+++ b/xmldumps-backup/dumps/fileutils.py
@@ -309,30 +309,29 @@
 return filename
 
 
-class DumpFile(object):
-"""File containing output created by any job of a jump run.  This includes
+class DumpContents(object):
+"""Methods for dealing with dump contents in a file containing output
+created by any job of a jump run.  This includes
 any file that follows the standard naming convention, i.e.
 projectname-date-dumpname.sql/xml.gz/bz2/7z (possibly with a file part
 number, possibly with start/end page id information embedded in the name).
 
 Methods:
 
-md5sum(): return md5sum of the file contents.
-sha1sum(): return sha1sum of the file contents.
-checksum(htype): return checksum of the specified type, of the file 
contents.
+md5sum(): return md5sum of the contents.
+sha1sum(): return sha1sum of the contents.
+checksum(htype): return checksum of the specified type, of the contents.
 check_if_truncated(): for compressed files, check if the file is truncated 
(stops
abruptly before the end of the compressed data) or not, and set and 
return
  self.is_truncated accordingly.  This is fast for bzip2 files
and slow for gz and 7z fles, since for the latter two types it must 
serially
read through the file to determine if it is truncated or not.
-get_size(): returns the current size of the file in bytes
+get_size(): returns the current size of the file contents in bytes
 rename(newname): rename the file. Arguments: the new name of the file 
without
the directory.
-find_first_page_id_in_file(): set self.first_page_id by examining the file 
contents,
+find_first_page_id_in_file(): set self.first_page_id by examining the 
contents,
returning the value, or None if there is no pageID.  We uncompress the 
file
if needed and look through the first 500 lines.
-
-#plus the usual file methods (read, write, open, close)
 
 useful variables:
 
@@ -356,8 +355,6 @@
 self.file_obj.new_from_filename(os.path.basename(filename))
 if verbose:
 sys.stderr.write("setting up info for %s\n" % filename)
-
-#super(DumpFile,self).__init__(ops, args, s3Sess)
 
 def _checksum(self, summer):
 if not self.filename:
diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index 5125c18..e0d689d 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -11,7 +11,7 @@
 from dumps.CommandManagement import CommandPipeline
 
 from dumps.exceptions import BackupError, BackupPrereqError
-from dumps.fileutils import DumpFile, DumpFilename
+from dumps.fileutils import DumpContents, DumpFilename
 from dumps.utils import TimeUtils, MiscUtils
 
 
@@ -192,7 +192,7 @@
 
 for dump_fname in self.list_outfiles_to_check_for_truncation(
 runner.dump_dir):
-dfile = DumpFile(runner.wiki, runner.dump_dir.filename_public_path(
+dfile = DumpContents(runner.wiki, 
runner.dump_dir.filename_public_path(
 dump_fname), dump_fname)
 
 file_truncated = True
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index 0a74fd2..ad49055 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ b/xmldumps-backup/dumps/runnerutils.py
@@ -10,7 +10,7 @@
 import json
 
 from dumps.exceptions import BackupError
-from dumps.fileutils import DumpFile, DumpFilename, FileUtils
+from dumps.fileutils import DumpContents, DumpFilename, FileUtils
 from dumps.utils import TimeUtils
 
 
@@ -122,8 +122,8 @@
 output = {htype: {"files": {}}}
 output_json = file(checksum_filename_json, "w")
 dumpjobdata.debugfn("Checksumming %s via %s" % 
(file_obj.filename, htype))
-dumpfile = DumpFile(self.wiki, 
dumpjobdata.dump_dir.filename_public_path(file_obj),
-None, self.verbose)
+dumpfile = DumpContents(self.wiki, 
dumpjobdata.dump_dir.filename_public_path(file_obj),
+None, self.verbose)
  

[MediaWiki-commits] [Gerrit] operations/dumps[master]: move stub-related code in page content dumps out to separate...

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343541 )

Change subject: move stub-related code in page content dumps out to separate 
class
..


move stub-related code in page content dumps out to separate class

Change-Id: Ia2c0bb2fea06d7c40f82851de76f591c7f370f34
---
M xmldumps-backup/dumps/xmlcontentjobs.py
1 file changed, 124 insertions(+), 103 deletions(-)

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



diff --git a/xmldumps-backup/dumps/xmlcontentjobs.py 
b/xmldumps-backup/dumps/xmlcontentjobs.py
index 9519098..5f37c61 100644
--- a/xmldumps-backup/dumps/xmlcontentjobs.py
+++ b/xmldumps-backup/dumps/xmlcontentjobs.py
@@ -16,6 +16,122 @@
 from dumps.WikiDump import Locker
 
 
+class StubProvider(object):
+"""
+make or find stub files for use in page content dump
+"""
+def __init__(self, wiki, jobinfo, verbose):
+self.wiki = wiki
+self.jobinfo = jobinfo
+self.verbose = verbose
+
+def get_stub_files(self, runner, partnum=None):
+'''
+get the stub files pertaining to our dumpname, which is *one* of
+articles, pages-current, pages-history.
+stubs include all of these together.
+we will either return the one full stubs file that exists
+or the one stub file part, if we are (re)running a specific
+file part (subjob), or all file parts if we are (re)running
+the entire job which is configured for subjobs.
+
+arguments:
+   runner- Runner object
+   partnum (int) - number of file part (subjob) if any
+'''
+if partnum is None:
+partnum = self.jobinfo['partnum_todo']
+if not 
self.jobinfo['dumpname'].startswith(self.jobinfo['dumpnamebase']):
+raise BackupError("dumpname %s of unknown form for this job" % 
self.jobinfo['dumpname'])
+
+dumpname = self.jobinfo['dumpname'][len(self.jobinfo['dumpnamebase']):]
+stub_dumpnames = self.jobinfo['item_for_stubs'].list_dumpnames()
+for sname in stub_dumpnames:
+if sname.endswith(dumpname):
+stub_dumpname = sname
+input_files = self.jobinfo['item_for_stubs'].list_outfiles_for_input(
+runner.dump_dir, [stub_dumpname])
+if self.jobinfo['parts']:
+if partnum is not None:
+for inp_file in input_files:
+if inp_file.partnum_int == partnum:
+input_files = [inp_file]
+break
+return input_files
+
+def write_partial_stub(self, input_file, output_file, runner):
+if not exists(self.wiki.config.writeuptopageid):
+raise BackupError("writeuptopageid command %s not found" %
+  self.wiki.config.writeuptopageid)
+
+inputfile_path = runner.dump_dir.filename_public_path(input_file)
+output_file_path = os.path.join(self.wiki.config.temp_dir, 
output_file.filename)
+if input_file.file_ext == "gz":
+command1 = "%s -dc %s" % (self.wiki.config.gzip, inputfile_path)
+command2 = "%s > %s" % (self.wiki.config.gzip, output_file_path)
+elif input_file.file_ext == '7z':
+command1 = "%s e -si %s" % (self.wiki.config.sevenzip, 
inputfile_path)
+command2 = "%s e -so %s" % (self.wiki.config.sevenzip, 
output_file_path)
+elif input_file.file_ext == 'bz':
+command1 = "%s -dc %s" % (self.wiki.config.bzip2, inputfile_path)
+command2 = "%s > %s" % (self.wiki.config.bzip2, output_file_path)
+else:
+raise BackupError("unknown stub file extension %s" % 
input_file.file_ext)
+if output_file.last_page_id is not None and output_file.last_page_id 
is not "0":
+command = [command1 + ("| %s %s %s |" % 
(self.wiki.config.writeuptopageid,
+ output_file.first_page_id,
+ 
output_file.last_page_id)) + command2]
+else:
+# no lastpageid? read up to eof of the specific stub file that's 
used for input
+command = [command1 + ("| %s %s |" % 
(self.wiki.config.writeuptopageid,
+  output_file.first_page_id)) 
+ command2]
+
+pipeline = [command]
+series = [pipeline]
+error = runner.run_command([series], shell=True)
+if error:
+raise BackupError("failed to write partial stub file %s" % 
output_file.filename)
+
+def get_partial_stubs(self, todo, runner):
+partial_stubs = []
+if self.verbose:
+print "todo is", [to.filename for to in todo]
+
+for fileobj in todo:
+
+stub_for_file = self.get_stub_files(runner, fileobj.partnum_int)[0]
+
+if 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add autopatrolled group to svwiktionary

2017-04-01 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345965 )

Change subject: Add autopatrolled group to svwiktionary
..

Add autopatrolled group to svwiktionary

Bug: T161919
Change-Id: I19e2b82a5424f63b8b8140f72149638e9ce84b04
---
M wmf-config/InitialiseSettings.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8501028..7b7a990 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9142,6 +9142,9 @@
'patroller' => [ 'patrol' => true ], // T93339
'rollbacker' => [ 'rollback' => true ], // T93339
],
+   '+svwiktionary' => [
+   'autopatrolled' => [ 'autopatrol' => true ], // T161919
+   ],
'+swwiki' => [
'*' => [ 'createpage' => false ], // T44894
],
@@ -10096,6 +10099,11 @@
'rollbacker', // T93339
],
],
+   '+svwiktionary' => [
+   'sysop' => [
+   'autopatrolled', // T161919
+   ],
+   ],
'+tawiki' => [
'bureaucrat' => [ 'nocreate' ],
'sysop' => [ 'patroller', 'rollbacker', 'autopatrolled' ], // 
T95180
@@ -10836,6 +10844,11 @@
'rollbacker', // T93339
],
],
+   '+svwiktionary' => [
+   'sysop' => [
+   'autopatrolled', // T161919
+   ],
+   ],
'+tawiki' => [
'bureaucrat' => [ 'nocreate' ],
'sysop' => [ 'patroller', 'rollbacker', 'autopatrolled' ], // 
T95180

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: move prefetch-finding code out to separate class

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343540 )

Change subject: move prefetch-finding code out to separate class
..


move prefetch-finding code out to separate class

Change-Id: Ie40068eb2502d650059e0b4fd9b96ed6b4991b61
---
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/xmlcontentjobs.py
2 files changed, 242 insertions(+), 196 deletions(-)

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



diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index a5f1cb8..5125c18 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -15,6 +15,24 @@
 from dumps.utils import TimeUtils, MiscUtils
 
 
+def get_checkpt_files(dump_dir, dump_names, file_type, file_ext, date=None, 
parts=None):
+'''return all checkpoint files that exist'''
+files = []
+for dname in dump_names:
+files.extend(dump_dir.get_checkpt_files(
+date, dname, file_type, file_ext, parts, temp=False))
+return files
+
+
+def get_reg_files(dump_dir, dump_names, file_type, file_ext, date=None, 
parts=None):
+'''get all regular output files that exist'''
+files = []
+for dname in dump_names:
+files.extend(dump_dir.get_reg_files(
+date, dname, file_type, file_ext, parts, temp=False))
+return files
+
+
 class Dump(object):
 def __init__(self, name, desc, verbose=False):
 self._desc = desc
@@ -328,20 +346,16 @@
 files = []
 if not dump_names:
 dump_names = [self.dumpname]
-for dname in dump_names:
-files.extend(dump_dir.get_reg_files(
-date, dname, self.file_type, self.file_ext, parts, temp=False))
-return files
+return get_reg_files(dump_dir, dump_names, self.file_type,
+ self.file_ext, date, parts)
 
 def list_checkpt_files(self, dump_dir, dump_names=None, date=None, 
parts=None):
 '''list all checkpoint files that exist'''
 files = []
 if not dump_names:
 dump_names = [self.dumpname]
-for dname in dump_names:
-files.extend(dump_dir.get_checkpt_files(
-date, dname, self.file_type, self.file_ext, parts, temp=False))
-return files
+return get_checkpt_files(dump_dir, dump_names, self.file_type,
+ self.file_ext, date, parts)
 
 def list_checkpt_files_for_filepart(self, dump_dir, parts, 
dump_names=None):
 '''list checkpoint files that have been produced for specified file 
part(s)'''
diff --git a/xmldumps-backup/dumps/xmlcontentjobs.py 
b/xmldumps-backup/dumps/xmlcontentjobs.py
index d6e4cce..9519098 100644
--- a/xmldumps-backup/dumps/xmlcontentjobs.py
+++ b/xmldumps-backup/dumps/xmlcontentjobs.py
@@ -12,7 +12,219 @@
 from dumps.fileutils import DumpFile, DumpFilename
 from dumps.utils import MultiVersion, MiscUtils
 from dumps.jobs import Dump
+from dumps.jobs import get_checkpt_files, get_reg_files
 from dumps.WikiDump import Locker
+
+
+class Prefetch(object):
+"""
+finding appropriate prefetch files for a page
+content dump
+"""
+def __init__(self, wiki, jobinfo, prefetchinfo, verbose):
+self.wiki = wiki
+self.jobinfo = jobinfo
+self.prefetchinfo = prefetchinfo
+self.verbose = verbose
+
+def get_relevant_prefetch_files(self, file_list, start_page_id, 
end_page_id, date, runner):
+possibles = []
+if len(file_list):
+# (a) nasty hack, see below (b)
+maxparts = 0
+for file_obj in file_list:
+if file_obj.is_file_part and file_obj.partnum_int > maxparts:
+maxparts = file_obj.partnum_int
+if not file_obj.first_page_id:
+fname = DumpFile(
+self.wiki, 
runner.dump_dir.filename_public_path(file_obj, date),
+file_obj, self.verbose)
+file_obj.first_page_id = fname.find_first_page_id_in_file()
+
+# get the files that cover our range
+for file_obj in file_list:
+# If some of the file_objs in file_list could not be properly 
be parsed, some of
+# the (int) conversions below will fail. However, it is of 
little use to us,
+# which conversion failed. /If any/ conversion fails, it 
means, that that we do
+# not understand how to make sense of the current file_obj. 
Hence we cannot use
+# it as prefetch object and we have to drop it, to avoid 
passing a useless file
+# to the text pass. (This could days as of a comment below, 
but by not passing
+# a likely useless file, we have to fetch more texts from the 
database)
+#
+# Therefore 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add rollback user group in fawikisource

2017-04-01 Thread Urbanecm (Code Review)
Urbanecm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345964 )

Change subject: Add rollback user group in fawikisource
..

Add rollback user group in fawikisource

Bug: T161946
Change-Id: I1e0590a8456de9676b3acf74ac629c7ac7a6d52b
---
M wmf-config/InitialiseSettings.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8501028..7e6a555 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -8312,6 +8312,9 @@
'patroller' => [ 'patrol' => true ], // T85381
'rollbacker' => [ 'rollback' => true ], // T85381
],
+   '+fawikisource' => [
+   'rollbacker' => [ 'rollback' => true ], // T161946
+   ],
'fiwiki' => [
'patroller' => [ 'patrol' => true ],
'rollbacker' => [ 'rollback' => true ],
@@ -9763,6 +9766,11 @@
'transwiki', // T73681
],
],
+   '+fawikisource' => [
+   'sysop' => [
+   'rollbacker', // T161946
+   ],
+   ],
'+fawiktionary' => [
'sysop' => [ 'autopatrolled', 'patroller', 'rollbacker' ], // 
T85381
],
@@ -10489,6 +10497,11 @@
'+fawiktionary' => [
'sysop' => [ 'autopatrolled', 'patroller', 'rollbacker' ], // 
T85381
],
+   '+fawikisource' => [
+   'sysop' => [
+   'rollbacker', // T161946
+   ],
+   ],
'+fiwiki' => [
'bureaucrat' => [ 'sysop', 'bureaucrat', 'arbcom' ],
'sysop' => [ 'rollbacker', 'accountcreator' ], // T149986

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

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

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: move xml content dump jobs out to separate module

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/343539 )

Change subject: move xml content dump jobs out to separate module
..


move xml content dump jobs out to separate module

Change-Id: I12fce108339a4a5af48037827f69b0b2aadecd25
---
M xmldumps-backup/dumps/recombinejobs.py
M xmldumps-backup/dumps/recompressjobs.py
M xmldumps-backup/dumps/runner.py
A xmldumps-backup/dumps/xmlcontentjobs.py
M xmldumps-backup/dumps/xmljobs.py
5 files changed, 774 insertions(+), 764 deletions(-)

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



diff --git a/xmldumps-backup/dumps/recombinejobs.py 
b/xmldumps-backup/dumps/recombinejobs.py
index b634b12..f071cd7 100644
--- a/xmldumps-backup/dumps/recombinejobs.py
+++ b/xmldumps-backup/dumps/recombinejobs.py
@@ -6,7 +6,7 @@
 from os.path import exists
 from dumps.exceptions import BackupError
 from dumps.jobs import Dump
-from dumps.xmljobs import XmlDump
+from dumps.xmlcontentjobs import XmlDump
 
 
 class RecombineXmlStub(Dump):
diff --git a/xmldumps-backup/dumps/recompressjobs.py 
b/xmldumps-backup/dumps/recompressjobs.py
index 142072f..f966f05 100644
--- a/xmldumps-backup/dumps/recompressjobs.py
+++ b/xmldumps-backup/dumps/recompressjobs.py
@@ -7,7 +7,7 @@
 from dumps.exceptions import BackupError
 from dumps.fileutils import DumpFilename
 from dumps.jobs import Dump
-from dumps.xmljobs import XmlDump
+from dumps.xmlcontentjobs import XmlDump
 
 
 class XmlMultiStreamDump(XmlDump):
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index a681a0e..9acf564 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -14,7 +14,8 @@
 from dumps.tablesjobs import PrivateTable, PublicTable, TitleDump, AllTitleDump
 from dumps.recombinejobs import RecombineAbstractDump, RecombineXmlDump
 from dumps.recombinejobs import RecombineXmlStub, RecombineXmlRecompressDump
-from dumps.xmljobs import XmlDump, XmlLogging, XmlStub, BigXmlDump, 
AbstractDump
+from dumps.xmljobs import XmlLogging, XmlStub, AbstractDump
+from dumps.xmlcontentjobs import XmlDump, BigXmlDump
 from dumps.recompressjobs import XmlMultiStreamDump, XmlRecompressDump
 from dumps.flowjob import FlowDump
 
diff --git a/xmldumps-backup/dumps/xmlcontentjobs.py 
b/xmldumps-backup/dumps/xmlcontentjobs.py
new file mode 100644
index 000..d6e4cce
--- /dev/null
+++ b/xmldumps-backup/dumps/xmlcontentjobs.py
@@ -0,0 +1,768 @@
+'''
+All xml content dump jobs are defined here
+'''
+
+import re
+import os
+from os.path import exists
+import signal
+
+from dumps.CommandManagement import CommandPipeline
+from dumps.exceptions import BackupError
+from dumps.fileutils import DumpFile, DumpFilename
+from dumps.utils import MultiVersion, MiscUtils
+from dumps.jobs import Dump
+from dumps.WikiDump import Locker
+
+
+class XmlDump(Dump):
+"""Primary XML dumps, one section at a time."""
+def __init__(self, subset, name, desc, detail, item_for_stubs, prefetch,
+ prefetchdate, spawn,
+ wiki, partnum_todo, parts=False, checkpoints=False, 
checkpoint_file=None,
+ page_id_range=None, verbose=False):
+self._subset = subset
+self._detail = detail
+self._desc = desc
+self._prefetch = prefetch
+self._prefetchdate = prefetchdate
+self._spawn = spawn
+self._parts = parts
+if self._parts:
+self._parts_enabled = True
+self.onlyparts = True
+self._page_id = {}
+self._partnum_todo = partnum_todo
+
+self.wiki = wiki
+self.item_for_stubs = item_for_stubs
+if checkpoints:
+self._checkpoints_enabled = True
+self.checkpoint_file = checkpoint_file
+self.page_id_range = page_id_range
+self.verbose = verbose
+self._prerequisite_items = [self.item_for_stubs]
+self._check_truncation = True
+Dump.__init__(self, name, desc, self.verbose)
+
+def get_dumpname_base(self):
+return 'pages-'
+
+def get_dumpname(self):
+return self.get_dumpname_base() + self._subset
+
+def get_filetype(self):
+return "xml"
+
+def get_file_ext(self):
+return "bz2"
+
+def get_stub_files(self, runner, partnum=None):
+'''
+get the stub files pertaining to our dumpname, which is *one* of
+articles, pages-current, pages-history.
+stubs include all of these together.
+we will either return the one full stubs file that exists
+or the one stub file part, if we are (re)running a specific
+file part (subjob), or all file parts if we are (re)running
+the entire job which is configured for subjobs.
+
+arguments:
+   runner- Runner object
+   partnum (int) - number of file part (subjob) if any
+'''
+if partnum 

[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-04-01T10:00:01+0000

2017-04-01 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345963 )

Change subject: New Wikidata Build - 2017-04-01T10:00:01+
..

New Wikidata Build - 2017-04-01T10:00:01+

Change-Id: I4e1e46368e05ab206f94701140a786cf99f4
---
M composer.lock
M extensions/ArticlePlaceholder/i18n/sv.json
M vendor/composer/installed.json
3 files changed, 12 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikidata 
refs/changes/63/345963/1

diff --git a/composer.lock b/composer.lock
index 5b6c9c0..c7cd143 100644
--- a/composer.lock
+++ b/composer.lock
@@ -742,12 +742,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301"
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0a9801be4a9d97e2d29e853c54f2412ed0d0e301;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/19f26ba194a45a305de0970d7b21ab216e117af2;,
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2",
 "shasum": ""
 },
 "require-dev": {
@@ -772,7 +772,7 @@
 ],
 "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
 "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;,
-"time": "2017-03-28 20:38:29"
+"time": "2017-03-31 21:18:23"
 },
 {
 "name": "propertysuggester/property-suggester",
diff --git a/extensions/ArticlePlaceholder/i18n/sv.json 
b/extensions/ArticlePlaceholder/i18n/sv.json
index 1f2228d..b84aa3b 100644
--- a/extensions/ArticlePlaceholder/i18n/sv.json
+++ b/extensions/ArticlePlaceholder/i18n/sv.json
@@ -17,6 +17,7 @@
"articleplaceholder-abouttopic-create-article-label": "Artikelns titel",
"articleplaceholder-abouttopic-create-article-mandatory": "Artikelns 
titel är nödvändig.",
"articleplaceholder-abouttopic-create-article-button": "Skapa en 
artikel",
+   "articleplaceholder-abouttopic-create-emtpy-article-button": "Starta en 
ny artikel",
"articleplaceholder-abouttopic-translate-article-label": "Källspråk:",
"articleplaceholder-abouttopic-translate-article-button": "Översätt 
artikel",
"articleplaceholder-abouttopic-create-article-submit-button": "Skicka",
@@ -26,5 +27,7 @@
"articleplaceholder-abouttopic-lua-identifier": "Externa resurser",
"articleplaceholder-search-header": "Upptäck data om ämnet",
"articleplaceholder-createpage-title": "Skapa $1",
-   "articleplaceholder-createpage-alreadyexists": "Sidan med titeln $1 
finns redan. Välj en annan."
+   "articleplaceholder-createpage-alreadyexists": "Sidan med titeln $1 
finns redan. Välj en annan.",
+   "articleplaceholder-createpage-notitleprovided": "Ingen titel har 
angivits, ange en titel för sidan du vill skapa.",
+   "articleplaceholder-createpage-invalidtitleprovided": "Titeln du angav 
är ogiltig. Tillhandahåll en giltig titel."
 }
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ed0c5d0..a47b4dc 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -115,19 +115,19 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301"
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/0a9801be4a9d97e2d29e853c54f2412ed0d0e301;,
-"reference": "0a9801be4a9d97e2d29e853c54f2412ed0d0e301",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/19f26ba194a45a305de0970d7b21ab216e117af2;,
+"reference": "19f26ba194a45a305de0970d7b21ab216e117af2",
 "shasum": ""
 },
 "require-dev": {
 "jakub-onderka/php-parallel-lint": "0.9.2",
 "mediawiki/mediawiki-codesniffer": "0.7.2"
 },
-"time": "2017-03-28 20:38:29",
+"time": "2017-03-31 21:18:23",
 "type": "mediawiki-extension",
 "installation-source": "dist",
 "autoload": {

-- 
To view, 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: convert "NoticeFile" to "Notice" for class, methods, attrs

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345962 )

Change subject: convert "NoticeFile" to "Notice" for class, methods, attrs
..


convert "NoticeFile" to "Notice" for class, methods, attrs

Change-Id: Ic365ae1b7854a02a0a8f794285a9a32ec6cab91b
---
M xmldumps-backup/dumpadmin.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
3 files changed, 15 insertions(+), 15 deletions(-)

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



diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index 05ffa15..3876a96 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -11,7 +11,7 @@
 import socket
 import signal
 import traceback
-from dumps.runnerutils import NoticeFile, RunInfo
+from dumps.runnerutils import Notice, RunInfo
 from dumps.fileutils import DumpDir
 from dumps.runner import Runner
 from dumps.WikiDump import Wiki, Config, Locker
@@ -579,7 +579,7 @@
 print "creating notice file for wiki", wikiname, "date", date
 
 wiki.set_date(date)
-NoticeFile(wiki, self.message, True)
+Notice(wiki, self.message, True)
 
 def do_mark(self, wikiname):
 '''
@@ -676,7 +676,7 @@
 print "removing notice file for wiki", wikiname, "date", date
 
 wiki.set_date(date)
-NoticeFile(wiki, False, True)
+Notice(wiki, False, True)
 
 def find_dump_lockinfo(self):
 '''
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index 58ae57c..a681a0e 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -18,7 +18,7 @@
 from dumps.recompressjobs import XmlMultiStreamDump, XmlRecompressDump
 from dumps.flowjob import FlowDump
 
-from dumps.runnerutils import RunSettings, SymLinks, Feeds, NoticeFile
+from dumps.runnerutils import RunSettings, SymLinks, Feeds, Notice
 from dumps.runnerutils import Checksummer, Report, StatusHtml, FailureHandler
 from dumps.runnerutils import Maintenance, RunInfo, DumpRunJobData
 
@@ -478,7 +478,7 @@
 self.enabled = {}
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
 RunInfo.NAME, SymLinks.NAME, RunSettings.NAME,
-Feeds.NAME, NoticeFile.NAME, StatusAPI.NAME,
+Feeds.NAME, Notice.NAME, StatusAPI.NAME,
 "makedir", "clean_old_dumps", "cleanup_old_files",
 "check_trunc_files", "cleanup_tmp_files"]:
 self.enabled[setting] = True
@@ -490,7 +490,7 @@
 if self.dryrun or self._partnum_todo is not None or 
self.checkpoint_file is not None:
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
 StatusAPI.NAME, RunInfo.NAME, SymLinks.NAME, 
RunSettings.NAME,
-Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps"]:
+Feeds.NAME, Notice.NAME, "makedir", 
"clean_old_dumps"]:
 if setting in self.enabled:
 del self.enabled[setting]
 
@@ -514,7 +514,7 @@
 del self.enabled[setting]
 
 if self.job_requested == "latestlinks" or self.job_requested == 
"createdirs":
-for setting in [Checksummer.NAME, NoticeFile.NAME, "makedir",
+for setting in [Checksummer.NAME, Notice.NAME, "makedir",
 "clean_old_dumps", "check_trunc_files"]:
 if setting in self.enabled:
 del self.enabled[setting]
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index cdbf0c8..0a74fd2 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ b/xmldumps-backup/dumps/runnerutils.py
@@ -340,7 +340,7 @@
 generate the json file with the same information as well'''
 if Report.NAME in self._enabled:
 
-self.dumpjobdata.noticefile.refresh_notice()
+self.dumpjobdata.notice.refresh_notice()
 status_items = [Report.report_dump_step_status(self.dump_dir, item)
 for item in self.items]
 status_items_html = [item['html'] for item in status_items]
@@ -353,7 +353,7 @@
 text = self.wiki.config.read_template("report.html") % {
 "db": self.wiki.db_name,
 "date": self.wiki.date,
-"notice": self.dumpjobdata.noticefile.notice,
+"notice": self.dumpjobdata.notice.notice,
 "status": StatusHtml.report_dump_status(failed_jobs, 
dump_status),
 "previous": self.report_previous_dump_link(dump_status),
 "items": html,
@@ -534,17 +534,17 @@
 return html
 
 
-class NoticeFile(object):
-NAME = "noticefile"
+class Notice(object):
+NAME = 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: convert "NoticeFile" to "Notice" for class, methods, attrs

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345962 )

Change subject: convert "NoticeFile" to "Notice" for class, methods, attrs
..

convert "NoticeFile" to "Notice" for class, methods, attrs

Change-Id: Ic365ae1b7854a02a0a8f794285a9a32ec6cab91b
---
M xmldumps-backup/dumpadmin.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
3 files changed, 15 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/62/345962/1

diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index 05ffa15..3876a96 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -11,7 +11,7 @@
 import socket
 import signal
 import traceback
-from dumps.runnerutils import NoticeFile, RunInfo
+from dumps.runnerutils import Notice, RunInfo
 from dumps.fileutils import DumpDir
 from dumps.runner import Runner
 from dumps.WikiDump import Wiki, Config, Locker
@@ -579,7 +579,7 @@
 print "creating notice file for wiki", wikiname, "date", date
 
 wiki.set_date(date)
-NoticeFile(wiki, self.message, True)
+Notice(wiki, self.message, True)
 
 def do_mark(self, wikiname):
 '''
@@ -676,7 +676,7 @@
 print "removing notice file for wiki", wikiname, "date", date
 
 wiki.set_date(date)
-NoticeFile(wiki, False, True)
+Notice(wiki, False, True)
 
 def find_dump_lockinfo(self):
 '''
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index 58ae57c..a681a0e 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -18,7 +18,7 @@
 from dumps.recompressjobs import XmlMultiStreamDump, XmlRecompressDump
 from dumps.flowjob import FlowDump
 
-from dumps.runnerutils import RunSettings, SymLinks, Feeds, NoticeFile
+from dumps.runnerutils import RunSettings, SymLinks, Feeds, Notice
 from dumps.runnerutils import Checksummer, Report, StatusHtml, FailureHandler
 from dumps.runnerutils import Maintenance, RunInfo, DumpRunJobData
 
@@ -478,7 +478,7 @@
 self.enabled = {}
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
 RunInfo.NAME, SymLinks.NAME, RunSettings.NAME,
-Feeds.NAME, NoticeFile.NAME, StatusAPI.NAME,
+Feeds.NAME, Notice.NAME, StatusAPI.NAME,
 "makedir", "clean_old_dumps", "cleanup_old_files",
 "check_trunc_files", "cleanup_tmp_files"]:
 self.enabled[setting] = True
@@ -490,7 +490,7 @@
 if self.dryrun or self._partnum_todo is not None or 
self.checkpoint_file is not None:
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
 StatusAPI.NAME, RunInfo.NAME, SymLinks.NAME, 
RunSettings.NAME,
-Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps"]:
+Feeds.NAME, Notice.NAME, "makedir", 
"clean_old_dumps"]:
 if setting in self.enabled:
 del self.enabled[setting]
 
@@ -514,7 +514,7 @@
 del self.enabled[setting]
 
 if self.job_requested == "latestlinks" or self.job_requested == 
"createdirs":
-for setting in [Checksummer.NAME, NoticeFile.NAME, "makedir",
+for setting in [Checksummer.NAME, Notice.NAME, "makedir",
 "clean_old_dumps", "check_trunc_files"]:
 if setting in self.enabled:
 del self.enabled[setting]
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index cdbf0c8..0a74fd2 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ b/xmldumps-backup/dumps/runnerutils.py
@@ -340,7 +340,7 @@
 generate the json file with the same information as well'''
 if Report.NAME in self._enabled:
 
-self.dumpjobdata.noticefile.refresh_notice()
+self.dumpjobdata.notice.refresh_notice()
 status_items = [Report.report_dump_step_status(self.dump_dir, item)
 for item in self.items]
 status_items_html = [item['html'] for item in status_items]
@@ -353,7 +353,7 @@
 text = self.wiki.config.read_template("report.html") % {
 "db": self.wiki.db_name,
 "date": self.wiki.date,
-"notice": self.dumpjobdata.noticefile.notice,
+"notice": self.dumpjobdata.notice.notice,
 "status": StatusHtml.report_dump_status(failed_jobs, 
dump_status),
 "previous": self.report_previous_dump_link(dump_status),
 "items": html,
@@ -534,17 +534,17 @@
 return html
 
 
-class NoticeFile(object):
-NAME = "noticefile"
+class Notice(object):
+NAME = 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: convert RunInfoFile to RunInfo for class, methods, attrs

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345961 )

Change subject: convert RunInfoFile to RunInfo for class, methods, attrs
..


convert RunInfoFile to RunInfo for class, methods, attrs

Change-Id: I056944d807bea98523178dc5e35cc7a4796257d8
---
M xmldumps-backup/dumpadmin.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/dumps/xmljobs.py
M xmldumps-backup/worker.py
7 files changed, 29 insertions(+), 29 deletions(-)

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



diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index c6245e2..05ffa15 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -11,7 +11,7 @@
 import socket
 import signal
 import traceback
-from dumps.runnerutils import NoticeFile, RunInfoFile
+from dumps.runnerutils import NoticeFile, RunInfo
 from dumps.fileutils import DumpDir
 from dumps.runner import Runner
 from dumps.WikiDump import Wiki, Config, Locker
@@ -318,8 +318,8 @@
 return [], None
 
 wiki.set_date(date)
-run_info_file = RunInfoFile(wiki, False)
-results = run_info_file.get_old_runinfo_from_file()
+run_info = RunInfo(wiki, False)
+results = run_info.get_old_runinfo_from_file()
 if not results:
 return [], None
 
diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index f59609b..a5f1cb8 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -213,8 +213,8 @@
 self.progress = line.strip()
 runner.report.update_index_html_and_json()
 runner.statushtml.update_status_file()
-runner.dumpjobdata.runinfofile.save_dump_runinfo_file(
-
runner.dumpjobdata.runinfofile.report_dump_runinfo(runner.dump_item_list.dump_items))
+runner.dumpjobdata.runinfo.save_dump_runinfo(
+
runner.dumpjobdata.runinfo.report_dump_runinfo(runner.dump_item_list.dump_items))
 
 def time_to_wait(self):
 # we use wait this many secs for a command to complete that
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index 961140a..58ae57c 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -20,7 +20,7 @@
 
 from dumps.runnerutils import RunSettings, SymLinks, Feeds, NoticeFile
 from dumps.runnerutils import Checksummer, Report, StatusHtml, FailureHandler
-from dumps.runnerutils import Maintenance, RunInfoFile, DumpRunJobData
+from dumps.runnerutils import Maintenance, RunInfo, DumpRunJobData
 
 from dumps.utils import DbServerInfo, FilePartInfo, TimeUtils
 from dumps.runstatusapi import StatusAPI
@@ -333,7 +333,7 @@
 "Useful for offline readers, or for parallel processing of 
pages.",
 self.find_item_by_name(input_for_multistream), self.wiki, 
None))
 
-results = self.dumpjobdata.runinfofile.get_old_runinfo_from_file()
+results = self.dumpjobdata.runinfo.get_old_runinfo_from_file()
 if results:
 for runinfo_entry in results:
 self._set_dump_item_runinfo(runinfo_entry)
@@ -477,7 +477,7 @@
 if self.enabled is None:
 self.enabled = {}
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
-RunInfoFile.NAME, SymLinks.NAME, RunSettings.NAME,
+RunInfo.NAME, SymLinks.NAME, RunSettings.NAME,
 Feeds.NAME, NoticeFile.NAME, StatusAPI.NAME,
 "makedir", "clean_old_dumps", "cleanup_old_files",
 "check_trunc_files", "cleanup_tmp_files"]:
@@ -489,7 +489,7 @@
 
 if self.dryrun or self._partnum_todo is not None or 
self.checkpoint_file is not None:
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
-StatusAPI.NAME, RunInfoFile.NAME, SymLinks.NAME, 
RunSettings.NAME,
+StatusAPI.NAME, RunInfo.NAME, SymLinks.NAME, 
RunSettings.NAME,
 Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps"]:
 if setting in self.enabled:
 del self.enabled[setting]
@@ -504,7 +504,7 @@
 self.job_requested = job
 
 if self.job_requested == "latestlinks":
-for setting in [StatusHtml.NAME, Report.NAME, RunInfoFile.NAME]:
+for setting in [StatusHtml.NAME, Report.NAME, RunInfo.NAME]:
 if setting in self.enabled:
 del self.enabled[setting]
 
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index e1880ce..cdbf0c8 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: convert RunInfoFile to RunInfo for class, methods, attrs

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345961 )

Change subject: convert RunInfoFile to RunInfo for class, methods, attrs
..

convert RunInfoFile to RunInfo for class, methods, attrs

Change-Id: I056944d807bea98523178dc5e35cc7a4796257d8
---
M xmldumps-backup/dumpadmin.py
M xmldumps-backup/dumps/jobs.py
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/dumps/xmljobs.py
M xmldumps-backup/worker.py
7 files changed, 29 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/61/345961/1

diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index c6245e2..05ffa15 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -11,7 +11,7 @@
 import socket
 import signal
 import traceback
-from dumps.runnerutils import NoticeFile, RunInfoFile
+from dumps.runnerutils import NoticeFile, RunInfo
 from dumps.fileutils import DumpDir
 from dumps.runner import Runner
 from dumps.WikiDump import Wiki, Config, Locker
@@ -318,8 +318,8 @@
 return [], None
 
 wiki.set_date(date)
-run_info_file = RunInfoFile(wiki, False)
-results = run_info_file.get_old_runinfo_from_file()
+run_info = RunInfo(wiki, False)
+results = run_info.get_old_runinfo_from_file()
 if not results:
 return [], None
 
diff --git a/xmldumps-backup/dumps/jobs.py b/xmldumps-backup/dumps/jobs.py
index f59609b..a5f1cb8 100644
--- a/xmldumps-backup/dumps/jobs.py
+++ b/xmldumps-backup/dumps/jobs.py
@@ -213,8 +213,8 @@
 self.progress = line.strip()
 runner.report.update_index_html_and_json()
 runner.statushtml.update_status_file()
-runner.dumpjobdata.runinfofile.save_dump_runinfo_file(
-
runner.dumpjobdata.runinfofile.report_dump_runinfo(runner.dump_item_list.dump_items))
+runner.dumpjobdata.runinfo.save_dump_runinfo(
+
runner.dumpjobdata.runinfo.report_dump_runinfo(runner.dump_item_list.dump_items))
 
 def time_to_wait(self):
 # we use wait this many secs for a command to complete that
diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index 961140a..58ae57c 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -20,7 +20,7 @@
 
 from dumps.runnerutils import RunSettings, SymLinks, Feeds, NoticeFile
 from dumps.runnerutils import Checksummer, Report, StatusHtml, FailureHandler
-from dumps.runnerutils import Maintenance, RunInfoFile, DumpRunJobData
+from dumps.runnerutils import Maintenance, RunInfo, DumpRunJobData
 
 from dumps.utils import DbServerInfo, FilePartInfo, TimeUtils
 from dumps.runstatusapi import StatusAPI
@@ -333,7 +333,7 @@
 "Useful for offline readers, or for parallel processing of 
pages.",
 self.find_item_by_name(input_for_multistream), self.wiki, 
None))
 
-results = self.dumpjobdata.runinfofile.get_old_runinfo_from_file()
+results = self.dumpjobdata.runinfo.get_old_runinfo_from_file()
 if results:
 for runinfo_entry in results:
 self._set_dump_item_runinfo(runinfo_entry)
@@ -477,7 +477,7 @@
 if self.enabled is None:
 self.enabled = {}
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
-RunInfoFile.NAME, SymLinks.NAME, RunSettings.NAME,
+RunInfo.NAME, SymLinks.NAME, RunSettings.NAME,
 Feeds.NAME, NoticeFile.NAME, StatusAPI.NAME,
 "makedir", "clean_old_dumps", "cleanup_old_files",
 "check_trunc_files", "cleanup_tmp_files"]:
@@ -489,7 +489,7 @@
 
 if self.dryrun or self._partnum_todo is not None or 
self.checkpoint_file is not None:
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
-StatusAPI.NAME, RunInfoFile.NAME, SymLinks.NAME, 
RunSettings.NAME,
+StatusAPI.NAME, RunInfo.NAME, SymLinks.NAME, 
RunSettings.NAME,
 Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps"]:
 if setting in self.enabled:
 del self.enabled[setting]
@@ -504,7 +504,7 @@
 self.job_requested = job
 
 if self.job_requested == "latestlinks":
-for setting in [StatusHtml.NAME, Report.NAME, RunInfoFile.NAME]:
+for setting in [StatusHtml.NAME, Report.NAME, RunInfo.NAME]:
 if setting in self.enabled:
 del self.enabled[setting]
 
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index e1880ce..cdbf0c8 100644
--- a/xmldumps-backup/dumps/runnerutils.py
+++ 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure

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

Change subject: mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure
..


mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure

Change-Id: I938b4a36058a9549ceedf5785eb1494247227a70
---
M resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js 
b/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
index b3ed88c..67460ad 100644
--- a/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
+++ b/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
@@ -10,7 +10,7 @@
  * - Add mw.libs.jpegmeta wrapper.
  */
 
-( function () {
+( function ( mw ) {
/*
Copyright (c) 2009 Ben Leslie

@@ -734,4 +734,4 @@
return new JpegMeta.JpegFile( fileReaderResult, fileName );
};
 
-}() );
+}( mediaWiki ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I938b4a36058a9549ceedf5785eb1494247227a70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jack Phoenix 
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/dumps[master]: update dumpadmin to use the new json reporting routines

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345958 )

Change subject: update dumpadmin to use the new json reporting routines
..


update dumpadmin to use the new json reporting routines

Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
---
M xmldumps-backup/dumpadmin.py
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index 5128802..c6245e2 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -412,7 +412,7 @@
 if not self.dryrun:
 for item in runner.dump_item_list.dump_items:
 if item.status() == "done":
-runner.dumpjobdata.do_after_job(item)
+runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
 
 if self.dryrun:
 print "would update dumpruninfo file, checksums file, ",
@@ -426,10 +426,10 @@
 
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html("done")
+runner.report.update_index_html_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 if rerun:
@@ -449,7 +449,7 @@
 for item in runner.dump_item_list.dump_items:
 if item.to_run():
 item.start()
-runner.indexhtml.update_index_html()
+runner.report.update_index_html_and_json()
 runner.statushtml.update_status_file()
 
runner.dumpjobdata.do_before_job(runner.dump_item_list.dump_items)
 try:
@@ -484,14 +484,14 @@
 
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html_file("done")
+runner.report.update_index_html_file_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
 # This may happen if we start a dump now and abort before all 
items are
 # done. Then some are left for example in state "waiting". When
 # afterwards running a specific job, all (but one) of the jobs
 # previously in "waiting" are still in status "waiting"
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_file_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)
@@ -617,7 +617,7 @@
 if item.name() == job:
 item.set_status(status, True)
 if item.status() == "done":
-runner.dumpjobdata.do_after_job(item)
+runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
 elif item.status() not in ["done", "waiting", "skipped"]:
 runner.failurehandler.failure_count += 1
 
@@ -625,10 +625,10 @@
 print "updating status files for wiki", wiki.db_name
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html("done")
+runner.report.update_index_html_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: objectcache: Never use CACHE_NONE for CACHE_ANYTHING

2017-04-01 Thread Martineznovo (Code Review)
Martineznovo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345960 )

Change subject: objectcache: Never use CACHE_NONE for CACHE_ANYTHING
..

objectcache: Never use CACHE_NONE for CACHE_ANYTHING

If $wgMainCacheType = CACHE_ACCEL, but there is no APC, then its
possible that CACHE_ANYTHING will default to CACHE_NONE because
that's what CACHE_ACCEL would do.

Possibly also T147161

Bug: T160519
Change-Id: I9ac2d071437b35a0f9cd3678e2279628f7b1931e
(cherry picked from commit c5a0fa5bed4c5aafdf0721c1d05978576107bd85)
---
M includes/objectcache/ObjectCache.php
A tests/phpunit/includes/objectcache/ObjectCacheTest.php
2 files changed, 89 insertions(+), 1 deletion(-)


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

diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 29df5af6..6881062 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -222,8 +222,14 @@
global $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType;
$candidates = [ $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType ];
foreach ( $candidates as $candidate ) {
+   $cache = false;
if ( $candidate !== CACHE_NONE && $candidate !== 
CACHE_ANYTHING ) {
-   return self::getInstance( $candidate );
+   $cache = self::getInstance( $candidate );
+   // CACHE_ACCEL might default to nothing if no 
APCu
+   // See includes/ServiceWiring.php
+   if ( !( $cache instanceof EmptyBagOStuff ) ) {
+   return $cache;
+   }
}
}
return self::getInstance( CACHE_DB );
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheTest.php 
b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
new file mode 100644
index 000..d132183
--- /dev/null
+++ b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
@@ -0,0 +1,82 @@
+setCacheConfig();
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_NONE,
+   'wgMessageCacheType' => CACHE_NONE,
+   'wgParserCacheType' => CACHE_NONE,
+   ] );
+   }
+
+   private function setCacheConfig( $arr = [] ) {
+   $defaults = [
+   CACHE_NONE => [ 'class' => 'EmptyBagOStuff' ],
+   CACHE_DB => [ 'class' => 'SqlBagOStuff' ],
+   CACHE_ANYTHING => [ 'factory' => 
'ObjectCache::newAnything' ],
+   // Mock ACCEL with 'hash' as being installed.
+   // This makes tests deterministic regardless of APC.
+   CACHE_ACCEL => [ 'class' => 'HashBagOStuff' ],
+   'hash' => [ 'class' => 'HashBagOStuff' ],
+   ];
+   $this->setMwGlobals( 'wgObjectCaches', $arr + $defaults );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingNothing() {
+   $this->assertInstanceOf(
+   SqlBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'No available types. Fallback to DB'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingHash() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => 'hash'
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (hash)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingAccel() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_ACCEL
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (CACHE_ACCEL)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function txestNewAnythingNoAccel() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_ACCEL
+   ] );
+
+   $this->setCacheConfig( [
+   // Mock APC not being installed (T160519, T147161)
+   CACHE_ACCEL => [ 'class' => 'EmptyBagOStuff' ]
+   ] );
+
+   $this->assertInstanceOf(
+   SqlBagOStuff::class,
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: objectcache: Never use CACHE_NONE for CACHE_ANYTHING

2017-04-01 Thread Martineznovo (Code Review)
Martineznovo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345959 )

Change subject: objectcache: Never use CACHE_NONE for CACHE_ANYTHING
..

objectcache: Never use CACHE_NONE for CACHE_ANYTHING

If $wgMainCacheType = CACHE_ACCEL, but there is no APC, then its
possible that CACHE_ANYTHING will default to CACHE_NONE because
that's what CACHE_ACCEL would do.

Possibly also T147161

Bug: T160519
Change-Id: I9ac2d071437b35a0f9cd3678e2279628f7b1931e
(cherry picked from commit c5a0fa5bed4c5aafdf0721c1d05978576107bd85)
---
M includes/objectcache/ObjectCache.php
A tests/phpunit/includes/objectcache/ObjectCacheTest.php
2 files changed, 89 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/345959/1

diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 0a4f0ed..a253c36 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -246,8 +246,14 @@
global $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType;
$candidates = [ $wgMainCacheType, $wgMessageCacheType, 
$wgParserCacheType ];
foreach ( $candidates as $candidate ) {
+   $cache = false;
if ( $candidate !== CACHE_NONE && $candidate !== 
CACHE_ANYTHING ) {
-   return self::getInstance( $candidate );
+   $cache = self::getInstance( $candidate );
+   // CACHE_ACCEL might default to nothing if no 
APCu
+   // See includes/ServiceWiring.php
+   if ( !( $cache instanceof EmptyBagOStuff ) ) {
+   return $cache;
+   }
}
}
 
diff --git a/tests/phpunit/includes/objectcache/ObjectCacheTest.php 
b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
new file mode 100644
index 000..d132183
--- /dev/null
+++ b/tests/phpunit/includes/objectcache/ObjectCacheTest.php
@@ -0,0 +1,82 @@
+setCacheConfig();
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_NONE,
+   'wgMessageCacheType' => CACHE_NONE,
+   'wgParserCacheType' => CACHE_NONE,
+   ] );
+   }
+
+   private function setCacheConfig( $arr = [] ) {
+   $defaults = [
+   CACHE_NONE => [ 'class' => 'EmptyBagOStuff' ],
+   CACHE_DB => [ 'class' => 'SqlBagOStuff' ],
+   CACHE_ANYTHING => [ 'factory' => 
'ObjectCache::newAnything' ],
+   // Mock ACCEL with 'hash' as being installed.
+   // This makes tests deterministic regardless of APC.
+   CACHE_ACCEL => [ 'class' => 'HashBagOStuff' ],
+   'hash' => [ 'class' => 'HashBagOStuff' ],
+   ];
+   $this->setMwGlobals( 'wgObjectCaches', $arr + $defaults );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingNothing() {
+   $this->assertInstanceOf(
+   SqlBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'No available types. Fallback to DB'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingHash() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => 'hash'
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (hash)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function testNewAnythingAccel() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_ACCEL
+   ] );
+
+   $this->assertInstanceOf(
+   HashBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+   'Use an available type (CACHE_ACCEL)'
+   );
+   }
+
+   /** @covers ObjectCache::newAnything */
+   public function txestNewAnythingNoAccel() {
+   $this->setMwGlobals( [
+   'wgMainCacheType' => CACHE_ACCEL
+   ] );
+
+   $this->setCacheConfig( [
+   // Mock APC not being installed (T160519, T147161)
+   CACHE_ACCEL => [ 'class' => 'EmptyBagOStuff' ]
+   ] );
+
+   $this->assertInstanceOf(
+   SqlBagOStuff::class,
+   ObjectCache::newAnything( [] ),
+ 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: update dumpadmin to use the new json reporting routines

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345958 )

Change subject: update dumpadmin to use the new json reporting routines
..

update dumpadmin to use the new json reporting routines

Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
---
M xmldumps-backup/dumpadmin.py
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/58/345958/1

diff --git a/xmldumps-backup/dumpadmin.py b/xmldumps-backup/dumpadmin.py
index 5128802..c6245e2 100644
--- a/xmldumps-backup/dumpadmin.py
+++ b/xmldumps-backup/dumpadmin.py
@@ -412,7 +412,7 @@
 if not self.dryrun:
 for item in runner.dump_item_list.dump_items:
 if item.status() == "done":
-runner.dumpjobdata.do_after_job(item)
+runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
 
 if self.dryrun:
 print "would update dumpruninfo file, checksums file, ",
@@ -426,10 +426,10 @@
 
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html("done")
+runner.report.update_index_html_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 if rerun:
@@ -449,7 +449,7 @@
 for item in runner.dump_item_list.dump_items:
 if item.to_run():
 item.start()
-runner.indexhtml.update_index_html()
+runner.report.update_index_html_and_json()
 runner.statushtml.update_status_file()
 
runner.dumpjobdata.do_before_job(runner.dump_item_list.dump_items)
 try:
@@ -484,14 +484,14 @@
 
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html_file("done")
+runner.report.update_index_html_file_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
 # This may happen if we start a dump now and abort before all 
items are
 # done. Then some are left for example in state "waiting". When
 # afterwards running a specific job, all (but one) of the jobs
 # previously in "waiting" are still in status "waiting"
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_file_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)
@@ -617,7 +617,7 @@
 if item.name() == job:
 item.set_status(status, True)
 if item.status() == "done":
-runner.dumpjobdata.do_after_job(item)
+runner.dumpjobdata.do_after_job(item, 
runner.dump_item_list.dump_items)
 elif item.status() not in ["done", "waiting", "skipped"]:
 runner.failurehandler.failure_count += 1
 
@@ -625,10 +625,10 @@
 print "updating status files for wiki", wiki.db_name
 if runner.dump_item_list.all_possible_jobs_done():
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
-runner.indexhtml.update_index_html("done")
+runner.report.update_index_html_and_json("done")
 runner.statushtml.update_status_file("done")
 else:
-runner.indexhtml.update_index_html("partialdone")
+runner.report.update_index_html_and_json("partialdone")
 runner.statushtml.update_status_file("partialdone")
 
 runner.dumpjobdata.do_after_dump(runner.dump_item_list.dump_items)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iac7fb0ed764064d16736d6cac6235e565ac19025
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure

2017-04-01 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345957 )

Change subject: mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure
..

mediawiki.libs.jpegmeta.js: Map mediaWiki to mw in closure

Change-Id: I938b4a36058a9549ceedf5785eb1494247227a70
---
M resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js 
b/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
index b3ed88c..67460ad 100644
--- a/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
+++ b/resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js
@@ -10,7 +10,7 @@
  * - Add mw.libs.jpegmeta wrapper.
  */
 
-( function () {
+( function ( mw ) {
/*
Copyright (c) 2009 Ben Leslie

@@ -734,4 +734,4 @@
return new JpegMeta.JpegFile( fileReaderResult, fileName );
};
 
-}() );
+}( mediaWiki ) );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Update logstash to 5.2.2, kibana to 5.1.2

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

Change subject: Update logstash to 5.2.2, kibana to 5.1.2
..


Update logstash to 5.2.2, kibana to 5.1.2

In preparation for upgrading production to a modern version of the ELK
stack, upgrade mwv.

Kibana needs to be upgraded in lock-step with elasticsearch, so 5.1.2
was chosen instead of 5.2.2 which is the latest release.

Changes:
* This new version of logstash gets stuck in a boot loop OOM'ing with
  the previously set 64m ram. Even at 128m ram was able to trigger an
  OOM. Increase to 192m. Additionally moved setting from defaults file
  to jvm.options, which is the new standard for elastic.co packages.
* update jdk from 7 to 8 to match logstash new requirements
* upstream packaging no longer includes both sets of startup scripts, so
  removes the kludge that previously deleted the upstart scripts.
* Adds new logstash::plugin define, as plugins are now handled with a
  script rather than all bundled together into a single contrib package.
* Remove /etc/defaults/logstash, this is no longer used in 5.x.
* elasticsearch_http output no longer exists, instead it is
  elasticsearchi now which only speaks http. This also no longer has
  a replication setting, Elastic consider async writes to be a
  Bad Idea™ which can lead to cluster overload.
* Add the haveged package to provide entropy in a vm so that JRuby
  doesn't spend minutes booting up waiting on entropy from /dev/random

Bug: T154473
Change-Id: I4f23fd402d13ad33c8b6a72fc96b3b39be6ba364
---
M puppet/hieradata/common.yaml
D puppet/modules/elasticsearch/files/elasticsearch.yml
M puppet/modules/elasticsearch/manifests/init.pp
A puppet/modules/kibana/files/kibana-dump.json
A puppet/modules/kibana/files/kibana-mapping.json
D puppet/modules/kibana/manifests/dashboard.pp
M puppet/modules/kibana/manifests/init.pp
D puppet/modules/kibana/templates/check-dashboard.erb
D puppet/modules/kibana/templates/config.js
D puppet/modules/kibana/templates/save-dashboard.erb
M puppet/modules/logstash/files/elasticsearch-template.json
M puppet/modules/logstash/manifests/init.pp
M puppet/modules/logstash/manifests/output/elasticsearch.pp
A puppet/modules/logstash/manifests/plugin.pp
D puppet/modules/logstash/templates/default.erb
A puppet/modules/logstash/templates/jvm.options.erb
M puppet/modules/logstash/templates/output/elasticsearch.erb
M puppet/modules/role/manifests/elk.pp
M puppet/modules/role/settings/elk.yaml
19 files changed, 541 insertions(+), 256 deletions(-)

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



diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml
index eacaaba..4adc168 100644
--- a/puppet/hieradata/common.yaml
+++ b/puppet/hieradata/common.yaml
@@ -164,10 +164,9 @@
 kibana::deploy_dir: "%{hiera('mwv::vendor_dir')}/kibana"
 kibana::default_route: /dashboard/elasticsearch/default
 
-logstash::heap_memory_mb: 64
-logstash::filter_workers: 1
+logstash::heap_memory_mb: 192
+logstash::pipeline_workers: 1
 logstash::output::elasticsearch::host: 127.0.0.1
-logstash::output::elasticsearch::replication: async
 logstash::output::elasticsearch::manage_indices: true
 logstash::output::elasticsearch::priority: 90
 
diff --git a/puppet/modules/elasticsearch/files/elasticsearch.yml 
b/puppet/modules/elasticsearch/files/elasticsearch.yml
deleted file mode 100644
index e69de29..000
--- a/puppet/modules/elasticsearch/files/elasticsearch.yml
+++ /dev/null
diff --git a/puppet/modules/elasticsearch/manifests/init.pp 
b/puppet/modules/elasticsearch/manifests/init.pp
index 5988ce2..27e0236 100644
--- a/puppet/modules/elasticsearch/manifests/init.pp
+++ b/puppet/modules/elasticsearch/manifests/init.pp
@@ -39,19 +39,15 @@
 ]
 }
 
+exec { 'wait-for-elasticsearch':
+require => Service['elasticsearch'],
+command => '/usr/bin/wget --tries 20 --retry-connrefused 
http://localhost:9200/',
+}
+
 file { '/etc/default/elasticsearch':
 source  => 'puppet:///modules/elasticsearch/defaults',
 require => Package['elasticsearch'],
 notify  => Service['elasticsearch'],
-}
-
-file { '/etc/elasticsearch/elasticsearch.yml':
-source  => 'puppet:///modules/elasticsearch/elasticsearch.yml',
-require => Package['elasticsearch'],
-notify  => Service['elasticsearch'],
-owner   => 'root',
-group   => 'root',
-mode=> '0444',
 }
 
 file { '/etc/elasticsearch/jvm.options':
diff --git a/puppet/modules/kibana/files/kibana-dump.json 
b/puppet/modules/kibana/files/kibana-dump.json
new file mode 100644
index 000..ce843be
--- /dev/null
+++ b/puppet/modules/kibana/files/kibana-dump.json
@@ -0,0 +1,14 @@
+{"index":{"_index":".kibana","_type":"config","_id":"5.1.2"}}
+{"buildNum":14588,"defaultIndex":"logstash-*"}

[MediaWiki-commits] [Gerrit] operations/puppet[production]: disable full dumps cron job for a bit

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/345956 )

Change subject: disable full dumps cron job for a bit
..


disable full dumps cron job for a bit

will re-enable later today after code deploy

Change-Id: I24d982dbf1b1c1f58bdf9e91113d988ca1138dce
---
M modules/snapshot/manifests/dumps/cron.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/snapshot/manifests/dumps/cron.pp 
b/modules/snapshot/manifests/dumps/cron.pp
index 85e109a..30bdbb8 100644
--- a/modules/snapshot/manifests/dumps/cron.pp
+++ b/modules/snapshot/manifests/dumps/cron.pp
@@ -39,7 +39,7 @@
 command => "/usr/local/bin/fulldumps.sh 01 14 ${runtype} full > 
/dev/null",
 minute  => '05',
 hour=> [8, 20],
-monthday=> '01-14',
+monthday=> '02-14',
 }
 
 cron { 'partialdumps_rest':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24d982dbf1b1c1f58bdf9e91113d988ca1138dce
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
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]: disable full dumps cron job for a bit

2017-04-01 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345956 )

Change subject: disable full dumps cron job for a bit
..

disable full dumps cron job for a bit

will re-enable later today after code deploy

Change-Id: I24d982dbf1b1c1f58bdf9e91113d988ca1138dce
---
M modules/snapshot/manifests/dumps/cron.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/345956/1

diff --git a/modules/snapshot/manifests/dumps/cron.pp 
b/modules/snapshot/manifests/dumps/cron.pp
index 85e109a..30bdbb8 100644
--- a/modules/snapshot/manifests/dumps/cron.pp
+++ b/modules/snapshot/manifests/dumps/cron.pp
@@ -39,7 +39,7 @@
 command => "/usr/local/bin/fulldumps.sh 01 14 ${runtype} full > 
/dev/null",
 minute  => '05',
 hour=> [8, 20],
-monthday=> '01-14',
+monthday=> '02-14',
 }
 
 cron { 'partialdumps_rest':

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: When setting ce=true/false on a ve.ce.DocumentNode, change d...

2017-04-01 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/345955 )

Change subject: When setting ce=true/false on a ve.ce.DocumentNode, change 
descendants too
..

When setting ce=true/false on a ve.ce.DocumentNode, change descendants too

Bug: T161944
Change-Id: I81f16a3bbcd2412b210c28fb584f64a434a60802
---
M src/ce/nodes/ve.ce.DocumentNode.js
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/55/345955/1

diff --git a/src/ce/nodes/ve.ce.DocumentNode.js 
b/src/ce/nodes/ve.ce.DocumentNode.js
index 3664a1e..5774c49 100644
--- a/src/ce/nodes/ve.ce.DocumentNode.js
+++ b/src/ce/nodes/ve.ce.DocumentNode.js
@@ -67,6 +67,7 @@
  * @method
  */
 ve.ce.DocumentNode.prototype.disable = function () {
+   this.setDescendantsEditable( false );
this.$element.prop( 'contentEditable', 'false' );
 };
 
@@ -77,6 +78,21 @@
  */
 ve.ce.DocumentNode.prototype.enable = function () {
this.$element.prop( 'contentEditable', 'true' );
+   this.setDescendantsEditable( true );
+};
+
+/**
+ * Enable or disable editing on descendant ActiveNodes
+ * @private
+ * @param {boolean} isEditable
+ */
+ve.ce.DocumentNode.prototype.setDescendantsEditable = function ( isEditable ) {
+   var editable = isEditable ? 'true' : 'false';
+   this.traverse( function ( node ) {
+   if ( node.activeNodeSurface !== undefined ) {
+   node.$element.prop( 'contentEditable', editable );
+   }
+   } );
 };
 
 /* Registration */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81f16a3bbcd2412b210c28fb584f64a434a60802
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 

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