[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Restore original weight for db1070

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

Change subject: db-eqiad.php: Restore original weight for db1070
..


db-eqiad.php: Restore original weight for db1070

After all the reimages happened in s5, it is now time to restore the
original weight for db1070, db1071 and db1082

Bug: T137191
Change-Id: I0682533061477421ddd4105610d07eef3d89ba45
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 09d6116..80c92e6 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -142,10 +142,10 @@
'db1049' => 0,   # B1 2.8TB  64GB, master
'db1026' => 1,   # B1 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1070' => 50,  # D1 2.8TB 160GB, vslow, dump #ROW based 
replication - master for db1095 #T137191
-   'db1071' => 50,  # D1 2.8TB 160GB, #temporary vslow #T153743
-   'db1082' => 200, # A2 3.6TB 512GB, api #T137191
-   'db1087' => 200, # C2 3.6TB 512GB #temporary api #T153743
+   'db1070' => 50,  # D1 2.8TB 160GB, vslow, dump #ROW based 
replication - master for db1095 #T137191
+   'db1071' => 50,  # D1 2.8TB 160GB, api
+   'db1082' => 300, # A2 3.6TB 512GB, api
+   'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
],
's6' => [
@@ -353,14 +353,14 @@
],
's5' => [
'vslow' => [
-   'db1071' => 1,
+   'db1070' => 1,
],
'dump' => [
-   'db1071' => 1,
+   'db1070' => 1,
],
'api' => [
+   'db1071' => 1,
'db1082' => 1,
-   'db1087' => 1,
],
'watchlist' => [
'db1026' => 1,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0682533061477421ddd4105610d07eef3d89ba45
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Marostegui 
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...WikiEditor[master]: Replace deprecated jQuery .bind() by .on()

2017-03-24 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344581 )

Change subject: Replace deprecated jQuery .bind() by .on()
..

Replace deprecated jQuery .bind() by .on()

jQuery .bind() is deprecated since jQuery 3.0.
https://api.jquery.com/bind/

Change-Id: Ibbcfbefe2983b2ed2e3b110518c16539cbb84d88
---
M modules/jquery.wikiEditor.dialogs.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/jquery.wikiEditor.dialogs.js 
b/modules/jquery.wikiEditor.dialogs.js
index 168a497..23d82f8 100644
--- a/modules/jquery.wikiEditor.dialogs.js
+++ b/modules/jquery.wikiEditor.dialogs.js
@@ -165,13 +165,13 @@
.find( 'button' ).not( '[tabindex]' ) );
if ( !( 'resizeme' in module ) || 
module.resizeme ) {
$dialogDiv
-   .bind( 'dialogopen', 
$.wikiEditor.modules.dialogs.fn.resize )
-   .find( '.ui-tabs' ).bind( 
'tabsshow', function () {
+   .on( 'dialogopen', 
$.wikiEditor.modules.dialogs.fn.resize )
+   .find( '.ui-tabs' ).on( 
'tabsshow', function () {
$( this ).closest( 
'.ui-dialog-content' ).each(

$.wikiEditor.modules.dialogs.fn.resize );
} );
}
-   $dialogDiv.bind( 'dialogclose', function () {
+   $dialogDiv.on( 'dialogclose', function () {
context.fn.restoreSelection();
} );
 
@@ -182,7 +182,7 @@
/**
 * Resize a dialog so its contents fit
 *
-* Usage: dialog.each( resize ); or dialog.bind( 
'blah', resize );
+* Usage: dialog.each( resize ); or dialog.on( 'blah', 
resize );
 * NOTE: This function assumes $.ui.dialog has already 
been loaded
 */
resize: function () {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbcfbefe2983b2ed2e3b110518c16539cbb84d88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
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] operations/puppet[production]: conftool: add prometheus100[34]

2017-03-24 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344585 )

Change subject: conftool: add prometheus100[34]
..

conftool: add prometheus100[34]

Bug: T148408
Change-Id: Ibd7ad128c87220cf483cf0ab67c85e4b8fc424d5
---
M conftool-data/node/eqiad.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/344585/1

diff --git a/conftool-data/node/eqiad.yaml b/conftool-data/node/eqiad.yaml
index cf9943b..57ccc8a 100644
--- a/conftool-data/node/eqiad.yaml
+++ b/conftool-data/node/eqiad.yaml
@@ -300,6 +300,8 @@
   prometheus:
 prometheus1001.eqiad.wmnet: [prometheus]
 prometheus1002.eqiad.wmnet: [prometheus]
+prometheus1003.eqiad.wmnet: [prometheus]
+prometheus1004.eqiad.wmnet: [prometheus]
   wdqs:
 wdqs1001.eqiad.wmnet: [wdqs]
 wdqs1002.eqiad.wmnet: [wdqs]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibd7ad128c87220cf483cf0ab67c85e4b8fc424d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: sanitarium.my.cnf: Set slave_type_conversions

2017-03-24 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344586 )

Change subject: sanitarium.my.cnf: Set slave_type_conversions
..

sanitarium.my.cnf: Set slave_type_conversions

For the current sanitarium this is not really mandatory, but I prefer to
add it for consistency.

When doing an ALTER table on hosts whose master is running ROW based
replication, and attempting to expand a column, replication can break
with:

Last_SQL_Error: Column 8 of table 'commonswiki.image' cannot be
converted from type 'varchar(32)' to type 'varbinary(100)'

To prevent this we are setting slave_type_conversion to ALL_NON_LOSSY
which would allow the transaction to go on.
The documentation states:
"This mode permits conversions that do not require truncation or other
special handling of the source value; that is, it permits conversions
where the target type has a wider range than the source type.

Setting this mode has no bearing on whether lossy conversions are
permitted; this is controlled with the ALL_LOSSY mode. If only
ALL_NON_LOSSY is set, but not ALL_LOSSY, then attempting a conversion
that would result in the loss of data (such as INT to TINYINT, or
CHAR(25) to VARCHAR(20)) causes the slave to stop with an error."

Bug: T73563
Change-Id: Ib41b345b8bb59c907069998ba17e6764c67f93b6
---
M modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/344586/1

diff --git a/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb 
b/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
index 416be66..899ca24 100644
--- a/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
+++ b/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
@@ -41,6 +41,11 @@
 expire_logs_days   = 7
 sql-mode   = IGNORE_BAD_TABLE_OPTIONS
 
+# Needed when using ROW based replication and altering the width of a column, 
if not set, the ALTER will fail
+# 
https://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-features-different-data-types.html
+# T73563#3117924
+slave_type_conversions = ALL_NON_LOSSY
+
 table_open_cache   = 1
 table_definition_cache = 5
 open-files-limit   = 40

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Update wgRevisionId when changed by slider

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

Change subject: Update wgRevisionId when changed by slider
..


Update wgRevisionId when changed by slider

Bug: T161257
Change-Id: I1ede31dc9ce67fdc596f117f48ce4bfdde54c2cc
---
M modules/ext.RevisionSlider.DiffPage.js
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.DiffPage.js 
b/modules/ext.RevisionSlider.DiffPage.js
index 76afca7..cf34c65 100644
--- a/modules/ext.RevisionSlider.DiffPage.js
+++ b/modules/ext.RevisionSlider.DiffPage.js
@@ -70,6 +70,8 @@
uri.query.oldid = diff;
$( this ).attr( 'href', uri.toString() 
);
} );
+   // Update wgRevisionId (T161257)
+   mw.config.set( 'wgRevisionId', diff );
 
$( '.mw-revslider-revisions-container' 
).scrollLeft( scrollLeft );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ede31dc9ce67fdc596f117f48ce4bfdde54c2cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RevisionSlider
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WMDE-Fisch 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Style and message tweaks

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

Change subject: Style and message tweaks
..


Style and message tweaks

Maybe addresses T160647.

Change-Id: I4f6c73db6784415cdeca269321ba6f0f47c67551
---
M i18n/en.json
M resources/screen-common.less
M resources/screen-desktop.less
M resources/variables.less
4 files changed, 31 insertions(+), 29 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index f476f3c..37a5dea 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,10 +4,10 @@
},
"skinname-timeless": "Timeless",
"timeless-desc": "A timeless skin designed after the Winter prototype 
by Brandon Harris, and various styles by the Wikimedia Foundation",
-   "timeless-search-placeholder": "Search the text of approximately 
{{NUMBEROFPAGES}} pages",
+   "timeless-search-placeholder": "Search approximately {{NUMBEROFPAGES}} 
pages",
"timeless-loggedin": "Your account",
"timeless-anonymous": "Anonymous",
-   "timeless-loggedinas": "Logged in as $1",
+   "timeless-loggedinas": "Logged in as '''$1'''",
"timeless-notloggedin": "Not logged in",
"timeless-userpage": "{{GENDER:$1|User}} page",
"timeless-talkpage": "{{GENDER:$1|User}} talk",
@@ -22,4 +22,3 @@
"timeless-languages": "Languages",
"timeless-sitetitle": "{{MediaWiki:Sitetitle}}"
 }
-
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 41f8c47..68c7390 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -11,8 +11,12 @@
font-family: @fonts;
color: @text;
background: @background-dark;
-   line-height: 1.4;
font-size: @font-size;
+}
+body,
+p,
+div {
+   line-height: 1.4;
 }
 
 #mw-content {
@@ -50,7 +54,7 @@
height: 11em;
background-repeat: no-repeat;
background-position: 50% 50%;
-   margin: auto;
+   margin: .75em auto 0;
 }
 #p-logo-text {
width: @column-left-size;
@@ -68,7 +72,7 @@
/* 13+ character names */
&.long {
font-size: 1.45em;
-   padding: 0;
+   padding: 0 .75em 0 0;
line-height: .8;
}
}
@@ -202,10 +206,9 @@
display: inline-block;
margin: 0;
padding: 0;
-   line-height: 1.5;
}
li {
-   margin: .25em 0 1.5em;
+   margin: .25em 0 1em;
border-bottom: solid 3px @background;
 
&:hover {
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index d9523ce..3bb2251 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -80,27 +80,27 @@
.pokey {
top: 2.125em;
}
-}
+   h2 {
+   margin: 0;
+   padding: .7em 0 0 25px;
+   font-family: @fonts-secondary;
+   font-weight: normal;
+   font-size: 1.1em;
+   .background-image-svg('images/user-grey.svg', 
'images/user-grey.png');
+   background-position: 0 7px;
+   background-repeat: no-repeat;
 
-#p-personal h2 {
-   margin: 0;
-   padding: .7em 0 0 25px;
-   font-family: @fonts-secondary;
-   font-weight: normal;
-   font-size: 1.1em;
-   .background-image-svg('images/user-grey.svg', 'images/user-grey.png');
-   background-position: 0 7px;
-   background-repeat: no-repeat;
-
-   .dropdown-header();
-}
-#p-personal:hover {
-   .pokey,
-   .dropdown {
-   display: block !important;
+   .dropdown-header();
+   }
+   &:hover {
+   .pokey,
+   .dropdown {
+   display: block !important;
+   }
}
 }
 
+
 #mw-page-header-links #ca-more,
 #mw-page-header-links #ca-languages,
 .sidebar-chunk h2 {
diff --git a/resources/variables.less b/resources/variables.less
index 136f7bc..9f073d3 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -38,10 +38,10 @@
 
 // Fonts are chosen for consistent metrics, not necessarily overall prettiness.
 // This will NEED fixes for different languages.
-@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Arial', sans-serif;
+@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Helvetica', 'Arial', sans-serif;
 @fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
-// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts; not tested
-@fonts-monospace: 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', 
monospace, monospace;
+// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts
+@fonts-monospace: 'Consolas', 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1056

2017-03-24 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344579 )

Change subject: db-eqiad.php: Depool db1056
..

db-eqiad.php: Depool db1056

Depool db1056 for alter table and repool db1081 db1064 and db1059 with their
original weights

Bug: T73563
Bug: T160415
Change-Id: Idd320ea31a95f391c06764178658a91b495bceb6
---
M wmf-config/db-eqiad.php
1 file changed, 12 insertions(+), 12 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 80c92e6..67d1539 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,11 +130,11 @@
's4' => [
'db1040' => 0,   # B2 1.4TB  64GB, master
'db1053' => 1,   # A2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   'db1059' => 0,   # C2 2.8TB  96GB, temporary vslow #T73563 
T160415 api
-#  'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium #T153743 #T73563 T160415 api
+#  'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager T160415 T73563
+   'db1059' => 1,   # C2 2.8TB  96GB, api
+   'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1068' => 1,   # D1 2.8TB 160GB, api
-   'db1081' => 200, # A2 3.6TB 512GB temporary api #T73563 T160415
+   'db1081' => 200, # A2 3.6TB 512GB
'db1084' => 500, # B1 3.6TB 512GB
'db1091' => 500, # D2 3.6TB 512GB
],
@@ -321,34 +321,34 @@
],
's4' => [
'vslow' => [
-   'db1059' => 1,
+   'db1064' => 1,
],
'dump' => [
-   'db1059' => 1,
+   'db1064' => 1,
],
'api' => [
-   'db1081' => 1,
+   'db1059' => 1,
'db1068' => 3,
],
'watchlist' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'recentchanges' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'recentchangeslinked' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'contributions' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'logpager' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
],
's5' => [

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1056

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

Change subject: db-eqiad.php: Depool db1056
..


db-eqiad.php: Depool db1056

Depool db1056 for alter table and repool db1081 db1064 and db1059 with their
original weights

Bug: T73563
Bug: T160415
Change-Id: Idd320ea31a95f391c06764178658a91b495bceb6
---
M wmf-config/db-eqiad.php
1 file changed, 12 insertions(+), 12 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 80c92e6..99b2272 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,11 +130,11 @@
's4' => [
'db1040' => 0,   # B2 1.4TB  64GB, master
'db1053' => 1,   # A2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-   'db1059' => 0,   # C2 2.8TB  96GB, temporary vslow #T73563 
T160415 api
-#  'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium #T153743 #T73563 T160415 api
+#  'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager T160415 T73563
+   'db1059' => 1,   # C2 2.8TB  96GB, api
+   'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1068' => 1,   # D1 2.8TB 160GB, api
-   'db1081' => 200, # A2 3.6TB 512GB temporary api #T73563 T160415
+   'db1081' => 500, # A2 3.6TB 512GB
'db1084' => 500, # B1 3.6TB 512GB
'db1091' => 500, # D2 3.6TB 512GB
],
@@ -321,34 +321,34 @@
],
's4' => [
'vslow' => [
-   'db1059' => 1,
+   'db1064' => 1,
],
'dump' => [
-   'db1059' => 1,
+   'db1064' => 1,
],
'api' => [
-   'db1081' => 1,
+   'db1059' => 1,
'db1068' => 3,
],
'watchlist' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'recentchanges' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'recentchangeslinked' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'contributions' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
'logpager' => [
'db1053' => 1,
-   'db1056' => 1,
+#  'db1056' => 1,
],
],
's5' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd320ea31a95f391c06764178658a91b495bceb6
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Marostegui 
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]: Re-enable updateSuggesterIndex cron

2017-03-24 Thread Gehel (Code Review)
Gehel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344171 )

Change subject: Re-enable updateSuggesterIndex cron
..


Re-enable updateSuggesterIndex cron

and increase chunk size to 3000.

Change-Id: I4c57a0bf28e95f095c5df3c51060045b7bb8b987
---
M modules/mediawiki/manifests/maintenance/cirrussearch.pp
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/modules/mediawiki/manifests/maintenance/cirrussearch.pp 
b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
index b24fff7..f673e57 100644
--- a/modules/mediawiki/manifests/maintenance/cirrussearch.pp
+++ b/modules/mediawiki/manifests/maintenance/cirrussearch.pp
@@ -12,15 +12,13 @@
 # fail the entire job. This job, as of mar 2015, takes around 5 hours
 # to run.
 cron { 'cirrus_build_completion_indices_eqiad':
-ensure  => absent,
-command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=eqiad --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.eqiad.log 2>&1 || true\'',
+command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --indexChunkSize 3000 
--cluster=eqiad --optimize > /var/log/mediawiki/cirrus-suggest/{}.eqiad.log 
2>&1 || true\'',
 minute  => 30,
 hour=> 2,
 }
 
 cron { 'cirrus_build_completion_indices_codfw':
-ensure  => absent,
-command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --cluster=codfw --optimize > 
/var/log/mediawiki/cirrus-suggest/{}.codfw.log 2>&1 || true\'',
+command => '/usr/local/bin/expanddblist all | xargs -I{} -P 4 sh -c 
\'/usr/local/bin/mwscript 
extensions/CirrusSearch/maintenance/updateSuggesterIndex.php --wiki={} 
--masterTimeout=10m --replicationTimeout=5400 --indexChunkSize 3000 
--cluster=codfw --optimize > /var/log/mediawiki/cirrus-suggest/{}.codfw.log 
2>&1 || true\'',
 minute  => 30,
 hour=> 2,
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c57a0bf28e95f095c5df3c51060045b7bb8b987
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: DCausse 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: conftool: add prometheus100[34]

2017-03-24 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344585 )

Change subject: conftool: add prometheus100[34]
..


conftool: add prometheus100[34]

Bug: T148408
Change-Id: Ibd7ad128c87220cf483cf0ab67c85e4b8fc424d5
---
M conftool-data/node/eqiad.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Filippo Giunchedi: Verified; Looks good to me, approved



diff --git a/conftool-data/node/eqiad.yaml b/conftool-data/node/eqiad.yaml
index cf9943b..57ccc8a 100644
--- a/conftool-data/node/eqiad.yaml
+++ b/conftool-data/node/eqiad.yaml
@@ -300,6 +300,8 @@
   prometheus:
 prometheus1001.eqiad.wmnet: [prometheus]
 prometheus1002.eqiad.wmnet: [prometheus]
+prometheus1003.eqiad.wmnet: [prometheus]
+prometheus1004.eqiad.wmnet: [prometheus]
   wdqs:
 wdqs1001.eqiad.wmnet: [wdqs]
 wdqs1002.eqiad.wmnet: [wdqs]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibd7ad128c87220cf483cf0ab67c85e4b8fc424d5
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: compiler-update-facts: remove 'trusted:' facts lines

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

Change subject: compiler-update-facts: remove 'trusted:' facts lines
..


compiler-update-facts: remove 'trusted:' facts lines

Change-Id: Ia91b98f0177bf2d055f1c8bc4928c7d1c1ebf3ff
---
M modules/puppet_compiler/files/compiler-update-facts
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/puppet_compiler/files/compiler-update-facts 
b/modules/puppet_compiler/files/compiler-update-facts
index daed2ae..df6b25b 100755
--- a/modules/puppet_compiler/files/compiler-update-facts
+++ b/modules/puppet_compiler/files/compiler-update-facts
@@ -17,3 +17,5 @@
 --directory /var/lib/catalog-differ/puppet \
 && rm puppet-facts-export.tar.xz'
 ssh $compiler 'sudo chown -R jenkins-deploy:wikidev 
/var/lib/catalog-differ/puppet/yaml'
+ssh $compiler "cd /var/lib/catalog-differ/puppet/yaml/facts && sudo sed -i'' 
'/trusted:/d' *.yaml"
+ssh $compiler "cd /var/lib/catalog-differ/puppet/yaml/node && sudo sed -i'' 
'/trusted:/d' *.yaml"

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::puppet_compiler: fix broken inclusion of a removed class

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

Change subject: role::puppet_compiler: fix broken inclusion of a removed class
..


role::puppet_compiler: fix broken inclusion of a removed class

Change-Id: I40d88c2c02115b94b1385d0b879d8a7c38ecb4a5
---
M modules/puppet_compiler/manifests/init.pp
M modules/role/manifests/puppet_compiler.pp
2 files changed, 9 insertions(+), 10 deletions(-)

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



diff --git a/modules/puppet_compiler/manifests/init.pp 
b/modules/puppet_compiler/manifests/init.pp
index 81664bc..e9ee9c3 100644
--- a/modules/puppet_compiler/manifests/init.pp
+++ b/modules/puppet_compiler/manifests/init.pp
@@ -84,18 +84,9 @@
 
 
 # The conftool parser function needs
-#   - the conftool module to be included
-#   - An etcd instance running populated with (fake? synced?) data
+# An etcd instance running populated with (fake? synced?) data
 
 include ::etcd
-
-class { '::conftool':
-use_ssl => false,
-auth=> false,
-hosts   => [
-'http://127.0.0.1:2379',
-],
-}
 
 tidy { "${::puppet_compiler::workdir}/output":
 recurse => true,
diff --git a/modules/role/manifests/puppet_compiler.pp 
b/modules/role/manifests/puppet_compiler.pp
index 98a88e5..0567daa 100644
--- a/modules/role/manifests/puppet_compiler.pp
+++ b/modules/role/manifests/puppet_compiler.pp
@@ -19,4 +19,12 @@
 
 include ::puppet_compiler
 
+# Conftool + etcd are needed for the conftool function to work
+# do not bother with hiera here, for now.
+class { '::profile::conftool::client':
+srv_domain => undef,
+host   => '127.0.0.1',
+port   => 2379,
+namespace  => '/conftool/v1',
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Remove obsolete Hiera settings

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344386 )

Change subject: Remove obsolete Hiera settings
..


Remove obsolete Hiera settings

timesyncd is now used unconditionally.

Change-Id: I6952a141f8d3444ca28cf7d3705b3b268effb283
---
M hieradata/hosts/multatuli.yaml
D hieradata/hosts/stat1001.yaml
M hieradata/role/codfw/mediawiki/appserver.yaml
M hieradata/role/codfw/mediawiki/canary_appserver.yaml
M hieradata/role/esams/swift/proxy.yaml
M hieradata/role/esams/swift/storage.yaml
M hieradata/role/ulsfo/cache/maps.yaml
M hieradata/role/ulsfo/cache/misc.yaml
M hieradata/role/ulsfo/cache/text.yaml
M hieradata/role/ulsfo/cache/upload.yaml
10 files changed, 0 insertions(+), 10 deletions(-)

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



diff --git a/hieradata/hosts/multatuli.yaml b/hieradata/hosts/multatuli.yaml
index 6bb1d38..9fe793e 100644
--- a/hieradata/hosts/multatuli.yaml
+++ b/hieradata/hosts/multatuli.yaml
@@ -1,2 +1 @@
-use_timesyncd: true
 apt::use_experimental: true
diff --git a/hieradata/hosts/stat1001.yaml b/hieradata/hosts/stat1001.yaml
deleted file mode 100644
index 832a86c..000
--- a/hieradata/hosts/stat1001.yaml
+++ /dev/null
@@ -1 +0,0 @@
-use_timesyncd: true
diff --git a/hieradata/role/codfw/mediawiki/appserver.yaml 
b/hieradata/role/codfw/mediawiki/appserver.yaml
index 1ac2c1c..9393bfc 100644
--- a/hieradata/role/codfw/mediawiki/appserver.yaml
+++ b/hieradata/role/codfw/mediawiki/appserver.yaml
@@ -1,4 +1,3 @@
 debdeploy::grains:
   debdeploy-appserver-codfw:
 value: standard
-use_timesyncd: true
diff --git a/hieradata/role/codfw/mediawiki/canary_appserver.yaml 
b/hieradata/role/codfw/mediawiki/canary_appserver.yaml
index 670cde1..7520559 100644
--- a/hieradata/role/codfw/mediawiki/canary_appserver.yaml
+++ b/hieradata/role/codfw/mediawiki/canary_appserver.yaml
@@ -1,2 +1 @@
 role::mediawiki::webserver::tls: true
-use_timesyncd: true
diff --git a/hieradata/role/esams/swift/proxy.yaml 
b/hieradata/role/esams/swift/proxy.yaml
index 4d98691..52add8d 100644
--- a/hieradata/role/esams/swift/proxy.yaml
+++ b/hieradata/role/esams/swift/proxy.yaml
@@ -5,4 +5,3 @@
 value: standard
 admin::groups:
   - swift-roots
-use_timesyncd: true
diff --git a/hieradata/role/esams/swift/storage.yaml 
b/hieradata/role/esams/swift/storage.yaml
index e33a590..0d01593 100644
--- a/hieradata/role/esams/swift/storage.yaml
+++ b/hieradata/role/esams/swift/storage.yaml
@@ -3,4 +3,3 @@
 value: standard
 admin::groups:
   - swift-roots
-use_timesyncd: true
diff --git a/hieradata/role/ulsfo/cache/maps.yaml 
b/hieradata/role/ulsfo/cache/maps.yaml
index 5447792..48da31a 100644
--- a/hieradata/role/ulsfo/cache/maps.yaml
+++ b/hieradata/role/ulsfo/cache/maps.yaml
@@ -1,4 +1,3 @@
 debdeploy::grains:
   debdeploy-cp-ulsfo-maps:
 value: standard
-use_timesyncd: true
diff --git a/hieradata/role/ulsfo/cache/misc.yaml 
b/hieradata/role/ulsfo/cache/misc.yaml
index e7941db..8e8cb74 100644
--- a/hieradata/role/ulsfo/cache/misc.yaml
+++ b/hieradata/role/ulsfo/cache/misc.yaml
@@ -1,4 +1,3 @@
 debdeploy::grains:
   debdeploy-cp-ulsfo-misc:
 value: standard
-use_timesyncd: true
diff --git a/hieradata/role/ulsfo/cache/text.yaml 
b/hieradata/role/ulsfo/cache/text.yaml
index 915c946..fcaa704 100644
--- a/hieradata/role/ulsfo/cache/text.yaml
+++ b/hieradata/role/ulsfo/cache/text.yaml
@@ -1,4 +1,3 @@
 debdeploy::grains:
   debdeploy-cp-ulsfo-text:
 value: standard
-use_timesyncd: true
diff --git a/hieradata/role/ulsfo/cache/upload.yaml 
b/hieradata/role/ulsfo/cache/upload.yaml
index 6d2b150..4ee386e 100644
--- a/hieradata/role/ulsfo/cache/upload.yaml
+++ b/hieradata/role/ulsfo/cache/upload.yaml
@@ -1,4 +1,3 @@
 debdeploy::grains:
   debdeploy-cp-ulsfo-upload:
 value: standard
-use_timesyncd: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6952a141f8d3444ca28cf7d3705b3b268effb283
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Timeless[master]: Style and message tweaks

2017-03-24 Thread Isarra (Code Review)
Isarra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344576 )

Change subject: Style and message tweaks
..

Style and message tweaks

Maybe addresses T160647.

Change-Id: I4f6c73db6784415cdeca269321ba6f0f47c67551
---
M i18n/en.json
M resources/screen-common.less
M resources/screen-desktop.less
M resources/variables.less
4 files changed, 31 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/Timeless 
refs/changes/76/344576/1

diff --git a/i18n/en.json b/i18n/en.json
index f476f3c..37a5dea 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -4,10 +4,10 @@
},
"skinname-timeless": "Timeless",
"timeless-desc": "A timeless skin designed after the Winter prototype 
by Brandon Harris, and various styles by the Wikimedia Foundation",
-   "timeless-search-placeholder": "Search the text of approximately 
{{NUMBEROFPAGES}} pages",
+   "timeless-search-placeholder": "Search approximately {{NUMBEROFPAGES}} 
pages",
"timeless-loggedin": "Your account",
"timeless-anonymous": "Anonymous",
-   "timeless-loggedinas": "Logged in as $1",
+   "timeless-loggedinas": "Logged in as '''$1'''",
"timeless-notloggedin": "Not logged in",
"timeless-userpage": "{{GENDER:$1|User}} page",
"timeless-talkpage": "{{GENDER:$1|User}} talk",
@@ -22,4 +22,3 @@
"timeless-languages": "Languages",
"timeless-sitetitle": "{{MediaWiki:Sitetitle}}"
 }
-
diff --git a/resources/screen-common.less b/resources/screen-common.less
index 41f8c47..68c7390 100644
--- a/resources/screen-common.less
+++ b/resources/screen-common.less
@@ -11,8 +11,12 @@
font-family: @fonts;
color: @text;
background: @background-dark;
-   line-height: 1.4;
font-size: @font-size;
+}
+body,
+p,
+div {
+   line-height: 1.4;
 }
 
 #mw-content {
@@ -50,7 +54,7 @@
height: 11em;
background-repeat: no-repeat;
background-position: 50% 50%;
-   margin: auto;
+   margin: .75em auto 0;
 }
 #p-logo-text {
width: @column-left-size;
@@ -68,7 +72,7 @@
/* 13+ character names */
&.long {
font-size: 1.45em;
-   padding: 0;
+   padding: 0 .75em 0 0;
line-height: .8;
}
}
@@ -202,10 +206,9 @@
display: inline-block;
margin: 0;
padding: 0;
-   line-height: 1.5;
}
li {
-   margin: .25em 0 1.5em;
+   margin: .25em 0 1em;
border-bottom: solid 3px @background;
 
&:hover {
diff --git a/resources/screen-desktop.less b/resources/screen-desktop.less
index d9523ce..3bb2251 100644
--- a/resources/screen-desktop.less
+++ b/resources/screen-desktop.less
@@ -80,27 +80,27 @@
.pokey {
top: 2.125em;
}
-}
+   h2 {
+   margin: 0;
+   padding: .7em 0 0 25px;
+   font-family: @fonts-secondary;
+   font-weight: normal;
+   font-size: 1.1em;
+   .background-image-svg('images/user-grey.svg', 
'images/user-grey.png');
+   background-position: 0 7px;
+   background-repeat: no-repeat;
 
-#p-personal h2 {
-   margin: 0;
-   padding: .7em 0 0 25px;
-   font-family: @fonts-secondary;
-   font-weight: normal;
-   font-size: 1.1em;
-   .background-image-svg('images/user-grey.svg', 'images/user-grey.png');
-   background-position: 0 7px;
-   background-repeat: no-repeat;
-
-   .dropdown-header();
-}
-#p-personal:hover {
-   .pokey,
-   .dropdown {
-   display: block !important;
+   .dropdown-header();
+   }
+   &:hover {
+   .pokey,
+   .dropdown {
+   display: block !important;
+   }
}
 }
 
+
 #mw-page-header-links #ca-more,
 #mw-page-header-links #ca-languages,
 .sidebar-chunk h2 {
diff --git a/resources/variables.less b/resources/variables.less
index 136f7bc..9f073d3 100644
--- a/resources/variables.less
+++ b/resources/variables.less
@@ -38,10 +38,10 @@
 
 // Fonts are chosen for consistent metrics, not necessarily overall prettiness.
 // This will NEED fixes for different languages.
-@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Arial', sans-serif;
+@fonts: 'Helvetica Neue', 'Nimbus Sans', 'Helvetica', 'Arial', sans-serif;
 @fonts-secondary: 'Linux Libertine', 'Times New Roman', serif;
-// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts; not tested
-@fonts-monospace: 'Courier', 'Nimbus Mono', 'Liberation Mono', 'Courier New', 
monospace, monospace;
+// Based on information on 
https://wiki.archlinux.org/index.php/Metric-compatible_fonts
+@fonts-monospace: 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Correct "nearby you" to "near you"

2017-03-24 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344580 )

Change subject: Correct "nearby you" to "near you"
..

Correct "nearby you" to "near you"

"Nearby" is an adjective or an adverb, and before "you"
a preposition is needed, so it should be "near you".

Change-Id: I39c75b601c75a98be96c12f29f6932642a58df6f
---
M app/src/main/res/values/strings.xml
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 7dba702..04ec038 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -251,7 +251,7 @@
 Sorry, voice recognition 
is not available.
 Location services are 
disabled.
 Enable
-Enable location 
permissions to see places nearby you.
+Enable location 
permissions to see places near you.
 Turn on
 The Android System WebView is 
currently being updated. Please try again in a moment.
 %d selected

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: Fix indent in json

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

Change subject: Fix indent in json
..


Fix indent in json

Change-Id: I385221a3e44cb7aec82bc2637cbf4afd723ce344
---
M HideTitle/extension.json
M TopMenuBarCustomizer/extension.json
M UEModulePDF/extension.json
M UniversalExport/extension.json
M extension.json
5 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/HideTitle/extension.json b/HideTitle/extension.json
index 80f8d84..1c093b1 100644
--- a/HideTitle/extension.json
+++ b/HideTitle/extension.json
@@ -1,4 +1,5 @@
-{  "name": "HideTitle",
+{
+   "name": "HideTitle",
"version": "2.27.1-alpha",
"url": "https://help.bluespice.com/index.php/HideTitle;,
"author": "Markus Glaser",
diff --git a/TopMenuBarCustomizer/extension.json 
b/TopMenuBarCustomizer/extension.json
index 4c6f8c3..008a34c 100644
--- a/TopMenuBarCustomizer/extension.json
+++ b/TopMenuBarCustomizer/extension.json
@@ -1,4 +1,5 @@
-{  "name": "TopMenuBarCustomizer",
+{
+   "name": "TopMenuBarCustomizer",
"version": "2.27.1-alpha",
"url": "https://help.bluespice.com/index.php/TopBarMenuCustomizer;,
"author": "Patric Wirth",
diff --git a/UEModulePDF/extension.json b/UEModulePDF/extension.json
index 6d1dd6e..063da74 100644
--- a/UEModulePDF/extension.json
+++ b/UEModulePDF/extension.json
@@ -1,4 +1,5 @@
-{  "name": "UEModulePDF",
+{
+   "name": "UEModulePDF",
"version": "2.27.1-alpha",
"url": "https://help.bluespice.com/index.php/UEModulePDF;,
"author": "Robert Vogel",
diff --git a/UniversalExport/extension.json b/UniversalExport/extension.json
index 9a9eb22..e816f29 100644
--- a/UniversalExport/extension.json
+++ b/UniversalExport/extension.json
@@ -1,4 +1,5 @@
-{  "name": "UniversalExport",
+{
+   "name": "UniversalExport",
"version": "2.27.1-alpha",
"url": "https://help.bluespice.com/index.php/UniversalExport;,
"author": "Robert Vogel",
diff --git a/extension.json b/extension.json
index 8a907b9..211434b 100644
--- a/extension.json
+++ b/extension.json
@@ -1,9 +1,9 @@
 {
"name": "BlueSpiceExtensions",
-   "version": "2.27.1",
-   "url": "https://www.mediawiki.org/wiki/BlueSpice;,
-   "author": [ "Hallo Welt! GmbH" ],
-   "AutoloadClasses":{
+   "version": "2.27.1",
+   "url": "https://www.mediawiki.org/wiki/BlueSpice;,
+   "author": [ "Hallo Welt! GmbH" ],
+   "AutoloadClasses": {
"BlueSpiceExtensions":"BlueSpiceExtensions.class.php"
},
"callback": "BlueSpiceExtensions::onRegistration",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I385221a3e44cb7aec82bc2637cbf4afd723ce344
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Restore original weight for db1070

2017-03-24 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344577 )

Change subject: db-eqiad.php: Restore original weight for db1070
..

db-eqiad.php: Restore original weight for db1070

After all the reimages happened in s5, it is now time to restore the
original weight for db1070, db1071 and db1082

Bug: T137191
Change-Id: I0682533061477421ddd4105610d07eef3d89ba45
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 09d6116..80c92e6 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -142,10 +142,10 @@
'db1049' => 0,   # B1 2.8TB  64GB, master
'db1026' => 1,   # B1 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
'db1045' => 1,   # B2 1.4TB  64GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1070' => 50,  # D1 2.8TB 160GB, vslow, dump #ROW based 
replication - master for db1095 #T137191
-   'db1071' => 50,  # D1 2.8TB 160GB, #temporary vslow #T153743
-   'db1082' => 200, # A2 3.6TB 512GB, api #T137191
-   'db1087' => 200, # C2 3.6TB 512GB #temporary api #T153743
+   'db1070' => 50,  # D1 2.8TB 160GB, vslow, dump #ROW based 
replication - master for db1095 #T137191
+   'db1071' => 50,  # D1 2.8TB 160GB, api
+   'db1082' => 300, # A2 3.6TB 512GB, api
+   'db1087' => 500, # C2 3.6TB 512GB
'db1092' => 500, # D2 3.6TB 512GB
],
's6' => [
@@ -353,14 +353,14 @@
],
's5' => [
'vslow' => [
-   'db1071' => 1,
+   'db1070' => 1,
],
'dump' => [
-   'db1071' => 1,
+   'db1070' => 1,
],
'api' => [
+   'db1071' => 1,
'db1082' => 1,
-   'db1087' => 1,
],
'watchlist' => [
'db1026' => 1,

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: api.py: Preserve the order of parameters in Request._add_def...

2017-03-24 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344584 )

Change subject: api.py: Preserve the order of parameters in 
Request._add_defaults
..

api.py: Preserve the order of parameters in Request._add_defaults

This was causing occasional cache misses.
Bug: T161291

Change-Id: I6ff4ddacf31af2d7ac1535b98dbeb4a5e46cd47a
---
M pywikibot/data/api.py
1 file changed, 9 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/84/344584/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 9030e4b..6d9d464 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1682,14 +1682,19 @@
 if self.action == 'query':
 meta = self._params.get("meta", [])
 if "userinfo" not in meta:
-meta = set(meta + ['userinfo'])
+meta.append('userinfo')
 self._params['meta'] = list(meta)
 uiprop = self._params.get("uiprop", [])
-uiprop = set(uiprop + ["blockinfo", "hasmsg"])
+if 'blockinfo' not in uiprop:
+uiprop.append('blockinfo')
+if 'hasmsg' not in uiprop:
+uiprop.append('hasmsg')
 self._params["uiprop"] = list(sorted(uiprop))
 if 'prop' in self._params:
 if self.site.has_extension('ProofreadPage'):
-prop = set(self._params['prop'] + ['proofread'])
+prop = self._params['prop']
+if 'proofread' not in prop:
+prop.append('proofread')
 self._params['prop'] = list(prop)
 # When neither 'continue' nor 'rawcontinue' is present and the
 # version number is at least 1.25wmf5 we add a dummy rawcontinue
@@ -2322,7 +2327,7 @@
 % (self.__class__.__name__, filename, uniquedescr),
 _logger)
 return True
-except IOError as e:
+except IOError:
 # file not found
 return False
 except Exception as e:

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: sanitarium.my.cnf: Set slave_type_conversions

2017-03-24 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344586 )

Change subject: sanitarium.my.cnf: Set slave_type_conversions
..


sanitarium.my.cnf: Set slave_type_conversions

For the current sanitarium this is not really mandatory, but I prefer to
add it for consistency.

When doing an ALTER table on hosts whose master is running ROW based
replication, and attempting to expand a column, replication can break
with:

Last_SQL_Error: Column 8 of table 'commonswiki.image' cannot be
converted from type 'varchar(32)' to type 'varbinary(100)'

To prevent this we are setting slave_type_conversion to ALL_NON_LOSSY
which would allow the transaction to go on.
The documentation states:
"This mode permits conversions that do not require truncation or other
special handling of the source value; that is, it permits conversions
where the target type has a wider range than the source type.

Setting this mode has no bearing on whether lossy conversions are
permitted; this is controlled with the ALL_LOSSY mode. If only
ALL_NON_LOSSY is set, but not ALL_LOSSY, then attempting a conversion
that would result in the loss of data (such as INT to TINYINT, or
CHAR(25) to VARCHAR(20)) causes the slave to stop with an error."

Bug: T73563
Change-Id: Ib41b345b8bb59c907069998ba17e6764c67f93b6
---
M modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb 
b/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
index 416be66..899ca24 100644
--- a/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
+++ b/modules/role/templates/mariadb/mysqld_config/sanitarium.my.cnf.erb
@@ -41,6 +41,11 @@
 expire_logs_days   = 7
 sql-mode   = IGNORE_BAD_TABLE_OPTIONS
 
+# Needed when using ROW based replication and altering the width of a column, 
if not set, the ALTER will fail
+# 
https://dev.mysql.com/doc/mysql-replication-excerpt/5.7/en/replication-features-different-data-types.html
+# T73563#3117924
+slave_type_conversions = ALL_NON_LOSSY
+
 table_open_cache   = 1
 table_definition_cache = 5
 open-files-limit   = 40

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41b345b8bb59c907069998ba17e6764c67f93b6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Marostegui 
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...BlueSpiceExtensions[master]: PageTemplates: API Unittest

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

Change subject: PageTemplates: API Unittest
..


PageTemplates: API Unittest

Change-Id: I1d1e9f28e0b70945ed67fa4b226c3a717b98dda2
ERM: #5808
---
A PageTemplates/tests/phpunit/BSApiPageTemplatesStoreTest.php
A PageTemplates/tests/phpunit/BSApiPageTemplatesTasksTest.php
2 files changed, 168 insertions(+), 0 deletions(-)

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



diff --git a/PageTemplates/tests/phpunit/BSApiPageTemplatesStoreTest.php 
b/PageTemplates/tests/phpunit/BSApiPageTemplatesStoreTest.php
new file mode 100644
index 000..7d55d69
--- /dev/null
+++ b/PageTemplates/tests/phpunit/BSApiPageTemplatesStoreTest.php
@@ -0,0 +1,73 @@
+ [
+   'type' => 'integer'
+   ],
+   'label' => [
+   'type' => 'string'
+   ],
+   'desc' => [
+   'type' => 'string'
+   ],
+   'targetns' => [
+   'type' => 'string'
+   ],
+   'targetnsid' => [
+   'type' => 'integer'
+   ],
+   'template' => [
+   'type' => 'string'
+   ],
+   'templatename' => [
+   'type' => 'string'
+   ]
+   ];
+   }
+
+   protected function createStoreFixtureData() {
+   new BSPageTemplateFixtures();
+   return 8;
+   }
+
+   protected function getModuleName () {
+   return 'bs-pagetemplates-store';
+   }
+
+   public function provideSingleFilterData () {
+   return [
+   'Filter by label' => [ 'string', 'eq', 'label', 'Test 
01', 1]
+   ];
+   }
+
+   public function provideMultipleFilterData() {
+   return [
+   'Filter by targetnsid and templatename' => [
+   [
+   [
+   'type' => 'integer',
+   'comparison' => 'eq',
+   'field' => 'targetnsid',
+   'value' => NS_FILE
+   ],
+   [
+   'type' => 'string',
+   'comparison' => 'ct',
+   'field' => 'label',
+   'value' => '01'
+   ]
+   ],
+   1
+   ]
+   ];
+   }
+}
+
diff --git a/PageTemplates/tests/phpunit/BSApiPageTemplatesTasksTest.php 
b/PageTemplates/tests/phpunit/BSApiPageTemplatesTasksTest.php
new file mode 100644
index 000..6720a14
--- /dev/null
+++ b/PageTemplates/tests/phpunit/BSApiPageTemplatesTasksTest.php
@@ -0,0 +1,95 @@
+getTokenList( self::$users[ 'sysop' ] );
+   }
+
+   public function testDoEditTemplate() {
+   //add template
+   $oData = $this->executeTask(
+   'doEditTemplate',
+   array(
+   'desc' => 'Dummy template',
+   'label' => 'Dummy 1',
+   'template' => 'Dummy 1 title',
+   'targetns' => NS_FILE
+   )
+   );
+
+   $this->assertTrue( $oData->success );
+
+   $this->assertSelect(
+   'bs_pagetemplate',
+   array( 'pt_id', 'pt_template_title', 
'pt_target_namespace'  ),
+   array( "pt_label = 'Dummy 1'" ),
+   array(  array( 9, 'Dummy 1 title', 6 )  )
+   );
+
+   $iIDAdded = 9;
+
+   //edit template
+   $oData = $this->executeTask(
+   'doEditTemplate',
+   array(
+   'id' => $iIDAdded,
+   'desc' => 'Faux template',
+   'label' => 'Faux 1',
+   'template' => 'Faux 1 title',
+   'targetns' => NS_MAIN
+   )
+   );
+
+   $this->assertTrue( $oData->success );
+
+   $this->assertSelect(
+   'bs_pagetemplate',
+   array( 

[MediaWiki-commits] [Gerrit] integration/config[master]: Enable test browsertest and disable Qunit for WikibaseLexeme

2017-03-24 Thread Jonas Kress (WMDE) (Code Review)
Jonas Kress (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344578 )

Change subject: Enable test browsertest and disable Qunit for WikibaseLexeme
..

Enable test browsertest and disable Qunit for WikibaseLexeme

Bug: T161201
Change-Id: Ia879d978c468893a86c9d76116171e7fb54f6dd2
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/78/344578/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 07cd781..2245103 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7196,12 +7196,11 @@
 template:
   - name: composer-test
   - name: extension-unittests-composer
-  - name: extension-qunit-composer
   - name: npm
 check:
   - jsonlint
   - jshint
-experimental:
+test:
   - mwext-mw-selenium-composer-jessie
 
   - name: mediawiki/extensions/WikibaseQuality

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia879d978c468893a86c9d76116171e7fb54f6dd2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: compiler-update-facts: remove 'trusted:' facts lines

2017-03-24 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344582 )

Change subject: compiler-update-facts: remove 'trusted:' facts lines
..

compiler-update-facts: remove 'trusted:' facts lines

Change-Id: Ia91b98f0177bf2d055f1c8bc4928c7d1c1ebf3ff
---
M modules/puppet_compiler/files/compiler-update-facts
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/344582/1

diff --git a/modules/puppet_compiler/files/compiler-update-facts 
b/modules/puppet_compiler/files/compiler-update-facts
index daed2ae..df6b25b 100755
--- a/modules/puppet_compiler/files/compiler-update-facts
+++ b/modules/puppet_compiler/files/compiler-update-facts
@@ -17,3 +17,5 @@
 --directory /var/lib/catalog-differ/puppet \
 && rm puppet-facts-export.tar.xz'
 ssh $compiler 'sudo chown -R jenkins-deploy:wikidev 
/var/lib/catalog-differ/puppet/yaml'
+ssh $compiler "cd /var/lib/catalog-differ/puppet/yaml/facts && sudo sed -i'' 
'/trusted:/d' *.yaml"
+ssh $compiler "cd /var/lib/catalog-differ/puppet/yaml/node && sudo sed -i'' 
'/trusted:/d' *.yaml"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia91b98f0177bf2d055f1c8bc4928c7d1c1ebf3ff
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::puppet_compiler: fix broken inclusion of a removed class

2017-03-24 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344583 )

Change subject: role::puppet_compiler: fix broken inclusion of a removed class
..

role::puppet_compiler: fix broken inclusion of a removed class

Change-Id: I40d88c2c02115b94b1385d0b879d8a7c38ecb4a5
---
M modules/puppet_compiler/manifests/init.pp
M modules/role/manifests/puppet_compiler.pp
2 files changed, 9 insertions(+), 10 deletions(-)


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

diff --git a/modules/puppet_compiler/manifests/init.pp 
b/modules/puppet_compiler/manifests/init.pp
index 81664bc..e9ee9c3 100644
--- a/modules/puppet_compiler/manifests/init.pp
+++ b/modules/puppet_compiler/manifests/init.pp
@@ -84,18 +84,9 @@
 
 
 # The conftool parser function needs
-#   - the conftool module to be included
-#   - An etcd instance running populated with (fake? synced?) data
+# An etcd instance running populated with (fake? synced?) data
 
 include ::etcd
-
-class { '::conftool':
-use_ssl => false,
-auth=> false,
-hosts   => [
-'http://127.0.0.1:2379',
-],
-}
 
 tidy { "${::puppet_compiler::workdir}/output":
 recurse => true,
diff --git a/modules/role/manifests/puppet_compiler.pp 
b/modules/role/manifests/puppet_compiler.pp
index 98a88e5..0567daa 100644
--- a/modules/role/manifests/puppet_compiler.pp
+++ b/modules/role/manifests/puppet_compiler.pp
@@ -19,4 +19,12 @@
 
 include ::puppet_compiler
 
+# Conftool + etcd are needed for the conftool function to work
+# do not bother with hiera here, for now.
+class { '::profile::conftool::client':
+srv_domain => undef,
+host   => '127.0.0.1',
+port   => 2379,
+namespace  => '/conftool/v1',
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I40d88c2c02115b94b1385d0b879d8a7c38ecb4a5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: role::memcached: convert to use profile::multidc::redis

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

Change subject: role::memcached: convert to use profile::multidc::redis
..


role::memcached: convert to use profile::multidc::redis

Change-Id: I8868d4c597e275003fe1425abc98e7b344a37422
---
M hieradata/role/common/memcached.yaml
M modules/role/manifests/memcached.pp
2 files changed, 18 insertions(+), 58 deletions(-)

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



diff --git a/hieradata/role/common/memcached.yaml 
b/hieradata/role/common/memcached.yaml
index d90a586..13d7452 100644
--- a/hieradata/role/common/memcached.yaml
+++ b/hieradata/role/common/memcached.yaml
@@ -1,3 +1,18 @@
 cluster: memcached
 admin::groups:
   - perf-roots
+profile::redis::multidc::category: sessions
+profile::redis::multidc::discovery: "appservers-rw"
+profile::redis::multidc::settings:
+  bind: '0.0.0.0'
+  auto_aof_rewrite_min_size: '512mb'
+  client_output_buffer_limit: 'slave 512mb 200mb 60'
+  dir: '/srv/redis'
+  maxmemory: '500Mb'
+  maxmemory_policy: 'volatile-lru'
+  maxmemory_samples: 5
+  no_appendfsync_on_rewrite: true
+  save: '300 100'
+  slave_read_only: false
+  stop_writes_on_bgsave_error: false
+profile::redis::multidc::aof: false
diff --git a/modules/role/manifests/memcached.pp 
b/modules/role/manifests/memcached.pp
index dfaab0b..926525c 100644
--- a/modules/role/manifests/memcached.pp
+++ b/modules/role/manifests/memcached.pp
@@ -82,64 +82,6 @@
 minute  => fqdn_rand(59, 'memkeys'),
 }
 
-
-$base_settings = {
-bind=> '0.0.0.0',
-auto_aof_rewrite_min_size   => '512mb',
-client_output_buffer_limit  => 'slave 512mb 200mb 60',
-dir => '/srv/redis',
-dbfilename  => "${::hostname}-6379.rdb",
-masterauth  => $passwords::redis::main_password,
-maxmemory   => '500Mb',
-maxmemory_policy=> 'volatile-lru',
-maxmemory_samples   => 5,
-no_appendfsync_on_rewrite   => true,
-requirepass => $passwords::redis::main_password,
-save=> '300 100',
-slave_read_only => false,
-stop_writes_on_bgsave_error => false,
-}
-
-$shards = {
-'eqiad' => hiera('mediawiki::redis_servers::eqiad'),
-'codfw' => hiera('mediawiki::redis_servers::codfw')
-}
-
-if os_version('Debian >= jessie') {
-class { 'redis::multidc::ipsec':
-shards => $shards
-}
-}
-
-class { 'redis::multidc::instances':
-shards   => $shards,
-settings => $base_settings,
-map  => {
-'6380' => {
-dbfilename => "${::hostname}-6380.rdb",
-}
-}
-}
-
-
-# Monitoring
-
-# Declare monitoring for all redis instances
-redis::monitoring::instance { $::redis::multidc::instances::instances:
-settings => $base_settings,
-map  => $::redis::multidc::instances::replica_map,
-}
-
-# Firewall rules
-include ::ferm::ipsec_allow
-
-$redis_ports = join($::redis::multidc::instances::instances, ' ')
-
-ferm::service { 'redis_memcached_role':
-proto => 'tcp',
-port  => inline_template('(<%= @redis_ports %>)'),
-}
-
 ferm::service { 'memcached_memcached_role':
 proto => 'tcp',
 port  => '11211',
@@ -149,4 +91,7 @@
 content  => template('role/memcached/rsyslog.conf.erb'),
 priority => 40,
 }
+
+# Include redis for sessions
+include profile::redis::multidc
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8868d4c597e275003fe1425abc98e7b344a37422
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiEditor[master]: Replace deprecated jQuery .bind() by .on()

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

Change subject: Replace deprecated jQuery .bind() by .on()
..


Replace deprecated jQuery .bind() by .on()

jQuery .bind() is deprecated since jQuery 3.0.
https://api.jquery.com/bind/

Change-Id: Ibbcfbefe2983b2ed2e3b110518c16539cbb84d88
---
M modules/jquery.wikiEditor.dialogs.js
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/jquery.wikiEditor.dialogs.js 
b/modules/jquery.wikiEditor.dialogs.js
index 168a497..23d82f8 100644
--- a/modules/jquery.wikiEditor.dialogs.js
+++ b/modules/jquery.wikiEditor.dialogs.js
@@ -165,13 +165,13 @@
.find( 'button' ).not( '[tabindex]' ) );
if ( !( 'resizeme' in module ) || 
module.resizeme ) {
$dialogDiv
-   .bind( 'dialogopen', 
$.wikiEditor.modules.dialogs.fn.resize )
-   .find( '.ui-tabs' ).bind( 
'tabsshow', function () {
+   .on( 'dialogopen', 
$.wikiEditor.modules.dialogs.fn.resize )
+   .find( '.ui-tabs' ).on( 
'tabsshow', function () {
$( this ).closest( 
'.ui-dialog-content' ).each(

$.wikiEditor.modules.dialogs.fn.resize );
} );
}
-   $dialogDiv.bind( 'dialogclose', function () {
+   $dialogDiv.on( 'dialogclose', function () {
context.fn.restoreSelection();
} );
 
@@ -182,7 +182,7 @@
/**
 * Resize a dialog so its contents fit
 *
-* Usage: dialog.each( resize ); or dialog.bind( 
'blah', resize );
+* Usage: dialog.each( resize ); or dialog.on( 'blah', 
resize );
 * NOTE: This function assumes $.ui.dialog has already 
been loaded
 */
resize: function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbcfbefe2983b2ed2e3b110518c16539cbb84d88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikiEditor
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: TheDJ 
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...BlueSpiceSkin[REL1_27]: BSES integration: Color for "Create page" menu item

2017-03-24 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344594 )

Change subject: BSES integration: Color for "Create page" menu item
..

BSES integration: Color for "Create page" menu item

See ERM5940

Change-Id: Id6d51d6fe5c50bb1e6d0f9697e354f0b6b66943f
---
M resources/components/extension.extendedSearch.less
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/94/344594/1

diff --git a/resources/components/extension.extendedSearch.less 
b/resources/components/extension.extendedSearch.less
index 2f715c1..2181b0c 100644
--- a/resources/components/extension.extendedSearch.less
+++ b/resources/components/extension.extendedSearch.less
@@ -22,6 +22,9 @@
width: 337px !important;
li.ui-menu-item a{
padding: 5px 10px;
+   &.ui-state-focus {
+   background-image: none;
+   }
}
li.ui-menu-item a{
margin: 0;
@@ -29,8 +32,8 @@
li.ui-menu-item a:hover{
background-color: @bs-color-light-grey;
}
-   li.bs-extendedsearch-suggest.ui-menu-item,
-   li.bs-extendedsearch-ac-noresults.ui-menu-item{
+   li.bs-extendedsearch-create.ui-menu-item,
+   li.bs-extendedsearch-ac-noresults.ui-menu-item {
background-color: @bs-color-middle-blue;
color: @bs-color-dark-blue;
b{

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6d51d6fe5c50bb1e6d0f9697e354f0b6b66943f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: use Bootstrap 3

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340963 )

Change subject: use Bootstrap 3
..


use Bootstrap 3

The Bootstrap extension has been added as dependency, in order to
make the MOOC interface layout work as intended.
The README file has been updated to reflect this new dependency.
The content handler adds the Bootstrap styles on MOOC pages.

Change-Id: Ia31477ab511a75799f828097d69e99fab9123ea9
---
M MOOC.php
M README.md
M composer.json
M includes/content/MoocContent.php
4 files changed, 6 insertions(+), 4 deletions(-)



diff --git a/MOOC.php b/MOOC.php
index 18eccb9..82f3121 100644
--- a/MOOC.php
+++ b/MOOC.php
@@ -11,7 +11,6 @@
 $wgExtensionMessagesFiles['MOOCAlias'] = __DIR__ . '/MOOC.i18n.alias.php';
 $wgExtensionMessagesFiles['MOOCNamespaces'] = __DIR__ . 
'/MOOC.namespaces.php';
 
-// TODO how to include boostrap other than shipping => composer?!
 // TODO get out how to include jquery.ui.effects (includes easing) other 
than shipping
 
 $wgMOOCSectionConfig = [
diff --git a/README.md b/README.md
index 5735856..b442914 100644
--- a/README.md
+++ b/README.md
@@ -6,8 +6,9 @@
 ## Installation
 
 1. install the dependencies
-   * [MwEmbedSupport](https://www.mediawiki.org/wiki/Extension:MwEmbedSupport)
-   * 
[TimedMediaHandler](https://www.mediawiki.org/wiki/Extension:TimedMediaHandler)
+   * 
[TimedMediaHandler](https://www.mediawiki.org/wiki/Extension:TimedMediaHandler) 
with its dependency 
[MwEmbedSupport](https://www.mediawiki.org/wiki/Extension:MwEmbedSupport)
+   (this is no real dependecy but necessary to embed e.g. videos - as intended 
by the MOOC extension)
+   * [Bootstrap](https://www.mediawiki.org/wiki/Extension:Bootstrap) to get 
the proper interface layout
 1. and additionally append the following line to your *LocalSettings.php*:
`require_once "$IP/extensions/MOOC/MOOC.php";`
 
diff --git a/composer.json b/composer.json
index 0031b26..879277f 100644
--- a/composer.json
+++ b/composer.json
@@ -14,6 +14,7 @@
   },
   "require": {
"php": ">=5.6",
-   "composer/installers": "~1.0"
+   "composer/installers": ">1.0.12",
+   "mediawiki/bootstrap": "~1.1"
   }
 }
diff --git a/includes/content/MoocContent.php b/includes/content/MoocContent.php
index fc5d17f..3fd7510 100644
--- a/includes/content/MoocContent.php
+++ b/includes/content/MoocContent.php
@@ -82,6 +82,7 @@
 $output->setEnableOOUI( true );
 $output->addModuleScripts( 'ext.mooc' );
 $output->addModuleStyles( 'ext.mooc' );
+$output->addModuleStyles( 'ext.bootstrap.styles' );
 
 $output->setText( MoocContentRenderer::renderItem( $output, 
$this->entity ) );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia31477ab511a75799f828097d69e99fab9123ea9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MOOC
Gerrit-Branch: master
Gerrit-Owner: Sebschlicht2 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Sebschlicht2 
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...MOOC[master]: make composer.json valid and useful

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340967 )

Change subject: make composer.json valid and useful
..


make composer.json valid and useful

The composer.json has been marked as invalid by the Jenkins bot,
due to the usage of german Umlaute. They have been removed and
common fields have been added, in order to make the file more
useful for others.
In this context the extension license has been consistently set to
GPL 3.0+.

Change-Id: I5a2e49276f468ca87311f0ae4b02a2f03e0bb667
---
M composer.json
M extension.json
2 files changed, 33 insertions(+), 2 deletions(-)

Objections:
  Sebschlicht: There's a problem with this change, please improve



diff --git a/composer.json b/composer.json
index 879277f..fd2d565 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,33 @@
 {
-  "name": "Universität Koblenz-Landau/mooc",
+  "name": "Universitaet_Koblenz-Landau/mooc",
   "type": "mediawiki-extension",
+  "description": "Provides the MOOC interface to create, maintain and use 
Massive Open Online Courses",
+  "keywords"   : [
+"wiki",
+"MediaWiki",
+"extension",
+"MOOC",
+"Bootstrap"
+  ],
+  "homepage"   : "https://www.mediawiki.org/wiki/Extension:MOOC;,
+  "license": "GPL-3.0+",
+  "authors": [
+{
+  "name" : "Sebastian Schlicht",
+  "email": "sebast...@jablab.de",
+  "role" : "Developer"
+},
+{
+  "name" : "René Pickhardt",
+  "role" : "Manager"
+}
+  ],
+  "support": {
+"wiki"  : "https://www.mediawiki.org/wiki/Extension:MOOC;,
+"forum" : "https://www.mediawiki.org/wiki/Extension_talk:MOOC;,
+"source": "https://github.com/wikimedia/mediawiki-extensions-MOOC;,
+"issues": "https://phabricator.wikimedia.org/tag/mooc-interface/;
+  },
   "require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"mediawiki/mediawiki-codesniffer": "0.6.0"
@@ -16,5 +43,9 @@
"php": ">=5.6",
"composer/installers": ">1.0.12",
"mediawiki/bootstrap": "~1.1"
+  },
+  "config": {
+"optimize-autoloader": true,
+"prepend-autoloader": false
   }
 }
diff --git a/extension.json b/extension.json
index 36590ff..a972c68 100644
--- a/extension.json
+++ b/extension.json
@@ -7,7 +7,7 @@
   ],
   "url": 
"https://gerrit.wikimedia.org/r/#/admin/projects/mediawiki/extensions/MOOC;,
   "descriptionmsg": "mooc-desc",
-  "license-name": "GPL-2.0",
+  "license-name": "GPL-3.0+",
   "type": "other",
   "AutoloadClasses": {
 "MOOCHooks": "MOOC.hooks.php",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5a2e49276f468ca87311f0ae4b02a2f03e0bb667
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/MOOC
Gerrit-Branch: master
Gerrit-Owner: Sebschlicht2 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Sebschlicht 
Gerrit-Reviewer: Sebschlicht2 
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...Wikibase[wmf/1.29.0-wmf.17]: Change bad ASCII to UTF-8 validation in terms/value validators

2017-03-24 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344599 )

Change subject: Change bad ASCII to UTF-8 validation in terms/value validators
..

Change bad ASCII to UTF-8 validation in terms/value validators

We need to BACKPORT this. Not necesarrily the tests. I also believe the
changes to ValidatorBuilders are not deployed yet. So the only file that
needs backporting is TermValidatorFactory.

Bug: T161263
Change-Id: If129df5364afd03848d40658f605923d252e4a69
---
M repo/includes/ValidatorBuilders.php
M repo/includes/Validators/TermValidatorFactory.php
M repo/tests/phpunit/includes/ValidatorBuildersTest.php
M repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
4 files changed, 166 insertions(+), 3 deletions(-)


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

diff --git a/repo/includes/ValidatorBuilders.php 
b/repo/includes/ValidatorBuilders.php
index 31e3e91..9e193e2 100644
--- a/repo/includes/ValidatorBuilders.php
+++ b/repo/includes/ValidatorBuilders.php
@@ -176,7 +176,7 @@
$validators[] = new TypeValidator( 'string' );
//TODO: validate UTF8 (here and elsewhere)
$validators[] = new StringLengthValidator( 1, $maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\r\n\t]|\s$/', true 
); // no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\r\n\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/includes/Validators/TermValidatorFactory.php 
b/repo/includes/Validators/TermValidatorFactory.php
index 3fa10c3..1cc80e7 100644
--- a/repo/includes/Validators/TermValidatorFactory.php
+++ b/repo/includes/Validators/TermValidatorFactory.php
@@ -128,7 +128,7 @@
$validators = array();
$validators[] = new TypeValidator( 'string' );
$validators[] = new StringLengthValidator( 1, $this->maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/tests/phpunit/includes/ValidatorBuildersTest.php 
b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
index b87a7d3..25f817f 100644
--- a/repo/tests/phpunit/includes/ValidatorBuildersTest.php
+++ b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
@@ -187,6 +187,168 @@
$this->assertValidation( $expected, $validators, $value );
}
 
+   public function provideGlobeCoordinateValueValidation() {
+   $wikidataUri = 'http://www.wikidata.org/entity/';
+
+   return [
+   'Integer precision is valid' => [ 1, $wikidataUri . 
'Q2', true ],
+   'Float precision is valid' => [ 0.2, $wikidataUri . 
'Q2', true ],
+   'Null precision is invalid' => [ null, $wikidataUri . 
'Q2', false ],
+
+   // FIXME: This is testing unimplemented behaviour? 
Probably broken...
+   'Globe should not be empty' => [ 1, '', false ],
+   'Globe too long' => [ 1, $wikidataUri . 'Q' . 
str_repeat( '6', 224 ), false ],
+   'Valid globe' => [ 1, $wikidataUri . 'Q2', true ],
+   'Untrimmed globe' => [ 1, ' ' . $wikidataUri . 'Q2 ', 
false ],
+   'Bad URL scheme' => [ 1, ' javascript:alert(1) ', false 
],
+
+   // TODO: Globe must be an item reference
+   // TODO: Globe must be from a list of configured values
+   ];
+   }
+
+   /**
+* @dataProvider provideGlobeCoordinateValueValidation
+*/
+   public function testGlobeCoordinateValueValidation( $precision, $globe, 
$expected ) {
+   $value = new GlobeCoordinateValue( new LatLongValue( 0, 0 ), 
$precision, $globe );
+   $validators = 
$this->newValidatorBuilders()->buildCoordinateValidators();
+
+   $this->assertValidation( $expected, $validators, $value );
+   }
+
+   public function provideStringValueValidation() {
+   return [
+   'Space' => [ 'x x', true ],
+   'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
+
+   // Length checks
+   'To short' => [ '', false ],
+   'Minimum length' => [ 'x', true ],
+   'Maximum length' => [ str_repeat( 'x', 400 ), true ],
+   'Too long' => [ str_repeat( 'x', 401 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Remove old remapping hacks from Database::indexName()"

2017-03-24 Thread Reedy (Code Review)
Hello Aaron Schulz, Brian Wolff, jenkins-bot,

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

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

to review the following change.


Change subject: Revert "Remove old remapping hacks from Database::indexName()"
..

Revert "Remove old remapping hacks from Database::indexName()"

This reverts commit bec6151e5fe30e780d82527c4c53e54379149a4e.

Change-Id: I1c67aa464a1f151562ef92fce03f825113847814
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabaseSqlite.php
2 files changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/344601/1

diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index 4f663b3..7e80221 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1981,7 +1981,18 @@
 * @return string
 */
protected function indexName( $index ) {
-   return $index;
+   // Backwards-compatibility hack
+   $renamed = [
+   'ar_usertext_timestamp' => 'usertext_timestamp',
+   'un_user_id' => 'user_id',
+   'un_user_ip' => 'user_ip',
+   ];
+
+   if ( isset( $renamed[$index] ) ) {
+   return $renamed[$index];
+   } else {
+   return $index;
+   }
}
 
public function addQuotes( $s ) {
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index f201dad..2281f23 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -427,6 +427,16 @@
}
 
/**
+* Index names have DB scope
+*
+* @param string $index
+* @return string
+*/
+   protected function indexName( $index ) {
+   return $index;
+   }
+
+   /**
 * This must be called after nextSequenceVal
 *
 * @return int

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c67aa464a1f151562ef92fce03f825113847814
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Repool db1056

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

Change subject: db-eqiad.php: Repool db1056
..


db-eqiad.php: Repool db1056

db1056 finished the alter table

Bug: T73563
Bug: T160415
Change-Id: I85ae8971da4740d0280ba37b26fd1001479f0992
---
M wmf-config/db-eqiad.php
1 file changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 99b2272..56e4469 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
's4' => [
'db1040' => 0,   # B2 1.4TB  64GB, master
'db1053' => 1,   # A2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager T160415 T73563
+   'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1059' => 1,   # C2 2.8TB  96GB, api
'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1068' => 1,   # D1 2.8TB 160GB, api
@@ -332,23 +332,23 @@
],
'watchlist' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'recentchanges' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'recentchangeslinked' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'contributions' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'logpager' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
],
's5' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85ae8971da4740d0280ba37b26fd1001479f0992
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Marostegui 
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]: aptrepo: add post-2015 HP MCP public key

2017-03-24 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344595 )

Change subject: aptrepo: add post-2015 HP MCP public key
..

aptrepo: add post-2015 HP MCP public key

https://downloads.linux.hpe.com/SDR/keys.html

Change-Id: I4ed063ec2902d66d9e6626fea718d7591f602593
---
M modules/aptrepo/files/updates
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/95/344595/1

diff --git a/modules/aptrepo/files/updates b/modules/aptrepo/files/updates
index bbe6ef5..5a0cb4f 100644
--- a/modules/aptrepo/files/updates
+++ b/modules/aptrepo/files/updates
@@ -43,7 +43,7 @@
 GetInRelease: no
 Suite: precise/current
 Architectures: amd64
-VerifyRelease: FADD8D64B1275EA3
+VerifyRelease: FADD8D64B1275EA3|C208ADDE26C2B797
 ListShellHook: grep-dctrl -e -S 
'^hp-health|hpssa|hpssacli|hpssaducli|hpacucli$' || [ $? -eq 1 ]
 
 Name: hp-mcp-trusty
@@ -53,7 +53,7 @@
 GetInRelease: no
 Suite: trusty/current
 Architectures: amd64
-VerifyRelease: FADD8D64B1275EA3
+VerifyRelease: FADD8D64B1275EA3|C208ADDE26C2B797
 ListShellHook: grep-dctrl -e -S 
'^hp-health|hpssa|hpssacli|hpssaducli|hpacucli$' || [ $? -eq 1 ]
 
 Name: hp-mcp-jessie
@@ -63,7 +63,7 @@
 GetInRelease: no
 Suite: jessie/current
 Architectures: amd64
-VerifyRelease: FADD8D64B1275EA3
+VerifyRelease: FADD8D64B1275EA3|C208ADDE26C2B797
 ListShellHook: grep-dctrl -e -S 
'^hp-health|hpssa|hpssacli|hpssaducli|hpacucli$' || [ $? -eq 1 ]
 
 Name: cassandra

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ed063ec2902d66d9e6626fea718d7591f602593
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi 

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


[MediaWiki-commits] [Gerrit] operations...linux44[master]: Bump ABI to 4

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344591 )

Change subject: Bump ABI to 4
..


Bump ABI to 4

Change-Id: If86f74535828a17864759a7907caff773d0f0355
---
M debian/config.defines.dump
M debian/config/defines
M debian/control
M debian/control.md5sum
M debian/rules.gen
M debian/tests/control
6 files changed, 5,188 insertions(+), 5,188 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: If86f74535828a17864759a7907caff773d0f0355
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/linux44
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Muehlenhoff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: base::expose_puppet_certs: Also provide a keypair

2017-03-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344603 )

Change subject: base::expose_puppet_certs: Also provide a keypair
..

base::expose_puppet_certs: Also provide a keypair

Expose a keypair from base::expose_puppet_certs for applications like
bacula that require such an item for operations

Bug: T161281
Change-Id: Ie8a661301bd3bd466e35576d3396e47c4a2dbaea
---
M modules/base/manifests/expose_puppet_certs.pp
1 file changed, 33 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/344603/1

diff --git a/modules/base/manifests/expose_puppet_certs.pp 
b/modules/base/manifests/expose_puppet_certs.pp
index f4c4e68..8fd8b32 100644
--- a/modules/base/manifests/expose_puppet_certs.pp
+++ b/modules/base/manifests/expose_puppet_certs.pp
@@ -12,19 +12,27 @@
 #
 # [*ensure*]
 #   If 'present', certificates will be exposed, otherwise they will be removed.
+#   Defaults to true
 #
 # [*provide_private*]
-#   Should the private keys also be exposed?
+#   Should the private keys also be exposed? Defaults to false
+#
+# [*provide_keypair*]
+#   Should the single file containing concatenated the private key and the cert
+#   be exposed? The order is [key, cert] Defaults to false. Unrelated to
+#   provide_private parameter
 #
 # [*user/group*]
-#   User who will own the exposed SSL certificates.
+#   User who will own the exposed SSL certificates. Default to root
 #
 # [*ssldir*]
-#   The source directory containing the original SSL certificates.
+#   The source directory containing the original SSL certificates. Avoid
+#   supplying this unless you know what you are doing
 #
 define base::expose_puppet_certs(
 $ensure  = 'present',
 $provide_private = false,
+$provide_keypair = false,
 $user= 'root',
 $group   = 'root',
 $ssldir  = puppet_ssldir(),
@@ -50,6 +58,7 @@
 source => "${ssldir}/certs/${puppet_cert_name}.pem",
 }
 
+# Provide the private key
 $private_key_ensure = $ensure ? {
 'present' => $provide_private ? {
 true=> 'present',
@@ -57,10 +66,30 @@
 },
 default => 'absent',
 }
-
 file { "${target_basedir}/ssl/server.key":
 ensure => $private_key_ensure,
 mode   => '0400',
 source => "${ssldir}/private_keys/${puppet_cert_name}.pem",
 }
+
+# Provide a keypair of key and cert concatenated. The file resource is used
+# to ensure file attributes/presence and the exec resource the contents
+$keypair_ensure = $ensure ? {
+'present' => $provide_keypair ? {
+true=> 'present',
+default => 'absent',
+},
+default => 'absent',
+}
+file { "${target_basedir}/ssl/server-keypair.pem":
+ensure => $keypair_ensure,
+mode   => '0400',
+}
+exec { "create-${title}-keypair":
+creates => "${target_basedir}/ssl/server-keypair.pem",
+command => "/bin/cat \
+ ${ssldir}/private_keys/${puppet_cert_name}.pem \
+ ${ssldir}/certs/${puppet_cert_name}.pem \
+> ${target_basedir}/ssl/server-keypair.pem",
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie8a661301bd3bd466e35576d3396e47c4a2dbaea
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Enable test browsertest and disable Qunit for WikibaseLexeme

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

Change subject: Enable test browsertest and disable Qunit for WikibaseLexeme
..


Enable test browsertest and disable Qunit for WikibaseLexeme

Bug: T161201
Change-Id: Ia879d978c468893a86c9d76116171e7fb54f6dd2
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Hashar: Looks good to me, approved
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 07cd781..2245103 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7196,12 +7196,11 @@
 template:
   - name: composer-test
   - name: extension-unittests-composer
-  - name: extension-qunit-composer
   - name: npm
 check:
   - jsonlint
   - jshint
-experimental:
+test:
   - mwext-mw-selenium-composer-jessie
 
   - name: mediawiki/extensions/WikibaseQuality

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia879d978c468893a86c9d76116171e7fb54f6dd2
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[wmf/1.29.0-wmf.17]: Change bad ASCII to UTF-8 validation in terms/value validators

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

Change subject: Change bad ASCII to UTF-8 validation in terms/value validators
..


Change bad ASCII to UTF-8 validation in terms/value validators

We need to BACKPORT this. Not necesarrily the tests. I also believe the
changes to ValidatorBuilders are not deployed yet. So the only file that
needs backporting is TermValidatorFactory.

Bug: T161263
Change-Id: If129df5364afd03848d40658f605923d252e4a69
---
M repo/includes/ValidatorBuilders.php
M repo/includes/Validators/TermValidatorFactory.php
M repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
3 files changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Ladsgroup: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git a/repo/includes/ValidatorBuilders.php 
b/repo/includes/ValidatorBuilders.php
index 31e3e91..9e193e2 100644
--- a/repo/includes/ValidatorBuilders.php
+++ b/repo/includes/ValidatorBuilders.php
@@ -176,7 +176,7 @@
$validators[] = new TypeValidator( 'string' );
//TODO: validate UTF8 (here and elsewhere)
$validators[] = new StringLengthValidator( 1, $maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\r\n\t]|\s$/', true 
); // no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\r\n\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/includes/Validators/TermValidatorFactory.php 
b/repo/includes/Validators/TermValidatorFactory.php
index 3fa10c3..1cc80e7 100644
--- a/repo/includes/Validators/TermValidatorFactory.php
+++ b/repo/includes/Validators/TermValidatorFactory.php
@@ -128,7 +128,7 @@
$validators = array();
$validators[] = new TypeValidator( 'string' );
$validators[] = new StringLengthValidator( 1, $this->maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git 
a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php 
b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
index ae513b5..5214e38 100644
--- a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
+++ b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
@@ -111,6 +111,7 @@
return [
'Space' => [ 'x x', true ],
'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
 
// Length checks
'To short' => [ '', false ],
@@ -130,7 +131,7 @@
'U+000B: Vertical tab' => [ "x\x0Bx", false ],
'U+000C: Form feed' => [ "x\fx", false ],
'U+000D: Return' => [ "x\rx", false ],
-   'U+0085: Next line' => [ "x\x85x", false ],
+   'U+0085: Next line' => [ "x\xC2\x85x", false ],
];
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If129df5364afd03848d40658f605923d252e4a69
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.29.0-wmf.17
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations...linux44[master]: Bump ABI to 4

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344591 )

Change subject: Bump ABI to 4
..

Bump ABI to 4

Change-Id: If86f74535828a17864759a7907caff773d0f0355
---
M debian/config.defines.dump
M debian/config/defines
M debian/control
M debian/control.md5sum
M debian/rules.gen
M debian/tests/control
6 files changed, 5,188 insertions(+), 5,188 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/linux44 
refs/changes/91/344591/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If86f74535828a17864759a7907caff773d0f0355
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/linux44
Gerrit-Branch: master
Gerrit-Owner: Muehlenhoff 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: ForeignStructuredUpload.BookletLayout: Use CategorySelectorW...

2017-03-24 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344592 )

Change subject: ForeignStructuredUpload.BookletLayout: Use 
CategorySelectorWidget
..

ForeignStructuredUpload.BookletLayout: Use CategorySelectorWidget

...instead of CategorySelector

Bug: T161285
Change-Id: Icd9bb162caa63c5a43f90e31818fc1432c6d66be
---
M resources/Resources.php
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
2 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/92/344592/1

diff --git a/resources/Resources.php b/resources/Resources.php
index bbc1908..1ce9f99 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1307,7 +1307,7 @@
'dependencies' => [
'mediawiki.ForeignStructuredUpload',
'mediawiki.Upload.BookletLayout',
-   'mediawiki.widgets.CategorySelector',
+   'mediawiki.widgets.CategorySelectorWidget',
'mediawiki.widgets.DateInputWidget',
'mediawiki.jqueryMsg',
'mediawiki.api.messages',
diff --git 
a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
index f2b6f5f..9d505e3 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.BookletLayout.js
@@ -46,11 +46,11 @@
return 
mw.ForeignStructuredUpload.BookletLayout.parent.prototype.initialize.call( this 
).then(
function () {
return $.when(
-   // Point the CategorySelector to the 
right wiki
+   // Point the CategorySelectorWidget to 
the right wiki
booklet.upload.getApi().then( function 
( api ) {
// If this is a ForeignApi, it 
will have a apiUrl, otherwise we don't need to do anything
if ( api.apiUrl ) {
-   // Can't reuse the same 
object, CategorySelector calls #abort on its mw.Api instance
+   // Can't reuse the same 
object, CategorySelectorWidget calls #abort on its mw.Api instance

booklet.categoriesWidget.api = new mw.ForeignApi( api.apiUrl );
}
return $.Deferred().resolve();
@@ -242,7 +242,7 @@
multiline: true,
autosize: true
} );
-   this.categoriesWidget = new mw.widgets.CategorySelector( {
+   this.categoriesWidget = new mw.widgets.CategorySelectorWidget( {
// Can't be done here because we don't know the target 
wiki yet... done in #initialize.
// api: new mw.ForeignApi( ... ),
$overlay: this.$overlay

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: code cleanUp

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342645 )

Change subject: code cleanUp
..


code cleanUp

The code structure of the renderers has been cleaned up.
Spacing has globally been updated to match the Mediawiki styleguide and
open TODOs have been solved, where quickfixes were possible.
Code sections have been added to the renderers, alongside with
missing PHPDoc. Constants have been used where available.

Change-Id: If810f06fd962bcc7f15593d157af7253e1b2ac50
---
M includes/content/MoocContent.php
M includes/content/MoocContentHandler.php
M includes/model/MoocItem.php
M includes/model/MoocLesson.php
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M includes/structure/MoocContentStructureProvider.php
M resources/js/ext.mooc.edit.js
M resources/js/ext.mooc.headers.js
M resources/js/ext.mooc.js
M resources/js/ext.mooc.navigation.js
M resources/less/ext.mooc.less
13 files changed, 469 insertions(+), 378 deletions(-)



diff --git a/includes/content/MoocContent.php b/includes/content/MoocContent.php
index 9a82091..aefb7dc 100644
--- a/includes/content/MoocContent.php
+++ b/includes/content/MoocContent.php
@@ -24,8 +24,8 @@
  * @param string $text MOOC entity JSON
  * @param string $modelId identifier of the page's content model
  */
-public function __construct($text, $modelId = 
self::CONTENT_MODEL_MOOC_ITEM) {
-parent::__construct($text, $modelId);
+public function __construct( $text, $modelId = 
self::CONTENT_MODEL_MOOC_ITEM ) {
+parent::__construct( $text, $modelId );
 }
 
 /**
@@ -45,9 +45,9 @@
  */
 public function isValid() {
 // check for valid JSON
-if (parent::isValid()) {
+if ( parent::isValid() ) {
 // load MOOC entity if not loaded yet
-if (!isset($this->entity)) {
+if ( !isset( $this->entity ) ) {
 $this->entity = $this->loadItem();
 }
 return ( $this->entity != null );
@@ -64,8 +64,8 @@
  * @param bool $generateHtml
  * @param ParserOutput $output
  */
-protected function fillParserOutput(Title $title, $revId, ParserOptions 
$options, $generateHtml, 
-ParserOutput &$output) {
+protected function fillParserOutput( Title $title, $revId, ParserOptions 
$options, $generateHtml,
+ParserOutput &$output ) {
 // FIXME: WikiPage::doEditContent generates parser output before 
validation.
 // As such, native data may be invalid (though output is discarded 
later in that case).
 if ( $generateHtml && $this->isValid() ) {
@@ -91,7 +91,7 @@
 $bootstrapManager->addAllBootstrapModules();
 $output->addModuleStyles( 'ext.bootstrap.styles' );
 
-$output->setText( MoocContentRenderer::renderItem( $output, 
$this->entity ) );
+MoocContentRenderer::renderItem( $output, $this->entity );
 
 // pass data to JS
 $output->addJsConfigVars( [
diff --git a/includes/content/MoocContentHandler.php 
b/includes/content/MoocContentHandler.php
index 0ac1ae1..809a649 100644
--- a/includes/content/MoocContentHandler.php
+++ b/includes/content/MoocContentHandler.php
@@ -13,10 +13,10 @@
 /**
  * @param string $modelId identifier of the page's content model
  */
-public function __construct($modelId = 
MoocContent::CONTENT_MODEL_MOOC_ITEM) {
-parent::__construct($modelId, [
+public function __construct( $modelId = 
MoocContent::CONTENT_MODEL_MOOC_ITEM ) {
+parent::__construct( $modelId, [
 'CONTENT_FORMAT_JSON'
-]);
+] );
 }
 
 /**
diff --git a/includes/model/MoocItem.php b/includes/model/MoocItem.php
index 09fa62a..120cb86 100644
--- a/includes/model/MoocItem.php
+++ b/includes/model/MoocItem.php
@@ -78,7 +78,7 @@
 public $furtherReading;
 
 /**
- * @var MoocItem[] child items
+ * @var MoocUnit[]|MoocLesson[] child items
  */
 public $children;
 
diff --git a/includes/model/MoocLesson.php b/includes/model/MoocLesson.php
index 21bc55b..2088d23 100644
--- a/includes/model/MoocLesson.php
+++ b/includes/model/MoocLesson.php
@@ -18,7 +18,7 @@
 parent::__construct( self::ENTITY_TYPE_LESSON, $title );
 }
 
-protected function loadJson($jsonArray) {
+protected function loadJson( $jsonArray ) {
 parent::loadJson( $jsonArray );
 
 // child units
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index bc8b4c6..f5f273a 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -50,14 +50,13 @@
 protected $out;
 
 /**
- * @var MoocItem MOOC item being rendered
+ * @var 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: Item Navigation

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344587 )

Change subject: Item Navigation
..


Item Navigation

For a better overview for users, this change introduces the item
navigation as known from the prototype.
It is a small additional navigation bar placed above the sections
and their sticky headers to quickly switch between them.
JS code and style directives have been added. Item models now
communicate their active sections in order to generate both the new
item navigation and the sections.

Change-Id: Id93544c14e0aa19304d169bed7d64eed1e4695d2
---
M extension.json
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M includes/rendering/MoocUnitRenderer.php
M resources/js/ext.mooc.headers.js
A resources/js/ext.mooc.itemnav.js
M resources/js/ext.mooc.js
M resources/less/ext.mooc.less
9 files changed, 291 insertions(+), 72 deletions(-)



diff --git a/extension.json b/extension.json
index 002ccb3..9de9502 100644
--- a/extension.json
+++ b/extension.json
@@ -78,6 +78,7 @@
   "scripts": [
 "resources/js/ext.mooc.js",
 "resources/js/ext.mooc.navigation.js",
+"resources/js/ext.mooc.itemnav.js",
 "resources/js/ext.mooc.headers.js",
 "resources/js/ext.mooc.edit.js",
 "resources/js/jquery-ui.min.js"
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index 4aa980f..6734053 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -123,6 +123,8 @@
 
 // ## sections
 $this->out->addHTML( '' );
+// ### item navigation
+$this->addItemNavigation();
 $this->addSections();
 $this->out->addHTML( '' );
 
@@ -146,13 +148,69 @@
 // 
 
 /**
+ * Identifies the active sections of a certain item (type).
+ *
+ * @return array identifiers of the item's sections
+ */
+abstract protected function getSections();
+
+protected function addItemNavigation() {
+$this->out->addHTML( '' );
+$this->out->addHTML( '' );
+foreach ( $this->getSections() as $sectionId ) {
+$sectionTitle = $this->loadMessage( "section-$sectionId-title" );
+$this->out->addHTML( "" );
+$this->addSectionIcon( $sectionId );
+$this->out->addHTML( "$sectionTitle" );
+$this->out->addHTML( '' );
+}
+$this->out->addHTML( '' );
+$this->out->addHTML( '' );
+}
+
+/**
  * Adds the sections of the MOOC item to the current output.
  */
-abstract protected function addSections();
+protected function addSections() {
+foreach ( $this->getSections() as $sectionId ) {
+$this->beginSection( $sectionId );
+$this->addSection( $sectionId );
+$this->endSection();
+}
+}
+
+/**
+ * @param $sectionId string section identifier
+ */
+protected function addSection( $sectionId ) {
+switch ( $sectionId ) {
+case self::SECTION_KEY_LEARNING_GOALS:
+$this->addLearningGoalsSection();
+break;
+
+case self::SECTION_KEY_VIDEO:
+$this->addVideoSection();
+break;
+
+case self::SECTION_KEY_SCRIPT:
+$this->addScriptSection();
+break;
+
+case self::SECTION_KEY_QUIZ:
+$this->addQuizSection();
+break;
+
+case self::SECTION_KEY_FURTHER_READING:
+$this->addFurtherReadingSection();
+break;
+
+default:
+// unknown section identifier
+break;
+}
+}
 
 protected function addLearningGoalsSection() {
-$this->beginSection( self::SECTION_KEY_LEARNING_GOALS );
-
 // add learning goals as unordered list, if any
 $learningGoals = self::generateUnorderedList( 
$this->item->learningGoals );
 if ( $learningGoals !== null ) {
@@ -161,13 +219,9 @@
 // show info box if no learning goal added yet
 $this->addEmptySectionBox( self::SECTION_KEY_LEARNING_GOALS );
 }
-
-$this->endSection();
 }
 
 protected function addVideoSection() {
-$this->beginSection( self::SECTION_KEY_VIDEO );
-
 if ( $this->item->hasVideo() ) {
 // show video player if video set
 $this->out->addWikiText( '[[File:' . $this->item->video. 
'|800px]]' );
@@ -175,13 +229,9 @@
 // show info box if video not set yet
 $this->addEmptySectionBox( self::SECTION_KEY_VIDEO );
 }
-
-

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: non-JS video thumb loading

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342623 )

Change subject: non-JS video thumb loading
..


non-JS video thumb loading

With this change the thumbnails of videos are no longer loaded via
JavaScript by accessing video player attributes. The corresponding
JS code has been removed.
Instead, like in the URL retrieval, the Wikimedia File-API is used
to generate a 300px thumbnail that is used as unit thumb.

Change-Id: I097b9f0ff31a9c4569821ed2520cd8762018da90
---
M includes/model/MoocItem.php
M includes/rendering/MoocLessonRenderer.php
M resources/js/ext.mooc.js
3 files changed, 64 insertions(+), 31 deletions(-)



diff --git a/includes/model/MoocItem.php b/includes/model/MoocItem.php
index fb3cb32..09fa62a 100644
--- a/includes/model/MoocItem.php
+++ b/includes/model/MoocItem.php
@@ -54,6 +54,15 @@
 public $video;
 
 /**
+ * @var array video data array containing
+ * 
+ * url: URL of the video
+ * thumbUrl: URL to the video thumbnail
+ * 
+ */
+public $videoData;
+
+/**
  * @var MoocResource|null script associated with this item
  */
 public $script;
diff --git a/includes/rendering/MoocLessonRenderer.php 
b/includes/rendering/MoocLessonRenderer.php
index 32c13c5..200aa06 100644
--- a/includes/rendering/MoocLessonRenderer.php
+++ b/includes/rendering/MoocLessonRenderer.php
@@ -68,18 +68,24 @@
 
 // left column: clickable video thumbnail
 $this->out->addHTML( '' );
+
+// load video
+// TODO make thumb width configurable? what is the max-width here? 
possible to keep dynamic?
+$hasVideo = $this->loadVideoData( $unit, 300 );
 $videoThumbClasses = 'video-thumbnail';
-if ( !$unit->hasVideo() ) {
+if ( !$hasVideo ) {
 $videoThumbClasses .= ' no-video';
 }
+
+// add linked thumb or placeholder
 $this->out->addHTML( "" );
-if ( $unit->hasVideo() ) {
-// TODO what is the max-width here? fine to use fixed width?
-$this->out->addWikiText( 
"[[File:$unit->video|frameless|300x170px|link=$unit->title]]" );
+if ( $hasVideo ) {
+$this->out->addHTML( "" );
 } else {
 $this->out->addHTML( "{$this->loadMessage( 'unit-no-video' 
)}" );
 }
 $this->out->addHTML( '' );
+
 $this->out->addHTML( '' );
 
 // right column: links, clickable title, learning goals
@@ -114,6 +120,50 @@
 }
 
 /**
+ * Loads the video data of an item into the item.
+ *
+ * @param MoocItem $item item
+ * @param int $thumbWidth targeted thumbnail width
+ * @return {bool} whether the video data has been successfully loaded or 
not
+ */
+protected function loadVideoData( $item, $thumbWidth ) {
+if ( $item->hasVideo() ) {
+// TODO support more than File:?
+$type = 'file';
+
+switch ( $type ) {
+case 'file':
+// load file
+$title = Title::newFromText( "File:$item->video" );
+$file = wfFindFile( $title, [ 'time' => false ] );
+if ( $file->exists() ) {
+// load thumb
+$thumbParams = [
+   'width' => min( $thumbWidth, $file->getWidth( true 
) )
+];
+$thumb = $file->transform( $thumbParams );
+
+// register link to the file
+$this->parserOutput->addLink( $title );
+
+$item->videoData = [
+'url' => $file->getUrl(),
+'thumbUrl' => $thumb->getUrl()
+];
+return true;
+}
+// file does not exist
+return false;
+default:
+// unknown video type
+return false;
+}
+}
+// no video
+return false;
+}
+
+/**
  * Adds the link bar to the child unit output.
  *
  * @param MoocUnit $unit child unit the link bar should be added for
@@ -142,19 +192,7 @@
 global $wgMOOCImagePath;
 $icon = $wgMOOCImagePath . 'ic_download.svg';
 $title = $this->loadMessage( 'section-units-unit-link-download-video' 
);
-
-// retrieve video file URL
-$href = null;
-if ( $unit->hasVideo() ) {
-$videoTitle = Title::newFromText( "File:$unit->video" );
-$file = wfFindFile( $videoTitle, [ 'time' => false ] );
-if ( $file->exists() ) {
-$href = $file->getUrl();
-
-// register link to the file
-$this->parserOutput->addLink( $videoTitle );
-}
-}
+$href = 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: Bugfix: PHP 5.6 feature in MoocContentRenderer

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340736 )

Change subject: Bugfix: PHP 5.6 feature in MoocContentRenderer
..


Bugfix: PHP 5.6 feature in MoocContentRenderer

MoocContentRenderer.loadMessage used the PHP 5.6 syntax '...'.
It has been replaced by constructs supported in PHP 5.5.9 to match
the system dependencies of MediaWiki core.

Change-Id: Iddbf7310ea91958a863565a94541697596cb80e0
---
M includes/rendering/MoocContentRenderer.php
1 file changed, 16 insertions(+), 10 deletions(-)



diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index 51a052a..81adb38 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -188,7 +188,8 @@
 $this->out->addWikiText('{{:' . $this->item->scriptTitle . '}}');
 } else {
 // show info box if script not created yet
-$this->addEmptySectionBox(self::SECTION_KEY_SCRIPT, 
$this->item->scriptTitle);
+// TODO pass link to edit script resource page
+$this->addEmptySectionBox( self::SECTION_KEY_SCRIPT );
 }
 
 $this->endSection();
@@ -202,7 +203,8 @@
 $this->out->addWikiText('{{:' . $this->item->quizTitle . '}}');
 } else {
 // show info box if quiz not created yet
-$this->addEmptySectionBox(self::SECTION_KEY_QUIZ, 
$this->item->quizTitle);
+// TODO pass link to edit quiz resource page
+$this->addEmptySectionBox( self::SECTION_KEY_QUIZ );
 }
 
 $this->endSection();
@@ -230,16 +232,18 @@
  * Adds an info box emphasising users to contribute to a currently empty 
section to the output.
  *
  * @param string $sectionKey key of the empty section
- * @param array ...$params additional parameters passed to the message 
loading of the info box description
+ * @param string $editHref edit link
  */
-protected function addEmptySectionBox($sectionKey, ...$params) {
+protected function addEmptySectionBox( $sectionKey, $editHref = null ) {
 // TODO can we automatically prefix classes/ids? at least in LESS?
 $this->out->addHTML('');
-
+
 $this->out->addHTML('');
-$this->out->addHTML($this->loadMessage('section-' . $sectionKey . 
'-empty-description', $params));
+$this->out->addHTML( $this->loadMessage( 'section-' . $sectionKey . 
'-empty-description' ) );
 $this->out->addHTML(' ');
-$this->out->addHTML('');
+
+$editHrefAttr = ( $editHref === null ) ? '' : 'href="' . $editHref . 
'"';
+$this->out->addHTML( '' );
 $this->out->addHTML($this->loadMessage('section-' . $sectionKey . 
'-empty-edit-link'));
 $this->out->addHTML('');
 // TODO do we need an additional text to point at external resources 
such as /script or general hints?
@@ -509,12 +513,14 @@
  * Loads a message in context of the MOOC extension.
  *
  * @param string $key message key
- * @param array ...$params message parameters
+ * @param mixed $params,... additional message parameters
  * @return string internationalized message built
  */
-protected function loadMessage($key, ...$params) {
+protected function loadMessage( $key /*...*/ ) {
+$params = func_get_args();
+array_shift( $params );
 $key = 'mooc-' . $key;
-$wfMessage = wfMessage($key, $params);
+$wfMessage = wfMessage( $key, $params );
 return $wfMessage->text();
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iddbf7310ea91958a863565a94541697596cb80e0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MOOC
Gerrit-Branch: master
Gerrit-Owner: Sebschlicht2 
Gerrit-Reviewer: Sebschlicht2 
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...MOOC[master]: Hook to simplify MOOC creation

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341002 )

Change subject: Hook to simplify MOOC creation
..


Hook to simplify MOOC creation

In order to simplify the process of adding a MOOC, this change adds a
hook for page creation within the MOOC namespace.
Whenever a root MOOC page is created, a MoocOverview stub is injected
into the edit box.
Together with this change, the MoocEntity class tree has slighlty be
changed to allow a convenient usage of these classes inside the hook.
Additionally, the structure loading query has been fixed together with
the stub of lessons in the edit-JS.

Change-Id: I28538a52af765d0fe88dfba2dc2a565ffbd873f6
---
M MOOC.hooks.php
M extension.json
M includes/content/MoocContent.php
M includes/model/MoocEntity.php
M includes/model/MoocItem.php
M includes/model/MoocLesson.php
M includes/model/MoocOverview.php
M includes/model/MoocResource.php
M includes/structure/MoocContentStructureProvider.php
M resources/js/ext.mooc.edit.js
10 files changed, 118 insertions(+), 60 deletions(-)



diff --git a/MOOC.hooks.php b/MOOC.hooks.php
index 8aa1e00..101f54d 100644
--- a/MOOC.hooks.php
+++ b/MOOC.hooks.php
@@ -12,6 +12,20 @@
 class MOOCHooks {
 
 /**
+ * Fills the edit form of a MOOC page with the MOOC overview JSON to allow 
fluent creates of MOOCs.
+ *
+ * @param string $text text to pre-fill the edit form with
+ * @param Title $title title of the new page
+ */
+public static function onEditFormPreloadText( &$text, &$title ) {
+if ( $title->getContentModel() === 
MoocContent::CONTENT_MODEL_MOOC_ITEM ) {
+if ( $title->equals( $title->getRootTitle() ) ) {
+$text = json_encode( ( new MoocOverview() )->toJson() );
+}
+}
+}
+
+/**
  * Transforms a MOOC resource into Wikitext to allow users to edit its 
content.
  *
  * @param EditPage $editPage edit page
diff --git a/extension.json b/extension.json
index a972c68..b6131df 100644
--- a/extension.json
+++ b/extension.json
@@ -44,6 +44,9 @@
 "EditFormInitialText": [
   "MOOCHooks::onEditFormInitialText"
 ],
+"EditFormPreloadText": [
+  "MOOCHooks::onEditFormPreloadText"
+],
 "EditPageGetPreviewContent": [
   "MOOCHooks::onEditPageGetPreviewContent"
 ],
diff --git a/includes/content/MoocContent.php b/includes/content/MoocContent.php
index 3fd7510..24fe9fd 100644
--- a/includes/content/MoocContent.php
+++ b/includes/content/MoocContent.php
@@ -34,7 +34,7 @@
  * @return MoocEntity MOOC entity loaded from the content
  */
 public function loadItem() {
-return MoocEntity::loadFromJson( null, (array) 
parent::getData()->getValue() );
+return MoocEntity::fromJson( (array) parent::getData()->getValue() );
 }
 
 /**
@@ -82,6 +82,10 @@
 $output->setEnableOOUI( true );
 $output->addModuleScripts( 'ext.mooc' );
 $output->addModuleStyles( 'ext.mooc' );
+
+// add Bootstrap
+$bootstrapManager = \Bootstrap\BootstrapManager::getInstance();
+$bootstrapManager->addAllBootstrapModules();
 $output->addModuleStyles( 'ext.bootstrap.styles' );
 
 $output->setText( MoocContentRenderer::renderItem( $output, 
$this->entity ) );
diff --git a/includes/model/MoocEntity.php b/includes/model/MoocEntity.php
index fc030bc..4a56099 100644
--- a/includes/model/MoocEntity.php
+++ b/includes/model/MoocEntity.php
@@ -26,52 +26,77 @@
 public $type;
 
 /**
- * Creates a new MOOC entity from JSON.
+ * Creates an empty MOOC entity.
  *
+ * @param string $type entity type identifier
  * @param Title $title page title
- * @param array $moocContentJson JSON (associative array) representing a 
MOOC entity
  */
-public function __construct( $title, $moocContentJson ) {
+public function __construct( $type, $title = null ) {
+$this->type = $type;
 // TODO completely separate page Title from MOOC entities?
 $this->title = $title;
-$this->type = $moocContentJson[self::JFIELD_TYPE];
 }
+
+/**
+ * Loads the entity fields from a JSON array.
+ *
+ * @param array $jsonArray associative array (e.g. from json_decode)
+ */
+abstract protected function loadJson( $jsonArray );
 
 /**
  * Converts this MOOC entity into JSON content.
  *
  * @return array JSON (associative array) representing a MOOC entity
  */
-abstract function toJson();
+abstract public function toJson();
 
 /**
- * Loads a MOOC entity from JSON content.
+ * Loads a MOOC entity from a JSON array.
  *
- * @param Title $title title of the MOOC entity page
- * @param array $moocContentJson JSON (associative array) representing a 
MOOC entity
- * @return MoocEntity MOOC 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: MOOC overview view added

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340760 )

Change subject: MOOC overview view added
..


MOOC overview view added

The MOOC overview allows to render a whole MOOC with all its
lessons and to add lessons. This branch implements a basic version
of this view, including rudimentary style directives and JavaScript
code to add lessons via the MW-API in the background.

Change-Id: I6d7ed1cbebb264622ca117402dec5d460dc9f90b
---
M extension.json
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
M includes/model/MoocEntity.php
A includes/model/MoocOverview.php
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
A includes/rendering/MoocOverviewRenderer.php
M resources/js/ext.mooc.edit.js
M resources/less/ext.mooc.less
11 files changed, 256 insertions(+), 50 deletions(-)



diff --git a/extension.json b/extension.json
index 15d3cac..36590ff 100644
--- a/extension.json
+++ b/extension.json
@@ -18,9 +18,11 @@
 "MoocScript": "includes/model/MoocScript.php",
 "MoocQuiz": "includes/model/MoocQuiz.php",
 "MoocItem": "includes/model/MoocItem.php",
+"MoocOverview": "includes/model/MoocOverview.php",
 "MoocLesson": "includes/model/MoocLesson.php",
 "MoocUnit": "includes/model/MoocUnit.php",
 "MoocContentRenderer": "includes/rendering/MoocContentRenderer.php",
+"MoocOverviewRenderer": "includes/rendering/MoocOverviewRenderer.php",
 "MoocLessonRenderer": "includes/rendering/MoocLessonRenderer.php",
 "MoocUnitRenderer": "includes/rendering/MoocUnitRenderer.php",
 "MoocContentStructureProvider": 
"includes/structure/MoocContentStructureProvider.php",
diff --git a/i18n/de.json b/i18n/de.json
index 566cba7..f78 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -9,22 +9,24 @@
   "mooc-section-learning-goals-title": "Lernziele",
   "mooc-section-learning-goals-button-title-edit": "Lernziele bearbeiten",
   "mooc-section-video-title": "Video",
-  "mooc-section-video-button-title-edit": "Video ändern",
+  "mooc-section-video-edit-title": "Video ändern",
   "mooc-section-script-title": "Skript",
-  "mooc-section-script-button-title-edit": "Skript bearbeiten",
+  "mooc-section-script-edit-title": "Skript bearbeiten",
   "mooc-section-quiz-title": "Quiz",
-  "mooc-section-quiz-button-title-edit": "Quiz bearbeiten",
+  "mooc-section-quiz-edit-title": "Quiz bearbeiten",
   "mooc-section-further-reading-title": "Weiterführende Literatur",
-  "mooc-section-further-reading-button-title-edit": "Weiterführende Literatur 
bearbeiten",
+  "mooc-section-further-reading-edit-title": "Weiterführende Literatur 
bearbeiten",
   "mooc-section-units-title": "Lerneinheiten",
-  "mooc-section-units-button-title-edit": "Lerneinheiten bearbeiten",
-  "mooc-section-units-button-title-add": "Lerneinheit hinzufügen",
+  "mooc-section-units-edit-title": "Lerneinheiten bearbeiten",
+  "mooc-section-units-add-title": "Lerneinheit hinzufügen",
   "mooc-section-units-unit-link-video": "Zum Video springen",
   "mooc-section-units-unit-link-download-video": "Video herunterladen",
   "mooc-section-units-unit-link-script": "Zum Skript springen",
   "mooc-section-units-unit-link-quiz": "Zum Quiz springen",
   "mooc-section-lessons-title": "Lektionen",
+  "mooc-section-lessons-add-title": "Lektion hinzufügen",
   "mooc-lesson-add-unit-summary": "Lerneinheit \"$1\" zur Lektion 
hinzugefügt.",
+  "mooc-overview-add-lesson-summary": "Lektion \"$1\" zum MOOC hinzugefügt.",
   "_mooc-comment-modal-button-title-": "// Label für Aktionen in 
modalen Boxen.",
   "mooc-modal-button-title-save": "Speichern",
   "mooc-modal-button-title-add": "Hinzufügen",
diff --git a/i18n/en.json b/i18n/en.json
index 7e97920..683e840 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -24,7 +24,9 @@
   "mooc-section-units-unit-link-script": "Jump to the script",
   "mooc-section-units-unit-link-quiz": "Jump to the quiz",
   "mooc-section-lessons-title": "Lessons",
+  "mooc-section-lessons-add-title": "Add lesson",
   "mooc-lesson-add-unit-summary": "Unit \"$1\" added to the lesson.",
+  "mooc-overview-add-lesson-summary": "Lesson \"$1\" added to the MOOC.",
   "_mooc-comment-modal-button-title-": "// Labels for action buttons 
in modal boxes.",
   "mooc-modal-button-title-save": "Save",
   "mooc-modal-button-title-add": "Add",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index dbbb217..febca51 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -28,7 +28,9 @@
   "mooc-section-units-unit-link-script": "Title of the link to the unit's 
script section.",
   "mooc-section-units-unit-link-quiz": "Title of the link to the unit's quiz 
section.",
   "mooc-section-lessons-title": "Title of the lessons section.",
-  "mooc-lesson-add-unit-summary": "Edit summary when adding a unit to a 
lesson. Parameters: 1. name of the unit",
+  "mooc-section-lessons-add-title": "Title of the button to add a lesson.",
+  

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: resource models added

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/340732 )

Change subject: resource models added
..


resource models added

ContentModels for resource files have been added, to allow resource files
(e.g. scripts, quizzes) to be placed in the MOOC's course namespace.
Three hooks have been implemented to limit the users view to the resource
file content while editing - but preview and save this content wrapped
inside a MoocResource behind the scenes.

Change-Id: Icd2ef6b6325e0c060eeb82be969c10c66bbc57d7
---
M MOOC.hooks.php
M extension.json
M includes/content/MoocContent.php
A includes/model/MoocEntity.php
M includes/model/MoocItem.php
M includes/model/MoocLesson.php
A includes/model/MoocQuiz.php
A includes/model/MoocResource.php
A includes/model/MoocScript.php
M includes/model/MoocUnit.php
M includes/rendering/MoocContentRenderer.php
M includes/structure/MoocContentStructureProvider.php
12 files changed, 315 insertions(+), 99 deletions(-)



diff --git a/MOOC.hooks.php b/MOOC.hooks.php
index 2459659..8aa1e00 100644
--- a/MOOC.hooks.php
+++ b/MOOC.hooks.php
@@ -6,15 +6,99 @@
  * @file
  * @ingroup Extensions
  *
- * @author Rene Pickhardt ([User:renepick]), Sebastian Schlicht 
(sebast...@jablab.de [User:sebschlicht])
+ * @author Sebastian Schlicht (sebast...@jablab.de [User:sebschlicht]), Rene 
Pickhardt ([User:renepick])
  * @license GPLv2
  */
 class MOOCHooks {
 
 /**
- * Registers parser functions for magic keywords.
+ * Transforms a MOOC resource into Wikitext to allow users to edit its 
content.
  *
- * @param Parser $parser
+ * @param EditPage $editPage edit page
  */
-public static function onParserFirstCallInit(Parser &$parser) {}
+public static function onEditFormInitialText( $editPage ) {
+if ( $editPage->contentModel === MoocContent::CONTENT_MODEL_MOOC_ITEM 
) {
+$pageContent = 
$editPage->getArticle()->getPage()->getContent()->serialize();
+$moocContent = new MoocContent( $pageContent );
+if ( $moocContent->isValid() && ( $moocContent->entity instanceof 
MoocResource ) ) {
+$entity = $moocContent->entity;
+if ( $entity !== null ) {
+$editPage->textbox1 = $entity->content;
+}
+}
+}
+}
+
+/**
+ * Transforms the resource file content into a MOOC resource when 
previewing an edit.
+ * Behind the scenes, the original MOOC resource is loaded and its content 
field is overwritten.
+ *
+ * @param EditPage $editPage edit page
+ * @param Content $content previewed content
+ */
+public static function onEditPageGetPreviewContent( $editPage, &$content ) 
{
+if ( $editPage->contentModel === MoocContent::CONTENT_MODEL_MOOC_ITEM 
) {
+if ( $editPage->getArticle()->getPage()->exists() ) {
+// existing page: inject edit-content into MOOC resource
+$pageContent = 
$editPage->getArticle()->getPage()->getContent()->serialize();
+$moocContent = new MoocContent( $pageContent );
+$newMoocContent = self::mergeResourceFileIntoMoocContent( 
$moocContent, $content );
+if ( $newMoocContent === null ) {
+// invalid MOOC entity or not a MoocResource
+} else {
+$content = $newMoocContent;
+}
+} else {
+// new page: TODO unclear whether MoocItem or MoocResource
+// maybe decide depending on JSON validity but invalid 
MoocItem == MoocResource
+// so this is a modelling choice
+}
+}
+}
+
+/**
+ * Transforms the resource file content into a MOOC resource when the user 
finishes editing.
+ * Behind the scenes, the original MOOC resource is loaded and its content 
field is overwritten.
+ *
+ * @param WikiPage $wikiPage wiki page being saved
+ * @param User $user user saving the article
+ * @param Content $content new article content
+ * @param string $summary edit summary
+ * @param bool $isMinor minor flag
+ * @param bool $isWatch null
+ * @param bool $section null
+ * @param $flags
+ * @param Status $status edit status
+ */
+public static function onPageContentSave( &$wikiPage, &$user, &$content, 
&$summary,
+  $isMinor, $isWatch, $section, 
&$flags, &$status ) {
+// limit hook to saves (not creates) of MOOC entities
+if ( $wikiPage->getContentModel() === 
MoocContent::CONTENT_MODEL_MOOC_ITEM && $wikiPage->exists() ) {
+$pageContent = $wikiPage->getContent()->serialize();
+$moocContent = new MoocContent( $pageContent );
+$newMoocContent = self::mergeResourceFileIntoMoocContent( 
$moocContent, $content 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: edit resource files via JS modals

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/341136 )

Change subject: edit resource files via JS modals
..


edit resource files via JS modals

This change allows users to edit external resource files on the entity
page it's associated to.
The page titles has been moved to MoocEntity, as it's more natural.
Boostrap classes have been applied to the modal box form controls.
The JavaScript code has been extended by functions to create resource
entities and edit them as Wikitext, due to the edit hook.
The resource file content is now passed via the JS config vars instead
of being retrieved via AJAX. This significantly increases the
usability. The structure provider thus loads resource entities and
connects them to their parental item, instead of using transclusion.

Change-Id: I3344b39dadf6c87abbe31242cee83e2ddeef969d
---
M includes/model/MoocEntity.php
M includes/model/MoocItem.php
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M includes/structure/MoocContentStructureProvider.php
M resources/js/ext.mooc.edit.js
7 files changed, 121 insertions(+), 132 deletions(-)



diff --git a/includes/model/MoocEntity.php b/includes/model/MoocEntity.php
index 4a56099..bb2a5cc 100644
--- a/includes/model/MoocEntity.php
+++ b/includes/model/MoocEntity.php
@@ -34,10 +34,26 @@
 public function __construct( $type, $title = null ) {
 $this->type = $type;
 // TODO completely separate page Title from MOOC entities?
+$this->setTitle( $title );
+}
+
+/**
+ * Sets the page title.
+ *
+ * @param Title $title page title
+ */
+public function setTitle( $title ) {
 $this->title = $title;
 }
 
 /**
+ * @return bool whether the entity has child entities
+ */
+public function hasChildren() {
+return false;
+}
+
+/**
  * Loads the entity fields from a JSON array.
  *
  * @param array $jsonArray associative array (e.g. from json_decode)
diff --git a/includes/model/MoocItem.php b/includes/model/MoocItem.php
index abaeb62..ef27070 100644
--- a/includes/model/MoocItem.php
+++ b/includes/model/MoocItem.php
@@ -20,13 +20,13 @@
 const JFIELD_VIDEO = 'video';
 
 /**
- * JSON field identifier for the script page title
+ * JSON field identifier for the script
  */
-const JFIELD_SCRIPT_TITLE = 'scriptTitle';
+const JFIELD_SCRIPT = 'script';
 /**
- * JSON field identifier for the quiz page title
+ * JSON field identifier for the quiz
  */
-const JFIELD_QUIZ_TITLE = 'quizTitle';
+const JFIELD_QUIZ = 'quiz';
 
 /**
  * JSON field identifier for further reading material
@@ -54,14 +54,14 @@
 public $video;
 
 /**
- * @var Title title of the script associated with this item
+ * @var MoocResource|null script associated with this item
  */
-public $scriptTitle;
+public $script;
 
 /**
- * @var Title title of the quiz associated with this item
+ * @var MoocResource|null quiz associated with this item
  */
-public $quizTitle;
+public $quiz;
 
 /**
  * @var string[] resources of further reading
@@ -75,9 +75,6 @@
 
 public function __construct( $type, $title = null ) {
 parent::__construct( $type, $title );
-
-// set script and quiz title
-$this->setTitle( $title );
 }
 
 protected function loadJson( $jsonArray ) {
@@ -92,13 +89,8 @@
 }
 }
 
-/**
- * Sets the title and updates the titles of potentially associated 
resources.
- *
- * @param $title Title page title
- */
 public function setTitle( $title ) {
-$this->title = $title;
+parent::setTitle( $title );
 $this->scriptTitle = ( $title === null ) ? null : Title::newFromText( 
$title . '/script' );
 $this->quizTitle = ( $title === null ) ? null : Title::newFromText( 
$title . '/quiz' );
 }
@@ -114,7 +106,7 @@
  * @return boolean whether the item has children
  */
 public function hasChildren() {
-return isset( $this->children ) && !empty( $this->children );
+return !empty( $this->children );
 }
 
 public function toJson() {
@@ -122,6 +114,8 @@
 self::JFIELD_TYPE => $this->type,
 self::JFIELD_LEARNING_GOALS => $this->learningGoals,
 self::JFIELD_VIDEO => $this->video,
+self::JFIELD_SCRIPT => ( $this->script !== null ) ? 
$this->script->toJson() : null,
+self::JFIELD_QUIZ => ( $this->quiz !== null ) ? 
$this->quiz->toJson() : null,
 self::JFIELD_FURTHER_READING => $this->furtherReading
 ];
 }
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index 7b2618e..820d909 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: non-JS video URL retrieval

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342622 )

Change subject: non-JS video URL retrieval
..


non-JS video URL retrieval

URLs of video source files are now retrieved using wfFindFile in
the extension PHP core instead of error-pronely navigating the DOM
tree of an injected video player.
The JS code that extracted the URL prior to this change has been
removed.
Several small UI bugs have been fixed alongside.

Change-Id: I07fa114a6b1a2569c29b84ccf8451e575885bd1e
---
M MOOC.php
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M resources/js/ext.mooc.js
M resources/less/ext.mooc.less
6 files changed, 94 insertions(+), 117 deletions(-)



diff --git a/MOOC.php b/MOOC.php
index 92edd07..940f603 100644
--- a/MOOC.php
+++ b/MOOC.php
@@ -15,7 +15,8 @@
 $wgResourceLoaderDebug = true;
 
 // TODO get out how to include jquery.ui.effects (includes easing) other 
than shipping
-
+// TODO can we automatically prefix classes/ids? at least in LESS?
+
 $wgMOOCSectionConfig = [
 'learning-goals' => [
 'collapsed' => false
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index 8033b93..bc8b4c6 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -235,23 +235,27 @@
  * Adds an info box emphasising users to contribute to a currently empty 
section to the output.
  *
  * @param string $sectionKey key of the empty section
+ * @param bool $showActionAddContent whether to show controls to add 
content
  * @param string $editHref edit link
  */
-protected function addEmptySectionBox( $sectionKey, $editHref = null ) {
-// TODO can we automatically prefix classes/ids? at least in LESS?
-$this->out->addHTML('');
+protected function addEmptySectionBox( $sectionKey, $showActionAddContent 
= true, $editHref = null ) {
+$this->out->addHTML( '' );
 
-$this->out->addHTML('');
-$this->out->addHTML( $this->loadMessage( 'section-' . $sectionKey . 
'-empty-description' ) );
-$this->out->addHTML(' ');
+// inform about missing content
+$this->out->addHTML( "{$this->loadMessage( 
"section-$sectionKey-empty-description" )}" );
 
-$editHrefAttr = ( $editHref === null ) ? '' : 'href="' . $editHref . 
'"';
-$this->out->addHTML( '' );
-$this->out->addHTML($this->loadMessage('section-' . $sectionKey . 
'-empty-edit-link'));
-$this->out->addHTML('');
-// TODO do we need an additional text to point at external resources 
such as /script or general hints?
-
-$this->out->addHTML('');
+// add controls to add content
+if ( $showActionAddContent ) {
+// build edit link
+$editHrefAttr = ( $editHref === null ) ? '' : " href='$editHref'";
+
+// TODO do we need an additional text to point at external 
resources such as /script or general hints?
+$this->out->addHTML( " " );
+$this->out->addHTML( $this->loadMessage( 
"section-$sectionKey-empty-edit-link" ) );
+$this->out->addHTML( '' );
+}
+
+$this->out->addHTML( '' );
 }
 
 /**
diff --git a/includes/rendering/MoocLessonRenderer.php 
b/includes/rendering/MoocLessonRenderer.php
index 13f0555..32c13c5 100644
--- a/includes/rendering/MoocLessonRenderer.php
+++ b/includes/rendering/MoocLessonRenderer.php
@@ -40,7 +40,13 @@
 $this->endSection();
 }
 
-protected function addUnitsSectionContent( $lesson ) {
+/**
+ * Adds the content of the units section.
+ *
+ * @param MoocLesson $lesson lesson which units to list
+ * @param bool $showActionAddUnit whether to show controls to add units if 
none have been added yet
+ */
+protected function addUnitsSectionContent( $lesson, $showActionAddUnit = 
true ) {
 if ( $lesson->hasChildren() ) {
 // list child units if any
 foreach ( $lesson->children as $unit ) {
@@ -48,7 +54,7 @@
 }
 } else {
 // show info box if no child units added yet
-$this->addEmptySectionBox( self::SECTION_KEY_UNITS );
+$this->addEmptySectionBox( self::SECTION_KEY_UNITS, 
$showActionAddUnit );
 }
 }
 
@@ -93,7 +99,7 @@
 if ( $learningGoals !== null ) {
 $this->out->addWikiText( $learningGoals );
 } else {
-$this->out->addHTML( $this->loadMessage( 'section-' . 
'learning-goals' . '-empty-description' ) );
+$this->out->addHTML( $this->loadMessage( 
'section-learning-goals-empty-description' ) );
 }
 $this->out->addHTML( '' );
 
@@ -112,19 +118,19 @@
  *
  * @param MoocUnit $unit child 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: clickable unit video thumb

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342621 )

Change subject: clickable unit video thumb
..


clickable unit video thumb

In this change, thumbnails of videos are made clickable both when
a video is set and if not. This is made possible using the HTML tag
for links, providing the best usability for users.
Furthermore, video thumbnails have been made responsive.

Change-Id: Ibf797ca4d30ec42a3d8d08e4418da06a657a9be3
---
M includes/model/MoocItem.php
M includes/rendering/MoocLessonRenderer.php
M resources/js/ext.mooc.js
M resources/less/ext.mooc.less
4 files changed, 66 insertions(+), 39 deletions(-)



diff --git a/includes/model/MoocItem.php b/includes/model/MoocItem.php
index ef27070..fb3cb32 100644
--- a/includes/model/MoocItem.php
+++ b/includes/model/MoocItem.php
@@ -103,7 +103,14 @@
 }
 
 /**
- * @return boolean whether the item has children
+ * @return bool whether the item has a video
+ */
+public function hasVideo() {
+return isset( $this->video );
+}
+
+/**
+ * @return bool whether the item has children
  */
 public function hasChildren() {
 return !empty( $this->children );
diff --git a/includes/rendering/MoocLessonRenderer.php 
b/includes/rendering/MoocLessonRenderer.php
index 8a23ac0..13f0555 100644
--- a/includes/rendering/MoocLessonRenderer.php
+++ b/includes/rendering/MoocLessonRenderer.php
@@ -57,48 +57,54 @@
  *
  * @param MoocItem $unit unit to add
  */
-protected function addChildUnit($unit) {
-$this->out->addHTML('');
+protected function addChildUnit( $unit ) {
+$this->out->addHTML( '' );
 
-$this->out->addHTML('');
-// video thumbnail
-$this->out->addHTML('');
-if (isset($unit->video)) {
-// TODO re-calc max width
-$this->out->addWikiText('[[File:' . $unit->video . 
'|frameless|300x170px|link=' . $unit->title . ']]');
-} else {
-// TODO make clickable without JS
-$this->out->addHTML('' . $this->loadMessage('unit-no-video') 
. '');
+// left column: clickable video thumbnail
+$this->out->addHTML( '' );
+$videoThumbClasses = 'video-thumbnail';
+if ( !$unit->hasVideo() ) {
+$videoThumbClasses .= ' no-video';
 }
-$this->out->addHTML('');
-$this->out->addHTML('');
-$this->parserOutput->addLink($unit->title);
+$this->out->addHTML( "" );
+if ( $unit->hasVideo() ) {
+// TODO what is the max-width here? fine to use fixed width?
+$this->out->addWikiText( 
"[[File:$unit->video|frameless|300x170px|link=$unit->title]]" );
+} else {
+$this->out->addHTML( "{$this->loadMessage( 'unit-no-video' 
)}" );
+}
+$this->out->addHTML( '' );
+$this->out->addHTML( '' );
 
-$this->out->addHTML('');
+// right column: links, clickable title, learning goals
+$this->out->addHTML( '' );
 
 // links
-$this->addChildLinkBar($unit);
+$this->addChildLinkBar( $unit );
 
 // title
-$this->out->addHTML('');
-$this->out->addWikiText('[[' . $unit->title . '|'. 
$unit->title->getSubpageText() . ']]');
-$this->out->addHTML('');
+$this->out->addHTML( '' );
+$this->out->addWikiText( 
"[[$unit->title|{$unit->title->getSubpageText()}]]" );
+$this->out->addHTML( '' );
 
 // learning goals
-$this->out->addHTML('');
-$learningGoals = $this->generateLearningGoalsWikiText($unit);
-if ($learningGoals != null) {
-$this->out->addWikiText($learningGoals);
+$this->out->addHTML( '' );
+$learningGoals = $this->generateLearningGoalsWikiText( $unit );
+if ( $learningGoals !== null ) {
+$this->out->addWikiText( $learningGoals );
 } else {
-$this->out->addHTML($this->loadMessage('section-' . 
'learning-goals' . '-empty-description'));
+$this->out->addHTML( $this->loadMessage( 'section-' . 
'learning-goals' . '-empty-description' ) );
 }
-$this->out->addHTML('');
+$this->out->addHTML( '' );
 
-// meta TODO add discussion meta data overlay
+// meta TODO add discussion meta data overlay?
 
-$this->out->addHTML('');
+$this->out->addHTML( '' );
 
-$this->out->addHTML('');
+$this->out->addHTML( '' );
+
+// register external link to unit
+$this->parserOutput->addLink( $unit->title );
 }
 
 /**
diff --git a/resources/js/ext.mooc.js b/resources/js/ext.mooc.js
index 6e1ccf5..e0e9ee5 100644
--- a/resources/js/ext.mooc.js
+++ b/resources/js/ext.mooc.js
@@ -51,15 +51,10 @@
   }
 
   // make video a thumb
-  var unitVideoThumbSrc = $unitVideo.attr( 'poster' );
-  var 

[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: placeholders

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/342646 )

Change subject: placeholders
..


placeholders

Placeholders have been added to all form controls.
Placeholders are localized using the MW message API.
To use these messages in dynamically created lists, a data
attribute has been used.

Change-Id: Id297af1ecff0a327c043837fa103ff5205d37da0
---
M i18n/de.json
M i18n/en.json
M i18n/qqq.json
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M resources/js/ext.mooc.edit.js
7 files changed, 45 insertions(+), 11 deletions(-)



diff --git a/i18n/de.json b/i18n/de.json
index 97d3373..84c9a78 100644
--- a/i18n/de.json
+++ b/i18n/de.json
@@ -49,5 +49,13 @@
   "mooc-section-units-empty-description": "Dieser Lektion wurden noch keine 
Lerneinheiten hinzugefügt.",
   "mooc-section-units-empty-edit-link": "Klicken Sie auf \"Lerneinheit 
hinzufügen\", um eine Lerneinheit hinzuzufügen.",
   "_mooc-comment-button-...": "// Label für allgemeine Schaltflächen der 
Benutzeroberfläche.",
-  "mooc-button-expand-section": "Hier klicken zum Ausklappen"
+  "mooc-button-expand-section": "Hier klicken zum Ausklappen",
+
+  "mooc-overview-add-lesson-modal-placeholder-name": "Name der neuen Lektion",
+  "mooc-lesson-add-unit-modal-placeholder-name": "Name der neuen Lerneinheit",
+  "mooc-unit-edit-learning-goals-modal-placeholder-value": "Neues Lernziel",
+  "mooc-unit-edit-video-modal-placeholder-value": "Dateiname des Videos",
+  "mooc-unit-edit-script-modal-placeholder-value": "Skript-Inhalt (Wikitext)",
+  "mooc-unit-edit-quiz-modal-placeholder-value": "Quiz-Inhalt (Wikitext)",
+  "mooc-unit-edit-further-reading-modal-placeholder-value": "Neuer 
Literatureintrag"
 }
diff --git a/i18n/en.json b/i18n/en.json
index 2c51583..c285d2c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -49,5 +49,13 @@
   "mooc-section-units-empty-description": "No units have been added to this 
lesson yet.",
   "mooc-section-units-empty-edit-link": "Use the button \"Add Unit\" to add a 
unit.",
   "_mooc-comment-button-...": "// Labels for general UI buttons.",
-  "mooc-button-expand-section": "Click to expand"
+  "mooc-button-expand-section": "Click to expand",
+
+  "mooc-overview-add-lesson-modal-placeholder-name": "Name of the new lesson",
+  "mooc-lesson-add-unit-modal-placeholder-name": "Name of the new unit",
+  "mooc-unit-edit-learning-goals-modal-placeholder-value": "New learning goal",
+  "mooc-unit-edit-video-modal-placeholder-value": "Video file name",
+  "mooc-unit-edit-script-modal-placeholder-value": "Script content (Wikitext)",
+  "mooc-unit-edit-quiz-modal-placeholder-value": "Quiz content (Wikitext)",
+  "mooc-unit-edit-further-reading-modal-placeholder-value": "New further 
reading entry"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d136f4e..16c7dbd 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -50,5 +50,13 @@
   "mooc-section-lessons-empty-edit-link": "Text of the link to encourage 
viewers to add lessons.",
   "mooc-section-units-empty-description": "Placeholder shown when the units 
section is empty.",
   "mooc-section-units-empty-edit-link": "Text of the link to encourage viewers 
to add units.",
-  "mooc-button-expand-section": "Label of the button that expands the section."
+  "mooc-button-expand-section": "Label of the button that expands the 
section.",
+
+  "mooc-overview-add-lesson-modal-placeholder-name": "Placeholder of the 
control to enter the name of a lesson that's being created.",
+  "mooc-lesson-add-unit-modal-placeholder-name": "Placeholder of the control 
to enter the name of an unit that's being created.",
+  "mooc-unit-edit-learning-goals-modal-placeholder-value": "Placeholder of the 
control to enter a new learning goal for the unit that's being edited.",
+  "mooc-unit-edit-video-modal-placeholder-value": "Placeholder of the control 
to enter a video file name for the unit that's being edited.",
+  "mooc-unit-edit-script-modal-placeholder-value": "Placeholder of the control 
to enter the script for the unit that's being edited.",
+  "mooc-unit-edit-quiz-modal-placeholder-value": "Placeholder of the control 
to enter the quiz for the unit that's being edited.",
+  "mooc-unit-edit-further-reading-modal-placeholder-value": "Placeholder of 
the control to enter a new further reading for the unit that's being edited."
 }
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index f5f273a..4aa980f 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -468,22 +468,28 @@
 // video
 case self::SECTION_KEY_VIDEO:
 // simple text input field
-$this->out->addHTML( "" );
+$this->out->addHTML( '' );
+$this->out->addHTML( 'File:' );

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Avoid different font-size due to OS/Browser settings

2017-03-24 Thread WMDE-Fisch (Code Review)
WMDE-Fisch has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344596 )

Change subject: Avoid different font-size due to OS/Browser settings
..

Avoid different font-size due to OS/Browser settings

Font size hase to be in synch between textarea and
changes editor.

e.g. IE10 uses font size from body/content css styles
while Firefox and Chrome use custom styles influenced
by OS settings.

Change-Id: I1cbdf94d7f21eeb0f56d5a809adce8a88ee8f1fa
---
M modules/ext.TwoColConflict.less
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TwoColConflict 
refs/changes/96/344596/1

diff --git a/modules/ext.TwoColConflict.less b/modules/ext.TwoColConflict.less
index f956f70..a28b518 100644
--- a/modules/ext.TwoColConflict.less
+++ b/modules/ext.TwoColConflict.less
@@ -63,6 +63,7 @@
box-sizing: border-box;
font: medium '-moz-fixed';
font: '-webkit-small-control';
+   font-size: medium;
font-family: monospace;
text-rendering: auto;
color: initial;
@@ -98,6 +99,7 @@
 .mw-twocolconflict-editor-col #wpTextbox1 {
height: 400px;
padding: 0 4px;
+   font-size: medium;
 }
 
 .mw-twocolconflict-lastuser,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1cbdf94d7f21eeb0f56d5a809adce8a88ee8f1fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mw.widgets.Complex*: Add setDisabled

2017-03-24 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344598 )

Change subject: mw.widgets.Complex*: Add setDisabled
..

mw.widgets.Complex*: Add setDisabled

Change-Id: I6747f4e64dd81197bb3e37c09876399f1cb3be07
---
M resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js
M resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
2 files changed, 25 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/344598/1

diff --git 
a/resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js
index f67ed3d..b0c9f91 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.ComplexNamespaceInputWidget.js
@@ -115,4 +115,20 @@
}
};
 
+   /**
+* @inheritdoc
+*/
+   mw.widgets.ComplexNamespaceInputWidget.prototype.setDisabled = function 
( disabled ) {
+   
mw.widgets.ComplexNamespaceInputWidget.parent.prototype.setDisabled.call( this, 
disabled );
+   this.namespace.setDisabled( disabled );
+
+   if ( this.invert ) {
+   this.invert.setDisabled( disabled );
+   }
+
+   if ( this.associated ) {
+   this.associated.setDisabled( disabled );
+   }
+   };
+
 }( jQuery, mediaWiki ) );
diff --git 
a/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js 
b/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
index 8f48ec3..030fbb0 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.ComplexTitleInputWidget.js
@@ -103,4 +103,13 @@
this.title.restorePreInfuseState( state.title );
};
 
+   /**
+* @inheritdoc
+*/
+   mw.widgets.ComplexTitleInputWidget.prototype.setDisabled = function ( 
disabled ) {
+   
mw.widgets.ComplexTitleInputWidget.parent.prototype.setDisabled.call( this, 
disabled );
+   this.namespace.setDisabled( disabled );
+   this.title.setDisabled( disabled );
+   };
+
 }( jQuery, mediaWiki ) );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Change bad ASCII to UTF-8 validation in terms/value validators

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

Change subject: Change bad ASCII to UTF-8 validation in terms/value validators
..


Change bad ASCII to UTF-8 validation in terms/value validators

We need to BACKPORT this. Not necesarrily the tests. I also believe the
changes to ValidatorBuilders are not deployed yet. So the only file that
needs backporting is TermValidatorFactory.

Bug: T161263
Change-Id: If129df5364afd03848d40658f605923d252e4a69
---
M repo/includes/ValidatorBuilders.php
M repo/includes/Validators/TermValidatorFactory.php
M repo/tests/phpunit/includes/ValidatorBuildersTest.php
M repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
4 files changed, 6 insertions(+), 4 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/includes/ValidatorBuilders.php 
b/repo/includes/ValidatorBuilders.php
index af5649d..f11a072 100644
--- a/repo/includes/ValidatorBuilders.php
+++ b/repo/includes/ValidatorBuilders.php
@@ -176,7 +176,7 @@
$validators[] = new TypeValidator( 'string' );
//TODO: validate UTF8 (here and elsewhere)
$validators[] = new StringLengthValidator( 1, $maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/includes/Validators/TermValidatorFactory.php 
b/repo/includes/Validators/TermValidatorFactory.php
index 3fa10c3..1cc80e7 100644
--- a/repo/includes/Validators/TermValidatorFactory.php
+++ b/repo/includes/Validators/TermValidatorFactory.php
@@ -128,7 +128,7 @@
$validators = array();
$validators[] = new TypeValidator( 'string' );
$validators[] = new StringLengthValidator( 1, $this->maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/tests/phpunit/includes/ValidatorBuildersTest.php 
b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
index c142225..31d8f8d 100644
--- a/repo/tests/phpunit/includes/ValidatorBuildersTest.php
+++ b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
@@ -221,6 +221,7 @@
return [
'Space' => [ 'x x', true ],
'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
 
// Length checks
'To short' => [ '', false ],
@@ -240,7 +241,7 @@
'U+000B: Vertical tab' => [ "x\x0Bx", false ],
'U+000C: Form feed' => [ "x\fx", false ],
'U+000D: Return' => [ "x\rx", false ],
-   'U+0085: Next line' => [ "x\x85x", false ],
+   'U+0085: Next line' => [ "x\xC2\x85x", false ],
];
}
 
diff --git 
a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php 
b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
index ae513b5..5214e38 100644
--- a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
+++ b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
@@ -111,6 +111,7 @@
return [
'Space' => [ 'x x', true ],
'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
 
// Length checks
'To short' => [ '', false ],
@@ -130,7 +131,7 @@
'U+000B: Vertical tab' => [ "x\x0Bx", false ],
'U+000C: Form feed' => [ "x\fx", false ],
'U+000D: Return' => [ "x\rx", false ],
-   'U+0085: Next line' => [ "x\x85x", false ],
+   'U+0085: Next line' => [ "x\xC2\x85x", false ],
];
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If129df5364afd03848d40658f605923d252e4a69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Remove tagline margin

2017-03-24 Thread EddieGP (Code Review)
EddieGP has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344604 )

Change subject: Remove tagline margin
..

Remove tagline margin

Follow-up of 214a4a4. tagline has top-margin: 7px but page title has
bottom-padding:7px, leading to a overall padding of 14px instead of
intended 7px.

T160485
Change-Id: Iede3fb77d00e47b6acb4b6d7ee53c394317b7a3d
---
M resources/skins.minerva.base.styles/pageactions.less
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/resources/skins.minerva.base.styles/pageactions.less 
b/resources/skins.minerva.base.styles/pageactions.less
index 2db35d4..2efc428 100644
--- a/resources/skins.minerva.base.styles/pageactions.less
+++ b/resources/skins.minerva.base.styles/pageactions.less
@@ -28,7 +28,6 @@
.tagline {
color: @colorGray5;
font-size: 0.85em;
-   margin: 7px 0 0;
 
&:first-letter {
text-transform: capitalize;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iede3fb77d00e47b6acb4b6d7ee53c394317b7a3d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: EddieGP 

___
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-03-24T10:00:01+0000

2017-03-24 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344589 )

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

New Wikidata Build - 2017-03-24T10:00:01+

Change-Id: Ibc141d58cad359370c7149ca0fe44cee03bba53a
---
M composer.lock
M extensions/Wikibase/client/i18n/ar.json
M extensions/Wikibase/client/i18n/de.json
M extensions/Wikibase/client/i18n/fr.json
M extensions/Wikibase/client/i18n/gl.json
M extensions/Wikibase/client/i18n/he.json
M extensions/Wikibase/client/i18n/it.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/zh-hans.json
M 
extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
M extensions/Wikibase/client/includes/Hooks/MagicWordHookHandlers.php
M extensions/Wikibase/repo/i18n/gl.json
A extensions/Wikibase/repo/tests/testDispatchCoordinator.php
M extensions/WikimediaBadges/package.json
M vendor/composer/installed.json
15 files changed, 300 insertions(+), 76 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index e57fab6..322a5ae 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1556,12 +1556,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "f37e244cd624ead83bc9552ff0b5d4c23880948e"
+"reference": "eb0756f3f2d86da9f8ce684234a59b04fedea5c8"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/f37e244cd624ead83bc9552ff0b5d4c23880948e;,
-"reference": "f37e244cd624ead83bc9552ff0b5d4c23880948e",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/eb0756f3f2d86da9f8ce684234a59b04fedea5c8;,
+"reference": "eb0756f3f2d86da9f8ce684234a59b04fedea5c8",
 "shasum": ""
 },
 "require": {
@@ -1635,7 +1635,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-03-22 22:11:13"
+"time": "2017-03-24 03:39:57"
 },
 {
 "name": "wikibase/wikimedia-badges",
@@ -1643,7 +1643,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges;,
-"reference": "d9546983a02b4b693f66f095916a0b3e043722c4"
+"reference": "d4a58bada110d31d1a5c6a9a02b2778950c4cd27"
 },
 "require": {
 "php": ">=5.3.0"
@@ -1677,7 +1677,7 @@
 "support": {
 "irc": "irc://irc.freenode.net/wikidata"
 },
-"time": "2017-02-20 23:04:34"
+"time": "2017-03-23 18:33:02"
 },
 {
 "name": "wikimedia/assert",
diff --git a/extensions/Wikibase/client/i18n/ar.json 
b/extensions/Wikibase/client/i18n/ar.json
index ada4bd7..ccc0d58 100644
--- a/extensions/Wikibase/client/i18n/ar.json
+++ b/extensions/Wikibase/client/i18n/ar.json
@@ -85,6 +85,7 @@
"wikibase-rc-show-wikidata-pref": "إظهار تعديلات {{WBREPONAME}} في صفحة 
أحدث التغييرات",
"wikibase-rc-wikibase-edit-letter": "د",
"wikibase-rc-wikibase-edit-title": "تعديل {{WBREPONAME}}",
+   "wikibase-rcfilters-hide-wikibase-label": "تعديلات {{WBREPONAME}}",
"wikibase-replicationnote": "قد يلزم وقت لتظهر التعديلات في جميع 
الويكيات.",
"wikibase-watchlist-show-changes-pref": "إظهار تعديلات {{WBREPONAME}} 
في قائمة مراقبتك",
"wikibase-error-deserialize-error": "فشل إلغاء تسلسل البيانات.",
diff --git a/extensions/Wikibase/client/i18n/de.json 
b/extensions/Wikibase/client/i18n/de.json
index 3503c63..3abb7da 100644
--- a/extensions/Wikibase/client/i18n/de.json
+++ b/extensions/Wikibase/client/i18n/de.json
@@ -73,6 +73,12 @@
"wikibase-rc-show-wikidata-pref": "Bearbeitungen auf {{WBREPONAME}} in 
den „Letzten Änderungen“ anzeigen",
"wikibase-rc-wikibase-edit-letter": "D",
"wikibase-rc-wikibase-edit-title": "{{WBREPONAME}}-Bearbeitung",
+   "wikibase-rcfilters-hide-wikibase-label": 
"{{WBREPONAME}}-Bearbeitungen",
+   "wikibase-rcfilters-hide-wikibase-description": "Bearbeitungen, die von 
{{WBREPONAME}} abstammen.",
+   "wikibase-rcfilters-hide-wikibase-conflicts-ores": "Dieser Filter 
befindet sich in Konflikt mit einem oder mehreren Beitragqualitäts- oder 
Benutzerabsichtfiltern. Qualitäts- und Absichtprognosen sind für 
{{WBREPONAME}}-Bearbeitungen nicht verfügbar.",
+   "wikibase-rcfilters-hide-wikibase-conflicts-ores-global": "Der Filter 
„{{WBREPONAME}}-Bearbeitungen“ befindet sich in Konflikt mit einem oder 
mehreren 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rename CategorySelector to CategorySelectorWidget

2017-03-24 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344588 )

Change subject: Rename CategorySelector to CategorySelectorWidget
..

Rename CategorySelector to CategorySelectorWidget

For consistency.

Bug: T161285
Change-Id: I7c9e0089ba6b77f4bc73e14b989630487f6f3174
---
M resources/Resources.php
R resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js
2 files changed, 60 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/88/344588/1

diff --git a/resources/Resources.php b/resources/Resources.php
index b9fcb51..7e79586 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2355,9 +2355,27 @@
'targets' => [ 'desktop', 'mobile' ],
],
'mediawiki.widgets.CategorySelector' => [
+   'deprecated' => 'Use of the 
"mediawiki.widgets.CategorySelector" module is deprecated. Use 
"mediawiki.widgets.CategorySelectorWidget instead. (See T161285)',
'scripts' => [

'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
-   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js',
+   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js',
+   ],
+   'dependencies' => [
+   'oojs-ui-widgets',
+   'mediawiki.api',
+   'mediawiki.ForeignApi',
+   'mediawiki.Title',
+   ],
+   'messages' => [
+   'red-link-title',
+   'mw-widgets-categoryselector-add-category-placeholder'
+   ],
+   'targets' => [ 'desktop', 'mobile' ],
+   ],
+   'mediawiki.widgets.CategorySelectorWidget' => [
+   'scripts' => [
+   
'resources/src/mediawiki.widgets/mw.widgets.CategoryCapsuleItemWidget.js',
+   
'resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js',
],
'dependencies' => [
'oojs-ui-widgets',
diff --git a/resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js 
b/resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js
similarity index 74%
rename from resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js
rename to resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js
index 422c048..01f5a0e 100644
--- a/resources/src/mediawiki.widgets/mw.widgets.CategorySelector.js
+++ b/resources/src/mediawiki.widgets/mw.widgets.CategorySelectorWidget.js
@@ -1,31 +1,30 @@
 /*!
- * MediaWiki Widgets - CategorySelector class.
+ * MediaWiki Widgets - CategorySelectorWidget class.
  *
  * @copyright 2011-2015 MediaWiki Widgets Team and others; see AUTHORS.txt
  * @license The MIT License (MIT); see LICENSE.txt
  */
 ( function ( $, mw ) {
-   var CSP,
-   NS_CATEGORY = mw.config.get( 'wgNamespaceIds' ).category;
+   var NS_CATEGORY = mw.config.get( 'wgNamespaceIds' ).category;
 
/**
 * Category selector widget. Displays an OO.ui.CapsuleMultiselectWidget
 * and autocompletes with available categories.
 *
-* mw.loader.using( 'mediawiki.widgets.CategorySelector', function 
() {
-*   var selector = new mw.widgets.CategorySelector( {
+* mw.loader.using( 'mediawiki.widgets.CategorySelectorWidget', 
function () {
+*   var selector = new mw.widgets.CategorySelectorWidget( {
 * searchTypes: [
-*   mw.widgets.CategorySelector.SearchType.OpenSearch,
-*   mw.widgets.CategorySelector.SearchType.InternalSearch
+*   mw.widgets.CategorySelectorWidget.SearchType.OpenSearch,
+*   mw.widgets.CategorySelectorWidget.SearchType.InternalSearch
 * ]
 *   } );
 *
 *   $( 'body' ).append( selector.$element );
 *
-*   selector.setSearchTypes( [ 
mw.widgets.CategorySelector.SearchType.SubCategories ] );
+*   selector.setSearchTypes( [ 
mw.widgets.CategorySelectorWidget.SearchType.SubCategories ] );
 * } );
 *
-* @class mw.widgets.CategorySelector
+* @class mw.widgets.CategorySelectorWidget
 * @uses mw.Api
 * @extends OO.ui.CapsuleMultiselectWidget
 * @mixins OO.ui.mixin.PendingElement
@@ -34,21 +33,21 @@
 * @param {Object} [config] Configuration options
 * @cfg {mw.Api} [api] Instance of mw.Api (or subclass thereof) to use 
for queries
 * @cfg {number} [limit=10] Maximum number of results to load
-* @cfg {mw.widgets.CategorySelector.SearchType[]} 
[searchTypes=[mw.widgets.CategorySelector.SearchType.OpenSearch]]
+* @cfg 

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

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

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


New Wikidata Build - 2017-03-24T10:00:01+

Change-Id: Ibc141d58cad359370c7149ca0fe44cee03bba53a
---
M composer.lock
M extensions/Wikibase/client/i18n/ar.json
M extensions/Wikibase/client/i18n/de.json
M extensions/Wikibase/client/i18n/fr.json
M extensions/Wikibase/client/i18n/gl.json
M extensions/Wikibase/client/i18n/he.json
M extensions/Wikibase/client/i18n/it.json
M extensions/Wikibase/client/i18n/qqq.json
M extensions/Wikibase/client/i18n/zh-hans.json
M 
extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
M extensions/Wikibase/client/includes/Hooks/MagicWordHookHandlers.php
M extensions/Wikibase/repo/i18n/gl.json
A extensions/Wikibase/repo/tests/testDispatchCoordinator.php
M extensions/WikimediaBadges/package.json
M vendor/composer/installed.json
15 files changed, 300 insertions(+), 76 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index e57fab6..322a5ae 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1556,12 +1556,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "f37e244cd624ead83bc9552ff0b5d4c23880948e"
+"reference": "eb0756f3f2d86da9f8ce684234a59b04fedea5c8"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/f37e244cd624ead83bc9552ff0b5d4c23880948e;,
-"reference": "f37e244cd624ead83bc9552ff0b5d4c23880948e",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/eb0756f3f2d86da9f8ce684234a59b04fedea5c8;,
+"reference": "eb0756f3f2d86da9f8ce684234a59b04fedea5c8",
 "shasum": ""
 },
 "require": {
@@ -1635,7 +1635,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-03-22 22:11:13"
+"time": "2017-03-24 03:39:57"
 },
 {
 "name": "wikibase/wikimedia-badges",
@@ -1643,7 +1643,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/WikimediaBadges;,
-"reference": "d9546983a02b4b693f66f095916a0b3e043722c4"
+"reference": "d4a58bada110d31d1a5c6a9a02b2778950c4cd27"
 },
 "require": {
 "php": ">=5.3.0"
@@ -1677,7 +1677,7 @@
 "support": {
 "irc": "irc://irc.freenode.net/wikidata"
 },
-"time": "2017-02-20 23:04:34"
+"time": "2017-03-23 18:33:02"
 },
 {
 "name": "wikimedia/assert",
diff --git a/extensions/Wikibase/client/i18n/ar.json 
b/extensions/Wikibase/client/i18n/ar.json
index ada4bd7..ccc0d58 100644
--- a/extensions/Wikibase/client/i18n/ar.json
+++ b/extensions/Wikibase/client/i18n/ar.json
@@ -85,6 +85,7 @@
"wikibase-rc-show-wikidata-pref": "إظهار تعديلات {{WBREPONAME}} في صفحة 
أحدث التغييرات",
"wikibase-rc-wikibase-edit-letter": "د",
"wikibase-rc-wikibase-edit-title": "تعديل {{WBREPONAME}}",
+   "wikibase-rcfilters-hide-wikibase-label": "تعديلات {{WBREPONAME}}",
"wikibase-replicationnote": "قد يلزم وقت لتظهر التعديلات في جميع 
الويكيات.",
"wikibase-watchlist-show-changes-pref": "إظهار تعديلات {{WBREPONAME}} 
في قائمة مراقبتك",
"wikibase-error-deserialize-error": "فشل إلغاء تسلسل البيانات.",
diff --git a/extensions/Wikibase/client/i18n/de.json 
b/extensions/Wikibase/client/i18n/de.json
index 3503c63..3abb7da 100644
--- a/extensions/Wikibase/client/i18n/de.json
+++ b/extensions/Wikibase/client/i18n/de.json
@@ -73,6 +73,12 @@
"wikibase-rc-show-wikidata-pref": "Bearbeitungen auf {{WBREPONAME}} in 
den „Letzten Änderungen“ anzeigen",
"wikibase-rc-wikibase-edit-letter": "D",
"wikibase-rc-wikibase-edit-title": "{{WBREPONAME}}-Bearbeitung",
+   "wikibase-rcfilters-hide-wikibase-label": 
"{{WBREPONAME}}-Bearbeitungen",
+   "wikibase-rcfilters-hide-wikibase-description": "Bearbeitungen, die von 
{{WBREPONAME}} abstammen.",
+   "wikibase-rcfilters-hide-wikibase-conflicts-ores": "Dieser Filter 
befindet sich in Konflikt mit einem oder mehreren Beitragqualitäts- oder 
Benutzerabsichtfiltern. Qualitäts- und Absichtprognosen sind für 
{{WBREPONAME}}-Bearbeitungen nicht verfügbar.",
+   "wikibase-rcfilters-hide-wikibase-conflicts-ores-global": "Der Filter 
„{{WBREPONAME}}-Bearbeitungen“ befindet sich in Konflikt mit einem oder 
mehreren Beitragqualitäts- oder 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Revert "Remove old remapping hacks from Database::indexName()"

2017-03-24 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344602 )

Change subject: Revert "Remove old remapping hacks from Database::indexName()"
..

Revert "Remove old remapping hacks from Database::indexName()"

This reverts commit bec6151e5fe30e780d82527c4c53e54379149a4e.

Change-Id: I1c67aa464a1f151562ef92fce03f825113847814
---
M includes/libs/rdbms/database/Database.php
M includes/libs/rdbms/database/DatabaseSqlite.php
2 files changed, 22 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/344602/1

diff --git a/includes/libs/rdbms/database/Database.php 
b/includes/libs/rdbms/database/Database.php
index d072754..b8cf63c 100644
--- a/includes/libs/rdbms/database/Database.php
+++ b/includes/libs/rdbms/database/Database.php
@@ -1952,7 +1952,18 @@
 * @return string
 */
protected function indexName( $index ) {
-   return $index;
+   // Backwards-compatibility hack
+   $renamed = [
+   'ar_usertext_timestamp' => 'usertext_timestamp',
+   'un_user_id' => 'user_id',
+   'un_user_ip' => 'user_ip',
+   ];
+
+   if ( isset( $renamed[$index] ) ) {
+   return $renamed[$index];
+   } else {
+   return $index;
+   }
}
 
public function addQuotes( $s ) {
diff --git a/includes/libs/rdbms/database/DatabaseSqlite.php 
b/includes/libs/rdbms/database/DatabaseSqlite.php
index ab5b081..cd17248 100644
--- a/includes/libs/rdbms/database/DatabaseSqlite.php
+++ b/includes/libs/rdbms/database/DatabaseSqlite.php
@@ -427,6 +427,16 @@
}
 
/**
+* Index names have DB scope
+*
+* @param string $index
+* @return string
+*/
+   protected function indexName( $index ) {
+   return $index;
+   }
+
+   /**
 * This must be called after nextSequenceVal
 *
 * @return int

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c67aa464a1f151562ef92fce03f825113847814
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update bacula::client to use base::expose_puppet_certs

2017-03-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344606 )

Change subject: Update bacula::client to use base::expose_puppet_certs
..

Update bacula::client to use base::expose_puppet_certs

expose the puppet certificate, key and keypair via
base::expose_puppet_certs and use them in the configurations
Update the RSpec tests as well

Bug: T161281
Change-Id: I8d49f96cbd4aa5542ac4eae6e01ee9a32aace734
---
M modules/bacula/.fixtures.yml
M modules/bacula/manifests/client.pp
M modules/bacula/spec/classes/bacula_client_spec.rb
M modules/bacula/templates/bacula-client.erb
M modules/bacula/templates/bacula-fd.conf.erb
5 files changed, 20 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/344606/1

diff --git a/modules/bacula/.fixtures.yml b/modules/bacula/.fixtures.yml
index f66bf01..9eda903 100644
--- a/modules/bacula/.fixtures.yml
+++ b/modules/bacula/.fixtures.yml
@@ -1,3 +1,6 @@
 fixtures:
 symlinks:
 bacula: "#{source_dir}"
+base: "../../../../base"
+wmflib: "../../../../wmflib"
+stdlib: "../../../../stdlib"
diff --git a/modules/bacula/manifests/client.pp 
b/modules/bacula/manifests/client.pp
index 467482a..811da19 100644
--- a/modules/bacula/manifests/client.pp
+++ b/modules/bacula/manifests/client.pp
@@ -44,6 +44,13 @@
 require => Package['bacula-fd'],
 }
 
+base::expose_puppet_certs { '/etc/bacula':
+provide_private => true,
+provide_keypair => true,
+user=> 'bacula',
+group   => 'bacula',
+}
+
 file { '/etc/bacula/bacula-fd.conf':
 ensure  => present,
 owner   => 'root',
@@ -55,17 +62,6 @@
 Package['bacula-fd'],
 Exec['concat-bacula-keypair'],
 ],
-}
-
-# To avoid reimplementing a PKI infrastructure we use puppet's already well
-# managed one. Bacula needs the keypair in one single file though hence 
this
-# resource
-exec { 'concat-bacula-keypair':
-command => "/bin/cat \
- /var/lib/puppet/ssl/private_keys/${::fqdn}.pem \
- /var/lib/puppet/ssl/certs/${::fqdn}.pem > \
- /var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem",
-creates => 
"/var/lib/puppet/ssl/private_keys/bacula-keypair-${::fqdn}.pem",
 }
 
 # We export oufself to the director
diff --git a/modules/bacula/spec/classes/bacula_client_spec.rb 
b/modules/bacula/spec/classes/bacula_client_spec.rb
index c289d4c..c1f43ec 100644
--- a/modules/bacula/spec/classes/bacula_client_spec.rb
+++ b/modules/bacula/spec/classes/bacula_client_spec.rb
@@ -14,7 +14,6 @@
 
 it { should contain_package('bacula-fd') }
 it { should contain_service('bacula-fd') }
-it { should contain_exec('concat-bacula-keypair') }
 it 'should generate valid content for /etc/bacula/bacula-fd.conf' do
 should contain_file('/etc/bacula/bacula-fd.conf').with({
 'ensure'  => 'present',
@@ -24,10 +23,10 @@
 }) \
 .with_content(/Name = "testdirector"/) \
 .with_content(/Password = "testdirectorpass"/) \
-.with_content(/TLS Certificate = 
"\/var\/lib\/puppet\/ssl\/certs\/testhost.example.com.pem"/) \
-.with_content(/TLS Key = 
"\/var\/lib\/puppet\/ssl\/private_keys\/testhost.example.com.pem"/) \
+.with_content(/TLS Certificate = "\/etc\/bacula\/ssl\/server.pem"/) \
+.with_content(/TLS Key = "\/etc\/bacula\/ssl\/server.key"/) \
 .with_content(/Name = "testhost.example.com-fd"/) \
 .with_content(/FDport = 2000/) \
-.with_content(/PKI Keypair = 
"\/var\/lib\/puppet\/ssl\/private_keys\/bacula-keypair-testhost.example.com.pem"/)
+.with_content(/PKI Keypair = "\/etc\/bacula\/ssl\/server-keypair.pem"/)
 end
 end
diff --git a/modules/bacula/templates/bacula-client.erb 
b/modules/bacula/templates/bacula-client.erb
index 018a3d7..5156019 100644
--- a/modules/bacula/templates/bacula-client.erb
+++ b/modules/bacula/templates/bacula-client.erb
@@ -12,8 +12,8 @@
 TLS Enable = yes
 TLS Require = yes
 TLS CA Certificate File = "/var/lib/puppet/ssl/certs/ca.pem"
-TLS Certificate = "/var/lib/puppet/ssl/certs/<%= @director -%>.pem"
-TLS Key = "/var/lib/puppet/ssl/private_keys/bacula-<%= @director -%>.pem"
+TLS Certificate = "/etc/bacula/ssl/server.key"
+TLS Key = "/etc/bacula/ssl/server-keypair.pem"
 # Priority = 10
 # Maximum Bandwith Per Job =
 # Autoprune = yes
diff --git a/modules/bacula/templates/bacula-fd.conf.erb 
b/modules/bacula/templates/bacula-fd.conf.erb
index 0f9d655..0287848 100644
--- a/modules/bacula/templates/bacula-fd.conf.erb
+++ b/modules/bacula/templates/bacula-fd.conf.erb
@@ -9,8 +9,8 @@
 TLS Require = yes
 TLS CA Certificate File = "/var/lib/puppet/ssl/certs/ca.pem"
 TLS Verify Peer = yes
-TLS Certificate = 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Repool db1056

2017-03-24 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344605 )

Change subject: db-eqiad.php: Repool db1056
..

db-eqiad.php: Repool db1056

db1056 finished the alter table

Bug: T73563
Bug: T160415
Change-Id: I85ae8971da4740d0280ba37b26fd1001479f0992
---
M wmf-config/db-eqiad.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 99b2272..56e4469 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -130,7 +130,7 @@
's4' => [
'db1040' => 0,   # B2 1.4TB  64GB, master
'db1053' => 1,   # A2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
-#  'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager T160415 T73563
+   'db1056' => 1,   # C2 2.8TB  96GB, watchlist, recentchanges, 
contributions, logpager
'db1059' => 1,   # C2 2.8TB  96GB, api
'db1064' => 0,   # D1 2.8TB 160GB, vslow, dump #Master for 
db1095 - new sanitarium
'db1068' => 1,   # D1 2.8TB 160GB, api
@@ -332,23 +332,23 @@
],
'watchlist' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'recentchanges' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'recentchangeslinked' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'contributions' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
'logpager' => [
'db1053' => 1,
-#  'db1056' => 1,
+   'db1056' => 1,
],
],
's5' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: Item Navigation

2017-03-24 Thread Sebschlicht2 (Code Review)
Sebschlicht2 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344587 )

Change subject: Item Navigation
..

Item Navigation

For a better overview for users, this change introduces the item
navigation as known from the prototype.
It is a small additional navigation bar placed above the sections
and their sticky headers to quickly switch between them.
JS code and style directives have been added. Item models now
communicate their active sections in order to generate both the new
item navigation and the sections.

Change-Id: Id93544c14e0aa19304d169bed7d64eed1e4695d2
---
M extension.json
M includes/rendering/MoocContentRenderer.php
M includes/rendering/MoocLessonRenderer.php
M includes/rendering/MoocOverviewRenderer.php
M includes/rendering/MoocUnitRenderer.php
M resources/js/ext.mooc.headers.js
A resources/js/ext.mooc.itemnav.js
M resources/js/ext.mooc.js
M resources/less/ext.mooc.less
9 files changed, 291 insertions(+), 72 deletions(-)


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

diff --git a/extension.json b/extension.json
index 002ccb3..9de9502 100644
--- a/extension.json
+++ b/extension.json
@@ -78,6 +78,7 @@
   "scripts": [
 "resources/js/ext.mooc.js",
 "resources/js/ext.mooc.navigation.js",
+"resources/js/ext.mooc.itemnav.js",
 "resources/js/ext.mooc.headers.js",
 "resources/js/ext.mooc.edit.js",
 "resources/js/jquery-ui.min.js"
diff --git a/includes/rendering/MoocContentRenderer.php 
b/includes/rendering/MoocContentRenderer.php
index 4aa980f..6734053 100644
--- a/includes/rendering/MoocContentRenderer.php
+++ b/includes/rendering/MoocContentRenderer.php
@@ -123,6 +123,8 @@
 
 // ## sections
 $this->out->addHTML( '' );
+// ### item navigation
+$this->addItemNavigation();
 $this->addSections();
 $this->out->addHTML( '' );
 
@@ -146,13 +148,69 @@
 // 
 
 /**
+ * Identifies the active sections of a certain item (type).
+ *
+ * @return array identifiers of the item's sections
+ */
+abstract protected function getSections();
+
+protected function addItemNavigation() {
+$this->out->addHTML( '' );
+$this->out->addHTML( '' );
+foreach ( $this->getSections() as $sectionId ) {
+$sectionTitle = $this->loadMessage( "section-$sectionId-title" );
+$this->out->addHTML( "" );
+$this->addSectionIcon( $sectionId );
+$this->out->addHTML( "$sectionTitle" );
+$this->out->addHTML( '' );
+}
+$this->out->addHTML( '' );
+$this->out->addHTML( '' );
+}
+
+/**
  * Adds the sections of the MOOC item to the current output.
  */
-abstract protected function addSections();
+protected function addSections() {
+foreach ( $this->getSections() as $sectionId ) {
+$this->beginSection( $sectionId );
+$this->addSection( $sectionId );
+$this->endSection();
+}
+}
+
+/**
+ * @param $sectionId string section identifier
+ */
+protected function addSection( $sectionId ) {
+switch ( $sectionId ) {
+case self::SECTION_KEY_LEARNING_GOALS:
+$this->addLearningGoalsSection();
+break;
+
+case self::SECTION_KEY_VIDEO:
+$this->addVideoSection();
+break;
+
+case self::SECTION_KEY_SCRIPT:
+$this->addScriptSection();
+break;
+
+case self::SECTION_KEY_QUIZ:
+$this->addQuizSection();
+break;
+
+case self::SECTION_KEY_FURTHER_READING:
+$this->addFurtherReadingSection();
+break;
+
+default:
+// unknown section identifier
+break;
+}
+}
 
 protected function addLearningGoalsSection() {
-$this->beginSection( self::SECTION_KEY_LEARNING_GOALS );
-
 // add learning goals as unordered list, if any
 $learningGoals = self::generateUnorderedList( 
$this->item->learningGoals );
 if ( $learningGoals !== null ) {
@@ -161,13 +219,9 @@
 // show info box if no learning goal added yet
 $this->addEmptySectionBox( self::SECTION_KEY_LEARNING_GOALS );
 }
-
-$this->endSection();
 }
 
 protected function addVideoSection() {
-$this->beginSection( self::SECTION_KEY_VIDEO );
-
 if ( $this->item->hasVideo() ) {
 // show video player if video set
 $this->out->addWikiText( '[[File:' . $this->item->video. 
'|800px]]' );
@@ -175,13 +229,9 @@
 // show info box if video not set yet
 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Change bad ASCII to UTF-8 validation in terms/value validators

2017-03-24 Thread WMDE
Thiemo Mättig (WMDE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344597 )

Change subject: Change bad ASCII to UTF-8 validation in terms/value validators
..

Change bad ASCII to UTF-8 validation in terms/value validators

We need to BACKPORT this. Not necesarrily the tests. I also believe the
changes to ValidatorBuilders are not deployed yet. So the only file that
needs backporting is TermValidatorFactory.

Bug: T161263
Change-Id: If129df5364afd03848d40658f605923d252e4a69
---
M repo/includes/ValidatorBuilders.php
M repo/includes/Validators/TermValidatorFactory.php
M repo/tests/phpunit/includes/ValidatorBuildersTest.php
M repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
4 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/repo/includes/ValidatorBuilders.php 
b/repo/includes/ValidatorBuilders.php
index af5649d..f11a072 100644
--- a/repo/includes/ValidatorBuilders.php
+++ b/repo/includes/ValidatorBuilders.php
@@ -176,7 +176,7 @@
$validators[] = new TypeValidator( 'string' );
//TODO: validate UTF8 (here and elsewhere)
$validators[] = new StringLengthValidator( 1, $maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/includes/Validators/TermValidatorFactory.php 
b/repo/includes/Validators/TermValidatorFactory.php
index 3fa10c3..1cc80e7 100644
--- a/repo/includes/Validators/TermValidatorFactory.php
+++ b/repo/includes/Validators/TermValidatorFactory.php
@@ -128,7 +128,7 @@
$validators = array();
$validators[] = new TypeValidator( 'string' );
$validators[] = new StringLengthValidator( 1, $this->maxLength, 
'mb_strlen' );
-   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/', true ); 
// no leading/trailing whitespace, no line breaks.
+   $validators[] = new RegexValidator( '/^\s|[\v\t]|\s$/u', true 
); // no leading/trailing whitespace, no line breaks.
 
return $validators;
}
diff --git a/repo/tests/phpunit/includes/ValidatorBuildersTest.php 
b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
index c142225..31d8f8d 100644
--- a/repo/tests/phpunit/includes/ValidatorBuildersTest.php
+++ b/repo/tests/phpunit/includes/ValidatorBuildersTest.php
@@ -221,6 +221,7 @@
return [
'Space' => [ 'x x', true ],
'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
 
// Length checks
'To short' => [ '', false ],
@@ -240,7 +241,7 @@
'U+000B: Vertical tab' => [ "x\x0Bx", false ],
'U+000C: Form feed' => [ "x\fx", false ],
'U+000D: Return' => [ "x\rx", false ],
-   'U+0085: Next line' => [ "x\x85x", false ],
+   'U+0085: Next line' => [ "x\xC2\x85x", false ],
];
}
 
diff --git 
a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php 
b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
index ae513b5..5214e38 100644
--- a/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
+++ b/repo/tests/phpunit/includes/Validators/TermValidatorFactoryTest.php
@@ -111,6 +111,7 @@
return [
'Space' => [ 'x x', true ],
'Unicode support' => [ 'Äöü', true ],
+   'T161263' => [ 'Ӆ', true ],
 
// Length checks
'To short' => [ '', false ],
@@ -130,7 +131,7 @@
'U+000B: Vertical tab' => [ "x\x0Bx", false ],
'U+000C: Form feed' => [ "x\fx", false ],
'U+000D: Return' => [ "x\rx", false ],
-   'U+0085: Next line' => [ "x\x85x", false ],
+   'U+0085: Next line' => [ "x\xC2\x85x", false ],
];
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If129df5364afd03848d40658f605923d252e4a69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Forgotten unicode regex flag

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

Change subject: Forgotten unicode regex flag
..

Forgotten unicode regex flag

Bug: T161263
Change-Id: Iaa90f4faed62910cd69f472ea7ab8b602797a310
---
M src/Validators/LexemeValidatorFactory.php
M tests/phpunit/mediawiki/Validators/LexemeValidatorFactoryTest.php
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/src/Validators/LexemeValidatorFactory.php 
b/src/Validators/LexemeValidatorFactory.php
index 360140d..c626872 100644
--- a/src/Validators/LexemeValidatorFactory.php
+++ b/src/Validators/LexemeValidatorFactory.php
@@ -58,7 +58,7 @@
[
new TypeValidator( 'string' ),
new StringLengthValidator( 1, 
$this->maxTermLength, 'mb_strlen' ),
-   new RegexValidator( '/^\s|[\v\t]|\s$/', true ),
+   new RegexValidator( '/^\s|[\v\t]|\s$/u', true ),
],
true
);
diff --git a/tests/phpunit/mediawiki/Validators/LexemeValidatorFactoryTest.php 
b/tests/phpunit/mediawiki/Validators/LexemeValidatorFactoryTest.php
index 090b979..cec5b17 100644
--- a/tests/phpunit/mediawiki/Validators/LexemeValidatorFactoryTest.php
+++ b/tests/phpunit/mediawiki/Validators/LexemeValidatorFactoryTest.php
@@ -77,6 +77,7 @@
public function lemmaTermProvider() {
return [
'valid' => [ true, 'foo' ],
+   'cyrillic "х"' => [ true, 'х' ],
'not a string' => [ false, false ],
'empty' => [ false, '' ],
'exceeds maxLength of 10' => [ false, 'foo' ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Removed "successfully" from messages

2017-03-24 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344608 )

Change subject: Removed "successfully" from messages
..

Removed "successfully" from messages

According to
https://www.mediawiki.org/wiki/Localisation#Avoid_jargon_and_slang

Change-Id: I75a38698c2720ecfeb7c1c3962a47bf49f8b98b1
---
M i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 76cae3f..4205e4b 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -40,7 +40,7 @@
"collaborationkit-list-toomanytags": "You are not allowed to specify 
more than {{PLURAL:$1|one tag|$1 tags}}.",
"collaborationkit-list-delete": "Remove item",
"collaborationkit-list-delete-summary": "/* $1 */ Deleting from list.",
-   "collaborationkit-list-delete-popup": "Successfully saved: $1 was 
deleted from the list.",
+   "collaborationkit-list-delete-popup": "Saved: $1 was deleted from the 
list.",
"collaborationkit-list-delete-popup-title": "Item Deleted",
"collaborationkit-list-add": "Add new item to list",
"collaborationkit-list-add-user": "Add user to list",
@@ -54,7 +54,7 @@
"collaborationkit-list-error-saving": "Your edits to the list did not 
save. Please refresh the page and try again.",
"collaborationkit-list-move": "Re-order this item",
"collaborationkit-list-move-summary": "/* $1 */ Reordering item [[$1]]",
-   "collaborationkit-list-move-popup": "Successfully saved: $1 was 
re-ordered.",
+   "collaborationkit-list-move-popup": "Saved: $1 was re-ordered.",
"collaborationkit-list-move-popup-title": "Page Saved",
"collaborationkit-list-newitem-title": "Add item to list",
"collaborationkit-list-newitem-label": "Add to list",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75a38698c2720ecfeb7c1c3962a47bf49f8b98b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollaborationKit
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Move the hook onUnitTestsList on a separate file

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

Change subject: Move the hook onUnitTestsList on a separate file
..


Move the hook onUnitTestsList on a separate file

It is not useful it stays in the main class, so separation
of concerns.

Change-Id: If08160ace6e4ed46a80203597b4b9d43efe9e60f
---
M extension.json
A src/Hooks.php
M src/MediaWikiFarm.php
M tests/phpunit/FunctionsTest.php
A tests/phpunit/HooksTest.php
5 files changed, 80 insertions(+), 44 deletions(-)

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



diff --git a/extension.json b/extension.json
index 3304cf7..b8c184f 100644
--- a/extension.json
+++ b/extension.json
@@ -23,13 +23,14 @@
},
"Hooks": {
"UnitTestsList": [
-   "MediaWikiFarm::onUnitTestsList"
+   "MediaWikiFarmHooks::onUnitTestsList"
]
},
"AutoloadClasses": {
"MediaWikiFarm": "src/MediaWikiFarm.php",
"AbstractMediaWikiFarmScript": 
"src/AbstractMediaWikiFarmScript.php",
"MediaWikiFarmScript": "src/MediaWikiFarmScript.php",
+   "MediaWikiFarmHooks": "src/Hooks.php",
"MWFConfigurationException": "src/MediaWikiFarm.php"
},
"manifest_version": 1
diff --git a/src/Hooks.php b/src/Hooks.php
new file mode 100644
index 000..7c2fd12
--- /dev/null
+++ b/src/Hooks.php
@@ -0,0 +1,48 @@
+
+ * @license GPL-3.0+ GNU General Public License v3.0, or (at your option) any 
later version.
+ * @license AGPL-3.0+ GNU Affero General Public License v3.0, or (at your 
option) any later version.
+ */
+
+/**
+ * MediaWiki hooks.
+ *
+ * @package MediaWikiFarm
+ */
+class MediaWikiFarmHooks {
+
+   /**
+* Add files for unit testing.
+*
+* Only useful for MediaWiki 1.27- since MediaWiki 1.28+ autodiscovers 
these files.
+* Given this hook is never useful at runtime, it should be moved to a 
separate file
+* if MediaWiki runtime hooks are added in this file.
+*
+* @api
+*
+* @param string[] $files The test files.
+* @return true
+*/
+   public static function onUnitTestsList( array &$files ) {
+
+   $dir = dirname( dirname( __FILE__ ) ) . '/tests/phpunit/';
+
+   $files[] = $dir . 'ConfigurationTest.php';
+   $files[] = $dir . 'ConstructionTest.php';
+   $files[] = $dir . 'FunctionsTest.php';
+   $files[] = $dir . 'HooksTest.php';
+   $files[] = $dir . 'InstallationIndependantTest.php';
+   $files[] = $dir . 'LoadingTest.php';
+   $files[] = $dir . 'LoggingTest.php';
+   $files[] = $dir . 'MediaWikiFarmComposerScriptTest.php';
+   $files[] = $dir . 'MediaWikiFarmScriptTest.php';
+   $files[] = $dir . 'MonoversionInstallationTest.php';
+   $files[] = $dir . 'MultiversionInstallationTest.php';
+
+   return true;
+   }
+}
diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 5339e58..79dd68d 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -469,9 +469,10 @@
$GLOBALS['wgAutoloadClasses']['MediaWikiFarm'] = 
'src/MediaWikiFarm.php';

$GLOBALS['wgAutoloadClasses']['AbstractMediaWikiFarmScript'] = 
'src/AbstractMediaWikiFarmScript.php';
$GLOBALS['wgAutoloadClasses']['MediaWikiFarmScript'] = 
'src/MediaWikiFarmScript.php';
+   $GLOBALS['wgAutoloadClasses']['MediaWikiFarmHooks'] = 
'src/Hooks.php';

$GLOBALS['wgAutoloadClasses']['MWFConfigurationException'] = 
'src/MediaWikiFarm.php';
$GLOBALS['wgMessagesDirs']['MediaWikiFarm'] = array( 
'i18n' );
-   $GLOBALS['wgHooks']['UnitTestsList'][] = array( 
'MediaWikiFarm::onUnitTestsList' );
+   $GLOBALS['wgHooks']['UnitTestsList'][] = array( 
'MediaWikiFarmHooks::onUnitTestsList' );
}
}
 
@@ -1634,33 +1635,6 @@
}
 
throw new InvalidArgumentException( 'Argument of 
MediaWikiFarm->replaceVariables() must be a string or an array.' );
-   }
-
-   /**
-* Add files for unit testing.
-*
-* @mediawikifarm-const
-* @mediawikifarm-idempotent
-*
-* @param string[] $files The test files.
-* @return true
-*/
-   static function onUnitTestsList( array &$files ) {
-
-   $dir = dirname( dirname( __FILE__ ) ) . '/tests/phpunit/';
-
-   $files[] = $dir . 'ConfigurationTest.php';
-   $files[] = $dir . 'ConstructionTest.php';
-   $files[] = $dir . 'FunctionsTest.php';
-   $files[] = $dir . 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: VisualEditor: introducing DOM preprocessor

2017-03-24 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344609 )

Change subject: VisualEditor: introducing DOM preprocessor
..

VisualEditor: introducing DOM preprocessor

A DOM preprocessor is introduced which currently only replaces certain
spans (underline and strike). This is neccessary because it is the
correct way to handle nested spans, where regexs would fail. In the wake
of this change, handling of external links was improved, as the html
produced was a mess.

Patch Set 2: Implemented CR

Change-Id: I6a63524576ebc0869bb77c9621106d563625f390
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 44 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/09/344609/1

diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index e655a45..e987169 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -337,7 +337,7 @@
}
 
function _image2wiki(text) {
-   var images = 
text.match(/(]*?)>)?]*?)\/>(<\/a>)?/gi);
+   var images = 
text.match(/(]*?)>)?]*?)\/?>(<\/a>)?/gi);
if (!images)
return text;
 
@@ -614,13 +614,15 @@
_externalLinkNo++;
}
linkHtml = anchorFormat.format(
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // href
-   linkLabel,  
// linkLabel
-   'external_link',
// data-bs-type
-   'external bs-external-link 
bs-protocol-'+protocol,  // class
-   $( '' ).text( link ).html(),  
// data-bs-wikitext
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // data-mce-href
-   $( '' ).text( linkLabel ).html()  
// title
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // href
+   linkLabel,  
 // linkLabel
+   'external_link',
 // data-bs-type
+   'external bs-external-link 
bs-protocol-' + protocol, // class
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( link 
).html() ),  // data-bs-wikitext
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // data-mce-href
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( 
linkLabel ).html() )  // title
);
text = text.replace("[" + linkNoWrap + "]", 
linkHtml);
}
@@ -1425,7 +1427,7 @@
$(document).trigger('BSVisualEditorBeforeHtmlToWiki', 
[textObject]);
// get the text back
text = textObject.text;
-   // Normalize UTF8 spaces as aof TinyMCE 3.4.9
+   // Normalize UTF8 spaces as of TinyMCE 3.4.9
text = text.replace(/\u00a0/gi, '');
//Save content of pre tags
text = _preservePres(text);
@@ -1438,8 +1440,6 @@
text = text.replace(/(.*?)<\/i>/gmi, "''$1''");
//underline needs no conversion
text = text.replace(/(.*?)<\/strike>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
//sub and sup need no conversion
 
text = text.replace(/]*>/gmi, 
"@@br_emptyline_first@@");
@@ -2289,6 +2289,37 @@
}
 
/**
+* Preprocess HTML in DOM form. This is mainly used to replace tags
+* @param {String} text
+* @returns {String}
+*/
+   function _preprocessHtml2Wiki( text ) {
+   // convert html text to DOM
+   var $dom = $( "" + text + "" );
+
+   // perform the actual preprocessing
+   $dom.find( "span[style*='text-decoration: underline']" 
).replaceWith( function() {
+   return 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Ignore directory .git in PHP_CodeSniffer

2017-03-24 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344610 )

Change subject: Ignore directory .git in PHP_CodeSniffer
..

Ignore directory .git in PHP_CodeSniffer

Unfortunately I have a local branch ending with .php and phpcs is
checking it (and obviously is trigerring errors)

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiFarm 
refs/changes/10/344610/1

diff --git a/composer.json b/composer.json
index 61956c2..4ff65bd 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
"scripts": {
"validate-schema": "php ./bin/validate-schema.php",
"lint": "parallel-lint --exclude vendor .",
-   "phpcs": "phpcs -p -s",
+   "phpcs": "phpcs -p -s --ignore=.git",
"phpdoc": "[ \"`which phpdoc`\" = \"\" ] || phpdoc -d bin,src 
-t ./docs/code",
"phpunit": "which phpdbg && phpdbg -qrr `which phpunit` 
--strict-coverage || phpunit --strict-coverage",
"unit": "phpunit --no-coverage",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11f121802c6bfce1723e71a65853335e8312f627
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: contint: install PhantomJS from backport

2017-03-24 Thread Hashar (Code Review)
Hashar has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344613 )

Change subject: contint: install PhantomJS from backport
..

contint: install PhantomJS from backport

The headless browser PhantomJS is not available in Jessie but a backport
has been added on March 8th in jessie-backports.

We have a few jobs that are either still running on Trusty or end up
downloading PhantomJS. For example for the repositories:

mediawiki/selenium
oojs/ui
unicodejs
wikimedia-portals

Use apt::pin on Jessie machine to bring in PhantomJS.

Bug: T137112
Change-Id: I695730ba827ebb292687c2f55a1e7341c84fc4fb
---
M modules/contint/manifests/browsers.pp
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/344613/1

diff --git a/modules/contint/manifests/browsers.pp 
b/modules/contint/manifests/browsers.pp
index d8251df..672f2fa 100644
--- a/modules/contint/manifests/browsers.pp
+++ b/modules/contint/manifests/browsers.pp
@@ -13,12 +13,18 @@
 'chromium',
 'chromedriver',
 'firefox-esr',
-# phantomjs is not available on Jessie
 ]
 file { '/usr/local/bin/chromedriver':
   ensure => link,
   target => '/usr/lib/chromium/chromedriver',
 }
+
+if os_version( 'debian == jessie' ) {
+apt::pin { 'phantomjs':
+pin  => 'release a=jessie-backports',
+priority => '1001',
+}
+}
 } elsif os_version('ubuntu >= trusty') {
 $latest_packages = [
 'chromium-browser',

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labtestvirt2002: Try a different partman config

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

Change subject: Labtestvirt2002:  Try a different partman config
..


Labtestvirt2002:  Try a different partman config

I'm going to set up a hardware raid by hand and see
if this trivial partman recipe works.

Change-Id: I5bb3f4f3a3be608f7453d0c1656d79f3024b324c
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 03968c2..9817abf 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -97,7 +97,7 @@
 labtestweb2001) echo partman/raid1.cfg ;; \
 labtestservices2001) echo partman/raid1.cfg ;; \
 labtestvirt2001) echo partman/raid1.cfg ;; \
-labtestvirt2002) echo partman/raid1.cfg ;; \
+labtestvirt2002) echo partman/flat.cfg ;; \
 labvirt100[1-9]) echo partman/virt-hp.cfg ;; \
 labvirt101[0-4]) echo partman/labvirt-ssd.cfg ;; \
 lithium|wezen) echo partman/raid1-gpt.cfg ;; \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5bb3f4f3a3be608f7453d0c1656d79f3024b324c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
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]: Adapt debdeploy grain to rename of nova::manager

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344615 )

Change subject: Adapt debdeploy grain to rename of nova::manager
..

Adapt debdeploy grain to rename of nova::manager

Change-Id: Ifb266f53d1a658c9c08a9b12ee161b072cdb96a3
---
R hieradata/role/common/labs/openstack/nova/manager.yaml
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/344615/1

diff --git a/hieradata/role/common/nova/manager.yaml 
b/hieradata/role/common/labs/openstack/nova/manager.yaml
similarity index 100%
rename from hieradata/role/common/nova/manager.yaml
rename to hieradata/role/common/labs/openstack/nova/manager.yaml

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BSSmartList: Fixed I18N; Added tag aliases

2017-03-24 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344590 )

Change subject: BSSmartList: Fixed I18N; Added tag aliases
..

BSSmartList: Fixed I18N; Added tag aliases

Change-Id: I0f99371a92093508d5bffc741248474ec9807835
---
M SmartList/SmartList.class.php
M SmartList/i18n/en.json
M SmartList/i18n/qqq.json
3 files changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/90/344590/1

diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index 49e83d8..9778f62 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -402,7 +402,9 @@
 
$parser->setHook( 'smartlist', array( &$this, 'onTagSmartList' 
) );
$parser->setHook( 'bs:smartlist', array( &$this, 
'onTagSmartList' ) );
+   $parser->setHook( 'newbies', array( &$this, 'onTagBsNewbies' ) 
);
$parser->setHook( 'bs:newbies', array( &$this, 'onTagBsNewbies' 
) );
+   $parser->setHook( 'toplist', array( &$this, 'onTagToplist' ) );
$parser->setHook( 'bs:toplist', array( &$this, 'onTagToplist' ) 
);
 
return true;
diff --git a/SmartList/i18n/en.json b/SmartList/i18n/en.json
index 14edcc7..d55111f 100644
--- a/SmartList/i18n/en.json
+++ b/SmartList/i18n/en.json
@@ -45,6 +45,6 @@
"bs-smartlist-mosteditedpagesdesc": "List of most edited pages sorted 
by their edits.",
"bs-smartlist-mostvisitedpagesdesc": "List of most viewed pages sorted 
by their views.",
"bs-smartlist-lasteditsdesc": "List of pages which you have edited.",
-   "bs-smartlist-hitcounter-missing":"Extension HitCounter must 
be installed.",
+   "bs-smartlist-hitcounter-missing":"Extension HitCounters 
must be installed.",
"apihelp-bs-smartlist-tasks-description": "API functions to serve 
portlet data for page and user statistics."
 }
diff --git a/SmartList/i18n/qqq.json b/SmartList/i18n/qqq.json
index 1526166..98f6ad5 100644
--- a/SmartList/i18n/qqq.json
+++ b/SmartList/i18n/qqq.json
@@ -50,6 +50,6 @@
"bs-smartlist-mosteditedpagesdesc": "Used in [[Special:AdminDashboard]] 
and [[Special:UserDashboard]], text message for list of most edited pages 
sorted by their edits.",
"bs-smartlist-mostvisitedpagesdesc": "Used in 
[[Special:AdminDashboard]] and [[Special:UserDashboard]], text message for list 
of most viewed pages sorted by their views.",
"bs-smartlist-lasteditsdesc": "Used in [[Special:AdminDashboard]] and 
[[Special:UserDashboard]], text message for list of pages which you have 
edited.",
-   "bs-smartlist-hitcounter-missing": "Error and link to extension page 
when HitCounter is missing. Used on Users Dashboard Widget of SmartList 
Extension, most visited pages",
+   "bs-smartlist-hitcounter-missing": "Error and link to extension page 
when HitCounters is missing. Used on Users Dashboard Widget of SmartList 
Extension, most visited pages",
"apihelp-bs-smartlist-tasks-description": "Help desciption of API 
functions offered by SmartList 
extension.\n{{doc-apihelp-description|bs-smartlist-tasks}}"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f99371a92093508d5bffc741248474ec9807835
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 

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


[MediaWiki-commits] [Gerrit] mediawiki...UploadWizard[master]: Use CategorySelectorWidget instead of CategorySelector

2017-03-24 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344593 )

Change subject: Use CategorySelectorWidget instead of CategorySelector
..

Use CategorySelectorWidget instead of CategorySelector

Bug: T161285
Change-Id: I5080f157601c01265bc5ef72b0a122b8b3c1585d
Depends-On: I7c9e0089ba6b77f4bc73e14b989630487f6f3174
---
M extension.json
M resources/details/uw.CategoriesDetailsWidget.js
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/UploadWizard 
refs/changes/93/344593/1

diff --git a/extension.json b/extension.json
index a1f82bf..f4e07ca 100644
--- a/extension.json
+++ b/extension.json
@@ -203,7 +203,7 @@
"oojs-ui.styles.icons-editing-advanced",
"oojs-ui.styles.icons-location",
"mediawiki.widgets.DateInputWidget",
-   "mediawiki.widgets.CategorySelector"
+   "mediawiki.widgets.CategorySelectorWidget"
],
"scripts": [
"resources/jquery/jquery.morphCrossfade.js",
diff --git a/resources/details/uw.CategoriesDetailsWidget.js 
b/resources/details/uw.CategoriesDetailsWidget.js
index ad5a5f7..68bee72 100644
--- a/resources/details/uw.CategoriesDetailsWidget.js
+++ b/resources/details/uw.CategoriesDetailsWidget.js
@@ -12,7 +12,7 @@
 
uw.CategoriesDetailsWidget.parent.call( this );
 
-   this.categoriesWidget = new mw.widgets.CategorySelector();
+   this.categoriesWidget = new mw.widgets.CategorySelectorWidget();
 
this.categoriesWidget.createItemWidget = function ( data ) {
var widget = 
this.constructor.prototype.createItemWidget.call( this, data );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5080f157601c01265bc5ef72b0a122b8b3c1585d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] mediawiki...RevisionSlider[master]: Factor out draggable options

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

Change subject: Factor out draggable options
..


Factor out draggable options

Change-Id: I64cca7a7547310bee64ad95f500b722c362bbb45
---
M modules/ext.RevisionSlider.SliderView.js
1 file changed, 34 insertions(+), 12 deletions(-)

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



diff --git a/modules/ext.RevisionSlider.SliderView.js 
b/modules/ext.RevisionSlider.SliderView.js
index 5bef724..f5a9419 100644
--- a/modules/ext.RevisionSlider.SliderView.js
+++ b/modules/ext.RevisionSlider.SliderView.js
@@ -178,9 +178,7 @@
 */
initPointers: function( $revisions ) {
var $pointers,
-   lastValidLeftPos,
-   escapePressed = false,
-   self = this;
+   escapePressed = false;
 
$pointers = this.$element.find( '.mw-revslider-pointer' 
);
 
@@ -191,12 +189,27 @@
}
} );
 
-   $pointers.draggable( {
+   $pointers.draggable( this.buildDraggableOptions( 
escapePressed, $revisions ) );
+   },
+
+   /**
+* Build options for the draggable
+*
+* @param {boolean} escapePressed
+* @param {jQuery} $revisions
+* @return {Object}
+*/
+   buildDraggableOptions: function( escapePressed, $revisions ) {
+   var lastValidLeftPos,
+   self = this;
+
+   return {
axis: 'x',
grid: [ this.revisionWidth, null ],
containment: '.mw-revslider-pointer-container',
start: function() {
-   $( '.mw-revslider-revision-wrapper' 
).addClass( 'mw-revslider-pointer-cursor' );
+   $( '.mw-revslider-revision-wrapper' )
+   .addClass( 
'mw-revslider-pointer-cursor' );
escapePressed = false;
},
stop: function() {
@@ -221,21 +234,26 @@

self.resetPointerStylesBasedOnPosition();

self.resetRevisionStylesBasedOnPointerPosition( $revisions );
 
-   revId1 = self.getRevElementAtPosition( 
$revisions, self.pointerOlder.getPosition() ).data( 'revid' );
+   revId1 = self.getRevElementAtPosition(
+   $revisions, 
self.pointerOlder.getPosition()
+   ).data( 'revid' );
 
-   revId2 = self.getRevElementAtPosition( 
$revisions, self.pointerNewer.getPosition() ).data( 'revid' );
+   revId2 = self.getRevElementAtPosition(
+   $revisions, 
self.pointerNewer.getPosition()
+   ).data( 'revid' );
 
self.refreshRevisions( revId1, revId2 );
 
self.redrawPointerLines();
-
},
drag: function( event, ui ) {
var olderLeftPos, newerLeftPos,
-   isNew = $( this ).hasClass( 
'mw-revslider-pointer-newer' ),
-   newestVisibleRevisionLeftPos = 
$( '.mw-revslider-revisions-container' ).width() - self.revisionWidth;
+   isNew = $( this ).hasClass( 
'mw-revslider-pointer-newer' );
 
-   ui.position.left = Math.min( 
ui.position.left, newestVisibleRevisionLeftPos );
+   ui.position.left = Math.min(
+   ui.position.left,
+   
self.getNewestVisibleRevisonLeftPos()
+   );
 
olderLeftPos = 
self.pointerOlder.getView().getElement().position().left;
newerLeftPos = 
self.pointerNewer.getView().getElement().position().left;
@@ -254,7 +272,11 @@
revert: function() {
return escapePressed;
}
-   } );
+ 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Update Wikibase DataModel to 7.0.0

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

Change subject: Update Wikibase DataModel to 7.0.0
..


Update Wikibase DataModel to 7.0.0

Change-Id: Id5e83ec591346b205cc099a48b44a92a4c518e41
---
M client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
M composer.json
M lib/WikibaseLib.entitytypes.php
M lib/includes/Changes/EntityChangeFactory.php
M lib/tests/phpunit/Changes/EntityChangeTest.php
M lib/tests/phpunit/Store/Sql/PropertyInfoTableTest.php
M lib/tests/phpunit/Store/Sql/SqlEntityInfoBuilderTest.php
M lib/tests/phpunit/Store/Sql/TermSqlIndexTest.php
M repo/tests/phpunit/data/maintenance/dumpJson-out.txt
M repo/tests/phpunit/data/maintenance/dumpRdf-out.txt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_all_refs_seen.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_Q9_dedup.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_references.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/refs.nt
M repo/tests/phpunit/includes/Api/ResultBuilderTest.php
M repo/tests/phpunit/includes/Rdf/FullStatementRdfBuilderTest.php
19 files changed, 131 insertions(+), 149 deletions(-)

Approvals:
  Daniel Kinzler: Looks good to me, approved
  WMDE-leszek: Looks good to me, but someone else must approve
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve



diff --git 
a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php 
b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
index 2772679..e75dbd2 100644
--- a/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
+++ b/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
@@ -256,7 +256,7 @@
'qualifiers' => array(
'P65' => array(
1 => array(
-   'hash' 
=> 'e95e866e7fa1c18bd06dae9b712cb99545107eb8',
+   'hash' 
=> '3ea0f5404dd4e631780b3386d17a15a583e499a6',

'snaktype' => 'value',

'property' => 'P65',

'datavalue' => array(
@@ -266,7 +266,7 @@

'datatype' => 'structured-cat',
),
2 => array(
-   'hash' 
=> '210b00274bf03247a89de918f15b12142ebf9e56',
+   'hash' 
=> 'aa9a5f05e20d7fa5cda7d98371e44c0bdd5de35e',

'snaktype' => 'somevalue',

'property' => 'P65',

'datatype' => 'structured-cat',
@@ -279,7 +279,7 @@
),
'references' => array(
1 => array(
-   'hash' => 
'bdc5f7185904d6d3219e13b7443571dda8c4bee8',
+   'hash' => 
'8445204eb74e636cb53687e2f947c268d5186075',
'snaks' => 
array(
'P65' 
=> array(

1 => array(
diff --git a/composer.json b/composer.json
index 88a59b8..6c88971 100644
--- a/composer.json
+++ b/composer.json
@@ -32,7 +32,7 @@
"data-values/serialization": "^1.2.0",
"data-values/javascript": "^0.8.3",
"data-values/value-view": "^0.19.0",
-   "wikibase/data-model": "^6.3.1",
+   "wikibase/data-model": "^7.0.0",
"wikibase/data-model-serialization": "^2.1.0",
"wikibase/internal-serialization": "^2.2.0",
"wikibase/data-model-services": "^3.7.0",
diff --git a/lib/WikibaseLib.entitytypes.php 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove incompatible floating point numbers from all RDF tests

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

Change subject: Remove incompatible floating point numbers from all RDF tests
..


Remove incompatible floating point numbers from all RDF tests

The issue is that 12.345 is a different thing on 32 and 64 bit PHP as
well as HHVM. The hash calculation of GlobeCoordinateValue uses these
floating point numbers and creates different hashes on the different
systems, even if the input on all is 12.345.

This patch does not fix this issue. The issue needs to be fixed by
changing the serialization (or at least the hash calculation) of
GlobeCoordinateValue. This patch makes tests that should not care about
this issue not fail on the different systems, because ints behave the
same.

Bug: T161231
Change-Id: I39185f3db3b2cc343edcd384c900686cd46db19a
---
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_minimal.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_values.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_all_refs_seen.nt
M repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_all_statements.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_claims.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_props.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_resolved.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_truthy_statements.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q4_values.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q6_qualifiers.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q6_with_qualifiers.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_Q9_dedup.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_references.nt
M repo/tests/phpunit/data/rdf/RdfBuilder/Q7_refs.nt
M repo/tests/phpunit/data/rdf/RdfDumpGenerator/refs.nt
M repo/tests/phpunit/data/rdf/TruthyStatementRdfBuilder/Q4_statements.nt
M repo/tests/phpunit/data/rdf/entities/Q4.json
M repo/tests/phpunit/data/rdf/entities/Q6.json
M repo/tests/phpunit/data/rdf/entities/Q7.json
M repo/tests/phpunit/data/rdf/entities/Q9.json
M repo/tests/phpunit/includes/Rdf/FullStatementRdfBuilderTest.php
25 files changed, 182 insertions(+), 182 deletions(-)

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



diff --git a/repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt 
b/repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
index a40ba55..19feb10 100644
--- a/repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
+++ b/repo/tests/phpunit/data/rdf/FullStatementRdfBuilder/Q4_all.nt
@@ -25,8 +25,8 @@
 

  
 .
 

  
 .
 

  
 .
-
  
 .
-
  "Point(67.89 
12.345)"^^ .
+
  
 .
+
  "Point(67.25 
12.125)"^^ .
 

  
 .
 

  
 .
 

  
 .
@@ -63,14 +63,14 @@
  
 
"+19.766459987520822323858737945556640625"^^
 .
 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Move the hook onUnitTestsList on a separate file

2017-03-24 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344607 )

Change subject: Move the hook onUnitTestsList on a separate file
..

Move the hook onUnitTestsList on a separate file

It is not useful it stays in the main class, so separation
of concerns.

Change-Id: If08160ace6e4ed46a80203597b4b9d43efe9e60f
---
A src/Hooks.php
M src/MediaWikiFarm.php
M tests/phpunit/FunctionsTest.php
A tests/phpunit/HooksTest.php
4 files changed, 76 insertions(+), 42 deletions(-)


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

diff --git a/src/Hooks.php b/src/Hooks.php
new file mode 100644
index 000..7c2fd12
--- /dev/null
+++ b/src/Hooks.php
@@ -0,0 +1,48 @@
+
+ * @license GPL-3.0+ GNU General Public License v3.0, or (at your option) any 
later version.
+ * @license AGPL-3.0+ GNU Affero General Public License v3.0, or (at your 
option) any later version.
+ */
+
+/**
+ * MediaWiki hooks.
+ *
+ * @package MediaWikiFarm
+ */
+class MediaWikiFarmHooks {
+
+   /**
+* Add files for unit testing.
+*
+* Only useful for MediaWiki 1.27- since MediaWiki 1.28+ autodiscovers 
these files.
+* Given this hook is never useful at runtime, it should be moved to a 
separate file
+* if MediaWiki runtime hooks are added in this file.
+*
+* @api
+*
+* @param string[] $files The test files.
+* @return true
+*/
+   public static function onUnitTestsList( array &$files ) {
+
+   $dir = dirname( dirname( __FILE__ ) ) . '/tests/phpunit/';
+
+   $files[] = $dir . 'ConfigurationTest.php';
+   $files[] = $dir . 'ConstructionTest.php';
+   $files[] = $dir . 'FunctionsTest.php';
+   $files[] = $dir . 'HooksTest.php';
+   $files[] = $dir . 'InstallationIndependantTest.php';
+   $files[] = $dir . 'LoadingTest.php';
+   $files[] = $dir . 'LoggingTest.php';
+   $files[] = $dir . 'MediaWikiFarmComposerScriptTest.php';
+   $files[] = $dir . 'MediaWikiFarmScriptTest.php';
+   $files[] = $dir . 'MonoversionInstallationTest.php';
+   $files[] = $dir . 'MultiversionInstallationTest.php';
+
+   return true;
+   }
+}
diff --git a/src/MediaWikiFarm.php b/src/MediaWikiFarm.php
index 5339e58..b70ad71 100644
--- a/src/MediaWikiFarm.php
+++ b/src/MediaWikiFarm.php
@@ -1636,33 +1636,6 @@
throw new InvalidArgumentException( 'Argument of 
MediaWikiFarm->replaceVariables() must be a string or an array.' );
}
 
-   /**
-* Add files for unit testing.
-*
-* @mediawikifarm-const
-* @mediawikifarm-idempotent
-*
-* @param string[] $files The test files.
-* @return true
-*/
-   static function onUnitTestsList( array &$files ) {
-
-   $dir = dirname( dirname( __FILE__ ) ) . '/tests/phpunit/';
-
-   $files[] = $dir . 'ConfigurationTest.php';
-   $files[] = $dir . 'ConstructionTest.php';
-   $files[] = $dir . 'FunctionsTest.php';
-   $files[] = $dir . 'InstallationIndependantTest.php';
-   $files[] = $dir . 'LoadingTest.php';
-   $files[] = $dir . 'LoggingTest.php';
-   $files[] = $dir . 'MediaWikiFarmComposerScriptTest.php';
-   $files[] = $dir . 'MediaWikiFarmScriptTest.php';
-   $files[] = $dir . 'MonoversionInstallationTest.php';
-   $files[] = $dir . 'MultiversionInstallationTest.php';
-
-   return true;
-   }
-
 
 
/*
diff --git a/tests/phpunit/FunctionsTest.php b/tests/phpunit/FunctionsTest.php
index ebf41b2..24d99de 100644
--- a/tests/phpunit/FunctionsTest.php
+++ b/tests/phpunit/FunctionsTest.php
@@ -85,21 +85,6 @@
}
 
/**
-* Test onUnitTestsList hook
-*
-* @covers MediaWikiFarm::onUnitTestsList
-*/
-   function testOnUnitTestsListHook() {
-
-   $testFiles = glob( dirname( __FILE__ ) . '/*Test.php' );
-
-   $array = array();
-   MediaWikiFarm::onUnitTestsList( $array );
-
-   $this->assertEquals( $testFiles, $array );
-   }
-
-   /**
 * Test arrayMerge
 *
 * @covers MediaWikiFarm::arrayMerge
diff --git a/tests/phpunit/HooksTest.php b/tests/phpunit/HooksTest.php
new file mode 100644
index 000..a3be7d7
--- /dev/null
+++ b/tests/phpunit/HooksTest.php
@@ -0,0 +1,28 @@
+assertEquals( $testFiles, $array );
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If08160ace6e4ed46a80203597b4b9d43efe9e60f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_27]: VisualEditor: introducing DOM preprocessor

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

Change subject: VisualEditor: introducing DOM preprocessor
..


VisualEditor: introducing DOM preprocessor

A DOM preprocessor is introduced which currently only replaces certain
spans (underline and strike). This is neccessary because it is the
correct way to handle nested spans, where regexs would fail. In the wake
of this change, handling of external links was improved, as the html
produced was a mess.

Patch Set 2: Implemented CR

Change-Id: I6a63524576ebc0869bb77c9621106d563625f390
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 44 insertions(+), 11 deletions(-)

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



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index e655a45..e987169 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -337,7 +337,7 @@
}
 
function _image2wiki(text) {
-   var images = 
text.match(/(]*?)>)?]*?)\/>(<\/a>)?/gi);
+   var images = 
text.match(/(]*?)>)?]*?)\/?>(<\/a>)?/gi);
if (!images)
return text;
 
@@ -614,13 +614,15 @@
_externalLinkNo++;
}
linkHtml = anchorFormat.format(
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // href
-   linkLabel,  
// linkLabel
-   'external_link',
// data-bs-type
-   'external bs-external-link 
bs-protocol-'+protocol,  // class
-   $( '' ).text( link ).html(),  
// data-bs-wikitext
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // data-mce-href
-   $( '' ).text( linkLabel ).html()  
// title
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // href
+   linkLabel,  
 // linkLabel
+   'external_link',
 // data-bs-type
+   'external bs-external-link 
bs-protocol-' + protocol, // class
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( link 
).html() ),  // data-bs-wikitext
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // data-mce-href
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( 
linkLabel ).html() )  // title
);
text = text.replace("[" + linkNoWrap + "]", 
linkHtml);
}
@@ -1425,7 +1427,7 @@
$(document).trigger('BSVisualEditorBeforeHtmlToWiki', 
[textObject]);
// get the text back
text = textObject.text;
-   // Normalize UTF8 spaces as aof TinyMCE 3.4.9
+   // Normalize UTF8 spaces as of TinyMCE 3.4.9
text = text.replace(/\u00a0/gi, '');
//Save content of pre tags
text = _preservePres(text);
@@ -1438,8 +1440,6 @@
text = text.replace(/(.*?)<\/i>/gmi, "''$1''");
//underline needs no conversion
text = text.replace(/(.*?)<\/strike>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
//sub and sup need no conversion
 
text = text.replace(/]*>/gmi, 
"@@br_emptyline_first@@");
@@ -2289,6 +2289,37 @@
}
 
/**
+* Preprocess HTML in DOM form. This is mainly used to replace tags
+* @param {String} text
+* @returns {String}
+*/
+   function _preprocessHtml2Wiki( text ) {
+   // convert html text to DOM
+   var $dom = $( "" + text + "" );
+
+   // perform the actual preprocessing
+   $dom.find( "span[style*='text-decoration: underline']" 
).replaceWith( function() {
+   return "" + $( this ).html() + 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: VisualEditor: introducing DOM preprocessor

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

Change subject: VisualEditor: introducing DOM preprocessor
..


VisualEditor: introducing DOM preprocessor

A DOM preprocessor is introduced which currently only replaces certain
spans (underline and strike). This is neccessary because it is the
correct way to handle nested spans, where regexs would fail. In the wake
of this change, handling of external links was improved, as the html
produced was a mess.

Patch Set 2: Implemented CR

Change-Id: I6a63524576ebc0869bb77c9621106d563625f390
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 44 insertions(+), 11 deletions(-)

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



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index e657193..f630e4c 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -337,7 +337,7 @@
}
 
function _image2wiki(text) {
-   var images = 
text.match(/(]*?)>)?]*?)\/>(<\/a>)?/gi);
+   var images = 
text.match(/(]*?)>)?]*?)\/?>(<\/a>)?/gi);
if (!images)
return text;
 
@@ -614,13 +614,15 @@
_externalLinkNo++;
}
linkHtml = anchorFormat.format(
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // href
-   linkLabel,  
// linkLabel
-   'external_link',
// data-bs-type
-   'external bs-external-link 
bs-protocol-'+protocol,  // class
-   $( '' ).text( link ).html(),  
// data-bs-wikitext
-   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ), // data-mce-href
-   $( '' ).text( linkLabel ).html()  
// title
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // href
+   linkLabel,  
 // linkLabel
+   'external_link',
 // data-bs-type
+   'external bs-external-link 
bs-protocol-' + protocol, // class
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( link 
).html() ),  // data-bs-wikitext
+   encodeURI( linkTarget.replace( /%20/g, 
' ' ) ),  // data-mce-href
+   // encoding neccessary, because this is 
possible: [http://www.hallowelt.biz Hallo 
Welt!]
+   encodeURI( $( '' ).text( 
linkLabel ).html() )  // title
);
text = text.replace("[" + linkNoWrap + "]", 
linkHtml);
}
@@ -1425,7 +1427,7 @@
$(document).trigger('BSVisualEditorBeforeHtmlToWiki', 
[textObject]);
// get the text back
text = textObject.text;
-   // Normalize UTF8 spaces as aof TinyMCE 3.4.9
+   // Normalize UTF8 spaces as of TinyMCE 3.4.9
text = text.replace(/\u00a0/gi, '');
//Save content of pre tags
text = _preservePres(text);
@@ -1438,8 +1440,6 @@
text = text.replace(/(.*?)<\/i>/gmi, "''$1''");
//underline needs no conversion
text = text.replace(/(.*?)<\/strike>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
-   text = text.replace(/(.*?)<\/span>/gi, "$1");
//sub and sup need no conversion
 
text = text.replace(/]*>/gmi, 
"@@br_emptyline_first@@");
@@ -2306,6 +2306,37 @@
}
 
/**
+* Preprocess HTML in DOM form. This is mainly used to replace tags
+* @param {String} text
+* @returns {String}
+*/
+   function _preprocessHtml2Wiki( text ) {
+   // convert html text to DOM
+   var $dom = $( "" + text + "" );
+
+   // perform the actual preprocessing
+   $dom.find( "span[style*='text-decoration: underline']" 
).replaceWith( function() {
+   return "" + $( this ).html() + 

[MediaWiki-commits] [Gerrit] mediawiki/selenium[master]: test: invoke rspec directly

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

Change subject: test: invoke rspec directly
..


test: invoke rspec directly

The rspec test lookups path to bundler via Gem.bin_path(). That is broken
when using Debian bundler system package which has the path set to:
/usr/share/rubygems-integration/all while the actual binary is
/usr/bin/bundler.

Invoke bundle directly.

Bug: T137112
Change-Id: If4f0fd9abe077c0687077e94532f5c24fd498b70
---
M features/step_definitions/rspec_steps.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/features/step_definitions/rspec_steps.rb 
b/features/step_definitions/rspec_steps.rb
index f8e7c00..80dae0a 100644
--- a/features/step_definitions/rspec_steps.rb
+++ b/features/step_definitions/rspec_steps.rb
@@ -21,7 +21,7 @@
 
 When(/^I run `rspec` against my examples$/) do
   env = { 'MEDIAWIKI_ENVIRONMENT' => 'default' }
-  cmd = "'#{Gem.bin_path('bundler', 'bundle')}' exec rspec"
+  cmd = 'bundle exec rspec'
 
   @rspec_output, @rspec_status = Open3.capture2e(env, cmd, chdir: 'tmp/rspec')
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4f0fd9abe077c0687077e94532f5c24fd498b70
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/selenium
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Zfilipin 
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]: Adapt debdeploy grain to rename of nova::api role

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344611 )

Change subject: Adapt debdeploy grain to rename of nova::api role
..

Adapt debdeploy grain to rename of nova::api role

Change-Id: Ib1467678b372e7cdaf7e354216e036818f02cce5
---
M hieradata/role/common/labs/openstack/nova/api.yaml
D hieradata/role/common/nova/api.yaml
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/344611/1

diff --git a/hieradata/role/common/labs/openstack/nova/api.yaml 
b/hieradata/role/common/labs/openstack/nova/api.yaml
index 2b85509..841d39d 100644
--- a/hieradata/role/common/labs/openstack/nova/api.yaml
+++ b/hieradata/role/common/labs/openstack/nova/api.yaml
@@ -1,3 +1,6 @@
 admin::groups:
   - labnet-users
 openstack::log_group: labnet-users
+debdeploy::grains:
+  debdeploy-nova-api:
+value: standard
diff --git a/hieradata/role/common/nova/api.yaml 
b/hieradata/role/common/nova/api.yaml
deleted file mode 100644
index 948c757..000
--- a/hieradata/role/common/nova/api.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-debdeploy::grains:
-  debdeploy-nova-api:
-value: standard

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Adapt debdeploy grain to rename of nova::controller role

2017-03-24 Thread Muehlenhoff (Code Review)
Muehlenhoff has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344614 )

Change subject: Adapt debdeploy grain to rename of nova::controller role
..

Adapt debdeploy grain to rename of nova::controller role

Since hieradata/role/common/nova/controller.yaml doesn't apply any longer,
can the paramiko setting in there be removed? It doesn't seem to be applied
to labcontrol1001 ATM

Change-Id: I369bf7468ad7cff5af37501f119d4c94e2b96740
---
A hieradata/role/common/labs/openstack/nova/controller.yaml
M hieradata/role/common/nova/controller.yaml
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/hieradata/role/common/labs/openstack/nova/controller.yaml 
b/hieradata/role/common/labs/openstack/nova/controller.yaml
new file mode 100644
index 000..aa6f391
--- /dev/null
+++ b/hieradata/role/common/labs/openstack/nova/controller.yaml
@@ -0,0 +1,3 @@
+debdeploy::grains:
+  debdeploy-nova-control:
+value: standard
diff --git a/hieradata/role/common/nova/controller.yaml 
b/hieradata/role/common/nova/controller.yaml
index d934c19..42b00ba 100644
--- a/hieradata/role/common/nova/controller.yaml
+++ b/hieradata/role/common/nova/controller.yaml
@@ -2,6 +2,3 @@
 profile::base::ssh_server_settings:
   disable_nist_kex: false
   explicit_macs: false
-debdeploy::grains:
-  debdeploy-nova-control:
-value: standard

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Ignore directory .git in PHP_CodeSniffer

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

Change subject: Ignore directory .git in PHP_CodeSniffer
..


Ignore directory .git in PHP_CodeSniffer

Unfortunately I have a local branch ending with .php and phpcs is
checking it (and obviously is trigerring errors)

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

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



diff --git a/composer.json b/composer.json
index 61956c2..4ff65bd 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
"scripts": {
"validate-schema": "php ./bin/validate-schema.php",
"lint": "parallel-lint --exclude vendor .",
-   "phpcs": "phpcs -p -s",
+   "phpcs": "phpcs -p -s --ignore=.git",
"phpdoc": "[ \"`which phpdoc`\" = \"\" ] || phpdoc -d bin,src 
-t ./docs/code",
"phpunit": "which phpdbg && phpdbg -qrr `which phpunit` 
--strict-coverage || phpunit --strict-coverage",
"unit": "phpunit --no-coverage",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I11f121802c6bfce1723e71a65853335e8312f627
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Seb35 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Calculate correct offsets for unicode characters

2017-03-24 Thread Sebastian Berlin (WMSE) (Code Review)
Sebastian Berlin (WMSE) has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344616 )

Change subject: Calculate correct offsets for unicode characters
..

Calculate correct offsets for unicode characters

Unicode characters are counted as multiple bytes, which manifested as
the highlighting of a sentence being longer than it should. This also
affects the start of following sentences.

In fixing this, the segmentation was reworked which also resulted in a
more consistent use of utterance boundaries ("offset" is used instead
of "position" and excludes the last character, which is more common
when getting substrings etc.), not including trailing or leading
whitespaces for utterances and properly handling utterances that are
completely wrapped in tags.

Bug: T159545
Bug: T159811
Bug: T159809
Bug: T159671

Change-Id: I8e32637a51857e383ed1fae5a83fa04b0a978deb
---
M Hooks.php
M extension.json
M includes/Cleaner.php
M includes/Segmenter.php
M modules/ext.wikispeech.js
M tests/phpunit/SegmenterTest.php
M tests/qunit/ext.wikispeech.test.js
7 files changed, 300 insertions(+), 103 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index ea491cc..2fa1092 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -54,12 +54,12 @@
'Wikispeech',
'HTML from onParserAfterTidy(): ' . $text
);
-   $cleanedText = Cleaner::cleanHtml( $text );
+   $cleanedContents = Cleaner::cleanHtml( $text );
wfDebugLog(
'Wikispeech',
-   'Cleaned text: ' . var_export( $cleanedText, 
true )
+   'Cleaned text: ' . var_export( 
$cleanedContents, true )
);
-   $utterances = Segmenter::segmentSentences( $cleanedText 
);
+   $utterances = Segmenter::segmentSentences( 
$cleanedContents );
wfDebugLog(
'Wikispeech',
'Utterances: ' . var_export( $utterances, true )
diff --git a/extension.json b/extension.json
index 850c2b9..8b1b9d1 100644
--- a/extension.json
+++ b/extension.json
@@ -83,23 +83,23 @@
"WikispeechKeyboardShortcuts": {
"playStop": {
"key": 32,
-   "modifiers": [ "ctrl" ]
+   "modifiers": [ "alt", "shift" ]
},
"skipAheadSentence": {
"key": 39,
-   "modifiers": [ "ctrl" ]
+   "modifiers": [ "alt", "shift" ]
},
"skipBackSentence": {
"key": 37,
-   "modifiers": [ "ctrl" ]
+   "modifiers": [ "alt", "shift" ]
},
"skipAheadWord": {
"key": 40,
-   "modifiers": [ "ctrl" ]
+   "modifiers": [ "alt", "shift" ]
},
"skipBackWord": {
"key": 38,
-   "modifiers": [ "ctrl" ]
+   "modifiers": [ "alt", "shift" ]
}
},
"WikispeechSkipBackRewindsThreshold": 3.0
diff --git a/includes/Cleaner.php b/includes/Cleaner.php
index a65e0d6..ab58f48 100644
--- a/includes/Cleaner.php
+++ b/includes/Cleaner.php
@@ -25,12 +25,12 @@
// Only add elements below the dummy element. These are the
// elements from the original HTML.
$top = $xpath->evaluate( '/meta/dummy' )->item( 0 );
-   $cleanedContent = [];
+   $cleanedContents = [];
self::addContent(
-   $cleanedContent,
+   $cleanedContents,
$top
);
-   return $cleanedContent;
+   return $cleanedContents;
}
 
/**
diff --git a/includes/Segmenter.php b/includes/Segmenter.php
index 249bbf5..170e8e1 100644
--- a/includes/Segmenter.php
+++ b/includes/Segmenter.php
@@ -13,30 +13,30 @@
 *
 * A segment is an array with the keys "content", "startOffset"
 * and "endOffset". "content" is an array of `CleanedText`s.
-
-* "startOffset" is the position of the first character of the
+* "startOffset" is the offset of the first character of the
 * segment, within the text node it appears. "endOffset" is the
-* 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Replace deprecated jQuery .andSelf() by .addBack()

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

Change subject: Replace deprecated jQuery .andSelf() by .addBack()
..


Replace deprecated jQuery .andSelf() by .addBack()

.andSelf() is deprecated since jQuery 1.8 and gets removed in jQuery 3.0.
https://api.jquery.com/andSelf/

Change-Id: Id6b173c7d1cc705cfc0a582c0937a40061cf847a
---
M view/resources/jquery/wikibase/jquery.wikibase.sitelinklistview.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/view/resources/jquery/wikibase/jquery.wikibase.sitelinklistview.js 
b/view/resources/jquery/wikibase/jquery.wikibase.sitelinklistview.js
index 450da66..55b37a6 100644
--- a/view/resources/jquery/wikibase/jquery.wikibase.sitelinklistview.js
+++ b/view/resources/jquery/wikibase/jquery.wikibase.sitelinklistview.js
@@ -157,7 +157,7 @@
} )
.on( 'keydown.' + this.widgetName, function( event ) {
if ( event.keyCode === $.ui.keyCode.BACKSPACE ) {
-   var $sitelinkview = $( event.target 
).parentsUntil( this ).andSelf().filter( '.listview-item' ),
+   var $sitelinkview = $( event.target 
).parentsUntil( this ).addBack().filter( '.listview-item' ),
sitelinkview = 
listItemAdapter.liInstance( $sitelinkview );
 
if ( sitelinkview ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id6b173c7d1cc705cfc0a582c0937a40061cf847a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Labtestvirt2002: Try a different partman config

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

Change subject: Labtestvirt2002:  Try a different partman config
..

Labtestvirt2002:  Try a different partman config

I'm going to set up a hardware raid by hand and see
if this trivial partman recipe works.

Change-Id: I5bb3f4f3a3be608f7453d0c1656d79f3024b324c
---
M modules/install_server/files/autoinstall/netboot.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/344612/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 03968c2..9817abf 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -97,7 +97,7 @@
 labtestweb2001) echo partman/raid1.cfg ;; \
 labtestservices2001) echo partman/raid1.cfg ;; \
 labtestvirt2001) echo partman/raid1.cfg ;; \
-labtestvirt2002) echo partman/raid1.cfg ;; \
+labtestvirt2002) echo partman/flat.cfg ;; \
 labvirt100[1-9]) echo partman/virt-hp.cfg ;; \
 labvirt101[0-4]) echo partman/labvirt-ssd.cfg ;; \
 lithium|wezen) echo partman/raid1-gpt.cfg ;; \

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T133267: Escape extlink content when containing ] anywhere

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

Change subject: T133267: Escape extlink content when containing ] anywhere
..


T133267: Escape extlink content when containing ] anywhere

Change-Id: Ic2ef54d79c98966cb77f8efdbc53b349496d1f9f
---
M lib/html2wt/escapeWikitext.js
M tests/parserTests.txt
2 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/lib/html2wt/escapeWikitext.js b/lib/html2wt/escapeWikitext.js
index 666ba2a..d2eb1fe 100644
--- a/lib/html2wt/escapeWikitext.js
+++ b/lib/html2wt/escapeWikitext.js
@@ -154,7 +154,7 @@
 };
 
 WEHP.aHandler = function(state, text) {
-   return text.match(/\]$/);
+   return text.match(/\]/);
 };
 
 WEHP.tdHandler = function(tdNode, inWideTD, state, text, opts) {
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2b8d9d4..cf4fdc9 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -23848,7 +23848,8 @@
 parsoid=html2wt
 !! html/parsoid
 http://google.com;>[google]
-http://google.com;>google]
+http://google.com;>google]
+http://google.com;>goog] le
 [http://google.com]
 [http://google.com google]
 [http://google.com;>http://google.com]
@@ -23856,6 +23857,7 @@
 !! wikitext
 [http://google.com [google]]
 [http://google.com google]]
+[http://google.com goog] le]
 
 [http://google.com]
 
@@ -23867,6 +23869,7 @@
 !! html/php
 http://google.com;>[google]
 http://google.com;>google]
+http://google.com;>goog] le
 [http://google.com]
 [http://google.com google]
 [http://google.com;>http://google.com]

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: profile::redis::slave: fix parameter extraction (again)

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

Change subject: profile::redis::slave: fix parameter extraction (again)
..


profile::redis::slave: fix parameter extraction (again)

Change-Id: Icf11927827c5897c8f3f410ebda516b4af056237
---
M modules/profile/manifests/redis/slave.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/profile/manifests/redis/slave.pp 
b/modules/profile/manifests/redis/slave.pp
index e7f9506..0460492 100644
--- a/modules/profile/manifests/redis/slave.pp
+++ b/modules/profile/manifests/redis/slave.pp
@@ -7,7 +7,7 @@
 $resources = query_resources(
 "fqdn='${master}'",
 'Redis::Instance', false)
-$password = $resources[0]['parameters']['settings']['password']
+$password = $resources[0]['parameters']['settings']['requirepass']
 $redis_ports = inline_template("<%= @resources.map{|r| r['title']}.join ' 
' -%>")
 $instances = split($redis_ports, ' ')
 $uris = apply_format("localhost:%s/${password}", $instances)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icf11927827c5897c8f3f410ebda516b4af056237
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 
Gerrit-Reviewer: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Pull in orphan rectifier hotfix

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

Change subject: Pull in orphan rectifier hotfix
..


Pull in orphan rectifier hotfix

Minimal vendor update

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

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



diff --git a/vendor b/vendor
index f8bf486..f0e28be 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit f8bf48695ab0b11763322eed876dcbf5d3258793
+Subproject commit f0e28be01e1798ec36cf6e45a665f5730515f484

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Pull in orphan rectifier hotfix

2017-03-24 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344654 )

Change subject: Pull in orphan rectifier hotfix
..

Pull in orphan rectifier hotfix

Minimal vendor update

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


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/54/344654/1

diff --git a/vendor b/vendor
index f8bf486..f0e28be 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit f8bf48695ab0b11763322eed876dcbf5d3258793
+Subproject commit f0e28be01e1798ec36cf6e45a665f5730515f484

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Quiz[master]: Generate questions HTML via TemplateParser

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

Change subject: Generate questions HTML via TemplateParser
..


Generate questions HTML via TemplateParser

This commit will move the generation of the Quiz's questions HTML to 
TemplateParser. Some work is still needed
here, especially it would be good to have CSS classes for the table style 
instead of inline CSS. I also added
some comments here and there especially for an unknown and undocumented feature.

Still to port to TemplateParser: Settings table, answers.
Bug: T152293

Change-Id: I557803731645f925db43166ae0d90eb1db8bdea8
---
M Quiz.class.php
A templates/Question.mustache
2 files changed, 77 insertions(+), 32 deletions(-)

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



diff --git a/Quiz.class.php b/Quiz.class.php
index ff2fa0a..e97234b 100755
--- a/Quiz.class.php
+++ b/Quiz.class.php
@@ -247,6 +247,7 @@
-1,
PREG_SPLIT_NO_EMPTY
);
+
$output = '';
$questionPattern = '`(.*?[^|\}])\}[ \t]*(\n(.*)|$)`s';
foreach ( $unparsedQuestions as $unparsedQuestion ) {
@@ -288,8 +289,18 @@
$this->mParser
);
Hooks::run( 'QuizQuestionCreated', array( $this, &$question ) );
-   $buffer = $question->parseHeader( $matches[1] );
-   if ( !array_key_exists( 3, $matches ) || trim( $matches[3] ) == 
'' ) {
+
+   // gets the question text
+   $questionText = $question->parseHeader( $matches[1] );
+
+   /*
+   What is this block of code?
+   The only place X !X and /X are spoken about is here
+   https://en.wikiversity.org/wiki/Help:Quiz
+   "A few exotic features are not yet covered, such as 
shuffle control using {X} {!X} {/X} tags."
+   These were added in commit fb53a3b0 back in 2007, 
without any explanation and/or documentation. The commit message is actually 
unrelated.
+   */
+   if ( !array_key_exists(3, $matches ) || trim( $matches[3] ) == 
'' ) {
switch ( $matches[1] ) {
case 'X':
$this->mShuffleDiv++;
@@ -309,66 +320,89 @@
}
break;
default:
-   return '' . 
$buffer . '' . "\n";
+   return '' . 
$questionText . '' . "\n";
break;
}
}
-   $output  = '' . "\n";
-   $output .= '' . "\n";
-   $output .= '' . ++$this->mQuestionId . 
'. ' . $buffer;
-   $output .= '' . "\n";
 
-   // Store the parsed object into a buffer to determine some 
parameters before outputing it.
-   $buffer = call_user_func( array(
-   $question,
-   $question->mType . 'ParseObject'
-   ), $matches[3]);
-   $output .= 'getState();
-   // Determine the side border color, title, score and the total 
of the question.
-   if ( $lState != '' ) {
+   $templateParser = new TemplateParser(  __DIR__ . '/templates' );
+
+   $this->mQuestionId++;
+
+   //this will generate the answers HTML code
+   $answers = call_user_func(
+   array( $question, $question->mType . 'ParseObject' ),
+   $matches[3]
+   );
+
+   $lState = $question->getState(); // right wrong or unanswered?
+
+   if( $lState != '' ) {
+   // TODO: convert to CSS classes
global $wgContLang;
$border = $wgContLang->isRTL() ? 'border-right' : 
'border-left';
-   $output .= 'style="' . $border . ':3px solid ' . 
self::getColor( $lState ) . '"';
+   $tableStyle = $border . ': 3px solid ' . 
self::getColor( $lState ) . ';';
+
+   $tableTitle = "";
+
+   // if the question is of type=simple
if ( $this->mIgnoringCoef ) {
$question->mCoef = 1;
}
-
switch ( $lState ) {
case 'right':
$this->mTotal += $this->mAddedPoints * 
$question->mCoef;
$this->mScore += $this->mAddedPoints * 
$question->mCoef;
-  

[MediaWiki-commits] [Gerrit] operations/dns[master]: T160640 Adding dns entries for production new swift servers ...

2017-03-24 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/344663 )

Change subject: T160640 Adding dns entries for production new swift servers 
ms-be1028-1036
..

T160640 Adding dns entries for production new swift servers ms-be1028-1036

Change-Id: I299c20d08055837aa0cf117582911f76c509fdce
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 25 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/63/344663/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 3ab080f..da5dcd5 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -253,11 +253,12 @@
 18  1H IN PTR   conf1001.eqiad.wmnet.
 19  1H IN PTR   db1015.eqiad.wmnet.
 20  1H IN PTR   db1016.eqiad.wmnet.
-
+21  1H IN PTR   ms-be1028.eqiad.wmnet
 22  1H IN PTR   tungsten.eqiad.wmnet.
 23  1H IN PTR   ms1003.eqiad.wmnet.
 24  1H IN PTR   rdb1005.eqiad.wmnet.
-
+25  1H IN PTR   ms-be1029.eqiad.wmnet.
+26  1H IN PTR   ms-be1030.eqiad.wmnet.
 27  1H IN PTR   cam1-a-eqiad.eqiad.wmnet.
 28  1H IN PTR   cam2-a-eqiad.eqiad.wmnet.
 29  1H IN PTR   cam1-a-b-eqiad.eqiad.wmnet.
@@ -512,6 +513,9 @@
 77  1H IN PTR   db1052.eqiad.wmnet.
 78  1H IN PTR   aqs1008-b.eqiad.wmnet. ; cassandra instance
 79  1H IN PTR   db1073.eqiad.wmnet.
+80  1H IN PTR   ms-be1031.eqiad.wmnet.
+81  1H IN PTR   ms-be1032.eqiad.wmnet.
+
 101 1H IN PTR   db1083.eqiad.wmnet.
 102 1H IN PTR   db1084.eqiad.wmnet.
 103 1H IN PTR   db1085.eqiad.wmnet.
@@ -820,7 +824,6 @@
 199 1H IN PTR   nitrogen.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 200 1H IN PTR   darmstadtium.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
 201 1H IN PTR   d-i-test.eqiad.wmnet. ; VM on the 
ganeti01.svc.eqiad.wmnet cluster
-
 202 1H IN PTR   restbase1012-a.eqiad.wmnet.
 203 1H IN PTR   restbase1012-b.eqiad.wmnet.
 204 1H IN PTR   restbase1012-c.eqiad.wmnet.
@@ -841,6 +844,10 @@
 219 1H IN PTR   europium.eqiad.wmnet.
 220 1H IN PTR   ms-fe1007.eqiad.wmnet.
 221 1H IN PTR   ms-fe1008.eqiad.wmnet.
+222 1H IN PTR   ms-be1033.eqiad.wmnet.
+223 1H IN PTR   ms-be1034.eqiad.wmnet.
+224 1H IN PTR   ms-be1035.eqiad.wmnet.
+225 1H IN PTR   ms-be1036.eqiad.wmnet.
 
 $ORIGIN 33.64.{{ zonename }}.
 1   1H IN PTR   vl1019-eth2.lvs1001.wikimedia.org.
@@ -1081,6 +1088,9 @@
 139 1H  IN PTR  restbase1015-b.eqiad.wmnet.
 140 1H  IN PTR  restbase1015-c.eqiad.wmnet.
 141 1H  IN PTR  snapshot1007.eqiad.wmnet.
+142 1H  IN PTR  ms-be1037.eqiad.wmnet.
+143 1H  IN PTR  ms-be1038.eqiad.wmnet.
+144 1H  IN PTR  ms-be1039.eqiad.wmnet.
 
 146 1H  IN PTR  aqs1006.eqiad.wmnet.
 148 1H  IN PTR  aqs1006-a.eqiad.wmnet. ; cassandra instance
diff --git a/templates/wmnet b/templates/wmnet
index 53bca1b..c547468 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -515,6 +515,18 @@
 ms-be1025   1H  IN A10.64.32.119
 ms-be1026   1H  IN A10.64.48.159
 ms-be1027   1H  IN A10.64.48.160
+ms-be1028   1H  IN A10.64.0.21
+ms-be1029   1H  IN A10.64.0.25
+ms-be1030   1H  IN A10.64.0.26
+ms-be1031   1H  IN A10.64.16.80
+ms-be1032   1H  IN A10.64.16.81
+ms-be1033   1H  IN A10.64.32.222
+ms-be1034   1H  IN A10.64.32.223
+ms-be1035   1H  IN A10.64.32.224
+ms-be1036   1H  IN A10.64.32.225
+ms-be1037   1H  IN A10.64.48.142
+ms-be1038   1H  IN A10.64.48.143
+ms-be1039   1H  IN A10.64.48.144
 ms-fe   1H  IN A10.2.2.27   ;LVS address for ms-fe100*
 ms-fe1001   1H  IN A10.64.0.167
 ms-fe1002   1H  IN A10.64.0.168

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I299c20d08055837aa0cf117582911f76c509fdce
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: One more tweak to labvirt2002 partman

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

Change subject: One more tweak to labvirt2002 partman
..


One more tweak to labvirt2002 partman

Change-Id: I341f6b273d2a9603e98e74e5569d975858047518
---
M modules/install_server/files/autoinstall/partman/labtestvirt.cfg
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/install_server/files/autoinstall/partman/labtestvirt.cfg 
b/modules/install_server/files/autoinstall/partman/labtestvirt.cfg
index 5e679cd..f703232 100644
--- a/modules/install_server/files/autoinstall/partman/labtestvirt.cfg
+++ b/modules/install_server/files/autoinstall/partman/labtestvirt.cfg
@@ -3,7 +3,7 @@
 #  * no LVM
 #  * no swap
 #  * 20G / formatted with ext4
-#  * the rest formatted with ext4 for /srv
+#  * the rest formatted with xfs for /srv
 
 d-ipartman-auto/method string  regular
 d-ipartman-auto/disk   string  /dev/sda
@@ -18,7 +18,7 @@
filesystem{ ext4 }  \
mountpoint{ / } \
.   \
-   64  10001000 ext4   \
+   64  10001000 xfs\
$primary{ } \
$bootable{ }\
method{ format }\

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Revert "Add conflicts for category changes"

2017-03-24 Thread Mattflaschen (Code Review)
Hello Catrope, jenkins-bot, Siebrand, Mooeypoo,

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

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

to review the following change.


Change subject: Revert "Add conflicts for category changes"
..

Revert "Add conflicts for category changes"

This reverts commit 95e01ae8bcd76a9a81e7cf402d977497b88f3090.

Change-Id: Ief5bc777f029194998f7362c9dd92f9bbc5febbb
---
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
3 files changed, 8 insertions(+), 26 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 60a8b41..058bd2a 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -16,14 +16,12 @@
"ores-hide-nondamaging-filter": "Hide probably good edits",
"ores-pref-damaging": "ORES sensitivity",
"ores-rcfilters-whats-this-link-text": "Learn more",
-   "ores-rcfilters-logactions-conflicts-ores": "This filter conflicts with 
one or more Contribution Quality or User Intent filters. Quality and Intent 
predictions are not available for logged actions.",
"ores-rcfilters-ores-conflicts-logactions-global": "The \"Logged 
actions\" filter conflicts with one or more Contribution Quality or User Intent 
filters. Quality and Intent predictions are not available for logged actions. 
The conflicting filters are marked in the Active Filters area, above.",
-   "ores-rcfilters-ores-conflicts-hidecategorization-global": "The 
\"Category changes\" filter conflicts with one or more Contribution Quality or 
User Intent filters. Quality and Intent predictions are not available for 
category changes. The conflicting filters are marked in the Active Filters 
area, above.",
-   "ores-rcfilters-hidecategorization-conflicts-ores": "This filter 
conflicts with one or more Contribution Quality or User Intent filters. Quality 
and Intent predictions are not available for category changes.",
+   "ores-rcfilters-logactions-conflicts-ores": "This filter conflicts with 
one or more Contribution Quality or User Intent filters. Quality and Intent 
predictions are not available for logged actions.",
"ores-rcfilters-damaging-title": "Contribution quality predictions",
"ores-rcfilters-damaging-whats-this-header": "About contribution 
quality predictions",
"ores-rcfilters-damaging-whats-this-body": "These predictions are made 
by a machine-learning service trained on a large set of edits scored by human 
editors. Stricter, more accurate filters find fewer false positives but miss 
more of their target. Less accurate filters find more of their target, but they 
also find more false positives.",
-   "ores-rcfilters-damaging-conflicts-typeofchange": "Contribution Quality 
predictions are not available for certain types of change, so this filter 
conflicts with the following Type of Change {{PLURAL:$2|filter|filters}}: $1",
+   "ores-rcfilters-damaging-conflicts-logactions": "Contribution Quality 
predictions are not available for certain types of change, so this filter 
conflicts with the following Type of Change {{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-damaging-likelygood-label": "Very likely good",
"ores-rcfilters-damaging-likelygood-desc": "Highly accurate at finding 
almost all problem-free edits.",
"ores-rcfilters-damaging-maybebad-label": "May have problems",
@@ -35,7 +33,7 @@
"ores-rcfilters-goodfaith-title": "User intent predictions",
"ores-rcfilters-goodfaith-whats-this-header": "About user intent 
predictions",
"ores-rcfilters-goodfaith-whats-this-body": "These predictions about 
users' good faith are made by a machine-learning service trained on a large set 
of edits scored by human editors. Stricter, more accurate filters find fewer 
false positives but miss more of their target. Less accurate filters find more 
of their target, but they also find more false positives.",
-   "ores-rcfilters-goodfaith-conflicts-typeofchange": "User Intent 
predictions are not available for certain types of change, so this filter 
conflicts with the following Type of Change {{PLURAL:$2|filter|filters}}: $1",
+   "ores-rcfilters-goodfaith-conflicts-logactions": "User Intent 
predictions are not available for certain types of change, so this filter 
conflicts with the following Type of Change {{PLURAL:$2|filter|filters}}: $1",
"ores-rcfilters-goodfaith-good-label": "Very likely good faith",
"ores-rcfilters-goodfaith-good-desc": "Highly accurate at finding 
almost all good-faith edits.",
"ores-rcfilters-goodfaith-maybebad-label": "May be bad faith",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 989cc1e..1d6e097 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -23,13 +23,11 @@
"ores-pref-damaging": "Part asking for damaging threshold",
"ores-rcfilters-whats-this-link-text": 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: bootstrap_vz: Handle initial hostname a bit better

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

Change subject: bootstrap_vz:  Handle initial hostname a bit better
..


bootstrap_vz:  Handle initial hostname a bit better

- If hostname resolves to 'localhost' give dhcp a few bumps
   so it has a chance to catch up.
- Explicitly set /etc/hostname so that hostname persists after reboots.
   (I think this was previously handled by cloud-init)

Bug: T160908
Change-Id: I47abf38044088831b6b1a0389f3d81910d2f6937
---
M modules/labs_bootstrapvz/files/firstboot.sh
1 file changed, 18 insertions(+), 0 deletions(-)

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



diff --git a/modules/labs_bootstrapvz/files/firstboot.sh 
b/modules/labs_bootstrapvz/files/firstboot.sh
index 8349be2..c90e187 100644
--- a/modules/labs_bootstrapvz/files/firstboot.sh
+++ b/modules/labs_bootstrapvz/files/firstboot.sh
@@ -62,6 +62,23 @@
 project=`curl http://169.254.169.254/openstack/latest/meta_data.json/ | sed -r 
's/^.*project_id\": \"//'  | sed -r 's/\".*$//g'`
 ip=`curl http://169.254.169.254/1.0/meta-data/local-ipv4 2> /dev/null`
 hostname=`hostname`
+
+# If we're getting ahead of the dnsmasq config, loop until our hostname is
+#  actually ready for us.
+for run in {1..10}
+do
+if [ "$hostname" != 'localhost' ]
+then
+break
+fi
+
+echo `date`
+echo "Waiting for hostname to return the actual hostname."
+sleep 1
+/sbin/dhclient -1
+hostname=`hostname`
+done
+
 # domain is the last two domain sections, e.g. eqiad.wmflabs
 domain=`hostname -d | sed -r 's/.*\.([^.]+\.[^.]+)$/\1/'`
 
@@ -137,6 +154,7 @@
 EOF
 
 echo "$ip  $fqdn" >> /etc/hosts
+echo $hostname > /etc/hostname
 
 # This is only needed when running bootstrap-vz on
 # a puppetmaster::self instance, and even then

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47abf38044088831b6b1a0389f3d81910d2f6937
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
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]: profile::redis::multidc_instance: fully qualify puppet nonsense

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

Change subject: profile::redis::multidc_instance: fully qualify puppet nonsense
..


profile::redis::multidc_instance: fully qualify puppet nonsense

Change-Id: Ie530328f738e2bb60545d0487858fbf9be3daf9c
---
M modules/profile/manifests/redis/instance.pp
M modules/profile/manifests/redis/master.pp
M modules/profile/manifests/redis/multidc_instance.pp
3 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/modules/profile/manifests/redis/instance.pp 
b/modules/profile/manifests/redis/instance.pp
index d4daeea..b1ad59e 100644
--- a/modules/profile/manifests/redis/instance.pp
+++ b/modules/profile/manifests/redis/instance.pp
@@ -22,7 +22,7 @@
 }
 }
 
-redis::instance { $title:
+::redis::instance { $title:
 settings => merge($base_settings, $settings)
 }
 
diff --git a/modules/profile/manifests/redis/master.pp 
b/modules/profile/manifests/redis/master.pp
index 1eaa677..6491579 100644
--- a/modules/profile/manifests/redis/master.pp
+++ b/modules/profile/manifests/redis/master.pp
@@ -7,25 +7,25 @@
 $uris = apply_format("localhost:%s/${password}", $instances)
 $redis_ports = join($instances, ' ')
 
-system::role {'profile::redis::master': }
+::system::role {'profile::redis::master': }
 $auth_settings = {
 'masterauth'  => $password,
 'requirepass' => $password,
 }
 
-profile::redis::instance{ $instances:
+::profile::redis::instance{ $instances:
 settings => merge($settings, $auth_settings),
 aof  => $aof,
 }
 
 # Add monitoring, using nrpe and not remote checks anymore
-redis::monitoring::nrpe_instance { $instances: }
+::redis::monitoring::nrpe_instance { $instances: }
 
-diamond::collector { 'Redis':
+::diamond::collector { 'Redis':
 settings => { instances => join($uris, ', ') }
 }
 
-ferm::service { 'redis_master_role':
+::ferm::service { 'redis_master_role':
 proto   => 'tcp',
 notrack => true,
 port=> inline_template('(<%= @redis_ports %>)'),
diff --git a/modules/profile/manifests/redis/multidc_instance.pp 
b/modules/profile/manifests/redis/multidc_instance.pp
index d43218f..49a632f 100644
--- a/modules/profile/manifests/redis/multidc_instance.pp
+++ b/modules/profile/manifests/redis/multidc_instance.pp
@@ -20,7 +20,7 @@
 }
 }
 
-redis::instance { $title:
+::redis::instance { $title:
 settings => merge($base_settings, $settings)
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: bacula: Fix typos in client.erb

2017-03-24 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/344648 )

Change subject: bacula: Fix typos in client.erb
..


bacula: Fix typos in client.erb

Fix the really messed up cert and key arguments in bacula's client
resource

Change-Id: I73c4dc2ef6430c8bb3c280520e09f7f9567d7169
---
M modules/bacula/templates/bacula-client.erb
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Alexandros Kosiaris: Verified; Looks good to me, approved



diff --git a/modules/bacula/templates/bacula-client.erb 
b/modules/bacula/templates/bacula-client.erb
index 5156019..6f0ffef 100644
--- a/modules/bacula/templates/bacula-client.erb
+++ b/modules/bacula/templates/bacula-client.erb
@@ -12,8 +12,8 @@
 TLS Enable = yes
 TLS Require = yes
 TLS CA Certificate File = "/var/lib/puppet/ssl/certs/ca.pem"
-TLS Certificate = "/etc/bacula/ssl/server.key"
-TLS Key = "/etc/bacula/ssl/server-keypair.pem"
+TLS Certificate = "/etc/bacula/ssl/cert.pem"
+TLS Key = "/etc/bacula/ssl/server.pem"
 # Priority = 10
 # Maximum Bandwith Per Job =
 # Autoprune = yes

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I73c4dc2ef6430c8bb3c280520e09f7f9567d7169
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Alexandros Kosiaris 
Gerrit-Reviewer: Alexandros Kosiaris 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Further attempt to get partman working for labtestvirt2002

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

Change subject: Further attempt to get partman working for labtestvirt2002
..

Further attempt to get partman working for labtestvirt2002

Change-Id: Icb414a21ddab648171f8ced58fb66d69b54555bd
---
M modules/install_server/files/autoinstall/netboot.cfg
A modules/install_server/files/autoinstall/partman/labtestvirt.cfg
2 files changed, 40 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/57/344657/1

diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index 155df12..3bcfdf3 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -97,7 +97,7 @@
 labtestweb2001) echo partman/raid1.cfg ;; \
 labtestservices2001) echo partman/raid1.cfg ;; \
 labtestvirt2001) echo partman/raid1.cfg ;; \
-labtestvirt2002) echo partman/mw.cfg ;; \
+labtestvirt2002) echo partman/labtestvirt.cfg ;; \
 labvirt100[1-9]) echo partman/virt-hp.cfg ;; \
 labvirt101[0-4]) echo partman/labvirt-ssd.cfg ;; \
 lithium|wezen) echo partman/raid1-gpt.cfg ;; \
diff --git a/modules/install_server/files/autoinstall/partman/labtestvirt.cfg 
b/modules/install_server/files/autoinstall/partman/labtestvirt.cfg
new file mode 100644
index 000..5e679cd
--- /dev/null
+++ b/modules/install_server/files/autoinstall/partman/labtestvirt.cfg
@@ -0,0 +1,39 @@
+# Labtest virt node. Creates:
+#  * no RAID (either single disk or hardware raid presenting a single device)
+#  * no LVM
+#  * no swap
+#  * 20G / formatted with ext4
+#  * the rest formatted with ext4 for /srv
+
+d-ipartman-auto/method string  regular
+d-ipartman-auto/disk   string  /dev/sda
+
+d-ipartman-auto/expert_recipe  string  \
+   apache :\
+   2   2   2 ext4  \
+   $primary{ } \
+   method{ format }\
+   format{ }   \
+   use_filesystem{ }   \
+   filesystem{ ext4 }  \
+   mountpoint{ / } \
+   .   \
+   64  10001000 ext4   \
+   $primary{ } \
+   $bootable{ }\
+   method{ format }\
+   format{ }   \
+   use_filesystem{ }   \
+   filesystem{ ext4 }  \
+   mountpoint{ /srv }  \
+   .
+
+d-ipartman-auto/choose_recipe  apache
+
+# no swap
+d-ipartman-basicfilesystems/no_swapboolean false
+
+d-ipartman/choose_partitionselect finish
+d-ipartman/confirm boolean true
+d-ipartman/confirm_nooverwrite boolean true
+d-ipartman/confirm_write_new_label boolean true

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Request._add_defaults: Make sure the order of parameters doe...

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

Change subject: Request._add_defaults: Make sure the order of parameters does 
not change
..


Request._add_defaults: Make sure the order of parameters does not change

Using `set` on parameters was causing occasional cache misses because the
order of elements in a set is not guaranteed to be preserved.

Bug: T161291
Change-Id: I6ff4ddacf31af2d7ac1535b98dbeb4a5e46cd47a
---
M pywikibot/data/api.py
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 9030e4b..4f362af 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Interface to Mediawiki's api.php."""
 #
-# (C) Pywikibot team, 2007-2016
+# (C) Pywikibot team, 2007-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -1683,14 +1683,14 @@
 meta = self._params.get("meta", [])
 if "userinfo" not in meta:
 meta = set(meta + ['userinfo'])
-self._params['meta'] = list(meta)
+self._params['meta'] = sorted(meta)
 uiprop = self._params.get("uiprop", [])
 uiprop = set(uiprop + ["blockinfo", "hasmsg"])
-self._params["uiprop"] = list(sorted(uiprop))
+self._params['uiprop'] = sorted(uiprop)
 if 'prop' in self._params:
 if self.site.has_extension('ProofreadPage'):
 prop = set(self._params['prop'] + ['proofread'])
-self._params['prop'] = list(prop)
+self._params['prop'] = sorted(prop)
 # When neither 'continue' nor 'rawcontinue' is present and the
 # version number is at least 1.25wmf5 we add a dummy rawcontinue
 # parameter. Querying siteinfo is save as it adds 'continue'.
@@ -2322,7 +2322,7 @@
 % (self.__class__.__name__, filename, uniquedescr),
 _logger)
 return True
-except IOError as e:
+except IOError:
 # file not found
 return False
 except Exception as e:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ff4ddacf31af2d7ac1535b98dbeb4a5e46cd47a
Gerrit-PatchSet: 7
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Dalba 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
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...Wikibase[master]: Use repo-specific base concept URI to build concepturi in wb...

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

Change subject: Use repo-specific base concept URI to build concepturi in 
wbsearchentities results
..


Use repo-specific base concept URI to build concepturi in wbsearchentities 
results

Bug: T154590
Change-Id: I964be139970f6accb8dd002cbc56e054b2750e3c
---
M repo/Wikibase.php
M repo/includes/Api/SearchEntities.php
M repo/includes/WikibaseRepo.php
M repo/tests/phpunit/includes/Api/SearchEntitiesTest.php
M repo/tests/phpunit/includes/WikibaseRepoTest.php
5 files changed, 62 insertions(+), 13 deletions(-)

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



diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 5236193..75473dc 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -228,7 +228,7 @@
$repo->getPropertyDataTypeLookup(),
$repo->getTermsLanguages(),
$repo->getEnabledEntityTypes(),
-   $repo->getSettings()->getSetting( 
'conceptBaseUri' )
+   $repo->getConceptBaseUris()
);
},
];
diff --git a/repo/includes/Api/SearchEntities.php 
b/repo/includes/Api/SearchEntities.php
index cf07fe4..eb2d20d 100644
--- a/repo/includes/Api/SearchEntities.php
+++ b/repo/includes/Api/SearchEntities.php
@@ -4,6 +4,8 @@
 
 use ApiBase;
 use ApiMain;
+use LogicException;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Services\Lookup\PropertyDataTypeLookup;
 use Wikibase\Lib\ContentLanguages;
@@ -43,9 +45,9 @@
private $entityTypes;
 
/**
-* @var string
+* @var string[]
 */
-   private $conceptBaseUri;
+   private $conceptBaseUris;
 
/**
 * @param ApiMain $mainModule
@@ -55,7 +57,7 @@
 * @param PropertyDataTypeLookup $propertyDataTypeLookup
 * @param ContentLanguages $termLanguages
 * @param string[] $entityTypes
-* @param string $conceptBaseUri
+* @param string[] $conceptBaseUris Associative array mapping 
repository names to base URIs of concept URIs
 *
 * @see ApiBase::__construct
 */
@@ -67,7 +69,7 @@
PropertyDataTypeLookup $propertyDataTypeLookup,
ContentLanguages $termLanguages,
array $entityTypes,
-   $conceptBaseUri
+   array $conceptBaseUris
) {
parent::__construct( $mainModule, $moduleName, '' );
 
@@ -76,7 +78,7 @@
$this->propertyDataTypeLookup = $propertyDataTypeLookup;
$this->termsLanguages = $termLanguages;
$this->entityTypes = $entityTypes;
-   $this->conceptBaseUri = $conceptBaseUri;
+   $this->conceptBaseUris = $conceptBaseUris;
}
 
/**
@@ -120,7 +122,7 @@
$entry = array(
'repository' => $entityId->getRepositoryName(),
'id' => $entityId->getSerialization(),
-   'concepturi' => $this->conceptBaseUri . 
$entityId->getSerialization(),
+   'concepturi' => $this->getConceptUri( $entityId ),
'url' => $title->getFullURL(),
'title' => $title->getPrefixedText(),
'pageid' => $title->getArticleID()
@@ -169,6 +171,31 @@
}
 
/**
+* @param EntityId $entityId
+*
+* @return string
+*/
+   private function getConceptUri( EntityId $entityId ) {
+   $baseUri = $this->getConceptBaseUri( $entityId );
+   return $baseUri . $entityId->getLocalPart();
+   }
+
+   /**
+* @param EntityId $entityId
+*
+* @throws LogicException when there is no base URI for the repository 
$entityId belongs to
+*
+* @return string
+*/
+   private function getConceptBaseUri( EntityId $entityId ) {
+   if ( !isset( 
$this->conceptBaseUris[$entityId->getRepositoryName()] ) ) {
+   throw new LogicException( 'No base URI for for concept 
URI for repository: ' . $entityId->getRepositoryName() );
+   }
+
+   return $this->conceptBaseUris[$entityId->getRepositoryName()];
+   }
+
+   /**
 * @see ApiBase::execute()
 */
public function execute() {
diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 3b2e065..50708f1 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -1916,4 +1916,11 @@
return 
$this->repositoryDefinitions->getEntityTypeToRepositoryMapping();
}
 
+   /**
+* @return string[] Associative array 

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Introduce and start using LexemeViewFactory

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

Change subject: Introduce and start using LexemeViewFactory
..


Introduce and start using LexemeViewFactory

This is, at this point, doing nothing but moving existing code around.
Note that this moves the dependency on WikibaseRepo into the new factory.
I believe we should avoid this but do not wanted to do this in the same
patch, making it more complicated.

Bug: T161092
Change-Id: Ie3dd7b3b0d2809c30606051e338ff2f415300f8b
---
M WikibaseLexeme.entitytypes.php
A src/View/LexemeViewFactory.php
A tests/phpunit/mediawiki/View/LexemeViewFactoryTest.php
3 files changed, 153 insertions(+), 41 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, approved
  Aleksey Bekh-Ivanov (WMDE): Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/WikibaseLexeme.entitytypes.php b/WikibaseLexeme.entitytypes.php
index 714ebd6..3e2ff7f 100644
--- a/WikibaseLexeme.entitytypes.php
+++ b/WikibaseLexeme.entitytypes.php
@@ -12,26 +12,15 @@
  * @author Amir Sarabadani 
  */
 
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Lexeme\ChangeOp\Deserialization\LemmaChangeOpDeserializer;
-use Wikibase\Lexeme\ChangeOp\Deserialization\LanguageChangeOpDeserializer;
-use 
Wikibase\Lexeme\ChangeOp\Deserialization\LexicalCategoryChangeOpDeserializer;
-use Wikibase\Lexeme\Rdf\LexemeRdfBuilder;
-use Wikibase\Lexeme\Validators\LexemeValidatorFactory;
-use Wikibase\Lexeme\View\LexemeFormsView;
-use Wikibase\Rdf\RdfVocabulary;
-use Wikibase\Repo\ChangeOp\Deserialization\ClaimsChangeOpDeserializer;
-use Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator;
-use Wikibase\Repo\MediaWikiLanguageDirectionalityLookup;
-use Wikibase\Repo\MediaWikiLocalizedTextProvider;
-use Wikibase\Repo\ParserOutput\FallbackHintHtmlTermRenderer;
-use Wikibase\Repo\WikibaseRepo;
 use Wikibase\DataModel\DeserializerFactory;
+use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\SerializerFactory;
 use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
-use Wikibase\Lib\LanguageNameLookup;
 use Wikibase\LanguageFallbackChain;
+use Wikibase\Lexeme\ChangeOp\Deserialization\LanguageChangeOpDeserializer;
+use Wikibase\Lexeme\ChangeOp\Deserialization\LemmaChangeOpDeserializer;
 use Wikibase\Lexeme\ChangeOp\Deserialization\LexemeChangeOpDeserializer;
+use 
Wikibase\Lexeme\ChangeOp\Deserialization\LexicalCategoryChangeOpDeserializer;
 use Wikibase\Lexeme\Content\LexemeContent;
 use Wikibase\Lexeme\Content\LexemeHandler;
 use Wikibase\Lexeme\DataModel\Lexeme;
@@ -40,10 +29,15 @@
 use Wikibase\Lexeme\DataModel\Serialization\LexemeSerializer;
 use Wikibase\Lexeme\DataModel\Services\Diff\LexemeDiffer;
 use Wikibase\Lexeme\DataModel\Services\Diff\LexemePatcher;
-use Wikibase\Lexeme\View\LexemeView;
+use Wikibase\Lexeme\Rdf\LexemeRdfBuilder;
+use Wikibase\Lexeme\Validators\LexemeValidatorFactory;
+use Wikibase\Lexeme\View\LexemeViewFactory;
+use Wikibase\Rdf\RdfVocabulary;
+use Wikibase\Repo\ChangeOp\Deserialization\ClaimsChangeOpDeserializer;
+use Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator;
+use Wikibase\Repo\WikibaseRepo;
 use Wikibase\View\EditSectionGenerator;
 use Wikibase\View\EntityTermsView;
-use Wikibase\View\Template\TemplateFactory;
 use Wikimedia\Purtle\RdfWriter;
 
 return [
@@ -68,32 +62,15 @@
EditSectionGenerator $editSectionGenerator,
EntityTermsView $entityTermsView
) {
-   $wikibaseRepo = WikibaseRepo::getDefaultInstance();
-   $userLanguage = $wikibaseRepo->getUserLanguage();
-   $textProvider = new MediaWikiLocalizedTextProvider( 
$userLanguage->getCode() );
-   $viewFactory = $wikibaseRepo->getViewFactory();
-   $languageDirectionalityLookup = new 
MediaWikiLanguageDirectionalityLookup();
-   $htmlTermRenderer = new FallbackHintHtmlTermRenderer(
-   $languageDirectionalityLookup,
-   new LanguageNameLookup( $languageCode )
+   $factory = new LexemeViewFactory(
+   $languageCode,
+   $labelDescriptionLookup,
+   $fallbackChain,
+   $editSectionGenerator,
+   $entityTermsView
);
 
-   // TODO: One of the next steps should be to extract 
this to a LexemeViewFactory.
-   return new LexemeView(
-   TemplateFactory::getDefaultInstance(),
-   $entityTermsView,
-   

[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Update data-model to 7.0.0

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

Change subject: Update data-model to 7.0.0
..


Update data-model to 7.0.0

Change-Id: I871d1439f5cfce0c9b61cfa2951ee1938241a33b
---
M composer.json
M tests/browser/environments.yml
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index a0ffe12..e4ba2e0 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,7 @@
"php": ">=5.5.0",
"serialization/serialization": "~3.2",
"wikimedia/assert": "~0.2.2",
-   "wikibase/data-model": "~6.2",
+   "wikibase/data-model": "^7.0",
"wikibase/data-model-serialization": "~2.0",
"wikibase/data-model-services": "~3.6"
},
diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index 344605a..861baec 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -26,3 +26,9 @@
   mediawiki_password: …
   user_factory: true
   # lexeme_namespace: 'Lexeme:'
+
+integration:
+  item_namespace: 'Item:'
+  language_code: en
+  browser: firefox
+  user_factory: true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I871d1439f5cfce0c9b61cfa2951ee1938241a33b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/WikibaseLexeme
Gerrit-Branch: master
Gerrit-Owner: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Aleksey Bekh-Ivanov (WMDE) 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   >