[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPR] Simplify startswith/endswith code

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405584 )

Change subject: [IMPR] Simplify startswith/endswith code
..

[IMPR] Simplify startswith/endswith code

startswith or endswith prefix may be a tuple since py 2.5

Change-Id: Ia70e78a67352574d3031ce6c9851bf6ec5213714
---
M pywikibot/family.py
M scripts/checkimages.py
M scripts/delete.py
M scripts/weblinkchecker.py
4 files changed, 8 insertions(+), 9 deletions(-)


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

diff --git a/pywikibot/family.py b/pywikibot/family.py
index 317b73c..0dae080 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Objects representing MediaWiki families."""
 #
-# (C) Pywikibot team, 2004-2017
+# (C) Pywikibot team, 2004-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -937,7 +937,7 @@
 if fam in config.family_files:
 family_file = config.family_files[fam]
 
-if family_file.startswith('http://') or 
family_file.startswith('https://'):
+if family_file.startswith(('http://', 'https://')):
 myfamily = AutoFamily(fam, family_file)
 Family._families[fam] = myfamily
 return Family._families[fam]
diff --git a/scripts/checkimages.py b/scripts/checkimages.py
index 99ef506..02b340e 100755
--- a/scripts/checkimages.py
+++ b/scripts/checkimages.py
@@ -80,7 +80,7 @@
 # (C) Kyle/Orgullomoore, 2006-2007 (newimage.py)
 # (C) Siebrand Mazeland, 2007-2010
 # (C) Filnik, 2007-2011
-# (C) Pywikibot team, 2007-2017
+# (C) Pywikibot team, 2007-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -1581,7 +1581,7 @@
 u'How many files do you want to check?'))
 else:
 limit = int(arg[7:])
-if arg.startswith('-sleep') or arg.startswith('-time'):
+if arg.startswith(('-sleep', '-time')):
 if arg.startswith('-sleep'):
 length = len('-sleep')
 else:
diff --git a/scripts/delete.py b/scripts/delete.py
index 359c588..57e99fe 100755
--- a/scripts/delete.py
+++ b/scripts/delete.py
@@ -49,7 +49,7 @@
 python pwb.py delete -cat:"To delete" -always
 """
 #
-# (C) Pywikibot team, 2017
+# (C) Pywikibot team, 2017-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -267,7 +267,7 @@
 if not summary:
 un = 'un' if 'undelete' in options else ''
 if pageName:
-if arg.startswith('-cat') or arg.startswith('-subcats'):
+if arg.startswith(('-cat', '-subcats')):
 summary = i18n.twtranslate(mysite, 'delete-from-category',
{'page': pageName})
 elif arg.startswith('-links'):
diff --git a/scripts/weblinkchecker.py b/scripts/weblinkchecker.py
index 54ac583..bc73f08 100755
--- a/scripts/weblinkchecker.py
+++ b/scripts/weblinkchecker.py
@@ -99,7 +99,7 @@
 """
 #
 # (C) Daniel Herding, 2005
-# (C) Pywikibot team, 2005-2017
+# (C) Pywikibot team, 2005-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -442,8 +442,7 @@
 except UnicodeError:
 redirTarget = redirTarget.decode(
 self.getEncodingUsedByServer())
-if redirTarget.startswith('http://') or \
-   redirTarget.startswith('https://'):
+if redirTarget.startswith(('http://', 'https://')):
 self.changeUrl(redirTarget)
 return True
 elif redirTarget.startswith('/'):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia70e78a67352574d3031ce6c9851bf6ec5213714
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...WatchSubpages[master]: Add more composer.json tests and fix found sniffs

2018-01-21 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405585 )

Change subject: Add more composer.json tests and fix found sniffs
..

Add more composer.json tests and fix found sniffs

Bug: T184416
Change-Id: Ib5705bc8c01c95274383e153034817774eda59f4
---
A .phpcs.xml
M WatchSubpages.alias.php
M WatchSubpages.php
M WatchSubpages_body.php
M composer.json
5 files changed, 201 insertions(+), 187 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WatchSubpages 
refs/changes/85/405585/1

diff --git a/.phpcs.xml b/.phpcs.xml
new file mode 100644
index 000..a21ad5a
--- /dev/null
+++ b/.phpcs.xml
@@ -0,0 +1,12 @@
+
+
+   
+   
+   
+   
+   
+   .
+   
+   
+   vendor
+
\ No newline at end of file
diff --git a/WatchSubpages.alias.php b/WatchSubpages.alias.php
index fbfa4ae..0a6022d 100644
--- a/WatchSubpages.alias.php
+++ b/WatchSubpages.alias.php
@@ -5,241 +5,240 @@
  * @file
  * @ingroup Extensions
  */
-// @codingStandardsIgnoreFile
 
-$specialPageAliases = array();
+$specialPageAliases = [];
 
 /** English (English) */
-$specialPageAliases['en'] = array(
-   'WatchSubpages' => array( 'WatchSubpages' ),
-);
+$specialPageAliases['en'] = [
+   'WatchSubpages' => [ 'WatchSubpages' ],
+];
 
 /** Arabic (العربية) */
-$specialPageAliases['ar'] = array(
-   'WatchSubpages' => array( 'مراقبة_الصفحات_الفرعية' ),
-);
+$specialPageAliases['ar'] = [
+   'WatchSubpages' => [ 'مراقبة_الصفحات_الفرعية' ],
+];
 
 /** Egyptian Arabic (مصرى) */
-$specialPageAliases['arz'] = array(
-   'WatchSubpages' => array( 'مراقبة_الصفح_الفرعيه' ),
-);
+$specialPageAliases['arz'] = [
+   'WatchSubpages' => [ 'مراقبة_الصفح_الفرعيه' ],
+];
 
 /** Assamese (অসমীয়া) */
-$specialPageAliases['as'] = array(
-   'WatchSubpages' => array( 'উপপৃষ্ঠাসমূহ_চাওক' ),
-);
+$specialPageAliases['as'] = [
+   'WatchSubpages' => [ 'উপপৃষ্ঠাসমূহ_চাওক' ],
+];
 
 /** Western Balochi (بلوچی رخشانی) */
-$specialPageAliases['bgn'] = array(
-   'WatchSubpages' => array( 'گۆنڈ_دیمانی_دیستین' ),
-);
+$specialPageAliases['bgn'] = [
+   'WatchSubpages' => [ 'گۆنڈ_دیمانی_دیستین' ],
+];
 
 /** Bosnian (bosanski) */
-$specialPageAliases['bs'] = array(
-   'WatchSubpages' => array( 'PratiPodstranice' ),
-);
+$specialPageAliases['bs'] = [
+   'WatchSubpages' => [ 'PratiPodstranice' ],
+];
 
 /** German (Deutsch) */
-$specialPageAliases['de'] = array(
-   'WatchSubpages' => array( 'Unterseiten_beobachten' ),
-);
+$specialPageAliases['de'] = [
+   'WatchSubpages' => [ 'Unterseiten_beobachten' ],
+];
 
 /** Zazaki (Zazaki) */
-$specialPageAliases['diq'] = array(
-   'WatchSubpages' => array( 'BınpelanSeyrKe' ),
-);
+$specialPageAliases['diq'] = [
+   'WatchSubpages' => [ 'BınpelanSeyrKe' ],
+];
 
 /** Lower Sorbian (dolnoserbski) */
-$specialPageAliases['dsb'] = array(
-   'WatchSubpages' => array( 'Pódboki wobglědowaś' ),
-);
+$specialPageAliases['dsb'] = [
+   'WatchSubpages' => [ 'Pódboki wobglědowaś' ],
+];
 
 /** Spanish (español) */
-$specialPageAliases['es'] = array(
-   'WatchSubpages' => array( 'Vigilar_subpáginas' ),
-);
+$specialPageAliases['es'] = [
+   'WatchSubpages' => [ 'Vigilar_subpáginas' ],
+];
 
 /** Persian (فارسی) */
-$specialPageAliases['fa'] = array(
-   'WatchSubpages' => array( 'پی‌گیری_زیرصفحه‌ها' ),
-);
+$specialPageAliases['fa'] = [
+   'WatchSubpages' => [ 'پی‌گیری_زیرصفحه‌ها' ],
+];
 
 /** Finnish (suomi) */
-$specialPageAliases['fi'] = array(
-   'WatchSubpages' => array( 'Tarkkaile_alasivuja' ),
-);
+$specialPageAliases['fi'] = [
+   'WatchSubpages' => [ 'Tarkkaile_alasivuja' ],
+];
 
 /** French (français) */
-$specialPageAliases['fr'] = array(
-   'WatchSubpages' => array( 'Voir_les_sous-pages', 'VoirSousPages' ),
-);
+$specialPageAliases['fr'] = [
+   'WatchSubpages' => [ 'Voir_les_sous-pages', 'VoirSousPages' ],
+];
 
 /** Arpitan (arpetan) */
-$specialPageAliases['frp'] = array(
-   'WatchSubpages' => array( 'Siuvre_les_sot-pâges', 'SiuvreLesSotPâges' ),
-);
+$specialPageAliases['frp'] = [
+   'WatchSubpages' => [ 'Siuvre_les_sot-pâges', 'SiuvreLesSotPâges' ],
+];
 
 /** Galician (galego) */
-$specialPageAliases['gl'] = array(
-   'WatchSubpages' => array( 'Vixiar_as_subpáxinas' ),
-);
+$specialPageAliases['gl'] = [
+   'WatchSubpages' => [ 'Vixiar_as_subpáxinas' ],
+];
 
 /** Swiss German (Alemannisch) */
-$specialPageAliases['gsw'] = array(
-   'WatchSubpages' => array( 'Untersyte_beobachte' ),
-);
+$specialPageAliases['gsw'] = [
+   'WatchSubpages' => [ 'Untersyte_beobachte' ],
+];
 
 /** Gujarati (ગુજરાતી) */
-$specialPageAliases['gu'] = array(
-   'WatchSubpages' => array( 'ઉપપાનાઓ_જુઓ' ),
-);
+$specialPageAliases['gu'] = [
+   'WatchSubpages' => [ 'ઉપપાનાઓ_જુઓ' ],
+];
 
 /** Hebrew (עברית) */

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove filterParents implementation from imagerecat.py

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405533 )

Change subject: Remove filterParents implementation from imagerecat.py
..


Remove filterParents implementation from imagerecat.py

toolserver filter isn't available anymore.
Prevent unsucessful web call.

Bug: T78462
Change-Id: I41e080bf0eb9facd45b25485509fc5628b038503
---
M scripts/imagerecat.py
1 file changed, 10 insertions(+), 24 deletions(-)

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



diff --git a/scripts/imagerecat.py b/scripts/imagerecat.py
index 225b0bc..ea4c5d2 100755
--- a/scripts/imagerecat.py
+++ b/scripts/imagerecat.py
@@ -27,7 +27,7 @@
 """
 #
 # (C) Multichill, 2008-2011
-# (C) Pywikibot team, 2008-2017
+# (C) Pywikibot team, 2008-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -43,6 +43,7 @@
 
 from pywikibot import pagegenerators, textlib
 from pywikibot.comms.http import fetch
+from pywikibot.tools import deprecated
 
 if sys.version_info[0] > 2:
 from urllib.parse import urlencode
@@ -293,12 +294,10 @@
 
 def applyAllFilters(categories):
 """Apply all filters on categories."""
-result = []
 result = filterDisambiguation(categories)
 result = followRedirects(result)
 result = filterBlacklist(result)
 result = filterCountries(result)
-result = filterParents(result)
 return result
 
 
@@ -370,29 +369,16 @@
 return list(set(result))
 
 
+@deprecated
 def filterParents(categories):
-"""Remove all parent categories from the set to prevent 
overcategorization."""
-result = []
-toFilter = u''
-for cat in categories:
-cat = cat.replace('_', ' ')
-toFilter = toFilter + "[[Category:" + cat + "]]\n"
-parameters = urlencode({'source': toFilter.encode('utf-8'),
-'bot': '1'})
-filterCategoriesRe = re.compile(r'\[\[Category:([^\]]*)\]\]')
-try:
-filterCategoriesPage = fetch(
-"https://toolserver.org/~multichill/filtercats.php?%s; % 
parameters)
-result = filterCategoriesRe.findall(
-filterCategoriesPage.content)
-except IOError:
-# Something is wrong, forget about this filter, and return the input
-return categories
+"""
+Remove all parent categories from the set to prevent overcategorization.
 
-if not result:
-# Is empty, dont want to remove all categories
-return categories
-return result
+DEPRECATED: Toolserver script isn't available anymore (T78462).
+This method is kept for compatibility and may be restored sometime by a new
+implementation.
+"""
+return categories
 
 
 def saveImagePage(imagepage, newcats, usage, galleries, onlyFilter):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41e080bf0eb9facd45b25485509fc5628b038503
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Multichill 
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...DeletePagesForGood[master]: Fix extension to support latest mediawiki master branch

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404083 )

Change subject: Fix extension to support latest mediawiki master branch
..


Fix extension to support latest mediawiki master branch

Change-Id: Ie05b83f84235cfc493cd91330ec2a57e4db80d29
---
M ActionDeletePagePermanently.php
1 file changed, 10 insertions(+), 12 deletions(-)

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



diff --git a/ActionDeletePagePermanently.php b/ActionDeletePagePermanently.php
index 0ad913a..2de3850 100644
--- a/ActionDeletePagePermanently.php
+++ b/ActionDeletePagePermanently.php
@@ -3,19 +3,17 @@
 class ActionDeletePagePermanently extends FormAction {
 
public static function AddSkinHook( SkinTemplate &$sktemplate, array 
&$links ) {
-   if ( !$sktemplate->getUser()->isAllowed( 'deleteperm' ) ) {
-   return false;
-   }
+   if ( $sktemplate->getUser()->isAllowed( 'deleteperm' ) ) {
+   $title = $sktemplate->getRelevantTitle();
+   $action = self::getActionName( $sktemplate );
 
-   $title = $sktemplate->getRelevantTitle();
-   $action = self::getActionName( $sktemplate );
-
-   if ( self::canDeleteTitle( $title ) ) {
-   $links['actions']['delete_page_permanently'] = [
-   'class' => ( $action === 
'delete_page_permanently' ) ? 'selected' : false,
-   'text' => $sktemplate->msg( 
'deletepagesforgood-delete_permanently' )->text(),
-   'href' => $title->getLocalUrl( 
'action=delete_page_permanently' )
-   ];
+   if ( self::canDeleteTitle( $title ) ) {
+   $links['actions']['delete_page_permanently'] = [
+   'class' => ( $action === 
'delete_page_permanently' ) ? 'selected' : false,
+   'text' => $sktemplate->msg( 
'deletepagesforgood-delete_permanently' )->text(),
+   'href' => $title->getLocalUrl( 
'action=delete_page_permanently' )
+   ];
+   }
}
 
return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie05b83f84235cfc493cd91330ec2a57e4db80d29
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DeletePagesForGood
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Increase pywikibot-tox-docker timeout to 15 min

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405586 )

Change subject: Increase pywikibot-tox-docker timeout to 15 min
..

Increase pywikibot-tox-docker timeout to 15 min

pywikibot-core-tox-doc-docker needs nearby 10 min and
aborted several times. Increasing that time should fix this issue.

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


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/86/405586/1

diff --git a/jjb/pywikibot.yaml b/jjb/pywikibot.yaml
index 68554e0..2c4eb26 100644
--- a/jjb/pywikibot.yaml
+++ b/jjb/pywikibot.yaml
@@ -11,7 +11,7 @@
  docker_image_var: 
docker-registry.wikimedia.org/releng/tox-pywikibot:0.1.0
  toxenv:
  - doc:
- build_timeout: 10 # minutes
+ build_timeout: 15 # minutes
  - nose
  - nose34
 - job-group:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I817a71ac8faac41a00dd9fdcf368147c62fc5680
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
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/core[master]: mediawiki.special.upload: Show an error message on "|"

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405589 )

Change subject: mediawiki.special.upload: Show an error message on "|"
..

mediawiki.special.upload: Show an error message on "|"

This change prevents that "|" is interpreted as title separator and
shows the following message when the title contains a "|" character:

  The requested page title contains invalid characters: "|".

Before this change the following message is shown on this case:

  The requested page title is empty or contains only the name of a
  namespace.

Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/89/405589/1

diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..c46d2e6 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -71,7 +71,7 @@
formatversion: 2,
action: 'query',
// If title is empty, user input is invalid, 
the API call will produce details about why
-   titles: title ? title.getPrefixedText() : 
this.nameToCheck,
+   titles: [ title ? title.getPrefixedText() : 
this.nameToCheck ],
prop: 'imageinfo',
iiprop: 'uploadwarning',
errorformat: 'html',

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

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

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


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

2018-01-21 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405590 )

Change subject: Convert AddMessages to use extension registration
..

Convert AddMessages to use extension registration

Bug: T185415
Change-Id: I85ecbee49c7e619cf24b2a8e8c338ad7c091385c
---
M AddMessages.php
A extension.json
2 files changed, 39 insertions(+), 26 deletions(-)


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

diff --git a/AddMessages.php b/AddMessages.php
index a24568c..2fc967f 100644
--- a/AddMessages.php
+++ b/AddMessages.php
@@ -1,28 +1,15 @@
  __FILE__,
-   'name' => 'AddMessages',
-   'author' => 'Ike Hecht',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:AddMessages',
-   'descriptionmsg' => 'addmessages-desc',
-   'version' => '0.2',
-];
-
-$wgAutoloadClasses['AddMessages'] = __DIR__ . '/AddMessages.class.php';
-$wgHooks['LocalisationCacheRecache'][] = 
'AddMessages::onLocalisationCacheRecache';
-$wgMessagesDirs['AddMessages'] = __DIR__ . '/i18n';
-
-// Array of message key and value pairs. Will overwrite existing messages.
-// Set in LocalSettings.php
-// Example: $wgAmMessages = array( 'toolbox' => 'My Toolbox' );
-$wgAmMessages = [];
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'AddMessages' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['AddMessages'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the AddMessages extension. 
' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the AddMessages extension requires MediaWiki 
1.29+' );
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..3e62cf3
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,26 @@
+{
+   "name": "AddMessages",
+   "version": "0.2",
+   "author": "Ike Hecht",
+   "url": "https://www.mediawiki.org/wiki/Extension:AddMessages;,
+   "descriptionmsg": "addmessages-desc",
+   "license-name": "GPL-2.0+",
+   "type": "other",
+   "MessagesDirs": {
+   "AddMessages": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "AddMessages": "AddMessages.class.php"
+   },
+   "Hooks": {
+   "LocalisationCacheRecache": 
"AddMessages::onLocalisationCacheRecache"
+   },
+   "config": {
+   "AmMessages": {
+   "value": []
+   }
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85ecbee49c7e619cf24b2a8e8c338ad7c091385c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AddMessages
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] pywikibot/core[master]: [test] Exclude files and checks from code climate maintainab...

2018-01-21 Thread Xqt (Code Review)
Xqt has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404265 )

Change subject: [test] Exclude files and checks from code climate 
maintainability
..


[test] Exclude files and checks from code climate maintainability

Change-Id: I2fdd9467903f76341c9bbd8112d03b51a9255b83
---
A .codeclimate.yml
1 file changed, 16 insertions(+), 0 deletions(-)

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



diff --git a/.codeclimate.yml b/.codeclimate.yml
new file mode 100644
index 000..98f2867
--- /dev/null
+++ b/.codeclimate.yml
@@ -0,0 +1,16 @@
+version: "2"
+
+checks:
+  argument-count:
+enabled: false
+  file-lines:
+enabled: false
+
+exclude_patterns:
+- docs/
+- !docs/conf.py
+- scripts/archive/
+- ez_setup.py
+- *.rst
+- *.txt
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2fdd9467903f76341c9bbd8112d03b51a9255b83
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: Dalba 
Gerrit-Reviewer: Framawiki 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
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...AzharAuth[master]: Convert AzharAuth to use extension registration

2018-01-21 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405592 )

Change subject: Convert AzharAuth to use extension registration
..

Convert AzharAuth to use extension registration

Bug: T185416
Change-Id: Ifd32a7a47bfc51d7d4ef585183ded9b8fffbd386
---
D AzharAuth.options.php
M AzharAuth.php
A extension.json
3 files changed, 74 insertions(+), 100 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AzharAuth 
refs/changes/92/405592/1

diff --git a/AzharAuth.options.php b/AzharAuth.options.php
deleted file mode 100644
index d451f53..000
--- a/AzharAuth.options.php
+++ /dev/null
@@ -1,64 +0,0 @@
-
- * @license http://www.opensource.org/licenses/gpl-2.0.php GPLv2
- * @linkhttp://keruald.sf.net/azhar
- * @linkhttp://www.mediawiki.org/wiki/Extension:Azhàr_Authentication
- * @file
- * @ingroup Extensions
- */
-
-/**
- * @var boolean Determines if a link to the Azhàr intranet homepage should be 
added.
- */
-$wgAzharAuthAddGoToIntranetLink = true;
-
-/**
- * @var boolean If true, only allows authentication through Azhàr and disables 
regular login/logout. Otherwise, Azhàr is an extra option to login.
- */
-$wgAzharAuthOnlyLoginSource = true;
-
-/**
- * @var boolean If true, creates a new account if the user doesn't exist in 
the database.
- */
-$wgAzharAllowCreateAccounts = false;
-
-/**
- * @var array, each row a string for a parameter to match. The fields to use 
to match user between the Azhàr sign in and provisioning document, and the 
local user database. Valid values: username, email.
- */
-$wgAzharMatchAccountBy = array(
-   'email'
-);
-
-/**
- * @var string The Azhàr login URL
- */
-$wgAzharLoginUrl = '';
-
-/**
- * @var string The Azhàr main intranet URL
- */
-$wgAzharMainUrl = '';
-
-/**
- * @var string The Azhàr product name. If omitted, 
[[MediaWiki:defaultproductname]] is used.
- */
-$wgAzharProductName = '';
-
-/**
- * @var string The Azhàr single sign on and provisioning API consumer key
- *
- * The purpose of this key is to identify this sitef, like a login.
- */
-$wgAzharConsumerKey = '';
-
-/**
- * @var string The Azhàr single sign on and provisioning API secret key
- *
- * The purpose of this key is to be a shared secret shared between Azhàr and 
this site, to ensure the information exchanged are legit.
- */
-$wgAzharSecretKey = '';
diff --git a/AzharAuth.php b/AzharAuth.php
index 7e9f2fd..a395bca 100644
--- a/AzharAuth.php
+++ b/AzharAuth.php
@@ -11,41 +11,17 @@
  * @ingroup Extensions
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo( "This file is an extension to the MediaWiki software and is not 
intended to be used standalone.\n" );
-   die( 1 );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'AzharAuth' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['AzharAuth'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the AzharAuth extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the AzharAuth extension requires MediaWiki 1.29+' 
);
 }
 
-///
-/// Extension metadata
-///
-
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'Azhàr Authentication',
-   'version' => '1.2.0',
-   'author' => "Sébastien Santoro aka Dereckson",
-   'url' => 
"https://www.mediawiki.org/wiki/Extension:Azhàr_Authentication;,
-   'descriptionmsg' => "azharauth-desc",
-);
-
-///
-/// Extension initialization
-///
-
-require( 'AzharAuth.options.php' );
-
-$dir = __DIR__ . '/';
-
-$wgAutoloadClasses['AzharAuth'] = $dir . 'AzharAuth.class.php';
-$wgAutoloadClasses['AzharAuthHooks'] = $dir . 'AzharAuthHooks.php';
-$wgAutoloadClasses['SpecialAzharAuth'] = $dir . 'SpecialAzharAuth.php';
-
-$wgMessagesDirs['AzharAuth'] = $dir . 'i18n';
-$wgExtensionMessagesFiles['AzharAuthAlias'] = $dir . 'AzharAuth.alias.php';
-
-$wgHooks['PersonalUrls'][] = 'AzharAuthHooks::editPersonalLinks';
-$wgHooks['SpecialPage_initList'][] = 'AzharAuthHooks::disableSpecialPages';
-$wgHooks['UserLogoutComplete'][] = 'AzharAuthHooks::onUserLogoutComplete';
-
-$wgSpecialPages['AzharAuth'] = 'SpecialAzharAuth';
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..4333e5c
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,62 @@
+{
+   "name": "Azhàr Authentication",
+   "version": "1.2.0",
+   "author": "Sébastien Santoro aka Dereckson",
+   "url": 
"https://www.mediawiki.org/wiki/Extension:Azh%C3%A0r_Authentication;,
+   "descriptionmsg": "azharauth-desc",
+   "license-name": "GPL-2.0",
+   "type": "other",
+   "SpecialPages": {
+   "AzharAuth": "SpecialAzharAuth"
+   },
+   

[MediaWiki-commits] [Gerrit] operations/puppet[production]: ircecho: Support ssl when connecting to irc

2018-01-21 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405591 )

Change subject: ircecho: Support ssl when connecting to irc
..

ircecho: Support ssl when connecting to irc

Put this under a config to let the user decide weather to connect
through ssl.

Change-Id: Ic2bf644d7922873d82548b69fb2ebf86c2b7b25c
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/405591/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ircecho: Enable ssl by default

2018-01-21 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405593 )

Change subject: ircecho: Enable ssl by default
..

ircecho: Enable ssl by default

Change-Id: I8a18191aae21c6fbde5e74af1d22247e3d346a92
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/405593/1


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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: ircecho: Support auth over irc

2018-01-21 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405594 )

Change subject: ircecho: Support auth over irc
..

ircecho: Support auth over irc

This will allow the bot to sign in to get a cloak.

Change-Id: I00a3da8f9e002aa7cf28fdd1855300288654ab75
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/94/405594/1


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

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

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


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

2018-01-21 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405577 )

Change subject: Convert WikEdDiff to use extension registration
..

Convert WikEdDiff to use extension registration

Bug: T185408
Change-Id: I0c236772661d9d37dc051db6507b30fcaa73efee
---
M WikEdDiff.php
A extension.json
2 files changed, 47 insertions(+), 28 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikEdDiff 
refs/changes/77/405577/2

diff --git a/WikEdDiff.php b/WikEdDiff.php
index f7cd3d1..df95e83 100644
--- a/WikEdDiff.php
+++ b/WikEdDiff.php
@@ -23,31 +23,16 @@
  * @author Cacycle (https://en.wikipedia.org/wiki/User:Cacycle)
  */
 
-
-global $wgExtensionCredits, $wgResourceModules, $wgHooks;
-
-// extension credits
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'wikEdDiff',
-   'author' => 'Cacycle',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:wikEdDiff',
-   'descriptionmsg' => 'wiked-diff-desc',
-   'version' => '1.2.5',
-   'license-name' => 'GPL-2.0+' // GNU General Public License v2.0 or later
-);
-
-// hook up
-$dir = __DIR__ . '/';
-$wgResourceModules['ext.wikEdDiff'] = array(
-   'localBasePath' => $dir . 'modules',
-   'remoteExtPath' => 'WikEdDiff/modules',
-   'scripts' => 'ext.wikEdDiff.js',
-   'styles' => 'ext.wikEdDiff.css',
-   'position' => 'top'
-);
-$wgMessagesDirs['WikEdDifferenceEngine'] = $dir . 'i18n';
-$wgAutoloadClasses['WikEdDifferenceEngine'] = $dir . 'WikEdDiff.body.php';
-$wgAutoloadClasses['WikEdDiff'] = $dir . 'WikEdDiff.body.php';
-$wgAutoloadClasses['WikEdDiffText'] = $dir . 'WikEdDiff.body.php';
-$wgHooks['GetDifferenceEngine'][] = 
'WikEdDifferenceEngine::onGetDifferenceEngine';
+ if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'WikEdDiff' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['WikEdDiff'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the WikEdDiff extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the WikEdDiff extension requires MediaWiki 1.29+' 
);
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..dcf2b49
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,34 @@
+{
+   "name": "wikEdDiff",
+   "version": "1.2.5",
+   "author": "Cacycle",
+   "url": "https://www.mediawiki.org/wiki/Extension:wikEdDiff;,
+   "descriptionmsg": "wiked-diff-desc",
+   "license-name": "GPL-2.0+",
+   "type": "other",
+   "MessagesDirs": {
+   "WikEdDifferenceEngine": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "WikEdDifferenceEngine": "WikEdDiff.body.php",
+   "WikEdDiff": "WikEdDiff.body.php",
+   "WikEdDiffText": "WikEdDiff.body.php"
+   },
+   "ResourceModules": {
+   "ext.wikEdDiff": {
+   "scripts": "ext.wikEdDiff.js",
+   "styles": "ext.wikEdDiff.css",
+   "position": "top"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "modules",
+   "remoteExtPath": "WikEdDiff/modules"
+   },
+   "Hooks": {
+   "GetDifferenceEngine": 
"WikEdDifferenceEngine::onGetDifferenceEngine"
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c236772661d9d37dc051db6507b30fcaa73efee
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikEdDiff
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
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...Scribunto[master]: Update RunningStat use statement

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405564 )

Change subject: Update RunningStat use statement
..


Update RunningStat use statement

Bug: T182273
Change-Id: Ida16060a6f0f125a0f5dabdb446b94b93db80cd1
---
M common/Hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/common/Hooks.php b/common/Hooks.php
index 69d8b42..9a5ffe7 100644
--- a/common/Hooks.php
+++ b/common/Hooks.php
@@ -21,7 +21,7 @@
  */
 
 use MediaWiki\MediaWikiServices;
-use RunningStat\PSquare;
+use Wikimedia\PSquare;
 
 /**
  * Hooks for the Scribunto extension.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida16060a6f0f125a0f5dabdb446b94b93db80cd1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Jackmcbarn 
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...TrustedXFF[master]: Update IPSet use statement

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405568 )

Change subject: Update IPSet use statement
..


Update IPSet use statement

Bug: T182273
Change-Id: I090b3e49304d7c966e91b3e23381cd147732ffd9
---
M TrustedXFF.body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TrustedXFF.body.php b/TrustedXFF.body.php
index 445316a..27e3f87 100644
--- a/TrustedXFF.body.php
+++ b/TrustedXFF.body.php
@@ -1,7 +1,7 @@
 https://gerrit.wikimedia.org/r/405568
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I090b3e49304d7c966e91b3e23381cd147732ffd9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TrustedXFF
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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...BlueSpiceInterWikiLinks[master]: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

2018-01-21 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405332 )

Change subject: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces
..


Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

AutoloadNamespaces is a new feature in 1.31

Change-Id: I9ce90cc1bd5dad8e8db0d5e08257c0581cebfb5f
---
M extension.json
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/extension.json b/extension.json
index 73e405b..a7189db 100644
--- a/extension.json
+++ b/extension.json
@@ -10,6 +10,12 @@
],
"descriptionmsg": "bs-interwikilinks-desc",
"type": "bluespice",
+   "requires": {
+   "MediaWiki": ">= 1.31.0",
+   "extensions": {
+   "BlueSpiceFoundation": "*"
+   }
+   },
"bsgExtensions": {
"BlueSpiceInterWikiLinks": {
"className": "InterWikiLinks",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ce90cc1bd5dad8e8db0d5e08257c0581cebfb5f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceInterWikiLinks
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...BlueSpicePermissionManager[master]: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

2018-01-21 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405331 )

Change subject: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces
..


Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

AutoloadNamespaces is a new feature in 1.31

Change-Id: Ie0b392a5e32065e69b820c2d2d3839cbc5c0c1f7
---
M extension.json
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/extension.json b/extension.json
index 2d1a0c7..9c6f97f 100644
--- a/extension.json
+++ b/extension.json
@@ -9,6 +9,12 @@
],
"descriptionmsg": "bs-permissionmanager-desc",
"type": "bluespice",
+   "requires": {
+   "MediaWiki": ">= 1.31.0",
+   "extensions": {
+   "BlueSpiceFoundation": "*"
+   }
+   },
"attributes": {
"BlueSpiceFoundation": {
"Extensions": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0b392a5e32065e69b820c2d2d3839cbc5c0c1f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpicePermissionManager
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...BlueSpiceSmartlist[master]: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

2018-01-21 Thread Umherirrender (Code Review)
Umherirrender has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405330 )

Change subject: Require MediaWiki 1.31 in extension.json for AutoloadNamespaces
..


Require MediaWiki 1.31 in extension.json for AutoloadNamespaces

AutoloadNamespaces is a new feature in 1.31

Change-Id: I4c369b95f4d95142153a935858203c496c34eee4
---
M extension.json
1 file changed, 6 insertions(+), 0 deletions(-)

Approvals:
  Umherirrender: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/extension.json b/extension.json
index b39a5bb..ef050c5 100644
--- a/extension.json
+++ b/extension.json
@@ -12,6 +12,12 @@
],
"descriptionmsg": "bs-smartlist-desc",
"type": "bluespice",
+   "requires": {
+   "MediaWiki": ">= 1.31.0",
+   "extensions": {
+   "BlueSpiceFoundation": "*"
+   }
+   },
"attributes": {
"BlueSpiceFoundation": {
"Extensions": {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c369b95f4d95142153a935858203c496c34eee4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceSmartlist
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...BlueSpiceInterWikiLinks[master]: Set used tables in unit test

2018-01-21 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405579 )

Change subject: Set used tables in unit test
..

Set used tables in unit test

1) BSApiTasksInterWikiLinksManagerTest::testEditInterWikiLink
MWException: When testing database state, the test cases's needDB()
method should return true. Use @group Database or $this->tablesUsed.

Change-Id: I2d35ccf2c4b6f3373ffc2e223a9dc336f2d46b09
---
M tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceInterWikiLinks 
refs/changes/79/405579/1

diff --git a/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php 
b/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
index 374d599..2b0c00b 100644
--- a/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
+++ b/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
@@ -8,6 +8,11 @@
  * @group BlueSpiceInterWikiLnksManager
  */
 class BSApiTasksInterWikiLinksManagerTest extends BSApiTasksTestBase {
+   protected function setUp() {
+   parent::setUp();
+   $this->tablesUsed[] = 'interwiki';
+   }
+
protected function getModuleName( ) {
return 'bs-interwikilinks-tasks';
}
@@ -75,4 +80,3 @@
return false;
}
 }
-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d35ccf2c4b6f3373ffc2e223a9dc336f2d46b09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceInterWikiLinks
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/core[master]: mediawiki.ForeignStructuredUpload: Simplify code by using ES5

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405582 )

Change subject: mediawiki.ForeignStructuredUpload: Simplify code by using ES5
..

mediawiki.ForeignStructuredUpload: Simplify code by using ES5

For iterating over an array replace for() by .push.apply() and .map().

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push#Merging_two_arrays
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Change-Id: I0bb4ed7f71db1e60eb4d76a77c53d022bb2081d1
---
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
1 file changed, 11 insertions(+), 26 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/405582/1

diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
index 0c572d4..4d56940 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
@@ -86,12 +86,9 @@
 * @param {string[]} categories Array of categories to which this 
upload will be added.
 */
ForeignStructuredUpload.prototype.addCategories = function ( categories 
) {
-   var i, category;
-
-   for ( i = 0; i < categories.length; i++ ) {
-   category = categories[ i ];
-   this.categories.push( category );
-   }
+   // The length of the array must be less than 1.
+   // 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push#Merging_two_arrays
+   Array.prototype.push.apply( this.categories, categories );
};
 
/**
@@ -183,18 +180,11 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getDescriptions = function () {
-   var i, desc, templateCalls = [];
-
-   for ( i = 0; i < this.descriptions.length; i++ ) {
-   desc = this.descriptions[ i ];
-   templateCalls.push(
-   this.config.format.description
-   .replace( '$LANGUAGE', desc.language )
-   .replace( '$TEXT', desc.text )
-   );
-   }
-
-   return templateCalls.join( '\n' );
+   return this.descriptions.map( function ( desc ) {
+   return this.config.format.description
+   .replace( '$LANGUAGE', desc.language )
+   .replace( '$TEXT', desc.text );
+   } ).join( '\n' );
};
 
/**
@@ -205,18 +195,13 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getCategories = function () {
-   var i, cat, categoryLinks = [];
-
if ( this.categories.length === 0 ) {
return this.config.format.uncategorized;
}
 
-   for ( i = 0; i < this.categories.length; i++ ) {
-   cat = this.categories[ i ];
-   categoryLinks.push( '[[Category:' + cat + ']]' );
-   }
-
-   return categoryLinks.join( '\n' );
+   return this.categories.map( function ( cat ) {
+   return '[[Category:' + cat + ']]';
+   } ).join( '\n' );
};
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SocialProfile[master]: Remove local variables from PHP doc @return annotations

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405575 )

Change subject: Remove local variables from PHP doc @return annotations
..


Remove local variables from PHP doc @return annotations

These don't mean or provide anything since they're local,
so just remove these.

Change-Id: Iaf689ea49179fe54bf4e25f35583a7b70ebf7869
---
M UserBoard/UserBoardClass.php
M UserProfile/SpecialEditProfile.php
M UserProfile/SpecialUpdateProfile.php
M UserRelationship/SpecialAddRelationship.php
M UserRelationship/SpecialRemoveRelationship.php
5 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/UserBoard/UserBoardClass.php b/UserBoard/UserBoardClass.php
index 8c0044c..c7dc776 100644
--- a/UserBoard/UserBoardClass.php
+++ b/UserBoard/UserBoardClass.php
@@ -527,7 +527,7 @@
 * Gets the time how long ago the given board message was posted
 *
 * @param int $time
-* @return string $timeStr Time, such as "20 days" or "11 hours"
+* @return string Time, such as "20 days" or "11 hours"
 */
public function getTimeAgo( $time ) {
$timeArray = $this->dateDiff( time(), $time );
diff --git a/UserProfile/SpecialEditProfile.php 
b/UserProfile/SpecialEditProfile.php
index a10e7bc..6b3f6be 100644
--- a/UserProfile/SpecialEditProfile.php
+++ b/UserProfile/SpecialEditProfile.php
@@ -436,7 +436,7 @@
/**
 * Displays the form for editing custom (site-specific) information
 *
-* @return string $form HTML
+* @return string HTML
 */
function displayCustomForm( $tar ) {
$dbr = wfGetDB( DB_REPLICA );
diff --git a/UserProfile/SpecialUpdateProfile.php 
b/UserProfile/SpecialUpdateProfile.php
index 57dad49..c7d5eda 100644
--- a/UserProfile/SpecialUpdateProfile.php
+++ b/UserProfile/SpecialUpdateProfile.php
@@ -820,7 +820,7 @@
 * Displays the form for editing custom (site-specific) information.
 *
 * @param User $user
-* @return string $form HTML
+* @return string HTML
 */
function displayCustomForm( $user ) {
$dbr = wfGetDB( DB_MASTER );
diff --git a/UserRelationship/SpecialAddRelationship.php 
b/UserRelationship/SpecialAddRelationship.php
index 740b9f0..eb9e8c0 100644
--- a/UserRelationship/SpecialAddRelationship.php
+++ b/UserRelationship/SpecialAddRelationship.php
@@ -245,7 +245,7 @@
/**
 * Displays the form for adding a friend or a foe
 *
-* @return string $form HTML
+* @return string HTML
 */
function displayForm() {
$out = $this->getOutput();
diff --git a/UserRelationship/SpecialRemoveRelationship.php 
b/UserRelationship/SpecialRemoveRelationship.php
index 353156b..b18275b 100644
--- a/UserRelationship/SpecialRemoveRelationship.php
+++ b/UserRelationship/SpecialRemoveRelationship.php
@@ -170,7 +170,7 @@
/**
 * Displays the form for removing a friend or a foe
 *
-* @return string $form HTML code for the form
+* @return string HTML code for the form
 */
function displayForm() {
$avatar = new wAvatar( $this->user_id_to, 'l' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf689ea49179fe54bf4e25f35583a7b70ebf7869
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SocialProfile
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
Gerrit-Reviewer: Lewis Cawte 
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] pywikibot/core[master]: [cleanup] always use for pagegenerators options inc...

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405581 )

Change subject: [cleanup] always use  for pagegenerators options 
inclusion
..

[cleanup] always use  for pagegenerators options inclusion

All scripts use  token or include pagegenerators options
except interwiki.py. Use the same token for all scripts.

Change-Id: I6f3437c7ae31f79d8ec06c8e427dd9aafabc0686
---
M docs/conf.py
M scripts/interwiki.py
2 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/81/405581/1

diff --git a/docs/conf.py b/docs/conf.py
index 83c04f8..60cfe23 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,7 +1,7 @@
 # -*- coding: utf-8 -*-
 """Configuration file for Sphinx."""
 #
-# (C) Pywikibot team, 2015-2017
+# (C) Pywikibot team, 2015-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -260,7 +260,7 @@
 if os.path.sep + "scripts" + os.path.sep not in obj.__file__:
 return
 for index, line in enumerate(lines):
-if line in ('', '_help;'):
+if line == '':
 lines[index] = ('This script supports use of '
 ':py:mod:`pywikibot.pagegenerators` arguments.')
 elif line == '':
diff --git a/scripts/interwiki.py b/scripts/interwiki.py
index b1bca2f..33b67e2 100755
--- a/scripts/interwiki.py
+++ b/scripts/interwiki.py
@@ -12,7 +12,7 @@
 
 These command-line arguments can be used to specify which pages to work on:
 
-_help;
+
 
 -days: Like -years, but runs through all date pages. Stops at
Dec 31. If the argument is given in the form -days:X,
@@ -337,8 +337,8 @@
 # (C) Rob W.W. Hooft, 2003
 # (C) Daniel Herding, 2004
 # (C) Yuri Astrakhan, 2005-2006
-# (C) xqt, 2009-2017
-# (C) Pywikibot team, 2007-2017
+# (C) xqt, 2009-2018
+# (C) Pywikibot team, 2007-2018
 #
 # Distributed under the terms of the MIT license.
 #
@@ -366,7 +366,7 @@
 unicode = str
 
 docuReplacements = {
-'_help;': pagegenerators.parameterHelp
+'': pagegenerators.parameterHelp
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f3437c7ae31f79d8ec06c8e427dd9aafabc0686
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] pywikibot/core[master]: [doc] No reason to restrict sphinx to very outdated release

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405580 )

Change subject: [doc] No reason to restrict sphinx to very outdated release
..


[doc] No reason to restrict sphinx to very outdated release

Change-Id: Iae68e33e98c44e112a3a234d8237dd5f8fe5dd6e
---
M docs/requirements-py3.txt
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index 7403a65..6ff7fe5 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -1,8 +1,8 @@
 # This is a PIP requirements file for building Sphinx documentation of 
pywikibot
-# using sphinx-1.3b1 on python3.4, and is used by readthedocs.org.
+# using sphinx on python3.4.
 # requests-requirements.txt is also needed
 
-sphinx==1.3.1
+sphinx
 sphinx-epytext>=0.0.4
 numpydoc
 

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

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

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


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

2018-01-21 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405578 )

Change subject: Convert HelpPages to use extension registration
..

Convert HelpPages to use extension registration

Bug: T185407
Change-Id: I32eb35853001c8f24f4025fa20bb00c2d25200f7
---
M HelpPages.php
A extension.json
2 files changed, 51 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/HelpPages 
refs/changes/78/405578/2

diff --git a/HelpPages.php b/HelpPages.php
index 2c69e5b..302ca12 100644
--- a/HelpPages.php
+++ b/HelpPages.php
@@ -12,40 +12,16 @@
  * @license Public domain
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   exit;
-}
-
-/**
- * How long to cache the rendered HTML for
- *
- * default is one week
- */
-$wgHelpPagesExpiry = 60 * 60 * 24 * 7;
-
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'HelpPages',
-   'author' => 'Kunal Mehta',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:HelpPages',
-   'descriptionmsg' => 'helppages-desc',
-   'version' => '0.3.0',
-);
-
-$dir = dirname(__FILE__);
-
-$wgAutoloadClasses['HelpPages'] = $dir . '/HelpPages.body.php';
-$wgAutoloadClasses['HelpPagesHooks'] = $dir . '/HelpPages.hooks.php';
-
-$wgMessagesDirs['HelpPages'] = __DIR__ . '/i18n';
-
-$wgHooks['ShowMissingArticle'][] = 'HelpPagesHooks::onShowMissingArticle';
-$wgHooks['SkinTemplateNavigation::Universal'][] = 
'HelpPagesHooks::onSkinTemplateNavigationUniversal';
-$wgHooks['ArticlePurge'][] = 'HelpPagesHooks::onArticlePurge';
-$wgHooks['LinkBegin'][] = 'HelpPagesHooks::onLinkBegin';
-
-$wgResourceModules['ext.HelpPages'] = array(
-   'styles' => 'ext.HelpPages.css',
-   'localBasePath' => $dir,
-   'remoteExtPath' => 'HelpPages',
-);
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'HelpPages' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['HelpPages'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the HelpPages extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the HelpPages extension requires MediaWiki 1.29+' 
);
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..78a0a3b
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,38 @@
+{
+   "name": "HelpPages",
+   "version": "0.3.0",
+   "author": "Kunal Mehta",
+   "url": "https://www.mediawiki.org/wiki/Extension:HelpPages;,
+   "descriptionmsg": "helppages-desc",
+   "type": "other",
+   "MessagesDirs": {
+   "HelpPages": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "HelpPages": "HelpPages.body.php",
+   "HelpPagesHooks": "HelpPages.hooks.php"
+   },
+   "ResourceModules": {
+   "ext.HelpPages": {
+   "styles": "ext.HelpPages.css"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteExtPath": "HelpPages"
+   },
+   "Hooks": {
+   "ShowMissingArticle": "HelpPagesHooks::onShowMissingArticle",
+   "SkinTemplateNavigation::Universal": 
"HelpPagesHooks::onSkinTemplateNavigationUniversal",
+   "ArticlePurge": "HelpPagesHooks::onArticlePurge",
+   "LinkBegin": "HelpPagesHooks::onLinkBegin"
+   },
+   "config": {
+   "HelpPagesExpiry": {
+   "value": 604800
+   }
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32eb35853001c8f24f4025fa20bb00c2d25200f7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/HelpPages
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
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...ParsoidBatchAPI[master]: Update IPSet use statement

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405567 )

Change subject: Update IPSet use statement
..


Update IPSet use statement

Bug: T182273
Change-Id: I63db3f4e28435800d3f7deee7d81c889fd56b640
---
M includes/ApiParsoidBatch.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ApiParsoidBatch.php b/includes/ApiParsoidBatch.php
index cc5b95b..3918ff5 100644
--- a/includes/ApiParsoidBatch.php
+++ b/includes/ApiParsoidBatch.php
@@ -1,6 +1,6 @@
 https://gerrit.wikimedia.org/r/405567
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I63db3f4e28435800d3f7deee7d81c889fd56b640
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ParsoidBatchAPI
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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] pywikibot/core[master]: [doc] No reason to restrict sphinx to very outdated release

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405580 )

Change subject: [doc] No reason to restrict sphinx to very outdated release
..

[doc] No reason to restrict sphinx to very outdated release

Change-Id: Iae68e33e98c44e112a3a234d8237dd5f8fe5dd6e
---
M docs/requirements-py3.txt
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/80/405580/1

diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index 7403a65..6ff7fe5 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -1,8 +1,8 @@
 # This is a PIP requirements file for building Sphinx documentation of 
pywikibot
-# using sphinx-1.3b1 on python3.4, and is used by readthedocs.org.
+# using sphinx on python3.4.
 # requests-requirements.txt is also needed
 
-sphinx==1.3.1
+sphinx
 sphinx-epytext>=0.0.4
 numpydoc
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae68e33e98c44e112a3a234d8237dd5f8fe5dd6e
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] pywikibot/core[master]: [IMPR] Simplify invalid title parsing

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405583 )

Change subject: [IMPR] Simplify invalid title parsing
..

[IMPR] Simplify invalid title parsing

This is an alternat implementation of
https://gerrit.wikimedia.org/r/#/c/403957/

Change-Id: Ia2456e721472f9bb0386ab15ab1859aa54e63915
---
M pywikibot/page.py
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/83/405583/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 0ca875bc..7863fb1 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -5554,13 +5554,11 @@
 # * with 'relative' URLs. Forbid them explicitly.
 
 if u'.' in t and (
-t == u'.' or t == u'..' or
-t.startswith(u'./') or
-t.startswith(u'../') or
+t in ('.', '..') or
+t.startswith(('./', '../')) or
 u'/./' in t or
 u'/../' in t or
-t.endswith(u'/.') or
-t.endswith(u'/..')
+t.endswith(('/.', '/..')) or
 ):
 raise pywikibot.InvalidTitle(
 u"(contains . / combinations): '%s'"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2456e721472f9bb0386ab15ab1859aa54e63915
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] pywikibot/core[master]: [doc] fix rst issues

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405587 )

Change subject: [doc] fix rst issues
..

[doc] fix rst issues

Change-Id: Ia17ceba1fba965e14749eaf381b3d31ae72606bd
---
M docs/scripts/index.rst
M docs/scripts/scripts.i18n.rst
M docs/scripts/scripts.maintenance.rst
M docs/scripts/scripts.rst
4 files changed, 3 insertions(+), 85 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/87/405587/1

diff --git a/docs/scripts/index.rst b/docs/scripts/index.rst
index c5b1d6e..bef80d8 100644
--- a/docs/scripts/index.rst
+++ b/docs/scripts/index.rst
@@ -1,7 +1,7 @@
 Scripts reference
--
+-
 
-Provided Scripts by pywikibot
+Provided scripts by pywikibot
 =
 
 Pywikibot framework has a lot of ready-to-use scripts for several tasks.
diff --git a/docs/scripts/scripts.i18n.rst b/docs/scripts/scripts.i18n.rst
index e2ed902..07d48b8 100644
--- a/docs/scripts/scripts.i18n.rst
+++ b/docs/scripts/scripts.i18n.rst
@@ -4,5 +4,4 @@
 .. automodule:: scripts.i18n
 :members:
 :undoc-members:
-:show-inheritance:
-
+:show-inheritance:
\ No newline at end of file
diff --git a/docs/scripts/scripts.maintenance.rst 
b/docs/scripts/scripts.maintenance.rst
index 3680c91..bcc29e0 100644
--- a/docs/scripts/scripts.maintenance.rst
+++ b/docs/scripts/scripts.maintenance.rst
@@ -17,7 +17,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.maintenance.colors script
 -
 
@@ -25,7 +24,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.maintenance.compat2core script
 --
@@ -35,7 +33,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.maintenance.make_i18n_dict script
 -
 
@@ -43,7 +40,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.maintenance.wikimedia_sites script
 --
diff --git a/docs/scripts/scripts.rst b/docs/scripts/scripts.rst
index b43271c..4a94d72 100644
--- a/docs/scripts/scripts.rst
+++ b/docs/scripts/scripts.rst
@@ -25,10 +25,8 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.archivebot script
 -
-
 
 scripts.basic script
 
@@ -38,7 +36,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.blockpageschecker script
 
 
@@ -46,7 +43,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.capitalize_redirects script
 ---
@@ -56,7 +52,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.catall script
 -
 
@@ -64,7 +59,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.category script
 ---
@@ -74,7 +68,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.cfd script
 --
 
@@ -82,7 +75,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.checkimages script
 --
@@ -92,7 +84,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.claimit script
 --
 
@@ -100,7 +91,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.clean_sandbox script
 
@@ -110,7 +100,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.commons_link script
 ---
 
@@ -118,7 +107,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.commonscat script
 -
@@ -128,7 +116,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.coordinate_import script
 
 
@@ -136,7 +123,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.cosmetic_changes script
 ---
@@ -146,7 +132,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.create_categories script
 
 
@@ -154,7 +139,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.data_ingestion script
 -
@@ -164,7 +148,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.delete script
 -
 
@@ -172,7 +155,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.disambredir script
 --
@@ -182,7 +164,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.djvutext script
 ---
 
@@ -190,7 +171,6 @@
 :members:
 :undoc-members:
 :show-inheritance:
-
 
 scripts.editarticle script
 --
@@ -200,7 +180,6 @@
 :undoc-members:
 :show-inheritance:
 
-
 scripts.fixing_redirects script
 ---
 
@@ -208,7 +187,6 @@
 :members:
 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.special.upload: Use mediawiki.api.parse

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405588 )

Change subject: mediawiki.special.upload: Use mediawiki.api.parse
..

mediawiki.special.upload: Use mediawiki.api.parse

This also adds the parameter contentmodel=wikitext to the API request.
This ensures that the text is always parsed as wikitext, even with a
title with a different content model like 'MediaWiki:Common.js'.

Change-Id: I29f0c76c3354a8c97b8296224e14341f71726c2f
---
M resources/Resources.php
M resources/src/mediawiki.special/mediawiki.special.upload.js
2 files changed, 3 insertions(+), 5 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index 109ab7d..0e9ab18 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2208,6 +2208,7 @@
'jquery.spinner',
'mediawiki.jqueryMsg',
'mediawiki.api',
+   'mediawiki.api.parse',
'mediawiki.libs.jpegmeta',
'mediawiki.Title',
'mediawiki.util',
diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..0c3eb21 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -134,10 +134,7 @@
 
$spinner = $.createSpinner().insertAfter( $element );
 
-   ( new mw.Api() ).get( {
-   formatversion: 2,
-   action: 'parse',
-   text: '{{' + template + '}}',
+   ( new mw.Api() ).parse( '{{' + template + '}}', {
title: $( '#wpDestFile' ).val() || 
'File:Sample.jpg',
prop: 'text',
pst: true,
@@ -150,7 +147,7 @@
},
 
processResult: function ( result, template, $previewContainer ) 
{
-   this.responseCache[ template ] = result.parse.text;
+   this.responseCache[ template ] = result;
this.showPreview( this.responseCache[ template ], 
$previewContainer );
},
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...SiteScout[master]: Don't call UserBoard::getUserBoardURL()

2018-01-21 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405600 )

Change subject: Don't call UserBoard::getUserBoardURL()
..

Don't call UserBoard::getUserBoardURL()

This is being removed in I913b5463813a23c8b4f5f697096a95af754e8518,
so let's not call this function anymore.

Change-Id: Icb27e324f430df3743d6302d077f050228d595c2
---
M includes/SiteScoutHTML.class.php
M includes/SiteScoutXML.class.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/SiteScoutHTML.class.php b/includes/SiteScoutHTML.class.php
index ff8ca89..9ba7921 100644
--- a/includes/SiteScoutHTML.class.php
+++ b/includes/SiteScoutHTML.class.php
@@ -58,7 +58,7 @@
$commentIcon = $avatar->getAvatarURL();
$talk_page = htmlspecialchars( 
$user_title->getTalkPage()->getFullURL(), ENT_QUOTES );
if ( $wgUserBoard ) {
-   $talk_page = 
UserBoard::getUserBoardURL( $item['username'] );
+   $talk_page = SpecialPage::getTitleFor( 
'UserBoard' )->getFullURL( [ 'user' => $item['username'] ] );
}
$output .= '' . $commentIcon . ' ' . $item['username'] . '';
$output .= '';
diff --git a/includes/SiteScoutXML.class.php b/includes/SiteScoutXML.class.php
index e96d70f..5721297 100644
--- a/includes/SiteScoutXML.class.php
+++ b/includes/SiteScoutXML.class.php
@@ -18,7 +18,7 @@
$user_title = Title::makeTitle( NS_USER, 
$item['username'] );
$talk_page = $user_title->getTalkPage()->getFullURL();
if ( $wgUserBoard ) {
-   $talk_page = UserBoard::getUserBoardURL( 
$item['username'] );
+   $talk_page = SpecialPage::getTitleFor( 
'UserBoard' )->getFullURL( [ 'user' => $item['username'] ] );
}
 
$page_title = str_replace( '&', '%26', 
$title->getPrefixedText() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icb27e324f430df3743d6302d077f050228d595c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SiteScout
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 

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


[MediaWiki-commits] [Gerrit] mediawiki...SiteScout[master]: Don't call UserBoard::getUserBoardURL()

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405600 )

Change subject: Don't call UserBoard::getUserBoardURL()
..


Don't call UserBoard::getUserBoardURL()

This is being removed in I913b5463813a23c8b4f5f697096a95af754e8518,
so let's not call this function anymore.

Change-Id: Icb27e324f430df3743d6302d077f050228d595c2
---
M includes/SiteScoutHTML.class.php
M includes/SiteScoutXML.class.php
2 files changed, 8 insertions(+), 2 deletions(-)

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



diff --git a/includes/SiteScoutHTML.class.php b/includes/SiteScoutHTML.class.php
index ff8ca89..53931e0 100644
--- a/includes/SiteScoutHTML.class.php
+++ b/includes/SiteScoutHTML.class.php
@@ -58,7 +58,10 @@
$commentIcon = $avatar->getAvatarURL();
$talk_page = htmlspecialchars( 
$user_title->getTalkPage()->getFullURL(), ENT_QUOTES );
if ( $wgUserBoard ) {
-   $talk_page = 
UserBoard::getUserBoardURL( $item['username'] );
+   $talk_page = htmlspecialchars(
+   SpecialPage::getTitleFor( 
'UserBoard' )->getFullURL( [ 'user' => $item['username'] ] ),
+   ENT_QUOTES
+   );
}
$output .= '' . $commentIcon . ' ' . $item['username'] . '';
$output .= '';
diff --git a/includes/SiteScoutXML.class.php b/includes/SiteScoutXML.class.php
index e96d70f..0c4e8ec 100644
--- a/includes/SiteScoutXML.class.php
+++ b/includes/SiteScoutXML.class.php
@@ -18,7 +18,10 @@
$user_title = Title::makeTitle( NS_USER, 
$item['username'] );
$talk_page = $user_title->getTalkPage()->getFullURL();
if ( $wgUserBoard ) {
-   $talk_page = UserBoard::getUserBoardURL( 
$item['username'] );
+   $talk_page = htmlspecialchars(
+   SpecialPage::getTitleFor( 'UserBoard' 
)->getFullURL( [ 'user' => $item['username'] ] ),
+   ENT_QUOTES
+   );
}
 
$page_title = str_replace( '&', '%26', 
$title->getPrefixedText() );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icb27e324f430df3743d6302d077f050228d595c2
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SiteScout
Gerrit-Branch: master
Gerrit-Owner: SamanthaNguyen 
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...Echo[master]: Fix multiple PHP class declarations in one file

2018-01-21 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405608 )

Change subject: Fix multiple PHP class declarations in one file
..

Fix multiple PHP class declarations in one file

All files containing more than one PHP class were splitted into
multiple files.
extension.json was updated to match new class locations.

Bug: T177809
Change-Id: I4e7d8f02164c3048c41c4c9fbe4be18a99e7abaa
---
M extension.json
D includes/ContainmentSet.php
A includes/EchoArrayList.php
A includes/EchoCachedList.php
A includes/EchoContainmentList.php
A includes/EchoContainmentSet.php
A includes/EchoDiffGroup.php
R includes/EchoDiffParser.php
A includes/EchoOnWikiList.php
9 files changed, 397 insertions(+), 371 deletions(-)


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

diff --git a/extension.json b/extension.json
index 3928781..088b764 100644
--- a/extension.json
+++ b/extension.json
@@ -921,18 +921,18 @@
"EchoAbstractMapper": "includes/mapper/AbstractMapper.php",
"EchoAbstractMapperStub": 
"tests/phpunit/mapper/AbstractMapperTest.php",
"EchoAbstractMapperTest": 
"tests/phpunit/mapper/AbstractMapperTest.php",
-   "EchoArrayList": "includes/ContainmentSet.php",
+   "EchoArrayList": "includes/EchoArrayList.php",
"EchoAttributeManager": "includes/AttributeManager.php",
"EchoAttributeManagerTest": 
"tests/phpunit/AttributeManagerTest.php",
-   "EchoCachedList": "includes/ContainmentSet.php",
+   "EchoCachedList": "includes/EchoCachedList.php",
"EchoCallbackIterator": 
"includes/iterator/CallbackIterator.php",
"EchoCatchableFatalErrorException": 
"includes/exception/CatchableFatalErrorException.php",
-   "EchoContainmentList": "includes/ContainmentSet.php",
-   "EchoContainmentSet": "includes/ContainmentSet.php",
+   "EchoContainmentList": "includes/EchoContainmentList.php",
+   "EchoContainmentSet": "includes/EchoContainmentSet.php",
"EchoDataOutputFormatter": "includes/DataOutputFormatter.php",
"EchoDeferredMarkAsDeletedUpdate": 
"includes/DeferredMarkAsDeletedUpdate.php",
-   "EchoDiffGroup": "includes/DiffParser.php",
-   "EchoDiffParser": "includes/DiffParser.php",
+   "EchoDiffGroup": "includes/EchoDiffGroup.php",
+   "EchoDiffParser": "includes/EchoDiffParser.php",
"EchoDiffParserTest": "tests/phpunit/DiffParserTest.php",
"EchoDiscussionParser": "includes/DiscussionParser.php",
"EchoDiscussionParserTest": 
"tests/phpunit/DiscussionParserTest.php",
@@ -975,7 +975,7 @@
"EchoNotificationTest": 
"tests/phpunit/model/NotificationTest.php",
"EchoNotifier": "includes/Notifier.php",
"EchoOOUI\\LabelIconWidget": 
"includes/ooui/LabelIconWidget.php",
-   "EchoOnWikiList": "includes/ContainmentSet.php",
+   "EchoOnWikiList": "includes/EchoOnWikiList.php",
"EchoPageLinkedPresentationModel": 
"includes/formatters/PageLinkedPresentationModel.php",
"EchoPlainTextDigestEmailFormatter": 
"includes/formatters/EchoPlainTextDigestEmailFormatter.php",
"EchoPlainTextEmailFormatter": 
"includes/formatters/EchoPlainTextEmailFormatter.php",
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
deleted file mode 100644
index 5b779d0..000
--- a/includes/ContainmentSet.php
+++ /dev/null
@@ -1,271 +0,0 @@
-addArray( $wgSomeGlobalParameter );
- *   $set->addOnWiki( NS_USER, 'Foo/bar-baz', $cache, 
'some_user_specific_cache_key' );
- *
- * Usage:
- *   if ( $set->contains( 'SomeUser' ) ) {
- *   ...
- *   }
- */
-class EchoContainmentSet {
-   /**
-* @var EchoContainmentList[]
-*/
-   protected $lists = [];
-
-   /**
-* @var User
-*/
-   protected $recipient;
-
-   public function __construct( User $recipient ) {
-   $this->recipient = $recipient;
-   }
-
-   /**
-* Add an EchoContainmentList to the set of lists checked by 
self::contains()
-*
-* @param EchoContainmentList $list
-*/
-   public function add( EchoContainmentList $list ) {
-   $this->lists[] = $list;
-   }
-
-   /**
-* Add a php array to the set of lists checked by self::contains()
-*
-* @param array $list
-*/
-   public function addArray( array $list ) {
-   $this->add( new EchoArrayList( $list ) );
-   }
-
-   /**
-* Add a list from a user preference to the set of lists checked by 
self::contains().
-*
-* @param string $preferenceName
-*/
-   public function 

[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Remove unneeded $.ready()

2018-01-21 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405658 )

Change subject: Remove unneeded $.ready()
..

Remove unneeded $.ready()

Change-Id: I72b0b185ea5f48df06e680b9a61a967c6f9c60e8
---
M ext.nuke.confirm.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke 
refs/changes/58/405658/1

diff --git a/ext.nuke.confirm.js b/ext.nuke.confirm.js
index 6239755..928e671 100644
--- a/ext.nuke.confirm.js
+++ b/ext.nuke.confirm.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-   $( document ).ready( function () {
+   $( function () {
/*global confirm */
 
// Confirm nuke

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Remove unneeded $.ready()

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405658 )

Change subject: Remove unneeded $.ready()
..


Remove unneeded $.ready()

Change-Id: I72b0b185ea5f48df06e680b9a61a967c6f9c60e8
---
M ext.nuke.confirm.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ext.nuke.confirm.js b/ext.nuke.confirm.js
index 6239755..928e671 100644
--- a/ext.nuke.confirm.js
+++ b/ext.nuke.confirm.js
@@ -1,5 +1,5 @@
 ( function ( mw, $ ) {
-   $( document ).ready( function () {
+   $( function () {
/*global confirm */
 
// Confirm nuke

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72b0b185ea5f48df06e680b9a61a967c6f9c60e8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Jforrester 
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...Cargo[master]: Fix to not delete data from "read-only" tables

2018-01-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405660 )

Change subject: Fix to not delete data from "read-only" tables
..

Fix to not delete data from "read-only" tables

i.e., tables that have an existing "replacement table".

Change-Id: Ie0dc47b5e5b81aabbae68f2a50a2441dd1d2cfdf
---
M Cargo.hooks.php
1 file changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/Cargo.hooks.php b/Cargo.hooks.php
index e7ab103..58b7a9b 100644
--- a/Cargo.hooks.php
+++ b/Cargo.hooks.php
@@ -122,7 +122,9 @@
}
 
/**
-* Delete a page
+* Deletes all Cargo data for a specific page - *except* data
+* contained in Cargo tables which are read-only because their
+* "replacement table" exists.
 *
 * @param int $pageID
 * @TODO - move this to a different class, like CargoUtils?
@@ -142,6 +144,11 @@
while ( $row = $dbw->fetchRow( $res ) ) {
$curMainTable = $row['table_name'];
 
+   if ( $cdb->tableExists( $curMainTable . '__NEXT' ) ) {
+   // It's a "read-only" table - ignore.
+   continue;
+   }
+
// First, delete from the "field" tables.
$res2 = $dbw->select( 'cargo_tables', 'field_tables', 
array( 'main_table' => $curMainTable ) );
$row2 = $dbw->fetchRow( $res2 );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.special.upload: Use mediawiki.api.parse

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405588 )

Change subject: mediawiki.special.upload: Use mediawiki.api.parse
..


mediawiki.special.upload: Use mediawiki.api.parse

This also adds the parameter contentmodel=wikitext to the API request.
This ensures that the text is always parsed as wikitext, even with a
title with a different content model like 'MediaWiki:Common.js'.

Change-Id: I29f0c76c3354a8c97b8296224e14341f71726c2f
---
M resources/Resources.php
M resources/src/mediawiki.special/mediawiki.special.upload.js
2 files changed, 3 insertions(+), 5 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 109ab7d..0e9ab18 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2208,6 +2208,7 @@
'jquery.spinner',
'mediawiki.jqueryMsg',
'mediawiki.api',
+   'mediawiki.api.parse',
'mediawiki.libs.jpegmeta',
'mediawiki.Title',
'mediawiki.util',
diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..0c3eb21 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -134,10 +134,7 @@
 
$spinner = $.createSpinner().insertAfter( $element );
 
-   ( new mw.Api() ).get( {
-   formatversion: 2,
-   action: 'parse',
-   text: '{{' + template + '}}',
+   ( new mw.Api() ).parse( '{{' + template + '}}', {
title: $( '#wpDestFile' ).val() || 
'File:Sample.jpg',
prop: 'text',
pst: true,
@@ -150,7 +147,7 @@
},
 
processResult: function ( result, template, $previewContainer ) 
{
-   this.responseCache[ template ] = result.parse.text;
+   this.responseCache[ template ] = result;
this.showPreview( this.responseCache[ template ], 
$previewContainer );
},
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.special.upload: Show an error message on "|"

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405589 )

Change subject: mediawiki.special.upload: Show an error message on "|"
..


mediawiki.special.upload: Show an error message on "|"

This change prevents that "|" is interpreted as title separator and
shows the following message when the title contains a "|" character:

  The requested page title contains invalid characters: "|".

Before this change the following message is shown on this case:

  The requested page title is empty or contains only the name of a
  namespace.

Change-Id: If67ed573ea0b5c28c59a7d90e8581c4b67528450
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..c46d2e6 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -71,7 +71,7 @@
formatversion: 2,
action: 'query',
// If title is empty, user input is invalid, 
the API call will produce details about why
-   titles: title ? title.getPrefixedText() : 
this.nameToCheck,
+   titles: [ title ? title.getPrefixedText() : 
this.nameToCheck ],
prop: 'imageinfo',
iiprop: 'uploadwarning',
errorformat: 'html',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use ES5 String.prototype.trim() instead of jQuery.trim()

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405599 )

Change subject: Use ES5 String.prototype.trim() instead of jQuery.trim()
..


Use ES5 String.prototype.trim() instead of jQuery.trim()

Replace:
* $.trim( str ) by str.trim()

Ensure that str is a string before calling str.trim().

Change-Id: I48f08fdac1e7d802813563c4691e9bbaf2c78336
---
M resources/src/jquery/jquery.colorUtil.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.special/mediawiki.special.block.js
M resources/src/mediawiki.special/mediawiki.special.changecredentials.js
M resources/src/mediawiki.special/mediawiki.special.userlogin.signup.js
M resources/src/mediawiki.widgets/mw.widgets.CategoryMultiselectWidget.js
M resources/src/mediawiki/htmlform/multiselect.js
M resources/src/mediawiki/mediawiki.Title.js
M resources/src/mediawiki/mediawiki.jqueryMsg.js
M resources/src/mediawiki/mediawiki.template.js
10 files changed, 19 insertions(+), 16 deletions(-)

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



diff --git a/resources/src/jquery/jquery.colorUtil.js 
b/resources/src/jquery/jquery.colorUtil.js
index a5b136d..d46d009 100644
--- a/resources/src/jquery/jquery.colorUtil.js
+++ b/resources/src/jquery/jquery.colorUtil.js
@@ -29,6 +29,9 @@
if ( color && Array.isArray( color ) && color.length 
=== 3 ) {
return color;
}
+   if ( typeof color !== 'string' ) {
+   return undefined;
+   }
 
// Look for rgb(num,num,num)
// eslint-disable-next-line no-cond-assign
@@ -77,7 +80,7 @@
}
 
// Otherwise, we're most likely dealing with a named 
color
-   return $.colorUtil.colors[ $.trim( color 
).toLowerCase() ];
+   return $.colorUtil.colors[ color.trim().toLowerCase() ];
},
 
/**
diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 6d67ade..5ca866e 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -105,7 +105,7 @@
if ( rowIndex !== lastRowIndex ) {
lastRowIndex = rowIndex;
cellIndex = $( rows[ rowIndex ] ).data( 
'columnToCell' )[ column ];
-   nodeValue = $.trim( getElementSortKey( 
rows[ rowIndex ].cells[ cellIndex ] ) );
+   nodeValue = getElementSortKey( rows[ 
rowIndex ].cells[ cellIndex ] ).trim();
}
} else {
nodeValue = '';
@@ -1090,7 +1090,7 @@
},
format: function ( s ) {
var tsc;
-   s = $.trim( s.toLowerCase() );
+   s = s.toLowerCase().trim();
if ( ts.collationRegex ) {
tsc = ts.collationTable;
s = s.replace( ts.collationRegex, function ( 
match ) {
@@ -1144,7 +1144,7 @@
return ts.rgx.url[ 0 ].test( s );
},
format: function ( s ) {
-   return $.trim( s.replace( ts.rgx.url[ 1 ], '' ) );
+   return s.replace( ts.rgx.url[ 1 ], '' ).trim();
},
type: 'text'
} );
@@ -1207,7 +1207,7 @@
},
format: function ( s ) {
var match, y;
-   s = $.trim( s.toLowerCase() );
+   s = s.toLowerCase().trim();
 
if ( ( match = s.match( ts.dateRegex[ 0 ] ) ) !== null 
) {
if ( mw.config.get( 'wgDefaultDateFormat' ) === 
'mdy' || mw.config.get( 'wgPageContentLanguage' ) === 'en' ) {
@@ -1266,7 +1266,7 @@
ts.addParser( {
id: 'number',
is: function ( s ) {
-   return $.tablesorter.numberRegex.test( $.trim( s ) );
+   return $.tablesorter.numberRegex.test( s.trim() );
},
format: function ( s ) {
return $.tablesorter.formatDigit( s );
diff --git a/resources/src/mediawiki.special/mediawiki.special.block.js 
b/resources/src/mediawiki.special/mediawiki.special.block.js
index 49e471e..ba93195 100644
--- a/resources/src/mediawiki.special/mediawiki.special.block.js
+++ b/resources/src/mediawiki.special/mediawiki.special.block.js
@@ -23,7 +23,7 @@
expiryWidget = infuseOrNull( 'mw-input-wpExpiry' );
 

[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fixed support for MW 1.23 - fix for c686d11b9f88

2018-01-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405666 )

Change subject: Fixed support for MW 1.23 - fix for c686d11b9f88
..

Fixed support for MW 1.23 - fix for c686d11b9f88

Change-Id: Ie2d322b3410d8ccffb1827e687bf4288fd879967
---
M includes/CargoRecreateDataAction.php
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/includes/CargoRecreateDataAction.php 
b/includes/CargoRecreateDataAction.php
index c4b574c..ebce0be 100644
--- a/includes/CargoRecreateDataAction.php
+++ b/includes/CargoRecreateDataAction.php
@@ -95,5 +95,11 @@
$links['actions'] = $views_links;
return true;
}
+  
+   /**
+* Implement this to support MW 1.23, which has it as an abstract
+* function.
+*/
+   public function execute() { }
 
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Fix wrong use of mw.msg

2018-01-21 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405602 )

Change subject: Fix wrong use of mw.msg
..

Fix wrong use of mw.msg

See https://www.mediawiki.org/wiki/Manual:Messages_API#mw.msg

Bug: T131975
Change-Id: Ib8aa253cb1f994c7abf8939c649a488411455e2f
---
M ext.nuke.confirm.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke 
refs/changes/02/405602/1

diff --git a/ext.nuke.confirm.js b/ext.nuke.confirm.js
index 6d40c9f..6239755 100644
--- a/ext.nuke.confirm.js
+++ b/ext.nuke.confirm.js
@@ -6,7 +6,7 @@
$( 'form[name="nukelist"]' ).on( 'submit', function () {
var pages = $( this ).find( 
'input[name="pages[]"][type="checkbox"]:checked' );
if ( pages.length ) {
-   return confirm( mw.msg( 'nuke-confirm', 
pages.length ).text() );
+   return confirm( mw.msg( 'nuke-confirm', 
pages.length ) );
}
} );
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: watch.js: Let api.js do the joining of the array

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405659 )

Change subject: watch.js: Let api.js do the joining of the array
..

watch.js: Let api.js do the joining of the array

Change-Id: Ie283ed3e071fe1a041f040e72cac061ebc3209d0
---
M resources/src/mediawiki/api/watch.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/59/405659/1

diff --git a/resources/src/mediawiki/api/watch.js 
b/resources/src/mediawiki/api/watch.js
index f50e59a..025c111 100644
--- a/resources/src/mediawiki/api/watch.js
+++ b/resources/src/mediawiki/api/watch.js
@@ -28,7 +28,7 @@
{
formatversion: 2,
action: 'watch',
-   titles: Array.isArray( pages ) ? 
pages.join( '|' ) : String( pages )
+   titles: Array.isArray( pages ) ? pages 
: String( pages )
},
addParams
)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...FlaggedRevs[master]: Add output encoding for message 'revreview-reject-cancel'

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/267215 )

Change subject: Add output encoding for message 'revreview-reject-cancel'
..


Add output encoding for message 'revreview-reject-cancel'

Change-Id: I8ea54ec83045fe53ff99cb9c1cfe376d54052d4b
---
M frontend/RejectConfirmationFormUI.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved



diff --git a/frontend/RejectConfirmationFormUI.php 
b/frontend/RejectConfirmationFormUI.php
index 644812a..4b24f8a 100644
--- a/frontend/RejectConfirmationFormUI.php
+++ b/frontend/RejectConfirmationFormUI.php
@@ -160,7 +160,7 @@
'wpReason', 120, $defaultSummary, [ 'maxlength' => 200 
] ) . "";
$form .= Html::input( 'wpSubmit', wfMessage( 
'revreview-reject-confirm' )->text(), 'submit' );
$form .= ' ';
-   $form .= Linker::link( $this->form->getPage(), wfMessage( 
'revreview-reject-cancel' )->text(),
+   $form .= Linker::link( $this->form->getPage(), wfMessage( 
'revreview-reject-cancel' )->escaped(),
[ 'onClick' => 'history.back(); return history.length 
<= 1;' ],
[ 'oldid' => $this->form->getRefId(), 'diff' => 
$this->form->getOldId() ] );
$form .= Xml::closeElement( 'form' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ea54ec83045fe53ff99cb9c1cfe376d54052d4b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...UploadWizard[wmf/1.31.0-wmf.17]: Fix javascript error on UploadWizard page

2018-01-21 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405661 )

Change subject: Fix javascript error on UploadWizard page
..

Fix javascript error on UploadWizard page

Javascript error on UploadWizard page was halting execution
of js on the page, which caused the bug.

Bug: T184380
Change-Id: I603485550db18dd0459628b0525ef6b24bdd1ed1
(cherry picked from commit d1ba9b68da812f1bb817756af80c87d1b911643e)
---
M resources/details/uw.DescriptionsDetailsWidget.js
1 file changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/resources/details/uw.DescriptionsDetailsWidget.js 
b/resources/details/uw.DescriptionsDetailsWidget.js
index 294ba47..38c18a5 100644
--- a/resources/details/uw.DescriptionsDetailsWidget.js
+++ b/resources/details/uw.DescriptionsDetailsWidget.js
@@ -56,14 +56,11 @@
 * @param {number} n Number of descriptions
 */
uw.DescriptionsDetailsWidget.prototype.addDescriptions = function ( n ) 
{
-   var i, items = [];
+   var items = [];
while ( n-- ) {
items.push( new uw.DescriptionDetailsWidget() );
}
this.addItems( items );
-   for ( i = 0; i < items.length; i++ ) {
-   items[ i ].initialiseUls();
-   }
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I603485550db18dd0459628b0525ef6b24bdd1ed1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UploadWizard
Gerrit-Branch: wmf/1.31.0-wmf.17
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Cparle 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Use ve.dm.MetaList without explicitly requiring metadata index

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405664 )

Change subject: Use ve.dm.MetaList without explicitly requiring metadata index
..


Use ve.dm.MetaList without explicitly requiring metadata index

For future compatibility with Ib5174b0dcba1c24f44d889e08140bee31a064011 .

Change-Id: I15f252ce5d36bc0c38c5f5035e5176bf5e6d96e5
---
M modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
1 file changed, 11 insertions(+), 19 deletions(-)

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



diff --git a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
index 8d277f9..d59200f 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
@@ -107,16 +107,16 @@
  *  or undefined to go at the end
  */
 ve.ui.MWCategoriesPage.prototype.onNewCategory = function ( item, 
beforeMetaItem ) {
+   var args = [ this.getCategoryItemForInsertion( item ) ];
+
// Insert new metaList item
if ( beforeMetaItem ) {
-   this.insertMetaListItem(
-   this.getCategoryItemForInsertion( item ),
-   beforeMetaItem.getOffset(),
-   beforeMetaItem.getIndex()
-   );
-   } else {
-   this.insertMetaListItem( this.getCategoryItemForInsertion( item 
) );
+   args.push( beforeMetaItem.getOffset() );
+   if ( beforeMetaItem.getIndex ) {
+   args.push( beforeMetaItem.getIndex() );
+   }
}
+   this.metaList.insertMeta.apply( this.metaList, args );
 };
 
 /**
@@ -135,11 +135,14 @@
  * @param {ve.dm.MetaItem} metaItem
  */
 ve.ui.MWCategoriesPage.prototype.onMetaListInsert = function ( metaItem ) {
+   var index;
+
// Responsible for adding UI components
if ( metaItem.element.type === 'mwCategory' ) {
+   index = this.metaList.getItemsInGroup( 'mwCategory' ).indexOf( 
metaItem );
this.categoryWidget.addItems(
[ this.getCategoryItemFromMetaListItem( metaItem ) ],
-   this.metaList.findItem( metaItem.getOffset(), 
metaItem.getIndex(), 'mwCategory' )
+   index
);
}
 };
@@ -219,17 +222,6 @@
return ve.extendObject( {}, oldData, newData );
}
return newData;
-};
-
-/**
- * Inserts a meta list item
- *
- * @param {Object} metaBase meta list insert object
- * @param {number} [offset] Offset of the meta items within the document
- * @param {number} [index] Index of the meta item within the group of meta 
items at this offset
- */
-ve.ui.MWCategoriesPage.prototype.insertMetaListItem = function ( metaBase, 
offset, index ) {
-   this.metaList.insertMeta( metaBase, offset, index );
 };
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15f252ce5d36bc0c38c5f5035e5176bf5e6d96e5
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 
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...Cargo[master]: Another fix for MW 1.23 - fix for c8194fe6c88f

2018-01-21 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405667 )

Change subject: Another fix for MW 1.23 - fix for c8194fe6c88f
..

Another fix for MW 1.23 - fix for c8194fe6c88f

Change-Id: I4d1f0eec10fca62e3bc75258e94904d58e19dc1f
---
M includes/CargoPageValuesAction.php
1 file changed, 9 insertions(+), 2 deletions(-)


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

diff --git a/includes/CargoPageValuesAction.php 
b/includes/CargoPageValuesAction.php
index 693943b..b2799fa 100644
--- a/includes/CargoPageValuesAction.php
+++ b/includes/CargoPageValuesAction.php
@@ -8,7 +8,7 @@
 
 class CargoPageValuesAction extends Action {
/**
-* Return the name of the action this object responds to
+* Return the name of the action this object responds to.
 * @return String lowercase
 */
public function getName() {
@@ -27,7 +27,7 @@
}
 
/**
-* Add the "Page values" link to the toolbox
+* Add the "Page values" link to the toolbox.
 *
 * @param BaseTemplate $skinTemplate
 * @param array $toolbox
@@ -50,4 +50,11 @@
 
return true;
}
+
+   /**
+* Implement this to support MW 1.23, which has it as an abstract
+* function.
+*/
+   public function execute() { }
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Another fix for MW 1.23 - fix for c8194fe6c88f

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405667 )

Change subject: Another fix for MW 1.23 - fix for c8194fe6c88f
..


Another fix for MW 1.23 - fix for c8194fe6c88f

Change-Id: I4d1f0eec10fca62e3bc75258e94904d58e19dc1f
---
M includes/CargoPageValuesAction.php
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/includes/CargoPageValuesAction.php 
b/includes/CargoPageValuesAction.php
index 693943b..b2799fa 100644
--- a/includes/CargoPageValuesAction.php
+++ b/includes/CargoPageValuesAction.php
@@ -8,7 +8,7 @@
 
 class CargoPageValuesAction extends Action {
/**
-* Return the name of the action this object responds to
+* Return the name of the action this object responds to.
 * @return String lowercase
 */
public function getName() {
@@ -27,7 +27,7 @@
}
 
/**
-* Add the "Page values" link to the toolbox
+* Add the "Page values" link to the toolbox.
 *
 * @param BaseTemplate $skinTemplate
 * @param array $toolbox
@@ -50,4 +50,11 @@
 
return true;
}
+
+   /**
+* Implement this to support MW 1.23, which has it as an abstract
+* function.
+*/
+   public function execute() { }
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...TemplateData[master]: Use textSelection API to modify textarea

2018-01-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405668 )

Change subject: Use textSelection API to modify textarea
..

Use textSelection API to modify textarea

Bug: T73363
Change-Id: I411027236cbb3b349372a64ecbf670062758cfab
---
M modules/ext.templateDataGenerator.target.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/ext.templateDataGenerator.target.js 
b/modules/ext.templateDataGenerator.target.js
index df6f063..a208f81 100644
--- a/modules/ext.templateDataGenerator.target.js
+++ b/modules/ext.templateDataGenerator.target.js
@@ -338,11 +338,11 @@
 OO.inheritClass( mw.TemplateData.TextareaTarget, mw.TemplateData.Target );
 
 mw.TemplateData.TextareaTarget.prototype.getWikitext = function () {
-   return this.$textarea.val();
+   return this.$textarea.textSelection( 'getContents' );
 };
 
 mw.TemplateData.TextareaTarget.prototype.setWikitext = function ( newWikitext 
) {
-   this.$textarea.val( newWikitext );
+   this.$textarea.textSelection( 'setContents', newWikitext );
 };
 
 /* global ve */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I411027236cbb3b349372a64ecbf670062758cfab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
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] operations/mediawiki-config[master]: db-eqiad.php: Move db1063 to s6

2018-01-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405672 )

Change subject: db-eqiad.php: Move db1063 to s6
..

db-eqiad.php: Move db1063 to s6

db1063 will replace db1030 in s6. Move it there.
Do not pool it as it is not ready yet

Bug: T184397
Change-Id: If58b5227082f97f10fb6f6b4a2f9dac28e8bfb34
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ec586d8..d507665 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -152,6 +152,7 @@
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master
'db1030' => 0,   # B1 1.4TB  64GB, vslow, dump
+   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump # DO NOT POOL 
YET 
'db1085' => 300, # B3 3.6TB 512GB, api #master for db1102 
(sanitarium 3)
'db1088' => 500, # C2 3.6TB 512GB
'db1093' => 300, # D2 3.6TB 512GB
@@ -169,7 +170,6 @@
],
's8' => [
'db1071' => 0,   # D1 2.8TB 160GB, master
-   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump # to be moved 
to s6
'db1087' => 0, # C2 3.6TB 512GB, vslow, dump # db1095 master
'db1092' => 100, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Move db1063 to s6

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405672 )

Change subject: db-eqiad.php: Move db1063 to s6
..


db-eqiad.php: Move db1063 to s6

db1063 will replace db1030 in s6. Move it there.
Do not pool it as it is not ready yet

Bug: T184397
Change-Id: If58b5227082f97f10fb6f6b4a2f9dac28e8bfb34
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index ec586d8..fabebe4 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -152,6 +152,7 @@
's6' => [
'db1061' => 0,   # C3 2.8TB 128GB, master
'db1030' => 0,   # B1 1.4TB  64GB, vslow, dump
+   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump # DO NOT POOL 
YET
'db1085' => 300, # B3 3.6TB 512GB, api #master for db1102 
(sanitarium 3)
'db1088' => 500, # C2 3.6TB 512GB
'db1093' => 300, # D2 3.6TB 512GB
@@ -169,7 +170,6 @@
],
's8' => [
'db1071' => 0,   # D1 2.8TB 160GB, master
-   # 'db1063' => 0,   # C5 2.8TB 128GB, vslow, dump # to be moved 
to s6
'db1087' => 0, # C2 3.6TB 512GB, vslow, dump # db1095 master
'db1092' => 100, # D2 3.6TB 512GB, api
'db1099:3318' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If58b5227082f97f10fb6f6b4a2f9dac28e8bfb34
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
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...SpamBlacklist[master]: Make spamblacklist log viewable by logged-in users by default

2018-01-21 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405670 )

Change subject: Make spamblacklist log viewable by logged-in users by default
..

Make spamblacklist log viewable by logged-in users by default

The main rationale for keeping this log private is to that scanners and things
don't see a huge list of spammy URLs and treat that website as spam itself.

There's no actual private content in here since the regular expressions are
public, so making it available to all users is fine.

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


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

diff --git a/extension.json b/extension.json
index 0ed5270..7fb2a1c 100644
--- a/extension.json
+++ b/extension.json
@@ -13,7 +13,7 @@
"MediaWiki": ">= 1.27.0"
},
"GroupPermissions": {
-   "sysop": {
+   "user": {
"spamblacklistlog": true
}
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6da473b7cbac2c6fd507bde5c970d701e5ac249e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
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...SpamBlacklist[master]: Make spamblacklist log viewable by logged-in users by default

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405670 )

Change subject: Make spamblacklist log viewable by logged-in users by default
..


Make spamblacklist log viewable by logged-in users by default

The main rationale for keeping this log private is to that scanners and things
don't see a huge list of spammy URLs and treat that website as spam itself.

There's no actual private content in here since the regular expressions are
public, so making it available to all users is fine.

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

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



diff --git a/extension.json b/extension.json
index 0ed5270..7fb2a1c 100644
--- a/extension.json
+++ b/extension.json
@@ -13,7 +13,7 @@
"MediaWiki": ">= 1.27.0"
},
"GroupPermissions": {
-   "sysop": {
+   "user": {
"spamblacklistlog": true
}
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6da473b7cbac2c6fd507bde5c970d701e5ac249e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SpamBlacklist
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: Jackmcbarn 
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]: Begin splitting out maintenance test base classes

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404490 )

Change subject: Begin splitting out maintenance test base classes
..


Begin splitting out maintenance test base classes

Bug: T184775
Change-Id: I73c2f3c6975deec50cf879201cf292c217b51c51
---
M tests/common/TestsAutoLoader.php
A tests/phpunit/maintenance/MaintenanceFixup.php
M tests/phpunit/maintenance/MaintenanceTest.php
3 files changed, 143 insertions(+), 137 deletions(-)

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



diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php
index 1c41a6d..825cee0 100644
--- a/tests/common/TestsAutoLoader.php
+++ b/tests/common/TestsAutoLoader.php
@@ -151,6 +151,7 @@
 
# tests/phpunit/maintenance
'MediaWiki\Tests\Maintenance\DumpTestCase' => 
"$testDir/phpunit/maintenance/DumpTestCase.php",
+   'MediaWiki\Tests\Maintenance\MaintenanceFixup' => 
"$testDir/phpunit/maintenance/MaintenanceFixup.php",
 
# tests/phpunit/media
'FakeDimensionFile' => 
"$testDir/phpunit/includes/media/FakeDimensionFile.php",
diff --git a/tests/phpunit/maintenance/MaintenanceFixup.php 
b/tests/phpunit/maintenance/MaintenanceFixup.php
new file mode 100644
index 000..40da42d
--- /dev/null
+++ b/tests/phpunit/maintenance/MaintenanceFixup.php
@@ -0,0 +1,142 @@
+shutdownSimulated ) {
+   $this->testCase->fail( __METHOD__ . " called more than 
once" );
+   }
+
+   // The cleanup action.
+   $this->outputChanneled( false );
+
+   // Bookkeeping that we simulated the clean up.
+   $this->shutdownSimulated = true;
+   }
+
+   // Note that the "public" here does not change visibility
+   public function outputChanneled( $msg, $channel = null ) {
+   if ( $this->shutdownSimulated ) {
+   if ( $msg !== false ) {
+   $this->testCase->fail( "Already past simulated 
shutdown, but msg is "
+   . "not false. Did the hack in 
Maintenance.php change? Please "
+   . "adapt the test case or 
Maintenance.php" );
+   }
+
+   // The current call is the one registered via 
register_shutdown_function.
+   // We can safely ignore it, as we simulated this one 
via simulateShutdown
+   // before (if we did not, the destructor of this 
instance will warn about
+   // it)
+   return;
+   }
+
+   call_user_func_array( [ "parent", __FUNCTION__ ], 
func_get_args() );
+   }
+
+   /**
+* Safety net around register_shutdown_function of Maintenance.php
+*/
+   public function __destruct() {
+   if ( !$this->shutdownSimulated ) {
+   // Someone generated a MaintenanceFixup instance 
without calling
+   // simulateShutdown. We'd have to raise a PHPUnit 
exception to correctly
+   // flag this illegal usage. However, we are already in 
a destruktor, which
+   // would trigger undefined behavior. Hence, we can only 
report to the
+   // error output :( Hopefully people read the PHPUnit 
output.
+   $name = $this->testCase->getName();
+   fwrite( STDERR, "ERROR! Instance of " . __CLASS__ . " 
for test $name "
+   . "destructed without calling simulateShutdown 
method. Call "
+   . "simulateShutdown on the instance before it 
gets destructed." );
+   }
+
+   // The following guard is required, as PHP does not offer 
default destructors :(
+   if ( is_callable( "parent::__destruct" ) ) {
+   parent::__destruct();
+   }
+   }
+
+   public function __construct( MediaWikiTestCase $testCase ) {
+   parent::__construct();
+   $this->testCase = $testCase;
+   }
+
+   // --- Making protected functions visible for test
+
+   public function output( $out, $channel = null ) {
+   // Just to make PHP not nag about signature mismatches, we 
copied
+   // Maintenance::output signature. However, we do not use (or 
rely on)
+   // those variables. Instead we pass to Maintenance::output 
whatever we
+   // receive at runtime.
+   return call_user_func_array( [ "parent", __FUNCTION__ ], 
func_get_args() );
+   }
+
+   public function addOption( $name, $description, $required = false,
+   $withArg = false, $shortName = false, $multiOccurance = false
+   ) {
+   return call_user_func_array( [ "parent", 

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

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405675 )

Change subject: db-eqiad.php: Repool db1067, depool db1067
..


db-eqiad.php: Repool db1067, depool db1067

Bug: T162807
Change-Id: Iffe8f2119de2cbeaa625916f09fa5bb3eb264495
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 678a214..036761c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -104,9 +104,9 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   # 'db1067' => 0,  # D1 2.8TB 160GB, old master # T162807
+   'db1067' => 0,  # D1 2.8TB 160GB, old master
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 50,  # D1 2.8TB 160GB, api
+   # 'db1066' => 50,  # D1 2.8TB 160GB, api # T162807
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
@@ -288,7 +288,7 @@
'api' => [
'db1080' => 1,
'db1073' => 1,
-   'db1066' => 1,
+   # 'db1066' => 1,
],
],
's2' => [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffe8f2119de2cbeaa625916f09fa5bb3eb264495
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Refactor MaintenanceTest to use a base test case

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404606 )

Change subject: Refactor MaintenanceTest to use a base test case
..


Refactor MaintenanceTest to use a base test case

Bug: T184775
Change-Id: I0cb2320f765e847a59c721918401da07a3a2b24a
---
M tests/common/TestsAutoLoader.php
A tests/phpunit/maintenance/MaintenanceBaseTestCase.php
D tests/phpunit/maintenance/MaintenanceFixup.php
M tests/phpunit/maintenance/MaintenanceTest.php
4 files changed, 350 insertions(+), 419 deletions(-)

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



diff --git a/tests/common/TestsAutoLoader.php b/tests/common/TestsAutoLoader.php
index 825cee0..82149b3 100644
--- a/tests/common/TestsAutoLoader.php
+++ b/tests/common/TestsAutoLoader.php
@@ -151,7 +151,7 @@
 
# tests/phpunit/maintenance
'MediaWiki\Tests\Maintenance\DumpTestCase' => 
"$testDir/phpunit/maintenance/DumpTestCase.php",
-   'MediaWiki\Tests\Maintenance\MaintenanceFixup' => 
"$testDir/phpunit/maintenance/MaintenanceFixup.php",
+   'MediaWiki\Tests\Maintenance\MaintenanceBaseTestCase' => 
"$testDir/phpunit/maintenance/MaintenanceBaseTestCase.php",
 
# tests/phpunit/media
'FakeDimensionFile' => 
"$testDir/phpunit/includes/media/FakeDimensionFile.php",
diff --git a/tests/phpunit/maintenance/MaintenanceBaseTestCase.php 
b/tests/phpunit/maintenance/MaintenanceBaseTestCase.php
new file mode 100644
index 000..9d73a51
--- /dev/null
+++ b/tests/phpunit/maintenance/MaintenanceBaseTestCase.php
@@ -0,0 +1,92 @@
+maintenance = $this->createMaintenance();
+   }
+
+   /**
+* Do a little stream cleanup to prevent output in case the child class
+* hasn't tested the capture buffer.
+*/
+   protected function tearDown() {
+   if ( $this->maintenance ) {
+   $this->maintenance->cleanupChanneled();
+   }
+
+   // This is smelly, but maintenance scripts usually produce 
output, so
+   // we anticipate and ignore with a regex that will catch 
everything.
+   //
+   // If you call $this->expectOutputRegex in your subclass, this 
guard
+   // won't be triggered, and your specific pattern will be 
respected.
+   if ( !$this->hasExpectationOnOutput() ) {
+   $this->expectOutputRegex( '/.*/' );
+   }
+
+   parent::tearDown();
+   }
+
+   /**
+* @return string Class name
+*
+* Subclasses must implement this in order to use the $this->maintenance
+* variable.  Normally, it will be set like:
+* return PopulateDatabaseMaintenance::class;
+*
+* If you need to change the way your maintenance class is constructed,
+* override createMaintenance.
+*/
+   abstract protected function getMaintenanceClass();
+
+   /**
+* Called by setUp to initialize $this->maintenance.
+*
+* @return object The Maintenance instance to test.
+*/
+   protected function createMaintenance() {
+   $className = $this->getMaintenanceClass();
+   $obj = new $className();
+
+   // We use TestingAccessWrapper in order to access protected 
internals
+   // such as `output()`.
+   return TestingAccessWrapper::newFromObject( $obj );
+   }
+
+   /**
+* Asserts the output before and after simulating shutdown
+*
+* This function simulates shutdown of self::maintenance.
+*
+* @param string $preShutdownOutput Expected output before simulating 
shutdown
+* @param bool $expectNLAppending Whether or not shutdown simulation is 
expected
+*   to add a newline to the output. If false, $preShutdownOutput is the
+*   expected output after shutdown simulation. Otherwise,
+*   $preShutdownOutput with an appended newline is the expected output
+*   after shutdown simulation.
+*/
+   protected function assertOutputPrePostShutdown( $preShutdownOutput, 
$expectNLAppending ) {
+   $this->assertEquals( $preShutdownOutput, 
$this->getActualOutput(),
+   "Output before shutdown simulation" );
+
+   $this->maintenance->cleanupChanneled();
+
+   $postShutdownOutput = $preShutdownOutput . ( $expectNLAppending 
? "\n" : "" );
+   $this->expectOutputString( $postShutdownOutput );
+   }
+
+}
diff --git a/tests/phpunit/maintenance/MaintenanceFixup.php 
b/tests/phpunit/maintenance/MaintenanceFixup.php
deleted file mode 100644
index 40da42d..000
--- a/tests/phpunit/maintenance/MaintenanceFixup.php
+++ /dev/null
@@ -1,142 +0,0 @@
-shutdownSimulated ) {
-   $this->testCase->fail( __METHOD__ . " called more than 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Move db1063 to s6

2018-01-21 Thread Marostegui (Code Review)
Marostegui has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405673 )

Change subject: mariadb: Move db1063 to s6
..


mariadb: Move db1063 to s6

db1063 will be replacing db1030 as vslow in s6.
Also removing db1113 and db1114 from the installation as they are now as
spares

Bug: T184397
Change-Id: Ic8a385b51d154e5824155e0319d24c01a62d3597
---
M hieradata/hosts/db1063.yaml
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
M modules/role/files/prometheus/mysql-core_eqiad.yaml
5 files changed, 5 insertions(+), 7 deletions(-)

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



diff --git a/hieradata/hosts/db1063.yaml b/hieradata/hosts/db1063.yaml
index 8b1f532..ca2abb9 100644
--- a/hieradata/hosts/db1063.yaml
+++ b/hieradata/hosts/db1063.yaml
@@ -1,2 +1,2 @@
-mariadb::shard: 's8'
+mariadb::shard: 's6'
 profile::base::notifications_enabled: '0'
diff --git a/manifests/site.pp b/manifests/site.pp
index af5c111..2205aa3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -397,7 +397,7 @@
 }
 
 # See also db1096 and db1098 below
-node /^db10(30|85|88|93)\.eqiad\.wmnet/ {
+node /^db10(30|63|85|88|93)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
@@ -449,7 +449,7 @@
 }
 
 # See also db1099 and db1101 below
-node /^db1(063|104|092|087|109)\.eqiad\.wmnet/ {
+node /^db1(104|092|087|109)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index d00ac95..dde5343 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -66,7 +66,7 @@
 conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 cp1008|cp300[3-9]|cp3010) echo partman/varnish-oldssd.cfg ;; \
 cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
-db111[3-4]) echo partman/db.cfg ;; \
+db1063 echo partman/db.cfg ;; \
 db2036|db2034|db2078|db2090|db2092) echo partman/db.cfg ;; \
 db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[1-9]) echo 
partman/db-no-srv-format.cfg ;; \
 deploy[12]001|flerovium|furud) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 8d275ba..e31150b 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1368,8 +1368,6 @@
 host db1063 {
 hardware ethernet C8:1F:66:B8:1A:40;
 fixed-address db1063.eqiad.wmnet;
-option pxelinux.pathprefix 
"http://apt.wikimedia.org/tftpboot/jessie-installer/;;
-filename "lpxelinux.0";
 }
 
 host db1064 {
diff --git a/modules/role/files/prometheus/mysql-core_eqiad.yaml 
b/modules/role/files/prometheus/mysql-core_eqiad.yaml
index 1bebb01..1676549 100644
--- a/modules/role/files/prometheus/mysql-core_eqiad.yaml
+++ b/modules/role/files/prometheus/mysql-core_eqiad.yaml
@@ -85,6 +85,7 @@
 role: slave
   targets:
   - db1030:9104
+  - db1063:9104
   - db1085:9104
   - db1088:9104
   - db1093:9104
@@ -116,7 +117,6 @@
 shard: s8
 role: slave
   targets:
-  - db1063:9104
   - db1087:9104
   - db1092:9104
   - db1099:13318

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

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

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


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

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405674 )

Change subject: db-eqiad.php: Depool db1089 and db1067
..


db-eqiad.php: Depool db1089 and db1067

Checksumming and fixing data drifts

Bug: T162807
Change-Id: Iba94b973f40eb355a7af22fcb4e1c240b22ee9e6
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index fabebe4..678a214 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -104,13 +104,13 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,  # D1 2.8TB 160GB, old master
+   # 'db1067' => 0,  # D1 2.8TB 160GB, old master # T162807
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
-   'db1089' => 500, # C3 3.6TB 512GB
+   # 'db1089' => 500, # C3 3.6TB 512GB # T162807
'db1099:3311' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
'db1105:3311' => 1,   # C3 3.6TB 512GB # rc, log: s1 and s2
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iba94b973f40eb355a7af22fcb4e1c240b22ee9e6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Marostegui 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Marostegui 
Gerrit-Reviewer: Urbanecm 
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...ElectronPdfService[master]: When running Selenium tests, use `wd/hub`

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404981 )

Change subject: When running Selenium tests, use `wd/hub`
..


When running Selenium tests, use `wd/hub`

Now it works on Mac, Windows and Linux.

Change-Id: I010ca5e9ae1fa72d80ffec63761461ac0da70d10
---
M tests/selenium/README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/selenium/README.md b/tests/selenium/README.md
index a877942..caacc86 100644
--- a/tests/selenium/README.md
+++ b/tests/selenium/README.md
@@ -17,7 +17,7 @@
 
 To run only ElectronPdfService tests in one terminal window or tab start 
Chromedriver:
 
-chromedriver --url-base=/wd/hub --port=
+chromedriver --url-base=wd/hub --port=
 
 In another terminal tab or window go to mediawiki/core folder:
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I010ca5e9ae1fa72d80ffec63761461ac0da70d10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ElectronPdfService
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Andrew-WMDE 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Pmiazga 
Gerrit-Reviewer: Tobias Gritschacher 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: When running Selenium tests, use `wd/hub`

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404983 )

Change subject: When running Selenium tests, use `wd/hub`
..


When running Selenium tests, use `wd/hub`

Now it works on Mac, Windows and Linux.

Change-Id: Idf984c89f541a44ad522ff4d765dc58ada407797
---
M tests/selenium/README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/selenium/README.md b/tests/selenium/README.md
index 3c6c9a4..4d02900 100644
--- a/tests/selenium/README.md
+++ b/tests/selenium/README.md
@@ -17,7 +17,7 @@
 
 To run only Echo tests in one terminal window or tab start Chromedriver:
 
-chromedriver --url-base=/wd/hub --port=
+chromedriver --url-base=wd/hub --port=
 
 In another terminal tab or window go to mediawiki/core folder:
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf984c89f541a44ad522ff4d765dc58ada407797
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
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...BlueSpiceInterWikiLinks[master]: Set used tables in unit test

2018-01-21 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405579 )

Change subject: Set used tables in unit test
..


Set used tables in unit test

1) BSApiTasksInterWikiLinksManagerTest::testEditInterWikiLink
MWException: When testing database state, the test cases's needDB()
method should return true. Use @group Database or $this->tablesUsed.

Change-Id: I2d35ccf2c4b6f3373ffc2e223a9dc336f2d46b09
---
M tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
1 file changed, 5 insertions(+), 1 deletion(-)

Approvals:
  Robert Vogel: Verified; Looks good to me, approved
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php 
b/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
index 374d599..2b0c00b 100644
--- a/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
+++ b/tests/phpunit/BSApiTasksInterWikiLinksManagerTest.php
@@ -8,6 +8,11 @@
  * @group BlueSpiceInterWikiLnksManager
  */
 class BSApiTasksInterWikiLinksManagerTest extends BSApiTasksTestBase {
+   protected function setUp() {
+   parent::setUp();
+   $this->tablesUsed[] = 'interwiki';
+   }
+
protected function getModuleName( ) {
return 'bs-interwikilinks-tasks';
}
@@ -75,4 +80,3 @@
return false;
}
 }
-

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d35ccf2c4b6f3373ffc2e223a9dc336f2d46b09
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceInterWikiLinks
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
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...BlueSpiceExtensions[REL1_23]: VisualEditor: Fix for mail links

2018-01-21 Thread Robert Vogel (Code Review)
Robert Vogel has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/398855 )

Change subject: VisualEditor: Fix for mail links
..


VisualEditor: Fix for mail links

mailto: links were missed in VisualEditor

Needs cherry-picking to REL1_27

Change-Id: Ieca826365a9a199b165bec7eedca25dd1ac01e77
ERM: #8322
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Robert Vogel: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 5ec482a..ad54562 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -586,7 +586,7 @@
}
 
//Also find protocol independent links
-   links = text.match(/\[([^\]]*)(:)?\/\/([^\]]*?)\]/gi);
+   links = text.match(/\[(([^\]]+:)?\/\/|mailto:)[^\]]*\]/gi);
 
if (links) {
for (i = 0; i < links.length; i++) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieca826365a9a199b165bec7eedca25dd1ac01e77
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: ItSpiderman 
Gerrit-Reviewer: ItSpiderman 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...MultiLanguageManager[REL1_27]: Switch back to manifest v1 for REL1_27

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404467 )

Change subject: Switch back to manifest v1 for REL1_27
..


Switch back to manifest v1 for REL1_27

Change-Id: If2d777b29fdb06e93d90defd11431d46fa67cdd5
---
M extension.json
1 file changed, 7 insertions(+), 17 deletions(-)

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



diff --git a/extension.json b/extension.json
index e290295..584134e 100644
--- a/extension.json
+++ b/extension.json
@@ -83,24 +83,14 @@
]
}
},
-   "config_prefix": "mg",
"config": {
-   "AvailableLanguages": {
-   "value": [ "en", "cn", "fr", "it", "nl", "de" ]
-   },
-   "Permission": {
-   "value": "language"
-   },
-   "LanguageTableName": {
-   "value": "page_language"
-   },
-   "TranslationTableName": {
-   "value": "page_translation"
-   },
-   "SpecialPageName": {
-   "value": "MultiLanguageManager"
-   }
+   "_prefix": "mg",
+   "AvailableLanguages": [ "en", "cn", "fr", "it", "nl", "de" ],
+   "Permission": "language",
+   "LanguageTableName": "page_language",
+   "TranslationTableName": "page_translation",
+   "SpecialPageName": "MultiLanguageManager"
},
"load_composer_autoloader" : true,
-   "manifest_version": 2
+   "manifest_version": 1
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If2d777b29fdb06e93d90defd11431d46fa67cdd5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultiLanguageManager
Gerrit-Branch: REL1_27
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 
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]: Replace some of MaintenanceTest with dataProviders

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404665 )

Change subject: Replace some of MaintenanceTest with dataProviders
..


Replace some of MaintenanceTest with dataProviders

Bug: T184775
Change-Id: Icbaf3cbcf3c51e5b4cd53d55a5230534e74a0a38
---
M tests/phpunit/maintenance/MaintenanceTest.php
1 file changed, 259 insertions(+), 446 deletions(-)

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



diff --git a/tests/phpunit/maintenance/MaintenanceTest.php 
b/tests/phpunit/maintenance/MaintenanceTest.php
index f29cacd..141561f 100644
--- a/tests/phpunit/maintenance/MaintenanceTest.php
+++ b/tests/phpunit/maintenance/MaintenanceTest.php
@@ -37,459 +37,272 @@
// test.*Intermittent.* tests), the objective of these tests is not to 
describe
// consistent behavior, but rather currently existing behavior.
 
-   function testOutputEmpty() {
-   $this->maintenance->output( "" );
-   $this->assertOutputPrePostShutdown( "", false );
+   /**
+* @dataProvider provideOutputData
+*/
+   function testOutput( $outputs, $expected, $extraNL ) {
+   foreach ( $outputs as $data ) {
+   if ( is_array( $data ) ) {
+   list( $msg, $channel ) = $data;
+   } else {
+   $msg = $data;
+   $channel = null;
+   }
+   $this->maintenance->output( $msg, $channel );
+   }
+   $this->assertOutputPrePostShutdown( $expected, $extraNL );
}
 
-   function testOutputString() {
-   $this->maintenance->output( "foo" );
-   $this->assertOutputPrePostShutdown( "foo", false );
-   }
+   public function provideOutputData() {
+   return [
+   [ [ "" ], "", false ],
+   [ [ "foo" ], "foo", false ],
+   [ [ "foo", "bar" ], "foobar", false ],
+   [ [ "foo\n" ], "foo\n", false ],
+   [ [ "foo\n\n" ], "foo\n\n", false ],
+   [ [ "foo\nbar" ], "foo\nbar", false ],
+   [ [ "foo\nbar\n" ], "foo\nbar\n", false ],
+   [ [ "foo\n", "bar\n" ], "foo\nbar\n", false ],
+   [ [ "", "foo", "", "\n", "ba", "", "r\n" ], 
"foo\nbar\n", false ],
+   [ [ "", "foo", "", "\nb", "a", "", "r\n" ], 
"foo\nbar\n", false ],
+   [ [ [ "foo", "bazChannel" ] ], "foo", true ],
+   [ [ [ "foo\n", "bazChannel" ] ], "foo", true ],
 
-   function testOutputStringString() {
-   $this->maintenance->output( "foo" );
-   $this->maintenance->output( "bar" );
-   $this->assertOutputPrePostShutdown( "foobar", false );
+   // If this test fails, note that output takes strings 
with double line
+   // endings (although output's implementation in this 
situation calls
+   // outputChanneled with a string ending in a nl ... 
which is not allowed
+   // according to the documentation of outputChanneled)
+   [ [ [ "foo\n\n", "bazChannel" ] ], "foo\n", true ],
+   [ [ [ "foo\nbar", "bazChannel" ] ], "foo\nbar", true ],
+   [ [ [ "foo\nbar\n", "bazChannel" ] ], "foo\nbar", true 
],
+   [
+   [
+   [ "foo\n", "bazChannel" ],
+   [ "bar\n", "bazChannel" ],
+   ],
+   "foobar",
+   true
+   ],
+   [
+   [
+   [ "", "bazChannel" ],
+   [ "foo", "bazChannel" ],
+   [ "", "bazChannel" ],
+   [ "\n", "bazChannel" ],
+   [ "ba", "bazChannel" ],
+   [ "", "bazChannel" ],
+   [ "r\n", "bazChannel" ],
+   ],
+   "foobar",
+   true
+   ],
+   [
+   [
+   [ "", "bazChannel" ],
+   [ "foo", "bazChannel" ],
+   [ "", "bazChannel" ],
+   [ "\nb", "bazChannel" ],
+   [ "a", "bazChannel" ],
+

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

2018-01-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405675 )

Change subject: db-eqiad.php: Repool db1067, depool db1067
..

db-eqiad.php: Repool db1067, depool db1067

Bug: T162807
Change-Id: Iffe8f2119de2cbeaa625916f09fa5bb3eb264495
---
M wmf-config/db-eqiad.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 678a214..036761c 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -104,9 +104,9 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   # 'db1067' => 0,  # D1 2.8TB 160GB, old master # T162807
+   'db1067' => 0,  # D1 2.8TB 160GB, old master
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   'db1066' => 50,  # D1 2.8TB 160GB, api
+   # 'db1066' => 50,  # D1 2.8TB 160GB, api # T162807
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
@@ -288,7 +288,7 @@
'api' => [
'db1080' => 1,
'db1073' => 1,
-   'db1066' => 1,
+   # 'db1066' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...MultiLanguageManager[REL1_27]: Fix "Adding translation overrides exisiting ones"

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404468 )

Change subject: Fix "Adding translation overrides exisiting ones"
..


Fix "Adding translation overrides exisiting ones"

* Added API to fetch existing translations
* If not set by client-side config (that's the case when the dialog gets opened
on a page that has no translations yet) the API get's queried to see if there
are other translations available for the given source page

ERM7001

NEEDS CHERRY-PICK TO master!

Change-Id: Ia13881dbba5ff1c0de5020b4b663346b2875895a
---
M resources/ext.mlm.js
M src/Api/Tasks.php
2 files changed, 80 insertions(+), 2 deletions(-)

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



diff --git a/resources/ext.mlm.js b/resources/ext.mlm.js
index ef59c91..a4268bd 100644
--- a/resources/ext.mlm.js
+++ b/resources/ext.mlm.js
@@ -53,7 +53,8 @@
mw.mlm.dialog.static.actions = [{
action: 'save',
label: mw.message( 'mlm-input-label-save' ).plain(),
-   flags: [ 'primary', 'constructive' ]
+   flags: [ 'primary', 'constructive' ],
+   disabled: true
}, {
action: 'cancel',
label: mw.message( 'mlm-input-label-cancel' ).plain(),
@@ -108,6 +109,7 @@
label: mw.message( 
'mlm-input-label-sourcetitle' ).plain(),
disabled: mw.mlm.srcTitle === '' ? false : true
});
+   this.srcText.on( 'change', this.onSrcTextChange.bind( 
this ) );
 
this.srcSection = new OO.ui.HorizontalLayout( {
items: [
@@ -260,10 +262,44 @@
);
};
 
+   mw.mlm.dialog.prototype.onSrcTextChange = function( value ){
+   var me = this;
+
+   var api = new mw.Api();
+   api.postWithToken( 'csrf', {
+   action: 'mlm-tasks',
+   task: 'get',
+   format: 'json',
+   taskData: JSON.stringify( {
+   srcText: value
+   } )
+   })
+   .done( function( response, jqXHR ) {
+   if( !response.success ) {
+   return;
+   }
+
+   for( var i = 0; i < response.payload.length; 
i++ ) {
+   var translation = response.payload[i];
+   me.updateTranslations( {
+   'lang': translation.lang,
+   'text': translation.text
+   });
+   }
+
+   me.getActions().setAbilities( {
+   save: true
+   });
+   });
+   };
+
mw.mlm.dialog.prototype.onTranslationAdd = function(){
this.updateTranslations( {
'lang': this.translationLang.value,
'text': this.translationText.value
+   });
+   this.getActions().setAbilities( {
+   save: true
});
};
 
@@ -272,6 +308,9 @@
'lang': lang,
'text': ''
}, true);
+   this.getActions().setAbilities( {
+   save: true
+   });
};
 
mw.mlm.dialog.prototype.updateTranslations = function ( 
translation, removeOnly ) {
diff --git a/src/Api/Tasks.php b/src/Api/Tasks.php
index 767b923..7ba8666 100644
--- a/src/Api/Tasks.php
+++ b/src/Api/Tasks.php
@@ -22,6 +22,10 @@
'read',
Helper::getConfig()->get( Config::PERMISSION )
],
+   'get' => [
+   'read',
+   Helper::getConfig()->get( Config::PERMISSION )
+   ],
];
}
 
@@ -148,6 +152,37 @@
return $result;
}
 
+   protected function task_get( $taskData, $params ) {
+   $result = $this->makeStandardReturn();
+   $sysLang = Helper::getSystemLanguageCode();
+   $result->message = [];
+   if( empty( 

[MediaWiki-commits] [Gerrit] mediawiki...MultiLanguageManager[master]: Merge "Fix 'Adding translation overrides exisiting ones'" fr...

2018-01-21 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405677 )

Change subject: Merge "Fix 'Adding translation overrides exisiting ones'" from 
REL1_27
..

Merge "Fix 'Adding translation overrides exisiting ones'" from REL1_27

Change-Id: I5298b76ac2534c311bbd73245908a31a02233275
---
M resources/ext.mlm.js
M src/Api/Tasks.php
2 files changed, 81 insertions(+), 3 deletions(-)


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

diff --git a/resources/ext.mlm.js b/resources/ext.mlm.js
index d6e456e..094138a 100644
--- a/resources/ext.mlm.js
+++ b/resources/ext.mlm.js
@@ -53,7 +53,8 @@
mw.mlm.dialog.static.actions = [{
action: 'save',
label: mw.message( 'mlm-input-label-save' ).plain(),
-   flags: [ 'primary', 'progressive' ]
+   flags: [ 'primary', 'constructive' ],
+   disabled: true
}, {
action: 'cancel',
label: mw.message( 'mlm-input-label-cancel' ).plain(),
@@ -108,6 +109,7 @@
label: mw.message( 
'mlm-input-label-sourcetitle' ).plain(),
disabled: mw.mlm.srcTitle === '' ? false : true
});
+   this.srcText.on( 'change', this.onSrcTextChange.bind( 
this ) );
 
this.srcSection = new OO.ui.HorizontalLayout( {
items: [
@@ -260,10 +262,44 @@
);
};
 
+   mw.mlm.dialog.prototype.onSrcTextChange = function( value ){
+   var me = this;
+
+   var api = new mw.Api();
+   api.postWithToken( 'csrf', {
+   action: 'mlm-tasks',
+   task: 'get',
+   format: 'json',
+   taskData: JSON.stringify( {
+   srcText: value
+   } )
+   })
+   .done( function( response, jqXHR ) {
+   if( !response.success ) {
+   return;
+   }
+
+   for( var i = 0; i < response.payload.length; 
i++ ) {
+   var translation = response.payload[i];
+   me.updateTranslations( {
+   'lang': translation.lang,
+   'text': translation.text
+   });
+   }
+
+   me.getActions().setAbilities( {
+   save: true
+   });
+   });
+   };
+
mw.mlm.dialog.prototype.onTranslationAdd = function(){
this.updateTranslations( {
'lang': this.translationLang.value,
'text': this.translationText.value
+   });
+   this.getActions().setAbilities( {
+   save: true
});
};
 
@@ -272,6 +308,9 @@
'lang': lang,
'text': ''
}, true);
+   this.getActions().setAbilities( {
+   save: true
+   });
};
 
mw.mlm.dialog.prototype.updateTranslations = function ( 
translation, removeOnly ) {
@@ -345,4 +384,4 @@
 
mw.mlm.factory.register( mw.mlm.dialog );
});
-})( mediaWiki, jQuery );
\ No newline at end of file
+})( mediaWiki, jQuery );
diff --git a/src/Api/Tasks.php b/src/Api/Tasks.php
index 767b923..7ba8666 100644
--- a/src/Api/Tasks.php
+++ b/src/Api/Tasks.php
@@ -22,6 +22,10 @@
'read',
Helper::getConfig()->get( Config::PERMISSION )
],
+   'get' => [
+   'read',
+   Helper::getConfig()->get( Config::PERMISSION )
+   ],
];
}
 
@@ -148,6 +152,37 @@
return $result;
}
 
+   protected function task_get( $taskData, $params ) {
+   $result = $this->makeStandardReturn();
+   $sysLang = Helper::getSystemLanguageCode();
+   $result->message = [];
+   if( empty( $taskData->srcText ) ) {
+   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Repool db1066, depool db1099:3311

2018-01-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405676 )

Change subject: db-eqiad.php: Repool db1066, depool db1099:3311
..

db-eqiad.php: Repool db1066, depool db1099:3311

Bug: T162807
Change-Id: I0a691e06050d3e2237a2dafab2638951033a0381
---
M wmf-config/db-eqiad.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 036761c..57f8db3 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -106,12 +106,12 @@
'db1052' => 0,   # B3 2.8TB  96GB, master
'db1067' => 0,  # D1 2.8TB 160GB, old master
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
-   # 'db1066' => 50,  # D1 2.8TB 160GB, api # T162807
+   'db1066' => 50,  # D1 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
# 'db1089' => 500, # C3 3.6TB 512GB # T162807
-   'db1099:3311' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
+   # 'db1099:3311' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8 # 
T162807
'db1105:3311' => 1,   # C3 3.6TB 512GB # rc, log: s1 and s2
],
's2' => [
@@ -260,23 +260,23 @@
 'groupLoadsBySection' => [
's1' => [
'watchlist' => [
-   'db1099:3311' => 1,
+   # 'db1099:3311' => 1,
'db1105:3311' => 1,
],
'recentchanges' => [
-   'db1099:3311' => 1,
+   # 'db1099:3311' => 1,
'db1105:3311' => 1,
],
'recentchangeslinked' => [
-   'db1099:3311' => 1,
+   # 'db1099:3311' => 1,
'db1105:3311' => 1,
],
'contributions' => [
-   'db1099:3311' => 1,
+   # 'db1099:3311' => 1,
'db1105:3311' => 1,
],
'logpager' => [
-   'db1099:3311' => 1,
+   # 'db1099:3311' => 1,
'db1105:3311' => 1,
],
'dump' => [
@@ -288,7 +288,7 @@
'api' => [
'db1080' => 1,
'db1073' => 1,
-   # 'db1066' => 1,
+   'db1066' => 1,
],
],
's2' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] API: Allow to pass whitespaces in MultiValue

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405609 )

Change subject: [WIP] API: Allow to pass whitespaces in MultiValue
..

[WIP] API: Allow to pass whitespaces in MultiValue

This allows to response with an invalidreason instead silently ignore
the parameter.

Example request: api.php?format=json=query=%20

Response before this change:
{
  "batchcomplete": ""
}

Response with this change:
{
  "batchcomplete": "",
  "query": {
"pages": {
  "-1": {
"title": " ",
"invalidreason": "The requested page title is empty or contains only 
the name of a namespace.",
"invalid": ""
  }
}
  }
}

Todo:
* Link a phabricator task.
* Check and add tests.

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


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

diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index 1a126db..a030551 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -1408,9 +1408,6 @@
protected function parseMultiValue( $valueName, $value, $allowMultiple, 
$allowedValues,
$allSpecifier = null, $limit1 = null, $limit2 = null
) {
-   if ( ( trim( $value ) === '' || trim( $value ) === "\x1f" ) && 
$allowMultiple ) {
-   return [];
-   }
$limit1 = $limit1 ?: self::LIMIT_SML1;
$limit2 = $limit2 ?: self::LIMIT_SML2;
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fix to not delete data from "read-only" tables

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405660 )

Change subject: Fix to not delete data from "read-only" tables
..


Fix to not delete data from "read-only" tables

i.e., tables that have an existing "replacement table".

Change-Id: Ie0dc47b5e5b81aabbae68f2a50a2441dd1d2cfdf
---
M Cargo.hooks.php
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/Cargo.hooks.php b/Cargo.hooks.php
index e7ab103..58b7a9b 100644
--- a/Cargo.hooks.php
+++ b/Cargo.hooks.php
@@ -122,7 +122,9 @@
}
 
/**
-* Delete a page
+* Deletes all Cargo data for a specific page - *except* data
+* contained in Cargo tables which are read-only because their
+* "replacement table" exists.
 *
 * @param int $pageID
 * @TODO - move this to a different class, like CargoUtils?
@@ -142,6 +144,11 @@
while ( $row = $dbw->fetchRow( $res ) ) {
$curMainTable = $row['table_name'];
 
+   if ( $cdb->tableExists( $curMainTable . '__NEXT' ) ) {
+   // It's a "read-only" table - ignore.
+   continue;
+   }
+
// First, delete from the "field" tables.
$res2 = $dbw->select( 'cargo_tables', 'field_tables', 
array( 'main_table' => $curMainTable ) );
$row2 = $dbw->fetchRow( $res2 );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Cargo[master]: Fixed support for MW 1.23 - fix for c686d11b9f88

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405666 )

Change subject: Fixed support for MW 1.23 - fix for c686d11b9f88
..


Fixed support for MW 1.23 - fix for c686d11b9f88

Change-Id: Ie2d322b3410d8ccffb1827e687bf4288fd879967
---
M includes/CargoRecreateDataAction.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/CargoRecreateDataAction.php 
b/includes/CargoRecreateDataAction.php
index c4b574c..ebce0be 100644
--- a/includes/CargoRecreateDataAction.php
+++ b/includes/CargoRecreateDataAction.php
@@ -95,5 +95,11 @@
$links['actions'] = $views_links;
return true;
}
+  
+   /**
+* Implement this to support MW 1.23, which has it as an abstract
+* function.
+*/
+   public function execute() { }
 
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...codesniffer[master]: Detect variadic arguments in function comments

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/403940 )

Change subject: Detect variadic arguments in function comments
..


Detect variadic arguments in function comments

Avoid false positive detection of
"Doc comment for parameter "$params" missing"
in combination with
"Doc comment for parameter $params,... does not match actual variable
name $params"
when $params is part of the argument list.
The other option, when $params is not part of the argument list,
already works.

Bug: T175504
Change-Id: I051150bdb281ae22b8a3a2638dc09e60cadf46c9
---
M MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
M MediaWiki/Tests/files/Commenting/commenting_function.php
M MediaWiki/Tests/files/Commenting/commenting_function.php.expect
M MediaWiki/Tests/files/Commenting/commenting_function.php.fixed
4 files changed, 55 insertions(+), 5 deletions(-)

Approvals:
  Legoktm: Looks good to me, approved
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, but someone else must approve



diff --git a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php 
b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
index bb53b01..006fe4c 100644
--- a/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
+++ b/MediaWiki/Sniffs/Commenting/FunctionCommentSniff.php
@@ -530,10 +530,21 @@
$error = 'Missing parameter type';
$phpcsFile->addError( $error, $tag, 
'MissingParamType' );
}
+   $isVariadicArg = substr_compare( $var, ',...', -4, 4 ) 
=== 0;
+   if ( $isVariadicArg ) {
+   // Variadic args sometimes part of the argument 
list,
+   // sometimes not. Remove the variadic indicator 
from the doc name to
+   // compare it against the real name, when it is 
part of the argument list.
+   // If it is not part of the argument list,
+   // the name of the extra paremter will not be 
checked.
+   // This does not take care for the php5.6 
...$var feature
+   $var = substr( $var, 0, -4 );
+   }
$params[] = [
'tag' => $tag,
'type' => $type,
'var' => $var,
+   'variadic_arg' => $isVariadicArg,
'comment' => $comment,
'comment_first' => $commentFirst,
'param_space' => $paramSpace,
@@ -612,7 +623,7 @@
$var = $param['var'];
// Check for unneeded punctation
$matches = [];
-   if ( preg_match( 
'/^(.*?)((?:(?![\[\]_{}])\p{P})+)(?addFixableError(
'Param name should not end with 
punctuation "%s"',
$param['tag'],
@@ -645,7 +656,7 @@
$error .= 'actual variable name %s';
$phpcsFile->addError( $error, 
$param['tag'], $code, $data );
}
-   } elseif ( substr( $var, -4 ) !== ',...' ) {
+   } elseif ( !$param['variadic_arg'] ) {
// We must have an extra parameter comment.
$error = 'Superfluous parameter comment';
$phpcsFile->addError( $error, $param['tag'], 
'ExtraParamComment' );
@@ -732,6 +743,9 @@
$content  = $fixParam['type'];
$content .= str_repeat( ' ', $fixParam['type_space'] );
$content .= $fixParam['var'];
+   if ( $fixParam['variadic_arg'] ) {
+   $content .= ',...';
+   }
$content .= str_repeat( ' ', $fixParam['var_space'] );
$content .= $fixParam['comment_first'];
$phpcsFile->fixer->replaceToken( ( $fixParam['tag'] + 2 ), 
$content );
diff --git a/MediaWiki/Tests/files/Commenting/commenting_function.php 
b/MediaWiki/Tests/files/Commenting/commenting_function.php
index fc48879..6d9e69e 100644
--- a/MediaWiki/Tests/files/Commenting/commenting_function.php
+++ b/MediaWiki/Tests/files/Commenting/commenting_function.php
@@ -185,6 +185,22 @@
$out = $in * $inOut;
$inOut = $in / $out;
}
+
+   /**
+* Test with variadic argument in the list
+* @param string $key A comment
+* @param string $params,... A comment
+*/
+   public function testVariadicArgInArgList( $key, $params /* ... */ ) {
+   }
+
+   /**
+* Test with 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: watch.js: Let api.js do the joining of the array

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405659 )

Change subject: watch.js: Let api.js do the joining of the array
..


watch.js: Let api.js do the joining of the array

Change-Id: Ie283ed3e071fe1a041f040e72cac061ebc3209d0
---
M resources/src/mediawiki/api/watch.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki/api/watch.js 
b/resources/src/mediawiki/api/watch.js
index f50e59a..025c111 100644
--- a/resources/src/mediawiki/api/watch.js
+++ b/resources/src/mediawiki/api/watch.js
@@ -28,7 +28,7 @@
{
formatversion: 2,
action: 'watch',
-   titles: Array.isArray( pages ) ? 
pages.join( '|' ) : String( pages )
+   titles: Array.isArray( pages ) ? pages 
: String( pages )
},
addParams
)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie283ed3e071fe1a041f040e72cac061ebc3209d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: striker: rename role class to profile

2018-01-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405669 )

Change subject: striker: rename role class to profile
..

striker: rename role class to profile

This gets us a bit closer following the style guide.

Once Californium is switched off, this profile
will be included by the new 'labweb' role.

Change-Id: I4e88782ebfc5650b9852cebaa0f7d274525ab9f7
---
M manifests/site.pp
R modules/profile/striker/web.pp
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/69/405669/1

diff --git a/manifests/site.pp b/manifests/site.pp
index af5c111..f3ddb17 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -119,7 +119,7 @@
 # and Toolforge admin console AKA Striker
 #  It's proxied by the misc-web varnishes
 node 'californium.wikimedia.org' {
-role(striker::web)
+include ::profile::striker::web
 include ::role::wmcs::openstack::main::horizon
 include ::standard
 include ::base::firewall
diff --git a/modules/role/manifests/striker/web.pp 
b/modules/profile/striker/web.pp
similarity index 80%
rename from modules/role/manifests/striker/web.pp
rename to modules/profile/striker/web.pp
index 0457b8c..18fe6ca 100644
--- a/modules/role/manifests/striker/web.pp
+++ b/modules/profile/striker/web.pp
@@ -1,10 +1,10 @@
-# == Class: role::striker::web
+# == Class: profile::striker::web
 #
 # Striker is a Django application for managing data related to Tool Labs
 # tools.
 #
 # filtertags: labs-project-striker
-class role::striker::web {
+class profile::striker::web {
 include ::memcached
 include ::striker::apache
 include ::striker::uwsgi

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

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

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove JSCS comments

2018-01-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405626 )

Change subject: Remove JSCS comments
..

Remove JSCS comments

Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd
---
M src/ce/ve.ce.TextState.js
M tests/ve.qunit.js
2 files changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/26/405626/1

diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js
index 15d810d..80f85aa 100644
--- a/src/ce/ve.ce.TextState.js
+++ b/src/ce/ve.ce.TextState.js
@@ -101,7 +101,6 @@
continue;
}
// Else no child nodes; do nothing
-   // jscs:enable disallowEmptyBlocks
 
// Step out of this node, then keep stepping outwards until 
there is a next sibling
while ( true ) {
diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js
index 4d58ab7..436c025 100644
--- a/tests/ve.qunit.js
+++ b/tests/ve.qunit.js
@@ -324,9 +324,7 @@
var oLines = difflib.stringAsLines( unescapeText( o ) ),
nLines = difflib.stringAsLines( unescapeText( n ) ),
sm = new difflib.SequenceMatcher( oLines, nLines ),
-   // jscs:disable requireCamelCaseOrUpperCaseIdentifiers 
(awaiting eslint replacement; T149261)
opcodes = sm.get_opcodes(),
-   // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
$div = $( '' );
 
$div.append( diffview.buildView( {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.special.upload: trim nameToCheck

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405557 )

Change subject: mediawiki.special.upload: trim nameToCheck
..


mediawiki.special.upload: trim nameToCheck

The API ignores titles consists only on spaces and returns a response
without a "query" key.

Bug: T185400
Change-Id: Ia365f6660c0da0138a9035aad8dfcda38fab7733
---
M resources/src/mediawiki.special/mediawiki.special.upload.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/src/mediawiki.special/mediawiki.special.upload.js 
b/resources/src/mediawiki.special/mediawiki.special.upload.js
index 9bf6255..06cb2d8 100644
--- a/resources/src/mediawiki.special/mediawiki.special.upload.js
+++ b/resources/src/mediawiki.special/mediawiki.special.upload.js
@@ -61,7 +61,7 @@
 
timeout: function () {
var $spinnerDestCheck, title;
-   if ( !ajaxUploadDestCheck || this.nameToCheck === '' ) {
+   if ( !ajaxUploadDestCheck || this.nameToCheck.trim() 
=== '' ) {
return;
}
$spinnerDestCheck = $.createSpinner().insertAfter( 
'#wpDestFile' );

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: NWE: Don't attempt to set selection on unattached textarea

2018-01-21 Thread Esanders (Code Review)
Esanders has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405662 )

Change subject: NWE: Don't attempt to set selection on unattached textarea
..

NWE: Don't attempt to set selection on unattached textarea

Prevents an exception being thrown in Firefox <= 52.

Bug: T185304
Change-Id: Ic9a43e3cf12d4cc566cebb328f8e807e464af634
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/ve.init.mw.TempWikitextEditorWidget.js
2 files changed, 10 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index a737d41..d9f9d40 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -139,7 +139,7 @@
 
// Resize the textarea to fit content. We could do this more 
often (e.g. on change)
// but hopefully this temporary textarea won't be visible for 
too long.
-   tempWikitextEditor.adjustSize().focus();
+   tempWikitextEditor.adjustSize().moveCursorToStart();
ve.track( 'mwedit.ready', { mode: 'source' } );
}
 
diff --git a/modules/ve-mw/init/ve.init.mw.TempWikitextEditorWidget.js 
b/modules/ve-mw/init/ve.init.mw.TempWikitextEditorWidget.js
index 829ef78..5bc228c 100644
--- a/modules/ve-mw/init/ve.init.mw.TempWikitextEditorWidget.js
+++ b/modules/ve-mw/init/ve.init.mw.TempWikitextEditorWidget.js
@@ -34,9 +34,18 @@
} )
.val( config.value )
.on( 'input', config.onChange );
+};
 
+/**
+ * Focus the input and move the cursor to the start.
+ *
+ * @chainable
+ */
+mw.libs.ve.MWTempWikitextEditorWidget.prototype.moveCursorToStart = function 
() {
// Move cursor to start
this.$element[ 0 ].setSelectionRange( 0, 0 );
+   this.focus();
+   return this;
 };
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikispeech[master]: Fix multiple PHP class declarations in one file

2018-01-21 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405663 )

Change subject: Fix multiple PHP class declarations in one file
..

Fix multiple PHP class declarations in one file

All files containing more than one PHP class were split into
multiple files.

extension.json was updated to match new class locations.

Bug: T177809
Change-Id: I61a20cbf83925ad07f7f665ad83032bf0f6f36c2
---
M extension.json
R includes/CleanedText.php
A includes/SegmentBreak.php
3 files changed, 19 insertions(+), 12 deletions(-)


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

diff --git a/extension.json b/extension.json
index 6f7cebb..4d50ef2 100644
--- a/extension.json
+++ b/extension.json
@@ -18,8 +18,8 @@
"AutoloadClasses": {
"SpecialWikispeech": "specials/SpecialWikispeech.php",
"WikispeechHooks": "Hooks.php",
-   "CleanedText": "includes/CleanedContent.php",
-   "SegmentBreak": "includes/CleanedContent.php",
+   "CleanedText": "includes/CleanedText.php",
+   "SegmentBreak": "includes/SegmentBreak.php",
"Cleaner": "includes/Cleaner.php",
"HtmlGenerator": "includes/HtmlGenerator.php",
"Segmenter": "includes/Segmenter.php",
diff --git a/includes/CleanedContent.php b/includes/CleanedText.php
similarity index 89%
rename from includes/CleanedContent.php
rename to includes/CleanedText.php
index c03e872..a0f3c66 100644
--- a/includes/CleanedContent.php
+++ b/includes/CleanedText.php
@@ -60,13 +60,3 @@
return $element;
}
 }
-
-/**
- * Denotes a break between to segments. Added by `Cleaner` and
- * consumed by `Segmenter`.
- *
- * @since 0.0.1
- */
-
-class SegmentBreak {
-}
diff --git a/includes/SegmentBreak.php b/includes/SegmentBreak.php
new file mode 100644
index 000..497ebe2
--- /dev/null
+++ b/includes/SegmentBreak.php
@@ -0,0 +1,17 @@
+https://gerrit.wikimedia.org/r/405663
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61a20cbf83925ad07f7f665ad83032bf0f6f36c2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikispeech
Gerrit-Branch: master
Gerrit-Owner: Phantom42 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikiLexicalData[master]: Fix multiple PHP class declarations in one file

2018-01-21 Thread Phantom42 (Code Review)
Phantom42 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405665 )

Change subject: Fix multiple PHP class declarations in one file
..

Fix multiple PHP class declarations in one file

All files containing more than one PHP class were split into
multiple files.

Autoloader references were updated to match new class locations.

Bug: T177809
Change-Id: I25f6230396010d53f772408e083608d18dbe5a9c
---
M includes/setup/OWSpecials.php
A includes/specials/ExternalResources.php
M includes/specials/SpecialOWAddFromExternalAPI.php
R includes/specials/WordnikExtension.php
A includes/specials/WordnikWiktionaryExtension.php
A includes/specials/WordnikWordnetExtension.php
6 files changed, 199 insertions(+), 188 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikiLexicalData 
refs/changes/65/405665/1

diff --git a/includes/setup/OWSpecials.php b/includes/setup/OWSpecials.php
index 27818f9..cb01023 100644
--- a/includes/setup/OWSpecials.php
+++ b/includes/setup/OWSpecials.php
@@ -106,6 +106,7 @@
 $wgAutoloadClasses['SpecialImportTSV'] = $wgWldSpecialsScriptPath . 
'SpecialImportTSV.php';
 
 $wgAutoloadClasses['SpecialOWAddFromExternalAPI'] = $wgWldSpecialsScriptPath . 
'SpecialOWAddFromExternalAPI.php';
+$wgAutoloadClasses['ExternalResources'] = $wgWldSpecialsScriptPath . 
'ExternalResources.php';
 
 // $wgAutoloadClasses['SpecialTransaction'] = $dir . 
'OmegaWiki/SpecialTransaction.php';
 
@@ -136,9 +137,9 @@
 $wgWldExtenalResourceLanguages = array();
 
 if ( file_exists( $wgWldScriptPath . '/external/wordnik/wordnik/Swagger.php' ) 
) {
-   $wgAutoloadClasses['WordnikExtension' ] = $wgWldSpecialsScriptPath . 
'ExternalWordnik.php';
-   $wgAutoloadClasses['WordnikWiktionaryExtension' ] = 
$wgWldSpecialsScriptPath . 'ExternalWordnik.php';
-   $wgAutoloadClasses['WordnikWordnetExtension' ] = 
$wgWldSpecialsScriptPath . 'ExternalWordnik.php';
+   $wgAutoloadClasses['WordnikExtension' ] = $wgWldSpecialsScriptPath . 
'WordnikExtension.php';
+   $wgAutoloadClasses['WordnikWiktionaryExtension' ] = 
$wgWldSpecialsScriptPath . 'WordnikWiktionaryExtension.php';
+   $wgAutoloadClasses['WordnikWordnetExtension' ] = 
$wgWldSpecialsScriptPath . 'WordnikWordnetExtension.php';
$wgWldProcessExternalAPIClasses['WordnikExtension'] = 'Wordnik';
$wgWldProcessExternalAPIClasses['WordnikWiktionaryExtension'] = 
'Wordnik Wiktionary';
$wgWldProcessExternalAPIClasses['WordnikWordnetExtension'] = 'Wordnik 
Wordnet';
diff --git a/includes/specials/ExternalResources.php 
b/includes/specials/ExternalResources.php
new file mode 100644
index 000..5659fff
--- /dev/null
+++ b/includes/specials/ExternalResources.php
@@ -0,0 +1,175 @@
+wgOut = $wgOut;
+   $this->spTitle = $spTitle;
+   $this->source = $source;
+   $this->sourceLabel = $source;
+   $this->sourceLanguageId = $sourceLanguageId;
+   $this->search = $search;
+   $this->collectionId = $collectionId;
+   }
+
+   public function execute() {
+   $this->outputTitle();
+   $this->getOptionPanel();
+   $this->checkConnectionStatus();
+
+   // inline css ( for future refactoring )
+   // removes from data when finished testing
+   $this->wgOut->addHTML( $this->temporaryCodeSpace() );
+
+   if ( $this->source ) {
+   switch ( $this->connection ) {
+   case true:
+   $this->checkExternalDefinition();
+   $this->checkOmegaWikiDefinition();
+   if ( $this->externalExists and 
$this->owlExists ) {
+   $this->setExternalDefinition();
+   $this->setOmegaWikiDefinition();
+   $this->createChoice();
+   }
+   break;
+   case false:
+   $this->wgOut->addHtml( 'Sorry, there is 
a problem with the connection. Can not find ' . $this->search );
+   break;
+   }
+   }
+   }
+
+   private function temporaryCodeSpace() {
+   return '' .
+   '#ext-data {visibility: hidden; display: none }' .
+   '#owl-data {visibility: hidden; display: none }' .
+   '';
+   }
+
+   private function createChoice() {
+   $owlLineProcessed = false;
+   $ctr = 0;
+   $this->wgOut->addHTML(
+   ''.
+   ''
+   );
+   $this->wgOut->addHTML(
+   ''

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

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404763 )

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


Update VE core submodule to master (88ba1eb9a)

New changes:
6a0b829e3 build: Bump stylelint and config, and make pass
9cacad1e9 Remove JSCS comments
ba7adf119 OOUI: Manually pull in fix from I99caad7b ahead of the release cycle
3cdb40b27 Update OOUI to v0.25.1
a1ec03ade getSelectedItem() -> findSelectedItem()
bd1aa50fb Localisation updates from https://translatewiki.net.
28b668622 SurfaceSynchronizer: Clear author selections when unapplying
982919680 SurfaceSynchronizer: Translate selections when unapplying

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

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



diff --git a/lib/ve b/lib/ve
index d5428e9..88ba1eb 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit d5428e9b346bb3b9bf5e043efae6078d8a55c683
+Subproject commit 88ba1eb9a87b648a945fd3b655a9db852aa81a56

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I58562868ff9c76e5abcca3297d8c7cc1bc60bf12
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...CodeMirror[master]: NWE: Fix padding in Vector

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405260 )

Change subject: NWE: Fix padding in Vector
..


NWE: Fix padding in Vector

Bug: T185299
Change-Id: Iea8e61654608259ddc90286aef59014a37e4f44d
---
M resources/modules/ve-cm/ve.ui.CodeMirror.init.less
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/resources/modules/ve-cm/ve.ui.CodeMirror.init.less 
b/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
index b7c42aa..33accbc 100644
--- a/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
+++ b/resources/modules/ve-cm/ve.ui.CodeMirror.init.less
@@ -18,9 +18,10 @@
 
// Skin specific paddings
.skin-vector & {
-   padding: 0 1.14286em; /* 1/0.875 */
+   padding: 0 1.2em;
+
@media screen and ( min-width: 982px ) {
-   padding: 0 1.71429em; /* surface-margin-left 
(1.5em) / (mw-body-content font-size) 0.875em */
+   padding: 0 1.8em;
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea8e61654608259ddc90286aef59014a37e4f44d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CodeMirror
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Remove JSCS comments

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405626 )

Change subject: Remove JSCS comments
..


Remove JSCS comments

Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd
---
M src/ce/ve.ce.TextState.js
M tests/ve.qunit.js
2 files changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/src/ce/ve.ce.TextState.js b/src/ce/ve.ce.TextState.js
index 15d810d..80f85aa 100644
--- a/src/ce/ve.ce.TextState.js
+++ b/src/ce/ve.ce.TextState.js
@@ -101,7 +101,6 @@
continue;
}
// Else no child nodes; do nothing
-   // jscs:enable disallowEmptyBlocks
 
// Step out of this node, then keep stepping outwards until 
there is a next sibling
while ( true ) {
diff --git a/tests/ve.qunit.js b/tests/ve.qunit.js
index 4d58ab7..436c025 100644
--- a/tests/ve.qunit.js
+++ b/tests/ve.qunit.js
@@ -324,9 +324,7 @@
var oLines = difflib.stringAsLines( unescapeText( o ) ),
nLines = difflib.stringAsLines( unescapeText( n ) ),
sm = new difflib.SequenceMatcher( oLines, nLines ),
-   // jscs:disable requireCamelCaseOrUpperCaseIdentifiers 
(awaiting eslint replacement; T149261)
opcodes = sm.get_opcodes(),
-   // jscs:enable requireCamelCaseOrUpperCaseIdentifiers
$div = $( '' );
 
$div.append( diffview.buildView( {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ed4ae64800f2ba508302256ee85274ba7a0f5dd
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


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

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405577 )

Change subject: Convert WikEdDiff to use extension registration
..


Convert WikEdDiff to use extension registration

Bug: T185408
Change-Id: I0c236772661d9d37dc051db6507b30fcaa73efee
---
M WikEdDiff.php
A extension.json
2 files changed, 47 insertions(+), 28 deletions(-)

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



diff --git a/WikEdDiff.php b/WikEdDiff.php
index f7cd3d1..df95e83 100644
--- a/WikEdDiff.php
+++ b/WikEdDiff.php
@@ -23,31 +23,16 @@
  * @author Cacycle (https://en.wikipedia.org/wiki/User:Cacycle)
  */
 
-
-global $wgExtensionCredits, $wgResourceModules, $wgHooks;
-
-// extension credits
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'wikEdDiff',
-   'author' => 'Cacycle',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:wikEdDiff',
-   'descriptionmsg' => 'wiked-diff-desc',
-   'version' => '1.2.5',
-   'license-name' => 'GPL-2.0+' // GNU General Public License v2.0 or later
-);
-
-// hook up
-$dir = __DIR__ . '/';
-$wgResourceModules['ext.wikEdDiff'] = array(
-   'localBasePath' => $dir . 'modules',
-   'remoteExtPath' => 'WikEdDiff/modules',
-   'scripts' => 'ext.wikEdDiff.js',
-   'styles' => 'ext.wikEdDiff.css',
-   'position' => 'top'
-);
-$wgMessagesDirs['WikEdDifferenceEngine'] = $dir . 'i18n';
-$wgAutoloadClasses['WikEdDifferenceEngine'] = $dir . 'WikEdDiff.body.php';
-$wgAutoloadClasses['WikEdDiff'] = $dir . 'WikEdDiff.body.php';
-$wgAutoloadClasses['WikEdDiffText'] = $dir . 'WikEdDiff.body.php';
-$wgHooks['GetDifferenceEngine'][] = 
'WikEdDifferenceEngine::onGetDifferenceEngine';
+ if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'WikEdDiff' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['WikEdDiff'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the WikEdDiff extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the WikEdDiff extension requires MediaWiki 1.29+' 
);
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..dcf2b49
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,34 @@
+{
+   "name": "wikEdDiff",
+   "version": "1.2.5",
+   "author": "Cacycle",
+   "url": "https://www.mediawiki.org/wiki/Extension:wikEdDiff;,
+   "descriptionmsg": "wiked-diff-desc",
+   "license-name": "GPL-2.0+",
+   "type": "other",
+   "MessagesDirs": {
+   "WikEdDifferenceEngine": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "WikEdDifferenceEngine": "WikEdDiff.body.php",
+   "WikEdDiff": "WikEdDiff.body.php",
+   "WikEdDiffText": "WikEdDiff.body.php"
+   },
+   "ResourceModules": {
+   "ext.wikEdDiff": {
+   "scripts": "ext.wikEdDiff.js",
+   "styles": "ext.wikEdDiff.css",
+   "position": "top"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "modules",
+   "remoteExtPath": "WikEdDiff/modules"
+   },
+   "Hooks": {
+   "GetDifferenceEngine": 
"WikEdDifferenceEngine::onGetDifferenceEngine"
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c236772661d9d37dc051db6507b30fcaa73efee
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikEdDiff
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Johnduhart 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mainframe98 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...UIFeedback[master]: Add missing converting of mw.message to HTML

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/264263 )

Change subject: Add missing converting of mw.message to HTML
..


Add missing converting of mw.message to HTML

Change-Id: I3f7da0f4f9d504a1f7bddedfde12db33b86a88b1
---
M resources/ext.uiFeedback.js
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Kreuz (WMDE): Looks good to me, approved
  Zoranzoki21: Looks good to me, but someone else must approve



diff --git a/resources/ext.uiFeedback.js b/resources/ext.uiFeedback.js
index ed5e63b..0112ff3 100644
--- a/resources/ext.uiFeedback.js
+++ b/resources/ext.uiFeedback.js
@@ -476,7 +476,7 @@
help.setAttribute( 'class', 'ui-feedback-help grey noselect' );
help.innerHTML = '' + '' + 
mw.message( 'ui-feedback-help-headline' ).escaped() + '' + '' + '' + '';
/* Text for both help-dialogues */
-   var helpcontent = '' + mw.message( 
'ui-feedback-help-text-top' ) + '';
+   var helpcontent = '' + mw.message( 
'ui-feedback-help-text-top' ).escaped() + '';
if ( use_html2canvas ) {
$( help ).find( '.h_green' ).removeClass( 'h_green' ).addClass( 
'h_purple' );
helpcontent += '' + '' + mw.message( 'ui-feedback-help-subheading' ).escaped() + 
'' + '' + '' + mw.message( 
'ui-feedback-help-text-bottom' ).escaped() + '' + 
'';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f7da0f4f9d504a1f7bddedfde12db33b86a88b1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UIFeedback
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader 
Gerrit-Reviewer: Gerrit Patch Uploader 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: Zoranzoki21 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.ForeignStructuredUpload: Simplify code by using ES5

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405582 )

Change subject: mediawiki.ForeignStructuredUpload: Simplify code by using ES5
..


mediawiki.ForeignStructuredUpload: Simplify code by using ES5

For iterating over an array replace for() by .push.apply() and .map().

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push#Merging_two_arrays
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map

Change-Id: I0bb4ed7f71db1e60eb4d76a77c53d022bb2081d1
---
M resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
1 file changed, 11 insertions(+), 26 deletions(-)

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



diff --git a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js 
b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
index 0c572d4..4d56940 100644
--- a/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
+++ b/resources/src/mediawiki/mediawiki.ForeignStructuredUpload.js
@@ -86,12 +86,9 @@
 * @param {string[]} categories Array of categories to which this 
upload will be added.
 */
ForeignStructuredUpload.prototype.addCategories = function ( categories 
) {
-   var i, category;
-
-   for ( i = 0; i < categories.length; i++ ) {
-   category = categories[ i ];
-   this.categories.push( category );
-   }
+   // The length of the array must be less than 1.
+   // 
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push#Merging_two_arrays
+   Array.prototype.push.apply( this.categories, categories );
};
 
/**
@@ -183,18 +180,11 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getDescriptions = function () {
-   var i, desc, templateCalls = [];
-
-   for ( i = 0; i < this.descriptions.length; i++ ) {
-   desc = this.descriptions[ i ];
-   templateCalls.push(
-   this.config.format.description
-   .replace( '$LANGUAGE', desc.language )
-   .replace( '$TEXT', desc.text )
-   );
-   }
-
-   return templateCalls.join( '\n' );
+   return this.descriptions.map( function ( desc ) {
+   return this.config.format.description
+   .replace( '$LANGUAGE', desc.language )
+   .replace( '$TEXT', desc.text );
+   } ).join( '\n' );
};
 
/**
@@ -205,18 +195,13 @@
 * @return {string}
 */
ForeignStructuredUpload.prototype.getCategories = function () {
-   var i, cat, categoryLinks = [];
-
if ( this.categories.length === 0 ) {
return this.config.format.uncategorized;
}
 
-   for ( i = 0; i < this.categories.length; i++ ) {
-   cat = this.categories[ i ];
-   categoryLinks.push( '[[Category:' + cat + ']]' );
-   }
-
-   return categoryLinks.join( '\n' );
+   return this.categories.map( function ( cat ) {
+   return '[[Category:' + cat + ']]';
+   } ).join( '\n' );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0bb4ed7f71db1e60eb4d76a77c53d022bb2081d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Fomafix 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix multiple PHP class declarations in one file

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405608 )

Change subject: Fix multiple PHP class declarations in one file
..


Fix multiple PHP class declarations in one file

All files containing more than one PHP class were split into
multiple files.

extension.json was updated to match new class locations.

Bug: T177809
Change-Id: I4e7d8f02164c3048c41c4c9fbe4be18a99e7abaa
---
M extension.json
D includes/ContainmentSet.php
A includes/EchoArrayList.php
A includes/EchoCachedList.php
A includes/EchoContainmentList.php
A includes/EchoContainmentSet.php
A includes/EchoDiffGroup.php
R includes/EchoDiffParser.php
A includes/EchoOnWikiList.php
9 files changed, 397 insertions(+), 371 deletions(-)

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



diff --git a/extension.json b/extension.json
index 3928781..088b764 100644
--- a/extension.json
+++ b/extension.json
@@ -921,18 +921,18 @@
"EchoAbstractMapper": "includes/mapper/AbstractMapper.php",
"EchoAbstractMapperStub": 
"tests/phpunit/mapper/AbstractMapperTest.php",
"EchoAbstractMapperTest": 
"tests/phpunit/mapper/AbstractMapperTest.php",
-   "EchoArrayList": "includes/ContainmentSet.php",
+   "EchoArrayList": "includes/EchoArrayList.php",
"EchoAttributeManager": "includes/AttributeManager.php",
"EchoAttributeManagerTest": 
"tests/phpunit/AttributeManagerTest.php",
-   "EchoCachedList": "includes/ContainmentSet.php",
+   "EchoCachedList": "includes/EchoCachedList.php",
"EchoCallbackIterator": 
"includes/iterator/CallbackIterator.php",
"EchoCatchableFatalErrorException": 
"includes/exception/CatchableFatalErrorException.php",
-   "EchoContainmentList": "includes/ContainmentSet.php",
-   "EchoContainmentSet": "includes/ContainmentSet.php",
+   "EchoContainmentList": "includes/EchoContainmentList.php",
+   "EchoContainmentSet": "includes/EchoContainmentSet.php",
"EchoDataOutputFormatter": "includes/DataOutputFormatter.php",
"EchoDeferredMarkAsDeletedUpdate": 
"includes/DeferredMarkAsDeletedUpdate.php",
-   "EchoDiffGroup": "includes/DiffParser.php",
-   "EchoDiffParser": "includes/DiffParser.php",
+   "EchoDiffGroup": "includes/EchoDiffGroup.php",
+   "EchoDiffParser": "includes/EchoDiffParser.php",
"EchoDiffParserTest": "tests/phpunit/DiffParserTest.php",
"EchoDiscussionParser": "includes/DiscussionParser.php",
"EchoDiscussionParserTest": 
"tests/phpunit/DiscussionParserTest.php",
@@ -975,7 +975,7 @@
"EchoNotificationTest": 
"tests/phpunit/model/NotificationTest.php",
"EchoNotifier": "includes/Notifier.php",
"EchoOOUI\\LabelIconWidget": 
"includes/ooui/LabelIconWidget.php",
-   "EchoOnWikiList": "includes/ContainmentSet.php",
+   "EchoOnWikiList": "includes/EchoOnWikiList.php",
"EchoPageLinkedPresentationModel": 
"includes/formatters/PageLinkedPresentationModel.php",
"EchoPlainTextDigestEmailFormatter": 
"includes/formatters/EchoPlainTextDigestEmailFormatter.php",
"EchoPlainTextEmailFormatter": 
"includes/formatters/EchoPlainTextEmailFormatter.php",
diff --git a/includes/ContainmentSet.php b/includes/ContainmentSet.php
deleted file mode 100644
index 5b779d0..000
--- a/includes/ContainmentSet.php
+++ /dev/null
@@ -1,271 +0,0 @@
-addArray( $wgSomeGlobalParameter );
- *   $set->addOnWiki( NS_USER, 'Foo/bar-baz', $cache, 
'some_user_specific_cache_key' );
- *
- * Usage:
- *   if ( $set->contains( 'SomeUser' ) ) {
- *   ...
- *   }
- */
-class EchoContainmentSet {
-   /**
-* @var EchoContainmentList[]
-*/
-   protected $lists = [];
-
-   /**
-* @var User
-*/
-   protected $recipient;
-
-   public function __construct( User $recipient ) {
-   $this->recipient = $recipient;
-   }
-
-   /**
-* Add an EchoContainmentList to the set of lists checked by 
self::contains()
-*
-* @param EchoContainmentList $list
-*/
-   public function add( EchoContainmentList $list ) {
-   $this->lists[] = $list;
-   }
-
-   /**
-* Add a php array to the set of lists checked by self::contains()
-*
-* @param array $list
-*/
-   public function addArray( array $list ) {
-   $this->add( new EchoArrayList( $list ) );
-   }
-
-   /**
-* Add a list from a user preference to the set of lists checked by 
self::contains().
-*
-* @param string $preferenceName
-*/
-   public function addFromUserOption( 

[MediaWiki-commits] [Gerrit] mediawiki...BibManager[master]: Convert BibManager to use extension registation

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405597 )

Change subject: Convert BibManager to use extension registation
..


Convert BibManager to use extension registation

Bug: T185424
Change-Id: I7cba88922da1b472ca4874eb356c9ff8a7fb1028
---
M BibManager.php
A extension.json
2 files changed, 125 insertions(+), 111 deletions(-)

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



diff --git a/BibManager.php b/BibManager.php
index 1dcc529..247b945 100644
--- a/BibManager.php
+++ b/BibManager.php
@@ -18,115 +18,16 @@
   http://www.gnu.org/copyleft/gpl.html
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo 'To install BibManager, put the following line in 
LocalSettings.php: '
-   .'include_once( "$IP/extensions/BibManager/BibManager.php" );' . "\n";
-   exit( 1 );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'BibManager' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['BibManager'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the BibManager extension. 
' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the BibManager extension requires MediaWiki 
1.29+' );
 }
-
-$wgExtensionCredits['specialpage'][] = array (
-   'path'   => __FILE__,
-   'name'   => 'BibManager',
-   'author' => array (
-   'Hornemann Institut', 'Hallo Welt! Medienwerkstatt GmbH',
-   'Tobias Weichart', 'Robert Vogel'
-   ),
-   'url'=> 
'http://www.mediawiki.org/wiki/Extension:BibManager',
-   'version'=> '1.23.0',
-   'descriptionmsg' => 'bibmanager-desc',
-);
-
-//Register classes
-$wgAutoloadClasses['Structures_BibTex'] = __DIR__ . 
'/includes/libs/Structures_BibTex/BibTex.php'; //External library for parsing
-
-$wgAutoloadClasses['BibManagerHooks']   = __DIR__ . 
'/includes/BibManagerHooks.php';
-$wgAutoloadClasses['BibManagerFieldsList']  = __DIR__ . 
'/includes/BibManagerFieldsList.php';
-$wgAutoloadClasses['BibManagerLocalMWDatabaseRepo'] = __DIR__ . 
'/includes/BibManagerLocalMWDatabaseRepo.php';
-$wgAutoloadClasses['BibManagerPagerList']   = __DIR__ . 
'/includes/BibManagerPagerList.php';
-$wgAutoloadClasses['BibManagerPagerListAuthors']= __DIR__ . 
'/includes/BibManagerPagerListAuthors.php';
-$wgAutoloadClasses['BibManagerRepository']  = __DIR__ . 
'/includes/BibManagerRepository.php';
-$wgAutoloadClasses['BibManagerValidator']   = __DIR__ . 
'/includes/BibManagerValidator.php';
-$wgAutoloadClasses['BibManagerLocalMWDatabaseRepo'] = __DIR__ . 
'/includes/BibManagerLocalMWDatabaseRepo.php';
-$wgAutoloadClasses['BibManagerRepository']  = __DIR__ . 
'/includes/BibManagerRepository.php';
-
-//SpecialPages
-$wgAutoloadClasses['SpecialBibManagerList']= __DIR__ . 
'/includes/specials/SpecialBibManagerList.php';
-$wgAutoloadClasses['SpecialBibManagerListAuthors'] = __DIR__ . 
'/includes/specials/SpecialBibManagerListAuthors.php';
-$wgAutoloadClasses['SpecialBibManagerImport']  = __DIR__ . 
'/includes/specials/SpecialBibManagerImport.php';
-$wgAutoloadClasses['SpecialBibManagerExport']  = __DIR__ . 
'/includes/specials/SpecialBibManagerExport.php';
-$wgAutoloadClasses['SpecialBibManagerCreate']  = __DIR__ . 
'/includes/specials/SpecialBibManagerCreate.php';
-$wgAutoloadClasses['SpecialBibManagerDelete']  = __DIR__ . 
'/includes/specials/SpecialBibManagerDelete.php';
-$wgAutoloadClasses['SpecialBibManagerEdit']= __DIR__ . 
'/includes/specials/SpecialBibManagerEdit.php';
-
-//Add I18N
-$wgMessagesDirs['BibManager'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['BibManagerAlias']  = __DIR__ . 
'/BibManager.alias.php';
-
-//Add SpecialPages
-$wgSpecialPages['BibManagerList']= 'SpecialBibManagerList';
-$wgSpecialPages['BibManagerListAuthors'] = 'SpecialBibManagerListAuthors';
-$wgSpecialPages['BibManagerImport']  = 'SpecialBibManagerImport';
-$wgSpecialPages['BibManagerExport']  = 'SpecialBibManagerExport';
-$wgSpecialPages['BibManagerDelete']  = 'SpecialBibManagerDelete';
-$wgSpecialPages['BibManagerCreate']  = 'SpecialBibManagerCreate';
-$wgSpecialPages['BibManagerEdit']= 'SpecialBibManagerEdit';
-
-//Add Hookhandler
-$wgHooks['ParserFirstCallInit'][] = 'BibManagerHooks::onParserFirstCallInit';
-$wgHooks['BeforePageDisplay'][]   = 'BibManagerHooks::onBeforePageDisplay';
-//$wgHooks['SkinAfterContent'][]= 'BibManagerHooks::onSkinAfterContent';
-$wgHooks['LoadExtensionSchemaUpdates'][] = 
'BibManagerHooks::onLoadExtensionSchemaUpdates';
-
-$resourceModuleTemplate = array(
-   

[MediaWiki-commits] [Gerrit] mediawiki...UrlShortener[master]: Replace spaces with %20 and trim user input

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374702 )

Change subject: Replace spaces with %20 and trim user input
..


Replace spaces with %20 and trim user input

* Make sure there are no leading or trailing spaces by using trim()
* Replacing spaces with %20 is always safe, so normalize to that form

Change-Id: Ic0fd36878e2e8c4f8b32c3b47b278d081b919713
---
M UrlShortenerUtils.php
M tests/phpunit/UrlShortenerUtilsTest.php
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/UrlShortenerUtils.php b/UrlShortenerUtils.php
index 8b81939..6c0073e 100644
--- a/UrlShortenerUtils.php
+++ b/UrlShortenerUtils.php
@@ -94,9 +94,13 @@
// it to a different one when redirecting
$url = self::convertToProtocol( $url, PROTO_HTTP );
 
+   $url = trim( $url );
+
// TODO: We should ideally decode/encode the URL for 
normalization,
// but we don't want to double-encode, nor unencode the URL that
// is directly provided by users (see test cases)
+   // So for now, just replace spaces with %20, as that's safe in 
all cases
+   $url = str_replace( ' ', '%20', $url );
 
// If the wiki is using an article path (e.g. /wiki/$1) try
// and convert plain index.php?title=$1 URLs to the canonical 
form
diff --git a/tests/phpunit/UrlShortenerUtilsTest.php 
b/tests/phpunit/UrlShortenerUtilsTest.php
index 08afb75..2ea1f34 100644
--- a/tests/phpunit/UrlShortenerUtilsTest.php
+++ b/tests/phpunit/UrlShortenerUtilsTest.php
@@ -105,10 +105,10 @@

'http://example.org/wiki/Scott_Morrison_(politician)',

'http://example.org/wiki/Scott_Morrison_(politician)'
],
-   // Ideally spaces should be replaced with underscores
+   // Ideally spaces should be replaced with underscores 
for MediaWiki links
[
'http://example.org/wiki/Scott Morrison 
(politician)',
-   'http://example.org/wiki/Scott Morrison 
(politician)'
+   
'http://example.org/wiki/Scott%20Morrison%20(politician)'
],
// encoded # in URL that is not an anchor
[

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0fd36878e2e8c4f8b32c3b47b278d081b919713
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UrlShortener
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Use ve.dm.MetaList without explicitly requiring metadata off...

2018-01-21 Thread Divec (Code Review)
Divec has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405664 )

Change subject: Use ve.dm.MetaList without explicitly requiring metadata 
offset/index
..

Use ve.dm.MetaList without explicitly requiring metadata offset/index

For future compatibility with Ib5174b0dcba1c24f44d889e08140bee31a064011 .

Change-Id: I15f252ce5d36bc0c38c5f5035e5176bf5e6d96e5
---
M modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
1 file changed, 14 insertions(+), 13 deletions(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
index 8d277f9..c155613 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWCategoriesPage.js
@@ -107,13 +107,12 @@
  *  or undefined to go at the end
  */
 ve.ui.MWCategoriesPage.prototype.onNewCategory = function ( item, 
beforeMetaItem ) {
+   var offset;
+
// Insert new metaList item
if ( beforeMetaItem ) {
-   this.insertMetaListItem(
-   this.getCategoryItemForInsertion( item ),
-   beforeMetaItem.getOffset(),
-   beforeMetaItem.getIndex()
-   );
+   offset = beforeMetaItem.getOffset();
+   this.insertMetaListItem( this.getCategoryItemForInsertion( item 
), offset );
} else {
this.insertMetaListItem( this.getCategoryItemForInsertion( item 
) );
}
@@ -135,12 +134,12 @@
  * @param {ve.dm.MetaItem} metaItem
  */
 ve.ui.MWCategoriesPage.prototype.onMetaListInsert = function ( metaItem ) {
+   var index;
+
// Responsible for adding UI components
if ( metaItem.element.type === 'mwCategory' ) {
-   this.categoryWidget.addItems(
-   [ this.getCategoryItemFromMetaListItem( metaItem ) ],
-   this.metaList.findItem( metaItem.getOffset(), 
metaItem.getIndex(), 'mwCategory' )
-   );
+   index = this.metaList.getItemsForGroup( 'mwCategory' ).indexOf( 
metaItem );
+   this.categoryWidget.addItems( [ metaItem ], index );
}
 };
 
@@ -225,11 +224,13 @@
  * Inserts a meta list item
  *
  * @param {Object} metaBase meta list insert object
- * @param {number} [offset] Offset of the meta items within the document
- * @param {number} [index] Index of the meta item within the group of meta 
items at this offset
+ * @param {number} [offset] Offset of the meta items within the document; 
default to document end
  */
-ve.ui.MWCategoriesPage.prototype.insertMetaListItem = function ( metaBase, 
offset, index ) {
-   this.metaList.insertMeta( metaBase, offset, index );
+ve.ui.MWCategoriesPage.prototype.insertMetaListItem = function ( metaBase, 
offset ) {
+   if ( arguments.length > 2 ) {
+   throw new Error( 'Old "index" argument is no longer supported' 
);
+   }
+   this.metaList.insertMeta( metaBase, offset );
 };
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Fix wrong use of mw.msg

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405602 )

Change subject: Fix wrong use of mw.msg
..


Fix wrong use of mw.msg

See https://www.mediawiki.org/wiki/Manual:Messages_API#mw.msg

Bug: T131975
Change-Id: Ib8aa253cb1f994c7abf8939c649a488411455e2f
---
M ext.nuke.confirm.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ext.nuke.confirm.js b/ext.nuke.confirm.js
index 6d40c9f..6239755 100644
--- a/ext.nuke.confirm.js
+++ b/ext.nuke.confirm.js
@@ -6,7 +6,7 @@
$( 'form[name="nukelist"]' ).on( 'submit', function () {
var pages = $( this ).find( 
'input[name="pages[]"][type="checkbox"]:checked' );
if ( pages.length ) {
-   return confirm( mw.msg( 'nuke-confirm', 
pages.length ).text() );
+   return confirm( mw.msg( 'nuke-confirm', 
pages.length ) );
}
} );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib8aa253cb1f994c7abf8939c649a488411455e2f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Kreuz (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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


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

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405578 )

Change subject: Convert HelpPages to use extension registration
..


Convert HelpPages to use extension registration

Bug: T185407
Change-Id: I32eb35853001c8f24f4025fa20bb00c2d25200f7
---
M HelpPages.php
A extension.json
2 files changed, 52 insertions(+), 37 deletions(-)

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



diff --git a/HelpPages.php b/HelpPages.php
index 2c69e5b..302ca12 100644
--- a/HelpPages.php
+++ b/HelpPages.php
@@ -12,40 +12,16 @@
  * @license Public domain
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   exit;
-}
-
-/**
- * How long to cache the rendered HTML for
- *
- * default is one week
- */
-$wgHelpPagesExpiry = 60 * 60 * 24 * 7;
-
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'HelpPages',
-   'author' => 'Kunal Mehta',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:HelpPages',
-   'descriptionmsg' => 'helppages-desc',
-   'version' => '0.3.0',
-);
-
-$dir = dirname(__FILE__);
-
-$wgAutoloadClasses['HelpPages'] = $dir . '/HelpPages.body.php';
-$wgAutoloadClasses['HelpPagesHooks'] = $dir . '/HelpPages.hooks.php';
-
-$wgMessagesDirs['HelpPages'] = __DIR__ . '/i18n';
-
-$wgHooks['ShowMissingArticle'][] = 'HelpPagesHooks::onShowMissingArticle';
-$wgHooks['SkinTemplateNavigation::Universal'][] = 
'HelpPagesHooks::onSkinTemplateNavigationUniversal';
-$wgHooks['ArticlePurge'][] = 'HelpPagesHooks::onArticlePurge';
-$wgHooks['LinkBegin'][] = 'HelpPagesHooks::onLinkBegin';
-
-$wgResourceModules['ext.HelpPages'] = array(
-   'styles' => 'ext.HelpPages.css',
-   'localBasePath' => $dir,
-   'remoteExtPath' => 'HelpPages',
-);
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'HelpPages' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['HelpPages'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the HelpPages extension. ' 
.
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the HelpPages extension requires MediaWiki 1.29+' 
);
+}
\ No newline at end of file
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..d0c6990
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,39 @@
+{
+   "name": "HelpPages",
+   "version": "0.4.0",
+   "author": "Kunal Mehta",
+   "url": "https://www.mediawiki.org/wiki/Extension:HelpPages;,
+   "descriptionmsg": "helppages-desc",
+   "license-name": "Unlicense",
+   "type": "other",
+   "MessagesDirs": {
+   "HelpPages": [
+   "i18n"
+   ]
+   },
+   "AutoloadClasses": {
+   "HelpPages": "HelpPages.body.php",
+   "HelpPagesHooks": "HelpPages.hooks.php"
+   },
+   "ResourceModules": {
+   "ext.HelpPages": {
+   "styles": "ext.HelpPages.css"
+   }
+   },
+   "ResourceFileModulePaths": {
+   "localBasePath": "",
+   "remoteExtPath": "HelpPages"
+   },
+   "Hooks": {
+   "ShowMissingArticle": "HelpPagesHooks::onShowMissingArticle",
+   "SkinTemplateNavigation::Universal": 
"HelpPagesHooks::onSkinTemplateNavigationUniversal",
+   "ArticlePurge": "HelpPagesHooks::onArticlePurge",
+   "LinkBegin": "HelpPagesHooks::onLinkBegin"
+   },
+   "config": {
+   "HelpPagesExpiry": {
+   "value": 604800
+   }
+   },
+   "manifest_version": 2
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32eb35853001c8f24f4025fa20bb00c2d25200f7
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/HelpPages
Gerrit-Branch: master
Gerrit-Owner: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jayprakash12345 <0freerunn...@gmail.com>
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Johnduhart 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mainframe98 
Gerrit-Reviewer: MarcoAurelio 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SendGrid[master]: Updating minus-x to 0.3.0 on SendGrid extension.

2018-01-21 Thread Rosalieper (Code Review)
Rosalieper has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405598 )

Change subject: Updating minus-x to 0.3.0 on SendGrid extension.
..

Updating minus-x to 0.3.0 on SendGrid extension.

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


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

diff --git a/composer.json b/composer.json
index 149ad7f..21ba757 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/mediawiki-codesniffer": "15.0.0",
-   "mediawiki/minus-x": "0.2.1"
+   "mediawiki/minus-x": "0.3.0"
},
"scripts": {
"test": [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use ES5 String.prototype.trim() instead of jQuery.trim()

2018-01-21 Thread Fomafix (Code Review)
Fomafix has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405599 )

Change subject: Use ES5 String.prototype.trim() instead of jQuery.trim()
..

Use ES5 String.prototype.trim() instead of jQuery.trim()

Replace:
* $.trim( str ) by str.trim()

Ensure that str is a string before calling str.trim().

Change-Id: I48f08fdac1e7d802813563c4691e9bbaf2c78336
---
M resources/src/jquery/jquery.colorUtil.js
M resources/src/jquery/jquery.tablesorter.js
M resources/src/mediawiki.special/mediawiki.special.block.js
M resources/src/mediawiki.special/mediawiki.special.changecredentials.js
M resources/src/mediawiki.special/mediawiki.special.userlogin.signup.js
M resources/src/mediawiki.widgets/mw.widgets.CategoryMultiselectWidget.js
M resources/src/mediawiki/htmlform/multiselect.js
M resources/src/mediawiki/mediawiki.Title.js
M resources/src/mediawiki/mediawiki.jqueryMsg.js
M resources/src/mediawiki/mediawiki.template.js
10 files changed, 19 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/405599/1

diff --git a/resources/src/jquery/jquery.colorUtil.js 
b/resources/src/jquery/jquery.colorUtil.js
index a5b136d..d46d009 100644
--- a/resources/src/jquery/jquery.colorUtil.js
+++ b/resources/src/jquery/jquery.colorUtil.js
@@ -29,6 +29,9 @@
if ( color && Array.isArray( color ) && color.length 
=== 3 ) {
return color;
}
+   if ( typeof color !== 'string' ) {
+   return undefined;
+   }
 
// Look for rgb(num,num,num)
// eslint-disable-next-line no-cond-assign
@@ -77,7 +80,7 @@
}
 
// Otherwise, we're most likely dealing with a named 
color
-   return $.colorUtil.colors[ $.trim( color 
).toLowerCase() ];
+   return $.colorUtil.colors[ color.trim().toLowerCase() ];
},
 
/**
diff --git a/resources/src/jquery/jquery.tablesorter.js 
b/resources/src/jquery/jquery.tablesorter.js
index 6d67ade..5ca866e 100644
--- a/resources/src/jquery/jquery.tablesorter.js
+++ b/resources/src/jquery/jquery.tablesorter.js
@@ -105,7 +105,7 @@
if ( rowIndex !== lastRowIndex ) {
lastRowIndex = rowIndex;
cellIndex = $( rows[ rowIndex ] ).data( 
'columnToCell' )[ column ];
-   nodeValue = $.trim( getElementSortKey( 
rows[ rowIndex ].cells[ cellIndex ] ) );
+   nodeValue = getElementSortKey( rows[ 
rowIndex ].cells[ cellIndex ] ).trim();
}
} else {
nodeValue = '';
@@ -1090,7 +1090,7 @@
},
format: function ( s ) {
var tsc;
-   s = $.trim( s.toLowerCase() );
+   s = s.toLowerCase().trim();
if ( ts.collationRegex ) {
tsc = ts.collationTable;
s = s.replace( ts.collationRegex, function ( 
match ) {
@@ -1144,7 +1144,7 @@
return ts.rgx.url[ 0 ].test( s );
},
format: function ( s ) {
-   return $.trim( s.replace( ts.rgx.url[ 1 ], '' ) );
+   return s.replace( ts.rgx.url[ 1 ], '' ).trim();
},
type: 'text'
} );
@@ -1207,7 +1207,7 @@
},
format: function ( s ) {
var match, y;
-   s = $.trim( s.toLowerCase() );
+   s = s.toLowerCase().trim();
 
if ( ( match = s.match( ts.dateRegex[ 0 ] ) ) !== null 
) {
if ( mw.config.get( 'wgDefaultDateFormat' ) === 
'mdy' || mw.config.get( 'wgPageContentLanguage' ) === 'en' ) {
@@ -1266,7 +1266,7 @@
ts.addParser( {
id: 'number',
is: function ( s ) {
-   return $.tablesorter.numberRegex.test( $.trim( s ) );
+   return $.tablesorter.numberRegex.test( s.trim() );
},
format: function ( s ) {
return $.tablesorter.formatDigit( s );
diff --git a/resources/src/mediawiki.special/mediawiki.special.block.js 
b/resources/src/mediawiki.special/mediawiki.special.block.js
index 49e471e..ba93195 100644
--- a/resources/src/mediawiki.special/mediawiki.special.block.js
+++ b/resources/src/mediawiki.special/mediawiki.special.block.js
@@ -23,7 +23,7 @@
expiryWidget = infuseOrNull( 'mw-input-wpExpiry' );
 

[MediaWiki-commits] [Gerrit] mediawiki...SendGrid[master]: Updating minus-x to 0.3.0 on SendGrid extension.

2018-01-21 Thread D3r1ck01 (Code Review)
D3r1ck01 has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405598 )

Change subject: Updating minus-x to 0.3.0 on SendGrid extension.
..


Updating minus-x to 0.3.0 on SendGrid extension.

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

Approvals:
  Zppix: Looks good to me, but someone else must approve
  D3r1ck01: Verified; Looks good to me, approved



diff --git a/composer.json b/composer.json
index 149ad7f..21ba757 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,7 @@
"jakub-onderka/php-parallel-lint": "0.9.2",
"jakub-onderka/php-console-highlighter": "0.3.2",
"mediawiki/mediawiki-codesniffer": "15.0.0",
-   "mediawiki/minus-x": "0.2.1"
+   "mediawiki/minus-x": "0.3.0"
},
"scripts": {
"test": [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I961ed4756e471d874f9078cd019b68368ac84240
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SendGrid
Gerrit-Branch: master
Gerrit-Owner: Rosalieper 
Gerrit-Reviewer: D3r1ck01 
Gerrit-Reviewer: Umherirrender 
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] operations/puppet[production]: role::client::labs: remove hiera defaults that rely on ::glo...

2018-01-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405671 )

Change subject: role::client::labs: remove hiera defaults that rely on ::global 
vars
..

role::client::labs: remove hiera defaults that rely on ::global vars

I don't think these can be getting set anyplace, so make the default
[] which is the behavior we're getting from unset globals anyway.

Change-Id: I435effd2604ace9f6180975fe0de754af6c086ca
---
M modules/ldap/manifests/role/client/labs.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/405671/1

diff --git a/modules/ldap/manifests/role/client/labs.pp 
b/modules/ldap/manifests/role/client/labs.pp
index 664bcdc..77a387c 100644
--- a/modules/ldap/manifests/role/client/labs.pp
+++ b/modules/ldap/manifests/role/client/labs.pp
@@ -1,7 +1,7 @@
 class ldap::role::client::labs(
 $ldapincludes=['openldap', 'utils'],
-$restricted_to = $::restricted_to,
-$restricted_from = $::restricted_from,
+$restricted_to = [],
+$restricted_from = [],
 ) {
 include ::ldap::role::config::labs
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Thanks[master]: Fix member variable visbility and doc

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405254 )

Change subject: Fix member variable visbility and doc
..


Fix member variable visbility and doc

Change-Id: I22d16b05d24c615f0c792063e33433d50a34ad8a
---
M .phpcs.xml
M tests/phpunit/ApiFlowThankIntegrationTest.php
2 files changed, 15 insertions(+), 9 deletions(-)

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



diff --git a/.phpcs.xml b/.phpcs.xml
index f55eb30..3f9d0cb 100644
--- a/.phpcs.xml
+++ b/.phpcs.xml
@@ -6,7 +6,6 @@



-   

.

diff --git a/tests/phpunit/ApiFlowThankIntegrationTest.php 
b/tests/phpunit/ApiFlowThankIntegrationTest.php
index 8bfcfee..60a79af 100644
--- a/tests/phpunit/ApiFlowThankIntegrationTest.php
+++ b/tests/phpunit/ApiFlowThankIntegrationTest.php
@@ -18,14 +18,21 @@
  * @author Benjamin Chen
  */
 class ApiFlowThankTest extends ApiTestCase {
-   /**
-* @var PostRevision
-*/
-   public $topic,
-   $meUser,
-   $otherUser,
-   $postByOtherUser,
-   $postByMe;
+
+   /** @var PostRevision */
+   public $topic;
+
+   /** @var User */
+   public $meUser;
+
+   /** @var User */
+   public $otherUser;
+
+   /** @var PostRevision */
+   public $postByOtherUser;
+
+   /** @var PostRevision */
+   public $postByMe;
 
public function setUp() {
parent::setUp();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I22d16b05d24c615f0c792063e33433d50a34ad8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Thanks
Gerrit-Branch: master
Gerrit-Owner: Samwilson 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: mediawiki.api.category: Use formatversion=2 and simplify code

2018-01-21 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/405040 )

Change subject: mediawiki.api.category: Use formatversion=2 and simplify code
..


mediawiki.api.category: Use formatversion=2 and simplify code

Change-Id: Icc8a193d16cb375593196e9290968f6dac1bc021
---
M resources/src/mediawiki/api/category.js
1 file changed, 14 insertions(+), 29 deletions(-)

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



diff --git a/resources/src/mediawiki/api/category.js 
b/resources/src/mediawiki/api/category.js
index 14077e0..04462e3 100644
--- a/resources/src/mediawiki/api/category.js
+++ b/resources/src/mediawiki/api/category.js
@@ -14,21 +14,14 @@
 */
isCategory: function ( title ) {
var apiPromise = this.get( {
+   formatversion: 2,
prop: 'categoryinfo',
titles: String( title )
} );
 
return apiPromise
.then( function ( data ) {
-   var exists = false;
-   if ( data.query && data.query.pages ) {
-   $.each( data.query.pages, 
function ( id, page ) {
-   if ( page.categoryinfo 
) {
-   exists = true;
-   }
-   } );
-   }
-   return exists;
+   return !!data.query.pages[ 0 
].categoryinfo;
} )
.promise( { abort: apiPromise.abort } );
},
@@ -46,6 +39,7 @@
getCategoriesByPrefix: function ( prefix ) {
// Fetch with allpages to only get categories that have 
a corresponding description page.
var apiPromise = this.get( {
+   formatversion: 2,
list: 'allpages',
apprefix: prefix,
apnamespace: mw.config.get( 'wgNamespaceIds' 
).category
@@ -53,13 +47,9 @@
 
return apiPromise
.then( function ( data ) {
-   var texts = [];
-   if ( data.query && data.query.allpages 
) {
-   $.each( data.query.allpages, 
function ( i, category ) {
-   texts.push( new 
mw.Title( category.title ).getMainText() );
-   } );
-   }
-   return texts;
+   return data.query.allpages.map( 
function ( category ) {
+   return new mw.Title( 
category.title ).getMainText();
+   } );
} )
.promise( { abort: apiPromise.abort } );
},
@@ -75,26 +65,21 @@
 */
getCategories: function ( title ) {
var apiPromise = this.get( {
+   formatversion: 2,
prop: 'categories',
titles: String( title )
} );
 
return apiPromise
.then( function ( data ) {
-   var titles = false;
-   if ( data.query && data.query.pages ) {
-   $.each( data.query.pages, 
function ( id, page ) {
-   if ( page.categories ) {
-   if ( titles === 
false ) {
-   titles 
= [];
-   }
-   $.each( 
page.categories, function ( i, cat ) {
-   
titles.push( new mw.Title( cat.title ) );
-   } );
-   }
-   } );
+   var page = data.query.pages[ 0 ];
+
+ 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: mariadb: Move db1063 to s6

2018-01-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405673 )

Change subject: mariadb: Move db1063 to s6
..

mariadb: Move db1063 to s6

db1063 will be replacing db1030 as vslow in s6.
Also removing db1113 and db1114 from the installation as they are now as
spares

Bug: T184397
Change-Id: Ic8a385b51d154e5824155e0319d24c01a62d3597
---
M hieradata/hosts/db1063.yaml
M manifests/site.pp
M modules/install_server/files/autoinstall/netboot.cfg
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
M modules/role/files/prometheus/mysql-core_eqiad.yaml
5 files changed, 5 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/405673/1

diff --git a/hieradata/hosts/db1063.yaml b/hieradata/hosts/db1063.yaml
index 8b1f532..ca2abb9 100644
--- a/hieradata/hosts/db1063.yaml
+++ b/hieradata/hosts/db1063.yaml
@@ -1,2 +1,2 @@
-mariadb::shard: 's8'
+mariadb::shard: 's6'
 profile::base::notifications_enabled: '0'
diff --git a/manifests/site.pp b/manifests/site.pp
index af5c111..2205aa3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -397,7 +397,7 @@
 }
 
 # See also db1096 and db1098 below
-node /^db10(30|85|88|93)\.eqiad\.wmnet/ {
+node /^db10(30|63|85|88|93)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
@@ -449,7 +449,7 @@
 }
 
 # See also db1099 and db1101 below
-node /^db1(063|104|092|087|109)\.eqiad\.wmnet/ {
+node /^db1(104|092|087|109)\.eqiad\.wmnet/ {
 role(mariadb::core)
 }
 
diff --git a/modules/install_server/files/autoinstall/netboot.cfg 
b/modules/install_server/files/autoinstall/netboot.cfg
index d00ac95..dde5343 100755
--- a/modules/install_server/files/autoinstall/netboot.cfg
+++ b/modules/install_server/files/autoinstall/netboot.cfg
@@ -66,7 +66,7 @@
 conf200[123]) echo partman/raid1-lvm-ext4-srv.cfg ;; \
 cp1008|cp300[3-9]|cp3010) echo partman/varnish-oldssd.cfg ;; \
 cp[12345][0-9][0-9][0-9]) echo partman/varnish.cfg ;; \
-db111[3-4]) echo partman/db.cfg ;; \
+db1063 echo partman/db.cfg ;; \
 db2036|db2034|db2078|db2090|db2092) echo partman/db.cfg ;; \
 db[12][01][0-9][0-9]|dbstore[12]00[1-9]|es[12]01[1-9]) echo 
partman/db-no-srv-format.cfg ;; \
 deploy[12]001|flerovium|furud) echo 
partman/raid1-lvm-ext4-srv-noswap.cfg;; \
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 8d275ba..e31150b 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -1368,8 +1368,6 @@
 host db1063 {
 hardware ethernet C8:1F:66:B8:1A:40;
 fixed-address db1063.eqiad.wmnet;
-option pxelinux.pathprefix 
"http://apt.wikimedia.org/tftpboot/jessie-installer/;;
-filename "lpxelinux.0";
 }
 
 host db1064 {
diff --git a/modules/role/files/prometheus/mysql-core_eqiad.yaml 
b/modules/role/files/prometheus/mysql-core_eqiad.yaml
index 1bebb01..1676549 100644
--- a/modules/role/files/prometheus/mysql-core_eqiad.yaml
+++ b/modules/role/files/prometheus/mysql-core_eqiad.yaml
@@ -85,6 +85,7 @@
 role: slave
   targets:
   - db1030:9104
+  - db1063:9104
   - db1085:9104
   - db1088:9104
   - db1093:9104
@@ -116,7 +117,6 @@
 shard: s8
 role: slave
   targets:
-  - db1063:9104
   - db1087:9104
   - db1092:9104
   - db1099:13318

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

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

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


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

2018-01-21 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405674 )

Change subject: db-eqiad.php: Depool db1089 and db1067
..

db-eqiad.php: Depool db1089 and db1067

Checksumming and fixing data drifts

Bug: T162807
Change-Id: Iba94b973f40eb355a7af22fcb4e1c240b22ee9e6
---
M wmf-config/db-eqiad.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index fabebe4..678a214 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -104,13 +104,13 @@
 'sectionLoads' => [
's1' => [
'db1052' => 0,   # B3 2.8TB  96GB, master
-   'db1067' => 0,  # D1 2.8TB 160GB, old master
+   # 'db1067' => 0,  # D1 2.8TB 160GB, old master # T162807
'db1065' => 0,   # D1 2.8TB 160GB, vslow, dump, master for 
sanitarium
'db1066' => 50,  # D1 2.8TB 160GB, api
'db1073' => 50,  # B3 2.8TB 160GB, api
'db1080' => 300, # A2 3.6TB 512GB, api
'db1083' => 500, # B1 3.6TB 512GB
-   'db1089' => 500, # C3 3.6TB 512GB
+   # 'db1089' => 500, # C3 3.6TB 512GB # T162807
'db1099:3311' => 1,   # B2 3.6TB 512GB # rc, log: s1 and s8
'db1105:3311' => 1,   # C3 3.6TB 512GB # rc, log: s1 and s2
],

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [doc] Remove autosummary and numpydoc

2018-01-21 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405595 )

Change subject: [doc] Remove autosummary and numpydoc
..

[doc] Remove autosummary and numpydoc

- autosummary isn't used
- numpydoc gives a lot of warnings
- some doc changes could be done by a sphinx hook

Change-Id: Iec1c0c90d279c774164390f60d720705a7e5ee70
---
M docs/conf.py
M docs/requirements-py3.txt
2 files changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/95/405595/1

diff --git a/docs/conf.py b/docs/conf.py
index 83c04f8..bd9a9bf 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -37,8 +37,7 @@
   'sphinx.ext.todo',
   'sphinx.ext.coverage',
   'sphinx.ext.viewcode',
-  'sphinx.ext.autosummary',
-  'numpydoc']
+]
 
 # Add any paths that contain templates here, relative to this directory.
 templates_path = ['_templates']
diff --git a/docs/requirements-py3.txt b/docs/requirements-py3.txt
index 6ff7fe5..1414a60 100644
--- a/docs/requirements-py3.txt
+++ b/docs/requirements-py3.txt
@@ -4,5 +4,5 @@
 
 sphinx
 sphinx-epytext>=0.0.4
-numpydoc
+
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec1c0c90d279c774164390f60d720705a7e5ee70
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...WikimediaMaintenance[master]: Remove 'moodbar' from the createExtensionTables.php

2018-01-21 Thread MarcoAurelio (Code Review)
MarcoAurelio has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405596 )

Change subject: Remove 'moodbar' from the createExtensionTables.php
..

Remove 'moodbar' from the createExtensionTables.php

The extension was dropped from WMF wikis some time ago already and has also 
been archived so there's no need for this here anymore.

Change-Id: I47ca70c4663a20a91af2b183fbf11aa16c3e5fe6
---
0 files changed, 0 insertions(+), 0 deletions(-)


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47ca70c4663a20a91af2b183fbf11aa16c3e5fe6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: MarcoAurelio 

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


[MediaWiki-commits] [Gerrit] mediawiki...BibManager[master]: Convert BibManager to use extension registation

2018-01-21 Thread Jayprakash12345 (Code Review)
Jayprakash12345 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/405597 )

Change subject: Convert BibManager to use extension registation
..

Convert BibManager to use extension registation

Bug: T185424
Change-Id: I7cba88922da1b472ca4874eb356c9ff8a7fb1028
---
M BibManager.php
A extension.json
2 files changed, 124 insertions(+), 111 deletions(-)


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

diff --git a/BibManager.php b/BibManager.php
index 1dcc529..247b945 100644
--- a/BibManager.php
+++ b/BibManager.php
@@ -18,115 +18,16 @@
   http://www.gnu.org/copyleft/gpl.html
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   echo 'To install BibManager, put the following line in 
LocalSettings.php: '
-   .'include_once( "$IP/extensions/BibManager/BibManager.php" );' . "\n";
-   exit( 1 );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'BibManager' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['BibManager'] = __DIR__ . '/i18n';
+   wfWarn(
+   'Deprecated PHP entry point used for the BibManager extension. 
' .
+   'Please use wfLoadExtension instead, ' .
+   'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
+   );
+   return;
+} else {
+   die( 'This version of the BibManager extension requires MediaWiki 
1.29+' );
 }
-
-$wgExtensionCredits['specialpage'][] = array (
-   'path'   => __FILE__,
-   'name'   => 'BibManager',
-   'author' => array (
-   'Hornemann Institut', 'Hallo Welt! Medienwerkstatt GmbH',
-   'Tobias Weichart', 'Robert Vogel'
-   ),
-   'url'=> 
'http://www.mediawiki.org/wiki/Extension:BibManager',
-   'version'=> '1.23.0',
-   'descriptionmsg' => 'bibmanager-desc',
-);
-
-//Register classes
-$wgAutoloadClasses['Structures_BibTex'] = __DIR__ . 
'/includes/libs/Structures_BibTex/BibTex.php'; //External library for parsing
-
-$wgAutoloadClasses['BibManagerHooks']   = __DIR__ . 
'/includes/BibManagerHooks.php';
-$wgAutoloadClasses['BibManagerFieldsList']  = __DIR__ . 
'/includes/BibManagerFieldsList.php';
-$wgAutoloadClasses['BibManagerLocalMWDatabaseRepo'] = __DIR__ . 
'/includes/BibManagerLocalMWDatabaseRepo.php';
-$wgAutoloadClasses['BibManagerPagerList']   = __DIR__ . 
'/includes/BibManagerPagerList.php';
-$wgAutoloadClasses['BibManagerPagerListAuthors']= __DIR__ . 
'/includes/BibManagerPagerListAuthors.php';
-$wgAutoloadClasses['BibManagerRepository']  = __DIR__ . 
'/includes/BibManagerRepository.php';
-$wgAutoloadClasses['BibManagerValidator']   = __DIR__ . 
'/includes/BibManagerValidator.php';
-$wgAutoloadClasses['BibManagerLocalMWDatabaseRepo'] = __DIR__ . 
'/includes/BibManagerLocalMWDatabaseRepo.php';
-$wgAutoloadClasses['BibManagerRepository']  = __DIR__ . 
'/includes/BibManagerRepository.php';
-
-//SpecialPages
-$wgAutoloadClasses['SpecialBibManagerList']= __DIR__ . 
'/includes/specials/SpecialBibManagerList.php';
-$wgAutoloadClasses['SpecialBibManagerListAuthors'] = __DIR__ . 
'/includes/specials/SpecialBibManagerListAuthors.php';
-$wgAutoloadClasses['SpecialBibManagerImport']  = __DIR__ . 
'/includes/specials/SpecialBibManagerImport.php';
-$wgAutoloadClasses['SpecialBibManagerExport']  = __DIR__ . 
'/includes/specials/SpecialBibManagerExport.php';
-$wgAutoloadClasses['SpecialBibManagerCreate']  = __DIR__ . 
'/includes/specials/SpecialBibManagerCreate.php';
-$wgAutoloadClasses['SpecialBibManagerDelete']  = __DIR__ . 
'/includes/specials/SpecialBibManagerDelete.php';
-$wgAutoloadClasses['SpecialBibManagerEdit']= __DIR__ . 
'/includes/specials/SpecialBibManagerEdit.php';
-
-//Add I18N
-$wgMessagesDirs['BibManager'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['BibManagerAlias']  = __DIR__ . 
'/BibManager.alias.php';
-
-//Add SpecialPages
-$wgSpecialPages['BibManagerList']= 'SpecialBibManagerList';
-$wgSpecialPages['BibManagerListAuthors'] = 'SpecialBibManagerListAuthors';
-$wgSpecialPages['BibManagerImport']  = 'SpecialBibManagerImport';
-$wgSpecialPages['BibManagerExport']  = 'SpecialBibManagerExport';
-$wgSpecialPages['BibManagerDelete']  = 'SpecialBibManagerDelete';
-$wgSpecialPages['BibManagerCreate']  = 'SpecialBibManagerCreate';
-$wgSpecialPages['BibManagerEdit']= 'SpecialBibManagerEdit';
-
-//Add Hookhandler
-$wgHooks['ParserFirstCallInit'][] = 'BibManagerHooks::onParserFirstCallInit';
-$wgHooks['BeforePageDisplay'][]   = 'BibManagerHooks::onBeforePageDisplay';
-//$wgHooks['SkinAfterContent'][]= 'BibManagerHooks::onSkinAfterContent';
-$wgHooks['LoadExtensionSchemaUpdates'][] = 
'BibManagerHooks::onLoadExtensionSchemaUpdates';
-
-$resourceModuleTemplate = 

  1   2   >