[MediaWiki-commits] [Gerrit] Add error id and manual reporting to mw.errorLogging - change (mediawiki/core)

2015-03-25 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Add error id and manual reporting to mw.errorLogging
..

Add error id and manual reporting to mw.errorLogging

Adds an id property to events fired by mw.errorLogging. The id can
be communicated to the user and it can be used to identify which error
logs are related to a report.

Also adds mw.errorLogging.logError which can be used to manually
report errors which have been handled by the application.

Id generation is a naive UUID algorithm. This might need to be
rethought later when scaling up the error reporting service to
high traffic levels: if the server does not have the throughput
or storage to keep every id, the id needs to be the same for
the same error, such as a hash of the stack trace. We'll cross
that bridge when we get there.

Bug: T89384
Change-Id: Ic6defcd3206a2155c3d1d3ecf6bab287a1e73cd5
---
M resources/src/mediawiki/mediawiki.errorLogging.js
M tests/qunit/suites/resources/mediawiki/mediawiki.errorLogging.test.js
2 files changed, 82 insertions(+), 3 deletions(-)


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

diff --git a/resources/src/mediawiki/mediawiki.errorLogging.js 
b/resources/src/mediawiki/mediawiki.errorLogging.js
index 4be13264..4b1de61 100644
--- a/resources/src/mediawiki/mediawiki.errorLogging.js
+++ b/resources/src/mediawiki/mediawiki.errorLogging.js
@@ -16,18 +16,75 @@
 * @param {Array} args The arguments with which window.onerror 
was called. These are brower-
 *   dependent; 
https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onerror
 *   has some documentation.
+* @param {string} id Error identifier.
 */
 
/**
+* Fired via mw.track when an error is caught and reported to 
mw.errorLogging.
+*
+* @event errorLogging_exception
+* @param {Error|Mixed} e The error that was thrown. Usually an 
Error object, but
+*   in Javascript any value can be used with 'throw' so no 
guarantees.
+* @param {string} source Name of the function which threw the 
error.
+* @param {string} id Error identifier.
+*/
+
+   /**
+* Report an error and return an id with which it can be 
referenced.
+*
+* Note that error logging is an asynchronous operation on 
multiple levels, and because
+* of that returning an error id does not guarantee that the 
error was successfully logged.
+*
+* @param {Error|Mixed} error The error that needs to be 
logged. Typically an Error object
+*   that was thrown and caught, but could be a simple string 
or anything else.
+* @param {Object} [context] Additional information about the 
error.
+* @return {string} An error id.
+*/
+   logError: function ( error, context ) {
+   var id = mw.errorLogging.getId( error ),
+   data = { exception: error, source: 'logError', 
id: id };
+
+   if ( context ) {
+   data.context = context;
+   }
+
+   mw.track( 'errorLogging.exception', data );
+
+   return id;
+   },
+
+   /**
+* Generate an error id that can be shown to the user / logged 
to the console and
+* used to correlate bug reports with error logs.
+* @private
+* @param {Error|Mixed} error An error value, typically an 
Error object.
+* @return {string} The error id.
+*/
+   getId: function ( error ) {
+   // We take the easy path and just generate a UUID, this 
way we don't have to deal
+   // with browser and language dependency of the error 
details. Algorithm is from
+   // 
http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript/2117523#2117523
+   // jshint unused:false, bitwise: false
+   return '4xxxyxxx'.replace( 
/[xy]/g, function ( c ) {
+   var r = Math.random() * 16 | 0,
+   v = c === 'x' ? r : ( r  0x3 | 0x8 );
+   return v.toString( 16 );
+   } );
+   },
+
+   /**
 * Dumb window.onerror handler which forwards the errors via 
mw.track.
+* @private
 * @param {Mixed...} args Arguments passed to window.onerror. 
The number of 

[MediaWiki-commits] [Gerrit] dbtree - Enable HSTS max-age=7 days - change (operations/puppet)

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

Change subject: dbtree - Enable HSTS max-age=7 days
..


dbtree - Enable HSTS max-age=7 days

https://dbtree.wikimedia.org is HTTPS only.

Bug: T40516
Change-Id: I898aef758979748aabd75e956be40924d8e1a851
---
M modules/noc/templates/dbtree.wikimedia.org.erb
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/noc/templates/dbtree.wikimedia.org.erb 
b/modules/noc/templates/dbtree.wikimedia.org.erb
index 7a472cb..05a6654 100644
--- a/modules/noc/templates/dbtree.wikimedia.org.erb
+++ b/modules/noc/templates/dbtree.wikimedia.org.erb
@@ -24,6 +24,7 @@
 RewriteCond %{REQUEST_URI} !^/status$
 RewriteRule ^/(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} 
[R=301,E=ProtoRedirect]
 Header always merge Vary X-Forwarded-Proto env=ProtoRedirect
+Header set Strict-Transport-Security max-age=604800
 
 Directory /
 Order Deny,Allow

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I898aef758979748aabd75e956be40924d8e1a851
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Chmarkine chmark...@hotmail.com
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: JanZerebecki jan.wikime...@zerebecki.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] strongswan: cleanup Service invocation - change (operations/puppet)

2015-03-25 Thread Faidon Liambotis (Code Review)
Faidon Liambotis has submitted this change and it was merged.

Change subject: strongswan: cleanup Service invocation
..


strongswan: cleanup Service invocation

While jessie's strongswan ships with an init script called ipsec, it
actually ships with a systemd unit called strongswan. This allows us
to remove all the conditional logic surrounding the service's name.

Moreover, pattern is unneeded (we have a working init system); enable
is redundant; hasstatus is redundant (defaults to true for a long time
now).

Change-Id: I24b81b3e16f43539ca357fca25575a8cfe2f269a
---
M modules/strongswan/manifests/init.pp
1 file changed, 0 insertions(+), 12 deletions(-)

Approvals:
  Gage: Looks good to me, but someone else must approve
  Faidon Liambotis: Looks good to me, approved
  BBlack: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/strongswan/manifests/init.pp 
b/modules/strongswan/manifests/init.pp
index 798ffa2..56e132a 100644
--- a/modules/strongswan/manifests/init.pp
+++ b/modules/strongswan/manifests/init.pp
@@ -81,20 +81,8 @@
 source = 'puppet:///modules/strongswan/ipsec-global',
 }
 
-$svcname = $::lsbdistcodename ? {
-# in Ubuntu/Trusty this service is /etc/init/strongswan.conf
-# in Ubuntu/Precise and Debian/Jessie it's /etc/init.d/ipsec
-'trusty'  = 'strongswan',
-'precise' = 'ipsec',
-'jessie'  = 'ipsec',
-default   = 'ipsec',
-}
 service { 'strongswan':
 ensure = running,
-enable = true,
-name   = $svcname,
-pattern= charon,  # Strongswan IKEv2 daemon is called charon
-hasstatus  = true,
 hasrestart = true,
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24b81b3e16f43539ca357fca25575a8cfe2f269a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Gage jger...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add import sources for cawikinews - change (operations/mediawiki-config)

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

Change subject: Add import sources for cawikinews
..


Add import sources for cawikinews

Adding import sources for cawikinews (pl, ja, ru, sr, tr, uk, zh) and setting 
ImportTargetNamespace

Bug: T93203
Change-Id: I9e520001951a92ef36b13857f3c646dccddca072
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 52b120a..f9a29eb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9400,7 +9400,7 @@
'bnwiki' = array( 'en' ), # Bug 34791
'bnwikisource' = array( 'OldWikisource', 'w', 'en' ),
'cawikibooks' = array( 'w', 's', ),
-   'cawikinews' = array( 'w', 'wikt', 'q', 'b', 's', 'v', 'fr', 'en', 
'de', 'es', 'pt', 'it', 'commons', 'meta', 'eo' ),
+   'cawikinews' = array( 'w', 'wikt', 'q', 'b', 's', 'v', 'fr', 'en', 
'de', 'es', 'pt', 'it', 'commons', 'meta', 'eo', 'pl', 'ja', 'ru', 'sr', 'tr', 
'uk', 'zh' ), //T93203
'cawikiquote' = array( 'w' ),
'cawikisource' = array( 'w', 'b', ),
'cawiktionary' = array( 'w', ),
@@ -9653,6 +9653,7 @@
 
 'wgImportTargetNamespace' = array(
'default' = null,
+   'cawikinews' = 100, //Transwiki T93203
'enwiktionary' = 108,
'enwikibooks' = 108,
'frwiktionary' = 102,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9e520001951a92ef36b13857f3c646dccddca072
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Gerardduenas gerarddue...@gmail.com
Gerrit-Reviewer: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Glaisher glaisher.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] annual report: load mod_headers - change (operations/puppet)

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

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

Change subject: annual report: load mod_headers
..

annual report: load mod_headers

Ensure we have mod_headers loaded which we are using for
proto redirect and setting STS header. We happen to have it already
on zirconium but the role should be flexible to work elsewhere.

Change-Id: I7c561309e0d8906ce4507a2fb83768fb50d548db
---
M modules/annualreport/manifests/init.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/199801/1

diff --git a/modules/annualreport/manifests/init.pp 
b/modules/annualreport/manifests/init.pp
index 9152b70..d92773b 100644
--- a/modules/annualreport/manifests/init.pp
+++ b/modules/annualreport/manifests/init.pp
@@ -3,6 +3,7 @@
 class annualreport {
 
 include ::apache
+include ::apache::mod::headers
 
 file { '/srv/org/wikimedia/annualreport':
 ensure = directory,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7c561309e0d8906ce4507a2fb83768fb50d548db
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn dz...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] [FEAT] ParamInfo: Read mustbeposted from help - change (pywikibot/core)

2015-03-25 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FEAT] ParamInfo: Read mustbeposted from help
..

[FEAT] ParamInfo: Read mustbeposted from help

When it reads the ParamInfo data from the help text it can interpret the
help text to determine whether an action requires to be posted.

Change-Id: Ia24e5280f21973b2d386d1e8912f689a859d7b26
---
M pywikibot/data/api.py
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/97/199597/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index f2f6a98..c252353 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -430,6 +430,7 @@
 start = help_text.find(mod_begin_string)
 assert(start)
 start += len(mod_begin_string)
+end = help_text.find('\n*', start)
 
 if help_text[start + 1] == '(' and help_text[start + 4] == ')':
 prefix = help_text[start + 2:start + 4]
@@ -490,6 +491,9 @@
 }
 
 self._paraminfo[path]['parameters'] = params.values()
+if (help_text.find('\n\nThis module only accepts POST '
+   'requests.\n', start)  end):
+self._paraminfo[path]['mustbeposted'] = ''
 
 self._emulate_pageset()
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia24e5280f21973b2d386d1e8912f689a859d7b26
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise commodorefabia...@gmx.de

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


[MediaWiki-commits] [Gerrit] statsite: new module - change (operations/puppet)

2015-03-25 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: statsite: new module
..

statsite: new module

statsite provides a txstatsd replacement, the module allows for multiple
instances to be provisioned with statsite::instance and controlled using the
'*ctl pattern'.

Bug: T90111
Change-Id: I265f5307f73f69c242832d148e14595bfccfdba9
---
A modules/statsite/files/init/init.conf
A modules/statsite/files/init/instance.conf
A modules/statsite/files/statsitectl
A modules/statsite/manifests/init.pp
A modules/statsite/manifests/instance.pp
A modules/statsite/templates/statsite.ini.erb
6 files changed, 172 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/99/199599/1

diff --git a/modules/statsite/files/init/init.conf 
b/modules/statsite/files/init/init.conf
new file mode 100644
index 000..2e15fd0
--- /dev/null
+++ b/modules/statsite/files/init/init.conf
@@ -0,0 +1,15 @@
+description Start statsite instances
+author Filippo Giunchedi fili...@wikimedia.org
+
+start on runlevel [2345] or statsite.start
+
+task
+
+script
+  for config in /etc/statsite/*.ini; do
+[ -e $config ] || break
+name=$(basename $config .ini)
+start statsite/instance NAME=$name CONFIG=$config ||
+  status statsite/instance NAME=$name
+  done
+end script
diff --git a/modules/statsite/files/init/instance.conf 
b/modules/statsite/files/init/instance.conf
new file mode 100644
index 000..06186a1
--- /dev/null
+++ b/modules/statsite/files/init/instance.conf
@@ -0,0 +1,13 @@
+description C statsd daemon
+
+setuid statsite
+
+instance $NAME
+
+start on runlevel [2345]
+stop on runlevel [!2345]
+
+respawn
+respawn limit 10 5
+
+exec /usr/bin/statsite -f $CONFIG
diff --git a/modules/statsite/files/statsitectl 
b/modules/statsite/files/statsitectl
new file mode 100755
index 000..50e6fe4
--- /dev/null
+++ b/modules/statsite/files/statsitectl
@@ -0,0 +1,42 @@
+#!/bin/bash
+# statsitectl -- Manage statsite jobs
+# Usage: statsitectl {status|check|start|stop|restart}
+#
+command=$1
+shift
+case $command in
+status)
+status=0
+for config in /etc/statsite/*.ini; do
+  instance=$(basename $config .ini)
+  status statsite/instance NAME=$instance || status=$?
+done
+exit $status
+;;
+check)
+$0 status /dev/null 21 || {
+echo CRITICAL: Not all configured statsite instances are running.
+exit 2
+}
+echo OK: All defined statsite jobs are runnning.
+exit 0
+;;
+start)
+initctl start statsite/init
+;;
+stop)
+for config in /etc/statsite/*.ini; do
+  instance=$(basename $config .ini)
+  initctl stop statsite/instance NAME=$instance
+done
+;;
+restart)
+for config in /etc/statsite/*.ini; do
+  instance=$(basename $config .ini)
+  initctl restart statsite/instance NAME=$instance
+done
+;;
+*)
+echo 2 Usage: ${0##*/} {status|check|start|stop|restart}
+;;
+esac
diff --git a/modules/statsite/manifests/init.pp 
b/modules/statsite/manifests/init.pp
new file mode 100644
index 000..d96bb3a
--- /dev/null
+++ b/modules/statsite/manifests/init.pp
@@ -0,0 +1,55 @@
+# == Class: statsite
+#
+# Configure statsite https://github.com/armon/statsite
+# To add individual instances, use statsite::instance
+#
+# === Parameters
+#
+# [*port*]
+#   Port to listen for messages on over UDP.
+#
+# [*graphite_host*]
+#   Send metrics to graphite on this host
+#
+# [*graphite_port*]
+#   Send metrics to graphite on this port
+#
+# [*input_counter*]
+#   Use this metric to report self-statistics
+#
+# [*extended_counters*]
+#   Export additional metrics for counters
+
+class statsite {
+package { 'statsite':
+ensure = present,
+}
+
+file { '/sbin/statsitectl':
+source = 'puppet:///modules/statsite/statsitectl',
+mode   = '0755',
+}
+
+file { '/etc/init/statsite':
+source  = 'puppet:///modules/statsite/init',
+recurse = true,
+purge   = true,
+force   = true,
+}
+
+# prevent the system-wide statsite from starting
+file { '/etc/init/statsite.override':
+content = 'manual',
+before  = Package['statsite'],
+}
+
+service { 'statsite':
+ensure   = 'running',
+provider = 'base',
+restart  = '/sbin/statsitectl restart',
+start= '/sbin/statsitectl start',
+status   = '/sbin/statsitectl status',
+stop = '/sbin/statsitectl stop',
+require  = Package['statsite'],
+}
+}
diff --git a/modules/statsite/manifests/instance.pp 
b/modules/statsite/manifests/instance.pp
new file mode 100644
index 000..d63e652
--- /dev/null
+++ b/modules/statsite/manifests/instance.pp
@@ -0,0 

[MediaWiki-commits] [Gerrit] Add Special:GatherLists/hidden - change (mediawiki...Gather)

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

Change subject: Add Special:GatherLists/hidden
..


Add Special:GatherLists/hidden

Allow admins to make lists non-hidden because accidents happen.
Add labels to buttons so this works on Vector

Bug: T93795
Bug: T93821
Change-Id: Ie70864353f1f69390936019a463f70fc49654c92
---
M i18n/en.json
M i18n/qqq.json
M includes/specials/SpecialGatherLists.php
M resources/Resources.php
M resources/ext.gather.lists/init.js
M resources/ext.gather.styles/lists.less
M resources/ext.gather.watchstar/CollectionsApi.js
7 files changed, 74 insertions(+), 22 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 8e4e831..28a871e 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -11,9 +11,14 @@
gather-lists-collection-title: Title,
gather-lists-collection-description: Description,
gather-lists-collection-count: Count,
+   gather-lists-hide-collection-label: Hide,
gather-lists-hide-collection: Do you want to hide list \$1\ by 
\$2\?,
gather-lists-hide-success-toast: List \$1\ was hidden 
successfully.,
gather-lists-hide-failure-toast: Failed to hide list \$1\.,
+   gather-lists-show-collection-label: Reveal,
+   gather-lists-show-collection: Do you want to make list \$1\ by 
\$2\ public again?,
+   gather-lists-show-success-toast: List \$1\ was made public again 
successfully.,
+   gather-lists-show-failure-toast: Failed to show list \$1\.,
gather-remove-from-collection-failed-toast: Unable to remove page 
from collection.,
gather-add-to-collection-failed-toast: Unable to add page to 
collection.,
gather-edit-collection-heading: Edit collection,
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1747ac3..82c4280 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -15,9 +15,14 @@
gather-lists-collection-description: Label for description of 
collection on list of all collections\n{{Identical|Description}},
gather-lists-collection-last-updated: Label for last updated time of 
a collection,
gather-lists-collection-count: Label for count of collection on list 
of all collections\n{{Identical|Count}},
+   gather-lists-hide-collection-label: Label for button that performs 
moderation hide action which sets list from public to hidden.,
gather-lists-hide-collection: Label asking for confirmation when 
hiding a user's collection for moderation purposes. Parameters:\n* $1 - Title 
of the collection.\n* $2 - User name of the owner.,
gather-lists-hide-success-toast: Label for toast displaying that 
specified list was hidden successfully. Parameters:\n* $1 - Title of the 
collection.,
gather-lists-hide-failure-toast: Label for toast diaplaying that 
hiding specified list failed. Parameters:\n* $1 - Title of the collection.,
+   gather-lists-show-collection-label: Label for button that performs 
moderation reveal/show action which resets list from hidden to public.,
+   gather-lists-show-collection: Label asking for confirmation when 
revealing a user's collection for moderation purposes. Parameters:\n* $1 - 
Title of the collection.\n* $2 - User name of the owner.,
+   gather-lists-show-success-toast: Label for toast displaying that 
specified list was shown successfully. Only shown to admins. Parameters:\n* $1 
- Title of the collection.,
+   gather-lists-show-failure-toast: Label for toast diaplaying that 
showing specified list failed. Only shown to admins. Parameters:\n* $1 - Title 
of the collection.,
gather-remove-from-collection-failed-toast: Error message displayed 
to user when remove from collection action fails.,
gather-add-to-collection-failed-toast: Error message displayed to 
user when add to collection action fails,
gather-edit-collection-heading: Heading for collection editor 
overlay,
diff --git a/includes/specials/SpecialGatherLists.php 
b/includes/specials/SpecialGatherLists.php
index d6f84cc..1b4e79b 100644
--- a/includes/specials/SpecialGatherLists.php
+++ b/includes/specials/SpecialGatherLists.php
@@ -34,15 +34,27 @@
);
}
 
+   public function renderError() {
+   $out = $this-getOutput();
+   // FIXME: Get better i18n message for this view.
+   $view = new views\NoPublic();
+   $out-setPageTitle( $view-getTitle() );
+   $view-render( $out );
+   }
+
/**
 * Render the special page
 */
public function execute( $subPage ) {
+   if ( $subPage === 'hidden'  !$this-canHideLists() ) {
+   $this-renderError();
+   return;
+   }
// FIXME: Make method on CollectionsList
$api = new ApiMain( new FauxRequest( array(

[MediaWiki-commits] [Gerrit] Basic role for Sentry - change (operations/puppet)

2015-03-25 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Basic role for Sentry
..

Basic role for Sentry

Bug: T84956
Change-Id: I1207235f0ee97c253b1a1e9e2bfa89eb79665290
---
M manifests/role/deployment.pp
A manifests/role/sentry.pp
A modules/sentry/manifests/init.pp
3 files changed, 51 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/98/199598/1

diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index e9c5d8c..0644650 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -122,6 +122,9 @@
 'gitfat_enabled' = true,
 'upstream'   = 
'https://gerrit.wikimedia.org/r/operations/software/dropwizard-metrics',
 },
+'sentry/sentry' = {
+'upstream' = 
'https://gerrit.wikimedia.org/r/operations/software/sentry',
+},
 }
 }
 
diff --git a/manifests/role/sentry.pp b/manifests/role/sentry.pp
new file mode 100644
index 000..73e4504
--- /dev/null
+++ b/manifests/role/sentry.pp
@@ -0,0 +1,9 @@
+# vim:sw=4 ts=4 sts=4 et:
+
+# == Class: role::sentry
+#
+# Provisions Sentry
+#
+class role::sentry {
+class { '::sentry': }
+}
diff --git a/modules/sentry/manifests/init.pp b/modules/sentry/manifests/init.pp
new file mode 100644
index 000..14656cc
--- /dev/null
+++ b/modules/sentry/manifests/init.pp
@@ -0,0 +1,39 @@
+# == Class: sentry
+#
+# Sentry is a realtime, platform-agnostic error logging and aggregation 
platform.
+#
+class sentry {
+package { 'sentry/sentry':
+provider = 'trebuchet',
+}
+
+require_package('postgresql')
+
+# pip
+require_package('python-pip')
+# Needed by python-setproctitle (Sentry dependency)
+require_package('python-dev')
+# Needed by python-lxml (Sentry dependency)
+require_package('libxml2-dev')
+require_package('libxslt1-dev')
+# Needed by python-cffi (Sentry dependency)
+require_package('libffi-dev')
+# Needed by python-psycopg2 (Sentry dependency)
+require_package('libpq-dev')
+
+package { 'python-setuptools':
+ensure = present,
+}
+
+exec { 'pip_install_sentry':
+command = '/usr/local/bin/pip install .',
+cwd = '/srv/deployment/sentry/sentry',
+}
+
+# Sadly this has to be done manually and will need to be maintained with 
sentry updates...
+# I couldn't find a way to make either easy_install or pip process 
extra_requires while
+# pointing to a local source folder
+exec { 'pip_install_psycopg2':
+command = '/usr/local/bin/pip install psycopg2=2.5.0,2.6.0',
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1207235f0ee97c253b1a1e9e2bfa89eb79665290
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gilles gdu...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add performance instrumentation test settings - change (mediawiki...parsoid)

2015-03-25 Thread Memeht (Code Review)
Memeht has uploaded a new change for review.

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

Change subject: Add performance instrumentation test settings
..

Add performance instrumentation test settings

Amended tests/mocha/apitest.localsettings.js and tests/rttest.localsettings.js
to include a noop function and performance instrumentation test settings.
Amended node-txstatsd instantiation in lib/mediawiki.ParsoidConfig.js to
include these changes.

Change-Id: I5d50a5422861cc94ebd726b3389dab4d6db30ac3
---
M lib/mediawiki.ParsoidConfig.js
M tests/mocha/apitest.localsettings.js
M tests/rttest.localsettings.js
3 files changed, 14 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/01/199601/1

diff --git a/lib/mediawiki.ParsoidConfig.js b/lib/mediawiki.ParsoidConfig.js
index 788663d..7044473 100644
--- a/lib/mediawiki.ParsoidConfig.js
+++ b/lib/mediawiki.ParsoidConfig.js
@@ -55,8 +55,6 @@
// Timer that reports metrics to statsd
if ( this.usePerformanceTimer ){
this.performanceTimer = new Util.StatsD( this.txstatsdHost, 
this.txstatsdPort );
-   } else {
-   this.performanceTimer = null;
}
 }
 
@@ -294,6 +292,10 @@
});
 };
 
+/**
+ * @property {null} Settings for Performance timer.
+ */
+ParsoidConfig.prototype.performanceTimer = null;
 
 if (typeof module === object) {
module.exports.ParsoidConfig = ParsoidConfig;
diff --git a/tests/mocha/apitest.localsettings.js 
b/tests/mocha/apitest.localsettings.js
index d7694dc..c7f91e1 100644
--- a/tests/mocha/apitest.localsettings.js
+++ b/tests/mocha/apitest.localsettings.js
@@ -57,4 +57,9 @@
// Leaving it undefined (the default) will use the same URI as the MW 
API,
// changing api.php for load.php.
//parsoidConfig.modulesLoadURI = true;
+
+   // Set to true to enable Performance timing
+   parsoidConfig.usePerformanceTimer = false;
+   // Peformance timing options for testing
+   parsoidConfig.performanceTimer = function() {};
 };
diff --git a/tests/rttest.localsettings.js b/tests/rttest.localsettings.js
index e4d51e9..5577d22 100644
--- a/tests/rttest.localsettings.js
+++ b/tests/rttest.localsettings.js
@@ -63,4 +63,9 @@
 
// Fetch the wikitext for a page before doing html2wt
parsoidConfig.fetchWT = true;
+
+   // Set to true to enable Performance timing
+   parsoidConfig.usePerformanceTimer = false;
+   // Peformance timing options for testing
+   parsoidConfig.performanceTimer = function() {};
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d50a5422861cc94ebd726b3389dab4d6db30ac3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Memeht eco...@gmail.com

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


[MediaWiki-commits] [Gerrit] statsdlb: replace txstatsd with statsite - change (operations/puppet)

2015-03-25 Thread Filippo Giunchedi (Code Review)
Filippo Giunchedi has uploaded a new change for review.

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

Change subject: statsdlb: replace txstatsd with statsite
..

statsdlb: replace txstatsd with statsite

Start with three instances, should be easy to add more if needed.

Bug: T90111
Change-Id: Ibf9b820b2dd221b6a61064bb7b4e48ae8609feca
---
M manifests/role/statsdlb.pp
1 file changed, 18 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/199600/1

diff --git a/manifests/role/statsdlb.pp b/manifests/role/statsdlb.pp
index 158433c..91d5765 100644
--- a/manifests/role/statsdlb.pp
+++ b/manifests/role/statsdlb.pp
@@ -1,8 +1,8 @@
 # == Class: role::statsdlb
 #
 # Provisions a statsdlb instance that listens for StatsD metrics on
-# on UDP port 8125 and forwards to backends on UDP ports 8126-8133,
-# as well as the set of txstatsd backends that listen on these ports.
+# on UDP port 8125 and forwards to backends on UDP ports 8126-8128,
+# as well as the set of statsite backends that listen on these ports.
 #
 class role::statsdlb {
 
@@ -10,7 +10,7 @@
 
 class { '::statsdlb':
 server_port   = 8125,
-backend_ports = range(8126, 8139),
+backend_ports = range(8126, 8128),
 }
 
 nrpe::monitor_service { 'statsdlb':
@@ -18,67 +18,28 @@
 nrpe_command  = '/usr/lib/nagios/plugins/check_procs -c 1: -C 
statsdlb',
 }
 
+class { '::statsite': }
 
-# txstatsd back-ends
-
-package { 'python-txstatsd': }
-
-file { '/etc/txstatsd':
-ensure  = directory,
-owner   = 'root',
-group   = 'root',
-mode= '0555',
-recurse = true,
-purge   = true,
-force   = true,
-source  = 'puppet:///files/txstatsd/backends',
+# statsite backends
+statsite::instance { '8126':
+port  = 8126,
+input_counter = statsd.$::hostname-8126.received,
 }
 
-file { '/etc/init/txstatsd':
-ensure  = directory,
-owner   = 'root',
-group   = 'root',
-mode= '0555',
-recurse = true,
-purge   = true,
-force   = true,
-source  = 'puppet:///files/txstatsd/init',
+statsite::instance { '8127':
+port  = 8127,
+input_counter = statsd.$::hostname-8127.received,
 }
 
-group { 'txstatsd':
-ensure = present,
+statsite::instance { '8128':
+port  = 8128,
+input_counter = statsd.$::hostname-8127.received,
 }
 
-user { 'txstatsd':
-ensure = present,
-gid= 'txstatsd',
-shell  = '/bin/false',
-home   = '/nonexistent',
-system = true,
-managehome = false,
-}
-
-file { '/usr/local/sbin/txstatsdctl':
-source = 'puppet:///files/txstatsd/txstatsdctl',
-owner  = 'root',
-group  = 'root',
-mode   = '0755',
-before = Service['txstatsd'],
-}
-
-service { 'txstatsd':
-ensure   = 'running',
-provider = 'base',
-restart  = '/usr/local/sbin/txstatsdctl restart',
-start= '/usr/local/sbin/txstatsdctl start',
-status   = '/usr/local/sbin/txstatsdctl status',
-stop = '/usr/local/sbin/txstatsdctl stop',
-}
-
-nrpe::monitor_service { 'txstatsd_backends':
-description  = 'txstatsd backend instances',
-nrpe_command = '/usr/local/sbin/txstatsdctl check',
-require  = Service['txstatsd'],
+nrpe::monitor_service { 'statsite_backends':
+description  = 'statsite backend instances',
+nrpe_command = '/sbin/statsitectl check',
+require  = Service['statsite'],
 }
 
 diamond::collector { 'UDPCollector': }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf9b820b2dd221b6a61064bb7b4e48ae8609feca
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Filippo Giunchedi fgiunch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Minor fixes and improvements - change (mediawiki...YotpoReviews)

2015-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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

Change subject: Minor fixes and improvements
..

Minor fixes and improvements

Change-Id: I5d843550ef795bde08637ee98ce1c4d585ecb4d0
---
A COPYING
M YotpoReviews.body.php
M YotpoReviews.php
M i18n/en.json
4 files changed, 301 insertions(+), 18 deletions(-)


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

diff --git a/COPYING b/COPYING
new file mode 100644
index 000..4eb3f1e
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,278 @@
+   GNU GENERAL PUBLIC LICENSE
+  Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+   Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The Program, below,
+refers to any such program or work, and a work based on the Program
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term modification.)  Each licensee is addressed as you.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all 

[MediaWiki-commits] [Gerrit] Minor fixes and improvements - change (mediawiki...YotpoReviews)

2015-03-25 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has submitted this change and it was merged.

Change subject: Minor fixes and improvements
..


Minor fixes and improvements

Change-Id: I5d843550ef795bde08637ee98ce1c4d585ecb4d0
---
A COPYING
M YotpoReviews.body.php
M YotpoReviews.php
M i18n/en.json
4 files changed, 301 insertions(+), 18 deletions(-)

Approvals:
  Luis Felipe Schenone: Verified; Looks good to me, approved



diff --git a/COPYING b/COPYING
new file mode 100644
index 000..4eb3f1e
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,278 @@
+   GNU GENERAL PUBLIC LICENSE
+  Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+   Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Lesser General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+   GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The Program, below,
+refers to any such program or work, and a work based on the Program
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term modification.)  Each licensee is addressed as you.
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of 

[MediaWiki-commits] [Gerrit] Fix wgFlowContentFormat docs and note that wikitext may be d... - change (mediawiki...Flow)

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

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

Change subject: Fix wgFlowContentFormat docs and note that wikitext may be 
deprecated
..

Fix wgFlowContentFormat docs and note that wikitext may be deprecated

Change-Id: I2a2bf6e387b1cd08f22b16fb43274256627cece0
---
M Flow.php
1 file changed, 4 insertions(+), 7 deletions(-)


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

diff --git a/Flow.php b/Flow.php
index e57f586..085b372 100644
--- a/Flow.php
+++ b/Flow.php
@@ -166,15 +166,12 @@
 // $wgFlowExternalStore = array( 'DB://cluster24', 'DB://cluster25' );
 $wgFlowExternalStore = false;
 
-// By default, Flow will store data in wikitext format. It's also the format 
supported
-// by the most basic editor: none; in which case no conversion (Parsoid) 
will be needed.
-// the only conversion needed it wikitext - HTML for outputting the content, 
which will
-// then be handled by the parser.
-// On high-volume wikis, it's beneficial to save HTML to the database (to 
avoid having to
-// parse it every time for output), but then you'll have to make sure Parsoid 
is up and
-// running, as it'll be necessary to convert HTML to wikitext for the basic 
editor.
+// By default, Flow will store content in HTML.  However, this requires having 
Parsoid up
+// and running, as it'll be necessary to convert HTML to wikitext for the 
basic editor.
 // (n.b. to use VisualEditor, you'll definitely need Parsoid, so if you do 
support VE,
 // might as well set this to HTML right away)
+//
+// The 'wikitext' format is likely to be deprecated in the future.
 $wgFlowContentFormat = 'html'; // possible values: html|wikitext XXX bug 70148 
with wikitext
 
 // Flow Parsoid config

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2a2bf6e387b1cd08f22b16fb43274256627cece0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set wgFlowContentFormat to wikitext until we have Parsoid on... - change (integration/jenkins)

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

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

Change subject: Set wgFlowContentFormat to wikitext until we have Parsoid on 
Jenkins
..

Set wgFlowContentFormat to wikitext until we have Parsoid on Jenkins

Using Parsoid on Jenkins is T76586

Change-Id: I298ea36c25ae20aed35e2a4793e550a4f5d442cf
---
A mediawiki/conf.d/20_set_wgFlowContentFormat.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/18/199818/1

diff --git a/mediawiki/conf.d/20_set_wgFlowContentFormat.php 
b/mediawiki/conf.d/20_set_wgFlowContentFormat.php
new file mode 100644
index 000..f6df37e
--- /dev/null
+++ b/mediawiki/conf.d/20_set_wgFlowContentFormat.php
@@ -0,0 +1,4 @@
+?php
+
+// Until Parsoid is available to us on Jenkins (T76586)
+$wgFlowContentFormat = 'wikitext';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I298ea36c25ae20aed35e2a4793e550a4f5d442cf
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen mflasc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fixed the usage of $flags in loadLastEdit() - change (mediawiki/core)

2015-03-25 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Fixed the usage of $flags in loadLastEdit()
..

Fixed the usage of $flags in loadLastEdit()

Bug: T93976
Change-Id: I57eb41b463116ea27c0fc8dac8fff07db593499a
---
M includes/page/WikiPage.php
1 file changed, 17 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/19/199819/1

diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php
index 5527ace..2315dc7 100644
--- a/includes/page/WikiPage.php
+++ b/includes/page/WikiPage.php
@@ -602,13 +602,23 @@
return; // page doesn't exist or is missing page_latest 
info
}
 
-   // Bug 37225: if session S1 loads the page row FOR UPDATE, the 
result always includes the
-   // latest changes committed. This is true even within 
REPEATABLE-READ transactions, where
-   // S1 normally only sees changes committed before the first S1 
SELECT. Thus we need S1 to
-   // also gets the revision row FOR UPDATE; otherwise, it may not 
find it since a page row
-   // UPDATE and revision row INSERT by S2 may have happened after 
the first S1 SELECT.
-   // 
http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read.
-   $flags = ( $this-mDataLoadedFrom == self::READ_LOCKING ) ? 
Revision::READ_LOCKING : 0;
+   if ( $this-mDataLoadedFrom == self::READ_LOCKING ) {
+   // Bug 37225: if session S1 loads the page row FOR 
UPDATE, the result always
+   // includes the latest changes committed. This is true 
even within REPEATABLE-READ
+   // transactions, where S1 normally only sees changes 
committed before the first S1
+   // SELECT. Thus we need S1 to also gets the revision 
row FOR UPDATE; otherwise, it
+   // may not find it since a page row UPDATE and revision 
row INSERT by S2 may have
+   // happened after the first S1 SELECT.
+   // 
http://dev.mysql.com/doc/refman/5.0/en/set-transaction.html#isolevel_repeatable-read.
+   $flags = Revision::READ_LOCKING;
+   } elseif ( $this-mDataLoadedFrom == self::READ_LATEST ) {
+   // Bug T93976: if page_latest was loaded from the 
master, fetch the
+   // revision from there as well, as it may not exist yet 
on a slave DB.
+   // Also, this keeps the queries in the same 
REPEATABLE-READ snapshot.
+   $flags = Revision::READ_LATEST;
+   } else {
+   $flags = 0;
+   }
$revision = Revision::newFromPageId( $this-getId(), $latest, 
$flags );
if ( $revision ) { // sanity
$this-setLastEdit( $revision );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I57eb41b463116ea27c0fc8dac8fff07db593499a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] mw-setup: Clear log directory earlier (setup instead of appl... - change (integration/jenkins)

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

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

Change subject: mw-setup: Clear log directory earlier (setup instead of 
apply-settings)
..

mw-setup: Clear log directory earlier (setup instead of apply-settings)

Also:
* Remove redundant mkdir in mw-set-env.

Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
---
M bin/mw-apply-settings.sh
M bin/mw-set-env.sh
M bin/mw-setup.sh
3 files changed, 9 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/21/199821/1

diff --git a/bin/mw-apply-settings.sh b/bin/mw-apply-settings.sh
index 6498961..01429b8 100755
--- a/bin/mw-apply-settings.sh
+++ b/bin/mw-apply-settings.sh
@@ -7,12 +7,6 @@
 
 php $MEDIAWIKI_D/_join.php  $LOCAL_SETTINGS
 
-# Clear any previous logs directory
-rm -rf $LOG_DIR
-# Re-create logs directory
-mkdir -p $LOG_DIR
-chmod 777 $LOG_DIR
-
 # Copy LocalSettings under /log for archival purposes
 cp $LOCAL_SETTINGS $LOG_DIR
 
diff --git a/bin/mw-set-env.sh b/bin/mw-set-env.sh
index 3f0f1ad..8871c8c 100755
--- a/bin/mw-set-env.sh
+++ b/bin/mw-set-env.sh
@@ -30,8 +30,3 @@
 export MW_DB_PASS=pw_jenkins_u${EXECUTOR_NUMBER}
 
 export LOG_DIR=$WORKSPACE/log
-
-# Create logs direcotry
-# Make it writable by apache (for web requests such as from qunit tests)
-mkdir -p $LOG_DIR
-chmod 777 $LOG_DIR
diff --git a/bin/mw-setup.sh b/bin/mw-setup.sh
index 0c1f5f9..6db05ad 100755
--- a/bin/mw-setup.sh
+++ b/bin/mw-setup.sh
@@ -5,3 +5,12 @@
 
 # Ensure LocalSettings does not exist
 rm -f $MW_INSTALL_PATH/LocalSettings.php
+
+# Ensure we won't include logs from previous builds
+# Also prevents post-build jUnitArchiver exceptions about old log files 
(T93993)
+rm -rf $LOG_DIR
+
+# Re-create log directory
+mkdir -p $LOG_DIR
+# Make it writable by Apache (for web requests such as from qunit tests)
+chmod 777 $LOG_DIR

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add text progress to migration Move migration to background ... - change (apps...wikipedia)

2015-03-25 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has submitted this change and it was merged.

Change subject: Add text progress to migration Move migration to background 
thread / context Hold reference to schema convertor
..


Add text progress to migration
Move migration to background thread / context
Hold reference to schema convertor

Change-Id: I1297bb95e943749a28a99ba7488bd8d35acaf901
---
M OldDataSchema/Data/ArticleDataContextSingleton.h
M OldDataSchema/Data/ArticleDataContextSingleton.m
M Wikipedia.xcodeproj/project.pbxproj
M WikipediaUnitTests/OldDataSchemaMigratorTests.m
M wikipedia/Data/OldDataSchemaMigrator.h
M wikipedia/Data/OldDataSchemaMigrator.m
M wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.m
M wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.xib
M wikipedia/ca.lproj/Localizable.strings
M wikipedia/de.lproj/Localizable.strings
M wikipedia/en.lproj/Localizable.strings
M wikipedia/es.lproj/Localizable.strings
M wikipedia/fi.lproj/Localizable.strings
M wikipedia/fr.lproj/Localizable.strings
M wikipedia/he.lproj/Localizable.strings
M wikipedia/id.lproj/Localizable.strings
M wikipedia/it.lproj/Localizable.strings
M wikipedia/ja.lproj/Localizable.strings
M wikipedia/ko.lproj/Localizable.strings
M wikipedia/lb.lproj/Localizable.strings
M wikipedia/mk.lproj/Localizable.strings
M wikipedia/ms.lproj/Localizable.strings
M wikipedia/nl.lproj/Localizable.strings
M wikipedia/pt-br.lproj/Localizable.strings
M wikipedia/pt.lproj/Localizable.strings
M wikipedia/qqq.lproj/Localizable.strings
M wikipedia/ro.lproj/Localizable.strings
M wikipedia/ru.lproj/Localizable.strings
M wikipedia/sv.lproj/Localizable.strings
M wikipedia/tr.lproj/Localizable.strings
M wikipedia/vi.lproj/Localizable.strings
M wikipedia/zh-hans.lproj/Localizable.strings
32 files changed, 311 insertions(+), 213 deletions(-)

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



diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.h 
b/OldDataSchema/Data/ArticleDataContextSingleton.h
index ef7f512..1f188ce 100644
--- a/OldDataSchema/Data/ArticleDataContextSingleton.h
+++ b/OldDataSchema/Data/ArticleDataContextSingleton.h
@@ -5,9 +5,13 @@
 
 @interface ArticleDataContextSingleton : NSObject
 
++ (ArticleDataContextSingleton *)sharedInstance;
+
 @property (nonatomic, retain) NSManagedObjectContext *mainContext;
 
-+ (ArticleDataContextSingleton *)sharedInstance;
+- (NSManagedObjectContext*)backgroundContext;
+
+- (void)saveContextAndPropagateChangesToStore:(NSManagedObjectContext*)context 
completionBlock:(void(^)(NSError* error))completionBlock;
 
 - (id)createArticleDataModel:(Class)modelClass;
 
diff --git a/OldDataSchema/Data/ArticleDataContextSingleton.m 
b/OldDataSchema/Data/ArticleDataContextSingleton.m
index 697aca0..812f948 100644
--- a/OldDataSchema/Data/ArticleDataContextSingleton.m
+++ b/OldDataSchema/Data/ArticleDataContextSingleton.m
@@ -80,6 +80,15 @@
 self.masterContext.persistentStoreCoordinator = persistentStoreCoordinator;
 }
 
+- (NSManagedObjectContext*)backgroundContext{
+
+NSManagedObjectContext* newContext = [[NSManagedObjectContext alloc] 
initWithConcurrencyType:NSPrivateQueueConcurrencyType];
+newContext.parentContext = self.masterContext;
+
+return newContext;
+}
+
+
 - (NSString *)documentRootPath
 {
 NSArray* documentPaths = 
NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
@@ -87,7 +96,36 @@
 return documentRootPath;
 }
 
+- (void)saveContextAndPropagateChangesToStore:(NSManagedObjectContext*)context 
completionBlock:(void(^)(NSError* error))completionBlock{
+
+[context performBlock:^{
+
+__block NSError* errorToSend = nil;
+
+NSError* error = nil;
+if([context save:error]){
+[self.masterContext performBlock:^{
+NSError *masterError = nil;
+if (![self.masterContext save:masterError]) {
+errorToSend = masterError;
+}
+}];
+}else{
+errorToSend = error;
+}
+
+if(completionBlock){
+
+dispatch_async(dispatch_get_main_queue(), ^{
+completionBlock(errorToSend);
+});
+}
+}];
+}
+
+
 - (void)propagateMainSavesToMaster{
+
 [self.masterContext performBlock:^{
 NSError *masterError = nil;
 if (![self.masterContext save:masterError]) {
diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index 891d779..b3dbec8 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -744,9 +744,6 @@
08D631F91A69B8CD00D87AD0 /* WMFImageGalleryCollectionViewCell.m 
*/ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = 
sourcecode.c.objc; name = 

[MediaWiki-commits] [Gerrit] mw-setup: Clear log directory earlier (setup instead of appl... - change (integration/jenkins)

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

Change subject: mw-setup: Clear log directory earlier (setup instead of 
apply-settings)
..


mw-setup: Clear log directory earlier (setup instead of apply-settings)

Also:
* Remove redundant mkdir in mw-set-env.

Bug: T93993
Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
---
M bin/mw-apply-settings.sh
M bin/mw-set-env.sh
M bin/mw-setup.sh
3 files changed, 9 insertions(+), 11 deletions(-)

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



diff --git a/bin/mw-apply-settings.sh b/bin/mw-apply-settings.sh
index 6498961..01429b8 100755
--- a/bin/mw-apply-settings.sh
+++ b/bin/mw-apply-settings.sh
@@ -7,12 +7,6 @@
 
 php $MEDIAWIKI_D/_join.php  $LOCAL_SETTINGS
 
-# Clear any previous logs directory
-rm -rf $LOG_DIR
-# Re-create logs directory
-mkdir -p $LOG_DIR
-chmod 777 $LOG_DIR
-
 # Copy LocalSettings under /log for archival purposes
 cp $LOCAL_SETTINGS $LOG_DIR
 
diff --git a/bin/mw-set-env.sh b/bin/mw-set-env.sh
index 3f0f1ad..8871c8c 100755
--- a/bin/mw-set-env.sh
+++ b/bin/mw-set-env.sh
@@ -30,8 +30,3 @@
 export MW_DB_PASS=pw_jenkins_u${EXECUTOR_NUMBER}
 
 export LOG_DIR=$WORKSPACE/log
-
-# Create logs direcotry
-# Make it writable by apache (for web requests such as from qunit tests)
-mkdir -p $LOG_DIR
-chmod 777 $LOG_DIR
diff --git a/bin/mw-setup.sh b/bin/mw-setup.sh
index 0c1f5f9..6db05ad 100755
--- a/bin/mw-setup.sh
+++ b/bin/mw-setup.sh
@@ -5,3 +5,12 @@
 
 # Ensure LocalSettings does not exist
 rm -f $MW_INSTALL_PATH/LocalSettings.php
+
+# Ensure we won't include logs from previous builds
+# Also prevents post-build jUnitArchiver exceptions about old log files 
(T93993)
+rm -rf $LOG_DIR
+
+# Re-create log directory
+mkdir -p $LOG_DIR
+# Make it writable by Apache (for web requests such as from qunit tests)
+chmod 777 $LOG_DIR

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I66f65e05524ec994f2d3bda3fa282cae602c38f7
Gerrit-PatchSet: 2
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Add progress line to data migration - change (apps...wikipedia)

2015-03-25 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has submitted this change and it was merged.

Change subject: Add progress line to data migration
..


Add progress line to data migration

Change-Id: I3170de637aa3a194e2566be2c41bfa8c780f3710
---
M wikipedia/Custom Views/WMFProgressLineView.m
M wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.h
M wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.m
M wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.xib
4 files changed, 61 insertions(+), 20 deletions(-)

Approvals:
  Dr0ptp4kt: Verified; Looks good to me, approved
  Mhurd: Looks good to me, but someone else must approve



diff --git a/wikipedia/Custom Views/WMFProgressLineView.m b/wikipedia/Custom 
Views/WMFProgressLineView.m
index 974bca5..b9c5c43 100644
--- a/wikipedia/Custom Views/WMFProgressLineView.m
+++ b/wikipedia/Custom Views/WMFProgressLineView.m
@@ -15,17 +15,31 @@
 
 - (instancetype)initWithFrame:(CGRect)frame {
 if (self = [super initWithFrame:frame]) {
-self.frame   = frame;
-self.clipsToBounds   = YES;
-self.backgroundColor = [UIColor clearColor];
-self.progressBar = [[UIView alloc] init];
-self.progressBar.backgroundColor = [UIColor colorWithRed:0.106 
green:0.682 blue:0.541 alpha:1];
-self.progress= 0.0;
-[self addSubview:self.progressBar];
+self.frame = frame;
+[self setup];
 }
 return self;
 }
 
+- (void)awakeFromNib{
+
+[super awakeFromNib];
+[self setup];
+}
+
+
+- (void)setup{
+
+self.clipsToBounds   = YES;
+self.backgroundColor = [UIColor clearColor];
+self.progressBar = [[UIView alloc] init];
+self.progressBar.backgroundColor = [UIColor colorWithRed:0.106 green:0.682 
blue:0.541 alpha:1];
+self.progress= 0.0;
+[self addSubview:self.progressBar];
+
+}
+
+
 - (void)setFrame:(CGRect)frame {
 //whole pixels for non-retina screens
 frame.origin.y= ceilf(frame.origin.y);
diff --git a/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.h 
b/wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.h
index 6483492..f213130 100644
--- a/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.h
+++ b/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.h
@@ -10,6 +10,7 @@
 #import MessageUI/MessageUI.h
 
 @class DataMigrationProgressViewController;
+@class WMFProgressLineView;
 
 @protocol DataMigrationProgressDelegate
 - 
(void)dataMigrationProgressComplete:(DataMigrationProgressViewController*)viewController;
@@ -18,7 +19,7 @@
 
 @interface DataMigrationProgressViewController : UIViewController 
UIActionSheetDelegate, MFMailComposeViewControllerDelegate
 
-@property (weak, nonatomic) IBOutlet UIActivityIndicatorView* 
progressIndicator;
+@property (weak, nonatomic) IBOutlet WMFProgressLineView* progressIndicator;
 @property (weak, nonatomic) IBOutlet UILabel* progressLabel;
 @property (weak, nonatomic) idDataMigrationProgressDelegate delegate;
 
diff --git a/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.m 
b/wikipedia/View Controllers/DataMigration/DataMigrationProgressViewController.m
index 7312b9d..7352fb1 100644
--- a/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.m
+++ b/wikipedia/View 
Controllers/DataMigration/DataMigrationProgressViewController.m
@@ -17,6 +17,7 @@
 #import ArticleImporter.h
 
 #import WikipediaAppUtils.h
+#import WMFProgressLineView.h
 
 enum {
 BUTTON_INDEX_DISCARD = 0,
@@ -87,6 +88,9 @@
 // Middle-Ages Converter
 // From the native app's initial CoreData-based implementation,
 // which now lives in OldDataSchema subproject.
+
+self.progressIndicator.progress = 0.0;
+
 self.oldDataSchema.delegate = self.schemaConvertor;
 self.oldDataSchema.progressDelegate = self;
 NSLog(@begin migration);
@@ -98,6 +102,9 @@
 // Ye Ancient Converter
 // From the old PhoneGap app
 // @fixme: fix this to work again
+
+self.progressIndicator.progress = 0.0;
+
 NSLog(@Old data to migrate found!);
 NSArray* titles   = [self.dataMigrator extractSavedPages];
 ArticleImporter* importer = [[ArticleImporter alloc] init];
@@ -109,6 +116,8 @@
 [importer importArticles:titles];
 
 [self.dataMigrator removeOldData];
+
+[self.progressIndicator setProgress:1.0 animated:YES completion:NULL];
 }
 
 - (void)oldDataSchema:(OldDataSchemaMigrator*)schema 
didUpdateProgressWithArticlesCompleted:(NSUInteger)completed 
total:(NSUInteger)total {
@@ -123,20 +132,32 @@
 NSString* progressString = [NSString stringWithFormat:@%@\n%@, lineOne, 
lineTwo];
 
 

[MediaWiki-commits] [Gerrit] Add maintenance script to fix up old CU-created block log en... - change (mediawiki...WikimediaMaintenance)

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

Change subject: Add maintenance script to fix up old CU-created block log 
entries
..


Add maintenance script to fix up old CU-created block log entries

Bug: T92775
Change-Id: I6e024a21fac144ef07a4671b6a931a8730d5cff1
---
A cleanupT92775.php
1 file changed, 39 insertions(+), 0 deletions(-)

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



diff --git a/cleanupT92775.php b/cleanupT92775.php
new file mode 100644
index 000..454efb5
--- /dev/null
+++ b/cleanupT92775.php
@@ -0,0 +1,39 @@
+?php
+
+/**
+ * Cleans up CU-created block logs that had wrongly formatted parameters.
+ * See https://phabricator.wikimedia.org/T92775
+ * Should be equivalent to this query:
+ * update logging
+ *  set log_params = '1 week\nanononly,nocreate'
+ * where log_type = 'block'
+ *  and log_action = 'block'
+ *  and log_params = '1 week\nanononly\nnocreate';
+ */
+
+require_once __DIR__ . '/WikimediaMaintenance.php';
+
+class FixCUBlockLogs extends WikimediaMaintenance {
+   public function execute() {
+   $ids = array();
+   $res = wfGetDB( DB_SLAVE )-select(
+   'logging',
+   array( 'log_id' ),
+   array( 'log_params' = 1 week\nanononly\nnocreate ),
+   __METHOD__
+   );
+   foreach ( $res as $row ) {
+   $ids[] = $row-log_id;
+   }
+
+   wfGetDB( DB_MASTER )-update(
+   'logging',
+   array( 'log_params' = 1 week\nanononly,nocreate ),
+   array( 'log_id' = $ids ),
+   __METHOD__
+   );
+   }
+}
+
+$maintClass = 'FixCUBlockLogs';
+require_once DO_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6e024a21fac144ef07a4671b6a931a8730d5cff1
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Crash after migration - this value is supposed to be an array. - change (apps...wikipedia)

2015-03-25 Thread Dr0ptp4kt (Code Review)
Dr0ptp4kt has submitted this change and it was merged.

Change subject: Crash after migration - this value is supposed to be an array.
..


Crash after migration - this value is supposed to be an array.

Change-Id: Ie11043a276af73a304d3a0380964159ef9bf8146
---
M WikipediaUnitTests/OldDataSchemaMigratorTests.m
M wikipedia/Data/OldDataSchemaMigrator.m
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/WikipediaUnitTests/OldDataSchemaMigratorTests.m 
b/WikipediaUnitTests/OldDataSchemaMigratorTests.m
index a1be3b1..8c6940c 100644
--- a/WikipediaUnitTests/OldDataSchemaMigratorTests.m
+++ b/WikipediaUnitTests/OldDataSchemaMigratorTests.m
@@ -128,7 +128,7 @@
 // article misc
 assertThat(migratedArticle.redirected, is([migratedSite 
titleWithString:oldArticle.redirected]));
 assertThat(@(migratedArticle.languagecount), is(oldArticle.languagecount));
-assertThat([migratedArticle.protection protectedActions], 
is(equalTo(@[@edit])));
+assertThat([migratedArticle.protection allowedGroupsForAction:@edit], 
is(@[oldArticle.protectionStatus]));
 // !!!: is this correct?
 assertThat(@(migratedArticle.editable), isFalse());
 }
diff --git a/wikipedia/Data/OldDataSchemaMigrator.m 
b/wikipedia/Data/OldDataSchemaMigrator.m
index 73e9db9..a46f57a 100644
--- a/wikipedia/Data/OldDataSchemaMigrator.m
+++ b/wikipedia/Data/OldDataSchemaMigrator.m
@@ -249,8 +249,8 @@
 }
 if (article.protectionStatus) {
 dict[@protection] = @{
-@edit: article.protectionStatus
-};
+@edit: @[article.protectionStatus]
+};
 }
 if (article.editable) {
 dict[@editable] = @;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie11043a276af73a304d3a0380964159ef9bf8146
Gerrit-PatchSet: 5
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno cfl...@wikimedia.org
Gerrit-Reviewer: Bgerstle bgers...@wikimedia.org
Gerrit-Reviewer: Dr0ptp4kt ab...@wikimedia.org
Gerrit-Reviewer: Fjalapeno cfl...@wikimedia.org
Gerrit-Reviewer: Mhurd mh...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Made ProfilerStub return null instead of a dummy ScopedCallback - change (mediawiki/core)

2015-03-25 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Made ProfilerStub return null instead of a dummy ScopedCallback
..

Made ProfilerStub return null instead of a dummy ScopedCallback

* This can happen well over 10k times per request due to the message
  hooks. Avoiding the object construction seems prudent.

Change-Id: I45ff7b8c10851f15a25cbea9a2df3669ec21dbd3
---
M includes/profiler/Profiler.php
M includes/profiler/ProfilerStub.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/199820/1

diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index 69470fd..1c9824a 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -134,7 +134,7 @@
/**
 * @param ScopedCallback $section
 */
-   public function scopedProfileOut( ScopedCallback $section ) {
+   public function scopedProfileOut( ScopedCallback $section = null ) {
$section = null;
}
 
diff --git a/includes/profiler/ProfilerStub.php 
b/includes/profiler/ProfilerStub.php
index 5580f94..1d04536 100644
--- a/includes/profiler/ProfilerStub.php
+++ b/includes/profiler/ProfilerStub.php
@@ -28,7 +28,7 @@
  */
 class ProfilerStub extends Profiler {
public function scopedProfileIn( $section ) {
-   return new ScopedCallback( null ); // no-op
+   return null; // no-op
}
 
public function getFunctionStats() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I45ff7b8c10851f15a25cbea9a2df3669ec21dbd3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make links in Echo's notification footer blue on hover - change (mediawiki...Echo)

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

Change subject: Make links in Echo's notification footer blue on hover
..


Make links in Echo's notification footer blue on hover

Links on the notification footer, View edit / View changes, needs
to be blue instead of grey to be consistent with the Mediawiki interface.
The link turns blue upon hovering, just the way it is currently set
for other links on notifications like the page title.

Bug: T57367
Change-Id: Ibaaff52b9d4bdfc5beca442e10734dd5cf8886d7
---
M modules/overlay/ext.echo.overlay.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/overlay/ext.echo.overlay.js 
b/modules/overlay/ext.echo.overlay.js
index dfc14d2..7d5dfca 100644
--- a/modules/overlay/ext.echo.overlay.js
+++ b/modules/overlay/ext.echo.overlay.js
@@ -136,10 +136,10 @@
.addClass( 'mw-echo-grey-link' );
$li.hover(
function() {
-   $( this ).find( '.mw-echo-title 
a' ).removeClass( 'mw-echo-grey-link' );
+   $( this ).find( '.mw-echo-title 
a, .mw-echo-notification-footer a' ).removeClass( 'mw-echo-grey-link' );
},
function() {
-   $( this ).find( '.mw-echo-title 
a' ).addClass( 'mw-echo-grey-link' );
+   $( this ).find( '.mw-echo-title 
a, .mw-echo-notification-footer a' ).addClass( 'mw-echo-grey-link' );
}
);
// If there is a primary link, make the entire 
notification clickable.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibaaff52b9d4bdfc5beca442e10734dd5cf8886d7
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Tinaj1234 tinajohnson.1...@gmail.com
Gerrit-Reviewer: 01tonythomas 01tonytho...@gmail.com
Gerrit-Reviewer: He7d3r he7...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Mattflaschen mflasc...@wikimedia.org
Gerrit-Reviewer: Niharika29 niharikakohl...@gmail.com
Gerrit-Reviewer: Qgil q...@wikimedia.org
Gerrit-Reviewer: Quiddity nwil...@wikimedia.org
Gerrit-Reviewer: Tinaj1234 tinajohnson.1...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] cx: Add Kannada (kn) in target wiki - change (operations/puppet)

2015-03-25 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: cx: Add Kannada (kn) in target wiki
..

cx: Add Kannada (kn) in target wiki

Bug: T93134
Change-Id: I8558e24f866eae0b2d55d2e39f381fd2aa080040
---
M hieradata/common/cxserver.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/199822/1

diff --git a/hieradata/common/cxserver.yaml b/hieradata/common/cxserver.yaml
index db0c4e7..97f36ac 100644
--- a/hieradata/common/cxserver.yaml
+++ b/hieradata/common/cxserver.yaml
@@ -18,6 +18,7 @@
 - 'eo'
 - 'es'
 - 'id'
+- 'kn'
 - 'ky'
 - 'min'
 - 'ms'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8558e24f866eae0b2d55d2e39f381fd2aa080040
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] cx: Install ContentTranslation in Kannada (kn) wiki - change (operations/mediawiki-config)

2015-03-25 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: cx: Install ContentTranslation in Kannada (kn) wiki
..

cx: Install ContentTranslation in Kannada (kn) wiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 732a15e..2b3fd40 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14275,6 +14275,7 @@
'eowiki' = true,
'eswiki' = true,
'idwiki' = true,
+   'knwiki' = true,
'kywiki' = true,
'minwiki' = true,
'mswiki' = true,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib51f3c80f7856cef24f7f1b7359cdd317f932dec
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: KartikMistry kartik.mis...@gmail.com

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


[MediaWiki-commits] [Gerrit] Deprecate wfDiff() - change (mediawiki/core)

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

Change subject: Deprecate wfDiff()
..


Deprecate wfDiff()

This function is backwards:
* The stated purpose is to generate a list of differences for callers to parse,
  however we already have DiffEngine that returns a list of differences that you
  don't need to parse manually shooting your feet off in process.
* With improvements in PHP performance in the last 10 years, shelling out 
instead of using
  a pure-PHP diff has a doubtful performance benefit.
* Even in configurations where it's faster on predominant diffs (which have to 
be huge),
  shelling out has its own security implications.

This function is not used in core. The only extensons using it are Echo (which 
just parses
its output so would be better off with DiffEngine) and AbuseFilter, let's not 
add more users
by tolerating this function.

Also, add error checking while I'm at it.

Change-Id: Ia67debce39de8252312fd887ebfbe6fb89f9edc9
---
M RELEASE-NOTES-1.25
M includes/GlobalFunctions.php
2 files changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 1a0c0d9..01ab739 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -410,6 +410,7 @@
   instead just returns the Status object. Extension calling it should be aware 
of
   this.
 * Removed class DBObject. (unused since 1.10)
+* wfDiff() is deprecated.
 
 == Compatibility ==
 
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 47e7a15..a9ed60f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3115,7 +3115,9 @@
 
 /**
  * Returns unified plain-text diff of two texts.
- * Useful for machine processing of diffs.
+ * Useful for machine processing of diffs.
+ *
+ * @deprecated since 1.25, use DiffEngine/UnifiedDiffFormatter directly
  *
  * @param string $before The text before the changes.
  * @param string $after The text after the changes.
@@ -3155,6 +3157,11 @@
$cmd = $wgDiff  . $params . ' ' . wfEscapeShellArg( $oldtextName, 
$newtextName );
 
$h = popen( $cmd, 'r' );
+   if ( !$h ) {
+   unlink( $oldtextName );
+   unlink( $newtextName );
+   throw new Exception( __METHOD__ . '(): popen() failed' );
+   }
 
$diff = '';
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia67debce39de8252312fd887ebfbe6fb89f9edc9
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


<    1   2   3   4   5