[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Add sniff to find unused "use" statements

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

Change subject: Add sniff to find unused "use" statements
..

Add sniff to find unused "use" statements

This is based off of the sniff that Drupal's coding standard (GPLv2+)
uses. I modified it to be compatible with PHPCS 3.0 and support our
current usage documentation comments.

Bug: T167694
Change-Id: I41500273b605eb307ef20640e6a5af270755014d
---
A MediaWiki/Sniffs/Classes/UnusedUseStatementSniff.php
A MediaWiki/Tests/files/Classes/unused_use.php
A MediaWiki/Tests/files/Classes/unused_use.php.expect
A MediaWiki/Tests/files/Classes/unused_use.php.fixed
4 files changed, 228 insertions(+), 0 deletions(-)


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

diff --git a/MediaWiki/Sniffs/Classes/UnusedUseStatementSniff.php 
b/MediaWiki/Sniffs/Classes/UnusedUseStatementSniff.php
new file mode 100644
index 000..de6078d
--- /dev/null
+++ b/MediaWiki/Sniffs/Classes/UnusedUseStatementSniff.php
@@ -0,0 +1,191 @@
+https://github.com/klausi/coder>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Sniffs\Classes;
+
+use PHP_CodeSniffer\Files\File;
+use PHP_CodeSniffer\Sniffs\Sniff;
+use PHP_CodeSniffer\Util\Tokens;
+
+class UnusedUseStatementSniff implements Sniff {
+
+   /**
+* Returns an array of tokens this test wants to listen for.
+*
+* @return array
+*/
+   public function register() {
+   return [ T_USE ];
+   }
+
+   /**
+* Processes this test, when one of its tokens is encountered.
+*
+* @param File $phpcsFile The file being scanned.
+* @param int $stackPtr The position of the current token in
+*the stack passed in $tokens.
+*
+* @return void
+*/
+   public function process( File $phpcsFile, $stackPtr ) {
+   $tokens = $phpcsFile->getTokens();
+
+   // Only check use statements in the global scope.
+   if ( empty( $tokens[$stackPtr]['conditions'] ) === false ) {
+   return;
+   }
+
+   // Seek to the end of the statement and get the string before 
the semi colon.
+   $semiColon = $phpcsFile->findEndOfStatement( $stackPtr );
+   if ( $tokens[$semiColon]['code'] !== T_SEMICOLON ) {
+   return;
+   }
+
+   $classPtr = $phpcsFile->findPrevious(
+   Tokens::$emptyTokens,
+   ( $semiColon - 1 ),
+   null,
+   true
+   );
+
+   if ( $tokens[$classPtr]['code'] !== T_STRING ) {
+   return;
+   }
+
+   // Search where the class name is used. PHP treats class names 
case
+   // insensitive, that's why we cannot search for the exact class 
name string
+   // and need to iterate over all T_STRING tokens in the file.
+   $classUsed = $phpcsFile->findNext( T_STRING, ( $classPtr + 1 ) 
);
+   $lowerClassName = strtolower( $tokens[$classPtr]['content'] );
+
+   // Check if the referenced class is in the same namespace as 
the current
+   // file. If it is then the use statement is not necessary.
+   $namespacePtr = $phpcsFile->findPrevious( [ T_NAMESPACE ], 
$stackPtr );
+   // Check if the use statement does aliasing with the "as" 
keyword. Aliasing
+   // is allowed even in the same namespace.
+   $aliasUsed = $phpcsFile->findPrevious( T_AS, ( $classPtr - 1 ), 
$stackPtr );
+
+   if ( $namespacePtr !== false && $aliasUsed === false ) {
+   $nsEnd = $phpcsFile->findNext(
+   [
+T_NS_SEPARATOR,
+T_STRING,
+T_WHITESPACE,
+   ],
+   ( $namespacePtr + 1 ),
+   

[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Prohibit some globals

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

Change subject: Prohibit some globals
..


Prohibit some globals

Let's start with $wgTitle and $parserMemc.

Change-Id: Ib75750212128bba70de7cd7d815b982982ed1505
---
A MediaWiki/Sniffs/VariableAnalysis/ForbiddenGlobalVariablesSniff.php
A MediaWiki/Tests/files/VariableAnalysis/forbidden_global_variables.php
A MediaWiki/Tests/files/VariableAnalysis/forbidden_global_variables.php.expect
3 files changed, 129 insertions(+), 0 deletions(-)

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



diff --git 
a/MediaWiki/Sniffs/VariableAnalysis/ForbiddenGlobalVariablesSniff.php 
b/MediaWiki/Sniffs/VariableAnalysis/ForbiddenGlobalVariablesSniff.php
new file mode 100644
index 000..01bb65a
--- /dev/null
+++ b/MediaWiki/Sniffs/VariableAnalysis/ForbiddenGlobalVariablesSniff.php
@@ -0,0 +1,84 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+namespace MediaWiki\Sniffs\VariableAnalysis;
+
+use PHP_CodeSniffer\Files\File;
+use PHP_CodeSniffer\Sniffs\Sniff;
+use PHP_CodeSniffer\Util\Tokens;
+
+class ForbiddenGlobalVariablesSniff implements Sniff {
+
+   /**
+* Forbidden globals
+*/
+   private $forbiddenGlobals = [
+   '$parserMemc',
+   '$wgTitle',
+   ];
+
+   /**
+* @return array
+*/
+   public function register() {
+   return [ T_FUNCTION ];
+   }
+
+   /**
+* @param File $phpcsFile File object.
+* @param int $stackPtr The current token index.
+* @return void
+*/
+   public function process( File $phpcsFile, $stackPtr ) {
+   $tokens = $phpcsFile->getTokens();
+   if ( !isset( $tokens[$stackPtr]['scope_opener'] ) ) {
+   // An interface or abstract function which doesn't have 
a body
+   return;
+   }
+   $scopeOpener = ++$tokens[$stackPtr]['scope_opener'];
+   $scopeCloser = $tokens[$stackPtr]['scope_closer'];
+
+   $globalLine = 0;
+   $globalVariables = [];
+
+   for ( $i = $scopeOpener; $i < $scopeCloser; $i++ ) {
+   if ( array_key_exists( $tokens[$i]['type'], 
Tokens::$emptyTokens ) ) {
+   continue;
+   }
+   if ( $tokens[$i]['type'] === 'T_GLOBAL' ) {
+   $globalLine = $tokens[$i]['line'];
+   }
+   if ( $tokens[$i]['type'] === 'T_VARIABLE' && 
$tokens[$i]['line'] == $globalLine ) {
+   $globalVariables[] = [ $tokens[$i]['content'], 
$i ];
+   }
+   }
+   foreach ( $globalVariables as $global ) {
+   if ( in_array( $global[0], $this->forbiddenGlobals ) ) {
+   $phpcsFile->addWarning(
+   "Global {$global[0]} should not be 
used.",
+   $global[1],
+   'ForbiddenGlobal' . $global[0]
+   );
+   }
+   }
+   }
+}
diff --git 
a/MediaWiki/Tests/files/VariableAnalysis/forbidden_global_variables.php 
b/MediaWiki/Tests/files/VariableAnalysis/forbidden_global_variables.php
new file mode 100644
index 000..73bf2a3
--- /dev/null
+++ b/MediaWiki/Tests/files/VariableAnalysis/forbidden_global_variables.php
@@ -0,0 +1,41 @@
+https://gerrit.wikimedia.org/r/373433
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib75750212128bba70de7cd7d815b982982ed1505
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Addshore 
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] labs/libraryupgrader[master]: Blacklist mediawiki/extensions/MediaWikiFarm

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

Change subject: Blacklist mediawiki/extensions/MediaWikiFarm
..


Blacklist mediawiki/extensions/MediaWikiFarm

Change-Id: Id3e2c5420fcb785ffc1db70a36ef84fc01ea3d93
---
M upgrade.py
1 file changed, 6 insertions(+), 1 deletion(-)

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



diff --git a/upgrade.py b/upgrade.py
index 193d70f..db76944 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -33,6 +33,10 @@
 'mediawiki/skins/MonoBook',
 'oojs/ui',
 ]
+BLACKLIST = [
+# Per https://gerrit.wikimedia.org/r/375513
+'mediawiki/extensions/MediaWikiFarm',
+]
 
 
 def run(repo: str, library: str, version: str, pw: str) -> str:
@@ -60,7 +64,8 @@
 
 def get_extension_list(library, version_match):
 for info in mw.get_extension_list(library, version_match):
-yield info['repo']
+if info['repo'] not in BLACKLIST:
+yield info['repo']
 
 
 def main():

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3e2c5420fcb785ffc1db70a36ef84fc01ea3d93
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Blacklist mediawiki/extensions/MediaWikiFarm

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

Change subject: Blacklist mediawiki/extensions/MediaWikiFarm
..

Blacklist mediawiki/extensions/MediaWikiFarm

Change-Id: Id3e2c5420fcb785ffc1db70a36ef84fc01ea3d93
---
M upgrade.py
1 file changed, 6 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/46/375546/1

diff --git a/upgrade.py b/upgrade.py
index 193d70f..db76944 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -33,6 +33,10 @@
 'mediawiki/skins/MonoBook',
 'oojs/ui',
 ]
+BLACKLIST = [
+# Per https://gerrit.wikimedia.org/r/375513
+'mediawiki/extensions/MediaWikiFarm',
+]
 
 
 def run(repo: str, library: str, version: str, pw: str) -> str:
@@ -60,7 +64,8 @@
 
 def get_extension_list(library, version_match):
 for info in mw.get_extension_list(library, version_match):
-yield info['repo']
+if info['repo'] not in BLACKLIST:
+yield info['repo']
 
 
 def main():

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3e2c5420fcb785ffc1db70a36ef84fc01ea3d93
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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]: EditPage: Remove unused variable in getCheckboxesOOUI()

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

Change subject: EditPage: Remove unused variable in getCheckboxesOOUI()
..


EditPage: Remove unused variable in getCheckboxesOOUI()

This was unnecessarily copypasted from getCheckboxes().
The label's 'id' attribute is correctly being set below.

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

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



diff --git a/includes/EditPage.php b/includes/EditPage.php
index 40913bb..664e9b8 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -4207,9 +4207,6 @@
if ( isset( $options['title-message'] ) ) {
$title = $this->context->msg( 
$options['title-message'] )->text();
}
-   if ( isset( $options['label-id'] ) ) {
-   $labelAttribs['id'] = $options['label-id'];
-   }
 
$checkboxes[ $legacyName ] = new OOUI\FieldLayout(
new OOUI\CheckboxInputWidget( [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1557461bfd16c22bb949e26d419e154f80c963d7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SendGrid[master]: Added useful dependencies necessary for jenkins to run

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

Change subject: Added useful dependencies necessary for jenkins to run
..


Added useful dependencies necessary for jenkins to run

Change-Id: I7ed116069853347a080af5fc6cec9140a3a6f979
---
M composer.json
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index ed04a14..a926f66 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,9 @@
 },
 "require-dev": {
 "phpunit/phpunit": "4.*",
-"squizlabs/php_codesniffer": "2.*"
+"squizlabs/php_codesniffer": "2.*",
+"jakub-onderka/php-parallel-lint": "0.9.2",
+"jakub-onderka/php-console-highlighter": "0.3.2"
 },
 "scripts": {
 "test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ed116069853347a080af5fc6cec9140a3a6f979
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SendGrid
Gerrit-Branch: master
Gerrit-Owner: D3r1ck01 
Gerrit-Reviewer: D3r1ck01 
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...SendGrid[master]: Added useful dependencies necessary for jenkins to run

2017-09-02 Thread D3r1ck01 (Code Review)
D3r1ck01 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375545 )

Change subject: Added useful dependencies necessary for jenkins to run
..

Added useful dependencies necessary for jenkins to run

Change-Id: I7ed116069853347a080af5fc6cec9140a3a6f979
---
M composer.json
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index ed04a14..a926f66 100644
--- a/composer.json
+++ b/composer.json
@@ -7,7 +7,9 @@
 },
 "require-dev": {
 "phpunit/phpunit": "4.*",
-"squizlabs/php_codesniffer": "2.*"
+"squizlabs/php_codesniffer": "2.*",
+"jakub-onderka/php-parallel-lint": "0.9.2",
+"jakub-onderka/php-console-highlighter": "0.3.2"
 },
 "scripts": {
 "test": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ed116069853347a080af5fc6cec9140a3a6f979
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SendGrid
Gerrit-Branch: master
Gerrit-Owner: D3r1ck01 

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Add Peru in Spanish to the database

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

Change subject: Add Peru in Spanish to the database
..


Add Peru in Spanish to the database

Bug: T174245
Change-Id: I0daeaa6025c3e315e8bada21e51a0982f9c28d89
---
A erfgoedbot/monuments_config/pe_es.json
1 file changed, 143 insertions(+), 0 deletions(-)

Approvals:
  Jean-Frédéric: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/erfgoedbot/monuments_config/pe_es.json 
b/erfgoedbot/monuments_config/pe_es.json
new file mode 100644
index 000..841443d
--- /dev/null
+++ b/erfgoedbot/monuments_config/pe_es.json
@@ -0,0 +1,143 @@
+{
+"country": "pe",
+"lang": "es",
+"description": "Monuments in Peru in Spanish",
+"project": "wikipedia",
+"namespaces": [
+104
+],
+"table": "monuments_pe_(es)",
+"truncate": false,
+"primkey": "id",
+"headerTemplate": "MonumentoPerú/encabezado",
+"rowTemplate": "MonumentoPerú",
+"commonsTemplate": "Monumento de Peru",
+"commonsTrackerCategory": "Cultural heritage monuments in Peru with known 
IDs",
+"commonsCategoryBase": "Cultural heritage monuments in Peru",
+"unusedImagesPage": "Wikiproyecto:Patrimonio histórico/Fotos de monumentos 
de Perú sin usar",
+"imagesWithoutIdPage": "Wikiproyecto:Patrimonio histórico/Fotos de 
monumentos de Perú sin id",
+"fields": [
+{
+"dest": "id",
+"source": "id"
+},
+{
+"dest": "monumento",
+"source": "monumento"
+},
+{
+"dest": "municipio",
+"source": "municipio"
+},
+{
+"dest": "localidad",
+"source": "localidad"
+},
+{
+"dest": "lat",
+"source": "lat",
+"check": "checkLat"
+},
+{
+"dest": "lon",
+"source": "long",
+"check": "checkLon"
+},
+{
+"dest": "direccion",
+"source": "dirección"
+},
+{
+"dest": "monumento_enlace",
+"source": "monumento_enlace"
+},
+{
+"dest": "enlace",
+"source": "enlace"
+},
+{
+"dest": "monumento_desc",
+"source": "monumento_desc"
+},
+{
+"dest": "iso",
+"source": "ISO"
+},
+{
+"dest": "commonscat",
+"source": "monumento_categoría"
+},
+{
+"dest": "image",
+"source": "imagen"
+}
+],
+"sql_lang": "Spanish",
+"sql_country": "Peru",
+"sql_data": {
+"country": {
+"value": "pe",
+"type": "Text"
+},
+"lang": {
+"value": "es",
+"type": "Text"
+},
+"id": {
+"value": "id",
+"type": "Field"
+},
+"adm0": {
+"value": "pe",
+"type": "Text"
+},
+"adm1": {
+"value": "LOWER(`iso`)",
+"type": "Raw"
+},
+"adm2": {
+"value": "municipio",
+"type": "Field"
+},
+"name": {
+"value": "monumento",
+"type": "Field"
+},
+"address": {
+"value": "direccion",
+"type": "Field"
+},
+"municipality": {
+"value": "municipio",
+"type": "Field"
+},
+"lat": {
+"value": "lat",
+"type": "Field"
+},
+"lon": {
+"value": "lon",
+"type": "Field"
+},
+"image": {
+"value": "image",
+"type": "Field"
+},
+"commonscat": {
+"value": "commonscat",
+"type": "Field"
+},
+"source": {
+"value": "source",
+"type": "Field"
+},
+"changed": {
+"value": "changed",
+"type": "Field"
+},
+"monument_article": {
+"value": "monumento_enlace",
+"type": "Field"
+}
+}
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0daeaa6025c3e315e8bada21e51a0982f9c28d89
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 
Gerrit-Reviewer: Jean-Frédéric 
Gerrit-Reviewer: Multichill 
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]: Move deprecated argument to class variable in claimit.py

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

Change subject: Move deprecated argument to class variable in claimit.py
..


Move deprecated argument to class variable in claimit.py

Change-Id: Ia455d2c49a9f53aa65307cd0f0542eedee8f10b5
---
M scripts/claimit.py
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/scripts/claimit.py b/scripts/claimit.py
index 25796f5..845ad49 100755
--- a/scripts/claimit.py
+++ b/scripts/claimit.py
@@ -70,6 +70,8 @@
 
 """A bot to add Wikidata claims."""
 
+use_from_page = None
+
 def __init__(self, generator, claims, exists_arg=''):
 """
 Constructor.
@@ -82,7 +84,7 @@
 @type exists_arg: str
 """
 self.availableOptions['always'] = True
-super(ClaimRobot, self).__init__(use_from_page=None)
+super(ClaimRobot, self).__init__()
 self.generator = generator
 self.claims = claims
 self.exists_arg = ''.join(x for x in exists_arg.lower() if x in 'pqst')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia455d2c49a9f53aa65307cd0f0542eedee8f10b5
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/i18n[master]: Remove final dot/period (.) to archivebot.py summary

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

Change subject: Remove final dot/period (.) to archivebot.py summary
..


Remove final dot/period (.) to archivebot.py summary

Bug: T174286
Change-Id: I959880bf6c819195c2fdfdd091cb2f6e8af33497
---
M archivebot/aeb.json
M archivebot/af.json
M archivebot/an.json
M archivebot/ar.json
M archivebot/arc.json
M archivebot/ast.json
M archivebot/az.json
M archivebot/azb.json
M archivebot/ba.json
M archivebot/bcc.json
M archivebot/be-tarask.json
M archivebot/bjn.json
M archivebot/bo.json
M archivebot/br.json
M archivebot/bs.json
M archivebot/ca.json
M archivebot/ce.json
M archivebot/ckb.json
M archivebot/cs.json
M archivebot/csb.json
M archivebot/cy.json
M archivebot/da.json
M archivebot/de.json
M archivebot/diq.json
M archivebot/el.json
M archivebot/eml.json
M archivebot/en.json
M archivebot/eo.json
M archivebot/es.json
M archivebot/et.json
M archivebot/eu.json
M archivebot/fa.json
M archivebot/fi.json
M archivebot/fo.json
M archivebot/fr.json
M archivebot/frp.json
M archivebot/frr.json
M archivebot/gl.json
M archivebot/gn.json
M archivebot/gsw.json
M archivebot/haw.json
M archivebot/he.json
M archivebot/hif.json
M archivebot/hr.json
M archivebot/hu.json
M archivebot/ia.json
M archivebot/id.json
M archivebot/ilo.json
M archivebot/is.json
M archivebot/it.json
M archivebot/jv.json
M archivebot/kab.json
M archivebot/kk.json
M archivebot/ko.json
M archivebot/ksh.json
M archivebot/lb.json
M archivebot/li.json
M archivebot/lt.json
M archivebot/map-bms.json
M archivebot/mg.json
M archivebot/min.json
M archivebot/mk.json
M archivebot/ml.json
M archivebot/ms.json
M archivebot/nan.json
M archivebot/nap.json
M archivebot/nb.json
M archivebot/nds-nl.json
M archivebot/nl.json
M archivebot/nn.json
M archivebot/oc.json
M archivebot/pl.json
M archivebot/pms.json
M archivebot/pt.json
M archivebot/qqq.json
M archivebot/ro.json
M archivebot/ru.json
M archivebot/sco.json
M archivebot/sh.json
M archivebot/sk.json
M archivebot/sl.json
M archivebot/so.json
M archivebot/sq.json
M archivebot/sr.json
M archivebot/sv.json
M archivebot/szl.json
M archivebot/te.json
M archivebot/tl.json
M archivebot/tly.json
M archivebot/tr.json
M archivebot/ug.json
M archivebot/uk.json
M archivebot/vec.json
M archivebot/vi.json
M archivebot/wa.json
95 files changed, 180 insertions(+), 180 deletions(-)

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



diff --git a/archivebot/aeb.json b/archivebot/aeb.json
index 386abfa..06e2722 100644
--- a/archivebot/aeb.json
+++ b/archivebot/aeb.json
@@ -5,6 +5,6 @@
"Xqt"
]
},
-   "archivebot-archive-summary": "!el archivage mte3 %(count)d 
{{PLURAL:%(count)d|thread|threads}} min [[%(from)s]].",
-   "archivebot-page-summary": "el archivage mte3 %(count)d 
{{PLURAL:%(count)d|thread|threads}} (%(why)s) ila %(archives)s."
+   "archivebot-archive-summary": "!el archivage mte3 %(count)d 
{{PLURAL:%(count)d|thread|threads}} min [[%(from)s]]",
+   "archivebot-page-summary": "el archivage mte3 %(count)d 
{{PLURAL:%(count)d|thread|threads}} (%(why)s) ila %(archives)s"
 }
diff --git a/archivebot/af.json b/archivebot/af.json
index ac39ea1..503b5a5 100644
--- a/archivebot/af.json
+++ b/archivebot/af.json
@@ -6,7 +6,7 @@
]
},
"archivebot-archive-full": "(ARGIEF VOL)",
-   "archivebot-archive-summary": "Robot: Argiveer %(count)d 
{{PLURAL:%(count)d|onderwerp|onderwerpe}} vanaf [[%(from)s]].",
+   "archivebot-archive-summary": "Robot: Argiveer %(count)d 
{{PLURAL:%(count)d|onderwerp|onderwerpe}} vanaf [[%(from)s]]",
"archivebot-older-than": "ouer as %(duration)s",
-   "archivebot-page-summary": "Robot: Argiveer %(count)d 
{{PLURAL:%(count)d|onderwerp|onderwerpe}} (%(why)s) na %(archives)s."
+   "archivebot-page-summary": "Robot: Argiveer %(count)d 
{{PLURAL:%(count)d|onderwerp|onderwerpe}} (%(why)s) na %(archives)s"
 }
diff --git a/archivebot/an.json b/archivebot/an.json
index 7de15e3..fa68ed1 100644
--- a/archivebot/an.json
+++ b/archivebot/an.json
@@ -6,7 +6,7 @@
]
},
"archivebot-archive-full": "(FICHERO COMPLETO)",
-   "archivebot-archive-summary": "Bot: archivando %(count)d 
{{PLURAL:%(count)d|filo|filos}} de [[%(from)s]].",
+   "archivebot-archive-summary": "Bot: archivando %(count)d 
{{PLURAL:%(count)d|filo|filos}} de [[%(from)s]]",
"archivebot-older-than": "con una antiguidat de %(duration)s",
-   "archivebot-page-summary": "Bot: archivando %(count)d 
{{PLURAL:%(count)d|filo|filos}} (%(why)s) en %(archives)s."
+   "archivebot-page-summary": "Bot: archivando %(count)d 
{{PLURAL:%(count)d|filo|filos}} (%(why)s) en %(archives)s"
 }
diff --git a/archivebot/ar.json b/archivebot/ar.json
index d456ebb..03d19db 100644
--- a/archivebot/ar.json
+++ b/archivebot/ar.json
@@ -7,8 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Enable usage aspect C on elwiki

2017-09-02 Thread Eranroz (Code Review)
Eranroz has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375544 )

Change subject: Enable usage aspect C on elwiki
..

Enable usage aspect C on elwiki

Experimental enablement of claims usage tracking.
See task for mroe details.

Bug: T151717
Change-Id: I3b3182dbffe5503b78e8dd2d6778fff76af917a6
---
M wmf-config/Wikibase-production.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/Wikibase-production.php 
b/wmf-config/Wikibase-production.php
index 238a7b0..54de454 100644
--- a/wmf-config/Wikibase-production.php
+++ b/wmf-config/Wikibase-production.php
@@ -169,5 +169,8 @@
$wgWBClientSettings['echoIcon'] = [ 'url' => 
'/static/images/wikibase/echoIcon.svg' ];
}
 
-   $wgWBClientSettings['disabledUsageAspects'] = [ 'C' ];
+   // T151717
+   if ( $wgDBname != 'elwiki' ) {
+   $wgWBClientSettings['disabledUsageAspects'] = [ 'C' ];
+   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...DeleteOwn[master]: Convert DeleteOwn to extension.json

2017-09-02 Thread MGChecker (Code Review)
MGChecker has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375543 )

Change subject: Convert DeleteOwn to extension.json
..

Convert DeleteOwn to extension.json

Converted the extension to  extension registration and changed the setting 
architecture to get more adjustable namespace specific settings than 
before.(And such that don't require the PHP INF constant.)

Change-Id: I6a2dbc7c1bc19292fdd34d3fe237cb782168ad2c
---
M DeleteOwn.php
A DeleteOwn_body.php
A extension.json
M i18n/en.json
M i18n/qqq.json
5 files changed, 207 insertions(+), 195 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DeleteOwn 
refs/changes/43/375543/1

diff --git a/DeleteOwn.php b/DeleteOwn.php
index e13d63d..68d8ca0 100644
--- a/DeleteOwn.php
+++ b/DeleteOwn.php
@@ -1,197 +1,9 @@
 
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @ingroup Extensions
- * @file
- *
- * @author Tyler Romeo (Parent5446) 
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public 
License 3.0 or later
- */
-
-// Ensure that the script cannot be executed outside of MediaWiki.
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This is an extension to MediaWiki and cannot be run standalone.' 
);
+if ( version_compare( $wgVersion, '1.29', '=>' ) ) {
+   wfLoadExtension( 'DeleteOwn' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['DeleteOwn'] = __DIR__ . '/i18n';
+   return;
+} else {
+   die( 'This version of the DelelteOwn extension requires MediaWiki 
1.29+' );
 }
-
-// Display extension properties on MediaWiki.
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'DeleteOwn',
-   'descriptionmsg' => 'deleteown-desc',
-   'version' => '1.2.0',
-   'author' => array(
-   'Tyler Romeo',
-   '...'
-   ),
-   'url' => 'https://www.mediawiki.org/wiki/Extension:DeleteOwn',
-   'license-name' => 'GPL-3.0+'
-);
-
-// Register extension messages and other localisation.
-$wgMessagesDirs['DeleteOwn'] = __DIR__ . '/i18n';
-
-/**
- * The expiry for when a page can no longer be deleted by its author.
- *
- * Can be a single integer value, which is applied to all pages,
- * or can be an array of namespaces mapped to individual expiry values.
- * An expiry of 0 (or not specifying a namespace key) disables deletion
- * and an expiry of INF disables the expiry.
- */
-$wgDeleteOwnExpiry = INF;
-
-$wgAvailableRights[] = 'deleteown';
-
-Hooks::register( 'TitleQuickPermissions',
-   /**
-* Check if a user can delete a page they authored but has not
-* been edited by anybody else and is younger than a threshold.
-*
-* @param Title $title Title being accessed
-* @param User $user User performing the action
-* @param string $action The action being performed
-* @param array &$errors Permissions errors to be returned
-* @param bool $doExpensiveQueries Whether to do expensive DB queries
-* @return bool False (to stop permissions checks) if user is allowed 
to delete
-*/
-   function( Title $title, User $user, $action, array &$errors, 
$doExpensiveQueries ) {
-   global $wgDeleteOwnExpiry;
-
-   // If not on the delete action, or if the user can delete 
normally, return.
-   // Also, if the user doesn't have the deleteown permissions, 
none of this is applicable.
-   if ( $action !== 'delete' || $user->isAllowed( 'delete' ) || 
!$user->isAllowed( 'deleteown' ) ) {
-   return true;
-   }
-
-   // Determine an expiry based on the namespace.
-   $ns = $title->getNamespace();
-   if ( !is_array( $wgDeleteOwnExpiry ) ) {
-   // Non-array expiry, means apply this expiry to all 
namespaces.
-   $expiry = $wgDeleteOwnExpiry;
-   } elseif ( array_key_exists( $ns, $wgDeleteOwnExpiry ) ) {
-   // Namespace-specific expiry exists
-   $expiry = $wgDeleteOwnExpiry[$ns];
-   } 

[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Fix MW-CS to a fixed version

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

Change subject: Fix MW-CS to a fixed version
..


Fix MW-CS to a fixed version

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

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



diff --git a/composer.json b/composer.json
index b9b93f9..f24c940 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
"phpunit/phpunit": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"jakub-onderka/php-parallel-lint": "*",
"phpmd/phpmd": "*",
-   "mediawiki/mediawiki-codesniffer": "*",
+   "mediawiki/mediawiki-codesniffer": "~0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"suggest": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c0c6dc09b07100f3d2b64be27f301dcc0b98c6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiFarm
Gerrit-Branch: master
Gerrit-Owner: Seb35 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Seb35 
Gerrit-Reviewer: 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]: TableSorter: Sort unrecognized dates as -Infinity

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

Change subject: TableSorter: Sort unrecognized dates as -Infinity
..


TableSorter: Sort unrecognized dates as -Infinity

Follow-up to: I664b4cc
Bug: T174814
Change-Id: I028681172be7a30e51cab42847c4fc35e9358aca
---
M resources/src/jquery/jquery.tablesorter.js
M tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 922da31..ecd376a 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -1163,7 +1163,7 @@
match = s.match( ts.rgx.isoDate[ 1 ] );
}
if ( !match ) {
-   return 0;
+   return -Infinity;
}
// Month and day
for ( i = 2; i <= 4; i += 2 ) {
diff --git 
a/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js 
b/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
index 257699a..01589c3 100644
--- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
@@ -174,7 +174,8 @@
parserTest( 'Y Dates', 'date', YDates );
 
ISODates = [
-   [ '2000',   false,  94668480, 'Plain 4-digit 
year' ],
+   [ '',   false,  -Infinity, 'Not a date' ],
+   [ '2000',   false,  94668480, 'Plain 4-digit year' ],
[ '2000-01',true,   94668480, 'Year with month' ],
[ '2000-01-01', true,   94668480, 'Year with month and day' 
],
[ '2000-13-01', false,  97830720, 'Non existant month' ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I028681172be7a30e51cab42847c4fc35e9358aca
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ 
Gerrit-Reviewer: C. Scott Ananian 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MediaWikiFarm[master]: Fix MW-CS to a fixed version

2017-09-02 Thread Seb35 (Code Review)
Seb35 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375542 )

Change subject: Fix MW-CS to a fixed version
..

Fix MW-CS to a fixed version

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


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

diff --git a/composer.json b/composer.json
index b9b93f9..f24c940 100644
--- a/composer.json
+++ b/composer.json
@@ -27,7 +27,7 @@
"phpunit/phpunit": "^3.4 || ^4.0 || ^5.0 || ^6.0",
"jakub-onderka/php-parallel-lint": "*",
"phpmd/phpmd": "*",
-   "mediawiki/mediawiki-codesniffer": "*",
+   "mediawiki/mediawiki-codesniffer": "~0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"suggest": {

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DOC] Add release history to pypi description

2017-09-02 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375541 )

Change subject: [DOC] Add release history to pypi description
..

[DOC] Add release history to pypi description

Change-Id: Ibca3cc0f545d6481f6c3427b5d14a4e7f7aadf86
---
A HISTORY.rst
M pypi_description.rst
M setup.py
3 files changed, 100 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/41/375541/1

diff --git a/HISTORY.rst b/HISTORY.rst
new file mode 100644
index 000..b1b2b1c
--- /dev/null
+++ b/HISTORY.rst
@@ -0,0 +1,91 @@
+Release history
+===
+
+3.0.20170801
+
+
+* Bugfixes and improvements
+* Localisation updates
+
+3.0.20170713
+
+
+* Implement server side event client EventStreams
+* Add thanks log support
+* new ndashredir.py script to create hyphenated redirects
+* new followlive.py script to flag new articles
+* new WbUnknown data type for Wikibase
+* Deprecate APISite.newfiles()
+* new pagegenerators filter option -titleregexnot
+* Inverse of pagegenerators -namespace option
+* Bugfixes and improvements
+* Localisation updates
+* Remove panoramiopicker.py script
+* Remove anarchopedia family out of the framework
+* CODE_OF_CONDUCT included
+
+3.0.20170521
+
+
+* Replaced the word 'async' with 'asynchronous' due to python 3.7
+* Support for Python 2.6 but higher releases are strictly recommended
+* Bugfixes and improvements
+* Localisation updates
+
+3.0.20170403
+
+
+* First major release from master branch
+* requests package is mandatory
+* Deprecate previous 2.0 branches
+
+2.0rc5
+--
+
+* Last stable 2.0 branch
+
+2.0rc4
+--
+
+* Remove dependency on pYsearch
+* Desupport Python 2.6 for Pywikibot 2.0 release branch
+
+2.0rc3
+--
+
+* Bugfixes
+* Localisation updates
+* i18n: always follow master branch
+
+2.0rc2
+--
+
+* Bugfixes and improvements
+* Localisation updates
+
+
+2.0rc1
+--
+
+* New scripts patrol.py and piper.py ported from old compat branch
+* isbn.py now supports wikibase
+* RecentChanges stream (rcstream) support
+* Sphinx documentation at https://doc.wikimedia.org/pywikibot/
+* Bugfixes and improvements
+* Localisation updates
+
+2.0b3
+-
+
+* Bugfixes and improvements
+
+2.0b2
+-
+
+* Bugfixes and improvements
+
+2.0b1
+-
+
+* First stable release branch
+
diff --git a/pypi_description.rst b/pypi_description.rst
index 25af392..f260b45 100644
--- a/pypi_description.rst
+++ b/pypi_description.rst
@@ -87,3 +87,6 @@
 .. image:: 
https://secure.travis-ci.org/wikimedia/pywikibot-core.png?branch=master
:alt: Build Status
:target: https://travis-ci.org/wikimedia/pywikibot-core
+.. image:: https://img.shields.io/pypi/v/pywikibot.svg
+   :alt: Pywikibot release
+   :target: https://pypi.python.org/pypi/pywikibot
\ No newline at end of file
diff --git a/setup.py b/setup.py
index de64c83..840cab6 100644
--- a/setup.py
+++ b/setup.py
@@ -201,12 +201,17 @@
 version = version + "-dev"
 
 github_url = 'https://github.com/wikimedia/pywikibot-core'
+with open('pypi_description.rst') as f:
+long_description = f.read()
+with open('HISTORY.rst') as f:
+history = f.read()
+long_description += '\n\n' + history
 
 setup(
 name=name,
 version=version,
 description='Python MediaWiki Bot Framework',
-long_description=open('pypi_description.rst').read(),
+long_description=long_description,
 keywords=('pywikibot', 'python', 'mediawiki', 'bot', 'wiki', 'framework',
   'wikimedia', 'wikipedia', 'pwb', 'pywikipedia', 'API'),
 maintainer='The Pywikibot team',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...GlobalBlocking[master]: use DB_REPLICA instead of deprecated DB_SLAVE

2017-09-02 Thread Melos (Code Review)
Melos has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375540 )

Change subject: use DB_REPLICA instead of deprecated DB_SLAVE
..

use DB_REPLICA instead of deprecated DB_SLAVE

Change-Id: Ie56ec0e2f4f85d1340f5a70b435f70cd5f1d60a2
---
M includes/GlobalBlocking.class.php
M includes/api/ApiGlobalBlock.php
M includes/api/ApiQueryGlobalBlocks.php
M includes/specials/SpecialGlobalBlock.php
M includes/specials/SpecialGlobalBlockList.php
M includes/specials/SpecialGlobalBlockStatus.php
M maintenance/fixGlobalBlockWhitelist.php
7 files changed, 14 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/GlobalBlocking 
refs/changes/40/375540/1

diff --git a/includes/GlobalBlocking.class.php 
b/includes/GlobalBlocking.class.php
index 779e2e6..f66e9d9 100644
--- a/includes/GlobalBlocking.class.php
+++ b/includes/GlobalBlocking.class.php
@@ -154,7 +154,7 @@
 * @return object The block
 */
static function getGlobalBlockingBlock( $ip, $anon ) {
-   $dbr = self::getGlobalBlockingDatabase( DB_SLAVE );
+   $dbr = self::getGlobalBlockingDatabase( DB_REPLICA );
 
$conds = self::getRangeCondition( $ip );
 
@@ -173,7 +173,7 @@
 * @return array a SQL condition
 */
static function getRangeCondition( $ip ) {
-   $dbr = self::getGlobalBlockingDatabase( DB_SLAVE );
+   $dbr = self::getGlobalBlockingDatabase( DB_REPLICA );
 
$hexIp = IP::toHex( $ip );
// Don't bother checking blocks out of this /16.
@@ -199,7 +199,7 @@
 * @return array of applicable blocks
 */
static function checkIpsForBlock( $ips, $anon ) {
-   $dbr = self::getGlobalBlockingDatabase( DB_SLAVE );
+   $dbr = self::getGlobalBlockingDatabase( DB_REPLICA );
$conds = [];
foreach ( $ips as $ip ) {
if ( IP::isValid( $ip ) ) {
@@ -253,7 +253,7 @@
}
 
/**
-* @param int $dbtype either DB_SLAVE or DB_MASTER
+* @param int $dbtype either DB_REPLICA or DB_MASTER
 * @return \Wikimedia\Rdbms\IDatabase
 */
static function getGlobalBlockingDatabase( $dbtype ) {
@@ -266,10 +266,10 @@
 
/**
 * @param string $ip
-* @param int $dbtype either DB_SLAVE or DB_MASTER
+* @param int $dbtype either DB_REPLICA or DB_MASTER
 * @return int
 */
-   static function getGlobalBlockId( $ip, $dbtype = DB_SLAVE ) {
+   static function getGlobalBlockId( $ip, $dbtype = DB_REPLICA ) {
$db = self::getGlobalBlockingDatabase( $dbtype );
 
$row = $db->selectRow( 'globalblocks', 'gb_id', [ 'gb_address' 
=> $ip ], __METHOD__ );
@@ -328,7 +328,7 @@
throw new Exception( "Neither Block IP nor Block ID 
given for retrieving whitelist status" );
}
 
-   $dbr = wfGetDB( DB_SLAVE );
+   $dbr = wfGetDB( DB_REPLICA );
$row = $dbr->selectRow(
'global_block_whitelist',
[ 'gbw_by', 'gbw_reason' ],
diff --git a/includes/api/ApiGlobalBlock.php b/includes/api/ApiGlobalBlock.php
index 6e3ab68..823cf9c 100644
--- a/includes/api/ApiGlobalBlock.php
+++ b/includes/api/ApiGlobalBlock.php
@@ -53,7 +53,7 @@
if ( $block->gb_anon_only ) {
$result->addValue( 'globalblock', 
'anononly', '' );
}
-   if ( $block->gb_expiry == wfGetDB( DB_SLAVE 
)->getInfinity() ) {
+   if ( $block->gb_expiry == wfGetDB( DB_REPLICA 
)->getInfinity() ) {
$displayExpiry = 'infinite';
} else {
$displayExpiry = wfTimestamp( 
TS_ISO_8601, $block->gb_expiry );
diff --git a/includes/api/ApiQueryGlobalBlocks.php 
b/includes/api/ApiQueryGlobalBlocks.php
index 75b3412..ccbfbef 100644
--- a/includes/api/ApiQueryGlobalBlocks.php
+++ b/includes/api/ApiQueryGlobalBlocks.php
@@ -227,7 +227,7 @@
 
protected function getDB() {
if ( $this->globalBlockingDb === null ) {
-   $this->globalBlockingDb = 
GlobalBlocking::getGlobalBlockingDatabase( DB_SLAVE );
+   $this->globalBlockingDb = 
GlobalBlocking::getGlobalBlockingDatabase( DB_REPLICA );
}
return $this->globalBlockingDb;
}
diff --git a/includes/specials/SpecialGlobalBlock.php 
b/includes/specials/SpecialGlobalBlock.php
index e11798c..56b2388 100644
--- a/includes/specials/SpecialGlobalBlock.php
+++ b/includes/specials/SpecialGlobalBlock.php
@@ -58,7 +58,7 @@
protected function loadExistingBlock() {

[MediaWiki-commits] [Gerrit] labs...heritage[master]: [WIP] Add Peru in Spanish to the database

2017-09-02 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375539 )

Change subject: [WIP] Add Peru in Spanish to the database
..

[WIP] Add Peru in Spanish to the database

WIP due to:
* Missing fields
* Missing converter

Bug: T174245
Change-Id: I0daeaa6025c3e315e8bada21e51a0982f9c28d89
---
A erfgoedbot/monuments_config/pe_es.json
1 file changed, 143 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/39/375539/1

diff --git a/erfgoedbot/monuments_config/pe_es.json 
b/erfgoedbot/monuments_config/pe_es.json
new file mode 100644
index 000..0b0883c
--- /dev/null
+++ b/erfgoedbot/monuments_config/pe_es.json
@@ -0,0 +1,143 @@
+{
+"country": "pe",
+"lang": "es",
+"description": "Monuments in Peru in Spanish",
+"project": "wikipedia",
+"namespaces": [
+104
+],
+"table": "monuments_pe_(es)",
+"truncate": false,
+"primkey": "id",
+"headerTemplate": "MonumentoPerú/encabezado",
+"rowTemplate": "MonumentoPerú",
+"commonsTemplate": "Monumento de Peru",
+"commonsTrackerCategory": "Cultural heritage monuments in Peru with known 
IDs",
+"commonsCategoryBase": "Cultural heritage monuments in Peru",
+"unusedImagesPage": "",
+"imagesWithoutIdPage": "",
+"fields": [
+{
+"dest": "id",
+"source": "id"
+},
+{
+"dest": "monumento",
+"source": "monumento"
+},
+{
+"dest": "municipio",
+"source": "municipio"
+},
+{
+"dest": "localidad",
+"source": "localidad"
+},
+{
+"dest": "lat",
+"source": "lat",
+"check": "checkLat"
+},
+{
+"dest": "lon",
+"source": "long",
+"check": "checkLon"
+},
+{
+"dest": "direccion",
+"source": "dirección"
+},
+{
+"dest": "monumento_enlace",
+"source": "monumento_enlace"
+},
+{
+"dest": "enlace",
+"source": "enlace"
+},
+{
+"dest": "monumento_desc",
+"source": "monumento_desc"
+},
+{
+"dest": "iso",
+"source": "ISO"
+},
+{
+"dest": "commonscat",
+"source": "monumento_categoría"
+},
+{
+"dest": "image",
+"source": "imagen"
+}
+],
+"sql_lang": "Spanish",
+"sql_country": "Peru",
+"sql_data": {
+"country": {
+"value": "pe",
+"type": "Text"
+},
+"lang": {
+"value": "es",
+"type": "Text"
+},
+"id": {
+"value": "id",
+"type": "Field"
+},
+"adm0": {
+"value": "pe",
+"type": "Text"
+},
+"adm1": {
+"value": "LOWER(`iso`)",
+"type": "Raw"
+},
+"adm2": {
+"value": "municipio",
+"type": "Field"
+},
+"name": {
+"value": "monumento",
+"type": "Field"
+},
+"address": {
+"value": "direccion",
+"type": "Field"
+},
+"municipality": {
+"value": "municipio",
+"type": "Field"
+},
+"lat": {
+"value": "lat",
+"type": "Field"
+},
+"lon": {
+"value": "lon",
+"type": "Field"
+},
+"image": {
+"value": "image",
+"type": "Field"
+},
+"commonscat": {
+"value": "commonscat",
+"type": "Field"
+},
+"source": {
+"value": "source",
+"type": "Field"
+},
+"changed": {
+"value": "changed",
+"type": "Field"
+},
+"monument_article": {
+"value": "monumento_enlace",
+"type": "Field"
+}
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0daeaa6025c3e315e8bada21e51a0982f9c28d89
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Update pivot systemd start command

2017-09-02 Thread Joal (Code Review)
Joal has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375538 )

Change subject: Update pivot systemd start command
..

Update pivot systemd start command

Add the --use-segment-metadata to the pivot start command
to ensure all dimensions and measures are available from
Druid in Pivot (more details in
https://groups.google.com/forum/#!topic/druid-user/ON3qvVJEsEs)

Change-Id: Ie40334488ad8a1bbd7ebb9b29e88cf8d0740ea5b
---
M modules/pivot/templates/initscripts/pivot.systemd.erb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/38/375538/1

diff --git a/modules/pivot/templates/initscripts/pivot.systemd.erb 
b/modules/pivot/templates/initscripts/pivot.systemd.erb
index 8999ac6..65d4205 100644
--- a/modules/pivot/templates/initscripts/pivot.systemd.erb
+++ b/modules/pivot/templates/initscripts/pivot.systemd.erb
@@ -13,7 +13,7 @@
 # wait 60 seconds for a graceful restart before killing the master
 TimeoutStopSec=60
 WorkingDirectory=<%= @pivot_deployment_dir %>
-ExecStart=/usr/bin/firejail --profile=/etc/firejail/pivot.profile -- 
/usr/bin/nodejs <%= @pivot_deployment_dir %>/src/bin/pivot --config 
/etc/pivot/config.yaml
+ExecStart=/usr/bin/firejail --profile=/etc/firejail/pivot.profile -- 
/usr/bin/nodejs <%= @pivot_deployment_dir %>/src/bin/pivot --config 
/etc/pivot/config.yaml --use-segment-metadata
 SyslogIdentifier=pivot
 
 [Install]

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

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

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: [WIP] Add monuments_config for Australia

2017-09-02 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375537 )

Change subject: [WIP] Add monuments_config for Australia
..

[WIP] Add monuments_config for Australia

WIP due to missing fields and potential project/language issues

Change-Id: I2e271c89a6455f524cf5117fbf78733368dd9bf3
---
A erfgoedbot/monuments_config/au-_en.json
1 file changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/37/375537/1

diff --git a/erfgoedbot/monuments_config/au-_en.json 
b/erfgoedbot/monuments_config/au-_en.json
new file mode 100644
index 000..5f1d0bb
--- /dev/null
+++ b/erfgoedbot/monuments_config/au-_en.json
@@ -0,0 +1,31 @@
+{
+"country": "au",
+"lang": "en",
+"description": "Commonwealth and National heritage sites in Australia in 
English",
+"type": "sparql",
+"project": "wikipedia",
+"table": "monuments_au_(en)",
+"commonsTemplate": "Cultural Heritage Australia",
+"commonsTrackerCategory": "Cultural heritage monuments in Australia with 
known IDs",
+"commonsCategoryBase": "Cultural heritage monuments in Australia",
+"unusedImagesPage": "",
+"imagesWithoutIdPage": "",
+"missingCommonscatPage": "",
+"sparql": "{ ?item wdt:P3008 ?id . {?item wdt:P1435 wd:Q30108476 . } UNION 
{ ?item wdt:P1435 wd:Q20747146 . } FILTER(xsd:integer(?id) > 105000 )}",
+"sql_lang": "English  # Wikidata",
+"sql_country": "Australia",
+"sql_data": {
+"dataset": {
+"value": "au",
+"type": "Text"
+},
+"lang": {
+"value": "en",
+"type": "Text"
+},
+"adm0": {
+"value": "au",
+"type": "Text"
+}
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e271c89a6455f524cf5117fbf78733368dd9bf3
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] mediawiki...AccountInfo[master]: Convert AccountInfo.alias.php to use PHP short array syntax

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

Change subject: Convert AccountInfo.alias.php to use PHP short array syntax
..

Convert AccountInfo.alias.php to use PHP short array syntax

Change-Id: I2d85afda3c1dd3b888dba91dea4ae16217c1d509
---
M AccountInfo.alias.php
1 file changed, 97 insertions(+), 98 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AccountInfo 
refs/changes/36/375536/2

diff --git a/AccountInfo.alias.php b/AccountInfo.alias.php
index 184ab26..90d8230 100644
--- a/AccountInfo.alias.php
+++ b/AccountInfo.alias.php
@@ -5,166 +5,165 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'AccountInfo' => array( 'AccountInfo' ),
-);
+$specialPageAliases['en'] = [
+   'AccountInfo' => [ 'AccountInfo' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'AccountInfo' => array( 'معلومات_الحساب' ),
-);
+$specialPageAliases['ar'] = [
+   'AccountInfo' => [ 'معلومات_الحساب' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'AccountInfo' => array( 'معلومات_الحساب' ),
-);
+$specialPageAliases['arz'] = [
+   'AccountInfo' => [ 'معلومات_الحساب' ],
+];
 
 /** Western Balochi (بلوچی رخشانی) */
-$specialPageAliases['bgn'] = array(
-   'AccountInfo' => array( 'هیساب_ئی_مالومات' ),
-);
+$specialPageAliases['bgn'] = [
+   'AccountInfo' => [ 'هیساب_ئی_مالومات' ],
+];
 
 /** German (Deutsch) */
-$specialPageAliases['de'] = array(
-   'AccountInfo' => array( 'Konteninformation' ),
-);
+$specialPageAliases['de'] = [
+   'AccountInfo' => [ 'Konteninformation' ],
+];
 
 /** Zazaki (Zazaki) */
-$specialPageAliases['diq'] = array(
-   'AccountInfo' => array( 'MelumatêHesabi' ),
-);
+$specialPageAliases['diq'] = [
+   'AccountInfo' => [ 'MelumatêHesabi' ],
+];
 
 /** Greek (Ελληνικά) */
-$specialPageAliases['el'] = array(
-   'AccountInfo' => array( 'ΠληροφορίεςΛογαριασμού' ),
-);
+$specialPageAliases['el'] = [
+   'AccountInfo' => [ 'ΠληροφορίεςΛογαριασμού' ],
+];
 
 /** Spanish (español) */
-$specialPageAliases['es'] = array(
-   'AccountInfo' => array( 'Información_de_la_cuenta', ),
-);
+$specialPageAliases['es'] = [
+   'AccountInfo' => [ 'Información_de_la_cuenta', ],
+];
 
 /** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-   'AccountInfo' => array( 'اطلاعات_حساب' ),
-);
+$specialPageAliases['fa'] = [
+   'AccountInfo' => [ 'اطلاعات_حساب' ],
+];
 
 /** Finnish (suomi) */
-$specialPageAliases['fi'] = array(
-   'AccountInfo' => array( 'Tunnuksen_tiedot' ),
-);
+$specialPageAliases['fi'] = [
+   'AccountInfo' => [ 'Tunnuksen_tiedot' ],
+];
 
 /** Western Frisian (Frysk) */
-$specialPageAliases['fy'] = array(
-   'AccountInfo' => array( 'AccountYnformaasje' ),
-);
+$specialPageAliases['fy'] = [
+   'AccountInfo' => [ 'AccountYnformaasje' ],
+];
 
 /** Gujarati (ગુજરાતી) */
-$specialPageAliases['gu'] = array(
-   'AccountInfo' => array( 'ખાતાંનીમાહિતી' ),
-);
+$specialPageAliases['gu'] = [
+   'AccountInfo' => [ 'ખાતાંનીમાહિતી' ],
+];
 
 /** Hawaiian (Hawai`i) */
-$specialPageAliases['haw'] = array(
-   'AccountInfo' => array( 'ʻIkeMōʻaukaki', 'IkeMoaukaki' ),
-);
+$specialPageAliases['haw'] = [
+   'AccountInfo' => [ 'ʻIkeMōʻaukaki', 'IkeMoaukaki' ],
+];
 
 /** Hebrew (עברית) */
-$specialPageAliases['he'] = array(
-   'AccountInfo' => array( 'מידע_על_החשבון' ),
-);
+$specialPageAliases['he'] = [
+   'AccountInfo' => [ 'מידע_על_החשבון' ],
+];
 
 /** Upper Sorbian (hornjoserbsce) */
-$specialPageAliases['hsb'] = array(
-   'AccountInfo' => array( 'Kontowe_informacije' ),
-);
+$specialPageAliases['hsb'] = [
+   'AccountInfo' => [ 'Kontowe_informacije' ],
+];
 
 /** Italian (italiano) */
-$specialPageAliases['it'] = array(
-   'AccountInfo' => array( 'InfoUtenza' ),
-);
+$specialPageAliases['it'] = [
+   'AccountInfo' => [ 'InfoUtenza' ],
+];
 
 /** Georgian (ქართული) */
-$specialPageAliases['ka'] = array(
-   'AccountInfo' => array( 'ანგარიშის_ინფო' ),
-);
+$specialPageAliases['ka'] = [
+   'AccountInfo' => [ 'ანგარიშის_ინფო' ],
+];
 
 /** Korean (한국어) */
-$specialPageAliases['ko'] = array(
-   'AccountInfo' => array( '계정정보' ),
-);
+$specialPageAliases['ko'] = [
+   'AccountInfo' => [ '계정정보' ],
+];
 
 /** Luxembourgish (Lëtzebuergesch) */
-$specialPageAliases['lb'] = array(
-   'AccountInfo' => array( 'Informatioun_vum_Benotzerkont' ),
-);
+$specialPageAliases['lb'] = [
+   'AccountInfo' => [ 'Informatioun_vum_Benotzerkont' ],
+];
 
 /** Northern Luri (لۊری شومالی) */
-$specialPageAliases['lrc'] = array(
-   'AccountInfo' => array( 'دوٙنسمأنیا_حئساڤ' ),
-);
+$specialPageAliases['lrc'] = [
+   'AccountInfo' => 

[MediaWiki-commits] [Gerrit] mediawiki...DeleteOwn[master]: Convert DeleteOwn to extension.json

2017-09-02 Thread MGChecker (Code Review)
MGChecker has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375535 )

Change subject: Convert DeleteOwn to extension.json
..

Convert DeleteOwn to extension.json

Change-Id: Iccf8eacf185550adf76fc7138b1c076f6b829cb9
---
M DeleteOwn.php
A DeleteOwn_body.php
A extension.json
M i18n/en.json
M i18n/qqq.json
5 files changed, 187 insertions(+), 195 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DeleteOwn 
refs/changes/35/375535/1

diff --git a/DeleteOwn.php b/DeleteOwn.php
index e13d63d..68d8ca0 100644
--- a/DeleteOwn.php
+++ b/DeleteOwn.php
@@ -1,197 +1,9 @@
 
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @ingroup Extensions
- * @file
- *
- * @author Tyler Romeo (Parent5446) 
- * @license https://www.gnu.org/licenses/gpl-3.0.html GNU General Public 
License 3.0 or later
- */
-
-// Ensure that the script cannot be executed outside of MediaWiki.
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This is an extension to MediaWiki and cannot be run standalone.' 
);
+if ( version_compare( $wgVersion, '1.29', '=>' ) ) {
+   wfLoadExtension( 'DeleteOwn' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['DeleteOwn'] = __DIR__ . '/i18n';
+   return;
+} else {
+   die( 'This version of the DelelteOwn extension requires MediaWiki 
1.29+' );
 }
-
-// Display extension properties on MediaWiki.
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'DeleteOwn',
-   'descriptionmsg' => 'deleteown-desc',
-   'version' => '1.2.0',
-   'author' => array(
-   'Tyler Romeo',
-   '...'
-   ),
-   'url' => 'https://www.mediawiki.org/wiki/Extension:DeleteOwn',
-   'license-name' => 'GPL-3.0+'
-);
-
-// Register extension messages and other localisation.
-$wgMessagesDirs['DeleteOwn'] = __DIR__ . '/i18n';
-
-/**
- * The expiry for when a page can no longer be deleted by its author.
- *
- * Can be a single integer value, which is applied to all pages,
- * or can be an array of namespaces mapped to individual expiry values.
- * An expiry of 0 (or not specifying a namespace key) disables deletion
- * and an expiry of INF disables the expiry.
- */
-$wgDeleteOwnExpiry = INF;
-
-$wgAvailableRights[] = 'deleteown';
-
-Hooks::register( 'TitleQuickPermissions',
-   /**
-* Check if a user can delete a page they authored but has not
-* been edited by anybody else and is younger than a threshold.
-*
-* @param Title $title Title being accessed
-* @param User $user User performing the action
-* @param string $action The action being performed
-* @param array &$errors Permissions errors to be returned
-* @param bool $doExpensiveQueries Whether to do expensive DB queries
-* @return bool False (to stop permissions checks) if user is allowed 
to delete
-*/
-   function( Title $title, User $user, $action, array &$errors, 
$doExpensiveQueries ) {
-   global $wgDeleteOwnExpiry;
-
-   // If not on the delete action, or if the user can delete 
normally, return.
-   // Also, if the user doesn't have the deleteown permissions, 
none of this is applicable.
-   if ( $action !== 'delete' || $user->isAllowed( 'delete' ) || 
!$user->isAllowed( 'deleteown' ) ) {
-   return true;
-   }
-
-   // Determine an expiry based on the namespace.
-   $ns = $title->getNamespace();
-   if ( !is_array( $wgDeleteOwnExpiry ) ) {
-   // Non-array expiry, means apply this expiry to all 
namespaces.
-   $expiry = $wgDeleteOwnExpiry;
-   } elseif ( array_key_exists( $ns, $wgDeleteOwnExpiry ) ) {
-   // Namespace-specific expiry exists
-   $expiry = $wgDeleteOwnExpiry[$ns];
-   } else {
-   // Couldn't find an expiry, so disable.
-   $expiry = INF;
-   }
-
-   // First check if the user is the author.
-   

[MediaWiki-commits] [Gerrit] pywikibot/i18n[master]: Remove final dot/period (.) to archivebot.py summary

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

Change subject: Remove final dot/period (.) to archivebot.py summary
..

Remove final dot/period (.) to archivebot.py summary

Just removing it from en.json, translatewiki.net translations might need
to be updated as well or just let the bot mark them as !!FUZZY!!. I'd
update them all here, but I lack the technical knowledge to do it.

Bug: T174286
Change-Id: I959880bf6c819195c2fdfdd091cb2f6e8af33497
---
M archivebot/en.json
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/i18n 
refs/changes/34/375534/2

diff --git a/archivebot/en.json b/archivebot/en.json
index 7c28f6f..ef93ca3 100644
--- a/archivebot/en.json
+++ b/archivebot/en.json
@@ -5,8 +5,8 @@
]
},
"archivebot-archive-full": "(ARCHIVE FULL)",
-   "archivebot-archive-summary": "Bot: Archiving %(count)d 
{{PLURAL:%(count)d|thread|threads}} from [[%(from)s]].",
+   "archivebot-archive-summary": "Bot: Archiving %(count)d 
{{PLURAL:%(count)d|thread|threads}} from [[%(from)s]]",
"archivebot-archiveheader": "{{talk archive}}",
"archivebot-older-than": "older than %(duration)s",
-   "archivebot-page-summary": "Bot: Archiving %(count)d 
{{PLURAL:%(count)d|thread|threads}} (%(why)s) to %(archives)s."
+   "archivebot-page-summary": "Bot: Archiving %(count)d 
{{PLURAL:%(count)d|thread|threads}} (%(why)s) to %(archives)s"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I959880bf6c819195c2fdfdd091cb2f6e8af33497
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/i18n
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Drop compatibility with PHP 5.3

2017-09-02 Thread Code Review
Matěj Suchánek has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375533 )

Change subject: Drop compatibility with PHP 5.3
..

Drop compatibility with PHP 5.3

Since 5.4, $this works inside closures.

Change-Id: I6987f76a1e33d6d7ab020a57186e5477186bbf2e
---
M includes/filerepo/LocalRepo.php
M includes/filerepo/file/File.php
M includes/page/WikiPage.php
M includes/skins/Skin.php
M tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
5 files changed, 12 insertions(+), 18 deletions(-)


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

diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php
index 20d51c2..ed00793 100644
--- a/includes/filerepo/LocalRepo.php
+++ b/includes/filerepo/LocalRepo.php
@@ -274,14 +274,13 @@
);
};
 
-   $that = $this;
$applyMatchingFiles = function ( ResultWrapper $res, 
&$searchSet, &$finalFiles )
-   use ( $that, $fileMatchesSearch, $flags )
+   use ( $fileMatchesSearch, $flags )
{
global $wgContLang;
-   $info = $that->getInfo();
+   $info = $this->getInfo();
foreach ( $res as $row ) {
-   $file = $that->newFileFromRow( $row );
+   $file = $this->newFileFromRow( $row );
// There must have been a search for this DB 
key, but this has to handle the
// cases were title capitalization is different 
on the client and repo wikis.
$dbKeysLook = [ strtr( $file->getName(), ' ', 
'_' ) ];
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 460fe51..4ea0973 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1282,11 +1282,10 @@
// Thumbnailing a very large file could result in network 
saturation if
// everyone does it at once.
if ( $this->getSize() >= 1e7 ) { // 10MB
-   $that = $this;
$work = new PoolCounterWorkViaCallback( 
'GetLocalFileCopy', sha1( $this->getName() ),
[
-   'doWork' => function () use ( $that ) {
-   return $that->getLocalRefPath();
+   'doWork' => function () {
+   return $this->getLocalRefPath();
}
]
);
diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 5f6e455..5a0670c 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -878,11 +878,10 @@
}
 
// Update the DB post-send if the page has not cached since now
-   $that = $this;
$latest = $this->getLatest();
DeferredUpdates::addCallableUpdate(
-   function () use ( $that, $retval, $latest ) {
-   $that->insertRedirectEntry( $retval, $latest );
+   function () use ( $retval, $latest ) {
+   $this->insertRedirectEntry( $retval, $latest );
},
DeferredUpdates::POSTSEND,
wfGetDB( DB_MASTER )
diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php
index e1d0034..df7a9ed 100644
--- a/includes/skins/Skin.php
+++ b/includes/skins/Skin.php
@@ -1251,11 +1251,10 @@
function buildSidebar() {
global $wgEnableSidebarCache, $wgSidebarCacheExpiry;
 
-   $that = $this;
-   $callback = function () use ( $that ) {
+   $callback = function () {
$bar = [];
-   $that->addToSidebar( $bar, 'sidebar' );
-   Hooks::run( 'SkinBuildSidebar', [ $that, &$bar ] );
+   $this->addToSidebar( $bar, 'sidebar' );
+   Hooks::run( 'SkinBuildSidebar', [ $this, &$bar ] );
 
return $bar;
};
diff --git 
a/tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php 
b/tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
index 04b7ee0..4f917e9 100644
--- a/tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
+++ b/tests/phpunit/includes/changes/ChangesListStringOptionsFilterGroupTest.php
@@ -40,8 +40,6 @@
 * @dataProvider provideModifyQuery
 */
public function testModifyQuery( $filterDefinitions, $expectedValues, 
$input ) {
-

[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: Fix fatal typo

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

Change subject: Fix fatal typo
..


Fix fatal typo

Follow-up to I1cb475100b78e8e03c38f30eabd1b14c097b465e

Change-Id: I3409297a4bce42bad40faf3955ffde7a112cbcd2
---
M includes/LinkPage.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/LinkPage.class.php b/includes/LinkPage.class.php
index ca58cca..61fe0c5 100644
--- a/includes/LinkPage.class.php
+++ b/includes/LinkPage.class.php
@@ -324,7 +324,7 @@
}
 
if ( class_exists( 'RandomGameUnit' ) ) {
-   $this->getContext->getOutput()->addModuleStyles( 
'ext.RandomGameUnit.css' );
+   $this->getContext()->getOutput()->addModuleStyles( 
'ext.RandomGameUnit.css' );
return RandomGameUnit::getRandomGameUnit();
} else {
return '';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3409297a4bce42bad40faf3955ffde7a112cbcd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...LinkFilter[master]: Fix fatal typo

2017-09-02 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375532 )

Change subject: Fix fatal typo
..

Fix fatal typo

Follow-up to I1cb475100b78e8e03c38f30eabd1b14c097b465e

Change-Id: I3409297a4bce42bad40faf3955ffde7a112cbcd2
---
M includes/LinkPage.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LinkFilter 
refs/changes/32/375532/1

diff --git a/includes/LinkPage.class.php b/includes/LinkPage.class.php
index ca58cca..61fe0c5 100644
--- a/includes/LinkPage.class.php
+++ b/includes/LinkPage.class.php
@@ -324,7 +324,7 @@
}
 
if ( class_exists( 'RandomGameUnit' ) ) {
-   $this->getContext->getOutput()->addModuleStyles( 
'ext.RandomGameUnit.css' );
+   $this->getContext()->getOutput()->addModuleStyles( 
'ext.RandomGameUnit.css' );
return RandomGameUnit::getRandomGameUnit();
} else {
return '';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3409297a4bce42bad40faf3955ffde7a112cbcd2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LinkFilter
Gerrit-Branch: master
Gerrit-Owner: Jack Phoenix 

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


[MediaWiki-commits] [Gerrit] mediawiki...AbuseFilter[master]: Get LinkRenderer instance from special page

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

Change subject: Get LinkRenderer instance from special page
..


Get LinkRenderer instance from special page

Just use SpecialPage::getLinkRenderer().

Change-Id: I7c6e839ed8005e666e7c3c1c08dada8aaadbd28f
---
M includes/Views/AbuseFilterView.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/includes/Views/AbuseFilterView.php 
b/includes/Views/AbuseFilterView.php
index adb3b87..c352d8d 100644
--- a/includes/Views/AbuseFilterView.php
+++ b/includes/Views/AbuseFilterView.php
@@ -1,6 +1,5 @@
 mPage = $page;
$this->mParams = $params;
$this->setContext( $this->mPage->getContext() );
-   $this->linkRenderer = 
MediaWikiServices::getInstance()->getLinkRenderer();
+   $this->linkRenderer = $page->getLinkRenderer();
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c6e839ed8005e666e7c3c1c08dada8aaadbd28f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: Huji 
Gerrit-Reviewer: Jackmcbarn 
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...AbuseFilter[master]: Remove HitCounters from AbuseFilter and use hooks instead

2017-09-02 Thread Huji (Code Review)
Huji has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375531 )

Change subject: Remove HitCounters from AbuseFilter and use hooks instead
..

Remove HitCounters from AbuseFilter and use hooks instead

Bug: T59059
Change-Id: I38cd7cbf3e595890b53624a477010bd49c9b8552
---
M includes/AbuseFilter.class.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AbuseFilter 
refs/changes/31/375531/1

diff --git a/includes/AbuseFilter.class.php b/includes/AbuseFilter.class.php
index ff2822b..1ba4567 100644
--- a/includes/AbuseFilter.class.php
+++ b/includes/AbuseFilter.class.php
@@ -350,6 +350,8 @@
}
}
 
+   Hooks::run( 'AbuseFilter-generateTitleVars', [ $vars, $title, 
$prefix ] );
+
// Use restrictions.
global $wgRestrictionTypes;
foreach ( $wgRestrictionTypes as $action ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I38cd7cbf3e595890b53624a477010bd49c9b8552
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Huji 

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


[MediaWiki-commits] [Gerrit] labs...heritage[master]: Investigate harvest of large wikidata dataset

2017-09-02 Thread Lokal Profil (Code Review)
Lokal Profil has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375529 )

Change subject: Investigate harvest of large wikidata dataset
..

Investigate harvest of large wikidata dataset

Using the biggest one we currently have to ensure both the sparql
and sql side survive.

Bug: T172691
Change-Id: If7dc163282f5fa7a4fdd6d42f4255aaeec602d98
---
A erfgoedbot/monuments_config/se-fornmin-wd_sv.json
1 file changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/heritage 
refs/changes/29/375529/1

diff --git a/erfgoedbot/monuments_config/se-fornmin-wd_sv.json 
b/erfgoedbot/monuments_config/se-fornmin-wd_sv.json
new file mode 100644
index 000..d17ec53
--- /dev/null
+++ b/erfgoedbot/monuments_config/se-fornmin-wd_sv.json
@@ -0,0 +1,30 @@
+{
+"country": "se-fornmin-wd",
+"lang": "sv",
+"description": "Fornminne Monuments in Sweden in Swedish",
+"type": "sparql",
+"project": "wikipedia",
+"table": "monuments_se-fornmin-wd_(sv)",
+"commonsTemplate": "Fornminne",
+"commonsTrackerCategory": "Archaeological monuments in Sweden with known 
IDs",
+"commonsCategoryBase": "Archaeological monuments in Sweden",
+"unusedImagesPage": "Wikipedia:Projekt kulturarv/Oanvända bilder av 
fornlämningar i Sverige",
+"imagesWithoutIdPage": "Wikipedia:Projekt kulturarv/Bilder av 
fornlämningar i Sverige utan ID",
+"sparql": "{ ?item wdt:P1260 ?raa_id . ?item wdt:P1435 wd:Q21287602 
FILTER(REGEX(?raa_id, 'raa/fmi/', 'i')) BIND(REPLACE(?raa_id, 'raa/fmi/', '', 
'i') AS ?id) }",
+"sql_lang": "Swedish  # Wikidata",
+"sql_country": "Sweden (Fornminne Monuments)",
+"sql_data": {
+"dataset": {
+"value": "se-fornmin-wd",
+"type": "Text"
+},
+"lang": {
+"value": "sv",
+"type": "Text"
+},
+"adm0": {
+"value": "se",
+"type": "Text"
+}
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If7dc163282f5fa7a4fdd6d42f4255aaeec602d98
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/heritage
Gerrit-Branch: master
Gerrit-Owner: Lokal Profil 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Apex: Only apply margin to label if visible

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

Change subject: Apex: Only apply margin to label if visible
..

Apex: Only apply margin to label if visible

Otherwise frameless icon-only button gets extra right-padding.

Change-Id: I8f2652a0ba7491047595728ce5407973ca7df968
---
M src/themes/apex/elements.less
1 file changed, 9 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/28/375528/1

diff --git a/src/themes/apex/elements.less b/src/themes/apex/elements.less
index 639a7d1..6e8277a 100644
--- a/src/themes/apex/elements.less
+++ b/src/themes/apex/elements.less
@@ -64,11 +64,6 @@
 
> .oo-ui-buttonElement-button {
padding: @padding-frameless;
-
-   > .oo-ui-labelElement-label {
-   color: @color-base;
-   margin-left: 0.25em;
-   }
}
 
&.oo-ui-indicatorElement { // Workaround for label/icon 
& indicator combinations
@@ -78,6 +73,15 @@
}
}
 
+   &.oo-ui-labelElement {
+   > .oo-ui-buttonElement-button {
+   > .oo-ui-labelElement-label {
+   color: @color-base;
+   margin-left: 0.25em;
+   }
+   }
+   }
+
&.oo-ui-indicatorElement {
> .oo-ui-buttonElement-button {
padding: 0;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f2652a0ba7491047595728ce5407973ca7df968
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
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...InputBox[master]: Add tour parameter

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

Change subject: Add tour parameter
..


Add tour parameter

Add an optional tour parameter with adds `=[x]` to the local 
Special:Search URL
Remove whitespace error
Add test
Modify test HTML (x3)

Bug: T174077
Change-Id: Iaaf1d04e1939bd555cacd4ea3ac4390d7e43b19d
---
M InputBox.classes.php
M tests/inputBoxParserTests.txt
2 files changed, 23 insertions(+), 1 deletion(-)

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



diff --git a/InputBox.classes.php b/InputBox.classes.php
index ffa21dd..5b80928 100644
--- a/InputBox.classes.php
+++ b/InputBox.classes.php
@@ -37,6 +37,7 @@
private $mPrefix = '';
private $mDir = '';
private $mSearchFilter = '';
+   private $mTour = '';
 
/* Functions */
 
@@ -172,6 +173,10 @@
 
if ( $this->mSearchFilter != '' ) {
$htmlOut .= Html::hidden( 'searchfilter', 
$this->mSearchFilter );
+   }
+
+   if ( $this->mTour != '' ) {
+   $htmlOut .= Html::hidden( 'tour', $this->mTour );
}
 
$htmlOut .= $this->mBR;
@@ -624,7 +629,8 @@
'inline' => 'mInline',
'prefix' => 'mPrefix',
'dir' => 'mDir',
-   'searchfilter' => 'mSearchFilter'
+   'searchfilter' => 'mSearchFilter',
+   'tour' => 'mTour'
];
foreach ( $options as $name => $var ) {
if ( isset( $values[$name] ) ) {
diff --git a/tests/inputBoxParserTests.txt b/tests/inputBoxParserTests.txt
index d71fdf6..63e0d62 100644
--- a/tests/inputBoxParserTests.txt
+++ b/tests/inputBoxParserTests.txt
@@ -313,3 +313,19 @@
 
 
 !! end
+
+!! test
+InputBox type=search with tour
+!! wikitext
+
+type=search
+tour=test
+
+!! html+tidy
+
+
+
+
+
+
+!! end
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaaf1d04e1939bd555cacd4ea3ac4390d7e43b19d
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/InputBox
Gerrit-Branch: master
Gerrit-Owner: Samtar 
Gerrit-Reviewer: Eloquence 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Samtar 
Gerrit-Reviewer: Urbanecm 
Gerrit-Reviewer: Zppix 
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]: [DOC] Differentiate between generators and filters in -help

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

Change subject: [DOC] Differentiate between generators and filters in -help
..


[DOC] Differentiate between generators and filters in -help

- also sort filter parameters

Bug: T167581
Change-Id: I7054328600292f3306b000d61151d32fa7293f08
---
M pywikibot/bot.py
M pywikibot/pagegenerators.py
2 files changed, 59 insertions(+), 51 deletions(-)

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



diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 500fb5d..baa57ac 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -995,7 +995,9 @@
 module_name = "no_module"
 
 globalHelp = u'''
-Global arguments available for all bots:
+GLOBAL OPTIONS
+==
+(Global arguments available for all bots)
 
 -dir:PATH Read the bot's configuration data from directory given by
   PATH, instead of from the default directory.
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 32c1c22..f775d54 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -66,9 +66,8 @@
 # a generator
 
 parameterHelp = """\
-
--catfilterFilter the page generator to only yield pages in the
-  specified category. See -cat for argument format.
+GENERATOR OPTIONS
+=
 
 -cat  Work on all pages which are in a specific category.
   Argument can also be given as "-cat:categoryname" or
@@ -144,37 +143,12 @@
 
   In some cases it must be written as -logevents:"move,Usr,20"
 
--namespaces   Filter the page generator to only yield pages in the
--namespacespecified namespaces. Separate multiple namespace
--ns   numbers or names with commas.
-  Examples:
-
-  -ns:0,2,4
-  -ns:Help,MediaWiki
-
-  You may use a preleading "not" to exclude the namespace.
-  Examples:
-  -ns:not:2,3
-  -ns:not:Help,File
-
-  If used with -newpages/-random/-randomredirect,
-  -namespace/ns must be provided before
-  -newpages/-random/-randomredirect.
-  If used with -recentchanges, efficiency is improved if
-  -namespace/ns is provided before -recentchanges.
-
-  If used with -start, -namespace/ns shall contain only one
-  value.
-
 -interwikiWork on the given page and all equivalent pages in other
   languages. This can, for example, be used to fight
   multi-site spamming.
   Attention: this will cause the bot to modify
   pages on several wiki sites, this is not well tested,
   so check your edits!
-
--limit:n  When used with any other argument that specifies a set
-  of pages, work on no more than n pages in total.
 
 -linksWork on all pages that are linked from a certain page.
   Argument can also be given as "-links:linkingpagetitle".
@@ -225,22 +199,6 @@
   default value is start:!
 
 -prefixindex  Work on pages commencing with a common prefix.
-
--subpage:nFilters pages to only those that have depth n
-  i.e. a depth of 0 filters out all pages that are subpages,
-  and a depth of 1 filters out all pages that are subpages of
-  subpages.
-
--titleregex   A regular expression that needs to match the article title
-  otherwise the page won't be returned.
-  Multiple -titleregex:regexpr can be provided and the page
-  will be returned if title is matched by any of the regexpr
-  provided.
-  Case insensitive regular expressions will be used and
-  dot matches any character.
-
--titleregexnotLike -titleregex, but return the page only if the regular
-  expression does not match.
 
 -transcludes  Work on all pages that use a certain template.
   Argument can also be given as "-transcludes:Title".
@@ -315,6 +273,13 @@
   "-pageid:pageid1,pageid2,." or "-pageid:'pageid1|pageid2|..'"
   and supplied multiple times for multiple pages.
 
+
+FILTER OPTIONS
+==
+
+-catfilterFilter the page generator to only yield pages in the
+  specified category. See -cat generator for argument format.
+
 -grep A regular expression that needs to match the article
   otherwise the page won't be returned.
   Multiple -grep:regexpr can be provided and the page will
@@ -323,11 +288,32 @@
   Case insensitive regular expressions 

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [DOC] Improve deprecation warnings

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

Change subject: [DOC] Improve deprecation warnings
..


[DOC] Improve deprecation warnings

- Provide a better deprecation warning for DataSite data access methods
- Note: There is no equivalent value for info['type'] and urls property

Bug: T170075
Change-Id: I89bad3b050fb0dee3187c26468dc1bcdec35ee27
---
M pywikibot/site.py
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index e2bc6cc..d2756e3 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -7276,8 +7276,26 @@
 props = attr.replace("get_", "")
 if props in ['info', 'sitelinks', 'aliases', 'labels',
  'descriptions', 'urls']:
+if props == 'info':
+instead = (
+'\n'
+"{'lastrevid': WikibasePage.latest_revision_id,\n"
+" 'pageid': WikibasePage.pageid,\n"
+" 'title': WikibasePage.title(),\n"
+" 'modified': WikibasePage._timestamp,\n"
+" 'ns': WikibasePage.namespace(),\n"
+" 'type': WikibasePage.entity_type, # for subclasses\n"
+" 'id': WikibasePage.id"
+'}\n')
+elif props == 'sitelinks':
+instead = 'ItemPage.sitelinks'
+elif props in ('aliases', 'labels', 'descriptions'):
+instead = ('WikibasePage.{0} after WikibasePage.get()'
+   .format(attr))
+else:  # urls
+instead = None
 issue_deprecation_warning('DataSite.{0}()'.format(attr),
-  'WikibasePage', 2)
+  instead, 2)
 if props == 'urls':
 props = 'sitelinks/urls'
 method = self._get_propertyitem

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

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

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Use composer unit tests for some extensions

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

Change subject: Use composer unit tests for some extensions
..

Use composer unit tests for some extensions

Change-Id: I9f6f0555e7203cfa7b9dcca8b74bf3b541e43ce4
---
M zuul/layout.yaml
M zuul/parameter_functions.py
2 files changed, 7 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/27/375527/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index 3d838e3..9ffb293 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -5174,7 +5174,7 @@
 
   - name: mediawiki/extensions/RegexFun
 template:
-  - name: extension-unittests-non-voting
+  - name: extension-unittests-composer-non-voting
   - name: mwgate-npm
 
   - name: mediawiki/extensions/RegexFunctions
@@ -5453,7 +5453,7 @@
 
   - name: mediawiki/extensions/SphinxSearch
 template:
-  - name: extension-unittests-non-voting
+  - name: extension-unittests-composer-non-voting
   - name: mwgate-npm
 
   - name: mediawiki/extensions/SportsTeams
@@ -5975,7 +5975,7 @@
   # Depends on SemanticForms which is on GitHub
   - name: mediawiki/extensions/HierarchyBuilder
 template:
- - name: extension-unittests-non-voting
+ - name: extension-unittests-composer-non-voting
  - name: mwgate-npm
 
   - name: mediawiki/extensions/HitCounters
@@ -5986,7 +5986,7 @@
   # Require $wgNamespacesWithSubpages set to TRUE in the MAIN namespace.
   - name: mediawiki/extensions/Html2Wiki
 template:
- - name: extension-unittests-non-voting
+ - name: extension-unittests-composer-non-voting
  - name: mwgate-npm
 
   - name: mediawiki/extensions/ImageTagging
@@ -6091,7 +6091,7 @@
   # Depends on Validator and Parse
   - name: mediawiki/extensions/ParserFun
 template:
- - name: extension-unittests-non-voting
+ - name: extension-unittests-composer-non-voting
  - name: mwgate-npm
 
   # Empty repo - 20151127
@@ -6528,7 +6528,7 @@
 
   - name: mediawiki/extensions/SemanticLinks
 template:
-  - name: extension-unittests-composer
+  - name: extension-unittests-composer-non-voting
   - name: mwgate-npm
 
   - name: mediawiki/extensions/SemanticMediaWiki
diff --git a/zuul/parameter_functions.py b/zuul/parameter_functions.py
index edacf33..e7cde1f 100644
--- a/zuul/parameter_functions.py
+++ b/zuul/parameter_functions.py
@@ -213,6 +213,7 @@
 'PropertySuggester': ['Wikibase'],
 'QuickSurveys': ['EventLogging'],
 'QuizGame': ['SocialProfile'],
+'RegexFun': ['ParserFunctions', 'Arrays'],
 'RelatedArticles': ['BetaFeatures', 'MobileFrontend'],
 'Score': ['VisualEditor'],
 'SemanticLinks': ['VisualEditor'],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsMaps[master]: Add php-parallel-lint

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

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: I05720c1d48b8c21351f10edc56a3bc6a634c1a78
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index e62fc28..9dfe80b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/
 vendor/
+composer.lock
 
 .svn
 *~
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05720c1d48b8c21351f10edc56a3bc6a634c1a78
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsMaps
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add Config in category_redirect.py for sr.wiki

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

Change subject: Add Config in category_redirect.py for sr.wiki
..


Add Config in category_redirect.py for sr.wiki

Added category that contains all redirected category pages for 
category_redirect script

Bug: T174853
Change-Id: I80ee8f176f88e557945980ded1eb4d51f5ef8a7d
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index d855eb5..6af1688 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -90,6 +90,7 @@
 'sco': "Category:Wikipaedia soft redirectit categories",
 'simple': "Category:Category redirects",
 'sh': u"Kategorija:Preusmjerene kategorije Wikipedije",
+'sr': 'Категорија:Wikipedia soft redirected categories',
 'vi': u"Thể loại:Thể loại đổi hướng",
 'zh': u"Category:已重定向的分类",
 'ro': 'Categorie:Categorii de redirecționare',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80ee8f176f88e557945980ded1eb4d51f5ef8a7d
Gerrit-PatchSet: 7
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Zoranzoki21 
Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com>
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] pywikibot/core[master]: Add Config in category_redirect.py for hi.wiki

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

Change subject: Add Config in category_redirect.py for hi.wiki
..


Add Config in category_redirect.py for hi.wiki

Bug: T174848
Change-Id: Ieebd763a8d937fa1d6e8c10958a975b0383938b4
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index a401fd9..d855eb5 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -80,6 +80,7 @@
 'en': "Category:Wikipedia soft redirected categories",
 'es': "Categoría:Wikipedia:Categorías redirigidas",
 'fa': u"رده:رده‌های منتقل‌شده",
+'hi': 'श्रेणी:विकिपीडिया श्रेणी अनुप्रेषित',
 'hu': "Kategória:Kategóriaátirányítások",
 'ja': "Category:移行中のカテゴリ",
 'no': "Kategori:Wikipedia omdirigertekategorier",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieebd763a8d937fa1d6e8c10958a975b0383938b4
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
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] pywikibot/core[master]: noreferences.py: arwiki config

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

Change subject: noreferences.py: arwiki config
..


noreferences.py: arwiki config

Bug: T174615
Change-Id: Ibb553f0bf3282cdf264ca31a2c31c050d79e6ee0
---
M scripts/noreferences.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/scripts/noreferences.py b/scripts/noreferences.py
index b2e83f5..504c638 100755
--- a/scripts/noreferences.py
+++ b/scripts/noreferences.py
@@ -380,7 +380,7 @@
 referencesTemplates = {
 'wikipedia': {
 'ar': ['Reflist', 'مراجع', 'ثبت المراجع', 'ثبت_المراجع',
-   'بداية المراجع', 'نهاية المراجع'],
+   'بداية المراجع', 'نهاية المراجع', 'المراجع'],
 'be': [u'Зноскі', u'Примечания', u'Reflist', u'Спіс заўваг',
u'Заўвагі'],
 'be-tarask': [u'Зноскі'],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb553f0bf3282cdf264ca31a2c31c050d79e6ee0
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: http_tests.py: Update the redirect target for www.gandi.eu

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

Change subject: http_tests.py: Update the redirect target for www.gandi.eu
..


http_tests.py: Update the redirect target for www.gandi.eu

Bug: T174798
Change-Id: I0c541fbb21c942ec8d0023a6e6e48cfcd4186195
---
M tests/http_tests.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/http_tests.py b/tests/http_tests.py
index 9404ffa..ac784bf 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -212,7 +212,7 @@
 r = http.fetch(uri='http://www.gandi.eu')
 self.assertEqual(r.status, 200)
 self.assertEqual(r.data.url,
- 'https://www.gandi.net/')
+ 'https://www.gandi.net/en')
 
 
 class UserAgentTestCase(TestCase):

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add self.cat_redirect_cat = { on serbian language

2017-09-02 Thread Zoranzoki21 (Code Review)
Zoranzoki21 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375525 )

Change subject: Add self.cat_redirect_cat = { on serbian language
..

Add self.cat_redirect_cat = { on serbian language

Added category that contains all redirected category pages for 
category_redirect script

Bug: T174853

Change-Id: I80ee8f176f88e557945980ded1eb4d51f5ef8a7d
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/25/375525/2

diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 1912d70..73dd4a0 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -90,6 +90,7 @@
 'sco': "Category:Wikipaedia soft redirectit categories",
 'simple': "Category:Category redirects",
 'sh': u"Kategorija:Preusmjerene kategorije Wikipedije",
+'sr': u"Категорија:Wikipedia soft redirected categories",
 'vi': u"Thể loại:Thể loại đổi hướng",
 'zh': u"Category:已重定向的分类",
 'ro': 'Categorie:Categorii de redirecționare',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80ee8f176f88e557945980ded1eb4d51f5ef8a7d
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: 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] pywikibot/core[master]: Resolved problem with no transcluding in shell.py s...

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

Change subject: Resolved problem with no transcluding  in shell.py 
script
..


Resolved problem with no transcluding  in shell.py script

Bug: T174730

Change-Id: I8ae608338404b388b156eefde6e78d7153f7d408
---
M scripts/shell.py
1 file changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/scripts/shell.py b/scripts/shell.py
index a6b2a2b..50cff05 100755
--- a/scripts/shell.py
+++ b/scripts/shell.py
@@ -8,11 +8,6 @@
 python pwb.py shell [args]
 
 If no arguments are given, the pywikibot library will not be loaded.
-
-The following parameters are supported:
-
-
-
 """
 # (C) Pywikibot team, 2014-2017
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ae608338404b388b156eefde6e78d7153f7d408
Gerrit-PatchSet: 3
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Zoranzoki21 
Gerrit-Reviewer: Dvorapa 
Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
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...RegexFun[master]: Add php-parallel-lint

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

Change subject: Add php-parallel-lint
..

Add php-parallel-lint

php-lint will test for valid php files

Change-Id: Id52d95fb5ccf1551d899f6ea8eb3a51fca6beb86
---
M .gitignore
A composer.json
2 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/RegexFun 
refs/changes/23/375523/1

diff --git a/.gitignore b/.gitignore
index e62fc28..9dfe80b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,6 @@
 node_modules/
 vendor/
+composer.lock
 
 .svn
 *~
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..aebd773
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,11 @@
+{
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id52d95fb5ccf1551d899f6ea8eb3a51fca6beb86
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/RegexFun
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...ParserFun[master]: Install Validator over composer

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

Change subject: Install Validator over composer
..

Install Validator over composer

Needed to run automatic tests with jenkins

Change-Id: Id9c6418c0bff7c593cb679b956aeb6971da72ce7
---
M .gitignore
M Gruntfile.js
A composer.json
3 files changed, 18 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ParserFun 
refs/changes/22/375522/1

diff --git a/.gitignore b/.gitignore
index c369f1e..3a01392 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
 node_modules/
 vendor/
+composer.lock
+extensions/
 
 # Editors
 *.kate-swp
diff --git a/Gruntfile.js b/Gruntfile.js
index a45071e..66b2ac3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,7 +11,8 @@
all: [
'**/*.json',
'!node_modules/**',
-   '!vendor/**'
+   '!vendor/**',
+   '!extensions/**'
]
}
} );
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..a2f3d39
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,14 @@
+{
+   "require": {
+   "mediawiki/validator": ">=1.0.0.1"
+   },
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules --exclude extensions"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id9c6418c0bff7c593cb679b956aeb6971da72ce7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParserFun
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...HierarchyBuilder[master]: Install SemanticPageForms over composer

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

Change subject: Install SemanticPageForms over composer
..

Install SemanticPageForms over composer

Needed to run automatic tests with jenkins

Change-Id: Ib5853a00ebce50f86f20ac6787385056bc1b1131
---
M .gitignore
M Gruntfile.js
A composer.json
3 files changed, 18 insertions(+), 1 deletion(-)


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

diff --git a/.gitignore b/.gitignore
index c369f1e..3a01392 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,5 +1,7 @@
 node_modules/
 vendor/
+composer.lock
+extensions/
 
 # Editors
 *.kate-swp
diff --git a/Gruntfile.js b/Gruntfile.js
index a45071e..66b2ac3 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -11,7 +11,8 @@
all: [
'**/*.json',
'!node_modules/**',
-   '!vendor/**'
+   '!vendor/**',
+   '!extensions/**'
]
}
} );
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..8c778ea
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,14 @@
+{
+   "require": {
+   "mediawiki/semantic-forms": "3.7.0"
+   },
+   "require-dev": {
+   "jakub-onderka/php-parallel-lint": "0.9.2",
+   "jakub-onderka/php-console-highlighter": "0.3.2"
+   },
+   "scripts": {
+   "test": [
+   "parallel-lint . --exclude vendor --exclude 
node_modules --exclude extensions"
+   ]
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib5853a00ebce50f86f20ac6787385056bc1b1131
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/HierarchyBuilder
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Re-enable disabled sniffs

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

Change subject: Re-enable disabled sniffs
..


Re-enable disabled sniffs

Re-enables all sniffs other than those relating to the new rules on
one class per file (with the same name).

Updates documentation where needed to pass enabled sniffs.

Bug: T169483
Change-Id: I5cb39b41720b518db93ff7ddc9d379d47dbaf361
---
M Hooks.php
M includes/ApiWikispeech.php
M includes/CleanedContent.php
M includes/Cleaner.php
M includes/HtmlGenerator.php
M includes/Segmenter.php
M phpcs.xml
M specials/SpecialWikispeech.php
M tests/phpunit/Util.php
9 files changed, 27 insertions(+), 45 deletions(-)

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



diff --git a/Hooks.php b/Hooks.php
index 073deec..7b7e011 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -10,14 +10,13 @@
 
/**
 * Conditionally register the unit testing module for the ext.wikispeech
-* module only if that module is loaded
+* module only if that module is loaded.
 *
-* @param array $testModules The array of registered test modules
-* @param ResourceLoader $resourceLoader The reference to the resource
+* @param array &$testModules The array of registered test modules
+* @param ResourceLoader &$resourceLoader The reference to the resource
 *  loader
 * @return true
 */
-
public static function onResourceLoaderTestModules(
array &$testModules,
ResourceLoader &$resourceLoader
@@ -46,11 +45,10 @@
 * Adds Wikispeech elements to the HTML, if the page is in the main
 * namespace.
 *
-* @param $parser Parser object. Can be used to manually parse a portion
-*  of wiki text from the $text.
-* @param $text Represents the text for page.
+* @param Parser &$parser Can be used to manually parse a portion of 
wiki
+*  text from the $text.
+* @param string &$text Represents the text for page.
 */
-
public static function onParserAfterTidy( &$parser, &$text ) {
if ( self::isValidNamespace( 
$parser->getTitle()->getNamespace() ) &&
 $text != ""
@@ -93,7 +91,6 @@
 * @return bool true if the namespace id matches one defined in
 *  $wgWikispeechNamespaces, else false.
 */
-
private static function isValidNamespace( $namespace ) {
global $wgWikispeechNamespaces;
foreach ( $wgWikispeechNamespaces as $namespaceId ) {
@@ -110,11 +107,10 @@
 *
 * Enables JavaScript.
 *
-* @param OutputPage $out The OutputPage object.
-* @param Skin $skin Skin object that will be used to generate the page,
+* @param OutputPage &$out The OutputPage object.
+* @param Skin &$skin Skin object that will be used to generate the 
page,
 *  added in 1.13.
 */
-
public static function onBeforePageDisplay(
OutputPage &$out,
Skin &$skin
@@ -125,6 +121,13 @@
] );
}
 
+   /**
+* Conditionally register static configuration variables for the
+* ext.wikispeech module only if that module is loaded.
+*
+* @param array &$vars The array of static configuration variables.
+* @return true
+*/
public static function onResourceLoaderGetConfigVars( &$vars ) {
global $wgWikispeechServerUrl;
$vars['wgWikispeechServerUrl'] = $wgWikispeechServerUrl;
diff --git a/includes/ApiWikispeech.php b/includes/ApiWikispeech.php
index e2b25ce..2862d26 100644
--- a/includes/ApiWikispeech.php
+++ b/includes/ApiWikispeech.php
@@ -13,7 +13,6 @@
 *
 * @since 0.0.1
 */
-
function execute() {
$parameters = $this->extractRequestParams();
if ( empty( $parameters['output'] ) ) {
@@ -32,7 +31,7 @@
 * Process HTML and return it as original, cleaned and/or segmented.
 *
 * @since 0.0.1
-* @param string $html The HTML string to process.
+* @param string $pageContent The HTML string to process.
 * @param array $outputFormats Specifies what output formats to
 *  return. Can be any combination of: "originalcontent",
 *  "cleanedtext" and "segments".
@@ -45,7 +44,6 @@
 *  * "cleanedtext": The cleaned HTML, as a string.
 *  * "segments": Cleaned and segmented HTML as an array.
 */
-
public function processPageContent(
$pageContent,
$outputFormats,
@@ -99,7 +97,6 @@
 * @return string The parsed content for the page given in the
 *  request to the Wikispeech API.
 */
-
private function getPageContent( $pageTitle ) 

[MediaWiki-commits] [Gerrit] mediawiki...SyntaxHighlight_GeSHi[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase

Change-Id: I2781f52be104163ba58e30055bc7593da6ded29a
---
M composer.json
M phpcs.xml
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index a846977..ee9562b 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"license": "GPL-2.0+",
diff --git a/phpcs.xml b/phpcs.xml
index 8ee5f1d..c6aa265 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,6 +7,8 @@



+   
+   




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2781f52be104163ba58e30055bc7593da6ded29a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...InviteSignup[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

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



diff --git a/composer.json b/composer.json
index ae3afb1..e96b260 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78174970aae06f3533ab0ac4f52393291ccd8f6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InviteSignup
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

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



diff --git a/composer.json b/composer.json
index 9b9ce65..22cdbd3 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7acf8895f78cb23a66d9b2b99ba613d4045b1b54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MOOC
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...GPGMail[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

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



diff --git a/composer.json b/composer.json
index f4ff238..d8c8fe9 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0"
+   "mediawiki/mediawiki-codesniffer": "0.12.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0aade1290d95dc473ecc5b63a29d1b850f919e8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GPGMail
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UserOptionStats[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

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



diff --git a/composer.json b/composer.json
index 0550707..119afc0 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib73d949bf9cac4e9610d3f69b988b2ed83ca886d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserOptionStats
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...I18nTags[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch

Change-Id: I144502e030a410d321af2b6e57171e265264a215
---
M composer.json
M phpcs.xml
2 files changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index 8f5e9c4..90ff59e 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 410c5da..4a29d75 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,6 +2,7 @@
 


+   

.


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

Gerrit-MessageType: merged
Gerrit-Change-Id: I144502e030a410d321af2b6e57171e265264a215
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/I18nTags
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...LocalisationUpdate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch

Change-Id: I4802cc0dc12d766de190ef6d7c1eb4ab2f710655
---
M composer.json
M phpcs.xml
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/composer.json b/composer.json
index 9734cc6..9a88cee 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 4910803..32816b3 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -6,10 +6,10 @@



+   


.


-   vendor
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4802cc0dc12d766de190ef6d7c1eb4ab2f710655
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LocalisationUpdate
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MixedNamespaceSearchSuggestions[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..


build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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

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



diff --git a/composer.json b/composer.json
index 96cfd46..114f258 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57f3d86f991c9ae3d8e7e0f0eb23b4d6560f8a06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MixedNamespaceSearchSuggestions
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Remove a few unused snippets from EntityParserOutputGenerato...

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

Change subject: Remove a few unused snippets from 
EntityParserOutputGeneratorTest
..


Remove a few unused snippets from EntityParserOutputGeneratorTest

Bug: T96553
Change-Id: Idb9998b6f5d8194beb66013a23bfef887ab17a19
---
M repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
1 file changed, 2 insertions(+), 13 deletions(-)

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



diff --git 
a/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php 
b/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
index 3a9beb5..717d9e5 100644
--- 
a/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
+++ 
b/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
@@ -379,22 +379,11 @@
}
 
private function getGeneratorForRedirectTest() {
-   $entityDataFormatProvider = new EntityDataFormatProvider();
-   $entityDataFormatProvider->setFormatWhiteList( [ 'json', 
'ntriples' ] );
-
$entityTitleLookup = $this->getEntityTitleLookupMock();
-
-   $propertyDataTypeMatcher = new PropertyDataTypeMatcher( 
$this->getPropertyDataTypeLookup() );
-
$entityIdParser = new BasicEntityIdParser();
 
$dataUpdaters = [
-   new ExternalLinksDataUpdater( $propertyDataTypeMatcher 
),
-   new ImageLinksDataUpdater( $propertyDataTypeMatcher ),
-   new ReferencedEntitiesDataUpdater(
-   $entityTitleLookup,
-   $entityIdParser
-   )
+   new ReferencedEntitiesDataUpdater( $entityTitleLookup, 
$entityIdParser )
];
 
return new EntityParserOutputGenerator(
@@ -413,7 +402,7 @@
$this->newLanguageFallbackChain(),
TemplateFactory::getDefaultInstance(),
$this->getMock( LocalizedTextProvider::class ),
-   $entityDataFormatProvider,
+   new EntityDataFormatProvider(),
$dataUpdaters,
'en',
true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb9998b6f5d8194beb66013a23bfef887ab17a19
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-09-02T09:41:18+0000

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

Change subject: New Wikidata Build - 2017-09-02T09:41:18+
..


New Wikidata Build - 2017-09-02T09:41:18+

Change-Id: I4556e5f1d0e3e3dc8be21fe10ec30d076d7e1172
---
M Wikidata.localisation.php
M composer.lock
M extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
M vendor/composer/installed.json
5 files changed, 111 insertions(+), 10 deletions(-)

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



diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php
index 0132552..e1cad1c 100644
--- a/Wikidata.localisation.php
+++ b/Wikidata.localisation.php
@@ -17,7 +17,7 @@
 
 require_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php";
 require_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php";
-require_once 
"$wgWikidataBaseDir/extensions/WikimediaBadges/WikimediaBadges.php";
+wfLoadExtension( 'WikimediaBadges', 
"$wgWikidataBaseDir/extensions/WikimediaBadges/extension.json" );
 require_once 
"$wgWikidataBaseDir/extensions/PropertySuggester/PropertySuggester.php";
 require_once 
"$wgWikidataBaseDir/extensions/Wikibase/client/WikibaseClient.php";
 require_once "$wgWikidataBaseDir/extensions/Quality/WikibaseQuality.php";
diff --git a/composer.lock b/composer.lock
index cf208cb..28b82e9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1541,12 +1541,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a"
+"reference": "b316b0de9235ceb1774d9f48f4d8998aa730d99c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a;,
-"reference": "5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/b316b0de9235ceb1774d9f48f4d8998aa730d99c;,
+"reference": "b316b0de9235ceb1774d9f48f4d8998aa730d99c",
 "shasum": ""
 },
 "require": {
@@ -1623,7 +1623,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-08-31 19:12:49"
+"time": "2017-09-01 13:17:29"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
index 0829638..c7d92ca 100644
--- 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
+++ 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
@@ -215,13 +215,13 @@
$entityInfoBuilder = 
$this->entityInfoBuilderFactory->newEntityInfoBuilder( $entityIds );
 
$entityInfoBuilder->resolveRedirects();
-   $entityInfoBuilder->removeMissing();
 
$entityInfoBuilder->collectTerms(
[ 'label', 'description' ],
$this->languageFallbackChain->getFetchLanguageCodes()
);
 
+   $entityInfoBuilder->removeMissing();
$entityInfoBuilder->collectDataTypes();
$entityInfoBuilder->retainEntityInfo( $entityIds );
 
diff --git 
a/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
 
b/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
index 7b87294..3a9beb5 100644
--- 
a/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
+++ 
b/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
@@ -9,11 +9,14 @@
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\DataModel\Entity\EntityIdValue;
+use Wikibase\DataModel\Entity\EntityRedirect;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Services\Entity\PropertyDataTypeMatcher;
 use Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup;
+use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\Lib\EntityIdComposer;
@@ -27,6 +30,8 @@
 use Wikibase\Repo\ParserOutput\ParserOutputJsConfigBuilder;
 use 

[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Rename API

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

Change subject: Rename API
..


Rename API

Renamed API classes and files to match other APIs.

Bug: T172520
Change-Id: I7d3ff337c80ea45a6c14f3d070733df43e9f10cf
---
M extension.json
R includes/ApiWikispeech.php
R tests/phpunit/ApiWikispeechTest.php
3 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/extension.json b/extension.json
index f080a3b..6f7cebb 100644
--- a/extension.json
+++ b/extension.json
@@ -23,7 +23,7 @@
"Cleaner": "includes/Cleaner.php",
"HtmlGenerator": "includes/HtmlGenerator.php",
"Segmenter": "includes/Segmenter.php",
-   "WikispeechApi": "includes/WikispeechApi.php"
+   "ApiWikispeech": "includes/ApiWikispeech.php"
},
"ResourceModules": {
"ext.wikispeech": {
@@ -116,6 +116,6 @@
"WikispeechContentSelector": "#mw-content-text"
},
"APIModules": {
-   "wikispeech": "WikispeechApi"
+   "wikispeech": "ApiWikispeech"
}
 }
diff --git a/includes/WikispeechApi.php b/includes/ApiWikispeech.php
similarity index 98%
rename from includes/WikispeechApi.php
rename to includes/ApiWikispeech.php
index 216c63e..e2b25ce 100644
--- a/includes/WikispeechApi.php
+++ b/includes/ApiWikispeech.php
@@ -6,7 +6,7 @@
  * @license GPL-2.0+
  */
 
-class WikispeechApi extends ApiBase {
+class ApiWikispeech extends ApiBase {
 
/**
 * Execute an API request.
diff --git a/tests/phpunit/WikispeechApiTest.php 
b/tests/phpunit/ApiWikispeechTest.php
similarity index 94%
rename from tests/phpunit/WikispeechApiTest.php
rename to tests/phpunit/ApiWikispeechTest.php
index 41da705..9da49e9 100644
--- a/tests/phpunit/WikispeechApiTest.php
+++ b/tests/phpunit/ApiWikispeechTest.php
@@ -8,12 +8,12 @@
  * @license GPL-2.0+
  */
 
-require_once __DIR__ . '/../../includes/WikispeechApi.php';
+require_once __DIR__ . '/../../includes/ApiWikispeech.php';
 require_once 'Util.php';
 
 define( 'TITLE', 'Talk:Page' );
 
-class WikispeechApiTest extends ApiTestCase {
+class ApiWikispeechTest extends ApiTestCase {
public function addDBDataOnce() {
$content = "Text ''italic'' '''bold'''";
$this->addPage( TITLE, $content );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d3ff337c80ea45a6c14f3d070733df43e9f10cf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikispeech
Gerrit-Branch: master
Gerrit-Owner: Sebastian Berlin (WMSE) 
Gerrit-Reviewer: Lokal Profil 
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 Config in category_redirect.py for hi.wiki

2017-09-02 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375520 )

Change subject: Add Config in category_redirect.py for hi.wiki
..

Add Config in category_redirect.py for hi.wiki

Bug: T174848
Change-Id: Ieebd763a8d937fa1d6e8c10958a975b0383938b4
---
M scripts/category_redirect.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/20/375520/1

diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index a401fd9..1912d70 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -80,6 +80,7 @@
 'en': "Category:Wikipedia soft redirected categories",
 'es': "Categoría:Wikipedia:Categorías redirigidas",
 'fa': u"رده:رده‌های منتقل‌شده",
+'hi': "श्रेणी:विकिपीडिया श्रेणी अनुप्रेषित",
 'hu': "Kategória:Kategóriaátirányítások",
 'ja': "Category:移行中のカテゴリ",
 'no': "Kategori:Wikipedia omdirigertekategorier",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieebd763a8d937fa1d6e8c10958a975b0383938b4
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikidata[master]: New Wikidata Build - 2017-09-02T09:41:18+0000

2017-09-02 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375519 )

Change subject: New Wikidata Build - 2017-09-02T09:41:18+
..

New Wikidata Build - 2017-09-02T09:41:18+

Change-Id: I4556e5f1d0e3e3dc8be21fe10ec30d076d7e1172
---
M Wikidata.localisation.php
M composer.lock
M extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
M 
extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
M vendor/composer/installed.json
5 files changed, 111 insertions(+), 10 deletions(-)


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

diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php
index 0132552..e1cad1c 100644
--- a/Wikidata.localisation.php
+++ b/Wikidata.localisation.php
@@ -17,7 +17,7 @@
 
 require_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php";
 require_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php";
-require_once 
"$wgWikidataBaseDir/extensions/WikimediaBadges/WikimediaBadges.php";
+wfLoadExtension( 'WikimediaBadges', 
"$wgWikidataBaseDir/extensions/WikimediaBadges/extension.json" );
 require_once 
"$wgWikidataBaseDir/extensions/PropertySuggester/PropertySuggester.php";
 require_once 
"$wgWikidataBaseDir/extensions/Wikibase/client/WikibaseClient.php";
 require_once "$wgWikidataBaseDir/extensions/Quality/WikibaseQuality.php";
diff --git a/composer.lock b/composer.lock
index cf208cb..28b82e9 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1541,12 +1541,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a"
+"reference": "b316b0de9235ceb1774d9f48f4d8998aa730d99c"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a;,
-"reference": "5a5a5c19bc42cea0dd5a4bb3c48572a2a3af581a",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/b316b0de9235ceb1774d9f48f4d8998aa730d99c;,
+"reference": "b316b0de9235ceb1774d9f48f4d8998aa730d99c",
 "shasum": ""
 },
 "require": {
@@ -1623,7 +1623,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-08-31 19:12:49"
+"time": "2017-09-01 13:17:29"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
index 0829638..c7d92ca 100644
--- 
a/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
+++ 
b/extensions/Wikibase/repo/includes/ParserOutput/EntityParserOutputGenerator.php
@@ -215,13 +215,13 @@
$entityInfoBuilder = 
$this->entityInfoBuilderFactory->newEntityInfoBuilder( $entityIds );
 
$entityInfoBuilder->resolveRedirects();
-   $entityInfoBuilder->removeMissing();
 
$entityInfoBuilder->collectTerms(
[ 'label', 'description' ],
$this->languageFallbackChain->getFetchLanguageCodes()
);
 
+   $entityInfoBuilder->removeMissing();
$entityInfoBuilder->collectDataTypes();
$entityInfoBuilder->retainEntityInfo( $entityIds );
 
diff --git 
a/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
 
b/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
index 7b87294..3a9beb5 100644
--- 
a/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
+++ 
b/extensions/Wikibase/repo/tests/phpunit/includes/ParserOutput/EntityParserOutputGeneratorTest.php
@@ -9,11 +9,14 @@
 use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\DataModel\Entity\EntityIdValue;
+use Wikibase\DataModel\Entity\EntityRedirect;
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\DataModel\Services\Entity\PropertyDataTypeMatcher;
 use Wikibase\DataModel\Services\Lookup\InMemoryDataTypeLookup;
+use Wikibase\DataModel\Services\Lookup\LabelDescriptionLookup;
 use Wikibase\DataModel\Snak\PropertyValueSnak;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\Lib\EntityIdComposer;
@@ -27,6 +30,8 @@
 use Wikibase\Repo\ParserOutput\ParserOutputJsConfigBuilder;

[MediaWiki-commits] [Gerrit] wikidata/build-resources[master]: Update WikimediaBadges loading to use wfLoadExtension

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

Change subject: Update WikimediaBadges loading to use wfLoadExtension
..


Update WikimediaBadges loading to use wfLoadExtension

I would like to remove this file because it does not do anything but
executing wfLoadExtension.

Change-Id: Iebbc3849b638c16daa6fe8debb5fa9d81a811c1a
---
M Wikidata.localisation.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  WMDE-leszek: Looks good to me, but someone else must approve
  Addshore: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/Wikidata.localisation.php b/Wikidata.localisation.php
index 0132552..e1cad1c 100644
--- a/Wikidata.localisation.php
+++ b/Wikidata.localisation.php
@@ -17,7 +17,7 @@
 
 require_once "$wgWikidataBaseDir/extensions/Wikibase/repo/Wikibase.php";
 require_once "$wgWikidataBaseDir/extensions/Wikidata.org/WikidataOrg.php";
-require_once 
"$wgWikidataBaseDir/extensions/WikimediaBadges/WikimediaBadges.php";
+wfLoadExtension( 'WikimediaBadges', 
"$wgWikidataBaseDir/extensions/WikimediaBadges/extension.json" );
 require_once 
"$wgWikidataBaseDir/extensions/PropertySuggester/PropertySuggester.php";
 require_once 
"$wgWikidataBaseDir/extensions/Wikibase/client/WikibaseClient.php";
 require_once "$wgWikidataBaseDir/extensions/Quality/WikibaseQuality.php";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebbc3849b638c16daa6fe8debb5fa9d81a811c1a
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/build-resources
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: WMDE-leszek 
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...TwoColConflict[master]: tests: Return a TestingAccessWrapper always

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

Change subject: tests: Return a TestingAccessWrapper always
..


tests: Return a TestingAccessWrapper always

Instead of reapeating the exact same code in every test, just do it once
in the getMockPage() function.

Change-Id: I636432061c08817bb4d833c5bc0ccf241da5cb33
---
M tests/phpunit/includes/TwoColConflictPageTest.php
1 file changed, 12 insertions(+), 15 deletions(-)

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



diff --git a/tests/phpunit/includes/TwoColConflictPageTest.php 
b/tests/phpunit/includes/TwoColConflictPageTest.php
index f055579..6f9af84 100644
--- a/tests/phpunit/includes/TwoColConflictPageTest.php
+++ b/tests/phpunit/includes/TwoColConflictPageTest.php
@@ -12,7 +12,7 @@
 * @covers TwoColConflictPageTest::getCollapsedText
 */
public function testGetCollapsedText_returnFalseWhenInLimit() {
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$this->getMockPage() );
+   $twoColConflictPageMock = $this->getMockPage();
$this->assertFalse(
$twoColConflictPageMock->getCollapsedText( 'One Two 
Three.', 14 )
);
@@ -26,7 +26,6 @@
 */
public function 
testGetCollapsedText_returnFalseWhenWhenOverLimitWithWhitespaces() {
$twoColConflictPageMock = $this->getMockPageWithContext();
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$twoColConflictPageMock );
$this->assertFalse(
$twoColConflictPageMock->getCollapsedText( "One Two 
Three.\n \n", 14 )
);
@@ -40,7 +39,6 @@
 */
public function testGetCollapsedText_cutWhenSingleLineOverLimit() {
$twoColConflictPageMock = $this->getMockPageWithContext();
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$twoColConflictPageMock );
$this->assertEquals(
'One ' .
'even.',
@@ -53,7 +51,6 @@
 */
public function testGetCollapsedText_returnFalseWhenTwoLinesInLimit() {
$twoColConflictPageMock = $this->getMockPageWithContext();
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$twoColConflictPageMock );
$this->assertFalse(
$twoColConflictPageMock->getCollapsedText( "One 
Two\nThree Four.", 25 )
);
@@ -64,7 +61,6 @@
 */
public function testGetCollapsedText_cutWhenTwoLinesOverLimit() {
$twoColConflictPageMock = $this->getMockPageWithContext();
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$twoColConflictPageMock );
$this->assertEquals(
"One\n" .
"Four.",
@@ -77,7 +73,6 @@
 */
public function testGetCollapsedText_cutWhenMultipleLinesInLimit() {
$twoColConflictPageMock = $this->getMockPageWithContext();
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$twoColConflictPageMock );
$this->assertEquals(
"One Two\n" .
"Six Seven.",
@@ -89,7 +84,7 @@
 * @covers TwoColConflictPageTest::trimStringToFullWord
 */
public function testTrimStringToFullWord_noCutWhenInLimit() {
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$this->getMockPage() );
+   $twoColConflictPageMock = $this->getMockPage();
$this->assertEquals(
'One Two Three.',
$twoColConflictPageMock->trimStringToFullWord( 'One Two 
Three.', 14 )
@@ -104,7 +99,7 @@
 * @covers TwoColConflictPageTest::trimStringToFullWord
 */
public function testTrimStringToFullWord_trimWhiteSpaceAtEndOfResult() {
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$this->getMockPage() );
+   $twoColConflictPageMock = $this->getMockPage();
$this->assertEquals(
'One Two',
$twoColConflictPageMock->trimStringToFullWord( 'One Two 
Three.', 8, true )
@@ -115,7 +110,7 @@
 * @covers TwoColConflictPageTest::trimStringToFullWord
 */
public function 
testTrimStringToFullWord_trimWhiteSpaceAtStartOfResult() {
-   $twoColConflictPageMock = TestingAccessWrapper::newFromObject( 
$this->getMockPage() );
+   $twoColConflictPageMock = $this->getMockPage();
$this->assertEquals(
'Three.',
$twoColConflictPageMock->trimStringToFullWord( 'One 
Two. And Three.', 7, false )
@@ -130,7 

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Consistently use $this->context

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

Change subject: Consistently use $this->context
..


Consistently use $this->context

Avoids an extra function call, and it will always be set.

Change-Id: I91aeef58546be345665ef63ac1c61521d7081723
---
M includes/TwoColConflictPage.php
M tests/phpunit/includes/TwoColConflictPageTest.php
2 files changed, 21 insertions(+), 22 deletions(-)

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



diff --git a/includes/TwoColConflictPage.php b/includes/TwoColConflictPage.php
index c4377ed..2dd43c7 100644
--- a/includes/TwoColConflictPage.php
+++ b/includes/TwoColConflictPage.php
@@ -26,7 +26,7 @@
 */
protected function addExplainConflictHeader( OutputPage $out ) {
// don't show conflict message when coming from VisualEditor
-   if ( $this->getContext()->getRequest()->getVal( 'veswitched' ) 
!== "1" ) {
+   if ( $this->context->getRequest()->getVal( 'veswitched' ) !== 
"1" ) {
$out->wrapWikiMsg(
"\n$1\n",
[ 'twoColConflict-explainconflict', 
$this->getSubmitButtonLabel() ]
@@ -117,16 +117,16 @@
$out = '';
$out .= '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-title' )->parse() . '';
+   $this->context->msg( 'twoColConflict-changes-col-title' 
)->parse() . '';
$out .= '';
-   $out .= $this->getContext()->msg( 
'twoColConflict-changes-col-desc-1' )->text();
+   $out .= $this->context->msg( 
'twoColConflict-changes-col-desc-1' )->text();
$out .= '';
$out .= '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-2' )->text() .
+   $this->context->msg( 
'twoColConflict-changes-col-desc-2' )->text() .
'' . $this->buildEditSummary() . '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-changes-col-desc-4' )->text() .
+   $this->context->msg( 
'twoColConflict-changes-col-desc-4' )->text() .
'';
$out .= '';
$out .= '';
@@ -157,11 +157,11 @@
'options' => [
[
'data' => 'show',
-   'label' => $this->getContext()->msg( 
'twoColConflict-label-show' )->text()
+   'label' => $this->context->msg( 
'twoColConflict-label-show' )->text()
],
[
'data' => 'hide',
-   'label' => $this->getContext()->msg( 
'twoColConflict-label-hide' )->text()
+   'label' => $this->context->msg( 
'twoColConflict-label-hide' )->text()
],
],
] );
@@ -175,7 +175,7 @@
 
$out .= '';
$out .= '' .
-   $this->getContext()->msg( 
'twoColConflict-label-unchanged' )->text() .
+   $this->context->msg( 'twoColConflict-label-unchanged' 
)->text() .
'';
$out .= $fieldset;
$out .= $this->buildHelpButton();
@@ -199,7 +199,7 @@
'icon' => 'help',
'framed' => false,
'name' => 'mw-twocolconflict-show-help',
-   'title' => $this->getContext()->msg( 
'twoColConflict-show-help-tooltip' )->text(),
+   'title' => $this->context->msg( 
'twoColConflict-show-help-tooltip' )->text(),
'classes' => [ 'mw-twocolconflict-show-help' ]
] );
$helpButton->setAttributes( [
@@ -267,13 +267,13 @@
 */
private function buildEditSummary() {
$currentRev = $this->getArticle()->getPage()->getRevision();
-   $baseRevId = $this->getContext()->getRequest()->getIntOrNull( 
'editRevId' );
+   $baseRevId = $this->context->getRequest()->getIntOrNull( 
'editRevId' );
$nEdits = $this->getTitle()->countRevisionsBetween( $baseRevId, 
$currentRev, 100 );
 
if ( $nEdits === 0 ) {
$out = '';
$out .= Linker::userLink( $currentRev->getUser(), 
$currentRev->getUserText() );
-   $out .= 
$this->getContext()->getLanguage()->getDirMark();
+   $out .= $this->context->getLanguage()->getDirMark();
   

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

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

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


New Wikidata Build - 2017-09-01T10:00:02+

Change-Id: Ibb2ea98be2142b236000de33913eb55fadfda140
---
M composer.lock
M extensions/Constraints/extension.json
A extensions/Constraints/includes/ConstraintCheck/Context/QualifierContext.php
M 
extensions/Constraints/includes/ConstraintCheck/DelegatingConstraintChecker.php
M extensions/Constraints/includes/ConstraintReportFactory.php
M extensions/Constraints/tests/phpunit/Api/CheckConstraintsTest.php
M extensions/Constraints/tests/phpunit/Checker/OneOfChecker/OneOfCheckerTest.php
M extensions/Constraints/tests/phpunit/ConstraintParameters.php
A extensions/Constraints/tests/phpunit/Context/QualifierContextTest.php
M extensions/Wikibase/client/includes/Changes/WikiPageUpdater.php
M 
extensions/Wikibase/client/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibrary.php
M extensions/Wikibase/client/includes/DataAccess/SnaksFinder.php
M 
extensions/Wikibase/client/includes/DataAccess/StatementTransclusionInteractor.php
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php
M extensions/Wikibase/composer.json
M extensions/Wikibase/data-access/src/GenericServices.php
M 
extensions/Wikibase/data-access/src/MultipleRepositoryAwareWikibaseServices.php
M extensions/Wikibase/data-access/src/PerRepositoryServiceWiring.php
M extensions/Wikibase/data-access/src/WikibaseServices.php
M extensions/Wikibase/data-access/tests/phpunit/GenericServicesTest.php
M 
extensions/Wikibase/data-access/tests/phpunit/MultipleRepositoryAwareWikibaseServicesTest.php
M extensions/Wikibase/repo/includes/Specials/SpecialEntityData.php
M extensions/Wikibase/repo/includes/WikibaseRepo.php
M extensions/Wikibase/repo/maintenance/dumpJson.php
M extensions/Wikibase/repo/tests/phpunit/data/api/editentity.xml
M extensions/Wikibase/repo/tests/phpunit/data/api/getclaims.xml
M extensions/Wikibase/repo/tests/phpunit/data/api/getentities.json
M extensions/Wikibase/repo/tests/phpunit/data/api/getentities.xml
M extensions/Wikibase/repo/tests/phpunit/data/api/setclaim.xml
M extensions/Wikibase/repo/tests/phpunit/data/api/setqualifier.xml
M extensions/Wikibase/repo/tests/phpunit/data/api/setreference.xml
M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiJsonFormatTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/ApiXmlFormatTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/GetClaimsTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/SetReferenceTest.php
M extensions/Wikibase/repo/tests/phpunit/includes/Api/WikibaseApiTestCase.php
M extensions/Wikibase/repo/tests/phpunit/includes/NewItem.php
M extensions/Wikibase/repo/tests/phpunit/includes/WikibaseRepoTest.php
M 
extensions/Wikibase/view/resources/jquery/wikibase/jquery.wikibase.statementview.js
M vendor/composer/autoload_classmap.php
M vendor/composer/autoload_files.php
M vendor/composer/autoload_static.php
M vendor/composer/installed.json
D vendor/wikibase/internal-serialization/.gitignore
D vendor/wikibase/internal-serialization/.scrutinizer.yml
D vendor/wikibase/internal-serialization/.travis.yml
M vendor/wikibase/internal-serialization/README.md
D vendor/wikibase/internal-serialization/composer.json
D vendor/wikibase/internal-serialization/mediawiki-extension.json
D vendor/wikibase/internal-serialization/mediawiki.php
D vendor/wikibase/internal-serialization/phpcs.xml
D vendor/wikibase/internal-serialization/phpmd.xml
D vendor/wikibase/internal-serialization/phpunit.xml.dist
D vendor/wikibase/internal-serialization/tests/bootstrap.php
D vendor/wikibase/internal-serialization/tests/data/items/current/Q1.json
D vendor/wikibase/internal-serialization/tests/data/items/legacy/old/Q1-103.json
D 
vendor/wikibase/internal-serialization/tests/data/items/legacy/old/Q1-10499806.json
D 
vendor/wikibase/internal-serialization/tests/data/items/legacy/old/Q1-1622.json
D 
vendor/wikibase/internal-serialization/tests/data/items/legacy/old/Q1-953112.json
D vendor/wikibase/internal-serialization/tests/data/items/legacy/recent/Q1.json
D vendor/wikibase/internal-serialization/tests/data/items/legacy/recent/Q2.json
D vendor/wikibase/internal-serialization/tests/data/items/legacy/recent/Q3.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/old/P6-22681711.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/old/P6-51742868.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/old/P6-5788574.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/old/P6-5788751.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/recent/P18.json
D 
vendor/wikibase/internal-serialization/tests/data/properties/legacy/recent/P227.json

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Avoid using $wgRequest

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

Change subject: Avoid using $wgRequest
..


Avoid using $wgRequest

Change-Id: I967c74fa973f7d04146094586d3028641e88b8d4
---
M includes/TwoColConflictHooks.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/includes/TwoColConflictHooks.php b/includes/TwoColConflictHooks.php
index 9dcb5b8..25e13bb 100644
--- a/includes/TwoColConflictHooks.php
+++ b/includes/TwoColConflictHooks.php
@@ -42,9 +42,7 @@
 * @param Status $status
 */
public static function onAttemptSaveAfter( EditPage $editPage, Status 
$status ) {
-   global $wgRequest;
-
-   if ( !$wgRequest->getBool( 'mw-twocolconflict-submit' ) ) {
+   if ( !$editPage->getContext()->getRequest()->getBool( 
'mw-twocolconflict-submit' ) ) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I967c74fa973f7d04146094586d3028641e88b8d4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Andrew-WMDE 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: WMDE-Fisch 
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[wmf/1.30.0-wmf.16]: Re add wpScrolltop id in EditPage

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

Change subject: Re add wpScrolltop id in EditPage
..

Re add wpScrolltop id in EditPage

Regression from:
I9bd66b8444c069b4055fc5c3396256b688b78561

Bug: T174723
Change-Id: I2c174eaab822b5990663503ca9258a5811425054
(cherry picked from commit 5910fe9d9bdfdef20050694bddc640bcb5ae692c)
---
M includes/EditPage.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/18/375518/1

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 72a072d..2afb843 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3165,7 +3165,7 @@
$wgOut->addHTML( Html::hidden( 'wpStarttime', $this->starttime 
) );
$wgOut->addHTML( Html::hidden( 'wpEdittime', $this->edittime ) 
);
$wgOut->addHTML( Html::hidden( 'editRevId', $this->editRevId ) 
);
-   $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop 
) );
+   $wgOut->addHTML( Html::hidden( 'wpScrolltop', $this->scrolltop, 
[ 'id' => 'wpScrolltop' ] ) );
 
if ( !$this->checkUnicodeCompliantBrowser() ) {
$wgOut->addHTML( Html::hidden( 'safemode', '1' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c174eaab822b5990663503ca9258a5811425054
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.30.0-wmf.16
Gerrit-Owner: Addshore 

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


[MediaWiki-commits] [Gerrit] mediawiki...Translate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375517 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase
* MediaWiki.Files.OneClassPerFile.MultipleFound
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.Usage.DbrQueryUsage.DbrQueryFound

The following sniffs now pass and were enabled:
* MediaWiki.Commenting.IllegalSingleLineComment.IllegalSingleLineCommentStart
* MediaWiki.NamingConventions.LowerCamelFunctionsName
* MediaWiki.Usage.DbrQueryUsage

Change-Id: I1f75f41fdccb7be13c407601282a4f00e1092df2
---
M Autoload.php
M composer.json
M phpcs.xml
3 files changed, 24 insertions(+), 21 deletions(-)


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

diff --git a/Autoload.php b/Autoload.php
index 3606941..6bf69d3 100644
--- a/Autoload.php
+++ b/Autoload.php
@@ -29,7 +29,7 @@
 $al['TranslateHooks'] = "$dir/TranslateHooks.php";
 $al['TranslateTasks'] = "$dir/TranslateTasks.php";
 $al['TranslateUtils'] = "$dir/TranslateUtils.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Special pages"
@@ -52,7 +52,7 @@
 $al['SpecialTranslationStats'] = "$dir/specials/SpecialTranslationStats.php";
 $al['SpecialTranslations'] = "$dir/specials/SpecialTranslations.php";
 $al['SpecialTranslationStash'] = "$dir/specials/SpecialTranslationStash.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Various utilities"
@@ -108,7 +108,7 @@
 $al['TranslationStatsBase'] = "$dir/specials/SpecialTranslationStats.php";
 $al['TranslationStatsInterface'] = "$dir/specials/SpecialTranslationStats.php";
 $al['TuxMessageTable'] = "$dir/utils/TuxMessageTable.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Classes for predefined non-managed message groups"
@@ -116,7 +116,7 @@
  */
 $al['PremadeMediawikiExtensionGroups'] = "$dir/ffs/MediaWikiExtensions.php";
 $al['PremadeIntuitionTextdomains'] = "$dir/ffs/IntuitionTextdomains.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Support for MediaWiki non-message features"
@@ -126,7 +126,7 @@
 $al['MagicWordsCM'] = "$dir/ffs/MediaWikiComplexMessages.php";
 $al['NamespaceCM'] = "$dir/ffs/MediaWikiComplexMessages.php";
 $al['SpecialPageAliasesCM'] = "$dir/ffs/MediaWikiComplexMessages.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Classes for page translation feature"
@@ -151,7 +151,7 @@
 $al['TPParse'] = "$dir/tag/TPParse.php";
 $al['TPSection'] = "$dir/tag/TPSection.php";
 $al['TranslatablePage'] = "$dir/tag/TranslatablePage.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Classes for TTMServer"
@@ -174,7 +174,7 @@
 $al['TTMServerMessageUpdateJob'] = 
"$dir/ttmserver/TTMServerMessageUpdateJob.php";
 $al['CrossLanguageTranslationSearchQuery'] =
"$dir/ttmserver/CrossLanguageTranslationSearchQuery.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Classes for file format support (FFS)"
@@ -197,7 +197,7 @@
 $al['SimpleFFS'] = "$dir/ffs/SimpleFFS.php";
 $al['XliffFFS'] = "$dir/ffs/XliffFFS.php";
 $al['YamlFFS'] = "$dir/ffs/YamlFFS.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "API modules"
@@ -217,7 +217,7 @@
 $al['ApiTranslationAids'] = "$dir/api/ApiQueryTranslationAids.php";
 $al['ApiTranslationReview'] = "$dir/api/ApiTranslationReview.php";
 $al['ApiTranslationStash'] = "$dir/api/ApiTranslationStash.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Task classes"
@@ -231,7 +231,7 @@
 $al['ViewMessagesTask'] = "$dir/TranslateTasks.php";
 $al['ViewOptionalTask'] = "$dir/TranslateTasks.php";
 $al['ViewUntranslatedTask'] = "$dir/TranslateTasks.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Message group classes"
@@ -252,7 +252,7 @@
 $al['WikiPageMessageGroup'] = "$dir/messagegroups/WikiPageMessageGroup.php";
 $al['WorkflowStatesMessageGroup'] =
"$dir/messagegroups/WorkflowStatesMessageGroup.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Stash"
@@ -260,7 +260,7 @@
  */
 $al['StashedTranslation'] = "$dir/stash/StashedTranslation.php";
 $al['TranslationStashStorage'] = "$dir/stash/TranslationStashStorage.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Test classes"
@@ -273,7 +273,7 @@
 $al['MockSuperUser'] = "$dir/tests/phpunit/MockSuperUser.php";
 $al['MockWikiMessageGroup'] = "$dir/tests/phpunit/MockWikiMessageGroup.php";
 
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Translation aids"
@@ -294,7 +294,7 @@
 $al['UnsupportedTranslationAid'] =
"$dir/translationaids/UnsupportedTranslationAid.php";
 $al['UpdatedDefinitionAid'] = "$dir/translationaids/UpdatedDefinitionAid.php";
-/**@}*/
+/*@}*/
 
 /**
  * @name   "Translation web services"
@@ -317,7 +317,7 @@
 $al['QueryAggregator'] = "$dir/webservices/QueryAggregator.php";
 $al['QueryAggregatorAware'] = "$dir/webservices/QueryAggregatorAware.php";
 $al['YandexWebService'] = 

[MediaWiki-commits] [Gerrit] mediawiki...UserOptionStats[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375516 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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


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

diff --git a/composer.json b/composer.json
index 0550707..119afc0 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib73d949bf9cac4e9610d3f69b988b2ed83ca886d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UserOptionStats
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...SyntaxHighlight_GeSHi[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375515 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch
* MediaWiki.Files.ClassMatchesFilename.WrongCase

Change-Id: I2781f52be104163ba58e30055bc7593da6ded29a
---
M composer.json
M phpcs.xml
2 files changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index a846977..ee9562b 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"license": "GPL-2.0+",
diff --git a/phpcs.xml b/phpcs.xml
index 8ee5f1d..c6aa265 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -7,6 +7,8 @@



+   
+   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2781f52be104163ba58e30055bc7593da6ded29a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SyntaxHighlight_GeSHi
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: TableSorter: Sort unrecognized dates as -Infinity

2017-09-02 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375514 )

Change subject: TableSorter: Sort unrecognized dates as -Infinity
..

TableSorter: Sort unrecognized dates as -Infinity

Follow-up to: I664b4cc
Bug: T174814

Change-Id: I028681172be7a30e51cab42847c4fc35e9358aca
---
M resources/src/jquery/jquery.tablesorter.js
M tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/375514/1

diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 922da31..ecd376a 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -1163,7 +1163,7 @@
match = s.match( ts.rgx.isoDate[ 1 ] );
}
if ( !match ) {
-   return 0;
+   return -Infinity;
}
// Month and day
for ( i = 2; i <= 4; i += 2 ) {
diff --git 
a/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js 
b/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
index 257699a..01589c3 100644
--- a/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
+++ b/tests/qunit/suites/resources/jquery/jquery.tablesorter.parsers.test.js
@@ -174,7 +174,8 @@
parserTest( 'Y Dates', 'date', YDates );
 
ISODates = [
-   [ '2000',   false,  94668480, 'Plain 4-digit 
year' ],
+   [ '',   false,  -Infinity, 'Not a date' ],
+   [ '2000',   false,  94668480, 'Plain 4-digit year' ],
[ '2000-01',true,   94668480, 'Year with month' ],
[ '2000-01-01', true,   94668480, 'Year with month and day' 
],
[ '2000-13-01', false,  97830720, 'Non existant month' ],

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...InviteSignup[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375509 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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


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

diff --git a/composer.json b/composer.json
index ae3afb1..e96b260 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78174970aae06f3533ab0ac4f52393291ccd8f6d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/InviteSignup
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...MixedNamespaceSearchSuggestions[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375512 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MixedNamespaceSearchSuggestions
 refs/changes/12/375512/1

diff --git a/composer.json b/composer.json
index 96cfd46..114f258 100644
--- a/composer.json
+++ b/composer.json
@@ -17,7 +17,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57f3d86f991c9ae3d8e7e0f0eb23b4d6560f8a06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MixedNamespaceSearchSuggestions
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...MOOC[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375511 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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


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

diff --git a/composer.json b/composer.json
index 9b9ce65..22cdbd3 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7acf8895f78cb23a66d9b2b99ba613d4045b1b54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MOOC
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...I18nTags[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375508 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch

Change-Id: I144502e030a410d321af2b6e57171e265264a215
---
M composer.json
M phpcs.xml
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 8f5e9c4..90ff59e 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 410c5da..4a29d75 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -2,6 +2,7 @@
 


+   

.


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I144502e030a410d321af2b6e57171e265264a215
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/I18nTags
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...LocalisationUpdate[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375510 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

The following sniffs are failing and were disabled:
* MediaWiki.Files.ClassMatchesFilename.NotMatch

Change-Id: I4802cc0dc12d766de190ef6d7c1eb4ab2f710655
---
M composer.json
M phpcs.xml
2 files changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/composer.json b/composer.json
index 9734cc6..9a88cee 100644
--- a/composer.json
+++ b/composer.json
@@ -33,7 +33,7 @@
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0",
+   "mediawiki/mediawiki-codesniffer": "0.12.0",
"jakub-onderka/php-console-highlighter": "0.3.2"
},
"scripts": {
diff --git a/phpcs.xml b/phpcs.xml
index 4910803..fa757a9 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -5,6 +5,7 @@



+   




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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4802cc0dc12d766de190ef6d7c1eb4ab2f710655
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LocalisationUpdate
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] mediawiki...GPGMail[master]: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

2017-09-02 Thread Libraryupgrader (Code Review)
Libraryupgrader has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375507 )

Change subject: build: Updating mediawiki/mediawiki-codesniffer to 0.12.0
..

build: Updating mediawiki/mediawiki-codesniffer to 0.12.0

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


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

diff --git a/composer.json b/composer.json
index f4ff238..d8c8fe9 100644
--- a/composer.json
+++ b/composer.json
@@ -25,7 +25,7 @@
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
-   "mediawiki/mediawiki-codesniffer": "0.11.0"
+   "mediawiki/mediawiki-codesniffer": "0.12.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0aade1290d95dc473ecc5b63a29d1b850f919e8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GPGMail
Gerrit-Branch: master
Gerrit-Owner: Libraryupgrader 

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


[MediaWiki-commits] [Gerrit] labs/libraryupgrader[master]: Escape / in password

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

Change subject: Escape / in password
..


Escape / in password

Change-Id: I6f032ae5f09abf1ecec126822e152c3bfb6be674
---
M container/thing.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/container/thing.py b/container/thing.py
index 23036a4..feb0f86 100755
--- a/container/thing.py
+++ b/container/thing.py
@@ -28,6 +28,7 @@
 import shutil
 import subprocess
 import tempfile
+import urllib.parse
 import xml.etree.ElementTree as ET
 
 RULE = ''
@@ -47,7 +48,7 @@
 host = ''
 if user:
 if pw:
-host = user + ':' + pw + '@'
+host = user + ':' + urllib.parse.quote_plus(pw) + '@'
 else:
 host = user + '@'
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f032ae5f09abf1ecec126822e152c3bfb6be674
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Escape / in password

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

Change subject: Escape / in password
..

Escape / in password

Change-Id: I6f032ae5f09abf1ecec126822e152c3bfb6be674
---
M container/thing.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/06/375506/1

diff --git a/container/thing.py b/container/thing.py
index 23036a4..feb0f86 100755
--- a/container/thing.py
+++ b/container/thing.py
@@ -28,6 +28,7 @@
 import shutil
 import subprocess
 import tempfile
+import urllib.parse
 import xml.etree.ElementTree as ET
 
 RULE = ''
@@ -47,7 +48,7 @@
 host = ''
 if user:
 if pw:
-host = user + ':' + pw + '@'
+host = user + ':' + urllib.parse.quote_plus(pw) + '@'
 else:
 host = user + '@'
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f032ae5f09abf1ecec126822e152c3bfb6be674
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] labs/libraryupgrader[master]: Ignore logs/*.log

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

Change subject: Ignore logs/*.log
..


Ignore logs/*.log

Change-Id: I3a41ec15e618d31ff5750b857c7bea976f33030e
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 7157448..6f9ee2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 extensions/*.html
 index.html
 sniffs/*.html
+logs/*.log

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3a41ec15e618d31ff5750b857c7bea976f33030e
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Set LANG=C.UTF-8

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

Change subject: Set LANG=C.UTF-8
..


Set LANG=C.UTF-8

Make Python 3 be able to read utf-8 files properly.

Change-Id: I47a5e7aa71ead546a58dd81c339d61030eecd171
---
M Dockerfile
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/Dockerfile b/Dockerfile
index d98335e..517a33d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
 FROM debian:stretch-slim
+ENV LANG C.UTF-8
 RUN apt-get update && apt-get install -y composer git php-xml php-zip php-gd 
php-mbstring php-curl python3 python3-pip python3-setuptools python3-wheel 
python3-requests --no-install-recommends && rm -rf /var/lib/apt/lists/*
 RUN cd /tmp && composer require mediawiki/mediawiki-codesniffer 0.11.0 && rm 
-rf *
 RUN cd /tmp && composer require mediawiki/mediawiki-codesniffer 0.11.1 && rm 
-rf *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47a5e7aa71ead546a58dd81c339d61030eecd171
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Remove unused code

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

Change subject: Remove unused code
..


Remove unused code

Users need to specify the explicit version to upgrade to, we don't pull
anything from packagist.

Change-Id: I6aeb09f75b0b42b83e0755a161ff7716cc6b29cb
---
M Dockerfile
M container/thing.py
2 files changed, 1 insertion(+), 26 deletions(-)

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



diff --git a/Dockerfile b/Dockerfile
index 830712d..d98335e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@
 RUN cd /tmp && composer require jakub-onderka/php-parallel-lint && rm -rf *
 RUN cd /tmp && composer require jakub-onderka/php-console-color && rm -rf *
 RUN cd /tmp && composer require jakub-onderka/php-console-highlighter && rm 
-rf *
-RUN pip3 install semver grr
+RUN pip3 install grr
 RUN git config --global user.name "libraryupgrader"
 RUN git config --global user.email "tools.libraryupgra...@tools.wmflabs.org"
 COPY ./container /usr/src/myapp
diff --git a/container/thing.py b/container/thing.py
index d9f159c..23036a4 100755
--- a/container/thing.py
+++ b/container/thing.py
@@ -21,12 +21,10 @@
 # This script runs *inside* a Docker container
 
 from collections import OrderedDict
-import functools
 import json
 import os
 import re
 import requests
-import semver
 import shutil
 import subprocess
 import tempfile
@@ -55,29 +53,6 @@
 
 host += 'gerrit.wikimedia.org'
 return 'https://%s/r/%s.git' % (host, repo)
-
-
-@functools.lru_cache()
-def get_packagist_version(package: str) -> str:
-r = s.get('https://packagist.org/packages/%s.json?1' % package)
-resp = r.json()['package']['versions']
-normalized = set()
-for ver in resp:
-if not (ver.startswith('dev-') or ver.endswith('-dev')):
-if ver.startswith('v'):
-normalized.add(ver[1:])
-else:
-normalized.add(ver)
-print(normalized)
-version = max(normalized)
-for normal in normalized:
-try:
-if semver.compare(version, normal) == -1:
-version = normal
-except ValueError:
-pass
-print('Latest %s: %s' % (package, version))
-return version
 
 
 def commit_and_push(files, msg: str, branch: str, topic: str, remote='origin', 
plus2=False, push=True):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6aeb09f75b0b42b83e0755a161ff7716cc6b29cb
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Add a script to rotate the Gerrit HTTP password

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

Change subject: Add a script to rotate the Gerrit HTTP password
..


Add a script to rotate the Gerrit HTTP password

Change-Id: I1468b99e404ede9c22caac92b1d391342a373383
---
A change_password.py
1 file changed, 61 insertions(+), 0 deletions(-)

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



diff --git a/change_password.py b/change_password.py
new file mode 100755
index 000..795aa0b
--- /dev/null
+++ b/change_password.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+"""
+Resets a Gerrit account's HTTP password
+Copyright (C) 2017 Kunal Mehta 
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see .
+"""
+
+import json
+import getpass
+import requests
+from requests.auth import HTTPDigestAuth
+import sys
+
+import upgrade
+
+s = requests.Session()
+
+
+def gerrit_request(method, path, **kwargs):
+r = s.request(method, 'https://gerrit.wikimedia.org/r/a/' + path, **kwargs)
+r.raise_for_status()
+
+return json.loads(r.text[4:])
+
+
+def main():
+pw = getpass.getpass('HTTP Password for %s: ' % upgrade.GERRIT_USER)
+auth = HTTPDigestAuth('libraryupgrader', pw)
+# Check that we're logged in as the right user
+account = gerrit_request('GET', path='accounts/self', auth=auth)
+if account['username'] != upgrade.GERRIT_USER:
+print('Error, logged in as %(username)s (%(email)s)??' % account)
+sys.exit(1)
+print('Successfully logged in as %(username)s' % account)
+new_password = gerrit_request(
+'PUT',
+path='accounts/self/password.http',
+auth=auth,
+data=json.dumps({'generate': True}),
+headers={'Content-Type': 'application/json'}
+)
+print('The following is your new HTTP password, please save it:')
+print('--')
+print(new_password)
+print('--')
+
+
+if __name__ == '__main__':
+main()

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1468b99e404ede9c22caac92b1d391342a373383
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Prompt for HTTP password instead of keeping it on disk

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

Change subject: Prompt for HTTP password instead of keeping it on disk
..


Prompt for HTTP password instead of keeping it on disk

Per discussion on T174760.

Change-Id: I4c6f4bd614ebb9cfc4e5ec95935a493b0f497a95
---
M .gitignore
D config.json.example
M upgrade.py
3 files changed, 11 insertions(+), 21 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 5db91c0..7157448 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
 extensions/*.html
 index.html
 sniffs/*.html
-config.json
diff --git a/config.json.example b/config.json.example
deleted file mode 100755
index 8983e57..000
--- a/config.json.example
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-"GERRIT_USER": "libraryupgrader",
-"GERRIT_PW": ""
-}
diff --git a/upgrade.py b/upgrade.py
index e4093f4..193d70f 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -17,7 +17,7 @@
 along with this program.  If not, see .
 """
 
-import json
+import getpass
 import os
 import sys
 
@@ -25,12 +25,7 @@
 import mw
 
 
-if os.path.exists('config.json'):
-with open('config.json') as f:
-CONFIG = json.load(f)
-else:
-CONFIG = {}
-
+GERRIT_USER = 'libraryupgrader'
 CANARIES = [
 'mediawiki/extensions/Linter',
 'mediawiki/extensions/MassMessage',
@@ -40,14 +35,14 @@
 ]
 
 
-def run(repo: str, library: str, version: str) -> str:
+def run(repo: str, library: str, version: str, pw: str) -> str:
 env = {
 'MODE': 'upgrade',
 'REPO': repo,
 'PACKAGE': library,
 'VERSION': version,
-'GERRIT_USER': CONFIG.get('GERRIT_USER'),
-'GERRIT_PW': CONFIG.get('GERRIT_PW'),
+'GERRIT_USER': GERRIT_USER,
+'GERRIT_PW': pw,
 }
 name = repo.split('/')[-1] + library.split('/')[-1]
 docker.run(name, env)
@@ -55,11 +50,10 @@
 return name
 
 
-def get_safe_logs(name: str) -> str:
+def get_safe_logs(name: str, pw: str) -> str:
 logs = docker.logs(name)
-if CONFIG.get('GERRIT_PW'):
-# Prevent the password from accidentally leaking
-logs = logs.replace(CONFIG.get('GERRIT_PW'), '')
+# Prevent the password from accidentally leaking
+logs = logs.replace(pw, '')
 
 return logs
 
@@ -76,6 +70,7 @@
 library = sys.argv[1]
 version = sys.argv[2]
 repo = sys.argv[3]
+pw = getpass.getpass('HTTP Password for %s: ' % GERRIT_USER)
 if repo == 'extensions':
 repos = get_extension_list(library, version_match=version)
 elif repo == 'canaries':
@@ -84,13 +79,13 @@
 repos = [repo]
 processed = set()
 for repo in repos:
-name = run(repo, library, version)
+name = run(repo, library, version, pw)
 processed.add(name)
 docker.wait_for_containers(count=2)
 
 docker.wait_for_containers(0)
 for name in processed:
-logs = get_safe_logs(name)
+logs = get_safe_logs(name, pw)
 with open(os.path.join('logs', name + '.log'), 'w') as f:
 f.write(logs)
 print('Saved logs to %s.log' % name)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c6f4bd614ebb9cfc4e5ec95935a493b0f497a95
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
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] labs/libraryupgrader[master]: Set LANG=C.UTF-8

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

Change subject: Set LANG=C.UTF-8
..

Set LANG=C.UTF-8

Make Python 3 be able to read utf-8 files properly.

Change-Id: I47a5e7aa71ead546a58dd81c339d61030eecd171
---
M Dockerfile
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/04/375504/1

diff --git a/Dockerfile b/Dockerfile
index d98335e..517a33d 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,5 @@
 FROM debian:stretch-slim
+ENV LANG C.UTF-8
 RUN apt-get update && apt-get install -y composer git php-xml php-zip php-gd 
php-mbstring php-curl python3 python3-pip python3-setuptools python3-wheel 
python3-requests --no-install-recommends && rm -rf /var/lib/apt/lists/*
 RUN cd /tmp && composer require mediawiki/mediawiki-codesniffer 0.11.0 && rm 
-rf *
 RUN cd /tmp && composer require mediawiki/mediawiki-codesniffer 0.11.1 && rm 
-rf *

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47a5e7aa71ead546a58dd81c339d61030eecd171
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] labs/libraryupgrader[master]: Remove unused code

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

Change subject: Remove unused code
..

Remove unused code

Users need to specify the explicit version to upgrade to, we don't pull
anything from packagist.

Change-Id: I6aeb09f75b0b42b83e0755a161ff7716cc6b29cb
---
M Dockerfile
M container/thing.py
2 files changed, 1 insertion(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/03/375503/1

diff --git a/Dockerfile b/Dockerfile
index 830712d..d98335e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@
 RUN cd /tmp && composer require jakub-onderka/php-parallel-lint && rm -rf *
 RUN cd /tmp && composer require jakub-onderka/php-console-color && rm -rf *
 RUN cd /tmp && composer require jakub-onderka/php-console-highlighter && rm 
-rf *
-RUN pip3 install semver grr
+RUN pip3 install grr
 RUN git config --global user.name "libraryupgrader"
 RUN git config --global user.email "tools.libraryupgra...@tools.wmflabs.org"
 COPY ./container /usr/src/myapp
diff --git a/container/thing.py b/container/thing.py
index d9f159c..23036a4 100755
--- a/container/thing.py
+++ b/container/thing.py
@@ -21,12 +21,10 @@
 # This script runs *inside* a Docker container
 
 from collections import OrderedDict
-import functools
 import json
 import os
 import re
 import requests
-import semver
 import shutil
 import subprocess
 import tempfile
@@ -55,29 +53,6 @@
 
 host += 'gerrit.wikimedia.org'
 return 'https://%s/r/%s.git' % (host, repo)
-
-
-@functools.lru_cache()
-def get_packagist_version(package: str) -> str:
-r = s.get('https://packagist.org/packages/%s.json?1' % package)
-resp = r.json()['package']['versions']
-normalized = set()
-for ver in resp:
-if not (ver.startswith('dev-') or ver.endswith('-dev')):
-if ver.startswith('v'):
-normalized.add(ver[1:])
-else:
-normalized.add(ver)
-print(normalized)
-version = max(normalized)
-for normal in normalized:
-try:
-if semver.compare(version, normal) == -1:
-version = normal
-except ValueError:
-pass
-print('Latest %s: %s' % (package, version))
-return version
 
 
 def commit_and_push(files, msg: str, branch: str, topic: str, remote='origin', 
plus2=False, push=True):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6aeb09f75b0b42b83e0755a161ff7716cc6b29cb
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] labs/libraryupgrader[master]: Ignore logs/*.log

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

Change subject: Ignore logs/*.log
..

Ignore logs/*.log

Change-Id: I3a41ec15e618d31ff5750b857c7bea976f33030e
---
M .gitignore
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/05/375505/1

diff --git a/.gitignore b/.gitignore
index 7157448..6f9ee2d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 extensions/*.html
 index.html
 sniffs/*.html
+logs/*.log

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a41ec15e618d31ff5750b857c7bea976f33030e
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] pywikibot/core[master]: Added documentation for sql option in replace.py

2017-09-02 Thread Zoranzoki21 (Code Review)
Zoranzoki21 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375502 )

Change subject: Added documentation for sql option in replace.py
..

Added documentation for sql option in replace.py

Bug: T124869
Change-Id: Ie10774b209df955d59b0be1032ef18ed948a73e2
---
M scripts/replace.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/02/375502/2

diff --git a/scripts/replace.py b/scripts/replace.py
index c1e7bcb..559806f 100755
--- a/scripts/replace.py
+++ b/scripts/replace.py
@@ -12,6 +12,9 @@
 
 Furthermore, the following command line parameters are supported:
 
+-sql  Retrieve information from a SQL live database (see
+  https://wikitech.wikimedia.org/wiki/Help:Toolforge/Database 
for instruction).
+
 -xml  Retrieve information from a local XML dump (pages-articles
   or pages-meta-current, see https://download.wikimedia.org).
   Argument can also be given as "-xml:filename".

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie10774b209df955d59b0be1032ef18ed948a73e2
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: 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] labs/libraryupgrader[master]: Add a script to rotate the Gerrit HTTP password

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

Change subject: Add a script to rotate the Gerrit HTTP password
..

Add a script to rotate the Gerrit HTTP password

Change-Id: I1468b99e404ede9c22caac92b1d391342a373383
---
A change_password.py
1 file changed, 61 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/01/375501/1

diff --git a/change_password.py b/change_password.py
new file mode 100755
index 000..795aa0b
--- /dev/null
+++ b/change_password.py
@@ -0,0 +1,61 @@
+#!/usr/bin/env python3
+"""
+Resets a Gerrit account's HTTP password
+Copyright (C) 2017 Kunal Mehta 
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Affero General Public License as published by
+the Free Software Foundation, either version 3 of the License, or
+(at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU Affero General Public License for more details.
+
+You should have received a copy of the GNU Affero General Public License
+along with this program.  If not, see .
+"""
+
+import json
+import getpass
+import requests
+from requests.auth import HTTPDigestAuth
+import sys
+
+import upgrade
+
+s = requests.Session()
+
+
+def gerrit_request(method, path, **kwargs):
+r = s.request(method, 'https://gerrit.wikimedia.org/r/a/' + path, **kwargs)
+r.raise_for_status()
+
+return json.loads(r.text[4:])
+
+
+def main():
+pw = getpass.getpass('HTTP Password for %s: ' % upgrade.GERRIT_USER)
+auth = HTTPDigestAuth('libraryupgrader', pw)
+# Check that we're logged in as the right user
+account = gerrit_request('GET', path='accounts/self', auth=auth)
+if account['username'] != upgrade.GERRIT_USER:
+print('Error, logged in as %(username)s (%(email)s)??' % account)
+sys.exit(1)
+print('Successfully logged in as %(username)s' % account)
+new_password = gerrit_request(
+'PUT',
+path='accounts/self/password.http',
+auth=auth,
+data=json.dumps({'generate': True}),
+headers={'Content-Type': 'application/json'}
+)
+print('The following is your new HTTP password, please save it:')
+print('--')
+print(new_password)
+print('--')
+
+
+if __name__ == '__main__':
+main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1468b99e404ede9c22caac92b1d391342a373383
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] labs/libraryupgrader[master]: Prompt for HTTP password instead of keeping it on disk

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

Change subject: Prompt for HTTP password instead of keeping it on disk
..

Prompt for HTTP password instead of keeping it on disk

Per discussion on T174760.

Change-Id: I4c6f4bd614ebb9cfc4e5ec95935a493b0f497a95
---
M .gitignore
D config.json.example
M upgrade.py
3 files changed, 11 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/libraryupgrader 
refs/changes/00/375500/1

diff --git a/.gitignore b/.gitignore
index 5db91c0..7157448 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,4 +2,3 @@
 extensions/*.html
 index.html
 sniffs/*.html
-config.json
diff --git a/config.json.example b/config.json.example
deleted file mode 100755
index 8983e57..000
--- a/config.json.example
+++ /dev/null
@@ -1,4 +0,0 @@
-{
-"GERRIT_USER": "libraryupgrader",
-"GERRIT_PW": ""
-}
diff --git a/upgrade.py b/upgrade.py
index e4093f4..193d70f 100755
--- a/upgrade.py
+++ b/upgrade.py
@@ -17,7 +17,7 @@
 along with this program.  If not, see .
 """
 
-import json
+import getpass
 import os
 import sys
 
@@ -25,12 +25,7 @@
 import mw
 
 
-if os.path.exists('config.json'):
-with open('config.json') as f:
-CONFIG = json.load(f)
-else:
-CONFIG = {}
-
+GERRIT_USER = 'libraryupgrader'
 CANARIES = [
 'mediawiki/extensions/Linter',
 'mediawiki/extensions/MassMessage',
@@ -40,14 +35,14 @@
 ]
 
 
-def run(repo: str, library: str, version: str) -> str:
+def run(repo: str, library: str, version: str, pw: str) -> str:
 env = {
 'MODE': 'upgrade',
 'REPO': repo,
 'PACKAGE': library,
 'VERSION': version,
-'GERRIT_USER': CONFIG.get('GERRIT_USER'),
-'GERRIT_PW': CONFIG.get('GERRIT_PW'),
+'GERRIT_USER': GERRIT_USER,
+'GERRIT_PW': pw,
 }
 name = repo.split('/')[-1] + library.split('/')[-1]
 docker.run(name, env)
@@ -55,11 +50,10 @@
 return name
 
 
-def get_safe_logs(name: str) -> str:
+def get_safe_logs(name: str, pw: str) -> str:
 logs = docker.logs(name)
-if CONFIG.get('GERRIT_PW'):
-# Prevent the password from accidentally leaking
-logs = logs.replace(CONFIG.get('GERRIT_PW'), '')
+# Prevent the password from accidentally leaking
+logs = logs.replace(pw, '')
 
 return logs
 
@@ -76,6 +70,7 @@
 library = sys.argv[1]
 version = sys.argv[2]
 repo = sys.argv[3]
+pw = getpass.getpass('HTTP Password for %s: ' % GERRIT_USER)
 if repo == 'extensions':
 repos = get_extension_list(library, version_match=version)
 elif repo == 'canaries':
@@ -84,13 +79,13 @@
 repos = [repo]
 processed = set()
 for repo in repos:
-name = run(repo, library, version)
+name = run(repo, library, version, pw)
 processed.add(name)
 docker.wait_for_containers(count=2)
 
 docker.wait_for_containers(0)
 for name in processed:
-logs = get_safe_logs(name)
+logs = get_safe_logs(name, pw)
 with open(os.path.join('logs', name + '.log'), 'w') as f:
 f.write(logs)
 print('Saved logs to %s.log' % name)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c6f4bd614ebb9cfc4e5ec95935a493b0f497a95
Gerrit-PatchSet: 1
Gerrit-Project: labs/libraryupgrader
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] pywikibot/core[master]: Add Config in clean_sandbox.py for hi.wiki

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

Change subject: Add Config in clean_sandbox.py for hi.wiki
..


Add Config in clean_sandbox.py for hi.wiki

Bug: T174844
Change-Id: Ic397ff01a11a1b9653bd259e18aa39945c66a2cd
---
M scripts/clean_sandbox.py
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 47457fc..e5f1bf8 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -72,6 +72,7 @@
 'fi': u'{{subst:Hiekka}}',
 'fr': '{{subst:Préchargement pour Bac à sable}}',
 'he': u'{{ארגז חול}}\n',
+'hi': '{{User sandbox}}\n',
 'id': u'{{Bakpasir}}\n',
 'it': '{{sandbox}}'
   '',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic397ff01a11a1b9653bd259e18aa39945c66a2cd
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Mpaa 
Gerrit-Reviewer: Xqt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add Config in clean_sandbox.py for hi.wiki

2017-09-02 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/375491 )

Change subject: Add Config in clean_sandbox.py for hi.wiki
..

Add Config in clean_sandbox.py for hi.wiki

Bug: T174844
Change-Id: Ic397ff01a11a1b9653bd259e18aa39945c66a2cd
---
M scripts/clean_sandbox.py
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/91/375491/1

diff --git a/scripts/clean_sandbox.py b/scripts/clean_sandbox.py
index 47457fc..4c97ca4 100755
--- a/scripts/clean_sandbox.py
+++ b/scripts/clean_sandbox.py
@@ -72,6 +72,7 @@
 'fi': u'{{subst:Hiekka}}',
 'fr': '{{subst:Préchargement pour Bac à sable}}',
 'he': u'{{ארגז חול}}\n',
+'hi': u'{{User sandbox}}\n',
 'id': u'{{Bakpasir}}\n',
 'it': '{{sandbox}}'
   '',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic397ff01a11a1b9653bd259e18aa39945c66a2cd
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>

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