[MediaWiki-commits] [Gerrit] Put eqiad in read-only mode for scheduled test - change (operations/mediawiki-config)

2016-03-14 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Put eqiad in read-only mode for scheduled test
..

Put eqiad in read-only mode for scheduled test

Change-Id: Ie3f798ac642ef97f660bd5589ef327743f2f99a1
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 83c6ada..88ada58 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -562,13 +562,13 @@
 
 # This key must exist for the master switch script to work
 'readOnlyBySection' => array(
-#  'DEFAULT' => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes', # s3
-#  's1'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
-#  's2'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
-#  's4'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
-#  's5'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
-#  's6'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
-#  's7'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   'DEFAULT' => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes', # s3
+   's1'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   's2'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   's4'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   's5'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   's6'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+   's7'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
 ),
 
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3f798ac642ef97f660bd5589ef327743f2f99a1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Add commented-out entries in readOnlyBySection for all datab... - change (operations/mediawiki-config)

2016-03-14 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Add commented-out entries in readOnlyBySection for all database 
clusters
..

Add commented-out entries in readOnlyBySection for all database clusters

Pre-populate 'readOnlyBySection' with an entry for each database cluster. Also
make slight improvements to the message text.

Change-Id: I957413b50d137962f4e118a1b74b1e51dd1b1c5f
---
M wmf-config/db-eqiad.php
1 file changed, 7 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 454d521..83c6ada 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -562,10 +562,13 @@
 
 # This key must exist for the master switch script to work
 'readOnlyBySection' => array(
-#  'DEFAULT' => 'Brief Database Maintenance in progress, please try again 
in 3 minutes', #s3
-#  's1'   => 'Brief Database Maintenance in progress, please try again 
in 3 minutes',
-#  's5'   => 'Brief Database Maintenance in progress, please try again 
in 3 minutes',
-#  's3'   => 'Brief Database Maintenance in progress, please try again 
in 3 minutes',
+#  'DEFAULT' => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes', # s3
+#  's1'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+#  's2'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+#  's4'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+#  's5'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+#  's6'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
+#  's7'  => 'MediaWiki is in read-only mode for maintenance. Please 
try again in 3 minutes',
 ),
 
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I957413b50d137962f4e118a1b74b1e51dd1b1c5f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Apply style to markerGroup - change (wikidata...gui)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Apply style to markerGroup
..


Apply style to markerGroup

Instead of individually to each marker

Change-Id: I3c297d0ff8dc7ae15d9c1ae97792255a96b0cd2b
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 8 insertions(+), 7 deletions(-)

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



diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index fb71ee9..b713e48 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -85,18 +85,19 @@
var info = self._getItemDescription( rowKey );
 
markers.push(
-   L.circle( [ longLat[0], 
longLat[1] ], 50, {
-   color: '#e04545',
-   opacity: 0.9,
-   fillColor: '#e04545',
-   fillOpacity: 0.9
-   } ).bindPopup( info[0] )
+   L.circle( [ longLat[0], 
longLat[1] ], 50 )
+   .bindPopup( info[0] )
);
}
} );
} );
 
-   return L.featureGroup( markers );
+   return L.featureGroup( markers ).setStyle( {
+   color: '#e04545',
+   opacity: 0.9,
+   fillColor: '#e04545',
+   fillOpacity: 0.9
+   } );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c297d0ff8dc7ae15d9c1ae97792255a96b0cd2b
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Reduce size of the markers - change (wikidata...gui)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Reduce size of the markers
..


Reduce size of the markers

50 is a bit too much and think 10 works better

@todo adjust size, dynamically, based on zoom level.

Change-Id: I05ebf458160f9199d3e72bb315df969f3d039d07
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index b713e48..0281012 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -85,7 +85,7 @@
var info = self._getItemDescription( rowKey );
 
markers.push(
-   L.circle( [ longLat[0], 
longLat[1] ], 50 )
+   L.circle( [ longLat[0], 
longLat[1] ], 10 )
.bindPopup( info[0] )
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I05ebf458160f9199d3e72bb315df969f3d039d07
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 
Gerrit-Reviewer: Jonas Kress (WMDE) 
Gerrit-Reviewer: Smalyshev 
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.tools: Raise error if bz2 not found - change (pywikibot/core)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: pywikibot.tools: Raise error if bz2 not found
..


pywikibot.tools: Raise error if bz2 not found

bz2 is required in pywikibot to open compressed files. But,
sometimes python is not compiled with bz2. This causes pywikibot
to fail while it is being imported.

This commit shows a warning in such cases and tries to use
bz2file as an alternative. If both are not found, it raises an
error lazily (i.e. only when bz2 is needed to open a compressed
file).

Bug: T123092
Change-Id: Iace28a5b356cff19118983fd089770c75a1b4dff
---
M pywikibot/tools/__init__.py
M requirements.txt
M setup.py
M tests/tools_tests.py
4 files changed, 49 insertions(+), 3 deletions(-)

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



diff --git a/pywikibot/tools/__init__.py b/pywikibot/tools/__init__.py
index c2c5bba..0c5bcee 100644
--- a/pywikibot/tools/__init__.py
+++ b/pywikibot/tools/__init__.py
@@ -8,7 +8,6 @@
 from __future__ import absolute_import, print_function, unicode_literals
 __version__ = '$Id$'
 
-import bz2
 import collections
 import gzip
 import inspect
@@ -38,6 +37,15 @@
 
 from pywikibot.logging import debug
 
+try:
+import bz2
+except ImportError as bz2_import_error:
+try:
+import bz2file as bz2
+warn('package bz2 was not found; using bz2file', ImportWarning)
+except ImportError:
+warn('package bz2 and bz2file were not found', ImportWarning)
+bz2 = bz2_import_error
 
 if PYTHON_VERSION < (3, 5):
 # although deprecated in 3 completely no message was emitted until 3.5
@@ -988,6 +996,8 @@
 extension = ''
 
 if extension == 'bz2':
+if isinstance(bz2, ImportError):
+raise bz2
 return wrap(bz2.BZ2File(filename, mode), 1)
 elif extension == 'gz':
 return wrap(gzip.open(filename, mode), 0)
diff --git a/requirements.txt b/requirements.txt
index 1e6945e..3658030 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -91,3 +91,8 @@
 
 # scripts/weblinkchecker.py
 memento_client>=0.5.1
+
+# tools/__init__.py
+# pywikibot prefers using the inbuilt bz2 module if python was compiled with
+# bz2 support. But if it wasn't, bz2file is used instead.
+# bz2file
diff --git a/setup.py b/setup.py
index f56eab6..97f121a 100644
--- a/setup.py
+++ b/setup.py
@@ -41,7 +41,7 @@
 if not python_is_supported():
 raise RuntimeError(versions_required_message % sys.version)
 
-test_deps = []
+test_deps = ['bz2file']
 
 dependencies = ['requests']
 
@@ -141,6 +141,12 @@
 
 script_deps['data_ingestion.py'] = extra_deps['csv']
 
+try:
+import bz2  # noqa: unused import
+except ImportError:
+# Use bz2file if the python is not compiled with bz2 support.
+dependencies.append('bz2file')
+
 # Some of the ui_tests depend on accessing the console window's menu
 # to set the console font and copy and paste, achieved using pywinauto
 # which depends on pywin32.
diff --git a/tests/tools_tests.py b/tests/tools_tests.py
index 2d0935e..ed039b5 100644
--- a/tests/tools_tests.py
+++ b/tests/tools_tests.py
@@ -20,7 +20,9 @@
 from pywikibot import tools
 
 from tests import join_xml_data_path
-from tests.aspects import unittest, DeprecationTestCase, TestCase, 
MetaTestCaseClass
+from tests.aspects import (
+unittest, require_modules, DeprecationTestCase, TestCase, MetaTestCaseClass
+)
 from tests.utils import expected_failure_if, add_metaclass
 
 
@@ -106,6 +108,29 @@
 self.assertEqual(self._get_content(self.base_file + '.bz2', 
use_extension=False),
  self.original_content)
 
+@require_modules('bz2file')
+def test_open_archive_with_bz2file(self):
+"""Test open_archive when bz2file library."""
+old_bz2 = tools.bz2
+try:
+tools.bz2 = __import__('bz2file')
+self.assertEqual(self._get_content(self.base_file + '.bz2'),
+ self.original_content)
+self.assertEqual(self._get_content(self.base_file + '.bz2',
+   use_extension=False),
+ self.original_content)
+finally:
+tools.bz2 = old_bz2
+
+def test_open_archive_without_bz2(self):
+"""Test open_archive when bz2 and bz2file are not available."""
+old_bz2 = tools.bz2
+try:
+tools.bz2 = ImportError()
+self.assertRaises(ImportError, self._get_content, self.base_file + 
'.bz2')
+finally:
+tools.bz2 = old_bz2
+
 def test_open_archive_gz(self):
 """Test open_archive with gz compressor in the standard library."""
 self.assertEqual(self._get_content(self.base_file + '.gz'), 
self.original_content)

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


[MediaWiki-commits] [Gerrit] Reduce size of the markers - change (wikidata...gui)

2016-03-14 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Reduce size of the markers
..

Reduce size of the markers

50 is a bit too much and think 10 works better

@todo adjust size, dynamically, based on zoom level.

Change-Id: I05ebf458160f9199d3e72bb315df969f3d039d07
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/60/277460/1

diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index b713e48..0281012 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -85,7 +85,7 @@
var info = self._getItemDescription( rowKey );
 
markers.push(
-   L.circle( [ longLat[0], 
longLat[1] ], 50 )
+   L.circle( [ longLat[0], 
longLat[1] ], 10 )
.bindPopup( info[0] )
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I05ebf458160f9199d3e72bb315df969f3d039d07
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] Apply style to markerGroup - change (wikidata...gui)

2016-03-14 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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

Change subject: Apply style to markerGroup
..

Apply style to markerGroup

Instead of individually to each marker

Change-Id: I3c297d0ff8dc7ae15d9c1ae97792255a96b0cd2b
---
M wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/gui 
refs/changes/59/277459/1

diff --git a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js 
b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
index fb71ee9..b713e48 100644
--- a/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
+++ b/wikibase/queryService/ui/resultBrowser/CoordinateResultBrowser.js
@@ -85,18 +85,19 @@
var info = self._getItemDescription( rowKey );
 
markers.push(
-   L.circle( [ longLat[0], 
longLat[1] ], 50, {
-   color: '#e04545',
-   opacity: 0.9,
-   fillColor: '#e04545',
-   fillOpacity: 0.9
-   } ).bindPopup( info[0] )
+   L.circle( [ longLat[0], 
longLat[1] ], 50 )
+   .bindPopup( info[0] )
);
}
} );
} );
 
-   return L.featureGroup( markers );
+   return L.featureGroup( markers ).setStyle( {
+   color: '#e04545',
+   opacity: 0.9,
+   fillColor: '#e04545',
+   fillOpacity: 0.9
+   } );
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c297d0ff8dc7ae15d9c1ae97792255a96b0cd2b
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/gui
Gerrit-Branch: master
Gerrit-Owner: Aude 

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


[MediaWiki-commits] [Gerrit] ganglia: fix me - service notify systemd (WIP) - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: ganglia: fix me - service notify systemd (WIP)
..

ganglia: fix me - service notify systemd (WIP)

Change-Id: Ic50d0b2d3d151cd19c91190933c92bc505e7c436
---
M modules/ganglia/manifests/monitor/aggregator/instance.pp
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/modules/ganglia/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia/manifests/monitor/aggregator/instance.pp
index 2aaaef7..e1507b8 100644
--- a/modules/ganglia/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia/manifests/monitor/aggregator/instance.pp
@@ -40,6 +40,8 @@
 # Run these instances in the foreground
 $daemonize = 'no'
 
+# FIXME - the 'notify' part needs to be different on systemd
+# each aggregator is a separate service now
 file { "/etc/ganglia/aggregators/${id}.conf":
 ensure  => $ensure,
 require => File['/etc/ganglia/aggregators'],

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

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

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


[MediaWiki-commits] [Gerrit] ganglia: do not start meta-service on jessie/systemd - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: ganglia: do not start meta-service on jessie/systemd
..


ganglia: do not start meta-service on jessie/systemd

When using systemd, we start each aggregator instance
separately from a template and each is their own service (I10726144b4f21b3).

So we don't need this 'meta-service' there that we used on upstart
which started all the instances with a script.

Bug:T124197
Change-Id: I91c009c0b814176ad55d71fbd606fb209cde221a
---
M modules/ganglia/manifests/monitor/aggregator.pp
1 file changed, 8 insertions(+), 10 deletions(-)

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



diff --git a/modules/ganglia/manifests/monitor/aggregator.pp 
b/modules/ganglia/manifests/monitor/aggregator.pp
index d028dfc..a350556 100644
--- a/modules/ganglia/manifests/monitor/aggregator.pp
+++ b/modules/ganglia/manifests/monitor/aggregator.pp
@@ -42,15 +42,13 @@
 
 site_instances{ $sites: }
 
-if os_version('debian >= jessie') {
-  $ganglia_provider = 'systemd'
-} else {
-  $ganglia_provider = 'upstart'
-}
-
-service { 'ganglia-monitor-aggregator':
-ensure   => running,
-provider => $ganglia_provider,
-name => 'ganglia-monitor-aggregator',
+# with systemd each instance is a separate service spawned from a template
+# this is the old service that started multiple aggregators with upstart
+if $::initsystem == 'upstart' {
+service { 'ganglia-monitor-aggregator':
+ensure   => running,
+provider => upstart,
+name => 'ganglia-monitor-aggregator',
+}
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91c009c0b814176ad55d71fbd606fb209cde221a
Gerrit-PatchSet: 9
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Mark Bergsma 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] resourceloader: Add structure unit test to confirm messages ... - change (mediawiki/core)

2016-03-14 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Add structure unit test to confirm messages 
exist
..

resourceloader: Add structure unit test to confirm messages exist

Change-Id: I5333523efe3e7b9191e871d67d9eb650002c7784
---
M tests/phpunit/structure/ResourcesTest.php
1 file changed, 19 insertions(+), 0 deletions(-)


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

diff --git a/tests/phpunit/structure/ResourcesTest.php 
b/tests/phpunit/structure/ResourcesTest.php
index 5c65c1e..d45f5f9 100644
--- a/tests/phpunit/structure/ResourcesTest.php
+++ b/tests/phpunit/structure/ResourcesTest.php
@@ -87,6 +87,25 @@
}
 
/**
+* Verify that all specified messages actually exist.
+*/
+   public function testMissingMessages() {
+   $data = self::getAllModules();
+   $validDeps = array_keys( $data['modules'] );
+   $lang = Language::factory( 'en' );
+
+   /** @var ResourceLoaderModule $module */
+   foreach ( $data['modules'] as $moduleName => $module ) {
+   foreach ( $module->getMessages() as $msgKey ) {
+   $this->assertTrue(
+   wfMessage( $msgKey )->useDatabase( 
false )->inLanguage( $lang )->exists(),
+   "Message '$msgKey' required by 
'$moduleName' must exist"
+   );
+   }
+   }
+   }
+
+   /**
 * Verify that all dependencies of all modules are always satisfiable 
with the 'targets' defined
 * for the involved modules.
 *

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

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

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


[MediaWiki-commits] [Gerrit] ganglia: no dependency for old upstart service on systemd - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: ganglia: no dependency for old upstart service on systemd
..


ganglia: no dependency for old upstart service on systemd

This service dependency is only valid on upstart systems.
When using systemd each aggregator is a separate service and this
one doesn't exist anymore and puppet will fail.

Bug:T124197
Change-Id: Ib3278fb515158d4f64337bff99daad1321697b88
---
M modules/ganglia/manifests/monitor/aggregator/instance.pp
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/modules/ganglia/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia/manifests/monitor/aggregator/instance.pp
index 5a6e25f..2aaaef7 100644
--- a/modules/ganglia/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia/manifests/monitor/aggregator/instance.pp
@@ -1,6 +1,10 @@
 define ganglia::monitor::aggregator::instance($monitored_site) {
-Ganglia::Monitor::Aggregator::Instance[$title] ->
-Service['ganglia-monitor-aggregator']
+
+# not needed anymore and breaks on systemd
+if $::initsystem == 'upstart' {
+Ganglia::Monitor::Aggregator::Instance[$title] ->
+Service['ganglia-monitor-aggregator']
+}
 
 include ganglia::configuration
 include network::constants

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib3278fb515158d4f64337bff99daad1321697b88
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update Ace and use scoped require / define - change (mediawiki...CodeEditor)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Ace and use scoped require / define
..


Update Ace and use scoped require / define

This brings Ace to upstream commit
4a55188fdb0eee9e2d3854f175e67408a1e47655

Bug: T127643
Change-Id: I7699e842d7b561b8a35cf7a4ea048f4126eaf856
---
M modules/ace/ace.js
M modules/ace/ext-beautify.js
M modules/ace/ext-chromevox.js
M modules/ace/ext-elastic_tabstops_lite.js
M modules/ace/ext-emmet.js
M modules/ace/ext-error_marker.js
M modules/ace/ext-keybinding_menu.js
M modules/ace/ext-language_tools.js
M modules/ace/ext-linking.js
M modules/ace/ext-modelist.js
M modules/ace/ext-old_ie.js
M modules/ace/ext-searchbox.js
M modules/ace/ext-settings_menu.js
M modules/ace/ext-spellcheck.js
M modules/ace/ext-split.js
M modules/ace/ext-static_highlight.js
M modules/ace/ext-statusbar.js
M modules/ace/ext-textarea.js
M modules/ace/ext-themelist.js
M modules/ace/ext-whitespace.js
M modules/ace/keybinding-emacs.js
M modules/ace/keybinding-vim.js
M modules/ace/mode-abap.js
M modules/ace/mode-abc.js
M modules/ace/mode-actionscript.js
M modules/ace/mode-ada.js
M modules/ace/mode-apache_conf.js
M modules/ace/mode-applescript.js
M modules/ace/mode-asciidoc.js
M modules/ace/mode-assembly_x86.js
M modules/ace/mode-autohotkey.js
M modules/ace/mode-batchfile.js
M modules/ace/mode-c9search.js
M modules/ace/mode-c_cpp.js
M modules/ace/mode-cirru.js
M modules/ace/mode-clojure.js
M modules/ace/mode-cobol.js
M modules/ace/mode-coffee.js
M modules/ace/mode-coldfusion.js
M modules/ace/mode-csharp.js
M modules/ace/mode-css.js
M modules/ace/mode-curly.js
M modules/ace/mode-d.js
M modules/ace/mode-dart.js
M modules/ace/mode-diff.js
M modules/ace/mode-django.js
M modules/ace/mode-dockerfile.js
M modules/ace/mode-dot.js
M modules/ace/mode-eiffel.js
M modules/ace/mode-ejs.js
M modules/ace/mode-elixir.js
M modules/ace/mode-elm.js
M modules/ace/mode-erlang.js
M modules/ace/mode-forth.js
A modules/ace/mode-fortran.js
M modules/ace/mode-ftl.js
M modules/ace/mode-gcode.js
M modules/ace/mode-gherkin.js
M modules/ace/mode-gitignore.js
M modules/ace/mode-glsl.js
A modules/ace/mode-gobstones.js
M modules/ace/mode-golang.js
M modules/ace/mode-groovy.js
M modules/ace/mode-haml.js
M modules/ace/mode-handlebars.js
M modules/ace/mode-haskell.js
M modules/ace/mode-haxe.js
M modules/ace/mode-html.js
M modules/ace/mode-html_elixir.js
M modules/ace/mode-html_ruby.js
M modules/ace/mode-ini.js
M modules/ace/mode-io.js
M modules/ace/mode-jack.js
M modules/ace/mode-jade.js
M modules/ace/mode-java.js
M modules/ace/mode-javascript.js
M modules/ace/mode-json.js
M modules/ace/mode-jsoniq.js
M modules/ace/mode-jsp.js
M modules/ace/mode-jsx.js
M modules/ace/mode-julia.js
M modules/ace/mode-latex.js
M modules/ace/mode-lean.js
M modules/ace/mode-less.js
M modules/ace/mode-liquid.js
M modules/ace/mode-lisp.js
D modules/ace/mode-live_script.js
M modules/ace/mode-livescript.js
M modules/ace/mode-logiql.js
M modules/ace/mode-lsl.js
M modules/ace/mode-lua.js
M modules/ace/mode-luapage.js
M modules/ace/mode-lucene.js
M modules/ace/mode-makefile.js
M modules/ace/mode-markdown.js
M modules/ace/mode-mask.js
M modules/ace/mode-matlab.js
M modules/ace/mode-maze.js
M modules/ace/mode-mel.js
D modules/ace/mode-mips_assembler.js
D modules/ace/mode-mipsassembler.js
M modules/ace/mode-mushcode.js
M modules/ace/mode-mysql.js
M modules/ace/mode-nix.js
A modules/ace/mode-nsis.js
M modules/ace/mode-objectivec.js
M modules/ace/mode-ocaml.js
M modules/ace/mode-pascal.js
M modules/ace/mode-perl.js
M modules/ace/mode-pgsql.js
M modules/ace/mode-php.js
M modules/ace/mode-plain_text.js
M modules/ace/mode-powershell.js
M modules/ace/mode-praat.js
M modules/ace/mode-prolog.js
M modules/ace/mode-properties.js
M modules/ace/mode-protobuf.js
M modules/ace/mode-python.js
M modules/ace/mode-r.js
A modules/ace/mode-razor.js
M modules/ace/mode-rdoc.js
M modules/ace/mode-rhtml.js
A modules/ace/mode-rst.js
M modules/ace/mode-ruby.js
M modules/ace/mode-rust.js
M modules/ace/mode-sass.js
M modules/ace/mode-scad.js
M modules/ace/mode-scala.js
M modules/ace/mode-scheme.js
M modules/ace/mode-scss.js
M modules/ace/mode-sh.js
M modules/ace/mode-sjs.js
M modules/ace/mode-smarty.js
M modules/ace/mode-snippets.js
M modules/ace/mode-soy_template.js
M modules/ace/mode-space.js
M modules/ace/mode-sql.js
M modules/ace/mode-sqlserver.js
M modules/ace/mode-stylus.js
M modules/ace/mode-svg.js
M modules/ace/mode-swift.js
D modules/ace/mode-swig.js
M modules/ace/mode-tcl.js
M modules/ace/mode-tex.js
M modules/ace/mode-textile.js
M modules/ace/mode-toml.js
M modules/ace/mode-twig.js
M modules/ace/mode-typescript.js
M modules/ace/mode-vala.js
M modules/ace/mode-vbscript.js
M modules/ace/mode-velocity.js
M modules/ace/mode-verilog.js
M modules/ace/mode-vhdl.js
A modules/ace/mode-wollok.js
M modules/ace/mode-xml.js
M modules/ace/mode-xquery.js
M modules/ace/mode-yaml.js
M 

[MediaWiki-commits] [Gerrit] Add makedomain tool, for creation of domains in designate. - change (operations/puppet)

2016-03-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Add makedomain tool, for creation of domains in designate.
..

Add makedomain tool, for creation of domains in designate.

Change-Id: I5c039b3ca369f60e1cd4e7d77c0388c51c8acaa2
---
A modules/openstack/files/liberty/virtscripts/makedomain
1 file changed, 103 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/56/277456/1

diff --git a/modules/openstack/files/liberty/virtscripts/makedomain 
b/modules/openstack/files/liberty/virtscripts/makedomain
new file mode 100755
index 000..0450c5f
--- /dev/null
+++ b/modules/openstack/files/liberty/virtscripts/makedomain
@@ -0,0 +1,103 @@
+#!/usr/bin/python
+#
+# THIS FILE IS MANAGED BY PUPPET
+# puppet:///modules/openstack/liverty/virtscripts/makedomain
+#
+"""
+makedomain is a tool for creating subdomains of existing designate domains.
+
+Designate forbids creation of a subdomain when the superdomain already exists
+as part of a different project.  It does, however, support cross-project
+transfers of such domains.
+
+So, this is a helper script which creates domains in the wmflabsdotorg project,
+waits for them to become ACTIVE and then transfers them.
+
+"""
+
+import argparse
+import ldap
+import socket
+import subprocess
+import time
+import yaml
+
+from keystoneclient.auth.identity import generic
+from keystoneclient import session as keystone_session
+from designateclient.v2 import client
+
+def migrate(url, user, password, project, domain, ttl=120):
+args = argparser.parse_args()
+
+auth = generic.Password(
+auth_url=url,
+username=user,
+password=password,
+tenant_name='wmflabsdotorg')
+
+createSession = keystone_session.Session(auth=auth)
+createClient = client.Client(session=createSession)
+
+auth = generic.Password(
+auth_url=url,
+username=user,
+password=password,
+tenant_name=args.project)
+
+targetSession = keystone_session.Session(auth=auth)
+targetClient = client.Client(session=targetSession)
+
+# Create the zone in the initial wmflabsdotorg project.  This
+#  is needed since wmflabs.org lives in that project and
+#  designate prevents subdomain creation elsewhere.
+zone = createClient.zones.create(domain, email='r...@wmflabs.org', ttl=ttl)
+newzoneid = zone['id']
+status='PENDING'
+# Wait for the domain to actually exist before we transfer it
+while status == 'PENDING':
+zone = createClient.zones.get(domain)
+status = zone['status']
+time.sleep(2)
+
+transferRequest = createClient.zone_transfers.create_request(domain, 
project)
+transferId = transferRequest['id']
+transferKey = transferRequest['key']
+
+transferConfirm = targetClient.zone_transfers.accept_request(transferId, 
transferKey)
+
+if __name__ == "__main__":
+argparser = argparse.ArgumentParser('makesubdomain',
+description='''Create a subdomain of wmflabs.org in a project''')
+argparser.add_argument(
+'--designate-user',
+help='username for nova auth',
+default='novaadmin'
+)
+argparser.add_argument(
+'--designate-pass',
+help='password for nova auth',
+required=True,
+)
+argparser.add_argument(
+'--keystone-url',
+help='url for keystone auth and catalog',
+default='http://labcontrol1001.wikimedia.org:35357/v2.0'
+)
+argparser.add_argument(
+'--project',
+help='project for domain creation',
+required=True,
+)
+argparser.add_argument(
+'--domain',
+help='project for domain creation',
+required=True,
+)
+
+args = argparser.parse_args()
+
+migrate(args.keystone_url,
+args.designate_user,
+args.designate_pass,
+args.project,
+args.domain)

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

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

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


[MediaWiki-commits] [Gerrit] ganglia: no dependency for old upstart service on systemd - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: ganglia: no dependency for old upstart service on systemd
..

ganglia: no dependency for old upstart service on systemd

This service dependency is only valid on upstart systems.
When using systemd each aggregator is a separate service and this
one doesn't exist anymore and puppet will fail.

Bug:T124197
Change-Id: Ib3278fb515158d4f64337bff99daad1321697b88
---
M modules/ganglia/manifests/monitor/aggregator/instance.pp
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/modules/ganglia/manifests/monitor/aggregator/instance.pp 
b/modules/ganglia/manifests/monitor/aggregator/instance.pp
index 5a6e25f..2aaaef7 100644
--- a/modules/ganglia/manifests/monitor/aggregator/instance.pp
+++ b/modules/ganglia/manifests/monitor/aggregator/instance.pp
@@ -1,6 +1,10 @@
 define ganglia::monitor::aggregator::instance($monitored_site) {
-Ganglia::Monitor::Aggregator::Instance[$title] ->
-Service['ganglia-monitor-aggregator']
+
+# not needed anymore and breaks on systemd
+if $::initsystem == 'upstart' {
+Ganglia::Monitor::Aggregator::Instance[$title] ->
+Service['ganglia-monitor-aggregator']
+}
 
 include ganglia::configuration
 include network::constants

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

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

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


[MediaWiki-commits] [Gerrit] Move dbSetup=true; follow-up d920237 - change (mediawiki/core)

2016-03-14 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Move dbSetup=true; follow-up d920237
..

Move dbSetup=true; follow-up d920237

See 
https://gerrit.wikimedia.org/r/#/c/274643/8/tests/phpunit/MediaWikiTestCase.php

I unintentionally changed it so dbSetup wasn't always set to true
(it was in the early return case in the old code, but not the new)

Bug: T95870
Change-Id: I2119b020b88a61d15fe4dc55fe855fce4b6a
---
M tests/phpunit/MediaWikiTestCase.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/54/277454/1

diff --git a/tests/phpunit/MediaWikiTestCase.php 
b/tests/phpunit/MediaWikiTestCase.php
index f3306be..045c3d4 100644
--- a/tests/phpunit/MediaWikiTestCase.php
+++ b/tests/phpunit/MediaWikiTestCase.php
@@ -764,6 +764,8 @@
return;
}
 
+   self::$dbSetup = true;
+
if ( !self::setupDatabaseWithTestPrefix( $db, $prefix ) ) {
return;
}
@@ -773,8 +775,6 @@
if ( $db->getType() == 'oracle' ) {
$db->query( 'BEGIN FILL_WIKI_INFO; END;' );
}
-
-   self::$dbSetup = true;
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Fix: test_no_qualifiers failing due to Coordinate's precision - change (pywikibot/core)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix: test_no_qualifiers failing due to Coordinate's precision
..


Fix: test_no_qualifiers failing due to Coordinate's precision

Return None instead of a ValueError when both
dim and precision are set to None in Coordinate.

Bug: T129834
Change-Id: I258629a6e75207322a94d5312e7eb6225f11c572
---
M pywikibot/__init__.py
M tests/wikibase_tests.py
2 files changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index 74ad87c..c80c9e1 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -355,7 +355,7 @@
 @rtype: float or None
 """
 if self._dim is None and self._precision is None:
-raise ValueError('No values set for dim or precision')
+return None
 if self._precision is None and self._dim is not None:
 radius = 6378137  # TODO: Support other globes
 self._precision = math.degrees(
diff --git a/tests/wikibase_tests.py b/tests/wikibase_tests.py
index a0d8265..7b747e3 100644
--- a/tests/wikibase_tests.py
+++ b/tests/wikibase_tests.py
@@ -155,8 +155,6 @@
 self.assertIsInstance(y.precision, float)
 z = pywikibot.Coordinate(site=repo, lat=12.0, lon=13.0)
 with self.assertRaises(ValueError):
-z.precision
-with self.assertRaises(ValueError):
 z.precisionToDim()
 
 def test_WbTime(self):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I258629a6e75207322a94d5312e7eb6225f11c572
Gerrit-PatchSet: 6
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Darthbhyrava 
Gerrit-Reviewer: Darthbhyrava 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Admin UI: Move JS and CSS for campaign pager to RL module - change (mediawiki...CentralNotice)

2016-03-14 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: Admin UI: Move JS and CSS for campaign pager to RL module
..

Admin UI: Move JS and CSS for campaign pager to RL module

Bug: T128869
Change-Id: I5773a25538cab95deff3f06ce0301b4a7613b2ff
---
M CentralNotice.modules.php
M resources/infrastructure/adminui.common.css
M resources/infrastructure/centralnotice.css
M resources/infrastructure/centralnotice.js
A resources/infrastructure/ext.centralNotice.adminUi.campaignPager.css
A resources/infrastructure/ext.centralNotice.adminUi.campaignPager.js
M special/SpecialCentralNotice.php
M special/SpecialCentralNoticeBanners.php
8 files changed, 52 insertions(+), 39 deletions(-)


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

diff --git a/CentralNotice.modules.php b/CentralNotice.modules.php
index dbc2fe8..1a79eb8 100644
--- a/CentralNotice.modules.php
+++ b/CentralNotice.modules.php
@@ -66,6 +66,13 @@
)
 );
 
+$wgResourceModules[ 'ext.centralNotice.adminUi.campaignPager' ] = array(
+   'localBasePath' => $dir . '/resources',
+   'remoteExtPath' => 'CentralNotice/resources',
+   'scripts'   => 
'infrastructure/ext.centralNotice.adminUi.campaignPager.js',
+   'styles'=> 
'infrastructure/ext.centralNotice.adminUi.campaignPager.css',
+);
+
 $wgResourceModules[ 'ext.centralNotice.adminUi.bannerManager' ] = array(
'localBasePath' => $dir . '/resources',
'remoteExtPath' => 'CentralNotice/resources',
diff --git a/resources/infrastructure/adminui.common.css 
b/resources/infrastructure/adminui.common.css
index a1d0c78..9495750 100644
--- a/resources/infrastructure/adminui.common.css
+++ b/resources/infrastructure/adminui.common.css
@@ -70,9 +70,4 @@
 }
 #mw-htmlform-banner-list .mw-label {
display: none;
-}
-
-/* --- Archival --- */
-.cn-archived-item {
-   display: none;
 }
\ No newline at end of file
diff --git a/resources/infrastructure/centralnotice.css 
b/resources/infrastructure/centralnotice.css
index 6a90c02..f6d33a5 100644
--- a/resources/infrastructure/centralnotice.css
+++ b/resources/infrastructure/centralnotice.css
@@ -143,17 +143,4 @@
padding: 0.5em;
background-color: #FF;
border: 2px solid #FF;
-}
-
-/* for campaign pager */
-
-/* Must override .mw-datatable td, rule in skins/common/shared.css */
-tr.cn-active-campaign td {
-   background-color: #ddffdd;
-}
-
-.cn-formsection-emphasis {
-   padding: 0.5em;
-   background-color: #FF;
-   border: 1px solid #2F6FAB;
 }
\ No newline at end of file
diff --git a/resources/infrastructure/centralnotice.js 
b/resources/infrastructure/centralnotice.js
index 7b81bb5..25d728a 100644
--- a/resources/infrastructure/centralnotice.js
+++ b/resources/infrastructure/centralnotice.js
@@ -97,13 +97,6 @@
}
});
 
-   // Special:CentralNotice; keep data-sort-value attributes for
-   // jquery.tablesorter in sync
-   $( '.mw-cn-input-check-sort' ).on( 'change click blur', function () {
-   $(this).parent( 'td' )
-   .data( 'sortValue', Number( this.checked ) );
-   } );
-
// Bucketing! Disable bucket selectors if #buckets is not checked.
$( '#buckets' ).change( function () {
 var numBuckets = parseInt( this[this.selectedIndex].value, 10 ),
@@ -125,19 +118,5 @@
 });
 }
} ).trigger( 'change' );
-
-   // If the Campaign pager is present, show or hide archived campaigns
-   var $showArchived = $( '#centralnotice-showarchived' );
-
-   if ( $showArchived.length > 0 ) {
-
-   $showArchived.click( function () {
-   if ( $( this ).prop( 'checked' ) ) {
-   $( '.cn-archived-item' ).show();
-   } else {
-   $( '.cn-archived-item' ).hide();
-   }
-   } );
-   }
 } );
 } )( mediaWiki, jQuery );
diff --git 
a/resources/infrastructure/ext.centralNotice.adminUi.campaignPager.css 
b/resources/infrastructure/ext.centralNotice.adminUi.campaignPager.css
new file mode 100644
index 000..e81dcfc
--- /dev/null
+++ b/resources/infrastructure/ext.centralNotice.adminUi.campaignPager.css
@@ -0,0 +1,14 @@
+/* Must override .mw-datatable td, rule in skins/common/shared.css */
+tr.cn-active-campaign td {
+   background-color: #ddffdd;
+}
+
+.cn-archived-item {
+   display: none;
+}
+
+.cn-formsection-emphasis {
+   padding: 0.5em;
+   background-color: #FF;
+   border: 1px solid #2F6FAB;
+}
diff --git 
a/resources/infrastructure/ext.centralNotice.adminUi.campaignPager.js 
b/resources/infrastructure/ext.centralNotice.adminUi.campaignPager.js
new file mode 100644
index 000..619d70d
--- 

[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...Auth_remoteuser)

2016-03-14 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I6c15abe7d8bfe00d36ed02da0c761a27972fc61d
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Auth_remoteuser 
refs/changes/95/277295/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c15abe7d8bfe00d36ed02da0c761a27972fc61d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Auth_remoteuser
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] ganglia: don't install old init scripts if systemd is used - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: ganglia: don't install old init scripts if systemd is used
..


ganglia: don't install old init scripts if systemd is used

These scripts used to be what starts multiple instances of the
ganglia-monitor-aggregator service on older systems with upstart.

Since we are using systemd now/soon, we start each instance as separate
service from a unit file template, using the proper systemd/puppet
abstraction and this file is not needed and conflicts with puppet
dependencies on the service name.

Bug:T124197
Change-Id: Ibdb63a4b900d6dea8723f4eb65b7a66f5503a0cc
---
M modules/ganglia/manifests/monitor/aggregator.pp
1 file changed, 20 insertions(+), 13 deletions(-)

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



diff --git a/modules/ganglia/manifests/monitor/aggregator.pp 
b/modules/ganglia/manifests/monitor/aggregator.pp
index d82c860..d028dfc 100644
--- a/modules/ganglia/manifests/monitor/aggregator.pp
+++ b/modules/ganglia/manifests/monitor/aggregator.pp
@@ -9,20 +9,27 @@
 mode   => '0555',
 }
 
-file { '/etc/init/ganglia-monitor-aggregator.conf':
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator.conf",
-before => Service['ganglia-monitor-aggregator'],
-}
+# These files used to start multiple instances of the aggregator service.
+# Since using systemd they are not needed, now each instance is a separate
+# service created from a unit file template.
+# T124197 - see aggregator/instance.pp now
+if $::initsystem == 'upstart' {
+file { '/etc/init/ganglia-monitor-aggregator.conf':
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator.conf",
+before => Service['ganglia-monitor-aggregator'],
+}
 
-file { '/etc/init/ganglia-monitor-aggregator-instance.conf':
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator-instance.conf",
-before => Service['ganglia-monitor-aggregator'],
+file { '/etc/init/ganglia-monitor-aggregator-instance.conf':
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator-instance.conf",
+before => Service['ganglia-monitor-aggregator'],
+}
+
 }
 
 define site_instances() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdb63a4b900d6dea8723f4eb65b7a66f5503a0cc
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: Mark Bergsma 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Test Collection extension on zh.wikipedia.beta.wmflabs.org - change (operations/mediawiki-config)

2016-03-14 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Test Collection extension on zh.wikipedia.beta.wmflabs.org
..

Test Collection extension on zh.wikipedia.beta.wmflabs.org

The Chinese Wikipedia community would like to use the Collection
extension to get the book creator feature, but without the PDF
rendering.

Bug: T128425
Change-Id: I628a28e0232c731d6cee0005001d12e3c88b2a57
---
M wmf-config/InitialiseSettings-labs.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index d5a90b6..9ac630d 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -633,5 +633,10 @@
'default' => 'yes',
'wikidatawiki' => 'no',
),
+   // Test the extension Collection in other languages for book 
creator,
+   // which avoids the bugs related to the PDF generator.
+   'wmgUseCollection' => array(
+   'zhwiki' => true, // T128425
+   ),
);
 } # wmflLabsSettings()

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

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

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


[MediaWiki-commits] [Gerrit] Hygiene: consolidate queries for display density to a single... - change (apps...wikipedia)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Hygiene: consolidate queries for display density to a single 
source.
..


Hygiene: consolidate queries for display density to a single source.

This also consolidates queries for display width and height.

Change-Id: Ie3804727b4617492b594472eec62ae4f97889787
---
M app/src/main/java/org/wikipedia/WikipediaApp.java
M app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java
M app/src/main/java/org/wikipedia/page/DisambigListAdapter.java
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/ToCHandler.java
M app/src/main/java/org/wikipedia/page/bottomcontent/BottomContentHandler.java
M app/src/main/java/org/wikipedia/page/leadimages/LeadImagesHandler.java
M app/src/main/java/org/wikipedia/page/linkpreview/SwipeableBottomDialog.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/search/SearchBarHideHandler.java
M app/src/main/java/org/wikipedia/util/DimenUtil.java
M app/src/main/java/org/wikipedia/views/ObservableWebView.java
M app/src/main/java/org/wikipedia/views/ViewUtil.java
M app/src/main/java/org/wikipedia/widgets/WidgetProviderFeaturedPage.java
M app/src/main/java/org/wikipedia/wiktionary/WiktionaryDialog.java
M app/src/main/java/org/wikipedia/zero/WikipediaZeroHandler.java
17 files changed, 45 insertions(+), 62 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/WikipediaApp.java 
b/app/src/main/java/org/wikipedia/WikipediaApp.java
index f971116..3b6ee03 100644
--- a/app/src/main/java/org/wikipedia/WikipediaApp.java
+++ b/app/src/main/java/org/wikipedia/WikipediaApp.java
@@ -3,7 +3,6 @@
 import android.annotation.TargetApi;
 import android.app.Activity;
 import android.app.Application;
-import android.content.res.Resources;
 import android.graphics.Color;
 import android.graphics.drawable.Drawable;
 import android.os.Build;
@@ -68,11 +67,6 @@
 
 public class WikipediaApp extends Application {
 private static final int EVENT_LOG_TESTING_ID = new 
Random().nextInt(Integer.MAX_VALUE);
-
-private float screenDensity;
-public float getScreenDensity() {
-return screenDensity;
-}
 
 public static final int FONT_SIZE_MULTIPLIER_MIN = -5;
 public static final int FONT_SIZE_MULTIPLIER_MAX = 8;
@@ -166,9 +160,7 @@
 Fresco.initialize(this);
 bus = new Bus();
 
-final Resources resources = getResources();
-ViewAnimations.init(resources);
-screenDensity = resources.getDisplayMetrics().density;
+ViewAnimations.init(getResources());
 currentTheme = unmarshalCurrentTheme();
 
 appLanguageState = new AppLanguageState(this);
diff --git a/app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java 
b/app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java
index a986285..41152f5 100644
--- a/app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java
+++ b/app/src/main/java/org/wikipedia/analytics/PageScrollFunnel.java
@@ -4,12 +4,12 @@
 
 import org.json.JSONObject;
 import org.wikipedia.WikipediaApp;
+import org.wikipedia.util.DimenUtil;
 
 public class PageScrollFunnel extends TimedFunnel {
 private static final String SCHEMA_NAME = "MobileWikiAppPageScroll";
 private static final int REV_ID = 14591606;
 
-private final WikipediaApp app;
 private final int pageId;
 private int viewportHeight;
 private int pageHeight;
@@ -19,7 +19,6 @@
 
 public PageScrollFunnel(WikipediaApp app, int pageId) {
 super(app, SCHEMA_NAME, REV_ID, app.isProdRelease() ? 
Funnel.SAMPLE_LOG_100 : Funnel.SAMPLE_LOG_ALL);
-this.app = app;
 this.pageId = pageId;
 }
 
@@ -37,7 +36,7 @@
 }
 
 public void setPageHeight(int height) {
-this.pageHeight = (int) (height * app.getScreenDensity());
+this.pageHeight = (int) (height * DimenUtil.getDensityScalar());
 }
 
 public void setViewportHeight(int height) {
@@ -47,9 +46,9 @@
 public void logDone() {
 log(
 "pageID", pageId,
-"pageHeight", (int) (pageHeight / app.getScreenDensity()),
-"scrollFluxDown", (int) (scrollFluxDown / 
app.getScreenDensity()),
-"scrollFluxUp", (int) (scrollFluxUp / app.getScreenDensity()),
+"pageHeight", (int) (pageHeight / 
DimenUtil.getDensityScalar()),
+"scrollFluxDown", (int) (scrollFluxDown / 
DimenUtil.getDensityScalar()),
+"scrollFluxUp", (int) (scrollFluxUp / 
DimenUtil.getDensityScalar()),
 "maxPercentViewed", getMaxPercentViewed()
 );
 }
diff --git a/app/src/main/java/org/wikipedia/page/DisambigListAdapter.java 

[MediaWiki-commits] [Gerrit] ganglia: don't install old init script if systemd is used - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: ganglia: don't install old init script if systemd is used
..

ganglia: don't install old init script if systemd is used

This custom script used to be what starts multiple instances of the
ganglia-monitor-aggregator service on older systems with upstart.

Since we are using systemd now/soon, we start each instance as separate
service from a unit file template, using the proper systemd/puppet
abstraction and this file is not needed and conflicts with puppet
dependencies on the service name.

Bug:T124197
Change-Id: Ibdb63a4b900d6dea8723f4eb65b7a66f5503a0cc
---
M modules/ganglia/manifests/monitor/aggregator.pp
1 file changed, 11 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/51/277451/1

diff --git a/modules/ganglia/manifests/monitor/aggregator.pp 
b/modules/ganglia/manifests/monitor/aggregator.pp
index d82c860..942f2d3 100644
--- a/modules/ganglia/manifests/monitor/aggregator.pp
+++ b/modules/ganglia/manifests/monitor/aggregator.pp
@@ -9,12 +9,17 @@
 mode   => '0555',
 }
 
-file { '/etc/init/ganglia-monitor-aggregator.conf':
-owner  => 'root',
-group  => 'root',
-mode   => '0444',
-source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator.conf",
-before => Service['ganglia-monitor-aggregator'],
+# this file used to start multiple instances of the aggregator service
+# since using systemd this is not needed, now each instance is a separate
+# service created from a unit file template
+if $::initsystem == 'upstart' {
+file { '/etc/init/ganglia-monitor-aggregator.conf':
+owner  => 'root',
+group  => 'root',
+mode   => '0444',
+source => 
"puppet:///modules/${module_name}/upstart/ganglia-monitor-aggregator.conf",
+before => Service['ganglia-monitor-aggregator'],
+}
 }
 
 file { '/etc/init/ganglia-monitor-aggregator-instance.conf':

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

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

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


[MediaWiki-commits] [Gerrit] Avoid legacy overhead in mobile web experience - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Avoid legacy overhead in mobile web experience
..


Avoid legacy overhead in mobile web experience

Avoid request overhead for legacy modules by
disabling them in the mobile web domain.
See also I9e6342bf71b7204c76db5bd066167a729596f908

Change-Id: Ie676caa0b8f60e3d33c88dfbfceb7bc435ab8f47
---
M wmf-config/mobile.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 4654473..1669004 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -66,7 +66,11 @@
$wgMFNoMobilePages = $wmgMFNoMobilePages;
 
$wgHooks['EnterMobileMode'][] = function() {
-   global $wgCentralAuthCookieDomain, $wgHooks, 
$wgResponsiveImages, $wgRenderHashAppend;
+   global $wgCentralAuthCookieDomain, $wgHooks, 
$wgResponsiveImages, $wgRenderHashAppend,
+   $wgIncludeLegacyJavaScript;
+
+   // Disable loading of legacy wikibits in the mobile web 
experience
+   $wgIncludeLegacyJavaScript = false;
 
// Disable responsive images on mobile web (T119797), but not 
on apps.
if ( !defined( 'MW_API' ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie676caa0b8f60e3d33c88dfbfceb7bc435ab8f47
Gerrit-PatchSet: 5
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VitalSigns dashboard reports metrics to production piwik - change (analytics/dashiki)

2016-03-14 Thread Nuria (Code Review)
Nuria has uploaded a new change for review.

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

Change subject: VitalSigns dashboard reports metrics to production piwik
..

VitalSigns dashboard reports metrics to production piwik

Correcting whitespace

Bug: T128866
Change-Id: I0d412332016a8e00c3cfdd94e98c90c6082c9e30
---
M config.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/dashiki 
refs/changes/99/277299/1

diff --git a/config.yaml b/config.yaml
index b59c380..5ab8a5f 100644
--- a/config.yaml
+++ b/config.yaml
@@ -3,8 +3,8 @@
 vital-signs:
 layout: metrics-by-project
 config: VitalSigns
-piwikHost:
-piwikId:
+piwikHost: piwik.wikimedia.org
+piwikId: 6
 hostname: vital-signs-test.wmflabs.org
 subfolder:
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d412332016a8e00c3cfdd94e98c90c6082c9e30
Gerrit-PatchSet: 1
Gerrit-Project: analytics/dashiki
Gerrit-Branch: master
Gerrit-Owner: Nuria 

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


[MediaWiki-commits] [Gerrit] API - change (mediawiki...Kartographer)

2016-03-14 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: API
..

API

Bug: T129430
Change-Id: I1467376cf4aff0fe5ce5b5ec1e3ce1ac17e4d187
---
M extension.json
M includes/ApiKartographer.php
2 files changed, 82 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/50/277450/1

diff --git a/extension.json b/extension.json
index 0f87744..ab68c98 100644
--- a/extension.json
+++ b/extension.json
@@ -13,6 +13,7 @@
]
},
"AutoloadClasses": {
+   "Kartographer\\ApiKartographer": "includes/ApiKartographer.php",
"Kartographer\\CoordFormatter": "includes/CoordFormatter.php",
"Kartographer\\DataModule": "includes/DataModule.php",
"Kartographer\\Hooks": "includes/Hooks.php",
@@ -21,6 +22,9 @@
"Kartographer\\Tag\\MapLink": "includes/Tag/MapLink.php",
"Kartographer\\Tag\\TagHandler": "includes/Tag/TagHandler.php"
},
+   "APIModules": {
+   "kartographer": "Kartographer\\ApiKartographer"
+   },
"ResourceModules": {
"ext.kartographer": {
"class": "Kartographer\\DataModule"
diff --git a/includes/ApiKartographer.php b/includes/ApiKartographer.php
index d91db1a..f9b342d 100644
--- a/includes/ApiKartographer.php
+++ b/includes/ApiKartographer.php
@@ -11,11 +11,12 @@
 
 use ApiBase;
 use FormatJson;
+use LogicException;
+use ParserOptions;
 use Title;
 
 /**
- * This class implements action=kartographer api, allowing client-side map 
drawing.
- * Class ApiKartographer
+ * This class implements action=kartographer api, allowing client-side map 
drawing
  * @package Kartographer
  */
 class ApiKartographer extends ApiBase {
@@ -23,17 +24,69 @@
public function execute() {
$params = $this->extractRequestParams();
 
+   //$this->requireOnlyOneParameter( $params, [ 'groups', 
'validate' ] );
$title = Title::newFromText( $params['title'] );
-   if ( !$title || !$title->exists() || !$title->userCan( 'read', 
$this->getUser() ) ) {
+   if ( $title && !$title->userCan( 'read', $this->getUser() ) ) {
$this->dieUsage( "Invalid title given.", "invalidtitle" 
);
}
 
-   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', array(
+   if ( isset( $params['validate'] ) ) {
+   $this->validateJson( $title, $params['validate'] );
+   } elseif ( isset( $params['groups'] ) ) {
+   $this->getGroups( $title, $params['groups'] );
+   } else {
+   throw new LogicException( 'This should not happen' );
+   }
+
+   }
+
+   private function validateJson( $title, $text ) {
+   if ( !$title ) {
+   $title = Title::newFromText( 'Dummy title (called from 
ApiKartographer)' );
+   }
+
+   if ( !$this->getRequest()->wasPosted() ) {
+   $this->dieUsage( 'mustbeposted', 'This request must be 
POSTed' );
+   }
+
+
+   // Create a brand new parser to guarantee pollution-freeness
+   global $wgParser;
+   $text = "$text";
+   $parserOptions = ParserOptions::newFromContext( $this );
+   $output = $wgParser->parse( $text, $title, $parserOptions );
+   $data = $output->getExtensionData( 'kartographer_data' );
+   if ( $data === null ) {
+   $this->getResult()->addValue( null, 
$this->getModuleName(),
+   [ 'error' => $output->getText() ] );
+   } else {
+   $result = [ ];
+   foreach ( $data as $chunk ) {
+   $result = array_merge( $result, $chunk );
+   }
+   $this->getResult()
+   ->addValue( null, $this->getModuleName(),
+   [ 'sanitized' => FormatJson::encode( 
$result, false, FormatJson::ALL_OK ) ] );
+   }
+   }
+
+   /**
+* Serves requests for geometries
+*
+* @param Title $title
+* @param string[] $groups
+*/
+   private function getGroups( $title, array $groups ) {
+   if ( !$title || !$title->exists() ) {
+   $this->dieUsage( "Invalid title given.", "invalidtitle" 
);
+   }
+
+   $ppValue = $this->getDB()->selectField( 'page_props', 
'pp_value', [
'pp_page' => $title->getArticleID(),
'pp_propname' => 'kartographer',
-   ), __METHOD__ );
+   ], 

[MediaWiki-commits] [Gerrit] CRM-18106 create activity against contact deleted by merge - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18106 create activity against contact deleted by merge
..

CRM-18106 create activity against contact deleted by merge

This is already merged to core

Change-Id: I6d5e17ba018c93cfb45e55cf6ee1c3fbdf648037
---
M CRM/Dedupe/Merger.php
1 file changed, 32 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/49/277449/1

diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php
index 53a046b..aa325d3 100644
--- a/CRM/Dedupe/Merger.php
+++ b/CRM/Dedupe/Merger.php
@@ -1589,28 +1589,19 @@
   }
 
   CRM_Contact_BAO_Contact::createProfileContact($submitted, 
CRM_Core_DAO::$_nullArray, $mainId);
-  unset($submitted);
 }
 
 CRM_Utils_Hook::post('merge', 'Contact', $mainId, 
CRM_Core_DAO::$_nullObject);
-
-// Create activity for merge.
-$messageActivity = ts('Contact ID %1 has been merged and deleted.', 
array(1 => $otherId));
-civicrm_api3('activity', 'create', array(
-  'subject' => $messageActivity,
-  'source_contact_id' => 
CRM_Core_Session::singleton()->getLoggedInContactID(),
-  'target_contact_id' => $mainId,
-  'activity_type_id' => 'Contact Merged',
-  'status_id' => 'Completed',
-  'priority_id' => 'Normal',
-));
+self::createMergeActivities($mainId, $otherId);
 
 return TRUE;
   }
 
   /**
+   * Get fields in the contact table suitable for merging.
+   *
* @return array
-   *   Array of field names which will be compared, so everything except ID.
+   *   Array of field names to be potentially merged.
*/
   public static function getContactFields() {
 $contactFields = CRM_Contact_DAO_Contact::fields();
@@ -1687,4 +1678,32 @@
 }
   }
 
+  /**
+   * Create activities tracking the merge on affected contacts.
+   *
+   * @param int $mainId
+   * @param int $otherId
+   *
+   * @throws \CiviCRM_API3_Exception
+   */
+  public static function createMergeActivities($mainId, $otherId) {
+$params = array(
+  1 => $otherId,
+  2 => $mainId,
+);
+$activity = civicrm_api3('activity', 'create', array(
+  'subject' => ts('Contact ID %1 has been merged and deleted.', $params),
+  'target_contact_id' => $mainId,
+  'activity_type_id' => 'Contact Merged',
+  'status_id' => 'Completed',
+));
+civicrm_api3('activity', 'create', array(
+  'subject' => ts('Contact ID %1 has been merged into Contact ID %2 and 
deleted.', $params),
+  'target_contact_id' => $otherId,
+  'activity_type_id' => 'Contact Deleted by Merge',
+  'parent_id' => $activity['id'],
+  'status_id' => 'Completed',
+));
+  }
+
 }

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

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

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


[MediaWiki-commits] [Gerrit] CRM-18134 move api merge activity contact function to the BAO - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18134 move api merge activity contact function to the BAO
..

CRM-18134 move api merge activity contact function to the BAO

These changes are merged to master already

Change-Id: I0462e17792fc25b98546ae1a17b6b3470705f884
---
M CRM/Contact/Form/Merge.php
M CRM/Dedupe/Merger.php
M api/v3/Contact.php
3 files changed, 35 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/48/277448/1

diff --git a/CRM/Contact/Form/Merge.php b/CRM/Contact/Form/Merge.php
index 4c7cf41..ec750bf 100644
--- a/CRM/Contact/Form/Merge.php
+++ b/CRM/Contact/Form/Merge.php
@@ -333,20 +333,6 @@
 $message = '' . ts('%1 has been updated.', array(1 => $name)) . 
'' . ts('Contact ID %1 has been deleted.', array(1 => $this->_oid)) . 
'';
 CRM_Core_Session::setStatus($message, ts('Contacts Merged'), 'success');
 
-//create activity for merge
-//To do: this should be refactored into BAO layer at some point.
-$messageActivity = ts('Contact ID %1 has been merged and deleted.', 
array(1 => $this->_oid));
-$activityParams = array(
-  'subject' => $messageActivity,
-  'source_contact_id' => $session->get('userID'),
-  'target_contact_id' => $this->_cid,
-  'activity_type_id' => 
CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 
'activity_type_id', 'Contact Merged'),
-  'status_id' => 'Completed',
-  'priority_id' => 'Normal',
-  'activity_date_time' => date('YmdHis'),
-);
-civicrm_api3('activity', 'create', $activityParams);
-
 $url = CRM_Utils_System::url('civicrm/contact/view', 
"reset=1={$this->_cid}");
 if (!empty($formValues['_qf_Merge_submit'])) {
   $listParamsURL = "reset=1=update={$this->_rgid}";
diff --git a/CRM/Dedupe/Merger.php b/CRM/Dedupe/Merger.php
index 3310878..53a046b 100644
--- a/CRM/Dedupe/Merger.php
+++ b/CRM/Dedupe/Merger.php
@@ -1538,12 +1538,6 @@
   CRM_Core_BAO_CustomValueTable::setValues($viewOnlyCustomFields);
 }
 
-//  Delete other contact & update prev-next caching
-$otherParams = array(
-  'contact_id' => $otherId,
-  'id' => $otherId,
-  'version' => 3,
-);
 if (CRM_Core_Permission::check('merge duplicate contacts') &&
   CRM_Core_Permission::check('delete contacts')
 ) {
@@ -1553,15 +1547,13 @@
 CRM_Core_DAO::executeQuery($query);
   }
 
-  civicrm_api('contact', 'delete', $otherParams);
+  civicrm_api3('contact', 'delete', array('id' => $otherId));
   CRM_Core_BAO_PrevNextCache::deleteItem($otherId);
 }
 // FIXME: else part
-/* else { */
-
-/* CRM_Core_Session::setStatus( ts('Do not have sufficient 
permission to delete duplicate contact.') ); */
-
-/* } */
+// else {
+//  CRM_Core_Session::setStatus( ts('Do not have sufficient permission to 
delete duplicate contact.') );
+// }
 
 // CRM-15681 merge sub_types
 if ($other_sub_types = CRM_Utils_array::value('contact_sub_type', 
$migrationInfo['other_details'])) {
@@ -1602,6 +1594,17 @@
 
 CRM_Utils_Hook::post('merge', 'Contact', $mainId, 
CRM_Core_DAO::$_nullObject);
 
+// Create activity for merge.
+$messageActivity = ts('Contact ID %1 has been merged and deleted.', 
array(1 => $otherId));
+civicrm_api3('activity', 'create', array(
+  'subject' => $messageActivity,
+  'source_contact_id' => 
CRM_Core_Session::singleton()->getLoggedInContactID(),
+  'target_contact_id' => $mainId,
+  'activity_type_id' => 'Contact Merged',
+  'status_id' => 'Completed',
+  'priority_id' => 'Normal',
+));
+
 return TRUE;
   }
 
diff --git a/api/v3/Contact.php b/api/v3/Contact.php
index 87d9a1c..ccdc5ed 100644
--- a/api/v3/Contact.php
+++ b/api/v3/Contact.php
@@ -1006,36 +1006,45 @@
  * @throws CiviCRM_API3_Exception
  */
 function civicrm_api3_contact_merge($params) {
-  $mode = CRM_Utils_Array::value('mode', $params, 'safe');
-  $autoFlip = CRM_Utils_Array::value('auto_flip', $params, TRUE);
-
-  $dupePairs = array(array(
-'srcID' => CRM_Utils_Array::value('main_id', $params),
-'dstID' => CRM_Utils_Array::value('other_id', $params),
-  ));
-  if (($result = CRM_Dedupe_Merger::merge($dupePairs, array(), $mode, 
$autoFlip)) != FALSE) {
+  if (($result = CRM_Dedupe_Merger::merge(array(
+  array(
+'srcID' => $params['to_remove_id'],
+'dstID' => $params['to_keep_id'],
+  ),
+), array(), $params['mode'], $params['auto_flip'])) != FALSE) {
 return civicrm_api3_create_success($result, $params);
   }
   throw new CiviCRM_API3_Exception('Merge failed');
 }
 
 /**
- * Adjust metadata for contact_proximity api function.
+ * Adjust metadata for contact_merge api function.
  *
  * @param array $params
  */
 function 

[MediaWiki-commits] [Gerrit] Consistently switch to __DIR__ - change (mediawiki...SemanticInternalObjects)

2016-03-14 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Consistently switch to __DIR__
..


Consistently switch to __DIR__

Change-Id: I80542791c118c83b5a9b0f8d342f43a41fe3673f
---
M README
M SemanticInternalObjects.php
2 files changed, 14 insertions(+), 16 deletions(-)

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



diff --git a/README b/README
index b08e51f..e6f13e4 100644
--- a/README
+++ b/README
@@ -4,7 +4,7 @@
 Yaron Koren
 
 This is free software licensed under the GNU General Public License. Please
-see http://www.gnu.org/copyleft/gpl.html for further details, including the
+see https://www.gnu.org/copyleft/gpl.html for further details, including the
 full text and terms of the license.
 
 == Overview ==
@@ -62,7 +62,7 @@
 internal objects from users, since those names are meaningless.
 
 For more information, see the extension homepage at:
-http://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
+https://www.mediawiki.org/wiki/Extension:Semantic_Internal_Objects
 
 == Requirements ==
 
diff --git a/SemanticInternalObjects.php b/SemanticInternalObjects.php
index d10df2a..d7911fa 100644
--- a/SemanticInternalObjects.php
+++ b/SemanticInternalObjects.php
@@ -26,8 +26,6 @@
'license-name' => 'GPL-2.0+'
 );
 
-$siogIP = dirname( __FILE__ );
-
 // If we're using SMWSQLStore3 (introduced in SMW 1.8), just
 // call SMW's own #subobject, which has a similar, though not
 // identical, syntax.
@@ -44,27 +42,27 @@
$wgHooks['TitleMoveComplete'][] = 'SIOHandler::handlePageMove';
$wgHooks['smwRefreshDataJobs'][] = 
'SIOHandler::handleRefreshingOfInternalObjects';
$wgHooks['smwAddToRDFExport'][] = 'SIOSQLStore::createRDF';
-   $wgAutoloadClasses['SIOSQLStore'] = $siogIP . 
'/SemanticInternalObjects_body.php';
+   $wgAutoloadClasses['SIOSQLStore'] = __DIR__ . 
'/SemanticInternalObjects_body.php';
if ( class_exists( 'SMWDIWikiPage' ) ) {
// SMW >= 1.6
-   $wgAutoloadClasses['SIOInternalObjectValue'] = $siogIP . 
'/SIO_RDFClasses2.php';
-   $wgAutoloadClasses['SIOTitle'] = $siogIP . 
'/SIO_RDFClasses2.php';
+   $wgAutoloadClasses['SIOInternalObjectValue'] = __DIR__ . 
'/SIO_RDFClasses2.php';
+   $wgAutoloadClasses['SIOTitle'] = __DIR__ . 
'/SIO_RDFClasses2.php';
} else {
-   $wgAutoloadClasses['SIOInternalObjectValue'] = $siogIP . 
'/SIO_RDFClasses.php';
-   $wgAutoloadClasses['SIOTitle'] = $siogIP . 
'/SIO_RDFClasses.php';
-   $wgAutoloadClasses['SIOExporter'] = $siogIP . 
'/SIO_RDFClasses.php';
+   $wgAutoloadClasses['SIOInternalObjectValue'] = __DIR__ . 
'/SIO_RDFClasses.php';
+   $wgAutoloadClasses['SIOTitle'] = __DIR__ . 
'/SIO_RDFClasses.php';
+   $wgAutoloadClasses['SIOExporter'] = __DIR__ . 
'/SIO_RDFClasses.php';
}
 }
 
 $wgHooks['PageSchemasRegisterHandlers'][] = 'SIOPageSchemas::registerClass';
 
 $wgMessagesDirs['SemanticInternalObjects'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['SemanticInternalObjects'] = $siogIP . 
'/SemanticInternalObjects.i18n.php';
-$wgExtensionMessagesFiles['SemanticInternalObjectsMagic'] = $siogIP . 
'/SemanticInternalObjects.i18n.magic.php';
-$wgAutoloadClasses['SIOHandler'] = $siogIP . 
'/SemanticInternalObjects_body.php';
-$wgAutoloadClasses['SIOInternalObject'] = $siogIP . 
'/SemanticInternalObjects_body.php';
-$wgAutoloadClasses['SIOSubobjectAlias'] = $siogIP . '/SIO_SubobjectAlias.php';
-$wgAutoloadClasses['SIOPageSchemas'] = $siogIP . '/SIO_PageSchemas.php';
+$wgExtensionMessagesFiles['SemanticInternalObjects'] = __DIR__ . 
'/SemanticInternalObjects.i18n.php';
+$wgExtensionMessagesFiles['SemanticInternalObjectsMagic'] = __DIR__ . 
'/SemanticInternalObjects.i18n.magic.php';
+$wgAutoloadClasses['SIOHandler'] = __DIR__ . 
'/SemanticInternalObjects_body.php';
+$wgAutoloadClasses['SIOInternalObject'] = __DIR__ . 
'/SemanticInternalObjects_body.php';
+$wgAutoloadClasses['SIOSubobjectAlias'] = __DIR__ . '/SIO_SubobjectAlias.php';
+$wgAutoloadClasses['SIOPageSchemas'] = __DIR__ . '/SIO_PageSchemas.php';
 
 function siofRegisterParserFunctions( &$parser ) {
$parser->setFunctionHook( 'set_internal', array( 'SIOHandler', 
'doSetInternal' ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80542791c118c83b5a9b0f8d342f43a41fe3673f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticInternalObjects
Gerrit-Branch: master
Gerrit-Owner: Kghbln 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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

[MediaWiki-commits] [Gerrit] Add CiviCRM activity to put against the deleted contact - change (wikimedia...crm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Add CiviCRM activity to put against the deleted contact
..

Add CiviCRM activity to put against the deleted contact

Bug: T119246
Change-Id: I805b3a3afa2ad0919f397406390922b93c26edcf
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/47/277447/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index f5e6df7..66b2949 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -1945,3 +1945,19 @@
 wmf_civicrm_bootstrap_civi();
 wmf_civicrm_create_option_values( 'payment_instrument', 
$payment_instruments );
 }
+
+/**
+ * Add contact deleted by merge activity.
+ *
+ * CRM-18106 / T119246.
+ */
+function wmf_civicrm_update_7200() {
+  civicrm_initialize();
+  CRM_Core_BAO_OptionValue::ensureOptionValueExists(array(
+'option_group_id' => 'activity_type',
+'name' => 'Contact Deleted by Merge',
+'label' => ts('Contact Deleted by Merge'),
+'description' => ts('Contact was merged into another contact'),
+'is_active' => TRUE,
+  ));
+}

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

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

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


[MediaWiki-commits] [Gerrit] Retrieve stored references from parser cache - change (mediawiki...Cite)

2016-03-14 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Retrieve stored references from parser cache
..

Retrieve stored references from parser cache

Since it might not be possible to use page_props to store
references data, this retrieves them from the parser cache.

If using FlaggedRevs, the API retrieves references for
the stable revision rather than the latest revision, if
distinct.

Bug: T125329
Change-Id: Ibc63dac28abe02195e46e14976617a8ade46ff82
---
M ApiQueryReferences.php
M CiteHooks.php
M Cite_body.php
M README.md
M extension.json
5 files changed, 60 insertions(+), 68 deletions(-)


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

diff --git a/ApiQueryReferences.php b/ApiQueryReferences.php
index 2069a56..a91f9ee 100644
--- a/ApiQueryReferences.php
+++ b/ApiQueryReferences.php
@@ -36,6 +36,7 @@
} else {
$startId = false;
}
+   $isFlaggedRevsEnabled = class_exists( 'FlaggableWikiPage' );
 
foreach ( $titles as $pageId => $title ) {
// Skip until you have the correct starting point
@@ -44,7 +45,19 @@
} else {
$startId = false;
}
-   $storedRefs = Cite::getStoredReferences( $title );
+   if ( $isFlaggedRevsEnabled ) {
+   // if using FlaggedRevs, get references for the 
stable revision
+   // if it is distinct from the latest revision
+   $page = FlaggableWikiPage::getTitleInstance( 
$title );
+   if ( !$page->isStableShownByDefault() || 
!$page->revsArePending() ) {
+   $storedRefs = 
Cite::getStoredReferences( $title );
+   } else {
+   $storedRefs = 
Cite::getStableReferences( $page );
+   }
+   } else {
+   $storedRefs = Cite::getStoredReferences( $title 
);
+   }
+
$allReferences = array();
// some pages may not have references stored
if ( $storedRefs !== false ) {
diff --git a/CiteHooks.php b/CiteHooks.php
index d3cabdd..128fcbb 100644
--- a/CiteHooks.php
+++ b/CiteHooks.php
@@ -68,26 +68,19 @@
 
/**
 * Callback for LinksUpdate hook
-* Post-output processing of references property, for proper db storage
+* Post-output processing of references property to store in db
 * Deferred to avoid performance overhead when outputting the page
 *
 * @param LinksUpdate $linksUpdate
 */
public static function onLinksUpdate( LinksUpdate &$linksUpdate ) {
-   global $wgCiteStoreReferencesData, 
$wgCiteCacheRawReferencesOnParse;
-   if ( !$wgCiteStoreReferencesData ) {
+   global $wgCiteStoreReferencesData, 
$wgCiteStoreReferencesDataInDB;
+   if ( !$wgCiteStoreReferencesData || 
!wgCiteStoreReferencesDataInDB ) {
return;
}
$refData = $linksUpdate->getParserOutput()->getExtensionData( 
Cite::EXT_DATA_KEY );
-   if ( $refData === null ) {
+   if ( $refData === false ) {
return;
-   }
-   if ( $wgCiteCacheRawReferencesOnParse ) {
-   // caching
-   $cache = ObjectCache::getMainWANInstance();
-   $articleID = $linksUpdate->getTitle()->getArticleID();
-   $key = $cache->makeKey( Cite::EXT_DATA_KEY, $articleID 
);
-   $cache->set( $key, $refData, 
Cite::CACHE_DURATION_ONPARSE );
}
// JSON encode
$ppValue = FormatJson::encode( $refData, false, 
FormatJson::ALL_OK );
@@ -100,36 +93,5 @@
$linksUpdate->mProperties[$key] = $ppValue;
}
$linksUpdate->getParserOutput()->setExtensionData( 
Cite::EXT_DATA_KEY, null );
-   }
-
-   /**
-* Callback for LinksUpdateComplete hook
-* If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache
-* when references are modified
-*
-* @param LinksUpdate $linksUpdate
-*/
-   public static function onLinksUpdateComplete( LinksUpdate &$linksUpdate 
) {
-   global $wgCiteStoreReferencesData, 
$wgCiteCacheRawReferencesOnParse;
-   if ( !$wgCiteStoreReferencesData || 
$wgCiteCacheRawReferencesOnParse ) {
-   return;
-   }
-   // if we can, avoid clearing 

[MediaWiki-commits] [Gerrit] Cleanup references data in API call - change (mediawiki...Cite)

2016-03-14 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Cleanup references data in API call
..

Cleanup references data in API call

This cleanups the references data returned by the API.
Text is trimed and strip markers removed. Count is set
to its usual meaning and number param is removed.

Change-Id: I251a08cd8c7a51ad9b58234fd6e8692d40ae79d4
---
M ApiQueryReferences.php
1 file changed, 24 insertions(+), 0 deletions(-)


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

diff --git a/ApiQueryReferences.php b/ApiQueryReferences.php
index a91f9ee..95e8504 100644
--- a/ApiQueryReferences.php
+++ b/ApiQueryReferences.php
@@ -74,6 +74,30 @@
}
$ref['group'] = $group;
$ref['reflist'] = 
$index;
+
+   // remove spaces or 
newlines added at the beginning or end of refs
+   $ref['text'] = trim( 
$ref['text'] );
+   // return more 
meaningful count
+   if ( $ref['count'] < 0 
) {
+   $ref['count'] = 
1;
+   } else {
+   $ref['count']++;
+   }
+   // remove 'number' 
param, of no use after parse
+   unset( $ref['number'] );
+
+   // core and extension 
tags (including , , etc)
+   // inside {{#tag:ref}} 
calls get replaced by the parser with
+   // a strip marker 
before Cite::ref is called and the original
+   // wikitext cannot be 
recovered at this point, so remove them
+   $stripState = new 
StripState();
+   $text = 
$stripState->killMarkers( $ref['text'] );
+   if ( $ref['text'] !== 
$text ) {
+   $ref['text'] = 
$text;
+   // let callers 
know about the removed strip markers
+   $ref['markers'] 
= true;
+   }
+
$allReferences[$id] = 
$ref;
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I251a08cd8c7a51ad9b58234fd6e8692d40ae79d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cite
Gerrit-Branch: master
Gerrit-Owner: Cenarium 

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


[MediaWiki-commits] [Gerrit] Add npm entry point - change (mediawiki...AuthorProtect)

2016-03-14 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Add npm entry point
..

Add npm entry point

Change-Id: I6874ca23d0e9abd2a31e62c8ec7cadeb5bf1ec57
---
A Gruntfile.js
A package.json
2 files changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/AuthorProtect 
refs/changes/97/277297/1

diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 000..7756e75
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,20 @@
+/*jshint node:true */
+module.exports = function ( grunt ) {
+   grunt.loadNpmTasks( 'grunt-jsonlint' );
+   grunt.loadNpmTasks( 'grunt-banana-checker' );
+
+   grunt.initConfig( {
+   banana: {
+   all: 'i18n/'
+   },
+   jsonlint: {
+   all: [
+   '**/*.json',
+   '!node_modules/**'
+   ]
+   }
+   } );
+
+   grunt.registerTask( 'test', [ 'jsonlint', 'banana' ] );
+   grunt.registerTask( 'default', 'test' );
+};
diff --git a/package.json b/package.json
new file mode 100644
index 000..41cecca
--- /dev/null
+++ b/package.json
@@ -0,0 +1,11 @@
+{
+  "scripts": {
+"test": "grunt test"
+  },
+  "devDependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-banana-checker": "0.4.0",
+"grunt-jsonlint": "1.0.7"
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6874ca23d0e9abd2a31e62c8ec7cadeb5bf1ec57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AuthorProtect
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Adding dns entries for new snapshot hosts (1005-1007) - change (operations/dns)

2016-03-14 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: Adding dns entries for new snapshot hosts (1005-1007)
..


Adding dns entries for new snapshot hosts (1005-1007)

Change-Id: I1c5115034697b9b1e1302cd2fbc17353f668b39d
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 18 insertions(+), 2 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index 9da00b8..71be94b 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -234,7 +234,7 @@
 6   1H IN PTR   es1011.eqiad.wmnet.
 7   1H IN PTR   es1012.eqiad.wmnet.
 8   1H IN PTR   ms-be1019.eqiad.wmnet.
-
+9   1H IN PTR   snapshot1005.eqiad.wmnet.
 10  1H IN PTR   oresrdb1002.eqiad.wmnet.
 11  1H IN PTR   kafka1001.eqiad.wmnet.
 12  1H IN PTR   pc1004.eqiad.wmnet.
@@ -836,7 +836,7 @@
 146 1H IN PTR   osmium.eqiad.wmnet.
 147 1H IN PTR   hp1001.eqiad.wmnet.
 148 1H IN PTR   rcs1001.eqiad.wmnet.
-
+149 1H IN PTR   snapshot1006.eqiad.wmnet.
 150 1H IN PTR   iridium.eqiad.wmnet.
 151 1H IN PTR   ocg1001.eqiad.wmnet.
 152 1H IN PTR   ms-fe1003.eqiad.wmnet.
@@ -1128,6 +1128,7 @@
 138 1H  IN PTR  restbase1015-a.eqiad.wmnet.
 139 1H  IN PTR  restbase1015-b.eqiad.wmnet.
 140 1H  IN PTR  restbase1015-c.eqiad.wmnet.
+141 1H  IN PTR  snapshot1007.eqiad.wmnet.
 
 $ORIGIN 49.64.{{ zonename }}.
 1   1H IN PTR   vl1020-eth3.lvs1001.wikimedia.org.
@@ -2155,6 +2156,12 @@
 236 1H  IN PTR  labvirt1010.mgmt.eqiad.wmnet.
 237 1H  IN PTR  wmf4714.mgmt.eqiad.wmnet.
 237 1H  IN PTR  labvirt1011.mgmt.eqiad.wmnet.
+238 1H  IN PTR  wmf4743.mgmt.eqiad.wmnet.
+238 1H  IN PTR  snapshot1005.mgmt.eqiad.wmnet.
+239 1H  IN PTR  wmf4744.mgmt.eqiad.wmnet.
+239 1H  IN PTR  snapshot1006.mgmt.eqiad.wmnet.
+240 1H  IN PTR  wmf4745.mgmt.eqiad.wmnet.
+240 1H  IN PTR  snapshot1007.mgmt.eqiad.wmnet.
 
 $ORIGIN 4.65.{{ zonename }}.
 
diff --git a/templates/wmnet b/templates/wmnet
index aa8c4dc..b3baf72 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -804,6 +804,9 @@
 snapshot10021H  IN A10.64.0.121
 snapshot10031H  IN A10.64.16.141
 snapshot10041H  IN A10.64.16.142
+snapshot10051H  IN A10.64.0.9
+snapshot10061H  IN A10.64.32.149
+snapshot10071H  IN A10.64.48.141
 stat10011H  IN A10.64.21.101
 stat10021H  IN A10.64.5.102
 stat10031H  IN A10.64.36.103
@@ -1866,6 +1869,12 @@
 WMF3468 1H  IN A10.65.3.83
 snapshot10041H  IN A10.65.3.84
 WMF3469 1H  IN A10.65.3.84
+snapshot10051H  IN A10.65.3.238
+wmf4743 1H  IN A10.65.3.238
+snapshot10061H  IN A10.65.3.239
+wmf4744 1H  IN A10.65.3.239
+snapshot10071H  IN A10.65.3.240
+wmf4745 1H  IN A10.65.3.240
 carbon  1H  IN A10.65.3.16
 WMF3135 1H  IN A10.65.3.16
 hydrogen1H  IN A10.65.3.15

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1c5115034697b9b1e1302cd2fbc17353f668b39d
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Cmjohnson 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Cmjohnson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use WatchedItemStore::removeWatch in SpecialEditWatchlist - change (mediawiki/core)

2016-03-14 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Use WatchedItemStore::removeWatch in SpecialEditWatchlist
..

Use WatchedItemStore::removeWatch in SpecialEditWatchlist

Bug: T129481
Change-Id: I12bf46244532195ba19516ba571a1728bd365db9
---
M includes/specials/SpecialEditWatchlist.php
1 file changed, 5 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/44/277444/1

diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 1a6efb2..600b032 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -426,22 +426,15 @@
return; // nothing to do
}
 
-   $dbw = wfGetDB( DB_MASTER );
$user = $this->getUser();
+   $store = WatchedItemStore::getDefaultInstance();
 
foreach ( $this->badItems as $row ) {
list( $title, $namespace, $dbKey ) = $row;
$action = $title ? 'cleaning up' : 'deleting';
wfDebug( "User {$user->getName()} has broken watchlist 
item ns($namespace):$dbKey, $action.\n" );
 
-   $dbw->delete( 'watchlist',
-   [
-   'wl_user' => $user->getId(),
-   'wl_namespace' => $namespace,
-   'wl_title' => $dbKey,
-   ],
-   __METHOD__
-   );
+   $store->removeWatch( $user, new TitleValue( $namespace, 
$dbKey ) );
 
// Can't just do an UPDATE instead of DELETE/INSERT due 
to unique index
if ( $title ) {
@@ -495,7 +488,7 @@
 * @param array $titles Array of strings, or Title objects
 */
private function unwatchTitles( $titles ) {
-   $dbw = wfGetDB( DB_MASTER );
+   $store = WatchedItemStore::getDefaultInstance();
 
foreach ( $titles as $title ) {
if ( !$title instanceof Title ) {
@@ -503,25 +496,8 @@
}
 
if ( $title instanceof Title ) {
-   $dbw->delete(
-   'watchlist',
-   [
-   'wl_user' => 
$this->getUser()->getId(),
-   'wl_namespace' => 
MWNamespace::getSubject( $title->getNamespace() ),
-   'wl_title' => 
$title->getDBkey(),
-   ],
-   __METHOD__
-   );
-
-   $dbw->delete(
-   'watchlist',
-   [
-   'wl_user' => 
$this->getUser()->getId(),
-   'wl_namespace' => 
MWNamespace::getTalk( $title->getNamespace() ),
-   'wl_title' => 
$title->getDBkey(),
-   ],
-   __METHOD__
-   );
+   $store->removeWatch( $this->getUser(), 
$title->getSubjectPage() );
+   $store->removeWatch( $this->getUser(), 
$title->getTalkPage() );
 
$page = WikiPage::factory( $title );
Hooks::run( 'UnwatchArticleComplete', [ 
$this->getUser(), &$page ] );

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

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

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


[MediaWiki-commits] [Gerrit] Table import: Only import the internal list on external paste - change (VisualEditor/VisualEditor)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Table import: Only import the internal list on external paste
..


Table import: Only import the internal list on external paste

Bug: T129879
Change-Id: I10c149e4b6843c03ddfc363b107281fb36b77937
---
M src/ce/ve.ce.Surface.js
M src/ui/actions/ve.ui.TableAction.js
2 files changed, 26 insertions(+), 13 deletions(-)

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



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 3f58de0..0d48027 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2059,7 +2059,7 @@
) {
// External table-into-table paste
tableAction = new ve.ui.TableAction( this.getSurface() 
);
-   tableAction.importTable( 
pastedDocumentModel.documentNode.children[ 0 ] );
+   tableAction.importTable( 
pastedDocumentModel.documentNode.children[ 0 ], true );
return;
}
 
diff --git a/src/ui/actions/ve.ui.TableAction.js 
b/src/ui/actions/ve.ui.TableAction.js
index 21c8b03..911aed3 100644
--- a/src/ui/actions/ve.ui.TableAction.js
+++ b/src/ui/actions/ve.ui.TableAction.js
@@ -253,10 +253,11 @@
  * Import a table at the current selection, overwriting data cell by cell
  *
  * @param {ve.dm.TableNode} importedTableNode Table node to import
+ * @param {boolean} importInternalList Import the table document's 
internalLiist
  * @return {boolean} Action was executed
  */
-ve.ui.TableAction.prototype.importTable = function ( importedTableNode ) {
-   var i, l, row, col, cell, importedCell, cellRange,
+ve.ui.TableAction.prototype.importTable = function ( importedTableNode, 
importInternalList ) {
+   var i, l, row, col, cell, importedCell, cellRange, txs,
importedMatrix = importedTableNode.getMatrix(),
surfaceModel = this.surface.getModel(),
documentModel = surfaceModel.getDocument(),
@@ -290,20 +291,32 @@
if ( !importedCell.isPlaceholder() ) {
// Remove the existing cell contents
surfaceModel.change( 
ve.dm.Transaction.newFromRemoval( documentModel, cellRange ) );
-   // Perform the insertion as a separate change 
so the internalList offsets are correct
-   surfaceModel.change( [
-   // Attribute changes are performed 
separately, and removing the whole
-   // cell could change the dimensions of 
the table
+   // Attribute changes are performed separately, 
and removing the whole
+   // cell could change the dimensions of the table
+   txs = [

ve.dm.Transaction.newFromAttributeChanges(
documentModel, cellRange.start 
- 1,
ve.copy( 
importedCell.node.element.attributes )
-   ),
-   
ve.dm.Transaction.newFromDocumentInsertion(
-   documentModel, cellRange.start,
-   importedTableNode.getDocument(),
-   importedCell.node.getRange()
)
-   ] );
+   ];
+   if ( importInternalList ) {
+   txs.push(
+   
ve.dm.Transaction.newFromDocumentInsertion(
+   documentModel, 
cellRange.start,
+   
importedTableNode.getDocument(),
+   
importedCell.node.getRange()
+   )
+   );
+   } else {
+   txs.push(
+   
ve.dm.Transaction.newFromInsertion(
+   documentModel, 
cellRange.start,
+   
importedTableNode.getDocument().getData( importedCell.node.getRange() )
+   )
+   );
+   }
+   // Perform the insertion as a separate change 
so the internalList offsets are correct
+   surfaceModel.change( txs );
   

[MediaWiki-commits] [Gerrit] CRM-18120 make acl query less debilitating - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18120 make acl query less debilitating
..

CRM-18120 make acl query less debilitating

In my testing this query runs much faster as a conditional insert than an ON 
DUPLICATE UPDATE.

However, the likelihood of it fixing our deadlocks seems to be low as I only 
found it being called from a few places,
 import bing the one that would potentially affect us.

Submitted for 4.7 & if someone agrees with this here I'll merge upstream too.

Change-Id: I6202262cb0063b47018baead86a87b52af9974d5
---
M CRM/Contact/BAO/Contact/Permission.php
1 file changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/39/277439/1

diff --git a/CRM/Contact/BAO/Contact/Permission.php 
b/CRM/Contact/BAO/Contact/Permission.php
index 3a326ca..bdb3248 100644
--- a/CRM/Contact/BAO/Contact/Permission.php
+++ b/CRM/Contact/BAO/Contact/Permission.php
@@ -128,18 +128,14 @@
 $permission = CRM_ACL_API::whereClause($type, $tables, $whereTables, 
$userID);
 
 $from = CRM_Contact_BAO_Query::fromClause($whereTables);
-
 CRM_Core_DAO::executeQuery("
 INSERT INTO civicrm_acl_contact_cache ( user_id, contact_id, operation )
-SELECT  $userID as user_id, contact_a.id as contact_id, '$operation' as 
operation
+SELECT DISTINCT $userID as user_id, contact_a.id as contact_id, '$operation' 
as operation
  $from
+ LEFT JOIN civicrm_acl_contact_cache ac ON ac.user_id = $userID AND 
contact_a.id AND ac.operation = 'View'
 WHERE$permission
-GROUP BY contact_a.id
-ON DUPLICATE KEY UPDATE
- user_id=VALUES(user_id),
- contact_id=VALUES(contact_id),
- operation=VALUES(operation)"
-);
+AND ac.id IS NULL
+");
 
 $_processed[$userID] = 1;
   }

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

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

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


[MediaWiki-commits] [Gerrit] CRM-18193 make unique ID for request available to php & mysql - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18193 make unique ID for request available to php & mysql
..

CRM-18193 make unique ID for request available to php & mysql

Change-Id: I84b8421a0031a88f15bfd48ff0372639ce1eb106
---
M CRM/Core/DAO.php
M CRM/Utils/Request.php
2 files changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/40/277440/1

diff --git a/CRM/Core/DAO.php b/CRM/Core/DAO.php
index b0eb4d3..373ef47 100644
--- a/CRM/Core/DAO.php
+++ b/CRM/Core/DAO.php
@@ -118,6 +118,7 @@
   CRM_Core_DAO::executeQuery('SET SESSION sql_mode = STRICT_TRANS_TABLES');
 }
 CRM_Core_DAO::executeQuery('SET NAMES utf8');
+CRM_Core_DAO::executeQuery('SET @uniqueID = %1', array(1 => 
array(CRM_Utils_Request::id(), 'String')));
   }
 
   /**
diff --git a/CRM/Utils/Request.php b/CRM/Utils/Request.php
index 55ace74..67c5bbd 100644
--- a/CRM/Utils/Request.php
+++ b/CRM/Utils/Request.php
@@ -40,6 +40,34 @@
 class CRM_Utils_Request {
 
   /**
+   * Get a unique ID for the request.
+   *
+   * This unique ID is assigned to mysql when the connection is opened and is
+   * available in PHP.
+   *
+   * The intent is that it is available for logging purposes and for triggers.
+   *
+   * The resulting string is 17 characters long. This consists of 13 
characters of uniqid
+   * and 4 more random characters.
+   *
+   * Uniqid is unique to the microsecond - to make it more unique we add 4 
more characters
+   * but stop short of the full 23 character string that a prefix would 
generate.
+   *
+   * It is intended that this string will be saved to log tables so striking a 
balance between
+   * uniqueness and length is important. Note that I did check & lining up 
with byte values
+   * (e.g 16 characters) does not confer any benefits. Using a CHAR field 
rather than VARCHAR
+   * may improve speed, if indexed.
+   *
+   * @return string
+   */
+  public static function id() {
+if (!isset(\Civi::$statics[__CLASS__]['id'])) {
+  \Civi::$statics[__CLASS__]['id'] = uniqid() . 
CRM_Utils_String::createRandom(CRM_Utils_String::ALPHANUMERIC, 4);
+}
+return \Civi::$statics[__CLASS__]['id'];
+  }
+
+  /**
* Retrieve a value from the request (GET/POST/REQUEST)
*
* @param string $name

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

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

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


[MediaWiki-commits] [Gerrit] CRM-18104 Hook for for defining log tables. - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18104 Hook for for defining log tables.
..

CRM-18104 Hook for for defining log tables.

Allows defining ENGINE and any indexes

Submitted for Core in https://github.com/civicrm/civicrm-core/pull/7902

Change-Id: I1bd1334eebc4f0923002ae9688184a03099724c4
---
M CRM/Logging/Schema.php
M CRM/Utils/Hook.php
2 files changed, 45 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/42/277442/1

diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index d732138..5a9a31e 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -53,6 +53,18 @@
   );
 
   /**
+   * Specifications of all log table including
+   *  - engine (default is archive, if not set.)
+   *  - indexes (default is none and they cannot be added unless engine is 
innodb. If they are added and
+   *engine is not set to innodb an exception will be thrown since quiet 
acquiescence is easier to miss).
+   *  - exceptions (by default those stored in $this->exceptions are 
included). These are
+   *excluded from the triggers.
+   *
+   * @var array
+   */
+  private $logTableSpec = array();
+
+  /**
* Populate $this->tables and $this->logs with current db state.
*/
   public function __construct() {
@@ -86,6 +98,12 @@
 
 // do not log civicrm_mailing_recipients table, CRM-16193
 $this->tables = array_diff($this->tables, 
array('civicrm_mailing_recipients'));
+$this->logTableSpec = array_fill_keys($this->tables, array());
+foreach ($this->exceptions as $tableName => $fields) {
+  $this->logTableSpec[$tableName]['exceptions'] = $fields;
+}
+CRM_Utils_Hook::logTableSpec($this->logTableSpec);
+$this->tables = array_keys($this->logTableSpec);
 
 if (defined('CIVICRM_LOGGING_DSN')) {
   $dsn = DB::parseDSN(CIVICRM_LOGGING_DSN);
@@ -506,6 +524,15 @@
 log_action  ENUM('Initialization', 'Insert', 'Update', 'Delete')
 COLS;
 
+if (!empty($this->logTableSpec[$table]['indexes'])) {
+  foreach ($this->logTableSpec[$table]['indexes'] as $indexName => 
$indexSpec) {
+if (is_array($indexSpec)) {
+  $indexSpec = implode(" , ", $indexSpec);
+}
+$cols .= ", INDEX {$indexName}($indexSpec)";
+  }
+}
+
 // - prepend the name with log_
 // - drop AUTO_INCREMENT columns
 // - drop non-column rows of the query (keys, constraints, etc.)
@@ -514,7 +541,8 @@
 $query = preg_replace("/^CREATE TABLE `$table`/i", "CREATE TABLE 
`{$this->db}`.log_$table", $query);
 $query = preg_replace("/ AUTO_INCREMENT/i", '', $query);
 $query = preg_replace("/^  [^`].*$/m", '', $query);
-$query = preg_replace("/^\) ENGINE=[^ ]+ /im", ') ENGINE=ARCHIVE ', 
$query);
+$engine = strtoupper(CRM_Utils_Array::value('engine', 
$this->logTableSpec[$table], 'ARCHIVE'));
+$query = preg_replace("/^\) ENGINE=[^ ]+ /im", ') ENGINE=' . $engine . ' 
', $query);
 
 // log_civicrm_contact.modified_date for example would always be copied 
from civicrm_contact.modified_date,
 // so there's no need for a default timestamp and therefore we remove such 
default timestamps
@@ -607,8 +635,9 @@
   // only do the change if any data has changed
   $cond = array();
   foreach ($columns as $column) {
+$tableExceptions = array_key_exists('exceptions', 
$this->logTableSpec[$table]) ? $this->logTableSpec[$table]['exceptions'] : 
array();
 // ignore modified_date changes
-if ($column != 'modified_date' && !in_array($column, 
CRM_Utils_Array::value($table, $this->exceptions, array( {
+if ($column != 'modified_date' && !in_array($column, 
$tableExceptions)) {
   $cond[] = "IFNULL(OLD.$column,'') <> IFNULL(NEW.$column,'')";
 }
   }
diff --git a/CRM/Utils/Hook.php b/CRM/Utils/Hook.php
index 2d7dca8..9cd1a93 100644
--- a/CRM/Utils/Hook.php
+++ b/CRM/Utils/Hook.php
@@ -1426,6 +1426,20 @@
   'civicrm_triggerInfo'
 );
   }
+  /**
+   * This hook allows changes to the spec of which tables to log.
+   *
+   * @param array $logTableSpec
+   *
+   * @return mixed
+   */
+  public static function logTableSpec(&$logTableSpec) {
+return self::singleton()->invoke(1, $logTableSpec, $_nullObject,
+  self::$_nullObject, self::$_nullObject, self::$_nullObject,
+  self::$_nullObject,
+  'civicrm_logTableSpec'
+);
+  }
 
   /**
* This hook is called when a module-extension is installed.

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

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


[MediaWiki-commits] [Gerrit] CRM-18178 exclude _bak & _backup tables from trigger creation - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18178 exclude _bak & _backup tables from trigger creation
..

CRM-18178 exclude _bak & _backup tables from trigger creation

Change-Id: Id492beaa5990971be265da425c0b8a37dd313332
---
M CRM/Logging/Schema.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/41/277441/1

diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index 447dce6..d732138 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -77,6 +77,9 @@
 $this->tables = preg_grep('/^civicrm_queue_/', $this->tables, 
PREG_GREP_INVERT);
 $this->tables = preg_grep('/^civicrm_menu/', $this->tables, 
PREG_GREP_INVERT); //CRM-14672
 $this->tables = preg_grep('/_temp_/', $this->tables, PREG_GREP_INVERT);
+// CRM-18178
+$this->tables = preg_grep('/_bak$/', $this->tables, PREG_GREP_INVERT);
+$this->tables = preg_grep('/_backup$/', $this->tables, PREG_GREP_INVERT);
 
 // do not log civicrm_mailing_event* tables, CRM-12300
 $this->tables = preg_grep('/^civicrm_mailing_event_/', $this->tables, 
PREG_GREP_INVERT);

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

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

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


[MediaWiki-commits] [Gerrit] CRM-18180 allow non-standard table names in logging reports - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18180 allow non-standard table names in logging reports
..

CRM-18180 allow non-standard table names in logging reports

This allows wmf_donor & wmf_contribution_extra tables to be included

Change-Id: I861d8f17312589a90c1b0c16ba3a54f5ff9e66fe
---
M CRM/Logging/Schema.php
1 file changed, 23 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/43/277443/1

diff --git a/CRM/Logging/Schema.php b/CRM/Logging/Schema.php
index 5a9a31e..e86e783 100644
--- a/CRM/Logging/Schema.php
+++ b/CRM/Logging/Schema.php
@@ -104,6 +104,7 @@
 }
 CRM_Utils_Hook::logTableSpec($this->logTableSpec);
 $this->tables = array_keys($this->logTableSpec);
+$nonStandardTableNameString = $this->getNonStandardTableNameFilterString();
 
 if (defined('CIVICRM_LOGGING_DSN')) {
   $dsn = DB::parseDSN(CIVICRM_LOGGING_DSN);
@@ -120,7 +121,7 @@
 FROM   INFORMATION_SCHEMA.TABLES
 WHERE  TABLE_SCHEMA = '{$this->db}'
 ANDTABLE_TYPE = 'BASE TABLE'
-ANDTABLE_NAME LIKE 'log_civicrm_%'
+AND(TABLE_NAME LIKE 'log_civicrm_%' $nonStandardTableNameString )
 ");
 while ($dao->fetch()) {
   $log = $dao->TABLE_NAME;
@@ -597,6 +598,27 @@
   }
 
   /**
+   * Get an sql clause to find the names of any log tables that do not match 
the normal pattern.
+   *
+   * Most tables are civicrm_xxx with the log table being log_civicrm_xxx
+   * However, they don't have to match this pattern (e.g when defined by hook) 
so find the
+   * anomalies and return a filter string to include them.
+   *
+   * @return string
+   */
+  public function getNonStandardTableNameFilterString() {
+$nonStandardTableNames = preg_grep('/^civicrm_/', $this->tables, 
PREG_GREP_INVERT);
+if (empty($nonStandardTableNames)) {
+  return '';
+}
+$nonStandardTableLogs = array();
+foreach ($nonStandardTableNames as $nonStandardTableName) {
+  $nonStandardTableLogs[] = "'log_{$nonStandardTableName}'";
+}
+return " OR TABLE_NAME IN (" . implode(',', $nonStandardTableLogs) . ")";
+  }
+
+  /**
* Predicate whether the logging triggers are in place.
*/
   private function triggersExist() {

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

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

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


[MediaWiki-commits] [Gerrit] Suppress meta dialog on refresh pages if we want to show SET... - change (mediawiki...VisualEditor)

2016-03-14 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Suppress meta dialog on refresh pages if we want to show SET 
dialog
..

Suppress meta dialog on refresh pages if we want to show SET dialog

Bug: T129819
Change-Id: I1176d06e5a5f56f01528acd7d099c8be9d317e51
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
index a96c852..16109d0 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -44,7 +44,7 @@
this.checkboxFields = null;
this.checkboxesByName = null;
this.$otherFields = null;
-   this.suppressWelcomeDialog = false;
+   this.suppressNormalStartupDialogs = false;
 
// If this is true then #transformPage / #restorePage will not call 
pushState
// This is to avoid adding a new history entry for the url we just got 
from onpopstate
@@ -285,7 +285,7 @@
} else {
new mw.Api().saveOption( 
'visualeditor-hidebetawelcome', '1' );
}
-   this.suppressWelcomeDialog = true;
+   this.suppressNormalStartupDialogs = true;
}
 
data = response ? response.visualeditor : {};
@@ -656,10 +656,10 @@
ve.init.mw.DesktopArticleTarget.super.prototype.surfaceReady.apply( 
this, arguments );
 
this.setupUnloadHandlers();
-   if ( !this.suppressWelcomeDialog ) {
+   if ( !this.suppressNormalStartupDialogs ) {
this.maybeShowWelcomeDialog();
+   this.maybeShowMetaDialog();
}
-   this.maybeShowMetaDialog();
 
this.activatingDeferred.resolve();
this.events.trackActivationComplete();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1176d06e5a5f56f01528acd7d099c8be9d317e51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] InputWidget: Actually reuse parts of the DOM when infusing - change (oojs/ui)

2016-03-14 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: InputWidget: Actually reuse parts of the DOM when infusing
..

InputWidget: Actually reuse parts of the DOM when infusing

It is expected that almost any subclass of InputWidget will override
the #getInputElement method to display its own input. Therefore, if I
rely on the InputWidget implementation of it, it won't work. What the
hell was I thinking.

Moved checking for config.$input into the constructor, before
#getInputElement is called. For subclasses that need to tweak the
original $input, moved that code to constructor also.

Bug: T114408
Change-Id: I3a464fe730dc9382b9cb5936edc21f9bf9b3ed2e
---
M src/widgets/ButtonInputWidget.js
M src/widgets/DropdownInputWidget.js
M src/widgets/InputWidget.js
3 files changed, 15 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/37/277437/1

diff --git a/src/widgets/ButtonInputWidget.js b/src/widgets/ButtonInputWidget.js
index a1228f1..79ffcdc 100644
--- a/src/widgets/ButtonInputWidget.js
+++ b/src/widgets/ButtonInputWidget.js
@@ -36,6 +36,11 @@
// Configuration initialization
config = $.extend( { type: 'button', useInputTag: false }, config );
 
+   // See InputWidget#reusePreInfuseDOM about config.$input
+   if ( config.$input ) {
+   config.$input.empty();
+   }
+
// Properties (must be set before parent constructor, which calls 
#setValue)
this.useInputTag = config.useInputTag;
 
@@ -81,10 +86,6 @@
  */
 OO.ui.ButtonInputWidget.prototype.getInputElement = function ( config ) {
var type;
-   // See InputWidget#reusePreInfuseDOM about config.$input
-   if ( config.$input ) {
-   return config.$input.empty();
-   }
type = [ 'button', 'submit', 'reset' ].indexOf( config.type ) !== -1 ? 
config.type : 'button';
return $( '<' + ( config.useInputTag ? 'input' : 'button' ) + ' type="' 
+ type + '">' );
 };
diff --git a/src/widgets/DropdownInputWidget.js 
b/src/widgets/DropdownInputWidget.js
index c3a5f83..636767c 100644
--- a/src/widgets/DropdownInputWidget.js
+++ b/src/widgets/DropdownInputWidget.js
@@ -36,6 +36,11 @@
// Configuration initialization
config = config || {};
 
+   // See InputWidget#reusePreInfuseDOM about config.$input
+   if ( config.$input ) {
+   config.$input.addClass( 'oo-ui-element-hidden' );
+   }
+
// Properties (must be done before parent constructor which calls 
#setDisabled)
this.dropdownWidget = new OO.ui.DropdownWidget( config.dropdown );
 
@@ -66,11 +71,7 @@
  * @inheritdoc
  * @protected
  */
-OO.ui.DropdownInputWidget.prototype.getInputElement = function ( config ) {
-   // See InputWidget#reusePreInfuseDOM about config.$input
-   if ( config.$input ) {
-   return config.$input.addClass( 'oo-ui-element-hidden' );
-   }
+OO.ui.DropdownInputWidget.prototype.getInputElement = function () {
return $( '' ).attr( 'type', 'hidden' );
 };
 
diff --git a/src/widgets/InputWidget.js b/src/widgets/InputWidget.js
index e70b6fa..1726c66 100644
--- a/src/widgets/InputWidget.js
+++ b/src/widgets/InputWidget.js
@@ -30,7 +30,8 @@
OO.ui.InputWidget.parent.call( this, config );
 
// Properties
-   this.$input = this.getInputElement( config );
+   // See #reusePreInfuseDOM about config.$input
+   this.$input = config.$input || this.getInputElement( config );
this.value = '';
this.inputFilter = config.inputFilter;
 
@@ -114,9 +115,8 @@
  * @param {Object} config Configuration options
  * @return {jQuery} Input element
  */
-OO.ui.InputWidget.prototype.getInputElement = function ( config ) {
-   // See #reusePreInfuseDOM about config.$input
-   return config.$input || $( '' );
+OO.ui.InputWidget.prototype.getInputElement = function () {
+   return $( '' );
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a464fe730dc9382b9cb5936edc21f9bf9b3ed2e
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Have mw.echo.api.APIHandler.markItemRead actually return a p... - change (mediawiki...Echo)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Have mw.echo.api.APIHandler.markItemRead actually return a 
promise
..


Have mw.echo.api.APIHandler.markItemRead actually return a promise

Per its docs which say it does.

Change-Id: I2a4fb393c1bc3eba31a1bad34342a11800767fb0
---
M modules/api/mw.echo.api.APIHandler.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/api/mw.echo.api.APIHandler.js 
b/modules/api/mw.echo.api.APIHandler.js
index 5e7dd34..59fe1dd 100644
--- a/modules/api/mw.echo.api.APIHandler.js
+++ b/modules/api/mw.echo.api.APIHandler.js
@@ -122,7 +122,7 @@
 *  are marked as read.
 */
mw.echo.api.APIHandler.prototype.markItemRead = function ( itemId, 
isRead ) {
-   this.markItemsRead( [ itemId ], isRead );
+   return this.markItemsRead( [ itemId ], isRead );
};
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2a4fb393c1bc3eba31a1bad34342a11800767fb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use WatchedItemStore in SpecialEditWatchlist - change (mediawiki/core)

2016-03-14 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Use WatchedItemStore in SpecialEditWatchlist
..

Use WatchedItemStore in SpecialEditWatchlist

This includes the ability to delete all
watchlist items for a user using the jobqueue.

If the number of watched items for the user is less
than the number that can be completed in a single
batch then they will still be deleted during the
interactive session.

Bug: T129481
Change-Id: I2f8c8be860a03116535dbd1e6a18ce2e8bc546b4
---
M includes/specials/SpecialEditWatchlist.php
M languages/i18n/en.json
M languages/i18n/qqq.json
3 files changed, 27 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/36/277436/1

diff --git a/includes/specials/SpecialEditWatchlist.php 
b/includes/specials/SpecialEditWatchlist.php
index 1a9d096..1c1d1f5 100644
--- a/includes/specials/SpecialEditWatchlist.php
+++ b/includes/specials/SpecialEditWatchlist.php
@@ -218,17 +218,22 @@
$this->showTitles( $toUnwatch, 
$this->successMessage );
}
} else {
-   $this->clearWatchlist();
-   $this->getUser()->invalidateCache();
 
-   if ( count( $current ) > 0 ) {
-   $this->successMessage = $this->msg( 
'watchlistedit-raw-done' )->parse();
-   } else {
+   if ( count( $current ) == 0 ) {
return false;
}
 
-   $this->successMessage .= ' ' . $this->msg( 
'watchlistedit-raw-removed' )
-   ->numParams( count( $current ) )->parse();
+   $watchedItemStore = 
WatchedItemStore::getDefaultInstance();
+   if( $watchedItemStore->clearUserWatchedItems( 
$this->getUser() ) ) {
+   $this->successMessage = $this->msg( 
'watchlistedit-raw-done' )->parse();
+   $this->successMessage .= ' ' . $this->msg( 
'watchlistedit-raw-removed' )
+   ->numParams( count( $current ) 
)->parse();
+   $this->getUser()->invalidateCache();
+   } else {
+   
$watchedItemStore->clearUserWatchedItemsUsingJobQueue( $this->getUser() );
+   $this->successMessage = $this->msg( 
'watchlistedit-clear-jobqueue' )->parse();
+   }
+
$this->showTitles( $current, $this->successMessage );
}
 
@@ -237,11 +242,19 @@
 
public function submitClear( $data ) {
$current = $this->getWatchlist();
-   $this->clearWatchlist();
-   $this->getUser()->invalidateCache();
-   $this->successMessage = $this->msg( 'watchlistedit-clear-done' 
)->parse();
-   $this->successMessage .= ' ' . $this->msg( 
'watchlistedit-clear-removed' )
-   ->numParams( count( $current ) )->parse();
+
+   $watchedItemStore = WatchedItemStore::getDefaultInstance();
+
+   if( $watchedItemStore->clearUserWatchedItems( $this->getUser() 
) ) {
+   $this->successMessage = $this->msg( 
'watchlistedit-clear-done' )->parse();
+   $this->successMessage .= ' ' . $this->msg( 
'watchlistedit-clear-removed' )
+   ->numParams( count( $current ) 
)->parse();
+   $this->getUser()->invalidateCache();
+   } else {
+   $watchedItemStore->clearUserWatchedItemsUsingJobQueue( 
$this->getUser() );
+   $this->successMessage = $this->msg( 
'watchlistedit-clear-jobqueue' )->parse();
+   }
+
$this->showTitles( $current, $this->successMessage );
 
return true;
@@ -435,18 +448,6 @@
$user->addWatch( $title );
}
}
-   }
-
-   /**
-* Remove all titles from a user's watchlist
-*/
-   private function clearWatchlist() {
-   $dbw = wfGetDB( DB_MASTER );
-   $dbw->delete(
-   'watchlist',
-   [ 'wl_user' => $this->getUser()->getId() ],
-   __METHOD__
-   );
}
 
/**
diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index fea9fbd..a0627d7 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -3444,6 +3444,7 @@
"watchlistedit-clear-titles": "Titles:",
"watchlistedit-clear-submit": "Clear the watchlist (This is 
permanent!)",
"watchlistedit-clear-done": "Your watchlist has been cleared.",
+   

[MediaWiki-commits] [Gerrit] Reword SpecialInterwikiWatchlist::countItems doc - change (mediawiki...InterwikiIntegration)

2016-03-14 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Reword SpecialInterwikiWatchlist::countItems doc
..

Reword SpecialInterwikiWatchlist::countItems doc

Depends-On: I4b55318dc1d1c5abab1c5da16cebf1a43ddf9248
Change-Id: I6ae5a37f782b29f2d26ac5f8148084bd4210ad4d
---
M SpecialInterwikiWatchlist.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/InterwikiIntegration 
refs/changes/72/277272/2

diff --git a/SpecialInterwikiWatchlist.php b/SpecialInterwikiWatchlist.php
index 2fc3aea..b9a05f5 100644
--- a/SpecialInterwikiWatchlist.php
+++ b/SpecialInterwikiWatchlist.php
@@ -391,7 +391,8 @@
}

/**
-* Count the number of items on a user's watchlist
+* Count the number of paired items on a user's watchlist.
+* The assumption made here is that when a subject page is watched a 
talk page is also watched.
 *
 * @return integer
 */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6ae5a37f782b29f2d26ac5f8148084bd4210ad4d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/InterwikiIntegration
Gerrit-Branch: master
Gerrit-Owner: Addshore 
Gerrit-Reviewer: Legoktm 

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


[MediaWiki-commits] [Gerrit] Add tooltips to UI buttons - change (apps...wikipedia)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add tooltips to UI buttons
..


Add tooltips to UI buttons

Change-Id: I67a8804db9c206e6146274266e85e45c37168579
Task: T104094
---
M app/src/main/java/org/wikipedia/history/HistoryFragment.java
M app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
M app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
M app/src/main/java/org/wikipedia/search/SearchResultsFragment.java
M app/src/main/res/layout/fragment_search_recent.xml
5 files changed, 56 insertions(+), 24 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/history/HistoryFragment.java 
b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
index 1ab0d2d..92430ea 100644
--- a/app/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/app/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -124,7 +124,7 @@
 String[] selectionArgs = null;
 historyEmptyContainer.setVisibility(View.GONE);
 String searchStr = entryFilter.getText().toString();
-if (searchStr.length() != 0) {
+if (!searchStr.isEmpty()) {
 searchStr = searchStr.replace("\\", "").replace("%", 
"\\%").replace("_", "\\_");
 selection = "UPPER(" + tblName + "." + titleCol + ") LIKE UPPER(?) 
ESCAPE '\\'";
 selectionArgs = new String[]{"%" + searchStr + "%"};
@@ -205,7 +205,7 @@
 
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-if (!isAdded() || ((PageActivity)getActivity()).isSearching()) {
+if (!isMenuToBeSetUp()) {
 return;
 }
 inflater.inflate(R.menu.menu_history, menu);
@@ -214,12 +214,13 @@
 @Override
 public void onPrepareOptionsMenu(Menu menu) {
 super.onPrepareOptionsMenu(menu);
-if (!isAdded() || ((PageActivity)getActivity()).isSearching()) {
+if (!isMenuToBeSetUp()) {
 return;
 }
+boolean isHistoryAvailable = historyEntryList.getCount() > 0;
 menu.findItem(R.id.menu_clear_all_history)
-.setVisible(historyEntryList.getCount() > 0)
-.setEnabled(historyEntryList.getCount() > 0);
+.setVisible(isHistoryAvailable)
+.setEnabled(isHistoryAvailable);
 }
 
 @Override
@@ -261,6 +262,10 @@
 }
 }
 
+private boolean isMenuToBeSetUp() {
+return isAdded() && !((PageActivity)getActivity()).isSearching();
+}
+
 private class HistoryItemLongClickListener implements 
AdapterView.OnItemLongClickListener {
 @Override
 public boolean onItemLongClick(AdapterView parent, View view, int 
position, long id) {
diff --git a/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java 
b/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
index 39c4d13..7992d6b 100644
--- a/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
+++ b/app/src/main/java/org/wikipedia/search/RecentSearchesFragment.java
@@ -65,8 +65,9 @@
 }
 });
 
-
getActivity().getSupportLoaderManager().initLoader(RECENT_SEARCHES_FRAGMENT_LOADER_ID,
 null, this);
-
getActivity().getSupportLoaderManager().restartLoader(RECENT_SEARCHES_FRAGMENT_LOADER_ID,
 null, this);
+LoaderManager supportLoaderManager = 
getActivity().getSupportLoaderManager();
+supportLoaderManager.initLoader(RECENT_SEARCHES_FRAGMENT_LOADER_ID, 
null, this);
+supportLoaderManager.restartLoader(RECENT_SEARCHES_FRAGMENT_LOADER_ID, 
null, this);
 }
 
 @Override
@@ -81,7 +82,7 @@
 String[] projection = null;
 String selection = null;
 String[] selectionArgs = null;
-String order = "timestamp DESC";
+String order = RecentSearchDatabaseTable.Col.TIMESTAMP.getName() + " 
DESC";
 return new CursorLoader(getContext(), uri, projection, selection, 
selectionArgs, order);
 }
 
diff --git a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 
b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index 047d52f..52543ed 100644
--- a/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/app/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -4,6 +4,7 @@
 import android.graphics.Color;
 import android.os.Bundle;
 import android.support.v4.app.Fragment;
+import android.support.v4.app.FragmentManager;
 import android.support.v7.app.AlertDialog;
 import android.support.v7.widget.SearchView;
 import android.text.TextUtils;
@@ -15,6 +16,7 @@
 import android.view.ViewGroup;
 import android.widget.EditText;
 import android.widget.FrameLayout;
+import android.widget.ImageView;
 import android.widget.LinearLayout;
 import android.widget.TextView;
 
@@ -31,6 +33,7 @@
 import 

[MediaWiki-commits] [Gerrit] Don't branch OAI anymore - change (mediawiki...release)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Don't branch OAI anymore
..


Don't branch OAI anymore

Bug: T70867
Change-Id: Ice0f97beaf47be39a0ae38cb50b75ff260dfb3a6
---
M make-wmf-branch/config.json
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/make-wmf-branch/config.json b/make-wmf-branch/config.json
index 3f2c57b..dc9cc7a 100644
--- a/make-wmf-branch/config.json
+++ b/make-wmf-branch/config.json
@@ -89,7 +89,6 @@
"NewUserMessage",
"Nuke",
"OAuth",
-   "OAI",
"OATHAuth",
"ORES",
"OpenStackManager",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice0f97beaf47be39a0ae38cb50b75ff260dfb3a6
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Lazy-load: Avoid jQuery filter() due to pushStack() memory - change (mediawiki...MobileFrontend)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Lazy-load: Avoid jQuery filter() due to pushStack() memory
..


Lazy-load: Avoid jQuery filter() due to pushStack() memory

Assigning the result of filter() is the same as chaining.

For chaining support, jQuery has to keep a stack of all previous versions of
the collections so that things like end() and addBack() work as expected.

In general, when maintaining a collection for a long time, avoid jQuery methods
and use a plain array instead. Otherwise it requires jQuery to keep hold of
all previous versions of the array.

Change-Id: I6b0f08f3f32b490110c7faf5c649effdb3818936
---
M resources/mobile.startup/Skin.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index dc8361b..f7771c3 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -175,14 +175,14 @@
 */
loadImages: function () {
var self = this,
-   $imagePlaceholders = this.$( '#content' ).find( 
'.lazy-image-placeholder' );
+   imagePlaceholders = this.$( '#content' ).find( 
'.lazy-image-placeholder' ).toArray();
 
/**
 * Load remaining images in viewport
 */
function _loadImages() {
 
-   $imagePlaceholders = $imagePlaceholders.filter( 
function ( index, placeholder ) {
+   imagePlaceholders = $.grep( imagePlaceholders, 
function ( placeholder ) {
var $placeholder = $( placeholder );
 
if (
@@ -196,7 +196,7 @@
return true;
} );
 
-   if ( !$imagePlaceholders.length ) {
+   if ( !imagePlaceholders.length ) {
M.off( 'scroll', _loadImages );
M.off( 'resize', _loadImages );
M.off( 'section-toggled', _loadImages );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b0f08f3f32b490110c7faf5c649effdb3818936
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use proper novaconfig[] settings in environment scripts. - change (operations/puppet)

2016-03-14 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Use proper novaconfig[] settings in environment scripts.
..

Use proper novaconfig[] settings in environment scripts.

Followup to e2513914819f5f121c42e9714d048aebb9b68689

Change-Id: I68d478e317676b4b2f7cfe974f815432c2e10769
---
M modules/openstack/manifests/envscripts.pp
M modules/openstack/templates/novaenv.sh.erb
M modules/openstack/templates/wmflabsorg-domainadminenv.sh.erb
3 files changed, 4 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/277311/1

diff --git a/modules/openstack/manifests/envscripts.pp 
b/modules/openstack/manifests/envscripts.pp
index 6d968a6..82a9b5b 100644
--- a/modules/openstack/manifests/envscripts.pp
+++ b/modules/openstack/manifests/envscripts.pp
@@ -4,6 +4,7 @@
 $designateconfig
 ) {
 
+$nova_region = $::site
 # Handy script to set up environment for commandline nova magic
 file { '/root/novaenv.sh':
 content => template('openstack/novaenv.sh.erb'),
diff --git a/modules/openstack/templates/novaenv.sh.erb 
b/modules/openstack/templates/novaenv.sh.erb
index d63f13b..4670695 100644
--- a/modules/openstack/templates/novaenv.sh.erb
+++ b/modules/openstack/templates/novaenv.sh.erb
@@ -1,8 +1,8 @@
 export OS_USERNAME="novaadmin"
 export OS_PROJECT_DOMAIN_ID="default"
 export OS_USER_DOMAIN_ID="default"
-export OS_PASSWORD="<%= @wikitech_nova_ldap_user_pass %>"
-export OS_AUTH_URL="http://<%= @nova_controller_hostname %>:35357/v3"
+export OS_PASSWORD="<%= @novaconfig['ldap_user_pass'] %>"
+export OS_AUTH_URL="http://<%= @novaconfig['controller_hostname'] %>:35357/v3"
 export OS_REGION_NAME="<%= @nova_region %>"
 export OS_TENANT_NAME="testlabs"
 export OS_NO_CACHE=1
diff --git a/modules/openstack/templates/wmflabsorg-domainadminenv.sh.erb 
b/modules/openstack/templates/wmflabsorg-domainadminenv.sh.erb
index 49ea7e6..d5debb6 100644
--- a/modules/openstack/templates/wmflabsorg-domainadminenv.sh.erb
+++ b/modules/openstack/templates/wmflabsorg-domainadminenv.sh.erb
@@ -4,7 +4,7 @@
 export OS_PROJECT_DOMAIN_ID="default"
 export OS_USER_DOMAIN_ID="default"
 export OS_PASSWORD="<%= @designateconfig['wmflabsdotorg_pass'] %>"
-export OS_AUTH_URL="http://<%= @nova_controller_hostname %>:35357/v3"
+export OS_AUTH_URL="http://<%= @novaconfig['controller_hostname'] %>:35357/v3"
 export OS_REGION_NAME="<%= @nova_region %>"
 export OS_TENANT_NAME="<%= @designateconfig['wmflabsdotorg_project'] %>"
 export OS_NO_CACHE=1

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

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

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


[MediaWiki-commits] [Gerrit] Reset WatchedItemStore default instance after tests - change (mediawiki/core)

2016-03-14 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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

Change subject: Reset WatchedItemStore default instance after tests
..

Reset WatchedItemStore default instance after tests

Prior to this change in tests the overridden store
would remain in the instance static and thus could
be used in other places.

The override method now takes null as a default
meaning next time getDefaultInstance would be called
a new instance would be created.

I have added the reset call to the tearDown method
for convenience and to avoid it being missed in
this test class in the future.

This was found while writing more tests...

Change-Id: I9aa71425642174ae9ea2c6d4f85dcd07d724af11
---
M includes/WatchedItemStore.php
M tests/phpunit/includes/WatchedItemUnitTest.php
2 files changed, 11 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/35/277435/1

diff --git a/includes/WatchedItemStore.php b/includes/WatchedItemStore.php
index 806db5e..ffb888b 100644
--- a/includes/WatchedItemStore.php
+++ b/includes/WatchedItemStore.php
@@ -101,11 +101,14 @@
 * Overrides the default instance of this class
 * This is intended for use while testing and will fail if 
MW_PHPUNIT_TEST is not defined.
 *
-* @param WatchedItemStore $store
+* If this method is used it MUST also be called with null after a test 
to ensure a new
+* default instance is created next time getDefaultInstance is called.
+*
+* @param WatchedItemStore|null $store
 *
 * @throws MWException
 */
-   public static function overrideDefaultInstance( WatchedItemStore $store 
) {
+   public static function overrideDefaultInstance( WatchedItemStore $store 
= null ) {
if ( !defined( 'MW_PHPUNIT_TEST' ) ) {
throw new MWException(
'Cannot override ' . __CLASS__ . 'default 
instance in operation.'
diff --git a/tests/phpunit/includes/WatchedItemUnitTest.php 
b/tests/phpunit/includes/WatchedItemUnitTest.php
index bc37311..fd7eeb9 100644
--- a/tests/phpunit/includes/WatchedItemUnitTest.php
+++ b/tests/phpunit/includes/WatchedItemUnitTest.php
@@ -7,6 +7,12 @@
  */
 class WatchedItemUnitTest extends PHPUnit_Framework_TestCase {
 
+   public function tearDown() {
+   parent::tearDown();
+   // Reset the WatchedItemStore default instance if we overrode it
+   WatchedItemStore::overrideDefaultInstance();
+   }
+
public function provideUserTitleTimestamp() {
return [
[ User::newFromId( 111 ), Title::newFromText( 
'SomeTitle' ), null ],

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

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

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


[MediaWiki-commits] [Gerrit] Lazy-load: Remove redundant spinner lookup - change (mediawiki...MobileFrontend)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Lazy-load: Remove redundant spinner lookup
..


Lazy-load: Remove redundant spinner lookup

Apply the ':visible' query to the placeholder directly.

Change-Id: Ia2b97df7cdc872a6d27cb7255836476fccdbdd28
---
M resources/mobile.startup/Skin.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 6b3fec5..dc8361b 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -187,7 +187,7 @@
 
if (

mw.viewport.isElementInViewport( placeholder ) &&
-   $placeholder.find( '.spinner' 
).is( ':visible' )
+   $placeholder.is( ':visible' )
) {
self.loadImage( $placeholder );
return false;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2b97df7cdc872a6d27cb7255836476fccdbdd28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Dont submit invalid events - change (mediawiki...WikimediaEvents)

2016-03-14 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Dont submit invalid events
..

Dont submit invalid events

Throw away untracked events. This event (render-one) allows
for attaching tracking to particular results, it's not something
that should be logged on it's own.

Change-Id: I61469e3fd853dd17e91bb35d43fdafe65d1f1a50
---
M modules/ext.wikimediaEvents.search.js
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaEvents 
refs/changes/34/277434/1

diff --git a/modules/ext.wikimediaEvents.search.js 
b/modules/ext.wikimediaEvents.search.js
index cfa5c36..6312920 100644
--- a/modules/ext.wikimediaEvents.search.js
+++ b/modules/ext.wikimediaEvents.search.js
@@ -43,6 +43,9 @@
loggingData.numberOfResults = data.numberOfResults;
} else if ( data.action === 'submit-form' ) {
loggingData.numberOfResults = data.numberOfResults;
+   } else if ( data.action === 'render-one' ) {
+   // untracked event
+   return;
}
loggingData.timeOffsetSinceStart = Math.round( this.timeStamp - 
sessionStartTime ) ;
$.extend( loggingData, defaults );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61469e3fd853dd17e91bb35d43fdafe65d1f1a50
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaEvents
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] Disable OAI extension - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Disable OAI extension
..


Disable OAI extension

Deprecated in 2014. Several deadlines for decommissioning it have come and gone

Revert "Revert "Disable OAI extension"; postponed until Monday"

Bug: T70867
Bug: T70866
Bug: T70538

This reverts commit 71d80f7b1d4ead3f89a590878eb12b6c9f77f7c4.

Change-Id: I60107bb57ce61a38271db1d1cb395191daecbcbe
---
M wmf-config/CommonSettings.php
M wmf-config/extension-list
2 files changed, 0 insertions(+), 9 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 8edb3be..1a689dd 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -907,14 +907,6 @@
 
 $wgThumbnailEpoch = '2013060100';
 
-# OAI repository for update server
-include( $IP . '/extensions/OAI/OAIRepo.php' );
-$oaiAgentRegex = '/experimental/';
-$oaiAuth = true;
-$oaiAudit = true;
-$oaiAuditDatabase = 'oai';
-$oaiChunkSize = 40;
-
 $wgEnableUserEmail = true;
 $wgNoFollowLinks = true; // In case the MediaWiki default changed, T44594
 
diff --git a/wmf-config/extension-list b/wmf-config/extension-list
index 7dbe6fe..01555b1 100644
--- a/wmf-config/extension-list
+++ b/wmf-config/extension-list
@@ -84,7 +84,6 @@
 $IP/extensions/NavigationTiming/NavigationTiming.php
 $IP/extensions/NewUserMessage/NewUserMessage.php
 $IP/extensions/Nuke/SpecialNuke.php
-$IP/extensions/OAI/OAIRepo.php
 $IP/extensions/OAuth/OAuth.php
 $IP/extensions/PagedTiffHandler/PagedTiffHandler.php
 $IP/extensions/PageImages/PageImages.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60107bb57ce61a38271db1d1cb395191daecbcbe
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improve link preview thumbnail gallery alignment. - change (apps...wikipedia)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Improve link preview thumbnail gallery alignment.
..


Improve link preview thumbnail gallery alignment.

The new version of the Support library allows RecyclerViews to have
"wrap_content" dimensions. In our link preview window, this means that we
can now center-align the thumbnail gallery when there are fewer images
than the width of the dialog.

I'm therefore removing the minimum number of images shown in the thumbnail
gallery.

To test: go to the [[Earth]] article, and click on the [[Greek]] link in
the first sentence.  Thumbnail galleries with three or more images should
not be affected.

Change-Id: I89b2e55eedc5e4b5380d8f159ee2abf9fd9b151e
---
M app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
M app/src/main/res/layout/dialog_link_preview.xml
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git 
a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java 
b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
index 18d74bc..3aa8740 100755
--- a/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
+++ b/app/src/main/java/org/wikipedia/page/linkpreview/LinkPreviewDialog.java
@@ -362,7 +362,7 @@
 }
 
 public void onGalleryResult(GalleryCollection result) {
-if (result.getItemList().size() > 2) {
+if (!result.getItemList().isEmpty()) {
 thumbnailGallery.setGalleryCollection(result);
 
 // When the visibility is immediately changed, the images 
flicker. Add a short delay.
diff --git a/app/src/main/res/layout/dialog_link_preview.xml 
b/app/src/main/res/layout/dialog_link_preview.xml
index 01fcf97..3838982 100755
--- a/app/src/main/res/layout/dialog_link_preview.xml
+++ b/app/src/main/res/layout/dialog_link_preview.xml
@@ -96,9 +96,10 @@
 
 
 
 https://gerrit.wikimedia.org/r/277251
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I89b2e55eedc5e4b5380d8f159ee2abf9fd9b151e
Gerrit-PatchSet: 2
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant 
Gerrit-Reviewer: BearND 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: Mholloway 
Gerrit-Reviewer: Niedzielski 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: collapse platform and compat Fragments - change (apps...wikipedia)

2016-03-14 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Hygiene: collapse platform and compat Fragments
..

Hygiene: collapse platform and compat Fragments

Consolidate platform and compatibility Fragments. No functional changes
intended.

Change-Id: Ib8a5740a8b10bd8f13d6fa18d5f06ded9b68d653
---
M app/src/main/java/org/wikipedia/activity/CallbackFragment.java
D app/src/main/java/org/wikipedia/activity/CompatSingleFragmentActivity.java
A app/src/main/java/org/wikipedia/activity/FragmentUtil.java
D app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
R app/src/main/java/org/wikipedia/activity/SingleFragmentActivity.java
M app/src/main/java/org/wikipedia/crash/CrashReportActivity.java
M app/src/main/java/org/wikipedia/crash/CrashReportFragment.java
M app/src/main/java/org/wikipedia/model/EnumCodeMap.java
M app/src/main/java/org/wikipedia/settings/DeveloperSettingsActivity.java
M app/src/main/java/org/wikipedia/settings/DeveloperSettingsFragment.java
M app/src/main/java/org/wikipedia/settings/PreferenceLoaderFragment.java
M app/src/main/java/org/wikipedia/settings/SettingsActivity.java
M app/src/main/java/org/wikipedia/settings/SettingsFragment.java
M app/src/main/java/org/wikipedia/useroption/ui/UserOptionRowActivity.java
M app/src/main/java/org/wikipedia/useroption/ui/UserOptionRowFragment.java
15 files changed, 83 insertions(+), 83 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/activity/CallbackFragment.java 
b/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
index 6d2b139..c35aa62 100644
--- a/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
+++ b/app/src/main/java/org/wikipedia/activity/CallbackFragment.java
@@ -1,18 +1,7 @@
 package org.wikipedia.activity;
 
 import android.support.annotation.Nullable;
-import android.support.v4.app.Fragment;
 
-public class CallbackFragment extends Fragment {
-@Nullable protected T getCallback() {
-if (getTargetFragment() instanceof FragmentCallback) {
-//noinspection unchecked
-return (T) getTargetFragment();
-} else if (getActivity() instanceof FragmentCallback) {
-//noinspection unchecked
-return (T) getActivity();
-} else {
-return null;
-}
-}
+public interface CallbackFragment {
+@Nullable T getCallback();
 }
\ No newline at end of file
diff --git 
a/app/src/main/java/org/wikipedia/activity/CompatSingleFragmentActivity.java 
b/app/src/main/java/org/wikipedia/activity/CompatSingleFragmentActivity.java
deleted file mode 100644
index 767a942..000
--- a/app/src/main/java/org/wikipedia/activity/CompatSingleFragmentActivity.java
+++ /dev/null
@@ -1,17 +0,0 @@
-package org.wikipedia.activity;
-
-/** Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
- * compatibility {@link android.support.v4.app.Fragment}s. */
-public abstract class CompatSingleFragmentActivity>
-extends BaseSingleFragmentActivity {
-@Override
-protected void addFragment(T fragment) {
-getSupportFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
-}
-
-@Override
-protected T getFragment() {
-//noinspection unchecked
-return (T) 
getSupportFragmentManager().findFragmentById(getContainerId());
-}
-}
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/activity/FragmentUtil.java 
b/app/src/main/java/org/wikipedia/activity/FragmentUtil.java
new file mode 100644
index 000..17a9440
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/activity/FragmentUtil.java
@@ -0,0 +1,26 @@
+package org.wikipedia.activity;
+
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.support.v4.app.Fragment;
+
+public final class FragmentUtil {
+@Nullable public static FragmentCallback getCallback(@NonNull Fragment 
fragment) {
+return getCallback(fragment, FragmentCallback.class);
+}
+
+@Nullable public static  T 
getCallback(@NonNull Fragment fragment,
+   
@NonNull Class callback) {
+if (callback.isInstance(fragment.getTargetFragment())) {
+//noinspection unchecked
+return (T) fragment.getTargetFragment();
+} else if (callback.isInstance(fragment.getActivity())) {
+//noinspection unchecked
+return (T) fragment.getActivity();
+} else {
+return null;
+}
+}
+
+private FragmentUtil() { }
+}
\ No newline at end of file
diff --git 
a/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java 

[MediaWiki-commits] [Gerrit] Fix namespace configuration for kn.wikipedia - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix namespace configuration for kn.wikipedia
..


Fix namespace configuration for kn.wikipedia

This is a follow-up for change I82153d1cb9a089874eee96238b7d570fb036bf79.

Bug: T129052
Change-Id: Ie186a54bbdedb9a3ec19abea6e3ff9ce43c00202
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 9ad9cfe..09a3bd4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5011,7 +5011,7 @@
),
'knwiki' => array(
118 => 'ಕರಡು', // T129052 - Draft
-   119 => 'ಕರಡು ಚರಚ', // T129052
+   119 => 'ಕರಡು_ಚರಚ', // T129052
),
'kowiki' => array(
100 => '포털', # T87528

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie186a54bbdedb9a3ec19abea6e3ff9ce43c00202
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix namespace configuration for kn.wikipedia - change (operations/mediawiki-config)

2016-03-14 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Fix namespace configuration for kn.wikipedia
..

Fix namespace configuration for kn.wikipedia

This is a follow-up for change I82153d1cb9a089874eee96238b7d570fb036bf79.

Bug: T129052
Change-Id: Ie186a54bbdedb9a3ec19abea6e3ff9ce43c00202
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 9ad9cfe..09a3bd4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5011,7 +5011,7 @@
),
'knwiki' => array(
118 => 'ಕರಡು', // T129052 - Draft
-   119 => 'ಕರಡು ಚರಚ', // T129052
+   119 => 'ಕರಡು_ಚರಚ', // T129052
),
'kowiki' => array(
100 => '포털', # T87528

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

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

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


[MediaWiki-commits] [Gerrit] Create Draft namespace on kn.wikipedia - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Create Draft namespace on kn.wikipedia
..


Create Draft namespace on kn.wikipedia

The Kannada Wikipedia community has elected to implement draft
namespaces, with robots rules preventing indexation or follow.

New namespaces:
* 118: ಕರಡು
* 119: ಕರಡು ಚರ್ಚೆ

Bug: T129052
Change-Id: I82153d1cb9a089874eee96238b7d570fb036bf79
---
M wmf-config/InitialiseSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6981b7e..644b93b 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -5010,6 +5010,10 @@
102 => 'Жоба', // T42794 - WikiProject
103 => 'Жоба_талқылауы',
),
+   'knwiki' => array(
+   118 => 'ಕರಡು', // T129052 - Draft
+   119 => 'ಕರಡು ಚರಚ', // T129052
+   ),
'kowiki' => array(
100 => '포털', # T87528
101 => '포털토론', # T87528

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I82153d1cb9a089874eee96238b7d570fb036bf79
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Start using Support Preference library, and use SwitchPrefer... - change (apps...wikipedia)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Start using Support Preference library, and use 
SwitchPreference.
..


Start using Support Preference library, and use SwitchPreference.

This transitions our Settings (and Developer settings) screen to use the
Support Preference (v14) library, so that the appearance of the settings
is consistent across APIs.  No functional changes expected, in that sense.

This also now uses SwitchPreference instead of CheckboxPreference, which
looks a lot more Materialy!

Change-Id: I89ecdd4ced3df959380b3147cf67775a0b434bb4
---
M app/build.gradle
M app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
M app/src/main/java/org/wikipedia/page/PageActivity.java
M app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
D app/src/main/java/org/wikipedia/settings/CheckBoxPreferenceMultiLine.java
M app/src/main/java/org/wikipedia/settings/DeveloperSettingsFragment.java
M 
app/src/main/java/org/wikipedia/settings/DeveloperSettingsPreferenceLoader.java
M app/src/main/java/org/wikipedia/settings/EditTextAutoSummarizePreference.java
M app/src/main/java/org/wikipedia/settings/PreferenceLoaderFragment.java
M app/src/main/java/org/wikipedia/settings/PreferenceMultiLine.java
M app/src/main/java/org/wikipedia/settings/SettingsFragment.java
M app/src/main/java/org/wikipedia/settings/SettingsPreferenceLoader.java
M app/src/main/res/values/styles.xml
M app/src/main/res/xml/developer_preferences.xml
M app/src/main/res/xml/preferences.xml
15 files changed, 77 insertions(+), 94 deletions(-)

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



diff --git a/app/build.gradle b/app/build.gradle
index f574c7b..f4ff1b4 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -172,6 +172,7 @@
 compile "com.android.support:recyclerview-v7:$supportVersion"
 compile "com.android.support:percent:$supportVersion"
 compile "com.android.support:palette-v7:$supportVersion"
+compile "com.android.support:preference-v14:$supportVersion"
 compile 'com.facebook.fresco:fresco:0.8.1'
 compile 'com.google.code.gson:gson:2.5'
 compile "com.squareup.okhttp:okhttp-urlconnection:$okHttpVersion"
diff --git 
a/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java 
b/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
index 6d48b7b..7a5ff84 100644
--- 
a/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
+++ 
b/app/src/main/java/org/wikipedia/activity/PlatformSingleFragmentActivity.java
@@ -1,18 +1,18 @@
 package org.wikipedia.activity;
 
-import android.app.Fragment;
+import android.support.v4.app.Fragment;
 
 /** Boilerplate for a {@link android.support.v4.app.FragmentActivity} 
containing a single stack of
  * platform {@link Fragment}s. */
 public abstract class PlatformSingleFragmentActivity 
extends BaseSingleFragmentActivity {
 @Override
 protected void addFragment(Fragment fragment) {
-getFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
+getSupportFragmentManager().beginTransaction().add(getContainerId(), 
fragment).commit();
 }
 
 @Override
 protected T getFragment() {
 //noinspection unchecked
-return (T) getFragmentManager().findFragmentById(getContainerId());
+return (T) 
getSupportFragmentManager().findFragmentById(getContainerId());
 }
 }
\ No newline at end of file
diff --git a/app/src/main/java/org/wikipedia/page/PageActivity.java 
b/app/src/main/java/org/wikipedia/page/PageActivity.java
index b3ba2e6..7863a96 100644
--- a/app/src/main/java/org/wikipedia/page/PageActivity.java
+++ b/app/src/main/java/org/wikipedia/page/PageActivity.java
@@ -51,7 +51,6 @@
 import android.os.Bundle;
 import android.os.Handler;
 import android.os.Looper;
-import android.preference.PreferenceManager;
 import android.support.annotation.NonNull;
 import android.support.annotation.Nullable;
 import android.support.design.widget.NavigationView;
@@ -63,6 +62,7 @@
 import android.support.v4.widget.DrawerLayout;
 import android.support.v7.app.ActionBarDrawerToggle;
 import android.support.v7.app.AlertDialog;
+import android.support.v7.preference.PreferenceManager;
 import android.support.v7.widget.Toolbar;
 import android.support.v7.view.ActionMode;
 import android.text.Html;
diff --git a/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java 
b/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
index 4f2af18..5d5024c 100644
--- a/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
+++ b/app/src/main/java/org/wikipedia/settings/BasePreferenceLoader.java
@@ -1,16 +1,16 @@
 package org.wikipedia.settings;
 
 import android.app.Activity;
-import android.preference.Preference;
-import 

[MediaWiki-commits] [Gerrit] Remove Wikisaurus namespace from ko.wiktionary - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove Wikisaurus namespace from ko.wiktionary
..


Remove Wikisaurus namespace from ko.wiktionary

The following namespaces aren't used anymore on the Korean Wiktionary:
* 110: 미주알고주알 (Wikisaurus)
* 111: 미주알고주알 토론

Bug: T129631
Change-Id: I76f7cb0060566e25c23c535c2fbfc9f99121d863
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index b6eecf4..3fd7676 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3258,8 +3258,6 @@
'Wikiversity토론' => NS_PROJECT_TALK, // T46899
),
'+kowiktionary' => array(
-   'Wikisaurus' => 110,
-   'Wikisaurus_talk' => 111,
'낱' => NS_PROJECT, // T58761
),
'+kuwiktionary' => array(
@@ -5912,8 +5910,6 @@
'kowiktionary' => array(
100 => '부록',
101 => '부록_토론',
-   110 => '미주알고주알',
-   111 => '미주알고주알_토론',
),
'kuwiktionary' => array(
NS_PROJECT_TALK => 'Gotûbêja_Wîkîferhengê', // T39524

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I76f7cb0060566e25c23c535c2fbfc9f99121d863
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Luke081515 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] WikidataPageBanner config changes - change (operations/mediawiki-config)

2016-03-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: WikidataPageBanner config changes
..

WikidataPageBanner config changes

Enable on all namespaces by default to save confusion.
Enable WPBEnablePageImagesBanners on wikis that do not
use the magic word.

Bug: T129099
Change-Id: I9776d7cd4e516806ba3dd8c6435d24770e7e516d
---
M wmf-config/InitialiseSettings.php
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 09f808f..e92ed89 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -16583,12 +16583,18 @@
'default' => array(),
'enwiki' => array( 'monobook', 'modern', 'vector', 'cologneblue', 
'minerva' ), // T101108
 ),
+
+'wgWPBEnablePageImagesBanners' => array(
+   'default' => false,
+   'enwiki' => true, // T101108
+)
+
 'wgWPBEnableHeadingOverride' => array(
'default' => true,
'enwiki' => false, // T101108
 ),
 'wgWPBNamespaces' => array(
-   'default' => array( NS_MAIN, NS_USER ),
+   'default' => true, // T129099
'frwikivoyage' => array( NS_MAIN, NS_USER, NS_PROJECT, NS_HELP ), // 
T123084
'ruwikivoyage' => array( 0, 1, 10, 11, 12, 13, 14, 15, 2,
2300, 2301, 2302, 2303, 2600, 3, 4, 5, 6, 7, 8, 828, 829, 9 ), 
// T114566, T114723

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

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

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


[MediaWiki-commits] [Gerrit] Configure upload rights on ce.wikipedia - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Configure upload rights on ce.wikipedia
..


Configure upload rights on ce.wikipedia

The Chechen Wikipedia community has adopted an EDP and want to allow
non sysops, but not automatically all users, to upload new files.

A group 'uploader' is so created, and sysops can add or remove users
to grant or revoke uploading rights.

Bug: T129005
Change-Id: I78e8a8d1800a7d8452cc428dffdde9109f990db3
---
M dblists/commonsuploads.dblist
M wmf-config/InitialiseSettings.php
2 files changed, 22 insertions(+), 3 deletions(-)

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



diff --git a/dblists/commonsuploads.dblist b/dblists/commonsuploads.dblist
index 2c3ae10..6b6ccef 100644
--- a/dblists/commonsuploads.dblist
+++ b/dblists/commonsuploads.dblist
@@ -64,7 +64,6 @@
 cbk_zamwiki
 cdowiki
 cebwiki
-cewiki
 chrwiki
 chrwiktionary
 chwiki
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 64ca663..8d59715 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7397,6 +7397,26 @@
'suppressredirect' => true,
'move-categorypages' => true,
),
+
+   // Uploads are restricted to a uploader group - T129005
+   'user' => array(
+   'upload' => false,
+   'reupload' => false,
+   'reupload-own' => false,
+   'reupload-shared' => false,
+   ),
+   'autoconfirmed' => array(
+   'upload' => false,
+   'reupload' => false,
+   'reupload-own' => false,
+   'reupload-shared' => false,
+   ),
+   'uploader' => array(
+   'upload' => true,
+   'reupload' => true,
+   'reupload-own' => true,
+   'reupload-shared' => true,
+   ),
),
'+checkuserwiki' => array( // T30781
'autoconfirmed' => array(
@@ -8861,7 +8881,7 @@
'sysop' => array( 'flood' ), // T98576
),
'+cewiki' => array(
-   'sysop' => array( 'rollbacker', 'suppressredirect' ), // T128205
+   'sysop' => array( 'rollbacker', 'suppressredirect', 'uploader' 
), // T128205, T129005
),
'+checkuserwiki' => array(
'bureaucrat' => array( 'accountcreator', 'import', 'transwiki', 
'user', 'autoconfirmed', 'ipblock-exempt', ),
@@ -9535,7 +9555,7 @@
'sysop' => array( 'flood' ), // T98576
),
'+cewiki' => array(
-   'sysop' => array( 'rollbacker', 'suppressredirect' ), // T128205
+   'sysop' => array( 'rollbacker', 'suppressredirect', 'uploader' 
), // T128205, T129005
),
'+checkuserwiki' => array(
'bureaucrat' => array( 'sysop', 'accountcreator', 'import', 
'transwiki', 'user', 'autoconfirmed', 'ipblock-exempt', 'bureaucrat', ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I78e8a8d1800a7d8452cc428dffdde9109f990db3
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki.widgets.CategorySelector: Add missing dependency f... - change (mediawiki/core)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: mediawiki.widgets.CategorySelector: Add missing dependency for 
ForeignApi and Title
..


mediawiki.widgets.CategorySelector: Add missing dependency for ForeignApi and 
Title

Follows-up e6d1550309 which attempted to backport 86dedeea7f but
left out the dependencies.

Fixes fatal error in REL1_26 qunit tests:
> Exception in module-execute in module mediawiki.widgets.CategorySelector
> TypeError: Expecting a function in instanceof check, but got undefined

Bug: T125335
Change-Id: I6e5834c3098d00bfc75e9f6b0d61ed6e5babc6ca
---
M resources/Resources.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 6a22af6..6626f05 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -2031,6 +2031,8 @@
'dependencies' => array(
'oojs-ui',
'mediawiki.api',
+   'mediawiki.ForeignApi',
+   'mediawiki.Title',
),
'targets' => array( 'desktop', 'mobile' ),
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e5834c3098d00bfc75e9f6b0d61ed6e5babc6ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_26
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Women's writes WikiWarriors edit-a-thon throttle rule - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Women's writes WikiWarriors edit-a-thon throttle rule
..


Women's writes WikiWarriors edit-a-thon throttle rule

New throttle rule:
* Event name  Women's writes WikiWarriors edit-a-thon
* Event start ... 2016-03-15 20:00 -5:00
* Event end . 2016-03-16 01:00 -5:00
* IP  129.93.0.0/16, 40.135.25.0/24
* Projects .. enwiki, commonswiki
* Attendees . 100 (margin set at 150)

Cleaned former throttle rules.

Bug: T129697
Change-Id: Ied12a163278bd129efe24aaf78c1d8fcad90077d
---
M wmf-config/throttle.php
1 file changed, 11 insertions(+), 9 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 470e2a1..f8580c5 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -28,15 +28,6 @@
 # );
 ## Add throttling definitions below.
 
-
-$wmgThrottlingExceptions[] = array( // T128847 - Ateneo de Manila University 
workshops
-   'from'   => '2016-03-10T00:00 +8:00',
-   'to' => '2016-03-10T23:59 +8:00',
-   'IP' => array( '202.125.102.33', '121.58.232.35' ),
-   'dbname' => array( 'tlwiki', 'enwiki', 'commonswiki' ),
-   'value'  => 100 // 60-80 expected
-);
-
 $wmgThrottlingExceptions[] = array( // T129342 - Wikipedia while at Women of 
the World Festival
'from'   => '2016-03-13T11:00 +0:00',
'to' => '2016-03-13T13:00 +0:00',
@@ -53,6 +44,17 @@
'value'  => 70 // 20-50 expected
 );
 
+$wmgThrottlingExceptions[] = array( // T129697 - Women's writes WikiWarriors 
edit-a-thon
+   'from'   => '2016-03-15T20:00 -5:00',
+   'to' => '2016-03-16T01:00 -5:00',
+   'range'  => array(
+   '129.93.0.0/16',
+   '40.135.25.0/24',
+   ),
+   'dbname' => array( 'enwiki', 'commonswiki' ),
+   'value'  => 150 // 100 expected
+);
+
 $wmgThrottlingExceptions[] = array( // T129018 - Workshop for cawiki and frwiki
'from'   => '2016-03-16T00:00 +0:00',
'to' => '2016-03-16T23:59 +0:00',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ied12a163278bd129efe24aaf78c1d8fcad90077d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Lazy-load: Remove redundant spinner lookup - change (mediawiki...MobileFrontend)

2016-03-14 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Lazy-load: Remove redundant spinner lookup
..

Lazy-load: Remove redundant spinner lookup

Apply the ':visible' query to the placeholder directly.

Change-Id: Ia2b97df7cdc872a6d27cb7255836476fccdbdd28
---
M resources/mobile.startup/Skin.js
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/29/277429/1

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index 6b3fec5..dc8361b 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -187,7 +187,7 @@
 
if (

mw.viewport.isElementInViewport( placeholder ) &&
-   $placeholder.find( '.spinner' 
).is( ':visible' )
+   $placeholder.is( ':visible' )
) {
self.loadImage( $placeholder );
return false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2b97df7cdc872a6d27cb7255836476fccdbdd28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Lazy-load: Avoid jQuery filter() due to pushStack() memory - change (mediawiki...MobileFrontend)

2016-03-14 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Lazy-load: Avoid jQuery filter() due to pushStack() memory
..

Lazy-load: Avoid jQuery filter() due to pushStack() memory

Assigning the result of filter() is the same as chaining.

For chaining support, jQuery has to keep a stack of all previous versions of
the collections so that things like end() and addBack() work as expected.

In general, when maintaining a collection for a long time, avoid jQuery methods
and use a plain array instead. Otherwise it requires jQuery to keep hold of
all previous versions of the array.

Change-Id: I6b0f08f3f32b490110c7faf5c649effdb3818936
---
M resources/mobile.startup/Skin.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MobileFrontend 
refs/changes/30/277430/1

diff --git a/resources/mobile.startup/Skin.js b/resources/mobile.startup/Skin.js
index dc8361b..f7771c3 100644
--- a/resources/mobile.startup/Skin.js
+++ b/resources/mobile.startup/Skin.js
@@ -175,14 +175,14 @@
 */
loadImages: function () {
var self = this,
-   $imagePlaceholders = this.$( '#content' ).find( 
'.lazy-image-placeholder' );
+   imagePlaceholders = this.$( '#content' ).find( 
'.lazy-image-placeholder' ).toArray();
 
/**
 * Load remaining images in viewport
 */
function _loadImages() {
 
-   $imagePlaceholders = $imagePlaceholders.filter( 
function ( index, placeholder ) {
+   imagePlaceholders = $.grep( imagePlaceholders, 
function ( placeholder ) {
var $placeholder = $( placeholder );
 
if (
@@ -196,7 +196,7 @@
return true;
} );
 
-   if ( !$imagePlaceholders.length ) {
+   if ( !imagePlaceholders.length ) {
M.off( 'scroll', _loadImages );
M.off( 'resize', _loadImages );
M.off( 'section-toggled', _loadImages );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b0f08f3f32b490110c7faf5c649effdb3818936
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Set logo and site name on gu.wiktionary - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Set logo and site name on gu.wiktionary
..


Set logo and site name on gu.wiktionary

In T42776, the community decided to write "Wiktionary"
as "વિક્શનરી, but further recent discussions pick instead
"વિકિકોશ" as name.

The site name, meta namespace and logo are amended accordingly.

Bug: T122407
Change-Id: I5ad0f9b14c9826c8740ab4521513f0b953eb2795
---
M static/images/project-logos/guwiktionary.png
M wmf-config/InitialiseSettings.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/static/images/project-logos/guwiktionary.png 
b/static/images/project-logos/guwiktionary.png
index cd9f818..8a55810 100644
--- a/static/images/project-logos/guwiktionary.png
+++ b/static/images/project-logos/guwiktionary.png
Binary files differ
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 27fc99d..2d26439 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -1678,7 +1678,7 @@
'grantswiki' => 'Wikimedia Foundation Grants Discussion',
'guwiki' => 'વિકિપીડિયા',
'guwikisource' => 'વિકિસ્રોત',
-   'guwiktionary' => 'વિક્શનરી', // T42776
+   'guwiktionary' => 'વિકિકોશ', // T122407
'hewiki' => 'ויקיפדיה',
'hewikibooks' => 'ויקיספר',
'hewikinews' => 'ויקיחדשות',
@@ -2159,7 +2159,7 @@
'grantswiki' => 'Project',
'guwiki' => 'વિકિપીડિયા',
'guwikisource' => 'વિકિસ્રોત',
-   'guwiktionary' => 'વિક્શનરી', // T42776
+   'guwiktionary' => 'વિકિકોશ', // T122407
'hewiki' => 'ויקיפדיה',
'hewikibooks' => 'ויקיספר',
'hewikinews' => 'ויקיחדשות',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5ad0f9b14c9826c8740ab4521513f0b953eb2795
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow phraseBoost to be set to 1 or lower - change (mediawiki...CirrusSearch)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Allow phraseBoost to be set to 1 or lower
..


Allow phraseBoost to be set to 1 or lower

This is needed for the next A/B test.

Change-Id: Ia3529a276496c26acc42bb4cb99f238eb05e8676
(cherry picked from commit 2abeca8d82a6a3250e07ad13c0354b6a2c3aac74)
---
M includes/Searcher.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Searcher.php b/includes/Searcher.php
index bc3b832..92a530c 100644
--- a/includes/Searcher.php
+++ b/includes/Searcher.php
@@ -689,7 +689,7 @@
// Queries without spaces are either single term or 
have a phrase query generated.
// Queries with the quote already contain a phrase 
query and we can't build phrase queries
// out of phrase queries at this point.
-   if ( $this->config->get( 
'CirrusSearchPhraseRescoreBoost' ) > 1.0 &&
+   if ( $this->config->get( 
'CirrusSearchPhraseRescoreBoost' ) > 0.0 &&
$this->config->get( 
'CirrusSearchPhraseRescoreWindowSize' ) &&

!$this->searchContext->isSearchContainedSyntax() &&
strpos( $queryStringQueryString, '"' ) 
=== false &&

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3529a276496c26acc42bb4cb99f238eb05e8676
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: wmf/1.27.0-wmf.16
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: DCausse 
Gerrit-Reviewer: Gehel 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Smalyshev 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Run AB test with phrase boost of 1 - change (mediawiki...WikimediaEvents)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Run AB test with phrase boost of 1
..


Run AB test with phrase boost of 1

Updates the search satisfaction schema to increase participation
from 0.5% to 1%. The extra half of sessions included are then put
into a phraseBoostEq1 bucket and tracked via event_subTest.

Bug: T129601
Change-Id: Icc182e320ba9fb4187140df167191bc42b9ed569
(cherry picked from commit bbb3d1055d3fa743857c7ee38af57404be7d7ce5)
---
M modules/ext.wikimediaEvents.searchSatisfaction.js
1 file changed, 52 insertions(+), 22 deletions(-)

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



diff --git a/modules/ext.wikimediaEvents.searchSatisfaction.js 
b/modules/ext.wikimediaEvents.searchSatisfaction.js
index 7d7484f..28fb7c7 100644
--- a/modules/ext.wikimediaEvents.searchSatisfaction.js
+++ b/modules/ext.wikimediaEvents.searchSatisfaction.js
@@ -25,7 +25,7 @@
return;
}
 
-   var search, autoComplete, session, eventLog,
+   var search, autoComplete, session, eventLog, initSubTest,
isSearchResultPage = mw.config.get( 'wgIsSearchResultPage' ),
uri = new mw.Uri( location.href ),
checkinTimes = [ 10, 20, 30, 40, 50, 60, 90, 120, 150, 180, 
210, 240, 300, 360, 420 ],
@@ -67,6 +67,7 @@
// persistent state keys that have a lifetime
ttl = {
sessionId: 10 * 60 * 1000,
+   subTest: 10 * 60 * 1000,
token: 24 * 60 * 60 * 1000
},
now = new Date().getTime();
@@ -120,7 +121,7 @@
}
// If a sessionId exists the user was previously 
accepted into the test
if ( !sessionId ) {
-   if ( !oneIn( 200 ) ) {
+   if ( !oneIn( 100 ) ) {
// user was not chosen in a sampling of 
search results
session.set( 'sessionId', 'rejected' );
return false;
@@ -129,6 +130,11 @@
// have a search session id, generate one.
if ( !session.set( 'sessionId', randomToken() ) 
) {
return false;
+   }
+
+   // Assign 50% of users to test bucket
+   if ( oneIn( 2 ) ) {
+   session.set( 'subTest', 
'phraseBoostEq1' );
}
}
 
@@ -359,6 +365,10 @@
 
lastScrollTop = scrollTop;
 
+   if ( session.get( 'subTest' ) ) {
+   evt.subTest = session.get( 'subTest' );
+   }
+
if ( articleId > 0 ) {
evt.articleId = articleId;
}
@@ -469,6 +479,32 @@
}
 
/**
+* Decorator to call the inner function at most one time.
+*
+* @param {Function} fn
+* @return {Function}
+*/
+   function atMostOnce( fn ) {
+   var called = false;
+   return function () {
+   if ( !called ) {
+   fn.apply( null, arguments );
+   called = true;
+   }
+   };
+   }
+
+   initSubTest = atMostOnce( function ( session ) {
+   if ( session.get( 'subTest' ) === 'phraseBoostEq1' ) {
+   $( '' ).attr( {
+   type: 'hidden',
+   name: 'cirrusPhraseBoost',
+   value: '1'
+   } ).insertAfter( $( 'input[type=search]' ) );
+   }
+   } );
+
+   /**
 * Delay session initialization as late in the
 * process as possible, but only do it once.
 *
@@ -479,23 +515,8 @@
 
if ( session.get( 'enabled' ) ) {
fn( session );
+   initSubTest( session );
}
-   }
-
-   /**
-* Decorator to call the inner function at most one time.
-*
-* @param {Function} fn
-* @return {Function}
-*/
-   function atMostOnce( fn ) {
-   var called = false;
-   return function () {
-   if ( !called ) {
-   fn();
-   called = true;
-   }
-   };
}
 
// Full text search satisfaction tracking
@@ -507,19 +528,28 @@
 
// Autocomplete 

[MediaWiki-commits] [Gerrit] Enable SandboxLink on sr.wikipedia - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable SandboxLink on sr.wikipedia
..


Enable SandboxLink on sr.wikipedia

This wiki has a fair number of new contributors, part of education
program. A visible sandbox link is expected to be useful for them.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8ddf139..527b908 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12182,6 +12182,7 @@
'simplewiktionary' => true,
'skwiki' => true,
'sowiki' => true,
+   'srwiki' => true, // T129485
'svwiki' => true,
'tawiki' => true,
'tawiktionary' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9391508f3b7eed1f29fe4d6f58d5f1cbc6c9e8e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ack and requeue when leaving authorization for review - change (wikimedia...SmashPig)

2016-03-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Ack and requeue when leaving authorization for review
..

Ack and requeue when leaving authorization for review

Oops, same issue as the last Adyen failmail flood, just a less
common case.

Change-Id: I43d039297691b29a12c6d76d03ec016a2bddd91c
---
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/98/277298/1

diff --git a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php 
b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
index 8e1c4f9..d0cc7e6 100644
--- a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
+++ b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
@@ -102,6 +102,10 @@
// Delete the queue message whatever happened
$pendingQueue->queueAckObject();
$pendingQueue->removeObjectsById( $this->correlationId 
);
+   } else {
+   // Not cancelling, just leaving the authorization in 
the console for review.
+   // Put the donor details back on the pending queue.
+   $pendingQueue->queueIgnoreObject();
}
 
Logger::leaveContext();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I43d039297691b29a12c6d76d03ec016a2bddd91c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Add files to noc.wikimedia.org - change (operations/mediawiki-config)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add files to noc.wikimedia.org
..


Add files to noc.wikimedia.org

The following configuration files are added to the /conf list:
* FeaturedFeedsWMF.php
* HHVMRequestInit.php

There is some interest expressed to see these files added to noc. as
it offers a centralized point to find them directly instead to explore
the Git repositories.

Bug: T116163
Change-Id: I4e220b6a45cb11fc23a196d20340b4992e1a8c48
---
A docroot/noc/conf/FeaturedFeedsWMF.php.txt
A docroot/noc/conf/HHVMRequestInit.php.txt
M docroot/noc/createTxtFileSymlinks.sh
3 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/docroot/noc/conf/FeaturedFeedsWMF.php.txt 
b/docroot/noc/conf/FeaturedFeedsWMF.php.txt
new file mode 12
index 000..2f54b67
--- /dev/null
+++ b/docroot/noc/conf/FeaturedFeedsWMF.php.txt
@@ -0,0 +1 @@
+../../../wmf-config/FeaturedFeedsWMF.php
\ No newline at end of file
diff --git a/docroot/noc/conf/HHVMRequestInit.php.txt 
b/docroot/noc/conf/HHVMRequestInit.php.txt
new file mode 12
index 000..6ed417d
--- /dev/null
+++ b/docroot/noc/conf/HHVMRequestInit.php.txt
@@ -0,0 +1 @@
+../../../wmf-config/HHVMRequestInit.php
\ No newline at end of file
diff --git a/docroot/noc/createTxtFileSymlinks.sh 
b/docroot/noc/createTxtFileSymlinks.sh
index c26663b..f572d39 100755
--- a/docroot/noc/createTxtFileSymlinks.sh
+++ b/docroot/noc/createTxtFileSymlinks.sh
@@ -18,9 +18,11 @@
db-labs.php
ext-labs.php
ext-production.php
+   FeaturedFeedsWMF.php
filebackend-labs.php
filebackend.php
flaggedrevs.php
+   HHVMRequestInit.php
import.php
interwiki.php
jobqueue-eqiad.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e220b6a45cb11fc23a196d20340b4992e1a8c48
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>
Gerrit-Reviewer: saper 

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


[MediaWiki-commits] [Gerrit] CompletionSuggester: add support for ICU Folding - change (mediawiki...CirrusSearch)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: CompletionSuggester: add support for ICU Folding
..


CompletionSuggester: add support for ICU Folding

Users can set $wgCirrusSearchUseIcuFolding to true to enable this filter
in place of the default ASCII Folding (requires ICU plugin).
It allows to support a wider range of unicode characters for accent squashing.

Bug: T129502
Change-Id: Id715a6670e2c2f8eb9dd4a3ed1a89bea4064d6dd
---
M CirrusSearch.php
M includes/Maintenance/AnalysisConfigBuilder.php
M includes/Maintenance/SuggesterAnalysisConfigBuilder.php
M maintenance/updateSuggesterIndex.php
4 files changed, 40 insertions(+), 10 deletions(-)

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



diff --git a/CirrusSearch.php b/CirrusSearch.php
index 1a0a9d5..07151a0 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -760,6 +760,17 @@
 $wgCirrusSearchCompletionSettings = 
$wgCirrusSearchCompletionProfiles['default'];
 
 /**
+ * Enable ICU Folding instead of the default ASCII Folding.
+ * It allows to cover a wider range of characters when squashing diacritics.
+ * see 
https://www.elastic.co/guide/en/elasticsearch/plugins/current/analysis-icu-folding.html
+ * Currently this settings is only used by the CompletionSuggester.
+ * Requires the ICU plugin installed.
+ * Set to true to enable, false to use the default ASCII Folding
+ * NOTE: Experimental
+ */
+$wgCirrusSearchUseIcuFolding = false;
+
+/**
  * Set the default scoring function to be used by 
maintenance/updateSuggesterIndex.php
  * @see includes/BuildDocument/SuggestScoring.php for more details about 
scoring functions
  * NOTE: if you change the scoring method you'll have to rebuild the suggester 
index.
diff --git a/includes/Maintenance/AnalysisConfigBuilder.php 
b/includes/Maintenance/AnalysisConfigBuilder.php
index 5ba02d1..c652bb3 100644
--- a/includes/Maintenance/AnalysisConfigBuilder.php
+++ b/includes/Maintenance/AnalysisConfigBuilder.php
@@ -49,6 +49,11 @@
private $similarity;
 
/**
+* @var SearchConfig cirrus config
+*/
+   protected $config;
+
+   /**
 * Constructor
 * @param string $langCode The language code to build config for
 * @param array(string) $plugins list of plugins installed in 
Elasticsearch
@@ -66,6 +71,7 @@
$config = 
ConfigFactory::getDefaultInstance()->makeConfig( 'CirrusSearch' );
}
$this->similarity = $config->get( 
'CirrusSearchSimilarityProfile' );
+   $this->config = $config;
}
 
/**
diff --git a/includes/Maintenance/SuggesterAnalysisConfigBuilder.php 
b/includes/Maintenance/SuggesterAnalysisConfigBuilder.php
index 936ae98..7abde94 100644
--- a/includes/Maintenance/SuggesterAnalysisConfigBuilder.php
+++ b/includes/Maintenance/SuggesterAnalysisConfigBuilder.php
@@ -34,14 +34,20 @@
 * @param string $langCode The language code to build config for
 * @param array(string) $plugins list of plugins installed in 
Elasticsearch
 */
-   public function __construct( $langCode, $plugins ) {
-   parent::__construct( $langCode, $plugins );
+   public function __construct( $langCode, $plugins, $config = null ) {
+   parent::__construct( $langCode, $plugins, $config );
}
 
/**
 * Build and analysis config with sane defaults
 */
protected function defaults() {
+   // Use the default Lucene ASCII filter
+   $folding_type = 'asciifolding';
+   if ( $this->isIcuAvailable() && $this->config->get( 
'CirrusSearchUseIcuFolding' ) === true ) {
+   // Use ICU Folding if the plugin is available and 
activated in the config
+   $folding_type = 'icu_folding';
+   }
$defaults = array(
'char_filter' => array(
'word_break_helper' => array(
@@ -81,9 +87,8 @@
"stopwords" => "_none_",
"remove_trailing" => "true"
),
-   "asciifolding_preserve" => array(
-   "type" => "asciifolding",
-   "preserve_original" => "false",
+   "asciifolding" => array(
+   "type" => $folding_type,
),
"icu_normalizer" => array(
"type" => "icu_normalizer",
@@ -101,7 +106,7 @@
"standard",
"lowercase",
  

[MediaWiki-commits] [Gerrit] Fix undefined $modelId in MWUnknownContentModelException - change (mediawiki/core)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix undefined $modelId in MWUnknownContentModelException
..


Fix undefined $modelId in MWUnknownContentModelException

Change-Id: I13b93cc1e9d7c050765fab5d8de4e17ca4319dc1
---
M includes/content/ContentHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index c0bd725..7430caf 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -55,7 +55,7 @@
 
/** @return string */
public function getModelId() {
-   return $modelId;
+   return $this->modelId;
}
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13b93cc1e9d7c050765fab5d8de4e17ca4319dc1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add Adyen Cancellation IPN message class - change (wikimedia...SmashPig)

2016-03-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Add Adyen Cancellation IPN message class
..

Add Adyen Cancellation IPN message class

Change-Id: I50649bbe948ed78c48492822ab954101f2237aeb
---
A PaymentProviders/Adyen/ExpatriatedMessages/Cancellation.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/28/277428/1

diff --git a/PaymentProviders/Adyen/ExpatriatedMessages/Cancellation.php 
b/PaymentProviders/Adyen/ExpatriatedMessages/Cancellation.php
new file mode 100644
index 000..df574d0
--- /dev/null
+++ b/PaymentProviders/Adyen/ExpatriatedMessages/Cancellation.php
@@ -0,0 +1,5 @@
+https://gerrit.wikimedia.org/r/277428
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I50649bbe948ed78c48492822ab954101f2237aeb
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] Cancel duplicate authorizations for a single order ID - change (wikimedia...SmashPig)

2016-03-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review.

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

Change subject: Cancel duplicate authorizations for a single order ID
..

Cancel duplicate authorizations for a single order ID

Donors can somehow submit the Adyen iframe multiple times without
our generating new order IDs / merchant references.  If we get
duplicate authorizations, mark the donor details as captured after
capturing the first, then cancel all subsequent authorizations.

We send the pending queue message before the donor sees the credit
card form, so we assume that if no message exists, this is a duplicate
authorization and the original has already been sent to Civi.

Bug: T129935
Change-Id: I2b338164461130c3afd0d91efbbd7cfbeec1b680
---
M CrmLink/Messages/DonationInterfaceMessage.php
M PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
2 files changed, 77 insertions(+), 46 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/27/277427/1

diff --git a/CrmLink/Messages/DonationInterfaceMessage.php 
b/CrmLink/Messages/DonationInterfaceMessage.php
index 6db0360..3f9c391 100644
--- a/CrmLink/Messages/DonationInterfaceMessage.php
+++ b/CrmLink/Messages/DonationInterfaceMessage.php
@@ -6,6 +6,7 @@
  * Message sent to the 'cc-limbo' queue when a payment has been initiated and 
sent off to the gateway.
  */
 class DonationInterfaceMessage extends KeyedOpaqueStorableObject {
+   public $captured = '';
public $city = '';
public $city_2 = '';
public $comment = '';
diff --git a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php 
b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
index d0cc7e6..7600795 100644
--- a/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
+++ b/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
@@ -26,10 +26,10 @@
protected $avsResult;
protected $cvvResult;
// Actions to take after examining capture request and queue message
-   const ACTION_IGNORE = 'ignore'; // no donor info or auth already 
captured, do nothing
const ACTION_PROCESS = 'process'; // all clear to capture payment
const ACTION_REJECT = 'reject'; // very likely fraud - cancel the 
authorization
const ACTION_REVIEW = 'review'; // potential fraud - do not capture now
+   const ACTION_DUPLICATE = 'duplicate'; // probable duplicate - cancel 
the authorization
 
public static function factory( Authorisation $authMessage ) {
$obj = new ProcessCaptureRequestJob();
@@ -54,58 +54,69 @@
);
 
// Determine if a message exists in the pending queue; if it 
does not then
-   // this payment has already been sent to the verified queue.
+   // this payment has already been sent to the verified queue. If 
it does,
+   // we need to check $capture_requested in case we have 
requested a capture
+   // but have not yet received notification of capture success. 
Either case can
+   // occur when a donor submits their credit card details 
multiple times against
+   // a single order ID. We should cancel all the duplicate 
authorizations.
Logger::debug( 'Attempting to locate associated message in 
pending queue.' );
$pendingQueue = Configuration::getDefaultConfig()->object( 
'data-store/pending' );
$queueMessage = $pendingQueue->queueGetObject( null, 
$this->correlationId );
$success = true;
 
$action = $this->determineAction( $queueMessage );
-   if ( $action == self::ACTION_PROCESS ) {
-   // Tell the pending queue to keep the message around 
for the RecordCaptureJob
-   $pendingQueue->queueIgnoreObject();
-
-   // Attempt to capture the payment
-   $api = new AdyenPaymentsAPI( $this->account );
-   Logger::info(
-   "Attempting capture API call for currency 
'{$this->currency}', " .
-   "amount '{$this->amount}', reference 
'{$this->pspReference}'."
-   );
-   $captureResult = $api->capture( $this->currency, 
$this->amount, $this->pspReference );
-
-   if ( $captureResult ) {
-   // Success!
+   switch( $action ) {
+   case self::ACTION_PROCESS:
+   // Attempt to capture the payment
+   $api = new AdyenPaymentsAPI( $this->account );
Logger::info(
-   "Successfully captured payment! 
Returned reference: '{$captureResult}'. " .
-   'Leaving pending message in 
queue for 

[MediaWiki-commits] [Gerrit] Thank You letters for executive director transition - change (wikimedia...crm)

2016-03-14 Thread Pcoombe (Code Review)
Pcoombe has submitted this change and it was merged.

Change subject: Thank You letters for executive director transition
..


Thank You letters for executive director transition

Bug: T129373
Change-Id: Ic579f5a474c4f90735bc1303f8d1794e7bdda229
---
M sites/all/modules/thank_you/templates/html/thank_you.ca.html
M sites/all/modules/thank_you/templates/html/thank_you.da.html
M sites/all/modules/thank_you/templates/html/thank_you.de.html
M sites/all/modules/thank_you/templates/html/thank_you.en.html
M sites/all/modules/thank_you/templates/html/thank_you.es.html
M sites/all/modules/thank_you/templates/html/thank_you.fr.html
M sites/all/modules/thank_you/templates/html/thank_you.he.html
M sites/all/modules/thank_you/templates/html/thank_you.hu.html
M sites/all/modules/thank_you/templates/html/thank_you.it.html
M sites/all/modules/thank_you/templates/html/thank_you.ja.html
M sites/all/modules/thank_you/templates/html/thank_you.lv.html
M sites/all/modules/thank_you/templates/html/thank_you.mk.html
M sites/all/modules/thank_you/templates/html/thank_you.nb.html
M sites/all/modules/thank_you/templates/html/thank_you.nl.html
M sites/all/modules/thank_you/templates/html/thank_you.pt-br.html
M sites/all/modules/thank_you/templates/html/thank_you.pt.html
M sites/all/modules/thank_you/templates/html/thank_you.ro.html
M sites/all/modules/thank_you/templates/html/thank_you.ru.html
M sites/all/modules/thank_you/templates/html/thank_you.sk.html
M sites/all/modules/thank_you/templates/html/thank_you.sv.html
M sites/all/modules/thank_you/templates/html/thank_you.uk.html
M sites/all/modules/thank_you/templates/html/thank_you.zh.html
22 files changed, 73 insertions(+), 122 deletions(-)

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



diff --git a/sites/all/modules/thank_you/templates/html/thank_you.ca.html 
b/sites/all/modules/thank_you/templates/html/thank_you.ca.html
index 9e34476..e607a66 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.ca.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.ca.html
@@ -21,9 +21,7 @@
 
 Gràcies per permetre'ns continuar creixent i impactant vides un any més.
 
-Lila Tretikov
-Directora Executiva,
-Fundació Wikimedia
+Fundació Wikimedia
 
 Moltes empreses doblen la donació que fan els seus treballadors: per favor, 
comprova si la teva empresa té https://wikimediafoundation.org/wiki/Matching_Gifts/form;>un programa 
similar.
 
@@ -33,4 +31,4 @@
 
 Aquesta carta serveix de rebut de la donació. Aquesta donació no implica, 
en cap cas, fins lucratius. La Wikimedia Foundation, Inc. és una organització 
sense ànim de lucre amb l'exemció d'impostos 501(c)(3) al Estats Units. La 
nostra adreça és 149 New Montgomery, 3rd Floor, San Francisco, CA, 94105. 
Número d'exempció d'impostos: 20-0049703
 
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sites/all/modules/thank_you/templates/html/thank_you.da.html 
b/sites/all/modules/thank_you/templates/html/thank_you.da.html
index e177401..adca79e 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.da.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.da.html
@@ -21,9 +21,7 @@
 
 Vi takker dig for at bevare os i vækst og påvirkning af menneskeliv i endnu 
et år.
 
-Lila Tretikov
-Adminstrerende direktør,
-Wikimedia Foundation
+Wikimedia Foundation
 
 Mange arbejdsgivere matcher ansattes donationer. Prøv at tjekke om din 
arbejdsgiver har et https://wikimediafoundation.org/wiki/Matching_Gifts/form;>match 
gaveprogram.
 
@@ -33,4 +31,4 @@
 
 Dette brev kan anvendes som kvittering for dit bidrag. Ingen varer eller 
tjenesteydelser blev leveret, hverken helt eller delvist, som følge af dette 
bidrag. Wikimedia Foundation, Inc., er en velgørende non-profitorganisation med 
501(c)(3) skattefritagelsesstatus i USA. Vores adresse er 149 New Montgomery, 
3rd Floor, San Francisco, CA, 94105, USA. Skattefritagelsesnummer i USA: 
20-0049703
 
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/sites/all/modules/thank_you/templates/html/thank_you.de.html 
b/sites/all/modules/thank_you/templates/html/thank_you.de.html
index aa97f5c..ab910b5 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.de.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.de.html
@@ -21,9 +21,7 @@
 
 Vielen Dank, dass Sie uns ein weiteres Jahr bei unserem Wachstum und der 
Verbesserung des Lebens unterstützen.
 
-Lila Tretikov
-Geschäftsführerin,
-Wikimedia Foundation
+Wikimedia Foundation
 
 Viele Arbeitgeber bieten Mitarbeiterspenden: bitte prüfen Sie, ob ihre 
Firma ein https://wikimediafoundation.org/wiki/Matching_Gifts/form;>Firmenspendenprogramm
 bietet.
 
@@ -33,4 +31,4 @@
 
 Dieses Schreiben gilt als Nachweis Ihrer Spende. Für diese Spende wurden 
keine Waren oder Dienstleistungen - ganz oder in Teilen - bereitgestellt. Die 
Wikimedia Foundation, Inc., ist eine 

[MediaWiki-commits] [Gerrit] Have mw.echo.api.APIHandler.markItemRead actually return a p... - change (mediawiki...Echo)

2016-03-14 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Have mw.echo.api.APIHandler.markItemRead actually return a 
promise
..

Have mw.echo.api.APIHandler.markItemRead actually return a promise

Per its docs which say it does.

Change-Id: I2a4fb393c1bc3eba31a1bad34342a11800767fb0
---
M modules/api/mw.echo.api.APIHandler.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/api/mw.echo.api.APIHandler.js 
b/modules/api/mw.echo.api.APIHandler.js
index 5e7dd34..59fe1dd 100644
--- a/modules/api/mw.echo.api.APIHandler.js
+++ b/modules/api/mw.echo.api.APIHandler.js
@@ -122,7 +122,7 @@
 *  are marked as read.
 */
mw.echo.api.APIHandler.prototype.markItemRead = function ( itemId, 
isRead ) {
-   this.markItemsRead( [ itemId ], isRead );
+   return this.markItemsRead( [ itemId ], isRead );
};
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a4fb393c1bc3eba31a1bad34342a11800767fb0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] Reapply "Remove RejectParserCacheValue hook handler" - change (mediawiki...MobileFrontend)

2016-03-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Reapply "Remove RejectParserCacheValue hook handler"
..

Reapply "Remove RejectParserCacheValue hook handler"

This reverts commit ff7a76d7197018525dd7e2a6114adf65b73956cf.

Change-Id: I113e31bcf1b4fe646ef5d490e3e9d6d84a2c6249
---
M extension.json
M includes/MobileFrontend.hooks.php
2 files changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index cfbcf6f..fd7e954 100644
--- a/extension.json
+++ b/extension.json
@@ -1961,6 +1961,9 @@
],
"TitleSquidURLs": [
"MobileFrontendHooks::onTitleSquidURLs"
+   ],
+   "RejectParserCacheValue": [
+   "MobileFrontendHooks::onRejectParserCacheValue"
]
},
"config": {
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 7e72b4c..f93958b 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -1333,6 +1333,24 @@
}
 
/**
+* Remove corruption caused by T124356 from the parser cache
+*
+* @param ParserOutput $value
+* @param WikiPage $wikiPage
+* @param ParserOptions $popts
+* @return bool
+*/
+   public static function onRejectParserCacheValue( $value, $wikiPage, 
$popts ) {
+   if ( strpos( $value->getRawText(), 'edit-page' ) !== false ) {
+   // Bug T124356 parser cache corruption
+   RequestContext::getMain()->getStats()->increment( 
'T124356' );
+   return false;
+   }
+
+   return true;
+   }
+
+   /**
 * Handler for Extension registration callback
 */
public static function onRegistration() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I113e31bcf1b4fe646ef5d490e3e9d6d84a2c6249
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 53d3c62..af64cf7 - change (mediawiki/extensions)

2016-03-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 53d3c62..af64cf7
..

Syncronize VisualEditor: 53d3c62..af64cf7

Change-Id: I338d47c0e100a0e1ba54f509837187229e8a2c08
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/24/277424/1

diff --git a/VisualEditor b/VisualEditor
index 53d3c62..af64cf7 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 53d3c62d46ae2dbec5b0939a307ab12ef8480388
+Subproject commit af64cf7b12235e43ba91e957d339369a3aaf6b2b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I338d47c0e100a0e1ba54f509837187229e8a2c08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 53d3c62..af64cf7 - change (mediawiki/extensions)

2016-03-14 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 53d3c62..af64cf7
..


Syncronize VisualEditor: 53d3c62..af64cf7

Change-Id: I338d47c0e100a0e1ba54f509837187229e8a2c08
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 53d3c62..af64cf7 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 53d3c62d46ae2dbec5b0939a307ab12ef8480388
+Subproject commit af64cf7b12235e43ba91e957d339369a3aaf6b2b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I338d47c0e100a0e1ba54f509837187229e8a2c08
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Pass deploy user from service::node - change (operations/puppet)

2016-03-14 Thread Thcipriani (Code Review)
Thcipriani has uploaded a new change for review.

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

Change subject: Pass deploy user from service::node
..

Pass deploy user from service::node

scap::target allows a user to be specified, pass that from service::node

Change-Id: Ibc76c5be838172f3036bc3dc8d1fe0cafb1214df
---
M modules/aqs/manifests/init.pp
M modules/service/manifests/deploy/scap.pp
M modules/service/manifests/node.pp
3 files changed, 10 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/23/277423/1

diff --git a/modules/aqs/manifests/init.pp b/modules/aqs/manifests/init.pp
index eb1e385..4430392 100644
--- a/modules/aqs/manifests/init.pp
+++ b/modules/aqs/manifests/init.pp
@@ -72,6 +72,7 @@
 auto_refresh=> false,
 init_restart=> false,
 deployment  => 'scap3',
+deployment_user => 'deploy-service',
 }
 
 }
diff --git a/modules/service/manifests/deploy/scap.pp 
b/modules/service/manifests/deploy/scap.pp
index e234682..99e3ee5 100644
--- a/modules/service/manifests/deploy/scap.pp
+++ b/modules/service/manifests/deploy/scap.pp
@@ -24,9 +24,16 @@
 $user= 'deploy-service',
 $service_name= undef,
 ) {
+$manage_user = false
+
+if $user == 'deploy-service' {
+$manage_user = true
+}
+
 scap::target { $title:
 public_key_source => $public_key_file,
 deploy_user   => $user,
 service_name  => $service_name,
+manage_user   => $manage_user,
 }
 }
diff --git a/modules/service/manifests/node.pp 
b/modules/service/manifests/node.pp
index a161e2b..cdda829 100644
--- a/modules/service/manifests/node.pp
+++ b/modules/service/manifests/node.pp
@@ -99,12 +99,14 @@
 $auto_refresh= true,
 $init_restart= true,
 $deployment  = undef,
+$deployment_user = $title,
 ) {
 case $deployment {
 'scap3': {
 if ! defined(Service::Deploy::Trebuchet[$repo]) {
 service::deploy::scap{ $repo:
 service_name => $title,
+user => $deployment_user,
 before   => Base::Service_unit[$title],
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Avoid legacy overhead in mobile web experience - change (operations/mediawiki-config)

2016-03-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Avoid legacy overhead in mobile web experience
..

Avoid legacy overhead in mobile web experience

Avoid request overhead for legacy modules by
disabling them in the mobile web domain.
See also  I9e6342bf71b7204c76db5bd066167a729596f908

Change-Id: Ie676caa0b8f60e3d33c88dfbfceb7bc435ab8f47
---
M wmf-config/mobile.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/mobile.php b/wmf-config/mobile.php
index 4654473..74a3cdc 100644
--- a/wmf-config/mobile.php
+++ b/wmf-config/mobile.php
@@ -17,6 +17,10 @@
$wgMFDisplayWikibaseDescription = $wmgMFDisplayWikibaseDescription;
$wgMFMobileFormatterHeadings = $wmgMFMobileFormatterHeadings;
 
+   // Disable legacy variables in the mobile web experience
+   $wgIncludeLegacyJavaScript = false;
+   $wgPreloadJavaScriptMwUtil = false;
+
if ( $wmgMobileFrontendLogo ) {
$wgMobileFrontendLogo = $wmgMobileFrontendLogo;
}

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

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

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


[MediaWiki-commits] [Gerrit] Move wikitech role support files to role module - change (mediawiki/vagrant)

2016-03-14 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Move wikitech role support files to role module
..

Move wikitech role support files to role module

Change-Id: I62ea3e6db203f75fca8b33b3731e79b8b526f1ec
---
R puppet/modules/role/files/wikitech/initial-pages.xml
M puppet/modules/role/manifests/wikitech.pp
R puppet/modules/role/templates/wikitech/Debug.php.erb
R puppet/modules/role/templates/wikitech/LdapAuth.php.erb
R puppet/modules/role/templates/wikitech/Local.php.erb
R puppet/modules/role/templates/wikitech/Private.php.erb
6 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/21/277421/1

diff --git a/puppet/modules/wikitech/files/wikitech-initial-pages.xml 
b/puppet/modules/role/files/wikitech/initial-pages.xml
similarity index 100%
rename from puppet/modules/wikitech/files/wikitech-initial-pages.xml
rename to puppet/modules/role/files/wikitech/initial-pages.xml
diff --git a/puppet/modules/role/manifests/wikitech.pp 
b/puppet/modules/role/manifests/wikitech.pp
index 2fb4a82..c86a59b 100644
--- a/puppet/modules/role/manifests/wikitech.pp
+++ b/puppet/modules/role/manifests/wikitech.pp
@@ -25,22 +25,22 @@
 
 mediawiki::extension { 'LdapAuthentication':
 needs_update => true,
-settings => template('wikitech/LdapAuth.php.erb'),
+settings => template('role/wikitech/LdapAuth.php.erb'),
 }
 
 # General wiki settings, OSM config
 mediawiki::settings { 'WikitechLocalSettings':
-values  => template('wikitech/Local.php.erb'),
+values  => template('role/wikitech/Local.php.erb'),
 }
 
 # Secret OSM passwords (will need to change on the fly for
 # OpenStack integration).
 mediawiki::settings { 'WikitechPrivateSettings':
-values  => template('wikitech/Private.php.erb'),
+values  => template('role/wikitech/Private.php.erb'),
 }
 
 mediawiki::settings { 'WikitechDebugSettings':
-values  => template('wikitech/Debug.php.erb'),
+values  => template('role/wikitech/Debug.php.erb'),
 }
 
 mediawiki::extension { [
@@ -58,7 +58,7 @@
 }
 
 mediawiki::import::dump { 'wikitech_content':
-xml_dump   => 
'/vagrant/puppet/modules/wikitech/files/wikitech-initial-pages.xml',
+xml_dump   => 
'/vagrant/puppet/modules/role/files/wikitech/initial-pages.xml',
 dump_sentinel_page => 'Shell_Request/Andrew',
 }
 }
diff --git a/puppet/modules/wikitech/templates/Debug.php.erb 
b/puppet/modules/role/templates/wikitech/Debug.php.erb
similarity index 100%
rename from puppet/modules/wikitech/templates/Debug.php.erb
rename to puppet/modules/role/templates/wikitech/Debug.php.erb
diff --git a/puppet/modules/wikitech/templates/LdapAuth.php.erb 
b/puppet/modules/role/templates/wikitech/LdapAuth.php.erb
similarity index 100%
rename from puppet/modules/wikitech/templates/LdapAuth.php.erb
rename to puppet/modules/role/templates/wikitech/LdapAuth.php.erb
diff --git a/puppet/modules/wikitech/templates/Local.php.erb 
b/puppet/modules/role/templates/wikitech/Local.php.erb
similarity index 100%
rename from puppet/modules/wikitech/templates/Local.php.erb
rename to puppet/modules/role/templates/wikitech/Local.php.erb
diff --git a/puppet/modules/wikitech/templates/Private.php.erb 
b/puppet/modules/role/templates/wikitech/Private.php.erb
similarity index 100%
rename from puppet/modules/wikitech/templates/Private.php.erb
rename to puppet/modules/role/templates/wikitech/Private.php.erb

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

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

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


[MediaWiki-commits] [Gerrit] Log "Wikibase\Client\Changes\WikiPageUpdater" - change (operations/mediawiki-config)

2016-03-14 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Log "Wikibase\Client\Changes\WikiPageUpdater"
..


Log "Wikibase\Client\Changes\WikiPageUpdater"

To investigate the RefreshlinksJobs

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

Approvals:
  Hoo man: Verified; Looks good to me, approved



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8e5473a..1f07658 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4537,6 +4537,7 @@
'wbq_evaluation' => 'debug', // WikibaseQualityConstraints 
evaluation logs
'wfLogDBError' => 'debug', // Former $wgDBerrorLog
'wikibase-debug' => 'debug',
+   'Wikibase\Client\Changes\WikiPageUpdater' => 'debug', // For 
Aaron, to see titles we enqueue RefreshLinksJobs for
'xenon' => 'debug',
'XMP' => 'warning', // T89532
'xff' => array( 'logstash' => false ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I795dc304a22fb9171092656ff1c2f149afe51471
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Hoo man 

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


[MediaWiki-commits] [Gerrit] Provide license information and tiny tweaks - change (mediawiki...HeaderTabs)

2016-03-14 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Provide license information and tiny tweaks
..


Provide license information and tiny tweaks

* Add license label to show on "Special:Version"
* Amended COPYING
* Switch to use __DIR__
* Add code documentation

Change-Id: Ida3190109ba4fac80db67e68fd173646898c38ba
---
M COPYING
M HeaderTabs.php
M extension.json
3 files changed, 25 insertions(+), 14 deletions(-)

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



diff --git a/COPYING b/COPYING
index 4b17431..2733812 100644
--- a/COPYING
+++ b/COPYING
@@ -3,7 +3,8 @@
 "COPYING", or a subdirectory thereof. For those files, the license text 
contained in
 said file overrides any license information contained in directories of 
smaller depth.
 Alternative licenses are typically used for software that is provided by 
external
-parties, and merely packaged with the Semantic Forms release for convenience.
+parties, and merely packaged with this software for convenience.
+
 
 
GNU GENERAL PUBLIC LICENSE
diff --git a/HeaderTabs.php b/HeaderTabs.php
index c9c666f..642aa56 100644
--- a/HeaderTabs.php
+++ b/HeaderTabs.php
@@ -10,17 +10,17 @@
  * @author Olivier Finlay Beaton
  */
 
+// Protect against entries
 if ( !defined( 'MEDIAWIKI' ) ) {
die();
 }
 
-$dir = dirname( __FILE__ );
-
+// Allow exension registration mechanism
 if ( function_exists( 'wfLoadExtension' ) ) {
 wfLoadExtension( 'HeaderTabs' );
 // Keep i18n globals so mergeMessageFileList.php doesn't break
-   $wgMessagesDirs['HeaderTabs'] = $dir . '/i18n';
-   $wgExtensionMessagesFiles['HeaderTabsMagic'] = $dir . 
'/HeaderTabs.i18n.magic.php';
+   $wgMessagesDirs['HeaderTabs'] = __DIR__ . '/i18n';
+   $wgExtensionMessagesFiles['HeaderTabsMagic'] = __DIR__ . 
'/HeaderTabs.i18n.magic.php';
 /* wfWarn(
 'Deprecated PHP entry point used for Semanti Forms extension. 
Please use wfLoadExtension instead, ' .
 'see https://www.mediawiki.org/wiki/Extension_registration for 
more details.'
@@ -28,26 +28,32 @@
 return;
 }
 
-
+// Show extension credits
 $wgExtensionCredits['parserhook'][] = array(
'path' => __FILE__,
'name' => 'Header Tabs',
'descriptionmsg' => 'headertabs-desc',
'version' => '1.1',
-   'author' => array( '[http://www.sergeychernyshev.com Sergey 
Chernyshev]', 'Yaron Koren', '[http://olivierbeaton.com Olivier Finlay Beaton]' 
),
-   'url' => 'https://www.mediawiki.org/wiki/Extension:Header_Tabs'
+   'author' => array(
+   '[http://www.sergeychernyshev.com Sergey Chernyshev]',
+   'Yaron Koren',
+   '[http://olivierbeaton.com Olivier Finlay Beaton]',
+   '...'
+   ),
+   'url' => 'https://www.mediawiki.org/wiki/Extension:Header_Tabs',
+   'license-name' => 'GPL-2.0+'
 );
 
 // Translations
-$wgMessagesDirs['HeaderTabs'] = $dir . '/i18n';
-$wgExtensionMessagesFiles['HeaderTabs'] = $dir . '/HeaderTabs.i18n.php';
+$wgMessagesDirs['HeaderTabs'] = __DIR__ . '/i18n';
+$wgExtensionMessagesFiles['HeaderTabs'] = __DIR__ . '/HeaderTabs.i18n.php';
 
 //! @todo implement in tab parsing code instead... but problems like nowiki 
(2011-12-12, ofb)
 // if you make them here, it will be article wide instead of tab-wide
 // __NOTABTOC__, __TABTOC__, __NOEDITTAB__
 // and one day with a special page: __NEWTABLINK__, __NONEWTABLINK__
 // and one day if we can force toc generation: __FORCETABTOC__
-$wgExtensionMessagesFiles['HeaderTabsMagic'] = $dir . 
'/HeaderTabs.i18n.magic.php';
+$wgExtensionMessagesFiles['HeaderTabsMagic'] = __DIR__ . 
'/HeaderTabs.i18n.magic.php';
 
 // Config
 $wgHeaderTabsUseHistory = true;
@@ -90,20 +96,23 @@
 
 } // $wgConfigureAdditionalExtensions exists
 
+// Register hooks
 $wgHooks['ParserFirstCallInit'][] = 'HeaderTabsHooks::registerParserFunctions';
 $wgHooks['BeforePageDisplay'][] = 'HeaderTabsHooks::addHTMLHeader';
 $wgHooks['ParserAfterTidy'][] = 'HeaderTabsHooks::replaceFirstLevelHeaders';
 $wgHooks['ResourceLoaderGetConfigVars'][] = 
'HeaderTabsHooks::addConfigVarsToJS';
 $wgHooks['MakeGlobalVariablesScript'][] = 
'HeaderTabsHooks::setGlobalJSVariables';
 
-$wgAutoloadClasses['HeaderTabsHooks'] = "$dir/HeaderTabs.hooks.php";
-$wgAutoloadClasses['HeaderTabs'] = "$dir/HeaderTabs_body.php";
+// Load classes
+$wgAutoloadClasses['HeaderTabsHooks'] = __DIR__ . '/HeaderTabs.hooks.php';
+$wgAutoloadClasses['HeaderTabs'] = __DIR__ . '/HeaderTabs_body.php';
 
+// Use modules
 $wgResourceModules['ext.headertabs'] = array(
'scripts' => 'skins/ext.headertabs.core.js',
// 'styles' => // the style is added in HeaderTabsHooks::addHTMLHeader()
 
'dependencies' => array( 'jquery.ui.tabs' ),
-   'localBasePath' => dirname( __FILE__ ),
+   'localBasePath' => __DIR__,
'remoteExtPath' => 

[MediaWiki-commits] [Gerrit] Log "Wikibase\Client\Changes\WikiPageUpdater" - change (operations/mediawiki-config)

2016-03-14 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Log "Wikibase\Client\Changes\WikiPageUpdater"
..

Log "Wikibase\Client\Changes\WikiPageUpdater"

To investigate the RefreshlinksJobs

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 8e5473a..1f07658 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4537,6 +4537,7 @@
'wbq_evaluation' => 'debug', // WikibaseQualityConstraints 
evaluation logs
'wfLogDBError' => 'debug', // Former $wgDBerrorLog
'wikibase-debug' => 'debug',
+   'Wikibase\Client\Changes\WikiPageUpdater' => 'debug', // For 
Aaron, to see titles we enqueue RefreshLinksJobs for
'xenon' => 'debug',
'XMP' => 'warning', // T89532
'xff' => array( 'logstash' => false ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I795dc304a22fb9171092656ff1c2f149afe51471
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Fix undefined $modelId in MWUnknownContentModelException - change (mediawiki/core)

2016-03-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix undefined $modelId in MWUnknownContentModelException
..

Fix undefined $modelId in MWUnknownContentModelException

Change-Id: I13b93cc1e9d7c050765fab5d8de4e17ca4319dc1
---
M includes/content/ContentHandler.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/277419/1

diff --git a/includes/content/ContentHandler.php 
b/includes/content/ContentHandler.php
index c0bd725..7430caf 100644
--- a/includes/content/ContentHandler.php
+++ b/includes/content/ContentHandler.php
@@ -55,7 +55,7 @@
 
/** @return string */
public function getModelId() {
-   return $modelId;
+   return $this->modelId;
}
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] New Wikidata Build - 2016-03-14T18:05:26+0000 - change (mediawiki...Wikidata)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build - 2016-03-14T18:05:26+
..


New Wikidata Build - 2016-03-14T18:05:26+

Change-Id: I0b66b8f0492be1e42923e5c5116b3a3a9ff4db18
---
M composer.lock
M extensions/MediaInfo/src/View/MediaInfoView.php
M extensions/MediaInfo/tests/phpunit/mediawiki/View/MediaInfoViewTest.php
M extensions/Wikibase/client/WikibaseClient.hooks.php
M extensions/Wikibase/client/i18n/cy.json
A extensions/Wikibase/client/i18n/gn.json
M extensions/Wikibase/client/i18n/nan.json
M extensions/Wikibase/client/includes/Hooks/SidebarHookHandlers.php
M extensions/Wikibase/client/includes/WikibaseClient.php
M extensions/Wikibase/client/maintenance/populateEntityUsage.php
M extensions/Wikibase/client/maintenance/populateInterwiki.php
M extensions/Wikibase/client/maintenance/updateSubscriptions.php
M extensions/Wikibase/client/resources/Resources.php
M extensions/Wikibase/client/tests/phpunit/includes/Api/PageTermsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Changes/ChangeRunCoalescerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Changes/WikiPageUpdaterTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyParserFunctionIntegrationTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/PropertyParserFunction/StatementGroupRendererFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/EntityAccessorTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/Scribunto/WikibaseLuaBindingsTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/DataAccess/StatementTransclusionInteractorTest.php
M extensions/Wikibase/client/tests/phpunit/includes/ForbiddenSerializerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/DataUpdateHookHandlersTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/DeletePageNoticeCreatorTest.php
M extensions/Wikibase/client/tests/phpunit/includes/Hooks/MovePageNoticeTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/OtherProjectsSidebarGeneratorFactoryTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/ParserClearStateHookHandlerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/ParserOutputUpdateHookHandlersTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/SidebarHookHandlersTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Hooks/SkinTemplateOutputPageBeforeExecHandlerTest.php
M extensions/Wikibase/client/tests/phpunit/includes/InterwikiSorterTest.php
M extensions/Wikibase/client/tests/phpunit/includes/NamespaceCheckerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/RecentChanges/ChangeLineFormatterTest.php
M extensions/Wikibase/client/tests/phpunit/includes/RepoLinkerTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Store/AddUsagesForPageJobTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Store/Sql/DirectSqlStoreTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnDeleteTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Usage/SiteLinkUsageLookupTest.php
M 
extensions/Wikibase/client/tests/phpunit/includes/Usage/Sql/EntityUsageTableTest.php
M extensions/Wikibase/client/tests/phpunit/includes/WikibaseClientTest.php
M extensions/Wikibase/docs/datatypes.wiki
M extensions/Wikibase/lib/config/WikibaseLib.default.php
M extensions/Wikibase/lib/includes/DataTypeDefinitions.php
M extensions/Wikibase/lib/includes/PropertyInfoSnakUrlExpander.php
M extensions/Wikibase/lib/includes/changes/EntityChange.php
M extensions/Wikibase/lib/includes/changes/EntityChangeFactory.php
M 
extensions/Wikibase/lib/includes/formatters/HtmlExternalIdentifierFormatter.php
M 
extensions/Wikibase/lib/includes/formatters/WikitextExternalIdentifierFormatter.php
M extensions/Wikibase/lib/includes/store/sql/ChangeLookup.php
M extensions/Wikibase/lib/maintenance/populateSitesTable.php
M extensions/Wikibase/lib/resources/Resources.php
M extensions/Wikibase/lib/tests/phpunit/DataTypeDefinitionsTest.php
M extensions/Wikibase/lib/tests/phpunit/DataValueFactoryTest.php
M extensions/Wikibase/lib/tests/phpunit/EntityRevisionLookupTest.php
M extensions/Wikibase/lib/tests/phpunit/EntityTypesTest.php
M 

[MediaWiki-commits] [Gerrit] Remove obsolete comment - change (operations/mediawiki-config)

2016-03-14 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Remove obsolete comment
..

Remove obsolete comment

Change-Id: I2eda31f256aa55178d7285f039871933eac22599
---
M wmf-config/filebackend-production.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/filebackend-production.php 
b/wmf-config/filebackend-production.php
index 172394d..0cca4ae 100644
--- a/wmf-config/filebackend-production.php
+++ b/wmf-config/filebackend-production.php
@@ -128,7 +128,6 @@
 /* end multiwrite backend config */
 
 // Lock manager config must use the master datacenter
-// @TODO: configure as a switch
 $wgLockManagers[] = array(
'name' => 'redisLockManager',
'class'=> 'RedisLockManager',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2eda31f256aa55178d7285f039871933eac22599
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] POC: Special Mobile Cite page and PHPUnit tests - change (mediawiki...MobileFrontend)

2016-03-14 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: POC: Special Mobile Cite page and PHPUnit tests
..

POC: Special Mobile Cite page and PHPUnit tests

The current implementation of lazy loaded references cannot be
tested until the Special MobileCite page exists.

This adds some scaffolding which we can iterate on later.

Change-Id: If0e9c0850aec7136cc75dcc8f3b67831a2fa164d
---
M MobileFrontend.alias.php
M extension.json
M includes/MobileFormatter.php
A includes/specials/SpecialMobileCite.php
M tests/phpunit/MobileFormatterTest.php
5 files changed, 65 insertions(+), 1 deletion(-)


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

diff --git a/MobileFrontend.alias.php b/MobileFrontend.alias.php
index c72c7aa..7071d26 100644
--- a/MobileFrontend.alias.php
+++ b/MobileFrontend.alias.php
@@ -12,6 +12,7 @@
 /** English (English) */
 $specialPageAliases['en'] = array(
'History' => array( 'History' ),
+   'MobileCite' => array( 'MobileCite' ),
'MobileOptions' => array( 'MobileOptions' ),
'Uploads' => array( 'Uploads' ),
'MobileDiff' => array( 'MobileDiff' ),
diff --git a/extension.json b/extension.json
index 7fa686d..1d94e85 100644
--- a/extension.json
+++ b/extension.json
@@ -40,6 +40,7 @@
},
"SpecialPages": {
"History": "SpecialMobileHistory",
+   "MobileCite": "SpecialMobileCite",
"MobileDiff": "SpecialMobileDiff",
"MobileEditor": "SpecialMobileEditor",
"MobileOptions": "SpecialMobileOptions",
@@ -93,6 +94,7 @@
"SpecialMobileContributions": 
"includes/specials/SpecialMobileContributions.php",
"SpecialNearby": "includes/specials/SpecialNearby.php",
"SpecialMobileLanguages": 
"includes/specials/SpecialMobileLanguages.php",
+   "SpecialMobileCite": "includes/specials/SpecialMobileCite.php",
"SpecialMobilePreferences": 
"includes/specials/SpecialMobilePreferences.php",
"MobileSpecialPage": "includes/specials/MobileSpecialPage.php",
"MobileSpecialPageFeed": 
"includes/specials/MobileSpecialPageFeed.php",
diff --git a/includes/MobileFormatter.php b/includes/MobileFormatter.php
index d6579de..2a28056 100644
--- a/includes/MobileFormatter.php
+++ b/includes/MobileFormatter.php
@@ -176,7 +176,7 @@
$citePath = "$listId/" . 
$this->title->getPrefixedText();
// FIXME: Currently a broken link see 
https://phabricator.wikimedia.org/T125897
$placeholder->setAttribute( 'href',
-   SpecialPage::getTitleFor( 'Cite', 
$citePath )->getLocalUrl() );
+   SpecialPage::getTitleFor( 'MobileCite', 
$citePath )->getLocalUrl() );
$parent->replaceChild( $placeholder, $list );
$listId -= 1;
}
diff --git a/includes/specials/SpecialMobileCite.php 
b/includes/specials/SpecialMobileCite.php
new file mode 100644
index 000..08f6756
--- /dev/null
+++ b/includes/specials/SpecialMobileCite.php
@@ -0,0 +1,41 @@
+ 1 ) {
+   $id = $args[0];
+   $title = implode( array_slice ( $args, 1 ) );
+   $pageTitle = 'References for ' . $title;
+   $html = 'Under construction';
+   $html = MobileUI::contentElement( $html );
+   $out = $this->getOutput();
+   $out->setPageTitle( $pageTitle );
+   $out->addHTML( $html );
+   return;
+   }
+   }
+
+   // errors suck
+   wfHttpError( 404, 'Page not provided',
+   'Need to know which title to look up references for' );
+   }
+}
diff --git a/tests/phpunit/MobileFormatterTest.php 
b/tests/phpunit/MobileFormatterTest.php
index 4d823cf..f25145d 100644
--- a/tests/phpunit/MobileFormatterTest.php
+++ b/tests/phpunit/MobileFormatterTest.php
@@ -49,6 +49,15 @@
. Html::element( 'span', array( 'class' => 
MobileUI::iconClass( 'spinner', 'element', 'loading spinner' ) ) )
. '';
$noscript = '';
+   $reftext = 'They saved the world with one single unit 
test[1]';
+   $refhtml = 'link 1link 
2';
+   $refplaceholder = Html::element( 'a',
+   array(
+   'class' => 'mf-lazy-references-placeholder',
+   'href' => SpecialPage::getTitleFor( 
'MobileCite', '0/Mobile' 

[MediaWiki-commits] [Gerrit] Use PHP 5.5's …::class feature instead of strings in class_e... - change (mediawiki...Wikibase)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use PHP 5.5's …::class feature instead of strings in 
class_exists
..


Use PHP 5.5's …::class feature instead of strings in class_exists

If you wonder how this can work, see http://maettig.com/1457600220

Change-Id: I25ebdbce0b315e1d27b9734de8779cbd1f470bf9
---
M client/includes/UpdateRepo/UpdateRepo.php
M 
client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
M lib/includes/LanguageFallbackChainFactory.php
M lib/maintenance/populateSitesTable.php
M repo/includes/BabelUserLanguageLookup.php
M repo/includes/Specials/SpecialMyLanguageFallbackChain.php
M repo/tests/phpunit/includes/Hooks/CirrusSearchHookHandlersTest.php
7 files changed, 25 insertions(+), 18 deletions(-)

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



diff --git a/client/includes/UpdateRepo/UpdateRepo.php 
b/client/includes/UpdateRepo/UpdateRepo.php
index 62598c0..8c92cd9 100644
--- a/client/includes/UpdateRepo/UpdateRepo.php
+++ b/client/includes/UpdateRepo/UpdateRepo.php
@@ -110,7 +110,7 @@
 * @return bool
 */
public function userIsValidOnRepo() {
-   if ( !class_exists( 'CentralAuthUser' ) ) {
+   if ( !class_exists( CentralAuthUser::class ) ) {
// We can't do anything without CentralAuth as there's 
no way to verify that
// the local user equals the repo one with the same name
wfDebugLog(
diff --git 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
index 7c29166..b582c70 100644
--- 
a/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
+++ 
b/client/tests/phpunit/includes/DataAccess/Scribunto/Scribunto_LuaWikibaseLibraryTestCase.php
@@ -2,8 +2,18 @@
 
 namespace Wikibase\Client\Tests\DataAccess\Scribunto;
 
-if ( !class_exists( 'Scribunto_LuaEngineTestBase' ) ) {
-   abstract class Scribunto_LuaWikibaseLibraryTestCase extends 
\MediaWikiTestCase {
+use Language;
+use PHPUnit_Framework_TestCase;
+use PHPUnit_Framework_TestSuite;
+use Scribunto_LuaEngineTestBase;
+use Title;
+use Wikibase\Client\Tests\DataAccess\WikibaseDataAccessTestItemSetUpHelper;
+use Wikibase\Client\WikibaseClient;
+use Wikibase\DataModel\Services\Lookup\EntityLookup;
+use Wikibase\Test\MockClientStore;
+
+if ( !class_exists( Scribunto_LuaEngineTestBase::class ) ) {
+   abstract class Scribunto_LuaWikibaseLibraryTestCase extends 
PHPUnit_Framework_TestCase {
 
protected function setUp() {
$this->markTestSkipped( 'Scribunto is not available' );
@@ -13,12 +23,6 @@
 
return;
 }
-
-use Language;
-use Title;
-use Wikibase\Client\Tests\DataAccess\WikibaseDataAccessTestItemSetUpHelper;
-use Wikibase\Client\WikibaseClient;
-use Wikibase\Test\MockClientStore;
 
 /**
  * Base class for Wikibase Scribunto Tests
@@ -32,7 +36,7 @@
  * @author Marius Hoch < h...@online.de >
  * @author Daniel Kinzler
  */
-abstract class Scribunto_LuaWikibaseLibraryTestCase extends 
\Scribunto_LuaEngineTestBase {
+abstract class Scribunto_LuaWikibaseLibraryTestCase extends 
Scribunto_LuaEngineTestBase {
 
/**
 * @var bool|null
@@ -96,7 +100,7 @@
 *
 * @param string $className
 *
-* @return \PHPUnit_Framework_TestSuite
+* @return PHPUnit_Framework_TestSuite
 */
public static function suite( $className ) {
self::doMock();
diff --git a/lib/includes/LanguageFallbackChainFactory.php 
b/lib/includes/LanguageFallbackChainFactory.php
index 34d6a0f..0617eb5 100644
--- a/lib/includes/LanguageFallbackChainFactory.php
+++ b/lib/includes/LanguageFallbackChainFactory.php
@@ -2,6 +2,7 @@
 
 namespace Wikibase;
 
+use Babel;
 use IContextSource;
 use InvalidArgumentException;
 use Language;
@@ -214,7 +215,7 @@
 * @return LanguageFallbackChain
 */
public function newFromUserAndLanguageCode( User $user, $languageCode ) 
{
-   if ( !class_exists( 'Babel' ) || $user->isAnon() ) {
+   if ( !class_exists( Babel::class ) || $user->isAnon() ) {
return $this->newFromLanguageCode( $languageCode, 
self::FALLBACK_ALL );
}
 
@@ -247,7 +248,7 @@
// Make the current language at the top of the 
chain.
$levelBabel = array_unique( array_merge(
array( $languageCode ),
-   \Babel::getUserLanguages( $user, $level 
)
+   Babel::getUserLanguages( $user, $level )
) );
 

[MediaWiki-commits] [Gerrit] TitledElement: Treat empty title the same in PHP and JS - change (oojs/ui)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: TitledElement: Treat empty title the same in PHP and JS
..


TitledElement: Treat empty title the same in PHP and JS

* TitledElement.php: When title is '', do not set the attribute.
* TitledElement.js: When title is '', do not use the class default.

Issues exposed by I9a0a56ef4739435484bbecaf921a49c1cef391c2.

Change-Id: Ie44504db89f9937186d2bdb81fab6f9bd2069b30
---
M php/mixins/TitledElement.php
M src/mixins/TitledElement.js
2 files changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/php/mixins/TitledElement.php b/php/mixins/TitledElement.php
index 3f75403..cc0bde0 100644
--- a/php/mixins/TitledElement.php
+++ b/php/mixins/TitledElement.php
@@ -44,6 +44,8 @@
 * @return $this
 */
public function setTitle( $title ) {
+   $title = $title !== '' ? $title : null;
+
if ( $this->title !== $title ) {
$this->title = $title;
if ( $title !== null ) {
diff --git a/src/mixins/TitledElement.js b/src/mixins/TitledElement.js
index f122129..c923cb7 100644
--- a/src/mixins/TitledElement.js
+++ b/src/mixins/TitledElement.js
@@ -32,7 +32,7 @@
this.title = null;
 
// Initialization
-   this.setTitle( config.title || this.constructor.static.title );
+   this.setTitle( config.title !== undefined ? config.title : 
this.constructor.static.title );
this.setTitledElement( config.$titled || this.$element );
 };
 

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

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

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


[MediaWiki-commits] [Gerrit] Updated zordius/lightncandy from v0.23 to v0.91 - change (mediawiki/core)

2016-03-14 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Updated zordius/lightncandy from v0.23 to v0.91
..

Updated zordius/lightncandy from v0.23 to v0.91

Change-Id: I69df50403389fd40879e7d8d699cb54e6b655083
---
M RELEASE-NOTES-1.27
M composer.json
M includes/TemplateParser.php
3 files changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/RELEASE-NOTES-1.27 b/RELEASE-NOTES-1.27
index d8866ad..715605d 100644
--- a/RELEASE-NOTES-1.27
+++ b/RELEASE-NOTES-1.27
@@ -174,6 +174,7 @@
 * Updated composer/semver from v1.0.0 to v1.2.0.
 * Updated liuggio/statsd-php-client to 1.0.18.
 * Updated QUnit from v1.18.0 to v1.22.0.
+* Updated zordius/lightncandy from v0.23 to v0.91.
 
  New external libraries 
 * Added wikimedia/base-convert v1.0.1.
@@ -359,8 +360,6 @@
 ** WatchedItem::duplicateEntries was deprecated.
 ** EmailNotification::updateWatchlistTimestamp was deprecated.
 ** User::getWatchedItem was removed.
-* Unit tests don't work with external PHPUnit anymore, Composer is now the 
only supported
-  way. Run `composer install` to install it and other dev dependencies to run 
unit tests.
 
 == Compatibility ==
 
diff --git a/composer.json b/composer.json
index a21b4e8..c7a7c66 100644
--- a/composer.json
+++ b/composer.json
@@ -36,7 +36,7 @@
"wikimedia/running-stat": "1.1.0",
"wikimedia/utfnormal": "1.0.3",
"wikimedia/wrappedstring": "2.0.0",
-   "zordius/lightncandy": "0.23"
+   "zordius/lightncandy": "0.91"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2",
diff --git a/includes/TemplateParser.php b/includes/TemplateParser.php
index 6420dc7..e8f4ad5 100644
--- a/includes/TemplateParser.php
+++ b/includes/TemplateParser.php
@@ -1,4 +1,6 @@
 https://gerrit.wikimedia.org/r/277357
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

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

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


[MediaWiki-commits] [Gerrit] CRM-18213 remove hard-coded DAO names - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18213 remove hard-coded DAO names
..

CRM-18213 remove hard-coded DAO names

Merged into 4.7

Change-Id: I2b6e66b225f5ecbebce737656f0a41e0372174f1
---
M CRM/Logging/Reverter.php
1 file changed, 4 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/56/277356/1

diff --git a/CRM/Logging/Reverter.php b/CRM/Logging/Reverter.php
index cc0d2ac..675acc9 100644
--- a/CRM/Logging/Reverter.php
+++ b/CRM/Logging/Reverter.php
@@ -49,22 +49,11 @@
   }
 
   /**
+   * Revert changes in the array of diffs in $this->diffs.
+   *
* @param $tables
*/
   public function revert($tables) {
-// FIXME: split off the table → DAO mapping to a GenCode-generated class
-$daos = array(
-  'civicrm_address' => 'CRM_Core_DAO_Address',
-  'civicrm_contact' => 'CRM_Contact_DAO_Contact',
-  'civicrm_email' => 'CRM_Core_DAO_Email',
-  'civicrm_im' => 'CRM_Core_DAO_IM',
-  'civicrm_openid' => 'CRM_Core_DAO_OpenID',
-  'civicrm_phone' => 'CRM_Core_DAO_Phone',
-  'civicrm_website' => 'CRM_Core_DAO_Website',
-  'civicrm_contribution' => 'CRM_Contribute_DAO_Contribution',
-  'civicrm_note' => 'CRM_Core_DAO_Note',
-  'civicrm_relationship' => 'CRM_Contact_DAO_Relationship',
-);
 
 // get custom data tables, columns and types
 $ctypes = array();
@@ -109,14 +98,13 @@
 foreach ($deletes as $table => $ids) {
   CRM_Core_DAO::executeQuery("DELETE FROM `$table` WHERE id IN (" . 
implode(', ', array_unique($ids)) . ')');
 }
-
 // revert updates by updating to previous values
 foreach ($reverts as $table => $row) {
   switch (TRUE) {
 // DAO-based tables
 
-case in_array($table, array_keys($daos)):
-  $dao = new $daos[$table]();
+case (($tableDAO = 
CRM_Core_DAO_AllCoreTables::getClassForTable($table)) != FALSE):
+  $dao = new $tableDAO ();
   foreach ($row as $id => $changes) {
 $dao->id = $id;
 foreach ($changes as $field => $value) {

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

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

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


[MediaWiki-commits] [Gerrit] CRM-18213 remove hard-coding of DAO names - change (wikimedia...civicrm)

2016-03-14 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CRM-18213 remove hard-coding of DAO names
..

CRM-18213 remove hard-coding of DAO names

Merged into 4.7

Change-Id: I37facda0a751da0e52ca47c595f067df78658a47
---
M CRM/Logging/Differ.php
1 file changed, 2 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/civicrm 
refs/changes/55/277355/1

diff --git a/CRM/Logging/Differ.php b/CRM/Logging/Differ.php
index 7a5acb2..118726c 100644
--- a/CRM/Logging/Differ.php
+++ b/CRM/Logging/Differ.php
@@ -257,25 +257,8 @@
 static $titles = array();
 static $values = array();
 
-// FIXME: split off the table → DAO mapping to a GenCode-generated class
-static $daos = array(
-  'civicrm_address' => 'CRM_Core_DAO_Address',
-  'civicrm_contact' => 'CRM_Contact_DAO_Contact',
-  'civicrm_email' => 'CRM_Core_DAO_Email',
-  'civicrm_im' => 'CRM_Core_DAO_IM',
-  'civicrm_openid' => 'CRM_Core_DAO_OpenID',
-  'civicrm_phone' => 'CRM_Core_DAO_Phone',
-  'civicrm_website' => 'CRM_Core_DAO_Website',
-  'civicrm_contribution' => 'CRM_Contribute_DAO_Contribution',
-  'civicrm_note' => 'CRM_Core_DAO_Note',
-  'civicrm_relationship' => 'CRM_Contact_DAO_Relationship',
-  'civicrm_activity' => 'CRM_Activity_DAO_Activity',
-  'civicrm_case' => 'CRM_Case_DAO_Case',
-);
-
 if (!isset($titles[$table]) or !isset($values[$table])) {
-
-  if (in_array($table, array_keys($daos))) {
+  if (($tableDAO = CRM_Core_DAO_AllCoreTables::getClassForTable($table)) 
!= FALSE) {
 // FIXME: these should be populated with pseudo constants as they
 // were at the time of logging rather than their current values
 // FIXME: Use *_BAO:buildOptions() method rather than pseudoconstants 
& fetch programmatically
@@ -311,7 +294,7 @@
 break;
 }
 
-$dao = new $daos[$table]();
+$dao = new $tableDAO();
 foreach ($dao->fields() as $field) {
   $titles[$table][$field['name']] = CRM_Utils_Array::value('title', 
$field);
 

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

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

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


[MediaWiki-commits] [Gerrit] ganglia: do not start meta-service on jessie/systemd - change (operations/puppet)

2016-03-14 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: ganglia: do not start meta-service on jessie/systemd
..

ganglia: do not start meta-service on jessie/systemd

When on jessie/systemd, we start each aggregator instance
separately from a template and each is their own service (I10726144b4f21b3).

So we don't need this 'meta-service' there that we used on upstart
which started all the instances with a script.

Bug:T124197
Change-Id: I91c009c0b814176ad55d71fbd606fb209cde221a
---
M modules/ganglia/manifests/monitor/aggregator.pp
1 file changed, 8 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/54/277354/1

diff --git a/modules/ganglia/manifests/monitor/aggregator.pp 
b/modules/ganglia/manifests/monitor/aggregator.pp
index d82c860..5d8863f 100644
--- a/modules/ganglia/manifests/monitor/aggregator.pp
+++ b/modules/ganglia/manifests/monitor/aggregator.pp
@@ -35,15 +35,13 @@
 
 site_instances{ $sites: }
 
-if os_version('debian >= jessie') {
-  $ganglia_provider = 'systemd'
-} else {
-  $ganglia_provider = 'upstart'
-}
-
-service { 'ganglia-monitor-aggregator':
-ensure   => running,
-provider => $ganglia_provider,
-name => 'ganglia-monitor-aggregator',
+# on jessie/upstart each instance is a separate service spawned
+# from a template in instance.pp, so this is not needed anymore
+if os_version('debian < jessie') {
+service { 'ganglia-monitor-aggregator':
+ensure   => running,
+provider => upstart
+name => 'ganglia-monitor-aggregator',
+}
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Add RecursiveLinkPurge log for API requests - change (mediawiki/core)

2016-03-14 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Add RecursiveLinkPurge log for API requests
..

Add RecursiveLinkPurge log for API requests

Change-Id: I29636c045f7b561b2da0100f5e69050808d1aec7
---
M includes/api/ApiPurge.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/includes/api/ApiPurge.php b/includes/api/ApiPurge.php
index 36b62f5..a941273 100644
--- a/includes/api/ApiPurge.php
+++ b/includes/api/ApiPurge.php
@@ -24,6 +24,7 @@
  *
  * @file
  */
+use MediaWiki\Logger\LoggerFactory;
 
 /**
  * API interface for page purging
@@ -75,6 +76,18 @@
$enableParserCache
);
 
+
+   # Logging to better see expensive usage 
patterns
+   if ( $forceRecursiveLinkUpdate ) {
+   LoggerFactory::getInstance( 
'RecursiveLinkPurge' )->info(
+   "Recursive link purge 
enqueued for {$title->getPrefixedText()}",
+   [
+   'user' => 
$this->getUser()->getName(),
+   'title' => 
$title->getPrefixedText()
+   ]
+   );
+   }
+
# Update the links tables
$updates = 
$content->getSecondaryDataUpdates(
$title, null, 
$forceRecursiveLinkUpdate, $p_result );

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

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

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


[MediaWiki-commits] [Gerrit] Use diffusion instead of Code Review for SVN linkage - change (at-ease)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use diffusion instead of Code Review for SVN linkage
..


Use diffusion instead of Code Review for SVN linkage

Change-Id: I8c439f78f29399d24cc76a512283b212825b0e9a
---
M README.md
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/README.md b/README.md
index 578f78c..58ff684 100644
--- a/README.md
+++ b/README.md
@@ -53,7 +53,7 @@
 ---
 [@ error control operator]: 
https://php.net/manual/en/language.operators.errorcontrol.php
 [MediaWiki 1.3]: https://www.mediawiki.org/wiki/MediaWiki_1.3
-[r4261]: https://www.mediawiki.org/wiki/Special:Code/MediaWiki/r4261
+[r4261]: https://phabricator.wikimedia.org/rSVN4261
 [MediaWiki 1.26]: https://www.mediawiki.org/wiki/MediaWiki_1.26
 [Latest Stable Version]: https://poser.pugx.org/mediawiki/at-ease/v/stable.svg
 [License]: https://poser.pugx.org/mediawiki/at-ease/license.svg

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c439f78f29399d24cc76a512283b212825b0e9a
Gerrit-PatchSet: 1
Gerrit-Project: at-ease
Gerrit-Branch: master
Gerrit-Owner: Chad 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Adopt Wikibase DataModel 6.0 - change (mediawiki...Wikibase)

2016-03-14 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Adopt Wikibase DataModel 6.0
..


Adopt Wikibase DataModel 6.0

Change-Id: If403fe90ac4f73ceb2ce75962270eabad51b4133
---
M composer.json
M repo/tests/phpunit/includes/EditEntityTest.php
M repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php
3 files changed, 11 insertions(+), 13 deletions(-)

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



diff --git a/composer.json b/composer.json
index f7e6688..f1fd0d0 100644
--- a/composer.json
+++ b/composer.json
@@ -33,10 +33,10 @@
"data-values/serialization": "~1.0",
"data-values/javascript": "~0.8.0",
"data-values/value-view": "~0.16.1",
-   "wikibase/data-model": "~5.1",
-   "wikibase/data-model-serialization": "~2.0",
-   "wikibase/internal-serialization": "~2.2",
-   "wikibase/data-model-services": "~3.4",
+   "wikibase/data-model": "~6.0",
+   "wikibase/data-model-serialization": "~2.2",
+   "wikibase/internal-serialization": "~2.3",
+   "wikibase/data-model-services": "~3.5",
"wikibase/data-model-javascript": "~2.0.0",
"wikibase/javascript-api": "~1.1",
"wikibase/serialization-javascript": "~2.0.5",
diff --git a/repo/tests/phpunit/includes/EditEntityTest.php 
b/repo/tests/phpunit/includes/EditEntityTest.php
index 7458d4d..e4e7fe4 100644
--- a/repo/tests/phpunit/includes/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/EditEntityTest.php
@@ -300,7 +300,7 @@
 
// change entity --
if ( $inputData === null ) {
-   $item->clear();
+   $item = new Item( $item->getId() );
} else {
if ( !empty( $inputData['label'] ) ) {
foreach ( $inputData['label'] as $k => $v ) {
diff --git a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php 
b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php
index 32f242e..8909bfa 100644
--- a/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php
+++ b/repo/tests/phpunit/includes/Store/Sql/WikiPageEntityStoreTest.php
@@ -97,15 +97,15 @@
$property->setDescription( 'en', 'Property description' );
 
return array(
-   array( $item ),
-   array( $property ),
+   array( $item, new Item() ),
+   array( $property, Property::newFromType( 'string' ) ),
);
}
 
/**
 * @dataProvider simpleEntityParameterProvider()
 */
-   public function testSaveEntity( EntityDocument $entity ) {
+   public function testSaveEntity( EntityDocument $entity, EntityDocument 
$empty ) {
/* @var WikiPageEntityStore $store */
/* @var EntityRevisionLookup $lookup */
list( $store, $lookup ) = $this->createStoreAndLookup();
@@ -132,12 +132,10 @@
// TODO: check notifications in wb_changes table!
 
// update entity
-   // FIXME: the clear() method is not defined by EntityDocument.
-   //How else do we create an empty instance of the same 
type?
-   $entity->clear();
-   $entity->getFingerprint()->setLabel( 'en', 'UPDATED' );
+   $empty->setId( $entityId );
+   $empty->getFingerprint()->setLabel( 'en', 'UPDATED' );
 
-   $r2 = $store->saveEntity( $entity, 'update one', $user, 
EDIT_UPDATE );
+   $r2 = $store->saveEntity( $empty, 'update one', $user, 
EDIT_UPDATE );
$this->assertNotEquals( $r1->getRevisionId(), 
$r2->getRevisionId(), 'expected new revision id' );
 
$r2actual = $lookup->getEntityRevision( $entityId );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If403fe90ac4f73ceb2ce75962270eabad51b4133
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Bene 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Bene 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Thiemo Mättig (WMDE) 
Gerrit-Reviewer: jenkins-bot <>

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

  1   2   3   4   >