[MediaWiki-commits] [Gerrit] mediawiki/core[master]: jquery3.js -> jquery.js

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

Change subject: jquery3.js -> jquery.js
..


jquery3.js -> jquery.js

Per Krinkle's comment.

Change-Id: Ib8c78b47b6a700dcf753a7a1fd90d05d649f52d2
---
M resources/Resources.php
R resources/lib/jquery/jquery.js
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index a0e1863..2594a3d 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -133,7 +133,7 @@
 
'jquery' => [
'scripts' => [
-   'resources/lib/jquery/jquery3.js',
+   'resources/lib/jquery/jquery.js',
'resources/lib/jquery/jquery.migrate.js',
],
'raw' => true,
diff --git a/resources/lib/jquery/jquery3.js b/resources/lib/jquery/jquery.js
similarity index 100%
rename from resources/lib/jquery/jquery3.js
rename to resources/lib/jquery/jquery.js

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8c78b47b6a700dcf753a7a1fd90d05d649f52d2
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TerraCodes 
Gerrit-Reviewer: Fomafix 
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/puppet[production]: cache: send varnish logs to logstash

2017-11-06 Thread Ema (Code Review)
Ema has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389515 )

Change subject: cache: send varnish logs to logstash
..


cache: send varnish logs to logstash

This was previously merged (dfaddfb2932a9fdde29170f3596df402213ca2ac)
but the change was incorrect in the way it invoked rsyslog::conf.

Bug: T63782
Change-Id: I63a3bea8cb22be9124f5de5866b47aeaed19001d
---
M modules/profile/manifests/cache/base.pp
M modules/varnish/manifests/logging.pp
M modules/varnish/templates/initscripts/varnish.systemd.erb
A modules/varnish/templates/rsyslog.conf.erb
4 files changed, 36 insertions(+), 4 deletions(-)

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



diff --git a/modules/profile/manifests/cache/base.pp 
b/modules/profile/manifests/cache/base.pp
index ac93afd..07c89bd 100644
--- a/modules/profile/manifests/cache/base.pp
+++ b/modules/profile/manifests/cache/base.pp
@@ -20,6 +20,8 @@
 $purge_varnishes = hiera('profile::cache::base::purge_varnishes', 
['127.0.0.1:3128', '127.0.0.1:3127']),
 $fe_runtime_params = hiera('profile::cache::base::fe_runtime_params', []),
 $be_runtime_params = hiera('profile::cache::base::be_runtime_params', []),
+$logstash_host = hiera('logstash_host', undef),
+$logstash_syslog_port = hiera('logstash_syslog_port', undef),
 ) {
 # There is no better way to do this, so it can't be a class parameter. In 
fact,
 # I consider our requirement to make hiera calls parameters
@@ -81,9 +83,16 @@
 ###
 # Analytics/Logging stuff
 ###
+if $logstash_host != undef and $logstash_syslog_port != undef {
+$forward_syslog = "${logstash_host}:${logstash_syslog_port}"
+} else {
+$forward_syslog = ''
+}
+
 class { '::varnish::logging':
-cache_cluster => $cache_cluster,
-statsd_host   => $statsd_host,
+cache_cluster  => $cache_cluster,
+statsd_host=> $statsd_host,
+forward_syslog => $forward_syslog,
 }
 
 # auto-depool on shutdown + conditional one-shot auto-pool on start
diff --git a/modules/varnish/manifests/logging.pp 
b/modules/varnish/manifests/logging.pp
index 1c2da9a..ed532ab 100644
--- a/modules/varnish/manifests/logging.pp
+++ b/modules/varnish/manifests/logging.pp
@@ -4,14 +4,26 @@
 #
 # === Parameters
 #
-# [*cache_cluster*] The cache cluster we're part of.
+# [*cache_cluster*]
+#   The cache cluster we're part of.
 #
-# [*statsd_host*] The statsd host to send stats to.
+# [*statsd_host*]
+#   The statsd host to send stats to.
+#
+# [*forward_syslog*]
+#   Host and port to forward syslog events to. Disable forwarding by passing an
+#   empty string (default).
 #
 class varnish::logging(
 $cache_cluster,
 $statsd_host,
+$forward_syslog='',
 ){
+rsyslog::conf { 'varnish':
+content  => template('varnish/rsyslog.conf.erb'),
+priority => 80,
+}
+
 # Client connection stats from the 'X-Connection-Properties'
 # header set by the SSL terminators.
 ::varnish::logging::xcps { 'xcps':
diff --git a/modules/varnish/templates/initscripts/varnish.systemd.erb 
b/modules/varnish/templates/initscripts/varnish.systemd.erb
index 0d093e8..18b9b27 100644
--- a/modules/varnish/templates/initscripts/varnish.systemd.erb
+++ b/modules/varnish/templates/initscripts/varnish.systemd.erb
@@ -25,6 +25,8 @@
 <% if @jemalloc_conf -%>
 Environment="MALLOC_CONF=<%= @jemalloc_conf %>"
 <% end -%>
+# rsyslog will see this in $programname
+SyslogIdentifier=varnish<%= @instancesuffix %>
 ExecReload=/usr/share/varnish/reload-vcl <%= @extraopts %> -q
 ExecStart=<%= @start_cmd_prefix %>/usr/sbin/varnishd \
 -P %t/%p.pid \
diff --git a/modules/varnish/templates/rsyslog.conf.erb 
b/modules/varnish/templates/rsyslog.conf.erb
new file mode 100644
index 000..fed1280
--- /dev/null
+++ b/modules/varnish/templates/rsyslog.conf.erb
@@ -0,0 +1,9 @@
+# rsyslog configuration for Varnish
+# This file is managed by Puppet
+
+<%- if @forward_syslog != "" -%>
+# Forward Varnish logs to logstash
+if $programname contains "varnish" then {
+@<%= @forward_syslog %>
+}
+<%- end -%>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63a3bea8cb22be9124f5de5866b47aeaed19001d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Ema 
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]: upload: Simplify UploadStashTest by using getNewTempFile()

2017-11-06 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389664 )

Change subject: upload: Simplify UploadStashTest by using getNewTempFile()
..

upload: Simplify UploadStashTest by using getNewTempFile()

The parent class has a built-in list that tracks these files and
deletes them in a teardown.

I was unable to reproduce a case where $path + '.' is created by
MediaWiki. As far as I can tell, no current code exists in core
that would do this. If it does exist, we can keep the tearDown()
override with just that second case, but I'm removing it for now,
given it doesn't appear to be used.

Change-Id: I5847b7b266f1393d983aeb4b115bc0ae000e3547
---
M tests/phpunit/includes/upload/UploadStashTest.php
1 file changed, 1 insertion(+), 13 deletions(-)


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

diff --git a/tests/phpunit/includes/upload/UploadStashTest.php 
b/tests/phpunit/includes/upload/UploadStashTest.php
index d754ba5..f46ad20 100644
--- a/tests/phpunit/includes/upload/UploadStashTest.php
+++ b/tests/phpunit/includes/upload/UploadStashTest.php
@@ -19,7 +19,7 @@
protected function setUp() {
parent::setUp();
 
-   $this->tmpFile = wfTempDir() . '/' . uniqid();
+   $this->tmpFile = $this->getNewTempFile();
file_put_contents( $this->tmpFile, "\x00" );
 
self::$users = [
@@ -36,18 +36,6 @@
[]
)
];
-   }
-
-   protected function tearDown() {
-   if ( file_exists( $this->tmpFile . "." ) ) {
-   unlink( $this->tmpFile . "." );
-   }
-
-   if ( file_exists( $this->tmpFile ) ) {
-   unlink( $this->tmpFile );
-   }
-
-   parent::tearDown();
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PdfHandler[master]: Switch to the new shell framework

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

Change subject: Switch to the new shell framework
..


Switch to the new shell framework

Change-Id: Ibb28f4f62603c77fc719593afb20f2e738a79352
---
M PdfHandler.image.php
1 file changed, 17 insertions(+), 11 deletions(-)

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



diff --git a/PdfHandler.image.php b/PdfHandler.image.php
index 8346b31..e3f3534 100644
--- a/PdfHandler.image.php
+++ b/PdfHandler.image.php
@@ -20,6 +20,7 @@
  */
 
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\Shell\Shell;
 use UtfNormal\Validator;
 
 /**
@@ -113,13 +114,17 @@
global $wgPdfInfo, $wgPdftoText;
 
if ( $wgPdfInfo ) {
-   $cmd = wfEscapeShellArg( $wgPdfInfo ) .
-   " -enc UTF-8 " . # Report metadata as UTF-8 
text...
-   " -l 999 " . # Report page sizes for all 
pages
-   " -meta " .  # Report XMP metadata
-   wfEscapeShellArg( $this->mFilename );
-   $retval = '';
-   $dump = wfShellExec( $cmd, $retval );
+   $cmd = [
+   $wgPdfInfo,
+   '-enc', 'UTF-8', # Report metadata as UTF-8 
text...
+   '-l', '999', # Report page sizes for all 
pages
+   '-meta', # Report XMP metadata
+   $this->mFilename,
+   ];
+   $result = Shell::command( $cmd )
+   ->execute();
+
+   $dump = $result->getStdout();
$data = $this->convertDumpToArray( $dump );
} else {
$data = null;
@@ -127,10 +132,11 @@
 
// Read text layer
if ( isset( $wgPdftoText ) ) {
-   $cmd = wfEscapeShellArg( $wgPdftoText ) . ' '. 
wfEscapeShellArg( $this->mFilename ) . ' - ';
-   wfDebug( __METHOD__.": $cmd\n" );
-   $retval = '';
-   $txt = wfShellExec( $cmd, $retval );
+   $cmd = [ $wgPdftoText,  $this->mFilename, '-' ];
+   $result = Shell::command( $cmd )
+   ->execute();
+   $retval = $result->getExitCode();
+   $txt = $result->getStdout();
if ( $retval == 0 ) {
$txt = str_replace( "\r\n", "\n", $txt );
$pages = explode( "\f", $txt );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb28f4f62603c77fc719593afb20f2e738a79352
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PdfHandler
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Introduce Maintenance::getBatchSize()

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

Change subject: Introduce Maintenance::getBatchSize()
..


Introduce Maintenance::getBatchSize()

Just to isolate the internals. Fix most of usages in the core.

Change-Id: I8b3e9ca1f42b7c49ee57f17b88ca2fc7b404f342
---
M maintenance/Maintenance.php
M maintenance/checkImages.php
M maintenance/checkUsernames.php
M maintenance/cleanupBlocks.php
M maintenance/cleanupEmptyCategories.php
M maintenance/cleanupInvalidDbKeys.php
M maintenance/cleanupRemovedModules.php
M maintenance/cleanupUploadStash.php
M maintenance/convertUserOptions.php
M maintenance/copyFileBackend.php
M maintenance/copyJobQueue.php
M maintenance/deleteSelfExternals.php
M maintenance/dumpCategoriesAsRdf.php
M maintenance/findMissingFiles.php
M maintenance/findOrphanedFiles.php
M maintenance/fixDefaultJsonContentPages.php
M maintenance/fixUserRegistration.php
M maintenance/initUserPreference.php
M maintenance/invalidateUserSessions.php
M maintenance/makeTestEdits.php
M maintenance/manageJobs.php
M maintenance/migrateComments.php
M maintenance/migrateFileRepoLayout.php
M maintenance/migrateUserGroup.php
M maintenance/populateBacklinkNamespace.php
M maintenance/populateContentModel.php
M maintenance/populateFilearchiveSha1.php
M maintenance/populateImageSha1.php
M maintenance/populateIpChanges.php
M maintenance/populateLogSearch.php
M maintenance/populateLogUsertext.php
M maintenance/populatePPSortKey.php
M maintenance/populateParentId.php
M maintenance/purgeChangedFiles.php
M maintenance/purgeChangedPages.php
M maintenance/purgeList.php
M maintenance/purgeModuleDeps.php
M maintenance/rebuildrecentchanges.php
M maintenance/recountCategories.php
M maintenance/refreshFileHeaders.php
M maintenance/removeInvalidEmails.php
M maintenance/resetUserTokens.php
M maintenance/syncFileBackend.php
M maintenance/wrapOldPasswords.php
44 files changed, 115 insertions(+), 87 deletions(-)

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



diff --git a/maintenance/Maintenance.php b/maintenance/Maintenance.php
index 174b973..d37b990 100644
--- a/maintenance/Maintenance.php
+++ b/maintenance/Maintenance.php
@@ -308,6 +308,17 @@
}
 
/**
+* Returns batch size
+*
+* @since 1.31
+*
+* @return int|null
+*/
+   protected function getBatchSize() {
+   return $this->mBatchSize;
+   }
+
+   /**
 * Set the batch size.
 * @param int $s The number of operations to do in a batch
 */
diff --git a/maintenance/checkImages.php b/maintenance/checkImages.php
index c2f0b27..6fe15fb 100644
--- a/maintenance/checkImages.php
+++ b/maintenance/checkImages.php
@@ -47,7 +47,7 @@
do {
$res = $dbr->select( $fileQuery['tables'], 
$fileQuery['fields'],
[ 'img_name > ' . $dbr->addQuotes( $start ) ],
-   __METHOD__, [ 'LIMIT' => $this->mBatchSize ], 
$fileQuery['joins'] );
+   __METHOD__, [ 'LIMIT' => $this->getBatchSize() 
], $fileQuery['joins'] );
foreach ( $res as $row ) {
$numImages++;
$start = $row->img_name;
diff --git a/maintenance/checkUsernames.php b/maintenance/checkUsernames.php
index e6d9547..f29f836 100644
--- a/maintenance/checkUsernames.php
+++ b/maintenance/checkUsernames.php
@@ -50,7 +50,7 @@
__METHOD__,
[
'ORDER BY' => 'user_id',
-   'LIMIT' => $this->mBatchSize,
+   'LIMIT' => $this->getBatchSize(),
]
);
 
diff --git a/maintenance/cleanupBlocks.php b/maintenance/cleanupBlocks.php
index 37417c7..5c5c88f 100644
--- a/maintenance/cleanupBlocks.php
+++ b/maintenance/cleanupBlocks.php
@@ -44,8 +44,9 @@
$max = $db->selectField( 'ipblocks', 'MAX(ipb_user)' );
 
// Step 1: Clean up any duplicate user blocks
-   for ( $from = 1; $from <= $max; $from += $this->mBatchSize ) {
-   $to = min( $max, $from + $this->mBatchSize - 1 );
+   $batchSize = $this->getBatchSize();
+   for ( $from = 1; $from <= $max; $from += $batchSize ) {
+   $to = min( $max, $from + $batchSize - 1 );
$this->output( "Cleaning up duplicate ipb_user 
($from-$to of $max)\n" );
 
$delete = [];
@@ -118,8 +119,8 @@
}
 
// Step 2: Update the user name in any blocks where it doesn't 
match
-   for ( $from = 1; $from <= $max; $from += $this->mBatchSize ) {
-   $to = min( 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: admins: create perf-team group with gilles, krinkle

2017-11-06 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389663 )

Change subject: admins: create perf-team group with gilles, krinkle
..

admins: create perf-team group with gilles, krinkle

Create a new admin group called perf-team to be used on hosts
with the 'webperf' and 'xhgui' roles (performance team dedidacted
servers) but without the root access on application servers
like perf-roots has it.

Still grant full root access on the servers it is applied to, despite
the name.

Bug: T179728
Change-Id: I07b0b4f2d0ee223637fbebe1a6a635e95a44ad3a
---
M hieradata/role/common/webperf.yaml
M hieradata/role/common/xhgui/app.yaml
M modules/admin/data/data.yaml
3 files changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/63/389663/1

diff --git a/hieradata/role/common/webperf.yaml 
b/hieradata/role/common/webperf.yaml
index 1915c2e..05467fd 100644
--- a/hieradata/role/common/webperf.yaml
+++ b/hieradata/role/common/webperf.yaml
@@ -1,3 +1,4 @@
 admin::groups:
   - perf-roots
+  - perf-team
   - eventlogging-admins
diff --git a/hieradata/role/common/xhgui/app.yaml 
b/hieradata/role/common/xhgui/app.yaml
index 11b4f92..15fe0af 100644
--- a/hieradata/role/common/xhgui/app.yaml
+++ b/hieradata/role/common/xhgui/app.yaml
@@ -1,2 +1,3 @@
 admin::groups:
   - perf-roots
+  - perf-team
diff --git a/modules/admin/data/data.yaml b/modules/admin/data/data.yaml
index b8a00e4..a0a212e 100644
--- a/modules/admin/data/data.yaml
+++ b/modules/admin/data/data.yaml
@@ -451,6 +451,11 @@
  'ALL = NOPASSWD: /usr/bin/puppet agent -t -v',
  'ALL = NOPASSWD: /bin/journalctl *',
  'ALL = (syslog) NOPASSWD: ALL']
+  perf-team:
+gid: 796
+description: performance team members with access to 'webperf' and 'xhgui' 
servers
+members: [krinkle, gilles]
+privileges: ['ALL = (ALL) NOPASSWD: ALL']
   perf-roots:
 gid: 766
 description: users who have root on memcached, varnish, application 
servers, thumbor and xhgui servers

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: jquery.js -> jquery3.js

2017-11-06 Thread TerraCodes (Code Review)
TerraCodes has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389662 )

Change subject: jquery.js -> jquery3.js
..

jquery.js -> jquery3.js

The jquery file is named jquery3.js but these files reference jquery.js instead

Change-Id: Ib8c78b47b6a700dcf753a7a1fd90d05d649f52d2
---
M docs/uidesign/confirmable.html
M includes/installer/WebInstallerOutput.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/docs/uidesign/confirmable.html b/docs/uidesign/confirmable.html
index d035821..2752587 100644
--- a/docs/uidesign/confirmable.html
+++ b/docs/uidesign/confirmable.html
@@ -6,7 +6,7 @@
The jquery.confirmable module uses some additional modules and files
for internationalization support. These are omitted here for simplicity.
-->
-   
+   



[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Small whitespace cleanup

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

Change subject: Small whitespace cleanup
..


Small whitespace cleanup

Change-Id: Id84623c39798503d14b56429ea20edf65b9c33ac
---
M specials/SpecialContentTranslation.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/specials/SpecialContentTranslation.php 
b/specials/SpecialContentTranslation.php
index bdca9a5..47ace4d 100644
--- a/specials/SpecialContentTranslation.php
+++ b/specials/SpecialContentTranslation.php
@@ -189,9 +189,11 @@
// T111668: Make sure we generate the personal tools
// before we output the head, as extensions may add
// things using the PersonalUrls hook.
-   $toolbarList = Html::rawElement( 'ul',
-   null,
-   $skin->getPersonalToolsList() );
+   $toolbarList = Html::rawElement(
+   'ul',
+   null,
+   $skin->getPersonalToolsList()
+   );
 
$out->addHTML( $out->headElement( $skin ) );
$out->addHTML( Html::element(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id84623c39798503d14b56429ea20edf65b9c33ac
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
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...Translate[master]: Add copyright symbol to @copyright tag

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

Change subject: Add copyright symbol to @copyright tag
..


Add copyright symbol to @copyright tag

This was the only line not having it.

Change-Id: Ie596892b1582b1199d6939fa373b4ac377bc7e99
---
M scripts/characterEditStats.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/characterEditStats.php b/scripts/characterEditStats.php
index 2083f48..8840f0f 100644
--- a/scripts/characterEditStats.php
+++ b/scripts/characterEditStats.php
@@ -3,7 +3,7 @@
  * Show number of characters translated over a given period of time.
  *
  * @author Santhosh Thottingal
- * @copyright Copyright 2013 Santhosh Thottingal
+ * @copyright Copyright © 2013 Santhosh Thottingal
  * @license GPL-2.0+
  * @file
  * @ingroup Script Stats

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie596892b1582b1199d6939fa373b4ac377bc7e99
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Santhosh 
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...Flow[master]: Depend on new mediawiki.editfont.styles module

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

Change subject: Depend on new mediawiki.editfont.styles module
..


Depend on new mediawiki.editfont.styles module

Change-Id: I66a355d84f1d652d5d55296c792c293623797603
Depends-On: Ifff40f756558e30f6551f29a945a31f0eef4cfed
---
M extension.json
M includes/View.php
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/extension.json b/extension.json
index 948e992..3afe061 100644
--- a/extension.json
+++ b/extension.json
@@ -555,6 +555,7 @@
"mediawiki.Title",
"mediawiki.user",
"mediawiki.util",
+   "mediawiki.editfont.styles",
"ext.visualEditor.supportCheck"
],
"targets": [
diff --git a/includes/View.php b/includes/View.php
index b0e1fcd..22d2183 100644
--- a/includes/View.php
+++ b/includes/View.php
@@ -96,6 +96,7 @@
'mediawiki.ui.icon',
'mediawiki.ui.text',
'mediawiki.special.changeslist',
+   'mediawiki.editfont.styles',
'ext.flow.styles.base' ,
'ext.flow.mediawiki.ui.form',
'ext.flow.mediawiki.ui.text',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66a355d84f1d652d5d55296c792c293623797603
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
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]: Move edit font styles to separate module

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

Change subject: Move edit font styles to separate module
..


Move edit font styles to separate module

This allows pages that don't load mediawiki.legacy.shared
(e.g. MobileFrontend) to still have access to edit fonts.

Change-Id: Ifff40f756558e30f6551f29a945a31f0eef4cfed
---
M includes/EditPage.php
M resources/Resources.php
M resources/src/mediawiki.legacy/shared.css
A resources/src/mediawiki/mediawiki.editfont.css
4 files changed, 18 insertions(+), 13 deletions(-)

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index a07a236..4260c99 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -2408,6 +2408,7 @@
 
$out->addModules( 'mediawiki.action.edit' );
$out->addModuleStyles( 'mediawiki.action.edit.styles' );
+   $out->addModuleStyles( 'mediawiki.editfont.styles' );
 
$user = $this->context->getUser();
if ( $user->getOption( 'showtoolbar' ) ) {
diff --git a/resources/Resources.php b/resources/Resources.php
index 7d606e7..a0e1863 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1388,6 +1388,10 @@
'scripts' => 'resources/src/mediawiki/mediawiki.experiments.js',
'targets' => [ 'desktop', 'mobile' ],
],
+   'mediawiki.editfont.styles' => [
+   'styles' => 'resources/src/mediawiki/mediawiki.editfont.css',
+   'targets' => [ 'desktop', 'mobile' ],
+   ],
 
/* MediaWiki Action */
 
@@ -1399,6 +1403,7 @@
'styles' => 
'resources/src/mediawiki.action/mediawiki.action.edit.css',
'dependencies' => [
'mediawiki.action.edit.styles',
+   'mediawiki.editfont.styles',
'jquery.textSelection',
'oojs-ui-core',
'mediawiki.widgets.visibleByteLimit',
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index ecdfb61..9f48204 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -110,19 +110,6 @@
height: 22px;
 }
 
-/* Edit font preference */
-.mw-editfont-monospace {
-   font-family: monospace;
-}
-
-.mw-editfont-sans-serif {
-   font-family: sans-serif;
-}
-
-.mw-editfont-serif {
-   font-family: serif;
-}
-
 /* Underline preference */
 
 .mw-underline-always a {
diff --git a/resources/src/mediawiki/mediawiki.editfont.css 
b/resources/src/mediawiki/mediawiki.editfont.css
new file mode 100644
index 000..6228030
--- /dev/null
+++ b/resources/src/mediawiki/mediawiki.editfont.css
@@ -0,0 +1,12 @@
+/* Edit font preference */
+.mw-editfont-monospace {
+   font-family: monospace;
+}
+
+.mw-editfont-sans-serif {
+   font-family: sans-serif;
+}
+
+.mw-editfont-serif {
+   font-family: serif;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifff40f756558e30f6551f29a945a31f0eef4cfed
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: New /includes directory

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

Change subject: New /includes directory
..


New /includes directory

Change-Id: I26fefdcc6e23412e7daa26dda2e1ad3e67aea98f
---
M Cargo.php
M extension.json
R includes/CargoFieldDescription.php
R includes/CargoFileData.php
R includes/CargoHierarchyTree.php
R includes/CargoPageData.php
R includes/CargoPageSchemas.php
R includes/CargoPageValuesAction.php
R includes/CargoPopulateTableJob.php
R includes/CargoQueryDisplayer.php
R includes/CargoRecreateDataAction.php
R includes/CargoSQLQuery.php
R includes/CargoTableSchema.php
R includes/CargoUtils.php
14 files changed, 24 insertions(+), 24 deletions(-)

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



diff --git a/Cargo.php b/Cargo.php
index 9e89d77..495108e 100644
--- a/Cargo.php
+++ b/Cargo.php
@@ -77,23 +77,23 @@
 
 // Register classes and special pages.
 $wgAutoloadClasses['CargoHooks'] = $dir . '/Cargo.hooks.php';
-$wgAutoloadClasses['CargoUtils'] = $dir . '/CargoUtils.php';
-$wgAutoloadClasses['CargoFieldDescription'] = $dir . 
'/CargoFieldDescription.php';
-$wgAutoloadClasses['CargoTableSchema'] = $dir . '/CargoTableSchema.php';
-$wgAutoloadClasses['CargoHierarchyTree'] = $dir . '/CargoHierarchyTree.php';
+$wgAutoloadClasses['CargoUtils'] = $dir . '/includes/CargoUtils.php';
+$wgAutoloadClasses['CargoFieldDescription'] = $dir . 
'/includes/CargoFieldDescription.php';
+$wgAutoloadClasses['CargoTableSchema'] = $dir . 
'/includes/CargoTableSchema.php';
+$wgAutoloadClasses['CargoHierarchyTree'] = $dir . 
'/includes/CargoHierarchyTree.php';
 $wgAutoloadClasses['CargoDeclare'] = $dir . 
'/parserfunctions/CargoDeclare.php';
 $wgAutoloadClasses['CargoAttach'] = $dir . '/parserfunctions/CargoAttach.php';
 $wgAutoloadClasses['CargoStore'] = $dir . '/parserfunctions/CargoStore.php';
 $wgAutoloadClasses['CargoQuery'] = $dir . '/parserfunctions/CargoQuery.php';
 $wgAutoloadClasses['CargoCompoundQuery'] = $dir . 
'/parserfunctions/CargoCompoundQuery.php';
-$wgAutoloadClasses['CargoSQLQuery'] = $dir . '/CargoSQLQuery.php';
-$wgAutoloadClasses['CargoQueryDisplayer'] = $dir . '/CargoQueryDisplayer.php';
-$wgAutoloadClasses['CargoPageData'] = $dir . '/CargoPageData.php';
-$wgAutoloadClasses['CargoFileData'] = $dir . '/CargoFileData.php';
+$wgAutoloadClasses['CargoSQLQuery'] = $dir . '/includes/CargoSQLQuery.php';
+$wgAutoloadClasses['CargoQueryDisplayer'] = $dir . 
'/includes/CargoQueryDisplayer.php';
+$wgAutoloadClasses['CargoPageData'] = $dir . '/includes/CargoPageData.php';
+$wgAutoloadClasses['CargoFileData'] = $dir . '/includes/CargoFileData.php';
 $wgAutoloadClasses['CargoRecurringEvent'] = $dir . 
'/parserfunctions/CargoRecurringEvent.php';
 $wgAutoloadClasses['CargoDisplayMap'] = $dir . 
'/parserfunctions/CargoDisplayMap.php';
-$wgAutoloadClasses['CargoPopulateTableJob'] = $dir . 
'/CargoPopulateTableJob.php';
-$wgAutoloadClasses['CargoRecreateDataAction'] = $dir . 
'/CargoRecreateDataAction.php';
+$wgAutoloadClasses['CargoPopulateTableJob'] = $dir . 
'/includes/CargoPopulateTableJob.php';
+$wgAutoloadClasses['CargoRecreateDataAction'] = $dir . 
'/includes/CargoRecreateDataAction.php';
 $wgAutoloadClasses['CargoRecreateData'] = $dir . 
'/specials/CargoRecreateData.php';
 $wgSpecialPages['CargoTables'] = 'CargoTables';
 $wgAutoloadClasses['CargoTables'] = $dir . '/specials/CargoTables.php';
@@ -106,7 +106,7 @@
 $wgAutoloadClasses['ViewDataPage'] = $dir . '/specials/CargoViewData.php';
 $wgSpecialPages['CargoExport'] = 'CargoExport';
 $wgAutoloadClasses['CargoExport'] = $dir . '/specials/CargoExport.php';
-$wgAutoloadClasses['CargoPageValuesAction'] = $dir . 
'/CargoPageValuesAction.php';
+$wgAutoloadClasses['CargoPageValuesAction'] = $dir . 
'/includes/CargoPageValuesAction.php';
 $wgSpecialPages['PageValues'] = 'CargoPageValues';
 $wgAutoloadClasses['CargoPageValues'] = $dir . '/specials/CargoPageValues.php';
 $wgAutoloadClasses['CargoQueryAPI'] = $dir . '/api/CargoQueryAPI.php';
@@ -146,7 +146,7 @@
 $wgAutoloadClasses['CargoExhibitFormat'] = $dir . 
'/formats/CargoExhibitFormat.php';
 $wgAutoloadClasses['CargoSearchMySQL'] = $dir . '/search/CargoSearchMySQL.php';
 
-$wgAutoloadClasses['CargoPageSchemas'] = $dir . '/CargoPageSchemas.php';
+$wgAutoloadClasses['CargoPageSchemas'] = $dir . 
'/includes/CargoPageSchemas.php';
 
 // Drilldown
 $wgAutoloadClasses['CargoAppliedFilter'] = $dir . 
'/drilldown/CargoAppliedFilter.php';
diff --git a/extension.json b/extension.json
index 629d971..441e82e 100644
--- a/extension.json
+++ b/extension.json
@@ -43,23 +43,23 @@
},
"AutoloadClasses": {
"CargoHooks": "Cargo.hooks.php",
-   "CargoUtils": "CargoUtils.php",
-   "CargoFieldDescription": "CargoFieldDescription.php",
-   "CargoTableSchema": "CargoTableSchema.php",
-   "CargoHierarchyTree": 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: New /includes directory

2017-11-06 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389661 )

Change subject: New /includes directory
..

New /includes directory

Change-Id: I26fefdcc6e23412e7daa26dda2e1ad3e67aea98f
---
M Cargo.php
M extension.json
R includes/CargoFieldDescription.php
R includes/CargoFileData.php
R includes/CargoHierarchyTree.php
R includes/CargoPageData.php
R includes/CargoPageSchemas.php
R includes/CargoPageValuesAction.php
R includes/CargoPopulateTableJob.php
R includes/CargoQueryDisplayer.php
R includes/CargoRecreateDataAction.php
R includes/CargoSQLQuery.php
R includes/CargoTableSchema.php
R includes/CargoUtils.php
14 files changed, 24 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/61/389661/2

diff --git a/Cargo.php b/Cargo.php
index 9e89d77..495108e 100644
--- a/Cargo.php
+++ b/Cargo.php
@@ -77,23 +77,23 @@
 
 // Register classes and special pages.
 $wgAutoloadClasses['CargoHooks'] = $dir . '/Cargo.hooks.php';
-$wgAutoloadClasses['CargoUtils'] = $dir . '/CargoUtils.php';
-$wgAutoloadClasses['CargoFieldDescription'] = $dir . 
'/CargoFieldDescription.php';
-$wgAutoloadClasses['CargoTableSchema'] = $dir . '/CargoTableSchema.php';
-$wgAutoloadClasses['CargoHierarchyTree'] = $dir . '/CargoHierarchyTree.php';
+$wgAutoloadClasses['CargoUtils'] = $dir . '/includes/CargoUtils.php';
+$wgAutoloadClasses['CargoFieldDescription'] = $dir . 
'/includes/CargoFieldDescription.php';
+$wgAutoloadClasses['CargoTableSchema'] = $dir . 
'/includes/CargoTableSchema.php';
+$wgAutoloadClasses['CargoHierarchyTree'] = $dir . 
'/includes/CargoHierarchyTree.php';
 $wgAutoloadClasses['CargoDeclare'] = $dir . 
'/parserfunctions/CargoDeclare.php';
 $wgAutoloadClasses['CargoAttach'] = $dir . '/parserfunctions/CargoAttach.php';
 $wgAutoloadClasses['CargoStore'] = $dir . '/parserfunctions/CargoStore.php';
 $wgAutoloadClasses['CargoQuery'] = $dir . '/parserfunctions/CargoQuery.php';
 $wgAutoloadClasses['CargoCompoundQuery'] = $dir . 
'/parserfunctions/CargoCompoundQuery.php';
-$wgAutoloadClasses['CargoSQLQuery'] = $dir . '/CargoSQLQuery.php';
-$wgAutoloadClasses['CargoQueryDisplayer'] = $dir . '/CargoQueryDisplayer.php';
-$wgAutoloadClasses['CargoPageData'] = $dir . '/CargoPageData.php';
-$wgAutoloadClasses['CargoFileData'] = $dir . '/CargoFileData.php';
+$wgAutoloadClasses['CargoSQLQuery'] = $dir . '/includes/CargoSQLQuery.php';
+$wgAutoloadClasses['CargoQueryDisplayer'] = $dir . 
'/includes/CargoQueryDisplayer.php';
+$wgAutoloadClasses['CargoPageData'] = $dir . '/includes/CargoPageData.php';
+$wgAutoloadClasses['CargoFileData'] = $dir . '/includes/CargoFileData.php';
 $wgAutoloadClasses['CargoRecurringEvent'] = $dir . 
'/parserfunctions/CargoRecurringEvent.php';
 $wgAutoloadClasses['CargoDisplayMap'] = $dir . 
'/parserfunctions/CargoDisplayMap.php';
-$wgAutoloadClasses['CargoPopulateTableJob'] = $dir . 
'/CargoPopulateTableJob.php';
-$wgAutoloadClasses['CargoRecreateDataAction'] = $dir . 
'/CargoRecreateDataAction.php';
+$wgAutoloadClasses['CargoPopulateTableJob'] = $dir . 
'/includes/CargoPopulateTableJob.php';
+$wgAutoloadClasses['CargoRecreateDataAction'] = $dir . 
'/includes/CargoRecreateDataAction.php';
 $wgAutoloadClasses['CargoRecreateData'] = $dir . 
'/specials/CargoRecreateData.php';
 $wgSpecialPages['CargoTables'] = 'CargoTables';
 $wgAutoloadClasses['CargoTables'] = $dir . '/specials/CargoTables.php';
@@ -106,7 +106,7 @@
 $wgAutoloadClasses['ViewDataPage'] = $dir . '/specials/CargoViewData.php';
 $wgSpecialPages['CargoExport'] = 'CargoExport';
 $wgAutoloadClasses['CargoExport'] = $dir . '/specials/CargoExport.php';
-$wgAutoloadClasses['CargoPageValuesAction'] = $dir . 
'/CargoPageValuesAction.php';
+$wgAutoloadClasses['CargoPageValuesAction'] = $dir . 
'/includes/CargoPageValuesAction.php';
 $wgSpecialPages['PageValues'] = 'CargoPageValues';
 $wgAutoloadClasses['CargoPageValues'] = $dir . '/specials/CargoPageValues.php';
 $wgAutoloadClasses['CargoQueryAPI'] = $dir . '/api/CargoQueryAPI.php';
@@ -146,7 +146,7 @@
 $wgAutoloadClasses['CargoExhibitFormat'] = $dir . 
'/formats/CargoExhibitFormat.php';
 $wgAutoloadClasses['CargoSearchMySQL'] = $dir . '/search/CargoSearchMySQL.php';
 
-$wgAutoloadClasses['CargoPageSchemas'] = $dir . '/CargoPageSchemas.php';
+$wgAutoloadClasses['CargoPageSchemas'] = $dir . 
'/includes/CargoPageSchemas.php';
 
 // Drilldown
 $wgAutoloadClasses['CargoAppliedFilter'] = $dir . 
'/drilldown/CargoAppliedFilter.php';
diff --git a/extension.json b/extension.json
index 629d971..441e82e 100644
--- a/extension.json
+++ b/extension.json
@@ -43,23 +43,23 @@
},
"AutoloadClasses": {
"CargoHooks": "Cargo.hooks.php",
-   "CargoUtils": "CargoUtils.php",
-   "CargoFieldDescription": "CargoFieldDescription.php",
-   "CargoTableSchema": "CargoTableSchema.php",
-   "CargoHierarchyTree": 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Moving code for adding the toolbar button to its own function

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

Change subject: Moving code for adding the toolbar button to its own function
..


Moving code for adding the toolbar button to its own function

This is to make the code more readable and easier to follow.

Change-Id: I6972038ca8a45bf3d0c119e93cf1af70dd424a82
---
M resources/ext.CodeMirror.js
1 file changed, 33 insertions(+), 26 deletions(-)

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



diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..d72b32b 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -430,6 +430,38 @@
}
 
/**
+* Adds CodeMirror button to the toolbar
+*/
+   function addToolbarButton() {
+   // Check if the user is using the enhanced editing toolbar 
(supplied by the
+   // WikiEditor extension) or the default editing toolbar 
(supplied by core).
+   if ( wikiEditorToolbarEnabled ) {
+   // They are using the enhanced editing toolbar.
+   mw.loader.using( 'ext.wikiEditor.toolbar', function () {
+   // Add CodeMirror button to the enhanced 
editing toolbar.
+   $( addCodeMirrorToWikiEditor );
+   } );
+   } else {
+   // They are using the default editing toolbar.
+   mw.loader.using( 'mediawiki.toolbar', function () {
+   // Add CodeMirror button to the default editing 
toolbar.
+   mw.toolbar.addButton( {
+   speedTip: mw.msg( 
'codemirror-toggle-label' ),
+   imageId: 'mw-editbutton-codemirror',
+   onClick: function () {
+   switchCodeMirror();
+   return false;
+   }
+   } );
+   // We don't know when button will be added, 
wait until the document is ready to update it
+   $( function () {
+   updateToolbarButton();
+   } );
+   } );
+   }
+   }
+
+   /**
 * Add a popup for first time users (T165003)
 *
 * If popup hasn't been shown before, show popup and add a localStorage 
entry.
@@ -500,32 +532,7 @@
 
// If view is in edit mode, add the button to the toolbar.
if ( $( '#wpTextbox1' ).length ) {
-   // Check if the user is using the enhanced editing toolbar 
(supplied by the
-   // WikiEditor extension) or the default editing toolbar 
(supplied by core).
-   if ( wikiEditorToolbarEnabled ) {
-   // They are using the enhanced editing toolbar.
-   mw.loader.using( 'ext.wikiEditor.toolbar', function () {
-   // Add CodeMirror button to the enhanced 
editing toolbar.
-   $( addCodeMirrorToWikiEditor );
-   } );
-   } else {
-   // They are using the default editing toolbar.
-   mw.loader.using( 'mediawiki.toolbar', function () {
-   // Add CodeMirror button to the default editing 
toolbar.
-   mw.toolbar.addButton( {
-   speedTip: mw.msg( 
'codemirror-toggle-label' ),
-   imageId: 'mw-editbutton-codemirror',
-   onClick: function () {
-   switchCodeMirror();
-   return false;
-   }
-   } );
-   // We don't know when button will be added, 
wait until the document is ready to update it
-   $( function () {
-   updateToolbarButton();
-   } );
-   } );
-   }
+   addToolbarButton();
 
// Don't show popup if CM already enabled
if ( !useCodeMirror ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6972038ca8a45bf3d0c119e93cf1af70dd424a82
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Make it possible to subclass SpecialPreferences

2017-11-06 Thread Samwilson (Code Review)
Samwilson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389660 )

Change subject: Make it possible to subclass SpecialPreferences
..

Make it possible to subclass SpecialPreferences

This updates the constructor with all of its arguments,
and makes a method protected rather than private.

Change-Id: I390e9d46fd2b8d4d8a1f9fd250c964a696b48244
---
M includes/specials/SpecialPreferences.php
1 file changed, 10 insertions(+), 3 deletions(-)


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

diff --git a/includes/specials/SpecialPreferences.php 
b/includes/specials/SpecialPreferences.php
index 7c55e5c..f31bacc 100644
--- a/includes/specials/SpecialPreferences.php
+++ b/includes/specials/SpecialPreferences.php
@@ -27,8 +27,15 @@
  * @ingroup SpecialPage
  */
 class SpecialPreferences extends SpecialPage {
-   function __construct() {
-   parent::__construct( 'Preferences' );
+
+   /**
+* @inheritDoc
+*/
+   public function __construct(
+   $name = 'Preferences', $restriction = '', $listed = true,
+   $function = false, $file = '', $includable = false
+   ) {
+   parent::__construct( $name, $restriction, $listed, $function, 
$file, $includable );
}
 
public function doesWrites() {
@@ -127,7 +134,7 @@
return Preferences::getFormObject( $user, $context );
}
 
-   private function showResetForm() {
+   protected function showResetForm() {
if ( !$this->getUser()->isAllowed( 'editmyoptions' ) ) {
throw new PermissionsError( 'editmyoptions' );
}

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

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

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


[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Add hif.wiktionary to whitelist

2017-11-06 Thread Milimetric (Code Review)
Milimetric has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389658 )

Change subject: Add hif.wiktionary to whitelist
..

Add hif.wiktionary to whitelist

Change-Id: I725a786c6ab4c7a1f7a44dbe2cadfa41ec4bb5a0
---
M static_data/pageview/whitelist/whitelist.tsv
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/58/389658/1

diff --git a/static_data/pageview/whitelist/whitelist.tsv 
b/static_data/pageview/whitelist/whitelist.tsv
index 5988e91..afbc9d0 100644
--- a/static_data/pageview/whitelist/whitelist.tsv
+++ b/static_data/pageview/whitelist/whitelist.tsv
@@ -298,6 +298,7 @@
 projecthe.wikivoyage   2015-10-12 00:00:00
 projecthe.wiktionary   2015-10-12 00:00:00
 projecthif.wikipedia   2015-10-12 00:00:00
+projecthif.wiktionary  2017-11-06 00:00:00
 projecthi.wikibooks2015-10-12 00:00:00
 projecthi.wikipedia2015-10-12 00:00:00
 projecthi.wikiquote2015-10-12 00:00:00

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I725a786c6ab4c7a1f7a44dbe2cadfa41ec4bb5a0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
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] oojs/ui[master]: demos: Correct and simplify SimpleWidget styles

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

Change subject: demos: Correct and simplify SimpleWidget styles
..

demos: Correct and simplify SimpleWidget styles

* This widget does not mix in IndicatorElement, therefore all styles
  for `.oo-ui-indicatorElement` and `.oo-ui-indicatorElement-indicator`
  are unnecessary.
* Remove unnecessary duplicate styles for `.oo-ui-iconElement-icon`.
  Out of `top`, `bottom`, `left`, `right`, and `height`, we actually
  only need to set `left` here, others are already set in IconElement
  styles or superfluous.
* `.demo-simpleWidget` can never also be a `.oo-ui-labelElement-label`
  (the label is a child element), correct this to instead apply to
  `.demo-simpleWidget.oo-ui-labelElement`.
* Reorder stuff a little bit to keep related styles closer.

Change-Id: I4de8df280ae32fdd75a2db7d47a117d9e2c5a06a
---
M demos/classes/SimpleWidget.css
1 file changed, 3 insertions(+), 20 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/59/389659/1

diff --git a/demos/classes/SimpleWidget.css b/demos/classes/SimpleWidget.css
index b7f501f..04f0844 100644
--- a/demos/classes/SimpleWidget.css
+++ b/demos/classes/SimpleWidget.css
@@ -5,10 +5,8 @@
line-height: 1;
 }
 
-.demo-simpleWidget.oo-ui-iconElement .oo-ui-iconElement-icon,
-.demo-simpleWidget.oo-ui-indicatorElement .oo-ui-indicatorElement-indicator {
-   top: 0;
-   height: 100%;
+.demo-simpleWidget.oo-ui-labelElement {
+   line-height: 1.172em;
 }
 
 .demo-simpleWidget.oo-ui-iconElement {
@@ -17,24 +15,9 @@
 
 .demo-simpleWidget.oo-ui-iconElement .oo-ui-iconElement-icon {
position: absolute;
-   bottom: 0;
-   right: 0;
left: 0.9375em;
 }
 
-.demo-simpleWidget.oo-ui-labelElement-label {
-   line-height: 1.172em;
-}
-
-.demo-simpleWidget.oo-ui-indicatorElement {
-   padding-right: 2.5em;
-}
-
-.demo-simpleWidget.oo-ui-indicatorElement-indicator {
-   right: 0.9375em;
-}
-
-.demo-simpleWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon,
-.demo-simpleWidget.oo-ui-widget-disabled .oo-ui-indicatorElement-indicator {
+.demo-simpleWidget.oo-ui-widget-disabled .oo-ui-iconElement-icon {
opacity: 0.51;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4de8df280ae32fdd75a2db7d47a117d9e2c5a06a
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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] analytics/refinery[master]: Add hif.wiktionary to whitelist

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

Change subject: Add hif.wiktionary to whitelist
..


Add hif.wiktionary to whitelist

Change-Id: I725a786c6ab4c7a1f7a44dbe2cadfa41ec4bb5a0
---
M static_data/pageview/whitelist/whitelist.tsv
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/static_data/pageview/whitelist/whitelist.tsv 
b/static_data/pageview/whitelist/whitelist.tsv
index 5988e91..afbc9d0 100644
--- a/static_data/pageview/whitelist/whitelist.tsv
+++ b/static_data/pageview/whitelist/whitelist.tsv
@@ -298,6 +298,7 @@
 projecthe.wikivoyage   2015-10-12 00:00:00
 projecthe.wiktionary   2015-10-12 00:00:00
 projecthif.wikipedia   2015-10-12 00:00:00
+projecthif.wiktionary  2017-11-06 00:00:00
 projecthi.wikibooks2015-10-12 00:00:00
 projecthi.wikipedia2015-10-12 00:00:00
 projecthi.wikiquote2015-10-12 00:00:00

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I725a786c6ab4c7a1f7a44dbe2cadfa41ec4bb5a0
Gerrit-PatchSet: 1
Gerrit-Project: analytics/refinery
Gerrit-Branch: master
Gerrit-Owner: Milimetric 
Gerrit-Reviewer: Milimetric 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: PostgresSQL, add support for stretch and PG9.6

2017-11-06 Thread Ayounsi (Code Review)
Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389657 )

Change subject: PostgresSQL, add support for stretch and PG9.6
..

PostgresSQL, add support for stretch and PG9.6

Change-Id: I92bdf10814e1ca0a92306699f3f68302e5f02672
---
M modules/postgresql/manifests/dirs.pp
M modules/postgresql/manifests/master.pp
M modules/postgresql/manifests/postgis.pp
M modules/postgresql/manifests/server.pp
M modules/postgresql/manifests/slave.pp
M modules/postgresql/manifests/user.pp
6 files changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/modules/postgresql/manifests/dirs.pp 
b/modules/postgresql/manifests/dirs.pp
index 4af5956..5d6cae1 100644
--- a/modules/postgresql/manifests/dirs.pp
+++ b/modules/postgresql/manifests/dirs.pp
@@ -25,6 +25,7 @@
 #
 class postgresql::dirs(
 $pgversion= $::lsbdistcodename ? {
+'stretch' => '9.6',
 'jessie'  => '9.4',
 'trusty'  => '9.3',
 },
diff --git a/modules/postgresql/manifests/master.pp 
b/modules/postgresql/manifests/master.pp
index 0708f4d..dc42a64 100644
--- a/modules/postgresql/manifests/master.pp
+++ b/modules/postgresql/manifests/master.pp
@@ -38,6 +38,7 @@
 $master_server=$::fqdn,
 $includes=[],
 $pgversion = $::lsbdistcodename ? {
+'stretch' => '9.6',
 'jessie'  => '9.4',
 'trusty'  => '9.3',
 },
diff --git a/modules/postgresql/manifests/postgis.pp 
b/modules/postgresql/manifests/postgis.pp
index b553ac8..e0e7286 100644
--- a/modules/postgresql/manifests/postgis.pp
+++ b/modules/postgresql/manifests/postgis.pp
@@ -15,6 +15,7 @@
 class postgresql::postgis(
 $ensure = 'present',
 $postgresql_postgis_package = $::lsbdistcodename ? {
+'stretch' => 'postgresql-9.6-postgis-2.3',
 'jessie'  => 'postgresql-9.4-postgis-2.3',
 'trusty'  => 'postgresql-9.3-postgis-2.1',
 },
diff --git a/modules/postgresql/manifests/server.pp 
b/modules/postgresql/manifests/server.pp
index 3aaf37e..72aaf3d 100644
--- a/modules/postgresql/manifests/server.pp
+++ b/modules/postgresql/manifests/server.pp
@@ -28,6 +28,7 @@
 #
 class postgresql::server(
 $pgversion= $::lsbdistcodename ? {
+'stretch' => '9.6',
 'jessie'  => '9.4',
 'trusty'  => '9.3',
 },
diff --git a/modules/postgresql/manifests/slave.pp 
b/modules/postgresql/manifests/slave.pp
index df9c1fb..b334bb1 100644
--- a/modules/postgresql/manifests/slave.pp
+++ b/modules/postgresql/manifests/slave.pp
@@ -33,6 +33,7 @@
 $replication_pass,
 $includes=[],
 $pgversion = $::lsbdistcodename ? {
+'stretch' => '9.6',
 'jessie'  => '9.4',
 'trusty'  => '9.3',
 },
diff --git a/modules/postgresql/manifests/user.pp 
b/modules/postgresql/manifests/user.pp
index 8bae59c..6217a2c 100644
--- a/modules/postgresql/manifests/user.pp
+++ b/modules/postgresql/manifests/user.pp
@@ -32,6 +32,7 @@
 $method = 'md5',
 $cidr = '127.0.0.1/32',
 $pgversion = $::lsbdistcodename ? {
+'stretch' => '9.6',
 'jessie'  => '9.4',
 'trusty'  => '9.3',
 },

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...OAuth[master]: Add missing static keyword for doUserIdMerge

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

Change subject: Add missing static keyword for doUserIdMerge
..


Add missing static keyword for doUserIdMerge

Bug: T179891
Change-Id: If4be92dffa41fc1deaf4b8e8422441f73a656e6c
---
M backend/MWOAuth.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/backend/MWOAuth.hooks.php b/backend/MWOAuth.hooks.php
index 42683e9..b561a8e 100644
--- a/backend/MWOAuth.hooks.php
+++ b/backend/MWOAuth.hooks.php
@@ -70,7 +70,7 @@
return true;
}
 
-   protected function doUserIdMerge( $oldid, $newid ) {
+   protected static function doUserIdMerge( $oldid, $newid ) {
$dbw = MWOAuthUtils::getCentralDB( DB_MASTER );
// Merge any consumers register to this user
$dbw->update( 'oauth_registered_consumer',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4be92dffa41fc1deaf4b8e8422441f73a656e6c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Bartosz Dziewoński 
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...CodeMirror[master]: Make textbox height flexible with CodeMirror

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

Change subject: Make textbox height flexible with CodeMirror
..


Make textbox height flexible with CodeMirror

Bug: T170906
Bug: T176449 (hopefully)
Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
---
M extension.json
M resources/ext.CodeMirror.js
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/extension.json b/extension.json
index 51b67fe..3f259bb 100644
--- a/extension.json
+++ b/extension.json
@@ -33,7 +33,8 @@
"mediawiki.user",
"user.options",
"oojs-ui-widgets",
-   "mediawiki.storage"
+   "mediawiki.storage",
+   "jquery.ui.resizable"
],
"scripts": [
"ext.CodeMirror.js"
diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..4fa862f 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -324,6 +324,13 @@
 
$codeMirror = $( codeMirror.getWrapperElement() );
 
+   $codeMirror.resizable( {
+   handles: 'se',
+   resize: function ( event, ui ) {
+   ui.size.width = ui.originalSize.width;
+   }
+   } );
+
codeMirror.doc.setSelection( 
codeMirror.doc.posFromIndex( selectionEnd ), codeMirror.doc.posFromIndex( 
selectionStart ) );
codeMirror.scrollTo( null, scrollTop );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Niharika29 
Gerrit-Reviewer: Kaldari 
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]: Add missing static keyword for doUserIdMerge

2017-11-06 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389656 )

Change subject: Add missing static keyword for doUserIdMerge
..

Add missing static keyword for doUserIdMerge

Bug: T179891
Change-Id: If4be92dffa41fc1deaf4b8e8422441f73a656e6c
---
M backend/MWOAuth.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OAuth 
refs/changes/56/389656/2

diff --git a/backend/MWOAuth.hooks.php b/backend/MWOAuth.hooks.php
index 42683e9..b561a8e 100644
--- a/backend/MWOAuth.hooks.php
+++ b/backend/MWOAuth.hooks.php
@@ -70,7 +70,7 @@
return true;
}
 
-   protected function doUserIdMerge( $oldid, $newid ) {
+   protected static function doUserIdMerge( $oldid, $newid ) {
$dbw = MWOAuthUtils::getCentralDB( DB_MASTER );
// Merge any consumers register to this user
$dbw->update( 'oauth_registered_consumer',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4be92dffa41fc1deaf4b8e8422441f73a656e6c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/OAuth
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...UserMerge[master]: Convert Special:UserMerge to use OOUI

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

Change subject: Convert Special:UserMerge to use OOUI
..


Convert Special:UserMerge to use OOUI

Bug: T137017
Change-Id: I0a7a37ca697f9f789a271e4ecedfbd963b68f9d9
---
M SpecialUserMerge.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/SpecialUserMerge.php b/SpecialUserMerge.php
index 9af48d5..e226ec9 100644
--- a/SpecialUserMerge.php
+++ b/SpecialUserMerge.php
@@ -109,7 +109,6 @@
 */
protected function alterForm( HTMLForm $form ) {
$form->setSubmitTextMsg( 'usermerge-submit' );
-   $form->setWrapperLegendMsg( 'usermerge-fieldset' );
}
 
/**
@@ -171,6 +170,10 @@
return Status::newGood();
}
 
+   protected function getDisplayFormat() {
+   return 'ooui';
+   }
+
protected function getGroupName() {
return 'users';
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0a7a37ca697f9f789a271e4ecedfbd963b68f9d9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UserMerge
Gerrit-Branch: master
Gerrit-Owner: Sethakill 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: 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] operations...libvmod-netmapper[master]: Swap git.wikimedia.org -> phabricator.wikimedia.org

2017-11-06 Thread Chad (Code Review)
Hello BBlack,

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

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

to review the following change.


Change subject: Swap git.wikimedia.org -> phabricator.wikimedia.org
..

Swap git.wikimedia.org -> phabricator.wikimedia.org

Bug: T139089
Change-Id: I1d9a9ff745be42c87bad34cd9ac86b8cb0b35a88
---
M configure.ac
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/operations/software/varnish/libvmod-netmapper 
refs/changes/55/389655/1

diff --git a/configure.ac b/configure.ac
index 7bda489..a0200da 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,6 @@
 AC_PREREQ(2.59)
 AC_COPYRIGHT([Copyright (c) 2013-2017 Brandon Black ])
-AC_INIT([libvmod-netmapper],[1.5],[bbl...@wikimedia.org],[libvmod-netmapper],[https://git.wikimedia.org/summary/operations%2Fsoftware%2Fvarnish%2Flibvmod-netmapper])
+AC_INIT([libvmod-netmapper],[1.5],[bbl...@wikimedia.org],[libvmod-netmapper],[https://phabricator.wikimedia.org/diffusion/OSVL/])
 AC_CONFIG_MACRO_DIR([m4])
 m4_ifndef([VARNISH_VMOD_INCLUDES], AC_MSG_ERROR([Need varnish.m4]))
 AC_CONFIG_AUX_DIR([acaux])

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d9a9ff745be42c87bad34cd9ac86b8cb0b35a88
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/libvmod-netmapper
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: BBlack 

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


[MediaWiki-commits] [Gerrit] labs/private[master]: Add non-secret password for netbox DB replication

2017-11-06 Thread Ayounsi (Code Review)
Ayounsi has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389654 )

Change subject: Add non-secret password for netbox DB replication
..


Add non-secret password for netbox DB replication

Change-Id: I2db8efb3b3d5676fb0ae90954251fec8a0e87a08
---
M modules/passwords/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index e4e9274..136aa7e 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -507,4 +507,5 @@
 class passwords::netbox {
 $db_password = 'notsecret'
 $secret_key = 'notsecret'
+$replication_password = 'notsecret'
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2db8efb3b3d5676fb0ae90954251fec8a0e87a08
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Ayounsi 
Gerrit-Reviewer: Ayounsi 

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


[MediaWiki-commits] [Gerrit] labs/private[master]: Add non-secret password for netbox DB replication

2017-11-06 Thread Ayounsi (Code Review)
Ayounsi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389654 )

Change subject: Add non-secret password for netbox DB replication
..

Add non-secret password for netbox DB replication

Change-Id: I2db8efb3b3d5676fb0ae90954251fec8a0e87a08
---
M modules/passwords/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/54/389654/1

diff --git a/modules/passwords/manifests/init.pp 
b/modules/passwords/manifests/init.pp
index e4e9274..136aa7e 100644
--- a/modules/passwords/manifests/init.pp
+++ b/modules/passwords/manifests/init.pp
@@ -507,4 +507,5 @@
 class passwords::netbox {
 $db_password = 'notsecret'
 $secret_key = 'notsecret'
+$replication_password = 'notsecret'
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2db8efb3b3d5676fb0ae90954251fec8a0e87a08
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
Gerrit-Branch: master
Gerrit-Owner: Ayounsi 

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


[MediaWiki-commits] [Gerrit] mediawiki...GeoData[master]: Improve API documentation

2017-11-06 Thread Code Review
Gergő Tisza has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389653 )

Change subject: Improve API documentation
..

Improve API documentation

Change-Id: I385530c628503441e6a43aff4fc00bc12757ad20
---
M i18n/en.json
M i18n/qqq.json
M includes/api/ApiQueryGeoSearch.php
3 files changed, 32 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GeoData 
refs/changes/53/389653/1

diff --git a/i18n/en.json b/i18n/en.json
index 4a6d841..3d9335c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -25,8 +25,17 @@
"apihelp-query+coordinates-description": "Returns coordinates of the 
given pages.",
"apihelp-query+coordinates-summary": "Returns coordinates of the given 
pages.",
"apihelp-query+coordinates-param-limit": "How many coordinates to 
return.",
-   "apihelp-query+coordinates-param-prop": "Which additional coordinate 
properties to return.",
-   "apihelp-query+coordinates-param-primary": "Whether to return only 
primary coordinates (\"primary\"), secondary (\"secondary\") or both 
(\"all\").",
+   "apihelp-query+coordinates-param-prop": "Which additional coordinate 
properties to return. (Properties that are always returned: lat, 
lon, and either primary or secondary as a 
boolean flag.)",
+   "apihelp-query+coordinates-paramvalue-prop-type": "Type of the object 
the coordinates point to. See [[mw:Extension:GeoData#Usage]] for details.",
+   "apihelp-query+coordinates-paramvalue-prop-name": "Name of the object.",
+   "apihelp-query+coordinates-paramvalue-prop-dim": "Approximate size of 
the object in meters.",
+   "apihelp-query+coordinates-paramvalue-prop-country": "ISO 3166-1 
alpha-2 country code (e.g. US or RU).",
+   "apihelp-query+coordinates-paramvalue-prop-region": "ISO 3166-2 region 
code (the part of the ISO 3166-2 code after the dash; e.g. FL or 
MOS).",
+   "apihelp-query+coordinates-paramvalue-prop-globe": "Which terrestrial 
body the coordinates are relative to (e.g. moon or 
pluto). Defaults to Earth. See [[mw:Extension:GeoData#Glossary]] 
for details.",
+   "apihelp-query+coordinates-param-primary": "What kind of coordinates to 
return (primary or secondary).",
+   "apihelp-query+coordinates-paramvalue-primary-primary": "The location 
of the subject of the article. There is at most one primary coordinate per 
title.",
+   "apihelp-query+coordinates-paramvalue-primary-secondary": "The location 
of some object that's mentioned in the article. Any number of secondary 
coordinates can be associated with a title.",
+   "apihelp-query+coordinates-paramvalue-primary-all": "Return both 
primary and secondary coordinates.",
"apihelp-query+coordinates-param-distancefrompoint": "Return distance 
in meters from the geographical coordinates of every valid result from the 
given coordinates.",
"apihelp-query+coordinates-param-distancefrompage": "Return distance in 
meters from the geographical coordinates of every valid result from the 
coordinates of this page.",
"apihelp-query+coordinates-example-1": "Get a list of coordinates of 
the [[Main Page]]",
@@ -38,7 +47,7 @@
"apihelp-query+geosearch-param-radius": "Search radius in meters.",
"apihelp-query+geosearch-param-maxdim": "Restrict search to objects no 
larger than this, in meters.",
"apihelp-query+geosearch-param-limit": "Maximum number of pages to 
return.",
-   "apihelp-query+geosearch-param-globe": "Globe to search on (by default 
\"earth\").",
+   "apihelp-query+geosearch-param-globe": "Globe to search on (by default 
\"earth\"). See [[mw:Extension:GeoData#Glossary]] for details.",
"apihelp-query+geosearch-param-namespace": "Namespaces to search.",
"apihelp-query+geosearch-param-prop": "Which additional coordinate 
properties to return.",
"apihelp-query+geosearch-param-primary": "Whether to return only 
primary coordinates (\"primary\"), secondary (\"secondary\") or both 
(\"all\").",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 78382c2..30c4c66 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -30,7 +30,16 @@
"apihelp-query+coordinates-summary": 
"{{doc-apihelp-summary|query+coordinates}}",
"apihelp-query+coordinates-param-limit": 
"{{doc-apihelp-param|query+coordinates|limit}}",
"apihelp-query+coordinates-param-prop": 
"{{doc-apihelp-param|query+coordinates|prop}}",
+   "apihelp-query+coordinates-paramvalue-prop-type": 
"{{doc-apihelp-paramvalue|query+coordinates|prop|type}}",
+   "apihelp-query+coordinates-paramvalue-prop-name": 
"{{doc-apihelp-paramvalue|query+coordinates|prop|name}}",
+   "apihelp-query+coordinates-paramvalue-prop-dim": 
"{{doc-apihelp-paramvalue|query+coordinates|prop|dim}}",
+   "apihelp-query+coordinates-paramvalue-prop-country": 
"{{doc-apihelp-paramvalue|query+coordinates|prop|country}}",
+   

[MediaWiki-commits] [Gerrit] wikimedia/wikimania-scholarships[master]: Fix a few remaining git.wikimedia.org references

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

Change subject: Fix a few remaining git.wikimedia.org references
..


Fix a few remaining git.wikimedia.org references

Bug: T139089
Change-Id: Iee738412cc8baa2ca462402171140deb0adc004f
---
M data/i18n/en-gb.json
M data/i18n/id.json
M data/i18n/mk.json
M data/i18n/sq.json
M data/i18n/tr.json
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/data/i18n/en-gb.json b/data/i18n/en-gb.json
index 8eb5955..b54738a 100644
--- a/data/i18n/en-gb.json
+++ b/data/i18n/en-gb.json
@@ -149,7 +149,7 @@
"contact-us": "Contact us",
"contact-page": "Email: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Credits & licencing",
-   "credits-page": "The Wikimania scholarships software is open source and 
available
 under the http://www.gnu.org/copyleft/gpl.html\;>GNU General Public 
Licence 3.0.\n\nThe code is based on the Wikimania scholarships 
system used for Wikimania 2009, 2010, 2011, 2012 and 2013.",
+   "credits-page": "The Wikimania scholarships software is open source and 
https://phabricator.wikimedia.org/diffusion/WWSC/\;>available 
under the http://www.gnu.org/copyleft/gpl.html\;>GNU General Public 
Licence 3.0.\n\nThe code is based on the Wikimania scholarships 
system used for Wikimania 2009, 2010, 2011, 2012 and 2013.",
"help-translate": "Help translate",
"translate-page": "We would like the scholarship application system 
translated into as many languages as possible.\n\nPlease request 
translator rights at translatewiki.net and 
after that you can start
 translating.",
"footer-faq": "faq",
diff --git a/data/i18n/id.json b/data/i18n/id.json
index 7b1578b..d69853b 100644
--- a/data/i18n/id.json
+++ b/data/i18n/id.json
@@ -96,7 +96,7 @@
"contact-us": "Hubungi kami",
"contact-page": "Surel: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Kredit & lisensi",
-   "credits-page": "Perangkat lunak beasiswa Wikimania bersifat sumber 
terbuka dan tersedia
 di bawah http://www.gnu.org/copyleft/gpl.html\;>Lisensi GNU General 
Public 3.0.\n\nKodenya diambil dari sistem beasiswa Wikimania yang 
digunakan untuk Wikimania 2009, 2010, 2011, 2012, dan 2013.",
+   "credits-page": "Perangkat lunak beasiswa Wikimania bersifat sumber 
terbuka dan https://phabricator.wikimedia.org/diffusion/WWSC/\;>tersedia di 
bawah http://www.gnu.org/copyleft/gpl.html\;>Lisensi GNU General 
Public 3.0.\n\nKodenya diambil dari sistem beasiswa Wikimania yang 
digunakan untuk Wikimania 2009, 2010, 2011, 2012, dan 2013.",
"help-translate": "Bantu terjemahkan",
"translate-page": "Kami ingin sistem formulir beasiswa diterjemahkan ke 
berbagai bahasa.\n\nHarap mengajukan permohonan hak penerjemah di translatewiki.net dan setelah itu Anda bisa mulai
 menerjemahkan.",
"footer-faq": "faq",
diff --git a/data/i18n/mk.json b/data/i18n/mk.json
index 5689c6b..2e96153 100644
--- a/data/i18n/mk.json
+++ b/data/i18n/mk.json
@@ -131,7 +131,7 @@
"contact-us": "Контактирајте нè",
"contact-page": "Е-пошта: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Припис и лиценцирање",
-   "credits-page": "Програмот за стипендии за Викиманија има отворен код и 
е достапен
 под http://www.gnu.org/copyleft/gpl.html\;>ГНУ-овата општа јавна 
лиценца 3.0.\n\nКодот се заснова на системот за стипендии што се 
користеше за Викиманија 2009, 2010, 2011, 2012 и 2013.",
+   "credits-page": "Програмот за стипендии за Викиманија има отворен код и 
е https://phabricator.wikimedia.org/diffusion/WWSC/\;>достапен 
под http://www.gnu.org/copyleft/gpl.html\;>ГНУ-овата општа јавна 
лиценца 3.0.\n\nКодот се заснова на системот за стипендии што се 
користеше за Викиманија 2009, 2010, 2011, 2012 и 2013.",
"help-translate": "Помогнете со преводот",
"translate-page": "Би сакале системот за пријавување за стипендии да се 
преведе на што повеќе јазици.\n\nПобарајте преведувачки права на translatewiki.net и потоа ќе можете да почнете
 со преведување.",
"footer-faq": "чпп",
diff --git a/data/i18n/sq.json b/data/i18n/sq.json
index adb81e3..6c6c282 100644
--- a/data/i18n/sq.json
+++ b/data/i18n/sq.json
@@ -144,7 +144,7 @@
"contact-us": "Na kontaktoni",
"contact-page": "Email: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Kreditet & licencimi",
-   "credits-page": "Software i bursave Wikimania është me burim të hapur 
dhe në 
dispozicion nën http://www.gnu.org/copyleft/gpl.html\;>GNU 
General public License 3.0.\n\nKodi është e bazuar në sistemin e 
bursave Wikimania, të 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update wikimedia-page-library to 4.7.3.

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

Change subject: Update wikimedia-page-library to 4.7.3.
..


Update wikimedia-page-library to 4.7.3.

This includes a nice optimization when collapsing tables.

Change-Id: Iee5903231bac995a7ebcae8770b4d87ec97cd197
---
M app/src/main/assets/bundle.js
M app/src/main/assets/preview.js
M www/package-lock.json
M www/package.json
4 files changed, 28 insertions(+), 74 deletions(-)

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



diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index 9b1c1c7..e051ede 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -1273,45 +1273,21 @@
  */
 var getTableHeader = function getTableHeader(element, pageTitle) {
   var thArray = [];
-
-  if (!element.children) {
-return thArray;
-  }
-
-  for (var i = 0; i < element.children.length; i++) {
-var el = element.children[i];
-
-if (el.tagName === 'TH') {
-  // ok, we have a TH element!
-  // However, if it contains more than two links, then ignore it, because
-  // it will probably appear weird when rendered as plain text.
-  var aNodes = el.querySelectorAll('a');
-  // todo: these conditionals are very confusing. Rewrite by extracting a
-  //   method or simplify.
-  if (aNodes.length < 3) {
-// todo: remove nonstandard Element.innerText usage
-// Also ignore it if it's identical to the page title.
-if ((el.innerText && el.innerText.length || el.textContent.length) > 0 
&& el.innerText !== pageTitle && el.textContent !== pageTitle && el.innerHTML 
!== pageTitle) {
-  thArray.push(el.innerText || el.textContent);
-}
+  var headers = Polyfill.querySelectorAll(element, 'th');
+  for (var i = 0; i < headers.length; ++i) {
+var header = headers[i];
+var anchors = Polyfill.querySelectorAll(header, 'a');
+if (anchors.length < 3) {
+  // Also ignore it if it's identical to the page title.
+  if ((header.textContent && header.textContent.length) > 0 && 
header.textContent !== pageTitle && header.innerHTML !== pageTitle) {
+thArray.push(header.textContent);
   }
 }
-
-// if it's a table within a table, don't worry about it
-if (el.tagName === 'TABLE') {
-  continue;
-}
-
-// todo: why do we need to recurse?
-// recurse into children of this element
-var ret = getTableHeader(el, pageTitle);
-
-// did we get a list of TH from this child?
-if (ret.length > 0) {
-  thArray = thArray.concat(ret);
+if (thArray.length === 2) {
+  // 'newCaption' only ever uses the first 2 items.
+  break;
 }
   }
-
   return thArray;
 };
 
@@ -2009,7 +1985,8 @@
   lastEdited: 2,
   pageIssues: 3,
   disambiguation: 4,
-  coordinate: 5
+  coordinate: 5,
+  talkPage: 6
 };
 
 /**
diff --git a/app/src/main/assets/preview.js b/app/src/main/assets/preview.js
index c890a04..73a1a24 100644
--- a/app/src/main/assets/preview.js
+++ b/app/src/main/assets/preview.js
@@ -456,45 +456,21 @@
  */
 var getTableHeader = function getTableHeader(element, pageTitle) {
   var thArray = [];
-
-  if (!element.children) {
-return thArray;
-  }
-
-  for (var i = 0; i < element.children.length; i++) {
-var el = element.children[i];
-
-if (el.tagName === 'TH') {
-  // ok, we have a TH element!
-  // However, if it contains more than two links, then ignore it, because
-  // it will probably appear weird when rendered as plain text.
-  var aNodes = el.querySelectorAll('a');
-  // todo: these conditionals are very confusing. Rewrite by extracting a
-  //   method or simplify.
-  if (aNodes.length < 3) {
-// todo: remove nonstandard Element.innerText usage
-// Also ignore it if it's identical to the page title.
-if ((el.innerText && el.innerText.length || el.textContent.length) > 0 
&& el.innerText !== pageTitle && el.textContent !== pageTitle && el.innerHTML 
!== pageTitle) {
-  thArray.push(el.innerText || el.textContent);
-}
+  var headers = Polyfill.querySelectorAll(element, 'th');
+  for (var i = 0; i < headers.length; ++i) {
+var header = headers[i];
+var anchors = Polyfill.querySelectorAll(header, 'a');
+if (anchors.length < 3) {
+  // Also ignore it if it's identical to the page title.
+  if ((header.textContent && header.textContent.length) > 0 && 
header.textContent !== pageTitle && header.innerHTML !== pageTitle) {
+thArray.push(header.textContent);
   }
 }
-
-// if it's a table within a table, don't worry about it
-if (el.tagName === 'TABLE') {
-  continue;
-}
-
-// todo: why do we need to recurse?
-// recurse into children of this element
-var ret = getTableHeader(el, pageTitle);
-
-// did we get a list of TH from 

[MediaWiki-commits] [Gerrit] wikimedia/wikimania-scholarships[master]: Fix a few remaining git.wikimedia.org references

2017-11-06 Thread Chad (Code Review)
Chad has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389652 )

Change subject: Fix a few remaining git.wikimedia.org references
..

Fix a few remaining git.wikimedia.org references

Bug: T139089
Change-Id: Iee738412cc8baa2ca462402171140deb0adc004f
---
M data/i18n/en-gb.json
M data/i18n/id.json
M data/i18n/mk.json
M data/i18n/sq.json
M data/i18n/tr.json
5 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/wikimania-scholarships 
refs/changes/52/389652/1

diff --git a/data/i18n/en-gb.json b/data/i18n/en-gb.json
index 8eb5955..b54738a 100644
--- a/data/i18n/en-gb.json
+++ b/data/i18n/en-gb.json
@@ -149,7 +149,7 @@
"contact-us": "Contact us",
"contact-page": "Email: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Credits & licencing",
-   "credits-page": "The Wikimania scholarships software is open source and 
available
 under the http://www.gnu.org/copyleft/gpl.html\;>GNU General Public 
Licence 3.0.\n\nThe code is based on the Wikimania scholarships 
system used for Wikimania 2009, 2010, 2011, 2012 and 2013.",
+   "credits-page": "The Wikimania scholarships software is open source and 
https://phabricator.wikimedia.org/diffusion/WWSC/\;>available 
under the http://www.gnu.org/copyleft/gpl.html\;>GNU General Public 
Licence 3.0.\n\nThe code is based on the Wikimania scholarships 
system used for Wikimania 2009, 2010, 2011, 2012 and 2013.",
"help-translate": "Help translate",
"translate-page": "We would like the scholarship application system 
translated into as many languages as possible.\n\nPlease request 
translator rights at translatewiki.net and 
after that you can start
 translating.",
"footer-faq": "faq",
diff --git a/data/i18n/id.json b/data/i18n/id.json
index 7b1578b..d69853b 100644
--- a/data/i18n/id.json
+++ b/data/i18n/id.json
@@ -96,7 +96,7 @@
"contact-us": "Hubungi kami",
"contact-page": "Surel: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Kredit & lisensi",
-   "credits-page": "Perangkat lunak beasiswa Wikimania bersifat sumber 
terbuka dan tersedia
 di bawah http://www.gnu.org/copyleft/gpl.html\;>Lisensi GNU General 
Public 3.0.\n\nKodenya diambil dari sistem beasiswa Wikimania yang 
digunakan untuk Wikimania 2009, 2010, 2011, 2012, dan 2013.",
+   "credits-page": "Perangkat lunak beasiswa Wikimania bersifat sumber 
terbuka dan https://phabricator.wikimedia.org/diffusion/WWSC/\;>tersedia di 
bawah http://www.gnu.org/copyleft/gpl.html\;>Lisensi GNU General 
Public 3.0.\n\nKodenya diambil dari sistem beasiswa Wikimania yang 
digunakan untuk Wikimania 2009, 2010, 2011, 2012, dan 2013.",
"help-translate": "Bantu terjemahkan",
"translate-page": "Kami ingin sistem formulir beasiswa diterjemahkan ke 
berbagai bahasa.\n\nHarap mengajukan permohonan hak penerjemah di translatewiki.net dan setelah itu Anda bisa mulai
 menerjemahkan.",
"footer-faq": "faq",
diff --git a/data/i18n/mk.json b/data/i18n/mk.json
index 5689c6b..2e96153 100644
--- a/data/i18n/mk.json
+++ b/data/i18n/mk.json
@@ -131,7 +131,7 @@
"contact-us": "Контактирајте нè",
"contact-page": "Е-пошта: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Припис и лиценцирање",
-   "credits-page": "Програмот за стипендии за Викиманија има отворен код и 
е достапен
 под http://www.gnu.org/copyleft/gpl.html\;>ГНУ-овата општа јавна 
лиценца 3.0.\n\nКодот се заснова на системот за стипендии што се 
користеше за Викиманија 2009, 2010, 2011, 2012 и 2013.",
+   "credits-page": "Програмот за стипендии за Викиманија има отворен код и 
е https://phabricator.wikimedia.org/diffusion/WWSC/\;>достапен 
под http://www.gnu.org/copyleft/gpl.html\;>ГНУ-овата општа јавна 
лиценца 3.0.\n\nКодот се заснова на системот за стипендии што се 
користеше за Викиманија 2009, 2010, 2011, 2012 и 2013.",
"help-translate": "Помогнете со преводот",
"translate-page": "Би сакале системот за пријавување за стипендии да се 
преведе на што повеќе јазици.\n\nПобарајте преведувачки права на translatewiki.net и потоа ќе можете да почнете
 со преведување.",
"footer-faq": "чпп",
diff --git a/data/i18n/sq.json b/data/i18n/sq.json
index adb81e3..6c6c282 100644
--- a/data/i18n/sq.json
+++ b/data/i18n/sq.json
@@ -144,7 +144,7 @@
"contact-us": "Na kontaktoni",
"contact-page": "Email: mailto:wikimania-scholarsh...@wikimedia.org\;>wikimania-scholarsh...@wikimedia.org",
"credits": "Kreditet & licencimi",
-   "credits-page": "Software i bursave Wikimania është me burim të hapur 
dhe në 
dispozicion nën http://www.gnu.org/copyleft/gpl.html\;>GNU 
General public License 3.0.\n\nKodi është e bazuar në sistemin e 
bursave 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Add dedupetools extension.

2017-11-06 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389650 )

Change subject: Add dedupetools extension.
..

Add dedupetools extension.

This extension contains the code I used to analyse our duplicates. Today I have
added a hook (dedupetools_civicrm_links) to add links to the drop down on the
contact action page to link directly to dedupe search results.

My thinking is to move all our dedupe related custom code to
this extension (& out of wmf_civicrm) over time

Bug: T177999
Change-Id: I0a8e2d6bdc38a4951d9b843a382a17a583c0ed30
---
A sites/default/civicrm/extensions/org.wikimedia.dedupetools/.editorconfig
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/BAO/MergeConflict.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.mgd.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Upgrader.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Upgrader/Base.php
A sites/default/civicrm/extensions/org.wikimedia.dedupetools/LICENSE.txt
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/api/v3/MergeConflict.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/dedupetools.civix.php
A sites/default/civicrm/extensions/org.wikimedia.dedupetools/dedupetools.php
A sites/default/civicrm/extensions/org.wikimedia.dedupetools/info.xml
A sites/default/civicrm/extensions/org.wikimedia.dedupetools/sql/install.sql
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/templates/CRM/Dedupetools/Form/Report/MergeConflict.tpl
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/xml/Schema/CRM/Dedupetools/MergeConflict.entityType.php
A 
sites/default/civicrm/extensions/org.wikimedia.dedupetools/xml/Schema/CRM/Dedupetools/MergeConflict.xml
15 files changed, 2,532 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/50/389650/1

diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.dedupetools/.editorconfig 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/.editorconfig
new file mode 100644
index 000..ccc6a28
--- /dev/null
+++ b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/.editorconfig
@@ -0,0 +1,14 @@
+# Drupal editor configuration normalization
+# @see http://editorconfig.org/
+
+# This is the top-most .editorconfig file; do not search in parent directories.
+root = true
+
+# All files.
+[*]
+end_of_line = LF
+indent_style = space
+indent_size = 2
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/BAO/MergeConflict.php
 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/BAO/MergeConflict.php
new file mode 100644
index 000..3e8a574
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/BAO/MergeConflict.php
@@ -0,0 +1,25 @@
+copyValues($params);
+$instance->save();
+CRM_Utils_Hook::post($hook, $entityName, $instance->id, $instance);
+
+return $instance;
+  } */
+
+}
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.mgd.php
 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.mgd.php
new file mode 100644
index 000..556d6f5
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.mgd.php
@@ -0,0 +1,21 @@
+http://wiki.civicrm.org/confluence/display/CRMDOC42/Hook+Reference
+return array (
+  0 => 
+  array (
+'name' => 'CRM_Dedupetools_Form_Report_MergeConflict',
+'entity' => 'ReportTemplate',
+'params' => 
+array (
+  'version' => 3,
+  'label' => 'MergeConflict',
+  'description' => 'MergeConflict (org.wikimedia.dedupetools)',
+  'class_name' => 'CRM_Dedupetools_Form_Report_MergeConflict',
+  'report_url' => 'org.wikimedia.dedupetools/mergeconflict',
+  'component' => '',
+),
+  ),
+);
diff --git 
a/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.php
 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.php
new file mode 100644
index 000..d03d505
--- /dev/null
+++ 
b/sites/default/civicrm/extensions/org.wikimedia.dedupetools/CRM/Dedupetools/Form/Report/MergeConflict.php
@@ -0,0 +1,181 @@
+summaryOverlayProfileId = 
CRM_Core_DAO::getFieldValue('CRM_Core_DAO_UFGroup', 'summary_overlay', 'id', 
'name');
+
+$this->_columns = array(
+  'civicrm_merge_conflict' => array(
+'fields' => array(
+  'contact_1' => 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Tidy up dedupe rules & install dedupetools.

2017-11-06 Thread Eileen (Code Review)
Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389651 )

Change subject: Tidy up dedupe rules & install dedupetools.
..

Tidy up dedupe rules & install dedupetools.

My thinking is to move our merge hooks etc into this extension. It contains the 
code
I used for analysing the dupes & now the code for extra links to dedupe

Bug: T177999
Change-Id: Iaa444cc7d232b0f74a19372a8d434f0adf34e4c0
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/51/389651/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 5cb22e5..efbb9d1 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -3228,4 +3228,43 @@
   $dao->update();
 }
   }
+
+  /**
+   * Tidy up our dedupe rules.
+   */
+  function wmf_civicrm_update_7560() {
+ CRM_Core_DAO::executeQuery("UPDATE civicrm_dedupe_rule_group SET name = 
'IndividualSupervised' WHERE name = 'Kaldari Rule-9'");
+ // This didn't cascade right in single query so 2 deletes.
+ CRM_Core_DAO::executeQuery("DELETE r FROM civicrm_dedupe_rule_group rg 
LEFT JOIN civicrm_dedupe_rule r ON r.dedupe_rule_group_id = rg.id WHERE name = 
'IndividualSupervised2_14'");
+CRM_Core_DAO::executeQuery("DELETE FROM civicrm_dedupe_rule_group WHERE 
name = 'IndividualSupervised2_14'");
+
+ $generalRules = CRM_Core_DAO::singleValueQuery(
+   "SELECT count(*) FROM civicrm_dedupe_rule_group WHERE used = 'General' 
AND is_reserved = 1 AND contact_type = 'Individual'"
+ );
+ if ($generalRules === 1) {
+   // We are probably on someone's dev environment. Goal here is to remove 
duff data from prod not mess with people (much).
+   return;
+ }
+CRM_Core_DAO::executeQuery("
+  DELETE r FROM civicrm_dedupe_rule_group rg
+  LEFT JOIN civicrm_dedupe_rule r ON r.dedupe_rule_group_id = rg.id
+  WHERE used = 'General' AND is_reserved = 1 AND contact_type = 
'Individual' AND rg.id IN(10,11)");
+CRM_Core_DAO::executeQuery("
+  DELETE FROM civicrm_dedupe_rule_group
+  WHERE used = 'General' AND is_reserved = 1 AND contact_type = 
'Individual' AND id IN(10,11)");
+
+  }
+
+  /**
+   * Enable dedupe tools.
+   *
+   * This extension is intended to be where our custom dedupe code gets 
transferred to.
+   *
+   * Bug: T177999
+   */
+  function wmf_civicrm_update_7565() {
+civicrm_initialize();
+civicrm_api3('extension', 'refresh', array());
+civicrm_api3('extension', 'install',  array('key' => 
'org.wikimedia.dedupetools'));
+  }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa444cc7d232b0f74a19372a8d434f0adf34e4c0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Customize personal header

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

Change subject: Customize personal header
..

Customize personal header

- Fade into the background. Drop white color for the header.
- Show notification entry points and move user links to dropdown menu.

Bug: T160918
Depends-On: I0ab756cafcbd535fa1765fd12fdd72bb75f0df62
Depends-On: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7
Change-Id: Ib44e7986c83d72d8a79ed51cbf94a0a98960e9d0
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/dashboard/ext.cx.dashboard.js
M modules/dashboard/styles/ext.cx.dashboard.less
M modules/ui/legacy/styles/mw.cx.ui.Columns.less
M modules/ui/legacy/styles/mw.cx.ui.ToolsColumn.less
M modules/ui/mw.cx.ui.Header.js
M modules/ui/styles/mw.cx.ui.Columns.less
M modules/ui/styles/mw.cx.ui.Header.less
A modules/ui/styles/widgets/mw.cx.ui.PersonalMenuWidget.less
A modules/ui/widgets/mw.cx.ui.PersonalMenuWidget.js
M specials/SpecialContentTranslation.php
13 files changed, 376 insertions(+), 66 deletions(-)


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

diff --git a/extension.json b/extension.json
index 78c283f..3df9b79 100644
--- a/extension.json
+++ b/extension.json
@@ -1473,12 +1473,15 @@
"cx-save-draft-save-success",
"cx-save-draft-saving",
"cx-save-draft-tooltip",
+   "cx-personaltools-user",
"login"
],
"dependencies": [
"mw.cx.ui",
"oojs-ui.styles.icons-wikimedia",
-   "mw.cx.ui.Infobar"
+   "oojs-ui.styles.icons-user",
+   "mw.cx.ui.Infobar",
+   "mw.cx.ui.PersonalMenuWidget"
]
},
"mw.cx.ui.Header.skin": {
@@ -2022,6 +2025,17 @@
"oojs-ui.styles.icons-interactions"
]
},
+   "mw.cx.ui.PersonalMenuWidget": {
+   "scripts": [
+   "ui/widgets/mw.cx.ui.PersonalMenuWidget.js"
+   ],
+   "styles": [
+   
"ui/styles/widgets/mw.cx.ui.PersonalMenuWidget.less"
+   ],
+   "dependencies": [
+   "mediawiki.widgets"
+   ]
+   },
"mw.cx.ui.TitleOptionWidget": {
"targets": [ "desktop", "mobile" ],
"scripts": [
diff --git a/i18n/en.json b/i18n/en.json
index 0a5ac9d..038f5a8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -204,6 +204,7 @@
"cx-tools-link-to-another-page": "Link to another page",
"cx-tools-link-add-as-missing": "Add as missing link",
"cx-tools-link-apply": "Done",
+   "cx-personaltools-user": "User",
"mw-pageselector-missing": "Page does not exist",
"cx-draft-restoring": "Loading the saved translation...",
"cx-draft-restored": "Saved translation loaded.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a8d9891..16907c1 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -213,6 +213,7 @@
"cx-tools-link-to-another-page": "Opens a tool that allows linking to 
any internal or external page.",
"cx-tools-link-add-as-missing": "Shown in the page selector when the 
user types a name of a page that doesn't exist in the target wiki. Clicking it 
adds a missing (\"red\") link to this page. \"Missing\" has the same meaning as 
in {{msg-mw|cx-tools-missing-link-mark-link}}.",
"cx-tools-link-apply": "Button label to apply the link selection from 
link tool card\n{{Identical|Done}}",
+   "cx-personaltools-user": "Label displayed in personal tools menu on 
Content Translation dashboard, used in customized personal tools header. 
Provides link to User page.",
"mw-pageselector-missing": "Message shown in page selector when the 
search did not fetch any result",
"cx-draft-restoring": "Message indicating the saved translation being 
fetched.",
"cx-draft-restored": "Message indicating that the saved translation was 
fetched.",
diff --git a/modules/dashboard/ext.cx.dashboard.js 
b/modules/dashboard/ext.cx.dashboard.js
index 0a1c819..42bec15 100644
--- a/modules/dashboard/ext.cx.dashboard.js
+++ b/modules/dashboard/ext.cx.dashboard.js
@@ -18,7 +18,6 @@
function CXDashboard( element, siteMapper ) {
this.$container = $( element );
this.siteMapper = siteMapper;
-   this.$header = null;
this.$sidebar = null;

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Add another method of getting Preferences URL

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

Change subject: Add another method of getting Preferences URL
..

Add another method of getting Preferences URL

- Add fallback to Preferences URL. If there is no DOM element,
get the Preferences link through from the server passed parameter.

Change-Id: I0ab756cafcbd535fa1765fd12fdd72bb75f0df62
---
M modules/ext.echo.init.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/ext.echo.init.js b/modules/ext.echo.init.js
index b5e0962..7829d8a 100644
--- a/modules/ext.echo.init.js
+++ b/modules/ext.echo.init.js
@@ -27,7 +27,8 @@
// Store links
links = {
notifications: $( '#pt-notifications-alert a' 
).attr( 'href' ),
-   preferences: $( '#pt-preferences a' ).attr( 
'href' ) + '#mw-prefsection-echo'
+   preferences: $( '#pt-preferences a' ).attr( 
'href' ) || mw.config.get( 'preferencesLink' ) +
+   '#mw-prefsection-echo'
};
 
// Respond to click on the notification button and load the UI 
on demand

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Provide personal tools getter

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

Change subject: Provide personal tools getter
..

Provide personal tools getter

- Add public function to get user's personal tools.
- Add new level of abstraction to the creation on personal tools list items,
by enabling user to provide list of personal tools.

Change-Id: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7
---
M includes/skins/SkinTemplate.php
1 file changed, 31 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/47/389647/1

diff --git a/includes/skins/SkinTemplate.php b/includes/skins/SkinTemplate.php
index 532ee51..21ff72b 100644
--- a/includes/skins/SkinTemplate.php
+++ b/includes/skins/SkinTemplate.php
@@ -524,16 +524,45 @@
 * @return string
 */
public function getPersonalToolsList() {
+   return $this->makePersonalToolsList();
+   }
+
+   /**
+* Get the HTML for the personal tools list
+*
+* @param array $personalTools
+* @param array $options
+* @return string
+*/
+   public function makePersonalToolsList( $personalTools = null, $options 
= [] ) {
$tpl = $this->setupTemplateForOutput();
$tpl->set( 'personal_urls', $this->buildPersonalUrls() );
$html = '';
-   foreach ( $tpl->getPersonalTools() as $key => $item ) {
-   $html .= $tpl->makeListItem( $key, $item );
+
+   if ( !isset( $personalTools ) ) {
+   $personalTools = $tpl->getPersonalTools();
}
+
+   foreach ( $personalTools as $key => $item ) {
+   $html .= $tpl->makeListItem( $key, $item, $options );
+   }
+
return $html;
}
 
/**
+* Get personal tools for the user
+*
+* @return array Array of personal tools
+*/
+   public function getPersonalTools() {
+   $tpl = $this->setupTemplateForOutput();
+   $tpl->set( 'personal_urls', $this->buildPersonalUrls() );
+
+   return $tpl->getPersonalTools();
+   }
+
+   /**
 * Format language name for use in sidebar interlanguage links list.
 * By default it is capitalized.
 *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I549376af6f7380dbadfb5f3f7f7171bbe64cccd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Petar.petkovic 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow Hiragana to Find Katakana and vice versa

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

Change subject: Allow Hiragana to Find Katakana and vice versa
..


Allow Hiragana to Find Katakana and vice versa

Add character filter to map hiragana to katakana; enable
the mapping only for English for now; update tests.

Bug: T176197
Change-Id: I24eb47ed4ba8db83d8b594cc12e7aa945fd68d97
---
M includes/Maintenance/AnalysisConfigBuilder.php
M tests/unit/fixtures/languageAnalysis/en-ca.expected
M tests/unit/fixtures/languageAnalysis/en-gb.expected
M tests/unit/fixtures/languageAnalysis/en.expected
M tests/unit/fixtures/languageAnalysis/simple.expected
5 files changed, 418 insertions(+), 9 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index a7f0654..1e8fb8c 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -623,6 +623,43 @@
$config[ 'analyzer' ][ 'plain_search' ][ 'filter' ] = 
$config[ 'analyzer' ][ 'plain' ][ 'filter' ];
break;
case 'english':
+   $config[ 'char_filter' ][ 'kana_map' ] = [
+   // Map hiragana to katakana, currently only for 
English
+   // See 
https://www.mediawiki.org/wiki/User:TJones_(WMF)/T176197
+   'type' => 'mapping',
+   'mappings' => [
+   "\u3041=>\u30a1", 
"\u3042=>\u30a2", "\u3043=>\u30a3",
+   "\u3044=>\u30a4", 
"\u3045=>\u30a5", "\u3046=>\u30a6",
+   "\u3094=>\u30f4", 
"\u3047=>\u30a7", "\u3048=>\u30a8",
+   "\u3049=>\u30a9", 
"\u304a=>\u30aa", "\u3095=>\u30f5",
+   "\u304b=>\u30ab", 
"\u304c=>\u30ac", "\u304d=>\u30ad",
+   "\u304e=>\u30ae", 
"\u304f=>\u30af", "\u3050=>\u30b0",
+   "\u3096=>\u30f6", 
"\u3051=>\u30b1", "\u3052=>\u30b2",
+   "\u3053=>\u30b3", 
"\u3054=>\u30b4", "\u3055=>\u30b5",
+   "\u3056=>\u30b6", 
"\u3057=>\u30b7", "\u3058=>\u30b8",
+   "\u3059=>\u30b9", 
"\u305a=>\u30ba", "\u305b=>\u30bb",
+   "\u305c=>\u30bc", 
"\u305d=>\u30bd", "\u305e=>\u30be",
+   "\u305f=>\u30bf", 
"\u3060=>\u30c0", "\u3061=>\u30c1",
+   "\u3062=>\u30c2", 
"\u3063=>\u30c3", "\u3064=>\u30c4",
+   "\u3065=>\u30c5", 
"\u3066=>\u30c6", "\u3067=>\u30c7",
+   "\u3068=>\u30c8", 
"\u3069=>\u30c9", "\u306a=>\u30ca",
+   "\u306b=>\u30cb", 
"\u306c=>\u30cc", "\u306d=>\u30cd",
+   "\u306e=>\u30ce", 
"\u306f=>\u30cf", "\u3070=>\u30d0",
+   "\u3071=>\u30d1", 
"\u3072=>\u30d2", "\u3073=>\u30d3",
+   "\u3074=>\u30d4", 
"\u3075=>\u30d5", "\u3076=>\u30d6",
+   "\u3077=>\u30d7", 
"\u3078=>\u30d8", "\u3079=>\u30d9",
+   "\u307a=>\u30da", 
"\u307b=>\u30db", "\u307c=>\u30dc",
+   "\u307d=>\u30dd", 
"\u307e=>\u30de", "\u307f=>\u30df",
+   "\u3080=>\u30e0", 
"\u3081=>\u30e1", "\u3082=>\u30e2",
+   "\u3083=>\u30e3", 
"\u3084=>\u30e4", "\u3085=>\u30e5",
+   "\u3086=>\u30e6", 
"\u3087=>\u30e7", "\u3088=>\u30e8",
+   "\u3089=>\u30e9", 
"\u308a=>\u30ea", "\u308b=>\u30eb",
+   "\u308c=>\u30ec", 
"\u308d=>\u30ed", "\u308e=>\u30ee",
+   "\u308f=>\u30ef", 
"\u3090=>\u30f0", "\u3091=>\u30f1",
+   "\u3092=>\u30f2", 
"\u3093=>\u30f3",
+   ],
+   ];
+
$config[ 'filter' ][ 'possessive_english' ] = [
'type' => 'stemmer',
'language' => 

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Prevent loading CodeMirror if wikEd gadget is enabled

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

Change subject: Prevent loading CodeMirror if wikEd gadget is enabled
..


Prevent loading CodeMirror if wikEd gadget is enabled

Not a great solution, but will prevent most of the damage in the
meantime, for example, people losing their edits.

Bug: T178348
Change-Id: I434878a2325df01ad27f590f296738ff1f93320f
---
M resources/ext.CodeMirror.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..e9b3d89 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -300,7 +300,9 @@
selectionEnd = $textbox1.prop( 'selectionEnd' ),
scrollTop = $textbox1.scrollTop();
 
-   if ( codeMirror ) { // Already loaded
+   // If CodeMirror is already loaded or wikEd gadget is 
enabled, abort. See T178348.
+   // FIXME: Would be good to replace the wikEd check with 
something more generic.
+   if ( codeMirror || window.wikEd !== undefined ) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I434878a2325df01ad27f590f296738ff1f93320f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: Niharika29 
Gerrit-Reviewer: Pastakhov 
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...CirrusSearch[master]: Port boost_template_api.feature to nodejs

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

Change subject: Port boost_template_api.feature to nodejs
..


Port boost_template_api.feature to nodejs

Change-Id: Ib6c5c2bef4b89558b94144121afa946824e270e2
---
A tests/integration/features/boost_template_api.feature
M tests/integration/features/step_definitions/page_steps.js
M tests/integration/features/support/hooks.js
3 files changed, 59 insertions(+), 15 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/integration/features/boost_template_api.feature 
b/tests/integration/features/boost_template_api.feature
new file mode 100644
index 000..3e91dd1
--- /dev/null
+++ b/tests/integration/features/boost_template_api.feature
@@ -0,0 +1,25 @@
+@boost_template @clean @api
+Feature: Searches with the boost-template operator
+  Scenario: Searching for a page without template boosts doesn't use them
+When I api search for BoostTemplateTest
+Then NoTemplates BoostTemplateTest is the first api search result
+
+  Scenario: Adding a single template boost is recognized
+When I api search for boost-templates:"Template:BoostTemplateLow|1%" 
BoostTemplateTest
+Then LowTemplate is the first api search result
+
+  Scenario: Adding two template boosts is also recognized
+When I api search for boost-templates:"Template:BoostTemplateLow|1% 
Template:BoostTemplateHigh|10%" BoostTemplateTest
+Then HighTemplate is the first api search result
+
+  Scenario: Four templates is just fine (though I'm only actually using two of 
them)
+When I api search for boost-templates:"Template:BoostTemplateFake|10% 
Template:BoostTemplateLow|1% Template:BoostTemplateFake2|100% 
Template:BoostTemplateHigh|10%" BoostTemplateTest
+Then HighTemplate is the first api search result
+
+  Scenario: Template boosts can also lower the score of a template
+When I api search for boost-templates:"Template:BoostTemplateLow|1%" 
BoostTemplateTest -intitle:"BoostTemplateTest"
+Then HighTemplate is the first api search result
+
+  Scenario: Template boosts can also lower the score of another template (we 
didn't get lucky with the first one)
+When I api search for boost-templates:"Template:BoostTemplateHigh|1%" 
BoostTemplateTest -intitle:"BoostTemplateTest"
+Then LowTemplate is the first api search result
diff --git a/tests/integration/features/step_definitions/page_steps.js 
b/tests/integration/features/step_definitions/page_steps.js
index b3d967f..2e370d8 100644
--- a/tests/integration/features/step_definitions/page_steps.js
+++ b/tests/integration/features/step_definitions/page_steps.js
@@ -134,30 +134,32 @@
if ( title === "none" ) {
expect( this.apiResponse.query.search 
).to.have.lengthOf.below( 1 + Math.min.apply( null, indexes ) );
} else {
-   withApi( this, () => {
-   let found = indexes.map( pos => {
-   if ( this.apiResponse.query.search[pos] 
) {
-   return 
this.apiResponse.query.search[pos].title;
-   } else {
-   return null;
-   }
-   } );
-   if ( in_ok ) {
-   // What exactly does this do?
-   // expect(found).to 
include(include(title))
-   throw new Error( 'Not Implemented' );
+   let found = indexes.map( pos => {
+   if ( this.apiResponse.query.search[pos] ) {
+   return 
this.apiResponse.query.search[pos].title;
} else {
-   expect( found ).to.include(title);
+   return null;
}
} );
+   if ( in_ok ) {
+   // What exactly does this do?
+   // expect(found).to include(include(title))
+   throw new Error( 'Not Implemented' );
+   } else {
+   expect( found ).to.include(title);
+   }
}
}
-   Then( /^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search 
result$/, checkApiSearchResultStep );
+   Then( /^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search 
result$/, function ( title, in_ok, indexes ) {
+   withApi( this, () => {
+

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Port boolean_operators_api.feature to nodejs

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

Change subject: Port boolean_operators_api.feature to nodejs
..


Port boolean_operators_api.feature to nodejs

Change-Id: Ic48c984de77743d0cb32e9817f91951825f59d24
---
A tests/integration/features/boolean_operators_api.feature
M tests/integration/features/step_definitions/page_steps.js
2 files changed, 58 insertions(+), 4 deletions(-)

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

Objections:
  Cindy-the-browser-test-bot: There's a problem with this change, please improve



diff --git a/tests/integration/features/boolean_operators_api.feature 
b/tests/integration/features/boolean_operators_api.feature
new file mode 100644
index 000..230268e
--- /dev/null
+++ b/tests/integration/features/boolean_operators_api.feature
@@ -0,0 +1,38 @@
+@boolean_operators @clean @api @setup_main
+Feature: Searches with boolean operators
+  Scenario Outline: -, !, and NOT prohibit words in search results
+When I api search for 
+Then Catapult is the first api search result
+  But Amazing Catapult is not in the api search results
+  Examples:
+  |query |
+  | catapult -amazing|
+  | -amazing catapult|
+  | catapult !amazing|
+  | !amazing catapult|
+  | catapult NOT amazing |
+  | NOT amazing catapult |
+
+  Scenario Outline: +, &&, and AND require matches but since that is the 
default they don't look like they do anything
+When I api search for 
+Then Amazing Catapult is the first api search result
+  But Catapult is not in the api search results
+  Examples:
+  | query |
+  | +catapult amazing |
+  | amazing +catapult |
+  | +amazing +catapult|
+  | catapult AND amazing  |
+
+  Scenario Outline: OR and || matches docs with either set
+When I api search for 
+Then Catapult is in the api search results
+  And Two Words is in the api search results
+  Examples:
+  |  query |
+  | catapult OR África |
+  | África \|\| catapult   |
+  | catapult OR "África"   |
+  | catapult \|\| "África" |
+  | "África" OR catapult   |
+  | "África" \|\| catapult |
diff --git a/tests/integration/features/step_definitions/page_steps.js 
b/tests/integration/features/step_definitions/page_steps.js
index c4db773..b3d967f 100644
--- a/tests/integration/features/step_definitions/page_steps.js
+++ b/tests/integration/features/step_definitions/page_steps.js
@@ -155,14 +155,19 @@
Then( /^(.+) is( in)? the ((?:[^ ])+(?: or (?:[^ ])+)*) api search 
result$/, checkApiSearchResultStep );
 
function apiSearchStep( enableRewrites, qiprofile, offset, lang, 
namespaces, search ) {
-   // JSON.stringify will remove keys that have `undefined` as 
their value
let options = {
-   sroffset: offset,
srnamespace: (namespaces || "0").split(' '),
-   uselang: lang,
enablerewrites: enableRewrites ? 1 : 0,
-   srqiprofile: qiprofile ? qiprofile : undefined
};
+   if ( offset ) {
+   options.sroffset = offset;
+   }
+   if ( lang ) {
+   options.uselang = lang;
+   }
+   if ( qiprofile ) {
+   options.srqiprofile = qiprofile;
+   }
// This is reset between scenarios
if ( this.didyoumeanOptions ) {
Object.assign(options, this.didyoumeanOptions );
@@ -208,4 +213,15 @@
expect( this.apiResponse.query.search 
).to.not.have.lengthOf( 0 );
} );
} );
+
+   Then( /^(.+) is( not)? in the api search results$/, function( title, 
not ) {
+   withApi( this, () => {
+   let titles = this.apiResponse.query.search.map( res => 
res.title );
+   if ( not ) {
+   expect( titles ).to.not.include( title );
+   } else {
+   expect( titles ).to.include( title );
+   }
+   } );
+   } );
 });

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic48c984de77743d0cb32e9817f91951825f59d24
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Implement prefix_search_api.feature in nodejs tests

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

Change subject: Implement prefix_search_api.feature in nodejs tests
..


Implement prefix_search_api.feature in nodejs tests

* Adds a new withApi() function that attaches more error information
  to exceptions from api.
* Implements a bunch of steps needed by prefix_search_api.feature
* Stores api errors on world so we can test them

Change-Id: Idbf43b536cd5185d32c4b5988f4daa0f1d6d319c
---
A tests/integration/features/prefix_search_api.feature
M tests/integration/features/step_definitions/page_step_helpers.js
M tests/integration/features/step_definitions/page_steps.js
M tests/integration/features/support/hooks.js
M tests/integration/features/support/world.js
5 files changed, 470 insertions(+), 16 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/integration/features/prefix_search_api.feature 
b/tests/integration/features/prefix_search_api.feature
new file mode 100644
index 000..e84e830
--- /dev/null
+++ b/tests/integration/features/prefix_search_api.feature
@@ -0,0 +1,157 @@
+@clean @api @prefix @redirect @accent_squashing @accented_namespace @suggest
+Feature: Prefix search via api
+# @suggest needs to be at the end because it will update the completion 
suggester index
+  Scenario: Suggestions don't appear when you search for a string that is too 
long
+When I get api suggestions for 
贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx
 
y贵州省瞬时速度团头鲂身体c实施ysstsstsg说tyttxy以推销员会同香港推广系统在同他讨厌她团体淘汰>赛系统大选于它拥有一天天用于与体育学院国ttxzyttxtxytdttyyyztdsytstsstxtttd天天体育系统的摄像头听到他他偷笑>偷笑太阳团体杏眼桃腮他要tttxx
 y
+#Then the api warns Prefix search request was longer than the maximum 
allowed length. (288 > 255)
+ Then the api returns error code request_too_long
+
+  Scenario: Prefix search lists page name if both redirect and page name match
+When I get api suggestions for Redirecttest Y using the classic profile
+Then Redirecttest Yay is the first api suggestion
+  And Redirecttest Yikes is not in the api suggestions
+When I get api suggestions for Redirecttest Y using the fuzzy profile
+Then Redirecttest Yay is the first api suggestion
+  And Redirecttest Yikes is not in the api suggestions
+
+  Scenario: Prefix search ranks redirects under title matches
+When I get api suggestions for PrefixRedirectRanking using the classic 
profile
+Then PrefixRedirectRanking 1 is the first api suggestion
+  And PrefixRedirectRanking 2 is the second api suggestion
+When I get api suggestions for PrefixRedirectRanking using the fuzzy 
profile
+Then PrefixRedirectRanking 1 is the first api suggestion
+  And PrefixRedirectRanking 2 is the second api suggestion
+
+  Scenario: Prefix search with classic profile is stricter than the fuzzy 
profile
+When I get api suggestions for PrefixRedirectRankng using the classic 
profile
+Then the API should produce list of length 0
+When I get api suggestions for PrefixRedirectRankng using the fuzzy profile
+Then PrefixRedirectRanking 1 is the first api suggestion
+  And PrefixRedirectRanking 2 is the second api suggestion
+
+  Scenario Outline: Search suggestions with accents
+When I get api suggestions for  using the classic profile
+Then  is the first api suggestion
+  And  is the second api suggestion
+When I get api suggestions for  using the fuzzy profile
+Then  is the first api suggestion
+  And  is the second api suggestion
+  Examples:
+|  term  | first_suggestion | second_suggestion |
+| Áccent Sorting | Áccent Sorting   | Accent Sorting|
+| áccent Sorting | Áccent Sorting   | Accent Sorting|
+| Accent Sorting | Accent Sorting   | Áccent Sorting|
+| accent Sorting | Accent Sorting   | Áccent Sorting|
+
+  Scenario: Searching for a bare namespace finds everything in the namespace
+Given a page named Template talk:Foo exists
+  And within 20 seconds api searching for Template talk:Foo yields 
Template talk:Foo as the first result
+When I get api suggestions for template talk:
+Then Template talk:Foo is in the api suggestions
+
+  Scenario Outline: Search suggestions
+When I get api suggestions for  using the classic profile
+Then  is the first api suggestion
+  And the api should offer to search for pages containing 
+When I get api suggestions for  using the fuzzy profile
+Then  is the first api suggestion
+  And the api should offer to search for pages containing 
+When I get api near matches for 
+  Then  is the first api search result
+  Examples:
+| term   | first_result   | title   

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Port bad_syntax_api.features to nodejs

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

Change subject: Port bad_syntax_api.features to nodejs
..


Port bad_syntax_api.features to nodejs

Change-Id: I6fc234a31bb6cd11ef6eea3a3d1130180285b32f
---
A tests/integration/features/bad_syntax_api.feature
M tests/integration/features/step_definitions/page_steps.js
M tests/integration/features/support/hooks.js
3 files changed, 173 insertions(+), 0 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/integration/features/bad_syntax_api.feature 
b/tests/integration/features/bad_syntax_api.feature
new file mode 100644
index 000..d2506aa
--- /dev/null
+++ b/tests/integration/features/bad_syntax_api.feature
@@ -0,0 +1,104 @@
+@bad_syntax @clean @api
+Feature: Searches with syntax errors
+  @setup_main
+  Scenario: Searching for ~ treats the tilde like a space except 
that the whole "word" (including tilde) makes a phrase search
+When I api search for ffnonesenseword~catapult
+Then Two Words is the first api search result
+
+ @setup_main
+  Scenario: Searching for ~ treats the tilde like a space (not 
finding any results if a fuzzy search was needed)
+When I api search for ffnonesensewor~catapult
+Then none is the first api search result
+
+  @balance_quotes
+  Scenario Outline: Searching for for a phrase with a hanging quote adds the 
quote automatically
+When I api search for 
+Then Two Words is the first api search result
+   Examples:
+|  term |
+| "two words|
+| "two words" "ffnonesenseword catapult |
+| "two words" "ffnonesenseword catapult pickles |
+| "two words" pickles "ffnonesenseword catapult |
+
+  @balance_quotes
+  Scenario Outline: Searching for a phrase containing /, :, and \" find the 
page as expected
+Given a page named  exists
+When I api search for 
+Then  is the first api search result
+  Examples:
+|term   |   
title   |
+| "10.1093/acprof:oso/9780195314250.003.0001"   | 
10.1093/acprof:oso/9780195314250.003.0001 |
+| "10.5194/os-8-1071-2012"  | 
10.5194/os-8-1071-2012|
+| "10.7227/rie.86.2"| 10.7227/rie.86.2 
 |
+| "10.7227\"yay"| 10.7227"yay  
 |
+| intitle:"1911 Encyclopædia Britannica/Dionysius"' | 1911 Encyclopædia 
Britannica/Dionysius|
+
+  Scenario: searching for NOT something will not crash (technically it should 
bring up the most linked document, but this isn't worth checking)
+When I api search for NOT catapult
+Then there is an api search result
+
+  Scenario Outline: searching for less than and greater than doesn't find tons 
and tons of tokens
+When I api search for 
+Then none is the first api search result
+  Examples:
+| query |
+| <}|
+| <=}   |
+| >.|
+| >=.   |
+| > |
+| < |
+| >>|
+| <>|
+| <>=   |
+| >>>   |
+| <<<   |
+| <<<~  |
+
+  @filters
+  Scenario Outline: Empty filters work like terms but aren't in test data so 
aren't found
+When I api search for 
+   Then none is the first api search result
+  Examples:
+| term   |
+| intitle:"" catapult|
+| incategory:"" catapult |
+| intitle:   |
+| intitle:"" |
+| incategory:|
+| incategory:""  |
+| hastemplate:   |
+| hastemplate:"" |
+
+  Scenario Outline: Searching with a / doesn't cause a degraded search result
+When I api search for main 
+Then Main Page is the first api search result
+  Examples:
+|  term  |
+| intitle:/page  |
+| Main/Page  |
+
+  @exact_quotes @setup_main
+  Scenario: Searching for " "~ treats the ~ as a space
+When I api search for "ffnonesenseword catapult"~anotherword
+  And Two Words is the first api search result
+
+  Scenario Outline: Searching for special whitespaces returns no result
+When I api search for 
+Then none is the first api search result
+  Examples:
+| specialwhitespaces |
+| %{\u3000}% |
+| %{\u0009}%%{\u3000}%   |
+| %{\u0009}% %{\u3000}%  |
+| %ideographic_whitespace%   |
+
+  @boolean_operators
+  Scenario Outline: ORs and ANDs around phrase prefixes finds the search terms
+When I api search for "test catapul*"  "test catapul*" 
 "test catapul*"
+Then there are no errors reported by the api
+  Examples:
+| operator |
+| AND  |

[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Make textbox height flexible with CodeMirror

2017-11-06 Thread Niharika29 (Code Review)
Niharika29 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389646 )

Change subject: Make textbox height flexible with CodeMirror
..

Make textbox height flexible with CodeMirror

Bug: T170906
Bug: T176449 (hopefully)
Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
---
M resources/ext.CodeMirror.js
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..7ba66db 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -324,6 +324,13 @@
 
$codeMirror = $( codeMirror.getWrapperElement() );
 
+   $codeMirror.resizable({
+   handles: 'se',
+   resize: function(event, ui) {
+   ui.size.width = ui.originalSize.width;
+   }
+   });
+
codeMirror.doc.setSelection( 
codeMirror.doc.posFromIndex( selectionEnd ), codeMirror.doc.posFromIndex( 
selectionStart ) );
codeMirror.scrollTo( null, scrollTop );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0ac663c413db5c29ae786d3c17f7396ad620226
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Niharika29 

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Allow specifying a single integration test on CLI

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

Change subject: Allow specifying a single integration test on CLI
..


Allow specifying a single integration test on CLI

Change-Id: Iba42d29aa8f9475bb7f82443c4724717ebe570f9
---
M Gruntfile.js
1 file changed, 14 insertions(+), 1 deletion(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Gruntfile.js b/Gruntfile.js
index b3f7d8f..b3841f7 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -1,8 +1,11 @@
+/*jshint esversion: 6, node:true */
 /*!
  * Grunt file
  *
  * @package CirrusSearch
  */
+
+const path = require( 'path' );
 
 /*jshint node:true */
 module.exports = function ( grunt ) {
@@ -55,7 +58,17 @@
// Configure WebdriverIO Node task
webdriver: {
test: {
-   configFile: WebdriverIOconfigFile
+   configFile: WebdriverIOconfigFile,
+   spec: ( () => {
+   let spec = grunt.option( 'spec' );
+   if ( !spec ) {
+   return undefined;
+   }
+   if ( spec[0] === '/' ) {
+   return spec;
+   }
+   return path.join(__dirname, 
'tests/integration/features', spec);
+   } )()
}
}
} );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba42d29aa8f9475bb7f82443c4724717ebe570f9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: Cindy-the-browser-test-bot 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: Tjones 
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...CirrusSearch[master]: Convert integration test api objects to single use

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

Change subject: Convert integration test api objects to single use
..


Convert integration test api objects to single use

There are some annoying problems with re-using api clients
around api tokens, namely that the tokens can be accidentally
overwritten if multiple things are using it asyncronously.

Convert to a more direct model where new api clients are created
on demand. Also makes it a bit clearer how to do things on multiple
wikis with the api. Multiple wikis on the browser is not handled
here.

Change-Id: I06519bc43f8c17d81920f6210ea2deb1b310d5e4
---
M tests/integration/features/step_definitions/page_step_helpers.js
M tests/integration/features/support/hooks.js
M tests/integration/features/support/world.js
3 files changed, 54 insertions(+), 46 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/integration/features/step_definitions/page_step_helpers.js 
b/tests/integration/features/step_definitions/page_step_helpers.js
index 4af1791..2ca50c6 100644
--- a/tests/integration/features/step_definitions/page_step_helpers.js
+++ b/tests/integration/features/step_definitions/page_step_helpers.js
@@ -13,34 +13,45 @@
 const expect = require( 'chai' ).expect;
 
 class StepHelpers {
-   constructor( world ) {
+   constructor( world, wiki ) {
this.world = world;
+   this.apiPromise = world.onWiki( wiki || 
world.config.wikis.default );
+   }
+
+   onWiki( wiki ) {
+   return new StepHelpers( this.world, wiki );
}
 
deletePage( title ) {
-   return this.world.apiClient.loginAndEditToken().then( () => {
-   return this.world.apiClient.delete( title, 
"CirrusSearch integration test delete" )
-   .catch( ( err ) => {
-   // still return true if page doesn't 
exist
-   return expect( err.message 
).to.include( "doesn't exist" );
-   } );
+   return this.apiPromise.then( ( api ) => {
+   return api.loginGetEditToken().then( () => {
+   return api.delete( title, "CirrusSearch 
integration test delete" )
+   .catch( ( err ) => {
+   // still return true if page 
doesn't exist
+   return expect( err.message 
).to.include( "doesn't exist" );
+   } );
+   } );
} );
}
editPage( title, content ) {
-   return this.world.apiClient.loginAndEditToken().then( () => {
-   return this.world.apiClient.edit( title, content, 
"CirrusSearch integration test edit" );
+   return this.apiPromise.then( ( api ) => {
+   return api.loginGetEditToken().then( () => {
+   return api.edit( title, content, "CirrusSearch 
integration test edit" );
+   } );
} );
}
 
suggestionSearch( query, limit = 'max' ) {
-   return this.world.apiClient.request( {
-   action: 'opensearch',
-   search: query,
-   cirrusUseCompletionSuggester: 'yes',
-   limit: limit
+   return this.apiPromise.then( ( api ) => {
+   return api.request( {
+   action: 'opensearch',
+   search: query,
+   cirrusUseCompletionSuggester: 'yes',
+   limit: limit
+   } );
} ).then( ( response ) => this.world.setApiResponse( response ) 
);
}
 
 }
 
-module.exports = StepHelpers;
\ No newline at end of file
+module.exports = StepHelpers;
diff --git a/tests/integration/features/support/hooks.js 
b/tests/integration/features/support/hooks.js
index 6b20e97..f5ab71b 100644
--- a/tests/integration/features/support/hooks.js
+++ b/tests/integration/features/support/hooks.js
@@ -49,9 +49,10 @@
"はーい": "makes sure we do not fail to index 
empty tokens (T156234)"
}
};
-   return this.apiClient.loginAndEditToken().then( () => {
-   return this.apiClient.batch(batchJobs, 'CirrusSearch 
integration test edit');
+   return this.onWiki().then( ( api ) => {
+   return api.loginGetEditToken().then( () => {
+   return 

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Track integration test tag setup with server process

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

Change subject: Track integration test tag setup with server process
..


Track integration test tag setup with server process

The wdio test runner runs each feature file in its own
process. This means we have no direct way to share state
about what has been setup and what still needs to be
setup.

This is perhaps not the simplest solution, but it seemed
the most flexible. It spins up an extra process during
test setup that knows what tags have been previously
initialized, and talks over a unix socket connection
to the child processes to tell them about the state.
This approach was taken because onPrepare, the only hook
that is run globally, does not have information about
what tests will be run, what tags they contain, etc. Keeping
with cucumber's existing Before hooks means we don't have
to reimplement all of that.

Change-Id: I5d3c0135b13cbb0f91ffaa0738b3dcaec16d238e
---
M tests/integration/config/wdio.conf.js
M tests/integration/features/support/hooks.js
M tests/integration/features/support/world.js
A tests/integration/lib/tracker.js
4 files changed, 244 insertions(+), 32 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/tests/integration/config/wdio.conf.js 
b/tests/integration/config/wdio.conf.js
index 890a026..179e302 100644
--- a/tests/integration/config/wdio.conf.js
+++ b/tests/integration/config/wdio.conf.js
@@ -6,11 +6,14 @@
 /* eslint-disable no-console, comma-dangle */
 'use strict';
 
-const path = require( 'path' );
+const child_process = require( 'child_process' ),
+   path = require( 'path' );
 
 function relPath( foo ) {
return path.resolve( __dirname, '../..', foo );
 }
+
+var forkedTracker;
 
 exports.config = {
 
@@ -215,9 +218,23 @@
// methods to it. If one of them returns with a promise, WebdriverIO 
will wait until that promise got
// resolved to continue.
//
+   // unix socket path for tag tracker
+   trackerPath: '/tmp/cirrussearch-integration-tagtracker',
+   //
// Gets executed once before all workers get launched.
-   // onPrepare: function ( config, capabilities ) {
-   // }
+   onPrepare: function ( config ) {
+   forkedTracker = child_process.fork( relPath( 
'./integration/lib/tracker.js' ) );
+   forkedTracker.send( { config: config } );
+   return new Promise( ( resolve, reject ) => {
+   forkedTracker.on( 'message', ( msg ) => {
+   if ( msg.initialized ) {
+   resolve();
+   } else {
+   reject( msg.error );
+   }
+   } );
+   } );
+   },
//
// Gets executed before test execution begins. At this point you can 
access all global
// variables, such as `browser`. It is the perfect place to define 
custom commands.
@@ -276,6 +293,8 @@
//
// Gets executed after all workers got shut down and the process is 
about to exit. It is not
// possible to defer the end of the process using a promise.
-   // onComplete: function(exitCode) {
-   // }
+   onComplete: function() {
+   // TODO: Is this method being called a guarantee, or should we 
handle signals to be sure?
+   forkedTracker.send( { exit: true } );
+   }
 };
diff --git a/tests/integration/features/support/hooks.js 
b/tests/integration/features/support/hooks.js
index 6f53a1b..6b20e97 100644
--- a/tests/integration/features/support/hooks.js
+++ b/tests/integration/features/support/hooks.js
@@ -1,32 +1,27 @@
 /*jshint esversion: 6, node:true */
 
-/**
- * Hooks are run before or after Cucumber executes a test scenario.
- * The World object is bound to the hooks as `this`, so any method
- * or property in World is available here.
- */
 var {defineSupportCode} = require( 'cucumber' );
 
-// This file is loaded in the initial cucumbe setup,
-// so these variables are retained across tests.
-var clean = false,
-   suggest = false;
-
 defineSupportCode( function( { After, Before } ) {
+   let BeforeOnce = function ( options, fn ) {
+   Before( options, function () {
+   return this.tags.check( options.tags ).then( ( status ) 
=> {
+   if ( status === 'new' ) {
+   return fn.call ( this ).then( () => 
this.tags.complete( options.tags ) );
+   }
+   } );
+   } );
+   };
 
-   Before( {tags: "@clean" }, function () {
-   if ( clean ) return true;
- 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Linter: Turn off non-actionable mixed-content-templates cate...

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

Change subject: Linter: Turn off non-actionable mixed-content-templates category
..


Linter: Turn off non-actionable mixed-content-templates category

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

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index 8c7d550..afbb732 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -84,6 +84,7 @@
  *  |}
  * 
https://www.mediawiki.org/wiki/Parsoid/MediaWiki_DOM_spec#Transclusion_content
  */
+/*
 function logTransclusions(env, node, dp, tplInfo) {
var parts = DU.getDataMw(node).parts;
if (!Array.isArray(parts) || parts.length < 2) { return; }
@@ -97,6 +98,7 @@
 
env.log('lint/' + type, { dsr: tplInfo.dsr });
 }
+*/
 
 var getNextMatchingNode, leftMostDescendent;
 
@@ -769,10 +771,15 @@
 
var dp = DU.getDataParsoid(node);
 
+   /*
+* Turn this off since this is wasted processing
+* that is not really actionable at this time.
+*
if (tplInfo && tplInfo.first === node) {
// Log transclusions with more than one part
logTransclusions(env, node, dp, tplInfo);
}
+   */
 
logTreeBuilderFixup(env, node, dp, tplInfo);
// Turning this off for now since
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index 2fa672a..3eea822 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -317,6 +317,7 @@
});
});
 
+   /*
describe('MIXED-CONTENT TEMPLATES', function() {
it('should lint mixed-content templates', function() {
return parseWT('{{1x|*}}hi').then(function(result) {
@@ -333,6 +334,7 @@
});
});
});
+   */
 
describe('DELETABLE TABLE TAG', function() {
it('should identify deletable table tag for T161341 (1)', 
function() {
@@ -404,12 +406,12 @@
"|}",
].join('\n');
return parseWT(wt).then(function(result) {
-   result.should.have.length(2);
-   result[1].should.have.a.property("type", 
"deletable-table-tag");
-   
result[1].should.not.have.a.property("templateInfo");
-   result[1].should.have.a.property("params");
-   result[1].params.should.have.a.property("name", 
"table");
-   result[1].dsr.should.deep.equal([ 29, 31, 0, 0 
]);
+   result.should.have.length(1);
+   result[0].should.have.a.property("type", 
"deletable-table-tag");
+   
result[0].should.not.have.a.property("templateInfo");
+   result[0].should.have.a.property("params");
+   result[0].params.should.have.a.property("name", 
"table");
+   result[0].dsr.should.deep.equal([ 29, 31, 0, 0 
]);
});
});
});

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Git rid of unused brokenHTMLTag data-parsoid attribute

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

Change subject: Git rid of unused brokenHTMLTag data-parsoid attribute
..


Git rid of unused brokenHTMLTag data-parsoid attribute

Change-Id: I969374a8052b9084c84561a40a3354c02a3a396c
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 2 insertions(+), 8 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 0bf35ea..c4029cb 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1413,7 +1413,7 @@
 attribs:generic_newline_attributes
 space_or_newline* // No need to preserve this -- canonicalize on RT via 
dirty diff
 selfclose:"/"?
-bad_ws:space* // No need to preserve this -- canonicalize on RT via dirty 
diff
+space* // not preserved - canonicalized on RT via dirty diff
 ">" {
 stops.pop('table');
 stops.pop('tableCellArg');
@@ -1426,9 +1426,7 @@
 var isVoidElt = Util.isVoidElement(lcName) && 
!env.conf.wiki.extensionTags.has(lcName);
 
 // Support 
-var broken = false;
 if (lcName === 'br' && end) {
-broken = true;
 end = null;
 }
 
@@ -1439,10 +1437,6 @@
 if (!selfclose && isVoidElt) {
 res.dataAttribs.selfClose = undefined;
 res.dataAttribs.noClose = true;
-}
-
-if (broken || bad_ws.length > 0) {
-res.dataAttribs.brokenHTMLTag = true;
 }
 
 return maybeExtensionTag(res);
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 5e30450..0b5d060 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -9449,7 +9449,7 @@
 !! html/parsoid
 
 
-
+
 
 
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Prevent loading CodeMirror if wikEd gadget is enabled

2017-11-06 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389645 )

Change subject: Prevent loading CodeMirror if wikEd gadget is enabled
..

Prevent loading CodeMirror if wikEd gadget is enabled

Not a great solution, but will prevent most of the damage in the
meantime, for example, people losing their edits.

Bug: T178348
Change-Id: I434878a2325df01ad27f590f296738ff1f93320f
---
M resources/ext.CodeMirror.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..e9b3d89 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -300,7 +300,9 @@
selectionEnd = $textbox1.prop( 'selectionEnd' ),
scrollTop = $textbox1.scrollTop();
 
-   if ( codeMirror ) { // Already loaded
+   // If CodeMirror is already loaded or wikEd gadget is 
enabled, abort. See T178348.
+   // FIXME: Would be good to replace the wikEd check with 
something more generic.
+   if ( codeMirror || window.wikEd !== undefined ) {
return;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I434878a2325df01ad27f590f296738ff1f93320f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T179757: Linter: Fix false positive for tidy-font-bug

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

Change subject: T179757: Linter: Fix false positive for tidy-font-bug
..


T179757: Linter: Fix false positive for tidy-font-bug

Change-Id: I04345253cf4950ba4e9b3140951e377ac2c53cf1
---
M lib/wt2html/pp/handlers/linter.js
M tests/mocha/linter.js
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/lib/wt2html/pp/handlers/linter.js 
b/lib/wt2html/pp/handlers/linter.js
index d50a5ec..8c7d550 100644
--- a/lib/wt2html/pp/handlers/linter.js
+++ b/lib/wt2html/pp/handlers/linter.js
@@ -479,7 +479,7 @@
 * specifies a link colour because the link no longer renders
 * as blue/red but in the font-specified colour.
 * -- */
-   var tidyFontBug = true;
+   var tidyFontBug = c.firstChild !== null;
var haveLink = false;
for (var n = c.firstChild; n; n = n.nextSibling) {
if (!DU.isComment(n) &&
diff --git a/tests/mocha/linter.js b/tests/mocha/linter.js
index be4fe7d..2fa672a 100644
--- a/tests/mocha/linter.js
+++ b/tests/mocha/linter.js
@@ -777,6 +777,7 @@
});
});
var wtLines2 = [
+   "", // Regression test for 
T179757
"[[Foo]][[Bar]]",
" [[Foo]]",
"[[Foo]] ",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: preserve response objects throughout special handling

2017-11-06 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389643 )

Change subject: Hygiene: preserve response objects throughout special handling
..

Hygiene: preserve response objects throughout special handling

In mobile-sections we sometimes rebuilt the response objects while
handling some special cases (Main/File/User page). This leaked the
details of the response objects to these many places and we needed
to take care to recreate all desired fields in the response objects.

With this patch this will change. Instead of recreating the object
it will modify or add new properties in those mentioned special cases
but not try to recreate the whole response object.
This leads to simpler code, and fewer changes when new properties are
introduced.

Change-Id: I23fd30fecd05e23f7ef9a1de2389e6993af504f6
---
M routes/mobile-sections.js
1 file changed, 10 insertions(+), 23 deletions(-)


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

diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 7309ca6..3d3fa02 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -69,7 +69,7 @@
 
 /*
  * Build the lead for the requested page.
- * @param {!Object} input
+ * @param {!Object} input (needs to have a meta, page, and title property)
  * @param {?Boolean} [legacy] whether to perform legacy transformations
  * @return {!Object} lead json
  */
@@ -215,10 +215,8 @@
 function mainPageFixPromise(req, response) {
 return pageContentForMainPagePromise(req)
 .then((mainPageContent) => {
-return {
-page: mainPageContent,
-meta: response.meta
-};
+response.page = mainPageContent;
+return response;
 });
 }
 
@@ -239,15 +237,10 @@
 })
 .then((resp) => {
 const body = resp.body;
-const meta = res.meta;
 if (body.query && body.query.globaluserinfo) {
-meta.userinfo = body.query.globaluserinfo;
+res.meta.userinfo = body.query.globaluserinfo;
 }
-return {
-page: res.page,
-meta,
-extract: res.extract
-};
+return res;
 });
 }
 
@@ -271,18 +264,11 @@
 })
 .then((resp) => {
 const body = resp.body;
-const meta = res.meta;
-let ii;
-
 if (body.query && body.query.pages && body.query.pages.length) {
-ii = body.query.pages[0].imageinfo;
-meta.imageinfo = ii ? ii[0] : ii;
+const ii = body.query.pages[0].imageinfo;
+res.meta.imageinfo = ii ? ii[0] : ii;
 }
-return {
-page: res.page,
-meta,
-extract: res.extract
-};
+return res;
 });
 }
 
@@ -321,7 +307,8 @@
 function _collectRawPageData(req, legacy) {
 return BBPromise.props({
 page: parsoid.pageJsonPromise(app, req, legacy),
-meta: mwapi.getMetadata(app, req)
+meta: mwapi.getMetadata(app, req),
+title: mwapi.getTitleObj(app, req)
 }).then((interimState) => {
 return _handleNamespaceAndSpecialCases(req, interimState);
 });

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add canonical title to mobile-sections lead

2017-11-06 Thread BearND (Code Review)
BearND has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389644 )

Change subject: Add canonical title to mobile-sections lead
..

Add canonical title to mobile-sections lead

Bug: T179600
Change-Id: I003b491cb298d208fdd45acbae0fe926fd057144
---
M routes/mobile-sections.js
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
5 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/routes/mobile-sections.js b/routes/mobile-sections.js
index 3d3fa02..5dc1bb5 100644
--- a/routes/mobile-sections.js
+++ b/routes/mobile-sections.js
@@ -138,6 +138,7 @@
 revision: input.page.revision,
 lastmodified: input.meta.lastmodified,
 lastmodifier: input.meta.lastmodifier,
+title: input.title.getPrefixedDBKey(),
 displaytitle: input.meta.displaytitle,
 normalizedtitle: input.meta.normalizedtitle,
 wikibase_item: input.meta.pageprops && 
input.meta.pageprops.wikibase_item,
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index 4e0c21d..235c552 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -6,6 +6,7 @@
 "talk_ns_text": "User_talk",
 "id": 53626841,
 "revision": "77813",
+"title": "User:BSitzmann_(WMF)/MCS/Test/Frankenstein",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
 "normalizedtitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
 "protection": {
diff --git 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
index 2a42a7e..70a4dd3 100644
--- 
"a/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
+++ 
"b/test/diff/results/page_formatted-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
@@ -6,6 +6,7 @@
 "talk_ns_text": "User_talk",
 "id": 51184092,
 "revision": "743079682",
+"title": "User:BSitzmann_(WMF)/MCS/Test/TitleLinkEncoding",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",
 "normalizedtitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",
 "protection": {},
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
index dc20754..d70f515 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_Frankenstein.json"
@@ -6,6 +6,7 @@
 "talk_ns_text": "User_talk",
 "id": 53626841,
 "revision": "77813",
+"title": "User:BSitzmann_(WMF)/MCS/Test/Frankenstein",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
 "normalizedtitle": "User:BSitzmann (WMF)/MCS/Test/Frankenstein",
 "protection": {
diff --git 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
index bb9de6e..03db8a0 100644
--- 
"a/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
+++ 
"b/test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_\050WMF\051_MCS_Test_TitleLinkEncoding.json"
@@ -6,6 +6,7 @@
 "talk_ns_text": "User_talk",
 "id": 51184092,
 "revision": "743079682",
+"title": "User:BSitzmann_(WMF)/MCS/Test/TitleLinkEncoding",
 "displaytitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",
 "normalizedtitle": "User:BSitzmann (WMF)/MCS/Test/TitleLinkEncoding",
 "protection": {},

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

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

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Hygiene: Bump mobile-sections content format minor version

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

Change subject: Hygiene: Bump mobile-sections content format minor version
..


Hygiene: Bump mobile-sections content format minor version

This accounts for the additions needed to support summary 2.0
(see Ia8d3b03, I0b81eef, I6a10a23).

Change-Id: I090cef9946a70eabce92be85122ba62cba858751
---
M lib/mobile-util.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 4104abb..302045e 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -9,7 +9,7 @@
 const NS_MAIN = 0;
 
 mUtil.CONTENT_TYPES = {
-mobileSections: { name: 'mobile-sections', version: '0.12.4' },
+mobileSections: { name: 'mobile-sections', version: '0.13.0' },
 readHtml: { name: 'ReadHtml', version: '0.1.0' },
 summary: { name: 'Summary', version: '2.0.0' },
 definition: { name: 'definition', version: '0.7.2' },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I090cef9946a70eabce92be85122ba62cba858751
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
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]: betacluster: add -videoscaler to scap dsh group

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

Change subject: betacluster: add -videoscaler to scap dsh group
..

betacluster: add -videoscaler to scap dsh group

It wasn't receiving updates. This should fix it.

Bug: T179688
Change-Id: I389aa10bd2dfa181acd55d4722e8b696e4ebe2f6
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/42/389642/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 973f755..a345ca2 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -196,6 +196,7 @@
 - deployment-tmh01.deployment-prep.eqiad.wmflabs
 - deployment-tin.deployment-prep.eqiad.wmflabs
 - deployment-mira.deployment-prep.eqiad.wmflabs
+- deployment-videoscaler01.deployment-prep.eqiad.wmflabs
 mediawiki-appserver-canaries:
 hosts:
 - deployment-mediawiki04.deployment-prep.eqiad.wmflabs

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: Moving code for adding the toolbar button to its own function

2017-11-06 Thread Kaldari (Code Review)
Kaldari has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389641 )

Change subject: Moving code for adding the toolbar button to its own function
..

Moving code for adding the toolbar button to its own function

This is to make the code more readable and easier to follow.

Change-Id: I6972038ca8a45bf3d0c119e93cf1af70dd424a82
---
M resources/ext.CodeMirror.js
1 file changed, 33 insertions(+), 26 deletions(-)


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

diff --git a/resources/ext.CodeMirror.js b/resources/ext.CodeMirror.js
index aedb1b6..1afaf89 100644
--- a/resources/ext.CodeMirror.js
+++ b/resources/ext.CodeMirror.js
@@ -351,6 +351,38 @@
}
 
/**
+* Adds CodeMirror button to the toolbar
+*/
+   function addToolbarButton() {
+   // Check if the user is using the enhanced editing toolbar 
(supplied by the
+   // WikiEditor extension) or the default editing toolbar 
(supplied by core).
+   if ( wikiEditorToolbarEnabled ) {
+   // They are using the enhanced editing toolbar.
+   mw.loader.using( 'ext.wikiEditor.toolbar', function () {
+   // Add CodeMirror button to the enhanced 
editing toolbar.
+   $( addCodeMirrorToWikiEditor );
+   } );
+   } else {
+   // They are using the default editing toolbar.
+   mw.loader.using( 'mediawiki.toolbar', function () {
+   // Add CodeMirror button to the default editing 
toolbar.
+   mw.toolbar.addButton( {
+   speedTip: mw.msg( 
'codemirror-toggle-label' ),
+   imageId: 'mw-editbutton-codemirror',
+   onClick: function () {
+   switchCodeMirror();
+   return false;
+   }
+   } );
+   // We don't know when button will be added, 
wait until the document is ready to update it
+   $( function () {
+   updateToolbarButton();
+   } );
+   } );
+   }
+   }
+
+   /**
 * Updates CodeMirror button on the toolbar according to the current 
state (on/off)
 */
function updateToolbarButton() {
@@ -500,32 +532,7 @@
 
// If view is in edit mode, add the button to the toolbar.
if ( $( '#wpTextbox1' ).length ) {
-   // Check if the user is using the enhanced editing toolbar 
(supplied by the
-   // WikiEditor extension) or the default editing toolbar 
(supplied by core).
-   if ( wikiEditorToolbarEnabled ) {
-   // They are using the enhanced editing toolbar.
-   mw.loader.using( 'ext.wikiEditor.toolbar', function () {
-   // Add CodeMirror button to the enhanced 
editing toolbar.
-   $( addCodeMirrorToWikiEditor );
-   } );
-   } else {
-   // They are using the default editing toolbar.
-   mw.loader.using( 'mediawiki.toolbar', function () {
-   // Add CodeMirror button to the default editing 
toolbar.
-   mw.toolbar.addButton( {
-   speedTip: mw.msg( 
'codemirror-toggle-label' ),
-   imageId: 'mw-editbutton-codemirror',
-   onClick: function () {
-   switchCodeMirror();
-   return false;
-   }
-   } );
-   // We don't know when button will be added, 
wait until the document is ready to update it
-   $( function () {
-   updateToolbarButton();
-   } );
-   } );
-   }
+   addToolbarButton();
 
// Don't show popup if CM already enabled
if ( !useCodeMirror ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6972038ca8a45bf3d0c119e93cf1af70dd424a82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Kaldari 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T178253: Parse nested tables in figure captions

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

Change subject: T178253: Parse nested tables in figure captions
..


T178253: Parse nested tables in figure captions

 * `nested_block_in_table` permits opening table tags so that by
   the time `full_table_in_link_caption` returns from
   `table_content_line` there may be multiple end tags that need
   capturing.  By limiting it to one, subsequent end tag are
   considered figure options and tables end up as bogus captions.

Change-Id: I28c50a503efd02f7eadc2c21323a0c7dae5d1b60
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 27 insertions(+), 3 deletions(-)

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



diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 7ab6600..0bf35ea 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1736,9 +1736,11 @@
 & { return stops.push('table', true); }
 tbl:(
 table_start_tag optionalNewlines
-(sol table_content_line optionalNewlines)*
-sol table_end_tag)
-{
+// Accept multiple end tags since a nested table may have been
+// opened in the table content line.
+((sol table_content_line optionalNewlines)*
+sol table_end_tag)+
+){
 stops.pop('table');
 return tbl;
 }
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 42693ff..5e30450 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -14809,6 +14809,28 @@
 This 
is the image caption
 !! end
 
+!! test
+Image with nested tables in caption
+!! wikitext
+[[File:Foobar.jpg|thumb|Foo
+{|
+|
+{|
+|z
+|}
+|}
+]]
+!! html/parsoid
+Foo
+
+
+
+z
+
+
+
+!! end
+
 ###
 # Conflicting image format options.
 # First option specified should 'win'.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update sitematrix

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

Change subject: Update sitematrix
..


Update sitematrix

Change-Id: I2af04c6aa0ea98352397d574b0ace773d817c18c
---
M lib/config/sitematrix.json
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index f17f76a..c87fde4 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -5680,7 +5680,7 @@
},
"233": {
"code": "se",
-   "name": "sámegiella",
+   "name": "davvisámegiella",
"site": [
{
"url": "https://se.wikipedia.org;,
@@ -7398,7 +7398,7 @@
"dir": "ltr",
"localname": "Zulu"
},
-   "count": 914,
+   "count": 916,
"specials": [
{
"url": "https://advisory.wikimedia.org;,
@@ -7574,6 +7574,13 @@
"private": ""
},
{
+   "url": "https://electcom.wikimedia.org;,
+   "dbname": "electcomwiki",
+   "code": "electcom",
+   "sitename": "Wikipedia",
+   "private": ""
+   },
+   {
"url": "https://ee.wikimedia.org;,
"dbname": "etwikimedia",
"code": "etwikimedia",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2af04c6aa0ea98352397d574b0ace773d817c18c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
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...mobileapps[master]: Hygiene: Bump mobile-sections content format minor version

2017-11-06 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389613 )

Change subject: Hygiene: Bump mobile-sections content format minor version
..

Hygiene: Bump mobile-sections content format minor version

This accounts for the additions needed to support summary 2.0
(see Ia8d3b03, I0b81eef, I6a10a23).

Change-Id: I090cef9946a70eabce92be85122ba62cba858751
---
M lib/mobile-util.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 4104abb..302045e 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -9,7 +9,7 @@
 const NS_MAIN = 0;
 
 mUtil.CONTENT_TYPES = {
-mobileSections: { name: 'mobile-sections', version: '0.12.4' },
+mobileSections: { name: 'mobile-sections', version: '0.13.0' },
 readHtml: { name: 'ReadHtml', version: '0.1.0' },
 summary: { name: 'Summary', version: '2.0.0' },
 definition: { name: 'definition', version: '0.7.2' },

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Capitalise URL in uploadstash-file-not-found-no-remote-thumb

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389609 )

Change subject: Capitalise URL in uploadstash-file-not-found-no-remote-thumb
..

Capitalise URL in uploadstash-file-not-found-no-remote-thumb

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


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

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index b93a5d3..9466420 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -1732,7 +1732,7 @@
"uploadstash-file-not-found-no-thumb": "Could not obtain thumbnail.",
"uploadstash-file-not-found-no-local-path": "No local path for scaled 
item.",
"uploadstash-file-not-found-no-object": "Couldn't create local file 
object for thumbnail.",
-   "uploadstash-file-not-found-no-remote-thumb": "Fetching thumbnail 
failed: $1\nurl = $2\n.",
+   "uploadstash-file-not-found-no-remote-thumb": "Fetching thumbnail 
failed: $1\nURL = $2\n.",
"uploadstash-file-not-found-missing-content-type": "Missing 
content-type header.",
"uploadstash-file-not-found-not-exists": "Cannot find path, or not a 
plain file.",
"uploadstash-file-too-large": "Cannot serve a file larger than $1 
bytes.",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib32ffedd20fac4c79c333b9be8b96e6ace80ab65
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] mediawiki...mobileapps[master]: Summary 2.0: Add mobile content URLs

2017-11-06 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389584 )

Change subject: Summary 2.0: Add mobile content URLs
..

Summary 2.0: Add mobile content URLs

We want to avoid making clients redirect to the pages they need.  This
adds content URLs specially formatted for mobile clients in order to
accomplish that.

Note that the mobile edit URL is still under discussion.

Bug: T170692
Change-Id: I3c4131596f2c22c998fe5802752ae93478b94c03
---
M lib/mobile-util.js
M spec.yaml
2 files changed, 21 insertions(+), 5 deletions(-)


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

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index dd73585..7c30d75 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -100,6 +100,10 @@
 return domain.replace('.m.', '.');
 };
 
+mUtil.canonicalToMobile = function(domain) {
+return domain.replace('.', '.m.');
+};
+
 /**
  * Remove the top-level domain from a domain string, e.g., 'en.wikipedia.org' 
->
  * 'en.wikipedia'.
@@ -266,11 +270,20 @@
 };
 
 mUtil.buildContentUrls = function(domain, title, lead) {
+const mDomain = mUtil.canonicalToMobile(domain);
 return {
-page: `https://${domain}/wiki/${title.getPrefixedDBKey()}`,
-revisions: 
`https://${domain}/wiki/${title.getPrefixedDBKey()}?action=history`,
-edit: `https://${domain}/wiki/${title.getPrefixedDBKey()}?action=edit`,
-talk: lead.talk_ns_text ? 
`https://${domain}/wiki/${lead.talk_ns_text}:${title.getKey()}` : undefined,
+desktop: {
+page: `https://${domain}/wiki/${title.getPrefixedDBKey()}`,
+revisions: 
`https://${domain}/wiki/${title.getPrefixedDBKey()}?action=history`,
+edit: 
`https://${domain}/wiki/${title.getPrefixedDBKey()}?action=edit`,
+talk: lead.talk_ns_text ? 
`https://${domain}/wiki/${lead.talk_ns_text}:${title.getKey()}` : undefined,
+},
+mobile: {
+page: `https://${mDomain}/wiki/${title.getPrefixedDBKey()}`,
+revisions: 
`https://${mDomain}/wiki/Special:History/${title.getPrefixedDBKey()}`,
+edit: 
`https://${mDomain}/wiki/${title.getPrefixedDBKey()}?action=edit`,
+talk: lead.talk_ns_text ? 
`https://${mDomain}/wiki/${lead.talk_ns_text}:${title.getKey()}` : undefined,
+}
 };
 };
 
diff --git a/spec.yaml b/spec.yaml
index c009d74..3807f88 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -895,7 +895,10 @@
 description: Wikidata description for the page
 example: American poet
   content_urls:
-$ref: '#/definitions/content_urls'
+desktop:
+  $ref: '#/definitions/content_urls'
+mobile:
+  $ref: '#/definitions/content_urls'
   api_urls:
 $ref: '#/definitions/api_urls'
   coordinates:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Switch comp suggest to msearch

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

Change subject: Switch comp suggest to msearch
..


Switch comp suggest to msearch

preliminary patch prior adding prefix search

Bug: T178474
Change-Id: I6b4efd6ed37f9cdee0da9e2273cbee468f8e34bb
---
M includes/CompletionSuggester.php
M tests/unit/fixtures/requestLogging/completion_basic_001.response
M tests/unit/fixtures/requestLogging/completion_basic_002.response
3 files changed, 204 insertions(+), 139 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/CompletionSuggester.php b/includes/CompletionSuggester.php
index fd2f0db..bec7b22 100644
--- a/includes/CompletionSuggester.php
+++ b/includes/CompletionSuggester.php
@@ -3,10 +3,14 @@
 namespace CirrusSearch;
 
 use CirrusSearch\Query\CompSuggestQueryBuilder;
+use CirrusSearch\Query\PrefixSearchQueryBuilder;
 use Elastica\Exception\ExceptionInterface;
 use Elastica\Index;
+use Elastica\Multi\ResultSet;
+use Elastica\Multi\Search as MultiSearch;
 use Elastica\Query;
 use CirrusSearch\Search\SearchContext;
+use Elastica\Search;
 use MediaWiki\MediaWikiServices;
 use SearchSuggestionSet;
 use Status;
@@ -56,6 +60,11 @@
  */
 class CompletionSuggester extends ElasticsearchIntermediary {
/**
+* @const string multisearch key to identify the comp suggest request
+*/
+   const MSEARCH_KEY_SUGGEST = "suggest";
+
+   /**
 * @var integer maximum number of result (final)
 */
private $limit;
@@ -90,6 +99,11 @@
 * @var CompSuggestQueryBuilder $compSuggestBuilder (final)
 */
private $compSuggestBuilder;
+
+   /**
+* @var PrefixSearchQueryBuilder $prefixSearchQueryBuilder (final)
+*/
+   private $prefixSearchQueryBuilder;
 
/**
 * @param Connection $conn
@@ -129,6 +143,7 @@
$limit,
$offset
);
+   $this->prefixSearchQueryBuilder = new 
PrefixSearchQueryBuilder();
}
 
/**
@@ -143,30 +158,36 @@
 * @return Status
 */
public function suggest( $text, $variants = null ) {
-   if ( !$this->compSuggestBuilder->areResultsPossible() ) {
+   $suggestSearch = $this->getSuggestSearchRequest( $text, 
$variants );
+   $msearch = new MultiSearch( $this->connection->getClient() );
+   if ( $suggestSearch !== null ) {
+   $msearch->addSearch( $suggestSearch, 
self::MSEARCH_KEY_SUGGEST );
+   }
+
+   if ( empty( $msearch->getSearches() ) ) {
return Status::newGood( 
SearchSuggestionSet::emptySuggestionSet() );
}
 
-   $suggest = $this->compSuggestBuilder->build( $text, $variants );
$this->connection->setTimeout( $this->config->getElement( 
'wgCirrusSearchClientSideSearchTimeout', 'default' ) );
$result = Util::doPoolCounterWork(
'CirrusSearch-Completion',
$this->user,
-   function () use( $suggest, $text ) {
+   function () use( $msearch, $text ) {
$log = $this->newLog( "{queryType} search for 
'{query}'", "comp_suggest", [
'query' => $text,
'offset' => $this->offset,
] );
$this->start( $log );
try {
-   $query = new Query( new 
Query\MatchNone() );
-   $query->setSize( 0 );
-   $query->setSuggest( $suggest );
-   $query->setSource( [ 'target_title' ] );
-   $result = 
$this->completionIndex->search( $query );
-   $result = 
$this->compSuggestBuilder->postProcess( $result,
-   
$this->completionIndex->getName(), $log );
-   return $this->success( $result );
+   $results = $msearch->search();
+   if ( $results->hasError() ||
+   // Catches HTTP errors (ex: 
5xx) not reported
+   // by hasError()
+   !$results->getResponse()->isOk()
+   ) {
+   return $this->multiFailure( 
$results );
+

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Update wikimedia-page-library to 4.7.3.

2017-11-06 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389566 )

Change subject: Update wikimedia-page-library to 4.7.3.
..

Update wikimedia-page-library to 4.7.3.

This includes a nice optimization when collapsing tables.

Change-Id: Iee5903231bac995a7ebcae8770b4d87ec97cd197
---
M app/src/main/assets/bundle.js
M app/src/main/assets/preview.js
M www/package-lock.json
M www/package.json
4 files changed, 28 insertions(+), 74 deletions(-)


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

diff --git a/app/src/main/assets/bundle.js b/app/src/main/assets/bundle.js
index 9b1c1c7..e051ede 100644
--- a/app/src/main/assets/bundle.js
+++ b/app/src/main/assets/bundle.js
@@ -1273,45 +1273,21 @@
  */
 var getTableHeader = function getTableHeader(element, pageTitle) {
   var thArray = [];
-
-  if (!element.children) {
-return thArray;
-  }
-
-  for (var i = 0; i < element.children.length; i++) {
-var el = element.children[i];
-
-if (el.tagName === 'TH') {
-  // ok, we have a TH element!
-  // However, if it contains more than two links, then ignore it, because
-  // it will probably appear weird when rendered as plain text.
-  var aNodes = el.querySelectorAll('a');
-  // todo: these conditionals are very confusing. Rewrite by extracting a
-  //   method or simplify.
-  if (aNodes.length < 3) {
-// todo: remove nonstandard Element.innerText usage
-// Also ignore it if it's identical to the page title.
-if ((el.innerText && el.innerText.length || el.textContent.length) > 0 
&& el.innerText !== pageTitle && el.textContent !== pageTitle && el.innerHTML 
!== pageTitle) {
-  thArray.push(el.innerText || el.textContent);
-}
+  var headers = Polyfill.querySelectorAll(element, 'th');
+  for (var i = 0; i < headers.length; ++i) {
+var header = headers[i];
+var anchors = Polyfill.querySelectorAll(header, 'a');
+if (anchors.length < 3) {
+  // Also ignore it if it's identical to the page title.
+  if ((header.textContent && header.textContent.length) > 0 && 
header.textContent !== pageTitle && header.innerHTML !== pageTitle) {
+thArray.push(header.textContent);
   }
 }
-
-// if it's a table within a table, don't worry about it
-if (el.tagName === 'TABLE') {
-  continue;
-}
-
-// todo: why do we need to recurse?
-// recurse into children of this element
-var ret = getTableHeader(el, pageTitle);
-
-// did we get a list of TH from this child?
-if (ret.length > 0) {
-  thArray = thArray.concat(ret);
+if (thArray.length === 2) {
+  // 'newCaption' only ever uses the first 2 items.
+  break;
 }
   }
-
   return thArray;
 };
 
@@ -2009,7 +1985,8 @@
   lastEdited: 2,
   pageIssues: 3,
   disambiguation: 4,
-  coordinate: 5
+  coordinate: 5,
+  talkPage: 6
 };
 
 /**
diff --git a/app/src/main/assets/preview.js b/app/src/main/assets/preview.js
index c890a04..73a1a24 100644
--- a/app/src/main/assets/preview.js
+++ b/app/src/main/assets/preview.js
@@ -456,45 +456,21 @@
  */
 var getTableHeader = function getTableHeader(element, pageTitle) {
   var thArray = [];
-
-  if (!element.children) {
-return thArray;
-  }
-
-  for (var i = 0; i < element.children.length; i++) {
-var el = element.children[i];
-
-if (el.tagName === 'TH') {
-  // ok, we have a TH element!
-  // However, if it contains more than two links, then ignore it, because
-  // it will probably appear weird when rendered as plain text.
-  var aNodes = el.querySelectorAll('a');
-  // todo: these conditionals are very confusing. Rewrite by extracting a
-  //   method or simplify.
-  if (aNodes.length < 3) {
-// todo: remove nonstandard Element.innerText usage
-// Also ignore it if it's identical to the page title.
-if ((el.innerText && el.innerText.length || el.textContent.length) > 0 
&& el.innerText !== pageTitle && el.textContent !== pageTitle && el.innerHTML 
!== pageTitle) {
-  thArray.push(el.innerText || el.textContent);
-}
+  var headers = Polyfill.querySelectorAll(element, 'th');
+  for (var i = 0; i < headers.length; ++i) {
+var header = headers[i];
+var anchors = Polyfill.querySelectorAll(header, 'a');
+if (anchors.length < 3) {
+  // Also ignore it if it's identical to the page title.
+  if ((header.textContent && header.textContent.length) > 0 && 
header.textContent !== pageTitle && header.innerHTML !== pageTitle) {
+thArray.push(header.textContent);
   }
 }
-
-// if it's a table within a table, don't worry about it
-if (el.tagName === 'TABLE') {
-  continue;
-}
-
-// todo: why do we need to recurse?
-// recurse into children of this element
-var ret = getTableHeader(el, pageTitle);
-
-// did we get a list of TH 

[MediaWiki-commits] [Gerrit] wikimedia/portals[master]: SVG Sprites - Adding new gulp tasks

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

Change subject: SVG Sprites - Adding new gulp tasks
..


SVG Sprites - Adding new gulp tasks

Add new gulp tasks to support the creation of SVG sprites.
These SVG sprites will be used as CSS background images like the
current png based sprites.

Adds a mustache template to generate the CSS file that goes along
with the SVG sprites as well.

A PNG back of the SVG sprite will also be created using svg2png
(a phantomjs based image generator).

The SVG sprite & png fallback image will also contain a cache-busting hash 
suffix.

Note: No actual new SVG images are being added in this patch.

Bug: T129634
Change-Id: I0d9bf4bd9bc6e3d1576c1f8789bc162cff22f0c5
---
A dev/wikipedia.org/assets/css/sprite-template.mustache
M gulpfile.js
M package.json
3 files changed, 130 insertions(+), 15 deletions(-)

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



diff --git a/dev/wikipedia.org/assets/css/sprite-template.mustache 
b/dev/wikipedia.org/assets/css/sprite-template.mustache
new file mode 100644
index 000..1ea6420
--- /dev/null
+++ b/dev/wikipedia.org/assets/css/sprite-template.mustache
@@ -0,0 +1,29 @@
+{{#hasCommon}}.{{commonName}} {
+background-image: url("portal/wikipedia.org/assets/img/{{{sprite}}}");
+background-image: url("portal/wikipedia.org/assets/img/{{{sprite}}}"), 
linear-gradient(transparent, transparent);
+background-repeat: no-repeat;
+display: inline-block;
+vertical-align: middle;
+}
+{{/hasCommon}}
+
+{{#shapes}}{{#selector.shape}}{{expression}}{{^last}},
+{{/last}}{{/selector.shape}} {
+{{#hasCommon}}
+background-position: {{position.relative.xy}};
+{{/hasCommon}}
+{{^hasCommon}}background: url("{{{sprite}}}") {{position.relative.xy}} 
no-repeat;
+{{/hasCommon}}
+{{#dimensions.inline}}
+width: {{width.outer}}px;
+height: {{height.outer}}px;
+{{/dimensions.inline}}
+}
+{{#dimensions.extra}}
+{{#selector.dimensions}}{{expression}}{{^last}},
+{{/last}}{{/selector.dimensions}} {
+width: {{width.outer}}px;
+height: {{height.outer}}px;
+}{{/dimensions.extra}}
+
+{{/shapes}}
diff --git a/gulpfile.js b/gulpfile.js
index a331f7c..b7d54e9 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -22,6 +22,14 @@
del = require( 'del' ),
plugins = gulpLoadPlugins(),
gulpSlash = require( 'gulp-slash' ),
+   replace = require( 'gulp-replace' ),
+   spriteConfig = {
+   cssPrefix: 'sprite',
+   assets: 'assets/img/sprite_assets/*.svg',
+   outputName: 'sprite',
+   outputCSS: 'sprite.css',
+   template: 'assets/css/sprite-template.mustache'
+   },
portalParam = argv.portal,
getBaseDir, getProdDir, getConfig;
 
@@ -168,8 +176,8 @@
  === */
 
 /**
- * Compiles Handlebars templates into dev folder.
- * executes 'build' task if config is undefined
+ * Compile Handlebars templates into dev folder.
+ * Execute 'build' task if config is undefined
  */
 
 gulp.task( 'compile-handlebars', function () {
@@ -183,8 +191,8 @@
 } );
 
 /**
- * Compiles postCSS files into regular CSS and
- * outputs them into the CSS dev folder.
+ * Compile postCSS files into regular CSS and
+ * output them into the CSS dev folder.
  */
 gulp.task( 'postcss', function () {
 
@@ -201,8 +209,8 @@
 } );
 
 /**
- * Inlines assets of index.html in dev folder,
- * moves index.html into prod folder
+ * Inline assets of index.html in dev folder
+ * and move index.html into prod folder
  */
 gulp.task( 'inline-assets', [ 'compile-handlebars', 'postcss' ], function () {
 
@@ -214,7 +222,7 @@
 } );
 
 /**
- * Cleans `assets/js/` folder from the production folder.
+ * Clean `assets/js/` folder from the prod folder.
  */
 gulp.task( 'clean-prod-js', [ 'inline-assets' ], function () {
return del( [ getProdDir() + '/assets/js' ] );
@@ -231,7 +239,7 @@
 } );
 
 /**
- * Concatenates JS files into a single file and minifies it.
+ * Concatenate JS files into a single file and minify it.
  */
 gulp.task( 'concat-minify-js', [ 'clean-prod-js' ], function () {
 
@@ -248,7 +256,7 @@
 } );
 
 /**
- * Minifies index.html file in prod folder,
+ * Minify index.html file in prod folder,
  * depends on inline-assets which moves index.html from dev to prod.
  */
 gulp.task( 'minify-html', [ 'inline-assets', 'concat-minify-js' ], function () 
{
@@ -261,7 +269,7 @@
 } );
 
 /**
- * Optimizes images in dev folder and moves them into prod folder
+ * Optimize images in dev folder and moves them into prod folder.
  */
 gulp.task( 'optimize-images', function () {
 
@@ -276,7 +284,7 @@
 } );
 
 /**
- * Watches for changes in dev folder and compiles:
+ * Watch for changes in dev folder and compile:
  * - handlebars templates
  * - postCSS files
  * into dev folder.
@@ -291,7 +299,7 @@
 } );
 
 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: WIP: Randomizr var. B

2017-11-06 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389564 )

Change subject: WIP: Randomizr var. B
..

WIP: Randomizr var. B

Bug: T158788
Change-Id: I852dd46323258cfab4d89ddbdcbc4fefb9ed5734
---
M app/build.gradle
M app/src/main/AndroidManifest.xml
M app/src/main/java/org/wikipedia/feed/FeedCoordinator.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java
M app/src/main/java/org/wikipedia/feed/mainpage/MainPageCardView.java
M app/src/main/java/org/wikipedia/feed/random/RandomCardView.java
M app/src/main/java/org/wikipedia/feed/view/StaticCardView.java
M app/src/main/java/org/wikipedia/main/MainFragment.java
A app/src/main/java/org/wikipedia/random/RandomActivity.java
M app/src/main/java/org/wikipedia/random/RandomArticleRequestHandler.java
A app/src/main/java/org/wikipedia/random/RandomFragment.java
A app/src/main/java/org/wikipedia/random/RandomItemView.java
M app/src/main/java/org/wikipedia/random/RandomSummaryClient.java
M app/src/main/java/org/wikipedia/readinglist/AddToReadingListDialog.java
A app/src/main/res/drawable/background_random.png
A app/src/main/res/drawable/ic_replay_black_24dp.xml
A app/src/main/res/drawable/ic_today_24dp.xml
D app/src/main/res/drawable/icon_feed_random.xml
D app/src/main/res/drawable/icon_feed_today.xml
A app/src/main/res/layout-land/fragment_random.xml
A app/src/main/res/layout/fragment_random.xml
A app/src/main/res/layout/view_random_item.xml
M app/src/main/res/layout/view_static_card.xml
M app/src/main/res/values/strings.xml
M app/src/main/res/values/strings_no_translate.xml
M app/src/test/java/org/wikipedia/random/RandomSummaryClientTest.java
27 files changed, 689 insertions(+), 164 deletions(-)


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

diff --git a/app/build.gradle b/app/build.gradle
index f2a915b..8458420 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -208,6 +208,7 @@
 implementation "commons-io:commons-io:2.5"
 implementation 'org.jsoup:jsoup:1.10.2'
 implementation 'com.dmitrybrant:zimdroid:0.0.14'
+implementation "com.yuyakaido.android:card-stack-view:1.0.0-beta8"
 
 annotationProcessor 
"com.jakewharton:butterknife-compiler:$butterKnifeVersion"
 
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 02b4856..d86513b 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -236,6 +236,10 @@
 android:label="@string/on_this_day"
 android:theme="@style/AppTheme.ActionBar"/>
 
+
+
  -1) {
-feedAdapter.notifyItemChanged(feedAdapter.getItemPosition(card));
-}
 }
 
 public boolean shouldElevateToolbar() {
@@ -341,16 +337,16 @@
 }
 
 @Override
-public void onAddFeaturedPageToList(@NonNull FeaturedArticleCard card, 
@NonNull HistoryEntry entry) {
+public void onAddFeaturedPageToList(@NonNull FeaturedArticleCardView 
view, @NonNull HistoryEntry entry) {
 if (getCallback() != null) {
-getCallback().onFeedAddFeaturedPageToList(FeedFragment.this, 
card, entry);
+getCallback().onFeedAddFeaturedPageToList(view, entry);
 }
 }
 
 @Override
-public void onRemoveFeaturedPageFromList(@NonNull FeaturedArticleCard 
card, @NonNull HistoryEntry entry) {
+public void onRemoveFeaturedPageFromList(@NonNull 
FeaturedArticleCardView view, @NonNull HistoryEntry entry) {
 if (getCallback() != null) {
-getCallback().onFeedRemovePageFromList(FeedFragment.this, 
card, entry);
+getCallback().onFeedRemovePageFromList(view, entry);
 }
 }
 
@@ -441,6 +437,13 @@
 }
 
 @Override
+public void onRandomClick(@NonNull RandomCardView view) {
+ActivityOptionsCompat options = ActivityOptionsCompat.
+makeSceneTransitionAnimation(getActivity(), view, 
getString(R.string.transition_random_activity));
+startActivity(RandomActivity.newIntent(getActivity()), 
options.toBundle());
+}
+
+@Override
 public void onGetRandomError(@NonNull Throwable t, @NonNull final 
RandomCardView view) {
 Snackbar snackbar = FeedbackUtil.makeSnackbar(getActivity(), 
ThrowableUtil.isOffline(t)
 ? getString(R.string.view_wiki_error_message_offline) : 
t.getMessage(),
diff --git 
a/app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java 
b/app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java
index 5ff1ef0..df8288d 100644
--- a/app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java
+++ b/app/src/main/java/org/wikipedia/feed/featured/FeaturedArticleCardView.java
@@ -33,8 +33,8 @@

[MediaWiki-commits] [Gerrit] mediawiki...MinervaNeue[master]: Align icon variants with WikimediaUI color palette

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

Change subject: Align icon variants with WikimediaUI color palette
..


Align icon variants with WikimediaUI color palette

Follow-up to I067973dca580eddc09b770362183d7a5b1634b7c

Bug: T146799
Change-Id: Idd02de3883c8c5a971dff657d002f4c9e09c88eb
---
M skin.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/skin.json b/skin.json
index 174a670..23d999a 100644
--- a/skin.json
+++ b/skin.json
@@ -149,11 +149,11 @@
"class": "ResourceLoaderImageModule",
"variants": {
"gray": {
-   "color": "#BBB",
+   "color": "#54595d",
"global": true
},
"invert": {
-   "color": "#FFF",
+   "color": "#fff",
"global": true
}
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idd02de3883c8c5a971dff657d002f4c9e09c88eb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/skins/MinervaNeue
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Phuedx 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] translatewiki[master]: Archive the BookManagerv2 extension

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

Change subject: Archive the BookManagerv2 extension
..


Archive the BookManagerv2 extension

Bug: T178938
Change-Id: I8621546b78a441b89f022360e9c9d85e087c65f9
---
M groups/MediaWiki/mediawiki-extensions.txt
1 file changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index 6915059..782ad15 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -472,14 +472,6 @@
 descmsg = bm-printversion-desc
 aliasfile = BookManager/language/BookManager.alias.php
 
-Book Manager v2
-optional = bookmanagerv2-isbn, bookmanagerv2-lccn, bookmanagerv2-oclc
-optional = bookmanagerv2-isbn-field, bookmanagerv2-lccn-field, 
bookmanagerv2-oclc-field
-
-#Book Manager v2 - Json Schema: dupe of "Event Logging - Json Schema"
-#file = BookManagerv2/includes/i18n/%CODE%.json
-#id = ext-bookmanagerv2-jsonschema
-
 # Bootstrap //  Read only
 
 Bounce Handler

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8621546b78a441b89f022360e9c9d85e087c65f9
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add geo coordinates to summary 2.0 response

2017-11-06 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389559 )

Change subject: Add geo coordinates to summary 2.0 response
..

Add geo coordinates to summary 2.0 response

This should have been in Ia8d3b03d but was overlooked.

Bug: T178333
Change-Id: I313e0fd0c136e8fbd5957b408baab0ce8ca5998b
---
M lib/mobile-util.js
M spec.yaml
2 files changed, 15 insertions(+), 11 deletions(-)


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

diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 4104abb..dd73585 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -256,6 +256,10 @@
 revision: lead.revision,
 timestamp: lead.lastmodified,
 description: lead.description,
+coordinates: lead.geo && {
+lat: lead.geo.latitude,
+lon: lead.geo.longitude
+},
 content_urls: mUtil.buildContentUrls(domain, title, lead),
 api_urls: mUtil.buildApiUrls(domain, title, lead),
 }, summary);
diff --git a/spec.yaml b/spec.yaml
index c3726d6..c009d74 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -898,17 +898,17 @@
 $ref: '#/definitions/content_urls'
   api_urls:
 $ref: '#/definitions/api_urls'
-#  coordinates:
-#type: object
-#description: The coordinates of the item
-#properties:
-#  lat:
-#type: number
-#description: The latitude
-#  lon:
-#type: number
-#description: The longitude
-#requiredProperties: [ 'lat', 'lon' ]
+  coordinates:
+type: object
+description: The coordinates of the item
+properties:
+  lat:
+type: number
+description: The latitude
+  lon:
+type: number
+description: The longitude
+requiredProperties: [ 'lat', 'lon' ]
 required:
   - type
   - title

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Add hif.wiktionary to Parsoid

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

Change subject: Add hif.wiktionary to Parsoid
..


Add hif.wiktionary to Parsoid

Bug: T173643
Change-Id: I4cf993b353b62c5719ccf0a26b633ea373305bdb
---
M lib/config/sitematrix.json
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index 3f115ae..f17f76a 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -2589,6 +2589,12 @@
"dbname": "hifwiki",
"code": "wiki",
"sitename": "Wikipedia"
+   },
+   {
+   "url": "https://hif.wiktionary.org;,
+   "dbname": "hifwiktionary",
+   "code": "wiktionary",
+   "sitename": "Sabdkosh"
}
],
"dir": "ltr",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cf993b353b62c5719ccf0a26b633ea373305bdb
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com>
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/mediawiki-config[master]: Update IW map again...

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

Change subject: Update IW map again...
..


Update IW map again...

Change-Id: I9ba817f59e935f329b3713afa0b6e630e6f3c412
---
M wmf-config/interwiki.php
1 file changed, 12 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 864d68c..d5f1e14 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -6182,6 +6182,15 @@
'hifwiki:chapter' => '1 https://hif.wikimedia.org/wiki/$1',
'hifwiki:v' => '1 https://hif.wikiversity.org/wiki/$1',
'hifwiki:voy' => '1 https://hif.wikivoyage.org/wiki/$1',
+   '__sites:hifwiktionary' => 'wiktionary',
+   'hifwiktionary:w' => '1 https://hif.wikipedia.org/wiki/$1',
+   'hifwiktionary:q' => '1 https://hif.wikiquote.org/wiki/$1',
+   'hifwiktionary:b' => '1 https://hif.wikibooks.org/wiki/$1',
+   'hifwiktionary:n' => '1 https://hif.wikinews.org/wiki/$1',
+   'hifwiktionary:s' => '1 https://hif.wikisource.org/wiki/$1',
+   'hifwiktionary:chapter' => '1 https://hif.wikimedia.org/wiki/$1',
+   'hifwiktionary:v' => '1 https://hif.wikiversity.org/wiki/$1',
+   'hifwiktionary:voy' => '1 https://hif.wikivoyage.org/wiki/$1',
'__sites:hiwiki' => 'wiki',
'hiwiki:wikt' => '1 https://hi.wiktionary.org/wiki/$1',
'hiwiki:q' => '1 https://hi.wikiquote.org/wiki/$1',
@@ -11616,7 +11625,7 @@
'__list:_wikimedia' => 'aa ab ace ady af ak als am an ang ar arc arz as 
ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo bpy 
br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu cv 
cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro fj 
fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi hif 
ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka kaa 
kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb lbe 
lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk ml mn 
mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn no nov 
nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms pnt pnb 
ps pt qu rm rmy rn ro roa-rup roa-tara ru rue rw sa sah sc scn sco sd se sg sh 
si simple sk sl sm sn so sq sr srn ss st stq su sv sw szl ta tcy te tet tg th 
ti tk tl tn to tpi tr ts tt tum tw ty tyv udm ug uk ur uz ve vec vep vi vls vo 
wa war wo wuu xal xh xmf yi yo za zea zh zh-classical zh-min-nan zh-yue zu cz 
dk epo jp minnan nb zh-cfr zh-cn zh-tw nan vro cmn lzh yue rup gsw be-tarask 
sgs egl',
'__list:_wikiversity' => 'aa ab ace ady af ak als am an ang ar arc arz 
as ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo 
bpy br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu 
cv cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro 
fj fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi 
hif ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka 
kaa kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb 
lbe lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk 
ml mn mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn 
no nov nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms 
pnt pnb ps pt qu rm rmy rn ro roa-rup roa-tara ru rue rw sa sah sc scn sco sd 
se sg sh si simple sk sl sm sn so sq sr srn ss st stq su sv sw szl ta tcy te 
tet tg th ti tk tl tn to tpi tr ts tt tum tw ty tyv udm ug uk ur uz ve vec vep 
vi vls vo wa war wo wuu xal xh xmf yi yo za zea zh zh-classical zh-min-nan 
zh-yue zu cz dk epo jp minnan nb zh-cfr zh-cn zh-tw nan vro cmn lzh yue rup gsw 
be-tarask sgs egl mul v',
'__list:_wikivoyage' => 'aa ab ace ady af ak als am an ang ar arc arz 
as ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo 
bpy br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu 
cv cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro 
fj fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi 
hif ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka 
kaa kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb 
lbe lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk 
ml mn mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn 
no nov nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms 
pnt pnb ps pt qu rm rmy rn ro 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Update sitematrix

2017-11-06 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389558 )

Change subject: Update sitematrix
..

Update sitematrix

Change-Id: I2af04c6aa0ea98352397d574b0ace773d817c18c
---
M lib/config/sitematrix.json
1 file changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/lib/config/sitematrix.json b/lib/config/sitematrix.json
index f17f76a..c87fde4 100644
--- a/lib/config/sitematrix.json
+++ b/lib/config/sitematrix.json
@@ -5680,7 +5680,7 @@
},
"233": {
"code": "se",
-   "name": "sámegiella",
+   "name": "davvisámegiella",
"site": [
{
"url": "https://se.wikipedia.org;,
@@ -7398,7 +7398,7 @@
"dir": "ltr",
"localname": "Zulu"
},
-   "count": 914,
+   "count": 916,
"specials": [
{
"url": "https://advisory.wikimedia.org;,
@@ -7574,6 +7574,13 @@
"private": ""
},
{
+   "url": "https://electcom.wikimedia.org;,
+   "dbname": "electcomwiki",
+   "code": "electcom",
+   "sitename": "Wikipedia",
+   "private": ""
+   },
+   {
"url": "https://ee.wikimedia.org;,
"dbname": "etwikimedia",
"code": "etwikimedia",

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update IW map again...

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389557 )

Change subject: Update IW map again...
..

Update IW map again...

Change-Id: I9ba817f59e935f329b3713afa0b6e630e6f3c412
---
M wmf-config/interwiki.php
1 file changed, 12 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 864d68c..d5f1e14 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -6182,6 +6182,15 @@
'hifwiki:chapter' => '1 https://hif.wikimedia.org/wiki/$1',
'hifwiki:v' => '1 https://hif.wikiversity.org/wiki/$1',
'hifwiki:voy' => '1 https://hif.wikivoyage.org/wiki/$1',
+   '__sites:hifwiktionary' => 'wiktionary',
+   'hifwiktionary:w' => '1 https://hif.wikipedia.org/wiki/$1',
+   'hifwiktionary:q' => '1 https://hif.wikiquote.org/wiki/$1',
+   'hifwiktionary:b' => '1 https://hif.wikibooks.org/wiki/$1',
+   'hifwiktionary:n' => '1 https://hif.wikinews.org/wiki/$1',
+   'hifwiktionary:s' => '1 https://hif.wikisource.org/wiki/$1',
+   'hifwiktionary:chapter' => '1 https://hif.wikimedia.org/wiki/$1',
+   'hifwiktionary:v' => '1 https://hif.wikiversity.org/wiki/$1',
+   'hifwiktionary:voy' => '1 https://hif.wikivoyage.org/wiki/$1',
'__sites:hiwiki' => 'wiki',
'hiwiki:wikt' => '1 https://hi.wiktionary.org/wiki/$1',
'hiwiki:q' => '1 https://hi.wikiquote.org/wiki/$1',
@@ -11616,7 +11625,7 @@
'__list:_wikimedia' => 'aa ab ace ady af ak als am an ang ar arc arz as 
ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo bpy 
br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu cv 
cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro fj 
fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi hif 
ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka kaa 
kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb lbe 
lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk ml mn 
mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn no nov 
nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms pnt pnb 
ps pt qu rm rmy rn ro roa-rup roa-tara ru rue rw sa sah sc scn sco sd se sg sh 
si simple sk sl sm sn so sq sr srn ss st stq su sv sw szl ta tcy te tet tg th 
ti tk tl tn to tpi tr ts tt tum tw ty tyv udm ug uk ur uz ve vec vep vi vls vo 
wa war wo wuu xal xh xmf yi yo za zea zh zh-classical zh-min-nan zh-yue zu cz 
dk epo jp minnan nb zh-cfr zh-cn zh-tw nan vro cmn lzh yue rup gsw be-tarask 
sgs egl',
'__list:_wikiversity' => 'aa ab ace ady af ak als am an ang ar arc arz 
as ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo 
bpy br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu 
cv cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro 
fj fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi 
hif ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka 
kaa kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb 
lbe lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk 
ml mn mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn 
no nov nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms 
pnt pnb ps pt qu rm rmy rn ro roa-rup roa-tara ru rue rw sa sah sc scn sco sd 
se sg sh si simple sk sl sm sn so sq sr srn ss st stq su sv sw szl ta tcy te 
tet tg th ti tk tl tn to tpi tr ts tt tum tw ty tyv udm ug uk ur uz ve vec vep 
vi vls vo wa war wo wuu xal xh xmf yi yo za zea zh zh-classical zh-min-nan 
zh-yue zu cz dk epo jp minnan nb zh-cfr zh-cn zh-tw nan vro cmn lzh yue rup gsw 
be-tarask sgs egl mul v',
'__list:_wikivoyage' => 'aa ab ace ady af ak als am an ang ar arc arz 
as ast atj av ay az azb ba bar bat-smg bcl be be-x-old bg bh bi bjn bm bn bo 
bpy br bs bug bxr ca cbk-zam cdo ce ceb ch cho chr chy ckb co cr crh cs csb cu 
cv cy da de din diq dsb dty dv dz ee el eml en eo es et eu ext fa ff fi fiu-vro 
fj fo fr frp frr fur fy ga gag gan gd gl glk gn gom got gu gv ha hak haw he hi 
hif ho hr hsb ht hu hy hz ia id ie ig ii ik ilo io is it iu ja jam jbo jv ka 
kaa kab kbd kbp kg ki kj kk kl km kn ko koi kr krc ks ksh ku kv kw ky la lad lb 
lbe lez lg li lij lmo ln lo lrc lt ltg lv mai map-bms mdf mg mh mhr mi min mk 
ml mn mo mr mrj ms mt mus mwl my myv mzn na nah nap nds nds-nl ne new ng nl nn 
no nov nrm nso nv ny oc olo om or os pa pag pam pap pcd pdc pfl pi pih pl pms 
pnt pnb ps pt qu rm 

[MediaWiki-commits] [Gerrit] analytics/refinery[master]: Add hifwiktionary

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389556 )

Change subject: Add hifwiktionary
..

Add hifwiktionary

Bug: T173643
Change-Id: I215c34c4fb46f4d6e1ae14e308e5182ddeab5095
---
M static_data/pageview/whitelist/whitelist.tsv
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/refinery 
refs/changes/56/389556/2

diff --git a/static_data/pageview/whitelist/whitelist.tsv 
b/static_data/pageview/whitelist/whitelist.tsv
index 5988e91..afbc9d0 100644
--- a/static_data/pageview/whitelist/whitelist.tsv
+++ b/static_data/pageview/whitelist/whitelist.tsv
@@ -298,6 +298,7 @@
 projecthe.wikivoyage   2015-10-12 00:00:00
 projecthe.wiktionary   2015-10-12 00:00:00
 projecthif.wikipedia   2015-10-12 00:00:00
+projecthif.wiktionary  2017-11-06 00:00:00
 projecthi.wikibooks2015-10-12 00:00:00
 projecthi.wikipedia2015-10-12 00:00:00
 projecthi.wikiquote2015-10-12 00:00:00

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I215c34c4fb46f4d6e1ae14e308e5182ddeab5095
Gerrit-PatchSet: 2
Gerrit-Project: analytics/refinery
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...mobileapps[master]: Add common URLs to summary API

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

Change subject: Add common URLs to summary API
..


Add common URLs to summary API

Bug: T170692
Change-Id: I6a10a237f1491ab447a3ec0309c20fc4edb17706
---
M lib/mobile-util.js
M lib/mwapi.js
M routes/mobile-sections.js
M spec.yaml
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_formatted-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_Frankenstein.json
M 
test/diff/results/page_mobile-sections-enwiki-User%3ABSitzmann_(WMF)_MCS_Test_TitleLinkEncoding.json
8 files changed, 179 insertions(+), 51 deletions(-)

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



diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index ca5a723..4104abb 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -3,6 +3,7 @@
 const underscore = require('underscore');
 const uuid = require('cassandra-uuid').TimeUuid;
 const HTTPError = require('./util').HTTPError;
+const transforms = require('./transforms');
 const mUtil = {};
 
 const NS_MAIN = 0;
@@ -218,6 +219,71 @@
 };
 };
 
+/*
+ * Build a summary for the page given in req
+ * @param {!Object} title a mediawiki-title object for the page title
+ * @param {!Object} lead a page lead object for the page
+ * @return {!Object} a summary 2.0 spec-compliant page summary object
+ */
+mUtil.buildSummary = function(domain, title, lead) {
+let summary = {};
+const type = 'standard';
+let code = 200;
+
+if (!lead) {
+return false;
+} else if (lead.contentmodel || 
!mUtil.SUMMARY_NS_WHITELIST.includes(lead.ns)) {
+code = 204;
+} else if (lead.intro) {
+summary = transforms.summarize(lead.intro);
+} else {
+// If the lead introduction is empty we should consider it
+// a placeholder e.g. redirect page. To avoid sending an empty
+// summary 204. (T176517)
+code = 204;
+}
+return Object.assign({
+code,
+type,
+title: lead.normalizedtitle,
+displaytitle: lead.displaytitle,
+titles: mUtil.buildTitleDictionary(title, lead),
+pageid: lead.id,
+thumbnail: lead.thumbnail,
+originalimage: lead.originalimage,
+lang: lead.lang,
+dir: lead.dir,
+revision: lead.revision,
+timestamp: lead.lastmodified,
+description: lead.description,
+content_urls: mUtil.buildContentUrls(domain, title, lead),
+api_urls: mUtil.buildApiUrls(domain, title, lead),
+}, summary);
+};
+
+mUtil.buildContentUrls = function(domain, title, lead) {
+return {
+page: `https://${domain}/wiki/${title.getPrefixedDBKey()}`,
+revisions: 
`https://${domain}/wiki/${title.getPrefixedDBKey()}?action=history`,
+edit: `https://${domain}/wiki/${title.getPrefixedDBKey()}?action=edit`,
+talk: lead.talk_ns_text ? 
`https://${domain}/wiki/${lead.talk_ns_text}:${title.getKey()}` : undefined,
+};
+};
+
+mUtil.buildApiUrls = function(domain, title, lead) {
+return {
+summary: 
`https://${domain}/api/rest_v1/page/summary/${title.getPrefixedDBKey()}`,
+mobile_sections: 
`https://${domain}/api/rest_v1/page/mobile-sections/${title.getPrefixedDBKey()}`,
+read_html: 
`https://${domain}/api/rest_v1/page/read-html/${title.getPrefixedDBKey()}`,
+content_html: 
`https://${domain}/api/rest_v1/page/content-html/${title.getPrefixedDBKey()}`,
+metadata: 
`https://${domain}/api/rest_v1/page/metadata/${title.getPrefixedDBKey()}`,
+references: 
`https://${domain}/api/rest_v1/page/references/${title.getPrefixedDBKey()}`,
+media: 
`https://${domain}/api/rest_v1/page/media/${title.getPrefixedDBKey()}`,
+edit_html: 
`https://${domain}/api/rest_v1/page/html/${title.getPrefixedDBKey()}`,
+talk_page_html: lead.talk_ns_text ? 
`https://${domain}/api/rest_v1/page/html/${lead.talk_ns_text}:${title.getKey()}`
 : undefined,
+};
+};
+
 mUtil.throw404 = function(message) {
 throw new HTTPError({
 status: 404,
@@ -226,7 +292,6 @@
 detail: message
 });
 };
-
 
 /* jslint bitwise: true */
 /* eslint no-bitwise: ["error", { "allow": ["<<"] }] */
diff --git a/lib/mwapi.js b/lib/mwapi.js
index 8572593..ad987df 100644
--- a/lib/mwapi.js
+++ b/lib/mwapi.js
@@ -9,6 +9,7 @@
 const api = require('./api-util');
 const HTTPError = sUtil.HTTPError;
 const Title = require('mediawiki-title').Title;
+const Namespace = require('mediawiki-title').Namespace;
 
 const mwapi = {};
 
@@ -217,6 +218,8 @@
 // Always set to unknown until support in API added (T172228)
 modifier.gender = 'unknown';
 const mainpage = res.siteinfo.general.mainpage === title ? true : 
undefined;

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add hifwiktioanry too labsdb.yaml

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389555 )

Change subject: Add hifwiktioanry too labsdb.yaml
..

Add hifwiktioanry too labsdb.yaml

Bug: T173643
Change-Id: I92acfeaf87f56f214e46dce216ab2317925abde2
---
M hieradata/common/profile/openstack/base/pdns/labsdb.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/55/389555/1

diff --git a/hieradata/common/profile/openstack/base/pdns/labsdb.yaml 
b/hieradata/common/profile/openstack/base/pdns/labsdb.yaml
index 3bfe95b..fd17098 100644
--- a/hieradata/common/profile/openstack/base/pdns/labsdb.yaml
+++ b/hieradata/common/profile/openstack/base/pdns/labsdb.yaml
@@ -325,6 +325,7 @@
   - hewikivoyage
   - hewiktionary
   - hifwiki
+  - hifwiktionary
   - hiwiki
   - hiwikibooks
   - hiwikiquote

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaEvents[master]: Add modules/ sub directories to match module registration

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

Change subject: Add modules/ sub directories to match module registration
..


Add modules/ sub directories to match module registration

* One for 'all' (ext.wikimediaEvents)
* One for 'loggedin' (ext.wikimediaEvents.loggedin)

Remove:
* Unused humanSearchRelevance code (follows-up 80f389f62, T175047).
* Old and unused schemas:
  - TimingData (stopped years ago)
  - DeprecatedUsage (stopped years ago)
  - ModuleLoadFailure (stopped years ago)
  - HumanSearchRelevance (follows-up 80f389f62)

Change-Id: Ibbf32ad46ca7f2c6906ee2b5cbe29bbd8d5e4e69
---
M Gruntfile.js
M extension.json
R modules/all/ext.wikimediaEvents.events.js
R modules/all/ext.wikimediaEvents.geoFeatures.js
R modules/all/ext.wikimediaEvents.kartographer.js
R modules/all/ext.wikimediaEvents.print.js
R modules/all/ext.wikimediaEvents.readingDepth.js
R modules/all/ext.wikimediaEvents.recentChangesClicks.js
R modules/all/ext.wikimediaEvents.searchSatisfaction.js
R modules/all/ext.wikimediaEvents.statsd.js
D modules/ext.wikimediaEvents.humanSearchRelevance.css
D modules/ext.wikimediaEvents.humanSearchRelevance.js
R modules/loggedin/ext.wikimediaEvents.deprecate.js
13 files changed, 10 insertions(+), 195 deletions(-)

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



diff --git a/Gruntfile.js b/Gruntfile.js
index c1b8031..0383019 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -31,6 +31,6 @@
}
} );
 
-   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana', 
'stylelint' ] );
+   grunt.registerTask( 'test', [ 'eslint', 'jsonlint', 'banana' /* , 
'stylelint' */ ] );
grunt.registerTask( 'default', 'test' );
 };
diff --git a/extension.json b/extension.json
index 1558b72..9f6d515 100644
--- a/extension.json
+++ b/extension.json
@@ -72,16 +72,6 @@
]
},
"ResourceModules": {
-   "schema.TimingData": {
-   "class": "ResourceLoaderSchemaModule",
-   "schema": "TimingData",
-   "revision": 7254808
-   },
-   "schema.DeprecatedUsage": {
-   "class": "ResourceLoaderSchemaModule",
-   "schema": "DeprecatedUsage",
-   "revision": 7906187
-   },
"schema.Print": {
"class": "ResourceLoaderSchemaModule",
"schema": "Print",
@@ -91,11 +81,6 @@
"class": "ResourceLoaderSchemaModule",
"schema": "ReadingDepth",
"revision": 16325045
-   },
-   "schema.ModuleLoadFailure": {
-   "class": "ResourceLoaderSchemaModule",
-   "schema": "ModuleLoadFailure",
-   "revision": 12407847
},
"schema.Edit": {
"class": "ResourceLoaderSchemaModule",
@@ -157,24 +142,19 @@
"schema": "RecentChangesTopLinks",
"revision": 16732249
},
-   "schema.HumanSearchRelevance": {
-   "class": "ResourceLoaderSchemaModule",
-   "schema": "HumanSearchRelevance",
-   "revision": 17073843
-   },
"ext.wikimediaEvents": {
"scripts": [
-   "ext.wikimediaEvents.events.js",
-   "ext.wikimediaEvents.statsd.js",
-   "ext.wikimediaEvents.kartographer.js",
-   "ext.wikimediaEvents.print.js",
-   "ext.wikimediaEvents.readingDepth.js",
-   "ext.wikimediaEvents.geoFeatures.js",
-   "ext.wikimediaEvents.recentChangesClicks.js"
+   "all/ext.wikimediaEvents.events.js",
+   "all/ext.wikimediaEvents.statsd.js",
+   "all/ext.wikimediaEvents.kartographer.js",
+   "all/ext.wikimediaEvents.print.js",
+   "all/ext.wikimediaEvents.readingDepth.js",
+   "all/ext.wikimediaEvents.geoFeatures.js",
+   "all/ext.wikimediaEvents.recentChangesClicks.js"
],
"skinScripts": {
"default": [
-   
"ext.wikimediaEvents.searchSatisfaction.js"
+   
"all/ext.wikimediaEvents.searchSatisfaction.js"
],
"minerva": []
},
@@ -192,7 +172,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaMaintenance[master]: $site is vague, rename to $siteGroup

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389554 )

Change subject: $site is vague, rename to $siteGroup
..

$site is vague, rename to $siteGroup

Change-Id: I6764737de117f35b07eaa9caa8d796f235e35f69
---
M addWiki.php
1 file changed, 9 insertions(+), 9 deletions(-)


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

diff --git a/addWiki.php b/addWiki.php
index 391a919..3b6d80a 100644
--- a/addWiki.php
+++ b/addWiki.php
@@ -62,7 +62,7 @@
}
 
$lang = $this->getArg( 0 );
-   $site = $this->getArg( 1 );
+   $siteGroup = $this->getArg( 1 );
$dbName = $this->getArg( 2 );
$domain = $this->getArg( 3 );
$languageNames = Language::fetchLanguageNames();
@@ -74,7 +74,7 @@
 
$dbw = wfGetDB( DB_MASTER );
 
-   $this->output( "Creating database $dbName for $lang.$site 
($name)\n" );
+   $this->output( "Creating database $dbName for $lang.$siteGroup 
($name)\n" );
 
// Set up the database
$dbw->query( "SET storage_engine=InnoDB" );
@@ -108,7 +108,7 @@
$dbw->sourceFile( 
"$IP/extensions/Wikidata/extensions/Wikibase/client/sql/entity_usage.sql" );
 
// Add project specific extension table additions here
-   switch ( $site ) {
+   switch ( $siteGroup ) {
case 'wikipedia':
break;
case 'wiktionary':
@@ -206,10 +206,10 @@
$title = Title::newFromText( wfMessage( 'mainpage' 
)->inLanguage( $lang )->useDatabase( false )->plain() );
$this->output( "Writing main page to " . 
$title->getPrefixedDBkey() . "\n" );
$article = WikiPage::factory( $title );
-   $ucsite = ucfirst( $site );
+   $ucSiteGroup = ucfirst( $siteGroup );
 
$article->doEditContent(
-   ContentHandler::makeContent( $this->getFirstArticle( 
$ucsite, $name ), $title ),
+   ContentHandler::makeContent( $this->getFirstArticle( 
$ucSiteGroup, $name ), $title ),
'',
EDIT_NEW | EDIT_AUTOSUMMARY
);
@@ -237,17 +237,17 @@

"$IP/extensions/Wikidata/extensions/Wikibase/lib/maintenance/populateSitesTable.php"
);
 
-   $sitesPopulation->mOptions[ 'site-group' ] = $site;
+   $sitesPopulation->mOptions[ 'site-group' ] = $siteGroup;
$sitesPopulation->mOptions[ 'force-protocol' ] = 'https';
$sitesPopulation->execute();
 
// Repopulate Cognate sites table
-   if ( $site === 'wiktionary' ) {
+   if ( $siteGroup === 'wiktionary' ) {
$cognateSitesPopulation = $this->runChild(
'Cognate\PopulateCognateSites',

"$IP/extensions/Cognate/maintenance/populateCognateSites.php"
);
-   $cognateSitesPopulation->mOptions[ 'site-group' ] = 
$site;
+   $cognateSitesPopulation->mOptions[ 'site-group' ] = 
$siteGroup;
$cognateSitesPopulation->execute();
}
 
@@ -274,7 +274,7 @@
$time = wfTimestamp( TS_RFC2822 );
UserMailer::send( new MailAddress( $wmgAddWikiNotify ),
new MailAddress( $wgPasswordSender ), "New wiki: 
$dbName",
-   "A new wiki was created by $user at $time for a $ucsite 
in $name ($lang).\nOnce the wiki is fully set up, it'll be visible at 
https://$domain;
+   "A new wiki was created by $user at $time for a 
$ucSiteGroup in $name ($lang).\nOnce the wiki is fully set up, it'll be visible 
at https://$domain;
);
 
$this->output( "Done. sync the config as in 
https://wikitech.wikimedia.org/wiki/Add_a_wiki#MediaWiki_configuration\n; );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6764737de117f35b07eaa9caa8d796f235e35f69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
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...parsoid[master]: T178253: Parse nested tables in figure captions

2017-11-06 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389553 )

Change subject: T178253: Parse nested tables in figure captions
..

T178253: Parse nested tables in figure captions

 * `nested_block_in_table` permits opening table tags so that by
   the time `full_table_in_link_caption` returns from
   `table_content_line` there may be multiple end tags that need
   capturing.  By limiting it to one, subsequent end tag are
   considered figure options and tables end up as bogus captions.

Change-Id: I28c50a503efd02f7eadc2c21323a0c7dae5d1b60
---
M lib/wt2html/pegTokenizer.pegjs
M tests/parserTests.txt
2 files changed, 27 insertions(+), 3 deletions(-)


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

diff --git a/lib/wt2html/pegTokenizer.pegjs b/lib/wt2html/pegTokenizer.pegjs
index 7ab6600..0bf35ea 100644
--- a/lib/wt2html/pegTokenizer.pegjs
+++ b/lib/wt2html/pegTokenizer.pegjs
@@ -1736,9 +1736,11 @@
 & { return stops.push('table', true); }
 tbl:(
 table_start_tag optionalNewlines
-(sol table_content_line optionalNewlines)*
-sol table_end_tag)
-{
+// Accept multiple end tags since a nested table may have been
+// opened in the table content line.
+((sol table_content_line optionalNewlines)*
+sol table_end_tag)+
+){
 stops.pop('table');
 return tbl;
 }
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 42693ff..5e30450 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -14809,6 +14809,28 @@
 This 
is the image caption
 !! end
 
+!! test
+Image with nested tables in caption
+!! wikitext
+[[File:Foobar.jpg|thumb|Foo
+{|
+|
+{|
+|z
+|}
+|}
+]]
+!! html/parsoid
+Foo
+
+
+
+z
+
+
+
+!! end
+
 ###
 # Conflicting image format options.
 # First option specified should 'win'.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump ores and wheels to HEAD

2017-11-06 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389552 )

Change subject: Bump ores and wheels to HEAD
..


Bump ores and wheels to HEAD

Change-Id: I4065636b341ded691cbe1033cb13c18b95c1c26e
---
M submodules/ores
M submodules/wheels
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/submodules/ores b/submodules/ores
index 26ecbfa..2c54f42 16
--- a/submodules/ores
+++ b/submodules/ores
@@ -1 +1 @@
-Subproject commit 26ecbfa5181ed640e860f583afafefe642e2bc09
+Subproject commit 2c54f421755349c10b83da4ce35e6ce92d2bfd92
diff --git a/submodules/wheels b/submodules/wheels
index bb470fe..93e8846 16
--- a/submodules/wheels
+++ b/submodules/wheels
@@ -1 +1 @@
-Subproject commit bb470fecd728fc0ae5d9ef06ba520f3fe978b2c1
+Subproject commit 93e88468bf758c53dac5cade87262979fa9698f6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4065636b341ded691cbe1033cb13c18b95c1c26e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/ores/deploy
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: puppet: add conditional for puppetmaster rack path

2017-11-06 Thread Herron (Code Review)
Herron has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389490 )

Change subject: puppet: add conditional for puppetmaster rack path
..


puppet: add conditional for puppetmaster rack path

Debian puppet 4.8.x packages have a different naming convention and place
files under a new path. This updates the Apache backend configuration
template to use the new path when puppet 4 is selected.

Depends on T178825

Bug: T179720
Change-Id: I5efb0fc1b1478aa2470abb1f4ad4a4024c6b5e33
---
M modules/puppetmaster/manifests/init.pp
M modules/puppetmaster/templates/puppetmaster-backend.conf.erb
2 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Herron: Looks good to me, approved
  Alexandros Kosiaris: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/puppetmaster/manifests/init.pp 
b/modules/puppetmaster/manifests/init.pp
index 2fc9a50..6733281 100644
--- a/modules/puppetmaster/manifests/init.pp
+++ b/modules/puppetmaster/manifests/init.pp
@@ -108,6 +108,12 @@
 
 $ssl_settings = ssl_ciphersuite('apache', 'compat')
 
+# path and name change with puppet 4 packages
+$puppetmaster_rack_path = $puppet_major_version ? {
+4   => '/usr/share/puppet/rack/puppet-master',
+default => '/usr/share/puppet/rack/puppetmasterd',
+}
+
 # Part dependent on the server_type
 case $server_type {
 'frontend': {
diff --git a/modules/puppetmaster/templates/puppetmaster-backend.conf.erb 
b/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
index 84e9284..eb3bd39 100644
--- a/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
+++ b/modules/puppetmaster/templates/puppetmaster-backend.conf.erb
@@ -20,8 +20,8 @@
 <%- end -%>
 
 
-DocumentRoot /usr/share/puppet/rack/puppetmasterd/public
-
+DocumentRoot <%= @puppetmaster_rack_path %>/public
+/>
 Options None
 AllowOverride None
 Require all granted

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5efb0fc1b1478aa2470abb1f4ad4a4024c6b5e33
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Herron 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Herron 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Bump ores and wheels to HEAD

2017-11-06 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389552 )

Change subject: Bump ores and wheels to HEAD
..

Bump ores and wheels to HEAD

Change-Id: I4065636b341ded691cbe1033cb13c18b95c1c26e
---
M submodules/ores
M submodules/wheels
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/submodules/ores b/submodules/ores
index 26ecbfa..2c54f42 16
--- a/submodules/ores
+++ b/submodules/ores
@@ -1 +1 @@
-Subproject commit 26ecbfa5181ed640e860f583afafefe642e2bc09
+Subproject commit 2c54f421755349c10b83da4ce35e6ce92d2bfd92
diff --git a/submodules/wheels b/submodules/wheels
index bb470fe..93e8846 16
--- a/submodules/wheels
+++ b/submodules/wheels
@@ -1 +1 @@
-Subproject commit bb470fecd728fc0ae5d9ef06ba520f3fe978b2c1
+Subproject commit 93e88468bf758c53dac5cade87262979fa9698f6

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Initial configuration for hifwiktionary

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

Change subject: Initial configuration for hifwiktionary
..


Initial configuration for hifwiktionary

Bug: T173643
Change-Id: I71ca3cd767d3f6f0c0eb9d4421f0542c7e082123
---
M dblists/all.dblist
M dblists/commonsuploads.dblist
M dblists/flow.dblist
M dblists/nowikidatadescriptiontaglines.dblist
M dblists/s3.dblist
M dblists/securepollglobal.dblist
M dblists/small.dblist
M dblists/wiktionary.dblist
M wikiversions.json
M wmf-config/InitialiseSettings.php
10 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/dblists/all.dblist b/dblists/all.dblist
index 3c90f44..8f6e706 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -316,6 +316,7 @@
 hewikivoyage
 hewiktionary
 hifwiki
+hifwiktionary
 hiwiki
 hiwikibooks
 hiwikiquote
diff --git a/dblists/commonsuploads.dblist b/dblists/commonsuploads.dblist
index 83d0352..3d0365a 100644
--- a/dblists/commonsuploads.dblist
+++ b/dblists/commonsuploads.dblist
@@ -178,6 +178,7 @@
 hawiktionary
 hawwiki
 hifwiki
+hifwiktionary
 hiwikibooks
 hiwikiquote
 hiwiktionary
diff --git a/dblists/flow.dblist b/dblists/flow.dblist
index d3e984b..4a36f5e 100644
--- a/dblists/flow.dblist
+++ b/dblists/flow.dblist
@@ -291,6 +291,7 @@
 hewikivoyage
 hewiktionary
 hifwiki
+hifwiktionary
 hiwiki
 hiwikibooks
 hiwikiquote
diff --git a/dblists/nowikidatadescriptiontaglines.dblist 
b/dblists/nowikidatadescriptiontaglines.dblist
index 1f23bea..6ccf727 100644
--- a/dblists/nowikidatadescriptiontaglines.dblist
+++ b/dblists/nowikidatadescriptiontaglines.dblist
@@ -163,6 +163,7 @@
 hewikinews
 hewikisource
 hewiktionary
+hifwiktionary
 hiwikibooks
 hiwikiversity
 hiwiktionary
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index 3d9dc0f..85aba25 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -298,6 +298,7 @@
 hewikisource
 hewikivoyage
 hewiktionary
+hifwiktionary
 hifwiki
 hiwiki
 hiwikibooks
diff --git a/dblists/securepollglobal.dblist b/dblists/securepollglobal.dblist
index ba01013..31eab13 100644
--- a/dblists/securepollglobal.dblist
+++ b/dblists/securepollglobal.dblist
@@ -313,6 +313,7 @@
 hewikivoyage
 hewiktionary
 hifwiki
+hifwiktionary
 hiwiki
 hiwikibooks
 hiwikiquote
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 0aeb075..3d80cd7 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -167,6 +167,7 @@
 hawiktionary
 hawwiki
 hewikinews
+hifwiktionary
 hiwikibooks
 hiwikiquote
 hiwikiversity
diff --git a/dblists/wiktionary.dblist b/dblists/wiktionary.dblist
index cb89e7d..eb0f2af 100644
--- a/dblists/wiktionary.dblist
+++ b/dblists/wiktionary.dblist
@@ -53,6 +53,7 @@
 gvwiktionary
 hawiktionary
 hewiktionary
+hifwiktionary
 hiwiktionary
 hrwiktionary
 hsbwiktionary
diff --git a/wikiversions.json b/wikiversions.json
index 730fb2f..ce70cb9 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -317,6 +317,7 @@
 "hewikivoyage": "php-1.31.0-wmf.6",
 "hewiktionary": "php-1.31.0-wmf.6",
 "hifwiki": "php-1.31.0-wmf.6",
+"hifwiktionary": "php-1.31.0-wmf.6",
 "hiwiki": "php-1.31.0-wmf.6",
 "hiwikibooks": "php-1.31.0-wmf.6",
 "hiwikiquote": "php-1.31.0-wmf.6",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5730052..d4efc85 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -329,6 +329,7 @@
'hewikinews' => 'Asia/Tel_Aviv',
'ilwikimedia' => 'Asia/Tel_Aviv',
'itwikivoyage' => 'Europe/Rome', // T43992
+   'hifwiktionary' => 'Pacific/Fiji', // T173647
'hiwikiquote' => 'Asia/Kolkata', // T126185
'hiwikiversity' => 'Asia/Kolkata', // T168765
'hiwikivoyage' => 'Asia/Kolkata', // T173013
@@ -2203,6 +2204,7 @@
'hewikisource' => 'ויקיטקסט',
'hewikivoyage' => 'ויקימסע',
'hewiktionary' => 'ויקימילון',
+   'hifwiktionary' => 'Sabdkosh', // T173643
'hiwiki' => 'विकिपीडिया',
'hiwikiversity' => 'विकिविद्यालय', // T168765
'hiwikivoyage' => 'विकियात्रा', // T173013
@@ -2702,6 +2704,7 @@
'hewikisource' => 'ויקיטקסט',
'hewikivoyage' => 'ויקימסע',
'hewiktionary' => 'ויקימילון',
+   'hifwiktionary' => 'Sabdkosh', // T173643
'hiwiki' => 'विकिपीडिया',
'hiwikiversity' => 'विकिविद्यालय',
'hiwikivoyage' => 'विकियात्रा', // T173013
@@ -3013,6 +3016,7 @@
'gagwiki' => 'Vikipediyanın_laflanması',
'guwikiquote' => 'વિકિસૂક્તિની_ચર્ચા', // T121853
'guwikisource' => 'વિકિસ્રોત_ચર્ચા',
+   'hifwiktionary' => 'Sabdkosh_ke_baat', // T173643
'hiwikivoyage' => 'विकियात्रा_वार्ता', // T173013
'hrwikisource' => 'Razgovor_o_Wikizvoru',
'hsbwiktionary' => 'Diskusija_k_Wikisłownikej', // T43328

-- 
To view, visit 

[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Do not use #00f as color of links

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

Change subject: Do not use #00f as color of links
..


Do not use #00f as color of links

It falls back to the default color

Bug: T179062
Change-Id: If4857837925d08b1fc6bc955575fdcca33de4a74
---
M frontend/modules/ext.flaggedRevs.basic.css
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/frontend/modules/ext.flaggedRevs.basic.css 
b/frontend/modules/ext.flaggedRevs.basic.css
index 2fba3a5..055fec0 100644
--- a/frontend/modules/ext.flaggedRevs.basic.css
+++ b/frontend/modules/ext.flaggedRevs.basic.css
@@ -224,7 +224,6 @@
 }
 
 a.fr-toggle-symbol {
-   color: #00f;
white-space: nowrap;
font-family: monospace;
font-weight: bold;
@@ -233,7 +232,6 @@
 }
 
 a.fr-toggle-text {
-   color: #00f;
font-weight: bold;
cursor: pointer;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4857837925d08b1fc6bc955575fdcca33de4a74
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TimedMediaHandler[master]: Adjust VP9 encoding options

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

Change subject: Adjust VP9 encoding options
..


Adjust VP9 encoding options

Adjusted the encoding options for WebM VP9 video transcodes
(not yet used in production).

* bumped bandwidth from 50% to 62.5% of the VP8 versions
* use 2-pass on all resolutions instead of just some
* use -speed 4 on first pass, -speed 1 on second pass
* use -auto-alt-ref 1 -lag-in-frames 25
* bump keyframe max interval up to 240 from 128

Still 2-4x slower than VP8 encoding, but quality matches
better now.

Change-Id: I731a6ca7e7cd0fd8f9e80f2f2cb406abe4edea7e
---
M WebVideoTranscode/WebVideoTranscode.php
M WebVideoTranscode/WebVideoTranscodeJob.php
2 files changed, 57 insertions(+), 27 deletions(-)

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



diff --git a/WebVideoTranscode/WebVideoTranscode.php 
b/WebVideoTranscode/WebVideoTranscode.php
index b444c08..49ab793 100644
--- a/WebVideoTranscode/WebVideoTranscode.php
+++ b/WebVideoTranscode/WebVideoTranscode.php
@@ -269,11 +269,14 @@
[
'maxSize'=> '288x160',
'videoBitrate'   => '80',
+// min bitrate, max bitrate, buffer size ratios
+   'vbr'=> [ 0.5, 1.5, 10 
],
'samplerate' => '48000',
-   'noUpscaling'=> 'true',
'twopass'=> 'true',
-   'keyframeInterval'   => '128',
+   'altref' => 'true',
+   'keyframeInterval'   => '240',
'bufDelay'   => '256',
+   'speed'  => '1',
'videoCodec' => 'vp9',
'audioCodec' => 'opus',
'type'   => 'video/webm; 
codecs="vp9, opus"',
@@ -281,12 +284,14 @@
self::ENC_VP9_240P =>
[
'maxSize'=> '426x240',
-   'videoBitrate'   => '128',
+   'videoBitrate'   => '150',
+   'vbr'=> [ 0.5, 1.5, 10 
],
'samplerate' => '48000',
-   'noUpscaling'=> 'true',
'twopass'=> 'true',
-   'keyframeInterval'   => '128',
+   'altref' => 'true',
+   'keyframeInterval'   => '240',
'bufDelay'   => '256',
+   'speed'  => '1',
'videoCodec' => 'vp9',
'audioCodec' => 'opus',
'type'   => 'video/webm; 
codecs="vp9, opus"',
@@ -294,12 +299,14 @@
self::ENC_VP9_360P =>
[
'maxSize'=> '640x360',
-   'videoBitrate'   => '256',
+   'videoBitrate'   => '320',
+   'vbr'=> [ 0.5, 1.5, 10 
],
'samplerate' => '48000',
-   'noUpscaling'=> 'true',
'twopass'=> 'true',
-   'keyframeInterval'   => '128',
+   'altref' => 'true',
+   'keyframeInterval'   => '240',
'bufDelay'   => '256',
+   'speed'  => '1',
'videoCodec' => 'vp9',
'audioCodec' => 'opus',
'tileColumns'=> '1',
@@ -308,12 +315,14 @@
self::ENC_VP9_480P =>
[
'maxSize'=> '854x480',
-   'videoBitrate'   => '512',
+   'videoBitrate'   => '640',
+ 

[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[master]: Remove code for MW < 1.29

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

Change subject: Remove code for MW < 1.29
..


Remove code for MW < 1.29

Change-Id: I67381a00741284b1d0ea48b133efbd046cf702f5
---
M includes/GlobalBlocking.class.php
1 file changed, 0 insertions(+), 14 deletions(-)

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



diff --git a/includes/GlobalBlocking.class.php 
b/includes/GlobalBlocking.class.php
index 3946ff1..f2c5258 100644
--- a/includes/GlobalBlocking.class.php
+++ b/includes/GlobalBlocking.class.php
@@ -85,13 +85,6 @@
 
// Allow site customization of blocked message.
Hooks::run( $hookName, [ &$errorMsg ] );
-   if ( !method_exists( 'ApiBase', 'dieWithError' ) ) {
-   // No longer needed/possible in MW 1.29
-   ApiBase::$messageMap[$errorMsg] = [
-   'code' => $errorMsg,
-   'info' => $apiErrorInfo,
-   ];
-   }
return $result = [
'block' => $block,
'error' => [
@@ -124,13 +117,6 @@
// Allow site customization of blocked 
message.
$blockedIpXffMsg = 
'globalblocking-ipblocked-xff';
Hooks::run( 
'GlobalBlockingBlockedIpXffMsg', [ &$blockedIpXffMsg ] );
-   if ( !method_exists( 'ApiBase', 
'dieWithError' ) ) {
-   // No longer needed/possible in 
MW 1.29
-   
ApiBase::$messageMap[$blockedIpXffMsg] = [
-   'code' => 
$blockedIpXffMsg,
-   'info' => 'One or more 
proxy servers used by your request has been globally blocked',
-   ];
-   }
return $result = [
'block' => $block,
'error' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I67381a00741284b1d0ea48b133efbd046cf702f5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalBlocking
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] apps...wikipedia[master]: Follow-up patch for ConstraintLayout

2017-11-06 Thread Cooltey (Code Review)
Cooltey has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389551 )

Change subject: Follow-up patch for ConstraintLayout
..

Follow-up patch for ConstraintLayout

Put heights of header, large header and footer to dimen.xml for easier 
management.

Change-Id: Ic34282292188873c3b1e888537debcc6fc83cee3
---
M app/src/main/res/layout/view_card_action_footer.xml
M app/src/main/res/layout/view_card_featured_article.xml
M app/src/main/res/layout/view_card_featured_image.xml
M app/src/main/res/layout/view_card_header.xml
M app/src/main/res/layout/view_card_header_large.xml
M app/src/main/res/layout/view_card_offline_compilation.xml
M app/src/main/res/layout/view_card_on_this_day.xml
M app/src/main/res/layout/view_list_card.xml
M app/src/main/res/values/dimens.xml
9 files changed, 12 insertions(+), 11 deletions(-)


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

diff --git a/app/src/main/res/layout/view_card_action_footer.xml 
b/app/src/main/res/layout/view_card_action_footer.xml
index 90cd0d9..76efc0d 100644
--- a/app/src/main/res/layout/view_card_action_footer.xml
+++ b/app/src/main/res/layout/view_card_action_footer.xml
@@ -4,7 +4,7 @@
 xmlns:app="http://schemas.android.com/apk/res-auto;
 xmlns:tools="http://schemas.android.com/tools;
 tools:layout_width="match_parent"
-tools:layout_height="48dp"
+tools:layout_height="@dimen/view_card_footer_height"
 tools:parentTag="android.support.constraint.ConstraintLayout">
 
 
+android:layout_height="@dimen/view_card_header_height" />
 
 
 
 
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_card_featured_image.xml 
b/app/src/main/res/layout/view_card_featured_image.xml
index ddbfbe6..34791dc 100644
--- a/app/src/main/res/layout/view_card_featured_image.xml
+++ b/app/src/main/res/layout/view_card_featured_image.xml
@@ -9,7 +9,7 @@
 
+android:layout_height="@dimen/view_card_header_height"/>
 
 
+android:layout_height="@dimen/view_card_footer_height"/>
 
 
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_card_header.xml 
b/app/src/main/res/layout/view_card_header.xml
index caa7757..fcddbab 100644
--- a/app/src/main/res/layout/view_card_header.xml
+++ b/app/src/main/res/layout/view_card_header.xml
@@ -3,7 +3,7 @@
 xmlns:app="http://schemas.android.com/apk/res-auto;
 xmlns:tools="http://schemas.android.com/tools;
 tools:layout_width="match_parent"
-tools:layout_height="48dp"
+tools:layout_height="@dimen/view_card_header_height"
 tools:parentTag="android.support.constraint.ConstraintLayout">
 
 http://schemas.android.com/tools;
 xmlns:app="http://schemas.android.com/apk/res-auto;
 tools:layout_width="match_parent"
-tools:layout_height="96dp"
+tools:layout_height="@dimen/view_card_header_large_height"
 tools:parentTag="android.support.constraint.ConstraintLayout">
 
 http://schemas.android.com/apk/res/android;
 xmlns:app="http://schemas.android.com/apk/res-auto;
-xmlns:tools="http://schemas.android.com/tools;
 android:id="@+id/offline_container"
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
diff --git a/app/src/main/res/layout/view_card_on_this_day.xml 
b/app/src/main/res/layout/view_card_on_this_day.xml
index e88c6e3..51b5dd6 100644
--- a/app/src/main/res/layout/view_card_on_this_day.xml
+++ b/app/src/main/res/layout/view_card_on_this_day.xml
@@ -1,7 +1,6 @@
 
 http://schemas.android.com/apk/res/android;
 xmlns:app="http://schemas.android.com/apk/res-auto;
-xmlns:tools="http://schemas.android.com/tools;
 android:layout_width="match_parent"
 android:layout_height="wrap_content"
 android:clipChildren="false"
diff --git a/app/src/main/res/layout/view_list_card.xml 
b/app/src/main/res/layout/view_list_card.xml
index 0d292f6..b1717df 100644
--- a/app/src/main/res/layout/view_list_card.xml
+++ b/app/src/main/res/layout/view_list_card.xml
@@ -8,12 +8,12 @@
 
+android:layout_height="@dimen/view_card_header_height"/>
 
 
 
diff --git a/app/src/main/res/values/dimens.xml 
b/app/src/main/res/values/dimens.xml
index d6d5d02..e9641fb 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -105,6 +105,9 @@
 8dp
 4dp
 0dp
+48dp
+96dp
+48dp
 40dp
 16dp
 30

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

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

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

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Disable "recreate data" page if replacement table exists

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

Change subject: Disable "recreate data" page if replacement table exists
..


Disable "recreate data" page if replacement table exists

Change-Id: If34ef275801caf63e8fa206fa1ba2c12aa342306
---
M specials/CargoRecreateData.php
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/specials/CargoRecreateData.php b/specials/CargoRecreateData.php
index 3fa1740..0574b87 100644
--- a/specials/CargoRecreateData.php
+++ b/specials/CargoRecreateData.php
@@ -38,6 +38,22 @@
$out->setPageTitle( $this->msg( 'cargo-createdatatable' 
)->parse() );
}
 
+   // Disable page if "replacement table" exists.
+   $possibleReplacementTable = $this->mTableName . '__NEXT';
+   if ( $cdb->tableExists( $possibleReplacementTable ) ) {
+   $text = $this->msg( 
'cargo-recreatedata-replacementexists', $this->mTableName, 
$possibleReplacementTable )->parse();
+   $ctPage = SpecialPageFactory::getPage( 'CargoTables' );
+   $ctURL = $ctPage->getTitle()->getFullURL();
+   $viewURL = $ctURL . '/' . $this->mTableName;
+   $viewURL .= strpos( $viewURL, '?' ) ? '&' : '?';
+   $viewURL .= "_replacement";
+   $viewReplacementText = $this->msg( 
'cargo-cargotables-viewreplacementlink' )->parse();
+
+   $text .= ' (' . Xml::element( 'a', array( 'href' => 
$viewURL ), $viewReplacementText ) . ')';
+   $out->addHTML( $text );
+   return true;
+   }
+
if ( empty( $this->mTemplateTitle ) ) {
// No template.
// TODO - show an error message.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If34ef275801caf63e8fa206fa1ba2c12aa342306
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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]: Update VE core submodule to master (a6b982d8a)

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

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


Update VE core submodule to master (a6b982d8a)

New changes:
fd01de26b Fix typo/spelling (use en-US)
c7ed230f1 Convert empty doc to empty string in convertToSource
00e344e09 Localisation updates from https://translatewiki.net.
837c20ac8 Unify SVG markup

Change-Id: I9a5f471632ac7f908d877fa312b7e5280b1e6ba4
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index 6741337..a6b982d 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 6741337ffaa180c3099be45d8abccfb3b28e94f8
+Subproject commit a6b982d8a1f7299036aba4820f91ad1f752d38cb

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a5f471632ac7f908d877fa312b7e5280b1e6ba4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Esanders 
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]: Update IW map

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

Change subject: Update IW map
..


Update IW map

Change-Id: If40ba7a2d817002fcb1748905e8d1587fa82eb96
---
M wmf-config/interwiki.php
1 file changed, 76 insertions(+), 64 deletions(-)

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 0c321f5..864d68c 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -351,6 +351,7 @@
'__global:wiktionary' => '1 https://en.wiktionary.org/wiki/$1',
'__global:wipipedia' => '0 http://wipipedia.org/index.php/$1',
'__global:wlug' => '0 http://www.wlug.org.nz/$1',
+   '__global:wmam' => '1 https://am.wikimedia.org/wiki/$1',
'__global:wmar' => '1 http://www.wikimedia.org.ar/wiki/$1',
'__global:wmat' => '0 https://mitglieder.wikimedia.at/$1',
'__global:wmau' => '1 http://wikimedia.org.au/wiki/$1',
@@ -3846,6 +3847,15 @@
'aywiktionary:chapter' => '1 https://ay.wikimedia.org/wiki/$1',
'aywiktionary:v' => '1 https://ay.wikiversity.org/wiki/$1',
'aywiktionary:voy' => '1 https://ay.wikivoyage.org/wiki/$1',
+   '__sites:azbwiki' => 'wiki',
+   'azbwiki:wikt' => '1 https://azb.wiktionary.org/wiki/$1',
+   'azbwiki:q' => '1 https://azb.wikiquote.org/wiki/$1',
+   'azbwiki:b' => '1 https://azb.wikibooks.org/wiki/$1',
+   'azbwiki:n' => '1 https://azb.wikinews.org/wiki/$1',
+   'azbwiki:s' => '1 https://azb.wikisource.org/wiki/$1',
+   'azbwiki:chapter' => '1 https://azb.wikimedia.org/wiki/$1',
+   'azbwiki:v' => '1 https://azb.wikiversity.org/wiki/$1',
+   'azbwiki:voy' => '1 https://azb.wikivoyage.org/wiki/$1',
'__sites:azwiki' => 'wiki',
'azwiki:wikt' => '1 https://az.wiktionary.org/wiki/$1',
'azwiki:q' => '1 https://az.wikiquote.org/wiki/$1',
@@ -3891,15 +3901,6 @@
'azwiktionary:chapter' => '1 https://az.wikimedia.org/wiki/$1',
'azwiktionary:v' => '1 https://az.wikiversity.org/wiki/$1',
'azwiktionary:voy' => '1 https://az.wikivoyage.org/wiki/$1',
-   '__sites:azbwiki' => 'wiki',
-   'azbwiki:wikt' => '1 https://azb.wiktionary.org/wiki/$1',
-   'azbwiki:q' => '1 https://azb.wikiquote.org/wiki/$1',
-   'azbwiki:b' => '1 https://azb.wikibooks.org/wiki/$1',
-   'azbwiki:n' => '1 https://azb.wikinews.org/wiki/$1',
-   'azbwiki:s' => '1 https://azb.wikisource.org/wiki/$1',
-   'azbwiki:chapter' => '1 https://azb.wikimedia.org/wiki/$1',
-   'azbwiki:v' => '1 https://azb.wikiversity.org/wiki/$1',
-   'azbwiki:voy' => '1 https://azb.wikivoyage.org/wiki/$1',
'__sites:barwiki' => 'wiki',
'barwiki:wikt' => '1 https://bar.wiktionary.org/wiki/$1',
'barwiki:q' => '1 https://bar.wikiquote.org/wiki/$1',
@@ -3954,15 +3955,6 @@
'bdwikimedia:s' => '1 https://bn.wikisource.org/wiki/$1',
'bdwikimedia:v' => '1 https://bn.wikiversity.org/wiki/$1',
'bdwikimedia:voy' => '1 https://bn.wikivoyage.org/wiki/$1',
-   '__sites:be_x_oldwiki' => 'wiki',
-   'be_x_oldwiki:wikt' => '1 https://be-x-old.wiktionary.org/wiki/$1',
-   'be_x_oldwiki:q' => '1 https://be-x-old.wikiquote.org/wiki/$1',
-   'be_x_oldwiki:b' => '1 https://be-x-old.wikibooks.org/wiki/$1',
-   'be_x_oldwiki:n' => '1 https://be-x-old.wikinews.org/wiki/$1',
-   'be_x_oldwiki:s' => '1 https://be-x-old.wikisource.org/wiki/$1',
-   'be_x_oldwiki:chapter' => '1 https://be-x-old.wikimedia.org/wiki/$1',
-   'be_x_oldwiki:v' => '1 https://be-x-old.wikiversity.org/wiki/$1',
-   'be_x_oldwiki:voy' => '1 https://be-x-old.wikivoyage.org/wiki/$1',
'__sites:betawikiversity' => 'wikiversity',
'betawikiversity:w' => '1 https://en.wikipedia.org/wiki/$1',
'betawikiversity:wikt' => '1 https://en.wiktionary.org/wiki/$1',
@@ -4026,6 +4018,15 @@
'bewiktionary:chapter' => '1 https://be.wikimedia.org/wiki/$1',
'bewiktionary:v' => '1 https://be.wikiversity.org/wiki/$1',
'bewiktionary:voy' => '1 https://be.wikivoyage.org/wiki/$1',
+   '__sites:be_x_oldwiki' => 'wiki',
+   'be_x_oldwiki:wikt' => '1 https://be-x-old.wiktionary.org/wiki/$1',
+   'be_x_oldwiki:q' => '1 https://be-x-old.wikiquote.org/wiki/$1',
+   'be_x_oldwiki:b' => '1 https://be-x-old.wikibooks.org/wiki/$1',
+   'be_x_oldwiki:n' => '1 https://be-x-old.wikinews.org/wiki/$1',
+   'be_x_oldwiki:s' => '1 https://be-x-old.wikisource.org/wiki/$1',
+   'be_x_oldwiki:chapter' => '1 https://be-x-old.wikimedia.org/wiki/$1',
+   'be_x_oldwiki:v' => '1 https://be-x-old.wikiversity.org/wiki/$1',
+   'be_x_oldwiki:voy' => '1 

[MediaWiki-commits] [Gerrit] research...wheels[master]: Update to revscoring 2.0.9

2017-11-06 Thread Ladsgroup (Code Review)
Ladsgroup has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389549 )

Change subject: Update to revscoring 2.0.9
..


Update to revscoring 2.0.9

Change-Id: Ia42e268ca742dc82f06f5aa281a3a3db88620733
---
D revscoring-2.0.8-py2.py3-none-any.whl
A revscoring-2.0.9-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/revscoring-2.0.8-py2.py3-none-any.whl 
b/revscoring-2.0.8-py2.py3-none-any.whl
deleted file mode 100644
index 951f35f..000
--- a/revscoring-2.0.8-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.0.9-py2.py3-none-any.whl 
b/revscoring-2.0.9-py2.py3-none-any.whl
new file mode 100644
index 000..ea3716d
--- /dev/null
+++ b/revscoring-2.0.9-py2.py3-none-any.whl
Binary files differ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia42e268ca742dc82f06f5aa281a3a3db88620733
Gerrit-PatchSet: 1
Gerrit-Project: research/ores/wheels
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: Ladsgroup 
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]: Deploy MjoLniR with new deploy repository

2017-11-06 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389550 )

Change subject: Deploy MjoLniR with new deploy repository
..

Deploy MjoLniR with new deploy repository

While we were able to deploy mjolnir relatively naively onto
relforge, as it only needed the kafka deps, deploying to the
analytics cluster needs to be a bit more involved. A deploy
repo mimicing ORES deployment was setup and this deploys it.

This depends on I420c894250 being merged before this can
be deployed.

Change-Id: Idff10716e370462b8cecdbf3298ae9b64566fc25
---
M hieradata/role/common/deployment_server.yaml
M modules/profile/manifests/mjolnir/kafka_daemon.pp
M modules/profile/templates/mjolnir/kafka-daemon.service.erb
M modules/role/manifests/elasticsearch/analytics.pp
4 files changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/50/389550/1

diff --git a/hieradata/role/common/deployment_server.yaml 
b/hieradata/role/common/deployment_server.yaml
index 8eac2e3..a4b87cc 100644
--- a/hieradata/role/common/deployment_server.yaml
+++ b/hieradata/role/common/deployment_server.yaml
@@ -173,8 +173,8 @@
   # Librenms software
   librenms/librenms:
 repository: operations/software/librenms
-  relforge/mjolnir:
-repository: search/MjoLniR
+  search/MjoLniR/deploy:
+repository: search/MjoLniR/deploy
   statsv/statsv:
 repository: analytics/statsv
   "docker-pkg/deploy":
diff --git a/modules/profile/manifests/mjolnir/kafka_daemon.pp 
b/modules/profile/manifests/mjolnir/kafka_daemon.pp
index c1dcaf9..ae8718d 100644
--- a/modules/profile/manifests/mjolnir/kafka_daemon.pp
+++ b/modules/profile/manifests/mjolnir/kafka_daemon.pp
@@ -9,18 +9,15 @@
 # it is named just 'eqiad'.
 $kafka_config = kafka_config('eqiad'),
 ) {
-scap::target { 'relforge/mjolnir':
+scap::target { 'search/MjoLniR/deploy':
   deploy_user => 'deploy-service',
 }
 
-# This is a limited subset of what the full mjolnir package requires 
because
-# the daemon is a small part of the overall application. The daemon only 
needs
-# to read/write kafka topics and send requests to localhost.
-require_package('python-kafka', 'python-requests')
+require_package('virtualenv', 'zip')
 
 systemd::service { 'mjolnir-kafka-daemon':
 content => template('profile/mjolnir/kafka-daemon.service.erb'),
-require => Scap::Target['relforge/mjolnir'],
+require => Scap::Target['search/MjoLniR/deploy'],
 }
 
 }
diff --git a/modules/profile/templates/mjolnir/kafka-daemon.service.erb 
b/modules/profile/templates/mjolnir/kafka-daemon.service.erb
index b6947ba..14b5257 100644
--- a/modules/profile/templates/mjolnir/kafka-daemon.service.erb
+++ b/modules/profile/templates/mjolnir/kafka-daemon.service.erb
@@ -5,9 +5,7 @@
 [Service]
 User=nobody
 Group=nogroup
-WorkingDirectory=/srv/deployment/relforge/mjolnir
-Environment=PYTHONPATH=/srv/deployment/relforge/mjolnir
-ExecStart=/usr/bin/python2 
/srv/deployment/relforge/mjolnir/mjolnir/cli/kafka_daemon.py --brokers <%= 
@kafka_config['brokers']['string'] %>
+ExecStart=/srv/deployment/search/MjoLniR/venv/bin/mjolnir-utilities.py 
kafka_daemon --brokers <%= @kafka_config['brokers']['string'] %>
 StandardInput=null
 StandardOutput=journal
 StandardError=journal
diff --git a/modules/role/manifests/elasticsearch/analytics.pp 
b/modules/role/manifests/elasticsearch/analytics.pp
index a46391e..ec5ea0b 100644
--- a/modules/role/manifests/elasticsearch/analytics.pp
+++ b/modules/role/manifests/elasticsearch/analytics.pp
@@ -4,4 +4,9 @@
 scap::target { 'wikimedia/discovery/analytics':
 deploy_user => 'deploy-service',
 }
+
+require_package('virtualenv', 'zip')
+scap::target { 'search/MjoLniR/deploy':
+deploy_user => 'deploy-service',
+}
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Disable "recreate data" page if replacement table exists

2017-11-06 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389547 )

Change subject: Disable "recreate data" page if replacement table exists
..

Disable "recreate data" page if replacement table exists

Change-Id: If34ef275801caf63e8fa206fa1ba2c12aa342306
---
M specials/CargoRecreateData.php
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Cargo 
refs/changes/47/389547/2

diff --git a/specials/CargoRecreateData.php b/specials/CargoRecreateData.php
index 3fa1740..0574b87 100644
--- a/specials/CargoRecreateData.php
+++ b/specials/CargoRecreateData.php
@@ -38,6 +38,22 @@
$out->setPageTitle( $this->msg( 'cargo-createdatatable' 
)->parse() );
}
 
+   // Disable page if "replacement table" exists.
+   $possibleReplacementTable = $this->mTableName . '__NEXT';
+   if ( $cdb->tableExists( $possibleReplacementTable ) ) {
+   $text = $this->msg( 
'cargo-recreatedata-replacementexists', $this->mTableName, 
$possibleReplacementTable )->parse();
+   $ctPage = SpecialPageFactory::getPage( 'CargoTables' );
+   $ctURL = $ctPage->getTitle()->getFullURL();
+   $viewURL = $ctURL . '/' . $this->mTableName;
+   $viewURL .= strpos( $viewURL, '?' ) ? '&' : '?';
+   $viewURL .= "_replacement";
+   $viewReplacementText = $this->msg( 
'cargo-cargotables-viewreplacementlink' )->parse();
+
+   $text .= ' (' . Xml::element( 'a', array( 'href' => 
$viewURL ), $viewReplacementText ) . ')';
+   $out->addHTML( $text );
+   return true;
+   }
+
if ( empty( $this->mTemplateTitle ) ) {
// No template.
// TODO - show an error message.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If34ef275801caf63e8fa206fa1ba2c12aa342306
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] research...wheels[master]: Update to revscoring 2.0.9

2017-11-06 Thread Awight (Code Review)
Awight has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389549 )

Change subject: Update to revscoring 2.0.9
..

Update to revscoring 2.0.9

Change-Id: Ia42e268ca742dc82f06f5aa281a3a3db88620733
---
D revscoring-2.0.8-py2.py3-none-any.whl
A revscoring-2.0.9-py2.py3-none-any.whl
2 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/revscoring-2.0.8-py2.py3-none-any.whl 
b/revscoring-2.0.8-py2.py3-none-any.whl
deleted file mode 100644
index 951f35f..000
--- a/revscoring-2.0.8-py2.py3-none-any.whl
+++ /dev/null
Binary files differ
diff --git a/revscoring-2.0.9-py2.py3-none-any.whl 
b/revscoring-2.0.9-py2.py3-none-any.whl
new file mode 100644
index 000..ea3716d
--- /dev/null
+++ b/revscoring-2.0.9-py2.py3-none-any.whl
Binary files differ

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update IW map

2017-11-06 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389548 )

Change subject: Update IW map
..

Update IW map

Change-Id: If40ba7a2d817002fcb1748905e8d1587fa82eb96
---
M wmf-config/interwiki.php
1 file changed, 76 insertions(+), 64 deletions(-)


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 0c321f5..864d68c 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 https://www.acronymfinder.com/$1.html',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -351,6 +351,7 @@
'__global:wiktionary' => '1 https://en.wiktionary.org/wiki/$1',
'__global:wipipedia' => '0 http://wipipedia.org/index.php/$1',
'__global:wlug' => '0 http://www.wlug.org.nz/$1',
+   '__global:wmam' => '1 https://am.wikimedia.org/wiki/$1',
'__global:wmar' => '1 http://www.wikimedia.org.ar/wiki/$1',
'__global:wmat' => '0 https://mitglieder.wikimedia.at/$1',
'__global:wmau' => '1 http://wikimedia.org.au/wiki/$1',
@@ -3846,6 +3847,15 @@
'aywiktionary:chapter' => '1 https://ay.wikimedia.org/wiki/$1',
'aywiktionary:v' => '1 https://ay.wikiversity.org/wiki/$1',
'aywiktionary:voy' => '1 https://ay.wikivoyage.org/wiki/$1',
+   '__sites:azbwiki' => 'wiki',
+   'azbwiki:wikt' => '1 https://azb.wiktionary.org/wiki/$1',
+   'azbwiki:q' => '1 https://azb.wikiquote.org/wiki/$1',
+   'azbwiki:b' => '1 https://azb.wikibooks.org/wiki/$1',
+   'azbwiki:n' => '1 https://azb.wikinews.org/wiki/$1',
+   'azbwiki:s' => '1 https://azb.wikisource.org/wiki/$1',
+   'azbwiki:chapter' => '1 https://azb.wikimedia.org/wiki/$1',
+   'azbwiki:v' => '1 https://azb.wikiversity.org/wiki/$1',
+   'azbwiki:voy' => '1 https://azb.wikivoyage.org/wiki/$1',
'__sites:azwiki' => 'wiki',
'azwiki:wikt' => '1 https://az.wiktionary.org/wiki/$1',
'azwiki:q' => '1 https://az.wikiquote.org/wiki/$1',
@@ -3891,15 +3901,6 @@
'azwiktionary:chapter' => '1 https://az.wikimedia.org/wiki/$1',
'azwiktionary:v' => '1 https://az.wikiversity.org/wiki/$1',
'azwiktionary:voy' => '1 https://az.wikivoyage.org/wiki/$1',
-   '__sites:azbwiki' => 'wiki',
-   'azbwiki:wikt' => '1 https://azb.wiktionary.org/wiki/$1',
-   'azbwiki:q' => '1 https://azb.wikiquote.org/wiki/$1',
-   'azbwiki:b' => '1 https://azb.wikibooks.org/wiki/$1',
-   'azbwiki:n' => '1 https://azb.wikinews.org/wiki/$1',
-   'azbwiki:s' => '1 https://azb.wikisource.org/wiki/$1',
-   'azbwiki:chapter' => '1 https://azb.wikimedia.org/wiki/$1',
-   'azbwiki:v' => '1 https://azb.wikiversity.org/wiki/$1',
-   'azbwiki:voy' => '1 https://azb.wikivoyage.org/wiki/$1',
'__sites:barwiki' => 'wiki',
'barwiki:wikt' => '1 https://bar.wiktionary.org/wiki/$1',
'barwiki:q' => '1 https://bar.wikiquote.org/wiki/$1',
@@ -3954,15 +3955,6 @@
'bdwikimedia:s' => '1 https://bn.wikisource.org/wiki/$1',
'bdwikimedia:v' => '1 https://bn.wikiversity.org/wiki/$1',
'bdwikimedia:voy' => '1 https://bn.wikivoyage.org/wiki/$1',
-   '__sites:be_x_oldwiki' => 'wiki',
-   'be_x_oldwiki:wikt' => '1 https://be-x-old.wiktionary.org/wiki/$1',
-   'be_x_oldwiki:q' => '1 https://be-x-old.wikiquote.org/wiki/$1',
-   'be_x_oldwiki:b' => '1 https://be-x-old.wikibooks.org/wiki/$1',
-   'be_x_oldwiki:n' => '1 https://be-x-old.wikinews.org/wiki/$1',
-   'be_x_oldwiki:s' => '1 https://be-x-old.wikisource.org/wiki/$1',
-   'be_x_oldwiki:chapter' => '1 https://be-x-old.wikimedia.org/wiki/$1',
-   'be_x_oldwiki:v' => '1 https://be-x-old.wikiversity.org/wiki/$1',
-   'be_x_oldwiki:voy' => '1 https://be-x-old.wikivoyage.org/wiki/$1',
'__sites:betawikiversity' => 'wikiversity',
'betawikiversity:w' => '1 https://en.wikipedia.org/wiki/$1',
'betawikiversity:wikt' => '1 https://en.wiktionary.org/wiki/$1',
@@ -4026,6 +4018,15 @@
'bewiktionary:chapter' => '1 https://be.wikimedia.org/wiki/$1',
'bewiktionary:v' => '1 https://be.wikiversity.org/wiki/$1',
'bewiktionary:voy' => '1 https://be.wikivoyage.org/wiki/$1',
+   '__sites:be_x_oldwiki' => 'wiki',
+   'be_x_oldwiki:wikt' => '1 https://be-x-old.wiktionary.org/wiki/$1',
+   'be_x_oldwiki:q' => '1 https://be-x-old.wikiquote.org/wiki/$1',
+   'be_x_oldwiki:b' => '1 https://be-x-old.wikibooks.org/wiki/$1',
+   'be_x_oldwiki:n' => '1 https://be-x-old.wikinews.org/wiki/$1',
+   'be_x_oldwiki:s' => '1 https://be-x-old.wikisource.org/wiki/$1',
+   'be_x_oldwiki:chapter' => '1 https://be-x-old.wikimedia.org/wiki/$1',
+   'be_x_oldwiki:v' => '1 https://be-x-old.wikiversity.org/wiki/$1',
+   'be_x_oldwiki:voy' => '1 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add summary 2.0 common titles object to swagger spec

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

Change subject: Add summary 2.0 common titles object to swagger spec
..


Add summary 2.0 common titles object to swagger spec

Bug: T164291
Change-Id: I5deaf4d2cae818b1084600e161d8b8c38707a4e5
---
M spec.yaml
1 file changed, 34 insertions(+), 0 deletions(-)

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



diff --git a/spec.yaml b/spec.yaml
index 766154a..cc3ced8 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -666,6 +666,12 @@
   type: standard
   title: /.+/
   displaytitle: /.+/
+  titles:
+title: /.+/
+normalized_title: /.+/
+display_title: /.+/
+namespace_id: /.+/
+namespace_name: /.*/
   pageid: /.+/
   thumbnail:
 source: /.+/
@@ -836,6 +842,8 @@
   displaytitle:
 type: string
 description: The page title how it should be shown to the user
+  titles:
+$ref: '#/definitions/titles_set'
   pageid:
 type: integer
 description: The page ID
@@ -1173,3 +1181,29 @@
 type: array
 description: Buffer contents
 additionalProperties: false
+
+  titles_set:
+type: object
+properties:
+  title:
+type: string
+description: the DB key (non-prefixed)
+  normalized_title:
+type: string
+description: the normalized title 
(https://www.mediawiki.org/wiki/API:Query#Title_normalization)
+  display_title:
+type: string
+description: the title as it should be displayed to the user
+  namespace_id:
+type: integer
+description: the numeric ID for the page's namespace 
(https://www.mediawiki.org/wiki/Manual:Namespace)
+  namespace_name:
+type: string
+description: text name for the MediaWiki namespace
+required:
+  - title
+  - normalized_title
+  - display_title
+  - namespace_id
+  - namespace_name
+additionalProperties: false

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5deaf4d2cae818b1084600e161d8b8c38707a4e5
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/services/mobileapps
Gerrit-Branch: master
Gerrit-Owner: Mholloway 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mhurd 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ppchelko 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add swagger spec for summary endpoint

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

Change subject: Add swagger spec for summary endpoint
..


Add swagger spec for summary endpoint

Bug: T174808
Change-Id: I976a2997507240dd162196e6f1ba86e171d9e98b
---
M spec.yaml
M test/features/app/spec.js
2 files changed, 147 insertions(+), 0 deletions(-)

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



diff --git a/spec.yaml b/spec.yaml
index 164553d..766154a 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -605,6 +605,85 @@
 body: /.+/
 
   # from routes/mobile-sections.js
+  /{domain}/v1/page/summary/{title}{/revision}{/tid}:
+get:
+  tags:
+- Page content
+  summary: Get a text extract of a page.
+  description: |
+The summary response includes an extract of the first paragraph of the 
page in plain text
+and HTML as well as the type of page. This is useful for page previews.
+
+Stability: 
[unstable](https://www.mediawiki.org/wiki/API_versioning#Unstable)
+  produces:
+- application/json; charset=utf-8; 
profile="https://www.mediawiki.org/wiki/Specs/Summary/1.2.0;
+  parameters:
+- name: title
+  in: path
+  description: "Page title. Use underscores instead of spaces. 
Example: `Main_Page`."
+  type: string
+  required: true
+- name: revision
+  in: path
+  description: "Revision of page content"
+  type: integer
+  required: false
+- name: tid
+  in: path
+  description: "Time UUID of requested summary render"
+  type: string
+  required: false
+  responses:
+'200':
+  description: The summary for the given page
+  schema:
+$ref: '#/definitions/summary'
+  headers:
+ETag:
+  description: >
+Syntax: "{revision}/{tid}".
+Example: "701384379/154d7bca-c264-11e5-8c2f-1b51b33b59fc"
+'404':
+  description: Unknown page title or revision
+  schema:
+$ref: '#/definitions/problem'
+default:
+  description: Error
+  schema:
+$ref: '#/definitions/problem'
+  x-amples:
+- title: Get summary for Barack Obama
+  request:
+params:
+  domain: en.wikipedia.org
+  title: Barack_Obama
+  response:
+status: 200
+headers:
+  etag: /.+/
+  content-type: /^application\/json/
+body:
+  type: standard
+  title: /.+/
+  displaytitle: /.+/
+  pageid: /.+/
+  thumbnail:
+source: /.+/
+width: /.+/
+height: /.+/
+  originalimage:
+source: /.+/
+width: /.+/
+height: /.+/
+  lang: /.+/
+  dir: /.+/
+  revision: /.+/
+  timestamp: /.+/
+  description: /.+/
+  extract: /.+/
+  extract_html: /.+/
+
+  # from routes/mobile-sections.js
   /{domain}/v1/page/mobile-sections/{title}:
 get:
   tags:
@@ -742,6 +821,69 @@
   - width
   - height
 
+  # see also RB v1/common_schemas.yaml
+  summary:
+type: object
+properties:
+  type:
+type: string
+description: Type of page summary
+enum:
+  - standard
+  title:
+type: string
+description: The page title
+  displaytitle:
+type: string
+description: The page title how it should be shown to the user
+  pageid:
+type: integer
+description: The page ID
+  revision:
+type: string
+description: The revision of the page when the summary was produced
+  extract:
+type: string
+description: First several sentences of an article in plain text
+  extract_html:
+type: string
+description: First several sentences of an article in simple HTML 
format
+  thumbnail:
+$ref: '#/definitions/image_props'
+  originalimage:
+$ref: '#/definitions/image_props'
+  lang:
+type: string
+description: The page language code
+example: en
+  dir:
+type: string
+description: The page language direction code
+enum:
+  - ltr
+  - rtl
+  timestamp:
+type: string
+format: date-time
+description: The time when the page was last editted in the [ISO 
8601](https://en.wikipedia.org/wiki/ISO_8601) format
+example: '1970-01-01T00:00:00.000Z'
+  description:
+type: string
+description: Wikidata description for the page
+example: American poet
+#  coordinates:
+#type: 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Initial configuration for electcomwiki

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

Change subject: Initial configuration for electcomwiki
..


Initial configuration for electcomwiki

+sort changed dblists alphabetically

Bug: T174370
Change-Id: Id0400a84c6a4676f5ed41a612ad6d31f5967ba71
---
M dblists/all.dblist
M dblists/nowikidatadescriptiontaglines.dblist
M dblists/private.dblist
M dblists/s3.dblist
M dblists/small.dblist
M dblists/special.dblist
M wikiversions.json
M wmf-config/InitialiseSettings.php
8 files changed, 18 insertions(+), 9 deletions(-)

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



diff --git a/dblists/all.dblist b/dblists/all.dblist
index dae5159..3c90f44 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -58,19 +58,18 @@
 aywiki
 aywikibooks
 aywiktionary
+azbwiki
 azwiki
 azwikibooks
 azwikiquote
 azwikisource
 azwiktionary
-azbwiki
 barwiki
 bat_smgwiki
 bawiki
 bawikibooks
 bclwiki
 bdwikimedia
-be_x_oldwiki
 betawikiversity
 bewiki
 bewikibooks
@@ -78,6 +77,7 @@
 bewikiquote
 bewikisource
 bewiktionary
+be_x_oldwiki
 bgwiki
 bgwikibooks
 bgwikinews
@@ -193,6 +193,7 @@
 dzwiktionary
 ecwikimedia
 eewiki
+electcomwiki
 elwiki
 elwikibooks
 elwikinews
@@ -317,9 +318,9 @@
 hifwiki
 hiwiki
 hiwikibooks
+hiwikiquote
 hiwikiversity
 hiwikivoyage
-hiwikiquote
 hiwiktionary
 howiki
 hrwiki
@@ -594,10 +595,10 @@
 oswiki
 otrs_wikiwiki
 outreachwiki
-pa_uswikimedia
 pagwiki
 pamwiki
 papwiki
+pa_uswikimedia
 pawiki
 pawikibooks
 pawikisource
@@ -759,8 +760,8 @@
 tawikisource
 tawiktionary
 tcywiki
-tenwiki
 techconductwiki
+tenwiki
 test2wiki
 testwiki
 testwikidatawiki
@@ -901,7 +902,6 @@
 zh_min_nanwikiquote
 zh_min_nanwikisource
 zh_min_nanwiktionary
-zh_yuewiki
 zhwiki
 zhwikibooks
 zhwikinews
@@ -909,6 +909,7 @@
 zhwikisource
 zhwikivoyage
 zhwiktionary
+zh_yuewiki
 zuwiki
 zuwikibooks
 zuwiktionary
diff --git a/dblists/nowikidatadescriptiontaglines.dblist 
b/dblists/nowikidatadescriptiontaglines.dblist
index 1ebeae1..1f23bea 100644
--- a/dblists/nowikidatadescriptiontaglines.dblist
+++ b/dblists/nowikidatadescriptiontaglines.dblist
@@ -97,6 +97,7 @@
 donatewiki
 dvwiktionary
 dzwiktionary
+electcomwiki
 elwikibooks
 elwikinews
 elwikisource
diff --git a/dblists/private.dblist b/dblists/private.dblist
index 261fbd8..241bc8e 100644
--- a/dblists/private.dblist
+++ b/dblists/private.dblist
@@ -11,6 +11,7 @@
 checkuserwiki
 collabwiki
 ecwikimedia
+electcomwiki
 execwiki
 fdcwiki
 grantswiki
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index 934d110..3d9dc0f 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -186,6 +186,7 @@
 dzwiktionary
 ecwikimedia
 eewiki
+electcomwiki
 elwiki
 elwikibooks
 elwikinews
@@ -300,8 +301,8 @@
 hifwiki
 hiwiki
 hiwikibooks
-hiwikiversity
 hiwikiquote
+hiwikiversity
 hiwiktionary
 hiwikivoyage
 howiki
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 4b82320..0aeb075 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -113,6 +113,7 @@
 dzwiktionary
 ecwikimedia
 eewiki
+electcomwiki
 elwikibooks
 elwikiquote
 elwikiversity
@@ -167,9 +168,9 @@
 hawwiki
 hewikinews
 hiwikibooks
+hiwikiquote
 hiwikiversity
 hiwikivoyage
-hiwikiquote
 howiki
 hrwikibooks
 hrwikiquote
@@ -320,9 +321,9 @@
 omwiki
 omwiktionary
 orwikisource
-pa_uswikimedia
 pagwiki
 papwiki
+pa_uswikimedia
 pawikibooks
 pawikisource
 pawiktionary
diff --git a/dblists/special.dblist b/dblists/special.dblist
index c0b70a4..0878941 100644
--- a/dblists/special.dblist
+++ b/dblists/special.dblist
@@ -13,6 +13,7 @@
 collabwiki
 commonswiki
 donatewiki
+electcomwiki
 execwiki
 fdcwiki
 foundationwiki
diff --git a/wikiversions.json b/wikiversions.json
index 033606c..730fb2f 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -194,6 +194,7 @@
 "dzwiktionary": "php-1.31.0-wmf.6",
 "ecwikimedia": "php-1.31.0-wmf.6",
 "eewiki": "php-1.31.0-wmf.6",
+"electcomwiki": "php-1.31.0-wmf.6",
 "elwiki": "php-1.31.0-wmf.6",
 "elwikibooks": "php-1.31.0-wmf.6",
 "elwikinews": "php-1.31.0-wmf.6",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 46e4025..5730052 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1861,6 +1861,7 @@
'collabwiki' => '//collab.wikimedia.org',
'commonswiki' => '//commons.wikimedia.org',
'donatewiki' => '//donate.wikimedia.org',
+   'electcomwiki' => '//electcom.wikimedia.org',
'etwikimedia' => '//ee.wikimedia.org',
'execwiki' => '//exec.wikimedia.org',
'fdcwiki' => '//fdc.wikimedia.org',
@@ -1949,6 +1950,7 @@
'collabwiki' => 'https://collab.wikimedia.org',
'commonswiki' => 'https://commons.wikimedia.org',
'donatewiki' => 'https://donate.wikimedia.org',
+   'electcomwiki' => 'https://electcom.wikimedia.org',
'etwikimedia' => 

[MediaWiki-commits] [Gerrit] mediawiki...mobileapps[master]: Add summary 2.0 common titles object to swagger spec

2017-11-06 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389545 )

Change subject: Add summary 2.0 common titles object to swagger spec
..

Add summary 2.0 common titles object to swagger spec

Bug: T164291
Change-Id: I5deaf4d2cae818b1084600e161d8b8c38707a4e5
---
M spec.yaml
1 file changed, 35 insertions(+), 1 deletion(-)


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

diff --git a/spec.yaml b/spec.yaml
index 766154a..44e08c4 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -666,6 +666,12 @@
   type: standard
   title: /.+/
   displaytitle: /.+/
+  titles:
+title: /.+/
+normalized_title: /.+/
+display_title: /.+/
+namespace_id: /.+/
+namespace_name: /.*/
   pageid: /.+/
   thumbnail:
 source: /.+/
@@ -836,6 +842,8 @@
   displaytitle:
 type: string
 description: The page title how it should be shown to the user
+  titles:
+$ref: '#/definitions/titles_set'
   pageid:
 type: integer
 description: The page ID
@@ -1161,7 +1169,7 @@
 description: The URL to navigate to when the button is pressed
 required:
   - title
-  - url
+  - urls
 
   empty:
 type: object
@@ -1173,3 +1181,29 @@
 type: array
 description: Buffer contents
 additionalProperties: false
+
+  titles_set:
+type: object
+properties:
+  title:
+type: string
+description: the DB key (non-prefixed)
+  normalized_title:
+type: string
+description: the normalized title 
(https://www.mediawiki.org/wiki/API:Query#Title_normalization)
+  display_title:
+type: string
+description: the title as it should be displayed to the user
+  namespace_id:
+type: integer
+description: MediaWiki's numeric ID for the page's namespace 
(https://www.mediawiki.org/wiki/Manual:Namespace)
+  namespace_name:
+type: string
+description: text name for the MediaWiki namespace
+required:
+  - title
+  - normalized_title
+  - display_title
+  - namespace_id
+  - namespace_name
+additionalProperties: false

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Moodle[master]: Archive the Moodle extension

2017-11-06 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/389544 )

Change subject: Archive the Moodle extension
..


Archive the Moodle extension

Empty the repo to avoid search results on old code.

Bug: T178765
Change-Id: I199756534b1bb93319d113206f32de82e6101e63
---
A ARCHIVED
D CODE_OF_CONDUCT.md
D Gruntfile.js
D Moodle.php
D MoodleWS.alias.php
D MoodleWS.body.php
D MoodleWS.i18n.php
D MoodleWS.php
D SpecialMoodleWS.php
D i18n/ast.json
D i18n/be-tarask.json
D i18n/de.json
D i18n/en.json
D i18n/es.json
D i18n/fr.json
D i18n/gl.json
D i18n/lb.json
D i18n/mk.json
D i18n/nb.json
D i18n/pt-br.json
D i18n/pt.json
D i18n/qqq.json
D i18n/roa-tara.json
D i18n/ru.json
D i18n/sv.json
D i18n/uk.json
D i18n/zh-hans.json
D moodleusers.sql
D package.json
29 files changed, 2 insertions(+), 545 deletions(-)

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



diff --git a/ARCHIVED b/ARCHIVED
new file mode 100644
index 000..fc0b1f9
--- /dev/null
+++ b/ARCHIVED
@@ -0,0 +1,2 @@
+This extension is unmaintained and has been archived.
+See  for more information.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index d8e5d08..000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1 +0,0 @@
-The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 7756e75..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*jshint node:true */
-module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
-
-   grunt.initConfig( {
-   banana: {
-   all: 'i18n/'
-   },
-   jsonlint: {
-   all: [
-   '**/*.json',
-   '!node_modules/**'
-   ]
-   }
-   } );
-
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
-   grunt.registerTask( 'default', 'test' );
-};
diff --git a/Moodle.php b/Moodle.php
deleted file mode 100644
index 24dcf4c..000
--- a/Moodle.php
+++ /dev/null
@@ -1,84 +0,0 @@
- __FILE__,
-   'name' => 'Moodle',
-   'author' => 'Clancer',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:Moodle',
-   'descriptionmsg' => 'moodle-desc',
-   'version'  => '0.2.0',
-   );
-
-$wgHooks['ParserFirstCallInit'][] = 'wfMoodleParserInit';
-// $wgHooks['LoadExtensionSchemaUpdates'][] = 'MoodleWS::setupSchema';
-/*$wgHooks['LoadExtensionSchemaUpdates'][] = 'fnMyHook';
-function fnMyHook( DatabaseUpdater $updater ) {
-$updater->addExtensionTable( 'moodleusers',
-dirname( __FILE__ ) . '/moodleusers.sql', true );
-return true;
-}*/
-
-// Hook our callback function into the parser
-function wfMoodleParserInit( Parser $parser ) {
-   // When the parser sees the  tag, it executes
-   // the wfSampleRender function (see below)
-   $parser->setHook( 'sample', 'wfSampleRender' );
-   // Always return true from this function. The return value does not 
denote
-   // success or otherwise have meaning - it just must always be true.
-   return true;
-}
-
-// Execute
-function wfSampleRender( $input, array $args, Parser $parser, PPFrame $frame ) 
{
-   $parser->disableCache();
-
-   global $wgMoodleWSInstance;
-
-   // $output = $parser->recursiveTagParse( $text, $frame );
-   // return '' . $output . '';
-
-   $attr = array();
-   // This time, make a list of attributes and their values,
-   // and dump them, along with the user input
-   foreach ( $args as $name => $value )
-   $attr[] = '' . htmlspecialchars( $name ) . ' = 
' . htmlspecialchars( $value );
-   return implode( '', $attr ) . "\n\n" . htmlspecialchars( $input ) 
. $wgMoodleWSInstance;
-
-// The following lines can be used to get the variable values directly:
-//$to = $args['to'] ;
-//$email = $args['email'] ;
-
-}
diff --git a/MoodleWS.alias.php b/MoodleWS.alias.php
deleted file mode 100644
index c866df0..000
--- a/MoodleWS.alias.php
+++ /dev/null
@@ -1,16 +0,0 @@
- array( 'Moodle Grades' ),
-);
diff --git a/MoodleWS.body.php b/MoodleWS.body.php
deleted file mode 100644
index 758092e..000
--- a/MoodleWS.body.php
+++ /dev/null
@@ -1,19 +0,0 @@
-addExtensionTable( 'moodleusers', "/moodleusers.sql" 
);
-
-
-   $file = 'people.txt';
-   // Open the file to get existing content
-   $current = file_get_contents( $file );
-   // Append a new person to the file
-   $current .= "John Smith\n";
-   // Write the contents back to the file
-   file_put_contents( $file, $current );
-

[MediaWiki-commits] [Gerrit] mediawiki...Moodle[master]: Archive the Moodle extension

2017-11-06 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/389544 )

Change subject: Archive the Moodle extension
..

Archive the Moodle extension

Empty the repo to avoid search results on old code.

Bug: T178765
Change-Id: I199756534b1bb93319d113206f32de82e6101e63
---
A ARCHIVED
D CODE_OF_CONDUCT.md
D Gruntfile.js
D Moodle.php
D MoodleWS.alias.php
D MoodleWS.body.php
D MoodleWS.i18n.php
D MoodleWS.php
D SpecialMoodleWS.php
D i18n/ast.json
D i18n/be-tarask.json
D i18n/de.json
D i18n/en.json
D i18n/es.json
D i18n/fr.json
D i18n/gl.json
D i18n/lb.json
D i18n/mk.json
D i18n/nb.json
D i18n/pt-br.json
D i18n/pt.json
D i18n/qqq.json
D i18n/roa-tara.json
D i18n/ru.json
D i18n/sv.json
D i18n/uk.json
D i18n/zh-hans.json
D moodleusers.sql
D package.json
29 files changed, 2 insertions(+), 545 deletions(-)


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

diff --git a/ARCHIVED b/ARCHIVED
new file mode 100644
index 000..fc0b1f9
--- /dev/null
+++ b/ARCHIVED
@@ -0,0 +1,2 @@
+This extension is unmaintained and has been archived.
+See  for more information.
diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md
deleted file mode 100644
index d8e5d08..000
--- a/CODE_OF_CONDUCT.md
+++ /dev/null
@@ -1 +0,0 @@
-The development of this software is covered by a [Code of 
Conduct](https://www.mediawiki.org/wiki/Code_of_Conduct).
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 7756e75..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,20 +0,0 @@
-/*jshint node:true */
-module.exports = function ( grunt ) {
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
-
-   grunt.initConfig( {
-   banana: {
-   all: 'i18n/'
-   },
-   jsonlint: {
-   all: [
-   '**/*.json',
-   '!node_modules/**'
-   ]
-   }
-   } );
-
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
-   grunt.registerTask( 'default', 'test' );
-};
diff --git a/Moodle.php b/Moodle.php
deleted file mode 100644
index 24dcf4c..000
--- a/Moodle.php
+++ /dev/null
@@ -1,84 +0,0 @@
- __FILE__,
-   'name' => 'Moodle',
-   'author' => 'Clancer',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:Moodle',
-   'descriptionmsg' => 'moodle-desc',
-   'version'  => '0.2.0',
-   );
-
-$wgHooks['ParserFirstCallInit'][] = 'wfMoodleParserInit';
-// $wgHooks['LoadExtensionSchemaUpdates'][] = 'MoodleWS::setupSchema';
-/*$wgHooks['LoadExtensionSchemaUpdates'][] = 'fnMyHook';
-function fnMyHook( DatabaseUpdater $updater ) {
-$updater->addExtensionTable( 'moodleusers',
-dirname( __FILE__ ) . '/moodleusers.sql', true );
-return true;
-}*/
-
-// Hook our callback function into the parser
-function wfMoodleParserInit( Parser $parser ) {
-   // When the parser sees the  tag, it executes
-   // the wfSampleRender function (see below)
-   $parser->setHook( 'sample', 'wfSampleRender' );
-   // Always return true from this function. The return value does not 
denote
-   // success or otherwise have meaning - it just must always be true.
-   return true;
-}
-
-// Execute
-function wfSampleRender( $input, array $args, Parser $parser, PPFrame $frame ) 
{
-   $parser->disableCache();
-
-   global $wgMoodleWSInstance;
-
-   // $output = $parser->recursiveTagParse( $text, $frame );
-   // return '' . $output . '';
-
-   $attr = array();
-   // This time, make a list of attributes and their values,
-   // and dump them, along with the user input
-   foreach ( $args as $name => $value )
-   $attr[] = '' . htmlspecialchars( $name ) . ' = 
' . htmlspecialchars( $value );
-   return implode( '', $attr ) . "\n\n" . htmlspecialchars( $input ) 
. $wgMoodleWSInstance;
-
-// The following lines can be used to get the variable values directly:
-//$to = $args['to'] ;
-//$email = $args['email'] ;
-
-}
diff --git a/MoodleWS.alias.php b/MoodleWS.alias.php
deleted file mode 100644
index c866df0..000
--- a/MoodleWS.alias.php
+++ /dev/null
@@ -1,16 +0,0 @@
- array( 'Moodle Grades' ),
-);
diff --git a/MoodleWS.body.php b/MoodleWS.body.php
deleted file mode 100644
index 758092e..000
--- a/MoodleWS.body.php
+++ /dev/null
@@ -1,19 +0,0 @@
-addExtensionTable( 'moodleusers', "/moodleusers.sql" 
);
-
-
-   $file = 'people.txt';
-   // Open the file to get existing content
-   $current = file_get_contents( $file );
-   // Append a new person to the file
-   $current .= "John Smith\n";
-   // Write the contents back to the file
-   

[MediaWiki-commits] [Gerrit] mediawiki...AntiSpoof[master]: Add more unit tests.

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

Change subject: Add more unit tests.
..


Add more unit tests.

More unit tests ought to exist for AntiSpoof.

Bug: T174195
Change-Id: If963ce2e74900bddfd9f65af0a35c440c8448f63
---
M tests/phpunit/AntiSpoofTest.php
1 file changed, 30 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/AntiSpoofTest.php b/tests/phpunit/AntiSpoofTest.php
index d65df3b..7ff0b1b 100644
--- a/tests/phpunit/AntiSpoofTest.php
+++ b/tests/phpunit/AntiSpoofTest.php
@@ -1,4 +1,8 @@
 assertEquals( $a[1], $b[1] );
}
+
+   public function provideMixedCharSets() {
+   return [
+   /** Format: username -> spoofing attempt */
+   [ 'Recursive O Tester', 'Recursive Θ Tester' ],
+   [ 'Recursive 0 Tester', 'Recursive Θ Tester' ],
+   ];
+   }
+
+   /**
+* Test mixed character set strings failure.
+*
+* @dataProvider provideMixedCharSets
+*/
+public function testCheckStringMixedCharSetFailure( $userName, 
$spooferName ) {
+$a = AntiSpoof::checkUnicodeString( $userName );
+$b = AntiSpoof::checkUnicodeString( $spooferName );
+
+$this->assertEquals( 'OK', $a[0] );
+$this->assertEquals( 'ERROR', $b[0] );
+$this->assertEquals( 'Contains incompatible mixed scripts', 
$b[1] );
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If963ce2e74900bddfd9f65af0a35c440c8448f63
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/AntiSpoof
Gerrit-Branch: master
Gerrit-Owner: Dbarratt 
Gerrit-Reviewer: Dbarratt 
Gerrit-Reviewer: Dmaza 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: MaxSem 
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]: Add missing @throws in doc

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

Change subject: Add missing @throws in doc
..


Add missing @throws in doc

Change-Id: I978369a727d557db8650b32ec155a6b490c4c866
---
M includes/diff/DifferenceEngine.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 2568616..813ee08 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -902,6 +902,7 @@
 * @param string $otext Old text, must be already segmented
 * @param string $ntext New text, must be already segmented
 * @return bool|string
+* @throws Exception
 */
protected function textDiff( $otext, $ntext ) {
global $wgExternalDiffEngine, $wgContLang;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I978369a727d557db8650b32ec155a6b490c4c866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >