[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Use only PSR2.Files.EndFileNewline

2017-12-02 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394840 )

Change subject: Use only PSR2.Files.EndFileNewline
..

Use only PSR2.Files.EndFileNewline

The PSR2 sniff was picked over the Generic.Files.EndFileNewline one because
the PSR2 version specifically looks for Unix file endings ("\n").

Bug: T179998
Change-Id: I66992c8c35fdab584e05dd39721e3ef1b6dd1cea
---
M MediaWiki/ruleset.xml
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/40/394840/1

diff --git a/MediaWiki/ruleset.xml b/MediaWiki/ruleset.xml
index 538fa79..bdabe2e 100644
--- a/MediaWiki/ruleset.xml
+++ b/MediaWiki/ruleset.xml
@@ -29,7 +29,6 @@

-->

-   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66992c8c35fdab584e05dd39721e3ef1b6dd1cea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki...BetaFeatures[master]: Compatible with php7.2

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

Change subject: Compatible with php7.2
..


Compatible with php7.2

Fix in php7.2, extension display "Fatal error: Declaration of 
HTMLFeatureField::getInputHTML($value) must be compatible with 
NewHTMLCheckField::getInputHTML($value, $attr = NULL)" issue.

Bug: T181821
Change-Id: Ib6e80acaef1198d4016955b275e8edddb5cbdab0
---
M includes/HTMLFeatureField.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/HTMLFeatureField.php b/includes/HTMLFeatureField.php
index d40ab6f..a4f0376 100644
--- a/includes/HTMLFeatureField.php
+++ b/includes/HTMLFeatureField.php
@@ -280,7 +280,7 @@
return $html;
}
 
-   function getInputHTML( $value ) {
+   function getInputHTML( $value, $attr = null ) {
$html = '';
 
$divClasses = [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib6e80acaef1198d4016955b275e8edddb5cbdab0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BetaFeatures
Gerrit-Branch: master
Gerrit-Owner: 星耀晨曦 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: 星耀晨曦 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: xmp: Lower severity of XMP parse failure log events

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

Change subject: xmp: Lower severity of XMP parse failure log events
..


xmp: Lower severity of XMP parse failure log events

Errors when parsing XMP information blocks broadly indicate that the
file is somehow malformed. This is generally a content issue rather than
an operational issue.

Bug: T118799
Change-Id: I3c7992343f28db75cd9ec0701c1eceebf6db2d08
---
M includes/libs/xmp/XMP.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php
index 0cc1466..be823a8 100644
--- a/includes/libs/xmp/XMP.php
+++ b/includes/libs/xmp/XMP.php
@@ -370,7 +370,7 @@
$col = xml_get_current_column_number( 
$this->xmlParser );
$offset = xml_get_current_byte_index( 
$this->xmlParser );
 
-   $this->logger->warning(
+   $this->logger->info(
'{method} : Error reading XMP content: 
{error} ' .
'(line: {line} column: {column} byte 
offset: {offset})',
[

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c7992343f28db75cd9ec0701c1eceebf6db2d08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Chad 
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]: Lower DatabaseMysqlBase::lock logging to INFO

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

Change subject: Lower DatabaseMysqlBase::lock logging to INFO
..


Lower DatabaseMysqlBase::lock logging to INFO

Whether the lock() acquisition failing is a huge problem depends
on what the caller is doing. Let the caller do any logging it needs.

Bug: T180793
Change-Id: I3d05138d312d8b973df153bb511e69619d663c9d
---
M includes/libs/rdbms/database/DatabaseMysqlBase.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php 
b/includes/libs/rdbms/database/DatabaseMysqlBase.php
index e0ff475..305a056 100644
--- a/includes/libs/rdbms/database/DatabaseMysqlBase.php
+++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php
@@ -1044,7 +1044,7 @@
return true;
}
 
-   $this->queryLogger->warning( __METHOD__ . " failed to acquire 
lock '{lockname}'",
+   $this->queryLogger->info( __METHOD__ . " failed to acquire lock 
'{lockname}'",
[ 'lockname' => $lockName ] );
 
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d05138d312d8b973df153bb511e69619d663c9d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
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/debian[master]: Document mediawiki-jobrunner systemd unit in README.Debian

2017-12-02 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394839 )

Change subject: Document mediawiki-jobrunner systemd unit in README.Debian
..

Document mediawiki-jobrunner systemd unit in README.Debian

Change-Id: I643cbd48e53a2cae6a24b1b482a7b8948e521e0c
---
M debian/README.Debian
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/debian 
refs/changes/39/394839/1

diff --git a/debian/README.Debian b/debian/README.Debian
index 622f44e..1361c59 100644
--- a/debian/README.Debian
+++ b/debian/README.Debian
@@ -12,6 +12,9 @@
If you wish to customize MediaWiki after installation, you can do
so. 
has details on how to go about that.
+   For a better experience, setting up a background job processor is
+   recommended, and a systemd service unit is provided for convenience.
+   Run $ systemctl enable mediawiki-jobrunner; to start it.
 
 Upgrading:
Upgrading to a new major MediaWiki version usually has associated

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I643cbd48e53a2cae6a24b1b482a7b8948e521e0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/debian
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: .gitignore: Exclude Extension:Score generated files

2017-12-02 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394838 )

Change subject: .gitignore: Exclude Extension:Score generated files
..

.gitignore: Exclude Extension:Score generated files

Change-Id: Ic9cd0051cc8bd241b933037466a2af76d0f6a287
---
M .gitignore
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/394838/1

diff --git a/.gitignore b/.gitignore
index b991e11..bb3a946 100644
--- a/.gitignore
+++ b/.gitignore
@@ -33,6 +33,8 @@
 /images/thumb
 ## Extension:EasyTimeline
 /images/timeline
+## Extension:Score
+/images/lilypond
 /images/tmp
 /maintenance/.mweval_history
 /maintenance/.mwsql_history

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: GitInfo: Fix shell restrictions for submodules

2017-12-02 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394837 )

Change subject: GitInfo: Fix shell restrictions for submodules
..

GitInfo: Fix shell restrictions for submodules

Submodules have their git directory in the master repository's directory
(../.git/modules/). firejail does not allow whitelisted paths to
have ".." in them, so use realpath() to get rid of that.

`git show` still wants to be able to access the main repository
directory though, so we also need to whitelist the $repoDir itself.

Bug: T181919
Change-Id: I928df92b47733bc7fbb9c796bcfc1504d4a4598c
---
M includes/GitInfo.php
1 file changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/37/394837/1

diff --git a/includes/GitInfo.php b/includes/GitInfo.php
index f170a02..fb75c25 100644
--- a/includes/GitInfo.php
+++ b/includes/GitInfo.php
@@ -38,6 +38,11 @@
protected $basedir;
 
/**
+* Location of the repository
+*/
+   protected $repoDir;
+
+   /**
 * Path to JSON cache file for pre-computed git information.
 */
protected $cacheFile;
@@ -58,6 +63,7 @@
 * @see precomputeValues
 */
public function __construct( $repoDir, $usePrecomputed = true ) {
+   $this->repoDir = $repoDir;
$this->cacheFile = self::getCacheFilePath( $repoDir );
wfDebugLog( 'gitinfo',
"Computed cacheFile={$this->cacheFile} for {$repoDir}"
@@ -230,10 +236,11 @@
'--format=format:%ct',
'HEAD',
];
+   $gitDir = realpath( $this->basedir );
$result = Shell::command( $cmd )
-   ->environment( [ 'GIT_DIR' => 
$this->basedir ] )
+   ->environment( [ 'GIT_DIR' => $gitDir ] 
)
->restrict( Shell::RESTRICT_DEFAULT | 
Shell::NO_NETWORK )
-   ->whitelistPaths( [ $this->basedir ] )
+   ->whitelistPaths( [ $gitDir, 
$this->repoDir ] )
->execute();
 
if ( $result->getExitCode() === 0 ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Remove ack alias

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

Change subject: Remove ack alias
..


Remove ack alias

ack-grep has been renamed to ack in stretch; ack-grep doesn't work
anymore and the alias hides the executable.

Bug: T181353
Change-Id: If69b88b3aee62af743acd90044952c46887139fe
---
M puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh 
b/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
index 0a7d05d..2abc0e4 100755
--- a/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
+++ b/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
@@ -7,7 +7,6 @@
 
 # handy aliases
 alias ..="cd .."
-alias ack=ack-grep
 
 # enable color for the shell prompt (PS1)
 export force_color_prompt="yes"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If69b88b3aee62af743acd90044952c46887139fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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/vagrant[stretch-migration]: Remove ack alias

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

Change subject: Remove ack alias
..

Remove ack alias

ack-grep has been renamed to ack in stretch; ack-grep doesn't work
anymore and the alias hides the executable.

Bug: T181353
Change-Id: If69b88b3aee62af743acd90044952c46887139fe
---
M puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/36/394836/1

diff --git a/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh 
b/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
index 0a7d05d..2abc0e4 100755
--- a/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
+++ b/puppet/modules/misc/files/etc_profile.d/mediawiki-vagrant.sh
@@ -7,7 +7,6 @@
 
 # handy aliases
 alias ..="cd .."
-alias ack=ack-grep
 
 # enable color for the shell prompt (PS1)
 export force_color_prompt="yes"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If69b88b3aee62af743acd90044952c46887139fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
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/vagrant[stretch-migration]: Add systemd override for redis-service

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

Change subject: Add systemd override for redis-service
..

Add systemd override for redis-service

On jessie, there was no systemd service for redis so puppet just
used provider:debian. On stretch, there is one, and it restricts
writable directories so the directory with the rdb file needs an
exception.

Bug: T181917
Change-Id: I1abb0dba3459a2c8efaec827df62bf63b77317c3
---
M puppet/modules/redis/manifests/init.pp
A puppet/modules/redis/templates/systemd/redis-server.erb
2 files changed, 14 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/35/394835/1

diff --git a/puppet/modules/redis/manifests/init.pp 
b/puppet/modules/redis/manifests/init.pp
index c95a5be..98fbcd1 100644
--- a/puppet/modules/redis/manifests/init.pp
+++ b/puppet/modules/redis/manifests/init.pp
@@ -78,11 +78,17 @@
 require => [ Package['redis-server'], File[$dir] ],
 }
 
-service { 'redis-server':
-ensure=> running,
-enable=> true,
-provider  => 'debian',
-subscribe => File['/etc/redis/redis.conf'],
-require   => File['/etc/redis/redis.conf'],
+systemd::service { 'redis-server':
+is_override=> true,
+service_params => {
+enable=> true,
+subscribe => [
+Package['redis-server'],
+File['/etc/redis/redis.conf'],
+],
+require   => [
+File[$dir],
+],
+},
 }
 }
diff --git a/puppet/modules/redis/templates/systemd/redis-server.erb 
b/puppet/modules/redis/templates/systemd/redis-server.erb
new file mode 100644
index 000..55e3565
--- /dev/null
+++ b/puppet/modules/redis/templates/systemd/redis-server.erb
@@ -0,0 +1,2 @@
+[Service]
+ReadWriteDirectories=-<%= scope['redis::dir'] %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1abb0dba3459a2c8efaec827df62bf63b77317c3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: core:Replace usage of wfWaitForSlaves.

2017-12-02 Thread Lengyue (Code Review)
Lengyue has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394834 )

Change subject: core:Replace usage of wfWaitForSlaves.
..

core:Replace usage of wfWaitForSlaves.

Replaced 10 "wfWaitForSlaves" in these php files which has been
deprecated since 1.27, I use a new version instead of it

Change-Id: I8bfb7428593a8315b3ad1fd5f7601a2005a05583
---
M maintenance/update.php
M maintenance/updateCollation.php
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/394834/1

diff --git a/maintenance/update.php b/maintenance/update.php
index 529c069..8bd2abd 100755
--- a/maintenance/update.php
+++ b/maintenance/update.php
@@ -120,7 +120,7 @@
 
$this->output( "MediaWiki {$wgVersion} Updater\n\n" );
 
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
 
if ( !$this->hasOption( 'skip-compat-checks' ) ) {
$this->compatChecks();
diff --git a/maintenance/updateCollation.php b/maintenance/updateCollation.php
index 84fc2d2..760b5a8 100644
--- a/maintenance/updateCollation.php
+++ b/maintenance/updateCollation.php
@@ -139,7 +139,7 @@
} else {
$this->output( "Fixing collation for $count 
rows.\n" );
}
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
$count = 0;
$batchCount = 0;
@@ -227,7 +227,7 @@
 
if ( !$dryRun && ++$batchCount % self::SYNC_INTERVAL == 
0 ) {
$this->output( "Waiting for replica DBs ... " );
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
$this->output( "done\n" );
}
} while ( $res->numRows() == self::BATCH_SIZE );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bfb7428593a8315b3ad1fd5f7601a2005a05583
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Lengyue <736917...@qq.com>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lower DatabaseMysqlBase::lock loggin to INFO

2017-12-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394833 )

Change subject: Lower DatabaseMysqlBase::lock loggin to INFO
..

Lower DatabaseMysqlBase::lock loggin to INFO

Whether the lock() acquisition failing is a huge problem depends
on what the caller is doing. Let the caller do any logging it needs.

Bug: T180793
Change-Id: I3d05138d312d8b973df153bb511e69619d663c9d
---
M includes/libs/rdbms/database/DatabaseMysqlBase.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/394833/1

diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php 
b/includes/libs/rdbms/database/DatabaseMysqlBase.php
index e0ff475..305a056 100644
--- a/includes/libs/rdbms/database/DatabaseMysqlBase.php
+++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php
@@ -1044,7 +1044,7 @@
return true;
}
 
-   $this->queryLogger->warning( __METHOD__ . " failed to acquire 
lock '{lockname}'",
+   $this->queryLogger->info( __METHOD__ . " failed to acquire lock 
'{lockname}'",
[ 'lockname' => $lockName ] );
 
return false;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Parse "show/hide " labels on Watchlist and R...

2017-12-02 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394832 )

Change subject: Parse "show/hide " labels on Watchlist and 
RecentChanges
..

Parse "show/hide " labels on Watchlist and RecentChanges

Which makes it possible to add links to such titles.

Bug: T142406
Change-Id: I5342b9491df47bbb549e91ebba9d0a8b273a7d17
---
M includes/specials/SpecialRecentchanges.php
M includes/specials/SpecialWatchlist.php
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/394832/1

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index cfc7a85..bdca301 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -943,7 +943,7 @@
$links[] = Html::rawElement(
'span',
$attribs,
-   $this->msg( $msg )->rawParams( $link 
)->escaped()
+   $this->msg( $msg )->rawParams( $link )->parse()
);
}
 
diff --git a/includes/specials/SpecialWatchlist.php 
b/includes/specials/SpecialWatchlist.php
index ff62e9e..7f99e1d 100644
--- a/includes/specials/SpecialWatchlist.php
+++ b/includes/specials/SpecialWatchlist.php
@@ -855,11 +855,11 @@
return Html::rawElement(
'span',
$attribs,
-   Xml::checkLabel(
-   $this->msg( $message, '' )->text(),
-   $name,
-   $name,
-   (int)$value
+   // not using HTML::checkLabel because that would escape 
the contents
+   Html::check( $name, (int)$value, [ 'id' => $name ] ) . 
Html::rawElement(
+   'label',
+   $attribs + [ 'for' => $name ],
+   $this->msg( $message, '' )->parse()
)
);
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable TemplateStyles extension on svwiki

2017-12-02 Thread Code Review
Jon Harald Søby has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394831 )

Change subject: Enable TemplateStyles extension on svwiki
..

Enable TemplateStyles extension on svwiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 107d697..2e441d9 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -19718,6 +19718,7 @@
'mediawikiwiki' => true,
'labswiki' => true,
'labtestwiki' => true,
+   'svwiki' => true, // T176082
 ],
 
 'wgShortPagesNamespaceBlacklist' => [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6441b4ddd6a1ac33586ee8ddf03190cdd917bebb
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jon Harald Søby 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: openjdk: Update to openjdk-8

2017-12-02 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394830 )

Change subject: openjdk: Update to openjdk-8
..

openjdk: Update to openjdk-8

Bug: T181353
Change-Id: I5bb3932fec5766be00ecf92dcaf1f725f7a5836b
---
M puppet/modules/cassandra/manifests/init.pp
M puppet/modules/kafka/manifests/init.pp
M puppet/modules/role/manifests/hadoop.pp
3 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/30/394830/1

diff --git a/puppet/modules/cassandra/manifests/init.pp 
b/puppet/modules/cassandra/manifests/init.pp
index ca1ca7f..1f372ae 100644
--- a/puppet/modules/cassandra/manifests/init.pp
+++ b/puppet/modules/cassandra/manifests/init.pp
@@ -53,7 +53,7 @@
 }
 
 # we use openjdk as the java distrib
-require_package('openjdk-7-jre-headless')
+require_package('openjdk-8-jre-headless')
 
 package { 'cassandra':
 ensure  => latest,
diff --git a/puppet/modules/kafka/manifests/init.pp 
b/puppet/modules/kafka/manifests/init.pp
index b97ecfe..422fca5 100644
--- a/puppet/modules/kafka/manifests/init.pp
+++ b/puppet/modules/kafka/manifests/init.pp
@@ -4,7 +4,7 @@
 require ::service
 require ::mediawiki::ready_service
 
-require_package('openjdk-7-jdk')
+require_package('openjdk-8-jdk')
 require_package('zookeeperd')
 require_package('confluent-kafka-2.11.7')
 require_package('kafkacat')
diff --git a/puppet/modules/role/manifests/hadoop.pp 
b/puppet/modules/role/manifests/hadoop.pp
index 8384d50..0f31614 100644
--- a/puppet/modules/role/manifests/hadoop.pp
+++ b/puppet/modules/role/manifests/hadoop.pp
@@ -2,7 +2,7 @@
 # Installs and runs all hadoop services.
 #
 class role::hadoop {
-require_package('openjdk-7-jdk')
+require_package('openjdk-8-jdk')
 
 $namenode_hosts   = [$::fqdn]
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5bb3932fec5766be00ecf92dcaf1f725f7a5836b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Revert "Replace libmysqlclient-dev with default-libmysqlclie...

2017-12-02 Thread BryanDavis (Code Review)
Hello Dduvall, Gergő Tisza, jenkins-bot, Ejegg,

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

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

to review the following change.


Change subject: Revert "Replace libmysqlclient-dev with 
default-libmysqlclient-dev"
..

Revert "Replace libmysqlclient-dev with default-libmysqlclient-dev"

This reverts commit f513150385f85ad10cdc427b6f55131a6ceda615.

Change-Id: I30207cd19b4a242dc409c7de6eb4c6254ec9509b
---
M puppet/modules/crm/manifests/tools.pp
M puppet/modules/eventlogging/manifests/init.pp
M puppet/modules/role/manifests/striker.pp
M puppet/modules/sentry/manifests/init.pp
4 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/28/394828/1

diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 17c7aab..6d70d79 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -15,7 +15,7 @@
 $audit_base = '/var/spool/audit'
 
 require_package(
-'default-libmysqlclient-dev',
+'libmysqlclient-dev',
 'libyaml-dev'
 )
 
@@ -50,7 +50,7 @@
 command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
-Package['default-libmysqlclient-dev'],
+Package['libmysqlclient-dev'],
 Package['libyaml-dev'],
 ],
 }
diff --git a/puppet/modules/eventlogging/manifests/init.pp 
b/puppet/modules/eventlogging/manifests/init.pp
index d205fbc..d04985e 100644
--- a/puppet/modules/eventlogging/manifests/init.pp
+++ b/puppet/modules/eventlogging/manifests/init.pp
@@ -15,7 +15,7 @@
 require => Git::Clone['eventlogging'],
 }
 
-require_package('default-libmysqlclient-dev')
+require_package('libmysqlclient-dev')
 require_package('librdkafka-dev')
 
 # Do the initial pip install into the virtualenv
@@ -25,7 +25,7 @@
 creates => 
"${path}/virtualenv/local/lib/python2.7/site-packages/eventlogging.egg-link",
 require => [
 Service::Gitupdate['eventlogging'],
-Package['default-libmysqlclient-dev'],
+Package['libmysqlclient-dev'],
 Package['librdkafka-dev']
 ],
 }
diff --git a/puppet/modules/role/manifests/striker.pp 
b/puppet/modules/role/manifests/striker.pp
index bc1965c..8fe839a 100644
--- a/puppet/modules/role/manifests/striker.pp
+++ b/puppet/modules/role/manifests/striker.pp
@@ -126,7 +126,7 @@
 require_package(
 'libffi-dev',
 'libldap2-dev',
-'default-libmysqlclient-dev',
+'libmysqlclient-dev',
 'libsasl2-dev',
 'libssl-dev',
 $python,
diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index 882ce9a..fd85a72 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -69,7 +69,7 @@
 require ::virtualenv
 
 # 
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
-require_package('default-libmysqlclient-dev')
+require_package('libmysqlclient-dev')
 # needed for building the python package lxml
 require_package('libxml2-dev', 'libxslt1-dev')
 # needed for building the python package cffi (?)
@@ -87,7 +87,7 @@
 'sentry[mysql]==7.7.0',
 'raven',
 ],
-require  => Package['default-libmysqlclient-dev'],
+require  => Package['libmysqlclient-dev'],
 timeout  => 600, # This can take a while
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Fix "Left match operand must result in a String value" in se...

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

Change subject: Fix "Left match operand must result in a String value" in 
service::node
..


Fix "Left match operand must result in a String value" in service::node

Change-Id: If0a8602065e43fedb6eba13a8a2e0c2e624d203b
---
M puppet/modules/service/manifests/node.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/service/manifests/node.pp 
b/puppet/modules/service/manifests/node.pp
index fe6a042..d7d80da 100644
--- a/puppet/modules/service/manifests/node.pp
+++ b/puppet/modules/service/manifests/node.pp
@@ -76,7 +76,7 @@
 }
 
 # sanity check since a default port cannot be assigned
-unless $port and $port =~ /^\d+$/ {
+unless $port and $port =~ Integer {
 fail('Service port must be specified and must be a number!')
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0a8602065e43fedb6eba13a8a2e0c2e624d203b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
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/core[master]: xmp: Lower severity of XMP parse failure log events

2017-12-02 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394826 )

Change subject: xmp: Lower severity of XMP parse failure log events
..

xmp: Lower severity of XMP parse failure log events

Errors when parsing XMP information blocks broadly indicate that the
file is somehow malformed. This is generally a content issue rather than
an operational issue.

Bug: T118799
Change-Id: I3c7992343f28db75cd9ec0701c1eceebf6db2d08
---
M includes/libs/xmp/XMP.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/26/394826/1

diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php
index 0cc1466..be823a8 100644
--- a/includes/libs/xmp/XMP.php
+++ b/includes/libs/xmp/XMP.php
@@ -370,7 +370,7 @@
$col = xml_get_current_column_number( 
$this->xmlParser );
$offset = xml_get_current_byte_index( 
$this->xmlParser );
 
-   $this->logger->warning(
+   $this->logger->info(
'{method} : Error reading XMP content: 
{error} ' .
'(line: {line} column: {column} byte 
offset: {offset})',
[

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: XMPReader: Log filename if available

2017-12-02 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394827 )

Change subject: XMPReader: Log filename if available
..

XMPReader: Log filename if available

Add a means to pass a filename into XMPReader and use it when creating
debug log events.

Bug: T118799
Change-Id: I68968d1ee12295d6f4a0a4356def562ead09d712
---
M includes/libs/xmp/XMP.php
M includes/media/BitmapMetadataHandler.php
2 files changed, 98 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/27/394827/1

diff --git a/includes/libs/xmp/XMP.php b/includes/libs/xmp/XMP.php
index be823a8..931c085 100644
--- a/includes/libs/xmp/XMP.php
+++ b/includes/libs/xmp/XMP.php
@@ -130,10 +130,16 @@
private $logger;
 
/**
+* @var string
+*/
+   private $filename;
+
+   /**
 * Primary job is to initialize the XMLParser
 * @param LoggerInterface|null $logger
+* @param string $filename
 */
-   function __construct( LoggerInterface $logger = null ) {
+   function __construct( LoggerInterface $logger = null, $filename = 
'unknown' ) {
if ( !function_exists( 'xml_parser_create_ns' ) ) {
// this should already be checked by this point
throw new RuntimeException( 'XMP support requires XML 
Parser' );
@@ -143,6 +149,7 @@
} else {
$this->setLogger( new NullLogger() );
}
+   $this->filename = $filename;
 
$this->items = XMPInfo::getItems();
 
@@ -372,11 +379,13 @@
 
$this->logger->info(
'{method} : Error reading XMP content: 
{error} ' .
-   '(line: {line} column: {column} byte 
offset: {offset})',
+   '(file: {file}, line: {line} column: 
{column} ' .
+   'byte offset: {offset})',
[
'method' => __METHOD__,
'error_code' => $code,
'error' => $error,
+   'file' => $this->filename,
'line' => $line,
'column' => $col,
'offset' => $offset,
@@ -392,6 +401,7 @@
[
'method' => __METHOD__,
'exception' => $e,
+   'file' => $this->filename,
'content' => $content,
]
);
@@ -421,7 +431,11 @@
) {
$this->logger->info( __METHOD__ .
" Ignoring XMPExtended block due to wrong guid 
(guid= '{guid}')",
-   [ 'guid' => 'guid' ] );
+   [
+   'guid' => $guid,
+   'file' => $this->filename,
+   ]
+   );
 
return false;
}
@@ -433,7 +447,8 @@
$len['offset'] > $len['length']
) {
$this->logger->info(
-   __METHOD__ . 'Error reading extended XMP block, 
invalid length or offset.'
+   __METHOD__ . 'Error reading extended XMP block, 
invalid length or offset.',
+   [ 'file' => $this->filename ]
);
 
return false;
@@ -451,7 +466,9 @@
 
if ( $len['offset'] !== $this->extendedXMPOffset ) {
$this->logger->info( __METHOD__ . 'Ignoring XMPExtended 
block due to wrong order. (Offset was '
-   . $len['offset'] . ' but expected ' . 
$this->extendedXMPOffset . ')' );
+   . $len['offset'] . ' but expected ' . 
$this->extendedXMPOffset . ')',
+   [ 'file' => $this->filename ]
+   );
 
return false;
}
@@ -472,7 +489,10 @@
$atEnd = false;
}
 
-   $this->logger->debug( __METHOD__ . 'Parsing a XMPExtended 
block' );
+   $this->logger->debug(
+   __METHOD__ . 'Parsing a XMPExtended block',
+   [ 'file' => $this->filename ]
+   );
 
return 

[MediaWiki-commits] [Gerrit] mediawiki...WikipediaExtracts[master]: Respond to Reedy's code review

2017-12-02 Thread Sophivorus (Code Review)
Sophivorus has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394825 )

Change subject: Respond to Reedy's code review
..

Respond to Reedy's code review

- Add README with install, config and usage instructions
- Improve parseParams method
- Clean API requests in the getExtract method
- Replace language guessing for config option set to target wiki
- Remove span crediting Wikipedia, see docs
- Remove obsolete messages

Bug: T149766
Change-Id: Ie139099bbcdca924520858d4c1dde1c87d4d217e
---
A README
M WikipediaExtracts.php
M WikipediaExtractsError.php
M extension.json
M i18n/ast.json
M i18n/be-tarask.json
M i18n/bn.json
M i18n/de.json
M i18n/en.json
M i18n/es.json
M i18n/fa.json
M i18n/fr.json
M i18n/gl.json
M i18n/it.json
M i18n/kab.json
M i18n/ko.json
M i18n/lb.json
M i18n/lt.json
M i18n/lv.json
M i18n/mk.json
M i18n/nb.json
M i18n/nl.json
M i18n/oc.json
M i18n/pl.json
M i18n/pt-br.json
M i18n/pt.json
M i18n/qqq.json
M i18n/roa-tara.json
M i18n/ru.json
M i18n/sr-ec.json
M i18n/sv.json
M i18n/uk.json
M i18n/vi.json
M i18n/zh-hans.json
34 files changed, 80 insertions(+), 162 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikipediaExtracts 
refs/changes/25/394825/1

diff --git a/README b/README
new file mode 100644
index 000..763fb5c
--- /dev/null
+++ b/README
@@ -0,0 +1,35 @@
+# WikipediaExtracts
+
+MediaWiki extension that enables the inserting of content extracted directly 
from Wikipedia.
+
+## Installation
+
+Simply add the following code to the bottom of your LocalSettings.php:
+
+wfLoadExtension( 'WikipediaExtracts' );
+
+## Configuration
+
+By default, WikipediaExtracts will extract content from the English Wikipedia.
+To extract content from other Wikipedias, or other MediaWiki wikis altogether,
+set $WikipediaExtractsAPI to the URL of the API of the target wiki. For 
example,
+to extract content from the Spanish Wikipedia:
+
+$wgWikipediaExtractsAPI = "https://es.wikipedia.org/w/api.php;;
+
+Warning! The target wiki has to have the Extension:TextExtracts enabled!
+All Wikimedia Foundation wikis have it enabled by default, but other wikis may 
not.
+
+## Usage
+
+Basic usage to extract a full article:
+
+{{#WikipediaExtract:Title of the article}}
+
+To extract just the introduction of the article:
+
+{{#WikipediaExtract:Title of the article
+|intro = true
+}}
+
+See more options at https://www.mediawiki.org/wiki/Extension:WikipediaExtracts
\ No newline at end of file
diff --git a/WikipediaExtracts.php b/WikipediaExtracts.php
index 682dc76..2427873 100644
--- a/WikipediaExtracts.php
+++ b/WikipediaExtracts.php
@@ -6,17 +6,12 @@
 * @var string $userAgent User agent for querying the API
 */
private static $userAgent =
-   'Extension:WikipediaExtracts/2.1 
(https://www.mediawiki.org/wiki/Extension:WikipediaExtracts)';
+   'Extension:WikipediaExtracts/3.0 
(https://www.mediawiki.org/wiki/Extension:WikipediaExtracts)';
 
/**
 * @var Parser $parser Parser object
 */
private static $parser;
-
-   /**
-* @var Language $contentLanguage Language object of the content 
language of the local wiki
-*/
-   public static $contentLanguage;
 
/**
 * @var array $params Associative array of the parameters passed to the 
parser function
@@ -27,11 +22,6 @@
 * @var string $wikipediaTitle Title of the Wikipedia article to extract
 */
private static $wikipediaTitle;
-
-   /**
-* @var string $wikipediaLanguage Language code of the Wikipedia to 
query
-*/
-   private static $wikipediaLanguage;
 
/**
 * Main hook
@@ -53,17 +43,10 @@
public static function onFunctionHook( Parser $parser, $input = null ) {
try {
self::$parser = $parser;
-   self::$contentLanguage = $parser->getTargetLanguage();
self::$params = self::parseParams( array_slice( 
func_get_args(), 2 ) );
self::$wikipediaTitle = self::getWikipediaTitle( $input 
);
-   self::$wikipediaLanguage = self::getWikipediaLanguage( 
$input );
 
$html = self::getExtract();
-
-   global $wgWikipediaExtractsAddCredits;
-   if ( $wgWikipediaExtractsAddCredits ) {
-   $html .= self::getCredits();
-   }
} catch ( WikipediaExtractsError $error ) {
$html = $error->getHtmlMessage();
}
@@ -94,29 +77,6 @@
}
 
/**
-* Get the language code of the Wikipedia to query
-*
-* @param string $input A language code or a URL from which to extract 
the language code
-* @return string $wikipediaLanguage The language code of the Wikipedia 
to query
-   

[MediaWiki-commits] [Gerrit] integration/config[master]: Increase pywikibot-core-tox-doc-docker timeout to 5 minutes

2017-12-02 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394824 )

Change subject: Increase pywikibot-core-tox-doc-docker timeout to 5 minutes
..

Increase pywikibot-core-tox-doc-docker timeout to 5 minutes

Bug: T181881
Change-Id: I336219d7656deac2fff56c09b0e35670ce52c9e8
---
M jjb/pywikibot.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/24/394824/1

diff --git a/jjb/pywikibot.yaml b/jjb/pywikibot.yaml
index 870ef34..5272da7 100644
--- a/jjb/pywikibot.yaml
+++ b/jjb/pywikibot.yaml
@@ -11,7 +11,7 @@
  docker_image_var: wmfreleng/tox-pywikibot:v2017.11.23.15.59
  toxenv:
  - doc:
- build_timeout: 4 # minutes
+ build_timeout: 5 # minutes
  - nose
  - nose34
 - job-group:

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Replace libmysqlclient-dev with default-libmysqlclient-dev

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

Change subject: Replace libmysqlclient-dev with default-libmysqlclient-dev
..


Replace libmysqlclient-dev with default-libmysqlclient-dev

libmysqlclient-dev is only provided on jessie.
default-libmysqlclient-dev is provided on both jessie and stretch (and
resolves to libmysqlclient-dev or libmariadbclient-dev-compat).

Bug: T51652
Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
(cherry picked from commit f513150385f85ad10cdc427b6f55131a6ceda615)
---
M puppet/modules/crm/manifests/tools.pp
M puppet/modules/eventlogging/manifests/init.pp
M puppet/modules/role/manifests/striker.pp
M puppet/modules/sentry/manifests/init.pp
4 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 6d70d79..17c7aab 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -15,7 +15,7 @@
 $audit_base = '/var/spool/audit'
 
 require_package(
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libyaml-dev'
 )
 
@@ -50,7 +50,7 @@
 command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['libyaml-dev'],
 ],
 }
diff --git a/puppet/modules/eventlogging/manifests/init.pp 
b/puppet/modules/eventlogging/manifests/init.pp
index d04985e..d205fbc 100644
--- a/puppet/modules/eventlogging/manifests/init.pp
+++ b/puppet/modules/eventlogging/manifests/init.pp
@@ -15,7 +15,7 @@
 require => Git::Clone['eventlogging'],
 }
 
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 require_package('librdkafka-dev')
 
 # Do the initial pip install into the virtualenv
@@ -25,7 +25,7 @@
 creates => 
"${path}/virtualenv/local/lib/python2.7/site-packages/eventlogging.egg-link",
 require => [
 Service::Gitupdate['eventlogging'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['librdkafka-dev']
 ],
 }
diff --git a/puppet/modules/role/manifests/striker.pp 
b/puppet/modules/role/manifests/striker.pp
index 8fe839a..bc1965c 100644
--- a/puppet/modules/role/manifests/striker.pp
+++ b/puppet/modules/role/manifests/striker.pp
@@ -126,7 +126,7 @@
 require_package(
 'libffi-dev',
 'libldap2-dev',
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libsasl2-dev',
 'libssl-dev',
 $python,
diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index fd85a72..882ce9a 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -69,7 +69,7 @@
 require ::virtualenv
 
 # 
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 # needed for building the python package lxml
 require_package('libxml2-dev', 'libxslt1-dev')
 # needed for building the python package cffi (?)
@@ -87,7 +87,7 @@
 'sentry[mysql]==7.7.0',
 'raven',
 ],
-require  => Package['libmysqlclient-dev'],
+require  => Package['default-libmysqlclient-dev'],
 timeout  => 600, # This can take a while
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
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/vagrant[stretch-migration]: Replace libmysqlclient-dev with default-libmysqlclient-dev

2017-12-02 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394823 )

Change subject: Replace libmysqlclient-dev with default-libmysqlclient-dev
..

Replace libmysqlclient-dev with default-libmysqlclient-dev

libmysqlclient-dev is only provided on jessie.
default-libmysqlclient-dev is provided on both jessie and stretch (and
resolves to libmysqlclient-dev or libmariadbclient-dev-compat).

Bug: T51652
Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
(cherry picked from commit f513150385f85ad10cdc427b6f55131a6ceda615)
---
M puppet/modules/crm/manifests/tools.pp
M puppet/modules/eventlogging/manifests/init.pp
M puppet/modules/role/manifests/striker.pp
M puppet/modules/sentry/manifests/init.pp
4 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/23/394823/1

diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 6d70d79..17c7aab 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -15,7 +15,7 @@
 $audit_base = '/var/spool/audit'
 
 require_package(
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libyaml-dev'
 )
 
@@ -50,7 +50,7 @@
 command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['libyaml-dev'],
 ],
 }
diff --git a/puppet/modules/eventlogging/manifests/init.pp 
b/puppet/modules/eventlogging/manifests/init.pp
index d04985e..d205fbc 100644
--- a/puppet/modules/eventlogging/manifests/init.pp
+++ b/puppet/modules/eventlogging/manifests/init.pp
@@ -15,7 +15,7 @@
 require => Git::Clone['eventlogging'],
 }
 
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 require_package('librdkafka-dev')
 
 # Do the initial pip install into the virtualenv
@@ -25,7 +25,7 @@
 creates => 
"${path}/virtualenv/local/lib/python2.7/site-packages/eventlogging.egg-link",
 require => [
 Service::Gitupdate['eventlogging'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['librdkafka-dev']
 ],
 }
diff --git a/puppet/modules/role/manifests/striker.pp 
b/puppet/modules/role/manifests/striker.pp
index 8fe839a..bc1965c 100644
--- a/puppet/modules/role/manifests/striker.pp
+++ b/puppet/modules/role/manifests/striker.pp
@@ -126,7 +126,7 @@
 require_package(
 'libffi-dev',
 'libldap2-dev',
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libsasl2-dev',
 'libssl-dev',
 $python,
diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index fd85a72..882ce9a 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -69,7 +69,7 @@
 require ::virtualenv
 
 # 
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 # needed for building the python package lxml
 require_package('libxml2-dev', 'libxslt1-dev')
 # needed for building the python package cffi (?)
@@ -87,7 +87,7 @@
 'sentry[mysql]==7.7.0',
 'raven',
 ],
-require  => Package['libmysqlclient-dev'],
+require  => Package['default-libmysqlclient-dev'],
 timeout  => 600, # This can take a while
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Require PyOpenSSL<17.5.0 for Python 3.3

2017-12-02 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394822 )

Change subject: Require PyOpenSSL<17.5.0 for Python 3.3
..

Require PyOpenSSL<17.5.0 for Python 3.3

Bug: T181912
Change-Id: Id37b8dd8dd4329ad39f386a811af2180821f450e
---
M requests-requirements.txt
M requirements.txt
M setup.py
3 files changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/394822/1

diff --git a/requests-requirements.txt b/requests-requirements.txt
index 57ad0bc..6d5a9a1 100644
--- a/requests-requirements.txt
+++ b/requests-requirements.txt
@@ -5,6 +5,7 @@
 pyOpenSSL>=0.14,!=17.2.0 ; python_full_version < '2.7.9' or python_version >= 
'3'
 cryptography>=1.3.4 ; python_full_version < '2.7.9' or python_version > '3.3'
 cryptography>=1.3.4,<2.0 ; python_version == '3.3'
+PyOpenSSL<17.5.0 ; python_version == '3.3'
 idna>=2.0.0 ; python_full_version < '2.7.9' or python_version >= '3'
 # https://github.com/eliben/pycparser/issues/147
 pycparser != 2.14
diff --git a/requirements.txt b/requirements.txt
index 13598af..f0a96f4 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -23,7 +23,9 @@
 
 # requests security extra
 pyOpenSSL>=0.14,!=17.2.0 ; python_full_version < '2.7.9'
+PyOpenSSL<17.5.0 ; python_version == '3.3'
 cryptography>=1.3.4 ; python_full_version < '2.7.9'
+cryptography>=1.3.4,<2.0 ; python_version == '3.3'
 idna>=2.0.0 ; python_full_version < '2.7.9'
 # https://github.com/eliben/pycparser/issues/147
 pycparser != 2.14
diff --git a/setup.py b/setup.py
index aa28872..6e895d5 100644
--- a/setup.py
+++ b/setup.py
@@ -74,9 +74,12 @@
 'unicode7': ['unicodedata2>=7.0.0-2'],
 })
 elif PYTHON_VERSION[:2] == (3, 3):
-# requests[security] requires cryptography, but cryptography does not
+# requests[security] requires cryptography, but cryptography 2.0+ does not
 # support Python 3.3; T178241
 extra_deps['security'].append('cryptography<2.0')
+# PyOpenSSL is required by requests[security] but has dropped support for
+# Python 3.3 since version 17.5.0 (2017-11-30); T181912
+extra_deps['security'].append('PyOpenSSL<17.5.0')
 
 script_deps = {
 'flickrripper.py': ['Pillow<3.5.0' if PY26 else 'Pillow'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Linter[master]: extensions/Linter: Replace deprecated usage of ApiBase::dieU...

2017-12-02 Thread Haikalizz (Code Review)
Haikalizz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394821 )

Change subject: extensions/Linter: Replace deprecated usage of 
ApiBase::dieUsage()
..

extensions/Linter: Replace deprecated usage of ApiBase::dieUsage()

Linter calls the deprecated ApiBase::dieUsage() function in
ApiRecordLint.php, replacing it with dieWithError().

Bug: T181758
Change-Id: I0cbf784f591b86b206b032fccbc0e32564a3e9e8
---
M includes/ApiRecordLint.php
1 file changed, 3 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Linter 
refs/changes/21/394821/1

diff --git a/includes/ApiRecordLint.php b/includes/ApiRecordLint.php
index c009f4f..bdcdb2a 100644
--- a/includes/ApiRecordLint.php
+++ b/includes/ApiRecordLint.php
@@ -40,15 +40,12 @@
array_keys( array_filter( $wgLinterSubmitterWhitelist ) 
)
);
if ( !$ipSet->match( $this->getRequest()->getIP() ) ) {
-   $this->dieUsage(
-   'Your IP address has not been whitelisted to 
report lint errors',
-   'invalid-ip'
-   );
+   $this->dieWithError( array('invalid-ip', 
wfEscapeWikiText('Your IP address has not been whitelisted to report lint 
errors')));
}
$params = $this->extractRequestParams();
$data = FormatJson::decode( $params['data'], true );
if ( !is_array( $data ) ) {
-   $this->dieUsage( 'Invalid data', 'invalid-data' );
+   $this->dieWithError( array('invalid-data', 
wfEscapeWikiText('Invalid data')));
}
 
$errors = [];
@@ -56,7 +53,7 @@
if ( !$title || !$title->getArticleID()
|| $title->getLatestRevID() != $params['revision']
) {
-   $this->dieUsage( 'Invalid, non-existent, or outdated 
title', 'invalid-title' );
+   $this->dieWithError( array('invalid-title', 
wfEscapeWikiText('Invalid, non-existent, or outdated title')));
}
$categoryMgr = new CategoryManager();
foreach ( $data as $info ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cbf784f591b86b206b032fccbc0e32564a3e9e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Linter
Gerrit-Branch: master
Gerrit-Owner: Haikalizz 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add converted copyright svg images as png files

2017-12-02 Thread Divadsn (Code Review)
Divadsn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394820 )

Change subject: Add converted copyright svg images as png files
..

Add converted copyright svg images as png files

This patch is necessary to fix wordmark support in IE8.

Bug: T166684
Change-Id: I5d4f34df0511ab5682fec3b4d792de7179b74768
---
A static/images/mobile/copyright/commons-wordmark-en.png
A static/images/mobile/copyright/wikipedia-wordmark-ar.png
A static/images/mobile/copyright/wikipedia-wordmark-atj.png
A static/images/mobile/copyright/wikipedia-wordmark-bn.png
A static/images/mobile/copyright/wikipedia-wordmark-ca.png
A static/images/mobile/copyright/wikipedia-wordmark-cy.png
A static/images/mobile/copyright/wikipedia-wordmark-en.png
A static/images/mobile/copyright/wikipedia-wordmark-fr.png
A static/images/mobile/copyright/wikipedia-wordmark-he.png
A static/images/mobile/copyright/wikipedia-wordmark-hi.png
A static/images/mobile/copyright/wikipedia-wordmark-ja.png
A static/images/mobile/copyright/wikipedia-wordmark-ru.png
A static/images/mobile/copyright/wikipedia-wordmark-sr.png
A static/images/mobile/copyright/wikipedia-wordmark-ur.png
A static/images/mobile/copyright/wikipedia-wordmark-zh-c.png
A static/images/mobile/copyright/wikitionary-wordmark-en.png
A static/images/mobile/copyright/wikivoyage-wordmark-en.png
17 files changed, 0 insertions(+), 0 deletions(-)


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

diff --git a/static/images/mobile/copyright/commons-wordmark-en.png 
b/static/images/mobile/copyright/commons-wordmark-en.png
new file mode 100644
index 000..c76ce9e
--- /dev/null
+++ b/static/images/mobile/copyright/commons-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ar.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ar.png
new file mode 100644
index 000..2dca169
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ar.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-atj.png 
b/static/images/mobile/copyright/wikipedia-wordmark-atj.png
new file mode 100644
index 000..cbfc089
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-atj.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-bn.png 
b/static/images/mobile/copyright/wikipedia-wordmark-bn.png
new file mode 100644
index 000..6d7b114
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-bn.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ca.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ca.png
new file mode 100644
index 000..1d30259
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ca.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-cy.png 
b/static/images/mobile/copyright/wikipedia-wordmark-cy.png
new file mode 100644
index 000..882905e
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-cy.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-en.png 
b/static/images/mobile/copyright/wikipedia-wordmark-en.png
new file mode 100644
index 000..e2f332a
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-en.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-fr.png 
b/static/images/mobile/copyright/wikipedia-wordmark-fr.png
new file mode 100644
index 000..431b5a0
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-fr.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-he.png 
b/static/images/mobile/copyright/wikipedia-wordmark-he.png
new file mode 100644
index 000..0b41fb6
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-he.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-hi.png 
b/static/images/mobile/copyright/wikipedia-wordmark-hi.png
new file mode 100644
index 000..b9cf93c
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-hi.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ja.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ja.png
new file mode 100644
index 000..1a67c67
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ja.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-ru.png 
b/static/images/mobile/copyright/wikipedia-wordmark-ru.png
new file mode 100644
index 000..5320393
--- /dev/null
+++ b/static/images/mobile/copyright/wikipedia-wordmark-ru.png
Binary files differ
diff --git a/static/images/mobile/copyright/wikipedia-wordmark-sr.png 
b/static/images/mobile/copyright/wikipedia-wordmark-sr.png
new file mode 100644
index 000..d2337ac
--- /dev/null

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Replace libmysqlclient-dev with default-libmysqlclient-dev

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

Change subject: Replace libmysqlclient-dev with default-libmysqlclient-dev
..


Replace libmysqlclient-dev with default-libmysqlclient-dev

libmysqlclient-dev is only provided on jessie.
default-libmysqlclient-dev is provided on both jessie and stretch (and
resolves to libmysqlclient-dev or libmariadbclient-dev-compat).

Bug: T51652
Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
---
M puppet/modules/crm/manifests/tools.pp
M puppet/modules/eventlogging/manifests/init.pp
M puppet/modules/role/manifests/striker.pp
M puppet/modules/sentry/manifests/init.pp
4 files changed, 7 insertions(+), 7 deletions(-)

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



diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 6d70d79..17c7aab 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -15,7 +15,7 @@
 $audit_base = '/var/spool/audit'
 
 require_package(
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libyaml-dev'
 )
 
@@ -50,7 +50,7 @@
 command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['libyaml-dev'],
 ],
 }
diff --git a/puppet/modules/eventlogging/manifests/init.pp 
b/puppet/modules/eventlogging/manifests/init.pp
index d04985e..d205fbc 100644
--- a/puppet/modules/eventlogging/manifests/init.pp
+++ b/puppet/modules/eventlogging/manifests/init.pp
@@ -15,7 +15,7 @@
 require => Git::Clone['eventlogging'],
 }
 
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 require_package('librdkafka-dev')
 
 # Do the initial pip install into the virtualenv
@@ -25,7 +25,7 @@
 creates => 
"${path}/virtualenv/local/lib/python2.7/site-packages/eventlogging.egg-link",
 require => [
 Service::Gitupdate['eventlogging'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['librdkafka-dev']
 ],
 }
diff --git a/puppet/modules/role/manifests/striker.pp 
b/puppet/modules/role/manifests/striker.pp
index 8fe839a..bc1965c 100644
--- a/puppet/modules/role/manifests/striker.pp
+++ b/puppet/modules/role/manifests/striker.pp
@@ -126,7 +126,7 @@
 require_package(
 'libffi-dev',
 'libldap2-dev',
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libsasl2-dev',
 'libssl-dev',
 $python,
diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index fd85a72..882ce9a 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -69,7 +69,7 @@
 require ::virtualenv
 
 # 
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 # needed for building the python package lxml
 require_package('libxml2-dev', 'libxslt1-dev')
 # needed for building the python package cffi (?)
@@ -87,7 +87,7 @@
 'sentry[mysql]==7.7.0',
 'raven',
 ],
-require  => Package['libmysqlclient-dev'],
+require  => Package['default-libmysqlclient-dev'],
 timeout  => 600, # This can take a while
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Replace libmysqlclient-dev with default-libmysqlclient-dev

2017-12-02 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394819 )

Change subject: Replace libmysqlclient-dev with default-libmysqlclient-dev
..

Replace libmysqlclient-dev with default-libmysqlclient-dev

libmysqlclient-dev is only provided on jessie. default-libmysqlclient-dev is 
provided on both jessie and stretch (and resolves to libmysqlclient-dev or 
libmariadbclient-dev-compat).

Change-Id: I1a41a8bd56e612082ffafc651573e091ec836f75
---
M puppet/modules/crm/manifests/tools.pp
M puppet/modules/eventlogging/manifests/init.pp
M puppet/modules/role/manifests/striker.pp
M puppet/modules/sentry/manifests/init.pp
4 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/19/394819/1

diff --git a/puppet/modules/crm/manifests/tools.pp 
b/puppet/modules/crm/manifests/tools.pp
index 6d70d79..17c7aab 100644
--- a/puppet/modules/crm/manifests/tools.pp
+++ b/puppet/modules/crm/manifests/tools.pp
@@ -15,7 +15,7 @@
 $audit_base = '/var/spool/audit'
 
 require_package(
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libyaml-dev'
 )
 
@@ -50,7 +50,7 @@
 command => "pip install -r ${dir}/requirements.txt",
 require => [
 Git::Clone['wikimedia/fundraising/tools'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['libyaml-dev'],
 ],
 }
diff --git a/puppet/modules/eventlogging/manifests/init.pp 
b/puppet/modules/eventlogging/manifests/init.pp
index d04985e..d205fbc 100644
--- a/puppet/modules/eventlogging/manifests/init.pp
+++ b/puppet/modules/eventlogging/manifests/init.pp
@@ -15,7 +15,7 @@
 require => Git::Clone['eventlogging'],
 }
 
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 require_package('librdkafka-dev')
 
 # Do the initial pip install into the virtualenv
@@ -25,7 +25,7 @@
 creates => 
"${path}/virtualenv/local/lib/python2.7/site-packages/eventlogging.egg-link",
 require => [
 Service::Gitupdate['eventlogging'],
-Package['libmysqlclient-dev'],
+Package['default-libmysqlclient-dev'],
 Package['librdkafka-dev']
 ],
 }
diff --git a/puppet/modules/role/manifests/striker.pp 
b/puppet/modules/role/manifests/striker.pp
index 8fe839a..bc1965c 100644
--- a/puppet/modules/role/manifests/striker.pp
+++ b/puppet/modules/role/manifests/striker.pp
@@ -126,7 +126,7 @@
 require_package(
 'libffi-dev',
 'libldap2-dev',
-'libmysqlclient-dev',
+'default-libmysqlclient-dev',
 'libsasl2-dev',
 'libssl-dev',
 $python,
diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index fd85a72..882ce9a 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -69,7 +69,7 @@
 require ::virtualenv
 
 # 
http://stackoverflow.com/questions/5178292/pip-install-mysql-python-fails-with-environmenterror-mysql-config-not-found
-require_package('libmysqlclient-dev')
+require_package('default-libmysqlclient-dev')
 # needed for building the python package lxml
 require_package('libxml2-dev', 'libxslt1-dev')
 # needed for building the python package cffi (?)
@@ -87,7 +87,7 @@
 'sentry[mysql]==7.7.0',
 'raven',
 ],
-require  => Package['libmysqlclient-dev'],
+require  => Package['default-libmysqlclient-dev'],
 timeout  => 600, # This can take a while
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] operations...wikimetrics[master]: Replace libmysqlclient-dev with default-libmysqlclient-dev

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

Change subject: Replace libmysqlclient-dev with default-libmysqlclient-dev
..

Replace libmysqlclient-dev with default-libmysqlclient-dev

libmysqlclient-dev is only provided on jessie. default-libmysqlclient-dev
is provided on both jessie and stretch (and resolves to libmysqlclient-dev
or libmariadbclient-dev-compat).

Bug: T51652
Change-Id: Ie0349d681a5a70ba024e253b1c7bc14685773de8
---
M manifests/init.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet/wikimetrics 
refs/changes/18/394818/1

diff --git a/manifests/init.pp b/manifests/init.pp
index f56f4ab..8ee736b 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -246,8 +246,8 @@
 if !defined(Package['python-dev']) {
 package { 'python-dev': ensure => 'installed' }
 }
-if !defined(Package['libmysqlclient-dev']) {
-package { 'libmysqlclient-dev': ensure => 'installed' }
+if !defined(Package['default-libmysqlclient-dev']) {
+package { 'default-libmysqlclient-dev': ensure => 'installed' }
 }
 
 # This class will not fully install dependencies for wikimetrics.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0349d681a5a70ba024e253b1c7bc14685773de8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet/wikimetrics
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...CentralAuth[master]: Add local groups to meta=globaluserinfo output

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

Change subject: Add local groups to meta=globaluserinfo output
..


Add local groups to meta=globaluserinfo output

Bug: T181905
Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
---
M includes/api/ApiQueryGlobalUserInfo.php
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/ApiQueryGlobalUserInfo.php 
b/includes/api/ApiQueryGlobalUserInfo.php
index aa3a7c5..35194eb 100644
--- a/includes/api/ApiQueryGlobalUserInfo.php
+++ b/includes/api/ApiQueryGlobalUserInfo.php
@@ -108,6 +108,11 @@
'editcount' => intval( 
$account['editCount'] ),
'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
];
+   if ( $account['groupMemberships'] ) {
+   $a['groups'] = array_keys( 
$account['groupMemberships'] );
+   $result->setIndexedTagName( 
$a['groups'], 'group' );
+   }
+
if ( $account['blocked'] ) {
$a['blocked'] = [
'expiry' => 
$this->getLanguage()->formatExpiry(
@@ -134,6 +139,12 @@
'editcount' => $account['editCount'],
'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
];
+
+   if ( $account['groupMemberships'] ) {
+   $a['groups'] = array_keys( 
$account['groupMemberships'] );
+   $result->setIndexedTagName( 
$a['groups'], 'group' );
+   }
+
if ( $account['blocked'] ) {
$a['blocked'] = [
'expiry' => 
$this->getLanguage()->formatExpiry(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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...CentralAuth[master]: Add local groups to meta=globaluserinfo output

2017-12-02 Thread Reedy (Code Review)
Reedy has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394817 )

Change subject: Add local groups to meta=globaluserinfo output
..

Add local groups to meta=globaluserinfo output

Bug: T181905
Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
---
M includes/api/ApiQueryGlobalUserInfo.php
1 file changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/includes/api/ApiQueryGlobalUserInfo.php 
b/includes/api/ApiQueryGlobalUserInfo.php
index aa3a7c5..35194eb 100644
--- a/includes/api/ApiQueryGlobalUserInfo.php
+++ b/includes/api/ApiQueryGlobalUserInfo.php
@@ -108,6 +108,11 @@
'editcount' => intval( 
$account['editCount'] ),
'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
];
+   if ( $account['groupMemberships'] ) {
+   $a['groups'] = array_keys( 
$account['groupMemberships'] );
+   $result->setIndexedTagName( 
$a['groups'], 'group' );
+   }
+
if ( $account['blocked'] ) {
$a['blocked'] = [
'expiry' => 
$this->getLanguage()->formatExpiry(
@@ -134,6 +139,12 @@
'editcount' => $account['editCount'],
'registration' => wfTimestamp( 
TS_ISO_8601, $account['registration'] ),
];
+
+   if ( $account['groupMemberships'] ) {
+   $a['groups'] = array_keys( 
$account['groupMemberships'] );
+   $result->setIndexedTagName( 
$a['groups'], 'group' );
+   }
+
if ( $account['blocked'] ) {
$a['blocked'] = [
'expiry' => 
$this->getLanguage()->formatExpiry(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9e19e7f3d4fcd65777d630628506c195c2f23f84
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
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...MediaWikiAuth[master]: Reattribute edits to imported users.

2017-12-02 Thread Skizzerz (Code Review)
Skizzerz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394816 )

Change subject: Reattribute edits to imported users.
..

Reattribute edits to imported users.

Edits and log entries which previously had user id 0 but the username of
the imported user would stay not-reattributed, which meant it wouldn't
show up in Special:Contributions. Now we (optionally) attribute edits as
well. A maintenance script is provided which can reattribute all edits,
and does not require this extension to be installed to run.

Additionally, a new config option dictates whether or not to import the
watchlist.

Change-Id: Ifd26850a9fdf36deaf3c4408375c1dbd9f80eb86
---
M ExternalWikiPrimaryAuthenticationProvider.php
M PopulateImportedWatchlistJob.php
A ReattributeImportedEditsJob.php
M extension.json
A maintenance/reattributeImportedEdits.php
5 files changed, 228 insertions(+), 27 deletions(-)


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

diff --git a/ExternalWikiPrimaryAuthenticationProvider.php 
b/ExternalWikiPrimaryAuthenticationProvider.php
index 45761f5..4de21dd 100644
--- a/ExternalWikiPrimaryAuthenticationProvider.php
+++ b/ExternalWikiPrimaryAuthenticationProvider.php
@@ -160,35 +160,81 @@
];
 
$watchlist = [];
-
-   while ( true ) {
-   $resp = $this->apiRequest( 'GET', $wrquery, [], 
__METHOD__ );
-   $watchlist = array_merge( $watchlist, 
$resp->watchlistraw );
-
-   if ( !isset( $resp->{'query-continue'} ) ) {
-   break;
-   }
-
-   $wrquery['wrcontinue'] = 
$resp->{'query-continue'}->watchlistraw->wrcontinue;
-   }
-
-   // enqueue jobs to actually add the watchlist pages to the 
user, since there might be a lot of them
$pagesPerJob = (int)$this->config->get( 'UpdateRowsPerJob' );
-   if ( $pagesPerJob <= 0 ) {
-   $this->logger->warning( '$wgUpdateRowsPerJob is set to 
0 or a negative value; importing watchlist in batches of 300 instead.' );
-   $pagesPerJob = 300;
+   if ( $pagesPerJob < 100 ) {
+   $this->logger->warning( '$wgUpdateRowsPerJob is set to 
less than 100; performing jobs in batches of 100 instead.' );
+   $pagesPerJob = 100;
}
 
+   $dbw = wfGetDB( DB_MASTER );
+   $dbr = wfGetDB( DB_REPLICA );
$jobs = [];
$title = $user->getUserPage(); // not used by us, but Job 
constructor needs a valid Title
-   while ( $watchlist ) {
-   // array_splice reduces the size of $watchlist and 
returns the removed elements.
-   // This avoids memory bloat so that we only keep the 
watchlist resident in memory one time.
-   $slice = array_splice( $watchlist, 0, $pagesPerJob );
-   $jobs[] = new PopulateImportedWatchlistJob( $title, [ 
'username' => $user->getName(), 'pages' => $slice ] );
+
+   // enqueue jobs to actually add watchlist items and to 
reattribute already-existing edits (if enabled)
+   if ( $this->config->get( 'MediaWikiAuthImportWatchlist' ) ) {
+   while ( true ) {
+   $resp = $this->apiRequest( 'GET', $wrquery, [], 
__METHOD__ );
+   $watchlist = array_merge( $watchlist, 
$resp->watchlistraw );
+
+   if ( !isset( $resp->{'query-continue'} ) ) {
+   break;
+   }
+
+   $wrquery['wrcontinue'] = 
$resp->{'query-continue'}->watchlistraw->wrcontinue;
+   }
+
+   while ( $watchlist ) {
+   // array_splice reduces the size of $watchlist 
and returns the removed elements.
+   // This avoids memory bloat so that we only 
keep the watchlist resident in memory one time.
+   $slice = array_splice( $watchlist, 0, 
$pagesPerJob );
+   $jobs[] = new PopulateImportedWatchlistJob( 
$title, [ 'username' => $user->getName(), 'pages' => $slice ] );
+   }
}
 
-   \JobQueueGroup::singleton()->push( $jobs );
+   if ( $this->config->get( 'MediaWikiAuthReattributeEdits' ) ) {
+   foreach ( ReattributeImportedEdits::getTableMetadata() 
as $table => $metadata ) {
+   $idKey = $metadata[0];
+
+   foreach ( $metadata[1] as $nameKey => $fields ) 
{
+   $idEnd = true; // so next 

[MediaWiki-commits] [Gerrit] mediawiki...ActionEditSubmit[refs/meta/config]: Mark repository as read only

2017-12-02 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394815 )

Change subject: Mark repository as read only
..

Mark repository as read only

Bug: T180808
Change-Id: I47d55f8c4b25d476edc0cc4f92016cfd76a206aa
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47d55f8c4b25d476edc0cc4f92016cfd76a206aa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ActionEditSubmit
Gerrit-Branch: refs/meta/config
Gerrit-Owner: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] mediawiki...ActionEditSubmit[master]: Archive repository

2017-12-02 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394814 )

Change subject: Archive repository
..

Archive repository

Change-Id: Ided673d5624a5d4d9d87387f24bedd416e0ef17a
---
D .phpcs.xml
A ARCHIVED
D ActionEditSubmit.hooks.php
D ActionEditSubmit.php
D CODE_OF_CONDUCT.md
D Gruntfile.js
D LICENSE
D README
D composer.json
D i18n/ar.json
D i18n/ast.json
D i18n/ba.json
D i18n/be-tarask.json
D i18n/be.json
D i18n/bg.json
D i18n/br.json
D i18n/ca.json
D i18n/csb.json
D i18n/da.json
D i18n/de.json
D i18n/diq.json
D i18n/en-gb.json
D i18n/en.json
D i18n/es.json
D i18n/eu.json
D i18n/fi.json
D i18n/fr.json
D i18n/gd.json
D i18n/gl.json
D i18n/he.json
D i18n/hi.json
D i18n/hsb.json
D i18n/hu.json
D i18n/ia.json
D i18n/it.json
D i18n/ja.json
D i18n/jv.json
D i18n/kab.json
D i18n/ko.json
D i18n/ksh.json
D i18n/li.json
D i18n/lij.json
D i18n/mg.json
D i18n/mk.json
D i18n/mr.json
D i18n/ms.json
D i18n/nb.json
D i18n/nl.json
D i18n/oc.json
D i18n/pl.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/skr-arab.json
D i18n/sr-ec.json
D i18n/sv.json
D i18n/te.json
D i18n/tr.json
D i18n/tt-cyrl.json
D i18n/uk.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D package.json
65 files changed, 2 insertions(+), 1,234 deletions(-)


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

diff --git a/.phpcs.xml b/.phpcs.xml
deleted file mode 100644
index 5f46cf8..000
--- a/.phpcs.xml
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-   
-   
-   
-   
-   
-   
-   .
-   
-   
-   vendor
-
diff --git a/ARCHIVED b/ARCHIVED
new file mode 100644
index 000..431bf5d
--- /dev/null
+++ b/ARCHIVED
@@ -0,0 +1,2 @@
+This extension was unmaintained for some time and has been archived.
+Please see  for more information.
\ No newline at end of file
diff --git a/ActionEditSubmit.hooks.php b/ActionEditSubmit.hooks.php
deleted file mode 100644
index 7ad068f..000
--- a/ActionEditSubmit.hooks.php
+++ /dev/null
@@ -1,24 +0,0 @@
-https://www.mediawiki.org/wiki/Manual:Hooks/GetLocalURL
-*/
-   static function inlineEditURL( $title, &$url, $query ) {
-   $url = preg_replace( '/(?<=^|&|\?)(action=)edit(?=&|$)/', 
'$1submit', $url );
-
-   return true;
-   }
-}
diff --git a/ActionEditSubmit.php b/ActionEditSubmit.php
deleted file mode 100644
index fc2e184..000
--- a/ActionEditSubmit.php
+++ /dev/null
@@ -1,22 +0,0 @@
- __FILE__,
-   'name' => 'ActionEditSubmit',
-   'author' => 'David Leaman',
-   'version' => '0.1.0',
-   'descriptionmsg' => 'actioneditsubmit-desc',
-   'url' => 
'http://lalashan.mcmaster.ca/theobio/projects/index.php/Extension:ActionEditSubmit',
-   'license-name' => 'GPL-3.0',
-];
-
-$wgAutoloadClasses['ActionEditSubmitHooks'] = __DIR__ . 
'/ActionEditSubmit.hooks.php';
-$wgMessagesDirs['ActionEditSubmit'] = __DIR__ . '/i18n';
-$wgHooks['GetLocalURL'][] = 'ActionEditSubmitHooks::inlineEditURL';
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 a45071e..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,21 +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/**',
-   '!vendor/**'
-   ]
-   }
-   } );
-
-   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
-   grunt.registerTask( 'default', 'test' );
-};
diff --git a/LICENSE b/LICENSE
deleted file mode 100644
index 818433e..000
--- a/LICENSE
+++ /dev/null
@@ -1,674 +0,0 @@
-GNU GENERAL PUBLIC LICENSE
-   Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. 
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-Preamble
-
-  The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
-  The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works.  By contrast,
-the GNU General Public 

[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add `override_midi` to README

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

Change subject: Add `override_midi` to README
..


Add `override_midi` to README

This attribute was not mentioned in the README, and so added it
(based on the documentation for the `midi` and `override_ogg`
attributes). With that, repeated information in the other attribute
was removed with a note.

Change-Id: If4559eadc19c60f05ec617d4cdf2f35f55072fe4
---
M README
1 file changed, 12 insertions(+), 5 deletions(-)

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



diff --git a/README b/README
index 7abbbdf..fdd7a12 100644
--- a/README
+++ b/README
@@ -86,16 +86,23 @@
   Effect: If included in the tag, the rendered image(s) will be embedded into a
   hyperlink to an appropriate MIDI file.
 
+* Attribute: override_midi
+  Allowed values: Known file name, that is, if override_midi="name" is given,
+  [[File:name]] is not a redlink.
+  Effect: Embeds the score image(s) into a hyperlink to a specified MIDI file.
+  This is an alternative to the midi attribute (see above). It can, for
+  example, be useful if you have a suitable MIDI file of superior
+  quality compared with the auto-generated MIDI file the midi attribute
+  yields. Of course, you can still omit both attributes in this case 
and
+  add the file manually to the page, if you prefer.
+
 * Attribute: override_ogg
   Allowed values: Known file name, that is, if override_ogg="name" is given,
   [[File:name]] is not a redlink.
   Effect: Embeds the media specified by the file name in the HTML below the
   score image(s). This is an alternative to the vorbis attribute (see
-  below). It can, for example, be useful if you have a suitable
-  Ogg/Vorbis file of superior quality compared with the auto-generated
-  Ogg/Vorbis file the vorbis attribute yields. Of course, you can still
-  omit both attributes in this case and add the file manually to the
-  page, if you prefer.
+  below). Its use is similar to the use of the override_midi attribute
+  (see above).
 
 * Attribute: raw
   Effect: If included in the tag, the score code is interpreted as a complete

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If4559eadc19c60f05ec617d4cdf2f35f55072fe4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Ebe123 
Gerrit-Reviewer: Legoktm 
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]: Revert "Special:Preferences: Use OOjs UI" and follow-ups

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

Change subject: Revert "Special:Preferences: Use OOjs UI" and follow-ups
..


Revert "Special:Preferences: Use OOjs UI" and follow-ups

The number of issues with the new interface is unacceptable and we
will not be able to fix them reasonably quickly. See subtasks of
T180538 for the list of issues, raised both by the Wikimedia community
and by WMF employees.

I should have pushed back harder against the merging of this half-baked
change with the promise that we'll fix it later. I convinced myself
that the regressions were not so noticeable and that the issues that
were pointed out will in fact be fixed by someone. Predictably,
however, regressions were bad and the only person fixing the issues
was me.

I am not going to work nights to make this page decent again within a
reasonable timeframe; I'm not sure if I'd even be able to since many
issues are problems with the design rather than the implementation. No
one else seems to be working on improving it, therefore I am reverting
the change.

On the bright side, this work has resulted in a number of improvements
to HTMLForm and Preferences code, which are not being reverted here:
.

If anyone reattempts this, I recommend gating the new interface behind
a configuration variable and URL parameter, like we did with
$wgOOUIEditPage in the past, and testing thoroughly in production
before enabling it for everyone.

* Revert "Special:Preferences: Use OOjs UI"
  This reverts commit 486e566cfef612de6773df435a74d5fc37e27174.
* Revert "Preferences: Show preview of edit fonts in edit font selector"
  This reverts commit 6634ff729dc7f6d0f541639dbdf3c4d9f786ddf6.
* Revert "Follow-Up Iae63b6994: Add missing editfont dependency"
  This reverts commit ce42fdf151c39f91cf4077673219fa6228a54d7f.
* Revert "Preferences: Improve visual appearance by “unboxing” sections"
  This reverts commit c9415bb0059f4dae4abc5e39a8af844328333120.
* Revert "Remove box-shadow from preference panels for ooui-apex"
  This reverts commit a934b82ca27971e8f0553a7ab7c8ee30fccf3283.
* Revert "Preferences: Don't show the watchlist token; just link to ResetTokens"
  This reverts commit e8c9102fc7b66460c33f643b0dea7190cb89ac83.
* Revert "mw.special.preferences: Make the "Basic information" section more 
compact"
  This reverts commit d48b7260f30c1ec57046a1f8e4c82057aed45e5f.
* Revert "mw.special.preferences: Widen the dropdown of the "Time zone" field"
  This reverts commit afd5f1417efdd463d86186257c4ec77dd4a442ce.

Bug: T117781
Bug: T180538
Change-Id: I44b5daea1828f71881b5bd35218f5ecb7ab7f36e
---
M includes/Preferences.php
M includes/specials/SpecialPasswordReset.php
M includes/specials/SpecialPreferences.php
M includes/specials/SpecialResetTokens.php
M includes/specials/forms/PreferencesForm.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.special/mediawiki.special.preferences.confirmClose.js
D resources/src/mediawiki.special/mediawiki.special.preferences.editfont.js
M resources/src/mediawiki.special/mediawiki.special.preferences.styles.css
M resources/src/mediawiki.special/mediawiki.special.preferences.tabs.js
M resources/src/mediawiki.special/mediawiki.special.preferences.timezone.js
M tests/selenium/pageobjects/preferences.page.js
15 files changed, 216 insertions(+), 295 deletions(-)

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



diff --git a/includes/Preferences.php b/includes/Preferences.php
index 924e3ad..2dd3e2d 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -75,11 +75,6 @@
 * @return array|null
 */
static function getPreferences( $user, IContextSource $context ) {
-   OutputPage::setupOOUI(
-   strtolower( $context->getSkin()->getSkinName() ),
-   $context->getLanguage()->getDir()
-   );
-
$defaultPreferences = [];
 
self::profilePreferences( $user, $context, $defaultPreferences 
);
@@ -317,17 +312,14 @@
if ( $canEditPrivateInfo && 
$authManager->allowsAuthenticationDataChange(
new PasswordAuthenticationRequest(), false )->isGood()
) {
-   $link = new OOUI\ButtonWidget( [
-   'href' => SpecialPage::getTitleFor( 
'ChangePassword' )->getLinkURL( [
-   'returnto' => SpecialPage::getTitleFor( 
'Preferences' )->getPrefixedText()
-   ] ),
-   'label' => $context->msg( 'prefs-resetpass' 
)->text(),
-   ] );
+   $link = $linkRenderer->makeLink( 
SpecialPage::getTitleFor( 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Special:Preferences: Use OOjs UI" and follow-ups

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

Change subject: Revert "Special:Preferences: Use OOjs UI" and follow-ups
..

Revert "Special:Preferences: Use OOjs UI" and follow-ups

The number of issues with the new interface is unacceptable and we
will not be able to fix them reasonably quickly. See subtasks of
T180538 for the list of issues, raised both by the Wikimedia community
and by WMF employees.

I should have pushed back harder against the merging of this half-baked
change with the promise that we'll fix it later. I convinced myself
that the regressions were not so noticeable and that the issues that
were pointed out will in fact be fixed by someone. Predictably,
however, regressions were bad and the only person fixing the issues
was me.

I am not going to work nights to make this page decent again within a
reasonable timeframe; I'm not sure if I'd even be able to since many
issues are problems with the design rather than the implementation. No
one else seems to be working on improving it, therefore I am reverting
the change.

On the bright side, this work has resulted in a number of improvements
to HTMLForm and Preferences code, which are not being reverted here:
.

If anyone reattempts this, I recommend gating the new interface behind
a configuration variable and URL parameter, like we did with
$wgOOUIEditPage in the past, and testing thoroughly in production
before enabling it for everyone.

* Revert "Special:Preferences: Use OOjs UI"
  This reverts commit 486e566cfef612de6773df435a74d5fc37e27174.
* Revert "Preferences: Show preview of edit fonts in edit font selector"
  This reverts commit 6634ff729dc7f6d0f541639dbdf3c4d9f786ddf6.
* Revert "Follow-Up Iae63b6994: Add missing editfont dependency"
  This reverts commit ce42fdf151c39f91cf4077673219fa6228a54d7f.
* Revert "Preferences: Improve visual appearance by “unboxing” sections"
  This reverts commit c9415bb0059f4dae4abc5e39a8af844328333120.
* Revert "Remove box-shadow from preference panels for ooui-apex"
  This reverts commit a934b82ca27971e8f0553a7ab7c8ee30fccf3283.
* Revert "Preferences: Don't show the watchlist token; just link to ResetTokens"
  This reverts commit e8c9102fc7b66460c33f643b0dea7190cb89ac83.
* Revert "mw.special.preferences: Make the "Basic information" section more 
compact"
  This reverts commit d48b7260f30c1ec57046a1f8e4c82057aed45e5f.
* Revert "mw.special.preferences: Widen the dropdown of the "Time zone" field"
  This reverts commit afd5f1417efdd463d86186257c4ec77dd4a442ce.

Bug: T117781
Bug: T180538
Change-Id: I44b5daea1828f71881b5bd35218f5ecb7ab7f36e
---
M includes/Preferences.php
M includes/specials/SpecialPasswordReset.php
M includes/specials/SpecialPreferences.php
M includes/specials/SpecialResetTokens.php
M includes/specials/forms/PreferencesForm.php
M languages/i18n/en.json
M languages/i18n/qqq.json
M resources/Resources.php
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.special/mediawiki.special.preferences.confirmClose.js
D resources/src/mediawiki.special/mediawiki.special.preferences.editfont.js
M resources/src/mediawiki.special/mediawiki.special.preferences.styles.css
M resources/src/mediawiki.special/mediawiki.special.preferences.tabs.js
M resources/src/mediawiki.special/mediawiki.special.preferences.timezone.js
M tests/selenium/pageobjects/preferences.page.js
15 files changed, 216 insertions(+), 295 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/394804/1

diff --git a/includes/Preferences.php b/includes/Preferences.php
index 924e3ad..2dd3e2d 100644
--- a/includes/Preferences.php
+++ b/includes/Preferences.php
@@ -75,11 +75,6 @@
 * @return array|null
 */
static function getPreferences( $user, IContextSource $context ) {
-   OutputPage::setupOOUI(
-   strtolower( $context->getSkin()->getSkinName() ),
-   $context->getLanguage()->getDir()
-   );
-
$defaultPreferences = [];
 
self::profilePreferences( $user, $context, $defaultPreferences 
);
@@ -317,17 +312,14 @@
if ( $canEditPrivateInfo && 
$authManager->allowsAuthenticationDataChange(
new PasswordAuthenticationRequest(), false )->isGood()
) {
-   $link = new OOUI\ButtonWidget( [
-   'href' => SpecialPage::getTitleFor( 
'ChangePassword' )->getLinkURL( [
-   'returnto' => SpecialPage::getTitleFor( 
'Preferences' )->getPrefixedText()
-   ] ),
-   'label' => $context->msg( 'prefs-resetpass' 
)->text(),
-   ] );
+   $link = $linkRenderer->makeLink( 
SpecialPage::getTitleFor( 

[MediaWiki-commits] [Gerrit] mediawiki...GraphViz[master]: Convert to extension registration and PSR4

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

Change subject: Convert to extension registration and PSR4
..


Convert to extension registration and PSR4

Also move all classes to their own files in 'includes' and
namespace, and update the code accordingly.

Bug: T173209
Change-Id: I8c8a47b13ca79be5789f796fe77e2b4fff28cb03
---
M GraphViz.php
M README.md
M RELEASE-NOTES.md
M composer.json
A extension.json
R includes/GraphRenderParms.php
R includes/GraphViz.php
A includes/Settings.php
A includes/UploadFromLocalFile.php
R includes/UploadLocalFile.php
M tests/phpunit/GraphVizTest.php
11 files changed, 255 insertions(+), 198 deletions(-)

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



diff --git a/GraphViz.php b/GraphViz.php
index 77acb12..7e1b59d 100644
--- a/GraphViz.php
+++ b/GraphViz.php
@@ -30,97 +30,14 @@
  * @file
  * @ingroup Extensions
  */
-
-define( 'GraphViz_VERSION', '2.1.0' );
-
-/**
- * The GraphViz settings class.
- */
-class GraphVizSettings {
-   /**
-* dot executable path
-* Windows Default: C:/Programme/ATT/Graphviz/bin/
-* Other Platform : /usr/local/bin/dot
-*
-* '/' will be converted to '\\' later on, so feel free how to write 
your path C:/ or C:\\
-*
-* @var string $execPath
-*/
-   public $execPath;
-
-   /**
-* mscgen executable path
-* Commonly '/usr/bin/', '/usr/local/bin/' or (if set) '$DOT_PATH/'.
-*
-* '/' will be converted to '\\' later on, so feel free how to write 
your path C:/ or C:\\
-*
-* @var string $mscgenPath
-*/
-   public $mscgenPath;
-
-   /**
-* default image type for the output of dot or mscgen
-* The "default default" is png.
-*
-* @var string $defaultImageType
-*/
-   public $defaultImageType;
-
-   /**
-* Whether or not to automatically create category pages for images 
created by this extension.
-* yes|no (case insensitive). The default is no.
-*
-* @var string $createCategoryPages
-*/
-   public $createCategoryPages;
-
-   /**
-* Constructor for setting configuration variable defaults.
-*/
-   public function __construct() {
-   // Set execution path
-   if ( stristr( PHP_OS, 'WIN' ) && !stristr( PHP_OS, 'Darwin' ) ) 
{
-   $this->execPath = 'C:/Program Files/Graphviz/bin/';
-   } else {
-   $this->execPath = '/usr/bin/';
-   }
-
-   $this->mscgenPath = '';
-   $this->defaultImageType = 'png';
-   $this->createCategoryPages = 'no';
-   }
-};
-
-if ( defined( 'MEDIAWIKI' ) ) {
-   $GLOBALS['wgGraphVizSettings'] = new GraphVizSettings();
-
-   // self executing anonymous function to prevent global scope assumptions
-   call_user_func( function () {
-   $dir = __DIR__ . '/';
-
-   $GLOBALS['wgMessagesDirs']['GraphViz'] = $dir . 'i18n';
-   $GLOBALS['wgAutoloadClasses']['GraphViz'] = $dir . 
"GraphViz_body.php";
-   $GLOBALS['wgAutoloadClasses']['GraphRenderParms'] = $dir . 
"GraphRenderParms.php";
-   $GLOBALS['wgAutoloadClasses']['UploadLocalFile'] = $dir . 
"UploadLocalFile.php";
-   $GLOBALS['wgAutoloadClasses']['UploadFromLocalFile'] = $dir . 
"UploadLocalFile.php";
-   $GLOBALS['wgHooks']['ParserFirstCallInit'][] = 
'GraphViz::onParserInit';
-   $GLOBALS['wgHooks']['ArticleDeleteComplete'][] = 
'GraphViz::onArticleDeleteComplete';
-   $GLOBALS['wgHooks']['UnitTestsList'][] = 
'GraphViz::onUnitTestsList';
-   $GLOBALS['wgHooks']['PageContentSave'][] = 
'GraphViz::onPageContentSave';
-   $GLOBALS['wgHooks']['RejectParserCacheValue'][] = 
'GraphViz::onRejectParserCacheValue';
-   $GLOBALS['wgExtensionCredits']['parserhook'][] = [
-   'name' => 'Graphviz',
-   'path' => __FILE__,
-   'version' => GraphViz_VERSION,
-   'author' => [
-   '[http://wickle.com CoffMan]',
-   '[mailto://arno.ven...@gmail.com 
MasterOfDesaster]',
-   '[http://hummel-universe.net Thomas Hummel]',
-   '[mailto://welt...@gmail.com Keith Welter]'
-   ],
-   'url' => 
'https://www.mediawiki.org/wiki/Extension:GraphViz',
-   'descriptionmsg' => 'graphviz-desc',
-   'license-name' => 'GPL-2.0+'
-   ];
-   } );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'GraphViz' );
+   

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Try to opportunistically flush statsd data in maintenance sc...

2017-12-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394779 )

Change subject: Try to opportunistically flush statsd data in maintenance 
scripts
..

Try to opportunistically flush statsd data in maintenance scripts

This helps to avoid OOMs from buffer build-ups in the statsd
factory object. The piggy-backs on to the same opportunity
checks done for deferred update runs.

Bug: T181385
Change-Id: I598be98a5770f8358975815e51380c4b8f63a79e
---
M includes/GlobalFunctions.php
M includes/MediaWiki.php
M includes/libs/stats/BufferingStatsdDataFactory.php
M includes/libs/stats/IBufferingStatsdDataFactory.php
M includes/libs/stats/NullStatsdDataFactory.php
M maintenance/Maintenance.php
M tests/phpunit/MediaWikiTestCase.php
7 files changed, 66 insertions(+), 29 deletions(-)


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

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index bb1951d..6a78411 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -24,7 +24,6 @@
die( "This file is part of MediaWiki, it is not a valid entry point" );
 }
 
-use Liuggio\StatsdClient\Sender\SocketSender;
 use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\ProcOpenError;
 use MediaWiki\Session\SessionManager;
@@ -1231,6 +1230,7 @@
 
 /**
  * @todo document
+ * @todo Move logic to MediaWiki.php
  */
 function wfLogProfilingData() {
global $wgDebugLogGroups, $wgDebugRawPage;
@@ -1242,23 +1242,10 @@
$profiler->setContext( $context );
$profiler->logData();
 
-   $config = $context->getConfig();
-   $stats = MediaWikiServices::getInstance()->getStatsdDataFactory();
-   if ( $config->get( 'StatsdServer' ) && $stats->hasData() ) {
-   try {
-   $statsdServer = explode( ':', $config->get( 
'StatsdServer' ) );
-   $statsdHost = $statsdServer[0];
-   $statsdPort = isset( $statsdServer[1] ) ? 
$statsdServer[1] : 8125;
-   $statsdSender = new SocketSender( $statsdHost, 
$statsdPort );
-   $statsdClient = new SamplingStatsdClient( 
$statsdSender, true, false );
-   $statsdClient->setSamplingRates( $config->get( 
'StatsdSamplingRates' ) );
-   $statsdClient->send( $stats->getData() );
-   } catch ( Exception $ex ) {
-   MWExceptionHandler::logException( $ex );
-   }
-   }
+   // Send out any buffered statsd metrics as needed
+   ( new MediaWiki )->emitBufferedStatsdData();
 
-   # Profiling must actually be enabled...
+   // Profiling must actually be enabled...
if ( $profiler instanceof ProfilerStub ) {
return;
}
diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index 9e3bc10..f1baeb1 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -26,6 +26,7 @@
 use Wikimedia\Rdbms\ChronologyProtector;
 use Wikimedia\Rdbms\LBFactory;
 use Wikimedia\Rdbms\DBConnectionError;
+use Liuggio\StatsdClient\Sender\SocketSender;
 
 /**
  * The MediaWiki class is the helper class for the index.php entry point.
@@ -913,6 +914,31 @@
}
 
/**
+* Send out any buffered statsd data according to sampling rules
+*
+* @throws ConfigException
+* @since 1.31
+*/
+   public function emitBufferedStatsdData() {
+   $stats = 
MediaWikiServices::getInstance()->getStatsdDataFactory();
+   if ( $this->config->get( 'StatsdServer' ) && $stats->hasData() 
) {
+   try {
+   $statsdServer = explode( ':', 
$this->config->get( 'StatsdServer' ) );
+   $statsdHost = $statsdServer[0];
+   $statsdPort = isset( $statsdServer[1] ) ? 
$statsdServer[1] : 8125;
+   $statsdSender = new SocketSender( $statsdHost, 
$statsdPort );
+   $statsdClient = new SamplingStatsdClient( 
$statsdSender, true, false );
+   $statsdClient->setSamplingRates( 
$this->config->get( 'StatsdSamplingRates' ) );
+   $statsdClient->send( $stats->getData() );
+
+   $stats->clearData(); // empty buffer for the 
next round
+   } catch ( Exception $ex ) {
+   MWExceptionHandler::logException( $ex );
+   }
+   }
+   }
+
+   /**
 * Potentially open a socket and sent an HTTP request back to the server
 * to run a specified number of jobs. This registers a callback to 
cleanup
 * the socket once it's done.
diff --git a/includes/libs/stats/BufferingStatsdDataFactory.php 

[MediaWiki-commits] [Gerrit] marvin[master]: Chore: disable powered by Express header

2017-12-02 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394778 )

Change subject: Chore: disable powered by Express header
..

Chore: disable powered by Express header

Marvin is open source but it seems to be recommended practice to disable
this custom header.

http://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header

Change-Id: I5dd86770068717beb3c4a5fb92d21d783464e702
---
M src/server/index.tsx
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/marvin refs/changes/78/394778/1

diff --git a/src/server/index.tsx b/src/server/index.tsx
index 118b9fa..4d950fc 100644
--- a/src/server/index.tsx
+++ b/src/server/index.tsx
@@ -10,6 +10,10 @@
 
 const server = express();
 
+// Disable useless header.
+// 
http://expressjs.com/en/advanced/best-practice-security.html#at-a-minimum-disable-x-powered-by-header
+server.disable("x-powered-by");
+
 server.use(compression());
 
 server.use("/public", express.static("dist/public"));

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MassAction[master]: Added Internationalization For Some Strings

2017-12-02 Thread Ryan10145 (Code Review)
Ryan10145 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394777 )

Change subject: Added Internationalization For Some Strings
..

Added Internationalization For Some Strings

Change-Id: I2da4efff85b71379011026d18ed2129c89f9d2ce
---
M i18n/en.json
M i18n/qqq.json
M src/MassActionSpecialPage.php
M src/Targets/WikiPage/Actions/AppendAction.php
M src/Targets/WikiPage/Actions/RegexReplaceAction.php
M src/Targets/WikiPage/Matchers/TitleRegexMatcher.php
6 files changed, 24 insertions(+), 9 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 8cc2e6a..55fa2ef 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -10,6 +10,7 @@
"massaction-errormessage": "Error: $1",
"massaction-newtask": "New task",
"massaction-viewtask": "View task",
+   "massaction-registeredtask": "Task registered and job queued!",
"massactionsavechange": "Save change",
"specialpages-group-MassAction": "MassAction",
"log-name-massaction": "MassAction",
@@ -20,5 +21,11 @@
"massaction-specialpage-matchers-section":"Matchers",
"massaction-specialpage-actions-section":"Actions",
"massaction-target-wikipage-titleregexmatcher-regex-help":"Regex 
characters allowed: . * ?",
-   "massaction-queued-count": "Queued [[Special:MassAction|mass action]] 
jobs"
+   "massaction-queued-count": "Queued [[Special:MassAction|mass action]] 
jobs",
+   "massaction-regexreplace-desc": "Performs a regex replace on the 
content using the pattern",
+   "massaction-append-desc": "Appends $1 characters to Page $2",
+   "massaction-append-trimmed": "... (trimmed to 25 characters)",
+   "massaction-titleregexmatcher-desc": "Matches pages with titles matches 
regex",
+   "massaction-titleregexmatcher-enabled": "Title Regex Matcher Enabled?",
+   "massaction-titleregexmatcher-label": "Title Regex"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index a261986..84fd58f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -12,6 +12,7 @@
"massaction-errormessage": "Error message for special 
pages\n{{Identical|Error}}",
"massaction-newtask": "New Task special page title",
"massaction-viewtask": "View Task special page title",
+   "massaction-registeredtask": "Message for when a task has been 
registered and the corresponding job has been added to the queue for later 
completition",
"massactionsavechange": "Save Change special page 
title\n{{Identical|Save changes}}",
"specialpages-group-MassAction": "MassAction special page 
group\n{{doc-special-group}}",
"log-name-massaction": "Name for the MassAction log type",
@@ -22,5 +23,11 @@
"massaction-specialpage-matchers-section": "Title for the section 
containing options for Matchers when creating a new task",
"massaction-specialpage-actions-section": "Title for the section 
containing options for Actions when creating a new task\n{{Identical|Action}}",
"massaction-target-wikipage-titleregexmatcher-regex-help": "Help 
message for the WikiPage TitleRegexMatcher Regex form entry box",
-   "massaction-queued-count": "Text for row on [[Special:Statistics]]."
+   "massaction-queued-count": "Text for row on [[Special:Statistics]].",
+   "massaction-regexreplace-desc": "Description for the action that 
replaces the following regex pattern",
+   "massaction-append-desc": "Description for an action that appends 
characters to a page. Parameters:\n* $1 - the amount of characters appended\n* 
$2 - a snippet of the page that is being appended to",
+   "massaction-append-trimmed": "Message that shows that a snippet of text 
has been truncated past 25 characters",
+   "massaction-titleregexmatcher-desc": "Description for the matcher that 
matches the following regex pattern in titles",
+   "massaction-titleregexmatcher-enabled": "Label for whether or not the 
matcher for title regex is enabled",
+   "massaction-titleregexmatcher-label": "Label for the title regex 
matcher"
 }
diff --git a/src/MassActionSpecialPage.php b/src/MassActionSpecialPage.php
index a49ff5e..cb7f46a 100644
--- a/src/MassActionSpecialPage.php
+++ b/src/MassActionSpecialPage.php
@@ -498,7 +498,7 @@
$job = new TargetListJob( Title::newMainPage(), array( 'taskid' 
=> $task->getId() ) );
JobQueueGroup::singleton()->push( $job );
 
-   $this->getOutput()->addHTML( 'Task registered and job 
queued!' );
+   $this->getOutput()->addHTML( '' . 
'massaction-registeredtask' . '' );
$link = Linker::specialLink( 'MassAction/View/' . 
$task->getId(), 'massaction-viewtask' );
$this->getOutput()->addHTML( '' . $link . '' );
}
diff --git a/src/Targets/WikiPage/Actions/AppendAction.php 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add some @noinspection flags to doPostOutputShutdown()

2017-12-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394773 )

Change subject: Add some @noinspection flags to doPostOutputShutdown()
..

Add some @noinspection flags to doPostOutputShutdown()

This are in "use" clause of $callback, by reference

Change-Id: Iadb1d25263dbafe2bd12223db62e1c93e2188bde
---
M includes/MediaWiki.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php
index 9e3bc10..2aeefc6 100644
--- a/includes/MediaWiki.php
+++ b/includes/MediaWiki.php
@@ -726,10 +726,12 @@
if ( function_exists( 'register_postsend_function' ) ) {
// https://github.com/facebook/hhvm/issues/1230
register_postsend_function( $callback );
+   /** @noinspection PhpUnusedLocalVariableInspection */
$blocksHttpClient = false;
} else {
if ( function_exists( 'fastcgi_finish_request' ) ) {
fastcgi_finish_request();
+   /** @noinspection 
PhpUnusedLocalVariableInspection */
$blocksHttpClient = false;
} else {
// Either all DB and deferred updates should 
happen or none.

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Only send statsd data for WAN cache in non-CLI mode

2017-12-02 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394772 )

Change subject: Only send statsd data for WAN cache in non-CLI mode
..

Only send statsd data for WAN cache in non-CLI mode

Bug: T181385
Change-Id: Ic51a084206cea93621393359ded4ff77beef5f13
---
M includes/objectcache/ObjectCache.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/394772/1

diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 07432c0..67d2346 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -342,14 +342,15 @@
$params['channels'][$action] = $channel;
}
$params['cache'] = self::newFromParams( $params['store'] );
-   $params['stats'] = $services->getStatsdDataFactory();
if ( isset( $params['loggroup'] ) ) {
$params['logger'] = LoggerFactory::getInstance( 
$params['loggroup'] );
} else {
$params['logger'] = LoggerFactory::getInstance( 
'objectcache' );
}
-   // Let pre-emptive refreshes happen post-send on HTTP requests
if ( !$wgCommandLineMode ) {
+   // Send the statsd data post-send on HTTP requests; 
avoid in CLI mode (T181385)
+   $params['stats'] = $services->getStatsdDataFactory();
+   // Let pre-emptive refreshes happen post-send on HTTP 
requests
$params['asyncHandler'] = [ DeferredUpdates::class, 
'addCallableUpdate' ];
}
$class = $params['class'];

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Try to avoid bogus JobTest failures for PHP 7

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

Change subject: Try to avoid bogus JobTest failures for PHP 7
..


Try to avoid bogus JobTest failures for PHP 7

Change-Id: I07b4bd796a668fef83ebb3e2824ccc608781a6e8
---
M tests/phpunit/includes/jobqueue/JobTest.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/tests/phpunit/includes/jobqueue/JobTest.php 
b/tests/phpunit/includes/jobqueue/JobTest.php
index 6723a0b..e2aacae 100644
--- a/tests/phpunit/includes/jobqueue/JobTest.php
+++ b/tests/phpunit/includes/jobqueue/JobTest.php
@@ -75,8 +75,10 @@
'someCommand  
pages={"932737":[0,"Robert_James_Waller"]} ' .

'rootJobSignature=45868e99bba89064e4483743ebb9b682ef95c1a7 ' .
'rootJobTimestamp=20160309110158 masterPos=' .
-   
'{"file":"db1023-bin.001288","pos":"308257743","asOfTime":1457521464.3814} ' .
-   'triggeredRecursive=1 ' .
+   
'{"file":"db1023-bin.001288","pos":"308257743","asOfTime":' .
+   // Embed dynamically because TestSetup sets 
serialize_precision=17
+   // which, in PHP 7.1 and 7.2, produces 
1457521464.3814001 instead
+   json_encode( 1457521464.3814 ) . '} ' . 
'triggeredRecursive=1 ' .
$requestId
],
];

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07b4bd796a668fef83ebb3e2824ccc608781a6e8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Translate name of Wiktionary in Wallon

2017-12-02 Thread Code Review
Jon Harald Søby has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394771 )

Change subject: Translate name of Wiktionary in Wallon
..

Translate name of Wiktionary in Wallon

Add the translated name for Wiktionary in Wallon
as sitename and project namespace.

Bug: T181782
Change-Id: I9bf91538def28c38a4cb06f6ef1c0763309c1b3b
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 107d697..c3468c4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2467,6 +2467,7 @@
'vowiki' => 'Vükiped',
'vowikibooks' => 'Vükibuks',
'vowiktionary' => 'Vükivödabuk',
+   'wawiktionary' => 'Wiccionaire', // T181782
'wbwikimedia' => 'West Bengal Wikimedians', // T162510
'wg_enwiki' => 'Wikipedia Working Group',
'wikimaniateamwiki' => 'WikimaniaTeam',
@@ -2971,6 +2972,7 @@
'vowiki' => 'Vükiped',
'vowikibooks' => 'Vükibuks',
'vowiktionary' => 'Vükivödabuk',
+   'wawiktionary' => 'Wiccionaire', // T181782
'wikimaniateamwiki' => 'WikimaniaTeam',
'xmfwiki' => 'ვიკიპედია',
'yiwiki' => 'װיקיפּעדיע',
@@ -3087,6 +3089,7 @@
'ukwiktionary' => 'Обговорення_Вікісловника',
'ukwikinews' => 'Обговорення_Вікіновин', // T50843
'vepwiki' => 'Paginad_Vikipedii',
+   'wawiktionary' => 'Wiccionaire_copene', // T181782
'xmfwiki' => 'ვიკიპედია_სხუნუა',
 ],
 # @} end of wgMetaNamespaceTalk

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9bf91538def28c38a4cb06f6ef1c0763309c1b3b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jon Harald Søby 

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


[MediaWiki-commits] [Gerrit] mediawiki...ProofreadPage[master]: Do not fail if no image is built from the Page: page name

2017-12-02 Thread Tpt (Code Review)
Tpt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394770 )

Change subject: Do not fail if no image is built from the Page: page name
..

Do not fail if no image is built from the Page: page name

Bug: T181868
Change-Id: Id59366c391ac8e573af667cd5acdee17c6d5c628
---
M includes/page/DatabaseIndexForPageLookup.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/page/DatabaseIndexForPageLookup.php 
b/includes/page/DatabaseIndexForPageLookup.php
index e71a3c2..7f2163e 100644
--- a/includes/page/DatabaseIndexForPageLookup.php
+++ b/includes/page/DatabaseIndexForPageLookup.php
@@ -75,7 +75,7 @@
if ( $imageTitle !== null ) {
$image = $this->repoGroup->findFile( 
$imageTitle );
// if it is multipage, we use the page order of 
the file
-   if ( $image->exists() && $image->isMultipage() 
) {
+   if ( $image !== false && $image->exists() && 
$image->isMultipage() ) {
return Title::makeTitle(
$this->indexNamespaceId, 
$image->getTitle()->getText()
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id59366c391ac8e573af667cd5acdee17c6d5c628
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Set `max-width: 50em` for entire FieldLayout and all aligns

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

Change subject: Set `max-width: 50em` for entire FieldLayout and all aligns
..

Set `max-width: 50em` for entire FieldLayout and all aligns

This was more complicated than it needed to be and behaved
unexpectedly in some cases, like putting a LabelWidget inside the
FieldLayout rather than using its label (T181733).

Bug: T181733
Change-Id: Ica96f4d48c0a5914f1dfb0aa7330c9e8a49b84bc
---
M demos/styles/demo.css
M src/themes/apex/layouts.less
M src/themes/wikimediaui/layouts.less
3 files changed, 10 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/69/394769/1

diff --git a/demos/styles/demo.css b/demos/styles/demo.css
index cc8d70e..25af588 100644
--- a/demos/styles/demo.css
+++ b/demos/styles/demo.css
@@ -309,11 +309,6 @@
 
 /* Special cases: ActionFieldLayout top aligned,
 FieldLayout left & right aligned */
-.oo-ui-fieldLayout-align-left,
-.oo-ui-fieldLayout-align-right {
-   max-width: 50em;
-}
-
 .oo-ui-fieldLayout-align-top.oo-ui-actionFieldLayout .demo-link-example,
 .oo-ui-fieldLayout-align-top.oo-ui-actionFieldLayout .demo-console-toggle,
 .oo-ui-fieldLayout-align-left .demo-link-example,
diff --git a/src/themes/apex/layouts.less b/src/themes/apex/layouts.less
index 4f13a2b..f3a56ef 100644
--- a/src/themes/apex/layouts.less
+++ b/src/themes/apex/layouts.less
@@ -31,6 +31,11 @@
 .theme-oo-ui-fieldLayout () {
margin-top: 1em;
 
+   &-body,
+   &-messages {
+   max-width: @max-width-base;
+   }
+
&.oo-ui-fieldLayout-align-left,
&.oo-ui-fieldLayout-align-right {
> .oo-ui-fieldLayout-body {
@@ -60,10 +65,6 @@
&.oo-ui-fieldLayout-align-inline {
margin-top: 1.25em;
 
-   & > .oo-ui-fieldLayout-body {
-   max-width: @max-width-base;
-   }
-
&.oo-ui-labelElement > .oo-ui-fieldLayout-body > 
.oo-ui-fieldLayout-header {
padding: 0.25em 0 0.25em 0.5em;
}
@@ -75,7 +76,6 @@
 
&.oo-ui-fieldLayout-align-top {
&.oo-ui-labelElement > .oo-ui-fieldLayout-body > 
.oo-ui-fieldLayout-header {
-   max-width: @max-width-base;
padding: 0.5em 0;
}
}
@@ -127,9 +127,6 @@
 }
 
 .theme-oo-ui-actionFieldLayout () {
-   &.oo-ui-fieldLayout-align-top {
-   max-width: 50em;
-   }
 }
 
 .theme-oo-ui-fieldsetLayout () {
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index 8a4f8a2..725ee78 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -42,6 +42,11 @@
// At base `font-size: 12.8px` we just relatively follow M101 design 
guideline here
margin-top: 1.25em; // `1.5em` in the guideline, we go for 
`1.25em`≈`16px`
 
+   &-body,
+   &-messages {
+   max-width: @max-width-base;
+   }
+
&.oo-ui-labelElement,
&.oo-ui-fieldLayout-align-inline {
margin-top: 0.9375em; // `1.25em` in the guideline, we go for 
`0.9375em`≈`12px`
@@ -62,11 +67,6 @@
> .oo-ui-labelElement-label {
line-height: @line-height-form-element;
}
-   }
-
-   &.oo-ui-fieldLayout-align-top > .oo-ui-fieldLayout-body > 
.oo-ui-fieldLayout-header,
-   &.oo-ui-fieldLayout-align-inline > .oo-ui-fieldLayout-body {
-   max-width: @max-width-base;
}
 
&.oo-ui-fieldLayout-align-left,
@@ -163,10 +163,6 @@
 }
 
 .theme-oo-ui-actionFieldLayout () {
-   &.oo-ui-fieldLayout-align-top {
-   max-width: @max-width-base;
-   }
-
.oo-ui-actionFieldLayout-button .oo-ui-buttonElement-frameless {
margin-left: @padding-horizontal-frameless; // Address 
frameless negative margin focus hack
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ica96f4d48c0a5914f1dfb0aa7330c9e8a49b84bc
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] mediawiki...CodeMirror[master]: Rename CodeMirror.hooks.php to CodeMirrorHooks.php

2017-12-02 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394768 )

Change subject: Rename CodeMirror.hooks.php to CodeMirrorHooks.php
..

Rename CodeMirror.hooks.php to CodeMirrorHooks.php

This avoids the MediaWiki.Files.ClassMatchesFilename.NotMatch exception
in .phpcs.xml.

Change-Id: I599016f4754f24b16394bdf1ba45bb20862fcd2a
---
M .phpcs.xml
R CodeMirrorHooks.php
M extension.json
3 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/.phpcs.xml b/.phpcs.xml
index d8ec4f6..3553f4e 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -2,7 +2,6 @@
 


-   

.

diff --git a/CodeMirror.hooks.php b/CodeMirrorHooks.php
similarity index 100%
rename from CodeMirror.hooks.php
rename to CodeMirrorHooks.php
diff --git a/extension.json b/extension.json
index 3456b07..58cf74c 100644
--- a/extension.json
+++ b/extension.json
@@ -18,7 +18,7 @@
]
},
"AutoloadClasses": {
-   "CodeMirrorHooks": "CodeMirror.hooks.php",
+   "CodeMirrorHooks": "CodeMirrorHooks.php",
"ResourceLoaderCodeMirrorModule": 
"ResourceLoaderCodeMirrorModule.php"
},
"ResourceModules": {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Score[master]: Add `override_midi` to README

2017-12-02 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394767 )

Change subject: Add `override_midi` to README
..

Add `override_midi` to README

This attribute was not mentioned in the README, and so added it
(based on the documentation for the `midi` and `override_ogg`
attributes). With that, repeated information in the other attribute
was removed with a note.

Change-Id: If4559eadc19c60f05ec617d4cdf2f35f55072fe4
---
M README
1 file changed, 12 insertions(+), 5 deletions(-)


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

diff --git a/README b/README
index 7abbbdf..fdd7a12 100644
--- a/README
+++ b/README
@@ -86,16 +86,23 @@
   Effect: If included in the tag, the rendered image(s) will be embedded into a
   hyperlink to an appropriate MIDI file.
 
+* Attribute: override_midi
+  Allowed values: Known file name, that is, if override_midi="name" is given,
+  [[File:name]] is not a redlink.
+  Effect: Embeds the score image(s) into a hyperlink to a specified MIDI file.
+  This is an alternative to the midi attribute (see above). It can, for
+  example, be useful if you have a suitable MIDI file of superior
+  quality compared with the auto-generated MIDI file the midi attribute
+  yields. Of course, you can still omit both attributes in this case 
and
+  add the file manually to the page, if you prefer.
+
 * Attribute: override_ogg
   Allowed values: Known file name, that is, if override_ogg="name" is given,
   [[File:name]] is not a redlink.
   Effect: Embeds the media specified by the file name in the HTML below the
   score image(s). This is an alternative to the vorbis attribute (see
-  below). It can, for example, be useful if you have a suitable
-  Ogg/Vorbis file of superior quality compared with the auto-generated
-  Ogg/Vorbis file the vorbis attribute yields. Of course, you can still
-  omit both attributes in this case and add the file manually to the
-  page, if you prefer.
+  below). Its use is similar to the use of the override_midi attribute
+  (see above).
 
 * Attribute: raw
   Effect: If included in the tag, the score code is interpreted as a complete

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4559eadc19c60f05ec617d4cdf2f35f55072fe4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Score
Gerrit-Branch: master
Gerrit-Owner: Ebe123 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add Korean value for lonelypages.py

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

Change subject: Add Korean value for lonelypages.py
..


Add Korean value for lonelypages.py

Change-Id: I8bff4a0c2293613ab167c2f239cb5f75a636c9e9
Signed-off-by: Yongmin Hong 
---
M scripts/lonelypages.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index f9b75f0..ca9f9c2 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -95,6 +95,7 @@
 'en': ('Orphan', 'date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}', 
['wi']),
 'it': ('O', '||mese={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}', 
['a']),
 'ja': ('孤立', '{{subst:DATE}}'),
+'ko': ('외톨이', '{|안전풀기:}}}#timel:Y-m-d|now}}'),
 'zh': ('Orphan/auto', '', ['orphan'], True),
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8bff4a0c2293613ab167c2f239cb5f75a636c9e9
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Revi 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...TocTree[master]: Rename TocTree.hooks.php to TocTreeHooks.php

2017-12-02 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394766 )

Change subject: Rename TocTree.hooks.php to TocTreeHooks.php
..

Rename TocTree.hooks.php to TocTreeHooks.php

This avoids the MediaWiki.Files.ClassMatchesFilename.NotMatch exception
in .phpcs.xml.

Change-Id: I0aac6d8f2d1b9cae38974e012e930cfb7ce03e36
---
M .phpcs.xml
M TocTree.php
R TocTreeHooks.php
M extension.json
4 files changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TocTree 
refs/changes/66/394766/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 88acdef..58669e2 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -1,8 +1,6 @@
 
 
-   
-   
-   
+   
.


diff --git a/TocTree.php b/TocTree.php
index 7d71d55..9fad96f 100644
--- a/TocTree.php
+++ b/TocTree.php
@@ -18,7 +18,7 @@
 $wgMessagesDirs['TocTree'] = __DIR__ . '/i18n';
 
 // autoloader
-$wgAutoloadClasses['TocTreeHooks'] = __DIR__ . '/TocTree.hooks.php';
+$wgAutoloadClasses['TocTreeHooks'] = __DIR__ . '/TocTreeHooks.php';
 
 // hooks
 $wgHooks['BeforePageDisplay'][] = 'TocTreeHooks::wfTocTreeParserOutput';
diff --git a/TocTree.hooks.php b/TocTreeHooks.php
similarity index 100%
rename from TocTree.hooks.php
rename to TocTreeHooks.php
diff --git a/extension.json b/extension.json
index c983b6d..f81fe7c 100644
--- a/extension.json
+++ b/extension.json
@@ -19,7 +19,7 @@
]
},
"AutoloadClasses": {
-   "TocTreeHooks": "TocTree.hooks.php"
+   "TocTreeHooks": "TocTreeHooks.php"
},
"ResourceModules": {
"ext.toctree": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aac6d8f2d1b9cae38974e012e930cfb7ce03e36
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TocTree
Gerrit-Branch: master
Gerrit-Owner: Fomafix 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: FieldLayout: Improve alignment of multiline labels with 'hel...

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

Change subject: FieldLayout: Improve alignment of multiline labels with 'help' 
button
..

FieldLayout: Improve alignment of multiline labels with 'help' button

The 'help' button is floated, so moving it before the label in the DOM
allows it to align with the top of the label, rather than the bottom.
This only makes a difference when the label has multiple lines of text.

Bug: T181430
Change-Id: Ic6044760e4a4a8ae41e491855f81061f46b74a0c
---
M demos/pages/widgets.js
M php/layouts/FieldLayout.php
M src/layouts/FieldLayout.js
M src/themes/wikimediaui/layouts.less
4 files changed, 9 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/65/394765/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 713f536..8fa7587 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -2562,6 +2562,7 @@
new OO.ui.TextInputWidget(),
{
label: 'FieldLayout aligned top 
with very long label. ' + loremIpsum,
+   help: loremIpsum,
align: 'top'
}
),
@@ -2569,6 +2570,7 @@
new OO.ui.CheckboxInputWidget( { 
selected: true } ),
{
label: 'FieldLayout aligned 
inline with very long label. ' + loremIpsum,
+   help: loremIpsum,
align: 'inline'
}
),
@@ -2576,6 +2578,7 @@
new OO.ui.TextInputWidget(),
{
label: 'FieldLayout aligned 
left with very long label. ' + loremIpsum,
+   help: loremIpsum,
align: 'left'
}
),
@@ -2583,6 +2586,7 @@
new OO.ui.TextInputWidget(),
{
label: 'FieldLayout aligned 
right with very long label. ' + loremIpsum,
+   help: loremIpsum,
align: 'right'
}
),
diff --git a/php/layouts/FieldLayout.php b/php/layouts/FieldLayout.php
index e070605..a1aad28 100644
--- a/php/layouts/FieldLayout.php
+++ b/php/layouts/FieldLayout.php
@@ -201,10 +201,10 @@
// Reorder elements
$this->body->clearContent();
if ( $value === 'top' ) {
-   $this->header->appendContent( $this->label, 
$this->help );
+   $this->header->appendContent( $this->help, 
$this->label );
$this->body->appendContent( $this->header, 
$this->field );
} elseif ( $value === 'inline' ) {
-   $this->header->appendContent( $this->label, 
$this->help );
+   $this->header->appendContent( $this->help, 
$this->label );
$this->body->appendContent( $this->field, 
$this->header );
} else {
$this->header->appendContent( $this->label );
diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js
index 72b5161..502416f 100644
--- a/src/layouts/FieldLayout.js
+++ b/src/layouts/FieldLayout.js
@@ -216,10 +216,10 @@
}
// Reorder elements
if ( value === 'top' ) {
-   this.$header.append( this.$label, this.$help );
+   this.$header.append( this.$help, this.$label );
this.$body.append( this.$header, this.$field );
} else if ( value === 'inline' ) {
-   this.$header.append( this.$label, this.$help );
+   this.$header.append( this.$help, this.$label );
this.$body.append( this.$field, this.$header );
} else {
this.$header.append( this.$label );
diff --git a/src/themes/wikimediaui/layouts.less 
b/src/themes/wikimediaui/layouts.less
index 8a4f8a2..2155be1 100644
--- a/src/themes/wikimediaui/layouts.less
+++ b/src/themes/wikimediaui/layouts.less
@@ -120,10 

[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Tests for serialize and unserialize of compact diff in Entit...

2017-12-02 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394764 )

Change subject: Tests for serialize and unserialize of compact diff in 
EntityChange
..

Tests for serialize and unserialize of compact diff in EntityChange

These are regression tests of Idac3c907944eee1b748e9d6c72de9111acccb6d2 fix

Bug: T181760
Change-Id: I3d837f2e09ea2c8f4a8d61d95075000c409cc0a0
---
M lib/tests/phpunit/Changes/EntityChangeTest.php
1 file changed, 29 insertions(+), 0 deletions(-)


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

diff --git a/lib/tests/phpunit/Changes/EntityChangeTest.php 
b/lib/tests/phpunit/Changes/EntityChangeTest.php
index 7b98075..07ba3fa 100644
--- a/lib/tests/phpunit/Changes/EntityChangeTest.php
+++ b/lib/tests/phpunit/Changes/EntityChangeTest.php
@@ -8,6 +8,7 @@
 use Revision;
 use RuntimeException;
 use stdClass;
+use Wikibase\Lib\Changes\EntityDiffChangedAspects;
 use Wikimedia\TestingAccessWrapper;
 use User;
 use Wikibase\DataModel\Entity\EntityId;
@@ -352,6 +353,34 @@
$this->assertEquals( $info, $change->getInfo() );
}
 
+   public function testSerializeAndUnserializeInfoCompactDiff() {
+   $aspects = new EntityDiffChangedAspects(
+   [ 'fa' ],
+   [],
+   [],
+   [],
+   false
+   );
+   $info = [ 'compactDiff' => $aspects->serialize() ];
+   $change = new EntityChange( [ 'info' => $info ] );
+   $change->setField( 'info', $change->getSerializedInfo() );
+   $this->assertEquals( $info, $change->getInfo() );
+   }
+
+   public function 
testSerializeAndUnserializeInfoCompactDiffBadSerialization() {
+   $aspects = new EntityDiffChangedAspects(
+   [ 'de' ],
+   [],
+   [],
+   [],
+   false
+   );
+   $info = [ 'compactDiff' => $aspects->toArray() ];
+   $change = new EntityChange( [ 'info' => $info ] );
+   $change->setField( 'info', $change->getSerializedInfo() );
+   $this->assertEquals( [], $change->getInfo() );
+   }
+
public function testGivenStatement_serializeInfoSerializesStatement() {
$statement = new Statement( new PropertyNoValueSnak( 1 ) );
$info = [ 'diff' => new DiffOpAdd( $statement ) ];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d837f2e09ea2c8f4a8d61d95075000c409cc0a0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: simplify cleanup of old xml/sql dumps

2017-12-02 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394763 )

Change subject: simplify cleanup of old xml/sql dumps
..

simplify cleanup of old xml/sql dumps

Don't bother retrieving a list of all wikis, just walk through all
the immediate subdirs of the dumps tree and process those with
dirs that look like dump runs (names MMDD)

Since there's no all.dblist any more, have a default entry
in the conf file for the number of dumps to keep

Bug: T181895
Change-Id: Ic62c381f087c4c018b261f85b8b6db81a3f15ea0
---
M modules/dumps/files/web/cleanups/cleanup_old_xmldumps.py
R modules/dumps/manifests/web/cleanups/xmldumps.pp
2 files changed, 54 insertions(+), 38 deletions(-)


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

diff --git a/modules/dumps/files/web/cleanups/cleanup_old_xmldumps.py 
b/modules/dumps/files/web/cleanups/cleanup_old_xmldumps.py
index b58294d..aa40944 100644
--- a/modules/dumps/files/web/cleanups/cleanup_old_xmldumps.py
+++ b/modules/dumps/files/web/cleanups/cleanup_old_xmldumps.py
@@ -11,6 +11,7 @@
 import sys
 import getopt
 import shutil
+import re
 
 
 def usage(message=None):
@@ -24,13 +25,13 @@
 sys.stderr.write("\n")
 usage_message = """
 Usage: cleanup_old_xmldumps.py --keeps_conffile path --wikilists dir
-   [--help]
+   [--subdirs] [--help]
 
 Given a directory with files with lists of wikis,
 settings in a file describing how many dumps to keep
 for wikis in each list, and the path of the directory
 tree of the dumps, looks through each directory
-treepath/wiki/ to be sure that there are no more than
+treepath/wikiname/ to be sure that there are no more than
 the specified number of dump directories. Dump directories
 are subdirectories with the format MMDD; the rest are
 ignored.
@@ -45,6 +46,10 @@
   dumps per wiki we keep, for each file
   containing a list of wikis
   --wiki   (-w):  wiki for which to dump config settings
+  --subdirs(-s):  directories in treepath must
+  match this expression in order to
+  be examined and cleaned up.
+  default: '*wik*'
   --help   (-h):  display this usage message
 
 File formats:
@@ -56,7 +61,8 @@
dumps to keep.  Example: enwiki:3
Note that blank lines or lines starting with '#' in both types
of files will be skipped.
-
+   An entry 'default:number' will be the value used for any wikis
+   not in one of the specified lists.
 Example:
   cleanup_old_xmldumps.py -k /etc/dumps/xml_keeps.conf \
-d /mnt/dumpsdata/xmldatadumps/public -w /etc/dumps/dblists
@@ -78,6 +84,16 @@
 lines = fhandle.readlines()
 wikilists[filename] = [line.strip() for line in lines if line and not 
line.startswith('#')]
 return wikilists
+
+
+def get_allwikis(dumpsdir, match):
+"""
+return list of all subdirectories of dumpsdir matching the
+supplied regular expression
+"""
+subdirs = os.listdir(dumpsdir)
+return [subdir for subdir in subdirs
+if re.match(match, subdir) and 
os.path.isdir(os.path.join(dumpsdir, subdir))]
 
 
 def get_keeps(keeps_conffile):
@@ -109,21 +125,37 @@
 """
 methods for finding and cleaning up old wiki dump dirs
 """
-def __init__(self, keeps_conffile, wikilists_dir, dumpsdir, dryrun):
+def __init__(self, keeps_conffile, wikilists_dir, dumpsdir, wikipattern, 
dryrun):
 self.keeps_per_list = get_keeps(keeps_conffile)
 self.wikilists = get_wikilists(wikilists_dir)
 self.dumpsdir = dumpsdir
+self.wikistoclean = get_allwikis(self.dumpsdir, wikipattern)
 self.dryrun = dryrun
 
 def get_dumps(self, wiki):
 """
 get list of subdirs for dumpsdir/wiki/ in format DDMM
+all other subdirs are skipped.
 """
 path = os.path.join(self.dumpsdir, wiki)
 if not os.path.exists(path):
 return []
 dirs = os.listdir(path)
 return sorted([dirname for dirname in dirs if dirname.isdigit() and 
len(dirname) == 8])
+
+def get_keep_for_wiki(self, wiki):
+"""
+find the keep value for the specified wiki
+by checking through the various keep conf settings,
+falling back to the default setting, if there is one
+if no setting is found, return None
+"""
+for wikilist in self.wikilists:
+if wiki in wikilist:
+return self.keeps_per_list[wikilist]
+if 'default' in self.keeps_per_list:
+return self.keeps_per_list['default']
+return None
 
 def cleanup_dirs(self, wiki, dirs):
 """
@@ -137,27 +169,26 @@
 else:
 shutil.rmtree("%s" % to_remove)
 
-def cleanup_wikis(self, keeps, wikis):
+def cleanup_wiki(self, keeps, 

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[stretch-migration]: Fix "Left match operand must result in a String value" in se...

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

Change subject: Fix "Left match operand must result in a String value" in 
service::node
..

Fix "Left match operand must result in a String value" in service::node

Change-Id: If0a8602065e43fedb6eba13a8a2e0c2e624d203b
---
M puppet/modules/service/manifests/node.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/62/394762/1

diff --git a/puppet/modules/service/manifests/node.pp 
b/puppet/modules/service/manifests/node.pp
index fe6a042..a88a422 100644
--- a/puppet/modules/service/manifests/node.pp
+++ b/puppet/modules/service/manifests/node.pp
@@ -76,7 +76,7 @@
 }
 
 # sanity check since a default port cannot be assigned
-unless $port and $port =~ /^\d+$/ {
+unless $port and "${port}" =~ /^\d+$/ {
 fail('Service port must be specified and must be a number!')
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If0a8602065e43fedb6eba13a8a2e0c2e624d203b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: stretch-migration
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add GENDER where strings could differ

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

Change subject: Add GENDER where strings could differ
..


Add GENDER where strings could differ

Bug: T129731
Change-Id: If1100a5c9ec4882f96237c70e5270a9aa40e6b24
---
M languages/i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Brian Wolff: Looks good to me, approved
  D3r1ck01: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 9b1e04a..5c25de6 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -548,11 +548,11 @@
"botpasswords-insert-failed": "Failed to add bot name \"$1\". Was it 
already added?",
"botpasswords-update-failed": "Failed to update bot name \"$1\". Was it 
deleted?",
"botpasswords-created-title": "Bot password created",
-   "botpasswords-created-body": "The bot password for bot name \"$1\" of 
user \"$2\" was created.",
+   "botpasswords-created-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was created.",
"botpasswords-updated-title": "Bot password updated",
-   "botpasswords-updated-body": "The bot password for bot name \"$1\" of 
user \"$2\" was updated.",
+   "botpasswords-updated-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was updated.",
"botpasswords-deleted-title": "Bot password deleted",
-   "botpasswords-deleted-body": "The bot password for bot name \"$1\" of 
user \"$2\" was deleted.",
+   "botpasswords-deleted-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was deleted.",
"botpasswords-newpassword": "The new password to log in with 
$1 is $2. Please record this for future 
reference.  (For old bots which require the login name to be the same 
as the eventual username, you can also use $3 as username and 
$4 as password.)",
"botpasswords-no-provider": "BotPasswordsSessionProvider is not 
available.",
"botpasswords-restriction-failed": "Bot password restrictions prevent 
this login.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If1100a5c9ec4882f96237c70e5270a9aa40e6b24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Albert221 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add GENDER where strings could differ

2017-12-02 Thread Albert221 (Code Review)
Albert221 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394761 )

Change subject: Add GENDER where strings could differ
..

Add GENDER where strings could differ

Bug: T129731
Change-Id: If1100a5c9ec4882f96237c70e5270a9aa40e6b24
---
M languages/i18n/en.json
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/61/394761/1

diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 9b1e04a..5c25de6 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -548,11 +548,11 @@
"botpasswords-insert-failed": "Failed to add bot name \"$1\". Was it 
already added?",
"botpasswords-update-failed": "Failed to update bot name \"$1\". Was it 
deleted?",
"botpasswords-created-title": "Bot password created",
-   "botpasswords-created-body": "The bot password for bot name \"$1\" of 
user \"$2\" was created.",
+   "botpasswords-created-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was created.",
"botpasswords-updated-title": "Bot password updated",
-   "botpasswords-updated-body": "The bot password for bot name \"$1\" of 
user \"$2\" was updated.",
+   "botpasswords-updated-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was updated.",
"botpasswords-deleted-title": "Bot password deleted",
-   "botpasswords-deleted-body": "The bot password for bot name \"$1\" of 
user \"$2\" was deleted.",
+   "botpasswords-deleted-body": "The bot password for bot name \"$1\" of 
{{GENDER:$2|user}} \"$2\" was deleted.",
"botpasswords-newpassword": "The new password to log in with 
$1 is $2. Please record this for future 
reference.  (For old bots which require the login name to be the same 
as the eventual username, you can also use $3 as username and 
$4 as password.)",
"botpasswords-no-provider": "BotPasswordsSessionProvider is not 
available.",
"botpasswords-restriction-failed": "Bot password restrictions prevent 
this login.",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Rename Stats to ThresholdLookup and make it a service

2017-12-02 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394760 )

Change subject: Rename Stats to ThresholdLookup and make it a service
..

Rename Stats to ThresholdLookup and make it a service

The only public method in this class is getThresholds

Bug: T181892
Change-Id: I03b9c654deb90b0a1f0bc87d33aa5dfd4f797745
---
M extension.json
M includes/Hooks.php
M includes/Hooks/ChangesListHooksHandler.php
M includes/ServiceWiring.php
R includes/ThresholdLookup.php
M maintenance/DumpThresholds.php
M tests/phpunit/includes/ServiceWiringTest.php
R tests/phpunit/includes/ThresholdLookupTest.php
8 files changed, 29 insertions(+), 27 deletions(-)


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

diff --git a/extension.json b/extension.json
index df8881e..0310457 100644
--- a/extension.json
+++ b/extension.json
@@ -19,7 +19,7 @@
"ORES\\FetchScoreJob": "includes/FetchScoreJob.php",
"ORES\\Range": "includes/Range.php",
"ORES\\Scoring": "includes/Scoring.php",
-   "ORES\\Stats": "includes/Stats.php",
+   "ORES\\ThresholdLookup": "includes/ThresholdLookup.php",
"ORES\\Storage\\ModelLookup": 
"includes/Storage/ModelLookup.php",
"ORES\\Storage\\SqlModelLookup": 
"includes/Storage/SqlModelLookup.php",
"ORES\\ApiQueryORES": "includes/ApiQueryORES.php",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index e0a743c..cdb8c59 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -22,6 +22,7 @@
 use JobQueueGroup;
 use IContextSource;
 use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
 use OutputPage;
 use RecentChange;
 use RequestContext;
@@ -189,7 +190,7 @@
}
 
public static function getDamagingThresholds() {
-   $stats = Stats::newFromGlobalState();
+   $stats = MediaWikiServices::getInstance()->getService( 
'ORESThresholdLookup' );
$thresholds = [];
foreach ( $stats->getThresholds( 'damaging' ) as $name => 
$bounds ) {
$thresholds[ $name ] = $bounds[ 'min' ];
diff --git a/includes/Hooks/ChangesListHooksHandler.php 
b/includes/Hooks/ChangesListHooksHandler.php
index f3bf99d..93c7d79 100644
--- a/includes/Hooks/ChangesListHooksHandler.php
+++ b/includes/Hooks/ChangesListHooksHandler.php
@@ -23,9 +23,9 @@
 use EnhancedChangesList;
 use FormOptions;
 use IContextSource;
+use MediaWiki\MediaWikiServices;
 use ORES\Hooks;
 use ORES\Range;
-use ORES\Stats;
 use RCCacheEntry;
 use RecentChange;
 use SpecialRecentChanges;
@@ -43,7 +43,7 @@
return;
}
 
-   $stats = Stats::newFromGlobalState();
+   $stats = MediaWikiServices::getInstance()->getService( 
'ORESThresholdLookup' );
 
$changeTypeGroup = $clsp->getFilterGroup( 'changeType' );
$logFilter = $changeTypeGroup->getFilter( 'hidelog' );
@@ -538,7 +538,7 @@
}
 
private static function buildRangeFilter( $name, $filterValue ) {
-   $stats = Stats::newFromGlobalState();
+   $stats = MediaWikiServices::getInstance()->getService( 
'ORESThresholdLookup' );
$thresholds = $stats->getThresholds( $name );
 
$selectedLevels = is_array( $filterValue ) ? $filterValue :
diff --git a/includes/ServiceWiring.php b/includes/ServiceWiring.php
index fc59bf0..458c902 100644
--- a/includes/ServiceWiring.php
+++ b/includes/ServiceWiring.php
@@ -16,6 +16,7 @@
 
 namespace ORES;
 
+use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
 use ORES\Storage\SqlModelLookup;
 
@@ -23,4 +24,13 @@
'ORESModelLookup' => function ( MediaWikiServices $services ) {
return new SqlModelLookup( $services->getDBLoadBalancer() );
},
+
+   'ORESThresholdLookup' => function ( MediaWikiServices $services ) {
+   return new ThresholdLookup(
+   Api::newFromContext(),
+   $services->getMainWANObjectCache(),
+   LoggerFactory::getInstance( 'ORES' )
+   );
+   }
+
 ];
diff --git a/includes/Stats.php b/includes/ThresholdLookup.php
similarity index 95%
rename from includes/Stats.php
rename to includes/ThresholdLookup.php
index 2b9922b..87a0603 100644
--- a/includes/Stats.php
+++ b/includes/ThresholdLookup.php
@@ -16,12 +16,11 @@
 
 namespace ORES;
 
-use MediaWiki\Logger\LoggerFactory;
 use MediaWiki\MediaWikiServices;
 use Psr\Log\LoggerInterface;
 use WANObjectCache;
 
-class Stats {
+class ThresholdLookup {
 
/**
 * @var Api
@@ -29,7 +28,7 @@
private $api;
 
/**
-* @var \WANObjectCache
+* @var WANObjectCache
 */
private $cache;
 
@@ -40,7 +39,7 @@
 
/**
 * @param Api 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: clean up old misc dump output files from cron jobs on dump h...

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

Change subject: clean up old misc dump output files from cron jobs on dump hosts
..


clean up old misc dump output files from cron jobs on dump hosts

This cleans up on both the hosts where the dumps are generated,
where we will keep fewer files, and on the hosts which serve them via nfs
or the web, where we will keep more.

Bug: T179942
Change-Id: Ie8e0a2a27a09009cf7be5184d8e32cab3579f8fc
---
M hieradata/hosts/dataset1001.yaml
A hieradata/hosts/dumpsdata1001.yaml
M hieradata/hosts/dumpsdata1002.yaml
M hieradata/hosts/labstore1006.yaml
M hieradata/hosts/ms1001.yaml
A modules/dumps/files/web/cleanups/cleanup_old_miscdumps.sh
A modules/dumps/manifests/web/cleanup.pp
A modules/dumps/manifests/web/cleanups/miscdumps.pp
M modules/dumps/manifests/web/cleanups/xml_cleanup.pp
M modules/dumps/manifests/web/xmldumps_active.pp
A modules/profile/manifests/dumps/web/cleanup.pp
M modules/profile/manifests/dumps/web/xmldumps_active.pp
M modules/role/manifests/dumps/generation/server/fallback.pp
M modules/role/manifests/dumps/generation/server/primary.pp
M modules/role/manifests/dumps/public/server.pp
M modules/role/manifests/dumps/web/xmldumps_active.pp
M modules/role/manifests/dumps/web/xmldumps_fallback.pp
17 files changed, 200 insertions(+), 11 deletions(-)

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



diff --git a/hieradata/hosts/dataset1001.yaml b/hieradata/hosts/dataset1001.yaml
index d32db3e..967f0c7 100644
--- a/hieradata/hosts/dataset1001.yaml
+++ b/hieradata/hosts/dataset1001.yaml
@@ -1,3 +1,6 @@
+profile::dumps::cleanup::isreplica: true
+profile::dumps::miscdumpsdir: '/data/xmldatadumps/public/other'
+
 profile::dumps::rsyncer:
   dumps_user: 'datasets'
   dumps_group: 'datasets'
diff --git a/hieradata/hosts/dumpsdata1001.yaml 
b/hieradata/hosts/dumpsdata1001.yaml
new file mode 100644
index 000..12f28b6
--- /dev/null
+++ b/hieradata/hosts/dumpsdata1001.yaml
@@ -0,0 +1,2 @@
+profile::dumps::miscdumpsdir: '/data/otherdumps'
+profile::dumps::cleanup::isreplica: false
diff --git a/hieradata/hosts/dumpsdata1002.yaml 
b/hieradata/hosts/dumpsdata1002.yaml
index 867c2a3..6cba27b 100644
--- a/hieradata/hosts/dumpsdata1002.yaml
+++ b/hieradata/hosts/dumpsdata1002.yaml
@@ -1,3 +1,10 @@
+profile::dumps::miscdumpsdir: '/data/otherdumps'
+
+# this is currently a dumps generation fallback host,
+# we configure cleanups of old files there the
+# same way we do the active generating host
+profile::dumps::cleanup::isreplica: false
+
 profile::dumps::rsyncer:
   dumps_user: 'dumpsgen'
   dumps_group: 'dumpsgen'
diff --git a/hieradata/hosts/labstore1006.yaml 
b/hieradata/hosts/labstore1006.yaml
index c74bbdb..549439b 100644
--- a/hieradata/hosts/labstore1006.yaml
+++ b/hieradata/hosts/labstore1006.yaml
@@ -1,3 +1,6 @@
+profile::dumps::miscdumpsdir: '/srv/dumps/xmldatadumps/public/other'
+profile::dumps::cleanup::isreplica: true
+
 profile::dumps::rsyncer:
   dumps_user: 'dumpsgen'
   dumps_group: 'dumpsgen'
diff --git a/hieradata/hosts/ms1001.yaml b/hieradata/hosts/ms1001.yaml
index 8d56948..1f7dd46 100644
--- a/hieradata/hosts/ms1001.yaml
+++ b/hieradata/hosts/ms1001.yaml
@@ -1,3 +1,6 @@
+profile::dumps::cleanup::isreplica: true
+profile::dumps::miscdumpsdir: '/data/xmldatadumps/public/other'
+
 profile::dumps::rsyncer:
   dumps_user: 'datasets'
   dumps_group: 'datasets'
diff --git a/modules/dumps/files/web/cleanups/cleanup_old_miscdumps.sh 
b/modules/dumps/files/web/cleanups/cleanup_old_miscdumps.sh
new file mode 100644
index 000..54bf80c
--- /dev/null
+++ b/modules/dumps/files/web/cleanups/cleanup_old_miscdumps.sh
@@ -0,0 +1,101 @@
+#!/bin/bash
+
+##
+# This file is managed by puppet!
+# puppet:///modules/dumps/web/cleanup_old_miscdumps.sh
+##
+
+# This script removes old files produced by misc dump
+# cron jobs, on hosts where they are rsynced over from
+# the generating host.
+
+# We clean them up here rather than rsync --delete,
+# because we keep and serve more of these on web
+# and other servers than on the generating host.
+
+usage() {
+cat<
+
+  --miscdumpsdir  path to root of misc dumps tree
+  --configfilepath to config file describing dirs and cleanup info
+  --dryrundon't remove anything, print what would be done
+
+Example:  $0 --miscdumpsdir /data/xmldatadumps/other --configfile 
/etc/dumps/confs/cleanup_misc.conf
+EOF
+exit 1
+}
+
+miscdumpsdir=""
+configfile=""
+dryrun=""
+
+while [ $# -gt 0 ]; do
+if [ $1 == "--miscdumpsdir" ]; then
+miscdumpsdir="$2"
+shift; shift
+elif [ $1 == "--configfile" ]; then
+configfile="$2"
+shift; shift
+elif [ $1 == "--dryrun" ]; then
+   dryrun="yes"
+shift
+else
+echo "$0: Unknown option $1" >& 2
+usage
+fi
+done
+

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix double escaping for 'userlogin-createanother', 'userlogi...

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

Change subject: Fix double escaping for 'userlogin-createanother', 
'userlogin-joinproject'
..


Fix double escaping for 'userlogin-createanother', 'userlogin-joinproject'

Change-Id: I6773420cf656e0bf47897198251e43917e1d57c6
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 04d391b..963840b 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -1182,7 +1182,7 @@
],
$this->msg(

$loggedIn ? 'userlogin-createanother' : 'userlogin-joinproject'
-   )->escaped()
+   )->text()
)
);
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6773420cf656e0bf47897198251e43917e1d57c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Use enwiki models on simplewiki.

2017-12-02 Thread Halfak (Code Review)
Halfak has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394759 )

Change subject: Use enwiki models on simplewiki.
..

Use enwiki models on simplewiki.

Change-Id: I4f0b63d99a2f9f48b2906faa0ee00963a92be69b
---
M config/00-main.yaml
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/config/00-main.yaml b/config/00-main.yaml
index b921968..2f23569 100644
--- a/config/00-main.yaml
+++ b/config/00-main.yaml
@@ -63,6 +63,7 @@
   - ptwiki
   - rowiki
   - ruwiki
+  - simplewiki
   - sqwiki
   - svwiki
   - testwiki
@@ -318,6 +319,18 @@
 "on": ["edit"]
   goodfaith:
 "on": ["edit"]
+  simplewiki:
+extractor: simplewiki_api
+scorer_models:
+  wp10: enwiki_wp10
+  draftquality: enwiki_draftquality
+  damaging: enwiki_damaging
+  goodfaith: enwiki_goodfaith
+precache:
+  damaging:
+"on": ["edit"]
+  goodfaith:
+"on": ["edit"]
   sqwiki:
 extractor: sqwiki_api
 scorer_models:

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Wikidata weekly json and rdf dumps disabled temporarily

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

Change subject: Wikidata weekly json and rdf dumps disabled temporarily
..


Wikidata weekly json and rdf dumps disabled temporarily

The addition of statsd metric support on retrieval of
revisions means that these jobs eventually run out of memory.

Bug: T181385
Change-Id: Ic70089348b0f491bab4b9602fd6d7a0052473cf7
---
M modules/snapshot/manifests/cron/wikidatadumps.pp
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Hoo man: Looks good to me, but someone else must approve
  ArielGlenn: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/snapshot/manifests/cron/wikidatadumps.pp 
b/modules/snapshot/manifests/cron/wikidatadumps.pp
index be1609b..5dc9082 100644
--- a/modules/snapshot/manifests/cron/wikidatadumps.pp
+++ b/modules/snapshot/manifests/cron/wikidatadumps.pp
@@ -6,6 +6,7 @@
 user  => $user,
 group => $group,
 }
-class { '::snapshot::cron::wikidatadumps::json': user   => $user }
-class { '::snapshot::cron::wikidatadumps::rdf': user   => $user }
+# disable pending bug fix, see T181385
+# class { '::snapshot::cron::wikidatadumps::json': user   => $user }
+# class { '::snapshot::cron::wikidatadumps::rdf': user   => $user }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic70089348b0f491bab4b9602fd6d7a0052473cf7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Wikidata weekly json and rdf dumps disabled temporarily

2017-12-02 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394758 )

Change subject: Wikidata weekly json and rdf dumps disabled temporarily
..

Wikidata weekly json and rdf dumps disabled temporarily

The addition of statsd metric support on retrieval of
revisions means that these jobs eventually run out of memory.

Bug: T181385
Change-Id: Ic70089348b0f491bab4b9602fd6d7a0052473cf7
---
M modules/snapshot/manifests/cron/wikidatadumps.pp
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/58/394758/1

diff --git a/modules/snapshot/manifests/cron/wikidatadumps.pp 
b/modules/snapshot/manifests/cron/wikidatadumps.pp
index be1609b..5dc9082 100644
--- a/modules/snapshot/manifests/cron/wikidatadumps.pp
+++ b/modules/snapshot/manifests/cron/wikidatadumps.pp
@@ -6,6 +6,7 @@
 user  => $user,
 group => $group,
 }
-class { '::snapshot::cron::wikidatadumps::json': user   => $user }
-class { '::snapshot::cron::wikidatadumps::rdf': user   => $user }
+# disable pending bug fix, see T181385
+# class { '::snapshot::cron::wikidatadumps::json': user   => $user }
+# class { '::snapshot::cron::wikidatadumps::rdf': user   => $user }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix double escaping for 'userlogin-createanother', 'userlogi...

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

Change subject: Fix double escaping for 'userlogin-createanother', 
'userlogin-joinproject'
..

Fix double escaping for 'userlogin-createanother', 'userlogin-joinproject'

Change-Id: I6773420cf656e0bf47897198251e43917e1d57c6
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/56/394756/1

diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 04d391b..963840b 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -1182,7 +1182,7 @@
],
$this->msg(

$loggedIn ? 'userlogin-createanother' : 'userlogin-joinproject'
-   )->escaped()
+   )->text()
)
);
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6773420cf656e0bf47897198251e43917e1d57c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add arvtag parameter to list=allrevisions API queries.

2017-12-02 Thread Pppery (Code Review)
Pppery has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394757 )

Change subject: Add arvtag parameter to list=allrevisions API queries.
..

Add arvtag parameter to list=allrevisions API queries.

Which makes it possible to filter for revisions having a certain tag using the 
API

Bug: T172956
Change-Id: I763f9618790e2408a4dd56201f0f67d3f09237bc
---
M includes/api/ApiQueryAllRevisions.php
M includes/api/i18n/en.json
M includes/api/i18n/qqq.json
3 files changed, 11 insertions(+), 0 deletions(-)


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

diff --git a/includes/api/ApiQueryAllRevisions.php 
b/includes/api/ApiQueryAllRevisions.php
index c8db6a1..5c4d028 100644
--- a/includes/api/ApiQueryAllRevisions.php
+++ b/includes/api/ApiQueryAllRevisions.php
@@ -105,6 +105,14 @@
$this->addFields( 'ts_tags' );
}
 
+   if ( !is_null( $params['tag'] ) ) {
+   $this->addTables( 'change_tag' );
+   $this->addJoinConds(
+   [ 'change_tag' => [ 'INNER JOIN', [ 
'rev_id=ct_rev_id' ] ] ]
+   );
+   $this->addWhereFld( 'ct_tag', $params['tag'] );
+   }
+
if ( $params['user'] !== null ) {
$id = User::idFromName( $params['user'] );
if ( $id ) {
@@ -254,6 +262,7 @@
'excludeuser' => [
ApiBase::PARAM_TYPE => 'user',
],
+   'tag' => null,
'continue' => [
ApiBase::PARAM_HELP_MSG => 
'api-help-param-continue',
],
diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 91c3e18..3d650cd 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -581,6 +581,7 @@
"apihelp-query+allrevisions-summary": "List all revisions.",
"apihelp-query+allrevisions-param-start": "The timestamp to start 
enumerating from.",
"apihelp-query+allrevisions-param-end": "The timestamp to stop 
enumerating at.",
+   "apihelp-query+allrevisions-param-tag": "Only list revisions tagged 
with this tag.",
"apihelp-query+allrevisions-param-user": "Only list revisions by this 
user.",
"apihelp-query+allrevisions-param-excludeuser": "Don't list revisions 
by this user.",
"apihelp-query+allrevisions-param-namespace": "Only list pages in this 
namespace.",
diff --git a/includes/api/i18n/qqq.json b/includes/api/i18n/qqq.json
index 47afdc1..c6fe4b8 100644
--- a/includes/api/i18n/qqq.json
+++ b/includes/api/i18n/qqq.json
@@ -548,6 +548,7 @@
"apihelp-query+allrevisions-summary": 
"{{doc-apihelp-summary|query+allrevisions}}",
"apihelp-query+allrevisions-param-start": 
"{{doc-apihelp-param|query+allrevisions|start}}",
"apihelp-query+allrevisions-param-end": 
"{{doc-apihelp-param|query+allrevisions|end}}",
+   "apihelp-query+allrevisions-param-tag": 
"{{doc-apihelp-param|query+allrevisions|tag}}",
"apihelp-query+allrevisions-param-user": 
"{{doc-apihelp-param|query+allrevisions|user}}",
"apihelp-query+allrevisions-param-excludeuser": 
"{{doc-apihelp-param|query+allrevisions|excludeuser}}",
"apihelp-query+allrevisions-param-namespace": 
"{{doc-apihelp-param|query+allrevisions|namespace}}",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DisplayTitle[master]: Handle integers passed as link text

2017-12-02 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394755 )

Change subject: Handle integers passed as link text
..

Handle integers passed as link text

This issue occurs on the Special:Log page when viewing the patrol
log in MW 1.30+.

Bug: T181669
Change-Id: I997224257dc62284469168c9752f72367d0496e1
---
M includes/DisplayTitleHooks.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DisplayTitle 
refs/changes/55/394755/1

diff --git a/includes/DisplayTitleHooks.php b/includes/DisplayTitleHooks.php
index c03add4..b790a07 100644
--- a/includes/DisplayTitleHooks.php
+++ b/includes/DisplayTitleHooks.php
@@ -115,10 +115,12 @@
$text = null;
if ( is_string( $html ) ) {
$text = $html;
-   } elseif ( get_class( $html ) == 'HtmlArmor' ) {
+   } elseif ( is_integer( $html ) ) {
+   $text = (string)$html;
+   } elseif ( is_object( $html ) && get_class( $html ) == 
'HtmlArmor' ) {
$text = HtmlArmor::getHtml( $html );
}
-   if ( $text !== null ) {
+   if ( !is_null( $text ) ) {
$title = Title::newFromText( $text );
if ( !is_null( $title ) ) {
if ( $target->getSubjectNsText() === '' 
) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I997224257dc62284469168c9752f72367d0496e1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DisplayTitle
Gerrit-Branch: master
Gerrit-Owner: Cicalese 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: PageFragment : Bottom actions height should adjust when snac...

2017-12-02 Thread Yashasvi (Code Review)
Yashasvi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394754 )

Change subject: PageFragment : Bottom actions height should adjust when 
snackbar is shown
..

PageFragment : Bottom actions height should adjust when snackbar is shown

Bug: T146091
Change-Id: Id979d951edab8336ab37a6d7acd14ded52e8d5d6
---
M app/src/main/res/layout/fragment_page.xml
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/app/src/main/res/layout/fragment_page.xml 
b/app/src/main/res/layout/fragment_page.xml
index 0254f4c..f4242d3 100644
--- a/app/src/main/res/layout/fragment_page.xml
+++ b/app/src/main/res/layout/fragment_page.xml
@@ -57,6 +57,7 @@
 android:layout_height="wrap_content"
 android:layout_gravity="bottom"
 app:tabGravity="fill"
+
app:layout_behavior="org.wikipedia.random.BottomViewBehavior"
 android:background="@color/base18"
 app:tabSelectedTextColor="@color/base18"
 app:tabIndicatorColor="@color/base18" />

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Changes to be committed: modified: maintenance/refreshLi...

2017-12-02 Thread Lengyue (Code Review)
Lengyue has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394753 )

Change subject:  Changes to be committed:   modified:   
maintenance/refreshLinks.php
..

Changes to be committed:
modified:   maintenance/refreshLinks.php

Change-Id: I4e2ca6b14f4826f484c7da8ea746738026e91bb1
---
M maintenance/refreshLinks.php
1 file changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/53/394753/1

diff --git a/maintenance/refreshLinks.php b/maintenance/refreshLinks.php
index 4fab146..5035389 100644
--- a/maintenance/refreshLinks.php
+++ b/maintenance/refreshLinks.php
@@ -139,7 +139,7 @@
foreach ( $res as $row ) {
if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
$this->output( "$i\n" );
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
$this->fixRedirect( $row->page_id );
}
@@ -160,7 +160,7 @@
foreach ( $res as $row ) {
if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
$this->output( "$i\n" );
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
if ( $redirectsOnly ) {
$this->fixRedirect( $row->page_id );
@@ -180,7 +180,7 @@
for ( $id = $start; $id <= $end; $id++ ) {
if ( !( $id % self::REPORTING_INTERVAL ) ) {
$this->output( "$id\n" );
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
$this->fixRedirect( $id );
}
@@ -192,7 +192,7 @@
for ( $id = $start; $id <= $end; $id++ ) {
if ( !( $id % self::REPORTING_INTERVAL 
) ) {
$this->output( "$id\n" );
-   wfWaitForSlaves();
+   
wfGetLBFactory()->waitForReplication();
}
self::fixLinksFromArticle( $id, 
$this->namespace );
}
@@ -294,7 +294,7 @@
private function deleteLinksFromNonexistent( $start = null, $end = 
null, $batchSize = 100,
$chunkSize = 10
) {
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
$this->output( "Deleting illegal entries from the links 
tables...\n" );
$dbr = $this->getDB( DB_REPLICA, [ 'vslow' ] );
do {
@@ -374,7 +374,7 @@
$dbw->delete( $table, [ $field => $ids 
], __METHOD__ );
$this->output( ", $counter" );
$tableStart = $ids[$numIds - 1] + 1;
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
 
} while ( $numIds >= $batchSize && ( $end === null || 
$tableStart <= $end ) );
@@ -463,7 +463,7 @@
foreach ( $res as $row ) {
if ( !( ++$i % self::REPORTING_INTERVAL ) ) {
$this->output( "$i\n" );
-   wfWaitForSlaves();
+   wfGetLBFactory()->waitForReplication();
}
$lastId = $row->page_id;
$timestamp = $row->cl_timestamp;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e2ca6b14f4826f484c7da8ea746738026e91bb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Lengyue <736917...@qq.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Improve some parameter docs

2017-12-02 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394752 )

Change subject: Improve some parameter docs
..

Improve some parameter docs

Depends-On: Icc8c9c934758c8d7101f93762288ba894f1cf015
Change-Id: I4d9c3495f3620d3c19fdde12ffd5ef7fd2604fbc
---
M .phpcs.xml
M includes/PF_AutoeditAPI.php
M includes/PF_FormEditAction.php
M includes/PF_FormField.php
M includes/PF_FormLinker.php
M includes/PF_FormPrinter.php
M includes/PF_FormUtils.php
M includes/PF_HelperFormAction.php
M includes/PF_Hooks.php
M includes/PF_PageSchemas.php
M includes/PF_ParserFunctions.php
M includes/PF_Template.php
M includes/PF_TemplateField.php
M includes/PF_TemplateInForm.php
M includes/PF_Utils.php
M includes/PF_ValuesUtils.php
M includes/forminputs/PF_CheckboxInput.php
M includes/forminputs/PF_CheckboxesInput.php
M includes/forminputs/PF_ComboBoxInput.php
M includes/forminputs/PF_DateInput.php
M includes/forminputs/PF_DatePickerInput.php
M includes/forminputs/PF_DateTimeInput.php
M includes/forminputs/PF_DateTimePicker.php
M includes/forminputs/PF_DropdownInput.php
M includes/forminputs/PF_FormInput.php
M includes/forminputs/PF_GoogleMapsInput.php
M includes/forminputs/PF_LeafletInput.php
M includes/forminputs/PF_ListBoxInput.php
M includes/forminputs/PF_OpenLayersInput.php
M includes/forminputs/PF_RadioButtonInput.php
M includes/forminputs/PF_RatingInput.php
M includes/forminputs/PF_RegExpInput.php
M includes/forminputs/PF_TextAreaInput.php
M includes/forminputs/PF_TextInput.php
M includes/forminputs/PF_TextWithAutocompleteInput.php
M includes/forminputs/PF_TimePickerInput.php
M includes/forminputs/PF_TokensInput.php
M includes/forminputs/PF_Tree.php
M includes/forminputs/PF_TreeInput.php
M includes/forminputs/PF_YearInput.php
M specials/PF_CreateForm.php
M specials/PF_FormStart.php
M specials/PF_UploadWindow.php
43 files changed, 312 insertions(+), 36 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PageForms 
refs/changes/52/394752/1

diff --git a/.phpcs.xml b/.phpcs.xml
index 30dc330..e31acfc 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -15,10 +15,7 @@



-   
-   

-   



diff --git a/includes/PF_AutoeditAPI.php b/includes/PF_AutoeditAPI.php
index 2f87012..d504fda 100644
--- a/includes/PF_AutoeditAPI.php
+++ b/includes/PF_AutoeditAPI.php
@@ -55,6 +55,7 @@
 
/**
 * Returns the options array
+* @return array
 */
function getOptions() {
return $this->mOptions;
@@ -74,6 +75,7 @@
 
/**
 * Sets the options array
+* @param array $options
 */
function setOptions( $options ) {
$this->mOptions = $options;
@@ -81,6 +83,8 @@
 
/**
 * Sets an option in the options array
+* @param string $option
+* @param mixed $value
 */
function setOption( $option, $value ) {
$this->mOptions[$option] = $value;
@@ -727,6 +731,8 @@
 
/**
 * Helper function..
+* @param Title $title
+* @return string
 */
function getTextForPage( $title ) {
$wikiPage = WikiPage::factory( $title );
@@ -1076,11 +1082,11 @@
/**
 * This function recursively inserts the value into a tree.
 *
-* @param $array is root
-* @param $key identifies path to position in tree.
+* @param array &$array is root
+* @param string $key identifies path to position in tree.
 *Format: 1stLevelName[2ndLevel][3rdLevel][...], i.e. normal array 
notation
-* @param $value: the value to insert
-* @param $toplevel: if this is a toplevel value.
+* @param mixed $value the value to insert
+* @param bool $toplevel if this is a toplevel value.
 */
public static function addToArray( &$array, $key, $value, $toplevel = 
true ) {
$matches = [];
diff --git a/includes/PF_FormEditAction.php b/includes/PF_FormEditAction.php
index f5a2968..f66d817 100644
--- a/includes/PF_FormEditAction.php
+++ b/includes/PF_FormEditAction.php
@@ -26,6 +26,7 @@
 * output.  Do not use globals $wgOut, $wgRequest, etc, in 
implementations; use
 * $this->getOutput(), etc.
 * @throws ErrorPageError
+* @return false
 */
public function show() {
return self::displayForm( $this, $this->page );
@@ -33,7 +34,7 @@
 
/**
 * Execute the action in a silent fashion: do not display anything or 
release any errors.
-* @return Bool whether execution was successful
+* @return bool whether execution was successful
 */
public function execute() {
return true;
@@ -42,6 +43,9 @@
/**
 * Adds an 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Change to use assertRaisesRegex in file_tests.py

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

Change subject: Change to use assertRaisesRegex in file_tests.py
..


Change to use assertRaisesRegex in file_tests.py

assertRaises is not as good of a test as asserRaisesRegex. The latter
has an extra parameter to match the exception message, allowing more
more precision when checking an error.

Bug: T154281
Change-Id: I8a30b49dd6506e0e0f0d0c7cf7affcabc20bfa75
---
M tests/file_tests.py
1 file changed, 36 insertions(+), 7 deletions(-)

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



diff --git a/tests/file_tests.py b/tests/file_tests.py
index 324f2c1..f4f8584 100644
--- a/tests/file_tests.py
+++ b/tests/file_tests.py
@@ -8,6 +8,7 @@
 from __future__ import absolute_import, unicode_literals
 
 import os
+import re
 
 import pywikibot
 
@@ -73,7 +74,10 @@
 self.assertTrue(commons_file.get_file_url())
 
 self.assertIn('/wikipedia/commons/', itwp_file.get_file_url())
-self.assertRaises(pywikibot.NoPage, itwp_file.get)
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+(r'Page \[\[(wikipedia:|)it:%s\]\] doesn\'t exist.' % title)):
+itwp_file.get()
 
 def testLocalOnly(self):
 """Test fileIsShared() on file page with local file only."""
@@ -93,10 +97,23 @@
 self.assertFalse(commons_file.exists())
 
 self.assertFalse(enwp_file.fileIsShared())
-self.assertRaises(pywikibot.NoPage, commons_file.fileIsShared)
 
-self.assertRaises(pywikibot.NoPage, commons_file.get_file_url)
-self.assertRaises(pywikibot.NoPage, commons_file.get)
+page_doesnt_exist_exc_regex = re.escape(
+'Page [[commons:%s]] doesn\'t exist.' % title)
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+page_doesnt_exist_exc_regex):
+commons_file.fileIsShared()
+
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+page_doesnt_exist_exc_regex):
+commons_file.get_file_url()
+
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+page_doesnt_exist_exc_regex):
+commons_file.get()
 
 def testOnBoth(self):
 """Test fileIsShared() on file page with both local and shared file."""
@@ -155,7 +172,11 @@
 site = self.get_site()
 image = pywikibot.FilePage(site, u'File:NoPage')
 self.assertFalse(image.exists())
-with self.assertRaises(pywikibot.NoPage):
+
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+(r'Page \[\[(wikipedia\:|)test:File:NoPage\]\] '
+ r'doesn\'t exist\.')):
 image = image.latest_file_info
 
 def test_file_info_with_no_file(self):
@@ -163,7 +184,11 @@
 site = self.get_site()
 image = pywikibot.FilePage(site, u'File:Test with no image')
 self.assertTrue(image.exists())
-with self.assertRaises(pywikibot.PageRelatedError):
+with self.assertRaisesRegex(
+pywikibot.PageRelatedError,
+(r'loadimageinfo: Query on '
+ r'\[\[(wikipedia\:|)test:File:Test with no image\]\]'
+ r' returned no imageinfo')):
 image = image.latest_file_info
 
 
@@ -278,7 +303,11 @@
 """Test not existing download."""
 page = pywikibot.FilePage(self.site, 'File:Albert 
Einstein.jpg_notexisting')
 filename = join_images_path('Albert Einstein.jpg')
-with self.assertRaises(pywikibot.NoPage):
+
+with self.assertRaisesRegex(
+pywikibot.NoPage,
+re.escape('Page [[commons:File:Albert Einstein.jpg '
+  'notexisting]] doesn\'t exist.')):
 page.download(filename)
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a30b49dd6506e0e0f0d0c7cf7affcabc20bfa75
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Rafidaslam 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Rafidaslam 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add HtmlArmor to self links

2017-12-02 Thread Cicalese (Code Review)
Cicalese has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394749 )

Change subject: Add HtmlArmor to self links
..

Add HtmlArmor to self links

Change-Id: I8ab40eda041ebd915ad4dc991e720db6e126fe87
---
M includes/Linker.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/49/394749/1

diff --git a/includes/Linker.php b/includes/Linker.php
index a0332cf..b871722 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -189,6 +189,10 @@
return $ret;
}
 
+   if ( is_object( $html ) && get_class( $html ) == 'HtmlArmor' ) {
+   $html = HtmlArmor::getHtml( $html );
+   }
+
if ( $html == '' ) {
$html = htmlspecialchars( $nt->getPrefixedText() );
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: move last hiera calls out of snapshot modules into profile

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

Change subject: move last hiera calls out of snapshot modules into profile
..


move last hiera calls out of snapshot modules into profile

Change-Id: I19664ecd030a73d4ad1bd444ea29a8f0574fafc6
---
M modules/profile/manifests/dumps/generation/worker/dumper.pp
M modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
M modules/snapshot/manifests/dumps/cron.pp
3 files changed, 9 insertions(+), 3 deletions(-)

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



diff --git a/modules/profile/manifests/dumps/generation/worker/dumper.pp 
b/modules/profile/manifests/dumps/generation/worker/dumper.pp
index f06a75d..9c32c3f 100644
--- a/modules/profile/manifests/dumps/generation/worker/dumper.pp
+++ b/modules/profile/manifests/dumps/generation/worker/dumper.pp
@@ -1,9 +1,12 @@
 # this class is for snapshot hosts that run regular dumps
 # meaning sql/xml dumps every couple of weeks or so
 # and no other tasks
-class profile::dumps::generation::worker::dumper {
+class profile::dumps::generation::worker::dumper(
+$runtype = hiera('snapshot::dumps::runtype'),
+) {
 class { 'snapshot::dumps::cron':
 user=> 'dumpsgen',
 maxjobs => '28',
+runtype => $runtype,
 }
 }
diff --git a/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp 
b/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
index 039bf80..f429e7f 100644
--- a/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
+++ b/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
@@ -1,9 +1,12 @@
 # this class is for snapshot hosts that run regular dumps
 # meaning sql/xml dumps every couple of weeks or so
 # and also other jobs
-class profile::dumps::generation::worker::dumper_shared {
+class profile::dumps::generation::worker::dumper_shared(
+$runtype = hiera('snapshot::dumps::runtype'),
+) {
 class { 'snapshot::dumps::cron':
 user=> 'dumpsgen',
 maxjobs => '20',
+runtype => $runtype,
 }
 }
diff --git a/modules/snapshot/manifests/dumps/cron.pp 
b/modules/snapshot/manifests/dumps/cron.pp
index ed1fc02..3adb2b8 100644
--- a/modules/snapshot/manifests/dumps/cron.pp
+++ b/modules/snapshot/manifests/dumps/cron.pp
@@ -2,6 +2,7 @@
 $enable = true,
 $user   = undef,
 $maxjobs = undef,
+$runtype = undef,
 ) {
 if ($enable) {
 $ensure = 'present'
@@ -28,7 +29,6 @@
 
 # fixme there is an implicit dependency on
 # wikidump.conf.* plus some stage files, make explicit
-$runtype = hiera('snapshot::dumps::runtype', 'regular')
 
 cron { 'fulldumps_rest':
 ensure  => 'present',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19664ecd030a73d4ad1bd444ea29a8f0574fafc6
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: move one more setting out of snapshot hiera and into profiles

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

Change subject: move one more setting out of snapshot hiera and into profiles
..


move one more setting out of snapshot hiera and into profiles

Change-Id: I73b58ffbd149864b38d3550bb6fddbd0f7b8a679
---
M hieradata/hosts/snapshot1001.yaml
M hieradata/hosts/snapshot1005.yaml
M hieradata/hosts/snapshot1006.yaml
M hieradata/hosts/snapshot1007.yaml
M modules/profile/manifests/dumps/generation/worker/dumper.pp
A modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
M modules/role/manifests/dumps/generation/worker/dumper_misc.pp
R modules/snapshot/files/dumps/fulldumps.sh
M modules/snapshot/manifests/dumps/cron.pp
9 files changed, 29 insertions(+), 21 deletions(-)

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



diff --git a/hieradata/hosts/snapshot1001.yaml 
b/hieradata/hosts/snapshot1001.yaml
index 6e2a15c..d27cca6 100644
--- a/hieradata/hosts/snapshot1001.yaml
+++ b/hieradata/hosts/snapshot1001.yaml
@@ -1,2 +1 @@
 snapshot::dumps::runtype: regular
-snapshot::dumps::maxjobs: 6
diff --git a/hieradata/hosts/snapshot1005.yaml 
b/hieradata/hosts/snapshot1005.yaml
index 01f5dc3..c34955f 100644
--- a/hieradata/hosts/snapshot1005.yaml
+++ b/hieradata/hosts/snapshot1005.yaml
@@ -1,2 +1 @@
 snapshot::dumps::runtype: enwiki
-snapshot::dumps::maxjobs: 28
diff --git a/hieradata/hosts/snapshot1006.yaml 
b/hieradata/hosts/snapshot1006.yaml
index a0fdda5..ea234d3 100644
--- a/hieradata/hosts/snapshot1006.yaml
+++ b/hieradata/hosts/snapshot1006.yaml
@@ -1,2 +1 @@
 snapshot::dumps::runtype: wikidatawiki
-snapshot::dumps::maxjobs: 28
diff --git a/hieradata/hosts/snapshot1007.yaml 
b/hieradata/hosts/snapshot1007.yaml
index 947f240..d27cca6 100644
--- a/hieradata/hosts/snapshot1007.yaml
+++ b/hieradata/hosts/snapshot1007.yaml
@@ -1,2 +1 @@
 snapshot::dumps::runtype: regular
-snapshot::dumps::maxjobs: 20
diff --git a/modules/profile/manifests/dumps/generation/worker/dumper.pp 
b/modules/profile/manifests/dumps/generation/worker/dumper.pp
index a7f12db..f06a75d 100644
--- a/modules/profile/manifests/dumps/generation/worker/dumper.pp
+++ b/modules/profile/manifests/dumps/generation/worker/dumper.pp
@@ -1,5 +1,9 @@
 # this class is for snapshot hosts that run regular dumps
 # meaning sql/xml dumps every couple of weeks or so
+# and no other tasks
 class profile::dumps::generation::worker::dumper {
-class { 'snapshot::dumps::cron': user => 'dumpsgen' }
+class { 'snapshot::dumps::cron':
+user=> 'dumpsgen',
+maxjobs => '28',
+}
 }
diff --git a/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp 
b/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
new file mode 100644
index 000..039bf80
--- /dev/null
+++ b/modules/profile/manifests/dumps/generation/worker/dumper_shared.pp
@@ -0,0 +1,9 @@
+# this class is for snapshot hosts that run regular dumps
+# meaning sql/xml dumps every couple of weeks or so
+# and also other jobs
+class profile::dumps::generation::worker::dumper_shared {
+class { 'snapshot::dumps::cron':
+user=> 'dumpsgen',
+maxjobs => '20',
+}
+}
diff --git a/modules/role/manifests/dumps/generation/worker/dumper_misc.pp 
b/modules/role/manifests/dumps/generation/worker/dumper_misc.pp
index 01c9667..506bf98 100644
--- a/modules/role/manifests/dumps/generation/worker/dumper_misc.pp
+++ b/modules/role/manifests/dumps/generation/worker/dumper_misc.pp
@@ -3,7 +3,7 @@
 include ::profile::base::firewall
 
 include profile::dumps::generation::worker::common
-include profile::dumps::generation::worker::dumper
+include profile::dumps::generation::worker::dumper_shared
 include profile::dumps::generation::worker::cronrunner
 include profile::dumps::generation::worker::monitor
 
diff --git a/modules/snapshot/templates/dumps/fulldumps.sh.erb 
b/modules/snapshot/files/dumps/fulldumps.sh
similarity index 96%
rename from modules/snapshot/templates/dumps/fulldumps.sh.erb
rename to modules/snapshot/files/dumps/fulldumps.sh
index 03bcd5c..05abecd 100644
--- a/modules/snapshot/templates/dumps/fulldumps.sh.erb
+++ b/modules/snapshot/files/dumps/fulldumps.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 #
 # This file is maintained by puppet!
-# modules/snapshot/templates/dumps/fulldumps.sh.erb
+# modules/snapshot/dumps/fulldumps.sh
 #
 
 # This script is intended to be run out of cron, set to start
@@ -86,7 +86,7 @@
 fi
 }
 
-if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" ]; then
+if [ -z "$1" -o -z "$2" -o -z "$3" -o -z "$4" -o -z "$5" ]; then
 usage
 exit 1
 fi
@@ -97,11 +97,13 @@
 enddate="$2"
 wikitype="$3"
 dumptype="$4"
+maxjobs="$5"
+
 if [ "$wikitype" == 'none' ]; then
 # do nothing
 exit 0
 fi

[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Unify BetaFeatures SVG screenshot markup

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

Change subject: Unify BetaFeatures SVG screenshot markup
..


Unify BetaFeatures SVG screenshot markup

Unifying SVG markup by:
- removing unnecessary `standalone=no` attribute,
- changing `id`s for better readability,
- sorting attributes,
- using full pixel values where applicable and
- generalizing attributes on `g` where applicable.
Follow up Ib06437e5e621e251998033bba4b79e21552c54e1.

Bug: T180427
Change-Id: I4374686c216f39a0bf9d7e520545666c8227f1b9
---
M images/ORES-beta-features-ltr.svg
M images/ORES-beta-features-rtl.svg
2 files changed, 50 insertions(+), 62 deletions(-)

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



diff --git a/images/ORES-beta-features-ltr.svg 
b/images/ORES-beta-features-ltr.svg
index 0f666a8..70c8885 100644
--- a/images/ORES-beta-features-ltr.svg
+++ b/images/ORES-beta-features-ltr.svg
@@ -1,38 +1,32 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
-
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162">
+
 
-
+
 
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
 
-
-
-
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
 
 
diff --git a/images/ORES-beta-features-rtl.svg 
b/images/ORES-beta-features-rtl.svg
index b621556..1a3fdf1 100644
--- a/images/ORES-beta-features-rtl.svg
+++ b/images/ORES-beta-features-rtl.svg
@@ -1,38 +1,32 @@
-
-http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162" id="svg2">
-
+
+http://www.w3.org/2000/svg; 
xmlns:xlink="http://www.w3.org/1999/xlink; width="264" height="162" viewBox="0 
0 264 162">
+
 
-
+
 
 
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
 
-
-
-
+
+
+
+
+
+
+
+
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4374686c216f39a0bf9d7e520545666c8227f1b9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Ladsgroup 
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] operations/puppet[production]: gerritbot: bolden `merged` on Phabricator comments

2017-12-02 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394748 )

Change subject: gerritbot: bolden `merged` on Phabricator comments
..

gerritbot: bolden `merged` on Phabricator comments

Bug: T181886
Change-Id: I1263ba334374e033712493bfd494d0621d4ccc12
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/394748/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1263ba334374e033712493bfd494d0621d4ccc12
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: proofreadpage_tests: fix TestProofreadPageIndexProperty

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

Change subject: proofreadpage_tests: fix TestProofreadPageIndexProperty
..


proofreadpage_tests: fix TestProofreadPageIndexProperty

Fix en.wikisource.org test page names.

Bug: T181863
Change-Id: I00e8a94d9337458469e6c44efb777c32844b49c0
---
M tests/proofreadpage_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py
index 461b550..2f8492f 100644
--- a/tests/proofreadpage_tests.py
+++ b/tests/proofreadpage_tests.py
@@ -331,8 +331,8 @@
 }
 
 existing_multilinked = {
-'title': 'Page:Pywikibot test page 1/1',
-'index_1': 'Index:Pywikibot test page 1',
+'title': 'Page:Pywikibot test page.djvu/1',
+'index_1': 'Index:Pywikibot test page.djvu',
 'index_2': 'Index:Pywikibot test page 2',
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I00e8a94d9337458469e6c44efb777c32844b49c0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...ShortUrl[master]: Update maintenance scipts to use $this->requireExtension()

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

Change subject: Update maintenance scipts to use $this->requireExtension()
..


Update maintenance scipts to use $this->requireExtension()

Bug: T152139
Change-Id: I2a905467d966067c19ef28b38d993b8aa02be487
---
M populateShortUrlTable.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/populateShortUrlTable.php b/populateShortUrlTable.php
index 22f62e1..dce6710 100644
--- a/populateShortUrlTable.php
+++ b/populateShortUrlTable.php
@@ -10,6 +10,7 @@
public function __construct() {
parent::__construct();
$this->mDescription = 'Populates ShortUrls Table with all 
existing articles';
+   $this->requireExtension( 'ShortUrl' );
}
 
private function insertRows( $a ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a905467d966067c19ef28b38d993b8aa02be487
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ShortUrl
Gerrit-Branch: master
Gerrit-Owner: 星耀晨曦 
Gerrit-Reviewer: Aklapper 
Gerrit-Reviewer: Legoktm 
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] pywikibot/core[master]: Add Korean value for lonelypages.py

2017-12-02 Thread Revi (Code Review)
Revi has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394747 )

Change subject: Add Korean value for lonelypages.py
..

Add Korean value for lonelypages.py

Change-Id: I8bff4a0c2293613ab167c2f239cb5f75a636c9e9
Signed-off-by: Yongmin Hong 
---
M scripts/lonelypages.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/47/394747/1

diff --git a/scripts/lonelypages.py b/scripts/lonelypages.py
index f9b75f0..ca9f9c2 100755
--- a/scripts/lonelypages.py
+++ b/scripts/lonelypages.py
@@ -95,6 +95,7 @@
 'en': ('Orphan', 'date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}', 
['wi']),
 'it': ('O', '||mese={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}', 
['a']),
 'ja': ('孤立', '{{subst:DATE}}'),
+'ko': ('외톨이', '{|안전풀기:}}}#timel:Y-m-d|now}}'),
 'zh': ('Orphan/auto', '', ['orphan'], True),
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: proofreadpage_tests: fix TestProofreadPageIndexProperty

2017-12-02 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394746 )

Change subject: proofreadpage_tests: fix TestProofreadPageIndexProperty
..

proofreadpage_tests: fix TestProofreadPageIndexProperty

Fix en.wikisource.org test page names.

Bug: T181863
Change-Id: I00e8a94d9337458469e6c44efb777c32844b49c0
---
M tests/proofreadpage_tests.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/46/394746/1

diff --git a/tests/proofreadpage_tests.py b/tests/proofreadpage_tests.py
index 461b550..2f8492f 100644
--- a/tests/proofreadpage_tests.py
+++ b/tests/proofreadpage_tests.py
@@ -331,8 +331,8 @@
 }
 
 existing_multilinked = {
-'title': 'Page:Pywikibot test page 1/1',
-'index_1': 'Index:Pywikibot test page 1',
+'title': 'Page:Pywikibot test page.djvu/1',
+'index_1': 'Index:Pywikibot test page.djvu',
 'index_2': 'Index:Pywikibot test page 2',
 }
 

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

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

___
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 (789451511)

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

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


Update VE core submodule to master (789451511)

New changes:
f91a80008 build: Bump Ruby cruft to avoid security warnings for old rubocop
c89c238dc Fix insertion annotations in source mode

Bug: T181726
Change-Id: I92dd60ec3adbe261ce4c47942150bff162b8149a
---
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 49b1821..7894515 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 49b1821234cd99a463a46337cf0ae0e000daea91
+Subproject commit 78945151120ad2db06185faa6e444d4a6341f13d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92dd60ec3adbe261ce4c47942150bff162b8149a
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] mediawiki...VisualEditor[master]: MWTable: Cleanup events and prevent fire after teardown

2017-12-02 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394745 )

Change subject: MWTable: Cleanup events and prevent fire after teardown
..

MWTable: Cleanup events and prevent fire after teardown

Bug: T181767
Change-Id: I9b86d810269f3e3e15ba4736d264dbf48c9a0fe3
---
M modules/ve-mw/ce/nodes/ve.ce.MWTableNode.js
1 file changed, 17 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve-mw/ce/nodes/ve.ce.MWTableNode.js 
b/modules/ve-mw/ce/nodes/ve.ce.MWTableNode.js
index db0e814..14f09c8 100644
--- a/modules/ve-mw/ce/nodes/ve.ce.MWTableNode.js
+++ b/modules/ve-mw/ce/nodes/ve.ce.MWTableNode.js
@@ -54,6 +54,18 @@
 
 ve.ce.MWTableNode.static.name = 'mwTable';
 
+/* Methods */
+
+/**
+ * @inheritdoc
+ */
+ve.ce.MWTableNode.prototype.destroy = function () {
+   this.model.getMatrix().disconnect( this );
+
+   // Parent method
+   ve.ce.MWTableNode.super.prototype.destroy.apply( this, arguments );
+};
+
 /**
  * Update sortable headers (if the table is sortable).
  *
@@ -64,6 +76,11 @@
view = this,
cellModels, cellViews;
 
+   if ( !this.model ) {
+   // Fired after teardown due to debounce
+   return;
+   }
+
this.$element.toggleClass( 'jquery-tablesorter', 
this.model.getAttribute( 'sortable' ) );
 
this.$sortableHeaders.removeClass( 'headerSort' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[REL1_29]: Fix typo in a variable

2017-12-02 Thread Addshore (Code Review)
Addshore has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/394744 )

Change subject: Fix typo in a variable
..


Fix typo in a variable

Bug: T179295
Change-Id: Ic512616fee18f1193525e075423078b22e17ec32
(cherry picked from commit 73e5f9bf66b297bbba3f0099e91bf230d45bf470)
---
M repo/Wikibase.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 7c142d9..22f68af 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -829,7 +829,7 @@
);
};
$wgSpecialPages['SetSiteLink'] = function() {
-   $wlikibaseRepo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
$siteLookup = $wikibaseRepo->getSiteLookup();
$settings = $wikibaseRepo->getSettings();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic512616fee18f1193525e075423078b22e17ec32
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: REL1_29
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Matěj Suchánek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[REL1_29]: Fix typo in a variable

2017-12-02 Thread Addshore (Code Review)
Addshore has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394744 )

Change subject: Fix typo in a variable
..

Fix typo in a variable

Change-Id: Ic512616fee18f1193525e075423078b22e17ec32
(cherry picked from commit 73e5f9bf66b297bbba3f0099e91bf230d45bf470)
---
M repo/Wikibase.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/Wikibase.php b/repo/Wikibase.php
index 7c142d9..22f68af 100644
--- a/repo/Wikibase.php
+++ b/repo/Wikibase.php
@@ -829,7 +829,7 @@
);
};
$wgSpecialPages['SetSiteLink'] = function() {
-   $wlikibaseRepo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
+   $wikibaseRepo = 
Wikibase\Repo\WikibaseRepo::getDefaultInstance();
$siteLookup = $wikibaseRepo->getSiteLookup();
$settings = $wikibaseRepo->getSettings();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic512616fee18f1193525e075423078b22e17ec32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: REL1_29
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Matěj Suchánek 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update families files

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

Change subject: Update families files
..


Update families files

Change-Id: Ie39272a71ef0ebd638d5e17be53584c04c6a17ce
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
4 files changed, 29 insertions(+), 30 deletions(-)

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



diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index d716c24..43788bc 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -42,7 +42,7 @@
 'sv', 'da', 'hr', 'sr', 'tr', 'ko', 'ar', 'no', 'gl', 'ba', 'ro',
 'ta', 'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'sk', 'tt',
 'eo', 'el', 'bg', 'bn', 'li', 'hy', 'si', 'ms', 'sl', 'ur', 'la',
-'ml', 'km', 'et', 'ia', 'cv', 'mr', 'eu', 'kk', 'oc', 'be', 'pa',
+'ml', 'km', 'ia', 'et', 'cv', 'mr', 'eu', 'kk', 'oc', 'be', 'pa',
 'ne', 'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy',
 ]
 
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 93a7124..4768a12 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -41,31 +41,30 @@
 'hu', 'id', 'ko', 'cs', 'ro', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
 'hy', 'da', 'zh-min-nan', 'sk', 'min', 'kk', 'he', 'lt', 'hr',
 'et', 'ce', 'sl', 'be', 'gl', 'el', 'nn', 'simple', 'uz', 'az',
-'la', 'ur', 'hi', 'vo', 'th', 'ka', 'ta', 'cy', 'mk', 'tg', 'tl',
-'mg', 'oc', 'ky', 'lv', 'bs', 'tt', 'new', 'sq', 'te', 'pms', 'br',
-'zh-yue', 'be-tarask', 'bn', 'ast', 'ml', 'ht', 'lb', 'jv', 'mr',
-'azb', 'af', 'sco', 'pnb', 'ga', 'is', 'cv', 'ba', 'fy', 'su',
-'sw', 'my', 'lmo', 'an', 'yo', 'ne', 'gu', 'io', 'pa', 'nds',
-'scn', 'bpy', 'bar', 'als', 'ku', 'kn', 'ia', 'qu', 'ckb', 'mn',
-'arz', 'bat-smg', 'wa', 'gd', 'nap', 'yi', 'si', 'bug', 'am',
-'cdo', 'or', 'map-bms', 'fo', 'mzn', 'hsb', 'xmf', 'li', 'mai',
-'sah', 'sa', 'vec', 'ilo', 'os', 'mrj', 'hif', 'mhr', 'bh', 'eml',
-'roa-tara', 'ps', 'diq', 'pam', 'sd', 'hak', 'nso', 'se', 'bcl',
-'ace', 'zh-classical', 'mi', 'nah', 'nds-nl', 'szl', 'wuu', 'gan',
-'vls', 'rue', 'frr', 'km', 'bo', 'glk', 'vep', 'sc', 'fiu-vro',
-'crh', 'co', 'lrc', 'tk', 'kv', 'csb', 'so', 'gv', 'as', 'lad',
-'zea', 'myv', 'ay', 'udm', 'nv', 'lez', 'stq', 'kw', 'ie', 'nrm',
-'pcd', 'mwl', 'rm', 'koi', 'gom', 'ug', 'ab', 'lij', 'gn', 'mt',
-'fur', 'cbk-zam', 'dsb', 'dv', 'ang', 'sn', 'ln', 'ext', 'kab',
-'ksh', 'lo', 'gag', 'frp', 'pag', 'pi', 'olo', 'dty', 'av', 'xal',
-'pfl', 'bxr', 'haw', 'krc', 'kaa', 'pap', 'rw', 'pdc', 'bjn', 'to',
-'nov', 'kl', 'arc', 'jam', 'kbd', 'ha', 'tyv', 'tpi', 'tet', 'ig',
-'ki', 'na', 'lbe', 'roa-rup', 'jbo', 'ty', 'mdf', 'kg', 'za', 'wo',
-'lg', 'bi', 'srn', 'zu', 'chr', 'tcy', 'ltg', 'sm', 'om', 'xh',
-'tn', 'pih', 'cu', 'kbp', 'chy', 'rmy', 'tw', 'tum', 'ts', 'st',
-'got', 'rn', 'pnt', 'ss', 'bm', 'fj', 'ch', 'ady', 'iu', 'ny',
-'ee', 'ks', 'ak', 'atj', 'ik', 've', 'sg', 'dz', 'ff', 'ti', 'cr',
-'din',
+'la', 'ur', 'hi', 'vo', 'th', 'ka', 'ta', 'cy', 'tg', 'mk', 'tl',
+'mg', 'oc', 'lv', 'ky', 'bs', 'tt', 'new', 'sq', 'te', 'pms', 'br',
+'zh-yue', 'be-tarask', 'azb', 'bn', 'ast', 'ml', 'ht', 'lb', 'jv',
+'mr', 'af', 'sco', 'pnb', 'ga', 'is', 'cv', 'ba', 'fy', 'su', 'sw',
+'my', 'lmo', 'an', 'yo', 'ne', 'gu', 'pa', 'io', 'nds', 'scn',
+'bpy', 'bar', 'als', 'ku', 'kn', 'ia', 'qu', 'ckb', 'mn', 'arz',
+'bat-smg', 'wa', 'gd', 'nap', 'si', 'yi', 'bug', 'am', 'cdo', 'or',
+'map-bms', 'fo', 'mzn', 'hsb', 'xmf', 'li', 'mai', 'sah', 'sa',
+'vec', 'ilo', 'os', 'mrj', 'hif', 'mhr', 'bh', 'eml', 'roa-tara',
+'ps', 'diq', 'pam', 'sd', 'hak', 'nso', 'se', 'bcl', 'ace',
+'zh-classical', 'mi', 'nah', 'nds-nl', 'szl', 'wuu', 'gan', 'vls',
+'rue', 'frr', 'km', 'bo', 'glk', 'vep', 'sc', 'fiu-vro', 'crh',
+'co', 'lrc', 'tk', 'kv', 'csb', 'so', 'gv', 'as', 'lad', 'myv',
+'zea', 'ay', 'udm', 'nv', 'lez', 'stq', 'kw', 'ie', 'nrm', 'pcd',
+'koi', 'mwl', 'rm', 'gom', 'ug', 'ab', 'lij', 'cbk-zam', 'gn',
+'mt', 'fur', 'dsb', 'dv', 'ang', 'sn', 'ln', 'ext', 'kab', 'ksh',
+'lo', 'frp', 'gag', 'pag', 'pi', 'dty', 'olo', 'av', 'xal', 'pfl',
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Redirect techblog.wikimedia.org to blog.wikimedia.org/c/tech...

2017-12-02 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394743 )

Change subject: Redirect techblog.wikimedia.org to 
blog.wikimedia.org/c/technology
..

Redirect techblog.wikimedia.org to blog.wikimedia.org/c/technology

Bug: T181878
Change-Id: Ic9732d4cc044e4e9a27833c517154a19ac635621
---
M modules/mediawiki/files/apache/sites/redirects/redirects.dat
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/394743/1

diff --git a/modules/mediawiki/files/apache/sites/redirects/redirects.dat 
b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
index 18bc26e..91b8413 100644
--- a/modules/mediawiki/files/apache/sites/redirects/redirects.dat
+++ b/modules/mediawiki/files/apache/sites/redirects/redirects.dat
@@ -433,8 +433,8 @@
 # T84277
 override   wikimedia.org/research  
https://wikimedia.qualtrics.com/SE/?SID=SV_6R04ammTX8uoJFP
 
-# Redirect old techblog.wikimedia.org urls to blog.wikimedia.org T90638
-rewritetechblog.wikimedia.org  //blog.wikimedia.org
+# Redirect old techblog.wikimedia.org urls to blog.wikimedia.org T90638 T181878
+rewritetechblog.wikimedia.org  //blog.wikimedia.org/c/technology/
 
 # dev.wikimedia.org - T372
 funnel dev.wikimedia.org   
//www.mediawiki.org/wiki/API:Data_and_developer_hub

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Update families files

2017-12-02 Thread Framawiki (Code Review)
Framawiki has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394742 )

Change subject: Update families files
..

Update families files

Change-Id: Ie39272a71ef0ebd638d5e17be53584c04c6a17ce
---
M pywikibot/families/wikibooks_family.py
M pywikibot/families/wikipedia_family.py
M pywikibot/families/wikiquote_family.py
M pywikibot/families/wikisource_family.py
4 files changed, 29 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/42/394742/1

diff --git a/pywikibot/families/wikibooks_family.py 
b/pywikibot/families/wikibooks_family.py
index d716c24..43788bc 100644
--- a/pywikibot/families/wikibooks_family.py
+++ b/pywikibot/families/wikibooks_family.py
@@ -42,7 +42,7 @@
 'sv', 'da', 'hr', 'sr', 'tr', 'ko', 'ar', 'no', 'gl', 'ba', 'ro',
 'ta', 'tl', 'mk', 'is', 'uk', 'sa', 'hi', 'ka', 'lt', 'sk', 'tt',
 'eo', 'el', 'bg', 'bn', 'li', 'hy', 'si', 'ms', 'sl', 'ur', 'la',
-'ml', 'km', 'et', 'ia', 'cv', 'mr', 'eu', 'kk', 'oc', 'be', 'pa',
+'ml', 'km', 'ia', 'et', 'cv', 'mr', 'eu', 'kk', 'oc', 'be', 'pa',
 'ne', 'fy', 'tg', 'te', 'af', 'ku', 'ky', 'bs', 'mg', 'cy',
 ]
 
diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 93a7124..4768a12 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -41,31 +41,30 @@
 'hu', 'id', 'ko', 'cs', 'ro', 'sr', 'ms', 'tr', 'eu', 'eo', 'bg',
 'hy', 'da', 'zh-min-nan', 'sk', 'min', 'kk', 'he', 'lt', 'hr',
 'et', 'ce', 'sl', 'be', 'gl', 'el', 'nn', 'simple', 'uz', 'az',
-'la', 'ur', 'hi', 'vo', 'th', 'ka', 'ta', 'cy', 'mk', 'tg', 'tl',
-'mg', 'oc', 'ky', 'lv', 'bs', 'tt', 'new', 'sq', 'te', 'pms', 'br',
-'zh-yue', 'be-tarask', 'bn', 'ast', 'ml', 'ht', 'lb', 'jv', 'mr',
-'azb', 'af', 'sco', 'pnb', 'ga', 'is', 'cv', 'ba', 'fy', 'su',
-'sw', 'my', 'lmo', 'an', 'yo', 'ne', 'gu', 'io', 'pa', 'nds',
-'scn', 'bpy', 'bar', 'als', 'ku', 'kn', 'ia', 'qu', 'ckb', 'mn',
-'arz', 'bat-smg', 'wa', 'gd', 'nap', 'yi', 'si', 'bug', 'am',
-'cdo', 'or', 'map-bms', 'fo', 'mzn', 'hsb', 'xmf', 'li', 'mai',
-'sah', 'sa', 'vec', 'ilo', 'os', 'mrj', 'hif', 'mhr', 'bh', 'eml',
-'roa-tara', 'ps', 'diq', 'pam', 'sd', 'hak', 'nso', 'se', 'bcl',
-'ace', 'zh-classical', 'mi', 'nah', 'nds-nl', 'szl', 'wuu', 'gan',
-'vls', 'rue', 'frr', 'km', 'bo', 'glk', 'vep', 'sc', 'fiu-vro',
-'crh', 'co', 'lrc', 'tk', 'kv', 'csb', 'so', 'gv', 'as', 'lad',
-'zea', 'myv', 'ay', 'udm', 'nv', 'lez', 'stq', 'kw', 'ie', 'nrm',
-'pcd', 'mwl', 'rm', 'koi', 'gom', 'ug', 'ab', 'lij', 'gn', 'mt',
-'fur', 'cbk-zam', 'dsb', 'dv', 'ang', 'sn', 'ln', 'ext', 'kab',
-'ksh', 'lo', 'gag', 'frp', 'pag', 'pi', 'olo', 'dty', 'av', 'xal',
-'pfl', 'bxr', 'haw', 'krc', 'kaa', 'pap', 'rw', 'pdc', 'bjn', 'to',
-'nov', 'kl', 'arc', 'jam', 'kbd', 'ha', 'tyv', 'tpi', 'tet', 'ig',
-'ki', 'na', 'lbe', 'roa-rup', 'jbo', 'ty', 'mdf', 'kg', 'za', 'wo',
-'lg', 'bi', 'srn', 'zu', 'chr', 'tcy', 'ltg', 'sm', 'om', 'xh',
-'tn', 'pih', 'cu', 'kbp', 'chy', 'rmy', 'tw', 'tum', 'ts', 'st',
-'got', 'rn', 'pnt', 'ss', 'bm', 'fj', 'ch', 'ady', 'iu', 'ny',
-'ee', 'ks', 'ak', 'atj', 'ik', 've', 'sg', 'dz', 'ff', 'ti', 'cr',
-'din',
+'la', 'ur', 'hi', 'vo', 'th', 'ka', 'ta', 'cy', 'tg', 'mk', 'tl',
+'mg', 'oc', 'lv', 'ky', 'bs', 'tt', 'new', 'sq', 'te', 'pms', 'br',
+'zh-yue', 'be-tarask', 'azb', 'bn', 'ast', 'ml', 'ht', 'lb', 'jv',
+'mr', 'af', 'sco', 'pnb', 'ga', 'is', 'cv', 'ba', 'fy', 'su', 'sw',
+'my', 'lmo', 'an', 'yo', 'ne', 'gu', 'pa', 'io', 'nds', 'scn',
+'bpy', 'bar', 'als', 'ku', 'kn', 'ia', 'qu', 'ckb', 'mn', 'arz',
+'bat-smg', 'wa', 'gd', 'nap', 'si', 'yi', 'bug', 'am', 'cdo', 'or',
+'map-bms', 'fo', 'mzn', 'hsb', 'xmf', 'li', 'mai', 'sah', 'sa',
+'vec', 'ilo', 'os', 'mrj', 'hif', 'mhr', 'bh', 'eml', 'roa-tara',
+'ps', 'diq', 'pam', 'sd', 'hak', 'nso', 'se', 'bcl', 'ace',
+'zh-classical', 'mi', 'nah', 'nds-nl', 'szl', 'wuu', 'gan', 'vls',
+'rue', 'frr', 'km', 'bo', 'glk', 'vep', 'sc', 'fiu-vro', 'crh',
+'co', 'lrc', 'tk', 'kv', 'csb', 'so', 'gv', 'as', 'lad', 'myv',
+'zea', 'ay', 'udm', 'nv', 'lez', 'stq', 'kw', 'ie', 'nrm', 'pcd',
+'koi', 'mwl', 'rm', 'gom', 'ug', 'ab', 'lij', 'cbk-zam', 'gn',
+'mt', 'fur', 'dsb', 'dv', 'ang', 'sn', 'ln', 'ext', 'kab', 'ksh',
+'lo', 'frp', 'gag', 'pag', 'pi', 'dty', 'olo', 'av', 'xal', 'pfl',
+ 

[MediaWiki-commits] [Gerrit] search/MjoLniR[master]: [WIP] Bad ideas for improved DBN performance

2017-12-02 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/394741 )

Change subject: [WIP] Bad ideas for improved DBN performance
..

[WIP] Bad ideas for improved DBN performance

I'm not sure this is a particularly great idea, but I wanted to explore
the performance limits of the JVM based DBN implementation. This brings
the original benchmark (90s in java, 3-4s in prior patch) to ~900ms. To
get a better idea on performance i increased the size of the benchmark:

* python: 616s
  - only ran once
* orig jvm: min: 21.7, max: 24.1 mean: 23.5s
  - 5 runs
  - 25x- 28x faster than python
* optimized jvm: min: 5.0s max: 5.3s mean: 5.2s
  - 5 runs
  - 116x - 123x faster than python
  - 4x - 5x faster than orig jvm

The improvements made were guided by profiling in visualvm and arn't
all that numerous:

* We were thrashing memory pretty hard at >1GB/sec. To reduce this add
  caches of our intermediate arrays. We are still thrashing memory
  pretty hard but not as bad.

* The caches of the intermediate arrays in scala Maps brought those
  maps up high in the profiler. Replace with arrays of queues. The
  backing linked list still shows up in profiling, but not as bad.

* DefaultMap.apply gets hit *alot* and was showing up in profiling.
  Replacing inner scala maps with java maps helped some. Further
  replacing java maps with trove4j primitive maps helped significantly.

* Find places where we were repeatedly hitting an array for the same
  item (for example getting something by s.queryId in a loop on the
  urls) and fetch it into a local var. Not sure this made much
  difference

visualvm now reports 80% of cpu time is spent in our own functions,
whereas before it was significantly lower. Mostly I just kept looking
for places where the supporting machinery was taking up cpu instead
of our calculations and kept replacing them until it was better.

Change-Id: I08b72b98f515a820675e1ef9b45dd8724cbd070e
---
M jvm/pom.xml
M jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala
M jvm/src/test/scala/org/wikimedia/search/mjolnir/DBNSuite.scala
3 files changed, 246 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/search/MjoLniR 
refs/changes/41/394741/1

diff --git a/jvm/pom.xml b/jvm/pom.xml
index b2a7f71..f405975 100644
--- a/jvm/pom.xml
+++ b/jvm/pom.xml
@@ -141,6 +141,11 @@
 3.0.1
 test
 
+
+net.sf.trove4j
+trove4j
+3.0.3
+
 
 
 
diff --git a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala 
b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala
index 12ef975..cda6778 100644
--- a/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala
+++ b/jvm/src/main/scala/org/wikimedia/search/mjolnir/DBN.scala
@@ -9,6 +9,9 @@
   * A Dynamic Bayesian Network Click Model for Web Search Ranking - Olivier 
Chapelle and
   * Ya Zang - http://olivier.chapelle.cc/pub/DBN_www2009.pdf
   */
+import gnu.trove.iterator.TIntObjectIterator
+import gnu.trove.map.hash.TIntObjectHashMap
+
 import scala.collection.mutable
 import scala.util.parsing.json.JSON
 
@@ -19,15 +22,22 @@
 
   // This bit maps input queryies/results to array indexes to be used while 
calculating
   private var currentUrlId: Int = 0 // TODO: Why is first returned value 1 
instead of 0?
+  private val urlToIdMap: mutable.Map[String, Int] = mutable.Map()
+  def urlToId(key: String): Int = {
+urlToIdMap.getOrElseUpdate(key, {
+  currentUrlId += 1
+  currentUrlId
+})
+  }
+
   private var currentQueryId: Int = -1
-  private val urlToId: DefaultMap[String, Int] = new DefaultMap({ _ =>
-currentUrlId += 1
-currentUrlId
-  })
-  private val queryToId: DefaultMap[(String, String), Int] = new DefaultMap({ 
_ =>
-currentQueryId += 1
-currentQueryId
-  })
+  private val queryToIdMap: mutable.Map[(String, String), Int] = mutable.Map()
+  def queryToId(key: (String, String)): Int = {
+queryToIdMap.getOrElseUpdate(key, {
+  currentQueryId += 1
+  currentQueryId
+})
+  }
 
   def maxQueryId: Int = currentQueryId + 2
 
@@ -91,8 +101,8 @@
   }
 
   def toRelevances(urlRelevances: Array[Map[Int, UrlRel]]): 
Seq[RelevanceResult] = {
-val idToUrl = urlToId.asMap.map(_.swap)
-val idToQuery = queryToId.asMap.map(_.swap)
+val idToUrl = urlToIdMap.map(_.swap)
+val idToQuery = queryToIdMap.map(_.swap)
 
 urlRelevances.zipWithIndex.flatMap { case (d, queryId) =>
   val (query, region) = idToQuery(queryId)
@@ -101,6 +111,127 @@
 RelevanceResult(query, region, url, urlRel.a * urlRel.s)
   }
 }
+  }
+}
+
+class ArrayCache {
+  val QUEUE_1D_MAX = 20
+  private val queueMap1d: Array[mutable.Queue[Array[Double]]] = 
Array.fill(QUEUE_1D_MAX + 1){ mutable.Queue() }
+
+  def get1d(n: Int): Array[Double] = {
+if (n > QUEUE_1D_MAX) {
+  new Array[Double](n)
+} else {
+