[MediaWiki-commits] [Gerrit] mediawiki...UniversalLanguageSelector[master]: List of input methods should display only one item per line

2016-08-11 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: List of input methods should display only one item per line
..

List of input methods should display only one item per line

Change-Id: Id45fe55fd40ffc99d1712424ecf651573a62e58e
---
M resources/css/ext.uls.inputsettings.less
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/resources/css/ext.uls.inputsettings.less 
b/resources/css/ext.uls.inputsettings.less
index 6e9c0c3..09225e0 100644
--- a/resources/css/ext.uls.inputsettings.less
+++ b/resources/css/ext.uls.inputsettings.less
@@ -100,6 +100,10 @@
background: #f0f0f0;
 }
 
+.uls-input-settings-inputmethods-list .mw-ui-radio {
+   display: block;
+}
+
 .uls-ime-notification-bubble .link {
color: #0645ad;
cursor: pointer;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...ContentTranslation[master]: Filter out data-template-mapping from published content

2016-08-11 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Filter out data-template-mapping from published content
..

Filter out data-template-mapping from published content

Found this attribute, generated by CX get leaked to published article.

Change-Id: I5900ed084099abaef2831283e4829da4ce091970
---
M modules/publish/ext.cx.publish.js
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/modules/publish/ext.cx.publish.js 
b/modules/publish/ext.cx.publish.js
index 3e5e50f..174d1a9 100644
--- a/modules/publish/ext.cx.publish.js
+++ b/modules/publish/ext.cx.publish.js
@@ -373,7 +373,8 @@
 
// Remove attributes added by CX
attributesToRemove = [ 'data-cx-weight', 
'data-cx-mt-provider', 'data-cx-state',
-   'data-source', 'data-sourceid', 'data-linkid', 
'data-seqid', 'data-cx-draft', 'contenteditable'
+   'data-source', 'data-sourceid', 'data-linkid', 
'data-seqid', 'data-cx-draft',
+   'data-template-mapping', 'contenteditable'
].join( ' ' );
// Remove classes added by CX
classesToRemove = [ 'cx-link', 'cx-target-link', 
'cx-source-link', 'cx-highlight' ]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5900ed084099abaef2831283e4829da4ce091970
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Santhosh 

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update cxserver to 9a47664

2016-08-11 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Update cxserver to 9a47664
..

Update cxserver to 9a47664

List of changes:
9a47664 Update with service-template-node v0.4.0 changes
xxx Update node module dependencies

Change-Id: I4a1d59fb68aa3642c265b32aa3eb8561a68634bf
---
M node_modules/bluebird/package.json
D node_modules/body-parser/node_modules/qs/.eslintignore
D node_modules/body-parser/node_modules/qs/.eslintrc
D node_modules/body-parser/node_modules/qs/.jscs.json
D node_modules/body-parser/node_modules/qs/LICENSE
D node_modules/body-parser/node_modules/qs/dist/qs.js
D node_modules/body-parser/node_modules/qs/lib/index.js
D node_modules/body-parser/node_modules/qs/lib/parse.js
D node_modules/body-parser/node_modules/qs/lib/stringify.js
D node_modules/body-parser/node_modules/qs/lib/utils.js
D node_modules/body-parser/node_modules/qs/package.json
D node_modules/body-parser/node_modules/qs/test/index.js
D node_modules/body-parser/node_modules/qs/test/parse.js
D node_modules/body-parser/node_modules/qs/test/stringify.js
D node_modules/body-parser/node_modules/qs/test/utils.js
M node_modules/body-parser/package.json
M node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan.h
M 
node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/nan_persistent_pre_12_inl.h
M node_modules/bunyan/node_modules/dtrace-provider/node_modules/nan/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/minimatch.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/index.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/index.js
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/node_modules/balanced-match/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/node_modules/brace-expansion/package.json
M 
node_modules/bunyan/node_modules/mv/node_modules/rimraf/node_modules/glob/node_modules/minimatch/package.json
M node_modules/compression/package.json
R node_modules/core-js/Gruntfile.js
R node_modules/core-js/LICENSE
A node_modules/core-js/bower.json
R node_modules/core-js/build/Gruntfile.ls
R node_modules/core-js/build/build.ls
A node_modules/core-js/build/config.js
R node_modules/core-js/build/index.js
A node_modules/core-js/client/core.js
A node_modules/core-js/client/core.min.js
A node_modules/core-js/client/core.min.js.map
A node_modules/core-js/client/library.js
A node_modules/core-js/client/library.min.js
A node_modules/core-js/client/library.min.js.map
A node_modules/core-js/client/shim.js
A node_modules/core-js/client/shim.min.js
A node_modules/core-js/client/shim.min.js.map
R node_modules/core-js/core/_.js
R node_modules/core-js/core/delay.js
R node_modules/core-js/core/dict.js
R node_modules/core-js/core/function.js
R node_modules/core-js/core/index.js
R node_modules/core-js/core/number.js
R node_modules/core-js/core/object.js
R node_modules/core-js/core/regexp.js
R node_modules/core-js/core/string.js
R node_modules/core-js/es5/index.js
R node_modules/core-js/es6/array.js
R node_modules/core-js/es6/date.js
R node_modules/core-js/es6/function.js
R node_modules/core-js/es6/index.js
R node_modules/core-js/es6/map.js
R node_modules/core-js/es6/math.js
R node_modules/core-js/es6/number.js
R node_modules/core-js/es6/object.js
R node_modules/core-js/es6/parse-float.js
R node_modules/core-js/es6/parse-int.js
R node_modules/core-js/es6/promise.js
R node_modules/core-js/es6/reflect.js
R node_modules/core-js/es6/regexp.js
R node_modules/core-js/es6/set.js
R node_modules/core-js/es6/string.js
R node_modules/core-js/es6/symbol.js
R node_modules/core-js/es6/typed.js
R node_modules/core-js/es6/weak-map.js
R node_modules/core-js/es6/weak-set.js
R node_modules/core-js/es7/array.js
R node_modules/core-js/es7/asap.js
R node_modules/core-js/es7/error.js
R node_modules/core-js/es7/index.js
R node_modules/core-js/es7/map.js
R node_modules/core-js/es7/math.js
R node_modules/core-js/es7/object.js
A node_modules/core-js/es7/observable.js
R node_modules/core-js/es7/reflect.js
R node_modules/core-js/es7/set.js
R node_modules/core-js/es7/string.js
R node_modules/core-js/es7/symbol.js
R node_modules/core-js/es7/system.js
R node_modules/core-js/fn/_.js
R node_modules/core-js/fn/array/concat.js
R node_modules/core-js/fn/array/copy-within.js
R node_modules/core-js/fn/array/entries.js
R node_modules/core-js/fn/array/every.js
R node_modules/core-js/fn/array/fill.js
R node_modules/core-js/fn/array/filter.js
R node_modules/core-js/fn/array/find-index.js
R node_modules/core-js/fn/array/find.js
R node_modules/core-js/fn/ar

[MediaWiki-commits] [Gerrit] operations/puppet[production]: diamond: flake8 fixes for libvirtkvm

2016-08-11 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: diamond: flake8 fixes for libvirtkvm
..


diamond: flake8 fixes for libvirtkvm

Change-Id: I99912fdfb040739f697ffec68d203175e8986246
---
M modules/diamond/files/collector/libvirtkvm.py
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/modules/diamond/files/collector/libvirtkvm.py 
b/modules/diamond/files/collector/libvirtkvm.py
index 5957393..ca9f685 100644
--- a/modules/diamond/files/collector/libvirtkvm.py
+++ b/modules/diamond/files/collector/libvirtkvm.py
@@ -7,7 +7,7 @@
 
  * python-libvirt, xml
 
-Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26/src/collectors/libvirtkvm/libvirtkvm.py
+Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26
 
 """
 
@@ -30,7 +30,7 @@
 'read_bytes':  1,
 'write_reqs':  2,
 'write_bytes': 3
-}
+}
 
 vifStats = {
 'rx_bytes':   0,
@@ -41,10 +41,11 @@
 'tx_packets': 5,
 'tx_errors':  6,
 'tx_drops':   7
-}
+}
 
 def get_default_config_help(self):
-config_help = super(LibvirtKVMCollector, 
self).get_default_config_help()
+config_help = super(
+LibvirtKVMCollector, self).get_default_config_help()
 config_help.update({
 'uri': """The libvirt connection URI. By default it's
 'qemu:///system'. One decent option is
@@ -78,7 +79,7 @@
 
 for target in tree.findall("devices/%s/target" % type):
 dev = target.get("dev")
-if not dev in devices:
+if dev not in devices:
 devices.append(dev)
 
 return devices

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

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

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix lifecycle methods of MapView (for real).

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

Change subject: Fix lifecycle methods of MapView (for real).
..


Fix lifecycle methods of MapView (for real).

Bug: T142031
Change-Id: Ida6709cb088e5d973eb53f739e4788f4d131034a
---
M app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
1 file changed, 3 insertions(+), 20 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java 
b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
index 8311683..3867532 100644
--- a/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
+++ b/app/src/main/java/org/wikipedia/nearby/NearbyFragment.java
@@ -66,7 +66,6 @@
 private static final int GO_TO_LOCATION_PERMISSION_REQUEST = 50;
 
 @BindView(R.id.mapview) MapView mapView;
-private boolean mapViewResumed;
 private Unbinder unbinder;
 
 @Nullable private MapboxMap mapboxMap;
@@ -113,10 +112,6 @@
 
 onLoading();
 initializeMap();
-
-// setUserVisibleHint() lifecycle occurs prior to onCreateView().
-updateMapView();
-
 return view;
 }
 
@@ -133,13 +128,12 @@
 }
 
 @Override
-public void onDestroyView() {
-mapViewResumed = false;
-mapboxMap = null;
+public void onDestroy() {
 mapView.onDestroy();
+mapboxMap = null;
 unbinder.unbind();
 unbinder = null;
-super.onDestroyView();
+super.onDestroy();
 }
 
 @Override
@@ -159,7 +153,6 @@
 return;
 }
 
-updateMapView();
 updateLocationEnabled(mapboxMap);
 }
 
@@ -436,16 +429,6 @@
 
 private void updateLocationEnabled(@NonNull MapboxMap map) {
 map.setMyLocationEnabled(getUserVisibleHint());
-}
-
-private void updateMapView() {
-if (getUserVisibleHint() && !mapViewResumed) {
-mapViewResumed = true;
-mapView.onResume();
-} else if (!getUserVisibleHint() && mapViewResumed) {
-mapView.onPause();
-mapViewResumed = false;
-}
 }
 
 @SuppressLint("CommitPrefEdits")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida6709cb088e5d973eb53f739e4788f4d131034a
Gerrit-PatchSet: 1
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] operations/puppet[production]: diamond: flake8 fixes for libvirtkvm

2016-08-11 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has uploaded a new change for review.

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

Change subject: diamond: flake8 fixes for libvirtkvm
..

diamond: flake8 fixes for libvirtkvm

Change-Id: I99912fdfb040739f697ffec68d203175e8986246
---
M modules/diamond/files/collector/libvirtkvm.py
1 file changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/modules/diamond/files/collector/libvirtkvm.py 
b/modules/diamond/files/collector/libvirtkvm.py
index 5957393..ca9f685 100644
--- a/modules/diamond/files/collector/libvirtkvm.py
+++ b/modules/diamond/files/collector/libvirtkvm.py
@@ -7,7 +7,7 @@
 
  * python-libvirt, xml
 
-Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26/src/collectors/libvirtkvm/libvirtkvm.py
+Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26
 
 """
 
@@ -30,7 +30,7 @@
 'read_bytes':  1,
 'write_reqs':  2,
 'write_bytes': 3
-}
+}
 
 vifStats = {
 'rx_bytes':   0,
@@ -41,10 +41,11 @@
 'tx_packets': 5,
 'tx_errors':  6,
 'tx_drops':   7
-}
+}
 
 def get_default_config_help(self):
-config_help = super(LibvirtKVMCollector, 
self).get_default_config_help()
+config_help = super(
+LibvirtKVMCollector, self).get_default_config_help()
 config_help.update({
 'uri': """The libvirt connection URI. By default it's
 'qemu:///system'. One decent option is
@@ -78,7 +79,7 @@
 
 for target in tree.findall("devices/%s/target" % type):
 dev = target.get("dev")
-if not dev in devices:
+if dev not in devices:
 devices.append(dev)
 
 return devices

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I99912fdfb040739f697ffec68d203175e8986246
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto 

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_23]: BSUserManager: Fixed RemoveGroups calculation

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

Change subject: BSUserManager: Fixed RemoveGroups calculation
..


BSUserManager: Fixed RemoveGroups calculation

* Replaced getEffectiveGroups() with getGroups()
=> Needs Cherry-Pick to REL1_23

Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
---
M UserManager/UserManager.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 2c98580..cb55c67 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -277,7 +277,7 @@
return Status::newFatal( 
'bs-usermanager-no-self-desysop' );
}
 
-   $aCurrentGroups = $oUser->getEffectiveGroups();
+   $aCurrentGroups = $oUser->getGroups();
$aSetGroups = array_diff( $aGroups, $aCurrentGroups );
$aRemoveGroups = array_diff( $aCurrentGroups, $aGroups );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix hiding of the Overhaul nav item in non-dev builds.

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

Change subject: Fix hiding of the Overhaul nav item in non-dev builds.
..


Fix hiding of the Overhaul nav item in non-dev builds.

Change-Id: I90b61f9e5fcbae0f672911965458876461fb39e8
---
M app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java 
b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
index eb5c392..192c696 100644
--- a/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
+++ b/app/src/main/java/org/wikipedia/page/NavDrawerHelper.java
@@ -70,7 +70,7 @@
 updateMenuGroupToggle();
 
 if (!ReleaseUtil.isDevRelease()) {
-
activity.getNavMenu().findItem(R.id.nav_item_feed).setVisible(false);
+
activity.getNavMenu().findItem(R.id.nav_item_nav).setVisible(false);
 }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90b61f9e5fcbae0f672911965458876461fb39e8
Gerrit-PatchSet: 1
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] mediawiki...PhpTagsFunctions[REL1_26]: Update to master version 3.8 (v 3.8.0.26) requere PhpTags >=...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Update to master version 3.8 (v 3.8.0.26) requere PhpTags >= 5.9
..

Update to master version 3.8 (v 3.8.0.26) requere PhpTags >= 5.9

* Fix dump functions (v 3.8) requere PhpTags >= 5.9
* Add extension.json file and move setup instructions to it (v 3.7.1)
* Optimize PhpTagsFunc::__callStatic() (v 3.5.3) needs PhpTags 5.2.0
* use UIDGenerator for function uuid_create()
* add debug message to !!!firstInit_Test.php
* Update indentation to use tabs

Change-Id: I255e4a41b5c26af151c76c80293f46ccf16274d8
---
M PhpTagsFunctions.hooks.php
M PhpTagsFunctions.json
M PhpTagsFunctions.php
A extension.json
M i18n/en.json
M i18n/ko.json
M includes/PhpTagsFunc.php
M includes/PhpTagsFuncUseful.php
M tests/parser/PhpTagsFunctionsTests.txt
M tests/phpunit/!!!firstInit_Test.php
M tests/phpunit/PhpTagsFunctions_DateTime_Test.php
M tests/phpunit/PhpTagsFunctions_Useful_Test.php
M tests/phpunit/PhpTagsFunctions_Var_Test.php
13 files changed, 201 insertions(+), 124 deletions(-)


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

diff --git a/PhpTagsFunctions.hooks.php b/PhpTagsFunctions.hooks.php
index 7767a24..7543e76 100644
--- a/PhpTagsFunctions.hooks.php
+++ b/PhpTagsFunctions.hooks.php
@@ -12,18 +12,24 @@
 class PhpTagsFunctionsHooks {
 
/**
-*
+* Check on version compatibility
 * @return boolean
 */
public static function onParserFirstCallInit() {
-   if ( !defined( 'PHPTAGS_VERSION' ) ) {
+   $extRegistry = ExtensionRegistry::getInstance();
+   $phpTagsLoaded = $extRegistry->isLoaded( 'PhpTags' );
+   //if ( !$extRegistry->isLoaded( 'PhpTags' ) ) { use 
PHPTAGS_VERSION for backward compatibility
+   if ( !($phpTagsLoaded || defined( 'PHPTAGS_VERSION' )) ) {
throw new MWException( "\n\nYou need to have the 
PhpTags extension installed in order to use the PhpTags Functions extension." );
}
-   $needVersion = '5.1.0';
-   if ( version_compare( PHPTAGS_VERSION, $needVersion, '<' ) ) {
-   throw new MWException( "\n\nThis version of the PhpTags 
Functions extension requires the PhpTags extension $needVersion or above.\n You 
have " . PHPTAGS_VERSION . ". Please update it." );
+   if ( $phpTagsLoaded ) {
+   $neededVersion = '5.9';
+   $phpTagsVersion = 
$extRegistry->getAllThings()['PhpTags']['version'];
+   if ( version_compare( $phpTagsVersion, $neededVersion, 
'<' ) ) {
+   throw new MWException( "\n\nThis version of the 
PhpTags Functions extension requires the PhpTags extension $neededVersion or 
above.\n You have $phpTagsVersion. Please update it." );
+   }
}
-   if ( PHPTAGS_HOOK_RELEASE != 8 ) {
+   if ( !$phpTagsLoaded || PHPTAGS_HOOK_RELEASE != 8 ) {
throw new MWException( "\n\nThis version of the PhpTags 
Functions extension is outdated and not compatible with current version of the 
PhpTags extension.\n Please update it." );
}
return true;
@@ -34,7 +40,9 @@
 * @return boolean
 */
public static function onPhpTagsRuntimeFirstInit() {
-   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', PHPTAGS_FUNCTIONS_VERSION );
+   $allThings = ExtensionRegistry::getInstance()->getAllThings();
+   $version = $allThings['PhpTags Functions']['version'];
+   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', $version . PHP_VERSION );
return true;
}
 
diff --git a/PhpTagsFunctions.json b/PhpTagsFunctions.json
index c367881..9747afd 100644
--- a/PhpTagsFunctions.json
+++ b/PhpTagsFunctions.json
@@ -2970,6 +2970,7 @@
"constants": {
"PHPTAGS_FUNCTIONS_VERSION": {
"desc": "The current version of the PhpTags Functions 
extension as a string",
+   "class": "PhpTagsFuncUseful",
"type": "string",
"link": "mw://Extension:PhpTags_Functions"
},
diff --git a/PhpTagsFunctions.php b/PhpTagsFunctions.php
index 1435f10..86f0a29 100644
--- a/PhpTagsFunctions.php
+++ b/PhpTagsFunctions.php
@@ -1,47 +1,14 @@
 https://www.mediawiki.org/wiki/Extension:PhpTags_Functions 
Documentation
- * @file PhpTagsFunctions.php
- * @defgroup PhpTags
- * @ingroup Extensions
- * @author Pavel Astakhov 
- * @licence GNU General Public Licence 2.0 or later
- */
-
-// Check to see if we are being called as an extension or directly
-if ( !defined('MEDIAWIKI') ) {
-   die( 'This 

[MediaWiki-commits] [Gerrit] openzim[master]: The indexed url must contain the namespace.

2016-08-11 Thread Kelson (Code Review)
Kelson has submitted this change and it was merged.

Change subject: The indexed url must contain the namespace.
..


The indexed url must contain the namespace.

Change-Id: Icc17c7552a2b213a15edc2c674fe00aacb36952b
---
M zimwriterfs/xapianIndexer.cpp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/zimwriterfs/xapianIndexer.cpp b/zimwriterfs/xapianIndexer.cpp
index 8325152..4d0effa 100644
--- a/zimwriterfs/xapianIndexer.cpp
+++ b/zimwriterfs/xapianIndexer.cpp
@@ -108,7 +108,7 @@
 return;
 
 token.title = article->getTitle();
-token.url = article->getUrl();
+token.url = std::string(1, article->getNamespace()) + '/' + 
article->getUrl();
 zim::Blob article_content = article->getData();
 token.content = std::string(article_content.data(), 
article_content.size());
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc17c7552a2b213a15edc2c674fe00aacb36952b
Gerrit-PatchSet: 1
Gerrit-Project: openzim
Gerrit-Branch: master
Gerrit-Owner: Mgautierfr 
Gerrit-Reviewer: Kelson 

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsFunctions[REL1_27]: Update to master version 3.8 (v 3.8.0.27) requere PhpTags >=...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Update to master version 3.8 (v 3.8.0.27) requere PhpTags >= 5.9
..


Update to master version 3.8 (v 3.8.0.27) requere PhpTags >= 5.9

* Fix dump functions (v 3.8) requere PhpTags >= 5.9
* Add extension.json file and move setup instructions to it (v 3.7.1)

Change-Id: I0190262085b32a51c08d044cb4cbaab2625003af
---
M PhpTagsFunctions.hooks.php
M PhpTagsFunctions.json
M PhpTagsFunctions.php
A extension.json
M i18n/ko.json
M includes/PhpTagsFunc.php
M includes/PhpTagsFuncUseful.php
M tests/phpunit/PhpTagsFunctions_DateTime_Test.php
M tests/phpunit/PhpTagsFunctions_Useful_Test.php
M tests/phpunit/PhpTagsFunctions_Var_Test.php
10 files changed, 110 insertions(+), 75 deletions(-)

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



diff --git a/PhpTagsFunctions.hooks.php b/PhpTagsFunctions.hooks.php
index c927053..3214585 100644
--- a/PhpTagsFunctions.hooks.php
+++ b/PhpTagsFunctions.hooks.php
@@ -12,18 +12,24 @@
 class PhpTagsFunctionsHooks {
 
/**
-*
+* Check on version compatibility
 * @return boolean
 */
public static function onParserFirstCallInit() {
-   if ( !defined( 'PHPTAGS_VERSION' ) ) {
+   $extRegistry = ExtensionRegistry::getInstance();
+   $phpTagsLoaded = $extRegistry->isLoaded( 'PhpTags' );
+   //if ( !$extRegistry->isLoaded( 'PhpTags' ) ) { use 
PHPTAGS_VERSION for backward compatibility
+   if ( !($phpTagsLoaded || defined( 'PHPTAGS_VERSION' )) ) {
throw new MWException( "\n\nYou need to have the 
PhpTags extension installed in order to use the PhpTags Functions extension." );
}
-   $needVersion = '5.6.0';
-   if ( version_compare( PHPTAGS_VERSION, $needVersion, '<' ) ) {
-   throw new MWException( "\n\nThis version of the PhpTags 
Functions extension requires the PhpTags extension $needVersion or above.\n You 
have " . PHPTAGS_VERSION . ". Please update it." );
+   if ( $phpTagsLoaded ) {
+   $neededVersion = '5.9';
+   $phpTagsVersion = 
$extRegistry->getAllThings()['PhpTags']['version'];
+   if ( version_compare( $phpTagsVersion, $neededVersion, 
'<' ) ) {
+   throw new MWException( "\n\nThis version of the 
PhpTags Functions extension requires the PhpTags extension $neededVersion or 
above.\n You have $phpTagsVersion. Please update it." );
+   }
}
-   if ( PHPTAGS_HOOK_RELEASE != 8 ) {
+   if ( !$phpTagsLoaded || PHPTAGS_HOOK_RELEASE != 8 ) {
throw new MWException( "\n\nThis version of the PhpTags 
Functions extension is outdated and not compatible with current version of the 
PhpTags extension.\n Please update it." );
}
return true;
@@ -34,7 +40,8 @@
 * @return boolean
 */
public static function onPhpTagsRuntimeFirstInit() {
-   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', PHPTAGS_FUNCTIONS_VERSION . PHP_VERSION );
+   $version = 
ExtensionRegistry::getInstance()->getAllThings()['PhpTags 
Functions']['version'];
+   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', $version . PHP_VERSION );
return true;
}
 
diff --git a/PhpTagsFunctions.json b/PhpTagsFunctions.json
index c367881..9747afd 100644
--- a/PhpTagsFunctions.json
+++ b/PhpTagsFunctions.json
@@ -2970,6 +2970,7 @@
"constants": {
"PHPTAGS_FUNCTIONS_VERSION": {
"desc": "The current version of the PhpTags Functions 
extension as a string",
+   "class": "PhpTagsFuncUseful",
"type": "string",
"link": "mw://Extension:PhpTags_Functions"
},
diff --git a/PhpTagsFunctions.php b/PhpTagsFunctions.php
index 048ab6e..86f0a29 100644
--- a/PhpTagsFunctions.php
+++ b/PhpTagsFunctions.php
@@ -1,47 +1,14 @@
 https://www.mediawiki.org/wiki/Extension:PhpTags_Functions 
Documentation
- * @file PhpTagsFunctions.php
- * @defgroup PhpTags
- * @ingroup Extensions
- * @author Pavel Astakhov 
- * @licence GNU General Public Licence 2.0 or later
- */
-
-// Check to see if we are being called as an extension or directly
-if ( !defined('MEDIAWIKI') ) {
-   die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'PhpTagsFunctions' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['PhpTagsFunctions'] = __DIR__ . '/i18n';
+// wfWarn(
+// 'Deprecated PHP entry point used for PhpTags Functions 
extension.

[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsFunctions[master]: Fix PhpTags version checking (requere PhpTags >= 5.9)

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Fix PhpTags version checking (requere PhpTags >= 5.9)
..


Fix PhpTags version checking (requere PhpTags >= 5.9)

Change-Id: Ide353c9630f47e009d409435356d06f279e41a05
---
M PhpTagsFunctions.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/PhpTagsFunctions.hooks.php b/PhpTagsFunctions.hooks.php
index 229f474..3214585 100644
--- a/PhpTagsFunctions.hooks.php
+++ b/PhpTagsFunctions.hooks.php
@@ -23,7 +23,7 @@
throw new MWException( "\n\nYou need to have the 
PhpTags extension installed in order to use the PhpTags Functions extension." );
}
if ( $phpTagsLoaded ) {
-   $neededVersion = '5.8.0';
+   $neededVersion = '5.9';
$phpTagsVersion = 
$extRegistry->getAllThings()['PhpTags']['version'];
if ( version_compare( $phpTagsVersion, $neededVersion, 
'<' ) ) {
throw new MWException( "\n\nThis version of the 
PhpTags Functions extension requires the PhpTags extension $neededVersion or 
above.\n You have $phpTagsVersion. Please update it." );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide353c9630f47e009d409435356d06f279e41a05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsFunctions
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 
Gerrit-Reviewer: Pastakhov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Generalize SearchBarHideHandler, in preparation for overhaul.

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

Change subject: Generalize SearchBarHideHandler, in preparation for overhaul.
..


Generalize SearchBarHideHandler, in preparation for overhaul.

This creates a "stub" base class for the SearchBarHideHandler, so that
PageFragment can keep using it from either MainActivity or the new
overhauled PageActivity (to come).

Bug: T141131
Change-Id: Id1779682b0500e16a844758ca75a83e1fdcf9010
---
M app/src/main/java/org/wikipedia/MainActivity.java
A app/src/main/java/org/wikipedia/search/MainSearchBarHideHandler.java
M app/src/main/java/org/wikipedia/search/SearchBarHideHandler.java
3 files changed, 183 insertions(+), 160 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index b6c691d..b445a5e 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -88,6 +88,7 @@
 import org.wikipedia.readinglist.AddToReadingListDialog;
 import org.wikipedia.readinglist.ReadingListsFragment;
 import org.wikipedia.recurring.RecurringTasksExecutor;
+import org.wikipedia.search.MainSearchBarHideHandler;
 import org.wikipedia.search.SearchArticlesFragment;
 import org.wikipedia.search.SearchBarHideHandler;
 import org.wikipedia.search.SearchResultsFragment;
@@ -296,7 +297,7 @@
 
getResources().getDimensionPixelSize(R.dimen.drawer_drag_margin));
 getSupportActionBar().setTitle("");
 
-searchBarHideHandler = new SearchBarHideHandler(this, 
toolbarContainer);
+searchBarHideHandler = new MainSearchBarHideHandler(this, 
toolbarContainer);
 
 boolean languageChanged = false;
 
diff --git 
a/app/src/main/java/org/wikipedia/search/MainSearchBarHideHandler.java 
b/app/src/main/java/org/wikipedia/search/MainSearchBarHideHandler.java
new file mode 100644
index 000..d8a3219
--- /dev/null
+++ b/app/src/main/java/org/wikipedia/search/MainSearchBarHideHandler.java
@@ -0,0 +1,179 @@
+package org.wikipedia.search;
+
+import android.app.Activity;
+import android.content.Context;
+import android.content.res.Resources;
+import android.graphics.drawable.Drawable;
+import android.graphics.drawable.LayerDrawable;
+import android.support.annotation.ColorInt;
+import android.support.annotation.ColorRes;
+import android.support.annotation.NonNull;
+import android.support.annotation.Nullable;
+import android.view.Gravity;
+import android.view.View;
+
+import org.wikipedia.R;
+import org.wikipedia.ViewAnimations;
+import org.wikipedia.util.DimenUtil;
+import org.wikipedia.util.GradientUtil;
+import org.wikipedia.views.ObservableWebView;
+
+// TODO: remove after overhaul
+public class MainSearchBarHideHandler extends SearchBarHideHandler
+implements ObservableWebView.OnScrollChangeListener,
+ObservableWebView.OnUpOrCancelMotionEventListener,
+ObservableWebView.OnDownMotionEventListener {
+private static final int FULL_OPACITY = 255;
+@NonNull private final View quickReturnView;
+
+@NonNull private final Context context;
+@Nullable private ObservableWebView webview;
+private boolean fadeEnabled;
+private boolean forceNoFade;
+@NonNull private final Drawable toolbarBackground;
+private Drawable toolbarGradient;
+@NonNull private final Drawable toolbarShadow;
+@NonNull private final Drawable statusBar;
+
+public MainSearchBarHideHandler(@NonNull Activity activity, @NonNull View 
quickReturnView) {
+context = activity;
+this.quickReturnView = quickReturnView;
+
+LayerDrawable toolbarBackgroundLayers = (LayerDrawable) quickReturnView
+
.findViewById(R.id.main_toolbar_background_container).getBackground();
+toolbarBackground = 
toolbarBackgroundLayers.findDrawableByLayerId(R.id.toolbar_background_solid).mutate();
+toolbarShadow = 
quickReturnView.findViewById(R.id.main_toolbar_shadow).getBackground().mutate();
+initToolbarGradient(toolbarBackgroundLayers);
+
+statusBar = 
quickReturnView.findViewById(R.id.empty_status_bar).getBackground().mutate();
+}
+
+/**
+ * Update the WebView based on whose scroll position the search bar will 
hide itself.
+ * @param webView The WebView against which scrolling will be tracked.
+ */
+public void setScrollView(@Nullable ObservableWebView webView) {
+webview = webView;
+if (webview != null) {
+webview.addOnScrollChangeListener(this);
+webview.addOnDownMotionEventListener(this);
+webview.addOnUpOrCancelMotionEventListener(this);
+}
+}
+
+/**
+ * Whether to enable fading in/out of the search bar when near the top of 
the article.
+ * @param enabled True to enable fading, false otherwise.
+ */
+public vo

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Decouple JsonPageLoadStrategy from MainActivity.

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

Change subject: Decouple JsonPageLoadStrategy from MainActivity.
..


Decouple JsonPageLoadStrategy from MainActivity.

...so that we can plug PageFragment into a clean new Activity (to come).

Bug: T141131
Change-Id: I57b5e05c2efeff0b70af50b567e40dd1dddcf828
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
3 files changed, 28 insertions(+), 12 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index b445a5e..7a769ee 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -1063,6 +1063,11 @@
 }
 
 @Override
+public void onPageInvalidateOptionsMenu() {
+supportInvalidateOptionsMenu();
+}
+
+@Override
 public void onSearchSelectPage(@NonNull HistoryEntry entry, boolean 
inNewTab) {
 loadPage(entry.getTitle(), entry, inNewTab ? 
TabsProvider.TabPosition.NEW_TAB_BACKGROUND
 : TabsProvider.TabPosition.CURRENT_TAB, false);
diff --git a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java 
b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
index 7315720..49fe1ce 100644
--- a/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
+++ b/app/src/main/java/org/wikipedia/page/JsonPageLoadStrategy.java
@@ -104,7 +104,6 @@
 private PageViewModel model;
 private PageFragment fragment;
 private CommunicationBridge bridge;
-private MainActivity activity;
 private ObservableWebView webView;
 private SwipeRefreshLayoutWithScroll refreshView;
 @NonNull private final WikipediaApp app = WikipediaApp.getInstance();
@@ -126,7 +125,6 @@
   @NonNull List backStack) {
 this.model = model;
 this.fragment = fragment;
-activity = (MainActivity) fragment.getActivity();
 this.refreshView = refreshView;
 this.webView = webView;
 this.bridge = bridge;
@@ -298,7 +296,9 @@
 networkErrorCallback = null;
 cacheOnComplete = false;
 state = STATE_COMPLETE_FETCH;
-activity.supportInvalidateOptionsMenu();
+if (fragment.callback() != null) {
+fragment.callback().onPageInvalidateOptionsMenu();
+}
 if (!sequenceNumber.inSync(startSequenceNum)) {
 return;
 }
@@ -363,7 +363,9 @@
 @Override
 public void onMessage(JSONObject payload) {
 // Do any other stuff that should happen upon page load 
completion...
-activity.updateProgressBar(false, true, 0);
+if (fragment.callback() != null) {
+fragment.callback().onPageUpdateProgressBar(false, true, 
0);
+}
 
 // trigger layout of the bottom content
 // Check to see if the page title has changed (e.g. due to 
following a redirect),
@@ -391,7 +393,9 @@
 }
 switch (forState) {
 case STATE_NO_FETCH:
-activity.updateProgressBar(true, true, 0);
+if (fragment.callback() != null) {
+fragment.callback().onPageUpdateProgressBar(true, true, 0);
+}
 loadLeadSection(sequenceNumber.get());
 break;
 case STATE_INITIAL_FETCH:
@@ -416,7 +420,9 @@
 return;
 }
 this.state = state;
-activity.supportInvalidateOptionsMenu();
+if (fragment.callback() != null) {
+fragment.callback().onPageInvalidateOptionsMenu();
+}
 
 // FIXME: Move this out into a PageComplete event of sorts
 if (state == STATE_COMPLETE_FETCH) {
@@ -585,7 +591,9 @@
 }
 
 refreshView.setRefreshing(false);
-activity.updateProgressBar(true, true, 0);
+if (fragment.callback() != null) {
+fragment.callback().onPageUpdateProgressBar(true, true, 0);
+}
 
 leadImagesHandler.updateNavigate(page.getPageProperties().getGeo());
 }
@@ -640,7 +648,7 @@
 
 private SparseArray localizedStrings(Page page) {
 return getStringsForArticleLanguage(page.getTitle(),
-ResourceUtil.getIdArray(activity, 
R.array.page_localized_string_ids));
+ResourceUtil.getIdArray(fragment.getContext(), 
R.array.page_localized_string_ids));
 }
 
 
@@ -682,9 +690,11 @@
 }
 
 private void displayNonLeadSection(int index, boolean savedPage) {
-activity.updateProgressBar(true, false,
-MainActivity.PROGRESS_BAR_MAX_VALUE / model.getPage()
-.getSections().size()

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix long-pressing of links inside the WebView.

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

Change subject: Fix long-pressing of links inside the WebView.
..


Fix long-pressing of links inside the WebView.

I've noticed that long-pressing links was no longer working. This is
because we've recently made a change that updates the base URL of the
WebView dynamically, but then our long-press handler was expecting link
URIs to have an authority that exactly matches "wikipedia.org", which
would fail for language-specific domains, e.g. "en.wikipedia.org".

This patch fixes the URI checking logic, and thus fixes the long-press
handler.

Change-Id: I48b0add7bcaf21ad4e4db705d5823502205c2eb5
---
M app/src/main/java/org/wikipedia/util/UriUtil.java
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/util/UriUtil.java 
b/app/src/main/java/org/wikipedia/util/UriUtil.java
index 0c4e38d..4157026 100644
--- a/app/src/main/java/org/wikipedia/util/UriUtil.java
+++ b/app/src/main/java/org/wikipedia/util/UriUtil.java
@@ -69,8 +69,10 @@
 : url);
 }
 
-public static boolean isValidPageLink(Uri uri) {
-return ("wikipedia.org".equals(uri.getAuthority()) && 
!TextUtils.isEmpty(uri.getPath())
+public static boolean isValidPageLink(@NonNull Uri uri) {
+return (!TextUtils.isEmpty(uri.getAuthority())
+&& uri.getAuthority().endsWith("wikipedia.org")
+&& !TextUtils.isEmpty(uri.getPath())
 && uri.getPath().startsWith("/wiki"));
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48b0add7bcaf21ad4e4db705d5823502205c2eb5
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] mediawiki...PhpTagsFunctions[REL1_27]: Update to master version 3.8 (v 3.8.0.27) requere PhpTags >=...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Update to master version 3.8 (v 3.8.0.27) requere PhpTags >= 5.9
..

Update to master version 3.8 (v 3.8.0.27) requere PhpTags >= 5.9

* Fix dump functions (v 3.8) requere PhpTags >= 5.9
* Add extension.json file and move setup instructions to it (v 3.7.1)

Change-Id: I0190262085b32a51c08d044cb4cbaab2625003af
---
M PhpTagsFunctions.hooks.php
M PhpTagsFunctions.json
M PhpTagsFunctions.php
A extension.json
M i18n/ko.json
M includes/PhpTagsFunc.php
M includes/PhpTagsFuncUseful.php
M tests/phpunit/PhpTagsFunctions_DateTime_Test.php
M tests/phpunit/PhpTagsFunctions_Useful_Test.php
M tests/phpunit/PhpTagsFunctions_Var_Test.php
10 files changed, 110 insertions(+), 75 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsFunctions 
refs/changes/41/304441/1

diff --git a/PhpTagsFunctions.hooks.php b/PhpTagsFunctions.hooks.php
index c927053..3214585 100644
--- a/PhpTagsFunctions.hooks.php
+++ b/PhpTagsFunctions.hooks.php
@@ -12,18 +12,24 @@
 class PhpTagsFunctionsHooks {
 
/**
-*
+* Check on version compatibility
 * @return boolean
 */
public static function onParserFirstCallInit() {
-   if ( !defined( 'PHPTAGS_VERSION' ) ) {
+   $extRegistry = ExtensionRegistry::getInstance();
+   $phpTagsLoaded = $extRegistry->isLoaded( 'PhpTags' );
+   //if ( !$extRegistry->isLoaded( 'PhpTags' ) ) { use 
PHPTAGS_VERSION for backward compatibility
+   if ( !($phpTagsLoaded || defined( 'PHPTAGS_VERSION' )) ) {
throw new MWException( "\n\nYou need to have the 
PhpTags extension installed in order to use the PhpTags Functions extension." );
}
-   $needVersion = '5.6.0';
-   if ( version_compare( PHPTAGS_VERSION, $needVersion, '<' ) ) {
-   throw new MWException( "\n\nThis version of the PhpTags 
Functions extension requires the PhpTags extension $needVersion or above.\n You 
have " . PHPTAGS_VERSION . ". Please update it." );
+   if ( $phpTagsLoaded ) {
+   $neededVersion = '5.9';
+   $phpTagsVersion = 
$extRegistry->getAllThings()['PhpTags']['version'];
+   if ( version_compare( $phpTagsVersion, $neededVersion, 
'<' ) ) {
+   throw new MWException( "\n\nThis version of the 
PhpTags Functions extension requires the PhpTags extension $neededVersion or 
above.\n You have $phpTagsVersion. Please update it." );
+   }
}
-   if ( PHPTAGS_HOOK_RELEASE != 8 ) {
+   if ( !$phpTagsLoaded || PHPTAGS_HOOK_RELEASE != 8 ) {
throw new MWException( "\n\nThis version of the PhpTags 
Functions extension is outdated and not compatible with current version of the 
PhpTags extension.\n Please update it." );
}
return true;
@@ -34,7 +40,8 @@
 * @return boolean
 */
public static function onPhpTagsRuntimeFirstInit() {
-   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', PHPTAGS_FUNCTIONS_VERSION . PHP_VERSION );
+   $version = 
ExtensionRegistry::getInstance()->getAllThings()['PhpTags 
Functions']['version'];
+   \PhpTags\Hooks::addJsonFile( __DIR__ . 
'/PhpTagsFunctions.json', $version . PHP_VERSION );
return true;
}
 
diff --git a/PhpTagsFunctions.json b/PhpTagsFunctions.json
index c367881..9747afd 100644
--- a/PhpTagsFunctions.json
+++ b/PhpTagsFunctions.json
@@ -2970,6 +2970,7 @@
"constants": {
"PHPTAGS_FUNCTIONS_VERSION": {
"desc": "The current version of the PhpTags Functions 
extension as a string",
+   "class": "PhpTagsFuncUseful",
"type": "string",
"link": "mw://Extension:PhpTags_Functions"
},
diff --git a/PhpTagsFunctions.php b/PhpTagsFunctions.php
index 048ab6e..86f0a29 100644
--- a/PhpTagsFunctions.php
+++ b/PhpTagsFunctions.php
@@ -1,47 +1,14 @@
 https://www.mediawiki.org/wiki/Extension:PhpTags_Functions 
Documentation
- * @file PhpTagsFunctions.php
- * @defgroup PhpTags
- * @ingroup Extensions
- * @author Pavel Astakhov 
- * @licence GNU General Public Licence 2.0 or later
- */
-
-// Check to see if we are being called as an extension or directly
-if ( !defined('MEDIAWIKI') ) {
-   die( 'This file is an extension to MediaWiki and thus not a valid entry 
point.' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'PhpTagsFunctions' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['PhpTagsFunctions'] = __DIR__ . '/i18n';
+// wfWarn(
+/

[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsFunctions[master]: Fix PhpTags version checking (requere PhpTags >= 5.9)

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Fix PhpTags version checking (requere PhpTags >= 5.9)
..

Fix PhpTags version checking (requere PhpTags >= 5.9)

Change-Id: Ide353c9630f47e009d409435356d06f279e41a05
---
M PhpTagsFunctions.hooks.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/PhpTagsFunctions.hooks.php b/PhpTagsFunctions.hooks.php
index 229f474..3214585 100644
--- a/PhpTagsFunctions.hooks.php
+++ b/PhpTagsFunctions.hooks.php
@@ -23,7 +23,7 @@
throw new MWException( "\n\nYou need to have the 
PhpTags extension installed in order to use the PhpTags Functions extension." );
}
if ( $phpTagsLoaded ) {
-   $neededVersion = '5.8.0';
+   $neededVersion = '5.9';
$phpTagsVersion = 
$extRegistry->getAllThings()['PhpTags']['version'];
if ( version_compare( $phpTagsVersion, $neededVersion, 
'<' ) ) {
throw new MWException( "\n\nThis version of the 
PhpTags Functions extension requires the PhpTags extension $neededVersion or 
above.\n You have $phpTagsVersion. Please update it." );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide353c9630f47e009d409435356d06f279e41a05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PhpTagsFunctions
Gerrit-Branch: master
Gerrit-Owner: Pastakhov 

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_26]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..


Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
(cherry picked from commit 90e8bb90dc9f490bd92c8c0c26bd758eb384ac74)
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index c47c554..0dfaac8 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3735,6 +3735,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3744,6 +3748,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3753,6 +3761,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3762,6 +3774,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3772,6 +3788,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3782,6 +3802,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3792,6 +3816,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3802,6 +3830,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3812,6 +3844,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3822,6 +3858,10 @@
);
}
public function testRun_object_operation_test_10() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_27]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..


Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
(cherry picked from commit 90e8bb90dc9f490bd92c8c0c26bd758eb384ac74)
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index e5fb022..7a6129d 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3734,6 +3734,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3743,6 +3747,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3752,6 +3760,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3761,6 +3773,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3771,6 +3787,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3781,6 +3801,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3791,6 +3815,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3801,6 +3829,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3811,6 +3843,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3821,6 +3857,10 @@
);
}
public function testRun_object_operation_test_10() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_26]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..

Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
(cherry picked from commit 90e8bb90dc9f490bd92c8c0c26bd758eb384ac74)
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/39/304439/1

diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index c47c554..0dfaac8 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3735,6 +3735,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3744,6 +3748,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3753,6 +3761,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3762,6 +3774,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3772,6 +3788,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3782,6 +3802,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3792,6 +3816,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3802,6 +3830,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3812,6 +3844,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3822,6 +3858,10 @@
);
}
public function testRun_object_operation_test_10() {
+  

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_27]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..

Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
(cherry picked from commit 90e8bb90dc9f490bd92c8c0c26bd758eb384ac74)
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)


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

diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index e5fb022..7a6129d 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3734,6 +3734,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3743,6 +3747,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3752,6 +3760,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3761,6 +3773,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3771,6 +3787,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3781,6 +3801,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3791,6 +3815,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3801,6 +3829,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3811,6 +3843,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3821,6 +3857,10 @@
);
}
public function testRun_object_operation_test_10() {
+  

[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsFunctions[master]: Fix dump functions (v 3.8) requere PhpTags >= 5.9

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Fix dump functions (v 3.8) requere PhpTags >= 5.9
..


Fix dump functions (v 3.8) requere PhpTags >= 5.9

Change-Id: I2c267753b1a4397ae62a98018f26e7b4d38f54a2
---
M extension.json
M includes/PhpTagsFunc.php
M tests/phpunit/PhpTagsFunctions_DateTime_Test.php
3 files changed, 35 insertions(+), 22 deletions(-)

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



diff --git a/extension.json b/extension.json
index 0520d6f..523e342 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "PhpTags Functions",
-   "version": "3.7.1",
+   "version": "3.8",
"author": "[https://www.mediawiki.org/wiki/User:Pastakhov Pavel 
Astakhov]",
"url": "https://www.mediawiki.org/wiki/Extension:PhpTags_Functions";,
"descriptionmsg": "phptagsfunctions-desc",
diff --git a/includes/PhpTagsFunc.php b/includes/PhpTagsFunc.php
index 6a6b7cd..83478ef 100644
--- a/includes/PhpTagsFunc.php
+++ b/includes/PhpTagsFunc.php
@@ -96,45 +96,59 @@
}
 
public static function f_printf() {
-   $arguments = func_get_args();
-   $ret = call_user_func_array( 'sprintf', $arguments );
+   $args = func_get_args();
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
+   }
+   $ret = call_user_func_array( 'sprintf', $v );
return new \PhpTags\outPrint( strlen($ret), $ret, false, false 
);
}
 
public static function f_vprintf() {
-   $arguments = func_get_args();
-   $ret = call_user_func_array( 'vsprintf', $arguments );
+   $args = func_get_args();
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
+   }
+   $ret = call_user_func_array( 'vsprintf', $v );
return new \PhpTags\outPrint( strlen($ret), $ret, false, false 
);
}
 
public static function f_var_export( $expression, $return = false ) {
-   if ( $expression instanceof \PhpTags\GenericObject ) {
-   $expression = $expression->getValue();
-   }
-   $ret = var_export( $expression, true );
+   $v = self::getValidDumpValue( $expression );
+   $ret = var_export( $v, true );
return $return ? $ret : new \PhpTags\outPrint( null, $ret );
}
 
public static function f_var_dump() {
$args = func_get_args();
-   foreach ( $args as &$value ) {
-   if ( $value instanceof \PhpTags\GenericObject ) {
-   $value = $value->getValue();
-   }
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
}
ob_start();
-   call_user_func_array( 'var_dump', $args );
+   call_user_func_array( 'var_dump', $v );
return new \PhpTags\outPrint( null, ob_get_clean() );
}
 
public static function f_print_r( $expression, $return = false ) {
-   if ( $expression instanceof \PhpTags\GenericObject ) {
-   $expression = $expression->getValue();
-   }
-   $ret = print_r( $expression, true );
+   $v = self::getValidDumpValue( $expression );
+   $ret = print_r( $v, true );
return $return ? $ret : new \PhpTags\outPrint( true, $ret );
}
 
+   private static function getValidDumpValue( $expression ) {
+   if ( is_object( $expression ) ) {
+   if ( $expression instanceof \PhpTags\GenericObject ) {
+   return (array)$expression->getDumpValue();
+   } else {
+   throw new PhpTagsException( 
PhpTagsException::FATAL_INTERNAL_ERROR );
+   }
+   }
+   return $expression;
+   }
+
/**
 * @todo remove it for PHP >= 5.4.0
 */
diff --git a/tests/phpunit/PhpTagsFunctions_DateTime_Test.php 
b/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
index 2ed3ece..ddada37 100644
--- a/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
+++ b/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
@@ -93,21 +93,20 @@
public function testRun_DateTime_exception_9() {
$this->assertEquals(
Runtime::runSource('new DateTime() . 5;', 
array('Page') ),
-   array( (string) new \PhpTags\PhpTagsException( 
\PhpTags\PhpTagsException::NOTICE_OB

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[master]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..


Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index e5fb022..7a6129d 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3734,6 +3734,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3743,6 +3747,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3752,6 +3760,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3761,6 +3773,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3771,6 +3787,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3781,6 +3801,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3791,6 +3815,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3801,6 +3829,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3811,6 +3843,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3821,6 +3857,10 @@
);
}
public function testRun_object_operation_test_10() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
 

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[master]: Fix tests, ignore object tests when enterance point is not P...

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Fix tests, ignore object tests when enterance point is not 
PhpTags
..

Fix tests, ignore object tests when enterance point is not PhpTags

Change-Id: I18b5d0ebaef21d9d6f86d9c124e44e513411ee59
---
M tests/phpunit/includes/RuntimeTest.php
1 file changed, 128 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/37/304437/1

diff --git a/tests/phpunit/includes/RuntimeTest.php 
b/tests/phpunit/includes/RuntimeTest.php
index e5fb022..7a6129d 100644
--- a/tests/phpunit/includes/RuntimeTest.php
+++ b/tests/phpunit/includes/RuntimeTest.php
@@ -3734,6 +3734,10 @@
}
 
public function testRun_object_operation_test_1() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo . $bar; echo $foo[0],$bar;', array('test'), 7 ),
array(
@@ -3743,6 +3747,10 @@
);
}
public function testRun_object_operation_test_2() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=["rrr"]; $bar=new 
PhpTagsTest(); $foo = $foo + $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3752,6 +3760,10 @@
);
}
public function testRun_object_operation_test_3() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=["rrr"]; $foo += $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3761,6 +3773,10 @@
);
}
public function testRun_object_operation_test_4() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar + $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3771,6 +3787,10 @@
);
}
public function testRun_object_operation_test_5() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar - $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3781,6 +3801,10 @@
);
}
public function testRun_object_operation_test_6() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo -= $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3791,6 +3815,10 @@
);
}
public function testRun_object_operation_test_7() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo > $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3801,6 +3829,10 @@
);
}
public function testRun_object_operation_test_8() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $foo < $bar; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3811,6 +3843,10 @@
);
}
public function testRun_object_operation_test_9() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;
+   }
+
$this->assertEquals(
Runtime::runSource( '$foo=new PhpTagsTest(); 
$bar=5; $foo = $bar <= $foo; echo $foo,$bar;', array('test'), 7 ),
array(
@@ -3821,6 +3857,10 @@
);
}
public function testRun_object_operation_test_10() {
+   if ( !defined( 'PHPTAGS_TEST' ) ) {
+   return;

[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_26]: Update to master version 5.9 (v 5.9.0.26)

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has submitted this change and it was merged.

Change subject: Update to master version 5.9 (v 5.9.0.26)
..


Update to master version 5.9 (v 5.9.0.26)

* Add params checking in Runtime class (v 5.9)
* Runtime::VERSION = 11
* remove ErrorHandler
* Commented out warning message about deprecated PHP entry point
* Fix Renderer::getFrame()
* Add extension.json file and move setup instructions to it (v 5.8.0)
* Fix string to number conversion in Compiler (v 5.7.2) Runtime 10
   Problem depends of conversion string by operator (int):
Example:
echo 'int ' . (int)42000,
 "\nint string " . (int)"42000",
 "\nstring+0 " . ("42000" + 0);

Output for 5.3.22 - 5.4.45, hhvm-3.6.1 - 3.12.0
int 0
int string 9223372036854775807
string+0 4.2E+20

Output for 5.5.0 - 7.0.3
int -4275113695319687168
int string 9223372036854775807
string+0 4.2E+20

Now it doing through operation string + 0
* Fix error messages when Hooks class is used recursively (v 5.7.1)
* Add heredoc, nowdoc. Fix 'OR', 'AND', '[]' operators (v 5.7.0 runtime 9)
Also fix fatal error when PhpTags adds value to string:
$string = 'foo';
$string[] = 'bar';
* add outStrip class (v 5.6.0)
* Fix memory cache (v 5.5.0 Runtime 8)
Now, function getBytecode() always return bytecode that never used early.
* Fix array constructor (v 5.4.0) Runtime release 7
error when array constructor is:
array( $foo, $bar ); it was as array( null, $bar );
* optimize class outPrint (v 5.3.0)
* add function Renderer::insertNoWiki()
* add funnction iRawOutput::getReturnValue()
* add funnction iRawOutput::placeAsStripItem()
* Fix test initialization
* Fix debug messages
* Skip PhpTagsRuntimeFirstInit hook tests if PHPTAGS_TEST is not defined
* add debug mesaages to test files
* Update indentation to use tabs

Change-Id: I81b2c89a3a8a13ebf9f3ea1c14c3acbd91c0b2e7
---
M .gitignore
M PhpTags.hooks.php
M PhpTags.json
M PhpTags.php
A extension.json
M i18n/en.json
M i18n/it.json
A i18n/ko.json
M i18n/ru.json
M i18n/sv.json
M includes/Compiler.php
D includes/ErrorHandler.php
M includes/GenericObject.php
M includes/Hooks.php
M includes/JsonLoader.php
A includes/PhpTagsConstants.php
M includes/PhpTagsException.php
M includes/Renderer.php
M includes/Runtime.php
M includes/iRawOutput.php
M includes/outPrint.php
A includes/outStrip.php
M tests/phpunit/includes/!!!firstInit_Test.php
M tests/phpunit/includes/RuntimeTest.php
24 files changed, 1,507 insertions(+), 343 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 98b092a..afc53f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *~
 *.kate-swp
 .*.swp
+.directory
diff --git a/PhpTags.hooks.php b/PhpTags.hooks.php
index ea011d3..9e27ec9 100644
--- a/PhpTags.hooks.php
+++ b/PhpTags.hooks.php
@@ -60,14 +60,14 @@
 
/**
 *
-* @global int $wgPhpTagsCounter
+* @global int $wgPhpTagsCallsCounter
 * @param Parser $parser
 * @param string $text
 * @return boolean
 */
public static function onParserAfterTidy( $parser, &$text ) {
-   global $wgPhpTagsCounter;
-   if ( $wgPhpTagsCounter > 0 ) {
+   global $wgPhpTagsCallsCounter;
+   if ( $wgPhpTagsCallsCounter > 0 ) {
\PhpTags\Renderer::onParserAfterTidy( $parser, $text );
}
return true;
@@ -100,4 +100,14 @@
return true;
}
 
+   public static function onRegistration() {
+   global $wgPhpTagsLimitReport, $wgPhpTagsCallsCounter;
+
+   $wgPhpTagsLimitReport = false;
+   $wgPhpTagsCallsCounter = 0;
+
+   define ( 'PHPTAGS_HOOK_RELEASE', 8 );
+   define ( 'PHPTAGS_VERSION', '5.9.0.26' ); //@todo remove later, 
it only for backward compatibility
+   }
+
 }
diff --git a/PhpTags.json b/PhpTags.json
index 7adb405..1928822 100644
--- a/PhpTags.json
+++ b/PhpTags.json
@@ -2,18 +2,22 @@
"constants": {
"PHPTAGS_MAJOR_VERSION": {
"desc": "The current 'major' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConstants",
"type": "int"
},
"PHPTAGS_MINOR_VERSION": {
"desc": "The current 'minor' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConstants",
"type": "int"
},
"PHPTAGS_RELEASE_VERSION": {
"desc": "The current 'release' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConstants",
"type": "int"
},
   

[MediaWiki-commits] [Gerrit] mediawiki...PhpTagsFunctions[master]: Fix dump functions (v 3.8) requere PhpTags >= 5.9

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Fix dump functions (v 3.8) requere PhpTags >= 5.9
..

Fix dump functions (v 3.8) requere PhpTags >= 5.9

Change-Id: I2c267753b1a4397ae62a98018f26e7b4d38f54a2
---
M extension.json
M includes/PhpTagsFunc.php
M tests/phpunit/PhpTagsFunctions_DateTime_Test.php
3 files changed, 35 insertions(+), 22 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTagsFunctions 
refs/changes/36/304436/1

diff --git a/extension.json b/extension.json
index 0520d6f..523e342 100644
--- a/extension.json
+++ b/extension.json
@@ -1,6 +1,6 @@
 {
"name": "PhpTags Functions",
-   "version": "3.7.1",
+   "version": "3.8",
"author": "[https://www.mediawiki.org/wiki/User:Pastakhov Pavel 
Astakhov]",
"url": "https://www.mediawiki.org/wiki/Extension:PhpTags_Functions";,
"descriptionmsg": "phptagsfunctions-desc",
diff --git a/includes/PhpTagsFunc.php b/includes/PhpTagsFunc.php
index 6a6b7cd..83478ef 100644
--- a/includes/PhpTagsFunc.php
+++ b/includes/PhpTagsFunc.php
@@ -96,45 +96,59 @@
}
 
public static function f_printf() {
-   $arguments = func_get_args();
-   $ret = call_user_func_array( 'sprintf', $arguments );
+   $args = func_get_args();
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
+   }
+   $ret = call_user_func_array( 'sprintf', $v );
return new \PhpTags\outPrint( strlen($ret), $ret, false, false 
);
}
 
public static function f_vprintf() {
-   $arguments = func_get_args();
-   $ret = call_user_func_array( 'vsprintf', $arguments );
+   $args = func_get_args();
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
+   }
+   $ret = call_user_func_array( 'vsprintf', $v );
return new \PhpTags\outPrint( strlen($ret), $ret, false, false 
);
}
 
public static function f_var_export( $expression, $return = false ) {
-   if ( $expression instanceof \PhpTags\GenericObject ) {
-   $expression = $expression->getValue();
-   }
-   $ret = var_export( $expression, true );
+   $v = self::getValidDumpValue( $expression );
+   $ret = var_export( $v, true );
return $return ? $ret : new \PhpTags\outPrint( null, $ret );
}
 
public static function f_var_dump() {
$args = func_get_args();
-   foreach ( $args as &$value ) {
-   if ( $value instanceof \PhpTags\GenericObject ) {
-   $value = $value->getValue();
-   }
+   $v = array();
+   foreach ( $args as $value => $key ) {
+   $v[$key] = self::getValidDumpValue( $value );
}
ob_start();
-   call_user_func_array( 'var_dump', $args );
+   call_user_func_array( 'var_dump', $v );
return new \PhpTags\outPrint( null, ob_get_clean() );
}
 
public static function f_print_r( $expression, $return = false ) {
-   if ( $expression instanceof \PhpTags\GenericObject ) {
-   $expression = $expression->getValue();
-   }
-   $ret = print_r( $expression, true );
+   $v = self::getValidDumpValue( $expression );
+   $ret = print_r( $v, true );
return $return ? $ret : new \PhpTags\outPrint( true, $ret );
}
 
+   private static function getValidDumpValue( $expression ) {
+   if ( is_object( $expression ) ) {
+   if ( $expression instanceof \PhpTags\GenericObject ) {
+   return (array)$expression->getDumpValue();
+   } else {
+   throw new PhpTagsException( 
PhpTagsException::FATAL_INTERNAL_ERROR );
+   }
+   }
+   return $expression;
+   }
+
/**
 * @todo remove it for PHP >= 5.4.0
 */
diff --git a/tests/phpunit/PhpTagsFunctions_DateTime_Test.php 
b/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
index 2ed3ece..ddada37 100644
--- a/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
+++ b/tests/phpunit/PhpTagsFunctions_DateTime_Test.php
@@ -93,21 +93,20 @@
public function testRun_DateTime_exception_9() {
$this->assertEquals(
Runtime::runSource('new DateTime() . 5;', 
array('Page') ),
-   arra

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Disable libvirtkvm collector for now

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labs: Disable libvirtkvm collector for now
..


labs: Disable libvirtkvm collector for now

Will try again with more eyes on graphite

Change-Id: Iac85e3ef9f56fbe038b40ce669b972e48ad82724
---
M modules/role/manifests/labs/openstack/nova.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova.pp 
b/modules/role/manifests/labs/openstack/nova.pp
index 78a6a90..aa10e42 100644
--- a/modules/role/manifests/labs/openstack/nova.pp
+++ b/modules/role/manifests/labs/openstack/nova.pp
@@ -374,6 +374,7 @@
 }
 
 diamond::collector { 'LibvirtKVM':
+ensure   => absent, # Temporarily disabled
 source   => 'puppet:///modules/diamond/collector/libvirtkvm.py',
 settings => {
 # lint:ignore:quoted_booleans

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iac85e3ef9f56fbe038b40ce669b972e48ad82724
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Disable libvirtkvm collector for now

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labs: Disable libvirtkvm collector for now
..

labs: Disable libvirtkvm collector for now

Will try again with more eyes on graphite

Change-Id: Iac85e3ef9f56fbe038b40ce669b972e48ad82724
---
M modules/role/manifests/labs/openstack/nova.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/304435/1

diff --git a/modules/role/manifests/labs/openstack/nova.pp 
b/modules/role/manifests/labs/openstack/nova.pp
index 78a6a90..aa10e42 100644
--- a/modules/role/manifests/labs/openstack/nova.pp
+++ b/modules/role/manifests/labs/openstack/nova.pp
@@ -374,6 +374,7 @@
 }
 
 diamond::collector { 'LibvirtKVM':
+ensure   => absent, # Temporarily disabled
 source   => 'puppet:///modules/diamond/collector/libvirtkvm.py',
 settings => {
 # lint:ignore:quoted_booleans

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Don't collect network stats by default

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labs: Don't collect network stats by default
..

labs: Don't collect network stats by default

We aren't really using them atm

Change-Id: I2ca0d3f91086f9540679010db97aaef06856fe9e
---
M modules/diamond/files/collector/libvirtkvm.py
1 file changed, 13 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/304434/1

diff --git a/modules/diamond/files/collector/libvirtkvm.py 
b/modules/diamond/files/collector/libvirtkvm.py
index 5957393..37600db 100644
--- a/modules/diamond/files/collector/libvirtkvm.py
+++ b/modules/diamond/files/collector/libvirtkvm.py
@@ -66,7 +66,8 @@
 'path': 'libvirt-kvm',
 'sort_by_uuid': False,
 'uri':  'qemu:///system',
-'cpu_absolute': False
+'cpu_absolute': False,
+'network_stats': False
 })
 return config
 
@@ -147,17 +148,18 @@
 for stat in self.vifStats.keys():
 accum[stat] = 0
 
-for vif in vifs:
-stats = dom.interfaceStats(vif)
+if self.config['network_stats']:
+for vif in vifs:
+stats = dom.interfaceStats(vif)
+for stat in self.vifStats.keys():
+idx = self.vifStats[stat]
+val = stats[idx]
+accum[stat] += val
+self.publish('net.%s.%s' % (vif, stat), val,
+instance=name)
 for stat in self.vifStats.keys():
-idx = self.vifStats[stat]
-val = stats[idx]
-accum[stat] += val
-self.publish('net.%s.%s' % (vif, stat), val,
- instance=name)
-for stat in self.vifStats.keys():
-self.publish('net.total.%s' % stat, accum[stat],
- instance=name)
+self.publish('net.total.%s' % stat, accum[stat],
+instance=name)
 
 # Memory stats
 mem = dom.memoryStats()

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PhpTags[REL1_26]: Update to master version 5.9 (v 5.9.0.26)

2016-08-11 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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

Change subject: Update to master version 5.9 (v 5.9.0.26)
..

Update to master version 5.9 (v 5.9.0.26)

* Add params checking in Runtime class (v 5.9)
* Runtime::VERSION = 11
* remove ErrorHandler
* Commented out warning message about deprecated PHP entry point
* Fix Renderer::getFrame()
* Add extension.json file and move setup instructions to it (v 5.8.0)
* Fix string to number conversion in Compiler (v 5.7.2) Runtime 10
   Problem depends of conversion string by operator (int):
Example:
echo 'int ' . (int)42000,
 "\nint string " . (int)"42000",
 "\nstring+0 " . ("42000" + 0);

Output for 5.3.22 - 5.4.45, hhvm-3.6.1 - 3.12.0
int 0
int string 9223372036854775807
string+0 4.2E+20

Output for 5.5.0 - 7.0.3
int -4275113695319687168
int string 9223372036854775807
string+0 4.2E+20

Now it doing through operation string + 0
* Fix error messages when Hooks class is used recursively (v 5.7.1)
* Add heredoc, nowdoc. Fix 'OR', 'AND', '[]' operators (v 5.7.0 runtime 9)
Also fix fatal error when PhpTags adds value to string:
$string = 'foo';
$string[] = 'bar';
* add outStrip class (v 5.6.0)
* Fix memory cache (v 5.5.0 Runtime 8)
Now, function getBytecode() always return bytecode that never used early.
* Fix array constructor (v 5.4.0) Runtime release 7
error when array constructor is:
array( $foo, $bar ); it was as array( null, $bar );
* optimize class outPrint (v 5.3.0)
* add function Renderer::insertNoWiki()
* add funnction iRawOutput::getReturnValue()
* add funnction iRawOutput::placeAsStripItem()
* Fix test initialization
* Fix debug messages
* Skip PhpTagsRuntimeFirstInit hook tests if PHPTAGS_TEST is not defined
* add debug mesaages to test files
* Update indentation to use tabs

Change-Id: I81b2c89a3a8a13ebf9f3ea1c14c3acbd91c0b2e7
---
M .gitignore
M PhpTags.hooks.php
M PhpTags.json
M PhpTags.php
A extension.json
M i18n/en.json
M i18n/it.json
A i18n/ko.json
M i18n/ru.json
M i18n/sv.json
M includes/Compiler.php
D includes/ErrorHandler.php
M includes/GenericObject.php
M includes/Hooks.php
M includes/JsonLoader.php
A includes/PhpTagsConstants.php
M includes/PhpTagsException.php
M includes/Renderer.php
M includes/Runtime.php
M includes/iRawOutput.php
M includes/outPrint.php
A includes/outStrip.php
M tests/phpunit/includes/!!!firstInit_Test.php
M tests/phpunit/includes/RuntimeTest.php
24 files changed, 1,504 insertions(+), 343 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PhpTags 
refs/changes/33/304433/1

diff --git a/.gitignore b/.gitignore
index 98b092a..afc53f9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *~
 *.kate-swp
 .*.swp
+.directory
diff --git a/PhpTags.hooks.php b/PhpTags.hooks.php
index ea011d3..9e27ec9 100644
--- a/PhpTags.hooks.php
+++ b/PhpTags.hooks.php
@@ -60,14 +60,14 @@
 
/**
 *
-* @global int $wgPhpTagsCounter
+* @global int $wgPhpTagsCallsCounter
 * @param Parser $parser
 * @param string $text
 * @return boolean
 */
public static function onParserAfterTidy( $parser, &$text ) {
-   global $wgPhpTagsCounter;
-   if ( $wgPhpTagsCounter > 0 ) {
+   global $wgPhpTagsCallsCounter;
+   if ( $wgPhpTagsCallsCounter > 0 ) {
\PhpTags\Renderer::onParserAfterTidy( $parser, $text );
}
return true;
@@ -100,4 +100,14 @@
return true;
}
 
+   public static function onRegistration() {
+   global $wgPhpTagsLimitReport, $wgPhpTagsCallsCounter;
+
+   $wgPhpTagsLimitReport = false;
+   $wgPhpTagsCallsCounter = 0;
+
+   define ( 'PHPTAGS_HOOK_RELEASE', 8 );
+   define ( 'PHPTAGS_VERSION', '5.9.0.26' ); //@todo remove later, 
it only for backward compatibility
+   }
+
 }
diff --git a/PhpTags.json b/PhpTags.json
index 7adb405..1928822 100644
--- a/PhpTags.json
+++ b/PhpTags.json
@@ -2,18 +2,22 @@
"constants": {
"PHPTAGS_MAJOR_VERSION": {
"desc": "The current 'major' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConstants",
"type": "int"
},
"PHPTAGS_MINOR_VERSION": {
"desc": "The current 'minor' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConstants",
"type": "int"
},
"PHPTAGS_RELEASE_VERSION": {
"desc": "The current 'release' version of the PhpTags 
extension as an integer",
+   "class": "PhpTagsConsta

[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Validate Change-Id and Depends-On values

2016-08-11 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Validate Change-Id and Depends-On values
..

Validate Change-Id and Depends-On values

A valid Gerrit change-id is a SHA-1 hash represented as a 40 digit hex
string prefixed with I to distinguish it from a commit hash.

Bug: T142801
Change-Id: I98733c7e87f02ca835b0968415ce1e3253996cf6
---
M commit_message_validator/__init__.py
M commit_message_validator/tests/data/check_message_errors.msg
M commit_message_validator/tests/data/check_message_errors.out
A commit_message_validator/tests/data/invalid_change_id.msg
A commit_message_validator/tests/data/invalid_change_id.out
A commit_message_validator/tests/data/invalid_depends_on.msg
A commit_message_validator/tests/data/invalid_depends_on.out
A commit_message_validator/tests/data/multiple_change_id.msg
A commit_message_validator/tests/data/multiple_change_id.out
9 files changed, 46 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/32/304432/1

diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index ee64e30..59964d4 100644
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -98,17 +98,10 @@
 if m.group(2) != ' ':
 yield "Expected one space after 'Depends-On:'"
 
-change_id = m.group(3).strip()
-change_id_is_hex = True
-try:
-int(change_id[1:], 16)
-except ValueError:
-change_id_is_hex = False
-if change_id.upper().startswith('I') and change_id_is_hex:
-if change_id[0] != 'I':
-yield "The Depends-On value must use uppercase I"
-else:
-yield "The Depends-On value is not a Gerrit Change-Id"
+
+def is_valid_change_id(s):
+"""A Gerrit change id is a 40 character hex string prefixed with 'I'."""
+return re.match('^I[a-f0-9]{40}$', s)
 
 
 def check_message(lines):
@@ -120,8 +113,10 @@
 - For any "^Bug: " line, prior line is another Bug: line or empty
 - For any "^Depends-On: " line, next line is not blank
 - For any "^Depends-On: " line, prior line is Bug|Depends-On or empty
+- For any "^Depends-On: " line, the RHS is a valid change id
 - Exactly one "Change-Id: " line per commit
 - For "Change-Id: " line, prior line is empty or "^(Bug|Depends-On): "
+- For "Change-Id: " line, the RHS is a valid change id
 - No blank lines between any "(Bug|Depends-On): " lines and "Change-Id: "
 - Only "(cherry picked from commit" can follow "Change-Id: "
 - Message has at least 3 lines (subject, blank, Change-Id)
@@ -166,7 +161,13 @@
 errors.append(
 "Line %d: Expected blank line before Depends-On:" % rline)
 
-if line.startswith('Change-Id: I'):
+(label, rhs) = line.split(' ', 1)
+if not is_valid_change_id(rhs):
+errors.append(
+"Line %d: value must be a single valid Gerrit change id"
+% rline)
+
+if line.startswith('Change-Id:'):
 # Only expect one "Change-Id: " line
 if changeid_line is not False:
 errors.append(
@@ -196,6 +197,12 @@
 
 changeid_line = rline
 
+(label, rhs) = line.split(' ', 1)
+if not is_valid_change_id(rhs):
+errors.append(
+"Line %d: value must be a single valid Gerrit change id"
+% rline)
+
 last_lineno = rline
 last_line = line
 
diff --git a/commit_message_validator/tests/data/check_message_errors.msg 
b/commit_message_validator/tests/data/check_message_errors.msg
index 3d2343f..d28e005 100644
--- a/commit_message_validator/tests/data/check_message_errors.msg
+++ b/commit_message_validator/tests/data/check_message_errors.msg
@@ -11,12 +11,12 @@
 Bug: T12
 Bug: t13
 
-Depends-On: I1234
+Depends-On: I395fd614bfa8bcfc46a35f955fb77ec6f03f7a01
 
 Bug: t14
-Depends-On: I5678
-Change-Id: I1234567890abcdef123456
-Change-Id: I1234567890abcdef123457
+Depends-On: I00d0f7c3b294c3ddc656f9a5447df89c63142203
+Change-Id: I20c70ff250085de49e4b961da4b53258858df1dd
+Change-Id: I62a5bbf5a94da6f121a7836859371a2a2f60873d
 Depends-On: I9abc
 
 Foo bar
diff --git a/commit_message_validator/tests/data/check_message_errors.out 
b/commit_message_validator/tests/data/check_message_errors.out
index 2d22d18..fff8ef8 100644
--- a/commit_message_validator/tests/data/check_message_errors.out
+++ b/commit_message_validator/tests/data/check_message_errors.out
@@ -22,6 +22,7 @@
 Line 16: The phabricator task ID must use uppercase T
 Line 18: Extra Change-Id found, next at 19
 Line 20: Expected blank line before Depends-On:
+Line 20: value must be a single valid Gerrit change id
 Line 21: Unexpected blank line after D

[MediaWiki-commits] [Gerrit] operations/puppet[production]: lab: Sort libvirtkvm metrics by uuid

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: lab: Sort libvirtkvm metrics by uuid
..

lab: Sort libvirtkvm metrics by uuid

More useful than the i-* names

Change-Id: I028aa95d691c0cae802e03200458645a544f4f23
---
M modules/role/manifests/labs/openstack/nova.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/31/304431/1

diff --git a/modules/role/manifests/labs/openstack/nova.pp 
b/modules/role/manifests/labs/openstack/nova.pp
index 33ace1a..78a6a90 100644
--- a/modules/role/manifests/labs/openstack/nova.pp
+++ b/modules/role/manifests/labs/openstack/nova.pp
@@ -378,7 +378,7 @@
 settings => {
 # lint:ignore:quoted_booleans
 # This is jammed straight into a config file, needs quoting.
-'sort_by_uuid' => 'false',
+'sort_by_uuid' => 'true',
 # lint:endignore
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: lab: Sort libvirtkvm metrics by uuid

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: lab: Sort libvirtkvm metrics by uuid
..


lab: Sort libvirtkvm metrics by uuid

More useful than the i-* names

Change-Id: I028aa95d691c0cae802e03200458645a544f4f23
---
M modules/role/manifests/labs/openstack/nova.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/role/manifests/labs/openstack/nova.pp 
b/modules/role/manifests/labs/openstack/nova.pp
index 33ace1a..78a6a90 100644
--- a/modules/role/manifests/labs/openstack/nova.pp
+++ b/modules/role/manifests/labs/openstack/nova.pp
@@ -378,7 +378,7 @@
 settings => {
 # lint:ignore:quoted_booleans
 # This is jammed straight into a config file, needs quoting.
-'sort_by_uuid' => 'false',
+'sort_by_uuid' => 'true',
 # lint:endignore
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I028aa95d691c0cae802e03200458645a544f4f23
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: Add changeTTL() method

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

Change subject: objectcache: Add changeTTL() method
..


objectcache: Add changeTTL() method

This can change the TTL without fetching the object
so that keys can be renewed or set to expire soon.

Change-Id: Id1c2c9f89b3445cfa34263057dc5029cbe170833
---
M includes/libs/objectcache/BagOStuff.php
M includes/libs/objectcache/MemcachedBagOStuff.php
M includes/libs/objectcache/MemcachedClient.php
M includes/objectcache/MemcachedPeclBagOStuff.php
M includes/objectcache/RedisBagOStuff.php
M tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
6 files changed, 102 insertions(+), 3 deletions(-)

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



diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 25a5a26..5472e83 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -373,6 +373,20 @@
}
 
/**
+* Reset the TTL on a key if it exists
+*
+* @param string $key
+* @param int $expiry
+* @return bool Success Returns false if there is no key
+* @since 1.28
+*/
+   public function changeTTL( $key, $expiry = 0 ) {
+   $value = $this->get( $key );
+
+   return ( $value === false ) ? false : $this->set( $key, $value, 
$expiry );
+   }
+
+   /**
 * Acquire an advisory lock on a key string
 *
 * Note that if reentry is enabled, duplicate calls ignore $expiry
diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index ba8c736..5967441 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -79,6 +79,11 @@
return $this->mergeViaCas( $key, $callback, $exptime, $attempts 
);
}
 
+   public function changeTTL( $key, $exptime = 0 ) {
+   return $this->client->touch( $this->validateKeyEncoding( $key ),
+   $this->fixExpiry( $exptime ) );
+   }
+
/**
 * Get the underlying client object. This is provided for debugging
 * purposes.
diff --git a/includes/libs/objectcache/MemcachedClient.php 
b/includes/libs/objectcache/MemcachedClient.php
index 668135d..c3fcab9 100644
--- a/includes/libs/objectcache/MemcachedClient.php
+++ b/includes/libs/objectcache/MemcachedClient.php
@@ -361,6 +361,48 @@
}
 
/**
+* Changes the TTL on a key from the server to $time
+*
+* @param string $key Key
+* @param int $time TTL in seconds
+*
+* @return bool True on success, false on failure
+*/
+   public function touch( $key, $time = 0 ) {
+   if ( !$this->_active ) {
+   return false;
+   }
+
+   $sock = $this->get_sock( $key );
+   if ( !is_resource( $sock ) ) {
+   return false;
+   }
+
+   $key = is_array( $key ) ? $key[1] : $key;
+
+   if ( isset( $this->stats['touch'] ) ) {
+   $this->stats['touch']++;
+   } else {
+   $this->stats['touch'] = 1;
+   }
+   $cmd = "touch $key $time\r\n";
+   if ( !$this->_fwrite( $sock, $cmd ) ) {
+   return false;
+   }
+   $res = $this->_fgets( $sock );
+
+   if ( $this->_debug ) {
+   $this->_debugprint( sprintf( "MemCache: touch %s (%s)", 
$key, $res ) );
+   }
+
+   if ( $res == "TOUCHED" ) {
+   return true;
+   }
+
+   return false;
+   }
+
+   /**
 * @param string $key
 * @param int $timeout
 * @return bool
diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php 
b/includes/objectcache/MemcachedPeclBagOStuff.php
index 090ace8..bb760bd 100644
--- a/includes/objectcache/MemcachedPeclBagOStuff.php
+++ b/includes/objectcache/MemcachedPeclBagOStuff.php
@@ -226,4 +226,10 @@
$result = $this->client->setMulti( $data, $this->fixExpiry( 
$exptime ) );
return $this->checkResult( false, $result );
}
+
+   public function changeTTL( $key, $expiry = 0 ) {
+   $this->debugLog( "touch($key)" );
+   $result = $this->client->touch( $key, $expiry );
+   return $this->checkResult( $key, $result );
+   }
 }
diff --git a/includes/objectcache/RedisBagOStuff.php 
b/includes/objectcache/RedisBagOStuff.php
index 90508da..c3e0c96 100644
--- a/includes/objectcache/RedisBagOStuff.php
+++ b/includes/objectcache/RedisBagOStuff.php
@@ -272,10 +272,10 @@
if ( !$conn ) {
return fals

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix long-pressing of links inside the WebView.

2016-08-11 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix long-pressing of links inside the WebView.
..

Fix long-pressing of links inside the WebView.

I've noticed that long-pressing links was no longer working. This is
because we've recently made a change that updates the base URL of the
WebView dynamically, but then our long-press handler was expecting link
URIs to have an authority that exactly matches "wikipedia.org", which
would fail for language-specific domains, e.g. "en.wikipedia.org".

This patch fixes the URI checking logic, and thus fixes the long-press
handler.

Change-Id: I48b0add7bcaf21ad4e4db705d5823502205c2eb5
---
M app/src/main/java/org/wikipedia/util/UriUtil.java
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/app/src/main/java/org/wikipedia/util/UriUtil.java 
b/app/src/main/java/org/wikipedia/util/UriUtil.java
index 0c4e38d..4157026 100644
--- a/app/src/main/java/org/wikipedia/util/UriUtil.java
+++ b/app/src/main/java/org/wikipedia/util/UriUtil.java
@@ -69,8 +69,10 @@
 : url);
 }
 
-public static boolean isValidPageLink(Uri uri) {
-return ("wikipedia.org".equals(uri.getAuthority()) && 
!TextUtils.isEmpty(uri.getPath())
+public static boolean isValidPageLink(@NonNull Uri uri) {
+return (!TextUtils.isEmpty(uri.getAuthority())
+&& uri.getAuthority().endsWith("wikipedia.org")
+&& !TextUtils.isEmpty(uri.getPath())
 && uri.getPath().startsWith("/wiki"));
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageTriage[master]: Browser tests: update to mw-selenium 1.7.2 and https

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

Change subject: Browser tests: update to mw-selenium 1.7.2 and https
..


Browser tests: update to mw-selenium 1.7.2 and https

Bug: T129483
Change-Id: I8e760cfcbb118b028edb73a6ca5025c917e9b0a8
---
M Gemfile
M Gemfile.lock
M tests/browser/environments.yml
3 files changed, 20 insertions(+), 14 deletions(-)

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



diff --git a/Gemfile b/Gemfile
index b599272..c7d0f7c 100755
--- a/Gemfile
+++ b/Gemfile
@@ -1,5 +1,5 @@
 source 'https://rubygems.org'
 
-gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.1'
+gem 'mediawiki_selenium', '~> 1.7', '>= 1.7.2'
 gem 'rake', '~> 11.1', '>= 11.1.1'
 gem 'rubocop', '~> 0.35.1', require: false
diff --git a/Gemfile.lock b/Gemfile.lock
index 322bb61..72b1de6 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -17,16 +17,18 @@
   faker (>= 1.1.2)
   yml_reader (>= 0.6)
 diff-lcs (1.2.5)
-domain_name (0.5.20160310)
+domain_name (0.5.20160615)
   unf (>= 0.0.5, < 1.0.0)
-faker (1.6.3)
+faker (1.6.6)
   i18n (~> 0.5)
 faraday (0.9.2)
   multipart-post (>= 1.2, < 3)
 faraday-cookie_jar (0.0.6)
   faraday (>= 0.7.4)
   http-cookie (~> 1.0.0)
-ffi (1.9.10)
+faraday_middleware (0.10.0)
+  faraday (>= 0.7.4, < 0.10)
+ffi (1.9.14)
 gherkin (2.12.2)
   multi_json (~> 1.3)
 headless (2.2.3)
@@ -34,14 +36,15 @@
   domain_name (~> 0.5)
 i18n (0.7.0)
 json (1.8.3)
-mediawiki_api (0.6.0)
+mediawiki_api (0.7.0)
   faraday (~> 0.9, >= 0.9.0)
   faraday-cookie_jar (~> 0.0, >= 0.0.6)
-mediawiki_selenium (1.7.1)
+  faraday_middleware (~> 0.10, >= 0.10.0)
+mediawiki_selenium (1.7.2)
   cucumber (~> 1.3, >= 1.3.20)
   headless (~> 2.0, >= 2.1.0)
   json (~> 1.8, >= 1.8.1)
-  mediawiki_api (~> 0.6, >= 0.6.0)
+  mediawiki_api (~> 0.7, >= 0.7.0)
   page-object (~> 1.0)
   rest-client (~> 1.6, >= 1.6.7)
   rspec-core (~> 2.14, >= 2.14.4)
@@ -53,7 +56,7 @@
 multi_test (0.1.2)
 multipart-post (2.0.0)
 netrc (0.11.0)
-page-object (1.1.1)
+page-object (1.2.0)
   page_navigation (>= 0.9)
   selenium-webdriver (>= 2.44.0)
   watir-webdriver (>= 0.6.11)
@@ -80,17 +83,17 @@
   tins (<= 1.6.0)
 ruby-progressbar (1.7.5)
 rubyzip (1.2.0)
-selenium-webdriver (2.53.0)
+selenium-webdriver (2.53.4)
   childprocess (~> 0.5)
   rubyzip (~> 1.0)
   websocket (~> 1.0)
-syntax (1.2.0)
+syntax (1.2.1)
 thor (0.19.1)
 tins (1.6.0)
 unf (0.1.4)
   unf_ext
 unf_ext (0.0.7.2)
-watir-webdriver (0.9.1)
+watir-webdriver (0.9.3)
   selenium-webdriver (>= 2.46.2)
 websocket (1.2.3)
 yml_reader (0.7)
@@ -99,6 +102,9 @@
   ruby
 
 DEPENDENCIES
-  mediawiki_selenium (~> 1.7, >= 1.7.1)
+  mediawiki_selenium (~> 1.7, >= 1.7.2)
   rake (~> 11.1, >= 11.1.1)
   rubocop (~> 0.35.1)
+
+BUNDLED WITH
+   1.11.2
diff --git a/tests/browser/environments.yml b/tests/browser/environments.yml
index 35eb153..8740e5d 100644
--- a/tests/browser/environments.yml
+++ b/tests/browser/environments.yml
@@ -23,12 +23,12 @@
   mediawiki_url: http://127.0.0.1/wiki/
 
 beta:
-  mediawiki_url: http://en.wikipedia.beta.wmflabs.org/wiki/
+  mediawiki_url: https://en.wikipedia.beta.wmflabs.org/wiki/
   mediawiki_user: Selenium_user
   # mediawiki_password: SET THIS IN THE ENVIRONMENT!
 
 test2:
-  mediawiki_url: http://test2.wikipedia.org/wiki/
+  mediawiki_url: https://test2.wikipedia.org/wiki/
   mediawiki_user: Selenium_user
   # mediawiki_password: SET THIS IN THE ENVIRONMENT!
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8e760cfcbb118b028edb73a6ca5025c917e9b0a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Allow lines >100 chars if they are URLs

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

Change subject: Allow lines >100 chars if they are URLs
..


Allow lines >100 chars if they are URLs

Lines >100 chars are allowed if they look like http/https URLs
optionally wrapped in <>. The validation isn't precise and will allow
unbalanced braces, but seriously is that horrible?

Bug: T142800
Change-Id: I8f400441de6d53b073f9c637a3ac73f1d37e7538
---
M commit_message_validator/__init__.py
M commit_message_validator/tests/data/check_message_ok.msg
A commit_message_validator/tests/data/really_long_url_ok.msg
A commit_message_validator/tests/data/really_long_url_ok.out
M commit_message_validator/tests/test_commit-message-validator.py
5 files changed, 17 insertions(+), 6 deletions(-)

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



diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
old mode 100755
new mode 100644
index 1969448..ee64e30
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -34,7 +34,7 @@
 Checks:
 - First line <=80 characters
 - Second line blank
-- No line >100 characters
+- No line >100 characters (unless it is only a URL)
 - "Bug:" is capitalized
 - "Bug:" is followed by a space
 - Exactly one task id on each Bug: line
@@ -56,9 +56,11 @@
 if line:
 yield "Second line should be empty"
 
-# No line >100
+# No line >100 unless it is all a URL
 elif len(line) > 100:
-yield "Line should be <=100 characters"
+m = re.match(r'^?$', line, re.IGNORECASE)
+if not m:
+yield "Line should be <=100 characters"
 
 m = re.match(r'^(bug|closes|fixes|task):(\W)*(.*)', line, re.IGNORECASE)
 if m:
diff --git a/commit_message_validator/tests/data/check_message_ok.msg 
b/commit_message_validator/tests/data/check_message_ok.msg
index a7fb18a..d90f841 100644
--- a/commit_message_validator/tests/data/check_message_ok.msg
+++ b/commit_message_validator/tests/data/check_message_ok.msg
@@ -9,7 +9,7 @@
 Other checks:
 - First line <=80 characters
 - Second line blank
-- No line >100 characters
+- No line >100 characters unless it is a URL
 - "Bug:" is capitalized
 - "Bug:" is followed by a space
 - Exactly one task id on each Bug: line
diff --git a/commit_message_validator/tests/data/really_long_url_ok.msg 
b/commit_message_validator/tests/data/really_long_url_ok.msg
new file mode 100644
index 000..8f705c0
--- /dev/null
+++ b/commit_message_validator/tests/data/really_long_url_ok.msg
@@ -0,0 +1,7 @@
+A commit with a really long URL is valid
+
+This commit message includes a URL that is >100 characters but that's ok as
+long as it is on a line by itself.
+http://www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com/is_actually_a_valid_and_live_domain.html
+
+Change-Id: I395fd614bfa8bcfc46a35f955fb77ec6f03f7a0b
diff --git a/commit_message_validator/tests/data/really_long_url_ok.out 
b/commit_message_validator/tests/data/really_long_url_ok.out
new file mode 100644
index 000..76dfe33
--- /dev/null
+++ b/commit_message_validator/tests/data/really_long_url_ok.out
@@ -0,0 +1,2 @@
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/test_commit-message-validator.py 
b/commit_message_validator/tests/test_commit-message-validator.py
index ae8101d..866b3fe 100644
--- a/commit_message_validator/tests/test_commit-message-validator.py
+++ b/commit_message_validator/tests/test_commit-message-validator.py
@@ -22,6 +22,8 @@
 file pairs where there is a `.msg` and `.out` file. If both exist it'll
 create a test for this pair where the `.msg` is the commit message and the
 `.out` is the expected output.
+
+Filenames for tests that will pass validation must end with 'ok'.
 """
 
 def __new__(cls, name, bases, dct):
@@ -54,9 +56,7 @@
 
 
 class TestCommitMessageValidator(with_metaclass(MetaValidator, 
unittest.TestCase)):
-
 """Validate the commit messages using test files."""
-
 pass
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f400441de6d53b073f9c637a3ac73f1d37e7538
Gerrit-PatchSet: 2
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceFoundation[master]: BSAPITAsksBase: add data update trigger on api action

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

Change subject: BSAPITAsksBase: add data update trigger on api action
..


BSAPITAsksBase: add data update trigger on api action

Change-Id: I892af15a8e992f6769d02d8266b35e354934b723
---
M includes/api/BSApiTasksBase.php
1 file changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/BSApiTasksBase.php b/includes/api/BSApiTasksBase.php
index 985a460..f7e8257 100644
--- a/includes/api/BSApiTasksBase.php
+++ b/includes/api/BSApiTasksBase.php
@@ -96,6 +96,12 @@
}
 
Hooks::run( 'BSApiTasksBaseAfterExecuteTask', 
array( $this, $sTask, &$oResult, $oTaskData , $aParams ) );
+
+   //trigger data update flag after content change 
over api
+   if( $this->isWriteMode() ) {
+   $oWikiPage = WikiPage::factory( 
$this->getTitle() );
+   DataUpdate::runUpdates( 
$oWikiPage->getContent()->getSecondaryDataUpdates( $this->getTitle() ) );
+   }
}
}
 
@@ -397,4 +403,12 @@
}
return parent::canUseWikiPage();
}
+
+   /*
+* Indicates whether this module requires write mode
+* @return bool
+*/
+   public function isWriteMode() {
+   return true;
+   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I892af15a8e992f6769d02d8266b35e354934b723
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Ljonka 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Add python artifacts to .gitignore

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

Change subject: Add python artifacts to .gitignore
..


Add python artifacts to .gitignore

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

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



diff --git a/.gitignore b/.gitignore
index edd9d60..d94fe8e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,5 @@
+*.egg-info/
+*.pyc
+.tox/
 build/
 dist/

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15201004fde51eb46de335375739ac5e675abaf6
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Change check_message_ok test text

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

Change subject: Change check_message_ok test text
..


Change check_message_ok test text

Use the check_message_ok test text to describe the rules enforced and
link to the wiki documentation.

Change-Id: I6a8b937949442a9be4c99ef3c2eac52159f64fbe
---
M commit_message_validator/tests/data/check_message_ok.msg
1 file changed, 32 insertions(+), 5 deletions(-)

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



diff --git a/commit_message_validator/tests/data/check_message_ok.msg 
b/commit_message_validator/tests/data/check_message_ok.msg
index 018adc6..a7fb18a 100644
--- a/commit_message_validator/tests/data/check_message_ok.msg
+++ b/commit_message_validator/tests/data/check_message_ok.msg
@@ -1,8 +1,35 @@
-Add mediawiki::iwlink define and use it with role::mobilefrontend
+This is the subject line of the commit
 
-Add a new Puppet define that can be used to easily add rows to the
-interwiki links table. The define is used to add a few interwiki
-language links to mobilewiki provisioned by role:mobilefrontend.
+The body of the commit message starts after a blank line. It contains just
+about any random text, but each line should not exceed 100 characters. Really
+there is no good reason for any body line to exceed 72 characters (80 column
+display with an 8 character tab leading the line) except in the case of a long
+URL that is embedded in the message.
 
-Bug: T106633
+Other checks:
+- First line <=80 characters
+- Second line blank
+- No line >100 characters
+- "Bug:" is capitalized
+- "Bug:" is followed by a space
+- Exactly one task id on each Bug: line
+- "Depends-On:" is capitalized
+- "Depends-On:" is followed by a space
+- Exactly one change id on each Depends-On: line
+- No "Task: ", "Fixes: ", "Closes: " lines
+- For any "^Bug: " line, next line is not blank
+- For any "^Bug: " line, prior line is another Bug: line or empty
+- For any "^Depends-On: " line, next line is not blank
+- For any "^Depends-On: " line, prior line is Bug|Depends-On or empty
+- Exactly one "Change-Id: " line per commit
+- For "Change-Id: " line, prior line is empty or "^(Bug|Depends-On): "
+- No blank lines between any "(Bug|Depends-On): " lines and "Change-Id: "
+- Only "(cherry picked from commit" can follow "Change-Id: "
+- Message has at least 3 lines (subject, blank, Change-Id)
+
+https://www.mediawiki.org/wiki/Gerrit/Commit_message_guidelines
+
+Bug: T109119
+Depends-On: I2deb4cd50d50a87a34b0bf4277ad55f77e75dd0d
 Change-Id: Ifcd397165df1cbf9fa04f2044e1bb33ad7414d8d
+(cherry picked from commit a24ca11e277afd8b5259d44b2d645d4dbb99502f)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a8b937949442a9be4c99ef3c2eac52159f64fbe
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Add support for Depends-On statements

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

Change subject: Add support for Depends-On statements
..


Add support for Depends-On statements

A Depends-On statement should appear just before the Change-Id statement
and reference a valid Gerrit change ID. It should not be separated from
any Bug statements, but should be separated from the message body.
Multiple Depends-On statements are valid.

Bug: T142672
Change-Id: Ia3a16d14a1cad4d46d9df17c898077365dbadb6e
---
M commit_message_validator/__init__.py
M commit_message_validator/tests/data/check_message_errors.msg
M commit_message_validator/tests/data/check_message_errors.out
3 files changed, 76 insertions(+), 13 deletions(-)

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



diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
index 57b5473..1969448 100755
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -38,6 +38,9 @@
 - "Bug:" is capitalized
 - "Bug:" is followed by a space
 - Exactly one task id on each Bug: line
+- "Depends-On:" is capitalized
+- "Depends-On:" is followed by a space
+- Exactly one change id on each Depends-On: line
 - No "Task: ", "Fixes: ", "Closes: " lines
 """
 # First line <=80
@@ -82,6 +85,29 @@
 else:
 yield "The bug ID is not a phabricator task ID"
 
+m = re.match(r'^(depends-on):(\W)*(.*)', line, re.IGNORECASE)
+if m:
+if lineno == 0:
+yield "Do not define dependency in the header"
+
+if m.group(1) != 'Depends-On':
+yield "Expected 'Depends-On' not '%s:'" % m.group(1)
+
+if m.group(2) != ' ':
+yield "Expected one space after 'Depends-On:'"
+
+change_id = m.group(3).strip()
+change_id_is_hex = True
+try:
+int(change_id[1:], 16)
+except ValueError:
+change_id_is_hex = False
+if change_id.upper().startswith('I') and change_id_is_hex:
+if change_id[0] != 'I':
+yield "The Depends-On value must use uppercase I"
+else:
+yield "The Depends-On value is not a Gerrit Change-Id"
+
 
 def check_message(lines):
 """Check a commit message to see if it has errors.
@@ -90,9 +116,11 @@
 - All lines ok as checked by line_errors()
 - For any "^Bug: " line, next line is not blank
 - For any "^Bug: " line, prior line is another Bug: line or empty
+- For any "^Depends-On: " line, next line is not blank
+- For any "^Depends-On: " line, prior line is Bug|Depends-On or empty
 - Exactly one "Change-Id: " line per commit
-- For "Change-Id: " line, prior line is empty or "^Bug: "
-- No blank lines between any "Bug: " lines and "Change-Id: "
+- For "Change-Id: " line, prior line is empty or "^(Bug|Depends-On): "
+- No blank lines between any "(Bug|Depends-On): " lines and "Change-Id: "
 - Only "(cherry picked from commit" can follow "Change-Id: "
 - Message has at least 3 lines (subject, blank, Change-Id)
 """
@@ -101,6 +129,7 @@
 last_line = ''
 changeid_line = False
 last_bug = False
+last_depends = False
 for lineno, line in enumerate(lines):
 rline = lineno + 1
 errors.extend('Line {0}: {1}'.format(rline, e)
@@ -112,12 +141,28 @@
 errors.append(
 "Line %d: Unexpected blank line after Bug:" % rline)
 
+# For any "Depends-On: " line, next line is not blank
+if last_depends == last_lineno:
+if not line:
+errors.append(
+"Line %d: Unexpected blank line after Depends-On:" % rline)
+
 # For any "Bug: " line, prior line is another Bug: line or empty
 if line.startswith('Bug: '):
 last_bug = rline
 if last_line and not last_line.startswith('Bug: '):
 errors.append(
 "Line %d: Expected blank line before Bug:" % rline)
+
+# For any "Depends-On: " line, prior line is Bug, Depends-On, or empty
+if line.startswith('Depends-On: '):
+last_depends = rline
+if last_line and not (
+last_line.startswith('Bug: ') or
+last_line.startswith('Depends-On: ')
+):
+errors.append(
+"Line %d: Expected blank line before Depends-On:" % rline)
 
 if line.startswith('Change-Id: I'):
 # Only expect one "Change-Id: " line
@@ -127,17 +172,25 @@
 (changeid_line, rline))
 
 # For "Change-Id: " line, prior line is empty or Bug:
-elif last_line and not last_line.startswith('Bug: '):
+elif last_line and not (
+last_line.startswith('Bug: ') or
+last_line.startswith('Depends-On: ')
+):

[MediaWiki-commits] [Gerrit] integration/commit-message-validator[master]: Allow lines >100 chars if they are URLs

2016-08-11 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Allow lines >100 chars if they are URLs
..

Allow lines >100 chars if they are URLs

Bug: T142800
Change-Id: I8f400441de6d53b073f9c637a3ac73f1d37e7538
---
M commit_message_validator/__init__.py
M commit_message_validator/tests/data/check_message_ok.msg
A commit_message_validator/tests/data/really_long_url_ok.msg
A commit_message_validator/tests/data/really_long_url_ok.out
M commit_message_validator/tests/test_commit-message-validator.py
5 files changed, 17 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/commit-message-validator 
refs/changes/30/304430/1

diff --git a/commit_message_validator/__init__.py 
b/commit_message_validator/__init__.py
old mode 100755
new mode 100644
index 1969448..4986134
--- a/commit_message_validator/__init__.py
+++ b/commit_message_validator/__init__.py
@@ -34,7 +34,7 @@
 Checks:
 - First line <=80 characters
 - Second line blank
-- No line >100 characters
+- No line >100 characters (unless it is only a URL)
 - "Bug:" is capitalized
 - "Bug:" is followed by a space
 - Exactly one task id on each Bug: line
@@ -56,9 +56,11 @@
 if line:
 yield "Second line should be empty"
 
-# No line >100
+# No line >100 unless it is all a URL
 elif len(line) > 100:
-yield "Line should be <=100 characters"
+m = re.match(r'^https?://\S+$', line, re.IGNORECASE)
+if not m:
+yield "Line should be <=100 characters"
 
 m = re.match(r'^(bug|closes|fixes|task):(\W)*(.*)', line, re.IGNORECASE)
 if m:
diff --git a/commit_message_validator/tests/data/check_message_ok.msg 
b/commit_message_validator/tests/data/check_message_ok.msg
index a7fb18a..4a7f483 100644
--- a/commit_message_validator/tests/data/check_message_ok.msg
+++ b/commit_message_validator/tests/data/check_message_ok.msg
@@ -9,7 +9,7 @@
 Other checks:
 - First line <=80 characters
 - Second line blank
-- No line >100 characters
+- No line >100 characters unless it is an URL
 - "Bug:" is capitalized
 - "Bug:" is followed by a space
 - Exactly one task id on each Bug: line
diff --git a/commit_message_validator/tests/data/really_long_url_ok.msg 
b/commit_message_validator/tests/data/really_long_url_ok.msg
new file mode 100644
index 000..8f705c0
--- /dev/null
+++ b/commit_message_validator/tests/data/really_long_url_ok.msg
@@ -0,0 +1,7 @@
+A commit with a really long URL is valid
+
+This commit message includes a URL that is >100 characters but that's ok as
+long as it is on a line by itself.
+http://www.abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk.com/is_actually_a_valid_and_live_domain.html
+
+Change-Id: I395fd614bfa8bcfc46a35f955fb77ec6f03f7a0b
diff --git a/commit_message_validator/tests/data/really_long_url_ok.out 
b/commit_message_validator/tests/data/really_long_url_ok.out
new file mode 100644
index 000..76dfe33
--- /dev/null
+++ b/commit_message_validator/tests/data/really_long_url_ok.out
@@ -0,0 +1,2 @@
+commit-message-validator v%version%
+Commit message is formatted properly! Keep up the good work!
diff --git a/commit_message_validator/tests/test_commit-message-validator.py 
b/commit_message_validator/tests/test_commit-message-validator.py
index ae8101d..866b3fe 100644
--- a/commit_message_validator/tests/test_commit-message-validator.py
+++ b/commit_message_validator/tests/test_commit-message-validator.py
@@ -22,6 +22,8 @@
 file pairs where there is a `.msg` and `.out` file. If both exist it'll
 create a test for this pair where the `.msg` is the commit message and the
 `.out` is the expected output.
+
+Filenames for tests that will pass validation must end with 'ok'.
 """
 
 def __new__(cls, name, bases, dct):
@@ -54,9 +56,7 @@
 
 
 class TestCommitMessageValidator(with_metaclass(MetaValidator, 
unittest.TestCase)):
-
 """Validate the commit messages using test files."""
-
 pass
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f400441de6d53b073f9c637a3ac73f1d37e7538
Gerrit-PatchSet: 1
Gerrit-Project: integration/commit-message-validator
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Add labvirtkvm collector

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: labs: Add labvirtkvm collector
..


labs: Add labvirtkvm collector

Change-Id: I3f3c427a9d5e5294aec9564a735486bb473598a7
---
A modules/diamond/files/collector/libvirtkvm.py
M modules/role/manifests/labs/openstack/nova.pp
2 files changed, 176 insertions(+), 0 deletions(-)

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



diff --git a/modules/diamond/files/collector/libvirtkvm.py 
b/modules/diamond/files/collector/libvirtkvm.py
new file mode 100644
index 000..5957393
--- /dev/null
+++ b/modules/diamond/files/collector/libvirtkvm.py
@@ -0,0 +1,166 @@
+# coding=utf-8
+
+"""
+Uses libvirt to harvest per KVM instance stats
+
+ Dependencies
+
+ * python-libvirt, xml
+
+Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26/src/collectors/libvirtkvm/libvirtkvm.py
+
+"""
+
+import diamond.collector
+
+try:
+from xml.etree import ElementTree
+except ImportError:
+import cElementTree as ElementTree
+
+try:
+import libvirt
+except ImportError:
+libvirt = None
+
+
+class LibvirtKVMCollector(diamond.collector.Collector):
+blockStats = {
+'read_reqs':   0,
+'read_bytes':  1,
+'write_reqs':  2,
+'write_bytes': 3
+}
+
+vifStats = {
+'rx_bytes':   0,
+'rx_packets': 1,
+'rx_errors':  2,
+'rx_drops':   3,
+'tx_bytes':   4,
+'tx_packets': 5,
+'tx_errors':  6,
+'tx_drops':   7
+}
+
+def get_default_config_help(self):
+config_help = super(LibvirtKVMCollector, 
self).get_default_config_help()
+config_help.update({
+'uri': """The libvirt connection URI. By default it's
+'qemu:///system'. One decent option is
+'qemu+unix:///system?socket=/var/run/libvirt/libvit-sock-ro'.""",
+'sort_by_uuid': """Use the  of the instance instead of the
+ default , useful in Openstack deploments where  is only
+specific to the compute node""",
+'cpu_absolute': """CPU stats reported as percentage by default, or
+as cummulative nanoseconds since VM creation if this is True."""
+})
+return config_help
+
+def get_default_config(self):
+"""
+Returns the default collector settings
+"""
+config = super(LibvirtKVMCollector, self).get_default_config()
+config.update({
+'path': 'libvirt-kvm',
+'sort_by_uuid': False,
+'uri':  'qemu:///system',
+'cpu_absolute': False
+})
+return config
+
+def get_devices(self, dom, type):
+devices = []
+
+# Create a XML tree from the domain XML description.
+tree = ElementTree.fromstring(dom.XMLDesc(0))
+
+for target in tree.findall("devices/%s/target" % type):
+dev = target.get("dev")
+if not dev in devices:
+devices.append(dev)
+
+return devices
+
+def get_disk_devices(self, dom):
+return self.get_devices(dom, 'disk')
+
+def get_network_devices(self, dom):
+return self.get_devices(dom, 'interface')
+
+def report_cpu_metric(self, statname, value, instance):
+# Value in cummulative nanoseconds
+if self.config['cpu_absolute'] is True:
+metric = value
+else:
+# Nanoseconds (10^9), however, we want to express in 100%
+metric = self.derivative(statname, float(value) / 1000.0,
+ max_value=diamond.collector.MAX_COUNTER,
+ instance=instance)
+self.publish(statname, metric, instance=instance)
+
+def collect(self):
+if libvirt is None:
+self.log.error('Unable to import libvirt')
+return {}
+
+conn = libvirt.openReadOnly(self.config['uri'])
+for dom in [conn.lookupByID(n) for n in conn.listDomainsID()]:
+if self.config['sort_by_uuid'] is True:
+name = dom.UUIDString()
+else:
+name = dom.name()
+
+# CPU stats
+vcpus = dom.getCPUStats(True, 0)
+totalcpu = 0
+idx = 0
+for vcpu in vcpus:
+cputime = vcpu['cpu_time']
+self.report_cpu_metric('cpu.%s.time' % idx, cputime, name)
+idx += 1
+totalcpu += cputime
+self.report_cpu_metric('cpu.total.time', totalcpu, name)
+
+# Disk stats
+disks = self.get_disk_devices(dom)
+accum = {}
+for stat in self.blockStats.keys():
+accum[stat] = 0
+
+for disk in disks:
+stats = dom.blockStats(disk)
+for stat in self.blockStats.keys():
+idx = self.blockStats[stat]
+

[MediaWiki-commits] [Gerrit] operations/puppet[production]: labs: Add labvirtkvm collector

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: labs: Add labvirtkvm collector
..

labs: Add labvirtkvm collector

Change-Id: I3f3c427a9d5e5294aec9564a735486bb473598a7
---
A modules/diamond/files/collector/libvirtkvm.py
M modules/role/manifests/labs/openstack/nova.pp
2 files changed, 176 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/304429/1

diff --git a/modules/diamond/files/collector/libvirtkvm.py 
b/modules/diamond/files/collector/libvirtkvm.py
new file mode 100644
index 000..5957393
--- /dev/null
+++ b/modules/diamond/files/collector/libvirtkvm.py
@@ -0,0 +1,166 @@
+# coding=utf-8
+
+"""
+Uses libvirt to harvest per KVM instance stats
+
+ Dependencies
+
+ * python-libvirt, xml
+
+Sourced from 
https://github.com/BrightcoveOS/Diamond/blob/0cf5a4bccfad3a3630dd4bf771758adf1ea8fc26/src/collectors/libvirtkvm/libvirtkvm.py
+
+"""
+
+import diamond.collector
+
+try:
+from xml.etree import ElementTree
+except ImportError:
+import cElementTree as ElementTree
+
+try:
+import libvirt
+except ImportError:
+libvirt = None
+
+
+class LibvirtKVMCollector(diamond.collector.Collector):
+blockStats = {
+'read_reqs':   0,
+'read_bytes':  1,
+'write_reqs':  2,
+'write_bytes': 3
+}
+
+vifStats = {
+'rx_bytes':   0,
+'rx_packets': 1,
+'rx_errors':  2,
+'rx_drops':   3,
+'tx_bytes':   4,
+'tx_packets': 5,
+'tx_errors':  6,
+'tx_drops':   7
+}
+
+def get_default_config_help(self):
+config_help = super(LibvirtKVMCollector, 
self).get_default_config_help()
+config_help.update({
+'uri': """The libvirt connection URI. By default it's
+'qemu:///system'. One decent option is
+'qemu+unix:///system?socket=/var/run/libvirt/libvit-sock-ro'.""",
+'sort_by_uuid': """Use the  of the instance instead of the
+ default , useful in Openstack deploments where  is only
+specific to the compute node""",
+'cpu_absolute': """CPU stats reported as percentage by default, or
+as cummulative nanoseconds since VM creation if this is True."""
+})
+return config_help
+
+def get_default_config(self):
+"""
+Returns the default collector settings
+"""
+config = super(LibvirtKVMCollector, self).get_default_config()
+config.update({
+'path': 'libvirt-kvm',
+'sort_by_uuid': False,
+'uri':  'qemu:///system',
+'cpu_absolute': False
+})
+return config
+
+def get_devices(self, dom, type):
+devices = []
+
+# Create a XML tree from the domain XML description.
+tree = ElementTree.fromstring(dom.XMLDesc(0))
+
+for target in tree.findall("devices/%s/target" % type):
+dev = target.get("dev")
+if not dev in devices:
+devices.append(dev)
+
+return devices
+
+def get_disk_devices(self, dom):
+return self.get_devices(dom, 'disk')
+
+def get_network_devices(self, dom):
+return self.get_devices(dom, 'interface')
+
+def report_cpu_metric(self, statname, value, instance):
+# Value in cummulative nanoseconds
+if self.config['cpu_absolute'] is True:
+metric = value
+else:
+# Nanoseconds (10^9), however, we want to express in 100%
+metric = self.derivative(statname, float(value) / 1000.0,
+ max_value=diamond.collector.MAX_COUNTER,
+ instance=instance)
+self.publish(statname, metric, instance=instance)
+
+def collect(self):
+if libvirt is None:
+self.log.error('Unable to import libvirt')
+return {}
+
+conn = libvirt.openReadOnly(self.config['uri'])
+for dom in [conn.lookupByID(n) for n in conn.listDomainsID()]:
+if self.config['sort_by_uuid'] is True:
+name = dom.UUIDString()
+else:
+name = dom.name()
+
+# CPU stats
+vcpus = dom.getCPUStats(True, 0)
+totalcpu = 0
+idx = 0
+for vcpu in vcpus:
+cputime = vcpu['cpu_time']
+self.report_cpu_metric('cpu.%s.time' % idx, cputime, name)
+idx += 1
+totalcpu += cputime
+self.report_cpu_metric('cpu.total.time', totalcpu, name)
+
+# Disk stats
+disks = self.get_disk_devices(dom)
+accum = {}
+for stat in self.blockStats.keys():
+accum[stat] = 0
+
+for disk in disks:
+stats = dom.blockStats(disk)
+for stat in self.blockStats.keys():
+  

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add invitesignup role

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

Change subject: Add invitesignup role
..


Add invitesignup role

Bug: T134885
Change-Id: I5a84971274677c9aebdafc06ba85f4795284a72f
---
A puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
A puppet/modules/role/manifests/invitesignup.pp
2 files changed, 22 insertions(+), 0 deletions(-)

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



diff --git 
a/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki 
b/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
new file mode 100644
index 000..afaf98b
--- /dev/null
+++ b/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
@@ -0,0 +1,2 @@
+Use [[Special:InviteSignup]] to invite users. Mails will be sent to the 
vagrant user's postbox on the guest box.
+
diff --git a/puppet/modules/role/manifests/invitesignup.pp 
b/puppet/modules/role/manifests/invitesignup.pp
new file mode 100644
index 000..ce84c27
--- /dev/null
+++ b/puppet/modules/role/manifests/invitesignup.pp
@@ -0,0 +1,20 @@
+# == Class: role::invitesignup
+# Provisions the InviteSignup[1] extension which allows
+# restricting account creation on a closed wiki to
+# invited users only.
+#
+# [1]: https://www.mediawiki.org/wiki/Extension:InviteSignup
+#
+class role::invitesignup {
+mediawiki::extension { 'InviteSignup':
+needs_update => true,
+settings => [
+'$wgGroupPermissions["sysop"]["invitesignup"] = true;',
+'$wgISGroups = [ "sysop" ]',
+],
+}
+
+mediawiki::import::text { 'VagrantRoleInviteSignup':
+source => 
'puppet:///modules/role/invitesignup/VagrantRoleInviteSignup.wiki',
+}
+}

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: BSUserManager: Fixed RemoveGroups calculation

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

Change subject: BSUserManager: Fixed RemoveGroups calculation
..


BSUserManager: Fixed RemoveGroups calculation

* Replaced getEffectiveGroups() with getGroups()
=> Needs Cherry-Pick to REL1_23

Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
---
M UserManager/UserManager.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 2c98580..cb55c67 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -277,7 +277,7 @@
return Status::newFatal( 
'bs-usermanager-no-self-desysop' );
}
 
-   $aCurrentGroups = $oUser->getEffectiveGroups();
+   $aCurrentGroups = $oUser->getGroups();
$aSetGroups = array_diff( $aGroups, $aCurrentGroups );
$aRemoveGroups = array_diff( $aCurrentGroups, $aGroups );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: objectcache: Add changeTTL() method

2016-08-11 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: objectcache: Add changeTTL() method
..

objectcache: Add changeTTL() method

This can change the TTL without fetching the object
so that keys can be renewed or set to expire soon.

Change-Id: Id1c2c9f89b3445cfa34263057dc5029cbe170833
---
M includes/libs/objectcache/BagOStuff.php
M includes/libs/objectcache/MemcachedBagOStuff.php
M includes/libs/objectcache/MemcachedClient.php
M includes/objectcache/MemcachedPeclBagOStuff.php
M tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
5 files changed, 81 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/28/304428/1

diff --git a/includes/libs/objectcache/BagOStuff.php 
b/includes/libs/objectcache/BagOStuff.php
index 25a5a26..5472e83 100644
--- a/includes/libs/objectcache/BagOStuff.php
+++ b/includes/libs/objectcache/BagOStuff.php
@@ -373,6 +373,20 @@
}
 
/**
+* Reset the TTL on a key if it exists
+*
+* @param string $key
+* @param int $expiry
+* @return bool Success Returns false if there is no key
+* @since 1.28
+*/
+   public function changeTTL( $key, $expiry = 0 ) {
+   $value = $this->get( $key );
+
+   return ( $value === false ) ? false : $this->set( $key, $value, 
$expiry );
+   }
+
+   /**
 * Acquire an advisory lock on a key string
 *
 * Note that if reentry is enabled, duplicate calls ignore $expiry
diff --git a/includes/libs/objectcache/MemcachedBagOStuff.php 
b/includes/libs/objectcache/MemcachedBagOStuff.php
index ba8c736..5967441 100644
--- a/includes/libs/objectcache/MemcachedBagOStuff.php
+++ b/includes/libs/objectcache/MemcachedBagOStuff.php
@@ -79,6 +79,11 @@
return $this->mergeViaCas( $key, $callback, $exptime, $attempts 
);
}
 
+   public function changeTTL( $key, $exptime = 0 ) {
+   return $this->client->touch( $this->validateKeyEncoding( $key ),
+   $this->fixExpiry( $exptime ) );
+   }
+
/**
 * Get the underlying client object. This is provided for debugging
 * purposes.
diff --git a/includes/libs/objectcache/MemcachedClient.php 
b/includes/libs/objectcache/MemcachedClient.php
index 668135d..c3fcab9 100644
--- a/includes/libs/objectcache/MemcachedClient.php
+++ b/includes/libs/objectcache/MemcachedClient.php
@@ -361,6 +361,48 @@
}
 
/**
+* Changes the TTL on a key from the server to $time
+*
+* @param string $key Key
+* @param int $time TTL in seconds
+*
+* @return bool True on success, false on failure
+*/
+   public function touch( $key, $time = 0 ) {
+   if ( !$this->_active ) {
+   return false;
+   }
+
+   $sock = $this->get_sock( $key );
+   if ( !is_resource( $sock ) ) {
+   return false;
+   }
+
+   $key = is_array( $key ) ? $key[1] : $key;
+
+   if ( isset( $this->stats['touch'] ) ) {
+   $this->stats['touch']++;
+   } else {
+   $this->stats['touch'] = 1;
+   }
+   $cmd = "touch $key $time\r\n";
+   if ( !$this->_fwrite( $sock, $cmd ) ) {
+   return false;
+   }
+   $res = $this->_fgets( $sock );
+
+   if ( $this->_debug ) {
+   $this->_debugprint( sprintf( "MemCache: touch %s (%s)", 
$key, $res ) );
+   }
+
+   if ( $res == "TOUCHED" ) {
+   return true;
+   }
+
+   return false;
+   }
+
+   /**
 * @param string $key
 * @param int $timeout
 * @return bool
diff --git a/includes/objectcache/MemcachedPeclBagOStuff.php 
b/includes/objectcache/MemcachedPeclBagOStuff.php
index 090ace8..bb760bd 100644
--- a/includes/objectcache/MemcachedPeclBagOStuff.php
+++ b/includes/objectcache/MemcachedPeclBagOStuff.php
@@ -226,4 +226,10 @@
$result = $this->client->setMulti( $data, $this->fixExpiry( 
$exptime ) );
return $this->checkResult( false, $result );
}
+
+   public function changeTTL( $key, $expiry = 0 ) {
+   $this->debugLog( "touch($key)" );
+   $result = $this->client->touch( $key, $expiry );
+   return $this->checkResult( $key, $result );
+   }
 }
diff --git a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php 
b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
index a8beb91..92fb954 100644
--- a/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
+++ b/tests/phpunit/includes/libs/objectcache/BagOStuffTest.php
@@ -139,6 +139,20 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: Retire db2008 and db2009 as x1 nodes

2016-08-11 Thread Jcrespo (Code Review)
Jcrespo has submitted this change and it was merged.

Change subject: Retire db2008 and db2009 as x1 nodes
..


Retire db2008 and db2009 as x1 nodes

Bug: T125827
Change-Id: Id0fcce39379a327e85fd930cb1b692cc1f814edc
---
M manifests/site.pp
1 file changed, 1 insertion(+), 9 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index b55354d..01df94f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -691,7 +691,7 @@
 include base::firewall
 }
 
-node /^db10(29)\.eqiad\.wmnet/ {
+node 'db1029.eqiad.wmnet' {
 class { 'role::mariadb::core':
 shard => 'x1',
 binlog_format => 'ROW',
@@ -704,14 +704,6 @@
 class { 'role::mariadb::core':
 shard => 'x1',
 master=> true,
-binlog_format => 'ROW',
-}
-include base::firewall
-}
-
-node /^db20(08|09)\.codfw\.wmnet/ {
-class { 'role::mariadb::core':
-shard => 'x1',
 binlog_format => 'ROW',
 }
 include base::firewall

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[REL1_23]: BSUserManager: Fixed RemoveGroups calculation

2016-08-11 Thread Robert Vogel (Code Review)
Robert Vogel has uploaded a new change for review.

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

Change subject: BSUserManager: Fixed RemoveGroups calculation
..

BSUserManager: Fixed RemoveGroups calculation

* Replaced getEffectiveGroups() with getGroups()
=> Needs Cherry-Pick to REL1_23

Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
---
M UserManager/UserManager.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 2c98580..cb55c67 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -277,7 +277,7 @@
return Status::newFatal( 
'bs-usermanager-no-self-desysop' );
}
 
-   $aCurrentGroups = $oUser->getEffectiveGroups();
+   $aCurrentGroups = $oUser->getGroups();
$aSetGroups = array_diff( $aGroups, $aCurrentGroups );
$aRemoveGroups = array_diff( $aCurrentGroups, $aGroups );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cbb749b8271bbe12f90c1b156eff89205dad544
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_23
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Pwirth 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Move queue formatting out of OutputPage

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

Change subject: resourceloader: Move queue formatting out of OutputPage
..


resourceloader: Move queue formatting out of OutputPage

HTML formatting of the queue was distributed over several OutputPage methods.
Each method demanding a snippet of HTML by calling makeResourceLoaderLink()
with a limited amount of information. As such, makeResourceLoaderLink() was
unable to provide the client with the proper state information.

Centralising it also allows it to better reduce duplication in HTML output
and maintain a more accurate state.

Problems fixed by centralising:

1. The 'user' module is special (due to per-user 'version' and 'user' params).
   It is manually requested via script-src. To avoid a separate (and wrong)
   request from something that requires it, we set state=loading directly.
   However, because the module is in the bottom, the old HTML formatter could
   only put state=loading in the bottom also. This sometimes caused a wrong
   request to be fired for modules=user if something in the top queue
   triggered a requirement for it.

2. Since a464d1d4 (T87871) we track states of page-style modules, with purpose
   of allowing dependencies on style modules without risking duplicate loading
   on pages where the styles are loaded already. This didn't work, because the
   state information about page-style modules is output near the stylesheet,
   which is after the script tag with mw.loader.load(). That runs first, and
   mw.loader would still make a duplicate request before it learns the state.

Changes:

* Document reasons for style/script tag order in getHeadHtml (per 09537e83).

* Pass $type from getModuleStyles() to getAllowedModules(). This wasn't needed
  before since a duplicate check in makeResourceLoaderLink() verified the
  origin a second time.

* Declare explicit position 'top' on 'user.options' and 'user.tokens' module.
  Previously, OutputPage hardcoded them in the top. The new formatter doesn't.

* Remove getHeadScripts().
* Remove getInlineHeadScripts().
* Remove getExternalHeadScripts().
* Remove buildCssLinks().
* Remove getScriptsForBottomQueue().

* Change where Skin::setupSkinUserCss() is called. This methods lets the skin
  add modules to the queue. Previously it was called from buildCssLinks(),
  via headElement(), via prepareQuickTemplate(), via OutputPage::output().
  It's now in OutputPage::output() directly (slightly earlier). This is needed
  because prepareQuickTemplate() calls bottomScripts() before headElement().
  And bottomScript() would lazy-initialise the queue and lock it before
  setupSkinUserCss() is called from headElement().
  This makes execution order more predictable instead of being dependent on
  the arbitrary order of data extraction in prepareQuickTemplate (which varies
  from one skin to another).

* Compute isUserModulePreview() and isKnownEmpty() for the 'user' module early
  on so. This avoids wrongful loading and fixes problem 1.

Effective changes in output:

* mw.loader.state() is now before mw.loader.load(). This fixes problem 2.
* mw.loader.state() now sets 'user.options' and 'user.tokens' to "loading".
* mw.loader.state() now sets 'user' (as "loading" or "ready"). Fixes problem 1.

* The  tag for 'startup' changed position (slightly).
  Previously it was after all inline scripts and stylesheets. It's still after
  all inline scripts and after most stylesheets, but before any user styles.
  Since the queue is now formatted outside OutputPage, it can't inject the
  meta-ResourceLoaderDynamicStyles tag and user-stylesheet hack in the middle
  of existing output. This shouldn't have any noticable impact.

Bug: T87871
Change-Id: I605b8cd1e1fc009b4662a0edbc54d09dd65ee1df
---
M autoload.php
M docs/kss/Makefile
M includes/OutputPage.php
M includes/resourceloader/DerivativeResourceLoaderContext.php
M includes/resourceloader/ResourceLoader.php
A includes/resourceloader/ResourceLoaderClientHtml.php
M includes/resourceloader/ResourceLoaderContext.php
M includes/resourceloader/ResourceLoaderUserOptionsModule.php
M includes/resourceloader/ResourceLoaderUserTokensModule.php
M includes/specials/SpecialJavaScriptTest.php
M resources/src/startup.js
M tests/phpunit/ResourceLoaderTestCase.php
M tests/phpunit/includes/OutputPageTest.php
A tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
14 files changed, 1,018 insertions(+), 520 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 2587add..7d5b9fb 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1146,6 +1146,7 @@
'ResetUserTokens' => __DIR__ . '/maintenance/resetUserTokens.php',
'ResourceFileCache' => __DIR__ . 
'/includes/cache/ResourceFileCache.php',
'ResourceLoader' => __DIR__ . 
'/includes/res

[MediaWiki-commits] [Gerrit] mediawiki...MobileFrontend[master]: Hide edit and watch icons when JS disabled

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

Change subject: Hide edit and watch icons when JS disabled
..


Hide edit and watch icons when JS disabled

Rather than fight specificity rules it is acceptable
to use !important here as it is a leaf node and should
not be negotiable.

There is an open bug about removing styling via ids.

Bug: T142595
Change-Id: I8f407592a72d6855bbad8d976da8cf575feadc79
---
M resources/skins.minerva.base.styles/pageactions.less
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/resources/skins.minerva.base.styles/pageactions.less 
b/resources/skins.minerva.base.styles/pageactions.less
index 012a863..35b434c 100644
--- a/resources/skins.minerva.base.styles/pageactions.less
+++ b/resources/skins.minerva.base.styles/pageactions.less
@@ -7,7 +7,8 @@
 .client-nojs #ca-watch,
 .client-nojs #ca-edit,
 #ca-talk.selected {
-   display: none;
+   // Important as this is not negotiable.
+   display: none !important;
 }
 
 #page-actions .nojs-edit {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8f407592a72d6855bbad8d976da8cf575feadc79
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: changeprop: use one request for multiple models

2016-08-11 Thread Giuseppe Lavagetto (Code Review)
Giuseppe Lavagetto has submitted this change and it was merged.

Change subject: changeprop: use one request for multiple models
..


changeprop: use one request for multiple models

With the new version of ores live, it's much more efficient
Bug: T142360

Change-Id: I5bf1acab13fa372104e837a381fe972311b76a13
---
M modules/changeprop/templates/config.yaml.erb
1 file changed, 100 insertions(+), 36 deletions(-)

Approvals:
  Mobrovac: Looks good to me, but someone else must approve
  Giuseppe Lavagetto: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/changeprop/templates/config.yaml.erb 
b/modules/changeprop/templates/config.yaml.erb
index de19083..99f51aa 100644
--- a/modules/changeprop/templates/config.yaml.erb
+++ b/modules/changeprop/templates/config.yaml.erb
@@ -242,135 +242,199 @@
 domain: ar.wikipedia.org
   rev_by_bot: false
 exec:
-  uri: '<%= @ores_uri 
%>/v2/scores/arwiki/reverted/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/arwiki/'
+  query:
+models: 'reverted'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: cs.wikipedia.org
   rev_by_bot: false
 exec:
-  uri: '<%= @ores_uri 
%>/v2/scores/cswiki/reverted/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/cswiki/'
+  query:
+models: 'reverted'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: en.wikipedia.org
   rev_by_bot: false
 exec:
-  - uri: '<%= @ores_uri 
%>/v2/scores/enwiki/damaging/{{message.rev_id}}/?precache=true'
-  - uri: '<%= @ores_uri 
%>/v2/scores/enwiki/reverted/{{message.rev_id}}/?precache=true'
-  - uri: '<%= @ores_uri 
%>/v2/scores/enwiki/goodfaith/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/enwiki/'
+  query:
+models: 'reverted|damaging|goodfaith'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: en.wiktionary.org
   rev_by_bot: false
 exec:
-  uri: '<%= @ores_uri 
%>/v2/scores/enwiktionary/reverted/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/enwiktionary/'
+  query:
+models: 'reverted'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: es.wikipedia.org
   rev_by_bot: false
 exec:
-  uri: '<%= @ores_uri 
%>/v2/scores/eswiki/reverted/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/eswiki/'
+  query:
+models: 'reverted'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: et.wikipedia.org
   rev_by_bot: false
 exec:
-  uri: '<%= @ores_uri 
%>/v2/scores/etwiki/reverted/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/etwiki/'
+  query:
+models: 'reverted'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:
 domain: fa.wikipedia.org
   rev_by_bot: false
 exec:
-  - uri: '<%= @ores_uri 
%>/v2/scores/fawiki/damaging/{{message.rev_id}}/?precache=true'
-  - uri: '<%= @ores_uri 
%>/v2/scores/fawiki/reverted/{{message.rev_id}}/?precache=true'
-  - uri: '<%= @ores_uri 
%>/v2/scores/fawiki/goodfaith/{{message.rev_id}}/?precache=true'
+  uri: '<%= @ores_uri %>/v2/scores/fawiki/'
+  query:
+models: 'reverted|damaging|goodfaith'
+revids: '{{message.rev_id}}'
+precache: true
   - match:
   meta:

[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.14]: Revert "Allow self mentions"

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

Change subject: Revert "Allow self mentions"
..


Revert "Allow self mentions"

This reverts commit 0e234631853acdc9c9626ad82954762ac8806df0.

Change-Id: I4389c7b93b2bbc117931a263b58a8f1cc30dca6c
(cherry picked from commit 59568789fa695d2cff0577609aa6080fe4804208)
---
M i18n/en.json
M i18n/qqq.json
M includes/DiscussionParser.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/MentionPresentationModel.php
M tests/phpunit/DiscussionParserTest.php
6 files changed, 12 insertions(+), 31 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 658cd3d..1342f80 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -141,8 +141,6 @@
"notification-body-mention": "$1",
"notification-header-mention-other": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$3|you}} on $4 in \"$5\".",
"notification-header-mention-other-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on $4.",
-   "notification-header-mention-self": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2 in 
\"$3\".",
-   "notification-header-mention-self-nosection": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2.",
"notification-header-mention-user-talkpage-v2": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4 in \"$6\".",
"notification-header-mention-user-talkpage-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4.",
"notification-header-mention-agent-talkpage": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on 
{{GENDER:$2|his|her|their}} talk page in 
\"$4\".",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5a33cad..ec987ae 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -134,8 +134,6 @@
"notification-body-mention": "{{notranslate}}",
"notification-header-mention-other": "Header text for a notification 
when you are mentioned by another user in a section on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace).\n* $5 - name of the section they were 
mentioned in",
"notification-header-mention-other-nosection": "Header text for a 
notification when you are mentioned by another user on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace)",
-   "notification-header-mention-self": "Header text for a notification 
when you mention yourself in a section.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace).\n* $3 - name of the section 
they were mentioned in",
-   "notification-header-mention-self-nosection": "Header text for a 
notification when you mention yourself.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace)",
"notification-header-mention-user-talkpage-v2": "Header text for a 
notification when you are mentioned by another user in a section on a user talk 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the user viewing the notification, can be used 
for GENDER\n* $4 - formatted name of the user whose talk page you are mentioned 
in.\n* $5 - name of the user whose talk page you are mentioned in, can be used 
for GENDER\n* $6 - name of the section they were mentioned in",
"notification-header-mention-user-talkpage-nosection": "Header text for 
a notification when you are mentioned by another user on a user talk page.\n* 
$1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in 
GENDER.\n* $3 - name of the user viewing the notification, can be used for 
GENDER\n* $4 - name of the user whose talk page you are mentioned in\n* $5 - 
name of the user whose talk page you are mentioned in, can be used for GENDER",
"notification-header-mention-agent-talkpage": 
"{{doc-singularthey}}\nHeader text for a notification when you are mentioned by 
another user in a section on their talk page.\n* $1 - user's name (not suitable 
for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the section 
they were mentioned in",
diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index 5dc08a0..67f2fc1 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -1

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Deprecate various ResourceLoader modules

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

Change subject: Deprecate various ResourceLoader modules
..


Deprecate various ResourceLoader modules

Various modules in MediaWiki core replicate functionality elsewhere.
To improve consistency with how we build things and how things appear
in the frontend we need to guide engineers and gadget developers to use
the same libraries. No deprecation dates are given for these modules
but this is hoped to be the starting point for some good conversations
that will guide us to better frontend development

If a module depends on a deprecated module, it itself is not marked
as deprecated

Bug: T142418
Change-Id: Ibbfcfde64072e7d3e3ee5ecb7f966fd889259798
---
M resources/Resources.php
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 1558ee6..d3e58e1 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -333,6 +333,9 @@
'targets' => [ 'desktop', 'mobile' ],
],
'jquery.jStorage' => [
+   'deprecated' => [
+   'message' => 'Please use "mediawiki.storage" instead.',
+   ],
'scripts' => 'resources/lib/jquery/jquery.jStorage.js',
'dependencies' => 'json',
],
@@ -370,6 +373,7 @@
/* jQuery Tipsy */
 
'jquery.tipsy' => [
+   'deprecated' => true,
'scripts' => 'resources/src/jquery.tipsy/jquery.tipsy.js',
'styles' => 'resources/src/jquery.tipsy/jquery.tipsy.css',
],
@@ -377,6 +381,9 @@
/* jQuery UI */
 
'jquery.ui.core' => [
+   'deprecated' => [
+   'message' => 'Please use "mediawiki.ui.button" or 
"oojs-ui" instead.',
+   ],
'scripts' => 'resources/lib/jquery.ui/jquery.ui.core.js',
'dependencies' => [
'jquery.ui.core.styles',
@@ -655,11 +662,13 @@
'group' => 'jquery.ui',
],
'jquery.ui.widget' => [
+   'deprecated' => true,
'scripts' => 'resources/lib/jquery.ui/jquery.ui.widget.js',
'group' => 'jquery.ui',
],
// Effects
'jquery.effects.core' => [
+   'deprecated' => true,
'scripts' => 'resources/lib/jquery.ui/jquery.ui.effect.js',
'group' => 'jquery.ui',
],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbfcfde64072e7d3e3ee5ecb7f966fd889259798
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Trevor Parscal 
Gerrit-Reviewer: VolkerE 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.14]: Revert "Allow self mentions"

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

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

Change subject: Revert "Allow self mentions"
..

Revert "Allow self mentions"

This reverts commit 0e234631853acdc9c9626ad82954762ac8806df0.

Change-Id: I4389c7b93b2bbc117931a263b58a8f1cc30dca6c
(cherry picked from commit 59568789fa695d2cff0577609aa6080fe4804208)
---
M i18n/en.json
M i18n/qqq.json
M includes/DiscussionParser.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/MentionPresentationModel.php
M tests/phpunit/DiscussionParserTest.php
6 files changed, 12 insertions(+), 31 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index 658cd3d..1342f80 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -141,8 +141,6 @@
"notification-body-mention": "$1",
"notification-header-mention-other": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$3|you}} on $4 in \"$5\".",
"notification-header-mention-other-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on $4.",
-   "notification-header-mention-self": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2 in 
\"$3\".",
-   "notification-header-mention-self-nosection": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2.",
"notification-header-mention-user-talkpage-v2": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4 in \"$6\".",
"notification-header-mention-user-talkpage-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4.",
"notification-header-mention-agent-talkpage": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on 
{{GENDER:$2|his|her|their}} talk page in 
\"$4\".",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 5a33cad..ec987ae 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -134,8 +134,6 @@
"notification-body-mention": "{{notranslate}}",
"notification-header-mention-other": "Header text for a notification 
when you are mentioned by another user in a section on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace).\n* $5 - name of the section they were 
mentioned in",
"notification-header-mention-other-nosection": "Header text for a 
notification when you are mentioned by another user on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace)",
-   "notification-header-mention-self": "Header text for a notification 
when you mention yourself in a section.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace).\n* $3 - name of the section 
they were mentioned in",
-   "notification-header-mention-self-nosection": "Header text for a 
notification when you mention yourself.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace)",
"notification-header-mention-user-talkpage-v2": "Header text for a 
notification when you are mentioned by another user in a section on a user talk 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the user viewing the notification, can be used 
for GENDER\n* $4 - formatted name of the user whose talk page you are mentioned 
in.\n* $5 - name of the user whose talk page you are mentioned in, can be used 
for GENDER\n* $6 - name of the section they were mentioned in",
"notification-header-mention-user-talkpage-nosection": "Header text for 
a notification when you are mentioned by another user on a user talk page.\n* 
$1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in 
GENDER.\n* $3 - name of the user viewing the notification, can be used for 
GENDER\n* $4 - name of the user whose talk page you are mentioned in\n* $5 - 
name of the user whose talk page you are mentioned in, can be used for GENDER",
"notification-header-mention-agent-talkpage": 
"{{doc-singularthey}}\nHeader text for a notification when you are mentioned by 
another user in a section on their talk page.\n* $1 - user's name (not suitable 
for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the section 
they were mentioned in",
diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index 5dc08a0..67f2fc1 100644
--- a/includes/DiscussionP

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Allow self mentions"

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

Change subject: Revert "Allow self mentions"
..


Revert "Allow self mentions"

This reverts commit 0e234631853acdc9c9626ad82954762ac8806df0.

Change-Id: I4389c7b93b2bbc117931a263b58a8f1cc30dca6c
---
M i18n/en.json
M i18n/qqq.json
M includes/DiscussionParser.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/MentionPresentationModel.php
M tests/phpunit/DiscussionParserTest.php
6 files changed, 12 insertions(+), 31 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index d2c80f2..7dfce54 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -141,8 +141,6 @@
"notification-body-mention": "$1",
"notification-header-mention-other": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$3|you}} on $4 in \"$5\".",
"notification-header-mention-other-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on $4.",
-   "notification-header-mention-self": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2 in 
\"$3\".",
-   "notification-header-mention-self-nosection": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2.",
"notification-header-mention-user-talkpage-v2": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4 in \"$6\".",
"notification-header-mention-user-talkpage-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4.",
"notification-header-mention-agent-talkpage": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on 
{{GENDER:$2|his|her|their}} talk page in 
\"$4\".",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index dca53ad..2543aa4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -134,8 +134,6 @@
"notification-body-mention": "{{notranslate}}",
"notification-header-mention-other": "Header text for a notification 
when you are mentioned by another user in a section on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace).\n* $5 - name of the section they were 
mentioned in",
"notification-header-mention-other-nosection": "Header text for a 
notification when you are mentioned by another user on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace)",
-   "notification-header-mention-self": "Header text for a notification 
when you mention yourself in a section.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace).\n* $3 - name of the section 
they were mentioned in",
-   "notification-header-mention-self-nosection": "Header text for a 
notification when you mention yourself.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace)",
"notification-header-mention-user-talkpage-v2": "Header text for a 
notification when you are mentioned by another user in a section on a user talk 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the user viewing the notification, can be used 
for GENDER\n* $4 - formatted name of the user whose talk page you are mentioned 
in.\n* $5 - name of the user whose talk page you are mentioned in, can be used 
for GENDER\n* $6 - name of the section they were mentioned in",
"notification-header-mention-user-talkpage-nosection": "Header text for 
a notification when you are mentioned by another user on a user talk page.\n* 
$1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in 
GENDER.\n* $3 - name of the user viewing the notification, can be used for 
GENDER\n* $4 - name of the user whose talk page you are mentioned in\n* $5 - 
name of the user whose talk page you are mentioned in, can be used for GENDER",
"notification-header-mention-agent-talkpage": 
"{{doc-singularthey}}\nHeader text for a notification when you are mentioned by 
another user in a section on their talk page.\n* $1 - user's name (not suitable 
for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the section 
they were mentioned in",
diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index bf3d18f..880189a 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -146,7 +146,6 @@
return;
}

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Allow self mentions"

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

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

Change subject: Revert "Allow self mentions"
..

Revert "Allow self mentions"

This reverts commit 0e234631853acdc9c9626ad82954762ac8806df0.

Change-Id: I4389c7b93b2bbc117931a263b58a8f1cc30dca6c
---
M i18n/en.json
M i18n/qqq.json
M includes/DiscussionParser.php
M includes/formatters/EventPresentationModel.php
M includes/formatters/MentionPresentationModel.php
M tests/phpunit/DiscussionParserTest.php
6 files changed, 12 insertions(+), 31 deletions(-)


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

diff --git a/i18n/en.json b/i18n/en.json
index d2c80f2..7dfce54 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -141,8 +141,6 @@
"notification-body-mention": "$1",
"notification-header-mention-other": "$1 {{GENDER:$2|mentioned}} 
{{GENDER:$3|you}} on $4 in \"$5\".",
"notification-header-mention-other-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on $4.",
-   "notification-header-mention-self": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2 in 
\"$3\".",
-   "notification-header-mention-self-nosection": "{{GENDER:$1|You}} 
{{GENDER:$1|mentioned}} {{GENDER:$1|yourself}} on $2.",
"notification-header-mention-user-talkpage-v2": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4 in \"$6\".",
"notification-header-mention-user-talkpage-nosection": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on the user talk page 
{{GENDER:$5|of}} $4.",
"notification-header-mention-agent-talkpage": "$1 
{{GENDER:$2|mentioned}} {{GENDER:$3|you}} on 
{{GENDER:$2|his|her|their}} talk page in 
\"$4\".",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index dca53ad..2543aa4 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -134,8 +134,6 @@
"notification-body-mention": "{{notranslate}}",
"notification-header-mention-other": "Header text for a notification 
when you are mentioned by another user in a section on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace).\n* $5 - name of the section they were 
mentioned in",
"notification-header-mention-other-nosection": "Header text for a 
notification when you are mentioned by another user on a page that is not an 
article talk page or a user talk page.\n* $1 - user's name (not suitable for 
GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the page they 
were mentioned in (with namespace)",
-   "notification-header-mention-self": "Header text for a notification 
when you mention yourself in a section.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace).\n* $3 - name of the section 
they were mentioned in",
-   "notification-header-mention-self-nosection": "Header text for a 
notification when you mention yourself.\n* $1 - user's name.\n* $2 - name of 
the page they were mentioned in (with namespace)",
"notification-header-mention-user-talkpage-v2": "Header text for a 
notification when you are mentioned by another user in a section on a user talk 
page.\n* $1 - user's name (not suitable for GENDER).\n* $2 - user's name for 
use in GENDER.\n* $3 - name of the user viewing the notification, can be used 
for GENDER\n* $4 - formatted name of the user whose talk page you are mentioned 
in.\n* $5 - name of the user whose talk page you are mentioned in, can be used 
for GENDER\n* $6 - name of the section they were mentioned in",
"notification-header-mention-user-talkpage-nosection": "Header text for 
a notification when you are mentioned by another user on a user talk page.\n* 
$1 - user's name (not suitable for GENDER).\n* $2 - user's name for use in 
GENDER.\n* $3 - name of the user viewing the notification, can be used for 
GENDER\n* $4 - name of the user whose talk page you are mentioned in\n* $5 - 
name of the user whose talk page you are mentioned in, can be used for GENDER",
"notification-header-mention-agent-talkpage": 
"{{doc-singularthey}}\nHeader text for a notification when you are mentioned by 
another user in a section on their talk page.\n* $1 - user's name (not suitable 
for GENDER).\n* $2 - user's name for use in GENDER.\n* $3 - name of the user 
viewing the notification, can be used for GENDER\n* $4 - name of the section 
they were mentioned in",
diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index bf3d18f..880189a 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -146,7 +146,6 @@
   

[MediaWiki-commits] [Gerrit] operations/software[master]: Fixes and improvements for maintain-meta_p

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

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

Change subject: Fixes and improvements for maintain-meta_p
..

Fixes and improvements for maintain-meta_p

* Update dblists path
* Update for removal of visualeditor-default.dblist
* Update for PHP short array syntax when we process InitialiseSettings.php
* Change code used to contact wiki API endpoints so we're not caught by the
  uk.wikimedia.org -> wikimedia.org.uk external 301
* Add a dry run mode, default to on

Change-Id: Iacc13766871f5b77bf29346e0fa68c64b0c44f17
---
M maintain-replicas/maintain-meta_p.py
1 file changed, 99 insertions(+), 33 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/25/304425/1

diff --git a/maintain-replicas/maintain-meta_p.py 
b/maintain-replicas/maintain-meta_p.py
index b3b8998..40008e2 100644
--- a/maintain-replicas/maintain-meta_p.py
+++ b/maintain-replicas/maintain-meta_p.py
@@ -2,6 +2,7 @@
 # -*- coding: utf-8 -*-
 
 #  Based on work by Marc-André Pelletier, ported to Python by Alex Monk
+#  Copyright © 2016 Alex Monk 
 #  Copyright © 2015 Alex Monk 
 #  Copyright © 2013 Marc-André Pelletier 
 #
@@ -35,6 +36,7 @@
 ('labsdb1002.eqiad.wmnet', 3306),
 ('labsdb1003.eqiad.wmnet', 3306)
 ]
+DRY_RUN = True
 
 import codecs
 import collections
@@ -44,7 +46,6 @@
 import pymysql
 import re
 import subprocess
-import urllib
 import urllib.request
 
 config = ConfigParser()
@@ -54,9 +55,9 @@
 
 subprocess.call(["git", "pull"], cwd = "mediawiki-config")
 
-dbs = {db : {} for db in 
open('mediawiki-config/all.dblist').read().splitlines()}
+dbs = {db : {"has_visualeditor": True} for db in 
open('mediawiki-config/dblists/all.dblist').read().splitlines()}
 def read_list(listFname, prop, val):
-for db in open('mediawiki-config/' + listFname + 
'.dblist').read().splitlines():
+for db in open('mediawiki-config/dblists/' + listFname + 
'.dblist').read().splitlines():
 if db in dbs:
 dbs[db][prop] = val
 
@@ -68,7 +69,7 @@
 read_list("private", "private", True)
 read_list("special", "family", "special")
 read_list("flaggedrevs", "has_flaggedrevs", True)
-read_list("visualeditor-default", "has_visualeditor", True)
+read_list("visualeditor-nondefault", "has_visualeditor", False)
 read_list("wikidataclient", "has_wikidata", True)
 
 for slice in ['s1', 's2', 's3', 's4', 's5', 's6', 's7']: # TODO: silver
@@ -88,9 +89,9 @@
 inCanonConfig = False
 canonical = {}
 for line in 
open('mediawiki-config/wmf-config/InitialiseSettings.php').read().splitlines():
-if line == "'wgCanonicalServer' => array(":
+if line == "'wgCanonicalServer' => [":
 inCanonConfig = True
-elif inCanonConfig and line == "),":
+elif inCanonConfig and line == "],":
 inCanonConfig = False
 else:
 matches = re.match("^\s+'(.*)'\s+=>\s+'(.*)'\s*,\s*$", line)
@@ -103,6 +104,14 @@
 cached = json.load(cacheFile)
 except IOError as e:
 pass
+
+
+class RedirectFilter(urllib.request.HTTPRedirectHandler):
+def redirect_request(self, req, fp, code, msg, hdrs, newurl):
+return None # do not redirect, let it error so we can catch it
+
+opener = urllib.request.build_opener(RedirectFilter)
+opener.addheaders = [('User-agent', 'operations/software.git 
maintain-meta_p.py')]
 
 for db, dbInfo in dbs.items():
 if 'private' in dbInfo and dbInfo['private']:
@@ -126,28 +135,44 @@
 dbInfo['lang'] = cached[canon]['lang']
 dbInfo['name'] = cached[canon]['name']
 else:
+cached[canon] = {}
 logging.info("Querying " + canon + "...")
 try:
-req = urllib.request.Request(canon + 
"/w/api.php?action=query&meta=siteinfo&siprop=general&format=json")
-req.add_header("User-Agent", "operations/software.git 
maintain-meta_p.py")
+url = canon + 
"/w/api.php?action=query&meta=siteinfo&siprop=general&format=json"
 
-with urllib.request.urlopen(req) as response:
+with opener.open(url) as response:
 result = 
json.load(codecs.getreader("utf-8")(response))['query']
 cached[canon]['lang'] = dbInfo['lang'] = 
result['general']['lang']
 cached[canon]['name'] = dbInfo['name'] = 
result['general']['sitename']
 except Exception as e:
-logging.exception(e)
+if 'getcode' in dir(e) and e.getcode() == 301:
+# It tried to redirect us? Um.
+cached[canon]['lang'] = dbInfo['lang'] = None
+cached[canon]['name'] = dbInfo['name'] = None
+else:
+logging.exception(e)
 
 with open('wiki-cache.json', 'w') as cacheFile:
 json.dump(cached, cacheFile)
+
+insertion_query = """INSERT INTO meta_p.wiki
+(has_flaggedrevs, has_visualeditor

[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Add invitesignup role

2016-08-11 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Add invitesignup role
..

Add invitesignup role

Bug: T134885
Change-Id: I5a84971274677c9aebdafc06ba85f4795284a72f
---
A puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
A puppet/modules/role/manifests/invitesignup.pp
2 files changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/24/304424/1

diff --git 
a/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki 
b/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
new file mode 100644
index 000..afaf98b
--- /dev/null
+++ b/puppet/modules/role/files/invitesignup/VagrantRoleInviteSignup.wiki
@@ -0,0 +1,2 @@
+Use [[Special:InviteSignup]] to invite users. Mails will be sent to the 
vagrant user's postbox on the guest box.
+
diff --git a/puppet/modules/role/manifests/invitesignup.pp 
b/puppet/modules/role/manifests/invitesignup.pp
new file mode 100644
index 000..47a8bb6
--- /dev/null
+++ b/puppet/modules/role/manifests/invitesignup.pp
@@ -0,0 +1,20 @@
+# == Class: role::invitesignup
+# Provisions the InviteSignup[1] extension which allows
+# restricting account creation on a closed wiki to
+# invited users only.
+#
+# [1]: https://www.mediawiki.org/wiki/Extension:InviteSignup
+#
+class role::invitesignup {
+mediawiki::extension { 'InviteSignup':
+needs_update => true,
+settings => [
+'$wgGroupPermissions["sysop"]["invitesignup"] = true;',
+'$wgISGroups = [ "sysop" ]',
+],
+}
+
+mediawiki::import::text { 'VagrantRoleInviteSignup':
+source => 
'puppet:///modules/role/invitesignup/VagrantRoleInviteSignup.wiki',
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5a84971274677c9aebdafc06ba85f4795284a72f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set timezone to Europe/Ljubljana on sl. projects

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

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

Change subject: Set timezone to Europe/Ljubljana on sl. projects
..

Set timezone to Europe/Ljubljana on sl. projects

Currently, sl. projects use default UTC, or two CET/CEST timezones,
Europe/Berlin and Europe/Ljubljana.

The Slovene Wikisource community decided to witch to this timezone too.

This change so standardizes the use of Europe/Ljubljana for
all projects excepted on Slovene Wikibooks.

Bug: T142701
Change-Id: I10ee48257536cd8eba0ea572f68c48380b8469a2
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 936f2b4..ecf7be8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -412,8 +412,9 @@
'scnwiki' => 'Europe/Berlin',
'sewikimedia' => 'Europe/Berlin',
'shwiki' => 'Europe/Berlin',
-   'slwiki' => 'Europe/Berlin',
-   'slwikiquote' => 'Europe/Berlin',
+   'slwiki' => 'Europe/Ljubljana',
+   'slwikiquote' => 'Europe/Ljubljana',
+   'slwikisource' => 'Europe/Ljubljana', // T142701
'slwikiversity' => 'Europe/Ljubljana',
'sqwiki' => 'Europe/Berlin',
'sqwikinews' => 'Europe/Berlin',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10ee48257536cd8eba0ea572f68c48380b8469a2
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] maps...deploy[master]: Update kartotherian to d4a16a8

2016-08-11 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update kartotherian to d4a16a8
..


Update kartotherian to d4a16a8

List of changes:
xxx Update node module dependencies

Change-Id: Id4192ff607d5fd2a0d18db495c9d5046ba622de0
---
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/lib/sources.js
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
M node_modules/kartotherian-snapshot/node_modules/leaflet-headless/package.json
M node_modules/kartotherian-snapshot/node_modules/mwapi/package.json
M node_modules/kartotherian-snapshot/package.json
M node_modules/kartotherian-substantial/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
M node_modules/osm-bright-source/node_modules/postgis-vt-util/package.json
M node_modules/osm-bright-source/package.json
M node_modules/osm-bright-style/node_modules/osm-bright-fonts/package.json
M node_modules/osm-bright-style/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
A node_modules/tilelive-vector/node_modules/aws-sdk/.changes/2.4.14.json
A node_modules/tilelive-vector/node_modules/aws-sdk/.changes/2.5.0.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.min.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.paginators.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.waiters2.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/ecr-2015-09-21.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.waiters2.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancingv2-2015-12-01.min.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancingv2-2015-12-01.paginators.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/kinesisanalytics-2015-08-14.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/kms-2014-11-01.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/marketplacecommerceanalytics-2015-07-01.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/metadata.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/rds-2014-10-31.waiters2.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/snowball-2016-06-30.min.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/snowball-2016-06-30.paginators.json
M node_modules/tilelive-vector/node_modules/aws-sdk/dist/aws-sdk.js
M node_modules/tilelive-vector/node_modules/aws-sdk/dist/aws-sdk.min.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/core.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/region_config.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/services/s3.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/util.js
M node_modules/tilelive-vector/node_modules/aws-sdk/package.json
M node_modules/tilelive-vector/node_modules/s3urls/index.js
M node_modules/tilelive-vector/node_modules/s3urls/package.json
M node_modules/tilelive-vector/node_modules/s3urls/test/index.test.js
M 
node_modules/tilelive/node_modules/progress-stream/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json
52 files changed, 3,449 insertions(+), 442 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id4192ff607d5fd2a0d18db495c9d5046ba622de0
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] operations/dumps[master]: more pylint: no more filter, one more staticmethod decorator

2016-08-11 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: more pylint: no more filter, one more staticmethod decorator
..


more pylint: no more filter, one more staticmethod decorator

Change-Id: Iaeb66a2329ed27c5de63025d3e16747f68c6a829
---
M xmldumps-backup/dumps/xmljobs.py
M xmldumps-backup/generateincrementals.py
2 files changed, 6 insertions(+), 10 deletions(-)

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



diff --git a/xmldumps-backup/dumps/xmljobs.py b/xmldumps-backup/dumps/xmljobs.py
index 804db09..c5b60aa 100644
--- a/xmldumps-backup/dumps/xmljobs.py
+++ b/xmldumps-backup/dumps/xmljobs.py
@@ -647,7 +647,7 @@
  "--report=1000",
  "%s" % spawn])
 
-dump_command = filter(None, dump_command)
+dump_command = [entry for entry in dump_command if entry is not None]
 command = dump_command
 filters = self.build_filters(runner, output_file)
 eta = self.build_eta(runner)
diff --git a/xmldumps-backup/generateincrementals.py 
b/xmldumps-backup/generateincrementals.py
index b9593f0..cc06677 100644
--- a/xmldumps-backup/generateincrementals.py
+++ b/xmldumps-backup/generateincrementals.py
@@ -60,10 +60,9 @@
 
 class Link(object):
 
+@staticmethod
 def make_link(path, link_text):
 return '' + link_text + ""
-
-make_link = staticmethod(make_link)
 
 
 class Index(object):
@@ -160,14 +159,11 @@
 try:
 wikiname_text = "%s" % wiki
 
-wiki_info = (" ".join(filter(None,
- [wikiname_text,
-  lock_text, stat_text])) +
- "")
+wiki_info = (" ".join([entry for entry in [wikiname_text, 
lock_text, stat_text]
+   if entry is not None]) + "")
 wiki_info = (wiki_info + "    " +
- " |  ".join(filter(None,
-[stub_text, revs_text,
- other_runs_text])))
+ " |  ".join([entry for entry in [stub_text, 
revs_text, other_runs_text]
+  if entry is not None]))
 except:
 if self.verbose:
 traceback.print_exc(file=sys.stdout)

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

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

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to d4a16a8

2016-08-11 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to d4a16a8
..

Update kartotherian to d4a16a8

List of changes:
xxx Update node module dependencies

Change-Id: Id4192ff607d5fd2a0d18db495c9d5046ba622de0
---
M node_modules/kartotherian-autogen/package.json
M node_modules/kartotherian-cassandra/package.json
M node_modules/kartotherian-core/lib/sources.js
M node_modules/kartotherian-core/node_modules/xmldoc/package.json
M node_modules/kartotherian-core/package.json
M node_modules/kartotherian-demultiplexer/package.json
M node_modules/kartotherian-geoshapes/package.json
M node_modules/kartotherian-layermixer/package.json
M node_modules/kartotherian-maki/package.json
M node_modules/kartotherian-overzoom/package.json
M node_modules/kartotherian-server/package.json
M node_modules/kartotherian-snapshot/node_modules/abaculus/package.json
M node_modules/kartotherian-snapshot/node_modules/leaflet-headless/package.json
M node_modules/kartotherian-snapshot/node_modules/mwapi/package.json
M node_modules/kartotherian-snapshot/package.json
M node_modules/kartotherian-substantial/package.json
M 
node_modules/mapnik/node_modules/node-pre-gyp/node_modules/rimraf/node_modules/glob/node_modules/once/package.json
M node_modules/osm-bright-source/node_modules/postgis-vt-util/package.json
M node_modules/osm-bright-source/package.json
M node_modules/osm-bright-style/node_modules/osm-bright-fonts/package.json
M node_modules/osm-bright-style/package.json
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
A node_modules/tilelive-vector/node_modules/aws-sdk/.changes/2.4.14.json
A node_modules/tilelive-vector/node_modules/aws-sdk/.changes/2.5.0.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/autoscaling-2011-01-01.min.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.min.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.paginators.json
R 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/cloudfront-2016-08-01.waiters2.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/ecr-2015-09-21.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/ecs-2014-11-13.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancing-2012-06-01.waiters2.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancingv2-2015-12-01.min.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/elasticloadbalancingv2-2015-12-01.paginators.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/kinesisanalytics-2015-08-14.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/kms-2014-11-01.min.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/marketplacecommerceanalytics-2015-07-01.min.json
M node_modules/tilelive-vector/node_modules/aws-sdk/apis/metadata.json
M 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/rds-2014-10-31.waiters2.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/snowball-2016-06-30.min.json
A 
node_modules/tilelive-vector/node_modules/aws-sdk/apis/snowball-2016-06-30.paginators.json
M node_modules/tilelive-vector/node_modules/aws-sdk/dist/aws-sdk.js
M node_modules/tilelive-vector/node_modules/aws-sdk/dist/aws-sdk.min.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/core.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/region_config.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/services/s3.js
M node_modules/tilelive-vector/node_modules/aws-sdk/lib/util.js
M node_modules/tilelive-vector/node_modules/aws-sdk/package.json
M node_modules/tilelive-vector/node_modules/s3urls/index.js
M node_modules/tilelive-vector/node_modules/s3urls/package.json
M node_modules/tilelive-vector/node_modules/s3urls/test/index.test.js
M 
node_modules/tilelive/node_modules/progress-stream/node_modules/through2/node_modules/readable-stream/node_modules/inherits/package.json
52 files changed, 3,449 insertions(+), 442 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/maps/kartotherian/deploy 
refs/changes/22/304422/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id4192ff607d5fd2a0d18db495c9d5046ba622de0
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: removed maps1002 from targets

2016-08-11 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: removed maps1002 from targets
..


removed maps1002 from targets

Change-Id: I734a330c2a2640d5bf8be4c8429dd32225ff164d
---
M scap/targets
1 file changed, 0 insertions(+), 1 deletion(-)



diff --git a/scap/targets b/scap/targets
index f878a3e..21b65e2 100644
--- a/scap/targets
+++ b/scap/targets
@@ -1,5 +1,4 @@
 maps1001.eqiad.wmnet
-maps1002.eqiad.wmnet
 maps1003.eqiad.wmnet
 maps1004.eqiad.wmnet
 maps2001.codfw.wmnet

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I734a330c2a2640d5bf8be4c8429dd32225ff164d
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: removed maps1002 from targets

2016-08-11 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: removed maps1002 from targets
..

removed maps1002 from targets

Change-Id: I734a330c2a2640d5bf8be4c8429dd32225ff164d
---
M scap/targets
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/maps/kartotherian/deploy 
refs/changes/21/304421/1

diff --git a/scap/targets b/scap/targets
index f878a3e..21b65e2 100644
--- a/scap/targets
+++ b/scap/targets
@@ -1,5 +1,4 @@
 maps1001.eqiad.wmnet
-maps1002.eqiad.wmnet
 maps1003.eqiad.wmnet
 maps1004.eqiad.wmnet
 maps2001.codfw.wmnet

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I734a330c2a2640d5bf8be4c8429dd32225ff164d
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Merge branch 'master' into wmf_deploy

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

Change subject: Merge branch 'master' into wmf_deploy
..


Merge branch 'master' into wmf_deploy

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

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3717565c883e0b9e0c795be689e25ae10f8ed9a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: AndyRussG 
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...CentralNotice[wmf_deploy]: Merge branch 'master' into wmf_deploy

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

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

Change subject: Merge branch 'master' into wmf_deploy
..

Merge branch 'master' into wmf_deploy

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


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


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3717565c883e0b9e0c795be689e25ae10f8ed9a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: wmf_deploy
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[wmf/1.28.0-wmf.14]: Update VE core submodule to wmf/1.28.0-wmf.14 HEAD (da1f443c)

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

Change subject: Update VE core submodule to wmf/1.28.0-wmf.14 HEAD (da1f443c)
..


Update VE core submodule to wmf/1.28.0-wmf.14 HEAD (da1f443c)

New changes:
da1f443c Fix TextState#getChangeTransaction bug

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

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



diff --git a/lib/ve b/lib/ve
index 1216d23..da1f443 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit 1216d237229a0caaee66b589493565163f8e56b4
+Subproject commit da1f443cdeb5d669817c18d177fdce0855b367a5

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If49c91ca49c4361cdf35a8b51e1e011fcd98a18d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: wmf/1.28.0-wmf.14
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Forcibly reapply selection on insertion annotation change, t...

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

Change subject: Forcibly reapply selection on insertion annotation change, to 
move between unicorns
..


Forcibly reapply selection on insertion annotation change, to move between 
unicorns

Bug: T142754
Change-Id: Id740f2a40a825f1aa3113fe79507546682862b93
---
M src/ce/ve.ce.Surface.js
1 file changed, 15 insertions(+), 4 deletions(-)

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

Objections:
  Divec: There's a problem with this change, please improve



diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index f22fc36..3b960ca 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2563,7 +2563,7 @@
return;
}
// Must re-apply the selection after re-rendering
-   this.showModelSelection();
+   this.forceShowModelSelection();
this.surfaceObserver.pollOnceNoCallback();
 };
 
@@ -3261,12 +3261,23 @@
 };
 
 /**
- * Apply a DM selection to the DOM
+ * Apply a DM selection to the DOM, even if the old DOM selection is different 
but DM-equivalent
  *
  * @method
  * @return {boolean} Whether the selection actually changed
  */
-ve.ce.Surface.prototype.showModelSelection = function () {
+ve.ce.Surface.prototype.forceShowModelSelection = function () {
+   return this.showModelSelection( true );
+};
+
+/**
+ * Apply a DM selection to the DOM
+ *
+ * @method
+ * @param {boolean} [force] Replace the DOM selection if it is different but 
DM-equivalent
+ * @return {boolean} Whether the selection actually changed
+ */
+ve.ce.Surface.prototype.showModelSelection = function ( force ) {
var selection, changed, modelRange, impliedModelRange;
 
if ( this.deactivated ) {
@@ -3283,7 +3294,7 @@
return false;
}
modelRange = selection.getModel().getRange();
-   if ( this.documentView.documentNode.$element.get( 0 ).contains(
+   if ( !force && this.documentView.documentNode.$element.get( 0 
).contains(
this.nativeSelection.focusNode
) ) {
// See whether the model range implied by the DOM selection is 
already equal to

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id740f2a40a825f1aa3113fe79507546682862b93
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Divec 
Gerrit-Reviewer: DLynch 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.14]: Revert "Hack around browser bug in IE breaking badge alignme...

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

Change subject: Revert "Hack around browser bug in IE breaking badge alignment 
in Monobook"
..


Revert "Hack around browser bug in IE breaking badge alignment in Monobook"

Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.

This reverts commit 0b7f8712a9e9ac896dd7eb55b6b93d8845f21ce6.

Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 9c245c1..6247ee9 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -35,17 +35,4 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
-   position: relative;
-
-   // HACK for IE6-9 (T142053)
-   top: ~"-1em\9";
-}
-
-
-// HACK for IE10 and IE11 (T142053)
-@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
-   #p-personal #pt-notifications-alert,
-   #p-personal #pt-notifications-notice {
-   top: -1em;
-   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.14
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: AuthManager: Always whitelist some special pages

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

Change subject: AuthManager: Always whitelist some special pages
..


AuthManager: Always whitelist some special pages

Special:UserLogout should be whitelisted, if Special:UserLogin is whitelisted,
as otherwise the user is able to login, but not able to logout anymore (given,
that the sys-admin hasn't change the $wgWhitelistRead config variable).

Special:ChangePassword redirects to Special:ChangeCredentials. Instead of
adding this special page, it should be done explicitly in the
wiki configuration (LocalSettings.php). For this reason, the whitelist is
removed, too.

Change-Id: I271efb517bf0ec0022e6fe29673570ca08e8fe1a
---
M includes/Title.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Title.php b/includes/Title.php
index ea42768..ed445cc 100644
--- a/includes/Title.php
+++ b/includes/Title.php
@@ -2319,8 +2319,8 @@
# If the user is allowed to read pages, he is allowed 
to read all pages
$whitelisted = true;
} elseif ( $this->isSpecial( 'Userlogin' )
-   || $this->isSpecial( 'ChangePassword' )
|| $this->isSpecial( 'PasswordReset' )
+   || $this->isSpecial( 'Userlogout' )
) {
# Always grant access to the login page.
# Even anons need to be able to log in.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I271efb517bf0ec0022e6fe29673570ca08e8fe1a
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Gergő Tisza 
Gerrit-Reviewer: Hashar 
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...parsoid[master]: Trace time spent in SyncTTM & AsyncTTM machinery

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

Change subject: Trace time spent in SyncTTM & AsyncTTM machinery
..


Trace time spent in SyncTTM & AsyncTTM machinery

* Time spent in Sync TTM machinery is more or less completely
  captured.

* Time spent in Aysnc TTM machinery is only partially captured
  because there are lot of callbacks that makes it difficult to
  track down. Right now, time spent in transformTokens (and any
  associated code) is accounted for.

Change-Id: Ifa2757feaf8b028f56ed67fa95871123fe11da46
---
M lib/wt2html/TokenTransformManager.js
1 file changed, 31 insertions(+), 4 deletions(-)

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



diff --git a/lib/wt2html/TokenTransformManager.js 
b/lib/wt2html/TokenTransformManager.js
index 3671885..c1e476d 100644
--- a/lib/wt2html/TokenTransformManager.js
+++ b/lib/wt2html/TokenTransformManager.js
@@ -117,10 +117,13 @@
 // from holding onto more state than necessary.
 TokenTransformManager.prototype.timeTracer = function(transform, traceName) {
var env = this.env;
+   var self = this;
return function() {
var s = new Date();
var ret = transform.apply(null, arguments);
-   env.bumpTimeUse(traceName, (new Date()) - s);
+   var t = new Date() - s;
+   env.bumpTimeUse(traceName, t);
+   self.lastTokenTime = t;
return ret;
};
 };
@@ -150,7 +153,8 @@
  */
 TokenTransformManager.prototype.addTransform = function(transformation, 
debugName, rank, type, name) {
var traceFlags = this.env.conf.parsoid.traceFlags;
-   if (traceFlags && (traceFlags.indexOf("time") !== -1)) {
+   var traceTime = traceFlags && (traceFlags.indexOf("time") !== -1);
+   if (traceTime) {
transformation = this.timeTracer(transformation, debugName);
}
var t = {
@@ -542,11 +546,16 @@
  *   The tail TokenAccumulator, or else null
  */
 AsyncTokenTransformManager.prototype.transformTokens = function(tokens, 
parentCB) {
-
// Trivial case
if (tokens.length === 0) {
return { tokens: tokens, asyncAccum: null }; // jscs:ignore 
jsDoc
}
+
+   // Time tracing related state
+   var startTime = new Date();
+   var traceFlags = this.env.conf.parsoid.traceFlags;
+   var traceTime = traceFlags && traceFlags.indexOf('time') !== -1;
+   var tokenTimes = 0;
 
// New accumulator chain
var accumChain = new AccumChain(this, parentCB);
@@ -615,6 +624,9 @@
// with tokens or with an async signal.  In 
either case,
// state tokens will be populated.
transformer.transform(token, this.frame, 
accumChain.maybeAsyncCB);
+   if (traceTime) {
+   tokenTimes += this.lastTokenTime;
+   }
 
res = accumChain.state.res;
resTokens = res.tokens;
@@ -718,6 +730,10 @@
firstAccum
);
 
+   if (traceTime) {
+   this.env.bumpTimeUse("AsyncTTM (Partial)", (new Date() - 
startTime - tokenTimes));
+   }
+
// Return finished tokens directly to caller, and indicate if further
// async actions are outstanding. The caller needs to point a sibling to
// the returned accumulator, or call .siblingDone() to mark the end of a
@@ -739,7 +755,6 @@
  * @private
  */
 AsyncTokenTransformManager.prototype.maybeSyncReturn = function(s, cbs, ret) {
-
// Null ret.tokens is okay since ret could just be an async signal
ret = verifyTokensIntegrity(this.env, ret, true);
 
@@ -885,6 +900,12 @@
 
var localAccum = [];
 
+   // Time tracing related state
+   var startTime = new Date();
+   var tokenTimes = 0;
+   var traceFlags = this.env.conf.parsoid.traceFlags;
+   var traceTime = traceFlags && traceFlags.indexOf('time') !== -1;
+
// Stack of token arrays to process
// Initialize to the token array that was passed in
var workStack = [];
@@ -920,6 +941,9 @@
transformer = ts[j];
// Transform the token.
res = transformer.transform(token, this, 
this.prevToken);
+   if (traceTime) {
+   tokenTimes += this.lastTokenTime;
+   }
j++;
}
 
@@ -951,6 +975,9 @@
}
}
 
+   if (traceTime) {
+   this.env.bumpTimeUse("SyncTTM", (new Date() - startTime - 
tokenTimes));
+   }
localAccum.rank = this.phaseEndRank;
this.env.dp('SyncTokenTransformManager.onChunk: emitting ', localAccum);
this.emit

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove 'gather-hidelist' from CommonSettings.php

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

Change subject: Remove 'gather-hidelist' from CommonSettings.php
..


Remove 'gather-hidelist' from CommonSettings.php

The Gather extension has been removed from WMF wikis and so this right is
no longer needed.

Change-Id: I4d6dcca553a7a0cd082895b4d8d2e348b6ae3666
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index f20d4f6..ed3183c 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -648,9 +648,6 @@
 $wgAvailableRights[] = 'flow-delete';
 $wgAvailableRights[] = 'moodbar-admin'; // To allow global groups to include 
this right -AG
 
-// Enable gather-hidelist for global user groups - JRA 4-1-2015 T94652
-$wgAvailableRights[] = 'gather-hidelist';
-
 // Checkuser
 $wgGrantPermissions['checkuser']['checkuser'] = true;
 $wgGrantPermissions['checkuser']['checkuser-log'] = true;

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Raise httpd.maxWait from default of 5mins to actuall...

2016-08-11 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Gerrit: Raise httpd.maxWait from default of 5mins to actually 
be 5mins
..


Gerrit: Raise httpd.maxWait from default of 5mins to actually be 5mins

I'm pretty sure the default doesn't work and it's actually setting itself
to 30s which is far too low.

Silly gerrit :p

Change-Id: I65a5af49ea09c3e1217e4899f1286ad82a8eccd6
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ba7b75d..f828c3c 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -45,6 +45,7 @@
 maxQueued = 500
 minThreads = 10
 maxThreads = 60
+maxWait = 5 min
 [cache]
 directory = cache
 [cache "accounts_byname"]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I65a5af49ea09c3e1217e4899f1286ad82a8eccd6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chad 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to d4a16a8

2016-08-11 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Update kartotherian to d4a16a8
..

Update kartotherian to d4a16a8

List of changes:
d4a16a8 Switched cassandra to a var

Change-Id: I459a029e1fdeddf385ac19497a4fba3d53963d3b
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/maps/kartotherian/deploy 
refs/changes/19/304419/1

diff --git a/src b/src
index 469f49f..d4a16a8 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 469f49f5523c33cfe0f3e6a23aa32e27d70ec15d
+Subproject commit d4a16a8a948042d49f893965ea10ead6da88f30e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I459a029e1fdeddf385ac19497a4fba3d53963d3b
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 

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


[MediaWiki-commits] [Gerrit] maps...deploy[master]: Update kartotherian to d4a16a8

2016-08-11 Thread Yurik (Code Review)
Yurik has submitted this change and it was merged.

Change subject: Update kartotherian to d4a16a8
..


Update kartotherian to d4a16a8

List of changes:
d4a16a8 Switched cassandra to a var

Change-Id: I459a029e1fdeddf385ac19497a4fba3d53963d3b
---
M src
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src b/src
index 469f49f..d4a16a8 16
--- a/src
+++ b/src
@@ -1 +1 @@
-Subproject commit 469f49f5523c33cfe0f3e6a23aa32e27d70ec15d
+Subproject commit d4a16a8a948042d49f893965ea10ead6da88f30e

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I459a029e1fdeddf385ac19497a4fba3d53963d3b
Gerrit-PatchSet: 1
Gerrit-Project: maps/kartotherian/deploy
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Gerrit: Raise httpd.maxWait from default of 5mins to actuall...

2016-08-11 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: Gerrit: Raise httpd.maxWait from default of 5mins to actually 
be 5mins
..

Gerrit: Raise httpd.maxWait from default of 5mins to actually be 5mins

I'm pretty sure the default doesn't work and it's actually setting itself
to 30s which is far too low.

Silly gerrit :p

Change-Id: I65a5af49ea09c3e1217e4899f1286ad82a8eccd6
---
M modules/gerrit/templates/gerrit.config.erb
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/gerrit/templates/gerrit.config.erb 
b/modules/gerrit/templates/gerrit.config.erb
index ba7b75d..f828c3c 100644
--- a/modules/gerrit/templates/gerrit.config.erb
+++ b/modules/gerrit/templates/gerrit.config.erb
@@ -45,6 +45,7 @@
 maxQueued = 500
 minThreads = 10
 maxThreads = 60
+maxWait = 5 min
 [cache]
 directory = cache
 [cache "accounts_byname"]

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix typo () in Dutch message

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

Change subject: Fix typo () in Dutch message
..


Fix typo () in Dutch message

Change-Id: I41b2f75e41d0c2a772d03751e29f71818c2b6aaf
---
M i18n/nl.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/i18n/nl.json b/i18n/nl.json
index a0bf108..cd9e868 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -94,7 +94,7 @@
"echo-none": "U hebt geen meldingen.",
"echo-more-info": "Meer info",
"echo-feedback": "Terugkoppeling",
-   "echo-popup-footer-special-page-invitation": "Probeerde de 
herontworpen meldingenpagina. [$2 $1]",
+   "echo-popup-footer-special-page-invitation": "Probeerde de 
herontworpen meldingenpagina. [$2 $1]",
"echo-popup-footer-special-page-invitation-link": "Alle nieuwe looks en 
functies.",
"echo-api-failure": "Kan meldingen niet ophalen.",
"echo-api-failure-cross-wiki": "Toegang tot het externe domein is 
geweigerd.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I41b2f75e41d0c2a772d03751e29f71818c2b6aaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Catrope 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: UsageTracker: initial commit and reference implementation

2016-08-11 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: UsageTracker: initial commit and reference implementation
..

UsageTracker: initial commit and reference implementation

UsageTracker collects statistics about how often a certain feature
(based on tag, page property, database, etc) is used. As collecting
this information may be resource intense, all data collection is
deferred to jobQueue. There is also a maintenance script to add the
respective jobs. Extensions can register via the hook
BSUsageTrackerRegisterCollectors. See hooks.txt for an example.

Change-Id: I6aea22899ce0fed7d156ab9eb05ea1376d50b380
---
M Blog/Blog.class.php
M Blog/i18n/en.json
M BlueSpiceExtensions.default.php
A UsageTracker/UsageTracker.class.php
A UsageTracker/UsageTracker.setup.php
A UsageTracker/composer.json
A UsageTracker/db/mysql/UsageTracker.sql
A UsageTracker/doc/hooks.txt
A UsageTracker/extension.json
A UsageTracker/i18n/en.json
A UsageTracker/i18n/qqq.json
A UsageTracker/maintenance/usagetrackerUpdate.php
A UsageTracker/src/CollectorResult.php
A UsageTracker/src/README.md
A UsageTracker/src/collectors/BaseUsageCollector.php
A UsageTracker/src/collectors/DatabaseUsageCollector.php
A UsageTracker/src/collectors/PropertyUsageCollector.php
A UsageTracker/src/collectors/TagUsageCollector.php
A UsageTracker/src/jobs/UsageTrackerCollectJob.php
A UsageTracker/src/specials/SpecialUsageTracker.alias.php
A UsageTracker/src/specials/SpecialUsageTracker.php
A UsageTracker/vendor/autoload.php
A UsageTracker/vendor/composer/ClassLoader.php
A UsageTracker/vendor/composer/LICENSE
A UsageTracker/vendor/composer/autoload_classmap.php
A UsageTracker/vendor/composer/autoload_files.php
A UsageTracker/vendor/composer/autoload_namespaces.php
A UsageTracker/vendor/composer/autoload_psr4.php
A UsageTracker/vendor/composer/autoload_real.php
A UsageTracker/vendor/composer/autoload_static.php
30 files changed, 1,317 insertions(+), 1 deletion(-)


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

diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 33c2572..1087097 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -54,6 +54,7 @@
$this->setHook( 'BSTopMenuBarCustomizerRegisterNavigationSites' 
);
$this->setHook( 'PageContentSaveComplete' );
$this->setHook( 'ArticleDeleteComplete' );
+   $this->setHook( 'BSUsageTrackerRegisterCollectors' );
 
// Trackback is not fully functional in MW and thus disabled.
BsConfig::registerVar( 'MW::Blog::ShowTrackback', false, 
BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_BOOL );
@@ -426,6 +427,9 @@
if ( $aData !== false ) {
return $aData;
}
+
+   $parser->getOutput()->setProperty( 'bs:tag:blog', 1 );
+
// initialize local variables
$oErrorListView = new ViewTagErrorList( $this );
BsExtensionManager::setContext( 'MW::Blog::ShowBlog' );
@@ -873,4 +877,24 @@
return $set;
}
 
+   public function onBSUsageTrackerRegisterCollectors( &$aCollectorsConfig 
) {
+   $aCollectorsConfig['bs:blog'] = array(
+   'class' => 'PropertyUsageCollector',
+   'config' => array(
+   'identifier' => 'tag:bs:blog'
+   )
+   );
+   $aCollectorsConfig['bs:blog:new'] = array(
+   'class' => 'TagUsageCollector',
+   'config' => array(
+   'identifier' => 'bs:blog:new'
+   )
+   );
+   $aCollectorsConfig['bs:blog:more'] = array(
+   'class' => 'TagUsageCollector',
+   'config' => array(
+   'identifier' => 'bs:blog:more'
+   )
+   );
+   }
 }
diff --git a/Blog/i18n/en.json b/Blog/i18n/en.json
index 3a66fa2..6293b01 100644
--- a/Blog/i18n/en.json
+++ b/Blog/i18n/en.json
@@ -31,5 +31,6 @@
"bs-blog-tag-blog-desc": "Includes a weblog of article, discussion and 
file pages. Can be specified by various parameters. These can be combined in 
any order.",
"bs-blog-tag-blogmore-desc": "Defines length of teaser for blog post. 
Set within the post at the end of the intended teaser. As a result, the link 
\"{{int:bs-blog-read-more}}\" appears, which links to the whole blog article.",
"bs-blog-tag-blogtime-desc": "Inserts a self defined time stamp for 
display and sorting in blog posts. The format is MMDDHHmm.",
-   "bs-blog-tag-blogtime-err": "The format has to be MMDDHHmm i.e. for 
12. Jan. 2013 15:43 the timestamps looks like: 201301121543"
+   "bs-blog-tag-blogt

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Hack around browser bug in IE breaking badge alignme...

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

Change subject: Revert "Hack around browser bug in IE breaking badge alignment 
in Monobook"
..


Revert "Hack around browser bug in IE breaking badge alignment in Monobook"

Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.

This reverts commit 0b7f8712a9e9ac896dd7eb55b6b93d8845f21ce6.

Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 0 insertions(+), 13 deletions(-)

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



diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index ab5e3ef..f1aafb5 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -49,17 +49,4 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
-   position: relative;
-
-   // HACK for IE6-9 (T142053)
-   top: ~"-1em\9";
-}
-
-
-// HACK for IE10 and IE11 (T142053)
-@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
-   #p-personal #pt-notifications-alert,
-   #p-personal #pt-notifications-notice {
-   top: -1em;
-   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: UrlShortener: Whitelist *.wikidata.org

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

Change subject: UrlShortener: Whitelist *.wikidata.org
..


UrlShortener: Whitelist *.wikidata.org

Bug: T142055
Change-Id: I92f6772007cc1e16646f9b56ed3f646aacbc1e05
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 220ec75..f949a7d 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -126,7 +126,7 @@
'(.*\.)?wikiversity\.beta\.wmflabs\.org',
'(.*\.)?wikivoyage\.beta\.wmflabs\.org',
'(.*\.)?wikimedia\.beta\.wmflabs\.org',
-   'wikidata\.beta\.wmflabs\.org',
+   '(.*\.)?wikidata\.beta\.wmflabs\.org',
];
$wgUrlShortenerApprovedDomains = [
'*.wikipedia.beta.wmflabs.org',
@@ -138,7 +138,7 @@
'*.wikiversity.beta.wmflabs.org',
'*.wikivoyage.beta.wmflabs.org',
'*.wikimedia.beta.wmflabs.org',
-   'wikidata.beta.wmflabs.org',
+   '*.wikidata.beta.wmflabs.org',
];
 }
 
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d1ed051..f20d4f6 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -899,7 +899,7 @@
'(.*\.)?wikiversity\.org',
'(.*\.)?wikivoyage\.org',
'(.*\.)?wikimedia\.org',
-   'wikidata\.org',
+   '(.*\.)?wikidata\.org',
];
$wgUrlShortenerApprovedDomains = [
'*.wikipedia.org',
@@ -911,7 +911,7 @@
'*.wikiversity.org',
'*.wikivoyage.org',
'*.wikimedia.org',
-   'wikidata.org',
+   '*.wikidata.org',
];
$wgUrlShortenerReadOnly = true;
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I92f6772007cc1e16646f9b56ed3f646aacbc1e05
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
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] mediawiki...VisualEditor[master]: Centralize some checks for unmodified left clicks

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

Change subject: Centralize some checks for unmodified left clicks
..


Centralize some checks for unmodified left clicks

Change-Id: I59cee4da9bbca4c8a29eaf9d52cb00ab6e70b670
Depends-On: I4f164f7cf1d755c3662571b2a1a8371d9fe756f9
---
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
2 files changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 002ae5a..977d4fb 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -538,11 +538,7 @@
},
 
onEditTabClick: function ( e ) {
-   // Default mouse button is normalised by jQuery to key 
code 1.
-   // Only do our handling if no keys are pressed, mouse 
button is 1
-   // (e.g. not middle click or right click) and no 
modifier keys
-   // (e.g. cmd-click to open in new tab).
-   if ( ( e.which && e.which !== 1 ) || e.shiftKey || 
e.altKey || e.ctrlKey || e.metaKey ) {
+   if ( !ve.isUnmodifiedLeftClick( e ) ) {
return;
}
e.preventDefault();
@@ -598,7 +594,7 @@
 
onEditSectionLinkClick: function ( e ) {
var targetPromise;
-   if ( ( e.which && e.which !== 1 ) || e.shiftKey || 
e.altKey || e.ctrlKey || e.metaKey ) {
+   if ( !ve.isUnmodifiedLeftClick( e ) ) {
return;
}
 
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 570d577..f2c9bd2 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
@@ -851,7 +851,7 @@
  * @param {jQuery.Event} e Mouse click event
  */
 ve.init.mw.DesktopArticleTarget.prototype.onViewTabClick = function ( e ) {
-   if ( ( e.which && e.which !== 1 ) || e.shiftKey || e.altKey || 
e.ctrlKey || e.metaKey ) {
+   if ( !ve.isUnmodifiedLeftClick( e ) ) {
return;
}
this.deactivate( false, 'navigate-read' );
@@ -1068,7 +1068,7 @@
 
}
$( '#ca-viewsource, #ca-edit' ).on( 'click', function ( e ) {
-   if ( !target.active || e.which !== 1 || e.shiftKey || e.altKey 
|| e.ctrlKey || e.metaKey ) {
+   if ( !target.active || !ve.isUnmodifiedLeftClick( e ) ) {
return;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I59cee4da9bbca4c8a29eaf9d52cb00ab6e70b670
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: DLynch 
Gerrit-Reviewer: Divec 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.14]: Revert "Move CSS for patrol from mediawiki.legacy to new mod...

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

Change subject: Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"
..


Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"

This reverts commit e9f896d6a5c09838b92bcb871c306b25526c3f96.

Bug: T142750
Change-Id: Idb815d64d795d790ea2c07f2b5188ea5a46bfefb
---
M includes/diff/DifferenceEngine.php
M includes/page/Article.php
M includes/specials/SpecialNewpages.php
M resources/Resources.php
M resources/src/mediawiki.legacy/commonPrint.css
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.legacy/shared.css
D resources/src/mediawiki/page/mediawiki.page.patrol.css
D resources/src/mediawiki/page/mediawiki.page.patrol.print.css
9 files changed, 23 insertions(+), 27 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 4a6ac8e..baec396 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -555,7 +555,6 @@
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI
&& $user->isAllowed( 'writeapi' )
) {
diff --git a/includes/page/Article.php b/includes/page/Article.php
index f5a860e..6396aaa 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1196,7 +1196,6 @@
$token = $user->getEditToken( $rcid );
 
$outputPage->preventClickjacking();
-   $outputPage->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 
'writeapi' ) ) {
$outputPage->addModules( 'mediawiki.page.patrol.ajax' );
}
diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
index d2513ed..718a6dc 100644
--- a/includes/specials/SpecialNewpages.php
+++ b/includes/specials/SpecialNewpages.php
@@ -349,7 +349,6 @@
 
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
}
 
# Add a class for zero byte pages
diff --git a/resources/Resources.php b/resources/Resources.php
index 053c3f3..d210aab 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1707,14 +1707,6 @@
'position' => 'top',
'targets' => [ 'desktop', 'mobile' ],
],
-   'mediawiki.page.patrol' => [
-   'position' => 'top',
-   'styles' => [
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.css',
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.print.css'
-   => [ 'media' => 'print' ],
-   ]
-   ],
'mediawiki.page.patrol.ajax' => [
'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js',
'dependencies' => [
diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index 6a7c76a..d387a2d 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -19,6 +19,7 @@
 #footer-places,
 .mw-hidden-catlinks,
 .usermessage,
+.patrollink,
 .ns-0 .mw-redirectedfrom,
 div.magnify,
 #mw-navigation,
diff --git a/resources/src/mediawiki.legacy/oldshared.css 
b/resources/src/mediawiki.legacy/oldshared.css
index 786f53d..7ccf59e 100644
--- a/resources/src/mediawiki.legacy/oldshared.css
+++ b/resources/src/mediawiki.legacy/oldshared.css
@@ -289,6 +289,11 @@
font-style: italic;
 }
 
+span.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
 div.gallerybox {
width: 150px;
 }
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 38d2a27..de442e9 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -116,6 +116,23 @@
 }
 
 /**
+ * Patrol stuff
+ */
+.not-patrolled {
+   background-color: #ffa;
+}
+
+.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
+div.patrollink {
+   font-size: 75%;
+   text-align: right;
+}
+
+/**
  * Forms
  */
 td.mw-label {
diff --git a/resources/src/mediawiki/page/mediawiki.page.patrol.css 
b/resources/src/mediawiki/page/mediawiki.page.patrol.css
deleted file mode 100644
index f237dbd..000
--- a/resources/src/mediawiki/pa

[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Fix typo () in Dutch message

2016-08-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Fix typo () in Dutch message
..

Fix typo () in Dutch message

Change-Id: I41b2f75e41d0c2a772d03751e29f71818c2b6aaf
---
M i18n/nl.json
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/i18n/nl.json b/i18n/nl.json
index a0bf108..cd9e868 100644
--- a/i18n/nl.json
+++ b/i18n/nl.json
@@ -94,7 +94,7 @@
"echo-none": "U hebt geen meldingen.",
"echo-more-info": "Meer info",
"echo-feedback": "Terugkoppeling",
-   "echo-popup-footer-special-page-invitation": "Probeerde de 
herontworpen meldingenpagina. [$2 $1]",
+   "echo-popup-footer-special-page-invitation": "Probeerde de 
herontworpen meldingenpagina. [$2 $1]",
"echo-popup-footer-special-page-invitation-link": "Alle nieuwe looks en 
functies.",
"echo-api-failure": "Kan meldingen niet ophalen.",
"echo-api-failure-cross-wiki": "Toegang tot het externe domein is 
geweigerd.",

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[wmf/1.28.0-wmf.14]: Revert "Hack around browser bug in IE breaking badge alignme...

2016-08-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Revert "Hack around browser bug in IE breaking badge alignment 
in Monobook"
..

Revert "Hack around browser bug in IE breaking badge alignment in Monobook"

Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.

This reverts commit 0b7f8712a9e9ac896dd7eb55b6b93d8845f21ce6.

Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 0 insertions(+), 13 deletions(-)


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

diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index 9c245c1..6247ee9 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -35,17 +35,4 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
-   position: relative;
-
-   // HACK for IE6-9 (T142053)
-   top: ~"-1em\9";
-}
-
-
-// HACK for IE10 and IE11 (T142053)
-@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
-   #p-personal #pt-notifications-alert,
-   #p-personal #pt-notifications-notice {
-   top: -1em;
-   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: wmf/1.28.0-wmf.14
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] mediawiki...Echo[master]: Revert "Hack around browser bug in IE breaking badge alignme...

2016-08-11 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Revert "Hack around browser bug in IE breaking badge alignment 
in Monobook"
..

Revert "Hack around browser bug in IE breaking badge alignment in Monobook"

Seems to be fixed by different changes, and now this change
is causing trouble, moving the badges up off-screen.

This reverts commit 0b7f8712a9e9ac896dd7eb55b6b93d8845f21ce6.

Change-Id: Ia5a0a6b6be3698436a043aee111f251709c22f20
---
M modules/nojs/mw.echo.badge.monobook.less
1 file changed, 0 insertions(+), 13 deletions(-)


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

diff --git a/modules/nojs/mw.echo.badge.monobook.less 
b/modules/nojs/mw.echo.badge.monobook.less
index ab5e3ef..f1aafb5 100644
--- a/modules/nojs/mw.echo.badge.monobook.less
+++ b/modules/nojs/mw.echo.badge.monobook.less
@@ -49,17 +49,4 @@
 #p-personal #pt-notifications-alert,
 #p-personal #pt-notifications-notice {
display: inline-block;
-   position: relative;
-
-   // HACK for IE6-9 (T142053)
-   top: ~"-1em\9";
-}
-
-
-// HACK for IE10 and IE11 (T142053)
-@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
-   #p-personal #pt-notifications-alert,
-   #p-personal #pt-notifications-notice {
-   top: -1em;
-   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Define namespaces in extension.json

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

Change subject: Define namespaces in extension.json
..


Define namespaces in extension.json

Removes the global config variable $wgNoticeBannerNSID. CNBanner and 
CNBanner_talk
Namespace IDs are now set in extension.json to 866 and 867.

Change-Id: I6a2cf1d9d701356fe289f95426ab8e909b615888
---
M CentralNotice.hooks.php
M README
M extension.json
3 files changed, 24 insertions(+), 10 deletions(-)

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



diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 34c2b15..9682f3d 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -97,11 +97,18 @@
 */
public static function onCanonicalNamespaces( &$namespaces ) {
global $wgExtraNamespaces, $wgNamespacesWithSubpages, 
$wgTranslateMessageNamespaces;
-   global $wgNoticeUseTranslateExtension, $wgNoticeInfrastructure, 
$wgNoticeBannerNSID;
+   global $wgNoticeUseTranslateExtension, $wgNoticeInfrastructure;
 
+   // TODO XXX Old doc copied from legacy follows, verify accuracy!
+   // When using the group review feature of translate; this
+   // will be the namespace ID for the banner staging area -- ie: 
banners
+   // here are world editable and will not be moved to the MW 
namespace
+   // until they are in $wgNoticeTranslateDeployStates
+
+   // TODO This may be unnecessary. Must coordinate with 
extension.json
if ( !defined( 'NS_CN_BANNER' ) ) {
-   define( 'NS_CN_BANNER', $wgNoticeBannerNSID );
-   define( 'NS_CN_BANNER_TALK', $wgNoticeBannerNSID + 1 );
+   define( 'NS_CN_BANNER', 866 );
+   define( 'NS_CN_BANNER_TALK', 867 );
}
 
if ( $wgNoticeInfrastructure && $wgNoticeUseTranslateExtension 
) {
diff --git a/README b/README
index be3fa72..71b0ab4 100644
--- a/README
+++ b/README
@@ -123,12 +123,6 @@
   language (zh for zh-cn, for example) instead.
   Default: false
 
-* $wgNoticeBannerNSID: When using the group review feature of translate; this
-  will be the namespace ID for the banner staging area -- ie: banners here are
-  world editable and will not be moved to the MW namespace until they are in
-  $wgNoticeTranslateDeployStates
-  Default: 866
-
 * $wgNoticeProtectGroup: When a banner is protected; what group is assigned.
   This is used for banners in the CNBanner namespace to protect origin
   messages.
diff --git a/extension.json b/extension.json
index 0a13dfb..68fe432 100644
--- a/extension.json
+++ b/extension.json
@@ -15,6 +15,20 @@
"descriptionmsg": "centralnotice-desc",
"license-name": "GPL-2.0+",
"type": "other",
+   "namespaces": [
+   {
+   "id": 866,
+   "constant": "NS_CN_BANNER",
+   "name": "CNBanner",
+   "conditional": true
+   },
+   {
+   "id": 867,
+   "constant": "NS_CN_BANNER_TALK",
+   "name": "CNBanner_talk",
+   "conditional": true
+   }
+   ],
"callback": "CentralNoticeHooks::onRegistration",
"MessagesDirs": {
"CentralNotice": [
@@ -413,7 +427,6 @@
"NoticeBannerMaxAge": 600,
"NoticeUseTranslateExtension": false,
"NoticeUseLanguageConversion": false,
-   "NoticeBannerNSID": 866,
"NoticeProtectGroup": "sysop",
"NoticeTranslateDeployStates": [
"published"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6a2cf1d9d701356fe289f95426ab8e909b615888
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Ssmith 
Gerrit-Reviewer: XenoRyet 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Re-enable the Echo footer notice

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

Change subject: Re-enable the Echo footer notice
..


Re-enable the Echo footer notice

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ffbe1ba..936f2b4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -15687,7 +15687,7 @@
'nonglobal' => false,
 ],
 'wmgEchoShowFooterNotice' => [
-   'default' => false,
+   'default' => true,
 ],
 'wmgEchoFooterNoticeURL' => [
'default' => 
'https://wikimedia.qualtrics.com/SE/?SID=SV_eRMpgEPhVcUEkn3',

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

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

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


[MediaWiki-commits] [Gerrit] wikidata...gui[master]: [WIP] Polestar support

2016-08-11 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: [WIP] Polestar support
..

[WIP] Polestar support

TODO: make it not ugly and hacky

Change-Id: Ice2cda02f597c6a90dfccf8b1a14e153ae624a5a
---
M index.html
M style.css
M wikibase/queryService/ui/App.js
3 files changed, 33 insertions(+), 1 deletion(-)


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

diff --git a/index.html b/index.html
index ba40c7e..f265980 100644
--- a/index.html
+++ b/index.html
@@ -113,6 +113,9 @@


 Results in  ms   
+   
+   Graph 
it!
+   



@@ -168,6 +171,9 @@
Test result


+   
+   
+   
Test 
error

 
diff --git a/style.css b/style.css
index a662df7..da099ec 100644
--- a/style.css
+++ b/style.css
@@ -18,10 +18,23 @@
display: none;
 }
 
-#query-error, #query-error-short {
+#query-error, #query-error-short, #graph-button {
display: none;
 }
 
+#graph-frame {
+display: none;
+width: 100%;
+height: 800px;
+}
+
+#graph-iframe {
+width: 100%;
+height: 100%;
+border: none;
+margin: 0;
+}
+
 .error-line {
border-bottom: 2px dotted red;
 }
diff --git a/wikibase/queryService/ui/App.js b/wikibase/queryService/ui/App.js
index 2ee73f4..3d3f64e 100644
--- a/wikibase/queryService/ui/App.js
+++ b/wikibase/queryService/ui/App.js
@@ -12,6 +12,8 @@
'Query deadline is expired.': 'wdqs-action-timeout'
};
 
+   var POLESTAR = 'http://localhost:3000/';
+
/**
 * A ui application for the Wikibase query service
 *
@@ -401,6 +403,13 @@
 
this._initPopovers();
this._initHandlersDownloads();
+
+   $('#graph-button').click(function() {
+   $('#query-result').hide();
+   window.vguiData = self._sparqlApi.getResultAsJson();
+   $('#graph-iframe').attr('src', POLESTAR + "#" + 
window.vguiData);
+   $('#graph-frame').show();
+   });
};
 
/**
@@ -548,6 +557,9 @@
$( '.query-total' ).hide();
$( '#execute-button' ).prop( 'disabled', true );
$( '#query-error' ).hide();
+   $( '#graph-button' ).hide();
+   $( '#graph-frame' ).hide();
+   $( '#graph-iframe' ).attr('src', '');
 
this._sparqlApi.query( this._editor.getValue() ).done(
$.proxy( this._handleQueryResult, this ) 
).fail( function() {
@@ -587,6 +599,7 @@
$( '#query-time' ).text( api.getExecutionTime() );
$( '.query-total' ).show();
$( '#execute-button' ).prop( 'disabled', false );
+   $( '#graph-button' ).show();
 
var defaultBrowser = this._createResultBrowsers( 
api.getResultRawData() );
this._drawResult( defaultBrowser );

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Re-enable thank-you-edit notifications

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

Change subject: Re-enable thank-you-edit notifications
..


Re-enable thank-you-edit notifications

Bug: T128249
Change-Id: Ib14ef143f37774d13f4499f98bc272cbdba137a0
---
M wmf-config/CommonSettings.php
1 file changed, 0 insertions(+), 8 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 9ad11c2..d1ed051 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2755,14 +2755,6 @@
$wgEchoSharedTrackingCluster = 'extension1';
}
 
-   // Temporarily disable thank-you-edit notifications (T128249)
-   if ( isset( $wgDefaultNotifyTypeAvailability ) ) {
-   
$wgEchoNotifications['thank-you-edit']['notify-type-availability']['web'] = 
false;
-   } else {
-   // Backwards compatibility, remove after 1.27.0-wmf.22 is 
deployed everywhere
-   $wgEchoDefaultNotificationTypes['thank-you-edit']['web'] = 
false;
-   }
-
// Default user options: subscriptions
foreach ( $wmgEchoDefaultUserSubscriptions as $where => $notifications 
) {
foreach ( $notifications as $notification => $value ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Move CSS for patrol from mediawiki.legacy to new mod...

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

Change subject: Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"
..


Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"

This reverts commit e9f896d6a5c09838b92bcb871c306b25526c3f96.

Bug: T142750
Change-Id: Idb815d64d795d790ea2c07f2b5188ea5a46bfefb
---
M includes/diff/DifferenceEngine.php
M includes/page/Article.php
M includes/specials/SpecialNewpages.php
M resources/Resources.php
M resources/src/mediawiki.legacy/commonPrint.css
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.legacy/shared.css
D resources/src/mediawiki/page/mediawiki.page.patrol.css
D resources/src/mediawiki/page/mediawiki.page.patrol.print.css
9 files changed, 23 insertions(+), 27 deletions(-)

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



diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 89d2389..33955b2 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -533,7 +533,6 @@
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI
&& $user->isAllowed( 'writeapi' )
) {
diff --git a/includes/page/Article.php b/includes/page/Article.php
index f5a860e..6396aaa 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1196,7 +1196,6 @@
$token = $user->getEditToken( $rcid );
 
$outputPage->preventClickjacking();
-   $outputPage->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 
'writeapi' ) ) {
$outputPage->addModules( 'mediawiki.page.patrol.ajax' );
}
diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
index d2513ed..718a6dc 100644
--- a/includes/specials/SpecialNewpages.php
+++ b/includes/specials/SpecialNewpages.php
@@ -349,7 +349,6 @@
 
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
}
 
# Add a class for zero byte pages
diff --git a/resources/Resources.php b/resources/Resources.php
index 0d8d39f..5c60201 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1706,14 +1706,6 @@
'position' => 'top',
'targets' => [ 'desktop', 'mobile' ],
],
-   'mediawiki.page.patrol' => [
-   'position' => 'top',
-   'styles' => [
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.css',
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.print.css'
-   => [ 'media' => 'print' ],
-   ]
-   ],
'mediawiki.page.patrol.ajax' => [
'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js',
'dependencies' => [
diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index 6a7c76a..d387a2d 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -19,6 +19,7 @@
 #footer-places,
 .mw-hidden-catlinks,
 .usermessage,
+.patrollink,
 .ns-0 .mw-redirectedfrom,
 div.magnify,
 #mw-navigation,
diff --git a/resources/src/mediawiki.legacy/oldshared.css 
b/resources/src/mediawiki.legacy/oldshared.css
index 786f53d..7ccf59e 100644
--- a/resources/src/mediawiki.legacy/oldshared.css
+++ b/resources/src/mediawiki.legacy/oldshared.css
@@ -289,6 +289,11 @@
font-style: italic;
 }
 
+span.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
 div.gallerybox {
width: 150px;
 }
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index e9cbbcb..8fcc667 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -124,6 +124,23 @@
 }
 
 /**
+ * Patrol stuff
+ */
+.not-patrolled {
+   background-color: #ffa;
+}
+
+.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
+div.patrollink {
+   font-size: 75%;
+   text-align: right;
+}
+
+/**
  * Forms
  */
 td.mw-label {
diff --git a/resources/src/mediawiki/page/mediawiki.page.patrol.css 
b/resources/src/mediawiki/page/mediawiki.page.patrol.css
deleted file mode 100644
index f237dbd..000
--- a/resources/src/med

[MediaWiki-commits] [Gerrit] mediawiki/core[wmf/1.28.0-wmf.14]: Revert "Move CSS for patrol from mediawiki.legacy to new mod...

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

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

Change subject: Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"
..

Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"

This reverts commit e9f896d6a5c09838b92bcb871c306b25526c3f96.

Bug: T142750
Change-Id: Idb815d64d795d790ea2c07f2b5188ea5a46bfefb
---
M includes/diff/DifferenceEngine.php
M includes/page/Article.php
M includes/specials/SpecialNewpages.php
M resources/Resources.php
M resources/src/mediawiki.legacy/commonPrint.css
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.legacy/shared.css
D resources/src/mediawiki/page/mediawiki.page.patrol.css
D resources/src/mediawiki/page/mediawiki.page.patrol.print.css
9 files changed, 23 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/304412/1

diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 4a6ac8e..baec396 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -555,7 +555,6 @@
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI
&& $user->isAllowed( 'writeapi' )
) {
diff --git a/includes/page/Article.php b/includes/page/Article.php
index f5a860e..6396aaa 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1196,7 +1196,6 @@
$token = $user->getEditToken( $rcid );
 
$outputPage->preventClickjacking();
-   $outputPage->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 
'writeapi' ) ) {
$outputPage->addModules( 'mediawiki.page.patrol.ajax' );
}
diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
index d2513ed..718a6dc 100644
--- a/includes/specials/SpecialNewpages.php
+++ b/includes/specials/SpecialNewpages.php
@@ -349,7 +349,6 @@
 
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
}
 
# Add a class for zero byte pages
diff --git a/resources/Resources.php b/resources/Resources.php
index 053c3f3..d210aab 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1707,14 +1707,6 @@
'position' => 'top',
'targets' => [ 'desktop', 'mobile' ],
],
-   'mediawiki.page.patrol' => [
-   'position' => 'top',
-   'styles' => [
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.css',
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.print.css'
-   => [ 'media' => 'print' ],
-   ]
-   ],
'mediawiki.page.patrol.ajax' => [
'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js',
'dependencies' => [
diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index 6a7c76a..d387a2d 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -19,6 +19,7 @@
 #footer-places,
 .mw-hidden-catlinks,
 .usermessage,
+.patrollink,
 .ns-0 .mw-redirectedfrom,
 div.magnify,
 #mw-navigation,
diff --git a/resources/src/mediawiki.legacy/oldshared.css 
b/resources/src/mediawiki.legacy/oldshared.css
index 786f53d..7ccf59e 100644
--- a/resources/src/mediawiki.legacy/oldshared.css
+++ b/resources/src/mediawiki.legacy/oldshared.css
@@ -289,6 +289,11 @@
font-style: italic;
 }
 
+span.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
 div.gallerybox {
width: 150px;
 }
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index 38d2a27..de442e9 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -116,6 +116,23 @@
 }
 
 /**
+ * Patrol stuff
+ */
+.not-patrolled {
+   background-color: #ffa;
+}
+
+.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
+div.patrollink {
+   font-size: 75%;
+   text-align: right;
+}
+
+/**
  * Forms
  */
 td.mw-label {
diff --git a/resources/src/mediawiki/page/mediawiki.page.patrol.css 
b/resources/src/mediawiki/page/mediawiki.page.patrol.css
deleted file mode 100644
index 

[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_23]: Remove support for $wgWellFormedXml=false

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

Change subject: Remove support for $wgWellFormedXml=false
..


Remove support for $wgWellFormedXml=false

tl;dr: Having unnessary complexity in security critical code is bad.

* When PHP is built with certain versions of libpcre, can lead to XSS
* Extra options add extra complexity and maintenance burden
** Thus we should only have one html output mode. well formed = false
 was already vetoed in T52040, so lets go with WellFormed=true.
* Options which are used by very few people tend to get tested less
* Escaping is an area of code where we should be very conservative
* Having escaping rules depend on making assumptions about which
characters various browsers consider "whitespace" is scary
* $wgWellFormedXml=false has had a negative security impact in the
past (Usually not directly its fault, but has made other bugs
more exploitable)
* Saving a couple bytes (even less bytes after gzip taken into
account) is really not worth it in this context (imho).

Incidentally, this backports the removal of the space before the
closing '/>' of a self-closed tag from dd2d7d0ffc.

Bug: T57548
Change-Id: I5c922e0980d3f9eb39adb5bb5833e158afda42ed
---
M includes/DefaultSettings.php
M includes/Html.php
M tests/parser/parserTest.inc
M tests/parser/parserTests.txt
M tests/phpunit/includes/HtmlTest.php
M tests/phpunit/includes/LinkerTest.php
M tests/phpunit/includes/XmlSelectTest.php
M tests/phpunit/includes/XmlTest.php
M tests/phpunit/includes/parser/NewParserTest.php
9 files changed, 163 insertions(+), 284 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 8397166..b2d653a 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -2856,24 +2856,6 @@
 $wgAllowMicrodataAttributes = false;
 
 /**
- * Should we try to make our HTML output well-formed XML?  If set to false,
- * output will be a few bytes shorter, and the HTML will arguably be more
- * readable.  If set to true, life will be much easier for the authors of
- * screen-scraping bots, and the HTML will arguably be more readable.
- *
- * Setting this to false may omit quotation marks on some attributes, omit
- * slashes from some self-closing tags, omit some ending tags, etc., where
- * permitted by HTML5.  Setting it to true will not guarantee that all pages
- * will be well-formed, although non-well-formed pages should be rare and it's
- * a bug if you find one.  Conversely, setting it to false doesn't mean that
- * all XML-y constructs will be omitted, just that they might be.
- *
- * Because of compatibility with screen-scraping bots, and because it's
- * controversial, this is currently left to true by default.
- */
-$wgWellFormedXml = true;
-
-/**
  * Permit other namespaces in addition to the w3.org default.
  *
  * Use the prefix for the key and the namespace for the value.
diff --git a/includes/Html.php b/includes/Html.php
index ca0c76e..eac63ec 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -38,8 +38,6 @@
  *
  * $wgMimeType: If this is set to an xml mimetype then output should be
  * valid XHTML5.
- * $wgWellFormedXml: If this is set to true, then all output should be
- * well-formed XML (quotes on attributes, self-closing tags, etc.).
  *
  * This class is meant to be confined to utility functions that are called from
  * trusted code paths.  It does not do enforcement of policy like not allowing
@@ -110,8 +108,7 @@
 * This is quite similar to Xml::tags(), but it implements some useful
 * HTML-specific logic.  For instance, there is no $allowShortTag
 * parameter: the closing tag is magically omitted if $element has an 
empty
-* content model.  If $wgWellFormedXml is false, then a few bytes will 
be
-* shaved off the HTML output as well.
+* content model.
 *
 * @param string $element The element's name, e.g., 'a'
 * @param array $attribs  Associative array of attributes, e.g., array(
@@ -122,14 +119,10 @@
 * @return string Raw HTML
 */
public static function rawElement( $element, $attribs = array(), 
$contents = '' ) {
-   global $wgWellFormedXml;
$start = self::openElement( $element, $attribs );
if ( in_array( $element, self::$voidElements ) ) {
-   if ( $wgWellFormedXml ) {
-   // Silly XML.
-   return substr( $start, 0, -1 ) . ' />';
-   }
-   return $start;
+   // Silly XML.
+   return substr( $start, 0, -1 ) . '/>';
} else {
return "$start$contents" . self::closeElement( $element 
);
}
@@ -164,19 +157,10 @@

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Revert "Move CSS for patrol from mediawiki.legacy to new mod...

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

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

Change subject: Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"
..

Revert "Move CSS for patrol from mediawiki.legacy to new module 
mediawiki.page.patrol"

This reverts commit e9f896d6a5c09838b92bcb871c306b25526c3f96.

Bug: T142750
Change-Id: Idb815d64d795d790ea2c07f2b5188ea5a46bfefb
---
M includes/diff/DifferenceEngine.php
M includes/page/Article.php
M includes/specials/SpecialNewpages.php
M resources/Resources.php
M resources/src/mediawiki.legacy/commonPrint.css
M resources/src/mediawiki.legacy/oldshared.css
M resources/src/mediawiki.legacy/shared.css
D resources/src/mediawiki/page/mediawiki.page.patrol.css
D resources/src/mediawiki/page/mediawiki.page.patrol.print.css
9 files changed, 23 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/304411/1

diff --git a/includes/diff/DifferenceEngine.php 
b/includes/diff/DifferenceEngine.php
index 89d2389..33955b2 100644
--- a/includes/diff/DifferenceEngine.php
+++ b/includes/diff/DifferenceEngine.php
@@ -533,7 +533,6 @@
// Build the link
if ( $rcid ) {
$this->getOutput()->preventClickjacking();
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI
&& $user->isAllowed( 'writeapi' )
) {
diff --git a/includes/page/Article.php b/includes/page/Article.php
index f5a860e..6396aaa 100644
--- a/includes/page/Article.php
+++ b/includes/page/Article.php
@@ -1196,7 +1196,6 @@
$token = $user->getEditToken( $rcid );
 
$outputPage->preventClickjacking();
-   $outputPage->addModuleStyles( 'mediawiki.page.patrol' );
if ( $wgEnableAPI && $wgEnableWriteAPI && $user->isAllowed( 
'writeapi' ) ) {
$outputPage->addModules( 'mediawiki.page.patrol.ajax' );
}
diff --git a/includes/specials/SpecialNewpages.php 
b/includes/specials/SpecialNewpages.php
index d2513ed..718a6dc 100644
--- a/includes/specials/SpecialNewpages.php
+++ b/includes/specials/SpecialNewpages.php
@@ -349,7 +349,6 @@
 
if ( $this->patrollable( $result ) ) {
$classes[] = 'not-patrolled';
-   $this->getOutput()->addModuleStyles( 
'mediawiki.page.patrol' );
}
 
# Add a class for zero byte pages
diff --git a/resources/Resources.php b/resources/Resources.php
index 0d8d39f..5c60201 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1706,14 +1706,6 @@
'position' => 'top',
'targets' => [ 'desktop', 'mobile' ],
],
-   'mediawiki.page.patrol' => [
-   'position' => 'top',
-   'styles' => [
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.css',
-   
'resources/src/mediawiki/page/mediawiki.page.patrol.print.css'
-   => [ 'media' => 'print' ],
-   ]
-   ],
'mediawiki.page.patrol.ajax' => [
'scripts' => 'resources/src/mediawiki/page/patrol.ajax.js',
'dependencies' => [
diff --git a/resources/src/mediawiki.legacy/commonPrint.css 
b/resources/src/mediawiki.legacy/commonPrint.css
index 6a7c76a..d387a2d 100644
--- a/resources/src/mediawiki.legacy/commonPrint.css
+++ b/resources/src/mediawiki.legacy/commonPrint.css
@@ -19,6 +19,7 @@
 #footer-places,
 .mw-hidden-catlinks,
 .usermessage,
+.patrollink,
 .ns-0 .mw-redirectedfrom,
 div.magnify,
 #mw-navigation,
diff --git a/resources/src/mediawiki.legacy/oldshared.css 
b/resources/src/mediawiki.legacy/oldshared.css
index 786f53d..7ccf59e 100644
--- a/resources/src/mediawiki.legacy/oldshared.css
+++ b/resources/src/mediawiki.legacy/oldshared.css
@@ -289,6 +289,11 @@
font-style: italic;
 }
 
+span.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
 div.gallerybox {
width: 150px;
 }
diff --git a/resources/src/mediawiki.legacy/shared.css 
b/resources/src/mediawiki.legacy/shared.css
index e9cbbcb..8fcc667 100644
--- a/resources/src/mediawiki.legacy/shared.css
+++ b/resources/src/mediawiki.legacy/shared.css
@@ -124,6 +124,23 @@
 }
 
 /**
+ * Patrol stuff
+ */
+.not-patrolled {
+   background-color: #ffa;
+}
+
+.unpatrolled {
+   font-weight: bold;
+   color: #f00;
+}
+
+div.patrollink {
+   font-size: 75%;
+   text-align: right;
+}
+
+/**
  * Forms
  */
 td.mw-label {
diff --git a/resources/src/mediawiki/page/mediawiki.page.patrol.css 
b/resources/src/mediawiki/page/mediawiki.page.patrol.css
deleted file mode 100644
index 

[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: T138864: Deal with edge cases serializing links

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

Change subject: T138864: Deal with edge cases serializing links
..


T138864: Deal with edge cases serializing links

* Updated tests to capture new expectations.

Change-Id: I3f54ab56a1cfd96f35d46a3827bdab00554a0fa3
---
M lib/html2wt/LinkHandler.js
M tests/parserTests.txt
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/lib/html2wt/LinkHandler.js b/lib/html2wt/LinkHandler.js
index 71e3b43..e2454d2 100644
--- a/lib/html2wt/LinkHandler.js
+++ b/lib/html2wt/LinkHandler.js
@@ -305,7 +305,8 @@
// stripped when deriving the content string.
var strippedTargetValue = target.value.replace(/^:/, '');
var decodedTarget = Util.decodeEntities(strippedTargetValue);
-   var hrefHasProto = /^\w+:\/\//.test(linkData.href);
+   // Deal with the protocol-relative link scenario as well
+   var hrefHasProto = /^(\w+:)?\/\//.test(linkData.href);
 
// Normalize content string and decoded target before 
comparison.
// Piped links don't come down this path => it is safe to 
normalize both.
diff --git a/tests/parserTests.txt b/tests/parserTests.txt
index 2d76c6f..f5d24f7 100644
--- a/tests/parserTests.txt
+++ b/tests/parserTests.txt
@@ -25022,9 +25022,15 @@
 !! html/parsoid
 Foo
 Foo
+//en.wikipedia.org/wiki/Foo
+http://en.wikipedia.org/wiki/Foo";>http://en.wikipedia.org/wiki/Foo
+//en.wikipedia.org/wiki/Foo bar
 !! wikitext
 [[Foo]]
 [[Foo]]
+[[:en:Foo|//en.wikipedia.org/wiki/Foo]]
+[[wikipedia:Foo|http://en.wikipedia.org/wiki/Foo]]
+[[:en:Foo_bar|//en.wikipedia.org/wiki/Foo bar]]
 !! end
 
 !! test

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f54ab56a1cfd96f35d46a3827bdab00554a0fa3
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Tabs in feed.

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

Change subject: Tabs in feed.
..


Tabs in feed.

Placed a "tabs" icon in the toolbar of the feed, for convenient access to
the user's list of active tabs, by strong user demand.

Also update the icon of the Tabs button to be a "dynamic" icon based on
the number of tabs.

Bug: T142712
Change-Id: If55ed75d3a389d4d80128ea7ee347ace0009b36f
---
M app/src/main/java/org/wikipedia/MainActivity.java
M app/src/main/java/org/wikipedia/feed/FeedFragment.java
M app/src/main/java/org/wikipedia/overhaul/OverhaulFragment.java
M app/src/main/java/org/wikipedia/page/PageFragment.java
M app/src/main/java/org/wikipedia/page/tabs/TabsProvider.java
M app/src/main/java/org/wikipedia/util/ResourceUtil.java
A app/src/main/res/drawable/ic_tab_list_1.xml
A app/src/main/res/drawable/ic_tab_list_2.xml
A app/src/main/res/drawable/ic_tab_list_3.xml
A app/src/main/res/drawable/ic_tab_list_4.xml
A app/src/main/res/drawable/ic_tab_list_5.xml
A app/src/main/res/drawable/ic_tab_list_6.xml
A app/src/main/res/drawable/ic_tab_list_7.xml
A app/src/main/res/drawable/ic_tab_list_8.xml
A app/src/main/res/drawable/ic_tab_list_9.xml
A app/src/main/res/drawable/ic_tab_list_9_plus.xml
M app/src/main/res/menu/menu_feed.xml
M app/src/main/res/menu/menu_page_actions.xml
18 files changed, 207 insertions(+), 19 deletions(-)

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



diff --git a/app/src/main/java/org/wikipedia/MainActivity.java 
b/app/src/main/java/org/wikipedia/MainActivity.java
index 889160e..b6c691d 100644
--- a/app/src/main/java/org/wikipedia/MainActivity.java
+++ b/app/src/main/java/org/wikipedia/MainActivity.java
@@ -768,6 +768,23 @@
 loadPage(title, historyEntry, position, allowStateLoss, mustBeEmpty);
 }
 
+@TargetApi(17)
+private void showTabList() {
+if (isDestroyed()) {
+return;
+}
+pushFragment(new PageFragment());
+fragmentContainerView.post(new Runnable() {
+@Override
+public void run() {
+PageFragment frag = getCurPageFragment();
+if (frag != null) {
+frag.showTabList();
+}
+}
+});
+}
+
 public void showLinkPreview(PageTitle title, int entrySource) {
 showLinkPreview(title, entrySource, null);
 }
@@ -850,15 +867,17 @@
 && ((BackPressedHandler) getTopFragment()).onBackPressed()) {
 return;
 }
-if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
-beforeFragmentChanged();
-getSupportFragmentManager().popBackStackImmediate();
-afterFragmentChanged();
-if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
-return;
-}
-}
-finish();
+popFragment();
+}
+
+@Override
+public void onPagePopFragment() {
+popFragment();
+}
+
+@Override
+public void onFeedTabListRequested() {
+showTabList();
 }
 
 @Override
@@ -1104,6 +1123,18 @@
 return this;
 }
 
+private void popFragment() {
+if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
+beforeFragmentChanged();
+getSupportFragmentManager().popBackStackImmediate();
+afterFragmentChanged();
+if (getSupportFragmentManager().getBackStackEntryCount() > 0) {
+return;
+}
+}
+finish();
+}
+
 private void download(@NonNull FeaturedImage image) {
 setPendingDownload(null);
 new MediaDownloadReceiver(MainActivity.this).download(image);
diff --git a/app/src/main/java/org/wikipedia/feed/FeedFragment.java 
b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
index 12c3257..228bd21 100644
--- a/app/src/main/java/org/wikipedia/feed/FeedFragment.java
+++ b/app/src/main/java/org/wikipedia/feed/FeedFragment.java
@@ -34,6 +34,7 @@
 import org.wikipedia.settings.Prefs;
 import org.wikipedia.util.DimenUtil;
 import org.wikipedia.util.FeedbackUtil;
+import org.wikipedia.util.ResourceUtil;
 
 import java.util.List;
 
@@ -57,6 +58,7 @@
 private boolean searchIconVisible;
 
 public interface Callback {
+void onFeedTabListRequested();
 void onFeedSearchRequested();
 void onFeedVoiceSearchRequested();
 void onFeedSelectPage(HistoryEntry entry);
@@ -141,8 +143,20 @@
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
 menu.clear();
-if (searchIconVisible) {
-inflater.inflate(R.menu.menu_feed, menu);
+inflater.inflate(R.menu.menu_feed, menu);
+}
+
+@Override
+public void onPrepareOptionsMenu(Menu menu) {
+MenuItem searchItem = menu.findItem(R.id.menu_feed_search);
+MenuItem tabsItem = menu.fi

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[master]: Define namespaces in extension.json

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

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

Change subject: Define namespaces in extension.json
..

Define namespaces in extension.json

Removes the global config variable $wgNoticeBannerNSID. CNBanner and 
CNBanner_talk
Namespace IDs are now set in extension.json to 866 and 867.

Change-Id: I6a2cf1d9d701356fe289f95426ab8e909b615888
---
M CentralNotice.hooks.php
M README
M extension.json
3 files changed, 24 insertions(+), 10 deletions(-)


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

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 34c2b15..9682f3d 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -97,11 +97,18 @@
 */
public static function onCanonicalNamespaces( &$namespaces ) {
global $wgExtraNamespaces, $wgNamespacesWithSubpages, 
$wgTranslateMessageNamespaces;
-   global $wgNoticeUseTranslateExtension, $wgNoticeInfrastructure, 
$wgNoticeBannerNSID;
+   global $wgNoticeUseTranslateExtension, $wgNoticeInfrastructure;
 
+   // TODO XXX Old doc copied from legacy follows, verify accuracy!
+   // When using the group review feature of translate; this
+   // will be the namespace ID for the banner staging area -- ie: 
banners
+   // here are world editable and will not be moved to the MW 
namespace
+   // until they are in $wgNoticeTranslateDeployStates
+
+   // TODO This may be unnecessary. Must coordinate with 
extension.json
if ( !defined( 'NS_CN_BANNER' ) ) {
-   define( 'NS_CN_BANNER', $wgNoticeBannerNSID );
-   define( 'NS_CN_BANNER_TALK', $wgNoticeBannerNSID + 1 );
+   define( 'NS_CN_BANNER', 866 );
+   define( 'NS_CN_BANNER_TALK', 867 );
}
 
if ( $wgNoticeInfrastructure && $wgNoticeUseTranslateExtension 
) {
diff --git a/README b/README
index be3fa72..71b0ab4 100644
--- a/README
+++ b/README
@@ -123,12 +123,6 @@
   language (zh for zh-cn, for example) instead.
   Default: false
 
-* $wgNoticeBannerNSID: When using the group review feature of translate; this
-  will be the namespace ID for the banner staging area -- ie: banners here are
-  world editable and will not be moved to the MW namespace until they are in
-  $wgNoticeTranslateDeployStates
-  Default: 866
-
 * $wgNoticeProtectGroup: When a banner is protected; what group is assigned.
   This is used for banners in the CNBanner namespace to protect origin
   messages.
diff --git a/extension.json b/extension.json
index 0a13dfb..68fe432 100644
--- a/extension.json
+++ b/extension.json
@@ -15,6 +15,20 @@
"descriptionmsg": "centralnotice-desc",
"license-name": "GPL-2.0+",
"type": "other",
+   "namespaces": [
+   {
+   "id": 866,
+   "constant": "NS_CN_BANNER",
+   "name": "CNBanner",
+   "conditional": true
+   },
+   {
+   "id": 867,
+   "constant": "NS_CN_BANNER_TALK",
+   "name": "CNBanner_talk",
+   "conditional": true
+   }
+   ],
"callback": "CentralNoticeHooks::onRegistration",
"MessagesDirs": {
"CentralNotice": [
@@ -413,7 +427,6 @@
"NoticeBannerMaxAge": 600,
"NoticeUseTranslateExtension": false,
"NoticeUseLanguageConversion": false,
-   "NoticeBannerNSID": 866,
"NoticeProtectGroup": "sysop",
"NoticeTranslateDeployStates": [
"published"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6a2cf1d9d701356fe289f95426ab8e909b615888
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: AndyRussG 

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


[MediaWiki-commits] [Gerrit] oojs/ui[master]: Add `fieldset` tag to FieldsetLayout

2016-08-11 Thread VolkerE (Code Review)
VolkerE has uploaded a new change for review.

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

Change subject: Add `fieldset` tag to FieldsetLayout
..

Add `fieldset` tag to FieldsetLayout

Change-Id: Ie4655eedf9548199a8e7bb87fbac9df770d5beac
---
M php/layouts/FieldsetLayout.php
M src/layouts/FieldsetLayout.js
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/09/304409/1

diff --git a/php/layouts/FieldsetLayout.php b/php/layouts/FieldsetLayout.php
index 43e7745..bb29a38 100644
--- a/php/layouts/FieldsetLayout.php
+++ b/php/layouts/FieldsetLayout.php
@@ -12,6 +12,10 @@
use LabelElement;
use GroupElement;
 
+   /* Static Properties */
+
+   public static $tagName = 'fieldset';
+
/**
 * @param array $config Configuration options
 * @param FieldLayout[] $config['items'] Items to add
diff --git a/src/layouts/FieldsetLayout.js b/src/layouts/FieldsetLayout.js
index d3f16ac..661a9c3 100644
--- a/src/layouts/FieldsetLayout.js
+++ b/src/layouts/FieldsetLayout.js
@@ -84,3 +84,7 @@
 OO.mixinClass( OO.ui.FieldsetLayout, OO.ui.mixin.IconElement );
 OO.mixinClass( OO.ui.FieldsetLayout, OO.ui.mixin.LabelElement );
 OO.mixinClass( OO.ui.FieldsetLayout, OO.ui.mixin.GroupElement );
+
+/* Static Properties */
+
+OO.ui.FieldsetLayout.static.tagName = 'fieldset';

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: reclaim WMF4724 to spares

2016-08-11 Thread RobH (Code Review)
RobH has submitted this change and it was merged.

Change subject: reclaim WMF4724 to spares
..


reclaim WMF4724 to spares

removed its production dns entry, left mgmt intact

T142412

Change-Id: I5b2d7c1ceb56e5a04aae55d1177e2378e2d31155
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index ae4ca52..7ebf6fe 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -935,7 +935,7 @@
 19  1H IN PTR   labstore1004.eqiad.wmnet.
 20  1H IN PTR   labstore1005.eqiad.wmnet.
 21  1H IN PTR   relforge1002.eqiad.wmnet.
-22  1H IN PTR   WMF4724.eqiad.wmnet.
+
 23  1H IN PTR   labsdb1010.eqiad.wmnet.
 24  1H IN PTR   labsdb1011.eqiad.wmnet.
 
diff --git a/templates/wmnet b/templates/wmnet
index d4c6fcd..4784606 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -843,7 +843,6 @@
 labvirt1014 1H  IN A10.64.20.30
 wdqs10011H  IN A10.64.48.112
 wdqs10021H  IN A10.64.32.183
-WMF4724 1H  IN A10.64.37.22
 wtp1001 1H  IN A10.64.32.78
 wtp1002 1H  IN A10.64.32.73
 wtp1003 1H  IN A10.64.32.74

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

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

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


[MediaWiki-commits] [Gerrit] operations/dns[master]: reclaim WMF4724 to spares

2016-08-11 Thread RobH (Code Review)
RobH has uploaded a new change for review.

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

Change subject: reclaim WMF4724 to spares
..

reclaim WMF4724 to spares

removed its production dns entry, left mgmt intact

T142412

Change-Id: I5b2d7c1ceb56e5a04aae55d1177e2378e2d31155
---
M templates/10.in-addr.arpa
M templates/wmnet
2 files changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/08/304408/1

diff --git a/templates/10.in-addr.arpa b/templates/10.in-addr.arpa
index ae4ca52..7ebf6fe 100644
--- a/templates/10.in-addr.arpa
+++ b/templates/10.in-addr.arpa
@@ -935,7 +935,7 @@
 19  1H IN PTR   labstore1004.eqiad.wmnet.
 20  1H IN PTR   labstore1005.eqiad.wmnet.
 21  1H IN PTR   relforge1002.eqiad.wmnet.
-22  1H IN PTR   WMF4724.eqiad.wmnet.
+
 23  1H IN PTR   labsdb1010.eqiad.wmnet.
 24  1H IN PTR   labsdb1011.eqiad.wmnet.
 
diff --git a/templates/wmnet b/templates/wmnet
index d4c6fcd..4784606 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -843,7 +843,6 @@
 labvirt1014 1H  IN A10.64.20.30
 wdqs10011H  IN A10.64.48.112
 wdqs10021H  IN A10.64.32.183
-WMF4724 1H  IN A10.64.37.22
 wtp1001 1H  IN A10.64.32.78
 wtp1002 1H  IN A10.64.32.73
 wtp1003 1H  IN A10.64.32.74

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b2d7c1ceb56e5a04aae55d1177e2378e2d31155
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: RobH 

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


  1   2   3   4   >