[MediaWiki-commits] [Gerrit] fixing wikidata-lb monitoring ip address - change (operations/puppet)

2013-07-23 Thread Lcarr (Code Review)
Lcarr has uploaded a new change for review.

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


Change subject: fixing wikidata-lb monitoring ip address
..

fixing wikidata-lb monitoring ip address

Change-Id: I01e6998cc19930b70451646154cd1d9cd04f2f98
---
M manifests/lvs.pp
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/81/75281/1

diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index b2faaf0..c27e1fd 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -1120,7 +1120,7 @@
ip_address = $ip['mobile']['eqiad']['mobilelb'],
check_command = 
check_http_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.eqiad.wikimedia.org:
-   ip_address = $ip['text']['eqiad']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['eqiad']['wikidatalb'],
check_command = check_http_lvs!www.wikidata.org!/;
wikivoyage-lb.eqiad.wikimedia.org:
ip_address = $ip['text']['eqiad']['wikivoyagelb'],
@@ -1234,7 +1234,7 @@
ip_address = $ip['mobile']['eqiad']['mobilelb'],
check_command = 
check_https_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.eqiad.wikimedia.org:
-   ip_address = $ip['text']['eqiad']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['eqiad']['wikidatalb'],
check_command = check_https_lvs!www.wikidata.org!/;
wikivoyage-lb.eqiad.wikimedia.org:
ip_address = $ip['text']['eqiad']['wikivoyagelb'],
@@ -1270,7 +1270,7 @@
ip_address = $ip['mobile']['esams']['mobilelb'],
check_command = 
check_http_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.esams.wikimedia.org:
-   ip_address = $ip['text']['esams']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['esams']['wikidatalb'],
check_command = check_http_lvs!www.wikidata.org!/,
critical = false;
wikivoyage-lb.esams.wikimedia.org:
@@ -1284,7 +1284,7 @@
ip_address = $ip['mobile']['esams']['mobilelb'],
check_command = 
check_https_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.esams.wikimedia.org:
-   ip_address = $ip['text']['esams']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['esams']['wikidatalb'],
check_command = check_https_lvs!www.wikidata.org!/,
critical = false;
wikivoyage-lb.esams.wikimedia.org:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01e6998cc19930b70451646154cd1d9cd04f2f98
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] added additional logic to grep the output file for Story and... - change (mediawiki...release)

2013-07-23 Thread Mgrover (Code Review)
Mgrover has uploaded a new change for review.

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


Change subject: added additional logic to grep the output file for Story and Bug
..

added additional logic to grep the output file for Story and Bug

Change-Id: I0238ead73870265880a0a6fbbaa2d8e2e6facad9
---
M python-git-logs/log_updates.py
1 file changed, 27 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/release 
refs/changes/80/75280/1

diff --git a/python-git-logs/log_updates.py b/python-git-logs/log_updates.py
index 56c804f..1a6c225 100755
--- a/python-git-logs/log_updates.py
+++ b/python-git-logs/log_updates.py
@@ -3,48 +3,62 @@
 from subprocess import check_output
 from datetime import date
 import re
+import glob
+
 
 def info(str):
-   print [INFO] %s % str
+print [INFO] %s % str
+
 
 def get_initial_commit(repodir):
-the_commit = raw_input('Please enter commit number or ENTER for 
last-update: ')
+the_commit = raw_input('Enter commit number or ENTER for last-update: ')
 if len(the_commit) == 0:
-   the_commit = latest_commit(repodir)
+the_commit = latest_commit(repodir)
 else:
-   info('Using %s as the initial commit.' % the_commit)
+info('Using %s as the initial commit.' % the_commit)
 return the_commit
+
 
 def latest_commit(repodir):
 info(Aquiring latest commit number...)
-cmd = ['git','log', '--max-count=1']
+cmd = ['git', 'log', '--max-count=1']
 last_log_output = check_output(cmd)
 m = re.search('commit\s+([a-z0-9]+).*', last_log_output)
 last_commit = m.group(1)
 info('Using the last commit [%s] as the initial commit.' % last_commit)
 return last_commit
 
+
 def get_log_since(last_updated, repodir):
 info(Getting latest delta logs ...)
-cmd = ['git','log', '--no-merges',%s.. % last_updated]
+cmd = ['git', 'log', '--no-merges', %s.. % last_updated]
 log = check_output(cmd)
 return log
 
+
 def output_change_log(f_name, change_log):
- info(Writing %s ... % f_name)
- hLog = open(f_name, 'w')
- hLog.write(change_log)
- hLog.close()
- info(Done.)
+info(Writing %s ... % f_name)
+hLog = open(f_name, 'w')
+hLog.write(change_log)
+hLog.close()
+info(Done.)
+
 
 def generate_change_log(repodir):
 last_updated = get_initial_commit(repodir)
-change_log = get_log_since(last_updated,repodir)
+change_log = get_log_since(last_updated, repodir)
 
 f_name = 'ChangeLogs_%s.txt' % date.today().isoformat()
 output_change_log(f_name, change_log)
+return output_change_log
 
 
+def grep_change_log_file():
+files = glob.glob(*.txt)
+for line in open(files[0], 'r'):
+if re.findall(r(?i)Story|(?i)Bug, line):
+print line
 
 if __name__ == '__main__':
-  generate_change_log('.')
+generate_change_log('.')
+grep_change_log_file()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0238ead73870265880a0a6fbbaa2d8e2e6facad9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/release
Gerrit-Branch: master
Gerrit-Owner: Mgrover mgro...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Ganglia metric module - change (mediawiki...EventLogging)

2013-07-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Update Ganglia metric module
..

Update Ganglia metric module

- Change default prefix to 'eventlogging_' (was 'zeromq_', which implied that
  the module was still generic enough to be used to track any ZeroMQ publisher.
  It isn't.)
- Changed metric group parameter 'collect_every' to 30 (from 10). Produces
  smoother graphs.

Change-Id: I017a9931f3350ed19e6bbaa6e251a5c34c6ca368
---
M ganglia/conf.d/eventlogging_mon.pyconf
M ganglia/python_modules/eventlogging_mon.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/EventLogging 
refs/changes/82/75282/1

diff --git a/ganglia/conf.d/eventlogging_mon.pyconf 
b/ganglia/conf.d/eventlogging_mon.pyconf
index 8b80a16..7b9a77b 100644
--- a/ganglia/conf.d/eventlogging_mon.pyconf
+++ b/ganglia/conf.d/eventlogging_mon.pyconf
@@ -8,10 +8,10 @@
 }
 
 collection_group {
-collect_every = 10
+collect_every = 30
 time_threshold = 60
 metric {
-name_match = zeromq_(.+)
+name_match = eventlogging_(.+)
 title = \\1
 value_threshold = 0
 }
diff --git a/ganglia/python_modules/eventlogging_mon.py 
b/ganglia/python_modules/eventlogging_mon.py
index f40eb61..54c568b 100644
--- a/ganglia/python_modules/eventlogging_mon.py
+++ b/ganglia/python_modules/eventlogging_mon.py
@@ -95,7 +95,7 @@
 metric descriptors.
 
 
-prefix = params.get('prefix', 'zeromq_')
+prefix = params.get('prefix', 'eventlogging_')
 config_dir = params.get('config_dir', '/etc/eventlogging.d')
 pubs = {prefix + k: v for k, v in iter_pubs(config_dir)}
 counters = {k: 0 for k in pubs}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I017a9931f3350ed19e6bbaa6e251a5c34c6ca368
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fixing wikidata-lb monitoring ip address - change (operations/puppet)

2013-07-23 Thread Lcarr (Code Review)
Lcarr has submitted this change and it was merged.

Change subject: fixing wikidata-lb monitoring ip address
..


fixing wikidata-lb monitoring ip address

Change-Id: I01e6998cc19930b70451646154cd1d9cd04f2f98
---
M manifests/lvs.pp
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/manifests/lvs.pp b/manifests/lvs.pp
index b2faaf0..c27e1fd 100644
--- a/manifests/lvs.pp
+++ b/manifests/lvs.pp
@@ -1120,7 +1120,7 @@
ip_address = $ip['mobile']['eqiad']['mobilelb'],
check_command = 
check_http_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.eqiad.wikimedia.org:
-   ip_address = $ip['text']['eqiad']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['eqiad']['wikidatalb'],
check_command = check_http_lvs!www.wikidata.org!/;
wikivoyage-lb.eqiad.wikimedia.org:
ip_address = $ip['text']['eqiad']['wikivoyagelb'],
@@ -1234,7 +1234,7 @@
ip_address = $ip['mobile']['eqiad']['mobilelb'],
check_command = 
check_https_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.eqiad.wikimedia.org:
-   ip_address = $ip['text']['eqiad']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['eqiad']['wikidatalb'],
check_command = check_https_lvs!www.wikidata.org!/;
wikivoyage-lb.eqiad.wikimedia.org:
ip_address = $ip['text']['eqiad']['wikivoyagelb'],
@@ -1270,7 +1270,7 @@
ip_address = $ip['mobile']['esams']['mobilelb'],
check_command = 
check_http_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.esams.wikimedia.org:
-   ip_address = $ip['text']['esams']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['esams']['wikidatalb'],
check_command = check_http_lvs!www.wikidata.org!/,
critical = false;
wikivoyage-lb.esams.wikimedia.org:
@@ -1284,7 +1284,7 @@
ip_address = $ip['mobile']['esams']['mobilelb'],
check_command = 
check_https_lvs!en.m.wikipedia.org!/wiki/Main_Page;
wikidata-lb.esams.wikimedia.org:
-   ip_address = $ip['text']['esams']['wikidatalb'],
+   ip_address = 
$ip['text-varnish']['esams']['wikidatalb'],
check_command = check_https_lvs!www.wikidata.org!/,
critical = false;
wikivoyage-lb.esams.wikimedia.org:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01e6998cc19930b70451646154cd1d9cd04f2f98
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Lcarr lc...@wikimedia.org
Gerrit-Reviewer: Lcarr lc...@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] Update Ganglia metric module - change (mediawiki...EventLogging)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update Ganglia metric module
..


Update Ganglia metric module

- Change default prefix to 'eventlogging_' (was 'zeromq_', which implied that
  the module was still generic enough to be used to track any ZeroMQ publisher.
  It isn't.)
- Changed metric group parameter 'collect_every' to 30 (from 10). Produces
  smoother graphs.

Change-Id: I017a9931f3350ed19e6bbaa6e251a5c34c6ca368
---
M ganglia/conf.d/eventlogging_mon.pyconf
M ganglia/python_modules/eventlogging_mon.py
2 files changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ganglia/conf.d/eventlogging_mon.pyconf 
b/ganglia/conf.d/eventlogging_mon.pyconf
index 8b80a16..7b9a77b 100644
--- a/ganglia/conf.d/eventlogging_mon.pyconf
+++ b/ganglia/conf.d/eventlogging_mon.pyconf
@@ -8,10 +8,10 @@
 }
 
 collection_group {
-collect_every = 10
+collect_every = 30
 time_threshold = 60
 metric {
-name_match = zeromq_(.+)
+name_match = eventlogging_(.+)
 title = \\1
 value_threshold = 0
 }
diff --git a/ganglia/python_modules/eventlogging_mon.py 
b/ganglia/python_modules/eventlogging_mon.py
index f40eb61..54c568b 100644
--- a/ganglia/python_modules/eventlogging_mon.py
+++ b/ganglia/python_modules/eventlogging_mon.py
@@ -95,7 +95,7 @@
 metric descriptors.
 
 
-prefix = params.get('prefix', 'zeromq_')
+prefix = params.get('prefix', 'eventlogging_')
 config_dir = params.get('config_dir', '/etc/eventlogging.d')
 pubs = {prefix + k: v for k, v in iter_pubs(config_dir)}
 counters = {k: 0 for k in pubs}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I017a9931f3350ed19e6bbaa6e251a5c34c6ca368
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@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 mw extension jobs for MassMessage extension - change (integration/jenkins-job-builder-config)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Add mw extension jobs for MassMessage extension
..

Add mw extension jobs for MassMessage extension

Change-Id: Id3581adc748c639ebd37d2ada8c776e153c43012
---
M mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/integration/jenkins-job-builder-config 
refs/changes/83/75283/1

diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index fae2352..95aadea 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -277,6 +277,7 @@
  - Maps
  - MapSources
  - MarkAsHelpful
+ - MassMessage
  - Math
  - MobileFrontend
  - MoodBar

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3581adc748c639ebd37d2ada8c776e153c43012
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Change to click Edit source, VE is enabled for anonymous use... - change (qa/browsertests)

2013-07-23 Thread Zfilipin (Code Review)
Zfilipin has submitted this change and it was merged.

Change subject: Change to click Edit source, VE is enabled for anonymous users 
now
..


Change to click Edit source, VE is enabled for anonymous users now

Change-Id: Ia5ace7dcd6f17f1864b4dc10f7e1bf1afd7ef449
---
M features/support/pages/aftv5_page.rb
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/features/support/pages/aftv5_page.rb 
b/features/support/pages/aftv5_page.rb
index d37d073..3733661 100644
--- a/features/support/pages/aftv5_page.rb
+++ b/features/support/pages/aftv5_page.rb
@@ -10,7 +10,7 @@
   a(:all_comments, text: /All comments/)
   a(:back_to_yesno, text: 'Back to step 1')
   span(:create_account, text: 'Create an account')
-  a(:edit, text: 'Edit')
+  a(:edit, text: 'Edit source')
   a(:feedback_page, text: 'feedback page')
   a(:helpful_feedback, href: 
'http://en.wikipedia.org/wiki/Wikipedia:Feedback_guidelines', text: 'helpful 
feedback')
   text_area(:input_area, id: 'articleFeedbackv5-find-feedback')

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5ace7dcd6f17f1864b4dc10f7e1bf1afd7ef449
Gerrit-PatchSet: 2
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Zfilipin zfili...@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] Tweak 'collect_every' and 'name_match' in EL's Ganglia module - change (operations/puppet)

2013-07-23 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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


Change subject: Tweak 'collect_every' and 'name_match' in EL's Ganglia module
..

Tweak 'collect_every' and 'name_match' in EL's Ganglia module

This patch changes 'collect_every' for EL metrics from 10 to 30 seconds. We ran
with that before and it produced smoother graphs. The current value is a bit
too noisy (see https://tinyurl.com/eventlogging).

Also changed the metric names to start with 'eventlogging_' rather than
'zeromq_'. Having 'zeromq_' there is a relic of an earlier version of this
module which implemented generic ZeroMQ PUB monitoring. I decided to make this
EventLogging-specific, so the metric names should match.

Change-Id: I7122cad6e5000cb44fceb91242e4cbd5831b58ae
---
M modules/eventlogging/files/eventlogging_mon.pyconf
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/84/75284/1

diff --git a/modules/eventlogging/files/eventlogging_mon.pyconf 
b/modules/eventlogging/files/eventlogging_mon.pyconf
index 8b80a16..7b9a77b 100644
--- a/modules/eventlogging/files/eventlogging_mon.pyconf
+++ b/modules/eventlogging/files/eventlogging_mon.pyconf
@@ -8,10 +8,10 @@
 }
 
 collection_group {
-collect_every = 10
+collect_every = 30
 time_threshold = 60
 metric {
-name_match = zeromq_(.+)
+name_match = eventlogging_(.+)
 title = \\1
 value_threshold = 0
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7122cad6e5000cb44fceb91242e4cbd5831b58ae
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Give users an error if they try to send a message with no su... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Give users an error if they try to send a message with no 
subject line and/or message body.
..

Give users an error if they try to send a message with no subject line and/or 
message body.

Change-Id: Ifba870a4d6838411602999498c1c10f4a16e14f0
---
M MassMessage.i18n.php
M SpecialMassMessage.php
2 files changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/MassMessage.i18n.php b/MassMessage.i18n.php
index 45cd0ce..723125d 100644
--- a/MassMessage.i18n.php
+++ b/MassMessage.i18n.php
@@ -24,6 +24,8 @@
'massmessage-submitted' = 'Your message has been sent!',
'massmessage-account-blocked' = 'The account used to deliver messages 
has been blocked.',
'massmessage-spamlist-doesnotexist' = 'The specified page-list page 
does not exist.',
+   'massmessage-empty-subject' = 'The subject line is empty.',
+   'massmessage-empty-message' = 'The message body is empty.',
'right-massmessage' = 'Send a message to multiple users at once',
'action-massmessage' = 'send a message to multiple users at once',
'right-massmessage-global' = 'Send a message to multiple users on 
different wikis at once',
@@ -53,6 +55,8 @@
 spamlist?
 
 This message probably means The specified page which contains list of pages, 
does not exist.',
+   'massmessage-empty-subject' = 'Error message the user sees if the 
subject field is empty.',
+   'massmessage-empty-message' = 'Error message the user sees if the 
message field is empty.',
'right-massmessage' = '{{doc-right|massmessage}}
 See also:
 * {{msg-mw|Right-massmessage-global}}',
diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 19fbc2e..7b9c8ed 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -166,6 +166,14 @@
$status-fatal( 'massmessage-account-blocked' );
}
 
+   if ( trim( $data['subject'] ) === '' ) {
+   $status-fatal( 'massmessage-empty-subject');
+   }
+
+   if ( trim( $data['message'] ) === '' ) {
+   $status-fatal( 'massmessage-empty-message');
+   }
+
// If we have any errors, abort.
if ( !$status-isOK() ) {
return $status;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifba870a4d6838411602999498c1c10f4a16e14f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] \SMW\QueryData use HashIdGenerator instead - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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


Change subject: \SMW\QueryData use HashIdGenerator instead
..

\SMW\QueryData use HashIdGenerator instead

Change-Id: I94db16e56a30108c0ed3428cb10248d915b28197
---
M includes/parserhooks/AskParserFunction.php
M includes/query/QueryData.php
M tests/phpunit/includes/query/QueryDataTest.php
3 files changed, 75 insertions(+), 80 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/86/75286/1

diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index 8512054..a1b6287 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -144,11 +144,8 @@
// Add query data from the query
// Suppose the the query returns with an error, right now we 
store
// the query itself even though it returned with unqualified 
data
-   $this-queryData-setQueryId( $rawParams );
-   $this-queryData-add(
-   $this-query,
-   $this-params
-   );
+   $this-queryData-setQueryId( new HashIdGenerator( $rawParams ) 
);
+   $this-queryData-add( $this-query, $this-params );
 
// Store query data to the semantic data instance
$this-parserData-getData()-addPropertyObjectValue(
diff --git a/includes/query/QueryData.php b/includes/query/QueryData.php
index e60706c..3c3a0a7 100644
--- a/includes/query/QueryData.php
+++ b/includes/query/QueryData.php
@@ -68,25 +68,20 @@
}
 
/**
-* Set QueryId
+* Sets QueryId
 *
-* Creates an unique id ( e.g. _QUERYbda2acc317b66b564e39f45e3a18fff3)
-* which normally is based on parameters used in a #ask/#set query
+* Generates an unique id (e.g. _QUERYbda2acc317b66b564e39f45e3a18fff3)
 *
 * @since 1.9
 *
-* @param array $qualifiers
+* @param IdGenerator $generator
 */
-   public function setQueryId( array $qualifiers ) {
-   $this-queryId = str_replace(
-   '_',
-   '_QUERY',
-   $this-subobject-getAnonymousIdentifier( implode( '|', 
$qualifiers ) )
-   );
+   public function setQueryId( IdGenerator $generator ) {
+   $this-queryId = '_QUERY' . $generator-generateId();
}
 
/**
-* Returns query data property
+* Returns the query meta data property
 *
 * @since 1.9
 *
@@ -97,7 +92,7 @@
}
 
/**
-* Returns query data subobject container
+* Returns the query data subobject container
 *
 * @since 1.9
 *
diff --git a/tests/phpunit/includes/query/QueryDataTest.php 
b/tests/phpunit/includes/query/QueryDataTest.php
index 7039bbc..e41d88e 100644
--- a/tests/phpunit/includes/query/QueryDataTest.php
+++ b/tests/phpunit/includes/query/QueryDataTest.php
@@ -2,6 +2,7 @@
 
 namespace SMW\Test;
 
+use SMW\HashIdGenerator;
 use SMW\QueryData;
 
 use SMWQueryProcessor;
@@ -111,29 +112,29 @@
 
/**
 * @test QueryData::add
-* @dataProvider getDataProvider
+* @dataProvider queryDataProvider
 *
 * @since 1.9
 *
 * @param array $params
 * @param array $expected
 */
-   public function testInstantiatedQueryData( array $params, array 
$expected ) {
+   public function testAddQueryData( array $params, array $expected ) {
$title = $this-getTitle();
$instance = $this-getInstance( $title );
 
list( $query, $formattedParams ) = $this-getQueryProcessor( 
$params );
-   $instance-setQueryId( $params );
+   $instance-setQueryId( new HashIdGenerator( $params ) );
$instance-add( $query, $formattedParams );
 
// Check the returned instance
-   $this-assertInstanceOf( 'SMWSemanticData', 
$instance-getContainer()-getSemanticData() );
+   $this-assertInstanceOf( '\SMW\SemanticData', 
$instance-getContainer()-getSemanticData() );
$this-assertSemanticData( 
$instance-getContainer()-getSemanticData(), $expected );
}
 
/**
 * @test QueryData::add (Test instance exception)
-* @dataProvider getDataProvider
+* @dataProvider queryDataProvider
 *
 * @since 1.9
 *
@@ -159,69 +160,71 @@
 *
 * @return array
 */
-   public function getDataProvider() {
-   return array(
+   public function queryDataProvider() {
 
-   // #0
-   // {{#ask: [[Modification date::+]]
-   // 

[MediaWiki-commits] [Gerrit] \SMW\QueryData use HashIdGenerator instead - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: \SMW\QueryData use HashIdGenerator instead
..


\SMW\QueryData use HashIdGenerator instead

Change-Id: I94db16e56a30108c0ed3428cb10248d915b28197
---
M includes/parserhooks/AskParserFunction.php
M includes/query/QueryData.php
M tests/phpunit/includes/query/QueryDataTest.php
3 files changed, 75 insertions(+), 80 deletions(-)

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



diff --git a/includes/parserhooks/AskParserFunction.php 
b/includes/parserhooks/AskParserFunction.php
index 8512054..a1b6287 100644
--- a/includes/parserhooks/AskParserFunction.php
+++ b/includes/parserhooks/AskParserFunction.php
@@ -144,11 +144,8 @@
// Add query data from the query
// Suppose the the query returns with an error, right now we 
store
// the query itself even though it returned with unqualified 
data
-   $this-queryData-setQueryId( $rawParams );
-   $this-queryData-add(
-   $this-query,
-   $this-params
-   );
+   $this-queryData-setQueryId( new HashIdGenerator( $rawParams ) 
);
+   $this-queryData-add( $this-query, $this-params );
 
// Store query data to the semantic data instance
$this-parserData-getData()-addPropertyObjectValue(
diff --git a/includes/query/QueryData.php b/includes/query/QueryData.php
index e60706c..3c3a0a7 100644
--- a/includes/query/QueryData.php
+++ b/includes/query/QueryData.php
@@ -68,25 +68,20 @@
}
 
/**
-* Set QueryId
+* Sets QueryId
 *
-* Creates an unique id ( e.g. _QUERYbda2acc317b66b564e39f45e3a18fff3)
-* which normally is based on parameters used in a #ask/#set query
+* Generates an unique id (e.g. _QUERYbda2acc317b66b564e39f45e3a18fff3)
 *
 * @since 1.9
 *
-* @param array $qualifiers
+* @param IdGenerator $generator
 */
-   public function setQueryId( array $qualifiers ) {
-   $this-queryId = str_replace(
-   '_',
-   '_QUERY',
-   $this-subobject-getAnonymousIdentifier( implode( '|', 
$qualifiers ) )
-   );
+   public function setQueryId( IdGenerator $generator ) {
+   $this-queryId = '_QUERY' . $generator-generateId();
}
 
/**
-* Returns query data property
+* Returns the query meta data property
 *
 * @since 1.9
 *
@@ -97,7 +92,7 @@
}
 
/**
-* Returns query data subobject container
+* Returns the query data subobject container
 *
 * @since 1.9
 *
diff --git a/tests/phpunit/includes/query/QueryDataTest.php 
b/tests/phpunit/includes/query/QueryDataTest.php
index 7039bbc..e41d88e 100644
--- a/tests/phpunit/includes/query/QueryDataTest.php
+++ b/tests/phpunit/includes/query/QueryDataTest.php
@@ -2,6 +2,7 @@
 
 namespace SMW\Test;
 
+use SMW\HashIdGenerator;
 use SMW\QueryData;
 
 use SMWQueryProcessor;
@@ -111,29 +112,29 @@
 
/**
 * @test QueryData::add
-* @dataProvider getDataProvider
+* @dataProvider queryDataProvider
 *
 * @since 1.9
 *
 * @param array $params
 * @param array $expected
 */
-   public function testInstantiatedQueryData( array $params, array 
$expected ) {
+   public function testAddQueryData( array $params, array $expected ) {
$title = $this-getTitle();
$instance = $this-getInstance( $title );
 
list( $query, $formattedParams ) = $this-getQueryProcessor( 
$params );
-   $instance-setQueryId( $params );
+   $instance-setQueryId( new HashIdGenerator( $params ) );
$instance-add( $query, $formattedParams );
 
// Check the returned instance
-   $this-assertInstanceOf( 'SMWSemanticData', 
$instance-getContainer()-getSemanticData() );
+   $this-assertInstanceOf( '\SMW\SemanticData', 
$instance-getContainer()-getSemanticData() );
$this-assertSemanticData( 
$instance-getContainer()-getSemanticData(), $expected );
}
 
/**
 * @test QueryData::add (Test instance exception)
-* @dataProvider getDataProvider
+* @dataProvider queryDataProvider
 *
 * @since 1.9
 *
@@ -159,69 +160,71 @@
 *
 * @return array
 */
-   public function getDataProvider() {
-   return array(
+   public function queryDataProvider() {
 
-   // #0
-   // {{#ask: [[Modification date::+]]
-   // |?Modification date
-   // |format=list
- 

[MediaWiki-commits] [Gerrit] Some \SMW\ namespace clean-up - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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


Change subject: Some \SMW\ namespace clean-up
..

Some \SMW\ namespace clean-up

Change-Id: I298f6b097769d62d34ac0633b6e04c3ed3c2d1d6
---
M includes/Highlighter.php
M includes/SMW_SemanticData.php
M includes/Subobject.php
M includes/utilities/ArrayAccessor.php
M includes/utilities/NamespaceExaminer.php
M includes/utilities/Profiler.php
M tests/phpunit/MockObjectBuilder.php
M tests/phpunit/SemanticMediaWikiTestCase.php
M tests/phpunit/includes/HighlighterTest.php
M tests/phpunit/includes/NamespaceExaminerTest.php
M tests/phpunit/includes/SubobjectTest.php
M tests/phpunit/includes/utilities/ArrayAccessorTest.php
M tests/phpunit/includes/utilities/ProfilerTest.php
13 files changed, 125 insertions(+), 115 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/87/75287/1

diff --git a/includes/Highlighter.php b/includes/Highlighter.php
index b887886..c98e789 100644
--- a/includes/Highlighter.php
+++ b/includes/Highlighter.php
@@ -1,7 +1,14 @@
 ?php
 
 namespace SMW;
-use MWException, IContextSource, Html, SMWOutputs;
+
+use SMWOutputs;
+
+use IContextSource;
+use ContextSource;
+use Html;
+
+use MWException;
 
 /**
  * Highlighter utility function for Semantic MediaWiki
@@ -20,14 +27,20 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
  *
- * @since 1.9
- *
  * @file
- * @ingroup SMW
+ *
+ * @license GNU GPL v2+
+ * @since   1.9
  *
  * @author mwjames
  */
-class Highlighter extends \ContextSource {
+
+/**
+ * Highlighter utility function for Semantic MediaWiki
+ *
+ * @ingroup SMW
+ */
+class Highlighter extends ContextSource {
 
// Highlighter ID for no types
const TYPE_NOTYPE= 0;
diff --git a/includes/SMW_SemanticData.php b/includes/SMW_SemanticData.php
index 4d1706a..f4f9e08 100644
--- a/includes/SMW_SemanticData.php
+++ b/includes/SMW_SemanticData.php
@@ -531,7 +531,7 @@
 }
 
 /**
- * SMWSemanticData class alias
+ * SMW\SemanticData class alias
  *
  * @since 1.9
  */
diff --git a/includes/Subobject.php b/includes/Subobject.php
index ea3e332..e591462 100644
--- a/includes/Subobject.php
+++ b/includes/Subobject.php
@@ -4,9 +4,7 @@
 
 use SMWContainerSemanticData;
 use SMWDIContainer;
-use SMWDIWikiPage;
 use SMWDataValue;
-use SMWDIProperty;
 
 use Title;
 
@@ -28,10 +26,10 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 1.9
- *
  * @file
- * @ingroup SMW
+ *
+ * @license GNU GPL v2+
+ * @since   1.9
  *
  * @author mwjames
  */
@@ -148,7 +146,7 @@
if ( $identifier != '' ) {
$this-identifier = $identifier;
 
-   $diSubWikiPage = new SMWDIWikiPage(
+   $diSubWikiPage = new DIWikiPage(
$this-title-getDBkey(),
$this-title-getNamespace(),
$this-title-getInterwiki(),
@@ -176,10 +174,10 @@
 *
 * @since 1.9
 *
-* @return SMWDIProperty
+* @return DIProperty
 */
public function getProperty() {
-   return new SMWDIProperty( SMWDIProperty::TYPE_SUBOBJECT );
+   return new DIProperty( DIProperty::TYPE_SUBOBJECT );
}
 
/**
@@ -217,7 +215,7 @@
 
wfProfileIn( __METHOD__ );
 
-   if ( $dataValue-getProperty() instanceof SMWDIProperty ) {
+   if ( $dataValue-getProperty() instanceof DIProperty ) {
if ( $dataValue-isValid() ) {
$this-semanticData-addPropertyObjectValue(
$dataValue-getProperty(),
@@ -225,7 +223,7 @@
);
} else {
$this-semanticData-addPropertyObjectValue(
-   new SMWDIProperty( 
SMWDIProperty::TYPE_ERROR ),
+   new DIProperty( DIProperty::TYPE_ERROR 
),

$dataValue-getProperty()-getDiWikiPage()
);
$this-addError( $dataValue-getErrors() );
diff --git a/includes/utilities/ArrayAccessor.php 
b/includes/utilities/ArrayAccessor.php
index a354d62..313aabd 100644
--- a/includes/utilities/ArrayAccessor.php
+++ b/includes/utilities/ArrayAccessor.php
@@ -23,11 +23,11 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 1.9
- *
  * @file
  *
  * @license GNU GPL v2+
+ * @since   1.9
+ *
  * @author mwjames
  */
 interface Accessor {
diff --git a/includes/utilities/NamespaceExaminer.php 

[MediaWiki-commits] [Gerrit] [Annotator] Register extension - change (translatewiki)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [Annotator] Register extension
..


[Annotator] Register extension

Change-Id: I9c619b941560038f9e157215a4a71e5f9d98611f
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 29a1fd2..18fe835 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -31,6 +31,8 @@
 
 All Time Zones
 
+Annotator
+
 Anti Bot
 
 Anti Spoof

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c619b941560038f9e157215a4a71e5f9d98611f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] [Annotator] Register extension - change (translatewiki)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: [Annotator] Register extension
..

[Annotator] Register extension

Change-Id: I9c619b941560038f9e157215a4a71e5f9d98611f
---
M groups/MediaWiki/mediawiki-defines.txt
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/88/75288/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 29a1fd2..18fe835 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -31,6 +31,8 @@
 
 All Time Zones
 
+Annotator
+
 Anti Bot
 
 Anti Spoof

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c619b941560038f9e157215a4a71e5f9d98611f
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Handle MobileFrontendBeforeDOM hook instead of double parsing - change (mediawiki...ZeroRatedMobileAccess)

2013-07-23 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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


Change subject: Handle MobileFrontendBeforeDOM hook instead of double parsing
..

Handle MobileFrontendBeforeDOM hook instead of double parsing

* Removed previous onMinervaPreRender DOM parsing and HTML replacing
* Added onMobileFrontendBeforeDOM handler that uses
formatter-getDoc() to modify DOM object
* For config:showImages==false, optimized execution speed and removed
URL's ?renderZeroRatedBanner=true rewriting
* Removed dead code in external link decoration
* Removed getVersion() call

Change-Id: I8f45e48ea6c3f6860641458c1da544b9067c2477
---
M ZeroRatedMobileAccess.php
M includes/PageRenderingHooks.php
2 files changed, 86 insertions(+), 107 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ZeroRatedMobileAccess 
refs/changes/89/75289/1

diff --git a/ZeroRatedMobileAccess.php b/ZeroRatedMobileAccess.php
index 208877f..08de84f 100644
--- a/ZeroRatedMobileAccess.php
+++ b/ZeroRatedMobileAccess.php
@@ -87,6 +87,7 @@
 $wgHooks['BeforePageDisplayMobile'][] = $ns . 
'PageRenderingHooks::onBeforePageDisplay';
 $wgHooks['GetMobileUrl'][] = $ns . 'PageRenderingHooks::onGetMobileUrl';
 $wgHooks['MinervaPreRender'][] = $ns . 
'PageRenderingHooks::onMinervaPreRender';
+$wgHooks['MobileFrontendBeforeDOM'][] = $ns . 
'PageRenderingHooks::onMobileFrontendBeforeDOM';
 $wgHooks['GetMobileNotice'][] = $ns . 'PageRenderingHooks::onGetMobileNotice';
 
 // Registers hook and content handlers for JSON Zero config pages iff
diff --git a/includes/PageRenderingHooks.php b/includes/PageRenderingHooks.php
index 9ba87cb..3aa68a7 100644
--- a/includes/PageRenderingHooks.php
+++ b/includes/PageRenderingHooks.php
@@ -5,14 +5,16 @@
 use DOMDocument;
 use DOMElement;
 use DOMXPath;
-use Html;
 use FormatJson;
+use Html;
 use Language;
+use MinervaTemplate;
+use MobileContext;
 use OutputPage;
 use RawMessage;
 use ResourceLoader;
-use Title;
 use SkinTemplate;
+use Title;
 use WebRequest;
 
 /**
@@ -50,10 +52,86 @@
}
 
/**
-* @param BaseTemplate $template
+* @param MobileContext $context
+* @param \MobileFormatter $formatter
 * @return bool
 */
-   public static function onMinervaPreRender( BaseTemplate $template ) {
+   public static function onMobileFrontendBeforeDOM( MobileContext 
$context, \MobileFormatter $formatter ) {
+
+   if ( !self::isZeroSite() ) {
+   return true;
+   }
+
+   global $wgRequest;
+
+   wfProfileIn( __METHOD__ );
+   $isFilePage = $context-getTitle()-inNamespace( NS_FILE );
+
+   $doc = $formatter-getDoc();
+   $xpath = new DOMXpath( $doc );
+   $config = self::getConfig();
+
+   if ( !$isFilePage  self::disableImages() ) {
+   $tagToReplaceNodes = $doc-getElementsByTagName( 'img' 
);
+   $tagToReplaceNodesCollection = array();
+   /* @var $tagToReplaceNode DOMElement */
+   foreach ( $tagToReplaceNodes as $tagToReplaceNode ) {
+   if ( $tagToReplaceNode ) {
+   $alt = $tagToReplaceNode-getAttribute( 
'alt' );
+   $spanNodeText = wfMessage(
+   
'zero-rated-mobile-access-click-to-view-image',
+   lcfirst( substr( $alt, 0, 40 ) )
+   )-text();
+   $spanNode = $doc-createElement( 
span, str_replace( , amp;, $spanNodeText ) );
+   if ( $alt ) {
+   $spanNode-setAttribute( 
'title', $alt );
+   }
+   $tagToReplaceNodesCollection[] = array( 
'tagToReplaceNode' = $tagToReplaceNode, 'spanNode' = $spanNode );
+   }
+   }
+
+   foreach ( $tagToReplaceNodesCollection as $element ) {
+   
$element['tagToReplaceNode']-parentNode-replaceChild( $element['spanNode'], 
$element['tagToReplaceNode'] );
+   }
+   }
+
+   if ( !$config['showImages'] ) {
+   $zeroRatedLinks = $xpath-query( //a[@class='image'] 
);
+   /* @var $zeroRatedLink DOMElement */
+   foreach ( $zeroRatedLinks as $zeroRatedLink ) {
+   $zeroRatedLinkHref = 
$zeroRatedLink-getAttribute( 'href' );
+   if ( $zeroRatedLinkHref  substr( 
$zeroRatedLinkHref, 0, 1 ) !== '#' ) {
+   $zeroPartnerUrl = 

[MediaWiki-commits] [Gerrit] Some \SMW\ namespace clean-up - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Some \SMW\ namespace clean-up
..


Some \SMW\ namespace clean-up

Change-Id: I298f6b097769d62d34ac0633b6e04c3ed3c2d1d6
---
M includes/Highlighter.php
M includes/SMW_SemanticData.php
M includes/Subobject.php
M includes/utilities/ArrayAccessor.php
M includes/utilities/NamespaceExaminer.php
M includes/utilities/Profiler.php
M tests/phpunit/MockObjectBuilder.php
M tests/phpunit/SemanticMediaWikiTestCase.php
M tests/phpunit/includes/HighlighterTest.php
M tests/phpunit/includes/NamespaceExaminerTest.php
M tests/phpunit/includes/SubobjectTest.php
M tests/phpunit/includes/utilities/ArrayAccessorTest.php
M tests/phpunit/includes/utilities/ProfilerTest.php
13 files changed, 125 insertions(+), 115 deletions(-)

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



diff --git a/includes/Highlighter.php b/includes/Highlighter.php
index b887886..c98e789 100644
--- a/includes/Highlighter.php
+++ b/includes/Highlighter.php
@@ -1,7 +1,14 @@
 ?php
 
 namespace SMW;
-use MWException, IContextSource, Html, SMWOutputs;
+
+use SMWOutputs;
+
+use IContextSource;
+use ContextSource;
+use Html;
+
+use MWException;
 
 /**
  * Highlighter utility function for Semantic MediaWiki
@@ -20,14 +27,20 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
  *
- * @since 1.9
- *
  * @file
- * @ingroup SMW
+ *
+ * @license GNU GPL v2+
+ * @since   1.9
  *
  * @author mwjames
  */
-class Highlighter extends \ContextSource {
+
+/**
+ * Highlighter utility function for Semantic MediaWiki
+ *
+ * @ingroup SMW
+ */
+class Highlighter extends ContextSource {
 
// Highlighter ID for no types
const TYPE_NOTYPE= 0;
diff --git a/includes/SMW_SemanticData.php b/includes/SMW_SemanticData.php
index 4d1706a..f4f9e08 100644
--- a/includes/SMW_SemanticData.php
+++ b/includes/SMW_SemanticData.php
@@ -531,7 +531,7 @@
 }
 
 /**
- * SMWSemanticData class alias
+ * SMW\SemanticData class alias
  *
  * @since 1.9
  */
diff --git a/includes/Subobject.php b/includes/Subobject.php
index ea3e332..e591462 100644
--- a/includes/Subobject.php
+++ b/includes/Subobject.php
@@ -4,9 +4,7 @@
 
 use SMWContainerSemanticData;
 use SMWDIContainer;
-use SMWDIWikiPage;
 use SMWDataValue;
-use SMWDIProperty;
 
 use Title;
 
@@ -28,10 +26,10 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 1.9
- *
  * @file
- * @ingroup SMW
+ *
+ * @license GNU GPL v2+
+ * @since   1.9
  *
  * @author mwjames
  */
@@ -148,7 +146,7 @@
if ( $identifier != '' ) {
$this-identifier = $identifier;
 
-   $diSubWikiPage = new SMWDIWikiPage(
+   $diSubWikiPage = new DIWikiPage(
$this-title-getDBkey(),
$this-title-getNamespace(),
$this-title-getInterwiki(),
@@ -176,10 +174,10 @@
 *
 * @since 1.9
 *
-* @return SMWDIProperty
+* @return DIProperty
 */
public function getProperty() {
-   return new SMWDIProperty( SMWDIProperty::TYPE_SUBOBJECT );
+   return new DIProperty( DIProperty::TYPE_SUBOBJECT );
}
 
/**
@@ -217,7 +215,7 @@
 
wfProfileIn( __METHOD__ );
 
-   if ( $dataValue-getProperty() instanceof SMWDIProperty ) {
+   if ( $dataValue-getProperty() instanceof DIProperty ) {
if ( $dataValue-isValid() ) {
$this-semanticData-addPropertyObjectValue(
$dataValue-getProperty(),
@@ -225,7 +223,7 @@
);
} else {
$this-semanticData-addPropertyObjectValue(
-   new SMWDIProperty( 
SMWDIProperty::TYPE_ERROR ),
+   new DIProperty( DIProperty::TYPE_ERROR 
),

$dataValue-getProperty()-getDiWikiPage()
);
$this-addError( $dataValue-getErrors() );
diff --git a/includes/utilities/ArrayAccessor.php 
b/includes/utilities/ArrayAccessor.php
index a354d62..313aabd 100644
--- a/includes/utilities/ArrayAccessor.php
+++ b/includes/utilities/ArrayAccessor.php
@@ -23,11 +23,11 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
- * @since 1.9
- *
  * @file
  *
  * @license GNU GPL v2+
+ * @since   1.9
+ *
  * @author mwjames
  */
 interface Accessor {
diff --git a/includes/utilities/NamespaceExaminer.php 
b/includes/utilities/NamespaceExaminer.php
index 0a4c044..6f160e9 

[MediaWiki-commits] [Gerrit] Define message array to unbreak translatewiki.net script - change (mediawiki...Annotator)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: Define message array to unbreak translatewiki.net script
..

Define message array to unbreak translatewiki.net script

Change-Id: I245469be1b0d6931c65c3a35876ec7f53e83675b
---
M Annotator.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/Annotator.i18n.php b/Annotator.i18n.php
index a4f3c78..1dd877f 100644
--- a/Annotator.i18n.php
+++ b/Annotator.i18n.php
@@ -6,6 +6,8 @@
  * @ingroup extensions
  */
 
+$messages = array();
+
 /**
  * English
  * @author Richa Jain

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I245469be1b0d6931c65c3a35876ec7f53e83675b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Define message array to unbreak translatewiki.net script - change (mediawiki...Annotator)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: Define message array to unbreak translatewiki.net script
..


Define message array to unbreak translatewiki.net script

Change-Id: I245469be1b0d6931c65c3a35876ec7f53e83675b
---
M Annotator.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/Annotator.i18n.php b/Annotator.i18n.php
index a4f3c78..1dd877f 100644
--- a/Annotator.i18n.php
+++ b/Annotator.i18n.php
@@ -6,6 +6,8 @@
  * @ingroup extensions
  */
 
+$messages = array();
+
 /**
  * English
  * @author Richa Jain

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I245469be1b0d6931c65c3a35876ec7f53e83675b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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] Fixed incorrect doc. - change (mediawiki...WikibaseDatabase)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fixed incorrect doc.
..


Fixed incorrect doc.

Change-Id: Id004e80eddd3d81c6f0909a4f57abfc9d7639674
---
M src/QueryInterface.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/src/QueryInterface.php b/src/QueryInterface.php
index e7fe2f8..c9378e2 100644
--- a/src/QueryInterface.php
+++ b/src/QueryInterface.php
@@ -45,7 +45,7 @@
 *
 * @param string $tableName
 *
-* @return boolean Success indicator
+* @throws TableCreationFailedException
 */
public function dropTable( $tableName );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id004e80eddd3d81c6f0909a4f57abfc9d7639674
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseDatabase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@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 newline at end of file to unbreak twn script - change (mediawiki...Annotator)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: Add newline at end of file to unbreak twn script
..


Add newline at end of file to unbreak twn script

Change-Id: Iec2130870a3db74b30a5e5d42388c84a317ee1ea
---
M Annotator.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/Annotator.i18n.php b/Annotator.i18n.php
index 1dd877f..24a8d88 100644
--- a/Annotator.i18n.php
+++ b/Annotator.i18n.php
@@ -22,4 +22,4 @@
  */
 $messages['qqq'] = array(
'annotator-desc' = '{{desc}}',
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec2130870a3db74b30a5e5d42388c84a317ee1ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@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 newline at end of file to unbreak twn script - change (mediawiki...Annotator)

2013-07-23 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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


Change subject: Add newline at end of file to unbreak twn script
..

Add newline at end of file to unbreak twn script

Change-Id: Iec2130870a3db74b30a5e5d42388c84a317ee1ea
---
M Annotator.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Annotator 
refs/changes/91/75291/1

diff --git a/Annotator.i18n.php b/Annotator.i18n.php
index 1dd877f..24a8d88 100644
--- a/Annotator.i18n.php
+++ b/Annotator.i18n.php
@@ -22,4 +22,4 @@
  */
 $messages['qqq'] = array(
'annotator-desc' = '{{desc}}',
-);
\ No newline at end of file
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec2130870a3db74b30a5e5d42388c84a317ee1ea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Annotator
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] sysops can now add/remove the messenger group, but can no ... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: sysops can now add/remove the messenger group, but can no 
longer send messages themselves.
..

sysops can now add/remove the messenger group, but can no longer send 
messages themselves.

Also added the proper i18n messages for the group.

Change-Id: I8b8c5554a1696b04b1b86f189d8c5df2534409af
---
M MassMessage.i18n.php
M MassMessage.php
2 files changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/MassMessage.i18n.php b/MassMessage.i18n.php
index 45cd0ce..526a783 100644
--- a/MassMessage.i18n.php
+++ b/MassMessage.i18n.php
@@ -27,6 +27,9 @@
'right-massmessage' = 'Send a message to multiple users at once',
'action-massmessage' = 'send a message to multiple users at once',
'right-massmessage-global' = 'Send a message to multiple users on 
different wikis at once',
+   'group-messenger' = 'Messengers',
+   'group-messenger-member' = 'messenger',
+   'grouppage-messenger' = 'Project:Messengers',
'log-name-massmessage' = 'Mass message log',
'log-description-massmessage' = 'These events track users sending 
messages through [[Special:MassMessage]].',
'logentry-massmessage-send' = '$1 {{GENDER:$2|sent a message}} to $3',
@@ -60,6 +63,9 @@
'right-massmessage-global' = '{{doc-right|massmessage-global}}
 See also:
 * {{msg-mw|Right-massmessage}}',
+   'group-messenger' = '{{doc-group|messenger}}',
+   'group-messenger-member' = '{{doc-group|messenger|member}}',
+   'grouppage-messenger' = '{{doc-group|messenger|page}}',
'log-name-massmessage' = 'Log page title',
'log-description-massmessage' = 'Log page description',
'logentry-massmessage-send' = '{{logentry}}',
diff --git a/MassMessage.php b/MassMessage.php
index 1752a90..272138b 100644
--- a/MassMessage.php
+++ b/MassMessage.php
@@ -64,4 +64,5 @@
 $wgAvailableRights[] = 'massmessage'; // Local messaging
 $wgAvailableRights[] = 'massmessage-global'; // Cross-wiki messaging
 $wgGroupPermissions['messenger']['massmessage'] = true;
-$wgGroupPermissions['sysop']['massmessage'] = true;
+$wgAddGroups['sysop'][] = 'messenger';
+$wgRemoveGroups['sysop'][] = 'messenger';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8b8c5554a1696b04b1b86f189d8c5df2534409af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Clarify post-submit message that the messages have been queu... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Clarify post-submit message that the messages have been queued, 
not sent.
..

Clarify post-submit message that the messages have been queued, not sent.

Change-Id: Ic53ff1e9ba172e8c01fb5540d7803e2c06e76c1f
---
M MassMessage.i18n.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/93/75293/1

diff --git a/MassMessage.i18n.php b/MassMessage.i18n.php
index 45cd0ce..dfd8ad2 100644
--- a/MassMessage.i18n.php
+++ b/MassMessage.i18n.php
@@ -21,7 +21,7 @@
'massmessage-form-message' = 'Body of the message:',
'massmessage-form-global' = 'This is a global message.',
'massmessage-form-submit' = 'Send',
-   'massmessage-submitted' = 'Your message has been sent!',
+   'massmessage-submitted' = 'Your message has been queued!',
'massmessage-account-blocked' = 'The account used to deliver messages 
has been blocked.',
'massmessage-spamlist-doesnotexist' = 'The specified page-list page 
does not exist.',
'right-massmessage' = 'Send a message to multiple users at once',
@@ -46,7 +46,7 @@
'massmessage-form-global' = 'Label for a checkbox on the special 
page.',
'massmessage-form-submit' = 'Label for the submit button on the 
special page.
 {{Identical|Send}}',
-   'massmessage-submitted' = 'Confirmation message the user sees after 
the form is submitted successfully.',
+   'massmessage-submitted' = 'Confirmation message the user sees after 
the form is submitted successfully and the request is queued in the Job Queue.',
'massmessage-account-blocked' = 'Error message the user sees if the 
bot account has been blocked.',
'massmessage-spamlist-doesnotexist' = 'Error message the user sees if 
an invalid spamlist is provided.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic53ff1e9ba172e8c01fb5540d7803e2c06e76c1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] If the page doesn't exist or is invalid, don't bother checki... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: If the page doesn't exist or is invalid, don't bother checking 
redirects
..

If the page doesn't exist or is invalid, don't bother checking redirects

Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
---
M SpecialMassMessage.php
1 file changed, 8 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/94/75294/1

diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 19fbc2e..ff0fce5 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -149,15 +149,16 @@
$errors = array();
if ( $spamlist === null || !$spamlist-exists() ) {
$status-fatal( 'massmessage-spamlist-doesnotexist' );
+   } else {
+   // Page exists, follow a redirect if possible
+   $target = MassMessage::followRedirect( $spamlist );
+   if ( $target === null || !$target-exists() ) {
+   $status-fatal( 
'massmessage-spamlist-doesnotexist' ); // Interwiki redirect or non-existent 
page.
+   } else {
+   $spamlist = $target;
+   }
}
 
-   // Follow a redirect if possible
-   $target = MassMessage::followRedirect( $spamlist );
-   if ( $target === null || !$target-exists() ) {
-   $status-fatal( 'massmessage-spamlist-doesnotexist' ); 
// Interwiki redirect or non-existent page.
-   } else {
-   $spamlist = $target;
-   }
 
// Check that our account hasn't been blocked.
$user = MassMessage::getMessengerUser();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] If the page doesn't exist or is invalid, don't bother checki... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has submitted this change and it was merged.

Change subject: If the page doesn't exist or is invalid, don't bother checking 
redirects
..


If the page doesn't exist or is invalid, don't bother checking redirects

Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
---
M SpecialMassMessage.php
1 file changed, 8 insertions(+), 7 deletions(-)

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



diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 19fbc2e..ff0fce5 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -149,15 +149,16 @@
$errors = array();
if ( $spamlist === null || !$spamlist-exists() ) {
$status-fatal( 'massmessage-spamlist-doesnotexist' );
+   } else {
+   // Page exists, follow a redirect if possible
+   $target = MassMessage::followRedirect( $spamlist );
+   if ( $target === null || !$target-exists() ) {
+   $status-fatal( 
'massmessage-spamlist-doesnotexist' ); // Interwiki redirect or non-existent 
page.
+   } else {
+   $spamlist = $target;
+   }
}
 
-   // Follow a redirect if possible
-   $target = MassMessage::followRedirect( $spamlist );
-   if ( $target === null || !$target-exists() ) {
-   $status-fatal( 'massmessage-spamlist-doesnotexist' ); 
// Interwiki redirect or non-existent page.
-   } else {
-   $spamlist = $target;
-   }
 
// Check that our account hasn't been blocked.
$user = MassMessage::getMessengerUser();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9434fd171cfd7ce362a2577c0d5b77c69b63e792
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove addPropertyValue logic from ParserData (further compa... - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread Mwjames (Code Review)
Mwjames has uploaded a new change for review.

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


Change subject: Remove addPropertyValue logic from ParserData (further 
compartmentalize of ParserData)
..

Remove addPropertyValue logic from ParserData (further compartmentalize of 
ParserData)

Move addPropertyValue logic into the SemanticData addDataValue method.

The logic provided by addPropertyValue has no real contract to the
ParserData object (but due to legacy conformism was transferred from
SMWParseData into ParserData which dilutes the responsibility of the
ParserData object)

addPropertyValue should be removed from the ParserData but this
needs to be done in a follow up in order to keep tests stable.

Change-Id: I12b197e7b589561c03b8c44c07be5b763f82c307
---
M includes/ParserData.php
M includes/SMW_SemanticData.php
M includes/Subobject.php
M tests/phpunit/includes/SemanticDataTest.php
4 files changed, 184 insertions(+), 48 deletions(-)


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

diff --git a/includes/ParserData.php b/includes/ParserData.php
index 0acc9c8..d4dd7a5 100644
--- a/includes/ParserData.php
+++ b/includes/ParserData.php
@@ -311,18 +311,12 @@
}
 
/**
-* This method adds a data value to the semantic data container
+* Adds a data value to the semantic data container
 *
 * @par Example:
 * @code
-* $parserData = new SMW\ParserData(
-*  $parser-getTitle(),
-*  $parser-getOutput(),
-*  $settings;
-* )
-*
-* $dataValue = SMWDataValueFactory::newPropertyValue( $userProperty, 
$userValue )
-* $parserData-addPropertyValue( $dataValue )
+*  $dataValue = DataValueFactory::newPropertyValue( $userProperty, 
$userValue )
+*  $parserData-addPropertyValue( $dataValue )
 * @endcode
 *
 * @since 1.9
@@ -330,26 +324,11 @@
 * @param SMWDataValue $dataValue
 */
public function addPropertyValue( SMWDataValue $dataValue ) {
-   Profiler::In(  __METHOD__, true );
 
-   if ( $dataValue-getProperty() instanceof SMWDIProperty ) {
-   if ( !$dataValue-isValid() ) {
-   $this-semanticData-addPropertyObjectValue(
-   new SMWDIProperty( 
SMWDIProperty::TYPE_ERROR ),
-   
$dataValue-getProperty()-getDiWikiPage()
-   );
-   $this-addError( $dataValue-getErrors() );
-   } else {
-   $this-semanticData-addPropertyObjectValue(
-   $dataValue-getProperty(),
-   $dataValue-getDataItem()
-   );
-   }
-   } else {
-   $this-addError( $dataValue-getErrors() );
-   }
-
-   Profiler::Out( __METHOD__, true );
+   // FIXME Remove the addPropertyValue method from
+   // the ParserData object
+   $this-semanticData-addDataValue( $dataValue );
+   $this-addError( $this-semanticData-getErrors() );
}
 
/**
diff --git a/includes/SMW_SemanticData.php b/includes/SMW_SemanticData.php
index f4f9e08..6a63b36 100644
--- a/includes/SMW_SemanticData.php
+++ b/includes/SMW_SemanticData.php
@@ -118,6 +118,9 @@
 */
protected $subDataAllowed = true;
 
+   /** @var array */
+   protected $errors = array();
+
/**
 * Constructor.
 *
@@ -182,6 +185,28 @@
} else {
return array();
}
+   }
+
+   /**
+* Returns collected errors occurred during processing
+*
+* @since 1.9
+*
+* @return array
+*/
+   public function getErrors() {
+   return $this-errors;
+   }
+
+   /**
+* Adds an error array
+*
+* @since  1.9
+*
+* @return array
+*/
+   public function addError( array $errors ) {
+   return $this-errors = array_merge( $errors, $this-errors );
}
 
/**
@@ -332,6 +357,42 @@
}
 
/**
+* Adds a DataValue object to the semantic data container
+*
+* @par Example:
+* @code
+*  $dataValue = DataValueFactory::newPropertyValue( $userProperty, 
$userValue )
+*  $semanticData-addDataValue( $dataValue )
+* @endcode
+*
+* @since 1.9
+*
+* @param DataValue $dataValue
+*/
+   public function addDataValue( SMWDataValue $dataValue ) {
+   \SMW\Profiler::In(  __METHOD__, true );
+
+   if ( 

[MediaWiki-commits] [Gerrit] Disable backend request queuing on the frontend layer - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Disable backend request queuing on the frontend layer
..

Disable backend request queuing on the frontend layer

This might be related to the session leak.

Change-Id: Id16136883910daef0e2a021e66c0338deae56ce7
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/96/75296/1

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index ad31d10..35926cd 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -86,6 +86,10 @@
}
 }
 
+sub vcl_hash {
+   set req.hash_ignore_busy = true;
+}
+
 sub vcl_fetch {
set beresp.http.X-Device = req.http.X-Device;
set beresp.http.X-CS = req.http.X-CS;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id16136883910daef0e2a021e66c0338deae56ce7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Disable backend request queuing on the frontend layer - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Disable backend request queuing on the frontend layer
..


Disable backend request queuing on the frontend layer

This might be related to the session leak.

Change-Id: Id16136883910daef0e2a021e66c0338deae56ce7
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index ad31d10..35926cd 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -86,6 +86,10 @@
}
 }
 
+sub vcl_hash {
+   set req.hash_ignore_busy = true;
+}
+
 sub vcl_fetch {
set beresp.http.X-Device = req.http.X-Device;
set beresp.http.X-CS = req.http.X-CS;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id16136883910daef0e2a021e66c0338deae56ce7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Disable the hit_for_pass action on ttl = 0 objects - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Disable the hit_for_pass action on ttl = 0 objects
..

Disable the hit_for_pass action on ttl = 0 objects

For testing

Change-Id: Icc42df70f43adb70ab9e76d4976ca79de9b58445
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/97/75297/1

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 35926cd..1d96382 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -102,10 +102,12 @@
set beresp.ttl = 60 s;
}
 
+/*
if (beresp.ttl = 0s) {
set beresp.ttl = 120s;
return (hit_for_pass);
}
+*/
return (deliver);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icc42df70f43adb70ab9e76d4976ca79de9b58445
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Disable the hit_for_pass action on ttl = 0 objects - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Disable the hit_for_pass action on ttl = 0 objects
..


Disable the hit_for_pass action on ttl = 0 objects

For testing

Change-Id: Icc42df70f43adb70ab9e76d4976ca79de9b58445
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 35926cd..1d96382 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -102,10 +102,12 @@
set beresp.ttl = 60 s;
}
 
+/*
if (beresp.ttl = 0s) {
set beresp.ttl = 120s;
return (hit_for_pass);
}
+*/
return (deliver);
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc42df70f43adb70ab9e76d4976ca79de9b58445
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Set req.hash_ignore_busy in vcl_recv instead - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Set req.hash_ignore_busy in vcl_recv instead
..

Set req.hash_ignore_busy in vcl_recv instead

Change-Id: I60ad50060e7c24833959b3eea34cdcbd4893b8d5
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 1d96382..a64e7f8 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -84,9 +84,7 @@
if ( req.http.host ~ ^test\. ) {
return (pass);
}
-}
 
-sub vcl_hash {
set req.hash_ignore_busy = true;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I60ad50060e7c24833959b3eea34cdcbd4893b8d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Set req.hash_ignore_busy in vcl_recv instead - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Set req.hash_ignore_busy in vcl_recv instead
..


Set req.hash_ignore_busy in vcl_recv instead

Change-Id: I60ad50060e7c24833959b3eea34cdcbd4893b8d5
---
M templates/varnish/mobile-frontend.inc.vcl.erb
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 1d96382..a64e7f8 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -84,9 +84,7 @@
if ( req.http.host ~ ^test\. ) {
return (pass);
}
-}
 
-sub vcl_hash {
set req.hash_ignore_busy = true;
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I60ad50060e7c24833959b3eea34cdcbd4893b8d5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] [WIP] Edit via the API - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: [WIP] Edit via the API
..

[WIP] Edit via the API

Change-Id: Ib51f2f4a65a45d70e278c13c198733fd47bc3229
---
M MassMessageJob.php
1 file changed, 22 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/99/75299/1

diff --git a/MassMessageJob.php b/MassMessageJob.php
index 79be647..5584a86 100644
--- a/MassMessageJob.php
+++ b/MassMessageJob.php
@@ -93,17 +93,29 @@
return true;
}
 
-   // Mark the edit as bot
-   $flags = $flags | EDIT_FORCE_BOT;
-
-   $status = $talkPage-doEditContent(
-   ContentHandler::makeContent( $text, $this-title ),
-   $this-params['subject'],
-   $flags,
-   false,
-   $user
-   );
+   $this-editPage();
 
return $status-isGood();
}
+
+   function editPage() {
+   $api = new ApiMain(
+   new FauxRequest(
+   array(
+   'action' = 'edit',
+   'title'   = 
$this-title-getFullText(),
+   'section' = 'new',
+   'summary' = $this-params['subject'],
+   'text' = $this-params['message'],
+   'notminor'   = true,
+   'bot' = true,
+   'token' = '', // ???
+   ),
+   true // was posted?
+   ),
+   true // enable write?
+   );
+ 
+   $api-execute();
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib51f2f4a65a45d70e278c13c198733fd47bc3229
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Set form's display format to div. This moves the labels on... - change (mediawiki...MassMessage)

2013-07-23 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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


Change subject: Set form's display format to div. This moves the labels on 
top of the fields.
..

Set form's display format to div. This moves the labels on top of the fields.

Change-Id: I2f9df03dec732cce17999850a749dce7a7a7e23b
---
M SpecialMassMessage.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/SpecialMassMessage.php b/SpecialMassMessage.php
index 19fbc2e..6e4 100644
--- a/SpecialMassMessage.php
+++ b/SpecialMassMessage.php
@@ -25,6 +25,7 @@
$context = $this-getContext();
$form = new HtmlForm( $this-createForm(), $context );
$form-setId( 'massmessage-form' );
+   $form-setDisplayFormat( 'div' );
$form-setSubmitText( $context-msg( 'massmessage-form-submit' 
)-text() );
$form-setSubmitId( 'massmessage-submit' );
$form-setSubmitCallback( array( $this, 'submit' ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f9df03dec732cce17999850a749dce7a7a7e23b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com

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


[MediaWiki-commits] [Gerrit] Initial commit and setup of git review - change (operations...latexml)

2013-07-23 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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


Change subject: Initial commit and setup of git review
..

Initial commit and setup of git review

Project description:
Stable repository clone of LaTeXML-psgi

(by Bruce Miller, Deyan Ginev et al.) from 
https://svn.mathweb.org/repos/LaTeXML/branches/psgi-webapp/
* Customizations to the needs of Mediawiki i.e. enabling of
** texvc
** mwsd (for search)
* Intended as source for a debian package latexml-psgi

Change-Id: Ic6109987e045009df96fbfe10be6b7174a9209c3
---
A .gitreview
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/latexml 
refs/changes/01/75301/1

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..7957343
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,5 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=operations/debs/latexml.git
+defaultbranch=master
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic6109987e045009df96fbfe10be6b7174a9209c3
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/latexml
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Remove some unwanted top RL module definitions - change (mediawiki...UniversalLanguageSelector)

2013-07-23 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Remove some unwanted top RL module definitions
..

Remove some unwanted top RL module definitions

Change-Id: I7ae638fa606a68b93519dea726725d0dc714811e
---
M Resources.php
1 file changed, 0 insertions(+), 4 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 5e80ac5..602c890 100644
--- a/Resources.php
+++ b/Resources.php
@@ -173,13 +173,11 @@
'jquery.uls.grid',
'jquery.uls.data',
),
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.compact'] = array(
'styles' = 'lib/jquery.uls/css/jquery.uls.compact.css',
'dependencies' = 'jquery.uls',
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.data'] = array(
@@ -187,12 +185,10 @@
'lib/jquery.uls/src/jquery.uls.data.js',
'lib/jquery.uls/src/jquery.uls.data.utils.js',
),
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.grid'] = array(
'styles' = 'lib/jquery.uls/css/jquery.uls.grid.css',
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.webfonts'] = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ae638fa606a68b93519dea726725d0dc714811e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com

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


[MediaWiki-commits] [Gerrit] more dumps written to dataset1001, update rsync script, also... - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: more dumps written to dataset1001, update rsync script, also 
fix comments
..

more dumps written to dataset1001, update rsync script, also fix comments

Change-Id: Id80ba1b1082b8ed7d112cb9e1a81e335a70b2bbd
---
M files/misc/scripts/rsync-dumps.sh
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/04/75304/1

diff --git a/files/misc/scripts/rsync-dumps.sh 
b/files/misc/scripts/rsync-dumps.sh
index 0fb703e..3969543 100755
--- a/files/misc/scripts/rsync-dumps.sh
+++ b/files/misc/scripts/rsync-dumps.sh
@@ -54,15 +54,15 @@
 
 case $HOST in
 'dataset1001' )
-   # all dumps are produced on this host except these
-   DIRS=( '/enwiki/' ) # must have leading/trailing slash
-   DIRARGS=${DIRS[@]/#/--include=}
+   # directories for which this host produces dumps
+   DIRS=( '/enwiki/' '/ruwiki/' '/eswiki/' '/dewiki/' '/ptwiki/' 
'/plwiki/' '/nlwiki/' '/frwiki/' '/itwiki/' '/jawiki/' ) # must have 
leading/trailing slash
+   DIRARGS=( ${DIRS[@]/#/--include=} )
EXTRAARGS=( ${DIRARGS[@]} ${DIRARGS[@]/%/**} '--exclude=*' )
do_rsyncs
;;
 'dataset2' )
-   # directories for which this host produces dumps
-   DIRS=( '/enwiki/' ) # must have leading/trailing slash
+   # all dumps are produced on this host except these
+   DIRS=( '/enwiki/' '/ruwiki/' '/eswiki/' '/dewiki/' '/ptwiki/' 
'/plwiki/' '/nlwiki/' '/frwiki/' '/itwiki/' '/jawiki/' ) # must have 
leading/trailing slash
EXTRAARGS=( ${DIRS[@]/#/--exclude=} )
do_rsyncs
;;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id80ba1b1082b8ed7d112cb9e1a81e335a70b2bbd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Append the Varnish default internal vcl_recv - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Append the Varnish default internal vcl_recv
..

Append the Varnish default internal vcl_recv

It turns out that the mobile caches have been using (and relying)
on the default vcl_recv function that's appended by Varnish.
XFF handling is done there, and caching is killed for any and all
requests containing a Cookie header...

Appending it explicitly for visibility, and to allow removing it
one bit at a time.

Change-Id: I24287cb3bb4f1d88e6c4db6e99713984b35fe0a9
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 58 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/75303/1

diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 0758db1..5a95113 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -17,6 +17,35 @@
set req.backend = api;
}
 % end -%
+
+   /* Default Varnish vcl_recv function */
+   if (req.restarts == 0) {
+   if (req.http.x-forwarded-for) {
+   set req.http.X-Forwarded-For =
+   req.http.X-Forwarded-For + ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+   if (req.request != GET 
+   req.request != HEAD 
+   req.request != PUT 
+   req.request != POST 
+   req.request != TRACE 
+   req.request != OPTIONS 
+   req.request != DELETE) {
+   /* Non-RFC2616 or CONNECT which is weird. */
+   return (pipe);
+   }
+   if (req.request != GET  req.request != HEAD) {
+   /* We only deal with GET and HEAD by default */
+   return (pass);
+   }
+   if (req.http.Authorization || req.http.Cookie) {
+   /* Not cacheable by default */
+   return (pass);
+   }
+   return (lookup);
 }
 
 sub vcl_fetch {
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index a64e7f8..8c81ce7 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -86,6 +86,35 @@
}
 
set req.hash_ignore_busy = true;
+
+   /* Default Varnish vcl_recv function */
+   if (req.restarts == 0) {
+   if (req.http.x-forwarded-for) {
+   set req.http.X-Forwarded-For =
+   req.http.X-Forwarded-For + ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+   if (req.request != GET 
+   req.request != HEAD 
+   req.request != PUT 
+   req.request != POST 
+   req.request != TRACE 
+   req.request != OPTIONS 
+   req.request != DELETE) {
+   /* Non-RFC2616 or CONNECT which is weird. */
+   return (pipe);
+   }
+   if (req.request != GET  req.request != HEAD) {
+   /* We only deal with GET and HEAD by default */
+   return (pass);
+   }
+   if (req.http.Authorization || req.http.Cookie) {
+   /* Not cacheable by default */
+   return (pass);
+   }
+   return (lookup);
 }
 
 sub vcl_fetch {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I24287cb3bb4f1d88e6c4db6e99713984b35fe0a9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] more dumps written to dataset1001, update rsync script, also... - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: more dumps written to dataset1001, update rsync script, also 
fix comments
..


more dumps written to dataset1001, update rsync script, also fix comments

Change-Id: Id80ba1b1082b8ed7d112cb9e1a81e335a70b2bbd
---
M files/misc/scripts/rsync-dumps.sh
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/files/misc/scripts/rsync-dumps.sh 
b/files/misc/scripts/rsync-dumps.sh
index 0fb703e..3969543 100755
--- a/files/misc/scripts/rsync-dumps.sh
+++ b/files/misc/scripts/rsync-dumps.sh
@@ -54,15 +54,15 @@
 
 case $HOST in
 'dataset1001' )
-   # all dumps are produced on this host except these
-   DIRS=( '/enwiki/' ) # must have leading/trailing slash
-   DIRARGS=${DIRS[@]/#/--include=}
+   # directories for which this host produces dumps
+   DIRS=( '/enwiki/' '/ruwiki/' '/eswiki/' '/dewiki/' '/ptwiki/' 
'/plwiki/' '/nlwiki/' '/frwiki/' '/itwiki/' '/jawiki/' ) # must have 
leading/trailing slash
+   DIRARGS=( ${DIRS[@]/#/--include=} )
EXTRAARGS=( ${DIRARGS[@]} ${DIRARGS[@]/%/**} '--exclude=*' )
do_rsyncs
;;
 'dataset2' )
-   # directories for which this host produces dumps
-   DIRS=( '/enwiki/' ) # must have leading/trailing slash
+   # all dumps are produced on this host except these
+   DIRS=( '/enwiki/' '/ruwiki/' '/eswiki/' '/dewiki/' '/ptwiki/' 
'/plwiki/' '/nlwiki/' '/frwiki/' '/itwiki/' '/jawiki/' ) # must have 
leading/trailing slash
EXTRAARGS=( ${DIRS[@]/#/--exclude=} )
do_rsyncs
;;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id80ba1b1082b8ed7d112cb9e1a81e335a70b2bbd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@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] re-enable rsync dumps cron job between dataset hosts - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has uploaded a new change for review.

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


Change subject: re-enable rsync dumps cron job between dataset hosts
..

re-enable rsync dumps cron job between dataset hosts

Change-Id: I68945d4f9feed916dec2e420930df00bc061c48a
---
M manifests/misc/download.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/75305/1

diff --git a/manifests/misc/download.pp b/manifests/misc/download.pp
index 89a5ed6..cf35f81 100644
--- a/manifests/misc/download.pp
+++ b/manifests/misc/download.pp
@@ -10,7 +10,7 @@
 }
 
cron { 'rsync-dumps':
-   ensure  = absent,
+   ensure  = present,
command = '/usr/local/bin/rsync-dumps.sh',
user= root,
minute  = '0',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I68945d4f9feed916dec2e420930df00bc061c48a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] re-enable rsync dumps cron job between dataset hosts - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: re-enable rsync dumps cron job between dataset hosts
..


re-enable rsync dumps cron job between dataset hosts

Change-Id: I68945d4f9feed916dec2e420930df00bc061c48a
---
M manifests/misc/download.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/misc/download.pp b/manifests/misc/download.pp
index 89a5ed6..cf35f81 100644
--- a/manifests/misc/download.pp
+++ b/manifests/misc/download.pp
@@ -10,7 +10,7 @@
 }
 
cron { 'rsync-dumps':
-   ensure  = absent,
+   ensure  = present,
command = '/usr/local/bin/rsync-dumps.sh',
user= root,
minute  = '0',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68945d4f9feed916dec2e420930df00bc061c48a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@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] Change transclusion to template - change (mediawiki...VisualEditor)

2013-07-23 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Change transclusion to template
..

Change transclusion to template

Some users complained that transclusion is an unclear label.
I agree with this. What the button and the dialog in question
actually do is adding a template. Transclusion is a rather rare
technical term, while template is frequently used in the Wikimedia
community and should be clearer to most users.

Change-Id: I0152f1b11e81a78869707c12e1f018fc1f4314ae
---
M VisualEditor.i18n.php
1 file changed, 8 insertions(+), 8 deletions(-)


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

diff --git a/VisualEditor.i18n.php b/VisualEditor.i18n.php
index 7132597..303de88 100644
--- a/VisualEditor.i18n.php
+++ b/VisualEditor.i18n.php
@@ -76,12 +76,12 @@
'visualeditor-dialog-transclusion-remove-content' = 'Remove content',
'visualeditor-dialog-transclusion-remove-param' = 'Remove parameter',
'visualeditor-dialog-transclusion-remove-template' = 'Remove template',
-   'visualeditor-dialog-transclusion-title' = 'Transclusion',
+   'visualeditor-dialog-transclusion-title' = 'Add a template',
'visualeditor-dialogbutton-media-tooltip' = 'Media',
'visualeditor-dialogbutton-meta-tooltip' = 'Page settings',
'visualeditor-dialogbutton-reference-tooltip' = 'Reference',
'visualeditor-dialogbutton-referencelist-tooltip' = 'References list',
-   'visualeditor-dialogbutton-transclusion-tooltip' = 'Transclusion',
+   'visualeditor-dialogbutton-transclusion-tooltip' = 'Add a template',
'visualeditor-diff-nochanges' = 'Could not start the review because 
your revision matches the latest version of this page.',
'visualeditor-differror' = 'Error loading data from server: $1.',
'visualeditor-editconflict' = 'Your changes could not be saved because 
of an edit conflict. Would you like to resolve the conflict manually?',
@@ -315,10 +315,10 @@
'visualeditor-dialog-reference-title' = '{{Identical|Reference}}',
'visualeditor-dialog-reference-useexisting-label' = 'Label for button 
in reference dialog to insert a re-use of an existing reference',
'visualeditor-dialog-referencelist-title' = '{{Identical|References 
list}}',
-   'visualeditor-dialog-transclusion-add-content' = 'Label for button 
that adds parameter content to a transclusion.',
-   'visualeditor-dialog-transclusion-add-param' = 'Label for button that 
adds parameter a parameter to a template.
+   'visualeditor-dialog-transclusion-add-content' = 'Label for button 
that adds parameter content to a template.',
+   'visualeditor-dialog-transclusion-add-param' = 'Label for button that 
adds a parameter to a template.
 {{Identical|Add parameter}}',
-   'visualeditor-dialog-transclusion-add-template' = 'Label for button 
that adds parameter a template to a transclusion.
+   'visualeditor-dialog-transclusion-add-template' = 'Label for button 
that adds a parameter to a template.
 {{Identical|Add template}}',
'visualeditor-dialog-transclusion-content' = 'Label for editor of 
content between transclusion parts.
 {{Identical|Content}}',
@@ -329,13 +329,13 @@
'visualeditor-dialog-transclusion-remove-param' = 'Label for button 
that removes a parameter from a template',
'visualeditor-dialog-transclusion-remove-template' = 'Label for button 
that removes a template from a transclusion.
 {{Identical|Remove template}}',
-   'visualeditor-dialog-transclusion-title' = 
'{{Identical|Transclusion}}',
+   'visualeditor-dialog-transclusion-title' = 'A title for the dialog box 
for adding templates',
'visualeditor-dialogbutton-media-tooltip' = '{{Identical|Media}}',
'visualeditor-dialogbutton-meta-tooltip' = '{{Identical|Page 
Settings}}',
'visualeditor-dialogbutton-reference-tooltip' = 
'{{Identical|Reference}}',
'visualeditor-dialogbutton-referencelist-tooltip' = 'Tooltip for 
button for dialog that inserts the references list object 
(codenowikiReference list/nowiki/code).
 {{Identical|References list}}',
-   'visualeditor-dialogbutton-transclusion-tooltip' = 
'{{Identical|Transclusion}}',
+   'visualeditor-dialogbutton-transclusion-tooltip' = 'The tooltip text 
for the toolbar button that opens the template adding dialog.',
'visualeditor-diff-nochanges' = 'Message displayed in the diff view 
when no changes were detected',
'visualeditor-differror' = 'Text shown when the editor fails to load 
the diff.
 
@@ -422,7 +422,7 @@
'visualeditor-outline-control-move-up' = 'Tool tip for a button that 
moves items in a list up one place',
'visualeditor-parameter-input-placeholder' = 'Placeholder text label 
for an input for adding a parameter to a template.
 {{Identical|Parameter 

[MediaWiki-commits] [Gerrit] Fix IDe understanding of SMWDataItemException - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Fix IDe understanding of SMWDataItemException
..

Fix IDe understanding of SMWDataItemException

Change-Id: I8eb00bd9ba93346735fc938db243de3b799c3a5b
---
M includes/Aliases.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/includes/Aliases.php b/includes/Aliases.php
index ced81ce..7409963 100644
--- a/includes/Aliases.php
+++ b/includes/Aliases.php
@@ -28,4 +28,8 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 
-abstract class SMWResultPrinter extends SMW\ResultPrinter {}
\ No newline at end of file
+throw new Exception( 'Not an actual source file' );
+
+abstract class SMWResultPrinter extends SMW\ResultPrinter {}
+
+class SMWDataItemException extends SMW\DataItemException {}
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8eb00bd9ba93346735fc938db243de3b799c3a5b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add mw extension jobs for MassMessage extension - change (integration/jenkins-job-builder-config)

2013-07-23 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: Add mw extension jobs for MassMessage extension
..


Add mw extension jobs for MassMessage extension

Change-Id: Id3581adc748c639ebd37d2ada8c776e153c43012
---
M mediawiki-extensions.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/mediawiki-extensions.yaml b/mediawiki-extensions.yaml
index fae2352..95aadea 100644
--- a/mediawiki-extensions.yaml
+++ b/mediawiki-extensions.yaml
@@ -277,6 +277,7 @@
  - Maps
  - MapSources
  - MarkAsHelpful
+ - MassMessage
  - Math
  - MobileFrontend
  - MoodBar

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id3581adc748c639ebd37d2ada8c776e153c43012
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] triggers for mw/ext/MassMessage - change (integration/zuul-config)

2013-07-23 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: triggers for mw/ext/MassMessage
..

triggers for mw/ext/MassMessage

Change-Id: I143281794261c39d73a0a253674a8fccf431b08c
---
M layout.yaml
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/zuul-config 
refs/changes/08/75308/1

diff --git a/layout.yaml b/layout.yaml
index 3b9dd67..9212ae8 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1422,6 +1422,11 @@
   - name: extension-checks
 extname: MapSources
 
+  - name: mediawiki/extensions/MassMessage
+template:
+  - name: extension-checks
+extname: MassMessage
+
   - name: mediawiki/extensions/MarkAsHelpful
 template:
   - name: extension-checks

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I143281794261c39d73a0a253674a8fccf431b08c
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Append the Varnish default internal vcl_recv - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Append the Varnish default internal vcl_recv
..


Append the Varnish default internal vcl_recv

It turns out that the mobile caches have been using (and relying)
on the default vcl_recv function that's appended by Varnish.
XFF handling is done there, and caching is killed for any and all
requests containing a Cookie header...

Appending it explicitly for visibility, and to allow removing it
one bit at a time.

Change-Id: I24287cb3bb4f1d88e6c4db6e99713984b35fe0a9
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 58 insertions(+), 0 deletions(-)

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



diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 0758db1..5a95113 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -17,6 +17,35 @@
set req.backend = api;
}
 % end -%
+
+   /* Default Varnish vcl_recv function */
+   if (req.restarts == 0) {
+   if (req.http.x-forwarded-for) {
+   set req.http.X-Forwarded-For =
+   req.http.X-Forwarded-For + ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+   if (req.request != GET 
+   req.request != HEAD 
+   req.request != PUT 
+   req.request != POST 
+   req.request != TRACE 
+   req.request != OPTIONS 
+   req.request != DELETE) {
+   /* Non-RFC2616 or CONNECT which is weird. */
+   return (pipe);
+   }
+   if (req.request != GET  req.request != HEAD) {
+   /* We only deal with GET and HEAD by default */
+   return (pass);
+   }
+   if (req.http.Authorization || req.http.Cookie) {
+   /* Not cacheable by default */
+   return (pass);
+   }
+   return (lookup);
 }
 
 sub vcl_fetch {
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index a64e7f8..8c81ce7 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -86,6 +86,35 @@
}
 
set req.hash_ignore_busy = true;
+
+   /* Default Varnish vcl_recv function */
+   if (req.restarts == 0) {
+   if (req.http.x-forwarded-for) {
+   set req.http.X-Forwarded-For =
+   req.http.X-Forwarded-For + ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+   if (req.request != GET 
+   req.request != HEAD 
+   req.request != PUT 
+   req.request != POST 
+   req.request != TRACE 
+   req.request != OPTIONS 
+   req.request != DELETE) {
+   /* Non-RFC2616 or CONNECT which is weird. */
+   return (pipe);
+   }
+   if (req.request != GET  req.request != HEAD) {
+   /* We only deal with GET and HEAD by default */
+   return (pass);
+   }
+   if (req.http.Authorization || req.http.Cookie) {
+   /* Not cacheable by default */
+   return (pass);
+   }
+   return (lookup);
 }
 
 sub vcl_fetch {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24287cb3bb4f1d88e6c4db6e99713984b35fe0a9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] triggers for mw/ext/MassMessage - change (integration/zuul-config)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: triggers for mw/ext/MassMessage
..


triggers for mw/ext/MassMessage

Change-Id: I143281794261c39d73a0a253674a8fccf431b08c
---
M layout.yaml
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index 3b9dd67..b40f41b 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -1422,6 +1422,11 @@
   - name: extension-checks
 extname: MapSources
 
+  - name: mediawiki/extensions/MassMessage
+template:
+  - name: extension-unittests
+extname: MassMessage
+
   - name: mediawiki/extensions/MarkAsHelpful
 template:
   - name: extension-checks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I143281794261c39d73a0a253674a8fccf431b08c
Gerrit-PatchSet: 2
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update some class names to non-deprecated version - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has uploaded a new change for review.

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


Change subject: Update some class names to non-deprecated version
..

Update some class names to non-deprecated version

Change-Id: I6c287c437f82f01588cd0e20363597093b366771
---
M includes/dataitems/DIConcept.php
M includes/dataitems/SMW_DI_Bool.php
M includes/dataitems/SMW_DI_Container.php
M includes/dataitems/SMW_DI_GeoCoord.php
M includes/dataitems/SMW_DI_Number.php
M includes/dataitems/SMW_DI_Property.php
M includes/dataitems/SMW_DI_Time.php
M includes/dataitems/SMW_DI_URI.php
M includes/dataitems/SMW_DI_WikiPage.php
9 files changed, 34 insertions(+), 22 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticMediaWiki 
refs/changes/09/75309/1

diff --git a/includes/dataitems/DIConcept.php b/includes/dataitems/DIConcept.php
index 20056e6..e9a9428 100644
--- a/includes/dataitems/DIConcept.php
+++ b/includes/dataitems/DIConcept.php
@@ -187,12 +187,12 @@
/**
 * Create a data item from the provided serialization string and type
 * ID.
-* @return SMWDIConcept
+* @return DIConcept
 */
public static function doUnserialize( $serialization ) {
$result = unserialize( $serialization );
if ( $result === false ) {
-   throw new SMWDataItemException( Unserialization 
failed. );
+   throw new DataItemException( Unserialization failed. 
);
}
return $result;
}
diff --git a/includes/dataitems/SMW_DI_Bool.php 
b/includes/dataitems/SMW_DI_Bool.php
index 12126c9..1b51a13 100644
--- a/includes/dataitems/SMW_DI_Bool.php
+++ b/includes/dataitems/SMW_DI_Bool.php
@@ -3,6 +3,7 @@
  * @file
  * @ingroup SMWDataItems
  */
+use SMW\DataItemException;
 
 /**
  * This class implements Boolean data items.
@@ -22,7 +23,7 @@
 
public function __construct( $boolean ) {
if ( !is_bool( $boolean ) ) {
-   throw new SMWDataItemException( Initialization value 
'$boolean' is not a boolean. );
+   throw new DataItemException( Initialization value 
'$boolean' is not a boolean. );
}
 
$this-m_boolean = ( $boolean == true );
@@ -55,7 +56,7 @@
} elseif  ( $serialization == 'f' ) {
return new SMWDIBoolean( false );
} else {
-   throw new SMWDataItemException( Boolean data item 
unserialised from illegal value '$serialization' );
+   throw new DataItemException( Boolean data item 
unserialised from illegal value '$serialization' );
}
}
 
diff --git a/includes/dataitems/SMW_DI_Container.php 
b/includes/dataitems/SMW_DI_Container.php
index 3e644fb..68d4f46 100644
--- a/includes/dataitems/SMW_DI_Container.php
+++ b/includes/dataitems/SMW_DI_Container.php
@@ -4,6 +4,8 @@
  * @ingroup SMWDataItems
  */
 
+use SMW\DataItemException;
+
 /**
  * Subclass of SMWSemanticData that is used to store the data in SMWDIContainer
  * objects. It is special since the subject that the stored property-value 
pairs
@@ -71,7 +73,7 @@
 */
public function getSubject() {
if ( $this-hasAnonymousSubject() ) {
-   throw new SMWDataItemException(Trying to get the 
subject of a container data item that has not been given any. This container 
can only be used as a search pattern.);
+   throw new DataItemException(Trying to get the subject 
of a container data item that has not been given any. This container can only 
be used as a search pattern.);
} else {
return $this-mSubject;
}
@@ -182,7 +184,7 @@
/// TODO May issue an E_NOTICE when problems occur; catch this
$data = unserialize( $serialization );
if ( !( $data instanceof SMWContainerSemanticData ) ) {
-   throw new SMWDataItemException( Could not unserialize 
SMWDIContainer from the given string. );
+   throw new DataItemException( Could not unserialize 
SMWDIContainer from the given string. );
}
return new SMWDIContainer( $data );
}
diff --git a/includes/dataitems/SMW_DI_GeoCoord.php 
b/includes/dataitems/SMW_DI_GeoCoord.php
index a66ded0..109c783 100644
--- a/includes/dataitems/SMW_DI_GeoCoord.php
+++ b/includes/dataitems/SMW_DI_GeoCoord.php
@@ -1,5 +1,7 @@
 ?php
 
+use SMW\DataItemException;
+
 /**
  * Implementation of dataitems that are geographic coordinates.
  *
@@ -60,7 +62,7 @@
}
}
else {
-   throw new SMWDataItemException( 'Invalid 
coordinate data passed to the SMWDIGeoCoord constructor' 

[MediaWiki-commits] [Gerrit] (bug 51542) make Special:FilePath?file=.. work again - change (mediawiki/core)

2013-07-23 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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


Change subject: (bug 51542) make Special:FilePath?file=.. work again
..

(bug 51542) make Special:FilePath?file=.. work again

bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
---
M RELEASE-NOTES-1.22
M includes/specials/SpecialFilepath.php
2 files changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/75310/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index 858a6f3..22f79b3 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -206,6 +206,7 @@
   instead of just Parent/name).
 * Added $wgAPIUselessQueryPages to allow extensions to flag their query pages
   for non-inclusion in ApiQueryQueryPages.
+* (bug 51542) Special:FilePath?file=.. works again
 
 === API changes in 1.22 ===
 * (bug 25553) The JSON output formatter now leaves forward slashes unescaped
diff --git a/includes/specials/SpecialFilepath.php 
b/includes/specials/SpecialFilepath.php
index 57e552b..e7ced52 100644
--- a/includes/specials/SpecialFilepath.php
+++ b/includes/specials/SpecialFilepath.php
@@ -35,7 +35,8 @@
 
// implement by redirecting through Special:Redirect/file
function getRedirect( $par ) {
-   return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $par 
);
+   $file = $par ?: $this-getRequest()-getText( 'file' );
+   return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . 
$file );
}
 
protected function getGroupName() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch

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


[MediaWiki-commits] [Gerrit] Jenkins job validation (DO NOT SUBMIT) - change (mediawiki...MassMessage)

2013-07-23 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: Jenkins job validation (DO NOT SUBMIT)
..

Jenkins job validation (DO NOT SUBMIT)

Change-Id: Ic61059590b41d075e6aa5f91cea819f27afbffd6
---
A JENKINS
A jenkins.js
A jenkins.php
3 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MassMessage 
refs/changes/11/75311/1

diff --git a/JENKINS b/JENKINS
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/JENKINS
diff --git a/jenkins.js b/jenkins.js
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.js
diff --git a/jenkins.php b/jenkins.php
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/jenkins.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic61059590b41d075e6aa5f91cea819f27afbffd6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Remove unnecessary sections of the default vcl_recv code - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Remove unnecessary sections of the default vcl_recv code
..

Remove unnecessary sections of the default vcl_recv code

Change-Id: I355dc5d5b75a799b553b9f3156c8c1505d763950
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 2 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/12/75312/1

diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 5a95113..d10c29d 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -18,7 +18,7 @@
}
 % end -%
 
-   /* Default Varnish vcl_recv function */
+   /* Default (now modified) Varnish vcl_recv function */
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
@@ -26,20 +26,6 @@
} else {
set req.http.X-Forwarded-For = client.ip;
}
-   }
-   if (req.request != GET 
-   req.request != HEAD 
-   req.request != PUT 
-   req.request != POST 
-   req.request != TRACE 
-   req.request != OPTIONS 
-   req.request != DELETE) {
-   /* Non-RFC2616 or CONNECT which is weird. */
-   return (pipe);
-   }
-   if (req.request != GET  req.request != HEAD) {
-   /* We only deal with GET and HEAD by default */
-   return (pass);
}
if (req.http.Authorization || req.http.Cookie) {
/* Not cacheable by default */
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 8c81ce7..ca20689 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -87,7 +87,7 @@
 
set req.hash_ignore_busy = true;
 
-   /* Default Varnish vcl_recv function */
+   /* Default (now modified) Varnish vcl_recv function */
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
@@ -95,20 +95,6 @@
} else {
set req.http.X-Forwarded-For = client.ip;
}
-   }
-   if (req.request != GET 
-   req.request != HEAD 
-   req.request != PUT 
-   req.request != POST 
-   req.request != TRACE 
-   req.request != OPTIONS 
-   req.request != DELETE) {
-   /* Non-RFC2616 or CONNECT which is weird. */
-   return (pipe);
-   }
-   if (req.request != GET  req.request != HEAD) {
-   /* We only deal with GET and HEAD by default */
-   return (pass);
}
if (req.http.Authorization || req.http.Cookie) {
/* Not cacheable by default */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I355dc5d5b75a799b553b9f3156c8c1505d763950
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove unnecessary sections of the default vcl_recv code - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Remove unnecessary sections of the default vcl_recv code
..


Remove unnecessary sections of the default vcl_recv code

Change-Id: I355dc5d5b75a799b553b9f3156c8c1505d763950
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 2 insertions(+), 22 deletions(-)

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



diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 5a95113..70992b0 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -18,7 +18,7 @@
}
 % end -%
 
-   /* Default Varnish vcl_recv function */
+   /* Default (now modified) Varnish vcl_recv function */
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
@@ -26,16 +26,6 @@
} else {
set req.http.X-Forwarded-For = client.ip;
}
-   }
-   if (req.request != GET 
-   req.request != HEAD 
-   req.request != PUT 
-   req.request != POST 
-   req.request != TRACE 
-   req.request != OPTIONS 
-   req.request != DELETE) {
-   /* Non-RFC2616 or CONNECT which is weird. */
-   return (pipe);
}
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index 8c81ce7..d43d215 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -87,7 +87,7 @@
 
set req.hash_ignore_busy = true;
 
-   /* Default Varnish vcl_recv function */
+   /* Default (now modified) Varnish vcl_recv function */
if (req.restarts == 0) {
if (req.http.x-forwarded-for) {
set req.http.X-Forwarded-For =
@@ -95,16 +95,6 @@
} else {
set req.http.X-Forwarded-For = client.ip;
}
-   }
-   if (req.request != GET 
-   req.request != HEAD 
-   req.request != PUT 
-   req.request != POST 
-   req.request != TRACE 
-   req.request != OPTIONS 
-   req.request != DELETE) {
-   /* Non-RFC2616 or CONNECT which is weird. */
-   return (pipe);
}
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I355dc5d5b75a799b553b9f3156c8c1505d763950
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] Remove install of (no longer existing) varnish 3.0.3plus~rc1... - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Remove install of (no longer existing) varnish 
3.0.3plus~rc1-wm13 package
..

Remove install of (no longer existing) varnish 3.0.3plus~rc1-wm13 package

Change-Id: I336fb4524fefa6d8c76a6ab5fd63c2959ae45b4b
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index ac4c82a..f1e7252 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -527,7 +527,7 @@
include standard,
nrpe
 
-   class { varnish::packages: version = 3.0.3plus~rc1-wm13 }
+   #class { varnish::packages: version = 3.0.3plus~rc1-wm13 }
 
varnish::setup_filesystem{ $storage_partitions:
before = Varnish::Instance[text-backend]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I336fb4524fefa6d8c76a6ab5fd63c2959ae45b4b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove install of (no longer existing) varnish 3.0.3plus~rc1... - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Remove install of (no longer existing) varnish 
3.0.3plus~rc1-wm13 package
..


Remove install of (no longer existing) varnish 3.0.3plus~rc1-wm13 package

Change-Id: I336fb4524fefa6d8c76a6ab5fd63c2959ae45b4b
---
M manifests/role/cache.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index f66e0a7..0f5d12f 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -527,7 +527,7 @@
include standard,
nrpe
 
-   class { varnish::packages: version = 3.0.3plus~rc1-wm13 }
+   #class { varnish::packages: version = 3.0.3plus~rc1-wm13 }
 
varnish::setup_filesystem{ $storage_partitions:
before = Varnish::Instance[text-backend]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I336fb4524fefa6d8c76a6ab5fd63c2959ae45b4b
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] (bug 51855) remove code that assumes site links from only on... - change (mediawiki...Wikibase)

2013-07-23 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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


Change subject: (bug 51855) remove code that assumes site links from only one 
site group
..

(bug 51855) remove code that assumes site links from only one site group

This makes the change comments for site link changes generic,
and stores the site id instead of lang.

This allows things work with multiple site groups (e.g. wikivoyage),
and allows in the future, more elegant comments for site link changes.

Change-Id: I071e9dad970144e12aefa1296a8cb4f057d36ab9
---
M client/includes/ChangeHandler.php
M client/includes/recentchanges/ExternalChangesLine.php
2 files changed, 11 insertions(+), 33 deletions(-)


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

diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 8eb7ac5..66f1adf 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -836,19 +836,16 @@
} else if ( $diffOp instanceof \Diff\DiffOpChange ) {
$params['message'] = 
'wikibase-comment-sitelink-change';
 
-   // fall back to global id... not great, but we 
have to do *something*
// FIXME: this code appears to be doing 
something incorrect as best effort
// rather than allowing for proper error 
handling
-   $navIds = $this-site-getNavigationIds();
-   $iwPrefix = isset( $navIds[0] ) ? $navIds[0] : 
$this-site-getGlobalId();
 
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteGlobalId,
'page' = $diffOp-getOldValue()
),
'newlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteGlobalId,
'page' = $diffOp-getNewValue()
)
);
@@ -862,18 +859,17 @@
 
foreach( $siteLinkDiff as $siteKey = $diffOp ) {
$site = $this-sites-getSite( $siteKey );
+
if( !$site ) {
trigger_error( Could not get site with 
globalId $siteKey., E_USER_WARNING );
continue;
}
-   // assumes interwiki prefix is same as lang code
-   // true for wikipedia but need todo more 
robustly
-   $iwPrefix = $site-getLanguageCode();
+
if ( $diffOp instanceof \Diff\DiffOpAdd ) {
$params['message'] = $messagePrefix . 
'add';
$params['sitelink'] = array(
'newlink' =  array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getNewValue()
)
);
@@ -881,18 +877,18 @@
$params['message'] = $messagePrefix . 
'remove';
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getOldValue()
)
);
} else if ( $diffOp instanceof 
\Diff\DiffOpChange ) {
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getOldValue()
),
'newlink' = array(
-   'lang' = $iwPrefix,
+   

[MediaWiki-commits] [Gerrit] Update jquery.i18n from upstream, use its default message store - change (mediawiki...UniversalLanguageSelector)

2013-07-23 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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


Change subject: Update jquery.i18n from upstream, use its default message store
..

Update jquery.i18n from upstream, use its default message store

In Iddef0805ab a custom message store was introduced for ULS, but
there were updates in jquery.i18n that allows us to use default
message store again.

(see https://github.com/wikimedia/jquery.i18n/pull/40)

Change-Id: I86cb7a44efa83e5811824cd1104c6be11b1e2925
---
M Resources.php
M lib/jquery.i18n/jquery.i18n.js
M lib/jquery.i18n/jquery.i18n.messages.js
M lib/jquery.i18n/jquery.i18n.parser.js
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.i18n.js
M resources/js/ext.uls.init.js
7 files changed, 116 insertions(+), 299 deletions(-)


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

diff --git a/Resources.php b/Resources.php
index 5e80ac5..5320057 100644
--- a/Resources.php
+++ b/Resources.php
@@ -129,6 +129,7 @@
 $wgResourceModules['jquery.i18n'] = array(
'scripts' = array(
'lib/jquery.i18n/jquery.i18n.js',
+   'lib/jquery.i18n/jquery.i18n.messages.js',
'lib/jquery.i18n/jquery.i18n.parser.js',
'lib/jquery.i18n/jquery.i18n.emitter.js',
'lib/jquery.i18n/jquery.i18n.language.js',
diff --git a/lib/jquery.i18n/jquery.i18n.js b/lib/jquery.i18n/jquery.i18n.js
index 7c20f11..34ed7d4 100644
--- a/lib/jquery.i18n/jquery.i18n.js
+++ b/lib/jquery.i18n/jquery.i18n.js
@@ -16,13 +16,13 @@
 ( function ( $ ) {
'use strict';
 
-   var nav,
+   var nav, I18N,
slice = Array.prototype.slice;
/**
 * @constructor
 * @param {Object} options
 */
-   var I18N = function ( options ) {
+   I18N = function ( options ) {
// Load defaults
this.options = $.extend( {}, I18N.defaults, options );
 
@@ -43,13 +43,13 @@
var i18n;
 
i18n = this;
-   i18n.messageStore.init( i18n.locale );
// Set locale of String environment
String.locale = i18n.locale;
 
// Override String.localeString method
String.prototype.toLocaleString = function () {
-   var localeParts, messageLocation, 
localePartIndex, value, locale, fallbackIndex;
+   var localeParts, localePartIndex, value, 
locale, fallbackIndex,
+   _locale, message;
 
value = this.valueOf();
locale = i18n.locale;
@@ -62,24 +62,11 @@
localePartIndex = localeParts.length;
 
do {
-   var _locale = 
localeParts.slice( 0, localePartIndex ).join( '-' );
-
-   if ( 
i18n.options.messageLocationResolver ) {
-   messageLocation = 
i18n.options.messageLocationResolver( _locale, value );
-
-   if ( messageLocation 
-   ( 
!i18n.messageStore.isLoaded( _locale ,messageLocation ) )
-   ) {
-   
i18n.messageStore.load( messageLocation, _locale );
-   }
-   }
-
-   var message = 
i18n.messageStore.get( _locale, value );
-
+   _locale = localeParts.slice( 0, 
localePartIndex ).join( '-' );
+   message = 
i18n.messageStore.get( _locale, value );
if ( message ) {
return message;
}
-
localePartIndex--;
} while ( localePartIndex );
 
@@ -89,7 +76,7 @@
 
locale = ( 
$.i18n.fallbacks[i18n.locale]  $.i18n.fallbacks[i18n.locale][fallbackIndex] ) 
||
i18n.options.fallbackLocale;
-   i18n.log( 'Trying fallback locale for ' 
+ i18n.locale + ': ' + locale );
+   $.i18n.log( 'Trying fallback locale for 
' + i18n.locale + ': ' + locale );
 

[MediaWiki-commits] [Gerrit] Added test for Entity and fixes inconsistency in id field ha... - change (mediawiki...WikibaseDataModel)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Added test for Entity and fixes inconsistency in id field 
handling
..


Added test for Entity and fixes inconsistency in id field handling

Change-Id: I1d371ff484db5a86d183a99d8488987cea96b0ba
---
M DataModel/Entity/Entity.php
M tests/phpunit/Entity/EntityTest.php
2 files changed, 39 insertions(+), 10 deletions(-)

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



diff --git a/DataModel/Entity/Entity.php b/DataModel/Entity/Entity.php
index e042052..fa36c53 100644
--- a/DataModel/Entity/Entity.php
+++ b/DataModel/Entity/Entity.php
@@ -46,8 +46,13 @@
protected $data;
 
/**
-* Id of the item (the 42 in q42 used as page name and in exports).
-* Integer when set. False when not initialized. Null when the item is 
new and unsaved.
+* Id of the entity.
+*
+* This field can have several types:
+*
+* * EntityId: This means the entity has this id.
+* * Null: This means the entity does not have an associated id.
+* * False: This means the entity has an id, but it is stubbed in the 
$data field. Call getId to get an unstubbed version.
 *
 * @since 0.1
 * @var EntityId|bool|null
@@ -62,6 +67,15 @@
protected $claims;
 
/**
+* Returns a type identifier for the entity.
+*
+* @since 0.1
+*
+* @return string
+*/
+   public abstract function getType();
+
+   /**
 * Constructor.
 * Do not use to construct new stuff from outside of this class, use 
the static newFoobar methods.
 * In other words: treat as protected (which it was, but now cannot be 
since we derive from Content).
@@ -74,16 +88,14 @@
public function __construct( array $data ) {
$this-data = $data;
$this-cleanStructure();
+   $this-initializeIdField();
}
 
-   /**
-* Returns a type identifier for the entity.
-*
-* @since 0.1
-*
-* @return string
-*/
-   public abstract function getType();
+   protected function initializeIdField() {
+   if ( !array_key_exists( 'entity', $this-data ) ) {
+   $this-id = null;
+   }
+   }
 
/**
 * Get an array representing the Entity.
diff --git a/tests/phpunit/Entity/EntityTest.php 
b/tests/phpunit/Entity/EntityTest.php
index d4af535..c590fb4 100644
--- a/tests/phpunit/Entity/EntityTest.php
+++ b/tests/phpunit/Entity/EntityTest.php
@@ -849,4 +849,21 @@
$this-assertGreaterThanOrEqual( count( $claims ), count( 
$snaks ), At least one snak per Claim );
}
 
+   /**
+* @dataProvider instanceProvider
+*/
+   public function testArraySerlialzationRoundtrip( Entity $entity ) {
+   $class = get_class( $entity );
+
+   /**
+* @var Entity $newEntity
+*/
+   $newEntity = new $class( $entity-toArray() );
+
+   $entity-stub();
+   $newEntity-stub();
+
+   $this-assertEquals( $entity, $newEntity );
+   }
+
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d371ff484db5a86d183a99d8488987cea96b0ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseDataModel
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Update some class names to non-deprecated version - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update some class names to non-deprecated version
..


Update some class names to non-deprecated version

Change-Id: I6c287c437f82f01588cd0e20363597093b366771
---
M includes/dataitems/DIConcept.php
M includes/dataitems/SMW_DI_Bool.php
M includes/dataitems/SMW_DI_Container.php
M includes/dataitems/SMW_DI_GeoCoord.php
M includes/dataitems/SMW_DI_Number.php
M includes/dataitems/SMW_DI_Property.php
M includes/dataitems/SMW_DI_Time.php
M includes/dataitems/SMW_DI_URI.php
M includes/dataitems/SMW_DI_WikiPage.php
9 files changed, 34 insertions(+), 22 deletions(-)

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



diff --git a/includes/dataitems/DIConcept.php b/includes/dataitems/DIConcept.php
index 20056e6..e9a9428 100644
--- a/includes/dataitems/DIConcept.php
+++ b/includes/dataitems/DIConcept.php
@@ -187,12 +187,12 @@
/**
 * Create a data item from the provided serialization string and type
 * ID.
-* @return SMWDIConcept
+* @return DIConcept
 */
public static function doUnserialize( $serialization ) {
$result = unserialize( $serialization );
if ( $result === false ) {
-   throw new SMWDataItemException( Unserialization 
failed. );
+   throw new DataItemException( Unserialization failed. 
);
}
return $result;
}
diff --git a/includes/dataitems/SMW_DI_Bool.php 
b/includes/dataitems/SMW_DI_Bool.php
index 12126c9..1b51a13 100644
--- a/includes/dataitems/SMW_DI_Bool.php
+++ b/includes/dataitems/SMW_DI_Bool.php
@@ -3,6 +3,7 @@
  * @file
  * @ingroup SMWDataItems
  */
+use SMW\DataItemException;
 
 /**
  * This class implements Boolean data items.
@@ -22,7 +23,7 @@
 
public function __construct( $boolean ) {
if ( !is_bool( $boolean ) ) {
-   throw new SMWDataItemException( Initialization value 
'$boolean' is not a boolean. );
+   throw new DataItemException( Initialization value 
'$boolean' is not a boolean. );
}
 
$this-m_boolean = ( $boolean == true );
@@ -55,7 +56,7 @@
} elseif  ( $serialization == 'f' ) {
return new SMWDIBoolean( false );
} else {
-   throw new SMWDataItemException( Boolean data item 
unserialised from illegal value '$serialization' );
+   throw new DataItemException( Boolean data item 
unserialised from illegal value '$serialization' );
}
}
 
diff --git a/includes/dataitems/SMW_DI_Container.php 
b/includes/dataitems/SMW_DI_Container.php
index 3e644fb..68d4f46 100644
--- a/includes/dataitems/SMW_DI_Container.php
+++ b/includes/dataitems/SMW_DI_Container.php
@@ -4,6 +4,8 @@
  * @ingroup SMWDataItems
  */
 
+use SMW\DataItemException;
+
 /**
  * Subclass of SMWSemanticData that is used to store the data in SMWDIContainer
  * objects. It is special since the subject that the stored property-value 
pairs
@@ -71,7 +73,7 @@
 */
public function getSubject() {
if ( $this-hasAnonymousSubject() ) {
-   throw new SMWDataItemException(Trying to get the 
subject of a container data item that has not been given any. This container 
can only be used as a search pattern.);
+   throw new DataItemException(Trying to get the subject 
of a container data item that has not been given any. This container can only 
be used as a search pattern.);
} else {
return $this-mSubject;
}
@@ -182,7 +184,7 @@
/// TODO May issue an E_NOTICE when problems occur; catch this
$data = unserialize( $serialization );
if ( !( $data instanceof SMWContainerSemanticData ) ) {
-   throw new SMWDataItemException( Could not unserialize 
SMWDIContainer from the given string. );
+   throw new DataItemException( Could not unserialize 
SMWDIContainer from the given string. );
}
return new SMWDIContainer( $data );
}
diff --git a/includes/dataitems/SMW_DI_GeoCoord.php 
b/includes/dataitems/SMW_DI_GeoCoord.php
index a66ded0..109c783 100644
--- a/includes/dataitems/SMW_DI_GeoCoord.php
+++ b/includes/dataitems/SMW_DI_GeoCoord.php
@@ -1,5 +1,7 @@
 ?php
 
+use SMW\DataItemException;
+
 /**
  * Implementation of dataitems that are geographic coordinates.
  *
@@ -60,7 +62,7 @@
}
}
else {
-   throw new SMWDataItemException( 'Invalid 
coordinate data passed to the SMWDIGeoCoord constructor' );
+   throw new DataItemException( 'Invalid 

[MediaWiki-commits] [Gerrit] Fix IDD understanding of SMWDataItemException - change (mediawiki...SemanticMediaWiki)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix IDD understanding of SMWDataItemException
..


Fix IDD understanding of SMWDataItemException

Change-Id: I8eb00bd9ba93346735fc938db243de3b799c3a5b
---
M includes/Aliases.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/includes/Aliases.php b/includes/Aliases.php
index ced81ce..7409963 100644
--- a/includes/Aliases.php
+++ b/includes/Aliases.php
@@ -28,4 +28,8 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 
-abstract class SMWResultPrinter extends SMW\ResultPrinter {}
\ No newline at end of file
+throw new Exception( 'Not an actual source file' );
+
+abstract class SMWResultPrinter extends SMW\ResultPrinter {}
+
+class SMWDataItemException extends SMW\DataItemException {}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8eb00bd9ba93346735fc938db243de3b799c3a5b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Mwjames jamesin.hongkon...@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] Mobile Cookie Vary caching optimizations - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Mobile Cookie Vary caching optimizations
..

Mobile Cookie Vary caching optimizations

Change-Id: Iad3000fb619e25930a94bb35f3ca96862c9fbf89
---
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
2 files changed, 14 insertions(+), 21 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/16/75316/1

diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 70992b0..5328033 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -31,10 +31,6 @@
/* We only deal with GET and HEAD by default */
return (pass);
}
-   if (req.http.Authorization || req.http.Cookie) {
-   /* Not cacheable by default */
-   return (pass);
-   }
return (lookup);
 }
 
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index d43d215..cba7b28 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -47,19 +47,6 @@
 * do this after vcl_recv_purge, as it operates on a full URI */
call rewrite_proxy_urls;
 
-   /* FIXME: deploy X-Vary-Options support */
-   set req.http.X-Orig-Cookie = req.http.Cookie;
-   if( req.http.Cookie ~ disable ||
-   req.http.Cookie ~ optin ||
-   req.http.Cookie ~ session ||
-   req.http.Cookie ~ forceHTTPS ) {
-   /* Do nothing; these are the cookies we pass.
-* this is a hack in the absence of X-V-O support
-*/
-   } else {
-   unset req.http.Cookie;
-   }
-
if (req.http.host == m.wikipedia.org) {
if (req.http.X-CS) {
// Carrier detected
@@ -81,6 +68,20 @@
 
call device_detection;
 
+   if (req.http.Cookie ~ ([sS]ession|Token)=) {
+   return (pass);
+   }
+   
+   set req.http.X-Orig-Cookie = req.http.Cookie;
+   set req.http.Cookie = regsuball(req.http.X-Orig-Cookie, 
^.*([a-zA-Z]+wikidisableImages=1|optin=1|[a-zA-Z]+wikiforceHTTPS=true).*$, 
\1; );
+   set req.http.Cookie = regsub(req.http.Cookie, ; $, );
+
+   /* Users that just logged out, should not get a 304 for their
+* (locally cached) logged in pages. */
+   if (req.http.If-Modified-Since  req.http.X-Orig-Cookie ~ LoggedOut) 
{
+   unset req.http.If-Modified-Since;
+   }
+
if ( req.http.host ~ ^test\. ) {
return (pass);
}
@@ -98,10 +99,6 @@
}
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
-   return (pass);
-   }
-   if (req.http.Authorization || req.http.Cookie) {
-   /* Not cacheable by default */
return (pass);
}
return (lookup);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iad3000fb619e25930a94bb35f3ca96862c9fbf89
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (Bug 50861) Support for Yandex Translate API v1.5 - change (mediawiki...Translate)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (Bug 50861) Support for Yandex Translate API v1.5
..


(Bug 50861) Support for Yandex Translate API v1.5

Migrate to Yandex Translate API v1.5.
The previous version 1.0  was deprecated on July 1, 2013.
Starting from version 1.5, all API methods must be accessed using a key.
Also all API methods must be accessed only via HTTPS protocol.

Bug: 50861
Change-Id: Id5377b9a189be17e182c54df9e8138e9b44fbccc
---
M Translate.php
M webservices/YandexWebService.php
2 files changed, 23 insertions(+), 7 deletions(-)

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



diff --git a/Translate.php b/Translate.php
index b186e70..41f5d7c 100644
--- a/Translate.php
+++ b/Translate.php
@@ -291,8 +291,9 @@
'type' = 'apertium',
 );
 $wgTranslateTranslationServices['Yandex'] = array(
-   'url' = 'http://translate.yandex.net/api/v1/tr.json/translate',
-   'pairs' = 'http://translate.yandex.net/api/v1/tr.json/getLangs',
+   'url' = 'https://translate.yandex.net/api/v1.5/tr.json/translate',
+   'key' = null,
+   'pairs' = 'https://translate.yandex.net/api/v1.5/tr.json/getLangs',
'timeout' = 3,
'langorder' = array( 'en', 'ru', 'uk', 'de', 'fr', 'pl', 'it', 'es', 
'tr' ),
'langlimit' = 1,
diff --git a/webservices/YandexWebService.php b/webservices/YandexWebService.php
index 58e8c65..ea24348 100644
--- a/webservices/YandexWebService.php
+++ b/webservices/YandexWebService.php
@@ -20,8 +20,19 @@
}
 
protected function doPairs() {
+   if ( !isset( $this-config['key'] ) ) {
+   throw new TranslationWebServiceException( 'API key is 
not set' );
+   }
+
+   $service = $this-service;
$pairs = array();
-   $json = Http::get( $this-config['pairs'], 
$this-config['timeout'] );
+
+   $params = array(
+   'key' = $this-config['key'],
+   );
+
+   $url = $this-config['pairs'] . '?' . wfArrayToCgi( $params );
+   $json = Http::get( $url, $this-config['timeout'] );
$response = FormatJson::decode( $json );
 
if ( !is_object( $response ) ) {
@@ -38,6 +49,10 @@
}
 
protected function doRequest( $text, $from, $to ) {
+   if ( !isset( $this-config['key'] ) ) {
+   throw new TranslationWebServiceException( 'API key is 
not set' );
+   }
+
$service = $this-service;
 
$text = trim( $text );
@@ -47,16 +62,16 @@
$options['timeout'] = $this-config['timeout'];
$options['method'] = 'POST';
$options['postData'] = array(
+   'key' = $this-config['key'],
'text' = $text,
'lang' = $from-$to,
-   'x-application' = Translate  . TRANSLATE_VERSION . 
),
);
 
$url = $this-config['url'];
$req = MWHttpRequest::factory( $url, $options );
-   wfProfileIn( 'TranslateWebServiceRequest-' . $this-service );
+   wfProfileIn( 'TranslateWebServiceRequest-' . $service );
$status = $req-execute();
-   wfProfileOut( 'TranslateWebServiceRequest-' . $this-service );
+   wfProfileOut( 'TranslateWebServiceRequest-' . $service );
 
if ( !$status-isOK() ) {
$error = $req-getContent();
@@ -72,7 +87,7 @@
throw new TranslationWebServiceException( serialize( 
$req-getContent() ) );
} elseif ( $response-code !== 200 ) {
$exception = (HTTP {$response-code}) with ($service 
($from|$to)):  .
-   $req-getContent();
+   $response-message;
throw new TranslationWebServiceException( $exception );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id5377b9a189be17e182c54df9e8138e9b44fbccc
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Lockal lockals...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@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] Factor out XFF append handling into a common function - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Factor out XFF append handling into a common function
..

Factor out XFF append handling into a common function

Change-Id: I42587b856dfc533bd25358d9bd514d4a1119582a
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
3 files changed, 12 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/17/75317/1

diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 4acf461..9d4319b 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -189,6 +189,16 @@
}
 }
 
+sub vcl_recv_append_xff {
+   if (req.restarts == 0) {
+   if (req.http.X-Forwarded-For) {
+   set req.http.X-Forwarded-For = req.http.X-Forwarded-For 
+ ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+}
+
 % if ! wikimedia_networks.empty? -%
 sub restrict_access {
if (client.ip !~ wikimedia_nets) {
diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 70992b0..3f9c9b7 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -19,14 +19,7 @@
 % end -%
 
/* Default (now modified) Varnish vcl_recv function */
-   if (req.restarts == 0) {
-   if (req.http.x-forwarded-for) {
-   set req.http.X-Forwarded-For =
-   req.http.X-Forwarded-For + ,  + client.ip;
-   } else {
-   set req.http.X-Forwarded-For = client.ip;
-   }
-   }
+   call vcl_recv_append_xff;
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
return (pass);
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index d43d215..d418201 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -88,14 +88,7 @@
set req.hash_ignore_busy = true;
 
/* Default (now modified) Varnish vcl_recv function */
-   if (req.restarts == 0) {
-   if (req.http.x-forwarded-for) {
-   set req.http.X-Forwarded-For =
-   req.http.X-Forwarded-For + ,  + client.ip;
-   } else {
-   set req.http.X-Forwarded-For = client.ip;
-   }
-   }
+   call vcl_recv_append_xff;
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
return (pass);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42587b856dfc533bd25358d9bd514d4a1119582a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Factor out XFF append handling into a common function - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Factor out XFF append handling into a common function
..


Factor out XFF append handling into a common function

Change-Id: I42587b856dfc533bd25358d9bd514d4a1119582a
---
M modules/varnish/templates/vcl/wikimedia.vcl.erb
M templates/varnish/mobile-backend.inc.vcl.erb
M templates/varnish/mobile-frontend.inc.vcl.erb
3 files changed, 12 insertions(+), 16 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia.vcl.erb
index 4acf461..9d4319b 100644
--- a/modules/varnish/templates/vcl/wikimedia.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia.vcl.erb
@@ -189,6 +189,16 @@
}
 }
 
+sub vcl_recv_append_xff {
+   if (req.restarts == 0) {
+   if (req.http.X-Forwarded-For) {
+   set req.http.X-Forwarded-For = req.http.X-Forwarded-For 
+ ,  + client.ip;
+   } else {
+   set req.http.X-Forwarded-For = client.ip;
+   }
+   }
+}
+
 % if ! wikimedia_networks.empty? -%
 sub restrict_access {
if (client.ip !~ wikimedia_nets) {
diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 70992b0..3f9c9b7 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -19,14 +19,7 @@
 % end -%
 
/* Default (now modified) Varnish vcl_recv function */
-   if (req.restarts == 0) {
-   if (req.http.x-forwarded-for) {
-   set req.http.X-Forwarded-For =
-   req.http.X-Forwarded-For + ,  + client.ip;
-   } else {
-   set req.http.X-Forwarded-For = client.ip;
-   }
-   }
+   call vcl_recv_append_xff;
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
return (pass);
diff --git a/templates/varnish/mobile-frontend.inc.vcl.erb 
b/templates/varnish/mobile-frontend.inc.vcl.erb
index d43d215..d418201 100644
--- a/templates/varnish/mobile-frontend.inc.vcl.erb
+++ b/templates/varnish/mobile-frontend.inc.vcl.erb
@@ -88,14 +88,7 @@
set req.hash_ignore_busy = true;
 
/* Default (now modified) Varnish vcl_recv function */
-   if (req.restarts == 0) {
-   if (req.http.x-forwarded-for) {
-   set req.http.X-Forwarded-For =
-   req.http.X-Forwarded-For + ,  + client.ip;
-   } else {
-   set req.http.X-Forwarded-For = client.ip;
-   }
-   }
+   call vcl_recv_append_xff;
if (req.request != GET  req.request != HEAD) {
/* We only deal with GET and HEAD by default */
return (pass);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I42587b856dfc533bd25358d9bd514d4a1119582a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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 new SSL proxies ssl1005 and ssl1006 to the XFF list - change (operations/mediawiki-config)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Add new SSL proxies ssl1005 and ssl1006 to the XFF list
..

Add new SSL proxies ssl1005 and ssl1006 to the XFF list

Change-Id: Ic0650012768e5f369ad338dd91598ad143155757
---
M wmf-config/squid.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/squid.php b/wmf-config/squid.php
index d4dffd9..dc91e0a 100644
--- a/wmf-config/squid.php
+++ b/wmf-config/squid.php
@@ -108,6 +108,8 @@
'208.80.154.134',   # ssl1002
'208.80.154.9', # ssl1003
'208.80.154.8', # ssl1004
+   '208.80.154.75' # ssl1005
+   '208.80.154.76' # ssl1006
 
'91.198.174.102',   # ssl3001
'91.198.174.103',   # ssl3002

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0650012768e5f369ad338dd91598ad143155757
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] (bug 51865) enable link item widget to work with any site group - change (mediawiki...Wikibase)

2013-07-23 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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


Change subject: (bug 51865) enable link item widget to work with any site group
..

(bug 51865) enable link item widget to work with any site group

Change-Id: Ic9e6d1de4441e4f264ee16741cb788130b8fb516
---
M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
1 file changed, 10 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/19/75319/1

diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 
b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
index 25c245a..3c689a0 100644
--- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
+++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
@@ -171,14 +171,22 @@
 * @return {object}
 */
_getLinkableSites: function() {
-   var sites = wb.getSites(),
+   var sites,
linkableSites = {},
-   site;
+   site,
+   currentSiteId,
+   siteGroup;
+
+   currentSiteId = mw.config.get( 'wbCurrentSite' ).globalSiteId;
+   siteGroup = wb.getSite( currentSiteId ).getGroup();
+   sites = wb.getSitesOfGroup( siteGroup );
+
for( site in sites ) {
if ( sites[ site ].getGlobalSiteId() !== mw.config.get( 
'wbCurrentSite' ).globalSiteId ) {
linkableSites[ site ] = sites[ site ];
}
}
+
return linkableSites;
},
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9e6d1de4441e4f264ee16741cb788130b8fb516
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add new SSL proxies ssl1005 and ssl1006 to the XFF list - change (operations/mediawiki-config)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Add new SSL proxies ssl1005 and ssl1006 to the XFF list
..


Add new SSL proxies ssl1005 and ssl1006 to the XFF list

Change-Id: Ic0650012768e5f369ad338dd91598ad143155757
---
M wmf-config/squid.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/squid.php b/wmf-config/squid.php
index d4dffd9..7bd431b 100644
--- a/wmf-config/squid.php
+++ b/wmf-config/squid.php
@@ -108,6 +108,8 @@
'208.80.154.134',   # ssl1002
'208.80.154.9', # ssl1003
'208.80.154.8', # ssl1004
+   '208.80.154.75',# ssl1005
+   '208.80.154.76',# ssl1006
 
'91.198.174.102',   # ssl3001
'91.198.174.103',   # ssl3002

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic0650012768e5f369ad338dd91598ad143155757
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] [WIP] Add support for browsing + contributing to campaigns - change (apps...commons)

2013-07-23 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: [WIP] Add support for browsing + contributing to campaigns
..

[WIP] Add support for browsing + contributing to campaigns

Work in progress.

Change-Id: I688fab05df567e449272e1d03e51aa4273070f59
GitHub: https://github.com/wikimedia/apps-android-commons/pull/35
---
A commons/src/main/java/org/wikimedia/commons/campaigns/Campaign.java
A 
commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
M commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java
3 files changed, 109 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/commons 
refs/changes/20/75320/1

diff --git 
a/commons/src/main/java/org/wikimedia/commons/campaigns/Campaign.java 
b/commons/src/main/java/org/wikimedia/commons/campaigns/Campaign.java
new file mode 100644
index 000..54645a1
--- /dev/null
+++ b/commons/src/main/java/org/wikimedia/commons/campaigns/Campaign.java
@@ -0,0 +1,62 @@
+package org.wikimedia.commons.campaigns;
+
+import org.json.JSONArray;
+import org.json.JSONObject;
+
+import java.util.ArrayList;
+
+public class Campaign {
+private boolean enabled;
+
+private String autoAddWikitext;
+private ArrayListString autoAddCategories;
+
+private String name;
+private String ownWorkLicenseDefault;
+
+private String defaultDescription;
+
+private JSONObject config;
+
+public boolean isEnabled() {
+return enabled;
+}
+
+public String getAutoAddWikitext() {
+return autoAddWikitext;
+}
+
+public ArrayListString getAutoAddCategories() {
+return autoAddCategories;
+}
+
+public String getName() {
+return name;
+}
+
+public String getOwnWorkLicenseDefault() {
+return ownWorkLicenseDefault;
+}
+
+public String getDefaultDescription() {
+return defaultDescription;
+}
+
+public JSONObject getConfig() {
+return config;
+}
+
+public Campaign(JSONObject config) {
+this.config = config;
+if(config.has(autoAdd)) {
+this.autoAddWikitext = 
config.optJSONObject(config).optString(wikitext, null);
+if(config.optJSONObject(config).has(categories)) {
+this.autoAddCategories = new ArrayListString();
+JSONArray catsArray = 
config.optJSONObject(config).optJSONArray(categories);
+for(int i=0; i  catsArray.length(); i++) {
+autoAddCategories.add(catsArray.optString(i));
+}
+}
+}
+}
+}
diff --git 
a/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
 
b/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
new file mode 100644
index 000..1566c14
--- /dev/null
+++ 
b/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
@@ -0,0 +1,40 @@
+package org.wikimedia.commons.campaigns;
+
+import org.wikimedia.commons.contributions.Contribution;
+
+import java.util.ArrayList;
+
+public class CampaignContribution extends Contribution {
+private Campaign campaign;
+
+private ArrayListString fieldValues;
+
+public Campaign getCampaign() {
+return campaign;
+}
+
+public void setCampaign(Campaign campaign) {
+this.campaign = campaign;
+}
+
+@Override
+public String getTrackingTemplates() {
+StringBuffer buffer = new StringBuffer();
+if(campaign.getAutoAddWikitext() != null) {
+buffer.append(campaign.getAutoAddWikitext()).append(\n);
+}
+if(campaign.getAutoAddCategories() != null  
campaign.getAutoAddCategories().size() != 0) {
+for(String cat : campaign.getAutoAddCategories()) {
+
buffer.append([[Category:).append(cat).append(]]).append(\n);
+}
+} else {
+buffer.append({{subst:unc}}\n);
+}
+return buffer.toString();
+}
+
+@Override
+public String getDescription() {
+return super.getDescription();
+}
+}
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java 
b/commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java
index f0f5a24..d482fea 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/Contribution.java
@@ -117,13 +117,17 @@
 this.dateUploaded = date;
 }
 
+public String getTrackingTemplates() {
+return {{subst:unc}};  // Remove when we have categorization
+}
+
 public String getPageContents() {
 StringBuffer buffer = new StringBuffer();
 SimpleDateFormat isoFormat = new SimpleDateFormat(-MM-dd);
 buffer
 .append(== {{int:filedesc}} ==\n)
  

[MediaWiki-commits] [Gerrit] (bug 51865) enable link item widget to work with any site group - change (mediawiki...Wikibase)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bug 51865) enable link item widget to work with any site group
..


(bug 51865) enable link item widget to work with any site group

Change-Id: Ic9e6d1de4441e4f264ee16741cb788130b8fb516
---
M client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
1 file changed, 11 insertions(+), 3 deletions(-)

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



diff --git a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js 
b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
index 25c245a..5b3ba30 100644
--- a/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
+++ b/client/resources/jquery.wikibase/jquery.wikibase.linkitem.js
@@ -171,14 +171,22 @@
 * @return {object}
 */
_getLinkableSites: function() {
-   var sites = wb.getSites(),
+   var sites,
linkableSites = {},
-   site;
+   site,
+   currentSiteId,
+   siteGroup;
+
+   currentSiteId = mw.config.get( 'wbCurrentSite' ).globalSiteId;
+   siteGroup = wb.getSite( currentSiteId ).getGroup();
+   sites = wb.getSitesOfGroup( siteGroup );
+
for( site in sites ) {
-   if ( sites[ site ].getGlobalSiteId() !== mw.config.get( 
'wbCurrentSite' ).globalSiteId ) {
+   if ( sites[ site ].getGlobalSiteId() !== currentSiteId 
) {
linkableSites[ site ] = sites[ site ];
}
}
+
return linkableSites;
},
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9e6d1de4441e4f264ee16741cb788130b8fb516
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.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] Update jquery.i18n from upstream, use its default message store - change (mediawiki...UniversalLanguageSelector)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update jquery.i18n from upstream, use its default message store
..


Update jquery.i18n from upstream, use its default message store

In Iddef0805ab a custom message store was introduced for ULS, but
there were updates in jquery.i18n that allows us to use default
message store again.

(see https://github.com/wikimedia/jquery.i18n/pull/40)

Change-Id: I86cb7a44efa83e5811824cd1104c6be11b1e2925
---
M Resources.php
M lib/jquery.i18n/jquery.i18n.js
M lib/jquery.i18n/jquery.i18n.messages.js
M lib/jquery.i18n/jquery.i18n.parser.js
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.i18n.js
M resources/js/ext.uls.init.js
7 files changed, 116 insertions(+), 299 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 5e80ac5..5320057 100644
--- a/Resources.php
+++ b/Resources.php
@@ -129,6 +129,7 @@
 $wgResourceModules['jquery.i18n'] = array(
'scripts' = array(
'lib/jquery.i18n/jquery.i18n.js',
+   'lib/jquery.i18n/jquery.i18n.messages.js',
'lib/jquery.i18n/jquery.i18n.parser.js',
'lib/jquery.i18n/jquery.i18n.emitter.js',
'lib/jquery.i18n/jquery.i18n.language.js',
diff --git a/lib/jquery.i18n/jquery.i18n.js b/lib/jquery.i18n/jquery.i18n.js
index 7c20f11..34ed7d4 100644
--- a/lib/jquery.i18n/jquery.i18n.js
+++ b/lib/jquery.i18n/jquery.i18n.js
@@ -16,13 +16,13 @@
 ( function ( $ ) {
'use strict';
 
-   var nav,
+   var nav, I18N,
slice = Array.prototype.slice;
/**
 * @constructor
 * @param {Object} options
 */
-   var I18N = function ( options ) {
+   I18N = function ( options ) {
// Load defaults
this.options = $.extend( {}, I18N.defaults, options );
 
@@ -43,13 +43,13 @@
var i18n;
 
i18n = this;
-   i18n.messageStore.init( i18n.locale );
// Set locale of String environment
String.locale = i18n.locale;
 
// Override String.localeString method
String.prototype.toLocaleString = function () {
-   var localeParts, messageLocation, 
localePartIndex, value, locale, fallbackIndex;
+   var localeParts, localePartIndex, value, 
locale, fallbackIndex,
+   _locale, message;
 
value = this.valueOf();
locale = i18n.locale;
@@ -62,24 +62,11 @@
localePartIndex = localeParts.length;
 
do {
-   var _locale = 
localeParts.slice( 0, localePartIndex ).join( '-' );
-
-   if ( 
i18n.options.messageLocationResolver ) {
-   messageLocation = 
i18n.options.messageLocationResolver( _locale, value );
-
-   if ( messageLocation 
-   ( 
!i18n.messageStore.isLoaded( _locale ,messageLocation ) )
-   ) {
-   
i18n.messageStore.load( messageLocation, _locale );
-   }
-   }
-
-   var message = 
i18n.messageStore.get( _locale, value );
-
+   _locale = localeParts.slice( 0, 
localePartIndex ).join( '-' );
+   message = 
i18n.messageStore.get( _locale, value );
if ( message ) {
return message;
}
-
localePartIndex--;
} while ( localePartIndex );
 
@@ -89,7 +76,7 @@
 
locale = ( 
$.i18n.fallbacks[i18n.locale]  $.i18n.fallbacks[i18n.locale][fallbackIndex] ) 
||
i18n.options.fallbackLocale;
-   i18n.log( 'Trying fallback locale for ' 
+ i18n.locale + ': ' + locale );
+   $.i18n.log( 'Trying fallback locale for 
' + i18n.locale + ': ' + locale );
 
fallbackIndex++;
}
@@ -122,17 +109,12 @@

[MediaWiki-commits] [Gerrit] (bug 51855) remove code that assumes site links from only on... - change (mediawiki...Wikibase)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bug 51855) remove code that assumes site links from only one 
site group
..


(bug 51855) remove code that assumes site links from only one site group

This makes the change comments for site link changes generic,
and stores the site id instead of lang.

This allows things work with multiple site groups (e.g. wikivoyage),
and allows in the future, more elegant comments for site link changes.

Change-Id: I071e9dad970144e12aefa1296a8cb4f057d36ab9
---
M client/includes/ChangeHandler.php
M client/includes/recentchanges/ExternalChangesLine.php
M client/tests/phpunit/includes/ChangeHandlerTest.php
3 files changed, 17 insertions(+), 39 deletions(-)

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



diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 8eb7ac5..66f1adf 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -836,19 +836,16 @@
} else if ( $diffOp instanceof \Diff\DiffOpChange ) {
$params['message'] = 
'wikibase-comment-sitelink-change';
 
-   // fall back to global id... not great, but we 
have to do *something*
// FIXME: this code appears to be doing 
something incorrect as best effort
// rather than allowing for proper error 
handling
-   $navIds = $this-site-getNavigationIds();
-   $iwPrefix = isset( $navIds[0] ) ? $navIds[0] : 
$this-site-getGlobalId();
 
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteGlobalId,
'page' = $diffOp-getOldValue()
),
'newlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteGlobalId,
'page' = $diffOp-getNewValue()
)
);
@@ -862,18 +859,17 @@
 
foreach( $siteLinkDiff as $siteKey = $diffOp ) {
$site = $this-sites-getSite( $siteKey );
+
if( !$site ) {
trigger_error( Could not get site with 
globalId $siteKey., E_USER_WARNING );
continue;
}
-   // assumes interwiki prefix is same as lang code
-   // true for wikipedia but need todo more 
robustly
-   $iwPrefix = $site-getLanguageCode();
+
if ( $diffOp instanceof \Diff\DiffOpAdd ) {
$params['message'] = $messagePrefix . 
'add';
$params['sitelink'] = array(
'newlink' =  array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getNewValue()
)
);
@@ -881,18 +877,18 @@
$params['message'] = $messagePrefix . 
'remove';
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getOldValue()
)
);
} else if ( $diffOp instanceof 
\Diff\DiffOpChange ) {
$params['sitelink'] = array(
'oldlink' = array(
-   'lang' = $iwPrefix,
+   'site' = $siteKey,
'page' = 
$diffOp-getOldValue()
),
'newlink' = array(
-   'lang' = $iwPrefix,

[MediaWiki-commits] [Gerrit] Do not store empty aliases in the datamodel - change (mediawiki...WikibaseDataModel)

2013-07-23 Thread Addshore (Code Review)
Addshore has uploaded a new change for review.

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


Change subject: Do not store empty aliases in the datamodel
..

Do not store empty aliases in the datamodel

Bug: 51811
Change-Id: I9d88489da21da12c6e2ae191ea065376daae6253
---
M DataModel/Entity/Entity.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikibaseDataModel 
refs/changes/21/75321/1

diff --git a/DataModel/Entity/Entity.php b/DataModel/Entity/Entity.php
index fa36c53..64a079c 100644
--- a/DataModel/Entity/Entity.php
+++ b/DataModel/Entity/Entity.php
@@ -359,6 +359,7 @@
 * @param array $aliases
 */
public function setAliases( $languageCode, array $aliases ) {
+   $aliases = array_diff( $aliases, array( '' ) );
$aliases = array_values( array_unique( $aliases ) );
if( count( $aliases )  0 ) {
$this-data['aliases'][$languageCode] = $aliases;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d88489da21da12c6e2ae191ea065376daae6253
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseDataModel
Gerrit-Branch: master
Gerrit-Owner: Addshore addshorew...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix the logic of apply and cancel actions - change (mediawiki...UniversalLanguageSelector)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix the logic of apply and cancel actions
..


Fix the logic of apply and cancel actions

* Refactored the Cancel button handler code to cancel method in
display settings and input settings.
* When the user makes changes in multiple modules and clicks the Cancel
button or closes the language settings after that, cancel the changes in
all the modules. See bug 50564.
* The Apply button was always active in input methods module. Fixed the
logic for that.
* Renamed the enableApplyButton method to markDirty in both modules.
* Introduced isDirty attribute to the modules for optimizing the Cancel
method to avoid unnecessary restore actions.
* More minor cleanup and documentation.

Bug: 50564

Change-Id: I71f527bfb7dd7f6724e4365371ac3e4fc0723ed6
---
M resources/js/ext.uls.displaysettings.js
M resources/js/ext.uls.inputsettings.js
M resources/js/ext.uls.languagesettings.js
3 files changed, 107 insertions(+), 51 deletions(-)

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



diff --git a/resources/js/ext.uls.displaysettings.js 
b/resources/js/ext.uls.displaysettings.js
index f538912..79caa42 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -119,6 +119,8 @@
this.i18n();
this.$webfonts.refresh();
this.listen();
+   this.dirty = false;
+   this.savedRegistry = $.extend( true, {}, 
mw.webfonts.preferences );
},
 
/**
@@ -196,7 +198,7 @@
 
function buttonHandler( button ) {
return function () {
-   displaySettings.enableApplyButton();
+   displaySettings.markDirty();
displaySettings.uiLanguage = 
button.data( 'language' ) || displaySettings.uiLanguage;
$( 'div.uls-ui-languages button.button' 
).removeClass( 'down' );
button.addClass( 'down' );
@@ -291,7 +293,7 @@
}
},
onSelect: function ( langCode ) {
-   displaySettings.enableApplyButton();
+   displaySettings.markDirty();
displaySettings.uiLanguage = langCode;
displaySettings.$parent.show();
displaySettings.prepareUIFonts();
@@ -444,11 +446,16 @@
},
 
/**
-* Enable the apply button.
+* Mark dirty, there are unsaved changes. Enable the apply 
button.
 * Useful in many places when something changes.
 */
-   enableApplyButton: function () {
+   markDirty: function () {
+   this.dirty = true;
this.$template.find( '#uls-displaysettings-apply' 
).removeAttr( 'disabled' );
+   },
+
+   disableApplyButton: function () {
+   this.$template.find( '#uls-displaysettings-apply' 
).prop( 'disabled', true );
},
 
/**
@@ -458,8 +465,6 @@
var displaySettings = this,
$contentFontSelector = this.$template.find( 
'#content-font-selector' ),
$uiFontSelector = this.$template.find( 
'#ui-font-selector' ),
-   oldUIFont = $uiFontSelector.find( 
'option:selected' ).val(),
-   oldContentFont = $contentFontSelector.find( 
'option:selected' ).val(),
$tabButtons = displaySettings.$template.find( 
'.uls-display-settings-tab-switcher button' );
 
// TODO all these repeated selectors can be placed in 
object constructor.
@@ -469,30 +474,14 @@
} );
 
displaySettings.$template.find( 
'button.uls-display-settings-cancel' ).on( 'click', function () {
-   mw.webfonts.preferences.setFont( 
displaySettings.contentLanguage, oldContentFont );
-   mw.webfonts.preferences.setFont( 
displaySettings.uiLanguage, oldUIFont );
-
-   if ( displaySettings.$webfonts ) {
-   displaySettings.$webfonts.refresh();
-   }
-
-   displaySettings.$template.find( 
'div.uls-ui-languages button.button' ).each( function () {
-   var $button = $( this );

[MediaWiki-commits] [Gerrit] (hotfix) fix for adaptLetterCase JS method - change (mediawiki...DataValues)

2013-07-23 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: (hotfix) fix for adaptLetterCase JS method
..

(hotfix) fix for adaptLetterCase JS method

- this was causing fatals in the sitelinks UI

Change-Id: I9dd895d2d92015ebee7689199d64d00b434e02a4
---
M ValueView/resources/jquery.ui/jquery.ui.suggester.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/22/75322/1

diff --git a/ValueView/resources/jquery.ui/jquery.ui.suggester.js 
b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
index 454c4cc..543a870 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.suggester.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
@@ -299,9 +299,9 @@
complete = response[1][0];
 
if ( this.options.adaptLetterCase ) {
-   this.term = incomplete = 
$.util.adaptLetterCase(
-   incomplete,
+   this.term = incomplete = 
$.util.adaptlettercase(
complete,
+   incomplete,

this.options.adaptLetterCase
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9dd895d2d92015ebee7689199d64d00b434e02a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Remove some unwanted top RL module definitions - change (mediawiki...UniversalLanguageSelector)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove some unwanted top RL module definitions
..


Remove some unwanted top RL module definitions

Change-Id: I7ae638fa606a68b93519dea726725d0dc714811e
---
M Resources.php
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/Resources.php b/Resources.php
index 5e80ac5..602c890 100644
--- a/Resources.php
+++ b/Resources.php
@@ -173,13 +173,11 @@
'jquery.uls.grid',
'jquery.uls.data',
),
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.compact'] = array(
'styles' = 'lib/jquery.uls/css/jquery.uls.compact.css',
'dependencies' = 'jquery.uls',
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.data'] = array(
@@ -187,12 +185,10 @@
'lib/jquery.uls/src/jquery.uls.data.js',
'lib/jquery.uls/src/jquery.uls.data.utils.js',
),
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.uls.grid'] = array(
'styles' = 'lib/jquery.uls/css/jquery.uls.grid.css',
-   'position' = 'top',
 ) + $resourcePaths;
 
 $wgResourceModules['jquery.webfonts'] = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ae638fa606a68b93519dea726725d0dc714811e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Santhosh santhosh.thottin...@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] (bug 46665) Add HTML email support to email digest - change (mediawiki...Echo)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bug 46665) Add HTML email support to email digest
..


(bug 46665) Add HTML email support to email digest

Change-Id: I3b881acbcf4b18fc0401364ea0a6bc993d2c2246
---
M Echo.i18n.php
M Echo.php
M formatters/BasicFormatter.php
M includes/EmailBatch.php
M includes/EmailFormatter.php
M tests/EmailFormatterTest.php
M tests/NotificationFormatterTest.php
7 files changed, 562 insertions(+), 195 deletions(-)

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



diff --git a/Echo.i18n.php b/Echo.i18n.php
index 5b6de50..dd1b4e7 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -19,8 +19,7 @@
'prefs-newmessageindicator' = 'New message indicator',
'echo-pref-send-me' = 'Send me:',
'echo-pref-send-to' = 'Send to:',
-   // Update this to 'Email format' when HTML email is ready for email 
digest
-   'echo-pref-email-format' = 'Individual email format:',
+   'echo-pref-email-format' = 'Email format:',
'echo-pref-web' = 'Web',
'echo-pref-email' = 'Email',
'echo-pref-email-frequency-never' = 'Do not send me any email 
notifications',
@@ -142,23 +141,11 @@
'echo-email-batch-bullet' = '•', # only translate this message to 
other languages if you have to change it
'echo-email-batch-subject-daily' = 'You have {{PLURAL:$2|a new 
notification|new notifications}} at {{SITENAME}}',
'echo-email-batch-subject-weekly' = 'You have {{PLURAL:$2|a new 
notification|new notifications}} at {{SITENAME}} this week',
-   'echo-email-batch-body-daily' = 'Hi $1,
-
-You have {{PLURAL:$3|a new notification|new notifications}} on {{SITENAME}}. 
View {{PLURAL:$3|it|them}} here:
-{{canonicalurl:{{#special:Notifications
-
-$4
-
-$5',
-   'echo-email-batch-body-weekly' = 'Hi $1,
-
-You have {{PLURAL:$3|a new notification|new notifications}} on {{SITENAME}} 
this week. View {{PLURAL:$3|it|them}} here:
-{{canonicalurl:{{#special:Notifications
-
-$4
-
-$5',
-
+   'echo-email-batch-body-intro-daily' = Hi $1,
+Here's a summary of today's activity on {{SITENAME}} for you,
+   'echo-email-batch-body-intro-weekly' = Hi $1,
+Here's a summary of this week's activity on {{SITENAME}} for you,
+   'echo-email-batch-link-text-view-all-notifications' = 'View all 
notifications',
// Supressed Revisions
'echo-rev-deleted-text-view' = 'This page revision has been 
suppressed',
 );
@@ -495,22 +482,11 @@
 * $2 is a numeric count, this is used for plural support
 See also:
 * {{msg-mw|Echo-email-batch-subject-daily}}',
-   'echo-email-batch-body-daily' = 'Daily e-mail batch body. Parameters:
-* $1 is a username
-* $2 is currently not used, could be a numeric count or 10+. See also: 
{{msg-mw|echo-notification-count|optional message|notext=1}}.
-* $3 is a numeric count, this is used for plural support
-* $4 is the e-mail batch content separated by ---... 
({{msg-mw|echo-email-batch-separator}})
-* $5 is the e-mail footer, {{msg-mw|echo-email-footer-default}}
-See also:
-* {{msg-mw|Echo-email-batch-body-weekly}}',
-   'echo-email-batch-body-weekly' = 'Weekly e-mail batch body. Parameters:
-* $1 is a username
-* $2 is currently not used, could be a numeric count or 10+. See also: 
{{msg-mw|echo-notification-count|optional message|notext=1}}.
-* $3 is a numeric count, this is used for plural support
-* $4 is the e-mail batch content separated by ... 
({{msg-mw|echo-email-batch-separator}})
-* $5 is the e-mail footer, {{msg-mw|echo-email-footer-default}}
-See also:
-* {{msg-mw|Echo-email-batch-body-daily}}',
+   'echo-email-batch-body-intro-daily' = Introduction text for daily 
email digest.  Parameters:
+* $1 is a username,
+   'echo-email-batch-body-intro-weekly' = Introduction text for weekly 
email digest.  Parameters:
+* $1 is a username,
+   'echo-email-batch-link-text-view-all-notifications' = 'The link text 
for the primary action in daily and weekly email digest',
'echo-rev-deleted-text-view' = 'Short message displayed instead of 
edit content when revision text is suppressed.',
 );
 
diff --git a/Echo.php b/Echo.php
index 66eb6b9..9775edf 100644
--- a/Echo.php
+++ b/Echo.php
@@ -68,6 +68,9 @@
 $wgAutoloadClasses['EchoEmailMode'] = $dir . 'includes/EmailFormatter.php';
 $wgAutoloadClasses['EchoEmailSingle'] = $dir . 'includes/EmailFormatter.php';
 $wgAutoloadClasses['EchoEmailDigest'] = $dir . 'includes/EmailFormatter.php';
+$wgAutoloadClasses['EchoEmailDecorator'] = $dir . 
'includes/EmailFormatter.php';
+$wgAutoloadClasses['EchoTextEmailDecorator'] = $dir . 
'includes/EmailFormatter.php';
+$wgAutoloadClasses['EchoHTMLEmailDecorator'] = $dir . 
'includes/EmailFormatter.php';
 
 // Internal stuff
 $wgAutoloadClasses['EchoNotifier'] = $dir . 'Notifier.php';
diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index 

[MediaWiki-commits] [Gerrit] get rid of varnishhtcpd upstart job - change (operations/puppet)

2013-07-23 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: get rid of varnishhtcpd upstart job
..

get rid of varnishhtcpd upstart job

On beta deployment-cache-text1 I end up with two version of the Varnish
HTCPD purger:
- vhtcpd : from Debian package, started with init script
- varnishhtcpd : from puppet, started with upstart

The two copy race for UDP port 4827 and cause much havoc on the beta
caches.  There might be the same issue in production as well.

Change-Id: If86d785362c635cfa97adb07efea222b84eacb1e
---
D files/upstart/varnishhtcpd.conf
M modules/varnish/manifests/htcppurger.pp
2 files changed, 7 insertions(+), 21 deletions(-)


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

diff --git a/files/upstart/varnishhtcpd.conf b/files/upstart/varnishhtcpd.conf
deleted file mode 100644
index c5ea786..000
--- a/files/upstart/varnishhtcpd.conf
+++ /dev/null
@@ -1,21 +0,0 @@
-# varnishhtcpd - varnish HTCP daemon
-#
-# Receives multicast HTCP UDP packets and sends corresponding HTTP PURGE 
requests to Varnish
-
-description varnish HTCP daemon
-
-start on runlevel [2345]
-stop on runlevel [!2345]
-
-respawn
-
-env DEFAULTFILE=/etc/default/varnishhtcpd
-
-script
-   DAEMON_OPTS=
-   if [ -f $DEFAULTFILE ]; then
-   . $DEFAULTFILE
-   fi
-   
-   exec /usr/local/bin/varnishhtcpd --name=varnishhtcpd --foreground 
$DAEMON_OPTS
-end script
\ No newline at end of file
diff --git a/modules/varnish/manifests/htcppurger.pp 
b/modules/varnish/manifests/htcppurger.pp
index fb877c4..bbb5a36 100644
--- a/modules/varnish/manifests/htcppurger.pp
+++ b/modules/varnish/manifests/htcppurger.pp
@@ -15,6 +15,13 @@
 content = inline_template('DAEMON_OPTS=-F -m 239.128.0.112% 
varnish_instances.each do |inst| -% -c %= inst %% end -%');
 }
 
+# Wikimedia used to provide vhtcpd under the name varnishhtcpd with an
+# upstart job. This is nore more needed since the init script is provided
+# by vhtcpd package and the daemon got renamed vhtcpd.
+files { '/etc/init/varnishhtcpd.conf':
+  ensure = absent,
+}
+
 service { vhtcpd:
 require = Package[vhtcpd],
 subscribe = File[/etc/default/vhtcpd],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If86d785362c635cfa97adb07efea222b84eacb1e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Upon first publicly visible patch set in gerrit, update bug ... - change (operations/puppet)

2013-07-23 Thread Faidon (Code Review)
Faidon has submitted this change and it was merged.

Change subject: Upon first publicly visible patch set in gerrit, update bug 
status
..


Upon first publicly visible patch set in gerrit, update bug status

Change-Id: Ic7c51c4da9f46782dc58a07760b58be5ba5a8e06
---
M files/gerrit/its/action.config
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/files/gerrit/its/action.config b/files/gerrit/its/action.config
index ecf06b8..b70523b 100644
--- a/files/gerrit/its/action.config
+++ b/files/gerrit/its/action.config
@@ -11,8 +11,10 @@
is-draft = !,true
association = added@subject,added@footer-Bug,added@footer-bug
action = add-standard-comment
+   action = set-status PATCH_TO_REVIEW
 
 [rule changeDraftPublished]
event-type = draft-published
association = subject,footer-Bug,footer-bug
action = add-velocity-comment DraftPublished
+   action = set-status PATCH_TO_REVIEW

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic7c51c4da9f46782dc58a07760b58be5ba5a8e06
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: QChris christ...@quelltextlich.at
Gerrit-Reviewer: Aklapper aklap...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org
Gerrit-Reviewer: QChris christ...@quelltextlich.at
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Make Special:FilePath?file=.. work again - change (mediawiki/core)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Make Special:FilePath?file=.. work again
..


Make Special:FilePath?file=.. work again

bug: 51542
Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
---
M includes/specials/SpecialFilepath.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/specials/SpecialFilepath.php 
b/includes/specials/SpecialFilepath.php
index 57e552b..e7ced52 100644
--- a/includes/specials/SpecialFilepath.php
+++ b/includes/specials/SpecialFilepath.php
@@ -35,7 +35,8 @@
 
// implement by redirecting through Special:Redirect/file
function getRedirect( $par ) {
-   return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . $par 
);
+   $file = $par ?: $this-getRequest()-getText( 'file' );
+   return SpecialPage::getSafeTitleFor( 'Redirect', 'file/' . 
$file );
}
 
protected function getGroupName() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2418e33ebd91dc0dc6968ba003a46857ec7524d3
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@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] (hotfix) fix call to adaptLetterCase method - change (mediawiki...DataValues)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (hotfix) fix call to adaptLetterCase method
..


(hotfix) fix call to adaptLetterCase method

- this was causing fatals in the sitelinks UI

Change-Id: I9dd895d2d92015ebee7689199d64d00b434e02a4
---
M ValueView/resources/jquery.ui/jquery.ui.suggester.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/ValueView/resources/jquery.ui/jquery.ui.suggester.js 
b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
index 454c4cc..543a870 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.suggester.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.suggester.js
@@ -299,9 +299,9 @@
complete = response[1][0];
 
if ( this.options.adaptLetterCase ) {
-   this.term = incomplete = 
$.util.adaptLetterCase(
-   incomplete,
+   this.term = incomplete = 
$.util.adaptlettercase(
complete,
+   incomplete,

this.options.adaptLetterCase
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9dd895d2d92015ebee7689199d64d00b434e02a4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.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] Bail when JSON length exceeds database limits - change (mediawiki...TemplateData)

2013-07-23 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: Bail when JSON length exceeds database limits
..

Bail when JSON length exceeds database limits

This might not be necessary on non-MySQL databases, but I'm sure that
at least their limits aren't lower than MySQL's, so let's stay on the
safe side.

Bug: 51740
Change-Id: I9c7115a951f126844bc70755bff12e8cd5fc2be1
---
M TemplateData.i18n.php
M TemplateDataBlob.php
M tests/TemplateDataBlobTest.php
3 files changed, 18 insertions(+), 0 deletions(-)


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

diff --git a/TemplateData.i18n.php b/TemplateData.i18n.php
index 34a4605..b016ec9 100644
--- a/TemplateData.i18n.php
+++ b/TemplateData.i18n.php
@@ -23,6 +23,7 @@
'templatedata-invalid-missing' = 'Required property $1 not found.',
'templatedata-invalid-unknown' = 'Unexpected property $1.',
'templatedata-invalid-value' = 'Invalid value for property $1.',
+   'templatedata-invalid-length' = 'Data too long to save ($1 bytes, 
limit is $2)',
 );
 
 /** Message documentation (Message documentation)
@@ -61,6 +62,9 @@
 * $1 - name of property. e.g. params.1.foobar',
'templatedata-invalid-value' = 'Error message when a property that 
cannot contain free-form text has an invalid value.
 * $1 - name of property. e.g. params.1.type',
+   'templatedata-invalid-length' = 'Error message when generated JSON\'s 
length exceed database limits.
+* $1 - length of generated JSON
+* $2 - maximal allowed length',
 );
 
 /** Asturian (asturianu)
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 4a4a53e..6f986e4 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -304,6 +304,13 @@
}
}
 
+   $maxlength = 65535; // Size of MySQL 'blob' field
+   $length = strlen( $this-getJSON() );
+
+   if ( $length  $maxlength ) {
+   return Status::newFatal( 'templatedata-invalid-length', 
$length, $maxlength );
+   }
+
return Status::newGood();
}
 
diff --git a/tests/TemplateDataBlobTest.php b/tests/TemplateDataBlobTest.php
index 35a4c85..cea30aa 100644
--- a/tests/TemplateDataBlobTest.php
+++ b/tests/TemplateDataBlobTest.php
@@ -304,6 +304,13 @@
}',
'status' = true
),
+   array(
+   'input' = '{
+   description: ' . str_repeat( 'X', 
65535 ) . ',
+   params: {}
+   }',
+   'status' = 'Data too long to save (999 bytes, 
limit is 65535)'
+   ),
);
$calls = array();
foreach ( $cases as $case ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c7115a951f126844bc70755bff12e8cd5fc2be1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com

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


[MediaWiki-commits] [Gerrit] Ignore config/secret.yml - change (qa/browsertests)

2013-07-23 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: Ignore config/secret.yml
..

Ignore config/secret.yml

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


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/25/75325/1

diff --git a/.gitignore b/.gitignore
index 007c4ff..15ae923 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 .*.swp
 .idea/
 reports/
+config/secret.yml
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97a328e03bee20b2628481c81f4d2f4b5fb23667
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] lanthanum as a jenkins slave - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: lanthanum as a jenkins slave
..


lanthanum as a jenkins slave

This patch makes lanthanum.eqiad.wmnet a Jenkins slave as requested in
RT #5074.

Sudo:
- hashar is a regular user (no root)
- cleaned up sudo commands, most of them are not needed there.
- User is jenkins-slave on Jenkins slaves

Classes:
- admins::root and admins::jenkins seems to be required
- contint::packages that provides all dependencies needed to run tests
- the role class for Jenkins slave :)

Lanthanum received a SSD drive (RT #5178). It is available under device
name /dev/sdb1 and mounted on /srv/ssd just like on gallium.

Change-Id: I6c9634bad3c326a68f0f9497d814d26e56f54f69
---
M manifests/site.pp
1 file changed, 31 insertions(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 2ee1e81..5ec6ae4 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1,5 +1,6 @@
 # vim: set ts=4 et sw=4:
 #site.pp
+# vim: set noet:
 
 import realm.pp # These ones first
 import generic-definitions.pp
@@ -1346,8 +1347,36 @@
 class { ldap::role::client::labs: ldapincludes = $ldapincludes }
 }
 
-node lanthanum.wikimedia.org {
-include standard
+node 'lanthanum.eqiad.wmnet' {
+include standard,
+admins::root,
+admins::jenkins,
+contint::packages,
+role::jenkins::slave::production  # RT #5074
+
+# Used as a Jenkins slave so some folks need escalated privileges
+$gid=500
+sudo_user { [ 'demon', 'hashar', 'krinkle', 'reedy', 'dsc', 'mholmquist' 
]: privileges = [
+'ALL = (jenkins-slave) NOPASSWD: ALL',
+'ALL = (gerritslave) NOPASSWD: ALL',
+]
+}
+
+
+# lanthanum received a SSD drive just like gallium (RT #5178) mount it
+file { '/srv/ssd':
+owner = root,
+group = root,
+ensure = directory,
+}
+mount { '/srv/ssd':
+ensure = mounted,
+device = '/dev/sdb1',
+fstype = 'xfs',
+options = 'noatime,nodiratime,nobarrier,logbufs=8',
+require = File['/srv/ssd'],
+}
+
 }
 
 node linne.wikimedia.org {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6c9634bad3c326a68f0f9497d814d26e56f54f69
Gerrit-PatchSet: 11
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: RobH r...@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] Ignore config/secret.yml - change (qa/browsertests)

2013-07-23 Thread Zfilipin (Code Review)
Zfilipin has submitted this change and it was merged.

Change subject: Ignore config/secret.yml
..


Ignore config/secret.yml

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

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



diff --git a/.gitignore b/.gitignore
index 007c4ff..15ae923 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
 .*.swp
 .idea/
 reports/
+config/secret.yml
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97a328e03bee20b2628481c81f4d2f4b5fb23667
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Zfilipin zfili...@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] Export table to CSV - change (mediawiki...LinkedWiki)

2013-07-23 Thread Karima Rafes (Code Review)
Karima Rafes has uploaded a new change for review.

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


Change subject: Export table to CSV
..

Export table to CSV

Change-Id: I9fd6b3b1ad00a45910b7f90018b4849b8f7d278f
---
M LinkedWiki.php
A js/table2CSV.js
A test/README
A test/step_definitions/CSV_steps.rb
M test/step_definitions/sparql_steps.rb
A test/support/pages/LinkedwikiTableBasic.rb
A test/table2CSV.feature
A test/tests.sh
8 files changed, 343 insertions(+), 13 deletions(-)


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

diff --git a/LinkedWiki.php b/LinkedWiki.php
index cb9a842..377e969 100644
--- a/LinkedWiki.php
+++ b/LinkedWiki.php
@@ -33,6 +33,20 @@
'author' = array( '[http://www.mediawiki.org/wiki/User:Karima_Rafes Karima 
Rafes]' )
 );
 
+$linkedWikiTpl = array(
+   'localBasePath' = dirname( __FILE__ ) . '/js',
+   'remoteExtPath' = 'LinkedWiki/js',
+   'group' = 'ext.LinkedWiki',
+);
+
+$wgResourceModules += array(
+   /* Third-party modules */
+
+   'ext.LinkedWiki.table2CSV' = $linkedWikiTpl + array(
+   'scripts' = 'table2CSV.js',
+   ),
+);
+
 //Paths
 $wgLinkedWikiPath = dirname(__FILE__);
 $wgLinkedWikiClassesPath = $wgLinkedWikiPath . /class;
@@ -91,6 +105,9 @@
 
 function efSparqlParserFunction_Render( $parser) {
//global 
$wgLinkedWikiLocalEndPoint,$wgLinkedWikiEndPoint,$wgLinkedWikiGraphWiki;
+   global $wgOut;
+   $wgOut-addModules( 'ext.LinkedWiki.table2CSV' );
+   
$args = func_get_args(); // $parser, $param1 = '', $param2 = ''
$countArgs = count($args);
$query = isset($args[1])? urldecode($args[1]) : ;
@@ -125,7 +142,7 @@
if($templates != ){
return 
efSparqlParserFunction_array($query,$endpoint,$classHeaders ,$headers , 
$templates,$footer , $debug);
}else{
-   return 
efSparqlParserFunction_simple($query,$endpoint,$classHeaders,$headers,$footer, 
$debug);
+   return 
efSparqlParserFunction_simpleHTML($query,$endpoint,$classHeaders,$headers,$footer,
 $debug);
}
}
}else {
@@ -311,7 +328,7 @@
 
return array($str, 'noparse' = false, 'isHTML' = false);
 }
-
+/*
 function efSparqlParserFunction_simple( $querySparqlWiki,$endpoint 
,$classHeaders = '',$headers = '',$footer = '', $debug = null){
$specialC = array(#39;);
$replaceC = array(');
@@ -396,6 +413,98 @@
}
 
return array($str, 'noparse' = false, 'isHTML' = false);
+}*/
+
+function efSparqlParserFunction_simpleHTML( $querySparqlWiki,$endpoint 
,$classHeaders = '',$headers = '',$footer = '', $debug = null){
+   $specialC = array(#39;);
+   $replaceC = array(');
+   $querySparql  = str_replace($specialC ,$replaceC , $querySparqlWiki);
+
+   $str = ;
+   $sp = new Endpoint($endpoint);
+   $rs = $sp-query($querySparqlWiki);
+   $errs = $sp-getErrors();
+   if ($errs) {
+   $strerr = ;
+   foreach ($errs as $err) {
+   $strerr .= '''Error #sparql :. $err .'''br/;
+   }
+   return $strerr;
+   }
+
+   $lignegrise = false;
+   $variables = $rs['result']['variables'];
+   $str = table class='wikitable sortable'\n;
+   if( $headers !='' ){
+   $TableTitleHeaders = explode(,,$headers);
+   $TableClassHeaders = explode(,,$classHeaders);
+   $classStr = ;
+   $lineTD = ;
+   for ($i = 0; $i  count($TableClassHeaders) ; $i++) {
+   if(!isset($TableClassHeaders[$i]) || 
$TableClassHeaders[$i] == ){
+   $classStr = ;
+   }else{
+   $classStr =   class=\.$TableClassHeaders[$i] 
. \;
+   }
+   $TableTitleHeaders[$i] = th.$classStr. . 
$TableTitleHeaders[$i]./th;
+   }
+   $str .= tr;
+   $str .= implode(\n,$TableTitleHeaders );
+   $str .= /tr\n;
+   }else{
+   $TableClassHeaders = explode(,,$classHeaders);
+   $classStr = ;
+   for ($i = 0; $i  count($variables) ; $i++) {
+   if(!isset($TableClassHeaders[$i]) || 
$TableClassHeaders[$i] == )
+   $classStr = ;
+   else
+   $classStr =   class=\.$TableClassHeaders[$i] . \;
+   $TableTitleHeaders[$i] = 
th.$classStr..$variables[$i]./th;
+   }
+
+   $str .= tr\n;
+   $str .= implode(\n,$TableTitleHeaders );
+   $str .= /tr\n;
+   }
+   
+   
+   foreach ( $rs['result']['rows'] as $row) {
+   
+   $str .= tr;
+   

[MediaWiki-commits] [Gerrit] Export table to CSV - change (mediawiki...LinkedWiki)

2013-07-23 Thread Karima Rafes (Code Review)
Karima Rafes has submitted this change and it was merged.

Change subject: Export table to CSV
..


Export table to CSV

Change-Id: I9fd6b3b1ad00a45910b7f90018b4849b8f7d278f
---
M LinkedWiki.php
A js/table2CSV.js
A test/README
A test/step_definitions/CSV_steps.rb
M test/step_definitions/sparql_steps.rb
A test/support/pages/LinkedwikiTableBasic.rb
A test/table2CSV.feature
A test/tests.sh
8 files changed, 343 insertions(+), 13 deletions(-)

Approvals:
  Karima Rafes: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/LinkedWiki.php b/LinkedWiki.php
index cb9a842..377e969 100644
--- a/LinkedWiki.php
+++ b/LinkedWiki.php
@@ -33,6 +33,20 @@
'author' = array( '[http://www.mediawiki.org/wiki/User:Karima_Rafes Karima 
Rafes]' )
 );
 
+$linkedWikiTpl = array(
+   'localBasePath' = dirname( __FILE__ ) . '/js',
+   'remoteExtPath' = 'LinkedWiki/js',
+   'group' = 'ext.LinkedWiki',
+);
+
+$wgResourceModules += array(
+   /* Third-party modules */
+
+   'ext.LinkedWiki.table2CSV' = $linkedWikiTpl + array(
+   'scripts' = 'table2CSV.js',
+   ),
+);
+
 //Paths
 $wgLinkedWikiPath = dirname(__FILE__);
 $wgLinkedWikiClassesPath = $wgLinkedWikiPath . /class;
@@ -91,6 +105,9 @@
 
 function efSparqlParserFunction_Render( $parser) {
//global 
$wgLinkedWikiLocalEndPoint,$wgLinkedWikiEndPoint,$wgLinkedWikiGraphWiki;
+   global $wgOut;
+   $wgOut-addModules( 'ext.LinkedWiki.table2CSV' );
+   
$args = func_get_args(); // $parser, $param1 = '', $param2 = ''
$countArgs = count($args);
$query = isset($args[1])? urldecode($args[1]) : ;
@@ -125,7 +142,7 @@
if($templates != ){
return 
efSparqlParserFunction_array($query,$endpoint,$classHeaders ,$headers , 
$templates,$footer , $debug);
}else{
-   return 
efSparqlParserFunction_simple($query,$endpoint,$classHeaders,$headers,$footer, 
$debug);
+   return 
efSparqlParserFunction_simpleHTML($query,$endpoint,$classHeaders,$headers,$footer,
 $debug);
}
}
}else {
@@ -311,7 +328,7 @@
 
return array($str, 'noparse' = false, 'isHTML' = false);
 }
-
+/*
 function efSparqlParserFunction_simple( $querySparqlWiki,$endpoint 
,$classHeaders = '',$headers = '',$footer = '', $debug = null){
$specialC = array(#39;);
$replaceC = array(');
@@ -396,6 +413,98 @@
}
 
return array($str, 'noparse' = false, 'isHTML' = false);
+}*/
+
+function efSparqlParserFunction_simpleHTML( $querySparqlWiki,$endpoint 
,$classHeaders = '',$headers = '',$footer = '', $debug = null){
+   $specialC = array(#39;);
+   $replaceC = array(');
+   $querySparql  = str_replace($specialC ,$replaceC , $querySparqlWiki);
+
+   $str = ;
+   $sp = new Endpoint($endpoint);
+   $rs = $sp-query($querySparqlWiki);
+   $errs = $sp-getErrors();
+   if ($errs) {
+   $strerr = ;
+   foreach ($errs as $err) {
+   $strerr .= '''Error #sparql :. $err .'''br/;
+   }
+   return $strerr;
+   }
+
+   $lignegrise = false;
+   $variables = $rs['result']['variables'];
+   $str = table class='wikitable sortable'\n;
+   if( $headers !='' ){
+   $TableTitleHeaders = explode(,,$headers);
+   $TableClassHeaders = explode(,,$classHeaders);
+   $classStr = ;
+   $lineTD = ;
+   for ($i = 0; $i  count($TableClassHeaders) ; $i++) {
+   if(!isset($TableClassHeaders[$i]) || 
$TableClassHeaders[$i] == ){
+   $classStr = ;
+   }else{
+   $classStr =   class=\.$TableClassHeaders[$i] 
. \;
+   }
+   $TableTitleHeaders[$i] = th.$classStr. . 
$TableTitleHeaders[$i]./th;
+   }
+   $str .= tr;
+   $str .= implode(\n,$TableTitleHeaders );
+   $str .= /tr\n;
+   }else{
+   $TableClassHeaders = explode(,,$classHeaders);
+   $classStr = ;
+   for ($i = 0; $i  count($variables) ; $i++) {
+   if(!isset($TableClassHeaders[$i]) || 
$TableClassHeaders[$i] == )
+   $classStr = ;
+   else
+   $classStr =   class=\.$TableClassHeaders[$i] . \;
+   $TableTitleHeaders[$i] = 
th.$classStr..$variables[$i]./th;
+   }
+
+   $str .= tr\n;
+   $str .= implode(\n,$TableTitleHeaders );
+   $str .= /tr\n;
+   }
+   
+   
+   foreach ( $rs['result']['rows'] as $row) {
+   
+   $str .= tr;
+   if($lignegrise)
+ 

[MediaWiki-commits] [Gerrit] Use hit_for_pass on TTL = 0 objects - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has uploaded a new change for review.

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


Change subject: Use hit_for_pass on TTL = 0 objects
..

Use hit_for_pass on TTL = 0 objects

Change-Id: I529fcf9057c9887a3c96db4b4507c9251be5b7c0
---
M templates/varnish/mobile-backend.inc.vcl.erb
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/27/75327/1

diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 3f9c9b7..089de00 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -36,6 +36,10 @@
set beresp.ttl = 60 s;
}
 
+   if (beresp.ttl = 0s) {
+   set beresp.ttl = 120s;
+   return (hit_for_pass);
+   }
return (deliver);
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I529fcf9057c9887a3c96db4b4507c9251be5b7c0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use hit_for_pass on TTL = 0 objects - change (operations/puppet)

2013-07-23 Thread Mark Bergsma (Code Review)
Mark Bergsma has submitted this change and it was merged.

Change subject: Use hit_for_pass on TTL = 0 objects
..


Use hit_for_pass on TTL = 0 objects

Change-Id: I529fcf9057c9887a3c96db4b4507c9251be5b7c0
---
M templates/varnish/mobile-backend.inc.vcl.erb
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/templates/varnish/mobile-backend.inc.vcl.erb 
b/templates/varnish/mobile-backend.inc.vcl.erb
index 3f9c9b7..089de00 100644
--- a/templates/varnish/mobile-backend.inc.vcl.erb
+++ b/templates/varnish/mobile-backend.inc.vcl.erb
@@ -36,6 +36,10 @@
set beresp.ttl = 60 s;
}
 
+   if (beresp.ttl = 0s) {
+   set beresp.ttl = 120s;
+   return (hit_for_pass);
+   }
return (deliver);
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I529fcf9057c9887a3c96db4b4507c9251be5b7c0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Mark Bergsma m...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@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] tablesorter: Keyboard accessibility for sort headers. - change (mediawiki/core)

2013-07-23 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: tablesorter: Keyboard accessibility for sort headers.
..


tablesorter: Keyboard accessibility for sort headers.

* Add role=button and tabindex=0
* Handle Enter keypresses

Change-Id: I2b937eba605b7e6a98612a02c75eb9e7f3477527
---
M resources/jquery/jquery.tablesorter.js
1 file changed, 13 insertions(+), 5 deletions(-)

Approvals:
  Hoo man: Looks good to me, approved
  Matmarex: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/resources/jquery/jquery.tablesorter.js 
b/resources/jquery/jquery.tablesorter.js
index 97357d9..a231f26 100644
--- a/resources/jquery/jquery.tablesorter.js
+++ b/resources/jquery/jquery.tablesorter.js
@@ -332,7 +332,10 @@
}
 
if ( !this.sortDisabled ) {
-   $( this ).addClass( table.config.cssHeader 
).attr( 'title', msg[1] );
+   $( this )
+   .addClass( table.config.cssHeader )
+   .attr( 'title', msg[1] )
+   .prop( 'tabIndex', 0 ).attr( 'role', 
'button' );
}
 
// add cell to headerList
@@ -749,10 +752,15 @@
 
// Apply event handling to headers
// this is too big, perhaps break it 
out?
-   $headers.filter( ':not(.unsortable)' 
).click( function ( e ) {
-   if ( 
e.target.nodeName.toLowerCase() === 'a' ) {
-   // The user clicked on 
a link inside a table header
-   // Do nothing and let 
the default link click action continue
+   $headers.filter( ':not(.unsortable)' 
).on( 'keypress click', function ( e ) {
+   if ( e.type === 'click'  
e.target.nodeName.toLowerCase() === 'a' ) {
+   // The user clicked on 
a link inside a table header.
+   // Do nothing and let 
the default link click action continue.
+   return true;
+   }
+
+   if ( e.type === 'keypress'  
e.which !== 13 ) {
+   // Only handle 
keypresses on the Enter key.
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b937eba605b7e6a98612a02c75eb9e7f3477527
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Matmarex matma@gmail.com
Gerrit-Reviewer: TheDJ hartman.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] A test for IME help links - change (qa/browsertests)

2013-07-23 Thread Amire80 (Code Review)
Amire80 has uploaded a new change for review.

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


Change subject: A test for IME help links
..

A test for IME help links

Change-Id: I78993d31faba2f70a56d837afac095c63f582823
---
M features/step_definitions/uls_ime_steps.rb
M features/support/pages/random_page.rb
M features/uls_cog_sidebar_logged_user.feature
3 files changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/28/75328/1

diff --git a/features/step_definitions/uls_ime_steps.rb 
b/features/step_definitions/uls_ime_steps.rb
index f93a588..d2431be 100644
--- a/features/step_definitions/uls_ime_steps.rb
+++ b/features/step_definitions/uls_ime_steps.rb
@@ -24,6 +24,10 @@
   on(RandomPage).more_languages
 end
 
+When(/^I click the ellipsis button$/) do
+  on(RandomPage).more_languages_button
+end
+
 When(/^in the language filter I type (.+)$/) do |language_abbreviation|
   on(RandomPage).language_filter=language_abbreviation
 end
@@ -51,3 +55,7 @@
 Then(/^I should see the enabled input method keyboard icon at the bottom 
right$/) do
   on(RandomPage).input_method_enabled_element.should be_visible
 end
+
+Then(/^I should see the How to use link near the Malayalam transliteration 
item$/) do
+  on(RandomPage).how_to_use_ml_transliteration_element.should be_visible
+end
diff --git a/features/support/pages/random_page.rb 
b/features/support/pages/random_page.rb
index ca5e447..7a11565 100644
--- a/features/support/pages/random_page.rb
+++ b/features/support/pages/random_page.rb
@@ -21,6 +21,8 @@
   a(:printable_version, text: 'Printable version')
   li(:uls_malayalam_inscript2_item, data_ime_inputmethod: 'ml-inscript2')
   button(:search_button, id: 'searchButton')
+  button(:more_languages_button, class: 'uls-more-languages')
+  a(:how_to_use_ml_transliteration, href: 
'https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Extension:UniversalLanguageSelector/Input_methods/ml-transliteration')
   text_field(:search_input, id: 'searchInput')
   a(:uls_trigger, class: 'uls-trigger')
 end
diff --git a/features/uls_cog_sidebar_logged_user.feature 
b/features/uls_cog_sidebar_logged_user.feature
index 9ce7ed4..eb6a3e4 100644
--- a/features/uls_cog_sidebar_logged_user.feature
+++ b/features/uls_cog_sidebar_logged_user.feature
@@ -48,6 +48,14 @@
 Then I can enable input methods
   And I can disable input methods
 
+  Scenario: Input settings display
+Given I navigate to the Language Settings panel
+When I click Input
+  And I click the ellipsis button
+  And in the language filter I type ml
+  And I click on the link to select Malayalam
+Then I should see the How to use link near the Malayalam transliteration 
item
+
   Scenario: Fonts default settings and display
 Given I navigate to the Language Settings panel
 When I click Fonts

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78993d31faba2f70a56d837afac095c63f582823
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il

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


[MediaWiki-commits] [Gerrit] (bug 51788) Close amwikiquote and uzwikibooks - change (operations/mediawiki-config)

2013-07-23 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: (bug 51788) Close amwikiquote and uzwikibooks
..

(bug 51788) Close amwikiquote and uzwikibooks

Since none of the wikis have any definitions inside wgGroupOverrides,
I'm only adding them to closed.dblist per Wikitech instructions.

Bug: 51788
Change-Id: I09293ec9bb217edc974f74b0f7a2736d3db311e8
---
M closed.dblist
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/closed.dblist b/closed.dblist
index f0bd08d..e42e30d 100644
--- a/closed.dblist
+++ b/closed.dblist
@@ -8,6 +8,7 @@
 alswikibooks
 alswikiquote
 alswiktionary
+amwikiquote
 angwikiquote
 angwikisource
 astwikibooks
@@ -100,6 +101,7 @@
 ugwikibooks
 ugwikiquote
 usabilitywiki
+uzwikibooks
 vewikimedia
 vowikibooks
 vowikiquote

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I09293ec9bb217edc974f74b0f7a2736d3db311e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder tom...@twkozlowski.net

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


[MediaWiki-commits] [Gerrit] Store compressed JSON since size is limited - change (mediawiki...TemplateData)

2013-07-23 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: Store compressed JSON since size is limited
..

Store compressed JSON since size is limited

We only have 65535 bytes, let's use them wisely.

But only compress if necessary; page properties are sometimes shown as
plaintext (e.g. on Special:PagesWithProp) and it would be nice to
avoid showing the user binary data if possible.

Support compressed and uncompressed inputs in TemplateDataBlob::newFromJSON;
no backwards-incompatible changes were made in public methods. Added
TemplateDataBlob#getJSONForDatabase for the sometimes-compressed form,
used it where applicable.

Bug: 51740
Change-Id: Ie66b0dd6b6dab6f8648e78595c41e52d9c704d57
---
M TemplateData.hooks.php
M TemplateDataBlob.php
2 files changed, 36 insertions(+), 9 deletions(-)


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

diff --git a/TemplateData.hooks.php b/TemplateData.hooks.php
index 25d2921..91e6547 100644
--- a/TemplateData.hooks.php
+++ b/TemplateData.hooks.php
@@ -87,7 +87,7 @@
return 'div class=error' . $status-getHtml() . 
'/div';
}
 
-   $parser-getOutput()-setProperty( 'templatedata', 
$ti-getJSON() );
+   $parser-getOutput()-setProperty( 'templatedata', 
$ti-getJSONForDatabase() );
 
$parser-getOutput()-addModules( 'ext.templateData' );
 
diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index 5a17124..a845dde 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -12,6 +12,8 @@
  * @class
  */
 class TemplateDataBlob {
+   // Size of MySQL 'blob' field; page_props table where the data is 
stored uses one.
+   const MAX_LENGTH = 65535;
 
/**
 * @var stdClass
@@ -24,11 +26,23 @@
private $status;
 
/**
-*  @param string $json
+* Validate passed JSON (possibly gzip-compressed) and create new 
TemplateDataBlob object. 
+*
+* @param string $json
+* @throws MWException
 * @return TemplateInfo
 */
public static function newFromJSON( $json ) {
-   $tdb = new self( json_decode( $json ) );
+   if ( substr( $json, 0, 2 ) === \037\213 ) {
+   // GZIP header
+   $tdb = new self( json_decode( gzdecode( $json ) ) );
+   } elseif ( substr( $json, 0, 1 ) === { ) {
+   // Probably raw JSON
+   $tdb = new self( json_decode( $json ) );
+   } else {
+   throw new MWException( Invalid data passed to 
TemplateDataBlob::newFromJSON );
+   }
+
$status = $tdb-parse();
 
if ( !$status-isOK() ) {
@@ -304,12 +318,11 @@
}
}
 
-   // Size of MySQL 'blob' field; page_props table where this is 
stored uses one.
-   $maxlength = 65535;
-   $length = strlen( $this-getJSON() );
-
-   if ( $length  $maxlength ) {
-   return Status::newFatal( 'templatedata-invalid-length', 
$length, $maxlength );
+   // Check against compressed length to avoid confusion when size 
suddenly drops
+   // after exceeding the maximum
+   $length = strlen( $this-getJSONForDatabase( /* $alwaysCompress 
= */true ) );
+   if ( $length  self::MAX_LENGTH ) {
+   return Status::newFatal( 'templatedata-invalid-length', 
$length, self::MAX_LENGTH );
}
 
return Status::newGood();
@@ -345,6 +358,20 @@
return json_encode( $this-data );
}
 
+   /**
+* @return string JSON, possible gzip-compressed
+*/
+   public function getJSONForDatabase( $alwaysCompress = false ) {
+   $json = $this-getJSON();
+   // Only compress if necessary; page properties are sometimes 
shown as plaintext
+   // and it would be nice to avoid showing the user binary data 
if possible
+   if ( $alwaysCompress || strlen( $json )  self::MAX_LENGTH ) {
+   $json = gzencode( $json );
+   }
+
+   return $json;
+   }
+
public function getHtml( IContextSource $context ) {
global $wgContLang;
$langCode = $wgContLang-getCode();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie66b0dd6b6dab6f8648e78595c41e52d9c704d57
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com

___
MediaWiki-commits mailing list

[MediaWiki-commits] [Gerrit] Handle meta-only transculsions as meta items - change (mediawiki...VisualEditor)

2013-07-23 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Handle meta-only transculsions as meta items
..

Handle meta-only transculsions as meta items

To achieve this we need to evaluate the DOM contents of
transclusion nodes to see if it consists solely of meta items
and whitespace.

To check for metaitems we do a model registry match, but with an
additional parameter to exclude mwTransclusion types as a possible
result (as the first item may be a meta tag, but with a mw:Transclusion
typeof attribute).

Bug: 51322
Change-Id: I89a220350fb7e10e15f3682d21438539196a5846
---
M VisualEditor.php
A modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js
M modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
M modules/ve-mw/test/dm/ve.dm.mwExample.js
M modules/ve-mw/test/index.php
M modules/ve/dm/ve.dm.Converter.js
M modules/ve/dm/ve.dm.ModelRegistry.js
M modules/ve/test/ve.test.utils.js
8 files changed, 149 insertions(+), 3 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index 1ea12f7..4b1d88b 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -365,6 +365,7 @@
've-mw/dm/metaitems/ve.dm.MWCategoryMetaItem.js',
've-mw/dm/metaitems/ve.dm.MWDefaultSortMetaItem.js',
've-mw/dm/metaitems/ve.dm.MWLanguageMetaItem.js',
+   've-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js',
 
've-mw/dm/models/ve.dm.MWTransclusionModel.js',
've-mw/dm/models/ve.dm.MWTransclusionPartModel.js',
diff --git a/modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js 
b/modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js
new file mode 100644
index 000..2829fc6
--- /dev/null
+++ b/modules/ve-mw/dm/metaitems/ve.dm.MWTransclusionMetaItem.js
@@ -0,0 +1,35 @@
+/*!
+ * VisualEditor DataModel MWTransclusionMetaItem class.
+ *
+ * @copyright 2011-2013 VisualEditor Team and others; see AUTHORS.txt
+ * @license The MIT License (MIT); see LICENSE.txt
+ */
+
+/**
+ * DataModel MW-specific meta item.
+ *
+ * @class
+ * @abstract
+ * @extends ve.dm.AlienMetaItem
+ * @constructor
+ * @param {Object} element Reference to element in meta-linmod
+ */
+ve.dm.MWTransclusionMetaItem = function VeDmMWTransclusionMetaItem( element ) {
+   // Parent constructor
+   ve.dm.AlienMetaItem.call( this, element );
+};
+
+/* Inheritance */
+
+ve.inheritClass( ve.dm.MWTransclusionMetaItem, ve.dm.AlienMetaItem );
+
+/* Static Properties */
+
+ve.dm.MWTransclusionMetaItem.static.name = 'mwTransclusionMeta';
+
+// mwTransclusionMetaItems are generated by 
ve.dm.MWTransclusionNode#toDataElement when
+// all of the transclusions contents are considered to be metadata or 
whitespace
+
+/* Registration */
+
+ve.dm.modelRegistry.register( ve.dm.MWTransclusionMetaItem );
diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
index 620ee76..6ffbf8f 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWTransclusionNode.js
@@ -61,6 +61,10 @@
 };
 
 ve.dm.MWTransclusionNode.static.toDataElement = function ( domElements, 
converter ) {
+   if ( converter.isDomAllMetaOrWhitespace( domElements, 
['mwTransclusion', 'mwTransclusionInline', 'mwTransclusionBlock'] ) ) {
+   return ve.dm.MWTransclusionMetaItem.static.toDataElement( 
domElements, converter );
+   }
+
var dataElement, index,
mwDataJSON = domElements[0].getAttribute( 'data-mw' ),
mwData = mwDataJSON ? JSON.parse( mwDataJSON ) : {},
diff --git a/modules/ve-mw/test/dm/ve.dm.mwExample.js 
b/modules/ve-mw/test/dm/ve.dm.mwExample.js
index ec10cbb..073c2d0 100644
--- a/modules/ve-mw/test/dm/ve.dm.mwExample.js
+++ b/modules/ve-mw/test/dm/ve.dm.mwExample.js
@@ -27,7 +27,12 @@
'inlineClose': '/span',
'mixed': 'link about=#mwt1 rel=mw:WikiLink/Category 
typeof=mw:Transclusion 
data-mw={quot;idquot;:quot;mwt1quot;,quot;targetquot;:{quot;wtquot;:quot;Inlinequot;},quot;paramsquot;:{quot;1quot;:{quot;wtquot;:quot;5,678quot;}}}span
 about=#mwt1Foo/span',
'pairOne': 'p about=#mwt1 typeof=mw:Transclusion 
data-mw={quot;paramsquot;:{quot;1quot;:{quot;wtquot;:quot;fooquot;}}} 
data-parsoid=1foo/p',
-   'pairTwo': 'p about=#mwt2 typeof=mw:Transclusion 
data-mw={quot;paramsquot;:{quot;1quot;:{quot;wtquot;:quot;fooquot;}}} 
data-parsoid=2foo/p'
+   'pairTwo': 'p about=#mwt2 typeof=mw:Transclusion 
data-mw={quot;paramsquot;:{quot;1quot;:{quot;wtquot;:quot;fooquot;}}} 
data-parsoid=2foo/p',
+   'meta':
+   'link rel=mw:WikiLink/Category href=./Category:Page 
about=#mwt1 typeof=mw:Transclusion ' +
+   

[MediaWiki-commits] [Gerrit] admin::roots is plural (for lanthanum) - change (operations/puppet)

2013-07-23 Thread Hashar (Code Review)
Hashar has uploaded a new change for review.

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


Change subject: admin::roots is plural (for lanthanum)
..

admin::roots is plural (for lanthanum)

Change-Id: I9ad89ad2de79464cdf48335d2d9dda7dee8c4503
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/32/75332/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 5ec6ae4..951666c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1349,7 +1349,7 @@
 
 node 'lanthanum.eqiad.wmnet' {
 include standard,
-admins::root,
+admins::roots,
 admins::jenkins,
 contint::packages,
 role::jenkins::slave::production  # RT #5074

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9ad89ad2de79464cdf48335d2d9dda7dee8c4503
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Re-organize classes to be a bit more organized - change (apps...commons)

2013-07-23 Thread SuchABot (Code Review)
SuchABot has uploaded a new change for review.

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


Change subject: Re-organize classes to be a bit more organized
..

Re-organize classes to be a bit more organized

Change-Id: Ie3500c4520a09be28f1856447e66265dd499a680
GitHub: https://github.com/wikimedia/apps-android-commons/pull/36
---
M commons/AndroidManifest.xml
A commons/src/main/java/org/wikimedia/commons/api/MWApi.java
R 
commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/MultipleShareActivity.java
R 
commons/src/main/java/org/wikimedia/commons/upload/MultipleUploadListFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/ShareActivity.java
R commons/src/main/java/org/wikimedia/commons/upload/SingleUploadFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/StartUploadTask.java
R commons/src/main/java/org/wikimedia/commons/upload/UploadService.java
11 files changed, 42 insertions(+), 20 deletions(-)


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

diff --git a/commons/AndroidManifest.xml b/commons/AndroidManifest.xml
index 02cfcf6..a9b6f8d 100644
--- a/commons/AndroidManifest.xml
+++ b/commons/AndroidManifest.xml
@@ -39,7 +39,7 @@
 android:theme=@style/NoTitle 
 /activity
 activity
-android:name=.ShareActivity
+android:name=.upload.ShareActivity
 android:icon=@drawable/ic_launcher
 android:label=@string/app_name
 
@@ -53,7 +53,7 @@
 /intent-filter
 /activity
 activity
-android:name=.MultipleShareActivity
+android:name=.upload.MultipleShareActivity
 android:icon=@drawable/ic_launcher
 android:label=@string/app_name
 
@@ -82,7 +82,7 @@
 android:label=@string/title_activity_settings
 /
 activity android:name=.AboutActivity 
android:label=@string/title_activity_about/
-service android:name=UploadService 
+service android:name=.upload.UploadService 
 /service
 service
 android:name=.auth.WikiAccountAuthenticatorService
diff --git a/commons/src/main/java/org/wikimedia/commons/api/MWApi.java 
b/commons/src/main/java/org/wikimedia/commons/api/MWApi.java
new file mode 100644
index 000..f626b2e
--- /dev/null
+++ b/commons/src/main/java/org/wikimedia/commons/api/MWApi.java
@@ -0,0 +1,8 @@
+package org.wikimedia.commons.api;
+
+import com.android.volley.RequestQueue;
+
+public class MWApi {
+private RequestQueue queue;
+
+}
diff --git 
a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java 
b/commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
similarity index 98%
rename from 
commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java
rename to 
commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
index 76887f4..5898db4 100644
--- a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
@@ -1,4 +1,4 @@
-package org.wikimedia.commons;
+package org.wikimedia.commons.category;
 
 import android.app.Activity;
 import android.content.ContentProviderClient;
@@ -17,6 +17,9 @@
 import com.actionbarsherlock.view.MenuItem;
 import org.mediawiki.api.ApiResult;
 import org.mediawiki.api.MWApi;
+import org.wikimedia.commons.CommonsApplication;
+import org.wikimedia.commons.R;
+import org.wikimedia.commons.Utils;
 import org.wikimedia.commons.category.Category;
 import org.wikimedia.commons.category.CategoryContentProvider;
 import org.wikimedia.commons.contributions.Contribution;
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
index a77689b..0a95749 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
@@ -17,6 +17,7 @@
 import org.wikimedia.commons.*;
 import org.wikimedia.commons.auth.*;
 import org.wikimedia.commons.media.*;
+import org.wikimedia.commons.upload.UploadService;
 
 public  class   ContributionsActivity
 extends AuthenticatedActivity
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
index 5372152..e8caa90 100644
--- 

[MediaWiki-commits] [Gerrit] admin::roots is plural (for lanthanum) - change (operations/puppet)

2013-07-23 Thread ArielGlenn (Code Review)
ArielGlenn has submitted this change and it was merged.

Change subject: admin::roots is plural (for lanthanum)
..


admin::roots is plural (for lanthanum)

Change-Id: I9ad89ad2de79464cdf48335d2d9dda7dee8c4503
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 5ec6ae4..951666c 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1349,7 +1349,7 @@
 
 node 'lanthanum.eqiad.wmnet' {
 include standard,
-admins::root,
+admins::roots,
 admins::jenkins,
 contint::packages,
 role::jenkins::slave::production  # RT #5074

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ad89ad2de79464cdf48335d2d9dda7dee8c4503
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: ArielGlenn ar...@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] Re-organize classes to be a bit more organized - change (apps...commons)

2013-07-23 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Re-organize classes to be a bit more organized
..


Re-organize classes to be a bit more organized

Change-Id: Ie3500c4520a09be28f1856447e66265dd499a680
GitHub: https://github.com/wikimedia/apps-android-commons/pull/36
---
M commons/AndroidManifest.xml
A commons/src/main/java/org/wikimedia/commons/api/MWApi.java
R 
commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/MultipleShareActivity.java
R 
commons/src/main/java/org/wikimedia/commons/upload/MultipleUploadListFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/ShareActivity.java
R commons/src/main/java/org/wikimedia/commons/upload/SingleUploadFragment.java
R commons/src/main/java/org/wikimedia/commons/upload/StartUploadTask.java
R commons/src/main/java/org/wikimedia/commons/upload/UploadService.java
11 files changed, 42 insertions(+), 20 deletions(-)

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



diff --git a/commons/AndroidManifest.xml b/commons/AndroidManifest.xml
index 02cfcf6..a9b6f8d 100644
--- a/commons/AndroidManifest.xml
+++ b/commons/AndroidManifest.xml
@@ -39,7 +39,7 @@
 android:theme=@style/NoTitle 
 /activity
 activity
-android:name=.ShareActivity
+android:name=.upload.ShareActivity
 android:icon=@drawable/ic_launcher
 android:label=@string/app_name
 
@@ -53,7 +53,7 @@
 /intent-filter
 /activity
 activity
-android:name=.MultipleShareActivity
+android:name=.upload.MultipleShareActivity
 android:icon=@drawable/ic_launcher
 android:label=@string/app_name
 
@@ -82,7 +82,7 @@
 android:label=@string/title_activity_settings
 /
 activity android:name=.AboutActivity 
android:label=@string/title_activity_about/
-service android:name=UploadService 
+service android:name=.upload.UploadService 
 /service
 service
 android:name=.auth.WikiAccountAuthenticatorService
diff --git a/commons/src/main/java/org/wikimedia/commons/api/MWApi.java 
b/commons/src/main/java/org/wikimedia/commons/api/MWApi.java
new file mode 100644
index 000..f626b2e
--- /dev/null
+++ b/commons/src/main/java/org/wikimedia/commons/api/MWApi.java
@@ -0,0 +1,8 @@
+package org.wikimedia.commons.api;
+
+import com.android.volley.RequestQueue;
+
+public class MWApi {
+private RequestQueue queue;
+
+}
diff --git 
a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java 
b/commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
similarity index 98%
rename from 
commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java
rename to 
commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
index 76887f4..5898db4 100644
--- a/commons/src/main/java/org/wikimedia/commons/CategorizationFragment.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/category/CategorizationFragment.java
@@ -1,4 +1,4 @@
-package org.wikimedia.commons;
+package org.wikimedia.commons.category;
 
 import android.app.Activity;
 import android.content.ContentProviderClient;
@@ -17,6 +17,9 @@
 import com.actionbarsherlock.view.MenuItem;
 import org.mediawiki.api.ApiResult;
 import org.mediawiki.api.MWApi;
+import org.wikimedia.commons.CommonsApplication;
+import org.wikimedia.commons.R;
+import org.wikimedia.commons.Utils;
 import org.wikimedia.commons.category.Category;
 import org.wikimedia.commons.category.CategoryContentProvider;
 import org.wikimedia.commons.contributions.Contribution;
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
index a77689b..0a95749 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsActivity.java
@@ -17,6 +17,7 @@
 import org.wikimedia.commons.*;
 import org.wikimedia.commons.auth.*;
 import org.wikimedia.commons.media.*;
+import org.wikimedia.commons.upload.UploadService;
 
 public  class   ContributionsActivity
 extends AuthenticatedActivity
diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionsListFragment.java
index 5372152..e8caa90 100644
--- 

[MediaWiki-commits] [Gerrit] (bug 51876, hotfix) ensure interwiki links render correctly ... - change (mediawiki...Wikibase)

2013-07-23 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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


Change subject: (bug 51876, hotfix) ensure interwiki links render correctly in 
sidebar
..

(bug 51876, hotfix) ensure interwiki links render correctly in sidebar

the proper solution is to make sure the site_identifiers can and is
populated correctly.  this makes things work in the meantime.

Change-Id: If404ebb43d7da161bdd61bf4630b8866edcf4eab
---
M client/includes/LangLinkHandler.php
1 file changed, 12 insertions(+), 8 deletions(-)


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

diff --git a/client/includes/LangLinkHandler.php 
b/client/includes/LangLinkHandler.php
index 96deb10..3aa1cb9 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -427,23 +427,27 @@
 
$repoLinks = $this-getEffectiveRepoLinks( $title, $out );
 
-   foreach ( $repoLinks as $wiki = $page ) {
-   $targetSite = $this-sites-getSite( $wiki );
+   foreach ( $repoLinks as $siteId = $page ) {
+   $targetSite = $this-sites-getSite( $siteId );
if ( !$targetSite ) {
-   wfLogWarning( Unknown wiki '$wiki' used as 
sitelink target );
+   wfLogWarning( Unknown wiki '$siteId' used as 
sitelink target );
continue;
}
 
-   $nav = $targetSite-getNavigationIds();
-   $nav = array_values( $nav );
+   $siteGroup = $targetSite-getGroup();
 
-   if ( isset( $nav[0] ) ) {
-   $lang = $nav[0];
+   // extract interwiki code
+   // @fixme once 51876 is fixed
+   $siteGroup = $siteGroup === 'wikipedia' ? 'wiki' : 
$siteGroup;
+   preg_match( '/([\w]*)' . $siteGroup . '$/', $siteId, 
$navIds );
+
+   if ( isset( $navIds[1] ) ) {
+   $lang = str_replace( '_', '-', $navIds[1] );
 
$link = $lang:$page;
$out-addLanguageLink( $link );
} else {
-   wfWarn( No interlanguage prefix found for 
$wiki. );
+   wfWarn( No interlanguage prefix found for 
$siteId. );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If404ebb43d7da161bdd61bf4630b8866edcf4eab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] fix site link section link for site group and use sites tabl... - change (mediawiki...Wikibase)

2013-07-23 Thread Aude (Code Review)
Aude has uploaded a new change for review.

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


Change subject: fix site link section link for site group and use sites table 
for this
..

fix site link section link for site group and use sites table for this

- now, the siteGroup setting is unused and removed.

Change-Id: Ie17f2af0900743011cbae6397d2e36622e9f1614
---
M client/WikibaseClient.hooks.php
M client/config/WikibaseClient.default.php
2 files changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Wikibase 
refs/changes/35/75335/1

diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 38d09cb..c187182 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -5,6 +5,7 @@
 use RecursiveDirectoryIterator;
 use RecursiveIteratorIterator;
 use SplFileInfo;
+use SiteSQLStore;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\Client\MovePageNotice;
 use Wikibase\DataModel\SimpleSiteLink;
@@ -591,12 +592,20 @@
$repoLinker = 
WikibaseClient::getDefaultInstance()-newRepoLinker();
$entityIdParser = 
WikibaseClient::getDefaultInstance()-getEntityIdParser();
 
+   $siteId = Settings::get( 'siteGlobalID' );
+   $site = SiteSQLStore::newInstance()-getSite( $siteId );
+
+   if ( !$site ) {
+   wfWarn( 'Cannot find site in sites table' );
+   return true;
+   }
+
$editLinkInjector = new RepoItemLinkGenerator(
$namespaceChecker,
$repoLinker,
$entityIdParser,
Settings::get( 'enableSiteLinkWidget' ),
-   Settings::get( 'siteGroup' )
+   $site-getGroup()
);
 
$action = \Action::getActionName( $skin-getContext() );
diff --git a/client/config/WikibaseClient.default.php 
b/client/config/WikibaseClient.default.php
index 31ab62c..0c445d7 100644
--- a/client/config/WikibaseClient.default.php
+++ b/client/config/WikibaseClient.default.php
@@ -59,8 +59,6 @@
'enableSiteLinkWidget' = true,
'propagateChangesToRepo' = true,
 
-   'siteGroup' = 'wikipedia', //TODO: require this to be set, 
default doesn't make sense.
-
/**
 * @todo this is a bit wikimedia-specific and need to find a 
better place for this stuff,
 * such as mediawiki-config, mediawiki messages for custom 
orders, or somewhere.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie17f2af0900743011cbae6397d2e36622e9f1614
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix double description - change (mediawiki...Sarcasm)

2013-07-23 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Fix double description
..

Fix double description

Remove ?

Change-Id: If8d1092a138f6226e5443d2e7da6825baa4e3b42
---
M sarcasm.php
1 file changed, 22 insertions(+), 15 deletions(-)


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

diff --git a/sarcasm.php b/sarcasm.php
index b554bfb..e02f087 100644
--- a/sarcasm.php
+++ b/sarcasm.php
@@ -11,7 +11,7 @@
  * @link https://www.mediawiki.org/wiki/Extension:Sarcasm
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
- 
+
 /**
  * Protect against register_globals vulnerabilities.
  * This line must be present before any global variable is referenced.
@@ -20,36 +20,43 @@
 echo( This is an extension to the MediaWiki package and cannot be run 
standalone.\n );
 die( -1 );
 }
- 
-// Extension credits that will show up on Special:Version
+
+// Extension credits that will show up on Special:Version
 $wgExtensionCredits['other'][] = array(
 'path'   = __FILE__,
 'name'   = 'Sarcasm',
 'version'= '1.0',
-'author' = '[http://sturmkrieg.de/User:Inquisitor_Ehrenstein 
Inquisitor Ehrenstein]', 
+'author' = '[http://sturmkrieg.de/User:Inquisitor_Ehrenstein 
Inquisitor Ehrenstein]',
 'url'= 'https://www.mediawiki.org/wiki/Extension:Sarcasm',
-'descriptionmsg' = 'This extension adds sarcasm tags to the wiki in 
order to more clearly show sarcasm in text.',
-'description'= 'This extension adds sarcasm tags to the wiki.'
+'description'= 'This extension adds sarcasm tags to the wiki in 
order to more clearly show sarcasm in text.',
 );
 
-
 $wgHooks['ParserFirstCallInit'][] = 'wfSarcasmParserInit';
- 
-// Hook our callback function into the parser
+
+/**
+ * Hook our callback function into the parser
+ * @param $parser Parser
+ * @return bool
+ */
 function wfSarcasmParserInit( Parser $parser ) {
-// When the parser sees the sample tag, it executes 
-// the wfSampleRender function (see below)
+// When the parser sees the sarcasm tag, it executes
+// the wfSarcasmRender function (see below)
 $parser-setHook( 'sarcasm', 'wfSarcasmRender' );
 // Always return true from this function. The return value does not 
denote
 // success or otherwise have meaning - it just must always be true.
 return true;
 }
 
-// Code for tags
-
+/**
+ * Code for tags
+ *
+ * @param $text string
+ * @param $args array
+ * @param $parser Parser
+ * @param $frame PPFrame
+ * @return string
+ */
 function wfSarcasmRender( $text, array $args, Parser $parser, PPFrame $frame ) 
{
 $output = $parser-recursiveTagParse( $text, $frame );
 return 'span class=sarcasm' . $output . '/span';
 }
-
-?
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If8d1092a138f6226e5443d2e7da6825baa4e3b42
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Sarcasm
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] ApiTemplateData: Fixed a typo in error message - change (mediawiki...TemplateData)

2013-07-23 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: ApiTemplateData: Fixed a typo in error message
..

ApiTemplateData: Fixed a typo in error message

Change-Id: Ib273c89dd5981e6ac613ed3901ec91b19ad767be
---
M api/ApiTemplateData.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/api/ApiTemplateData.php b/api/ApiTemplateData.php
index 260363a..bf6b138 100644
--- a/api/ApiTemplateData.php
+++ b/api/ApiTemplateData.php
@@ -84,7 +84,7 @@
$status = $tdb-getStatus();
if ( !$status-isOK() ) {
$this-dieUsage(
-   'Page #' . intval( $row-pp_page ) . ' 
templatedata contains invalid data:'
+   'Page #' . intval( $row-pp_page ) . ' 
templatedata contains invalid data: '
. $status-getMessage(), 
'templatedata-corrupt'
);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib273c89dd5981e6ac613ed3901ec91b19ad767be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Matmarex matma@gmail.com

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


  1   2   3   4   >