[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Fix mistake in ObjectCache doc

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

Change subject: Fix mistake in ObjectCache doc
..


Fix mistake in ObjectCache doc

Change-Id: Iafe3c460ca462aa160cfea6769fd78f8b023548c
---
M includes/objectcache/ObjectCache.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/objectcache/ObjectCache.php 
b/includes/objectcache/ObjectCache.php
index 0a4f0ed..cf9033b 100644
--- a/includes/objectcache/ObjectCache.php
+++ b/includes/objectcache/ObjectCache.php
@@ -359,7 +359,7 @@
 *
 * @since 1.26
 * @return WANObjectCache
-* @deprecated Since 1.28 Use MediaWikiServices::getMainWANCache()
+* @deprecated Since 1.28 Use MediaWikiServices::getMainWANObjectCache()
 */
public static function getMainWANInstance() {
return 
MediaWikiServices::getInstance()->getMainWANObjectCache();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iafe3c460ca462aa160cfea6769fd78f8b023548c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Fomafix 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
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] oojs/ui[master]: NumberInputWidget: Set input to 100% height

2017-03-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342323 )

Change subject: NumberInputWidget: Set input to 100% height
..

NumberInputWidget: Set input to 100% height

Make input of NumberInputWidget consistently take 100% of available
height. MediaWiki theme is affected by that error, but it is useful
to have the same behaviour in the widget specific rules due it being
`display: table-cell` theme-independently.

Bug: T102127
Change-Id: I89224535467493f876bedc20737758fe26642d80
---
M src/styles/widgets/NumberInputWidget.less
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/23/342323/1

diff --git a/src/styles/widgets/NumberInputWidget.less 
b/src/styles/widgets/NumberInputWidget.less
index ad86406..428d891 100644
--- a/src/styles/widgets/NumberInputWidget.less
+++ b/src/styles/widgets/NumberInputWidget.less
@@ -8,6 +8,11 @@
.oo-ui-buttonWidget,
.oo-ui-textInputWidget {
display: table-cell;
+   height: 100%;
+   }
+
+   .oo-ui-textInputWidget input {
+   height: 100%;
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I89224535467493f876bedc20737758fe26642d80
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: ProgressBarWidget: Use scaleX instead of width

2017-03-11 Thread Prtksxna (Code Review)
Prtksxna has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342322 )

Change subject: ProgressBarWidget: Use scaleX instead of width
..

ProgressBarWidget: Use scaleX instead of width

Change-Id: I9850623a958102620e0035d5b91c65b72e668c7f
---
M src/themes/mediawiki/widgets.less
M src/widgets/ProgressBarWidget.js
2 files changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/22/342322/1

diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 8872c16..ba98f78 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -1767,7 +1767,9 @@
 
&-bar {
height: 1em;
-   .oo-ui-transition( width 200ms );
+   width: 1%;
+   transform-origin: left;
+   .oo-ui-transition( transform 200ms );
}
&-indeterminate {
.oo-ui-progressBarWidget-bar {
diff --git a/src/widgets/ProgressBarWidget.js b/src/widgets/ProgressBarWidget.js
index c0b0dc3..34e1f5e 100644
--- a/src/widgets/ProgressBarWidget.js
+++ b/src/widgets/ProgressBarWidget.js
@@ -90,7 +90,7 @@
this.progress = progress;
 
if ( progress !== false ) {
-   this.$bar.css( 'width', this.progress + '%' );
+   this.$bar.css( 'transform', 'scaleX(' + this.progress + ')' );
this.$element.attr( 'aria-valuenow', this.progress );
} else {
this.$bar.css( 'width', '' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9850623a958102620e0035d5b91c65b72e668c7f
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Add ButtonGroupWidget (icon and text) demo

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

Change subject: demos: Add ButtonGroupWidget (icon and text) demo
..


demos: Add ButtonGroupWidget (icon and text) demo

Adding demo as preparation on further work for T113495 and
T122503.

Change-Id: Ic2935cb5d9191dda60992697c75bd7f968364b57
---
M demos/pages/widgets.js
1 file changed, 19 insertions(+), 1 deletion(-)

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



diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 5e962ca..d859bbf 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -364,7 +364,25 @@
]
} ),
{
-   label: 'ButtonGroupWidget 
(feat. destructive and progressive ButtonWidget)',
+   label: 'ButtonGroupWidget 
(destructive and progressive ButtonWidget)',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonGroupWidget( {
+   items: [
+   new OO.ui.ButtonWidget( 
{
+   icon: 'tag',
+   flags: [ 
'destructive' ]
+   } ),
+   new OO.ui.ButtonWidget( 
{
+   label: 'Two',
+   flags: [ 
'progressive' ]
+   } )
+   ]
+   } ),
+   {
+   label: 'ButtonGroupWidget 
(destructive icon and progressive text)\u200E',
align: 'top'
}
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic2935cb5d9191dda60992697c75bd7f968364b57
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Add ButtonGroupWidget (icon and text) demo

2017-03-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342321 )

Change subject: demos: Add ButtonGroupWidget (icon and text) demo
..

demos: Add ButtonGroupWidget (icon and text) demo

Adding demo as preparation on further work for T113495 and
T122503.

Change-Id: Ic2935cb5d9191dda60992697c75bd7f968364b57
---
M demos/pages/widgets.js
1 file changed, 19 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/21/342321/1

diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index 5e962ca..d859bbf 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -364,7 +364,25 @@
]
} ),
{
-   label: 'ButtonGroupWidget 
(feat. destructive and progressive ButtonWidget)',
+   label: 'ButtonGroupWidget 
(destructive and progressive ButtonWidget)',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.ButtonGroupWidget( {
+   items: [
+   new OO.ui.ButtonWidget( 
{
+   icon: 'tag',
+   flags: [ 
'destructive' ]
+   } ),
+   new OO.ui.ButtonWidget( 
{
+   label: 'Two',
+   flags: [ 
'progressive' ]
+   } )
+   ]
+   } ),
+   {
+   label: 'ButtonGroupWidget 
(destructive icon and progressive text)\u200E',
align: 'top'
}
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic2935cb5d9191dda60992697c75bd7f968364b57
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: VolkerE 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlogPage[master]: Migrate inline JS to appropriate script files

2017-03-11 Thread SamanthaNguyen (Code Review)
SamanthaNguyen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342320 )

Change subject: Migrate inline JS to appropriate script files
..

Migrate inline JS to appropriate script files

Bug: T157246
Change-Id: Ic72e3f4cd4ed56f5f89b27f5062854bf15d21dee
---
M BlogPageClass.php
M extension.json
M resources/js/ext.blogpage.createblogpost.js
A resources/js/ext.blogpage.view.js
4 files changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlogPage 
refs/changes/20/342320/1

diff --git a/BlogPageClass.php b/BlogPageClass.php
index d300777..f4340a0 100644
--- a/BlogPageClass.php
+++ b/BlogPageClass.php
@@ -701,7 +701,7 @@
$output .= '' .
wfMessage( 'blog-embed-title' )->escaped() . '';
$output .= '';
-   $output .= "  ' . "' 
/>";
diff --git a/extension.json b/extension.json
index b383a5b..8fd815f 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "BlogPage",
-   "version": "2.4.6",
+   "version": "2.4.7",
"author": [
"David Pean",
"Jack Phoenix"
@@ -114,6 +114,9 @@
"blog-js-create-error-need-title",
"blog-js-create-error-page-exists"
]
+   },
+   "ext.blogPage.view.js": {
+   "scripts": "resources/js/ext.blogpage.view.js"
}
},
"ResourceFileModulePaths": {
diff --git a/resources/js/ext.blogpage.createblogpost.js 
b/resources/js/ext.blogpage.createblogpost.js
index 5c9fccf..1ee967e 100644
--- a/resources/js/ext.blogpage.createblogpost.js
+++ b/resources/js/ext.blogpage.createblogpost.js
@@ -70,5 +70,9 @@
$( 'input[name="wpSave"]' ).click( function() {
CreateBlogPost.performChecks();
} );
+
+   $( '.blog-widget-embed input' ).click( function() {
+   this.select();
+   } );
 } );
 }( mediaWiki, jQuery ) );
diff --git a/resources/js/ext.blogpage.view.js 
b/resources/js/ext.blogpage.view.js
new file mode 100644
index 000..20faaa8
--- /dev/null
+++ b/resources/js/ext.blogpage.view.js
@@ -0,0 +1,7 @@
+( function ( mw, $ ) {
+   $( function() {
+   $( '.blog-widget-embed input' ).click( function() {
+   this.select();
+   } );
+   } );
+}( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic72e3f4cd4ed56f5f89b27f5062854bf15d21dee
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlogPage
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] pywikibot/core[master]: for w in warning_log: unittest_print(w)

2017-03-11 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342318 )

Change subject: for w in warning_log: unittest_print(w)
..

for w in warning_log: unittest_print(w)

Change-Id: I9fb8a645cdf1e300c6a7cb3f53cff58a9fb946a2
---
M tests/http_tests.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/18/342318/1

diff --git a/tests/http_tests.py b/tests/http_tests.py
index c1ce2f0..b731326 100644
--- a/tests/http_tests.py
+++ b/tests/http_tests.py
@@ -159,6 +159,9 @@
 http.session.close()  # clear the connection
 
 # Verify that the warning occurred
+from tests import unittest_print
+for w in warning_log:
+unittest_print('--', w)
 self.assertEqual(len(warning_log), 1)
 self.assertEqual(warning_log[0].category.__name__,
  'InsecureRequestWarning')

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: site_detect_tests.py: Skip tests on ServerError and Timeout

2017-03-11 Thread Dalba (Code Review)
Dalba has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342319 )

Change subject: site_detect_tests.py: Skip tests on ServerError and Timeout
..

site_detect_tests.py: Skip tests on ServerError and Timeout

These two error types used to be skipped before 917c7e115e9a8749386ad.
This change brings back that behaviour and removes _retry_few_times
logic which seems unnecessary. We have 13 builds which run these tests
which can be considered some form of _retry_few_times.

Bug: T160268
Change-Id: Ifb3592d565013b9998265993ebe3ae92f0cd78fe
---
M tests/site_detect_tests.py
1 file changed, 2 insertions(+), 32 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/19/342319/1

diff --git a/tests/site_detect_tests.py b/tests/site_detect_tests.py
index c808b0a..15616ea 100644
--- a/tests/site_detect_tests.py
+++ b/tests/site_detect_tests.py
@@ -19,34 +19,6 @@
 __version__ = '$Id$'
 
 
-def _retry_few_times(retry_limit):
-"""
-Decorator to retry test on failure.
-
-Swallow AssertionError retry_limit times before failing test.
-
-@param retry_limit: Retry limit before failing test
-@type retry_limit: int
-@return: a decorator to retry test on failure
-@rtype: function
-@raises AssertionError: all retries of test failed
-"""
-def actual_decorator(wrapped_func):
-def wrapper_func(*args, **kwargs):
-for retry_no in range(1, retry_limit + 1):
-try:
-wrapped_func(*args, **kwargs)
-except AssertionError:
-if retry_no == retry_limit:
-raise
-except:
-raise
-else:
-return
-return wrapper_func
-return actual_decorator
-
-
 class SiteDetectionTestCase(TestCase):
 
 """Testcase for MediaWiki detection and site object creation."""
@@ -63,9 +35,8 @@
 """
 try:
 self.assertIsInstance(MWSite(url), MWSite)
-except (AttributeError, ConnectionError, RuntimeError, ServerError,
-Timeout):
-raise AssertionError
+except (ServerError, Timeout) as e:
+self.skipTest(e)
 
 def assertNoSite(self, url):
 """
@@ -100,7 +71,6 @@
 """Test detection of MediaWiki sites for en.citizendium.org."""
 self.assertSite('http://en.citizendium.org/wiki/$1')
 
-@_retry_few_times(10)
 def test_wikichristian(self):
 """Test detection of MediaWiki sites for www.wikichristian.org.
 

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove 'invalid escape sequence' DeprecationWarning in py3

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

Change subject: Remove 'invalid escape sequence' DeprecationWarning in py3
..


Remove 'invalid escape sequence' DeprecationWarning in py3

Change-Id: I1720647aa27abb9880bb591431c0c74c6003
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/pywikibot/site.py b/pywikibot/site.py
index 28643e1..4758cec 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1402,8 +1402,8 @@
 All values of the siteinfo property 'general' are directly available.
 """
 
-WARNING_REGEX = re.compile('^Unrecognized values? for parameter '
-   '["\']siprop["\']: (.+?)\.?$')
+WARNING_REGEX = re.compile(r'^Unrecognized values? for parameter '
+   r'["\']siprop["\']: (.+?)\.?$')
 
 # Until we get formatversion=2, we have to convert empty-string properties
 # into booleans so they are easier to use.

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: [IMPROV] Don't use carriage returns

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

Change subject: [IMPROV] Don't use carriage returns
..


[IMPROV] Don't use carriage returns

Change-Id: I1b7013b8996a49bd8dc0348bcaed0ac2e22cce0c
---
M scripts/maintenance/wikimedia_sites.py
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/scripts/maintenance/wikimedia_sites.py 
b/scripts/maintenance/wikimedia_sites.py
index cca9164..7a6ea23 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -2,8 +2,8 @@
 # -*- coding: utf-8 -*-
 """Script that updates the language lists in Wikimedia family files."""
 #
-# (C) xqt, 2009-2016
-# (C) Pywikibot team, 2008-2016
+# (C) xqt, 2009-2017
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -71,16 +71,16 @@
 pywikibot.output(u'The lists match!')
 else:
 pywikibot.output(u"The lists don't match, the new list is:")
-text = u'self.languages_by_size = [\r\n'
+text = 'self.languages_by_size = [\n'
 line = ' ' * 11
 for code in new:
 if len(line) + len(code) <= 76:
 line += u" '%s'," % code
 else:
-text += u'%s\r\n' % line
+text += '%s\n' % line
 line = ' ' * 11
 line += u" '%s'," % code
-text += u'%s\r\n' % line
+text += '%s\n' % line
 text += u']'
 pywikibot.output(text)
 family_file_name = 'pywikibot/families/%s_family.py' % family

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b7013b8996a49bd8dc0348bcaed0ac2e22cce0c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Magul 
Gerrit-Reviewer: Mpaa 
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]: Title: Remove outdated comment in loadRestrictionsFromRows()

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

Change subject: Title: Remove outdated comment in loadRestrictionsFromRows()
..

Title: Remove outdated comment in loadRestrictionsFromRows()

It has been refactored, and decodeExpiry() is now a method of Database.

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


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

diff --git a/includes/Title.php b/includes/Title.php
index 3ed6b8b..a5bb9c6 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2943,8 +2943,6 @@
continue;
}
 
-   // This code should be refactored, now that 
it's being used more generally,
-   // But I don't really see any harm in leaving 
it in Block for now -werdna
$expiry = $dbr->decodeExpiry( $row->pr_expiry );
 
// Only apply the restrictions if they haven't 
expired!

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

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

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Remove 'invalid escape sequence' DeprecationWarning in py3

2017-03-11 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342316 )

Change subject: Remove 'invalid escape sequence' DeprecationWarning in py3
..

Remove 'invalid escape sequence' DeprecationWarning in py3

Change-Id: I1720647aa27abb9880bb591431c0c74c6003
---
M pywikibot/site.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/16/342316/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 28643e1..4758cec 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1402,8 +1402,8 @@
 All values of the siteinfo property 'general' are directly available.
 """
 
-WARNING_REGEX = re.compile('^Unrecognized values? for parameter '
-   '["\']siprop["\']: (.+?)\.?$')
+WARNING_REGEX = re.compile(r'^Unrecognized values? for parameter '
+   r'["\']siprop["\']: (.+?)\.?$')
 
 # Until we get formatversion=2, we have to convert empty-string properties
 # into booleans so they are easier to use.

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: ActionWidget/Set: Warn deprecation for methods using the 're...

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

Change subject: ActionWidget/Set: Warn deprecation for methods using the 
'resize' event
..


ActionWidget/Set: Warn deprecation for methods using the 'resize' event

Also, add a new 'resizePrivate' event for 'ActionSet'. This is in preparation
for Ie74c49ed9c3bfe23267aa24c21632f30311507c5.

Bug: T129162
Change-Id: Ia30bb093685aaa7f518d9f59a79e6a537fe896da
---
M src/ActionSet.js
M src/widgets/ActionWidget.js
2 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/src/ActionSet.js b/src/ActionSet.js
index 2ff98e5..78c0cef 100644
--- a/src/ActionSet.js
+++ b/src/ActionSet.js
@@ -376,9 +376,13 @@
action = actions[ i ];
action.connect( this, {
click: [ 'emit', 'click', action ],
-   resize: [ 'emit', 'resize', action ],
toggle: [ 'onActionChange' ]
} );
+   action.on( 'resizePrivate', function ( action ) {
+   if ( this.emit( 'resize', action ) ) {
+   OO.ui.warnDeprecation( 'ActionSet: resize event 
is deprecated. See T129162.' );
+   }
+   }, [ action ], this );
this.list.push( action );
}
this.organized = false;
diff --git a/src/widgets/ActionWidget.js b/src/widgets/ActionWidget.js
index 67f08a2..5a98fe5 100644
--- a/src/widgets/ActionWidget.js
+++ b/src/widgets/ActionWidget.js
@@ -104,7 +104,10 @@
if ( width !== this.width || height !== this.height ) {
this.width = width;
this.height = height;
-   this.emit( 'resize' );
+   this.emit( 'resizePrivate' );
+   if ( this.emit( 'resize' ) ) {
+   OO.ui.warnDeprecation( 'ActionWidget: resize 
event is deprecated. See T129162.' );
+   }
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia30bb093685aaa7f518d9f59a79e6a537fe896da
Gerrit-PatchSet: 5
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Prtksxna 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: jenkins-bot <>

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


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

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

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


Update VE core submodule to master (bc0001c53)

New changes:
a98515c7f Localisation updates from https://translatewiki.net.
788a1b4be FindAndReplace: Use Intl.Collator instead of localeCompare
a02ce2cd1 Use Intl.Collator for all searches if available
69328692d findText: Fix documentation and tests
833c29b67 PositionedTargetToolbar: Move code that assumes surface exists to 
after check
15de62106 Remove $returnFocusTo hack now null is supported upstream
a09efa1f8 Fix cursor style on language search widget
c60e7ba66 demo: Move qqx language option into the language selector

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

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



diff --git a/lib/ve b/lib/ve
index de2dd95..bc0001c 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit de2dd95c68315db434b62481cf749904934d27c1
+Subproject commit bc0001c53ed16e663adccc9991a1ed69ab3b6bb1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib292a25c79969a063a634837118e837e477f39ac
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: DLynch 
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] oojs/ui[master]: DropdownInputWidget: Tweak PHP widget's disabled styling

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

Change subject: DropdownInputWidget: Tweak PHP widget's disabled styling
..


DropdownInputWidget: Tweak PHP widget's disabled styling

* Only apply `cursor: pointer` when enabled.
* Use custom dropdown arrow also when disabled.

Change-Id: I3e0fbf8513b024e965443719bf1f7b557d6cb2c1
---
M src/styles/widgets/DropdownInputWidget.less
M src/themes/mediawiki/widgets.less
2 files changed, 18 insertions(+), 14 deletions(-)

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



diff --git a/src/styles/widgets/DropdownInputWidget.less 
b/src/styles/widgets/DropdownInputWidget.less
index 64eaf28..72037df 100644
--- a/src/styles/widgets/DropdownInputWidget.less
+++ b/src/styles/widgets/DropdownInputWidget.less
@@ -17,9 +17,12 @@
background-position: -em 0;
background-repeat: no-repeat;
width: 100%;
-   cursor: pointer;
.oo-ui-box-sizing( border-box );
}
 
+   &.oo-ui-widget-enabled select {
+   cursor: pointer;
+   }
+
.theme-oo-ui-dropdownInputWidget();
 }
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index ab14595..8872c16 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -558,6 +558,20 @@
font-size: inherit;
font-family: inherit;
vertical-align: middle;
+
+   // Support IE 10-11: Hide the default arrow
+   &::-ms-expand {
+   display: none;
+   }
+
+   // Add custom dropdown arrow
+   // Support: Everything besides IE 6-8
+   &:not( [no-ie] ) {
+   background-position: right 1.75em center;
+   width: e( 'calc( 100% + 1em )' );
+   height: @size-default;
+   padding: 0 0 0 1em;
+   }
}
 
option {
@@ -592,19 +606,6 @@
border-color: @border-color-default-focus;
outline: 0;
box-shadow: @box-shadow-widget-focus;
-   }
-
-   // Support IE 10-11: Hide the default arrow
-   &::-ms-expand {
-   display: none;
-   }
-
-   // Support: Everything besides IE 6-8
-   &:not( [no-ie] ) {
-   background-position: right 1.75em center;
-   width: e( 'calc( 100% + 1em )' );
-   height: @size-default;
-   padding: 0 0 0 1em;
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e0fbf8513b024e965443719bf1f7b557d6cb2c1
Gerrit-PatchSet: 3
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: DropdownInputWidget: Remove accidental patterned background ...

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

Change subject: DropdownInputWidget: Remove accidental patterned background in 
PHP
..


DropdownInputWidget: Remove accidental patterned background in PHP

Change 2d5773a6bddf14f5dde412a4b9742b93e1c9a12d added
`class="oo-ui-indicator-down"` to DropdownInputWidget, so that
we could use it for a custom dropdown arrow in MediaWiki theme.
But that applies to other themes too and Apex doesn't have extra
CSS to make it work, resulting is a very funny effect. Disabled
PHP DropdownInputWidget in MediaWiki theme was also affected.

Change-Id: Id7fba53b4dc85904edc697940d9a52081187034c
---
M src/styles/widgets/DropdownInputWidget.less
M src/themes/mediawiki/widgets.less
2 files changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/src/styles/widgets/DropdownInputWidget.less 
b/src/styles/widgets/DropdownInputWidget.less
index 032b74d..64eaf28 100644
--- a/src/styles/widgets/DropdownInputWidget.less
+++ b/src/styles/widgets/DropdownInputWidget.less
@@ -12,6 +12,10 @@
}
 
select {
+   // Hide the `background-image` from `.oo-ui-indicator-down` –
+   // themes can override `background-position` to display it.
+   background-position: -em 0;
+   background-repeat: no-repeat;
width: 100%;
cursor: pointer;
.oo-ui-box-sizing( border-box );
diff --git a/src/themes/mediawiki/widgets.less 
b/src/themes/mediawiki/widgets.less
index 48b57b0..ab14595 100644
--- a/src/themes/mediawiki/widgets.less
+++ b/src/themes/mediawiki/widgets.less
@@ -570,8 +570,6 @@
&.oo-ui-widget-enabled {
select {
background-color: @background-color-framed;
-   background-position: -em 0;
-   background-repeat: no-repeat;
color: @color-default;
.oo-ui-transition(
background-color @transition-ease-quick,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id7fba53b4dc85904edc697940d9a52081187034c
Gerrit-PatchSet: 3
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Prtksxna 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: demos: Add disabled DropdownInputWidget demo

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

Change subject: demos: Add disabled DropdownInputWidget demo
..


demos: Add disabled DropdownInputWidget demo

Also, remove unnecessary 'title' config option.

Change-Id: If7be6a0b753bca653e4dafc7acef46fbb263a55a
---
M demos/pages/widgets.js
M demos/pages/widgets.php
2 files changed, 22 insertions(+), 8 deletions(-)

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



diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index c717b76..5e962ca 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1164,11 +1164,19 @@
label: 'Third'
}
],
-   value: 'b',
-   title: 'Select an item'
+   value: 'b'
} ),
{
label: 'DropdownInputWidget',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.DropdownInputWidget( {
+   disabled: true
+   } ),
+   {
+   label: 'DropdownInputWidget 
(disabled)',
align: 'top'
}
),
@@ -1194,8 +1202,7 @@
label: 'C'
}
],
-   value: 'b',
-   title: 'Select an item'
+   value: 'b'
} ),
{
label: 'DropdownInputWidget 
(with optgroup)',
diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 5f4d408..6d4a555 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -526,11 +526,19 @@
'label' => 'Third'
]
],
-   'value' => 'b',
-   'title' => 'Select an item'
+   'value' => 'b'
] ),
[
'label' => 'DropdownInputWidget',
+   'align' => 'top'
+   ]
+   ),
+   new OOUI\FieldLayout(
+   new OOUI\DropdownInputWidget( [
+   'disabled' => true
+   ] ),
+   [
+   'label' => 'DropdownInputWidget (disabled)',
'align' => 'top'
]
),
@@ -556,8 +564,7 @@
'label' => 'C'
]
],
-   'value' => 'b',
-   'title' => 'Select an item'
+   'value' => 'b'
] ),
[
'label' => 'DropdownInputWidget (with 
optgroup)',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If7be6a0b753bca653e4dafc7acef46fbb263a55a
Gerrit-PatchSet: 2
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: template.py: substitution fails if template is a redirect

2017-03-11 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342314 )

Change subject: template.py: substitution fails if template is a redirect
..

template.py: substitution fails if template is a redirect

Substitution fails if template is a redirect to another template.
Follow redirects to get templates to use in substitution.

Bug: T151940
Change-Id: I972bb91fa58ca3b3ec6b5982066a76cfc38510c1
---
M scripts/template.py
1 file changed, 12 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/14/342314/1

diff --git a/scripts/template.py b/scripts/template.py
index 334c226..e9f04f9 100755
--- a/scripts/template.py
+++ b/scripts/template.py
@@ -220,6 +220,17 @@
 for old, new in self.templates.items():
 templateRegex = builder.pattern(old)
 
+# Follow redirects, T151940.
+old_tmpl = pywikibot.Page(self.site, old, ns=10)
+if old_tmpl.isRedirectPage():
+old = old_tmpl.getRedirectTarget().title(withNamespace=False)
+
+if new:
+new_tmpl = pywikibot.Page(self.site, new, ns=10)
+if new_tmpl.isRedirectPage():
+new_tmpl = new_tmpl.getRedirectTarget()
+new = new_tmpl.title(withNamespace=False)
+
 if self.getOption('subst') and self.getOption('remove'):
 replacements.append((templateRegex,
  r'{{subst:%s\g}}' % new))
@@ -231,8 +242,7 @@
 elif self.getOption('remove'):
 replacements.append((templateRegex, ''))
 else:
-template = pywikibot.Page(self.site, new, ns=10)
-if not template.exists():
+if not new_tmpl.exists():
 pywikibot.warning(u'Template "%s" does not exist.' % new)
 if not pywikibot.input_yn('Do you want to proceed anyway?',
   default=False, 
automatic_quit=False):

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

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

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: DropdownInputWidget: Add support for 'optgroup'

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

Change subject: DropdownInputWidget: Add support for 'optgroup'
..


DropdownInputWidget: Add support for 'optgroup'

This isn't really optgroup because the menu items come after the optgroup
instead of inside it (like in HTML). Uses MenuSectionOption.

Bug: T135028
Change-Id: I3fecde5c529f3c8c75e56d881b58026e8496f237
---
M demos/pages/widgets.js
M demos/pages/widgets.php
M php/widgets/DropdownInputWidget.php
M src/widgets/DropdownInputWidget.js
M src/widgets/MenuSectionOptionWidget.js
5 files changed, 96 insertions(+), 15 deletions(-)

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



diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index e15bcb2..c717b76 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1175,6 +1175,36 @@
new OO.ui.FieldLayout(
new OO.ui.DropdownInputWidget( {
options: [
+   {
+   optgroup: 
'Vowels'
+   },
+   {
+   data: 'a',
+   label: 'A'
+   },
+   {
+   optgroup: 
'Consonants'
+   },
+   {
+   data: 'b',
+   label: 'B'
+   },
+   {
+   data: 'c',
+   label: 'C'
+   }
+   ],
+   value: 'b',
+   title: 'Select an item'
+   } ),
+   {
+   label: 'DropdownInputWidget 
(with optgroup)',
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.DropdownInputWidget( {
+   options: [
{ data: 'sq', label: 
'Albanian' },
{ data: 'frp', label: 
'Arpitan' },
{ data: 'ba', label: 
'Bashkir' },
diff --git a/demos/pages/widgets.php b/demos/pages/widgets.php
index 05b34c4..5f4d408 100644
--- a/demos/pages/widgets.php
+++ b/demos/pages/widgets.php
@@ -537,6 +537,36 @@
new OOUI\FieldLayout(
new OOUI\DropdownInputWidget( [
'options' => [
+   [
+   'optgroup' => 'Vowels'
+   ],
+   [
+   'data' => 'a',
+   'label' => 'A'
+   ],
+   [
+   'optgroup' => 'Consonants'
+   ],
+   [
+   'data' => 'b',
+   'label' => 'B'
+   ],
+   [
+   'data' => 'c',
+   'label' => 'C'
+   ]
+   ],
+   'value' => 'b',
+   'title' => 'Select an item'
+   ] ),
+   [
+   'label' => 'DropdownInputWidget (with 
optgroup)',
+   'align' => 'top'
+   ]
+   ),
+   new 

[MediaWiki-commits] [Gerrit] oojs/ui[master]: FieldLayout: Use rather than when possible

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

Change subject: FieldLayout: Use  rather than  when possible
..


FieldLayout: Use  rather than  when possible

When align: 'inline' is requested, we now make an effort to
use  rather than  for various elements, allowing
the FieldLayout contents to still display inline when the CSS
is not loaded.

But never use  if the field widget is actually a 
or something, because that would mess up the HTML.

Bug: T159178
Change-Id: I78490bff90d37867a92be3d4cb3d03e5eb341443
---
M php/layouts/ActionFieldLayout.php
M php/layouts/FieldLayout.php
M src/layouts/ActionFieldLayout.js
M src/layouts/FieldLayout.js
M src/styles/layouts/FieldLayout.less
5 files changed, 46 insertions(+), 8 deletions(-)

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



diff --git a/php/layouts/ActionFieldLayout.php 
b/php/layouts/ActionFieldLayout.php
index bdcbad0..294a16f 100644
--- a/php/layouts/ActionFieldLayout.php
+++ b/php/layouts/ActionFieldLayout.php
@@ -32,8 +32,8 @@
 
// Properties
$this->buttonWidget = $buttonWidget;
-   $this->button = new Tag( 'div' );
-   $this->input = new Tag( 'div' );
+   $this->button = new Tag( 'span' );
+   $this->input = $this->isFieldInline() ? new Tag( 'span' ) : new 
Tag( 'div' );
 
// Initialization
$this->addClasses( [ 'oo-ui-actionFieldLayout' ] );
diff --git a/php/layouts/FieldLayout.php b/php/layouts/FieldLayout.php
index 1681550..beae36b 100644
--- a/php/layouts/FieldLayout.php
+++ b/php/layouts/FieldLayout.php
@@ -87,9 +87,9 @@
$this->fieldWidget = $fieldWidget;
$this->errors = isset( $config['errors'] ) ? $config['errors'] 
: [];
$this->notices = isset( $config['notices'] ) ? 
$config['notices'] : [];
-   $this->field = new Tag( 'div' );
+   $this->field = $this->isFieldInline() ? new Tag( 'span' ) : new 
Tag( 'div' );
$this->messages = new Tag( 'ul' );
-   $this->header = new Tag( 'div' );
+   $this->header = new Tag( 'span' );
$this->body = new Tag( 'div' );
if ( isset( $config['help'] ) ) {
$this->help = new ButtonWidget( [
@@ -168,6 +168,18 @@
}
 
/**
+* Return `true` if the given field widget can be used with `'inline'` 
alignment (see
+* setAlignment()). Return `false` if it can't or if this can't be 
determined.
+*
+* @return bool
+*/
+   public function isFieldInline() {
+   // This is very simplistic, but should be good enough. It's 
important to avoid false positives,
+   // as that will cause the generated HTML to be invalid and go 
all out of whack when parsed.
+   return strtolower( $this->getField()->getTag() ) === 'span';
+   }
+
+   /**
 * Set the field alignment mode.
 *
 * @param string $value Alignment mode, either 'left', 'right', 'top' 
or 'inline'
@@ -179,6 +191,10 @@
if ( !in_array( $value, [ 'left', 'right', 'top', 
'inline' ] ) ) {
$value = 'left';
}
+   // Validate
+   if ( $value === 'inline' && !$this->isFieldInline() ) {
+   $value = 'top';
+   }
// Reorder elements
$this->body->clearContent();
if ( $value === 'top' ) {
diff --git a/src/layouts/ActionFieldLayout.js b/src/layouts/ActionFieldLayout.js
index 1744d35..b746f18 100644
--- a/src/layouts/ActionFieldLayout.js
+++ b/src/layouts/ActionFieldLayout.js
@@ -57,8 +57,8 @@
 
// Properties
this.buttonWidget = buttonWidget;
-   this.$button = $( '' );
-   this.$input = $( '' );
+   this.$button = $( '' );
+   this.$input = this.isFieldInline() ? $( '' ) : $( '' );
 
// Initialization
this.$element
diff --git a/src/layouts/FieldLayout.js b/src/layouts/FieldLayout.js
index 58d8eb9..e22fabc 100644
--- a/src/layouts/FieldLayout.js
+++ b/src/layouts/FieldLayout.js
@@ -67,9 +67,9 @@
this.fieldWidget = fieldWidget;
this.errors = [];
this.notices = [];
-   this.$field = $( '' );
+   this.$field = this.isFieldInline() ? $( '' ) : $( '' );
this.$messages = $( '' );
-   this.$header = $( '' );
+   this.$header = $( '' );
this.$body = $( '' );
this.align = null;
if ( config.help ) {
@@ -150,6 +150,17 @@
 };
 
 /**
+ * Return `true` if the given field widget can be used with `'inline'` 
alignment (see
+ * #setAlignment). Return `false` if it can't or if this can't be determined.
+ *
+ * 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Increase sendemail.threadPoolSize to 5

2017-03-11 Thread Paladox (Code Review)
Paladox has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342313 )

Change subject: Gerrit: Increase sendemail.threadPoolSize to 5
..

Gerrit: Increase sendemail.threadPoolSize to 5

See https://groups.google.com/forum/#!topic/repo-discuss/P5ZuIlh4sQs for 
discussion on this.

It seems that emails are taking a while to reach yahoo emails. So by upping the 
thread I'm hopping it will get to yahoo users quicker.

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/342313/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9be425a4d12d183d8ebc47fc03f8b54cd9a0f7f
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] pywikibot/core[master]: IMPROV] Page: Renamed isImage and isCategory

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

Change subject: IMPROV] Page: Renamed isImage and isCategory
..


IMPROV] Page: Renamed isImage and isCategory

After ImagePage was renamed to FilePage, is Page.isImage() doing
the same. As suggested in the comments there also already rename
Page.isCategory.

Change-Id: I81e3c078296eab2447d22dffaa05598b7f5552a0
---
M pywikibot/page.py
M scripts/casechecker.py
M scripts/category.py
M scripts/category_redirect.py
M scripts/imagetransfer.py
M scripts/interwiki.py
M tests/page_tests.py
7 files changed, 35 insertions(+), 25 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index 0299b5c..2f525b8 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -313,7 +313,7 @@
 # use this form for sites like commons, where the
 # code is the same as the family name
 title = u'%s:%s' % (self.site.code, title)
-elif textlink and (self.isImage() or self.isCategory()):
+elif textlink and (self.is_filepage() or self.is_categorypage()):
 title = u':%s' % title
 elif self.namespace() == 0 and not section:
 withNamespace = True
@@ -799,7 +799,7 @@
 
 @rtype: bool
 """
-if not self.isCategory():
+if not self.is_categorypage():
 return False
 if not hasattr(self, "_catredirect"):
 catredirs = self.site._category_redirects()
@@ -882,13 +882,23 @@
 "%s:%s" % (self.site.namespace(ns + 1),
self.title(withNamespace=False)))
 
-def isCategory(self):
+def is_categorypage(self):
 """Return True if the page is a Category, False otherwise."""
 return self.namespace() == 14
 
-def isImage(self):
-"""Return True if this is an image description page, False 
otherwise."""
+@deprecated('is_categorypage')
+def isCategory(self):
+"""DEPRECATED: use is_categorypage instead."""
+return self.is_categorypage()
+
+def is_filepage(self):
+"""Return True if this is an file description page, False otherwise."""
 return self.namespace() == 6
+
+@deprecated('is_filepage')
+def isImage(self):
+"""DEPRECATED: use is_filepage instead."""
+return self.is_filepage()
 
 @remove_last_args(('get_Index', ))
 def isDisambig(self):
@@ -1068,7 +1078,7 @@
 return set(['create']) if 'create' in p_types else set()
 else:
 p_types.remove('create')  # no existing page allows that
-if not self.isImage():  # only file pages allow upload
+if not self.is_filepage():  # only file pages allow upload
 p_types.remove('upload')
 return p_types
 
diff --git a/scripts/casechecker.py b/scripts/casechecker.py
index 80e206f..9faa1cb 100755
--- a/scripts/casechecker.py
+++ b/scripts/casechecker.py
@@ -2,7 +2,7 @@
 # -*- coding: utf-8 -*-
 """Bot to find all pages on the wiki with mixed latin and cyrilic alphabets."""
 #
-# (C) Pywikibot team, 2006-2016
+# (C) Pywikibot team, 2006-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -469,7 +469,7 @@
if i not in self.knownWords and
self.romanNumSfxPtrn.match(i) is not None)
 
-if len(badWords) == 0 or self.Page(title).isImage():
+if len(badWords) == 0 or self.Page(title).is_filepage():
 return
 count = 0
 ambigBadWords = set()
diff --git a/scripts/category.py b/scripts/category.py
index fce3c7b..7e7bd69 100755
--- a/scripts/category.py
+++ b/scripts/category.py
@@ -110,7 +110,7 @@
 # (C) Ben McIlwain (CydeWeys), 2006-2015
 # (C) Anreas J Schwab, 2007
 # (C) xqt, 2009-2016
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -814,8 +814,8 @@
 
 listString = ""
 for article in setOfArticles:
-if (not article.isImage() or
-self.showImages) and not article.isCategory():
+if (not article.is_filepage() or
+self.showImages) and not article.is_categorypage():
 if self.talkPages and not article.isTalkPage():
 listString += "*[[%s]] -- [[%s|talk]]\n" \
   % (article.title(),
diff --git a/scripts/category_redirect.py b/scripts/category_redirect.py
index 5f87ab7..8bb645a 100755
--- a/scripts/category_redirect.py
+++ b/scripts/category_redirect.py
@@ -23,7 +23,7 @@
 
 """
 #
-# (C) Pywikibot team, 2008-2016
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of 

[MediaWiki-commits] [Gerrit] mediawiki...SimpleChanges[master]: Update SimpleChanges for RC filters changes

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

Change subject: Update SimpleChanges for RC filters changes
..


Update SimpleChanges for RC filters changes

Bug: T152754
Change-Id: I3711f3f822e488cb3a888d339bda06f5361fdfec
Depends-On: Iec2d82f6a830403d1c948a280efa58992e0cdee7
---
M SpecialSimpleChanges.php
1 file changed, 6 insertions(+), 12 deletions(-)

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



diff --git a/SpecialSimpleChanges.php b/SpecialSimpleChanges.php
index 87c93ba..0c41802 100644
--- a/SpecialSimpleChanges.php
+++ b/SpecialSimpleChanges.php
@@ -11,20 +11,15 @@
 * @global array $wgContentNamespaces
 * @global bool $wgSimpleChangesOnlyContentNamespaces
 * @global bool $wgSimpleChangesOnlyLatest
-* @param array $tables
-* @param array $fields
-* @param array $conds
-* @param array $query_options
-* @param array $join_conds
-* @param FormOptions $opts
-* @return bool True if no handler aborted the hook
+*
+* @inheritdoc
 */
-   protected function runMainQueryHook( &$tables, &$fields, &$conds, 
&$query_options, &$join_conds,
-   $opts
-   ) {
+   protected function buildQuery( &$tables, &$fields, &$conds,
+   &$query_options, &$join_conds, FormOptions $opts ) {
+
global $wgContentNamespaces, 
$wgSimpleChangesOnlyContentNamespaces, $wgSimpleChangesOnlyLatest;
 
-   $conds = parent::buildMainQueryConds( $opts );
+   parent::buildQuery( $tables, $fields, $conds, $query_options, 
$join_conds, $opts );
 
# don't count log entries toward limit of number of changes 
displayed
$conds[] = 'rc_type != ' . RC_LOG;
@@ -50,7 +45,6 @@
$join_conds['page'] = array( 'LEFT JOIN', 
'rc_cur_id=page_id' );
}
}
-   return parent::runMainQueryHook( $tables, $fields, $conds, 
$query_options, $join_conds, $opts );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3711f3f822e488cb3a888d339bda06f5361fdfec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SimpleChanges
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...RecentActivityFeed[master]: Update RecentActivityFeed for RC filters changes

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

Change subject: Update RecentActivityFeed for RC filters changes
..


Update RecentActivityFeed for RC filters changes

There's an additional minor tweak for an unrelated (pre-existing)
doHeader change.

Bug: T152754
Depends-On: Iec2d82f6a830403d1c948a280efa58992e0cdee7
Change-Id: Ifb046b8fd3a5904b1f03023bcb961036cc730211
---
M SpecialRecentActivityFeed.php
1 file changed, 13 insertions(+), 25 deletions(-)

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



diff --git a/SpecialRecentActivityFeed.php b/SpecialRecentActivityFeed.php
index 49c377f..ec83007 100644
--- a/SpecialRecentActivityFeed.php
+++ b/SpecialRecentActivityFeed.php
@@ -133,12 +133,9 @@
}
 
/**
-* Return the text to be displayed above the changes
-*
-* @param FormOptions $opts
-* @return string XHTML
+* @inheritdoc
 */
-   public function doHeader( $opts ) {
+   public function doHeader( $opts, $numRows ) {
global $wgScript;
 
$this->setTopText( $opts );
@@ -164,14 +161,14 @@
}
 
/**
-* Return an array of conditions depending of options set in $opts
-*
-* @param FormOptions $opts
-* @return array
+* @inheritdoc
 */
-   public function buildMainQueryConds( FormOptions $opts ) {
+   protected function buildQuery( &$tables, &$fields, &$conds,
+   &$query_options, &$join_conds, FormOptions $opts ) {
+
$dbr = $this->getDB();
-   $conds = parent::buildMainQueryConds( $opts );
+   parent::buildQuery( $tables, $fields, $conds,
+   $query_options, $join_conds, $opts );
 
// Calculate cutoff
$cutoff_unixtime = time() - ( $opts['days'] * 86400 );
@@ -186,25 +183,16 @@
}
 
$conds[] = 'rc_timestamp >= ' . $dbr->addQuotes( $cutoff );
-
-   return $conds;
}
 
-
-
/**
-* Process the query
-*
-* @param array $conds
-* @param FormOptions $opts
-* @return bool|ResultWrapper Result or false
+* @inheritdoc
 */
-   public function doMainQuery( $conds, $opts ) {
+   protected function doMainQuery( $tables, $fields, $conds, 
$query_options, $join_conds, FormOptions $opts ) {
$conds +=  $this->additionalConds;
-   $tables = array( 'recentchanges' );
-   $fields = RecentChange::selectFields();
-   $query_options = array( 'ORDER BY' => 'rc_timestamp DESC' );
-   $join_conds = array();
+   $tables[] = 'recentchanges';
+   $fields = array_merge( RecentChange::selectFields(), $fields );
+   $query_options = array_merge( array( 'ORDER BY' => 
'rc_timestamp DESC' ), $query_options );
 
ChangeTags::modifyDisplayQuery(
$tables,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb046b8fd3a5904b1f03023bcb961036cc730211
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/RecentActivityFeed
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: add a version number to status file output!!

2017-03-11 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342312 )

Change subject: add a version number to status file output!!
..

add a version number to status file output!!

Change-Id: I1de7ee46021fcfcfe1dfde3c5e2e60182ae45d4a
---
M xmldumps-backup/dumps/runstatusapi.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/12/342312/1

diff --git a/xmldumps-backup/dumps/runstatusapi.py 
b/xmldumps-backup/dumps/runstatusapi.py
index 192c4d4..d86cd29 100644
--- a/xmldumps-backup/dumps/runstatusapi.py
+++ b/xmldumps-backup/dumps/runstatusapi.py
@@ -25,6 +25,7 @@
 
 NAME = "statusapi"
 FILENAME = "dumpstatus"
+VERSION = "0.8"
 
 # might add more someday, but not today
 known_formats = ["json"]
@@ -171,6 +172,7 @@
 report_info = self.get_report_info()
 
 contents = self.combine_status_sources(dumprun_info, 
filehash_info, report_info)
+contents['version'] = StatusAPI.VERSION
 self.write_contents(contents)
 except Exception as ex:
 if self.verbose:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1de7ee46021fcfcfe1dfde3c5e2e60182ae45d4a
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikibaseLexeme[master]: Start a very basic LexemeRdfBuilder

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

Change subject: Start a very basic LexemeRdfBuilder
..


Start a very basic LexemeRdfBuilder

Bug: T157791
Change-Id: I4a8d528ce058dc0acbddc57cf04ee48f28a38c22
---
M WikibaseLexeme.entitytypes.php
A src/Rdf/LexemeRdfBuilder.php
A tests/phpunit/data/rdf/LexemeRdfBuilder/L2_all.nt
A tests/phpunit/data/rdf/LexemeRdfBuilder/L2_lemmas.nt
A tests/phpunit/data/rdf/LexemeRdfBuilder/L2_stubs.nt
A tests/phpunit/data/rdf/entities/L2.json
A tests/phpunit/mediawiki/Rdf/LexemeRdfBuilderTest.php
7 files changed, 275 insertions(+), 0 deletions(-)

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



diff --git a/WikibaseLexeme.entitytypes.php b/WikibaseLexeme.entitytypes.php
index 5623ace..f5df89e 100644
--- a/WikibaseLexeme.entitytypes.php
+++ b/WikibaseLexeme.entitytypes.php
@@ -16,7 +16,9 @@
 use Wikibase\Lexeme\ChangeOp\Deserialization\LemmaChangeOpDeserializer;
 use Wikibase\Lexeme\ChangeOp\Deserialization\LanguageChangeOpDeserializer;
 use 
Wikibase\Lexeme\ChangeOp\Deserialization\LexicalCategoryChangeOpDeserializer;
+use Wikibase\Lexeme\Rdf\LexemeRdfBuilder;
 use Wikibase\Lexeme\Validators\LexemeValidatorFactory;
+use Wikibase\Rdf\RdfVocabulary;
 use Wikibase\Repo\ChangeOp\Deserialization\TermChangeOpSerializationValidator;
 use Wikibase\Repo\MediaWikiLanguageDirectionalityLookup;
 use Wikibase\Repo\ParserOutput\FallbackHintHtmlTermRenderer;
@@ -39,6 +41,7 @@
 use Wikibase\View\EditSectionGenerator;
 use Wikibase\View\EntityTermsView;
 use Wikibase\View\Template\TemplateFactory;
+use Wikimedia\Purtle\RdfWriter;
 
 return [
'lexeme' => [
@@ -148,5 +151,17 @@
)
);
},
+   'rdf-builder-factory-callback' => function(
+   $flavorFlags,
+   RdfVocabulary $vocabulary,
+   RdfWriter $writer,
+   $mentionedEntityTracker,
+   $dedupe
+   ) {
+   return new LexemeRdfBuilder(
+   $vocabulary,
+   $writer
+   );
+   }
]
 ];
diff --git a/src/Rdf/LexemeRdfBuilder.php b/src/Rdf/LexemeRdfBuilder.php
new file mode 100755
index 000..0b48afe
--- /dev/null
+++ b/src/Rdf/LexemeRdfBuilder.php
@@ -0,0 +1,93 @@
+
+ */
+class LexemeRdfBuilder implements EntityRdfBuilder {
+
+   /**
+* @var RdfVocabulary
+*/
+   private $vocabulary;
+
+   /**
+* @var RdfWriter
+*/
+   private $writer;
+
+   /**
+* @param RdfVocabulary $vocabulary
+* @param RdfWriter $writer
+*/
+   public function __construct(
+   RdfVocabulary $vocabulary,
+   RdfWriter $writer
+   ) {
+   $this->vocabulary = $vocabulary;
+   $this->writer = $writer;
+   }
+
+   /**
+* Adds the lemmas of the given entity to the RDF graph
+*
+* @param string $entityLName
+* @param TermList $lemmas
+*/
+   public function addLemmas( $entityLName, TermList $lemmas ) {
+   foreach ( $lemmas->toTextArray() as $lemmaCode => $lemmaText ) {
+
+   $this->writer->about( RdfVocabulary::NS_ENTITY, 
$entityLName )
+   ->say( 'rdfs', 'label' )
+   ->text( $lemmaText, $lemmaCode )
+   ->say( RdfVocabulary::NS_SKOS, 'prefLabel' )
+   ->text( $lemmaText, $lemmaCode )
+   ->say( RdfVocabulary::NS_SCHEMA_ORG, 'name' )
+   ->text( $lemmaText, $lemmaCode );
+   }
+   }
+
+   /**
+* Map a Lexeme to the RDF graph
+*
+* @param EntityDocument $entity
+*/
+   public function addEntity(
+   EntityDocument $entity
+   ) {
+   if ( !$entity instanceof Lexeme ) {
+   return;
+   }
+   $lexemeLName = $this->vocabulary->getEntityLName( 
$entity->getId() );
+
+   $this->addLemmas( $lexemeLName, $entity->getLemmas() );
+   // TODO: Implement other parts.
+   }
+
+   /**
+* Map some aspect of a Lexeme to the RDF graph, as it should appear in 
the stub
+* representation of the lexeme.
+*
+* @param EntityDocument $entity
+*/
+   public function addEntityStub( EntityDocument $entity ) {
+   if ( !$entity instanceof Lexeme ) {
+   return;
+   }
+   $lexemeLName = $this->vocabulary->getEntityLName( 
$entity->getId() );
+
+   $this->addLemmas( $lexemeLName, 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: use the various json outputs to write a combined file for st...

2017-03-11 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342310 )

Change subject: use the various json outputs to write a combined file for 
status api use
..

use the various json outputs to write a combined file for status api use

Bug: T147177
Change-Id: I9d8ca1115559d9e4deec45fb649d8a472a7ffa19
---
M xmldumps-backup/dumps/runner.py
M xmldumps-backup/dumps/runnerutils.py
A xmldumps-backup/dumps/runstatusapi.py
3 files changed, 182 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/10/342310/1

diff --git a/xmldumps-backup/dumps/runner.py b/xmldumps-backup/dumps/runner.py
index 996282c..535041b 100644
--- a/xmldumps-backup/dumps/runner.py
+++ b/xmldumps-backup/dumps/runner.py
@@ -22,6 +22,7 @@
 from dumps.runnerutils import Maintenance, RunInfoFile, DumpRunJobData
 
 from dumps.utils import DbServerInfo, FilePartInfo, TimeUtils
+from dumps.runstatusapi import StatusAPI
 
 
 class Logger(threading.Thread):
@@ -465,8 +466,9 @@
 self.enabled = {}
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
 RunInfoFile.NAME, SymLinks.NAME, RunSettings.NAME,
-Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps",
-"cleanup_old_files", "check_trunc_files", 
"cleanup_tmp_files"]:
+Feeds.NAME, NoticeFile.NAME, StatusAPI.NAME,
+"makedir", "clean_old_dumps", "cleanup_old_files",
+"check_trunc_files", "cleanup_tmp_files"]:
 self.enabled[setting] = True
 
 if not self.cleanup_old_files:
@@ -475,7 +477,7 @@
 
 if self.dryrun or self._partnum_todo is not None or 
self.checkpoint_file is not None:
 for setting in [StatusHtml.NAME, Report.NAME, Checksummer.NAME,
-RunInfoFile.NAME, SymLinks.NAME, RunSettings.NAME,
+StatusAPI.NAME, RunInfoFile.NAME, SymLinks.NAME, 
RunSettings.NAME,
 Feeds.NAME, NoticeFile.NAME, "makedir", 
"clean_old_dumps"]:
 if setting in self.enabled:
 del self.enabled[setting]
@@ -495,7 +497,7 @@
 del self.enabled[setting]
 
 if self.job_requested == "createdirs":
-for setting in [SymLinks.NAME, Feeds.NAME, RunSettings.NAME]:
+for setting in [SymLinks.NAME, Feeds.NAME, RunSettings.NAME, 
StatusAPI.NAME]:
 if setting in self.enabled:
 del self.enabled[setting]
 
@@ -556,6 +558,9 @@
  self.failurehandler,
  self.log_and_print, self.verbose)
 
+self.runstatus_updater = StatusAPI(self.wiki, self.enabled, "json",
+   self.log_and_print, self.verbose)
+
 def log_queue_reader(self, log):
 if not log:
 return
@@ -571,6 +576,7 @@
 def html_update_callback(self):
 self.report.update_index_html_and_json()
 self.statushtml.update_status_file()
+self.runstatus_updater.write_statusapi_file()
 
 # returns 0 on success, 1 on error
 def save_command(self, commands, outfile):
@@ -653,6 +659,7 @@
 item.start()
 self.report.update_index_html_and_json()
 self.statushtml.update_status_file()
+self.runstatus_updater.write_statusapi_file()
 
 self.dumpjobdata.do_before_job(self.dump_item_list.dump_items)
 
@@ -675,7 +682,7 @@
 item.set_status("failed")
 
 if item.status() == "done":
-self.dumpjobdata.do_after_job(item)
+self.dumpjobdata.do_after_job(item, self.dump_item_list.dump_items)
 elif item.status() == "waiting" or item.status() == "skipped":
 # don't update the checksum files for this item.
 pass
@@ -768,6 +775,7 @@
 # All jobs are either in status "done", "waiting", "failed", 
"skipped"
 self.report.update_index_html_and_json("done")
 self.statushtml.update_status_file("done")
+self.runstatus_updater.write_statusapi_file()
 else:
 # This may happen if we start a dump now and abort before all 
items are
 # done. Then some are left for example in state "waiting". When
@@ -775,6 +783,7 @@
 # previously in "waiting" are still in status "waiting"
 self.report.update_index_html_and_json("partialdone")
 self.statushtml.update_status_file("partialdone")
+self.runstatus_updater.write_statusapi_file()
 
 self.dumpjobdata.do_after_dump(self.dump_item_list.dump_items)
 
diff --git a/xmldumps-backup/dumps/runnerutils.py 
b/xmldumps-backup/dumps/runnerutils.py
index d62e45d..10c303a 100644
--- 

[MediaWiki-commits] [Gerrit] operations/dumps[master]: have dump monitor collect current run json files and produce...

2017-03-11 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342311 )

Change subject: have dump monitor collect current run json files and produce 
index.json
..

have dump monitor collect current run json files and produce index.json

Bug: T147177
Change-Id: I66b4c5ba07016214c8e2140a8ebd6629755de663
---
M xmldumps-backup/dumps/runstatusapi.py
M xmldumps-backup/monitor.py
2 files changed, 54 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/11/342311/1

diff --git a/xmldumps-backup/dumps/runstatusapi.py 
b/xmldumps-backup/dumps/runstatusapi.py
index 5aafe39..6a5db7c 100644
--- a/xmldumps-backup/dumps/runstatusapi.py
+++ b/xmldumps-backup/dumps/runstatusapi.py
@@ -29,6 +29,25 @@
 # might add more someday, but not today
 known_formats = ["json"]
 
+@staticmethod
+def get_wiki_info(wiki, fmt="json"):
+"""
+read and return the contents of the json status file
+for the wiki
+"""
+if fmt not in StatusAPI.known_formats:
+return {}
+date = wiki.latest_dump()
+if date:
+fname = os.path.join(wiki.public_dir(),
+ date, StatusAPI.FILENAME + "." + fmt)
+with open(fname, "r") as status_file:
+contents = status_file.read()
+status_file.close()
+return json.loads(contents)
+else:
+return {}
+
 def __init__(self, wiki, enabled, fileformat="json", error_callback=None, 
verbose=False):
 self.wiki = wiki
 self._enabled = enabled
diff --git a/xmldumps-backup/monitor.py b/xmldumps-backup/monitor.py
index d38b213..3e7ce28 100644
--- a/xmldumps-backup/monitor.py
+++ b/xmldumps-backup/monitor.py
@@ -4,9 +4,11 @@
 from os.path import exists
 import sys
 import traceback
+import json
 from dumps.WikiDump import Wiki, Config, Locker
 from dumps.fileutils import FileUtils
 from dumps.runnerutils import StatusHtml
+from dumps.runstatusapi import StatusAPI
 
 
 VERBOSE = False
@@ -64,6 +66,29 @@
 "items": "\n".join(states)}
 
 
+def generate_json(config):
+"""
+go through all the latest dump dirs, collect up all the json
+contents from the dumpstatusapi file, and shovel them into
+one ginormous json object and scribble that out. heh.
+"""
+running = False
+json_out = {"wikis": {}}
+
+dbs = config.db_list
+
+for db_name in dbs:
+try:
+wiki = Wiki(config, db_name)
+json_out["wikis"][wiki.db_name] = StatusAPI.get_wiki_info(wiki)
+except Exception:
+# if there's a problem with one wiki at least
+# let's show the rest
+if VERBOSE:
+traceback.print_exc(file=sys.stdout)
+return json_out
+
+
 def update_index(config):
 output_fname = os.path.join(config.public_dir, config.index)
 output_fname_sorted_by_db = add_to_filename(os.path.join(
@@ -83,6 +108,15 @@
 os.rename(temp_fname, output_fname_sorted_by_db)
 
 
+def update_json(config):
+output_fname = os.path.join(config.public_dir, "index.json")
+temp_fname = output_fname + ".tmp"
+filehdl = open(temp_fname, "wt")
+filehdl.write(json.dumps(generate_json(config)))
+filehdl.close()
+os.rename(temp_fname, output_fname)
+
+
 def main():
 # can specify name of alternate config file
 if len(sys.argv) >= 2:
@@ -90,7 +124,7 @@
 else:
 config = Config()
 update_index(config)
-
+update_json(config)
 
 if __name__ == "__main__":
 main()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66b4c5ba07016214c8e2140a8ebd6629755de663
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: master
Gerrit-Owner: ArielGlenn 

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


[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Add -property option to pagegenerators.py

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

Change subject: Add -property option to pagegenerators.py
..


Add -property option to pagegenerators.py

- new -property option for pagegenerators.py
- ask for a poperty name or show the whole list when "?" no input (default)
  is given or the given property name was invalid
- test the new option with GeneratorFactory
- rename _get_property_names to get_property_names which is no longer
  a helper function for site.pages_with_property method

Change-Id: Ib128f197f2b43d00ea2ad1846a3d1788ad936abe
---
M pywikibot/pagegenerators.py
M pywikibot/site.py
M tests/pagegenerators_tests.py
M tests/site_tests.py
4 files changed, 63 insertions(+), 6 deletions(-)

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



diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index 98ed579..e344976 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -50,6 +50,7 @@
 )
 
 from pywikibot import date, config, i18n, xmlreader
+from pywikibot.bot import ListOption
 from pywikibot.comms import http
 from pywikibot.exceptions import ArgumentDeprecationWarning, UnknownExtension
 from pywikibot.logentries import LogEntryFactory
@@ -246,6 +247,9 @@
 -unwatchedWork on all articles that are not watched by anyone.
   Argument can be given as "-unwatched:n" where
   n is the maximum number of articles to work on.
+
+-property:nameWork on all pages with a given propery name from
+  Special:PagesWithProp.
 
 -usercontribs Work on all articles that were edited by a certain user.
   (Example : -usercontribs:DumZiBoT)
@@ -661,6 +665,20 @@
 elif arg == '-unwatched':
 gen = UnwatchedPagesPageGenerator(total=intNone(value),
   site=self.site)
+elif arg == '-property':
+if not value:
+question = 'Which property name to be used?'
+value = pywikibot.input(question + ' (List [?])')
+pnames = self.site.get_property_names()
+# also use the default by  key
+if value in '?' or value not in pnames:
+for i, item in enumerate(pnames, start=1):
+pywikibot.output(
+'{0:{1}}: {2}'.format(i, len(str(len(pnames))),
+  item))
+prefix, value = pywikibot.input_choice(
+question, ListOption(self.site.get_property_names()))
+gen = page_with_property_generator(value, site=self.site)
 elif arg == '-usercontribs':
 gen = UserContributionsGenerator(value)
 elif arg == '-withoutinterwiki':
@@ -2168,6 +2186,22 @@
 yield page
 
 
+def page_with_property_generator(name, total=None, site=None):
+"""
+Special:PagesWithProperty page generator.
+
+@param name: Property name of pages to be retrieved
+@type name: str
+@param total: Maximum number of pages to retrieve in total
+@type total: int
+@param site: Site for generator results.
+@type site: L{pywikibot.site.BaseSite}
+"""
+if site is None:
+site = pywikibot.Site()
+return site.pages_with_property(name, total=total)
+
+
 def WantedPagesPageGenerator(total=100, site=None):
 """
 Wanted page generator.
diff --git a/pywikibot/site.py b/pywikibot/site.py
index 0ee4981..28643e1 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -6584,7 +6584,7 @@
  protect_type=type, total=total)
 
 @need_version('1.21')
-def _get_property_names(self, force=False):
+def get_property_names(self, force=False):
 """
 Get property names for pages_with_property().
 
@@ -6607,9 +6607,9 @@
 @return: return a generator of Page objects
 @rtype: iterator
 """
-if propname not in self._get_property_names():
+if propname not in self.get_property_names():
 raise NotImplementedError(
-'{0} is not a valid page property'.format(propname))
+'"{0}" is not a valid page property'.format(propname))
 pwpgen = self._generator(api.PageGenerator,
  type_arg='pageswithprop',
  gpwppropname=propname,
diff --git a/tests/pagegenerators_tests.py b/tests/pagegenerators_tests.py
index 389c6ae..50628bd 100755
--- a/tests/pagegenerators_tests.py
+++ b/tests/pagegenerators_tests.py
@@ -1021,6 +1021,29 @@
 self.assertIsNotNone(gen)
 self.assertPagesInNamespaces(gen, set([1, 3]))
 
+def test_pages_with_property_generator(self):
+"""Test the pages_with_property_generator method."""
+mysite = 

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Add basic browser tests for filter options

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

Change subject: Add basic browser tests for filter options
..


Add basic browser tests for filter options

Bug: T159522
Change-Id: I44f71ad923421ed37d2e7d65ee80dda2628c45bc
---
A tests/browser/features/filter_options.feature
M tests/browser/features/support/pages/edit_conflict_page.rb
M tests/browser/features/support/pages/special_preferences_page.rb
M tests/browser/features/support/step_definitions/edit_conflict_steps.rb
M tests/browser/features/support/step_definitions/edit_steps.rb
5 files changed, 109 insertions(+), 3 deletions(-)

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



diff --git a/tests/browser/features/filter_options.feature 
b/tests/browser/features/filter_options.feature
new file mode 100644
index 000..918a852
--- /dev/null
+++ b/tests/browser/features/filter_options.feature
@@ -0,0 +1,31 @@
+@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration
+Feature: Two column edit conflict screen
+  Background:
+Given I am logged in
+And I have reset my preferences
+And TwoColConflict is enabled as a beta feature
+
+  Scenario: Show only mine filter hides foreign changes
+When I handle a multi line edit conflict
+And I select the show mine option
+Then The two column edit conflict screen should be shown
+And Section for common changes should be there
+And Section for full common changes should be there
+And Section for collapsed common changes should not be there
+And Section for foreign changes should not be there
+
+  Scenario: Hide common changes filter collapses common changes
+When I handle a multi line edit conflict
+And I select the hide unchanged text option
+Then The two column edit conflict screen should be shown
+And Section for collapsed common changes should be there
+And Section for full common changes should not be there
+
+  Scenario: Show hidden common changes when clicking the collapsed text
+When I handle a multi line edit conflict
+And I select the hide unchanged text option
+And I click on the collapsed common changes
+Then The two column edit conflict screen should be shown
+And Section for full common changes should be there
+And Section for collapsed common changes should not be there
+And The show unchanged text option should be selected
diff --git a/tests/browser/features/support/pages/edit_conflict_page.rb 
b/tests/browser/features/support/pages/edit_conflict_page.rb
index e64f140..e5d2ba4 100644
--- a/tests/browser/features/support/pages/edit_conflict_page.rb
+++ b/tests/browser/features/support/pages/edit_conflict_page.rb
@@ -7,8 +7,28 @@
   div(:twocolconflict_editor_desc, css: '.mw-twocolconflict-editor-col 
.mw-twocolconflict-col-desc')
   text_area(:twocolconflict_editor_text, css: '.mw-twocolconflict-editor-col 
textarea')
   div(:twocolconflict_changes_same, css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-same')
+  div(
+  :twocolconflict_changes_same_full,
+  css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-same-full'
+  )
+  div(
+  :twocolconflict_changes_same_collapsed,
+  css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-same-collapsed'
+  )
   div(:twocolconflict_changes_foreign, css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-foreign')
   div(:twocolconflict_changes_own, css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-own')
-  div(:twocolconflict_changes_title_foreign, css: 
'#mw-twocolconflict-changes-editor .mw-twocolconflict-diffchange-foreign 
.mw-twocolconflict-diffchange-title')
-  div(:twocolconflict_changes_title_own, css: 
'#mw-twocolconflict-changes-editor .mw-twocolconflict-diffchange-own 
.mw-twocolconflict-diffchange-title')
+  div(
+  :twocolconflict_changes_title_foreign,
+  css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-foreign .mw-twocolconflict-diffchange-title'
+  )
+  div(:twocolconflict_changes_title_own,
+  css: '#mw-twocolconflict-changes-editor 
.mw-twocolconflict-diffchange-own .mw-twocolconflict-diffchange-title'
+  )
+
+  div(:twocolconflict_option_both_div, xpath: 
'(//*[@name="mw-twocolconflict-show-changes"]//parent::div)[1]')
+  div(:twocolconflict_option_mine_div, xpath: 
'(//*[@name="mw-twocolconflict-show-changes"]//parent::div)[2]')
+
+  radio_button(:twocolconflict_option_show, xpath: 
'(//*[@name="mw-twocolconflict-same"])[1]')
+  div(:twocolconflict_option_show_div, xpath: 
'(//*[@name="mw-twocolconflict-same"]//parent::div)[1]')
+  div(:twocolconflict_option_hide_div, xpath: 
'(//*[@name="mw-twocolconflict-same"]//parent::div)[2]')
 end
diff --git a/tests/browser/features/support/pages/special_preferences_page.rb 

[MediaWiki-commits] [Gerrit] mediawiki...TwoColConflict[master]: Add browser test for the auto scroll

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

Change subject: Add browser test for the auto scroll
..


Add browser test for the auto scroll

Bug: T159522
Change-Id: Ic1f5a862389a521ec6c5d4125f487d546d32f658
---
A tests/browser/features/autoscroll.feature
M tests/browser/features/support/step_definitions/edit_conflict_steps.rb
M tests/browser/features/support/step_definitions/edit_steps.rb
3 files changed, 39 insertions(+), 0 deletions(-)

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



diff --git a/tests/browser/features/autoscroll.feature 
b/tests/browser/features/autoscroll.feature
new file mode 100644
index 000..8418b9f
--- /dev/null
+++ b/tests/browser/features/autoscroll.feature
@@ -0,0 +1,16 @@
+@chrome @en.wikipedia.beta.wmflabs.org @firefox @integration
+Feature: Two column edit conflict screen
+  Background:
+Given I am logged in
+And I have reset my preferences
+And TwoColConflict is enabled as a beta feature
+
+  Scenario: Basic two-column edit conflict page is shown correctly
+When I go to the "TwoColConflict Test Page" page with many lines
+And I click Edit
+And Another user changes some of the many lines of the "TwoColConflict 
Test Page" page
+And I edit the page with "ChangeB"
+And I save the edit
+Then The two column edit conflict screen should be shown
+And The editor view should be scrolled
+And The diff view should be scrolled
diff --git 
a/tests/browser/features/support/step_definitions/edit_conflict_steps.rb 
b/tests/browser/features/support/step_definitions/edit_conflict_steps.rb
index b65a22e..fa89988 100644
--- a/tests/browser/features/support/step_definitions/edit_conflict_steps.rb
+++ b/tests/browser/features/support/step_definitions/edit_conflict_steps.rb
@@ -116,3 +116,11 @@
 Then(/^The show unchanged text option should be selected$/) do
   expect(on(EditConflictPage).twocolconflict_option_show_selected?).to 
be_truthy
 end
+
+Then(/^The editor view should be scrolled$/) do
+  browser.execute_script('$( ".mw-twocolconflict-editor-col textarea" 
).scrollTop() > 0;')
+end
+
+Then(/^The diff view should be scrolled$/) do
+  browser.execute_script('$( ".mw-twocolconflict-changes-editor" ).scrollTop() 
> 0;')
+end
diff --git a/tests/browser/features/support/step_definitions/edit_steps.rb 
b/tests/browser/features/support/step_definitions/edit_steps.rb
index f0a928c..3a2ed01 100644
--- a/tests/browser/features/support/step_definitions/edit_steps.rb
+++ b/tests/browser/features/support/step_definitions/edit_steps.rb
@@ -13,6 +13,11 @@
   step "I am on the #{page_title} page"
 end
 
+Given(/^I go to the "(.+)" page with many lines$/) do |page_title|
+  api.create_page page_title, 
"Line1\n\n\n\nLine3\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nLastLine"
+  step "I am on the #{page_title} page"
+end
+
 When(/^Another user changes the multi line content of the "(.+?)" page$/) do 
|page_title|
   as_user(:conflicting_user) do
 api.edit(
@@ -22,3 +27,13 @@
 )
   end
 end
+
+When(/^Another user changes some of the many lines of the "(.+?)" page$/) do 
|page_title|
+  as_user(:conflicting_user) do
+api.edit(
+title: page_title,
+text: 
"Line1\n\n\n\nLine3A\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nLastLineChangeA",
+summary: 'Conflicting edit'
+)
+  end
+end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1f5a862389a521ec6c5d4125f487d546d32f658
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/TwoColConflict
Gerrit-Branch: master
Gerrit-Owner: WMDE-Fisch 
Gerrit-Reviewer: Addshore 
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] pywikibot/core[master]: [IMPROV] Don't use carriage returns

2017-03-11 Thread Xqt (Code Review)
Xqt has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342309 )

Change subject: [IMPROV] Don't use carriage returns
..

[IMPROV] Don't use carriage returns

Change-Id: I1b7013b8996a49bd8dc0348bcaed0ac2e22cce0c
---
M scripts/maintenance/wikimedia_sites.py
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/09/342309/1

diff --git a/scripts/maintenance/wikimedia_sites.py 
b/scripts/maintenance/wikimedia_sites.py
index cca9164..7a6ea23 100755
--- a/scripts/maintenance/wikimedia_sites.py
+++ b/scripts/maintenance/wikimedia_sites.py
@@ -2,8 +2,8 @@
 # -*- coding: utf-8 -*-
 """Script that updates the language lists in Wikimedia family files."""
 #
-# (C) xqt, 2009-2016
-# (C) Pywikibot team, 2008-2016
+# (C) xqt, 2009-2017
+# (C) Pywikibot team, 2008-2017
 #
 # Distributed under the terms of the MIT license.
 #
@@ -71,16 +71,16 @@
 pywikibot.output(u'The lists match!')
 else:
 pywikibot.output(u"The lists don't match, the new list is:")
-text = u'self.languages_by_size = [\r\n'
+text = 'self.languages_by_size = [\n'
 line = ' ' * 11
 for code in new:
 if len(line) + len(code) <= 76:
 line += u" '%s'," % code
 else:
-text += u'%s\r\n' % line
+text += '%s\n' % line
 line = ' ' * 11
 line += u" '%s'," % code
-text += u'%s\r\n' % line
+text += '%s\n' % line
 text += u']'
 pywikibot.output(text)
 family_file_name = 'pywikibot/families/%s_family.py' % family

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b7013b8996a49bd8dc0348bcaed0ac2e22cce0c
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...Wikidata[master]: New Wikidata Build - 2017-03-11T10:00:01+0000

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

Change subject: New Wikidata Build - 2017-03-11T10:00:01+
..


New Wikidata Build - 2017-03-11T10:00:01+

Change-Id: I2a8ccab49f7c05fbad442a22cfc54897b6247a39
---
M composer.lock
M extensions/Wikibase/Gemfile
M 
extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
M extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
M vendor/composer/installed.json
5 files changed, 10 insertions(+), 14 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 8beffb0..af326b2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1549,12 +1549,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b"
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a6f8ad40047b7c47f79d5408fe80b352682b5e9b;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4;,
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4",
 "shasum": ""
 },
 "require": {
@@ -1628,7 +1628,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-03-10 09:38:26"
+"time": "2017-03-10 22:43:36"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/Gemfile b/extensions/Wikibase/Gemfile
index 80c8b61..37f232a 100644
--- a/extensions/Wikibase/Gemfile
+++ b/extensions/Wikibase/Gemfile
@@ -1,6 +1,3 @@
-# ruby=ruby-2.1.1
-# ruby-gemset=Wikibase
-
 source 'https://rubygems.org'
 
 gem 'activesupport', '~> 4.2', '>= 4.2.6'
diff --git 
a/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
 
b/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
index b977b21..55460ba 100644
--- 
a/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
+++ 
b/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
@@ -191,8 +191,6 @@
 * @return array
 */
public function addWikibaseConditions( array &$conds, FormOptions $opts 
) {
-   // do not include wikibase changes for activated enhanced 
watchlist
-   // since we do not support that format yet
if ( $this->shouldHideWikibaseChanges( $opts ) ) {
$dbr = $this->loadBalancer->getConnection( DB_REPLICA );
$conds[] = 'rc_source != ' . $dbr->addQuotes( 
RecentChangeFactory::SRC_WIKIBASE );
@@ -225,6 +223,8 @@
 * @return bool
 */
private function hasWikibaseChangesEnabled() {
+   // do not include wikibase changes for activated enhanced 
watchlist
+   // since we do not support that format yet (T46222)
return $this->showExternalChanges && 
!$this->isEnhancedChangesEnabled();
}
 
diff --git a/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php 
b/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
index 35e..ae69c5f 100644
--- a/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
+++ b/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
@@ -77,7 +77,6 @@
$builders = [];
 
foreach ( $this->factoryCallbacks as $key => $callback ) {
-
$builders[$key] = call_user_func(
$callback,
$flavorFlags,
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index b40bae2..8bc8196 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1350,12 +1350,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b"
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a6f8ad40047b7c47f79d5408fe80b352682b5e9b;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b",
+"url": 

[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: Comment spelling correction

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

Change subject: Comment spelling correction
..


Comment spelling correction

Change-Id: I247644c71f981d7d57304468cab31b4e3057bb81
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 3c74371..69e23c0 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -237,7 +237,7 @@
 * compact size is achieved. Each item should be an array and should
 * take the whole language list as argument.
 *
-* @return {Function[]} Array of comacting functions
+* @return {Function[]} Array of compacting functions
 */
CompactInterlanguageList.prototype.getCompactStrategies = function () {
return [

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I247644c71f981d7d57304468cab31b4e3057bb81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 
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...UniversalLanguageSelector[master]: Comment spelling correction

2017-03-11 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342308 )

Change subject: Comment spelling correction
..

Comment spelling correction

Change-Id: I247644c71f981d7d57304468cab31b4e3057bb81
---
M resources/js/ext.uls.compactlinks.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/resources/js/ext.uls.compactlinks.js 
b/resources/js/ext.uls.compactlinks.js
index 3c74371..69e23c0 100644
--- a/resources/js/ext.uls.compactlinks.js
+++ b/resources/js/ext.uls.compactlinks.js
@@ -237,7 +237,7 @@
 * compact size is achieved. Each item should be an array and should
 * take the whole language list as argument.
 *
-* @return {Function[]} Array of comacting functions
+* @return {Function[]} Array of compacting functions
 */
CompactInterlanguageList.prototype.getCompactStrategies = function () {
return [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I247644c71f981d7d57304468cab31b4e3057bb81
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageForms[master]: Add Disable Outside Service button

2017-03-11 Thread Harjotsingh (Code Review)
Harjotsingh has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342307 )

Change subject: Add Disable Outside Service button
..

Add Disable Outside Service button

Bug: T159404
Change-Id: I032f3b2b260f7672c2584e85e601fd9c33291b1a
---
M PageForms.php
M i18n/en.json
M includes/PF_FormPrinter.php
M includes/PF_Hooks.php
M specials/PF_CreateForm.php
5 files changed, 34 insertions(+), 4 deletions(-)


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

diff --git a/PageForms.php b/PageForms.php
index 9891bde..5c57334 100644
--- a/PageForms.php
+++ b/PageForms.php
@@ -107,9 +107,12 @@
// This global variable is needed so that other extensions can
// hook into it to add their own input types.
$GLOBALS['wgPageFormsFormPrinter'] = new StubObject( 
'wgPageFormsFormPrinter', 'PFFormPrinter' );
+   $GLOBALS['wgPageFormsDisableOutsideServices'] = new StubObject( 
'wgPageFormsDisableOutsideServices', 'PFFormPrinter' );
};
 } else {
$GLOBALS['wgPageFormsFormPrinter'] = new StubObject( 
'wgPageFormsFormPrinter', 'PFFormPrinter' );
+   $GLOBALS['wgPageFormsDisableOutsideServices'] = new StubObject( 
'wgPageFormsDisableOutsideServices', 'PFFormPrinter' );
+
 }
 
 $GLOBALS['wgHooks']['LinkEnd'][] = 'PFFormLinker::setBrokenLink';
diff --git a/i18n/en.json b/i18n/en.json
index ebefa68..8314239 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -107,6 +107,8 @@
"pf_createform_template": "Template:",
"pf_createform_templatelabelinput": "Template label (optional):",
"pf_createform_allowmultiple": "Allow for multiple (or zero) instances 
of this template in the created page",
+   "pf_createform_disableoutside": "Disable Outside Services",
+   "pf_createform_enableoutside": "Enable Outside Services",
"pf_createform_field": "Field:",
"pf_createform_fieldprop": "This field defines the property $1, of type 
$2.",
"pf_createform_fieldproplist": "This field defines a list of elements 
that have the property $1, of type $2.",
diff --git a/includes/PF_FormPrinter.php b/includes/PF_FormPrinter.php
index 3895982..2adee7f 100644
--- a/includes/PF_FormPrinter.php
+++ b/includes/PF_FormPrinter.php
@@ -12,6 +12,7 @@
  * @file
  * @ingroup PF
  */
+global $wgPageFormsDisableOutsideServices;
 
 class PFFormPrinter {
 
@@ -59,11 +60,12 @@
$this->registerInputType( 'PFRatingInput' );
// Add this if the Semantic Maps extension is not
// included, or if it's SM (really Maps) v4.0 or higher.
-   if ( !defined( 'SM_VERSION' ) || version_compare( SM_VERSION, 
'4.0', '>=' ) ) {
-   $this->registerInputType( 'PFGoogleMapsInput' );
+   if( !$GLOBALS['wgPageFormsDisableOutsideServices'] ){
+   if ( !defined( 'SM_VERSION' ) || version_compare( 
SM_VERSION, '4.0', '>=' ) ) {
+   $this->registerInputType( 'PFGoogleMapsInput' );
+   }
+   $this->registerInputType( 'PFOpenLayersInput' );
}
-   $this->registerInputType( 'PFOpenLayersInput' );
-
// All-purpose setup hook.
Hooks::run( 'PageForms::FormPrinterSetup', array( $this ) );
}
diff --git a/includes/PF_Hooks.php b/includes/PF_Hooks.php
index f2859da..bee038f 100644
--- a/includes/PF_Hooks.php
+++ b/includes/PF_Hooks.php
@@ -54,6 +54,7 @@
// extensions can hook into it to add their own
// input types.
$GLOBALS['wgPageFormsFormPrinter'] = new StubObject( 
'wgPageFormsFormPrinter', 'PFFormPrinter' );
+   $GLOBALS['wgPageFormsDisableOutsideServices'] = new StubObject( 
'wgPageFormsDisableOutsideServices', 'PFFromPrinter' );
}
 
/**
diff --git a/specials/PF_CreateForm.php b/specials/PF_CreateForm.php
index 6cc4c5a..20d6ee2 100644
--- a/specials/PF_CreateForm.php
+++ b/specials/PF_CreateForm.php
@@ -54,6 +54,7 @@
}
 
function doSpecialCreateForm( $query ) {
+   global $wgPageFormsDisableOutsideServices;
$out = $this->getOutput();
$req = $this->getRequest();
$db = wfGetDB( DB_SLAVE );
@@ -258,6 +259,15 @@
// If a submit button was pressed, create the form-definition
// file, then redirect.
$save_page = $req->getCheck( 'wpSave' );
+   $wgPageFormsDisableOutsideServices = 0;
+   $enable_service = $req->getCheck( 'enableoutside');
+   $disable_service = $req->getCheck( 'disableoutside' );
+   if( $disable_service ){
+   $wgPageFormsDisableOutsideServices = 1;
+   }
+   if( $enable_service ){
+   

[MediaWiki-commits] [Gerrit] pywikibot/core[master]: Fix logging in python3 when deprecated_args decorator is used

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

Change subject: Fix logging in python3 when deprecated_args decorator is used
..


Fix logging in python3 when deprecated_args decorator is used

Remove check on record path, which was failing in python 3.

Remove special treatment between python 2 and 3, leaving the default
behaviour for each version.

Logging out put is slightly different in python 3.6 with respect to the
others, as record.pathname is warnings.py.

Leave indication of original caller module:linenno in message.

Bug: T159077
Change-Id: I0c13551406e709d0082874d383962fd514dcae99
---
M pywikibot/tools/_logging.py
1 file changed, 0 insertions(+), 12 deletions(-)

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



diff --git a/pywikibot/tools/_logging.py b/pywikibot/tools/_logging.py
index 55d4c7d..b318281 100644
--- a/pywikibot/tools/_logging.py
+++ b/pywikibot/tools/_logging.py
@@ -72,27 +72,15 @@
 """Strip trailing newlines before outputting text to file."""
 # Warnings captured from the warnings system are not processed by
 # logoutput(), so the 'context' variables are missing.
-# The same context details are provided by Python 3.X, but need to
-# be extracted from the warning message for Python <= 2.7.
 if record.name == 'py.warnings' and 'caller_file' not in 
record.__dict__:
 assert len(record.args) == 1, \
 'Arguments for record is not correctly set'
 msg = record.args[0]
 
-if PY2:
-record.pathname = msg.partition(':')[0]
-record.lineno = msg.partition(':')[2].partition(':')[0]
-record.module = msg.rpartition('/')[2].rpartition('.')[0]
-else:
-assert msg.startswith(record.pathname + ':'), \
-'Record argument should start with path'
-
 record.__dict__['caller_file'] = record.pathname
 record.__dict__['caller_name'] = record.module
 record.__dict__['caller_line'] = record.lineno
 
-# Remove the path and the line number, and strip the extra space
-msg = msg.partition(':')[2].partition(':')[2].lstrip()
 record.args = (msg,)
 
 text = logging.handlers.RotatingFileHandler.format(self, record)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PCRGUIInserts[master]: Release version 2.0.3

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

Change subject: Release version 2.0.3
..


Release version 2.0.3

* Fixed the fix from previous commit in 2.0.2

Change-Id: I79c8f8d8d92c59b919868c01a06055dc5666d27c
---
M CHANGELOG.md
M PCRGUIInserts.class.php
M PCRGUIInserts.php
3 files changed, 15 insertions(+), 6 deletions(-)

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



diff --git a/CHANGELOG.md b/CHANGELOG.md
index af27f13..90fb64d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,13 +1,21 @@
 The CHANGELOG of the PCR GUI Inserts extension to MediaWiki.
 
+## Version 2.0.3
+
+Released on March 11, 2016 by Karsten Hoffmeyer
+
+* Fixed previous fix for PHP 7.1 and later
+
+
 ## Version 2.0.2
 
-Release on March 11, 2016 by Karsten Hoffmeyer.
+Released on March 11, 2016 by Karsten Hoffmeyer.
 
-* Migrated &$this to $this to avoid warings in PHP 7.1 and later
+* Migrated &$this to $this to avoid warnings in PHP 7.1 and later
 * Added translations from translatewiki.net translators
 * Added verbose README.md
 
+
 ## Version 2.0.1
 
 Released on February 16, 2016 by Karsten Hoffmeyer.
diff --git a/PCRGUIInserts.class.php b/PCRGUIInserts.class.php
index b747a18..8a5a331 100644
--- a/PCRGUIInserts.class.php
+++ b/PCRGUIInserts.class.php
@@ -14,9 +14,10 @@
public function __construct()
{
global $wgHooks;
-   $wgHooks['BeforePageDisplay'][] = array( $this, 
'BeforePageDisplay' );
-   $wgHooks['SkinAfterBottomScripts'][] = array( $this, 
'SkinAfterBottomScripts' );
-   $wgHooks['SkinBuildSidebar'][] = array( $this, 
'SkinBuildSidebar' );
+   $that = $this;
+   $wgHooks['BeforePageDisplay'][] = array( &$that, 
'BeforePageDisplay' );
+   $wgHooks['SkinAfterBottomScripts'][] = array( &$that, 
'SkinAfterBottomScripts' );
+   $wgHooks['SkinBuildSidebar'][] = array( &$that, 
'SkinBuildSidebar' );
}
 
# addHeadItem places stuff within 
diff --git a/PCRGUIInserts.php b/PCRGUIInserts.php
index 2f48a13..356f9f1 100644
--- a/PCRGUIInserts.php
+++ b/PCRGUIInserts.php
@@ -27,7 +27,7 @@
 $wgExtensionCredits['other'][] = array(
'path' => '__FILE__',
'name' => 'PCR GUI Inserts',
-   'version' => '2.0.2',
+   'version' => '2.0.3',
'author' => array(
'David Dernoncourt',
'...'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79c8f8d8d92c59b919868c01a06055dc5666d27c
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/PCRGUIInserts
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Kghbln 
Gerrit-Reviewer: jenkins-bot <>

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


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

2017-03-11 Thread WikidataBuilder (Code Review)
WikidataBuilder has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342306 )

Change subject: New Wikidata Build - 2017-03-11T10:00:01+
..

New Wikidata Build - 2017-03-11T10:00:01+

Change-Id: I2a8ccab49f7c05fbad442a22cfc54897b6247a39
---
M composer.lock
M extensions/Wikibase/Gemfile
M 
extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
M extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
M vendor/composer/installed.json
5 files changed, 10 insertions(+), 14 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 8beffb0..af326b2 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1549,12 +1549,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b"
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a6f8ad40047b7c47f79d5408fe80b352682b5e9b;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b",
+"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4;,
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4",
 "shasum": ""
 },
 "require": {
@@ -1628,7 +1628,7 @@
 "wikibaserepo",
 "wikidata"
 ],
-"time": "2017-03-10 09:38:26"
+"time": "2017-03-10 22:43:36"
 },
 {
 "name": "wikibase/wikimedia-badges",
diff --git a/extensions/Wikibase/Gemfile b/extensions/Wikibase/Gemfile
index 80c8b61..37f232a 100644
--- a/extensions/Wikibase/Gemfile
+++ b/extensions/Wikibase/Gemfile
@@ -1,6 +1,3 @@
-# ruby=ruby-2.1.1
-# ruby-gemset=Wikibase
-
 source 'https://rubygems.org'
 
 gem 'activesupport', '~> 4.2', '>= 4.2.6'
diff --git 
a/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
 
b/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
index b977b21..55460ba 100644
--- 
a/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
+++ 
b/extensions/Wikibase/client/includes/Hooks/ChangesListSpecialPageHookHandlers.php
@@ -191,8 +191,6 @@
 * @return array
 */
public function addWikibaseConditions( array &$conds, FormOptions $opts 
) {
-   // do not include wikibase changes for activated enhanced 
watchlist
-   // since we do not support that format yet
if ( $this->shouldHideWikibaseChanges( $opts ) ) {
$dbr = $this->loadBalancer->getConnection( DB_REPLICA );
$conds[] = 'rc_source != ' . $dbr->addQuotes( 
RecentChangeFactory::SRC_WIKIBASE );
@@ -225,6 +223,8 @@
 * @return bool
 */
private function hasWikibaseChangesEnabled() {
+   // do not include wikibase changes for activated enhanced 
watchlist
+   // since we do not support that format yet (T46222)
return $this->showExternalChanges && 
!$this->isEnhancedChangesEnabled();
}
 
diff --git a/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php 
b/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
index 35e..ae69c5f 100644
--- a/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
+++ b/extensions/Wikibase/repo/includes/Rdf/EntityRdfBuilderFactory.php
@@ -77,7 +77,6 @@
$builders = [];
 
foreach ( $this->factoryCallbacks as $key => $callback ) {
-
$builders[$key] = call_user_func(
$callback,
$flavorFlags,
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index b40bae2..8bc8196 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -1350,12 +1350,12 @@
 "source": {
 "type": "git",
 "url": 
"https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b"
+"reference": "afe10a570a41b9eea6236a6a4ffcb6325aa2b3b4"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/a6f8ad40047b7c47f79d5408fe80b352682b5e9b;,
-"reference": "a6f8ad40047b7c47f79d5408fe80b352682b5e9b",
+"url": 

[MediaWiki-commits] [Gerrit] mediawiki...PCRGUIInserts[master]: Fix the fix from previous commit

2017-03-11 Thread Kghbln (Code Review)
Kghbln has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/342305 )

Change subject: Fix the fix from previous commit
..

Fix the fix from previous commit

Change-Id: I79c8f8d8d92c59b919868c01a06055dc5666d27c
---
M PCRGUIInserts.class.php
1 file changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PCRGUIInserts 
refs/changes/05/342305/1

diff --git a/PCRGUIInserts.class.php b/PCRGUIInserts.class.php
index b747a18..8a5a331 100644
--- a/PCRGUIInserts.class.php
+++ b/PCRGUIInserts.class.php
@@ -14,9 +14,10 @@
public function __construct()
{
global $wgHooks;
-   $wgHooks['BeforePageDisplay'][] = array( $this, 
'BeforePageDisplay' );
-   $wgHooks['SkinAfterBottomScripts'][] = array( $this, 
'SkinAfterBottomScripts' );
-   $wgHooks['SkinBuildSidebar'][] = array( $this, 
'SkinBuildSidebar' );
+   $that = $this;
+   $wgHooks['BeforePageDisplay'][] = array( &$that, 
'BeforePageDisplay' );
+   $wgHooks['SkinAfterBottomScripts'][] = array( &$that, 
'SkinAfterBottomScripts' );
+   $wgHooks['SkinBuildSidebar'][] = array( &$that, 
'SkinBuildSidebar' );
}
 
# addHeadItem places stuff within 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I79c8f8d8d92c59b919868c01a06055dc5666d27c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PCRGUIInserts
Gerrit-Branch: master
Gerrit-Owner: Kghbln 

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


[MediaWiki-commits] [Gerrit] mediawiki...Nuke[master]: Add GENDER to nuke-linkoncontribs-text message

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

Change subject: Add GENDER to nuke-linkoncontribs-text message
..

Add GENDER to nuke-linkoncontribs-text message

For motivation see T159657.

Change-Id: I245b3eca53cbc0f8459fb18ac1c78006d6ce385a
---
M Nuke.hooks.php
M i18n/en.json
M i18n/qqq.json
3 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Nuke 
refs/changes/04/342304/2

diff --git a/Nuke.hooks.php b/Nuke.hooks.php
index d2cc607..5d3922d 100644
--- a/Nuke.hooks.php
+++ b/Nuke.hooks.php
@@ -17,7 +17,8 @@
$toolLinks['nuke'] = 
$sp->getLinkRenderer()->makeKnownLink(
SpecialPage::getTitleFor( 'Nuke' ),
$sp->msg( 'nuke-linkoncontribs' )->text(),
-   [ 'title' => $sp->msg( 
'nuke-linkoncontribs-text' )->text() ],
+   [ 'title' => $sp->msg( 
'nuke-linkoncontribs-text',
+   $userPageTitle->getText() )->text() ],
[ 'target' => $userPageTitle->getText() ]
);
}
diff --git a/i18n/en.json b/i18n/en.json
index d8f29a2..4ee033d 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -30,5 +30,5 @@
"nuke-viewchanges": "view changes",
"nuke-namespace": "Limit to namespace:",
"nuke-linkoncontribs": "mass delete",
-   "nuke-linkoncontribs-text": "Mass delete pages where this user is the 
only author"
+   "nuke-linkoncontribs-text": "Mass delete pages where {{GENDER:$1|this 
user}} is the only author"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 93c0ca0..90cf24b 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -41,5 +41,5 @@
"nuke-viewchanges": "Used as link text.\n\nThe link points to History 
page of the page.\n\nThis message follows:\n* {{msg-mw|nuke-editby}} and 
{{msg-mw|comma-separator}}\n* or empty string (if username is 
empty).\n{{Identical|View changes}}",
"nuke-namespace": "Label shown on [[Special:Nuke]] in front of the 
namespace input that allows choosing a namespace to filter the search by",
"nuke-linkoncontribs": "Used as link text which is used on 
[[Special:Contributions]] and [[Special:DeletedContributions]].\n\nOnly added 
if a user has rights to nuke pages.\n\nThe link has the tooltip 
{{msg-mw|Nuke-linkoncontribs-text}}.\n{{Identical|Mass delete}}",
-   "nuke-linkoncontribs-text": "Tooltip for the link which is labeled 
{{msg-mw|Nuke-linkoncontribs}}."
+   "nuke-linkoncontribs-text": "Tooltip for the link which is labeled 
{{msg-mw|Nuke-linkoncontribs}} Parameters:\n* $1 is the target user name used 
for GENDER."
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I245b3eca53cbc0f8459fb18ac1c78006d6ce385a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Nuke
Gerrit-Branch: master
Gerrit-Owner: Matěj Suchánek 
Gerrit-Reviewer: jenkins-bot <>

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