[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Don't truncate bundled item content in mobile view

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't truncate bundled item content in mobile view
..


Don't truncate bundled item content in mobile view

Bug: T140523
Change-Id: I8223d5596825bdd80c3c961576b46c7f2d4654cd
---
M modules/styles/mw.echo.ui.NotificationItemWidget.less
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/modules/styles/mw.echo.ui.NotificationItemWidget.less 
b/modules/styles/mw.echo.ui.NotificationItemWidget.less
index 5b44965..89dc7e9 100644
--- a/modules/styles/mw.echo.ui.NotificationItemWidget.less
+++ b/modules/styles/mw.echo.ui.NotificationItemWidget.less
@@ -136,9 +136,13 @@
width: 100%;
 
&-header {
-   
.mw-echo-ui-mixin-one-line-truncated;
width: 100%;
-   position: absolute;
+
+   @media all and ( min-width: 
@specialpage-mobile-width-medium ) {
+   // On small screens, 
don't truncate
+   position: absolute;
+   
.mw-echo-ui-mixin-one-line-truncated;
+   }
 
&-wrapper {
position: relative;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8223d5596825bdd80c3c961576b46c7f2d4654cd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Round timestamps to the day when displaying date titles in S...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Round timestamps to the day when displaying date titles in 
Special:Notifications
..


Round timestamps to the day when displaying date titles in Special:Notifications

Bug: T141915
Change-Id: I5fcb78ac2fa168aa8bba90c467544fe3a6914ec3
---
M modules/ui/mw.echo.ui.DatedSubGroupListWidget.js
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/modules/ui/mw.echo.ui.DatedSubGroupListWidget.js 
b/modules/ui/mw.echo.ui.DatedSubGroupListWidget.js
index 24116fa..4e26b9f 100644
--- a/modules/ui/mw.echo.ui.DatedSubGroupListWidget.js
+++ b/modules/ui/mw.echo.ui.DatedSubGroupListWidget.js
@@ -12,7 +12,7 @@
 * @param {Object} [config] Configuration object
 */
mw.echo.ui.DatedSubGroupListWidget = function 
MwEchoUiDatedSubGroupListWidget( controller, listModel, config ) {
-   var momentTimestamp, diff, fullDate,
+   var momentTimestamp, diff, fullDate, stringTimestamp,
now = moment(),
$primaryDate = $( '' )
.addClass( 
'mw-echo-ui-datedSubGroupListWidget-title-primary' ),
@@ -42,9 +42,11 @@
}
}, config ) );
 
-   momentTimestamp = moment.utc( this.model.getTimestamp() );
+   // Round all dates to the day they're in, as if they all 
happened at 00:00h
+   stringTimestamp = moment.utc( this.model.getTimestamp() 
).local().format( '-MM-DD' );
+   momentTimestamp = moment( stringTimestamp );
diff = now.diff( momentTimestamp, 'weeks' );
-   fullDate = momentTimestamp.local().format( 'LL' );
+   fullDate = momentTimestamp.format( 'LL' );
 
$primaryDate.text( fullDate );
if ( diff === 0 ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5fcb78ac2fa168aa8bba90c467544fe3a6914ec3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] analytics/reportupdater[master]: Add tcywiki to all wikis list

2016-08-05 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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

Change subject: Add tcywiki to all wikis list
..

Add tcywiki to all wikis list

Change-Id: I03d2858d9a3ef777b7379a45a27aa69522d78b8b
---
M wikis.txt
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/reportupdater 
refs/changes/40/303340/1

diff --git a/wikis.txt b/wikis.txt
index ce5b359..d2c30cc 100644
--- a/wikis.txt
+++ b/wikis.txt
@@ -706,6 +706,7 @@
 tawikiquote
 tawikisource
 tawiktionary
+tcywiki
 tenwiki
 test2wiki
 testwiki

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03d2858d9a3ef777b7379a45a27aa69522d78b8b
Gerrit-PatchSet: 1
Gerrit-Project: analytics/reportupdater
Gerrit-Branch: master
Gerrit-Owner: Milimetric 

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


[MediaWiki-commits] [Gerrit] analytics/refinery[master]: [WIP] Oozify sqoop import of mediawiki tables

2016-08-05 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review.

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

Change subject: [WIP] Oozify sqoop import of mediawiki tables
..

[WIP] Oozify sqoop import of mediawiki tables

Sqoop a list of tables from a list of mediawiki databases into hdfs.

TODO: just wrote the sqoop shell script for now, need to write oozie.
I'm going to run this over the weekend just to see how long it takes.

Bug: T141476
Change-Id: Id088fca8a046ee91816559bbb3e8d239d9b500e0
---
M oozie/mediawiki/README.md
A oozie/mediawiki/import/README.md
A oozie/mediawiki/import/create_avro_table.sql
A oozie/mediawiki/import/sqoop_mediawiki_dbs.sh
A oozie/mediawiki/import/wiki_db.list
A oozie/mediawiki/import/wiki_db_table.list
A oozie/mediawiki/load/README.md
7 files changed, 193 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/39/303339/1

diff --git a/oozie/mediawiki/README.md b/oozie/mediawiki/README.md
index 0f93466..01dfb93 100644
--- a/oozie/mediawiki/README.md
+++ b/oozie/mediawiki/README.md
@@ -1,12 +1,3 @@
-This directory contains the dataset definition and coordinators that launch
-jobs specific to data loaded from MediaWiki's Avro+Kafka data pipeline.
-
-If you are producing a new Avro dataset via Mediawiki Monolog and Kafka,
-you should use these Oozie configs to import your data and automatically add 
Hive partitions to it.  Most things needed to do this are abstracted here via 
the 'channel' property that is distinct for each coordinator launched by 
bundle.xml.
-
-Steps to add a new coordinator:
-
-- Add a CREATE TABLE hive file in hive/mediawiki and create your table in Hive.
-- Add a new coordinator declaration in bundle.xml and set $channel
-  and $raw_data_directory appropriately.
-- Relaunch the bundle.
+General collection of mediawiki-related jobs:
+- import: loads data from mediawiki databases into hdfs
+- load: manipulating mediawiki's avro/kafka data pipeline
diff --git a/oozie/mediawiki/import/README.md b/oozie/mediawiki/import/README.md
new file mode 100644
index 000..8ace467
--- /dev/null
+++ b/oozie/mediawiki/import/README.md
@@ -0,0 +1 @@
+Scripts, workflows, and coordinators for sqooping a list of tables from a list 
of dbs into HDFS.  The queries for each table are pre-written in order to 
control what data types we get.
diff --git a/oozie/mediawiki/import/create_avro_table.sql 
b/oozie/mediawiki/import/create_avro_table.sql
new file mode 100644
index 000..d1415bf
--- /dev/null
+++ b/oozie/mediawiki/import/create_avro_table.sql
@@ -0,0 +1,29 @@
+-- example table create syntax on top of avro data
+-- not sure we need this if we'll just read it in spark (do people want it 
anyway?)
+
+CREATE EXTERNAL TABLE `milimetric.enwiki_revision`(
+  `rev_id` bigint COMMENT '', 
+  `rev_page` bigint COMMENT '', 
+  `rev_text_id` bigint COMMENT '', 
+  `rev_comment` binary COMMENT '', 
+  `rev_user` bigint COMMENT '', 
+  `rev_user_text` binary COMMENT '', 
+  `rev_timestamp` binary COMMENT '', 
+  `rev_minor_edit` boolean COMMENT '', 
+  `rev_deleted` boolean COMMENT '', 
+  `rev_len` bigint COMMENT '', 
+  `rev_parent_id` bigint COMMENT '', 
+  `rev_sha1` binary COMMENT '', 
+  `rev_content_model` binary COMMENT '', 
+  `rev_content_format` binary COMMENT '')
+ROW FORMAT SERDE 
+  'org.apache.hadoop.hive.serde2.avro.AvroSerDe' 
+STORED AS INPUTFORMAT 
+  'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat' 
+OUTPUTFORMAT 
+  'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
+LOCATION
+  'hdfs://analytics-hadoop/user/milimetric/mediawiki/enwiki/revision'
+TBLPROPERTIES (
+  'avro.schema.url'='hdfs:///user/milimetric/mediawiki/schemas/revision.avsc'
+)
diff --git a/oozie/mediawiki/import/sqoop_mediawiki_dbs.sh 
b/oozie/mediawiki/import/sqoop_mediawiki_dbs.sh
new file mode 100755
index 000..7fa3872
--- /dev/null
+++ b/oozie/mediawiki/import/sqoop_mediawiki_dbs.sh
@@ -0,0 +1,141 @@
+###
+# For each table in each database specified, sqoop the table in
+#   Example usage:
+#   sqoop_mediawiki_dbs.sh wiki_db.list wiki_db_table.list 
analytics-store.eqiad.wmnet /wmf/raw/mediawiki/
+#
+#   will load
+#   from analytics-store.eqiad.wmnet, for
+#   each table TABLE in wiki_db_table.list, from
+#   each db WIKI in wiki_db.list, into
+#   /wmf/raw/mediawiki/WIKI/TABLE
+#   as an avro data file
+###
+
+DBS=$1
+TABLES=$2
+DB_HOST=$3
+TARGET_DIR=$4
+
+QUERY_REVISION="
+ select rev_id,
+rev_page,
+rev_text_id,
+cast(rev_comment as char)   as rev_comment,
+rev_user,
+cast(rev_user_text as char) as rev_user_text,
+cast(rev_timestamp as char) as rev_timestamp,
+rev_minor_edit,
+rev_deleted,
+rev_len,
+rev_parent_id,
+cast(rev_sha1 as char)  as rev_sha1,
+cast(rev_content_model as char)

[MediaWiki-commits] [Gerrit] oojs/ui[master]: MediaWiki theme: Fix misalignment of widgets by applying pix...

2016-08-05 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: MediaWiki theme: Fix misalignment of widgets by applying pixel 
`min-height`
..

MediaWiki theme: Fix misalignment of widgets by applying pixel `min-height`

Fixing different height of widgets, which is causing misalignment, by
applying `min-height` in pixels. Also introducing
`@padding-input-vertical` Less variable and removing unnecessary CSS
properties like `width: 100%` when `display: block` is set.

Bug: T102127
Bug: T142115
Change-Id: Ifa2c7e8c6ad0991767f359230c755081ba889c7b
---
M src/styles/widgets/DropdownWidget.less
M src/styles/widgets/NumberInputWidget.less
M src/themes/mediawiki/common.less
M src/themes/mediawiki/elements.less
M src/themes/mediawiki/widgets.less
5 files changed, 10 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/38/303338/1

diff --git a/src/styles/widgets/DropdownWidget.less 
b/src/styles/widgets/DropdownWidget.less
index 6f69e88..e312771 100644
--- a/src/styles/widgets/DropdownWidget.less
+++ b/src/styles/widgets/DropdownWidget.less
@@ -5,7 +5,6 @@
position: relative;
 
&-handle {
-   width: 100%;
display: block;
white-space: nowrap;
overflow: hidden;
diff --git a/src/styles/widgets/NumberInputWidget.less 
b/src/styles/widgets/NumberInputWidget.less
index f97171c..0cfc764 100644
--- a/src/styles/widgets/NumberInputWidget.less
+++ b/src/styles/widgets/NumberInputWidget.less
@@ -26,7 +26,6 @@
.oo-ui-buttonElement-button {
min-width: 0;
width: 100%;
-   min-height: 0;
}
 
.theme-oo-ui-numberInputWidget();
diff --git a/src/themes/mediawiki/common.less b/src/themes/mediawiki/common.less
index 10a9515..762cf33 100644
--- a/src/themes/mediawiki/common.less
+++ b/src/themes/mediawiki/common.less
@@ -39,7 +39,7 @@
 // Box Sizes
 @min-width-button-framed: 40px;
 @max-width-input-default: 50em;
-@min-height-button-framed: 31px;
+@min-height-default: 31px;
 
 @size-icon-min: 24px;
 @size-indicator-min: 12px;
@@ -65,6 +65,8 @@
 
 @border-width-default: 1px;
 
+@padding-input-vertical: 0.46875em;
+
 @box-shadow-dialog: 0 0.15em 0 0 rgba( 0, 0, 0, 0.15 );
 @box-shadow-menu: @box-shadow-dialog;
 @box-shadow-focus-default: inset 0 0 0 1px @color-progressive;
diff --git a/src/themes/mediawiki/elements.less 
b/src/themes/mediawiki/elements.less
index 9e548c8..44c3615 100644
--- a/src/themes/mediawiki/elements.less
+++ b/src/themes/mediawiki/elements.less
@@ -98,10 +98,10 @@
}
 
> .oo-ui-buttonElement-button {
-   padding: 0.5em 1em;
min-width: @min-width-button-framed;
-   min-height: @min-height-button-framed;
+   min-height: @min-height-default;
border-radius: @border-radius-default;
+   padding: @padding-input-vertical 1em;
position: relative;
.oo-ui-transition(
background @transition-ease-quick,
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index c76807f..676fe7a 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -101,9 +101,8 @@
.oo-ui-inline-spacing( 0.5em );
 
&-handle {
-   padding: 0.5em 0;
-   height: 2.275em;
-   line-height: 1.275;
+   padding: 0.54685em 1em 0.3125em 1em;
+   min-height: @min-height-default;
border: @border-default;
border-radius: @border-radius-default;
 
@@ -117,10 +116,6 @@
top: 0;
left: 0.25em;
margin: 0.3em;
-   }
-
-   .oo-ui-labelElement-label {
-   margin: 0 1em;
}
}
 
@@ -462,7 +457,7 @@
font-size: inherit;
font-family: inherit;
height: 1.5em;
-   padding: 0.5em 1em;
+   padding: @padding-input-vertical 1em;
}
 
&.oo-ui-widget-enabled {
@@ -585,6 +580,7 @@
 
input,
textarea {
+   min-height: @min-height-default;
padding: 0.5em;
margin: 0;
font-size: inherit;
@@ -966,7 +962,7 @@
 }
 
 .theme-oo-ui-menuOptionWidget () {
-   padding: 0.5em 1em;
+   padding: @padding-input-vertical 1em;
 
&.oo-ui-optionWidget {
&-selected {

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Generate sample notifications for Wikibase

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Generate sample notifications for Wikibase
..


Generate sample notifications for Wikibase

Bug: T110604
Change-Id: I6e6817f80bbf8a8c28cfa59efdf424f736bb4e33
---
M maintenance/generateSampleNotifications.php
1 file changed, 28 insertions(+), 0 deletions(-)

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



diff --git a/maintenance/generateSampleNotifications.php 
b/maintenance/generateSampleNotifications.php
index 1d0bbbc..bd2926b 100644
--- a/maintenance/generateSampleNotifications.php
+++ b/maintenance/generateSampleNotifications.php
@@ -23,6 +23,7 @@
'osm',
'edit-thanks',
'edu',
+   'page-connection',
);
 
public function __construct() {
@@ -119,6 +120,10 @@
 
if ( $this->shouldGenerate( 'edu', $types ) ) {
$this->generateEducationProgram( $user, $agent );
+   }
+
+   if ( $this->shouldGenerate( 'page-connection', $types ) ) {
+   $this->generateWikibase( $user, $agent );
}
 
$this->output( "Completed \n" );
@@ -466,6 +471,29 @@
// NOTE: Not generating 'ep-course-talk-notification' for now
// as it requires a full setup to actually work (institution, 
course, instructors, students).
}
+
+   private function generateWikibase( User $user, User $agent ) {
+   if ( !class_exists( 
'Wikibase\Client\Hooks\EchoNotificationsHandlers' ) ) {
+   $this->output( 'class 
Wikibase\Client\Hooks\EchoNotificationsHandlers not found' );
+   return;
+   }
+
+   $title = $this->generateNewPageTitle();
+   $this->addToPageContent( $title, $user, "this is a new page" );
+   $helpPage = Title::newFromText( 'Project:Wikidata' );
+   $this->addToPageContent( $helpPage, $user, "this is the help 
page" );
+
+   $this->output( "{$agent->getName()} is connecting 
{$user->getName()}'s page {$title->getPrefixedText()} to an item\n" );
+   EchoEvent::create( [
+   'type' => 
Wikibase\Client\Hooks\EchoNotificationsHandlers::NOTIFICATION_TYPE,
+   'title' => $title,
+   'extra' => [
+   'url' => Title::newFromText( 'Item:Q1' 
)->getFullURL(),
+   'repoSiteName' => 'Wikidata'
+   ],
+   'agent' => $agent,
+   ] );
+   }
 }
 
 $maintClass = "GenerateSampleNotifications";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e6817f80bbf8a8c28cfa59efdf424f736bb4e33
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Sbisson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.13]: Hack around browser bug in IE breaking badge alignment in Mo...

2016-08-05 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Hack around browser bug in IE breaking badge alignment in 
Monobook
..

Hack around browser bug in IE breaking badge alignment in Monobook

A browser bug causes the badges to be pushed down by 1em in IE11
and below, but not in Edge. The only way I could find to work
around this was to add top:-1em; in IE browsers using CSS hacks.

Bug: T142053
Change-Id: If240f7281dd795085c003af524da294d5bf5ff76
(cherry picked from commit 0b7f8712a9e9ac896dd7eb55b6b93d8845f21ce6)
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 7e1b2ba..a3cde25 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -47,4 +47,17 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
+   position: relative;
+
+   // HACK for IE6-9 (T142053)
+   top: ~"-1em\9";
+}
+
+
+// HACK for IE10 and IE11 (T142053)
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+   #p-personal #pt-notifications-alert,
+   #p-personal #pt-notifications-notice {
+   top: -1em;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If240f7281dd795085c003af524da294d5bf5ff76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.13
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...cxserver[master]: registry: Add Tulu Wikipedia

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: registry: Add Tulu Wikipedia
..


registry: Add Tulu Wikipedia

A new Wikipedia is born, and now we can translate from and to it.

Bug: T140898
Change-Id: I6570097edc123d74e2fe45eaa0044c78d34ac4af
---
M registry.wikimedia.yaml
M registry.yaml
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/registry.wikimedia.yaml b/registry.wikimedia.yaml
index a6c2604..a218a1f 100644
--- a/registry.wikimedia.yaml
+++ b/registry.wikimedia.yaml
@@ -238,6 +238,7 @@
   - sw
   - szl
   - ta
+  - tcy
   - tet
   - te
   - tg
@@ -521,6 +522,7 @@
   - sw
   - szl
   - ta
+  - tcy
   - tet
   - te
   - tg
diff --git a/registry.yaml b/registry.yaml
index f8e5a32..4f67cad 100644
--- a/registry.yaml
+++ b/registry.yaml
@@ -238,6 +238,7 @@
   - sw
   - szl
   - ta
+  - tcy
   - tet
   - te
   - tg
@@ -521,6 +522,7 @@
   - sw
   - szl
   - ta
+  - tcy
   - tet
   - te
   - tg

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6570097edc123d74e2fe45eaa0044c78d34ac4af
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/cxserver
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: KartikMistry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_27]: Fix for "Invalid key type: integer"

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix for "Invalid key type: integer"
..

Fix for "Invalid key type: integer"

MWCryptHash::hmac requires a string, but mt_rand() returns an integer.
This issue resulted in an uncaught exception in a fresh installation
of mediawiki.

Imported from https://github.com/wikimedia/mediawiki/pull/55

Change-Id: Idccf5f230bfc2de30357b03c78c51cdad4839515
(cherry picked from commit 8d590fac31d5b37b892ea76852da029bb01cdbed)
---
M includes/utils/MWCryptRand.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/303336/1

diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index f3d72e8..dd3ea1b 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -324,7 +324,7 @@
": Falling back to using a pseudo random state 
to generate randomness.\n" );
}
while ( strlen( $buffer ) < $bytes ) {
-   $buffer .= MWCryptHash::hmac( $this->randomState(), 
mt_rand() );
+   $buffer .= MWCryptHash::hmac( $this->randomState(), 
strval( mt_rand() ) );
// This code is never really cryptographically strong, 
if we use it
// at all, then set strong to false.
$this->strong = false;

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Always call back if SurfaceObserver sees a branch node change

2016-08-05 Thread Divec (Code Review)
Divec has uploaded a new change for review.

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

Change subject: Always call back if SurfaceObserver sees a branch node change
..

Always call back if SurfaceObserver sees a branch node change

Bug: T122291
Change-Id: I1e1094b1d94a21ed742ef52d612bef52997f2ba4
---
M src/ce/ve.ce.SurfaceObserver.js
1 file changed, 12 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/35/303335/1

diff --git a/src/ce/ve.ce.SurfaceObserver.js b/src/ce/ve.ce.SurfaceObserver.js
index 4c9d9f1..1f601b6 100644
--- a/src/ce/ve.ce.SurfaceObserver.js
+++ b/src/ce/ve.ce.SurfaceObserver.js
@@ -123,6 +123,9 @@
 
 /**
  * Poll to update SurfaceObserver, but don't signal any changes back to the 
Surface
+ * (except branch node changes)
+ *
+ * TODO: The method name is misleading because branch node changes are 
signalled
  *
  * @method
  */
@@ -146,7 +149,8 @@
  *
  * @method
  * @private
- * @param {boolean} signalChanges If there changes are observed, call 
Surface#handleObservedChange
+ * @param {boolean} signalChanges Call Surface#handleObservedChange if 
content/selection changes
+ * are observed (branch node changes are always signalled).
  * @param {boolean} selectionOnly Check for selection changes only
  */
 ve.ce.SurfaceObserver.prototype.pollOnceInternal = function ( signalChanges, 
selectionOnly ) {
@@ -164,13 +168,14 @@
);
this.rangeState = newState;
 
-   if ( signalChanges && (
-   newState.contentChanged ||
-   // TODO: The prior code signalled branchNode changes even if 
!signalChanges .
-   // Was this needed?
+   if (
+   // Signal branch node changes even if !signalChanges: see 
T122291.
newState.branchNodeChanged ||
-   newState.selectionChanged
-   ) ) {
+   (
+   signalChanges &&
+   ( newState.contentChanged || newState.selectionChanged )
+   )
+   ) {
this.surface.handleObservedChanges( oldState, newState );
}
 };

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Reduce the amount of space between the badges a bit

2016-08-05 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Reduce the amount of space between the badges a bit
..

Reduce the amount of space between the badges a bit

What this really does is:
* Change the forced width of the  to the width of the icon
  (rather than 1.25x the width of the icon)
* Change the alignment of the :before from 40% to 50% so it
  stays in the middle (1.25*40=50)

Change-Id: I0399a20fc84e59fcbcf69da509a4d8bfa9b54a08
---
M modules/nojs/mw.echo.badge.less
M modules/nojs/mw.echo.badge.monobook.less
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 3d082d4..854f199 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -7,7 +7,7 @@
#pt-notifications-notice & {
position: relative;
display: block;
-   width: 30px;
+   width: 24px;
height: 24px;
top: -5px;
cursor: pointer;
@@ -46,7 +46,7 @@
display: inline-block;
cursor: pointer;
top: 10px;
-   left: 40%;
+   left: 50%;
font-size: 0.8em;
font-weight: bold;
padding: 0 0.3em;
diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index f9b78a1..9c245c1 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -5,7 +5,7 @@
 .mw-echo-notifications-badge {
#pt-notifications-notice &,
#pt-notifications-alert & {
-   width: 20px;
+   width: 16px;
height: 16px;
top: -3px;
 

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: switch some feed links to https

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: planet: switch some feed links to https
..


planet: switch some feed links to https

Bug: T141480
Change-Id: Id84b8995285f38ce5e2853d6fc07ec478dcb4be4
---
M modules/planet/templates/feeds/gmq_config.erb
M modules/planet/templates/feeds/ro_config.erb
M modules/planet/templates/feeds/sq_config.erb
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/modules/planet/templates/feeds/gmq_config.erb 
b/modules/planet/templates/feeds/gmq_config.erb
index 2c68175..1fc77d8 100644
--- a/modules/planet/templates/feeds/gmq_config.erb
+++ b/modules/planet/templates/feeds/gmq_config.erb
@@ -31,7 +31,7 @@
 name=Calandrella
 language=sv
 
-[http://newth.net/eirik/category/wikipedia/feed/]
+[https://newth.net/eirik/category/wikipedia/feed/]
 name=Eirik Newth
 language=nb
 
@@ -47,7 +47,7 @@
 name=Kjetil_r
 language=nb
 
-[http://kamfjord.org/feed/?cat=32]
+[https://kamfjord.org/feed/?cat=32]
 name=Laaknor
 language=nb
 
diff --git a/modules/planet/templates/feeds/ro_config.erb 
b/modules/planet/templates/feeds/ro_config.erb
index 8db6d30..d0c3637 100644
--- a/modules/planet/templates/feeds/ro_config.erb
+++ b/modules/planet/templates/feeds/ro_config.erb
@@ -23,7 +23,7 @@
 
 # Subscription configuration
 
-[http://www.strainu.ro/category/projects/wikipedia-projects/feed/]
+[https://www.strainu.ro/category/projects/wikipedia-projects/feed/]
 name=Strainu
 
 [https://promitt.wordpress.com/category/wikipedia/feed/atom/]
diff --git a/modules/planet/templates/feeds/sq_config.erb 
b/modules/planet/templates/feeds/sq_config.erb
index 0dbbcc0..336632a 100644
--- a/modules/planet/templates/feeds/sq_config.erb
+++ b/modules/planet/templates/feeds/sq_config.erb
@@ -26,5 +26,5 @@
 [https://gretadoci.wordpress.com/category/home/feed/]
 name=Përdoruesja:Margott
 
-[http://elioqoshi.me/sq/tag/wiki-sq/feed/]
+[https://elioqoshi.me/sq/tag/wiki-sq/feed/]
 name=Përdoruesi:ElioQoshi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id84b8995285f38ce5e2853d6fc07ec478dcb4be4
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix increment() statsd call in JobRunner

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix increment() statsd call in JobRunner
..


Fix increment() statsd call in JobRunner

Change-Id: I17e04db59a44a491aae99c4542216316361010a0
---
M includes/jobqueue/JobRunner.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/jobqueue/JobRunner.php b/includes/jobqueue/JobRunner.php
index 1350958..98d7d12 100644
--- a/includes/jobqueue/JobRunner.php
+++ b/includes/jobqueue/JobRunner.php
@@ -307,7 +307,7 @@
$stats->timing( "jobqueue.run.$jType", $timeMs );
// Track RSS increases for jobs (in case of memory leaks)
if ( $rssStart && $rssEnd ) {
-   $stats->increment( "jobqueue.rss_delta.$jType", $rssEnd 
- $rssStart );
+   $stats->updateCount( "jobqueue.rss_delta.$jType", 
$rssEnd - $rssStart );
}
 
if ( $status === false ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17e04db59a44a491aae99c4542216316361010a0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Don't run redundant fraud checks

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't run redundant fraud checks
..


Don't run redundant fraud checks

runAntifraudHooks is always called after GET_ORDERSTATUS, so this extra
business was always redundant.

Change-Id: I30e42f55a5f10d600c4e3ae88124ce2199a2a630
---
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/orphan.adapter.php
M tests/includes/test_gateway/TestingGlobalCollectAdapter.php
M tests/includes/test_gateway/TestingGlobalCollectOrphanAdapter.php
4 files changed, 14 insertions(+), 37 deletions(-)

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



diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index 865accc..ac3f6db 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -653,7 +653,6 @@
$problemmessage = ''; //to be used in conjunction with the flag.
$problemseverity = LogLevel::ERROR; //to be used also in 
conjunction with the flag, to route the message to the appropriate log. Urf.
$original_status_code = NULL;
-   $ran_hooks = false;
 
$loopcount = $this->getGlobal( 'RetryLoopCount' );
$loops = 0;
@@ -662,10 +661,6 @@
$gotCVV = false;
$status_result = $this->do_transaction( 
'GET_ORDERSTATUS' );
$validationAction = $this->getValidationAction();
-   if ( !$is_orphan ) {
-   // live users get antifraud hooks run in this 
txn's pre-process
-   $ran_hooks = true;
-   }
// FIXME: Refactor as normal unstaging.
$xmlResults = array(
'cvv_result' => '',
@@ -708,10 +703,6 @@
 
if ( $is_orphan && !$cancelflag && !empty( 
$status_response ) ) {
$action = $this->findCodeAction( 
'GET_ORDERSTATUS', 'STATUSID', $status_response['STATUSID'] );
-   if ( $action === FinalStatus::PENDING_POKE && 
!$ran_hooks ){ //only want to do this once - it's not going to change.
-   $this->runAntifraudHooks();
-   $ran_hooks = true;
-   }
$validationAction = 
$this->getValidationAction();
}
 
@@ -761,12 +752,6 @@
if ( $is_orphan && !$gotCVV ){
$problemflag = true;
$problemmessage = 
"Unable to retrieve orphan cvv/avs results (Communication problem?).";
-   }
-   if ( !$ran_hooks ) {
-   $problemflag = true;
-   $problemmessage = 'On 
the brink of payment confirmation without running antifraud hooks';
-   $problemseverity = 
LogLevel::ERROR;
-   break 2;
}
 
//none of this should ever 
execute for a transaction that doesn't use 3d secure...
@@ -1726,6 +1711,7 @@
}
}
 
+   // hook pre_process for GET_ORDERSTATUS
protected function pre_process_get_orderstatus(){
static $checked = array();
$oid = $this->getData_Unstaged_Escaped('order_id');
diff --git a/globalcollect_gateway/orphan.adapter.php 
b/globalcollect_gateway/orphan.adapter.php
index a974308..26c68fe 100644
--- a/globalcollect_gateway/orphan.adapter.php
+++ b/globalcollect_gateway/orphan.adapter.php
@@ -180,4 +180,17 @@
 * before GET_ORDERSTATUS
 */
protected function pre_process_get_orderstatus() { }
+
+   /**
+* Do the antifraud checks here instead.
+*/
+   protected function post_process_get_orderstatus() {
+   // TODO: Let's parse this into a "not so final status" 
attribute.
+   $status_response = $this->transaction_response->getData();
+   $action = $this->findCodeAction( 'GET_ORDERSTATUS', 'STATUSID', 
$status_response['STATUSID'] );
+
+   if ( $action === FinalStatus::PENDING_POKE ) {
+   $this->runAntifraudHooks();
+   }
+   }
 }
diff --git a/tests/includes/test_gateway/TestingGlobalCollectAdapter.php 
b/tests/includes/test_gateway/TestingGlobalCollectAdapter.php
index 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix for "Invalid key type: integer"

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix for "Invalid key type: integer"
..


Fix for "Invalid key type: integer"

MWCryptHash::hmac requires a string, but mt_rand() returns an integer.
This issue resulted in an uncaught exception in a fresh installation
of mediawiki.

Imported from https://github.com/wikimedia/mediawiki/pull/55

Change-Id: Idccf5f230bfc2de30357b03c78c51cdad4839515
---
M includes/utils/MWCryptRand.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index f3d72e8..dd3ea1b 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -324,7 +324,7 @@
": Falling back to using a pseudo random state 
to generate randomness.\n" );
}
while ( strlen( $buffer ) < $bytes ) {
-   $buffer .= MWCryptHash::hmac( $this->randomState(), 
mt_rand() );
+   $buffer .= MWCryptHash::hmac( $this->randomState(), 
strval( mt_rand() ) );
// This code is never really cryptographically strong, 
if we use it
// at all, then set strong to false.
$this->strong = false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idccf5f230bfc2de30357b03c78c51cdad4839515
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Florianschmidtwelzow 
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/dns[master]: zosma: add IPv6 AAAA and reverse

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: zosma: add IPv6  and reverse
..


zosma: add IPv6  and reverse

This VM has the mapped v6 address on the interface now.

inet6 2620:0:860:102:10:192:16:183/64

Change-Id: I421517a32d5f94b069648960c91340cc9e05cf21
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index fba7b9f..d705ec0 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -87,6 +87,7 @@
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
 0.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   planet2001.codfw.wmnet.
+3.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   zosma.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
 $ORIGIN 3.0.1.0.{{ zonename }}.
diff --git a/templates/wmnet b/templates/wmnet
index 5db5640..3957d54 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2895,6 +2895,7 @@
 wtp2019 1H  IN A10.192.32.34
 wtp2020 1H  IN A10.192.32.35
 zosma   1H  IN A10.192.16.183
+zosma   1H  IN  2620:0:860:102:10:192:16:183
 
 ; codfw LVS cross-vlan addresses
 vl2001-eth0.lvs2001 1H  IN A208.80.153.6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I421517a32d5f94b069648960c91340cc9e05cf21
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable notifications for OAuth

2016-08-05 Thread Dpatrick (Code Review)
Dpatrick has uploaded a new change for review.

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

Change subject: Enable notifications for OAuth
..

Enable notifications for OAuth

Bug: T61772
Bug: T62528
Change-Id: I52fe49635414f9201e92d7e1cf54af3aaa2043a6
---
M wmf-config/CommonSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index b756187..e13bc51 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3242,6 +3242,7 @@
if ( $wgDBname === $wgMWOAuthCentralWiki ) {
// Only needed on the central wiki.

$wgGroupPermissions['oauthadmin']['mwoauthmanageconsumer'] = true;
+   $wgOAuthGroupsToNotify = ['steward', 'staff'];
}
};
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: zosma: add IPv6 AAAA and reverse

2016-08-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: zosma: add IPv6  and reverse
..

zosma: add IPv6  and reverse

This VM has the mapped v6 address on the interface now.

inet6 2620:0:860:102:10:192:16:183/64

Change-Id: I421517a32d5f94b069648960c91340cc9e05cf21
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/32/303332/1

diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index fba7b9f..d705ec0 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -87,6 +87,7 @@
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
 0.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   planet2001.codfw.wmnet.
+3.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   zosma.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
 $ORIGIN 3.0.1.0.{{ zonename }}.
diff --git a/templates/wmnet b/templates/wmnet
index 5db5640..3957d54 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -2895,6 +2895,7 @@
 wtp2019 1H  IN A10.192.32.34
 wtp2020 1H  IN A10.192.32.35
 zosma   1H  IN A10.192.16.183
+zosma   1H  IN  2620:0:860:102:10:192:16:183
 
 ; codfw LVS cross-vlan addresses
 vl2001-eth0.lvs2001 1H  IN A208.80.153.6

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...polloi[master]: Update prefix fetching

2016-08-05 Thread Bearloga (Code Review)
Bearloga has submitted this change and it was merged.

Change subject: Update prefix fetching
..


Update prefix fetching

Change-Id: I9cabbfc447db8f0477b3999ddb5ded037ae16775
---
M DESCRIPTION
M NEWS.md
M R/utils.R
M inst/extdata/prefixes.csv
M man/update_prefixes.Rd
5 files changed, 234 insertions(+), 228 deletions(-)

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



diff --git a/DESCRIPTION b/DESCRIPTION
index e3fd9a2..efb6b56 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: polloi
 Type: Package
 Title: Common Functionality for Wikimedia Dashboards
-Version: 0.1.3
-Date: 2016-05-12
+Version: 0.1.4
+Date: 2016-08-05
 Authors@R: c(
 person("Oliver", "Keyes", , "oke...@wikimedia.org", role = "aut"),
 person("Mikhail", "Popov", , "mpo...@wikimedia.org", role = c("aut", 
"cre"))
@@ -12,7 +12,7 @@
 License: MIT + file LICENSE
 URL: https://git.wikimedia.org/summary/wikimedia%2Fdiscovery%2Fpolloi
 BugReports: https://phabricator.wikimedia.org/maniphest/task/create/?
-projects=Search-Team
+projects=Discovery-Analysis-Backlog
 Depends:
 R (>= 3.1.0)
 Imports:
diff --git a/NEWS.md b/NEWS.md
index 2825db2..2a3bb9f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,7 @@
+polloi 0.1.4
+
+- Updated Wikipedia prefix fetching.
+
 polloi 0.1.3
 
 - Now includes a de-duplication step after reading
diff --git a/R/utils.R b/R/utils.R
index 1fdb4b8..4e5fb27 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -1,6 +1,6 @@
 #'@title Update internal index of language prefixes.
 #'@description Scrapes the table off
-#'  \url{https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects} and 
stores the first
+#'  \url{https://en.wikipedia.org/wiki/List_of_Wikipedias} and stores the first
 #'  three columns containing the language, local language, and the prefix code.
 #'@importFrom magrittr "%>%" set_names
 #'@importFrom xml2 read_html
@@ -14,17 +14,17 @@
 
   file_location <- system.file("extdata/prefixes.csv", package = "polloi")
 
-  prefixes <- 
read_html("https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects#Projects_per_language_codes;)
 %>%
+  prefixes <- read_html("https://en.wikipedia.org/wiki/List_of_Wikipedias;) %>%
 html_nodes(".wikitable") %>%
-{ .[[1]] } %>%
+{ .[[3]] } %>%
 html_table() %>%
-{ .[, c('English Name', 'Local Name', 'Language Code')] } %>%
+{ .[, c('Language', 'Language (local)', 'Wiki')] } %>%
 set_names(c('language', 'local', 'prefix'))
-  prefixes$prefix <- sub(":", "", prefixes$prefix)
-  prefixes$prefix <- gsub("-", "_", prefixes$prefix)
-  prefixes$language <- sub("Template:Eln ", "", prefixes$language)
+
+  prefixes <- prefixes[order(prefixes$language), ]
 
   readr::write_csv(prefixes, file_location)
+  # file.copy(from = file_location, to = "inst/extdata/prefixes.csv", 
overwrite = TRUE)
   return(invisible())
 }
 
@@ -57,6 +57,7 @@
 #'@export
 parse_wikiid <- function(x) {
   temp <- get_langproj()
+  temp$wikiid <- sub("-", "_", temp$wikiid)
   result <- left_join(data.frame(wikiid = x, stringsAsFactors = FALSE), temp, 
by = "wikiid")
   return(result[, c('language', 'project')])
 }
diff --git a/inst/extdata/prefixes.csv b/inst/extdata/prefixes.csv
index 93c2291..f28b981 100644
--- a/inst/extdata/prefixes.csv
+++ b/inst/extdata/prefixes.csv
@@ -1,294 +1,295 @@
 language,local,prefix
-Afar,Qafár af,aa
 Abkhazian,Аҧсшәа,ab
-Achinese,Acèh,ace
-Adygei / Adyghe,адыгабзэ,ady
+Acehnese,Acèh,ace
+Adyghe,адыгабзэ,ady
+Afar,Qafár af,aa
 Afrikaans,Afrikaans,af
 Akan,Akan,ak
+Albanian,shqip,sq
 Alemannic,Alemannisch,als
 Amharic,አማርኛ,am
-Aragonese,aragonés,an
-Anglo-Saxon / Old English,Ænglisc,ang
-Angika,अङ्गिका,anp
+Anglo-Saxon,Ænglisc,ang
 Arabic,العربية,ar
+Aragonese,aragonés,an
 Aramaic,ܐܪܡܝܐ,arc
-Egyptian Arabic,مصرى,arz
+Armenian,Հայերեն,hy
+Aromanian,armãneashti,roa-rup
 Assamese,অসমীয়া,as
 Asturian,asturianu,ast
 Avar,авар,av
 Aymara,Aymar aru,ay
 Azerbaijani,azərbaycanca,az
-South Azerbaijani,تۆرکجه,azb
-Bashkir,башҡортса,ba
-Austro-Bavarian,Boarisch,bar
-Samogitian,žemaitėška,bat_smg
-Central Bicolano,Bikol Central,bcl
-Belarusian,беларуская,be
-Belarusian (Taraškievica),беларуская (тарашкевіца)‎,be_x_old
-Bulgarian,български,bg
-Bihari,भोजपुरी,bh
-Bislama,Bislama,bi
-Banjar,Bahasa Banjar,bjn
 Bambara,bamanankan,bm
+Banjar,Bahasa Banjar,bjn
+Banyumasan,Basa Banyumasan,map-bms
+Bashkir,башҡортса,ba
+Basque,euskara,eu
+Bavarian,Boarisch,bar
+Belarusian,беларуская,be
+Belarusian (Taraškievica),беларуская (тарашкевіца)‎,be-tarask
 Bengali,বাংলা,bn
-Tibetan,བོད་ཡིག,bo
+Bihari,भोजपुरी,bh
 Bishnupriya Manipuri,বিষ্ণুপ্রিয়া মণিপুরী,bpy
-Breton,brezhoneg,br
+Bislama,Bislama,bi
 Bosnian,bosanski,bs
+Breton,brezhoneg,br
 Buginese,ᨅᨔ ᨕᨘᨁᨗ,bug
-Buriat (Russia),буряад,bxr
+Bulgarian,български,bg
+Burmese,မြန်မာဘာသာ,my
+Buryat,буряад,bxr
+Cantonese,粵語,zh-yue
 Catalan,català,ca
-Chavacano de Zamboanga,Chavacano de Zamboanga,cbk_zam
-Min 

[MediaWiki-commits] [Gerrit] wikimedia...polloi[master]: Update prefix fetching

2016-08-05 Thread Bearloga (Code Review)
Bearloga has uploaded a new change for review.

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

Change subject: Update prefix fetching
..

Update prefix fetching

Change-Id: I9cabbfc447db8f0477b3999ddb5ded037ae16775
---
M DESCRIPTION
M NEWS.md
M R/utils.R
M inst/extdata/prefixes.csv
M man/update_prefixes.Rd
5 files changed, 234 insertions(+), 228 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/discovery/polloi 
refs/changes/31/303331/1

diff --git a/DESCRIPTION b/DESCRIPTION
index e3fd9a2..efb6b56 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,8 +1,8 @@
 Package: polloi
 Type: Package
 Title: Common Functionality for Wikimedia Dashboards
-Version: 0.1.3
-Date: 2016-05-12
+Version: 0.1.4
+Date: 2016-08-05
 Authors@R: c(
 person("Oliver", "Keyes", , "oke...@wikimedia.org", role = "aut"),
 person("Mikhail", "Popov", , "mpo...@wikimedia.org", role = c("aut", 
"cre"))
@@ -12,7 +12,7 @@
 License: MIT + file LICENSE
 URL: https://git.wikimedia.org/summary/wikimedia%2Fdiscovery%2Fpolloi
 BugReports: https://phabricator.wikimedia.org/maniphest/task/create/?
-projects=Search-Team
+projects=Discovery-Analysis-Backlog
 Depends:
 R (>= 3.1.0)
 Imports:
diff --git a/NEWS.md b/NEWS.md
index 2825db2..2a3bb9f 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,3 +1,7 @@
+polloi 0.1.4
+
+- Updated Wikipedia prefix fetching.
+
 polloi 0.1.3
 
 - Now includes a de-duplication step after reading
diff --git a/R/utils.R b/R/utils.R
index 1fdb4b8..4e5fb27 100644
--- a/R/utils.R
+++ b/R/utils.R
@@ -1,6 +1,6 @@
 #'@title Update internal index of language prefixes.
 #'@description Scrapes the table off
-#'  \url{https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects} and 
stores the first
+#'  \url{https://en.wikipedia.org/wiki/List_of_Wikipedias} and stores the first
 #'  three columns containing the language, local language, and the prefix code.
 #'@importFrom magrittr "%>%" set_names
 #'@importFrom xml2 read_html
@@ -14,17 +14,17 @@
 
   file_location <- system.file("extdata/prefixes.csv", package = "polloi")
 
-  prefixes <- 
read_html("https://meta.wikimedia.org/wiki/Table_of_Wikimedia_projects#Projects_per_language_codes;)
 %>%
+  prefixes <- read_html("https://en.wikipedia.org/wiki/List_of_Wikipedias;) %>%
 html_nodes(".wikitable") %>%
-{ .[[1]] } %>%
+{ .[[3]] } %>%
 html_table() %>%
-{ .[, c('English Name', 'Local Name', 'Language Code')] } %>%
+{ .[, c('Language', 'Language (local)', 'Wiki')] } %>%
 set_names(c('language', 'local', 'prefix'))
-  prefixes$prefix <- sub(":", "", prefixes$prefix)
-  prefixes$prefix <- gsub("-", "_", prefixes$prefix)
-  prefixes$language <- sub("Template:Eln ", "", prefixes$language)
+
+  prefixes <- prefixes[order(prefixes$language), ]
 
   readr::write_csv(prefixes, file_location)
+  # file.copy(from = file_location, to = "inst/extdata/prefixes.csv", 
overwrite = TRUE)
   return(invisible())
 }
 
@@ -57,6 +57,7 @@
 #'@export
 parse_wikiid <- function(x) {
   temp <- get_langproj()
+  temp$wikiid <- sub("-", "_", temp$wikiid)
   result <- left_join(data.frame(wikiid = x, stringsAsFactors = FALSE), temp, 
by = "wikiid")
   return(result[, c('language', 'project')])
 }
diff --git a/inst/extdata/prefixes.csv b/inst/extdata/prefixes.csv
index 93c2291..f28b981 100644
--- a/inst/extdata/prefixes.csv
+++ b/inst/extdata/prefixes.csv
@@ -1,294 +1,295 @@
 language,local,prefix
-Afar,Qafár af,aa
 Abkhazian,Аҧсшәа,ab
-Achinese,Acèh,ace
-Adygei / Adyghe,адыгабзэ,ady
+Acehnese,Acèh,ace
+Adyghe,адыгабзэ,ady
+Afar,Qafár af,aa
 Afrikaans,Afrikaans,af
 Akan,Akan,ak
+Albanian,shqip,sq
 Alemannic,Alemannisch,als
 Amharic,አማርኛ,am
-Aragonese,aragonés,an
-Anglo-Saxon / Old English,Ænglisc,ang
-Angika,अङ्गिका,anp
+Anglo-Saxon,Ænglisc,ang
 Arabic,العربية,ar
+Aragonese,aragonés,an
 Aramaic,ܐܪܡܝܐ,arc
-Egyptian Arabic,مصرى,arz
+Armenian,Հայերեն,hy
+Aromanian,armãneashti,roa-rup
 Assamese,অসমীয়া,as
 Asturian,asturianu,ast
 Avar,авар,av
 Aymara,Aymar aru,ay
 Azerbaijani,azərbaycanca,az
-South Azerbaijani,تۆرکجه,azb
-Bashkir,башҡортса,ba
-Austro-Bavarian,Boarisch,bar
-Samogitian,žemaitėška,bat_smg
-Central Bicolano,Bikol Central,bcl
-Belarusian,беларуская,be
-Belarusian (Taraškievica),беларуская (тарашкевіца)‎,be_x_old
-Bulgarian,български,bg
-Bihari,भोजपुरी,bh
-Bislama,Bislama,bi
-Banjar,Bahasa Banjar,bjn
 Bambara,bamanankan,bm
+Banjar,Bahasa Banjar,bjn
+Banyumasan,Basa Banyumasan,map-bms
+Bashkir,башҡортса,ba
+Basque,euskara,eu
+Bavarian,Boarisch,bar
+Belarusian,беларуская,be
+Belarusian (Taraškievica),беларуская (тарашкевіца)‎,be-tarask
 Bengali,বাংলা,bn
-Tibetan,བོད་ཡིག,bo
+Bihari,भोजपुरी,bh
 Bishnupriya Manipuri,বিষ্ণুপ্রিয়া মণিপুরী,bpy
-Breton,brezhoneg,br
+Bislama,Bislama,bi
 Bosnian,bosanski,bs
+Breton,brezhoneg,br
 Buginese,ᨅᨔ ᨕᨘᨁᨗ,bug
-Buriat (Russia),буряад,bxr
+Bulgarian,български,bg
+Burmese,မြန်မာဘာသာ,my
+Buryat,буряад,bxr
+Cantonese,粵語,zh-yue
 

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Follow-up de795bdbc5: actually hide badge number in Monobook

2016-08-05 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Follow-up de795bdbc5: actually hide badge number in Monobook
..

Follow-up de795bdbc5: actually hide badge number in Monobook

The color: transparent; hack was being overridden by a color rule
that's only in effect after the popup is opened.

Change-Id: I2f415619603ccadb625ed2482c25fde78765fee4
---
M modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less 
b/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
index 846f402..e56ca20 100644
--- a/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
+++ b/modules/styles/mw.echo.ui.NotificationBadgeWidget.monobook.less
@@ -4,7 +4,7 @@
 #p-personal li.mw-echo-ui-notificationBadgeButtonPopupWidget {
text-transform: none;
font-weight: normal;
-   &, a {
+   &, .oo-ui-popupWidget a {
color: #333;
}
// Badge

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix for "Invalid key type: integer"

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix for "Invalid key type: integer"
..

Fix for "Invalid key type: integer"

MWCryptHash::hmac requires a string, but mt_rand() returns an integer.
This issue resulted in an uncaught exception in a fresh installation
of mediawiki.

Imported from https://github.com/wikimedia/mediawiki/pull/55

Change-Id: Idccf5f230bfc2de30357b03c78c51cdad4839515
---
M includes/utils/MWCryptRand.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/utils/MWCryptRand.php b/includes/utils/MWCryptRand.php
index f3d72e8..8c31141 100644
--- a/includes/utils/MWCryptRand.php
+++ b/includes/utils/MWCryptRand.php
@@ -324,7 +324,7 @@
": Falling back to using a pseudo random state 
to generate randomness.\n" );
}
while ( strlen( $buffer ) < $bytes ) {
-   $buffer .= MWCryptHash::hmac( $this->randomState(), 
mt_rand() );
+   $buffer .= MWCryptHash::hmac( $this->randomState(), 
strval(mt_rand()) );
// This code is never really cryptographically strong, 
if we use it
// at all, then set strong to false.
$this->strong = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idccf5f230bfc2de30357b03c78c51cdad4839515
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
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]: zosma: add mapped IPv6 address

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: zosma: add mapped IPv6 address
..


zosma: add mapped IPv6 address

Add mapped IPv6 address on interface of the VM
planned to be for security tools.

Change-Id: I6d59ed88ab66d4b99d2aaabdfef8b1cea825b0b3
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 41768bd..47b17a9 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2910,6 +2910,8 @@
 # T138650 - tools for the security team
 node 'zosma.codfw.wmnet' {
 role security::tools
+
+interface::add_ip6_mapped { 'main': interface => 'eth0', }
 }
 
 node default {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d59ed88ab66d4b99d2aaabdfef8b1cea825b0b3
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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/dns[master]: planet1001/2001: add AAAA records and reverse

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: planet1001/2001: add  records and reverse
..


planet1001/2001: add  records and reverse

Change-Id: I51e5cb3e1e234af235237dda9319ba1b3e4c69b5
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
3 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 70aa279..fba7b9f 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -86,6 +86,7 @@
 7.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2011.codfw.wmnet.
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
+0.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   planet2001.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
 $ORIGIN 3.0.1.0.{{ zonename }}.
diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 3d96366..f655946 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -134,7 +134,7 @@
 4.3.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   cp1057.eqiad.wmnet.
 
 0.5.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium.eqiad.wmnet.
-
+9.7.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   planet1001.eqiad.wmnet.
 6.8.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium-vcs.eqiad.wmnet.
 
 ; analytics1-a-eqiad (2620:0:861:104::/64)
diff --git a/templates/wmnet b/templates/wmnet
index 8cbd0ca..5db5640 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -735,6 +735,7 @@
 pc1005  1H  IN A10.64.32.72
 pc1006  1H  IN A10.64.48.128
 planet1001  1H  IN A10.64.32.179
+planet1001  1H  IN  2620:0:861:103:10:64:32:179
 potassium   1H  IN A10.64.16.152
 praseodymium1H  IN A10.64.16.149
 praseodymium-a  1H  IN A10.64.16.188 ; cassandra instance
@@ -2802,6 +2803,7 @@
 mw2213  1H  IN A10.192.32.101
 mw2214  1H  IN A10.192.32.102
 planet2001  1H  IN A10.192.16.180
+planet2001  1H  IN  2620:0:860:102:10:192:16:180
 pc2004  1H  IN A10.192.16.170
 pc2005  1H  IN A10.192.32.128
 pc2006  1H  IN A10.192.48.39

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51e5cb3e1e234af235237dda9319ba1b3e4c69b5
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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...OAuth[master]: Note coverage under consumer privacy policy

2016-08-05 Thread Dpatrick (Code Review)
Dpatrick has uploaded a new change for review.

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

Change subject: Note coverage under consumer privacy policy
..

Note coverage under consumer privacy policy

Bug: T64687
Change-Id: I33a2faec36c6b2a3ea501f2d80c11daed6a2730d
---
M frontend/specialpages/SpecialMWOAuth.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/28/303328/1

diff --git a/frontend/specialpages/SpecialMWOAuth.php 
b/frontend/specialpages/SpecialMWOAuth.php
index 2fed2a9..882135a 100644
--- a/frontend/specialpages/SpecialMWOAuth.php
+++ b/frontend/specialpages/SpecialMWOAuth.php
@@ -392,7 +392,7 @@
$params[] = $grantsText;
}
$form->addHeaderText( $this->msg( $msgKey, $params 
)->parseAsBlock() );
-   $form->addHeaderText( $this->msg( 'mwoauth-form-legal' 
)->text() );
+   $form->addHeaderText( $this->msg( 'mwoauth-form-legal', array( 
$cmr->get( 'name' ) ) )->text() );
 
$form->suppressDefaultSubmit();
$form->addButton( 'accept',
diff --git a/i18n/en.json b/i18n/en.json
index d6a0704..e7d227e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -220,7 +220,7 @@
"mwoauth-form-description-onewiki": "Hi $1,\n\nIn order to complete 
your request, '''$2''' needs permission to perform the following actions on 
your behalf on ''$4'':\n\n$5",
"mwoauth-form-description-allwikis-nogrants": "Hi $1,\n\nIn order to 
complete your request, '''$2''' needs permission to access information on all 
projects of this site on your behalf. No changes will be made with your 
account.",
"mwoauth-form-description-onewiki-nogrants": "Hi $1,\n\nIn order to 
complete your request, '''$2''' needs permission to access information on 
''$4'' on your behalf. No changes will be made with your account.",
-   "mwoauth-form-legal": "",
+   "mwoauth-form-legal": "Granting these permissions to $1 means that some 
of your information may be sent to $1 and will be used according to their 
privacy policy.",
"mwoauth-form-button-approve": "Allow",
"mwoauth-form-button-cancel": "Cancel",
"mwoauth-error": "Application Connection Error",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index fc35d71..e4b78b2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -228,7 +228,7 @@
"mwoauth-form-description-onewiki": "Description of a form requesting 
the user authorize an OAuth consumer to use MediaWiki on their behalf, without 
any non-hidden grants.\n\nParameters:\n* $1 - the username\n* $2 - application 
name\n* $3 - application publisher\n* $4 - wiki project name\nSee also:\n* 
{{msg-mw|Mwoauth-form-description-allwikis}}\n* 
{{msg-mw|Mwoauth-form-description-onewiki}}\n* 
{{msg-mw|Mwoauth-form-description-allwikis-nogrants}}",
"mwoauth-form-description-allwikis-nogrants": "Description of a form 
requesting the user authorize an OAuth consumer to use MediaWiki on their 
behalf, without any non-hidden grants.\n\nParameters:\n* $1 - the username\n* 
$2 - application name\n* $3 - application publisher\nSee also:\n* 
{{msg-mw|Mwoauth-form-description-allwikis}}\n* 
{{msg-mw|Mwoauth-form-description-onewiki}}\n* 
{{msg-mw|Mwoauth-form-description-onewiki-nogrants}}",
"mwoauth-form-description-onewiki-nogrants": "Description of a form 
requesting the user authorize an OAuth consumer to use MediaWiki on their 
behalf, without any non-hidden grants.\n\nParameters:\n* $1 - the username\n* 
$2 - application name\n* $3 - application publisher\n* $4 - wiki project 
name\nSee also:\n* {{msg-mw|Mwoauth-form-description-allwikis}}\n* 
{{msg-mw|Mwoauth-form-description-onewiki}}\n* 
{{msg-mw|Mwoauth-form-description-onewiki-nogrants}}",
-   "mwoauth-form-legal": "Message used for wiki-specific legal notes. Keep 
this blank.",
+   "mwoauth-form-legal": "Message used for consumer-specific privacy 
statement.\n\nParameters:\n* $1 - application name\n",
"mwoauth-form-button-approve": "Button label, indicating the user wants 
to allow access.\n\nSee also:\n* 
{{msg-mw|Mwoauth-form-button-cancel}}\n{{Identical|Allow}}",
"mwoauth-form-button-cancel": "Button label, indicating the user wants 
to cancel granting access.\n\nSee also:\n* 
{{msg-mw|Mwoauth-form-button-approve}}\n{{Identical|Cancel}}",
"mwoauth-error": "Heading on the page, whenever an OAuth error is 
presented to a user.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33a2faec36c6b2a3ea501f2d80c11daed6a2730d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Dpatrick 

___

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Set $wgOAuthGroupsToNotify for OAuth role

2016-08-05 Thread Dpatrick (Code Review)
Dpatrick has submitted this change and it was merged.

Change subject: Set $wgOAuthGroupsToNotify for OAuth role
..


Set $wgOAuthGroupsToNotify for OAuth role

Change-Id: I63cd4f89dd9c754e917ff75c22692f08f35ef377
Depends-On: Iee6e0074d648236b01ae40da704a27cfb94d4748
---
M puppet/modules/role/manifests/oauth.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/puppet/modules/role/manifests/oauth.pp 
b/puppet/modules/role/manifests/oauth.pp
index 434662f..1aae5d3 100644
--- a/puppet/modules/role/manifests/oauth.pp
+++ b/puppet/modules/role/manifests/oauth.pp
@@ -21,6 +21,7 @@
 '$wgGroupPermissions["sysop"]["mwoauthmanageconsumer"] = true',
 '$wgGroupPermissions["user"]["mwoauthproposeconsumer"] = true',
 '$wgGroupPermissions["user"]["mwoauthupdateownconsumer"] = true',
+'$wgOAuthGroupsToNotify = [ "sysop" ]',
 ]
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63cd4f89dd9c754e917ff75c22692f08f35ef377
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: Dpatrick 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Take link fragments into account

2016-08-05 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Take link fragments into account
..

Take link fragments into account

TODO: Do we need to do anything special here to handle multiple hash symbols in 
a URL?

Bug: T112898
Change-Id: I4773cb04ae2533e8125bc55d9ebb606d63b3bf48
---
M modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
1 file changed, 10 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/27/303327/1

diff --git a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js 
b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
index 65d3c26..abc51b1 100644
--- a/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
+++ b/modules/ve-mw/dm/annotations/ve.dm.MWInternalLinkAnnotation.js
@@ -66,6 +66,9 @@
// rather than an image inclusion or categorization
target = ':' + target;
}
+   if ( title.getFragment() ) {
+   target += '#' + title.getFragment();
+   }
 
return new ve.dm.MWInternalLinkAnnotation( {
type: 'link/mwInternal',
@@ -147,7 +150,13 @@
}
} else {
// Don't escape slashes in the title; they represent subpages.
-   href = title.split( '/' ).map( encodeURIComponent ).join( '/' );
+   href = title.split( /(\/|#)/ ).map( function ( part ) {
+   if ( part === '/' || part === '#' ) {
+   return part;
+   } else {
+   return encodeURIComponent( part );
+   }
+   } ).join( '' );
}
return href;
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4773cb04ae2533e8125bc55d9ebb606d63b3bf48
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix top position of badges in monobook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix top position of badges in monobook
..


Fix top position of badges in monobook

Change-Id: Ie2638445d020baf1be79ac1689b446ac1abc2f63
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 9e4410d..f9b78a1 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -7,7 +7,7 @@
#pt-notifications-alert & {
width: 20px;
height: 16px;
-   top: -7px;
+   top: -3px;
 
&:before {
background-size: 16px 16px;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie2638445d020baf1be79ac1689b446ac1abc2f63
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Make the badge numbers less small

2016-08-05 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Make the badge numbers less small
..

Make the badge numbers less small

They're 9.1px in Monobook and 9.6px in Vector, and the
minimum recommended font size is 9px. Let's just keep them
at the same font size as the surrounding personal tools.

Bug: T142149
Change-Id: I94159cd454c5665c0eb9222a2af89bafedcc66bd
---
M modules/nojs/mw.echo.badge.less
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 3d082d4..8ff5762 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -47,7 +47,6 @@
cursor: pointer;
top: 10px;
left: 40%;
-   font-size: 0.8em;
font-weight: bold;
padding: 0 0.3em;
border: 1px solid white;

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: planet1001/2001: add AAAA records and reverse

2016-08-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: planet1001/2001: add  records and reverse
..

planet1001/2001: add  records and reverse

Change-Id: I51e5cb3e1e234af235237dda9319ba1b3e4c69b5
---
M templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
M templates/wmnet
3 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/25/303325/1

diff --git a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 70aa279..fba7b9f 100644
--- a/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/0.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -86,6 +86,7 @@
 7.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2011.codfw.wmnet.
 8.3.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   cp2012.codfw.wmnet.
 
+0.8.1.0.6.1.0.0.2.9.1.0.0.1.0.0 1H IN PTR   planet2001.codfw.wmnet.
 
 ; private1-c-codfw (2620:0:860:103::/64)
 $ORIGIN 3.0.1.0.{{ zonename }}.
diff --git a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa 
b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
index 62d57fe..762a01b 100644
--- a/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
+++ b/templates/1.6.8.0.0.0.0.0.0.2.6.2.ip6.arpa
@@ -136,7 +136,7 @@
 4.3.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   cp1057.eqiad.wmnet.
 
 0.5.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium.eqiad.wmnet.
-
+9.7.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   planet1001.eqiad.wmnet.
 6.8.1.0.2.3.0.0.4.6.0.0.0.1.0.0 1H IN PTR   iridium-vcs.eqiad.wmnet.
 
 ; analytics1-a-eqiad (2620:0:861:104::/64)
diff --git a/templates/wmnet b/templates/wmnet
index 3891d49..cec3f95 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -735,6 +735,7 @@
 pc1005  1H  IN A10.64.32.72
 pc1006  1H  IN A10.64.48.128
 planet1001  1H  IN A10.64.32.179
+planet1001  1H  IN  2620:0:861:103:10:64:32:179
 potassium   1H  IN A10.64.16.152
 praseodymium1H  IN A10.64.16.149
 praseodymium-a  1H  IN A10.64.16.188 ; cassandra instance
@@ -2803,6 +2804,7 @@
 mw2213  1H  IN A10.192.32.101
 mw2214  1H  IN A10.192.32.102
 planet2001  1H  IN A10.192.16.180
+planet2001  1H  IN  2620:0:860:102:10:192:16:180
 pc2004  1H  IN A10.192.16.170
 pc2005  1H  IN A10.192.32.128
 pc2006  1H  IN A10.192.48.39

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Configure oauth notifications to sysop

2016-08-05 Thread Dpatrick (Code Review)
Dpatrick has uploaded a new change for review.

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

Change subject: Configure oauth notifications to sysop
..

Configure oauth notifications to sysop

Bug: T61772
Change-Id: I6c89d4d781bc5fe2e0eb7bda1e8dab0d5b558c98
---
M puppet/modules/role/manifests/oauth.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/24/303324/1

diff --git a/puppet/modules/role/manifests/oauth.pp 
b/puppet/modules/role/manifests/oauth.pp
index 434662f..acdda4b 100644
--- a/puppet/modules/role/manifests/oauth.pp
+++ b/puppet/modules/role/manifests/oauth.pp
@@ -21,6 +21,7 @@
 '$wgGroupPermissions["sysop"]["mwoauthmanageconsumer"] = true',
 '$wgGroupPermissions["user"]["mwoauthproposeconsumer"] = true',
 '$wgGroupPermissions["user"]["mwoauthupdateownconsumer"] = true',
+'$wgOAuthGroupsToNotify = ["sysop"]'
 ]
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c89d4d781bc5fe2e0eb7bda1e8dab0d5b558c98
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Dpatrick 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: switch all links to other langs to https

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: planet: switch all links to other langs to https
..


planet: switch all links to other langs to https

Switch all the links to other planet language versions
from http to https.

Bug:T141480
Change-Id: I3b00ef37e587770242f06fc627014329d49548b3
---
M modules/planet/templates/feeds/ar_config.erb
M modules/planet/templates/feeds/bg_config.erb
M modules/planet/templates/feeds/ca_config.erb
M modules/planet/templates/feeds/de_config.erb
M modules/planet/templates/feeds/en_config.erb
M modules/planet/templates/feeds/es_config.erb
M modules/planet/templates/feeds/fr_config.erb
M modules/planet/templates/feeds/gmq_config.erb
M modules/planet/templates/feeds/id_config.erb
M modules/planet/templates/feeds/it_config.erb
M modules/planet/templates/feeds/ja_config.erb
M modules/planet/templates/feeds/pl_config.erb
M modules/planet/templates/feeds/ru_config.erb
M modules/planet/templates/feeds/sq_config.erb
M modules/planet/templates/feeds/sr_config.erb
M modules/planet/templates/feeds/uk_config.erb
M modules/planet/templates/feeds/zh_config.erb
17 files changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/modules/planet/templates/feeds/ar_config.erb 
b/modules/planet/templates/feeds/ar_config.erb
index 396f41f..7b20a19 100644
--- a/modules/planet/templates/feeds/ar_config.erb
+++ b/modules/planet/templates/feeds/ar_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= ar.planet.wikimedia
-link= http://ar.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://ar.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/ar
diff --git a/modules/planet/templates/feeds/bg_config.erb 
b/modules/planet/templates/feeds/bg_config.erb
index 9e19cf4..0542def 100644
--- a/modules/planet/templates/feeds/bg_config.erb
+++ b/modules/planet/templates/feeds/bg_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= bg.planet.wikimedia
-link= http://bg.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://bg.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/bg
diff --git a/modules/planet/templates/feeds/ca_config.erb 
b/modules/planet/templates/feeds/ca_config.erb
index 1ceefba..1c339bf 100644
--- a/modules/planet/templates/feeds/ca_config.erb
+++ b/modules/planet/templates/feeds/ca_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= ca.planet.wikimedia
-link= http://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/ca
diff --git a/modules/planet/templates/feeds/de_config.erb 
b/modules/planet/templates/feeds/de_config.erb
index 1f48aa6..d561bdb 100644
--- a/modules/planet/templates/feeds/de_config.erb
+++ b/modules/planet/templates/feeds/de_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= de.planet.wikimedia
-link= http://de.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://de.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/de
diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index c4db9d4..75d6cac 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= en.planet.wikimedia
-link= http://en.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://en.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/en
diff --git a/modules/planet/templates/feeds/es_config.erb 
b/modules/planet/templates/feeds/es_config.erb
index 4923e36..2ab1a35 100644
--- a/modules/planet/templates/feeds/es_config.erb
+++ b/modules/planet/templates/feeds/es_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= es.planet.wikimedia
-link= http://es.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://es.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = 

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

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert to extension registration
..


Convert to extension registration

Remove 'UnitTestList' hook

Bug: T87912
Bug: T142120
Bug: T142121

Change-Id: Ide2e7dffac57fe4820be6653705d9270fd3ee415
---
M EventLogging.php
A extension.json
M includes/EventLoggingHooks.php
R tests/phpunit/EventLoggingExtensionFunctionsTest.php
R tests/phpunit/JsonSchemaTest.php
R tests/phpunit/RemoteSchemaTest.php
R tests/phpunit/ResourceLoaderSchemaModuleTest.php
R tests/phpunit/SerializeEventTest.php
R tests/phpunit/ValidateSchemaTest.php
9 files changed, 167 insertions(+), 179 deletions(-)

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



diff --git a/EventLogging.php b/EventLogging.php
index 15206ef..4a499dd 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -1,176 +1,17 @@
 
- * @license GPL v2 or later
- * @version 0.8.1
- */
 
-// Credits
-
-$wgExtensionCredits[ 'other' ][] = [
-   'path'   => __FILE__,
-   'name'   => 'EventLogging',
-   'author' => [
-   'Ori Livneh',
-   'Timo Tijhof',
-   'S Page',
-   'Matthew Flaschen',
-   ],
-   'version' => '0.8.0',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:EventLogging',
-   'descriptionmsg' => 'eventlogging-desc',
-   'license-name' => 'GPL-2.0+'
-];
-
-// Namespaces
-define( 'NS_SCHEMA', 470 );
-define( 'NS_SCHEMA_TALK', 471 );
-
-$wgHooks[ 'CanonicalNamespaces' ][] = 
'EventLoggingHooks::onCanonicalNamespaces';
-
-$wgContentHandlers[ 'JsonSchema' ] = 'JsonSchemaContentHandler';
-$wgNamespaceContentModels[ NS_SCHEMA ] = 'JsonSchema';
-$wgNamespaceProtection[ NS_SCHEMA ] = [ 'autoconfirmed' ];
-
-// Configuration
-
-/**
- * @var bool|string: Full URI or false if not set.
- * Events are logged to this end point as key-value pairs in the query
- * string. Must not contain a query string.
- *
- * @example string: '//log.example.org/event.gif'
- */
-$wgEventLoggingBaseUri = false;
-
-/**
- * @var bool|string: URI or false if not set.
- * URI of api.php on schema wiki.
- *
- * @example string: 'https://meta.wikimedia.org/w/api.php'
- */
-$wgEventLoggingSchemaApiUri = 'https://meta.wikimedia.org/w/api.php';
-
-/**
- * @var bool|string: Value of $wgDBname for the MediaWiki instance
- * housing schemas; false if not set.
- */
-$wgEventLoggingDBname = 'metawiki';
-
-/**
- * @var array: A map of event schema names to revision IDs.
- * @example array: array( 'MultimediaViewerNetworkPerformance' => 7917896 );
- */
-$wgEventLoggingSchemas = isset( $wgEventLoggingSchemas ) ? 
$wgEventLoggingSchemas : [];
-
-// Classes
-
-$wgAutoloadClasses += [
-   'EventLogging' => __DIR__ . '/includes/EventLogging.php',
-
-   // Hooks
-   'EventLoggingHooks' => __DIR__ . '/includes/EventLoggingHooks.php',
-   'JsonSchemaHooks'   => __DIR__ . '/includes/JsonSchemaHooks.php',
-
-   // ContentHandler
-   'JsonSchemaContent'=> __DIR__ . 
'/includes/JsonSchemaContent.php',
-   'JsonSchemaContentHandler' => __DIR__ . 
'/includes/JsonSchemaContentHandler.php',
-
-   // ResourceLoaderModule
-   'RemoteSchema'   => __DIR__ . '/includes/RemoteSchema.php',
-   'ResourceLoaderSchemaModule' => __DIR__ . 
'/includes/ResourceLoaderSchemaModule.php',
-
-   // JsonSchema
-   'JsonSchemaException' => __DIR__ . '/includes/JsonSchema.php',
-   'JsonUtil'=> __DIR__ . '/includes/JsonSchema.php',
-   'TreeRef' => __DIR__ . '/includes/JsonSchema.php',
-   'JsonTreeRef' => __DIR__ . '/includes/JsonSchema.php',
-   'JsonSchemaIndex' => __DIR__ . '/includes/JsonSchema.php',
-
-   // API
-   'ApiJsonSchema' => __DIR__ . '/includes/ApiJsonSchema.php',
-];
-
-// Messages
-
-$wgMessagesDirs['EventLogging'] = __DIR__ . '/i18n/core';
-$wgMessagesDirs['JsonSchema'] = __DIR__ . '/i18n/jsonschema';
-$wgExtensionMessagesFiles['EventLoggingNamespaces'] = __DIR__ . 
'/EventLogging.namespaces.php';
-
-// Modules
-
-$wgResourceModules[ 'ext.eventLogging' ] = [
-   'scripts'   => [
-   'modules/ext.eventLogging.core.js',
-   'modules/ext.eventLogging.debug.js',
-   ],
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'EventLogging',
-   'dependencies'  => [
-   'json',
-   'ext.eventLogging.subscriber',
-   'user.options',
-   ],
-   'targets'   => [ 'desktop', 'mobile' ],
-];
-
-$wgResourceModules[ 'ext.eventLogging.subscriber' ] = [
-   'scripts'   => [
-   'modules/ext.eventLogging.subscriber.js',
-   'modules/ext.eventLogging.Schema.js',
-   ],
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'EventLogging',
-   'dependencies'  => [ 'mediawiki.user' ],
-   'targets'   => [ 'desktop', 'mobile' 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: switch all links to other langs to https

2016-08-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: planet: switch all links to other langs to https
..

planet: switch all links to other langs to https

Switch all the links to other planet language versions
from http to https.

Bug:T141480
Change-Id: I3b00ef37e587770242f06fc627014329d49548b3
---
M modules/planet/templates/feeds/ar_config.erb
M modules/planet/templates/feeds/bg_config.erb
M modules/planet/templates/feeds/ca_config.erb
M modules/planet/templates/feeds/de_config.erb
M modules/planet/templates/feeds/en_config.erb
M modules/planet/templates/feeds/es_config.erb
M modules/planet/templates/feeds/fr_config.erb
M modules/planet/templates/feeds/gmq_config.erb
M modules/planet/templates/feeds/id_config.erb
M modules/planet/templates/feeds/it_config.erb
M modules/planet/templates/feeds/ja_config.erb
M modules/planet/templates/feeds/pl_config.erb
M modules/planet/templates/feeds/ru_config.erb
M modules/planet/templates/feeds/sq_config.erb
M modules/planet/templates/feeds/sr_config.erb
M modules/planet/templates/feeds/uk_config.erb
M modules/planet/templates/feeds/zh_config.erb
17 files changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/303323/1

diff --git a/modules/planet/templates/feeds/ar_config.erb 
b/modules/planet/templates/feeds/ar_config.erb
index 396f41f..7b20a19 100644
--- a/modules/planet/templates/feeds/ar_config.erb
+++ b/modules/planet/templates/feeds/ar_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= ar.planet.wikimedia
-link= http://ar.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://ar.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/ar
diff --git a/modules/planet/templates/feeds/bg_config.erb 
b/modules/planet/templates/feeds/bg_config.erb
index 9e19cf4..0542def 100644
--- a/modules/planet/templates/feeds/bg_config.erb
+++ b/modules/planet/templates/feeds/bg_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= bg.planet.wikimedia
-link= http://bg.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://bg.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/bg
diff --git a/modules/planet/templates/feeds/ca_config.erb 
b/modules/planet/templates/feeds/ca_config.erb
index 1ceefba..1c339bf 100644
--- a/modules/planet/templates/feeds/ca_config.erb
+++ b/modules/planet/templates/feeds/ca_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= ca.planet.wikimedia
-link= http://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/ca
diff --git a/modules/planet/templates/feeds/de_config.erb 
b/modules/planet/templates/feeds/de_config.erb
index 1f48aa6..d561bdb 100644
--- a/modules/planet/templates/feeds/de_config.erb
+++ b/modules/planet/templates/feeds/de_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= de.planet.wikimedia
-link= http://de.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://de.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/de
diff --git a/modules/planet/templates/feeds/en_config.erb 
b/modules/planet/templates/feeds/en_config.erb
index c4db9d4..75d6cac 100644
--- a/modules/planet/templates/feeds/en_config.erb
+++ b/modules/planet/templates/feeds/en_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= en.planet.wikimedia
-link= http://en.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://en.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/en
diff --git a/modules/planet/templates/feeds/es_config.erb 
b/modules/planet/templates/feeds/es_config.erb
index 4923e36..2ab1a35 100644
--- a/modules/planet/templates/feeds/es_config.erb
+++ b/modules/planet/templates/feeds/es_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= es.planet.wikimedia
-link= http://es.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://es.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: planet: add mapped IPv6 address on VMs

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: planet: add mapped IPv6 address on VMs
..


planet: add mapped IPv6 address on VMs

Change-Id: I973c1d6038e96a00bdb9ecae72a9f5e5d630058d
---
M manifests/site.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 659cba4..41768bd 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2462,6 +2462,8 @@
 # virtual machines hosting 
https://wikitech.wikimedia.org/wiki/Planet.wikimedia.org
 node /^planet[12]001\.(eqiad|codfw)\.wmnet$/ {
 role planet::venus
+
+interface::add_ip6_mapped { 'main': interface => 'eth0', }
 }
 
 # LDAP servers relied on by OIT for mail

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I973c1d6038e96a00bdb9ecae72a9f5e5d630058d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
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...LiquidThreads[master]: Add extension.json, empty PHP entry point

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add extension.json, empty PHP entry point
..


Add extension.json, empty PHP entry point

Bug: T87935
Change-Id: I61361a91aae0f31c4f4227247bb6b9cfd754222b
---
M LiquidThreads.php
D LqtFunctions.php
M README
M classes/View.php
A extension.json
M pages/TalkpageView.php
6 files changed, 416 insertions(+), 365 deletions(-)

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



diff --git a/LiquidThreads.php b/LiquidThreads.php
index e197bf0..34ade28 100644
--- a/LiquidThreads.php
+++ b/LiquidThreads.php
@@ -1,328 +1,18 @@
  __FILE__,
-   'name'   => 'Liquid Threads',
-   'version'=> '2.2-alpha',
-   'url'=> 
'https://www.mediawiki.org/wiki/Extension:LiquidThreads',
-   'author' => array( 'David McCabe', 'Andrew Garrett' ),
-   'descriptionmsg' => 'lqt-desc',
-   'license-name' => 'GPL-2.0+',
-);
-
-require( 'LqtFunctions.php' );
-
-define( 'NS_LQT_THREAD', efArrayDefault( 'egLqtNamespaceNumbers', 'Thread', 90 
) );
-define( 'NS_LQT_THREAD_TALK', efArrayDefault( 'egLqtNamespaceNumbers', 
'Thread_talk', 91 ) );
-define( 'NS_LQT_SUMMARY', efArrayDefault( 'egLqtNamespaceNumbers', 'Summary', 
92 ) );
-define( 'NS_LQT_SUMMARY_TALK', efArrayDefault( 'egLqtNamespaceNumbers', 
'Summary_talk', 93 ) );
-define( 'LQT_NEWEST_CHANGES', 'nc' );
-define( 'LQT_NEWEST_THREADS', 'nt' );
-define( 'LQT_OLDEST_THREADS', 'ot' );
-
-// Localisation
-$wgMessagesDirs['LiquidThreads'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['LiquidThreadsMagic'] = __DIR__ . 
'/i18n/LiquidThreads.magic.php';
-$wgExtensionMessagesFiles['LiquidThreadsNamespaces'] = __DIR__ . 
'/i18n/Lqt.namespaces.php';
-$wgExtensionMessagesFiles['LiquidThreadsAlias'] = __DIR__ . 
'/i18n/Lqt.alias.php';
-
-$lqtMessages = array(
-   'lqt-ajax-updated',
-   'lqt-ajax-update-link',
-   'watch',
-   'unwatch',
-   'lqt-thread-link-url',
-   'lqt-thread-link-title',
-   'lqt-thread-link-copy',
-   'lqt-sign-not-necessary',
-   'lqt-summary-sign-not-necessary',
-   'lqt-marked-as-read-placeholder',
-   'lqt-email-undo',
-   'lqt-change-subject',
-   'lqt-save-subject',
-   'lqt-ajax-no-subject',
-   'lqt-ajax-invalid-subject',
-   'lqt-save-subject-error-unknown',
-   'lqt-cancel-subject-edit',
-   'lqt-drag-activate',
-   'lqt-drag-drop-zone',
-   'lqt-drag-confirm',
-   'lqt-drag-reparent',
-   'lqt-drag-split',
-   'lqt-drag-setsortkey',
-   'lqt-drag-bump',
-   'lqt-drag-save',
-   'lqt-drag-reason',
-   'lqt-drag-subject',
-   'lqt-edit-signature',
-   'lqt-preview-signature',
-   'lqt_contents_title',
-   'lqt-empty-text',
-   'lqt-pagechange-editformopen',
-);
-
-// ResourceLoader
-$lqtResourceTemplate = array(
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'LiquidThreads'
-);
-
-$wgResourceModules['ext.liquidThreads'] = $lqtResourceTemplate + array(
-   'styles' => array(
-   'lqt.css',
-   'jquery/jquery.thread_collapse.css',
-   'lqt.dialogs.css',
-   ),
-   'scripts' => array(
-   'lqt.js',
-   'jquery/jquery.thread_collapse.js',
-   'jquery/jquery.autogrow.js',
-   ),
-   'dependencies' => array(
-   'jquery.ui.dialog',
-   'jquery.ui.droppable',
-   'mediawiki.action.edit.preview',
-   'mediawiki.api.watch',
-   'user.tokens',
-   'jquery.client',
-   'user.options',
-   'mediawiki.api',
-   'mediawiki.util',
-   ),
-   'messages' => $lqtMessages
-);
-
-$wgResourceModules['ext.liquidThreads.newMessages'] = $lqtResourceTemplate + 
array(
-   'scripts' => array( 'newmessages.js' ),
-   'dependencies' => array( 'ext.liquidThreads' ),
-   'position' => 'top',
-);
-
-// Hooks
-// Parser Function Setup
-$wgHooks['ParserFirstCallInit'][] = 'LqtHooks::onParserFirstCallInit';
-
-// Namespaces
-$wgHooks['CanonicalNamespaces'][] = 'LqtHooks::onCanonicalNamespaces';
-
-// Main dispatch hook
-$wgHooks['MediaWikiPerformAction'][] = 'LqtDispatch::tryPage';
-$wgHooks['SkinTemplateNavigation'][] = 'LqtDispatch::onSkinTemplateNavigation';
-$wgHooks['PageContentLanguage'][] = 'LqtDispatch::onPageContentLanguage';
-
-// Customisation of recentchanges
-$wgHooks['OldChangesListRecentChangesLine'][] = 
'LqtHooks::customizeOldChangesList';
-
-// Notification (watchlist, newtalk)
-$wgHooks['SkinTemplateOutputPageBeforeExec'][] = 'LqtHooks::setNewtalkHTML';
-$wgHooks['ChangesListSpecialPageQuery'][] = 'LqtHooks::beforeWatchlist';
-$wgHooks['ArticleEditUpdateNewTalk'][] = 'LqtHooks::updateNewtalkOnEdit';
-$wgHooks['PersonalUrls'][] = 'LqtHooks::onPersonalUrls';
-
-// Preferences
-$wgHooks['GetPreferences'][] 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Mention UploadBase::stashFile() "checked" exceptions in docs

2016-08-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Mention UploadBase::stashFile() "checked" exceptions in docs
..

Mention UploadBase::stashFile() "checked" exceptions in docs

Change-Id: I732db6526511711e7c21cf81ddd088e50ab601ec
---
M includes/upload/UploadBase.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/22/303322/1

diff --git a/includes/upload/UploadBase.php b/includes/upload/UploadBase.php
index 5320673..b620132 100644
--- a/includes/upload/UploadBase.php
+++ b/includes/upload/UploadBase.php
@@ -958,6 +958,9 @@
 *
 * @param User $user
 * @return UploadStashFile Stashed file
+* @throws UploadStashBadPathException
+* @throws UploadStashFileException
+* @throws UploadStashNotLoggedInException
 */
public function stashFile( User $user = null ) {
$stash = 
RepoGroup::singleton()->getLocalRepo()->getUploadStash( $user );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I732db6526511711e7c21cf81ddd088e50ab601ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.13]: Revert "API: Remove deprecated response values from action=l...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Revert "API: Remove deprecated response values from 
action=login"
..


Revert "API: Remove deprecated response values from action=login"

Revert commit 23e5cdb5034dca5bbdfc2ac9c111c5fac20ff579
temporarily so Pywikibot users can catch up with API changes

Bug: T121527
Bug: T142155
Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
---
M includes/api/ApiLogin.php
M tests/phpunit/includes/api/ApiLoginTest.php
2 files changed, 14 insertions(+), 0 deletions(-)

Approvals:
  Gergő Tisza: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 1dadc07..0e4c6e0 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -212,6 +212,15 @@
 
$result['lguserid'] = intval( $user->getId() );
$result['lgusername'] = $user->getName();
+
+   // @todo: These are deprecated, and should be 
removed at some
+   // point (1.28 at the earliest, and see 
T121527). They were ok
+   // when the core cookie-based login was the 
only thing, but
+   // CentralAuth broke that a while back and
+   // SessionManager/AuthManager *really* break it.
+   $result['lgtoken'] = $user->getToken();
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'NeedToken':
@@ -219,6 +228,10 @@
$this->setWarning( 'Fetching a token via 
action=login is deprecated. ' .
   'Use action=query=tokens=login 
instead.' );
$this->logFeatureUsage( 'action=login&!lgtoken' 
);
+
+   // @todo: See above about deprecation
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'WrongToken':
diff --git a/tests/phpunit/includes/api/ApiLoginTest.php 
b/tests/phpunit/includes/api/ApiLoginTest.php
index 917a6ad..155a9dd 100644
--- a/tests/phpunit/includes/api/ApiLoginTest.php
+++ b/tests/phpunit/includes/api/ApiLoginTest.php
@@ -190,6 +190,7 @@
$this->assertArrayHasKey( "login", $data[0] );
$this->assertArrayHasKey( "result", $data[0]['login'] );
$this->assertEquals( "Success", $data[0]['login']['result'] );
+   $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
}
 
public function testBotPassword() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.13
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Gergő Tisza 
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]: Switching all planets links to https

2016-08-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Switching all planets links to https
..

Switching all planets links to https

https://ca.planet.wikimedia.org/

Change-Id: Id84b8995285f38ce5e2853d6fc07ec478dcb4be4
---
M modules/planet/templates/feeds/ca_config.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/303321/2

diff --git a/modules/planet/templates/feeds/ca_config.erb 
b/modules/planet/templates/feeds/ca_config.erb
index 1ceefba..1c339bf 100644
--- a/modules/planet/templates/feeds/ca_config.erb
+++ b/modules/planet/templates/feeds/ca_config.erb
@@ -11,7 +11,7 @@
 [Planet]
 
 name= ca.planet.wikimedia
-link= http://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
+link= https://ca.planet.<%= 
scope.lookupvar('planet::planet_domain_name') %>/
 owner_name  = planet
 owner_email = pla...@wikimedia.org
 output_theme= /usr/share/planet-venus/theme/wikimedia/ca

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id84b8995285f38ce5e2853d6fc07ec478dcb4be4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Sort time profile before printing it; print total parse & pr...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Sort time profile before printing it; print total parse & 
profiled time
..


Sort time profile before printing it; print total parse & profiled time

* (Total parse time - Total profiled time) is the time spent in
  - token transform manager code (the actual dispatching of tokens
to both handlers)
  - I/O wait time (waiting for API responses).
  - GC time

Change-Id: I28312d8cda035ce6686fdc7113fa87a4d4e05cc0
---
M lib/config/MWParserEnvironment.js
M lib/wt2html/parser.js
2 files changed, 27 insertions(+), 4 deletions(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index 1307802..79a2602 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -163,12 +163,34 @@
 };
 
 MWParserEnvironment.prototype.printTimeProfile = function() {
+   var endTime = new Date();
+   this.log('trace/time', 'Finished parse at ', endTime);
console.warn("-".repeat(55));
console.warn("Recorded times (in ms) for sync token transformations");
console.warn("-".repeat(55));
-   for (var k in this.timeProfile) {
-   var str = k + ' '.repeat(k.length < 30 ? 30 - k.length : 0);
-   console.warn(str + ": " + this.timeProfile[k]);
+
+   // Sort time profile in descending order
+   var k, v;
+   var total = 0;
+   var sortable = [];
+   for (k in this.timeProfile) {
+   v = this.timeProfile[k];
+   total += v;
+   sortable.push([k, v]);
+   }
+   sortable.push(['TOTAL PROFILED TIME', total]);
+   sortable.push(['TOTAL PARSE TIME', endTime - this.startTime]);
+
+   sortable.sort(function(a, b) {
+   return b[1] - a[1];
+   });
+
+
+   // Print profile
+   for (var i = 0; i < sortable.length; i++) {
+   k = sortable[i][0];
+   v = sortable[i][1];
+   console.warn(k + ' '.repeat(k.length < 30 ? 30 - k.length : 0) 
+ ': ' + v);
}
console.warn("-".repeat(55));
 };
diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index 3dffca9..683a887 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -482,7 +482,8 @@
// maintained across all pipelines used by the document.
// (Ex: Cite state)
this.resetState({toplevel: true});
-   this.env.log('trace/time', 'Starting parse at ', new Date());
+   this.env.startTime = new Date();
+   this.env.log('trace/time', 'Starting parse at ', 
this.env.startTime);
this.first.process(input);
} catch (err) {
this.env.log("fatal", err);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I28312d8cda035ce6686fdc7113fa87a4d4e05cc0
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Tweak time tracing of DOM passes for nested (non-top-level) ...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Tweak time tracing of DOM passes for nested (non-top-level) 
docs.
..


Tweak time tracing of DOM passes for nested (non-top-level) docs.

* Use a debug log level for printing detailed time info for
  nested docs.

  parse.js --debug time/dompp 
 vs.
  parse.js --trace  time/dompp 

* Accumulate total time spent on DOM passes on nested documents
  vs. the top level document.

Change-Id: Ifb171dcb8500523a490869b01bbd850f1aa9
---
M lib/wt2html/DOMPostProcessor.js
1 file changed, 16 insertions(+), 6 deletions(-)

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



diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index 1548c28..e38cc6a 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -394,11 +394,20 @@
});
}
 
-   var startTime, endTime, prefix;
+   var startTime, endTime, prefix, logLevel, resourceCategory;
if (tracePP) {
-   prefix = (this.atTopLevel ? "TOP" : "---");
+   if (this.atTopLevel) {
+   prefix = "TOP";
+   // Turn off DOM pass timing tracing on non-top-level 
documents
+   logLevel = "trace/time/dompp";
+   resourceCategory = "DOMPasses:TOP";
+   } else {
+   prefix = "---";
+   logLevel = "debug/time/dompp";
+   resourceCategory = "DOMPasses:NESTED";
+   }
startTime = new Date();
-   env.log("trace/time/dompp", prefix + "; start=" + startTime);
+   env.log(logLevel, prefix + "; start=" + startTime);
}
for (var i = 0; i < this.processors.length; i++) {
var pp = this.processors[i];
@@ -407,12 +416,13 @@
if (tracePP) {
ppName = pp.name + ' '.repeat(pp.name.length < 
30 ? 30 - pp.name.length : 0);
ppStart = new Date();
-   env.log("trace/time/dompp", prefix + "; " + 
ppName + " start");
+   env.log(logLevel, prefix + "; " + ppName + " 
start");
}
pp.proc(document.body, env, this.options, 
this.atTopLevel);
if (tracePP) {
ppEnd = new Date();
-   env.log("trace/time/dompp", prefix + "; " + 
ppName + " end; time = " + (ppEnd - ppStart));
+   env.log(logLevel, prefix + "; " + ppName + " 
end; time = " + (ppEnd - ppStart));
+   env.bumpTimeUse(resourceCategory, (ppEnd - 
ppStart));
}
} catch (e) {
env.log('fatal', e);
@@ -421,7 +431,7 @@
}
if (tracePP) {
endTime = new Date();
-   env.log("trace/time/dompp", prefix + "; end=" + endTime + "; 
time = " + (endTime - startTime));
+   env.log(logLevel, prefix + "; end=" + endTime + "; time = " + 
(endTime - startTime));
}
 
// For sub-pipeline documents, we are done.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb171dcb8500523a490869b01bbd850f1aa9
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.13]: Revert "API: Remove deprecated response values from action=l...

2016-08-05 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Revert "API: Remove deprecated response values from 
action=login"
..

Revert "API: Remove deprecated response values from action=login"

Revert commit 23e5cdb5034dca5bbdfc2ac9c111c5fac20ff579
temporarily so Pywikibot users can catch up with API changes

Bug: T121527
Bug: T142155
Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
---
M includes/api/ApiLogin.php
M tests/phpunit/includes/api/ApiLoginTest.php
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/303320/1

diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 1dadc07..0e4c6e0 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -212,6 +212,15 @@
 
$result['lguserid'] = intval( $user->getId() );
$result['lgusername'] = $user->getName();
+
+   // @todo: These are deprecated, and should be 
removed at some
+   // point (1.28 at the earliest, and see 
T121527). They were ok
+   // when the core cookie-based login was the 
only thing, but
+   // CentralAuth broke that a while back and
+   // SessionManager/AuthManager *really* break it.
+   $result['lgtoken'] = $user->getToken();
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'NeedToken':
@@ -219,6 +228,10 @@
$this->setWarning( 'Fetching a token via 
action=login is deprecated. ' .
   'Use action=query=tokens=login 
instead.' );
$this->logFeatureUsage( 'action=login&!lgtoken' 
);
+
+   // @todo: See above about deprecation
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'WrongToken':
diff --git a/tests/phpunit/includes/api/ApiLoginTest.php 
b/tests/phpunit/includes/api/ApiLoginTest.php
index 917a6ad..155a9dd 100644
--- a/tests/phpunit/includes/api/ApiLoginTest.php
+++ b/tests/phpunit/includes/api/ApiLoginTest.php
@@ -190,6 +190,7 @@
$this->assertArrayHasKey( "login", $data[0] );
$this->assertArrayHasKey( "result", $data[0]['login'] );
$this->assertEquals( "Success", $data[0]['login']['result'] );
+   $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
}
 
public function testBotPassword() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.28.0-wmf.13
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix top position of badges in monobook

2016-08-05 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: Fix top position of badges in monobook
..

Fix top position of badges in monobook

Change-Id: Ie2638445d020baf1be79ac1689b446ac1abc2f63
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 9e4410d..f9b78a1 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -7,7 +7,7 @@
#pt-notifications-alert & {
width: 20px;
height: 16px;
-   top: -7px;
+   top: -3px;
 
&:before {
background-size: 16px 16px;

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

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

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Move payments-init queue off ActiveMQ

2016-08-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Move payments-init queue off ActiveMQ
..

Move payments-init queue off ActiveMQ

Requirements:
* Mirror payments-init queue to redis

Bug: T131273
Change-Id: I49f893a288db66ee70602bdd5e31a6976e43e716
---
A sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
3 files changed, 64 insertions(+), 48 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/18/303318/1

diff --git 
a/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
new file mode 100644
index 000..4174885
--- /dev/null
+++ b/sites/all/modules/queue2civicrm/fredge/PaymentsInitQueueConsumer.php
@@ -0,0 +1,54 @@
+push( 'fredge' );
+   $query = 'SELECT id FROM payments_initial 
+  WHERE contribution_tracking_id = :ct_id
+  AND order_id = :order_id LIMIT 1';
+   $result = db_query( $query, array(
+   ':ct_id' => $message['contribution_tracking_id'],
+   ':order_id' => $message['order_id']
+   ) );
+   if ( $result->rowCount() === 1 ) {
+   $id = $result->fetch()->id;
+   $inserting = false;
+   }
+
+   $data = fredge_prep_data( $message, 'payments_initial', $logId, 
$inserting );
+
+   if ( $inserting ) {
+   db_insert( 'payments_initial' )
+   ->fields( $data )
+   ->execute();
+   } else {
+   db_update( 'payments_initial' )
+   ->fields( $data )
+   ->condition( 'id', $id )
+   ->execute();
+   }
+   }
+}
diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
index 9765838..04e8797 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
@@ -5,3 +5,4 @@
 configure = admin/config/queue2civicrm/fredge_qc
 dependencies[] = queue2civicrm
 files[] = AntifraudQueueConsumer.php
+files[] = PaymentsInitQueueConsumer.php
diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index fa4e93c..5e14704 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
@@ -1,5 +1,6 @@
  'textfield',
-'#title' => t('Payments-init subscription path'),
+'#title' => t('Payments-init queue name'),
 '#required' => TRUE,
-'#default_value' => variable_get('fredge_payments_init_queue', 
'/queue/payments-init'),
-'#description' => t('Queue for payments-init items'),
+'#default_value' => variable_get('fredge_payments_init_queue', 
'payments-init'),
+'#description' => t('Config key under data-store for payments-init queue'),
   );
 
   $form['fredge_payments_antifraud_queue'] = array(
@@ -71,12 +72,13 @@
   //Let's start with the simplest possible division of labor
   $cycle_time = variable_get('fredge_batch_time', 0) / 2;
 
-  $processed = queue2civicrm_stomp()->dequeue_loop(
-variable_get('fredge_payments_init_queue', '/queue/payments-init'),
+  $paymentsInitConsumer = new PaymentsInitQueueConsumer(
+variable_get('fredge_payments_init_queue', 'payments-init'),
 false,
-$cycle_time,
-'fredge_payments_init_process_message'
+$cycle_time
   );
+
+  $processed = $paymentsInitConsumer->dequeueMessages();
 
   $fraudQueueConsumer = new AntifraudQueueConsumer(
 variable_get('fredge_payments_antifraud_queue', 'payments-antifraud'),
@@ -91,47 +93,6 @@
   }
   else {
 watchdog('fredge', 'No fredge messages processed.');
-  }
-}
-
-/**
- * Processes an individual payments-init message.
- *
- * @param $msg A STOMP message class.
- *
- */
-function fredge_payments_init_process_message($msg) {
-  $txnid = $msg->headers['correlation-id'];
-  watchdog('fredge', "Beginning processing of payments-init message for 
$txnid: " . json_encode($msg), array(), WATCHDOG_INFO);
-
-  $body = json_decode($msg->body, TRUE);
-
-  $id = 0;
-  $inserting = true;
-
-  $dbs = wmf_civicrm_get_dbs();
-  $dbs->push('fredge');
-  $query = 'SELECT id FROM payments_initial WHERE contribution_tracking_id = 
:ct_id AND order_id = :order_id LIMIT 1';
-  $result = db_query( $query, array(
-':ct_id' => $body['contribution_tracking_id'],
-':order_id' => $body['order_id']
-  ) );
-  if ( $result->rowCount() === 1 ){
-  

[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Send notifications about app management events

2016-08-05 Thread Dpatrick (Code Review)
Dpatrick has submitted this change and it was merged.

Change subject: Send notifications about app management events
..


Send notifications about app management events

Send an Echo notification to all OAuth admins when a new app is
proposed or an existing one updated, and a notification to the app
owner when an app is approved, rejected, disabled or reenabled.

Bug: T62528
Bug: T61772
Change-Id: Iee6e0074d648236b01ae40da704a27cfb94d4748
Depends-On: Idbaf2102410f82343ad38ff51ccb7ab70b15e654
---
M OAuth.config.php
M OAuth.setup.php
M backend/MWOAuthConsumer.php
M backend/MWOAuthUtils.php
M backend/schema/mysql/OAuth.sql
M control/MWOAuthConsumerSubmitControl.php
A frontend/EchoOAuthStageChangePresentationModel.php
M frontend/MWOAuthUI.hooks.php
M frontend/MWOAuthUI.setup.php
A frontend/assets/echo-icon.png
M i18n/en.json
M i18n/qqq.json
12 files changed, 336 insertions(+), 70 deletions(-)

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



diff --git a/OAuth.config.php b/OAuth.config.php
index 3ff16fc..7347ece 100644
--- a/OAuth.config.php
+++ b/OAuth.config.php
@@ -56,6 +56,11 @@
 
 $wgGroupPermissions['user']['mwoauthmanagemygrants'] = true;
 
+$wgDefaultUserOptions['echo-subscriptions-web-oauth-owner'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-oauth-owner'] = true;
+$wgDefaultUserOptions['echo-subscriptions-web-oauth-admin'] = true;
+$wgDefaultUserOptions['echo-subscriptions-email-oauth-admin'] = true;
+
 /** @var bool Require HTTPs for user transactions that might send out secret 
tokens */
 $wgMWOAuthSecureTokenTransfer = true; // RfC compliance
 
@@ -80,5 +85,10 @@
  */
 $wgOAuthSecretKey = $wgSecretKey;
 
+/**
+ * @var string[] User groups to notify about new consumers that need to be 
reviewed.
+ */
+$wgOAuthGroupsToNotify = [];
+
 # End of configuration variables.
 # 
diff --git a/OAuth.setup.php b/OAuth.setup.php
index 2443c32..b718b21 100644
--- a/OAuth.setup.php
+++ b/OAuth.setup.php
@@ -77,6 +77,10 @@
$classes['MediaWiki\Extensions\OAuth\MWOAuthServer'] = 
"$backendDir/MWOAuthServer.php"; // "MWOAuth1Protocol"?

$classes['MediaWiki\Extensions\OAuth\MWOAuthSignatureMethod_RSA_SHA1'] = 
"$backendDir/MWOAuthSignatureMethod.php";
 
+   # Echo
+   
$classes['MediaWiki\Extensions\OAuth\EchoOAuthStageChangePresentationModel'] =
+   
"$frontendDir/EchoOAuthStageChangePresentationModel.php";
+
# Library
$classes['MediaWiki\Extensions\OAuth\OAuthException'] = 
"$libDir/OAuth.php";
$classes['MediaWiki\Extensions\OAuth\OAuthConsumer'] = 
"$libDir/OAuth.php";
diff --git a/backend/MWOAuthConsumer.php b/backend/MWOAuthConsumer.php
index 9bbd21d..2289888 100644
--- a/backend/MWOAuthConsumer.php
+++ b/backend/MWOAuthConsumer.php
@@ -38,7 +38,8 @@
protected $consumerKey;
/** @var string Name of connected application */
protected $name;
-   /** @var integer Publisher user ID (on central wiki) */
+   /** @var integer Publisher's central user ID. $wgMWOAuthSharedUserIDs 
defines which central ID
+*provider to use. */
protected $userId;
/** @var string Version used for handshake breaking changes */
protected $version;
diff --git a/backend/MWOAuthUtils.php b/backend/MWOAuthUtils.php
index 7df04fb..23a54a5 100644
--- a/backend/MWOAuthUtils.php
+++ b/backend/MWOAuthUtils.php
@@ -2,8 +2,9 @@
 
 namespace MediaWiki\Extensions\OAuth;
 
+use EchoEvent;
 use Hooks;
-use MWException;
+use User;
 
 /**
  * Static utility functions for OAuth
@@ -458,4 +459,55 @@
return \MWGrants::grantsAreValid( $grants );
}
 
+   /**
+* Given an OAuth consumer stage change event, find out who needs to be 
notified.
+* Will be used as an EchoAttributeManager::ATTR_LOCATORS callback.
+* @param EchoEvent $event
+* @return User[]
+*/
+   public static function locateUsersToNotify( EchoEvent $event ) {
+   $agent = $event->getAgent();
+   $owner = MWOAuthUtils::getLocalUserFromCentralId( 
$event->getExtraParam( 'owner-id' ) );
+
+   $users = [];
+   switch ( $event->getType() ) {
+   case 'oauth-app-propose':
+   // notify OAuth admins about new proposed apps
+   $oauthAdmins = self::getOAuthAdmins();
+   foreach ( $oauthAdmins as $admin ) {
+   if ( $admin->equals( $owner ) ) {
+   continue;
+   }
+   $users[$admin->getId()] = $admin;
+   }
+   break;
+   case 'oauth-app-update':
+   case 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "API: Remove deprecated response values from action=l...

2016-08-05 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Revert "API: Remove deprecated response values from 
action=login"
..

Revert "API: Remove deprecated response values from action=login"

Revert commit 23e5cdb5034dca5bbdfc2ac9c111c5fac20ff579
temporarily so Pywikibot users can catch up with API changes

Bug: T121527
Bug: T142155
Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
---
M RELEASE-NOTES-1.28
M includes/api/ApiLogin.php
M tests/phpunit/includes/api/ApiLoginTest.php
3 files changed, 14 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/17/303317/1

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 53fdc83..608bc56 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -53,9 +53,6 @@
   the value of $wgMaxArticleSize.
 * Property 'modulemessages' from action=parse=modules was removed
   (deprecated since 1.26).
-* The following response properties from action=login, deprecated in 1.27, are
-  now removed: lgtoken, cookieprefix, sessionid. Clients should handle cookies
-  to properly manage session state.
 
 === Action API internal changes in 1.28 ===
 * Added a new hook, 'ApiMakeParserOptions', to allow extensions to better
diff --git a/includes/api/ApiLogin.php b/includes/api/ApiLogin.php
index 1dadc07..0e4c6e0 100644
--- a/includes/api/ApiLogin.php
+++ b/includes/api/ApiLogin.php
@@ -212,6 +212,15 @@
 
$result['lguserid'] = intval( $user->getId() );
$result['lgusername'] = $user->getName();
+
+   // @todo: These are deprecated, and should be 
removed at some
+   // point (1.28 at the earliest, and see 
T121527). They were ok
+   // when the core cookie-based login was the 
only thing, but
+   // CentralAuth broke that a while back and
+   // SessionManager/AuthManager *really* break it.
+   $result['lgtoken'] = $user->getToken();
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'NeedToken':
@@ -219,6 +228,10 @@
$this->setWarning( 'Fetching a token via 
action=login is deprecated. ' .
   'Use action=query=tokens=login 
instead.' );
$this->logFeatureUsage( 'action=login&!lgtoken' 
);
+
+   // @todo: See above about deprecation
+   $result['cookieprefix'] = 
$this->getConfig()->get( 'CookiePrefix' );
+   $result['sessionid'] = $session->getId();
break;
 
case 'WrongToken':
diff --git a/tests/phpunit/includes/api/ApiLoginTest.php 
b/tests/phpunit/includes/api/ApiLoginTest.php
index 917a6ad..155a9dd 100644
--- a/tests/phpunit/includes/api/ApiLoginTest.php
+++ b/tests/phpunit/includes/api/ApiLoginTest.php
@@ -190,6 +190,7 @@
$this->assertArrayHasKey( "login", $data[0] );
$this->assertArrayHasKey( "result", $data[0]['login'] );
$this->assertEquals( "Success", $data[0]['login']['result'] );
+   $this->assertArrayHasKey( 'lgtoken', $data[0]['login'] );
}
 
public function testBotPassword() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3879a5d76a1727dd653daeebc79d4d9cabd0332e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix inconsistent RevDelFileItem visibilities

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix inconsistent RevDelFileItem visibilities
..


Fix inconsistent RevDelFileItem visibilities

Bug: T142228
Change-Id: Ib5a0a1adbea2daf2b035cf6be367841362de03cc
---
M includes/revisiondelete/RevDelArchivedFileItem.php
M includes/revisiondelete/RevDelFileItem.php
2 files changed, 4 insertions(+), 6 deletions(-)

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



diff --git a/includes/revisiondelete/RevDelArchivedFileItem.php 
b/includes/revisiondelete/RevDelArchivedFileItem.php
index 39fb8ef..52df2e3 100644
--- a/includes/revisiondelete/RevDelArchivedFileItem.php
+++ b/includes/revisiondelete/RevDelArchivedFileItem.php
@@ -23,10 +23,8 @@
  * Item class for a filearchive table row
  */
 class RevDelArchivedFileItem extends RevDelFileItem {
-   /** @var RevDelArchivedFileList */
-   protected $list;
-   /** @var ArchivedFile */
-   protected $file;
+   /** @var $list RevDelArchivedFileList */
+   /** @var $file ArchivedFile */
/** @var LocalFile */
protected $lockFile;
 
diff --git a/includes/revisiondelete/RevDelFileItem.php 
b/includes/revisiondelete/RevDelFileItem.php
index 3a3b467..ff01cee 100644
--- a/includes/revisiondelete/RevDelFileItem.php
+++ b/includes/revisiondelete/RevDelFileItem.php
@@ -23,10 +23,10 @@
  * Item class for an oldimage table row
  */
 class RevDelFileItem extends RevDelItem {
-   /** @var OldLocalFile */
-   public $file;
/** @var RevDelFileList */
protected $list;
+   /** @var OldLocalFile */
+   protected $file;
 
public function __construct( $list, $row ) {
parent::__construct( $list, $row );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib5a0a1adbea2daf2b035cf6be367841362de03cc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Move antifraud queue off ActivMQ

2016-08-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Move antifraud queue off ActivMQ
..

Move antifraud queue off ActivMQ

Requirements:
* Mirror antifraud queue to redis (in both DI and SmashPig)

Bug: T131273
Change-Id: Ida1a73bc8a2484a6ecf99bc8d70a0e5d69b1233a
---
A sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
M sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
3 files changed, 133 insertions(+), 115 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/16/303316/1

diff --git a/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php 
b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
new file mode 100644
index 000..0e5dfb0
--- /dev/null
+++ b/sites/all/modules/queue2civicrm/fredge/AntifraudQueueConsumer.php
@@ -0,0 +1,114 @@
+insertAntifraudData( $message, $id );
+   }
+
+   /**
+* take a message and insert or update rows in payments_fraud and 
payments_fraud_breakdown.
+* If there is not yet an antifraud row for this ct_id and order_id, 
all fields
+* in the table must be present in the message.
+* @param array $msg the message that you want to upsert.
+* @param string $logIdentifier Some small string for the log that will 
help id
+* the message if something goes amiss and we have to log about it.
+* @throws FredgeDataValidationException
+*/
+   protected function insertAntifraudData( $msg, $logIdentifier ) {
+
+   if ( empty( $msg ) || empty( $msg['contribution_tracking_id'] ) 
|| empty( $msg['order_id'] ) ) {
+   $error = "$logIdentifier: missing essential 
payments_fraud IDs. Dropping message on floor.";
+   throw new FredgeDataValidationException( $error );
+   }
+
+   $id = 0;
+   $inserting = true;
+
+   $dbs = wmf_civicrm_get_dbs();
+   $dbs->push( 'fredge' );
+   $query = 'SELECT id FROM payments_fraud WHERE 
contribution_tracking_id = :ct_id AND order_id = :order_id LIMIT 1';
+   $result = db_query( $query, array(
+   ':ct_id' => $msg['contribution_tracking_id'],
+   ':order_id' => $msg['order_id']
+   ) );
+   if ( $result->rowCount() === 1 ) {
+   $id = $result->fetch()->id;
+   $inserting = false;
+   }
+   $data = fredge_prep_data( $msg, 'payments_fraud', 
$logIdentifier, $inserting );
+   //now all you have to do is insert the actual message data.
+   if ( $inserting ) {
+   $id = db_insert( 'payments_fraud' )
+   ->fields( $data )
+   ->execute();
+   } else {
+   db_update( 'payments_fraud' )
+   ->fields( $data )
+   ->condition( 'id', $id )
+   ->execute();
+   }
+   if ( $id ) {
+   foreach ( $msg['score_breakdown'] as $test => $score ) {
+   $breakdown = array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   'risk_score' => $score,
+   );
+   // validate the data. none of these fields 
would be converted, so no need
+   // to store the output
+   fredge_prep_data( $breakdown, 
'payments_fraud_breakdown', $logIdentifier, true );
+   db_merge( 'payments_fraud_breakdown' )->key( 
array(
+   'payments_fraud_id' => $id,
+   'filter_name' => $test,
+   ) )->fields( array(
+   'risk_score' => $score,
+   ) )->execute();
+   }
+   }
+   }
+}
diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
index 7437b44..9765838 100644
--- a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
+++ b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.info
@@ -4,3 +4,4 @@
 package = queue2civicrm
 configure = admin/config/queue2civicrm/fredge_qc
 dependencies[] = queue2civicrm
+files[] = AntifraudQueueConsumer.php
diff --git a/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module 
b/sites/all/modules/queue2civicrm/fredge/wmf_fredge_qc.module
index 

[MediaWiki-commits] [Gerrit] mediawiki...Flow[master]: [wip] Allow watching and unwatching of boards from Flow noti...

2016-08-05 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [wip] Allow watching and unwatching of boards from Flow 
notifications
..

[wip] Allow watching and unwatching of boards from Flow notifications

Bug: T132975
Depends-On: Ib16d57c3f1a11a974
Change-Id: I75d0098e7718ec44bfb3a4d43e4e7e5a03c47331
---
M i18n/en.json
M i18n/qqq.json
M includes/Notifications/NewTopicPresentationModel.php
M includes/Notifications/Notifications.php
4 files changed, 15 insertions(+), 0 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index fbafbb9..c599d8e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,6 +14,8 @@
]
},
"enableflow": "Enable Flow",
+   "notifications-dynamic-actions-flow-board-watch": "You are now watching 
the board \"$1\"",
+   "notifications-dynamic-actions-flow-board-unwatch": "You are no longer 
watching the board \"$1\"",
"flow-desc": "Workflow management system",
"flow-talk-taken-over-comment": "/* This page has been converted into a 
Flow discussion board */",
"log-name-flow": "Flow activity log",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index e427050..282e0a2 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -25,6 +25,8 @@
]
},
"enableflow": "{{doc-special|EnableFlow}}",
+   "notifications-dynamic-actions-flow-board-watch": "Confirmation text 
for watching a board from within a notification.\n\nParameters:\n* $1 - Board 
name",
+   "notifications-dynamic-actions-flow-board-unwatch": "Confirmation text 
for unwatching a board from within a notification.\n\nParameters:\n* $1 - Board 
name",
"flow-desc": 
"{{desc|name=Flow|url=https://www.mediawiki.org/wiki/Extension:Flow}};,
"flow-talk-taken-over-comment": "Comment of the new revision that is 
created when a page turns into a Flow discussion board.",
"log-name-flow": "{{doc-logpage}}\nName of the Flow log filter on the 
[[Special:Log]] page.",
diff --git a/includes/Notifications/NewTopicPresentationModel.php 
b/includes/Notifications/NewTopicPresentationModel.php
index ee31046..cec4a5a 100644
--- a/includes/Notifications/NewTopicPresentationModel.php
+++ b/includes/Notifications/NewTopicPresentationModel.php
@@ -28,6 +28,13 @@
return array(
$this->getAgentLink(),
$this->getBoardByNewestLink(),
+   // Watch/Unwatch board
+   $this->getDynamicActionLink(
+   $this->event->getTitle(),
+   'flow-watch', // TODO: Figure out if 
this is 'watch' or 'unwatch'
+   false,
+   $this->getBoardLink()
+   ),
);
}
}
diff --git a/includes/Notifications/Notifications.php 
b/includes/Notifications/Notifications.php
index 214600c..6f67b53 100644
--- a/includes/Notifications/Notifications.php
+++ b/includes/Notifications/Notifications.php
@@ -105,6 +105,10 @@
'Flow\\NotificationsUserLocator::locateMentionedUsers',
'EchoUserLocator::locateTalkPageOwner',
),
+   // Defining i18n keys:
+   // notifications-dynamic-actions-flow-board-watch
+   // notifications-dynamic-actions-flow-board-unwatch
+   'dynamic_actions' => array( 'flow-board-watch', 
'flow-board-unwatch' ),
) + $newTopicNotification,
'flowusertalk-new-topic' => array(
'section' => 'alert',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: [wip] Add dynamic secondary actions to items

2016-08-05 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [wip] Add dynamic secondary actions to items
..

[wip] Add dynamic secondary actions to items

Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
---
M Hooks.php
M includes/formatters/EventPresentationModel.php
2 files changed, 47 insertions(+), 0 deletions(-)


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

diff --git a/Hooks.php b/Hooks.php
index 655f28a..7677160 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -97,6 +97,26 @@
 */
public static function onResourceLoaderRegisterModules( ResourceLoader 
&$resourceLoader ) {
global $wgEchoConfig;
+   global $wgEchoNotifications;
+
+   // Add i18n messages for dynamic actions
+   $msgKeys = array();
+   $keyExists = array();
+   foreach ( $wgEchoNotifications as $key => $data ) {
+   if ( $data['dynamic_actions'] ) {
+   foreach ( $data['dynamic_actions'] as 
$dynaction ) {
+   if ( !$keyExists[ $dynaction ] ) {
+   $msgKeys[] = 
"notifications-dynamic-actions-$dynaction";
+   $keyExists[ $dynaction ] = true;
+   }
+   }
+   }
+   }
+   // Register the module for the messages
+   $resourceLoader->register( 'ext.echo.dynamic.actions.i18n', 
array(
+   'messages' => $msgKeys,
+   'targets' => array( 'desktop', 'mobile' )
+   ) );
 
// ext.echo.logger is used by mobile notifications as well, so 
be sure not to add any
// dependencies that do not target mobile.
diff --git a/includes/formatters/EventPresentationModel.php 
b/includes/formatters/EventPresentationModel.php
index 4d1e39a..7bf2664 100644
--- a/includes/formatters/EventPresentationModel.php
+++ b/includes/formatters/EventPresentationModel.php
@@ -441,6 +441,7 @@
 * 'label' => (string) link text (non-escaped),
 * 'description' => (string) descriptive text 
(non-escaped),
 * 'icon' => (bool|string) symbolic icon name (or false 
if there is none),
+* 'action' => (string) optional descriptor of an 
action. This is intended for links that involve ajax actions from the ui.
 * 'prioritized' => (bool) true if the link should be 
outside the
 *  action menu, false for inside)],
 *...]
@@ -555,4 +556,30 @@
'prioritized' => $prioritized,
);
}
+
+   /**
+* @param Title $title
+* @param string $action
+* @param bool $prioritized
+* @param array $query
+* @return array
+*/
+   final protected function getDynamicActionLink( Title $title, $action, 
$prioritized, $query = array() ) {
+   if ( $title->getNamespace() === NS_USER_TALK ) {
+   $icon = 'userSpeechBubble';
+   } elseif ( $title->isTalkPage() ) {
+   $icon = 'speechBubbles';
+   } else {
+   $icon = 'article';
+   }
+
+   return array(
+   'action' => $action,
+   'url' => $title->getFullURL( $query ),
+   'label' => $this->msg( 'echo-dynamic-secondary-action-' 
+ $action ),
+   'tooltip' => $this->msg( 
'echo-dynamic-secondary-action-' + $action ),
+   'icon' => $icon,
+   'prioritized' => $prioritized,
+   );
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (4b4bf8c)

2016-08-05 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VE core submodule to master (4b4bf8c)
..

Update VE core submodule to master (4b4bf8c)

New changes:
acf0983 Create SourceSurfaceFragment for editing source documents
8bf0568 Make keepEmptyContentBranches an option of #sanitize and simplify usage

Change-Id: I1fa8af7e4b881238f77e0601b2b275e2b8e1cd2c
---
M .jsduck/categories.json
M .jsduck/eg-iframe.html
M extension.json
M lib/ve
4 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/VisualEditor 
refs/changes/13/303313/1

diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index 13fa208..acc2609 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -91,7 +91,7 @@
"ve.dm.APIResultsProvider",
"ve.dm.APIResultsQueue",
"ve.dm.Surface",
-   "ve.dm.SurfaceFragment",
+   "ve.dm.*SurfaceFragment",
"ve.dm.*Selection",
"ve.dm.Transaction",
"ve.dm.TransactionProcessor",
diff --git a/.jsduck/eg-iframe.html b/.jsduck/eg-iframe.html
index 0c72017..df673b4 100644
--- a/.jsduck/eg-iframe.html
+++ b/.jsduck/eg-iframe.html
@@ -192,6 +192,7 @@



+   



diff --git a/extension.json b/extension.json
index efef225..8e72ffb 100644
--- a/extension.json
+++ b/extension.json
@@ -565,6 +565,7 @@
"lib/ve/src/dm/ve.dm.Selection.js",
"lib/ve/src/dm/ve.dm.Surface.js",
"lib/ve/src/dm/ve.dm.SurfaceFragment.js",
+   "lib/ve/src/dm/ve.dm.SourceSurfaceFragment.js",
"lib/ve/src/dm/ve.dm.DataString.js",
"lib/ve/src/dm/ve.dm.Document.js",
"lib/ve/src/dm/ve.dm.DocumentSlice.js",
diff --git a/lib/ve b/lib/ve
index 4408c13..4b4bf8c 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 4408c13850e3ee9583f51d0b3c306721b988103f
+Subproject commit 4b4bf8cdfe336ec79bd5e8152e38d7297b45f264

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Create SourceSurfaceFragment for editing source documents

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Create SourceSurfaceFragment for editing source documents
..


Create SourceSurfaceFragment for editing source documents

Intercepts surface fragment modification calls and replaces content
with source equivalent. Sub-classes can override convertDocument to
convert content to a different source language (e.g. wikitext).

Change-Id: I61f3ebc153f1e14201ba16dee25f3f062977d247
---
M .jsduck/categories.json
M build/modules.json
M demos/ve/desktop.html
M demos/ve/mobile.html
M src/ce/ve.ce.Surface.js
M src/dm/lineardata/ve.dm.ElementLinearData.js
A src/dm/ve.dm.SourceSurfaceFragment.js
M src/ui/ve.ui.DesktopSurface.js
M tests/dm/lineardata/ve.dm.ElementLinearData.test.js
M tests/index.html
10 files changed, 154 insertions(+), 17 deletions(-)

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



diff --git a/.jsduck/categories.json b/.jsduck/categories.json
index e5d9e10..53fbe89 100644
--- a/.jsduck/categories.json
+++ b/.jsduck/categories.json
@@ -60,7 +60,7 @@
"ve.dm.APIResultsProvider",
"ve.dm.APIResultsQueue",
"ve.dm.Surface",
-   "ve.dm.SurfaceFragment",
+   "ve.dm.*SurfaceFragment",
"ve.dm.*Selection",
"ve.dm.Transaction",
"ve.dm.TransactionProcessor",
diff --git a/build/modules.json b/build/modules.json
index 653b73b..02a714a 100644
--- a/build/modules.json
+++ b/build/modules.json
@@ -257,6 +257,7 @@
"src/dm/ve.dm.Selection.js",
"src/dm/ve.dm.Surface.js",
"src/dm/ve.dm.SurfaceFragment.js",
+   "src/dm/ve.dm.SourceSurfaceFragment.js",
"src/dm/ve.dm.DataString.js",
"src/dm/ve.dm.Document.js",
"src/dm/ve.dm.DocumentSlice.js",
diff --git a/demos/ve/desktop.html b/demos/ve/desktop.html
index 551e458..5eb7bcb 100644
--- a/demos/ve/desktop.html
+++ b/demos/ve/desktop.html
@@ -213,6 +213,7 @@



+   



diff --git a/demos/ve/mobile.html b/demos/ve/mobile.html
index 1a64a20..e52ff99 100644
--- a/demos/ve/mobile.html
+++ b/demos/ve/mobile.html
@@ -214,6 +214,7 @@



+   



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 129c40c..2336fe7 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2192,7 +2192,7 @@
 
// If the external HTML turned out to be plain text after
// sanitization then run it as a plain text transfer item
-   if ( pastedDocumentModel.data.isPlainText( true, contextRange ) 
) {
+   if ( pastedDocumentModel.data.isPlainText( contextRange, true ) 
) {
pastedText = pastedDocumentModel.data.getText( true, 
contextRange );
if ( pastedText ) {
handled = this.handleDataTransferItems(
diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index d687070..a8c4b3c 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -617,21 +617,28 @@
 /**
  * Check if the data is just plain (un-annotated) text
  *
- * @param {boolean} [allowNonContentNodes] Include non-content nodes in the 
definition of plain text, e.g. paragraphs, headings, lists
  * @param {ve.Range} [range] Range to get the data for. The whole data set if 
not specified.
+ * @param {boolean} [allowNonContentNodes] Include non-content nodes in the 
definition of plain text, e.g. paragraphs, headings, lists
+ * @param {boolean} [allowedTypes] Only allow specific non-content types
  * @return {boolean} The data is plain text
  */
-ve.dm.ElementLinearData.prototype.isPlainText = function ( 
allowNonContentNodes, range ) {
-   var i;
+ve.dm.ElementLinearData.prototype.isPlainText = function ( range, 
allowNonContentNodes, allowedTypes ) {
+   var i, type;
+
range = range || new ve.Range( 0, this.getLength() );
 
for ( i = range.start; i < range.end; i++ ) {
-   if (
-   typeof this.data[ i ] === 'string' ||
-   allowNonContentNodes && this.isElementData( i ) &&
-   !ve.dm.nodeFactory.isNodeContent( this.getType( i ) )
-   ) {
+   if ( typeof this.data[ i ] === 'string' ) {
continue;
+  

[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Make keepEmptyContentBranches an option of #sanitize and sim...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make keepEmptyContentBranches an option of #sanitize and 
simplify usage
..


Make keepEmptyContentBranches an option of #sanitize and simplify usage

Change-Id: I62b6897050c4257ce23f3420627016bea306e245
---
M src/ce/ve.ce.Surface.js
M src/dm/lineardata/ve.dm.ElementLinearData.js
M src/dm/ve.dm.Document.js
3 files changed, 12 insertions(+), 16 deletions(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 8856e2d..1150a94 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -1872,7 +1872,7 @@
tableAction,
items = [],
importantElement = '[id],[typeof],[rel]',
-   importRules = !this.pasteSpecial ? 
this.getSurface().getImportRules() : { all: { plainText: true } },
+   importRules = !this.pasteSpecial ? 
this.getSurface().getImportRules() : { all: { plainText: true, 
keepEmptyContentBranches: true } },
beforePasteData = this.beforePasteData || {},
surfaceModel = this.getModel(),
fragment = surfaceModel.getFragment(),
@@ -1880,12 +1880,12 @@
documentModel = surfaceModel.getDocument(),
view = this;
 
-   function sanitize( linearData, keepEmptyContentBranches ) {
+   function sanitize( linearData ) {
// If the clipboardKey isn't set (paste from non-VE instance) 
use external import rules
if ( !clipboardKey ) {
-   linearData.sanitize( importRules.external || {}, 
keepEmptyContentBranches );
+   linearData.sanitize( importRules.external || {} );
}
-   linearData.sanitize( importRules.all || {}, 
keepEmptyContentBranches );
+   linearData.sanitize( importRules.all || {} );
}
 
// If the selection doesn't collapse after paste then nothing was 
inserted
@@ -2011,7 +2011,7 @@
);
 
if ( this.pasteSpecial ) {
-   sanitize( pasteData, true );
+   sanitize( pasteData );
}
 
// Insert content
@@ -2025,7 +2025,7 @@
);
 
if ( this.pasteSpecial ) {
-   sanitize( pasteData, true );
+   sanitize( pasteData );
}
 
// Insert content
@@ -2129,10 +2129,8 @@
pastedDocumentModel.getStore(),
ve.copy( beforePasteData.context )
);
-   if ( this.pasteSpecial ) {
-   // The context may have been sanitized, so 
sanitize here as well for comparison
-   sanitize( context, true );
-   }
+   // Sanitize context to match data
+   sanitize( context );
 
// Remove matching context from the left
left = 0;
diff --git a/src/dm/lineardata/ve.dm.ElementLinearData.js 
b/src/dm/lineardata/ve.dm.ElementLinearData.js
index d687070..3d3cce2 100644
--- a/src/dm/lineardata/ve.dm.ElementLinearData.js
+++ b/src/dm/lineardata/ve.dm.ElementLinearData.js
@@ -1021,9 +1021,9 @@
  * @param {boolean} [rules.allowBreaks] Allow  line breaks, otherwise the 
node will be split
  * @param {boolean} [rules.preserveHtmlWhitespace] Preserve non-semantic HTML 
whitespace
  * @param {boolean} [rules.nodeSanitization] Apply per-type node sanitizations 
via ve.dm.Node#sanitize
- * @param {boolean} [keepEmptyContentBranches=false] Preserve empty content 
branch nodes
+ * @param {boolean} [rules.keepEmptyContentBranches] Preserve empty content 
branch nodes
  */
-ve.dm.ElementLinearData.prototype.sanitize = function ( rules, 
keepEmptyContentBranches ) {
+ve.dm.ElementLinearData.prototype.sanitize = function ( rules ) {
var i, len, annotations, emptySet, setToRemove, type,
canContainContent, contentElement, isOpen, nodeClass, ann, 
oldHash,
store = this.getStore(),
@@ -1098,7 +1098,7 @@
 
// If a node is empty but can contain content, then 
just remove it
if (
-   !keepEmptyContentBranches &&
+   !rules.keepEmptyContentBranches &&
i > 0 && !isOpen && this.isOpenElementData( i - 
1 ) &&
canContainContent
) {
diff --git a/src/dm/ve.dm.Document.js b/src/dm/ve.dm.Document.js
index 0e7201f..bc6b3a8 100644
--- a/src/dm/ve.dm.Document.js
+++ 

[MediaWiki-commits] [Gerrit] mediawiki...TemplateStyles[master]: Remove 'UnitTestList' hook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'UnitTestList' hook
..


Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Change-Id: I03f1d1ea345a43685397e106fc5e27e1c2436f70
---
M TemplateStyles.hooks.php
M extension.json
2 files changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/TemplateStyles.hooks.php b/TemplateStyles.hooks.php
index 717ae88..ccb0c4a 100644
--- a/TemplateStyles.hooks.php
+++ b/TemplateStyles.hooks.php
@@ -15,16 +15,6 @@
return true;
}
 
-   /**
-* Add phpunit tests
-*
-* @param array &$files List of phpunit test files
-*/
-   public static function onUnitTestsList( &$files ) {
-   $files[] = __DIR__ . '/tests/phpunit/';
-   return true;
-   }
-
private static function decodeFromBlob( $blob ) {
$tree = gzdecode( $blob );
if ( $tree ) {
diff --git a/extension.json b/extension.json
index dd96bae..317006b 100644
--- a/extension.json
+++ b/extension.json
@@ -36,9 +36,6 @@
],
"OutputPageParserOutput": [
"TemplateStylesHooks::onOutputPageParserOutput"
-   ],
-   "UnitTestsList": [
-   "TemplateStylesHooks::onUnitTestsList"
]
},
"config": {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove 'UnitTestList' hook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'UnitTestList' hook
..


Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Change-Id: I77099ef4e659d269450c0ddb1a44e009f5406d09
---
M extension.json
M includes/CollaborationKit.php
R tests/phpunit/CollaborationHubContentHandlerTest.php
R tests/phpunit/CollaborationHubContentTest.php
4 files changed, 0 insertions(+), 26 deletions(-)

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



diff --git a/extension.json b/extension.json
index 69a0434..71f5912 100644
--- a/extension.json
+++ b/extension.json
@@ -34,9 +34,6 @@
"CreateCollaborationHub": "SpecialCreateCollaborationHub"
},
"Hooks": {
-   "UnitTestsList": [
-   "CollaborationKitHooks::onUnitTestsList"
-   ],
"ParserFirstCallInit": [
"CollaborationKitHooks::onParserFirstCallInit"
],
diff --git a/includes/CollaborationKit.php b/includes/CollaborationKit.php
index 5d332ac..241af8e 100644
--- a/includes/CollaborationKit.php
+++ b/includes/CollaborationKit.php
@@ -3,29 +3,6 @@
 // Hooks and crap
 class CollaborationKitHooks {
 
-   /**
-* Register our tests with PHPUnit
-*
-* Shamelessly stolen from MassMessage
-*
-* @param &$files Array List of files for PHPUnit
-*/
-   public static function onUnitTestsList( &$files ) {
-   $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . 
'/../tests/' );
-
-   /**
-* @var SplFileInfo $fileInfo
-*/
-   $ourFiles = [];
-   foreach ( new RecursiveIteratorIterator( $directoryIterator ) 
as $fileInfo ) {
-   if ( substr( $fileInfo->getFilename(), -8 ) === 
'Test.php' ) {
-   $ourFiles[] = $fileInfo->getPathname();
-   }
-   }
-
-   $files = array_merge( $files, $ourFiles );
-   }
-
public static function onParserFirstCallInit( $parser ) {
$parser->setFunctionHook( 'transcludelist', 
'CollaborationListContent::transcludeHook' );
// Hack for transclusion.
diff --git a/tests/CollaborationHubContentHandlerTest.php 
b/tests/phpunit/CollaborationHubContentHandlerTest.php
similarity index 100%
rename from tests/CollaborationHubContentHandlerTest.php
rename to tests/phpunit/CollaborationHubContentHandlerTest.php
diff --git a/tests/CollaborationHubContentTest.php 
b/tests/phpunit/CollaborationHubContentTest.php
similarity index 100%
rename from tests/CollaborationHubContentTest.php
rename to tests/phpunit/CollaborationHubContentTest.php

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Rewrite TOCWidget based on Linker::generateTOC

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Rewrite TOCWidget based on Linker::generateTOC
..


Rewrite TOCWidget based on Linker::generateTOC

Use the new node cache to find headings.

Change-Id: I5eb75c5db5ca466fd6f16a57c693c2a4458cff7c
---
M extension.json
M modules/ve-mw/ce/nodes/ve.ce.MWHeadingNode.js
M modules/ve-mw/dm/nodes/ve.dm.MWHeadingNode.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
D modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css
D modules/ve-mw/ui/widgets/ve.ui.MWTocItemWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js
7 files changed, 122 insertions(+), 293 deletions(-)

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



diff --git a/extension.json b/extension.json
index 5a51d3d..7a1e53e 100644
--- a/extension.json
+++ b/extension.json
@@ -1131,7 +1131,6 @@

"modules/ve-mw/ui/datatransferhandlers/ve.ui.MWWikitextStringTransferHandler.js",

"modules/ve-mw/ui/widgets/ve.ui.MWAceEditorWidget.js",

"modules/ve-mw/ui/widgets/ve.ui.MWTargetWidget.js",
-   
"modules/ve-mw/ui/widgets/ve.ui.MWTocItemWidget.js",
"modules/ve-mw/ui/widgets/ve.ui.MWTocWidget.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWExtensionDialog.js",

"modules/ve-mw/ui/dialogs/ve.ui.MWExtensionPreviewDialog.js",
@@ -1156,7 +1155,6 @@

"modules/ve-mw/ui/styles/elements/ve.ui.MWExpandableErrorElement.css",

"modules/ve-mw/ui/styles/tools/ve.ui.MWPopupTool.css",

"modules/ve-mw/ui/styles/widgets/ve.ui.MWAceEditorWidget.css",
-   
"modules/ve-mw/ui/styles/widgets/ve.ui.MWTocWidget.css",

"modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css"
],
"skinStyles": {
diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWHeadingNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWHeadingNode.js
index 8154c21..6ff5bb7 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWHeadingNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWHeadingNode.js
@@ -14,9 +14,12 @@
  * @param {ve.dm.MWHeadingNode} model Model to observe
  * @param {Object} [config] Configuration options
  */
-ve.ce.MWHeadingNode = function VeCeMWHeadingNode( model, config ) {
+ve.ce.MWHeadingNode = function VeCeMWHeadingNode() {
// Parent constructor
-   ve.ce.HeadingNode.call( this, model, config );
+   ve.ce.MWHeadingNode.super.apply( this, arguments );
+
+   // Events
+   this.model.connect( this, { update: 'onUpdate' } );
 };
 
 /* Inheritance */
@@ -45,9 +48,24 @@
this.rebuildToc();
 };
 
+ve.ce.MWHeadingNode.prototype.onUpdate = function () {
+   var surface = this.surface,
+   node = this;
+
+   if ( surface && surface.mwTocWidget ) {
+   surface.getModel().getDocument().once( 'transact', function () {
+   surface.mwTocWidget.updateNode( node );
+   } );
+   }
+};
+
 ve.ce.MWHeadingNode.prototype.rebuildToc = function () {
-   if ( this.surface && this.surface.mwTocWidget ) {
-   this.surface.mwTocWidget.rebuild();
+   var surface = this.surface;
+
+   if ( surface && surface.mwTocWidget ) {
+   surface.getModel().getDocument().once( 'transact', function () {
+   surface.mwTocWidget.rebuild();
+   } );
}
 };
 
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWHeadingNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWHeadingNode.js
index 709aacc..f124425 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWHeadingNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWHeadingNode.js
@@ -17,7 +17,7 @@
  */
 ve.dm.MWHeadingNode = function VeDmMWHeadingNode() {
// Parent constructor
-   ve.dm.HeadingNode.apply( this, arguments );
+   ve.dm.MWHeadingNode.super.apply( this, arguments );
 };
 
 /* Inheritance */
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index 99db24a..f4cb219 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -707,7 +707,8 @@
  * @inheritdoc
  */
 ve.init.mw.DesktopArticleTarget.prototype.surfaceReady = function () {
-   var surfaceReadyTime = ve.now(),
+   var surface = this.getSurface(),
+   surfaceReadyTime = ve.now(),
target = this;
 
if ( !this.activating ) {
@@ -720,18 +721,19 @@
 
// TODO: mwTocWidget should probably live in a ve.ui.MWSurface subclass
if ( mw.config.get( 'wgVisualEditorConfig' ).enableTocWidget ) 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Make ArticleTarget#goToHeading work at all times

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make ArticleTarget#goToHeading work at all times
..


Make ArticleTarget#goToHeading work at all times

Was previously written to work on initialise when the surface
isn't focused. If the surface is focused, run immediately.

Change-Id: Ie7accd63a4ca3e18448914d34609fe0418f15b4e
---
M modules/ve-mw/init/ve.init.mw.ArticleTarget.js
1 file changed, 11 insertions(+), 4 deletions(-)

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



diff --git a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js 
b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
index 92cbca3..88fdd32 100644
--- a/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
+++ b/modules/ve-mw/init/ve.init.mw.ArticleTarget.js
@@ -1637,15 +1637,22 @@
offset = surfaceModel.getDocument().data.getNearestContentOffset(
offsetNode.getModel().getOffset(), 1
);
-   // onDocumentFocus is debounced, so wait for that to happen before 
setting
-   // the model selection, otherwise it will get reset
-   surfaceView.once( 'focus', function () {
+
+   function scrollAndSetSelection() {
surfaceModel.setLinearSelection( new ve.Range( offset ) );
// Focussing the document triggers showSelection which calls 
scrollIntoView
// which uses a jQuery animation, so make sure this is aborted.
$( OO.ui.Element.static.getClosestScrollableContainer( 
surfaceView.$element[ 0 ] ) ).stop( true );
target.scrollToHeading( headingNode );
-   } );
+   }
+
+   if ( surfaceView.isFocused() ) {
+   scrollAndSetSelection();
+   } else {
+   // onDocumentFocus is debounced, so wait for that to happen 
before setting
+   // the model selection, otherwise it will get reset
+   surfaceView.once( 'focus', scrollAndSetSelection );
+   }
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie7accd63a4ca3e18448914d34609fe0418f15b4e
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: let gerrit2 user write to config dir

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: gerrit: let gerrit2 user write to config dir
..


gerrit: let gerrit2 user write to config dir

follow-up to change: Ibc68a44c7338

Besides being allowed to write to the config files,
the user also needs to be allowed to write to the "etc" dir
itself.

Change-Id: Ibf7dbc047763fc1dc31506b35e8c6275fa3b22bf
---
M modules/gerrit/manifests/jetty.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index ed82d30..6b5eed2 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -70,7 +70,7 @@
 recurse => remote,
 owner   => 'gerrit2',
 group   => 'gerrit2',
-mode=> '0444',
+mode=> '0644',
 source  => 'puppet:///modules/gerrit/etc',
 require => File['/var/lib/gerrit2/review_site'],
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf7dbc047763fc1dc31506b35e8c6275fa3b22bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Prevent duplicate thank-you-edit notifications

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Prevent duplicate thank-you-edit notifications
..


Prevent duplicate thank-you-edit notifications

Avoid duplicate by looking if the notification
already exist.

Change-Id: Ie519d13cd0ab03919f70da90d58c82a214c74b49
Depends-On: I79194c41d6b2fd84ad658909a2941d9d3d28d94e
Bug: T128249
---
M Hooks.php
M autoload.php
A tests/phpunit/ThankYouEditTest.php
3 files changed, 78 insertions(+), 20 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 9d94c5f..552f80a 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -503,28 +503,27 @@
// test for them reaching a congratulatory threshold
$thresholds = [ 1, 10, 100, 1000, 1, 10, 100 ];
if ( $user->isLoggedIn() && $status->value['revision'] ) {
-   // This edit hasn't been added to the edit count yet
-   $thresholdCount = $user->getEditCount() + 1;
+   $thresholdCount = $user->getEditCount();
if ( in_array( $thresholdCount, $thresholds ) ) {
-   $id = $user->getId();
-   DeferredUpdates::addCallableUpdate( function () 
use ( $id, $title, $thresholdCount ) {
-   // Fresh User object
-   $user = User::newFromId( $id );
-   $userEditCount = $user->getEditCount();
-   if ( (int)$userEditCount !== 
(int)$thresholdCount ) {
-   // Race condition with multiple 
simultaneous requests, skip
-   LoggerFactory::getInstance( 
'Echo' )->debug(
-   'thank-you-edit race 
condition detected: {user} (id: {id}) should ' .
-   'have had 
{expectedCount} edits but has {actualCount}',
-   array(
-   'user' => 
$user->getName(),
-   'id' => 
$user->getId(),
-   'expectedCount' 
=> $thresholdCount,
-   'actualCount' 
=> $userEditCount,
-   )
-   );
-   return;
+   DeferredUpdates::addCallableUpdate( function () 
use ( $user, $title, $thresholdCount ) {
+
+   $notificationMapper = new 
EchoNotificationMapper();
+   $notifications = 
$notificationMapper->fetchByUser( $user, 10, null, array( 'thank-you-edit' ) );
+   /** @var EchoNotification $notification 
*/
+   foreach ( $notifications as 
$notification ) {
+   if ( 
$notification->getEvent()->getExtraParam( 'editCount' ) === $thresholdCount ) {
+   
LoggerFactory::getInstance( 'Echo' )->debug(
+   '{user} (id: 
{id}) has already been thanked for their {count} edit',
+   array(
+   'user' 
=> $user->getName(),
+   'id' => 
$user->getId(),
+   'count' 
=> $thresholdCount,
+   )
+   );
+   return;
+   }
}
+
LoggerFactory::getInstance( 'Echo' 
)->debug(
'Thanking {user} (id: {id}) for 
their {count} edit',
array(
diff --git a/autoload.php b/autoload.php
index 152db8e..5892758 100644
--- a/autoload.php
+++ b/autoload.php
@@ -105,6 +105,7 @@
'MWEchoEventLogging' => __DIR__ . '/includes/EventLogging.php',
'MWEchoNotifUser' => __DIR__ . '/includes/NotifUser.php',
'MWEchoNotifUserTest' => __DIR__ . '/tests/phpunit/NotifUserTest.php',
+   'MWEchoThankYouEditTest' => __DIR__ . 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Keep $user->mEditCount up to date

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Keep $user->mEditCount up to date
..


Keep $user->mEditCount up to date

Whenever User::incEditCount() is called,
this tries to keep the user object up
to date so hooks can read the edit count
without reloading the user from the db.

Another option would be invalidate the
instance cache and let the read
repopulate it. It would add a db access
on each edit.

Bug: T128249
Change-Id: I79194c41d6b2fd84ad658909a2941d9d3d28d94e
---
M includes/user/User.php
M tests/phpunit/includes/user/UserTest.php
2 files changed, 52 insertions(+), 6 deletions(-)

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



diff --git a/includes/user/User.php b/includes/user/User.php
index c46836b..8d3fcea 100644
--- a/includes/user/User.php
+++ b/includes/user/User.php
@@ -5161,12 +5161,20 @@
// If we actually have a slave server, the 
count is
// at least one behind because the current 
transaction
// has not been committed and replicated.
-   $this->initEditCount( 1 );
+   $this->mEditCount = $this->initEditCount( 1 );
} else {
// But if DB_SLAVE is selecting the master, 
then the
// count we just read includes the revision 
that was
// just added in the working transaction.
-   $this->initEditCount();
+   $this->mEditCount = $this->initEditCount();
+   }
+   } else {
+   if ( $this->mEditCount === null ) {
+   $this->getEditCount();
+   $dbr = wfGetDB( DB_SLAVE );
+   $this->mEditCount += ( $dbr !== $dbw ) ? 1 : 0;
+   } else {
+   $this->mEditCount++;
}
}
// Edit count in user cache too
diff --git a/tests/phpunit/includes/user/UserTest.php 
b/tests/phpunit/includes/user/UserTest.php
index beb5e78..bd076ba 100644
--- a/tests/phpunit/includes/user/UserTest.php
+++ b/tests/phpunit/includes/user/UserTest.php
@@ -212,7 +212,7 @@
 * @group medium
 * @covers User::getEditCount
 */
-   public function testEditCount() {
+   public function testGetEditCount() {
$user = $this->getMutableTestUser()->getUser();
 
// let the user have a few (3) edits
@@ -221,17 +221,15 @@
$page->doEdit( (string)$i, 'test', 0, false, $user );
}
 
-   $user->clearInstanceCache();
$this->assertEquals(
3,
$user->getEditCount(),
'After three edits, the user edit count should be 3'
);
 
-   // increase the edit count and clear the cache
+   // increase the edit count
$user->incEditCount();
 
-   $user->clearInstanceCache();
$this->assertEquals(
4,
$user->getEditCount(),
@@ -240,6 +238,46 @@
}
 
/**
+* Test User::editCount
+* @group medium
+* @covers User::getEditCount
+*/
+   public function testGetEditCountForAnons() {
+   $user = User::newFromName( 'Anonymous' );
+
+   $this->assertNull(
+   $user->getEditCount(),
+   'Edit count starts null for anonymous users.'
+   );
+
+   $user->incEditCount();
+
+   $this->assertNull(
+   $user->getEditCount(),
+   'Edit count remains null for anonymous users despite 
calls to increase it.'
+   );
+   }
+
+   /**
+* Test User::editCount
+* @group medium
+* @covers User::incEditCount
+*/
+   public function testIncEditCount() {
+   $user = $this->getMutableTestUser()->getUser();
+   $user->incEditCount();
+
+   $reloadedUser = User::newFromId( $user->getId() );
+   $reloadedUser->incEditCount();
+
+   $this->assertEquals(
+   2,
+   $reloadedUser->getEditCount(),
+   'Increasing the edit count after a fresh load leaves 
the object up to date.'
+   );
+   }
+
+   /**
 * Test changing user options.
 * @covers User::setOption
 * @covers User::getOption

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Trace time spent in the PEG tokenizer

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Trace time spent in the PEG tokenizer
..


Trace time spent in the PEG tokenizer

Change-Id: I6462bcf21a18d2f7a4e2065a2ad93f010cda87ee
---
M lib/wt2html/tokenizer.js
1 file changed, 18 insertions(+), 3 deletions(-)

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



diff --git a/lib/wt2html/tokenizer.js b/lib/wt2html/tokenizer.js
index 20f0d5d..ba7138f 100644
--- a/lib/wt2html/tokenizer.js
+++ b/lib/wt2html/tokenizer.js
@@ -48,6 +48,9 @@
 function PegTokenizer(env, options) {
events.EventEmitter.call(this);
this.env = env;
+   // env can be null during code linting
+   var traceFlags = env ? env.conf.parsoid.traceFlags : null;
+   this.traceTime = traceFlags && traceFlags.indexOf('time') !== -1;
this.options = options || {};
this.offsets = {};
 }
@@ -245,6 +248,18 @@
this._processText(text, true);
 };
 
+PegTokenizer.prototype._tokenize = function(text, args) {
+   var start;
+   if (this.traceTime) {
+   start = new Date();
+   }
+   var ret = this.tokenizer.parse(text, args);
+   if (this.traceTime) {
+   this.env.bumpTimeUse("PEG", (new Date() - start));
+   }
+   return ret;
+};
+
 /*
  * The main worker. Sets up event emission ('chunk' and 'end' events).
  * Consumers are supposed to register with PegTokenizer before calling
@@ -277,7 +292,7 @@
if (fullParse) {
args.startRule = "start";
try {
-   this.tokenizer.parse(text, args);
+   this._tokenize(text, args);
} catch (e) {
this.env.log("fatal", e);
return;
@@ -307,7 +322,7 @@
};
 
try {
-   iterator = this.tokenizer.parse(text, args);
+   iterator = this._tokenize(text, args);
} catch (e) {
this.env.log("fatal", e);
return;
@@ -348,7 +363,7 @@
sol: sol,
};
}
-   var retToks = this.tokenizer.parse(text, args);
+   var retToks =  this._tokenize(text, args);
 
if (Array.isArray(retToks) && retToks.length > 0) {
toks = JSUtils.pushArray(toks, retToks);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6462bcf21a18d2f7a4e2065a2ad93f010cda87ee
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Enable local bundles on mobile

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable local bundles on mobile
..


Enable local bundles on mobile

Have the 'bundle' param always
controlled by the controller
instead of configured in the
API.

Change-Id: I08fb7c515f1af28fc01073702b552624cc14f2f0
---
M modules/api/mw.echo.api.EchoApi.js
M modules/controller/mw.echo.Controller.js
M modules/ext.echo.init.js
M modules/special/ext.echo.special.js
4 files changed, 12 insertions(+), 9 deletions(-)

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



diff --git a/modules/api/mw.echo.api.EchoApi.js 
b/modules/api/mw.echo.api.EchoApi.js
index 0da699d..a2d219f 100644
--- a/modules/api/mw.echo.api.EchoApi.js
+++ b/modules/api/mw.echo.api.EchoApi.js
@@ -16,7 +16,6 @@
this.fetchingPromise = null;
this.limit = config.limit || 25;
this.fetchingPrioritizer = new mw.echo.api.PromisePrioritizer();
-   this.bundle = !!config.bundle;
};
 
OO.initClass( mw.echo.api.EchoApi );
@@ -100,6 +99,7 @@
 *  state, 'all', 'read' or 'unread'
 * @param {boolean} [filterObject.unreadFirst] Fetch unread 
notifications
 *  first in the sorting order.
+* @param {boolean} [filterObject.bundle] Bundle local notifications
 * @param {string|string[]} [filterObject.titles] Requested titles. To 
request notifications with no title,
 *  use null (standalone or as an array element).
 * @return {Object} API parameter definitions to override
@@ -110,14 +110,16 @@
 
filterObject = filterObject || {};
 
-   overrideParams.notbundle = this.bundle;
-
if ( filterObject.continue ) {
overrideParams.notcontinue = filterObject.continue;
}
 
if ( filterObject.unreadFirst ) {
overrideParams.notunreadfirst = 1;
+   }
+
+   if ( filterObject.bundle ) {
+   overrideParams.notbundle = 1;
}
 
if ( filterObject.readState && filterObject.readState !== 'all' 
) {
@@ -203,11 +205,12 @@
 *
 * @param {string[]} sourceArray An array of sources to fetch from the 
group
 * @param {string} type Notification type
+* @param {boolean} bundle Bundle local notifications
 * @return {jQuery.Promise} A promise that resolves with an object that 
maps wiki
 *  names to an array of their items' API data objects.
 */
-   mw.echo.api.EchoApi.prototype.fetchNotificationGroups = function ( 
sourceArray, type ) {
-   var overrideParams = { notbundle: this.bundle, 
notcrosswikisummary: false };
+   mw.echo.api.EchoApi.prototype.fetchNotificationGroups = function ( 
sourceArray, type, bundle ) {
+   var overrideParams = { notcrosswikisummary: false, notbundle: 
bundle };
return this.network.getApiHandler( 'local' 
).fetchNotifications( type, sourceArray, true, overrideParams )
.then( function ( result ) {
var i,
diff --git a/modules/controller/mw.echo.Controller.js 
b/modules/controller/mw.echo.Controller.js
index 3544e1d..ff9cae8 100644
--- a/modules/controller/mw.echo.Controller.js
+++ b/modules/controller/mw.echo.Controller.js
@@ -253,7 +253,7 @@
// between local notifications and x-wiki notifications
// until the backend gives us the x-wiki notifications as
// part of the original response.
-   return this.api.fetchNotifications( 
this.manager.getTypeString(), 'local', !!isForced, { unreadFirst: true } /* 
filters */ )
+   return this.api.fetchNotifications( 
this.manager.getTypeString(), 'local', !!isForced, { unreadFirst: true, bundle: 
true } /* filters */ )
.then(
// Success
function ( data ) {
@@ -521,7 +521,7 @@
return $.Deferred().reject().promise();
}
 
-   return this.api.fetchNotificationGroups( 
xwikiModel.getSourceNames(), this.manager.getTypeString() )
+   return this.api.fetchNotificationGroups( 
xwikiModel.getSourceNames(), this.manager.getTypeString(), true )
.then(
function ( groupList ) {
var i, notifData, listModel, group, 
groupItems,
diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index 1b925a8..29b78d3 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -43,7 +43,7 @@
$( this ).addClass( 
'mw-echo-notifications-badge-dimmed' );
 
// Fire the notification API requests
-   echoApi = new 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Cleanup of IP throttles

2016-08-05 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review.

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

Change subject: Cleanup of IP throttles
..

Cleanup of IP throttles

Removed expired events from the list.

Change-Id: Id436263aaca49ece971f7e59cafc161ad507f1e1
---
M wmf-config/throttle.php
1 file changed, 0 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/mediawiki-config 
refs/changes/12/303312/2

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index d41112b..e365dc3 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -28,14 +28,6 @@
 # ];
 ## Add throttling definitions below.
 
-$wmgThrottlingExceptions[] = [ // T141421 - Meetup Women Archivists Roundtable 
Edit-a-thon
-   'from'   => '2016-08-03T07:00 +0:00',
-   'to' => '2016-08-03T10:00 +0:00',
-   'IP' => '38.101.231.254',
-   'dbname' => [ 'enwiki', 'commonswiki' ],
-   'value'  => 120 // 90 expected
-];
-
 ## Add throttling definitions above.
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id436263aaca49ece971f7e59cafc161ad507f1e1
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
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...Echo[master]: mw.echo.badge: Use 'color: transparent' rather than 'font-si...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mw.echo.badge: Use 'color: transparent' rather than 'font-size: 
0' to hide text
..


mw.echo.badge: Use 'color: transparent' rather than 'font-size: 0' to hide text

It's a lot easier to set 'color' back to the desired value than 'font-size'.

As an amusing side-effect, the hidden text will appear when selected, and
it will be possible to copy it.

Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7
---
M modules/nojs/mw.echo.badge.less
1 file changed, 3 insertions(+), 10 deletions(-)

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



diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index e9dde42..3d082d4 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -10,9 +10,10 @@
width: 30px;
height: 24px;
top: -5px;
-   font-size: 0;
cursor: pointer;
text-decoration: none;
+   // Hide the text, but keep accessible for screen-readers
+   color: transparent;
 
&:hover,
&:active,
@@ -46,15 +47,7 @@
cursor: pointer;
top: 10px;
left: 40%;
-   // The original font-size was 12px, we had
-   // to override it in the parent so the original
-   // number is hidden, so we rewrite it here. This
-   // is far from perfect, but it will make sure
-   // that screen-readers can still see the number that
-   // is outputted in the original  link while letting
-   // us style the boxed number the way we want to.
-   // We want 0.8em of the original 12px font size
-   font-size: 12px * 0.8;
+   font-size: 0.8em;
font-weight: bold;
padding: 0 0.3em;
border: 1px solid white;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7a7ef8e60f514743c9cb65bcef3ba4e869f5b7b7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mooeypoo 
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]: Simplify ChangeOpStatement implementation

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Simplify ChangeOpStatement implementation
..


Simplify ChangeOpStatement implementation

Main advantage is that the $this->index and $summary variables are not
passed around any more. They are defined and used in a single place.

Change-Id: I400e9a6e37899acd2b112a50459c94eebc2c373c
---
M repo/includes/ChangeOp/ChangeOpStatement.php
1 file changed, 7 insertions(+), 19 deletions(-)

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



diff --git a/repo/includes/ChangeOp/ChangeOpStatement.php 
b/repo/includes/ChangeOp/ChangeOpStatement.php
index 37b3042..abb7019 100644
--- a/repo/includes/ChangeOp/ChangeOpStatement.php
+++ b/repo/includes/ChangeOp/ChangeOpStatement.php
@@ -112,17 +112,20 @@
}
 
$this->validateStatementGuid( $entityId );
+   $oldIndex = $this->removeStatement( $entity->getStatements() );
 
if ( $this->index !== null ) {
if ( !( $entity instanceof StatementListHolder ) ) {
throw new ChangeOpException( 'Setting an index 
is not supported on this entity type' );
}
 
-   $this->applyStatementToEntity( $entity, $summary );
+   $statements = $this->addStatementToGroup( 
$entity->getStatements(), $this->index );
+   $entity->setStatements( new StatementList( $statements 
) );
} else {
-   $oldIndex = $this->removeStatement( 
$entity->getStatements(), $summary );
$entity->getStatements()->addStatement( 
$this->statement, $oldIndex );
}
+
+   $this->updateSummary( $summary, $oldIndex === null ? 'create' : 
'update' );
}
 
/**
@@ -143,23 +146,11 @@
}
 
/**
-* @param StatementListHolder $entity
-* @param Summary|null $summary
-*/
-   private function applyStatementToEntity( StatementListHolder $entity, 
Summary $summary = null ) {
-   $oldIndex = $this->removeStatement( $entity->getStatements(), 
$summary );
-   $newIndex = $this->index !== null ? $this->index : $oldIndex;
-   $statements = $this->addStatementToGroup( 
$entity->getStatements(), $newIndex );
-   $entity->setStatements( new StatementList( $statements ) );
-   }
-
-   /**
 * @param StatementList $statements
-* @param Summary|null $summary
 *
 * @return int|null
 */
-   private function removeStatement( StatementList $statements, Summary 
$summary = null ) {
+   private function removeStatement( StatementList $statements ) {
$guid = $this->statement->getGuid();
$oldIndex = null;
$oldStatement = null;
@@ -173,11 +164,8 @@
}
}
 
-   if ( $oldStatement === null ) {
-   $this->updateSummary( $summary, 'create' );
-   } else {
+   if ( $oldStatement !== null ) {
$this->checkMainSnakUpdate( $oldStatement );
-   $this->updateSummary( $summary, 'update' );
}
 
return $oldIndex;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I400e9a6e37899acd2b112a50459c94eebc2c373c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
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...Echo[master]: mw.echo.badge: Use 'background-image' rather than 'content'

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mw.echo.badge: Use 'background-image' rather than 'content'
..


mw.echo.badge: Use 'background-image' rather than 'content'

I think everything works the same. Some older browsers (IE 10-11,
Opera 12) have funny issues with SVGs in 'content'.

.mw-echo-notifications-badge now has 'height: 24px', as it must be
at least as high as the background to display it. We no longer need
.oo-ui-popupWidget to have 'margin-top: 7px', that was a workaround
for the badge having smaller dimensions in CSS than in reality.

This also allows us to significantly reduce the amount of Monobook-
specific CSS, because we now use the background-image approach for
all skins.

Bug: T142042
Bug: T142248
Change-Id: Iaa22202dbd5b5eb7a9b1ef47d068e80764ed982f
---
M modules/nojs/mw.echo.badge.less
M modules/nojs/mw.echo.badge.monobook.less
2 files changed, 10 insertions(+), 23 deletions(-)

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



diff --git a/modules/nojs/mw.echo.badge.less b/modules/nojs/mw.echo.badge.less
index 7e85883..e9dde42 100644
--- a/modules/nojs/mw.echo.badge.less
+++ b/modules/nojs/mw.echo.badge.less
@@ -8,6 +8,7 @@
position: relative;
display: block;
width: 30px;
+   height: 24px;
top: -5px;
font-size: 0;
cursor: pointer;
@@ -30,11 +31,12 @@
display: inline-block;
cursor: pointer;
opacity: 0.8;
+   content: '';
+   background-repeat: no-repeat;
left: 0;
-
-   // Prevent IE from making the icon ridiculously big 
(T142042)
-   width: 24px;
-   height: 24px;
+   top: 0;
+   width: 100%;
+   height: 100%;
}
 
// Counter
@@ -62,12 +64,9 @@
color: white;
}
 
-   + .oo-ui-popupWidget {
-   margin-top: 7px;
-   }
-
&.mw-echo-notifications-badge-all-read {
opacity: 0.625;
+
&::after {
visibility: hidden;
}
@@ -77,14 +76,14 @@
#pt-notifications-alert & {
&:before {
/* @embed */
-   content: url('../icons/bell.svg');
+   background-image: url('../icons/bell.svg');
}
}
 
#pt-notifications-notice & {
&:before {
/* @embed */
-   content: url('../icons/tray.svg');
+   background-image: url('../icons/tray.svg');
}
}
 }
diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 7e1b2ba..9952670 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -6,28 +6,16 @@
#pt-notifications-notice &,
#pt-notifications-alert & {
width: 20px;
+   height: 16px;
top: -7px;
 
&:before {
background-size: 16px 16px;
-   width: 16px;
-   height: 16px;
-   content: "";
}
 
&:after {
top: 5px;
}
-   }
-
-   #pt-notifications-notice &:before {
-   /* @embed */
-   background-image: url('../icons/tray.svg');
-   }
-
-   #pt-notifications-alert &:before {
-   /* @embed */
-   background-image: url('../icons/bell.svg');
}
 
&.oo-ui-flaggedElement-unseen,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaa22202dbd5b5eb7a9b1ef47d068e80764ed982f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Etonkovidova 
Gerrit-Reviewer: Mooeypoo 
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...UploadWizard[master]: mw.UploadWizardUpload: Catch IE's "Not enough storage is ava...

2016-08-05 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: mw.UploadWizardUpload: Catch IE's "Not enough storage is 
available" exceptions
..

mw.UploadWizardUpload: Catch IE's "Not enough storage is available" exceptions

Detect this failure and fall back to generating the thumbnail server-side.

Bug: T136235
Change-Id: I07a70803df6bff62bd47081b9ea910051f52afb7
---
M resources/mw.UploadWizardUpload.js
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/resources/mw.UploadWizardUpload.js 
b/resources/mw.UploadWizardUpload.js
index 0cb9e59..d38cf70 100644
--- a/resources/mw.UploadWizardUpload.js
+++ b/resources/mw.UploadWizardUpload.js
@@ -1198,7 +1198,13 @@
image.onerror = function () {
deferred.reject();
};
-   image.src = url;
+   try {
+   image.src = url;
+   } catch ( er ) {
+   // On Internet Explorer 10-11 and Edge, this 
occassionally causes an exception like
+   // "Not enough storage is available to complete this 
operation". (T136239)
+   deferred.reject();
+   }
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix inconsistent RevDelFileItem visibilities

2016-08-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fix inconsistent RevDelFileItem visibilities
..

Fix inconsistent RevDelFileItem visibilities

Bug: T142228
Change-Id: Ib5a0a1adbea2daf2b035cf6be367841362de03cc
---
M includes/revisiondelete/RevDelArchivedFileItem.php
M includes/revisiondelete/RevDelFileItem.php
2 files changed, 4 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/303310/1

diff --git a/includes/revisiondelete/RevDelArchivedFileItem.php 
b/includes/revisiondelete/RevDelArchivedFileItem.php
index 39fb8ef..52df2e3 100644
--- a/includes/revisiondelete/RevDelArchivedFileItem.php
+++ b/includes/revisiondelete/RevDelArchivedFileItem.php
@@ -23,10 +23,8 @@
  * Item class for a filearchive table row
  */
 class RevDelArchivedFileItem extends RevDelFileItem {
-   /** @var RevDelArchivedFileList */
-   protected $list;
-   /** @var ArchivedFile */
-   protected $file;
+   /** @var $list RevDelArchivedFileList */
+   /** @var $file ArchivedFile */
/** @var LocalFile */
protected $lockFile;
 
diff --git a/includes/revisiondelete/RevDelFileItem.php 
b/includes/revisiondelete/RevDelFileItem.php
index 3a3b467..ff01cee 100644
--- a/includes/revisiondelete/RevDelFileItem.php
+++ b/includes/revisiondelete/RevDelFileItem.php
@@ -23,10 +23,10 @@
  * Item class for an oldimage table row
  */
 class RevDelFileItem extends RevDelItem {
-   /** @var OldLocalFile */
-   public $file;
/** @var RevDelFileList */
protected $list;
+   /** @var OldLocalFile */
+   protected $file;
 
public function __construct( $list, $row ) {
parent::__construct( $list, $row );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5a0a1adbea2daf2b035cf6be367841362de03cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Hack around browser bug in IE breaking badge alignment in Mo...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hack around browser bug in IE breaking badge alignment in 
Monobook
..


Hack around browser bug in IE breaking badge alignment in Monobook

A browser bug causes the badges to be pushed down by 1em in IE11
and below, but not in Edge. The only way I could find to work
around this was to add top:-1em; in IE browsers using CSS hacks.

Bug: T142053
Change-Id: If240f7281dd795085c003af524da294d5bf5ff76
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index f1aafb5..ab5e3ef 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -49,4 +49,17 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
+   position: relative;
+
+   // HACK for IE6-9 (T142053)
+   top: ~"-1em\9";
+}
+
+
+// HACK for IE10 and IE11 (T142053)
+@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
+   #p-personal #pt-notifications-alert,
+   #p-personal #pt-notifications-notice {
+   top: -1em;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If240f7281dd795085c003af524da294d5bf5ff76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fix check for non-template-namespace transclusions

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix check for non-template-namespace transclusions
..


Fix check for non-template-namespace transclusions

These are not just titles beginning with ':'

Change-Id: I9d7063c221561a0e582deb6944eaab6d9ab4e3f7
---
M modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js 
b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
index 72da8f3..1b020c9 100644
--- a/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
+++ b/modules/ve-mw/dm/models/ve.dm.MWTransclusionModel.js
@@ -250,6 +250,7 @@
/** */
ve.dm.MWTransclusionModel.prototype.fetch = function () {
var i, len, item, title, queue,
+   templateNamespaceId = mw.config.get( 'wgNamespaceIds' 
).template,
titles = [],
specs = {};
 
@@ -271,7 +272,10 @@
// Skip titles that don't have a 
resolvable href
title &&
// Skip titles outside the template 
namespace
-   title.charAt( 0 ) !== ':' &&
+   mw.Title.newFromText(
+   title,
+   templateNamespaceId
+   ).namespace === templateNamespaceId &&
// Skip already cached data
!hasOwn.call( specCache, title ) &&
// Skip duplicate titles in the same 
batch

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d7063c221561a0e582deb6944eaab6d9ab4e3f7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseMediaInfo[master]: Remove 'UnitTestList' hook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'UnitTestList' hook
..


Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Change-Id: I05d646201297fcea4a5440eac765251ca9ac64bf
---
M extension.json
M src/WikibaseMediaInfoHooks.php
M tests/phpunit/mediawiki/WikibaseMediaInfoHooksTest.php
3 files changed, 0 insertions(+), 25 deletions(-)

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



diff --git a/extension.json b/extension.json
index 5e2ab22..198d8d7 100644
--- a/extension.json
+++ b/extension.json
@@ -17,9 +17,6 @@
"WikibaseMediaInfoAlias": "WikibaseMediaInfo.i18n.alias.php"
},
"Hooks": {
-   "UnitTestsList": [
-   
"Wikibase\\MediaInfo\\WikibaseMediaInfoHooks::onUnitTestsList"
-   ],
"SetupAfterCache": [

"Wikibase\\MediaInfo\\WikibaseMediaInfoHooks::onSetupAfterCache"
],
diff --git a/src/WikibaseMediaInfoHooks.php b/src/WikibaseMediaInfoHooks.php
index 095c2e1..786e823 100644
--- a/src/WikibaseMediaInfoHooks.php
+++ b/src/WikibaseMediaInfoHooks.php
@@ -16,17 +16,6 @@
 class WikibaseMediaInfoHooks {
 
/**
-* Hook to add all tests, including those that depend on MediaWiki.
-*
-* @see https://www.mediawiki.org/wiki/Manual:Hooks/UnitTestsList
-*
-* @param string[] &$paths
-*/
-   public static function onUnitTestsList( array &$paths ) {
-   $paths[] = __DIR__ . '/../tests/phpunit/';
-   }
-
-   /**
 * Hook to register the MediaInfo entity namespaces for 
EntityNamespaceLookup.
 *
 * @param int[] $entityNamespacesSetting
diff --git a/tests/phpunit/mediawiki/WikibaseMediaInfoHooksTest.php 
b/tests/phpunit/mediawiki/WikibaseMediaInfoHooksTest.php
index bae53b4..c56af6c 100644
--- a/tests/phpunit/mediawiki/WikibaseMediaInfoHooksTest.php
+++ b/tests/phpunit/mediawiki/WikibaseMediaInfoHooksTest.php
@@ -16,17 +16,6 @@
  */
 class WikibaseMediaInfoHooksTest extends \PHPUnit_Framework_TestCase {
 
-   public function testOnUnitTestsList() {
-   $paths = [];
-
-   Hooks::run( 'UnitTestsList', [ &$paths ] );
-
-   $paths = array_map( 'realpath', $paths );
-   $expected = realpath( __DIR__ . '/../' );
-
-   $this->assertContains( $expected, $paths );
-   }
-
public function testOnWikibaseEntityNamespaces() {
global $wgNamespaceContentModels;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05d646201297fcea4a5440eac765251ca9ac64bf
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseMediaInfo
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialProtectedpages: Use LinkRenderer instead of Linker::l...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialProtectedpages: Use LinkRenderer instead of 
Linker::link()
..


SpecialProtectedpages: Use LinkRenderer instead of Linker::link()

And remove an unused variable while we're at it.

Change-Id: I494caccfff4fb0510f26554395150e59c728c5a1
---
M includes/specials/SpecialProtectedpages.php
1 file changed, 28 insertions(+), 7 deletions(-)

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



diff --git a/includes/specials/SpecialProtectedpages.php 
b/includes/specials/SpecialProtectedpages.php
index 54b471e..342509c 100644
--- a/includes/specials/SpecialProtectedpages.php
+++ b/includes/specials/SpecialProtectedpages.php
@@ -21,6 +21,8 @@
  * @ingroup SpecialPage
  */
 
+use MediaWiki\Linker\LinkRenderer;
+
 /**
  * A special page that lists protected pages
  *
@@ -59,7 +61,8 @@
$size,
$indefOnly,
$cascadeOnly,
-   $noRedirect
+   $noRedirect,
+   $this->getLinkRenderer()
);
 
$this->getOutput()->addHTML( $this->showOptions(
@@ -279,8 +282,27 @@
public $mForm, $mConds;
private $type, $level, $namespace, $sizetype, $size, $indefonly, 
$cascadeonly, $noredirect;
 
+   /**
+* @var LinkRenderer
+*/
+   private $linkRenderer;
+
+   /**
+* @param SpecialProtectedpages $form
+* @param array $conds
+* @param $type
+* @param $level
+* @param $namespace
+* @param string $sizetype
+* @param int $size
+* @param bool $indefonly
+* @param bool $cascadeonly
+* @param bool $noredirect
+* @param LinkRenderer $linkRenderer
+*/
function __construct( $form, $conds = [], $type, $level, $namespace,
-   $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = 
false, $noredirect = false
+   $sizetype = '', $size = 0, $indefonly = false, $cascadeonly = 
false, $noredirect = false,
+   LinkRenderer $linkRenderer
) {
$this->mForm = $form;
$this->mConds = $conds;
@@ -292,6 +314,7 @@
$this->indefonly = (bool)$indefonly;
$this->cascadeonly = (bool)$cascadeonly;
$this->noredirect = (bool)$noredirect;
+   $this->linkRenderer = $linkRenderer;
parent::__construct( $form->getContext() );
}
 
@@ -354,8 +377,6 @@
/** @var $row object */
$row = $this->mCurrentRow;
 
-   $formatted = '';
-
switch ( $field ) {
case 'log_timestamp':
// when timestamp is null, this is a old 
protection row
@@ -384,7 +405,7 @@
)
);
} else {
-   $formatted = Linker::link( $title );
+   $formatted = 
$this->linkRenderer->makeLink( $title );
}
if ( !is_null( $row->page_len ) ) {
$formatted .= 
$this->getLanguage()->getDirMark() .
@@ -401,9 +422,9 @@
$value, /* User preference timezone 
*/true ) );
$title = Title::makeTitleSafe( 
$row->page_namespace, $row->page_title );
if ( $this->getUser()->isAllowed( 'protect' ) 
&& $title ) {
-   $changeProtection = Linker::linkKnown(
+   $changeProtection = 
$this->linkRenderer->makeKnownLink(
$title,
-   $this->msg( 'protect_change' 
)->escaped(),
+   $this->msg( 'protect_change' 
)->text(),
[],
[ 'action' => 'unprotect' ]
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I494caccfff4fb0510f26554395150e59c728c5a1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Unify Special:Contribs/DeletedContribs subtitle implementation

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Unify Special:Contribs/DeletedContribs subtitle implementation
..


Unify Special:Contribs/DeletedContribs subtitle implementation

Basically all of the code was duplicated, except that Contribs had a
link to DeletedContribs, and DeletedContribs had a link to Contribs.

Now DeletedContribs will call the function in Contribs, and remove the
DeletedContribs link, and add its own link to Contribs instead of
needing to duplicate the entire list of links.

Change-Id: Ia004a4a69427fd5b554131b19b0e263523b7da67
---
M includes/specials/SpecialContributions.php
M includes/specials/SpecialDeletedContributions.php
2 files changed, 43 insertions(+), 105 deletions(-)

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



diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index ab46dda..0a98721 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -273,7 +273,7 @@
$talk = $userObj->getTalkPage();
$links = '';
if ( $talk ) {
-   $tools = $this->getUserLinks( $nt, $talk, $userObj );
+   $tools = self::getUserLinks( $this, $userObj );
$links = $this->getLanguage()->pipeList( $tools );
 
// Show a note if the user is blocked and display the 
last block log entry.
@@ -313,87 +313,93 @@
 
/**
 * Links to different places.
-* @param Title $userpage Target user page
-* @param Title $talkpage Talk page
+*
+* @note This function is also called in DeletedContributionsPage
+* @param SpecialPage $sp SpecialPage instance, for context
 * @param User $target Target user object
 * @return array
 */
-   public function getUserLinks( Title $userpage, Title $talkpage, User 
$target ) {
+   public static function getUserLinks( SpecialPage $sp, User $target ) {
 
$id = $target->getId();
$username = $target->getName();
+   $userpage = $target->getUserPage();
+   $talkpage = $target->getTalkPage();
 
-   $linkRenderer = $this->getLinkRenderer();
-   $tools[] = $linkRenderer->makeLink( $talkpage, $this->msg( 
'sp-contributions-talk' )->text() );
+   $linkRenderer = $sp->getLinkRenderer();
+   $tools['user-talk'] = $linkRenderer->makeLink(
+   $talkpage,
+   $sp->msg( 'sp-contributions-talk' )->text()
+   );
 
if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( 
$username ) ) ) {
-   if ( $this->getUser()->isAllowed( 'block' ) ) { # Block 
/ Change block / Unblock links
+   if ( $sp->getUser()->isAllowed( 'block' ) ) { # Block / 
Change block / Unblock links
if ( $target->isBlocked() && 
$target->getBlock()->getType() != Block::TYPE_AUTO ) {
-   $tools[] = 
$linkRenderer->makeKnownLink( # Change block link
+   $tools['block'] = 
$linkRenderer->makeKnownLink( # Change block link
SpecialPage::getTitleFor( 
'Block', $username ),
-   $this->msg( 'change-blocklink' 
)->text()
+   $sp->msg( 'change-blocklink' 
)->text()
);
-   $tools[] = 
$linkRenderer->makeKnownLink( # Unblock link
+   $tools['unblock'] = 
$linkRenderer->makeKnownLink( # Unblock link
SpecialPage::getTitleFor( 
'Unblock', $username ),
-   $this->msg( 'unblocklink' 
)->text()
+   $sp->msg( 'unblocklink' 
)->text()
);
} else { # User is not blocked
-   $tools[] = 
$linkRenderer->makeKnownLink( # Block link
+   $tools['block'] = 
$linkRenderer->makeKnownLink( # Block link
SpecialPage::getTitleFor( 
'Block', $username ),
-   $this->msg( 'blocklink' 
)->text()
+   $sp->msg( 'blocklink' )->text()
);
}
}
 
# Block log link
-   $tools[] = $linkRenderer->makeKnownLink(
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Show wgPageParseReport on page previews too

2016-08-05 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Show wgPageParseReport on page previews too
..

Show wgPageParseReport on page previews too

Also make EditPage::getPreviewLimitReport return the same
output instead of using copy-pasted code from the old hook.

Bug: T142210
Bug: T142214
Change-Id: I16c3c2da067fd24bf7ae564cb1d61beaa3be58c1
---
M includes/EditPage.php
M includes/OutputPage.php
2 files changed, 17 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/09/303309/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 674cf28..ee06993 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2714,8 +2714,9 @@
$wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 
'hiddencats' ],
Linker::formatHiddenCategories( 
$this->page->getHiddenCategories() ) ) );
 
-   $wgOut->addHTML( Html::rawElement( 'div', [ 'class' => 
'limitreport' ],
-   self::getPreviewLimitReport( $this->mParserOutput ) ) );
+   if ( $this->mParserOutput ) {
+   $wgOut->setLimitReportData( 
$this->mParserOutput->getLimitReportData() );
+   }
 
$wgOut->addModules( 'mediawiki.action.edit.collapsibleFooter' );
 
@@ -3442,41 +3443,12 @@
return '';
}
 
-   $limitReport = Html::rawElement( 'div', [ 'class' => 
'mw-limitReportExplanation' ],
-   wfMessage( 'limitreport-title' )->parseAsBlock()
+   return ResourceLoader::makeInlineScript(
+   ResourceLoader::makeConfigSetScript(
+   [ 'wgPageParseReport' => 
$output->getLimitReportData() ],
+   true
+   )
);
-
-   // Show/hide animation doesn't work correctly on a table, so 
wrap it in a div.
-   $limitReport .= Html::openElement( 'div', [ 'class' => 
'preview-limit-report-wrapper' ] );
-
-   $limitReport .= Html::openElement( 'table', [
-   'class' => 'preview-limit-report wikitable'
-   ] ) .
-   Html::openElement( 'tbody' );
-
-   foreach ( $output->getLimitReportData() as $key => $value ) {
-   if ( Hooks::run( 'ParserLimitReportFormat',
-   [ $key, &$value, &$limitReport, true, true ]
-   ) ) {
-   $keyMsg = wfMessage( $key );
-   $valueMsg = wfMessage( [ "$key-value-html", 
"$key-value" ] );
-   if ( !$valueMsg->exists() ) {
-   $valueMsg = new RawMessage( '$1' );
-   }
-   if ( !$keyMsg->isDisabled() && 
!$valueMsg->isDisabled() ) {
-   $limitReport .= Html::openElement( 'tr' 
) .
-   Html::rawElement( 'th', null, 
$keyMsg->parse() ) .
-   Html::rawElement( 'td', null, 
$valueMsg->params( $value )->parse() ) .
-   Html::closeElement( 'tr' );
-   }
-   }
-   }
-
-   $limitReport .= Html::closeElement( 'tbody' ) .
-   Html::closeElement( 'table' ) .
-   Html::closeElement( 'div' );
-
-   return $limitReport;
}
 
protected function showStandardInputs( &$tabindex = 2 ) {
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index b6c48ab..b88db92 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1773,7 +1773,7 @@
}
 
// Include profiling data
-   $this->limitReportData = $parserOutput->getLimitReportData();
+   $this->setLimitReportData( $parserOutput->getLimitReportData() 
);
 
// Link flags are ignored for now, but may in the future be
// used to mark individual language links.
@@ -4051,4 +4051,12 @@
// public API or you'll be severely disappointed when T87871 is 
fixed and it disappears.
$this->addMeta( 'X-OOUI-PHP', '1' );
}
+
+   /**
+* @param array $data Data from ParserOutput::getLimitReportData()
+* @since 1.28
+*/
+   public function setLimitReportData( array $data ) {
+   $this->limitReportData = $data;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] mediawiki...TemplateStyles[master]: Remove 'UnitTestList' hook

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Remove 'UnitTestList' hook
..

Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Change-Id: I03f1d1ea345a43685397e106fc5e27e1c2436f70
---
M TemplateStyles.hooks.php
M extension.json
2 files changed, 0 insertions(+), 13 deletions(-)


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

diff --git a/TemplateStyles.hooks.php b/TemplateStyles.hooks.php
index 717ae88..ccb0c4a 100644
--- a/TemplateStyles.hooks.php
+++ b/TemplateStyles.hooks.php
@@ -15,16 +15,6 @@
return true;
}
 
-   /**
-* Add phpunit tests
-*
-* @param array &$files List of phpunit test files
-*/
-   public static function onUnitTestsList( &$files ) {
-   $files[] = __DIR__ . '/tests/phpunit/';
-   return true;
-   }
-
private static function decodeFromBlob( $blob ) {
$tree = gzdecode( $blob );
if ( $tree ) {
diff --git a/extension.json b/extension.json
index dd96bae..317006b 100644
--- a/extension.json
+++ b/extension.json
@@ -36,9 +36,6 @@
],
"OutputPageParserOutput": [
"TemplateStylesHooks::onOutputPageParserOutput"
-   ],
-   "UnitTestsList": [
-   "TemplateStylesHooks::onUnitTestsList"
]
},
"config": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03f1d1ea345a43685397e106fc5e27e1c2436f70
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateStyles
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] mediawiki...CollaborationKit[master]: Remove 'UnitTestList' hook

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Remove 'UnitTestList' hook
..

Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Change-Id: I77099ef4e659d269450c0ddb1a44e009f5406d09
---
M extension.json
M includes/CollaborationKit.php
R tests/phpunit/CollaborationHubContentHandlerTest.php
R tests/phpunit/CollaborationHubContentTest.php
4 files changed, 0 insertions(+), 26 deletions(-)


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

diff --git a/extension.json b/extension.json
index 69a0434..71f5912 100644
--- a/extension.json
+++ b/extension.json
@@ -34,9 +34,6 @@
"CreateCollaborationHub": "SpecialCreateCollaborationHub"
},
"Hooks": {
-   "UnitTestsList": [
-   "CollaborationKitHooks::onUnitTestsList"
-   ],
"ParserFirstCallInit": [
"CollaborationKitHooks::onParserFirstCallInit"
],
diff --git a/includes/CollaborationKit.php b/includes/CollaborationKit.php
index 5d332ac..241af8e 100644
--- a/includes/CollaborationKit.php
+++ b/includes/CollaborationKit.php
@@ -3,29 +3,6 @@
 // Hooks and crap
 class CollaborationKitHooks {
 
-   /**
-* Register our tests with PHPUnit
-*
-* Shamelessly stolen from MassMessage
-*
-* @param &$files Array List of files for PHPUnit
-*/
-   public static function onUnitTestsList( &$files ) {
-   $directoryIterator = new RecursiveDirectoryIterator( __DIR__ . 
'/../tests/' );
-
-   /**
-* @var SplFileInfo $fileInfo
-*/
-   $ourFiles = [];
-   foreach ( new RecursiveIteratorIterator( $directoryIterator ) 
as $fileInfo ) {
-   if ( substr( $fileInfo->getFilename(), -8 ) === 
'Test.php' ) {
-   $ourFiles[] = $fileInfo->getPathname();
-   }
-   }
-
-   $files = array_merge( $files, $ourFiles );
-   }
-
public static function onParserFirstCallInit( $parser ) {
$parser->setFunctionHook( 'transcludelist', 
'CollaborationListContent::transcludeHook' );
// Hack for transclusion.
diff --git a/tests/CollaborationHubContentHandlerTest.php 
b/tests/phpunit/CollaborationHubContentHandlerTest.php
similarity index 100%
rename from tests/CollaborationHubContentHandlerTest.php
rename to tests/phpunit/CollaborationHubContentHandlerTest.php
diff --git a/tests/CollaborationHubContentTest.php 
b/tests/phpunit/CollaborationHubContentTest.php
similarity index 100%
rename from tests/CollaborationHubContentTest.php
rename to tests/phpunit/CollaborationHubContentTest.php

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: SpecialContributions: Use LinkRenderer instead of Linker::li...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: SpecialContributions: Use LinkRenderer instead of Linker::link()
..


SpecialContributions: Use LinkRenderer instead of Linker::link()

Change-Id: I9d6b81d5c71ab56fef2fe4bd95cfa1a6c38cbc32
---
M includes/specials/SpecialContributions.php
1 file changed, 21 insertions(+), 20 deletions(-)

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



diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index d769cb3..ab46dda 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -267,7 +267,7 @@
}
$user = htmlspecialchars( $userObj->getName() );
} else {
-   $user = Linker::link( $userObj->getUserPage(), 
htmlspecialchars( $userObj->getName() ) );
+   $user = $this->getLinkRenderer()->makeLink( 
$userObj->getUserPage(), $userObj->getName() );
}
$nt = $userObj->getUserPage();
$talk = $userObj->getTalkPage();
@@ -323,62 +323,63 @@
$id = $target->getId();
$username = $target->getName();
 
-   $tools[] = Linker::link( $talkpage, $this->msg( 
'sp-contributions-talk' )->escaped() );
+   $linkRenderer = $this->getLinkRenderer();
+   $tools[] = $linkRenderer->makeLink( $talkpage, $this->msg( 
'sp-contributions-talk' )->text() );
 
if ( ( $id !== null ) || ( $id === null && IP::isIPAddress( 
$username ) ) ) {
if ( $this->getUser()->isAllowed( 'block' ) ) { # Block 
/ Change block / Unblock links
if ( $target->isBlocked() && 
$target->getBlock()->getType() != Block::TYPE_AUTO ) {
-   $tools[] = Linker::linkKnown( # Change 
block link
+   $tools[] = 
$linkRenderer->makeKnownLink( # Change block link
SpecialPage::getTitleFor( 
'Block', $username ),
-   $this->msg( 'change-blocklink' 
)->escaped()
+   $this->msg( 'change-blocklink' 
)->text()
);
-   $tools[] = Linker::linkKnown( # Unblock 
link
+   $tools[] = 
$linkRenderer->makeKnownLink( # Unblock link
SpecialPage::getTitleFor( 
'Unblock', $username ),
-   $this->msg( 'unblocklink' 
)->escaped()
+   $this->msg( 'unblocklink' 
)->text()
);
} else { # User is not blocked
-   $tools[] = Linker::linkKnown( # Block 
link
+   $tools[] = 
$linkRenderer->makeKnownLink( # Block link
SpecialPage::getTitleFor( 
'Block', $username ),
-   $this->msg( 'blocklink' 
)->escaped()
+   $this->msg( 'blocklink' 
)->text()
);
}
}
 
# Block log link
-   $tools[] = Linker::linkKnown(
+   $tools[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Log', 'block' ),
-   $this->msg( 'sp-contributions-blocklog' 
)->escaped(),
+   $this->msg( 'sp-contributions-blocklog' 
)->text(),
[],
[ 'page' => $userpage->getPrefixedText() ]
);
 
# Suppression log link (bug 59120)
if ( $this->getUser()->isAllowed( 'suppressionlog' ) ) {
-   $tools[] = Linker::linkKnown(
+   $tools[] = $linkRenderer->makeKnownLink(
SpecialPage::getTitleFor( 'Log', 
'suppress' ),
-   $this->msg( 
'sp-contributions-suppresslog' )->escaped(),
+   $this->msg( 
'sp-contributions-suppresslog' )->text(),
[],
[ 'offender' => $username ]
);
}
}
# Uploads
-   $tools[] = Linker::linkKnown(
+   $tools[] = $linkRenderer->makeKnownLink(
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Provide context in ContributionsToolLinks hook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Provide context in ContributionsToolLinks hook
..


Provide context in ContributionsToolLinks hook

Most of the hook functions need context to see what the current user's
permissions are, to generate messages, or the LinkRenderer service to
generate the tool links.

Change-Id: I19fa27c8115ee39dded6cb98f29c35b66b934f8a
---
M docs/hooks.txt
M includes/specials/SpecialContributions.php
M includes/specials/SpecialDeletedContributions.php
3 files changed, 5 insertions(+), 2 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index 89a54d5..79cfb47 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -1104,6 +1104,9 @@
 $id: User identifier
 $title: User page title
 &$tools: Array of tool links
+$specialPage: SpecialPage instance for context and services. Can be either
+  SpecialContributions or DeletedContributionsPage. Extensions should type
+  hint against a generic SpecialPage though.
 
 'ConvertContent': Called by AbstractContent::convert when a conversion to
 another content model is requested.
diff --git a/includes/specials/SpecialContributions.php 
b/includes/specials/SpecialContributions.php
index cce88b9..d769cb3 100644
--- a/includes/specials/SpecialContributions.php
+++ b/includes/specials/SpecialContributions.php
@@ -392,7 +392,7 @@
);
}
 
-   Hooks::run( 'ContributionsToolLinks', [ $id, $userpage, &$tools 
] );
+   Hooks::run( 'ContributionsToolLinks', [ $id, $userpage, 
&$tools, $this ] );
 
return $tools;
}
diff --git a/includes/specials/SpecialDeletedContributions.php 
b/includes/specials/SpecialDeletedContributions.php
index 190bf9f..a402d3c 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -219,7 +219,7 @@
);
}
 
-   Hooks::run( 'ContributionsToolLinks', [ $id, $nt, 
&$tools ] );
+   Hooks::run( 'ContributionsToolLinks', [ $id, $nt, 
&$tools, $this ] );
 
$links = $this->getLanguage()->pipeList( $tools );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19fa27c8115ee39dded6cb98f29c35b66b934f8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Trace time spent in treebuilder + token transformations

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Trace time spent in treebuilder + token transformations
..


Trace time spent in treebuilder + token transformations

* This still doesn't account for time spent in the PEG tokenizer,
  time spent in the token transformation manager code, I/O wait time.
* Dumps recorded time profile at the end.
* Using Date to compute times. Good enough for a first cut since
  this is only used during development.

Change-Id: Idd1b1932ca37c3647a47d67d6e86bf3559636034
---
M lib/config/MWParserEnvironment.js
M lib/wt2html/DOMPostProcessor.js
M lib/wt2html/HTML5TreeBuilder.js
M lib/wt2html/TokenTransformManager.js
M lib/wt2html/parser.js
5 files changed, 44 insertions(+), 1 deletion(-)

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



diff --git a/lib/config/MWParserEnvironment.js 
b/lib/config/MWParserEnvironment.js
index a40b68c..bfda9de 100644
--- a/lib/config/MWParserEnvironment.js
+++ b/lib/config/MWParserEnvironment.js
@@ -80,6 +80,9 @@
return new Page();
})();
 
+   // Record time spent in various passes
+   this.timeProfile = {};
+
// A passed-in cookie, if any
this.cookie = options.cookie || null;
 
@@ -152,6 +155,24 @@
 }
 PayloadTooLargeError.prototype = Error.prototype;
 
+MWParserEnvironment.prototype.bumpTimeUse = function(resource, time) {
+   if (!this.timeProfile[resource]) {
+   this.timeProfile[resource] = 0;
+   }
+   this.timeProfile[resource] += time;
+};
+
+MWParserEnvironment.prototype.printTimeProfile = function() {
+   console.warn("-".repeat(55));
+   console.warn("Recorded times (in ms) for sync token transformations");
+   console.warn("-".repeat(55));
+   for (var k in this.timeProfile) {
+   var str = k + ' '.repeat(k.length < 30 ? 30 - k.length : 0);
+   console.warn(str + ": " + this.timeProfile[k]);
+   }
+   console.warn("-".repeat(55));
+};
+
 MWParserEnvironment.prototype.bumpParserResourceUse = function(resource, 
count) {
var n = this.limits.wt2html[resource];
n -= (count || 1);
diff --git a/lib/wt2html/DOMPostProcessor.js b/lib/wt2html/DOMPostProcessor.js
index 7a0e854..fecdeae 100644
--- a/lib/wt2html/DOMPostProcessor.js
+++ b/lib/wt2html/DOMPostProcessor.js
@@ -431,6 +431,9 @@
// For the top-level document, we generate  and add it.
if (this.atTopLevel) {
this.addMetaData(document);
+   if (psd.traceFlags && psd.traceFlags.indexOf('time') !== -1) {
+   env.printTimeProfile();
+   }
}
 
this.emit('document', document);
diff --git a/lib/wt2html/HTML5TreeBuilder.js b/lib/wt2html/HTML5TreeBuilder.js
index 81d3a1c..0564f49 100644
--- a/lib/wt2html/HTML5TreeBuilder.js
+++ b/lib/wt2html/HTML5TreeBuilder.js
@@ -102,10 +102,12 @@
 };
 
 TreeBuilder.prototype.onChunk = function(tokens) {
+   var s = new Date();
var n = tokens.length;
for (var i = 0; i < n; i++) {
this.processToken(tokens[i]);
}
+   this.env.bumpTimeUse("HTML5 TreeBuilder", (new Date()) - s);
 };
 
 TreeBuilder.prototype.onEnd = function() {
diff --git a/lib/wt2html/TokenTransformManager.js 
b/lib/wt2html/TokenTransformManager.js
index c43e14e..3671885 100644
--- a/lib/wt2html/TokenTransformManager.js
+++ b/lib/wt2html/TokenTransformManager.js
@@ -113,6 +113,18 @@
return a.rank - b.rank;
 };
 
+// Use a new method to create this to prevent the closure
+// from holding onto more state than necessary.
+TokenTransformManager.prototype.timeTracer = function(transform, traceName) {
+   var env = this.env;
+   return function() {
+   var s = new Date();
+   var ret = transform.apply(null, arguments);
+   env.bumpTimeUse(traceName, (new Date()) - s);
+   return ret;
+   };
+};
+
 /**
  * Add a transform registration.
  *
@@ -137,6 +149,10 @@
  *   tag name for tags, omitted for non-tags
  */
 TokenTransformManager.prototype.addTransform = function(transformation, 
debugName, rank, type, name) {
+   var traceFlags = this.env.conf.parsoid.traceFlags;
+   if (traceFlags && (traceFlags.indexOf("time") !== -1)) {
+   transformation = this.timeTracer(transformation, debugName);
+   }
var t = {
rank: rank,
name: debugName,
diff --git a/lib/wt2html/parser.js b/lib/wt2html/parser.js
index e1a90ba..3dffca9 100644
--- a/lib/wt2html/parser.js
+++ b/lib/wt2html/parser.js
@@ -482,7 +482,8 @@
// maintained across all pipelines used by the document.
// (Ex: Cite state)
this.resetState({toplevel: true});
-   return this.first.process(input);
+   this.env.log('trace/time', 'Starting parse at ', new Date());
+ 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: PegTokenizer: Remove the confusing parse -> tokenize alias

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: PegTokenizer: Remove the confusing parse -> tokenize alias
..


PegTokenizer: Remove the confusing parse -> tokenize alias

There is already a PegTokenizer.tokenize function that is
different from the aliased function.

Change-Id: Id13bbb1d057d1a3f00b939cfdeec1650744537a9
---
M lib/wt2html/tokenizer.js
1 file changed, 3 insertions(+), 7 deletions(-)

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



diff --git a/lib/wt2html/tokenizer.js b/lib/wt2html/tokenizer.js
index bea0f62..20f0d5d 100644
--- a/lib/wt2html/tokenizer.js
+++ b/lib/wt2html/tokenizer.js
@@ -211,10 +211,6 @@
fs.writeFileSync(tokenizerFilename, tokenizerSource, 'utf8');
PegTokenizer.prototype.tokenizer = require(tokenizerFilename);
}
-
-   // alias the parse method
-   this.tokenizer.tokenize = this.tokenizer.parse;
-
 };
 
 /*
@@ -281,7 +277,7 @@
if (fullParse) {
args.startRule = "start";
try {
-   this.tokenizer.tokenize(text, args);
+   this.tokenizer.parse(text, args);
} catch (e) {
this.env.log("fatal", e);
return;
@@ -311,7 +307,7 @@
};
 
try {
-   iterator = this.tokenizer.tokenize(text, args);
+   iterator = this.tokenizer.parse(text, args);
} catch (e) {
this.env.log("fatal", e);
return;
@@ -352,7 +348,7 @@
sol: sol,
};
}
-   var retToks = this.tokenizer.tokenize(text, args);
+   var retToks = this.tokenizer.parse(text, args);
 
if (Array.isArray(retToks) && retToks.length > 0) {
toks = JSUtils.pushArray(toks, retToks);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id13bbb1d057d1a3f00b939cfdeec1650744537a9
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Output wgNotificationsSpecialPageLinks js var even if no loc...

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Output wgNotificationsSpecialPageLinks js var even if no local 
notifications
..


Output wgNotificationsSpecialPageLinks js var even if no local notifications

Bug: T142148
Change-Id: Id9225b9aa95a7a8ee8602282ed0d4619c7ce2bf5
---
M includes/special/SpecialNotifications.php
1 file changed, 5 insertions(+), 4 deletions(-)

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



diff --git a/includes/special/SpecialNotifications.php 
b/includes/special/SpecialNotifications.php
index 5447886..9a7f10a 100644
--- a/includes/special/SpecialNotifications.php
+++ b/includes/special/SpecialNotifications.php
@@ -20,6 +20,11 @@
 
$this->addHelpLink( 'Help:Notifications/Special:Notifications' 
);
 
+   $out->addJsConfigVars( 'wgNotificationsSpecialPageLinks', array(
+   'help' => 
'//www.mediawiki.org/wiki/Special:MyLanguage/Help:Notifications/Special:Notifications',
+   'preferences' => SpecialPage::getTitleFor( 
'Preferences' )->getLinkURL() . '#mw-prefsection-echo',
+   ) );
+
$user = $this->getUser();
if ( $user->isAnon() ) {
// Redirect to login page and inform user of the need 
to login
@@ -151,10 +156,6 @@
 
$out->addModules( array( 'ext.echo.special' ) );
 
-   $out->addJsConfigVars( 'wgNotificationsSpecialPageLinks', array(
-   'help' => 
'//www.mediawiki.org/wiki/Special:MyLanguage/Help:Notifications/Special:Notifications',
-   'preferences' => SpecialPage::getTitleFor( 
'Preferences' )->getLinkURL() . '#mw-prefsection-echo',
-   ) );
// For no-js support
$out->addModuleStyles( array( 'ext.echo.styles.notifications', 
'ext.echo.styles.special' ) );
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: gerrit: let gerrit2 user write to config dir

2016-08-05 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: gerrit: let gerrit2 user write to config dir
..

gerrit: let gerrit2 user write to config dir

follow-up to change: Ibc68a44c7338

Besides being allowed to write to the config files,
the user also needs to be allowed to write to the "etc" dir
itself.

Change-Id: Ibf7dbc047763fc1dc31506b35e8c6275fa3b22bf
---
M modules/gerrit/manifests/jetty.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index ed82d30..6b5eed2 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -70,7 +70,7 @@
 recurse => remote,
 owner   => 'gerrit2',
 group   => 'gerrit2',
-mode=> '0444',
+mode=> '0644',
 source  => 'puppet:///modules/gerrit/etc',
 require => File['/var/lib/gerrit2/review_site'],
 }

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: [timeline] Add test extensions-unittests-generic

2016-08-05 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: [timeline] Add test extensions-unittests-generic
..

[timeline] Add test extensions-unittests-generic

Passes since Ib1d8743204a3799c16001dc9e55fe64435f49f71

Change-Id: Ic7644fca50cdb366e299cb009b73f4782a40a4c7
---
M zuul/layout.yaml
1 file changed, 1 insertion(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/05/303305/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 7154092..1f95348 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -7613,24 +7613,10 @@
 
   - name: mediawiki/extensions/timeline
 template:
+  - name: extension-unittests-generic
   - name: npm
 check:
   - jsonlint
-  - php53lint
-  - composer-validate
-test:
- - php53lint
- - composer-validate
-gate-and-submit:
- - php53lint
- - composer-validate
-experimental:
- - mediawiki-extensions-hhvm
- - mediawiki-extensions-qunit-jessie
- - mwext-testextension-hhvm
- - mwext-testextension-php53-composer
- - mwext-testextension-hhvm-composer
- - composer-php53
 
   - name: mediawiki/extensions/TitleBlacklist
 template:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Fetch default options for gallery dialog

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fetch default options for gallery dialog
..


Fetch default options for gallery dialog

Fetch default options for mode, image heights and image widths
rather than hard-coding them.

Bug: T139632
Change-Id: I1adc7987fdeb1258ee87ce46acbab469ea18116e
---
M VisualEditor.hooks.php
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/ui/dialogs/ve.ui.MWGalleryDialog.js
5 files changed, 25 insertions(+), 11 deletions(-)

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



diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index f7c3e86..9b1a8e7 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -697,6 +697,7 @@
'defaultUserOptions' => [
'defaultthumbsize' => $thumbLimits[ 
$defaultUserOptions['thumbsize'] ]
],
+   'galleryOptions' => $coreConfig->get( 'GalleryOptions' 
),
'blacklist' => $veConfig->get( 
'VisualEditorBrowserBlacklist' ),
'skins' => $veConfig->get( 'VisualEditorSupportedSkins' 
),
'tabPosition' => $veConfig->get( 
'VisualEditorTabPosition' ),
diff --git a/extension.json b/extension.json
index a3916d2..8311316 100644
--- a/extension.json
+++ b/extension.json
@@ -1753,6 +1753,7 @@

"visualeditor-mwgallerydialog-classes-input-placeholder",

"visualeditor-mwgallerydialog-empty-gallery-message",

"visualeditor-mwgallerydialog-heights-field-label",
+   
"visualeditor-mwgallerydialog-heights-input-placeholder",

"visualeditor-mwgallerydialog-mode-dropdown-label-nolines",

"visualeditor-mwgallerydialog-mode-dropdown-label-packed",

"visualeditor-mwgallerydialog-mode-dropdown-label-packed-hover",
@@ -1767,7 +1768,8 @@

"visualeditor-mwgallerydialog-styles-input-placeholder",

"visualeditor-mwgallerydialog-show-filename-field-label",
"visualeditor-mwgallerydialog-title",
-   
"visualeditor-mwgallerydialog-widths-field-label"
+   
"visualeditor-mwgallerydialog-widths-field-label",
+   
"visualeditor-mwgallerydialog-widths-input-placeholder"
],
"targets": [
"desktop",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index acbeb92..5d85af9 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -275,6 +275,7 @@
"visualeditor-mwgallerydialog-classes-input-placeholder": "Class names, 
space-separated",
"visualeditor-mwgallerydialog-empty-gallery-message": "The gallery is 
empty.",
"visualeditor-mwgallerydialog-heights-field-label": "Image height",
+   "visualeditor-mwgallerydialog-heights-input-placeholder": "Default 
height: $1 px",
"visualeditor-mwgallerydialog-mode-dropdown-label-nolines": 
"Traditional with no outlines",
"visualeditor-mwgallerydialog-mode-dropdown-label-packed": "Packed",
"visualeditor-mwgallerydialog-mode-dropdown-label-packed-hover": 
"Packed with captions on hover",
@@ -290,6 +291,7 @@
"visualeditor-mwgallerydialog-show-filename-field-label": "Show 
filenames",
"visualeditor-mwgallerydialog-title": "Gallery",
"visualeditor-mwgallerydialog-widths-field-label": "Image width",
+   "visualeditor-mwgallerydialog-widths-input-placeholder": "Default 
width: $1 px",
"visualeditor-mwsignature-tool": "Your signature",
"visualeditor-pagemenu-tooltip": "Page options",
"visualeditor-pagetranslationwarning": "You are editing a translatable 
page. Editing these in this editor is not yet officially supported.",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index 050ce1d..7cbf275 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -286,6 +286,7 @@
"visualeditor-mwgallerydialog-classes-input-placeholder": "Placeholder 
for the classes input of the gallery dialog",
"visualeditor-mwgallerydialog-empty-gallery-message": "Empty gallery 
message for the gallery dialog",
"visualeditor-mwgallerydialog-heights-field-label": "Label for the 
heights field of the gallery dialog",
+   "visualeditor-mwgallerydialog-heights-input-placeholder": "Placeholder 
for the heights input",
"visualeditor-mwgallerydialog-mode-dropdown-label-nolines": "Label for 
the nolines option in the mode dropdown of the gallery dialog",

[MediaWiki-commits] [Gerrit] wikimedia...php-queue[master]: bindValue instead of bindParam

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: bindValue instead of bindParam
..


bindValue instead of bindParam

bindParam passes by reference, which doesn't work for values like
self::getTimestamp(). Makes tests work under php7.

Change-Id: Ib153bc4fb86cee68d307aed2b33cf44b7abd4a15
---
M src/PHPQueue/Backend/PDO.php
1 file changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/src/PHPQueue/Backend/PDO.php b/src/PHPQueue/Backend/PDO.php
index 5b1fd28..9d0adbe 100644
--- a/src/PHPQueue/Backend/PDO.php
+++ b/src/PHPQueue/Backend/PDO.php
@@ -104,8 +104,8 @@
 throw new \Exception('Could not prepare statement');
 }
 $_tmp = json_encode($data);
-$sth->bindParam(1, $_tmp, \PDO::PARAM_STR);
-$sth->bindParam(2, self::getTimeStamp(), \PDO::PARAM_STR);
+$sth->bindValue(1, $_tmp, \PDO::PARAM_STR);
+$sth->bindValue(2, self::getTimeStamp(), \PDO::PARAM_STR);
 return $sth->execute();
 }
 
@@ -114,9 +114,9 @@
 $sql = sprintf('REPLACE INTO `%s` (`id`, `data`, `timestamp`) VALUES 
(?, ?, ?)', $this->db_table);
 $sth = $this->getConnection()->prepare($sql);
 $_tmp = json_encode($data);
-$sth->bindParam(1, $id, \PDO::PARAM_INT);
-$sth->bindParam(2, $_tmp, \PDO::PARAM_STR);
-$sth->bindParam(3, self::getTimeStamp(), \PDO::PARAM_STR);
+$sth->bindValue(1, $id, \PDO::PARAM_INT);
+$sth->bindValue(2, $_tmp, \PDO::PARAM_STR);
+$sth->bindValue(3, self::getTimeStamp(), \PDO::PARAM_STR);
 $sth->execute();
 }
 
@@ -137,7 +137,7 @@
 
 $sql = sprintf('SELECT `id`, `data` FROM `%s` WHERE `id` = ?', 
$this->db_table);
 $sth = $this->getConnection()->prepare($sql);
-$sth->bindParam(1, $id, \PDO::PARAM_INT);
+$sth->bindValue(1, $id, \PDO::PARAM_INT);
 $sth->execute();
 
 $result = $sth->fetch(\PDO::FETCH_ASSOC);
@@ -193,7 +193,7 @@
 try {
 $sql = sprintf('DELETE FROM `%s` WHERE `id` = ?', $this->db_table);
 $sth = $this->getConnection()->prepare($sql);
-$sth->bindParam(1, $id, \PDO::PARAM_INT);
+$sth->bindValue(1, $id, \PDO::PARAM_INT);
 $sth->execute();
 } catch (\Exception $ex) {
 throw new BackendException('Invalid ID.');

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib153bc4fb86cee68d307aed2b33cf44b7abd4a15
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2016-08-05T10:00:02+0000

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build - 2016-08-05T10:00:02+
..


New Wikidata Build - 2016-08-05T10:00:02+

Change-Id: Ia3ed4159e54ef0b71f64c83667fdf0e134c3ca44
---
M composer.lock
M extensions/ArticlePlaceholder/extension.json
M extensions/ArticlePlaceholder/i18n/lb.json
M extensions/ArticlePlaceholder/i18n/sv.json
M 
extensions/ArticlePlaceholder/includes/Lua/mw.ext.articlePlaceholder.entityRenderer.lua
R 
extensions/ArticlePlaceholder/modules/ext.articleplaceholder.createArticle/ext.articleplaceholder.createArticle.js
R 
extensions/ArticlePlaceholder/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplay.css
R 
extensions/ArticlePlaceholder/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplayMobile.css
R 
extensions/ArticlePlaceholder/modules/ext.articleplaceholder.defaultDisplay/ext.articleplaceholder.defaultDisplaySmall.css
M extensions/Wikibase/client/i18n/bn.json
M extensions/Wikibase/client/i18n/diq.json
M extensions/Wikibase/client/i18n/gl.json
M extensions/Wikibase/client/i18n/ko.json
M extensions/Wikibase/client/i18n/sv.json
M extensions/Wikibase/client/i18n/yo.json
M extensions/Wikibase/composer.json
M extensions/Wikibase/lib/i18n/hu.json
A extensions/Wikibase/lib/i18n/yo.json
M extensions/Wikibase/repo/i18n/bn.json
M extensions/Wikibase/repo/i18n/gl.json
M extensions/Wikibase/repo/i18n/hu.json
M extensions/Wikibase/repo/i18n/ko.json
M extensions/Wikibase/repo/i18n/yo.json
M extensions/Wikibase/repo/includes/Store/Sql/EntityPerPageTable.php
M 
extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js
M vendor/composer/installed.json
26 files changed, 102 insertions(+), 47 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 649867d..860311c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -782,12 +782,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-ArticlePlaceholder.git;,
-"reference": "28dfcfc4bd5b740f51a1b4c8c0ada10a74bfc1b6"
+"reference": "28fd9d2d8304665c6dba5115ba1ac2124c3e0397"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/28dfcfc4bd5b740f51a1b4c8c0ada10a74bfc1b6;,
-"reference": "28dfcfc4bd5b740f51a1b4c8c0ada10a74bfc1b6",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-ArticlePlaceholder/zipball/28fd9d2d8304665c6dba5115ba1ac2124c3e0397;,
+"reference": "28fd9d2d8304665c6dba5115ba1ac2124c3e0397",
 "shasum": ""
 },
 "require-dev": {
@@ -812,7 +812,7 @@
 ],
 "description": "Provides a special page with Wikibase information 
about a certain topic, with invitation to create an article for the topic",
 "homepage": 
"https://www.mediawiki.org/wiki/Extension:ArticlePlaceholder;,
-"time": "2016-08-03 20:37:02"
+"time": "2016-08-04 21:24:40"
 },
 {
 "name": "propertysuggester/property-suggester",
@@ -1571,12 +1571,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "782dd0b07e0f3238f2d1fe1b759153004ad423ab"
+"reference": "94772c4af86acc5acfe2c68a07ea1c1649670e64"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/782dd0b07e0f3238f2d1fe1b759153004ad423ab;,
-"reference": "782dd0b07e0f3238f2d1fe1b759153004ad423ab",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/94772c4af86acc5acfe2c68a07ea1c1649670e64;,
+"reference": "94772c4af86acc5acfe2c68a07ea1c1649670e64",
 "shasum": ""
 },
 "require": {
@@ -1593,7 +1593,7 @@
 "data-values/value-view": "~0.17.3",
 "diff/diff": "~2.0",
 "php": ">=5.5.0",
-"wikibase/data-model": "~6.0",
+"wikibase/data-model": "~6.1",
 "wikibase/data-model-javascript": "~3.0.0",
 "wikibase/data-model-serialization": "~2.2",
 "wikibase/data-model-services": "~3.5",
@@ -1648,7 +1648,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2016-08-04 09:16:51"
+"time": "2016-08-04 21:31:45"
 },
 {
 "name": "wikibase/wikimedia-badges",

[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: De-capitalise timeline in wfLoadExtension call

2016-08-05 Thread Reedy (Code Review)
Reedy has submitted this change and it was merged.

Change subject: De-capitalise timeline in wfLoadExtension call
..


De-capitalise timeline in wfLoadExtension call

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

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



diff --git a/Timeline.php b/Timeline.php
index bc0e649..2226c97 100644
--- a/Timeline.php
+++ b/Timeline.php
@@ -1,7 +1,7 @@
 https://gerrit.wikimedia.org/r/303304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Change explicit class to self in AutoloadGenerator

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Change explicit class to self in AutoloadGenerator
..


Change explicit class to self in AutoloadGenerator

Follow-up: I3a426b92892f4c00cab33a13f6a717751120367c

Change-Id: I9d91ca42dbf41604639fff2ca00efa6fb262cb3d
---
M includes/utils/AutoloadGenerator.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/includes/utils/AutoloadGenerator.php 
b/includes/utils/AutoloadGenerator.php
index de52cd9..2ebc9ed 100644
--- a/includes/utils/AutoloadGenerator.php
+++ b/includes/utils/AutoloadGenerator.php
@@ -229,7 +229,7 @@
 
$fileinfo = $this->getTargetFileinfo();
 
-   if ( $fileinfo['type'] === AutoloadGenerator::FILETYPE_JSON ) {
+   if ( $fileinfo['type'] === self::FILETYPE_JSON ) {
return $this->generateJsonAutoload( 
$fileinfo['filename'] );
} else {
return $this->generatePHPAutoload( $commandName, 
$fileinfo['filename'] );
@@ -247,17 +247,17 @@
public function getTargetFileinfo() {
$fileinfo = [
'filename' => $this->basepath . '/autoload.php',
-   'type' => AutoloadGenerator::FILETYPE_PHP
+   'type' => self::FILETYPE_PHP
];
if ( file_exists( $this->basepath . '/extension.json' ) ) {
$fileinfo = [
'filename' => $this->basepath . 
'/extension.json',
-   'type' => AutoloadGenerator::FILETYPE_JSON
+   'type' => self::FILETYPE_JSON
];
} elseif ( file_exists( $this->basepath . '/skin.json' ) ) {
$fileinfo = [
'filename' => $this->basepath . '/skin.json',
-   'type' => AutoloadGenerator::FILETYPE_JSON
+   'type' => self::FILETYPE_JSON
];
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d91ca42dbf41604639fff2ca00efa6fb262cb3d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add transitionary config for timeline

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add transitionary config for timeline
..


Add transitionary config for timeline

Change-Id: I715fde3054e4fba56a37836a624d778bc45fc91a
---
M wmf-config/CommonSettings.php
1 file changed, 4 insertions(+), 5 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2ead599..9dfca8e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -679,13 +679,12 @@
// MergeFonts("FreeSerif.ttf");
// SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF 
Regular", "Regular", "");
// Generate("FreeSansWMF.ttf", "", 4 );
-   $wgTimelineSettings->fontFile = 'FreeSansWMF.ttf';
+   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'FreeSansWMF.ttf';
} elseif ( $lang == 'zh' ) {
-   $wgTimelineSettings->fontFile = 'unifont-5.1.20080907.ttf';
+   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'unifont-5.1.20080907.ttf';
}
-   $wgTimelineSettings->fileBackend = 'local-multiwrite';
-   $wgTimelineSettings->ploticusCommand = '/usr/bin/ploticus';
-   $wgTimelineSettings->epochTimestamp = '2013060100';
+   $wgTimelineSettings->fileBackend = $wgTimelineFileBackend = 
'local-multiwrite';
+   $wgTimelineSettings->epochTimestamp = $wgTimelineEpochTimestamp = 
'2013060100';
 }
 
 putenv( "GDFONTPATH=/srv/mediawiki/fonts" );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I715fde3054e4fba56a37836a624d778bc45fc91a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Allow gerrit2 user/group to write to its config files

2016-08-05 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: Gerrit: Allow gerrit2 user/group to write to its config files
..


Gerrit: Allow gerrit2 user/group to write to its config files

Sometimes running the init process results in Gerrit wanting to add
things to its config, normalize them, etc. Right now they'd fail
with a permission denied error

Change-Id: Ibc68a44c7338383c6b40b92d88b2dcd166a2ebbf
---
M modules/gerrit/manifests/jetty.pp
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/gerrit/manifests/jetty.pp 
b/modules/gerrit/manifests/jetty.pp
index 8b0e633..ed82d30 100644
--- a/modules/gerrit/manifests/jetty.pp
+++ b/modules/gerrit/manifests/jetty.pp
@@ -79,7 +79,7 @@
 content => template('gerrit/gerrit.config.erb'),
 owner   => 'gerrit2',
 group   => 'gerrit2',
-mode=> '0444',
+mode=> '0664',
 require => File['/var/lib/gerrit2/review_site/etc'],
 }
 
@@ -87,7 +87,7 @@
 content => template('gerrit/secure.config.erb'),
 owner   => 'gerrit2',
 group   => 'gerrit2',
-mode=> '0440',
+mode=> '0660',
 require => File['/var/lib/gerrit2/review_site/etc'],
 }
 
@@ -105,7 +105,7 @@
 content => template('gerrit/replication.config.erb'),
 owner   => 'gerrit2',
 group   => 'gerrit2',
-mode=> '0444',
+mode=> '0664',
 require => File['/var/lib/gerrit2/review_site/etc'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibc68a44c7338383c6b40b92d88b2dcd166a2ebbf
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: De-capitalise timeline in wfLoadExtension call

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: De-capitalise timeline in wfLoadExtension call
..

De-capitalise timeline in wfLoadExtension call

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


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

diff --git a/Timeline.php b/Timeline.php
index bc0e649..2226c97 100644
--- a/Timeline.php
+++ b/Timeline.php
@@ -1,7 +1,7 @@
 https://gerrit.wikimedia.org/r/303304
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c1501e8bec4d5dc04a0a125603d867a6438176e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/timeline
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove timeline old config

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Remove timeline old config
..

Remove timeline old config

Switch to wfLoadExtension

Bug: T140852
Change-Id: Ic1042214e3f297cda9de724c43fbcca7eb5b1074
---
M wmf-config/CommonSettings.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9dfca8e..7b246a3 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -672,19 +672,19 @@
 };
 
 if ( $wmgUseTimeline ) {
-   include( $IP . '/extensions/timeline/Timeline.php' );
+   wfLoadExtension( 'timeline' );
if ( $wgDBname == 'testwiki' || $wgDBname == 'mlwiki' ) {
// FreeSansWMF has been generated from FreeSans and FreeSerif 
by using this script with fontforge:
// Open("FreeSans.ttf");
// MergeFonts("FreeSerif.ttf");
// SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF 
Regular", "Regular", "");
// Generate("FreeSansWMF.ttf", "", 4 );
-   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'FreeSansWMF.ttf';
+   $wgTimelineFontFile = 'FreeSansWMF.ttf';
} elseif ( $lang == 'zh' ) {
-   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'unifont-5.1.20080907.ttf';
+   $wgTimelineFontFile = 'unifont-5.1.20080907.ttf';
}
-   $wgTimelineSettings->fileBackend = $wgTimelineFileBackend = 
'local-multiwrite';
-   $wgTimelineSettings->epochTimestamp = $wgTimelineEpochTimestamp = 
'2013060100';
+   $wgTimelineFileBackend = 'local-multiwrite';
+   $wgTimelineEpochTimestamp = '2013060100';
 }
 
 putenv( "GDFONTPATH=/srv/mediawiki/fonts" );

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add transitionary config for timeline

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Add transitionary config for timeline
..

Add transitionary config for timeline

Change-Id: I715fde3054e4fba56a37836a624d778bc45fc91a
---
M wmf-config/CommonSettings.php
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 2ead599..9dfca8e 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -679,13 +679,12 @@
// MergeFonts("FreeSerif.ttf");
// SetFontNames("FreeSans-WMF", "FreeSans WMF", "FreeSans WMF 
Regular", "Regular", "");
// Generate("FreeSansWMF.ttf", "", 4 );
-   $wgTimelineSettings->fontFile = 'FreeSansWMF.ttf';
+   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'FreeSansWMF.ttf';
} elseif ( $lang == 'zh' ) {
-   $wgTimelineSettings->fontFile = 'unifont-5.1.20080907.ttf';
+   $wgTimelineSettings->fontFile = $wgTimelineFontFile = 
'unifont-5.1.20080907.ttf';
}
-   $wgTimelineSettings->fileBackend = 'local-multiwrite';
-   $wgTimelineSettings->ploticusCommand = '/usr/bin/ploticus';
-   $wgTimelineSettings->epochTimestamp = '2013060100';
+   $wgTimelineSettings->fileBackend = $wgTimelineFileBackend = 
'local-multiwrite';
+   $wgTimelineSettings->epochTimestamp = $wgTimelineEpochTimestamp = 
'2013060100';
 }
 
 putenv( "GDFONTPATH=/srv/mediawiki/fonts" );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Kill off TimelineSettings class

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Kill off TimelineSettings class
..


Kill off TimelineSettings class

Change-Id: Ibe556adea897b7ef1c614bad7d02fafb0caba646
---
M Timeline.body.php
D TimelineSettings.php
M extension.json
M install-ploticus.sh
4 files changed, 29 insertions(+), 39 deletions(-)

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



diff --git a/Timeline.body.php b/Timeline.body.php
index 0c539a9..0b811a8 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -31,7 +31,8 @@
 */
public static function renderTimeline( $timelinesrc, array $args, 
$parser, $frame ) {
global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory, $wgRenderHashAppend;
-   global $wgTimelineSettings;
+   global $wgTimelineFileBackend, $wgTimelineEpochTimestamp, 
$wgTimelinePerlCommand, $wgTimelineFile;
+   global $wgtimelineFontFile;
 
$parser->getOutput()->addModuleStyles( 'ext.timeline.styles' );
 
@@ -39,8 +40,8 @@
$svg2png = ( $method == 'svg2png' );
 
// Get the backend to store plot data and pngs
-   if ( $wgTimelineSettings->fileBackend != '' ) {
-   $backend = FileBackendGroup::singleton()->get( 
$wgTimelineSettings->fileBackend );
+   if ( $wgTimelineFileBackend != '' ) {
+   $backend = FileBackendGroup::singleton()->get( 
$wgTimelineFileBackend );
} else {
$backend = new FSFileBackend(
[
@@ -67,7 +68,7 @@
$previouslyRendered = $backend->fileExists( [ 'src' => 
"{$fname}.png" ] );
if ( $previouslyRendered ) {
$timestamp = $backend->getFileTimestamp( [ 'src' => 
"{$fname}.png" ] );
-   $expired = ( $timestamp < 
$wgTimelineSettings->epochTimestamp );
+   $expired = ( $timestamp < $wgTimelineEpochTimestamp );
} else {
$expired = false;
}
@@ -91,16 +92,13 @@
 
// Get command for ploticus to read the user 
input and output an error,
// map, and rendering (png or gif) file under 
the same dir as the temp file.
-   $cmdline = wfEscapeShellArg(
-   $wgTimelineSettings->perlCommand,
-   
$wgTimelineSettings->timelineFile
-   )
+   $cmdline = wfEscapeShellArg( 
$wgTimelinePerlCommand, $wgTimelineTimelineFile )
. ( $svg2png ? " -s " : "" )
. " -i " . wfEscapeShellArg( $tmpPath )
-   . " -m -P " . wfEscapeShellArg( 
$wgTimelineSettings->ploticusCommand )
+   . " -m -P " . wfEscapeShellArg( 
$wgTimelinePloticusCommand )
. " -T " . wfEscapeShellArg( 
$wgTmpDirectory )
. " -A " . wfEscapeShellArg( 
$wgArticlePath )
-   . " -f " . wfEscapeShellArg( 
$wgTimelineSettings->fontFile )
+   . " -f " . wfEscapeShellArg( 
$wgTimelineFontFile )
;
 
// Actually run the command...
diff --git a/TimelineSettings.php b/TimelineSettings.php
deleted file mode 100644
index ce6d393..000
--- a/TimelineSettings.php
+++ /dev/null
@@ -1,25 +0,0 @@
-http://ploticus.sourceforge.net/doc/fonts.html section "What fonts 
are available?"
-   // and below. If using a TrueType font, the file with .ttf extension
-   // must be available in path specified by environment variable 
$GDFONTPATH;
-   // some other font types are available (see the docs linked above).
-   //
-   // Use the fontname 'ascii' to use the internal Ploticus font that does 
not require
-   // an external font file. Defaults to FreeSans for backwards 
compatibility.
-   //
-   // Note: according to Ploticus docs, font names with a space may be 
problematic.
-   public $fontFile = 'FreeSans';
-   // The name of the FileBackend to use for timeline (see $wgFileBackends)
-   public $fileBackend = '';
-}
diff --git a/extension.json b/extension.json
index 7021180..f5049e8 100644
--- a/extension.json
+++ b/extension.json
@@ -5,15 +5,13 @@
"descriptionmsg": "timeline-desc",
"license-name": "GPL-2.0",
"type": "parserhook",
-   "callback": "Timeline::registerExtension",
"MessagesDirs": {
"Timeline": [
"i18n"
]
},

[MediaWiki-commits] [Gerrit] mediawiki...timeline[master]: Kill off TimelineSettings class

2016-08-05 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Kill off TimelineSettings class
..

Kill off TimelineSettings class

Change-Id: Ibe556adea897b7ef1c614bad7d02fafb0caba646
---
M Timeline.body.php
D TimelineSettings.php
M extension.json
M install-ploticus.sh
4 files changed, 29 insertions(+), 39 deletions(-)


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

diff --git a/Timeline.body.php b/Timeline.body.php
index 0c539a9..0b811a8 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -31,7 +31,8 @@
 */
public static function renderTimeline( $timelinesrc, array $args, 
$parser, $frame ) {
global $wgUploadDirectory, $wgUploadPath, $wgArticlePath, 
$wgTmpDirectory, $wgRenderHashAppend;
-   global $wgTimelineSettings;
+   global $wgTimelineFileBackend, $wgTimelineEpochTimestamp, 
$wgTimelinePerlCommand, $wgTimelineFile;
+   global $wgtimelineFontFile;
 
$parser->getOutput()->addModuleStyles( 'ext.timeline.styles' );
 
@@ -39,8 +40,8 @@
$svg2png = ( $method == 'svg2png' );
 
// Get the backend to store plot data and pngs
-   if ( $wgTimelineSettings->fileBackend != '' ) {
-   $backend = FileBackendGroup::singleton()->get( 
$wgTimelineSettings->fileBackend );
+   if ( $wgTimelineFileBackend != '' ) {
+   $backend = FileBackendGroup::singleton()->get( 
$wgTimelineFileBackend );
} else {
$backend = new FSFileBackend(
[
@@ -67,7 +68,7 @@
$previouslyRendered = $backend->fileExists( [ 'src' => 
"{$fname}.png" ] );
if ( $previouslyRendered ) {
$timestamp = $backend->getFileTimestamp( [ 'src' => 
"{$fname}.png" ] );
-   $expired = ( $timestamp < 
$wgTimelineSettings->epochTimestamp );
+   $expired = ( $timestamp < $wgTimelineEpochTimestamp );
} else {
$expired = false;
}
@@ -91,16 +92,13 @@
 
// Get command for ploticus to read the user 
input and output an error,
// map, and rendering (png or gif) file under 
the same dir as the temp file.
-   $cmdline = wfEscapeShellArg(
-   $wgTimelineSettings->perlCommand,
-   
$wgTimelineSettings->timelineFile
-   )
+   $cmdline = wfEscapeShellArg( 
$wgTimelinePerlCommand, $wgTimelineTimelineFile )
. ( $svg2png ? " -s " : "" )
. " -i " . wfEscapeShellArg( $tmpPath )
-   . " -m -P " . wfEscapeShellArg( 
$wgTimelineSettings->ploticusCommand )
+   . " -m -P " . wfEscapeShellArg( 
$wgTimelinePloticusCommand )
. " -T " . wfEscapeShellArg( 
$wgTmpDirectory )
. " -A " . wfEscapeShellArg( 
$wgArticlePath )
-   . " -f " . wfEscapeShellArg( 
$wgTimelineSettings->fontFile )
+   . " -f " . wfEscapeShellArg( 
$wgTimelineFontFile )
;
 
// Actually run the command...
diff --git a/TimelineSettings.php b/TimelineSettings.php
deleted file mode 100644
index ce6d393..000
--- a/TimelineSettings.php
+++ /dev/null
@@ -1,25 +0,0 @@
-http://ploticus.sourceforge.net/doc/fonts.html section "What fonts 
are available?"
-   // and below. If using a TrueType font, the file with .ttf extension
-   // must be available in path specified by environment variable 
$GDFONTPATH;
-   // some other font types are available (see the docs linked above).
-   //
-   // Use the fontname 'ascii' to use the internal Ploticus font that does 
not require
-   // an external font file. Defaults to FreeSans for backwards 
compatibility.
-   //
-   // Note: according to Ploticus docs, font names with a space may be 
problematic.
-   public $fontFile = 'FreeSans';
-   // The name of the FileBackend to use for timeline (see $wgFileBackends)
-   public $fileBackend = '';
-}
diff --git a/extension.json b/extension.json
index 7021180..f5049e8 100644
--- a/extension.json
+++ b/extension.json
@@ -5,15 +5,13 @@
"descriptionmsg": "timeline-desc",
"license-name": "GPL-2.0",
"type": "parserhook",
-   "callback": "Timeline::registerExtension",
"MessagesDirs": {
"Timeline": [
  

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (4408c13)

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update VE core submodule to master (4408c13)
..


Update VE core submodule to master (4408c13)

New changes:
e7cb202 Mark context wrappers as wrappers
20b75af Localisation updates from https://translatewiki.net.
a4dde9f Annotate pasted external text
8148301 Always preserve leading whitespace when converting for clipboard
82a35b7 TransactionProcessor: Apply annotations to ranges at the highest 
uniform offset
21fc1eb Restore previous selection when annotation inspector is dismissed
358181c Preserve prior valid DOM selections in showModelSelection
a0f7dba build: Bump various devDependencies to latest
0ae0f7e Follow-up Iabec6a6: Fix typo in mousemove selection update code
d69a4df Provide tools to make text bigger or smaller

Local changes for big/small tools

Change-Id: If418a1a47276cc1e1530c4a3ad6784136d8d14f8
---
M extension.json
M lib/ve
M modules/ve-mw/init/ve.init.mw.Target.js
3 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index a3916d2..a7e1617 100644
--- a/extension.json
+++ b/extension.json
@@ -894,10 +894,12 @@
"visualeditor-align-widget-left",
"visualeditor-align-widget-right",
"visualeditor-alignablecontextitem-title",
+   "visualeditor-annotationbutton-big-tooltip",
"visualeditor-annotationbutton-bold-tooltip",
"visualeditor-annotationbutton-code-tooltip",
"visualeditor-annotationbutton-italic-tooltip",
"visualeditor-annotationbutton-link-tooltip",
+   "visualeditor-annotationbutton-small-tooltip",

"visualeditor-annotationbutton-strikethrough-tooltip",

"visualeditor-annotationbutton-subscript-tooltip",

"visualeditor-annotationbutton-superscript-tooltip",
diff --git a/lib/ve b/lib/ve
index 2567ca9..4408c13 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 2567ca9296b358a67aa1a002622cd38876a9e98d
+Subproject commit 4408c13850e3ee9583f51d0b3c306721b988103f
diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 55d2bfd..c9cb11f 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -66,7 +66,7 @@
include: [ { group: 'textStyle' }, 'language', 'clear' ],
forceExpand: [ 'bold', 'italic', 'clear' ],
promote: [ 'bold', 'italic' ],
-   demote: [ 'strikethrough', 'code', 'underline', 'language', 
'clear' ]
+   demote: [ 'strikethrough', 'code', 'underline', 'language', 
'big', 'small', 'clear' ]
},
// Link
{ include: [ 'link' ] },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If418a1a47276cc1e1530c4a3ad6784136d8d14f8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MinimumNameLength[master]: Release version 2.0.0

2016-08-05 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review.

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

Change subject: Release version 2.0.0
..

Release version 2.0.0

* Update CHANGELOG
* Update README

Change-Id: Iffb154e8cd9185ac49b8682d37ce024e74ea916b
---
M CHANGELOG
M README
2 files changed, 14 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MinimumNameLength 
refs/changes/98/303298/1

diff --git a/CHANGELOG b/CHANGELOG
index 0b9c763..42e057e 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,8 +1,12 @@
 The CHANGELOG of the Minimum Name Length extension to MediaWiki.
 
 == Version 2.0.0 ==
+
+Released on August 5, 2016.
+
 * [BREAKING CHANGE] Converted extension to use a PreAuthenticationProvider
   This beaks compatibility with MediaWiki versions older than 1.27.0.
+
 
 == Version 1.3.0 ==
 
@@ -10,7 +14,7 @@
 
 * [BREAKING CHANGE] Converted the extension to use extension registration, 
instead of PHP entry point.
   This breaks compatibility with MediaWiki versions older than 1.25.0.
-
+* Added translation updates from translatewiki.net
 
 == Version 1.2.2 ==
 
diff --git a/README b/README
index 1d1689e..d79f0b3 100644
--- a/README
+++ b/README
@@ -3,7 +3,7 @@
 Copyright © 2007 Rob Church.
 All rights reserved.
 
-Please see the COPYING file for terms of use and redistribution
+Please see the COPYING file for terms of use and redistribution.
 
 == Introduction ==
 
@@ -11,15 +11,14 @@
 $wgMinimumNameLength, which can be used to enforce a minimum
 username length during user account creation.
 
-This is often helpful in conjunction with other anti-spam
-measures.
+This is often helpful in conjunction with other anti-spam measures.
 
 == Requirements ==
 
 This extension requires:
 
 * PHP 5.3.3 or above
-* MediaWiki 1.17.0 or above
+* MediaWiki 1.27.0 or above
 
 See also the CHANGELOG for further information.
 
@@ -32,17 +31,17 @@
 You then need to edit your "LocalSettings.php" file and add the following
 line somewhere near the bottom:
 
- require_once "$IP/extensions/MinimumNameLength/MinimumNameLength.php";
-   
+ wfLoadExtension( 'MinimumNameLength' );
+
 Access the "Special:Version" page on your wiki to verify the installation.
 
 == Configuration ==
 
-To configure the minimum name length, set $wgMinimumUsernameLength in your
-"LocalSettings.php" file *after* the call to include the extension, e.g.
+To configure the minimum username length, set the $wgMinimumUsernameLength
+configuration parameter in your "LocalSettings.php" file *after* the call
+to include the extension, e.g.
 
- require_once "$IP/extensions/MinimumNameLength/MinimumNameLength.php";
+ wfLoadExtension( 'MinimumNameLength' );
  $wgMinimumUsernameLength = 8;
 
 By default the minimum username length is set to 10.
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffb154e8cd9185ac49b8682d37ce024e74ea916b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MinimumNameLength
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Config shortcut for queue testing.

2016-08-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Config shortcut for queue testing.
..

Config shortcut for queue testing.

This'll be nice for testing the Civi queue consumers

Change-Id: Ie82fd9c50afbde3d8ee7c8a1a5fdfaa285d246d4
---
M Tests/QueueConsumerTest.php
A Tests/QueueTestConfiguration.php
2 files changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/99/303299/1

diff --git a/Tests/QueueConsumerTest.php b/Tests/QueueConsumerTest.php
index 43993d7..871b2ed 100644
--- a/Tests/QueueConsumerTest.php
+++ b/Tests/QueueConsumerTest.php
@@ -5,6 +5,7 @@
 use Exception;
 use PDO;
 use PHPQueue\Interfaces\FifoQueueStore;
+use SmashPig\Core\Context;
 use SmashPig\Core\DataStores\DamagedDatabase;
 use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 
@@ -21,7 +22,7 @@
 
public function setUp() {
parent::setUp();
-   $this->setConfig( 'default', __DIR__ . 
'/data/config_queue.yaml' );
+   Context::initWithLogger( new QueueTestConfiguration() );
$this->queue = BaseQueueConsumer::getQueue( 'test' );
$this->queue->createTable( 'test' );
$this->damaged = DamagedDatabase::get()->getDatabase();
diff --git a/Tests/QueueTestConfiguration.php b/Tests/QueueTestConfiguration.php
new file mode 100644
index 000..80fafc0
--- /dev/null
+++ b/Tests/QueueTestConfiguration.php
@@ -0,0 +1,12 @@
+https://gerrit.wikimedia.org/r/303299
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie82fd9c50afbde3d8ee7c8a1a5fdfaa285d246d4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParserFunctions[master]: Remove 'UnitTestList' hook

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'UnitTestList' hook
..


Remove 'UnitTestList' hook

No longer needed now that extension unittests are autodiscovered.

Bug: T142120
Bug: T142121
Change-Id: I075b7f6b5e11ead988b0baba5d85745dbb9ac480
---
M ParserFunctions.hooks.php
M extension.json
R tests/phpunit/ExpressionTest.php
3 files changed, 0 insertions(+), 12 deletions(-)

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



diff --git a/ParserFunctions.hooks.php b/ParserFunctions.hooks.php
index 63ff756..b204333 100644
--- a/ParserFunctions.hooks.php
+++ b/ParserFunctions.hooks.php
@@ -50,15 +50,6 @@
return true;
}
 
-   /**
-* @param $files array
-* @return bool
-*/
-   public static function onUnitTestsList( &$files ) {
-   $files[] = __DIR__ . '/tests/ExpressionTest.php';
-   return true;
-   }
-
public static function onScribuntoExternalLibraries( $engine, array 
&$extraLibraries ) {
if ( $engine === 'lua' ) {
$extraLibraries['mw.ext.ParserFunctions'] = 
'Scribunto_LuaParserFunctionsLibrary';
diff --git a/extension.json b/extension.json
index 3667962..6a5464a 100644
--- a/extension.json
+++ b/extension.json
@@ -31,9 +31,6 @@
"ParserFirstCallInit": [
"ParserFunctionsHooks::onParserFirstCallInit"
],
-   "UnitTestsList": [
-   "ParserFunctionsHooks::onUnitTestsList"
-   ],
"ScribuntoExternalLibraries": [
"ParserFunctionsHooks::onScribuntoExternalLibraries"
]
diff --git a/tests/ExpressionTest.php b/tests/phpunit/ExpressionTest.php
similarity index 100%
rename from tests/ExpressionTest.php
rename to tests/phpunit/ExpressionTest.php

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

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

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


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

2016-08-05 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Convert to extension registration
..


Convert to extension registration

Bug: T88064
Change-Id: Ib1d8743204a3799c16001dc9e55fe64435f49f71
---
M Timeline.body.php
M Timeline.php
A TimelineSettings.php
A extension.json
4 files changed, 88 insertions(+), 65 deletions(-)

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



diff --git a/Timeline.body.php b/Timeline.body.php
index 1491590..0c539a9 100644
--- a/Timeline.body.php
+++ b/Timeline.body.php
@@ -3,6 +3,14 @@
 
 class Timeline {
 
+   public static function registerExtension() {
+   global $wgTimelineSettings;
+   $wgTimelineSettings = new TimelineSettings;
+   $wgTimelineSettings->ploticusCommand = "/usr/bin/ploticus";
+   $wgTimelineSettings->perlCommand = "/usr/bin/perl";
+   $wgTimelineSettings->timelineFile = __DIR__ . 
"/EasyTimeline.pl";
+   }
+
/**
 * @param $parser Parser
 * @return bool
diff --git a/Timeline.php b/Timeline.php
index 303ca2d..bc0e649 100644
--- a/Timeline.php
+++ b/Timeline.php
@@ -1,69 +1,16 @@
 
- * @license GNU General Public License version 2
- * @link http://www.mediawiki.org/wiki/Extension:EasyTimeline Documentation
- */
 
-$wgExtensionCredits['parserhook'][] = array(
-   'path' => __FILE__,
-   'name' => 'EasyTimeline',
-   'author' => 'Erik Zachte',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:EasyTimeline',
-   'descriptionmsg' => 'timeline-desc',
-   'license-name' => 'GPL-2.0',
-);
-
-class TimelineSettings {
-   public $ploticusCommand, $perlCommand;
-
-   // Update this timestamp to force older rendered timelines
-   // to be generated when the page next gets rendered.
-   // Can help to resolve old image-generation bugs.
-   public $epochTimestamp = '2012010100';
-
-   // Path to the EasyTimeline.pl perl file, which is used to actually 
generate the timelines.
-   public $timelineFile;
-
-   // Font name.
-   // Documentation on how Ploticus handles fonts is available at
-   // http://ploticus.sourceforge.net/doc/fonts.html section "What fonts 
are available?"
-   // and below. If using a TrueType font, the file with .ttf extension
-   // must be available in path specified by environment variable 
$GDFONTPATH;
-   // some other font types are available (see the docs linked above).
-   //
-   // Use the fontname 'ascii' to use the internal Ploticus font that does 
not require
-   // an external font file. Defaults to FreeSans for backwards 
compatibility.
-   //
-   // Note: according to Ploticus docs, font names with a space may be 
problematic.
-   public $fontFile = 'FreeSans';
-
-   // The name of the FileBackend to use for timeline (see $wgFileBackends)
-   public $fileBackend = '';
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'Timeline' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['Timeline'] = __DIR__ . '/i18n';
+/* wfWarn(
+   'Deprecated PHP entry point used for Timeline extension. Please 
use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+*/
+   return;
+} else {
+   die( 'This version of the Timeline extension requires MediaWiki 1.28+' 
);
 }
-$wgTimelineSettings = new TimelineSettings;
-$wgTimelineSettings->ploticusCommand = "/usr/bin/ploticus";
-$wgTimelineSettings->perlCommand = "/usr/bin/perl";
-$wgTimelineSettings->timelineFile = __DIR__ . "/EasyTimeline.pl";
-
-$wgHooks['ParserFirstCallInit'][] = 'Timeline::onParserFirstCallInit';
-$wgMessagesDirs['Timeline'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['Timeline'] = __DIR__ . '/Timeline.i18n.php';
-$wgAutoloadClasses['Timeline'] = __DIR__ . '/Timeline.body.php';
-
-$wgResourceModules['ext.timeline.styles'] = array(
-   'localBasePath' => __DIR__,
-   'remoteExtPath' => 'timeline',
-   'styles' => array(
-   'resources/ext.timeline.styles/timeline.css',
-   ),
-   'position' => 'top',
-   'targets' => array( 'mobile', 'desktop' ),
-);
 
diff --git a/TimelineSettings.php b/TimelineSettings.php
new file mode 100644
index 000..ce6d393
--- /dev/null
+++ b/TimelineSettings.php
@@ -0,0 +1,25 @@
+http://ploticus.sourceforge.net/doc/fonts.html section "What fonts 
are available?"
+   // and below. If using a TrueType font, the file with .ttf extension
+   // must be available in path specified by environment variable 
$GDFONTPATH;
+   // some other font types are available (see the docs linked above).
+   //
+   // Use the fontname 'ascii' to use the internal Ploticus font that does 
not require
+   // an external font 

  1   2   3   4   >