[MediaWiki-commits] [Gerrit] Improve footer separator - change (mediawiki...Echo)

2013-04-21 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: Improve footer separator
..

Improve footer separator

Bug: 47303
Change-Id: I5baed5e936dfaa9ef1fe11c900ee1ce94ccb748a
---
M Echo.i18n.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/Echo.i18n.php b/Echo.i18n.php
index 258b71b..2865b30 100644
--- a/Echo.i18n.php
+++ b/Echo.i18n.php
@@ -158,7 +158,7 @@
'notification-page-linked-bundle' = '$2 was {{GENDER:$1|linked}} from 
$3 and $4 other {{PLURAL:$5|page|pages}}. [[Special:WhatLinksHere/$2|See all 
links to this page]]',
 
// Email batch
-   'echo-email-batch-separator' = 
'', # only translate this 
message to other languages if you have to change it
+   'echo-email-batch-separator' = '-- ', # only translate this message to 
other languages if you have to change it
'echo-email-batch-bullet' = '•', # only translate this message to 
other languages if you have to change it
'echo-email-batch-subject-daily' = 'You have $1 
{{PLURAL:$2|notification|notifications}} today',
'echo-email-batch-subject-weekly' = 'You have $1 
{{PLURAL:$2|notification|notifications}} this week',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5baed5e936dfaa9ef1fe11c900ee1ce94ccb748a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add doc for SpecialPage::postText - change (mediawiki/core)

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

Change subject: Add doc for SpecialPage::postText
..


Add doc for SpecialPage::postText

A combined doc does not work

Add some spaces to function bodys

Change-Id: I98db22fe5028c97ad257ddd86524c0356881ff57
---
M includes/SpecialPage.php
1 file changed, 32 insertions(+), 8 deletions(-)

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



diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php
index d8f6fd9..c2814e6 100644
--- a/includes/SpecialPage.php
+++ b/includes/SpecialPage.php
@@ -445,7 +445,10 @@
 * @return Mixed
 * @deprecated since 1.18
 */
-   function name( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return 
wfSetVar( $this-mName, $x ); }
+   function name( $x = null ) {
+   wfDeprecated( __METHOD__, '1.18' );
+   return wfSetVar( $this-mName, $x );
+   }
 
/**
 * These mutators are very evil, as the relevant variables should not 
mutate.  So
@@ -454,7 +457,10 @@
 * @return Mixed
 * @deprecated since 1.18
 */
-   function restriction( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); 
return wfSetVar( $this-mRestriction, $x ); }
+   function restriction( $x = null ) {
+   wfDeprecated( __METHOD__, '1.18' );
+   return wfSetVar( $this-mRestriction, $x );
+   }
 
/**
 * These mutators are very evil, as the relevant variables should not 
mutate.  So
@@ -463,7 +469,10 @@
 * @return Mixed
 * @deprecated since 1.18
 */
-   function func( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return 
wfSetVar( $this-mFunction, $x ); }
+   function func( $x = null ) {
+   wfDeprecated( __METHOD__, '1.18' );
+   return wfSetVar( $this-mFunction, $x );
+   }
 
/**
 * These mutators are very evil, as the relevant variables should not 
mutate.  So
@@ -472,7 +481,10 @@
 * @return Mixed
 * @deprecated since 1.18
 */
-   function file( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); return 
wfSetVar( $this-mFile, $x ); }
+   function file( $x = null ) {
+   wfDeprecated( __METHOD__, '1.18' );
+   return wfSetVar( $this-mFile, $x );
+   }
 
/**
 * These mutators are very evil, as the relevant variables should not 
mutate.  So
@@ -481,7 +493,10 @@
 * @return Mixed
 * @deprecated since 1.18
 */
-   function includable( $x = null ) { wfDeprecated( __METHOD__, '1.18' ); 
return wfSetVar( $this-mIncludable, $x ); }
+   function includable( $x = null ) {
+   wfDeprecated( __METHOD__, '1.18' );
+   return wfSetVar( $this-mIncludable, $x );
+   }
 
/**
 * Whether the special page is being evaluated via transclusion
@@ -917,11 +932,20 @@
abstract protected function getFormFields();
 
/**
-* Add pre- or post-text to the form
+* Add pre-text to the form
 * @return String HTML which will be sent to $form-addPreText()
 */
-   protected function preText() { return ''; }
-   protected function postText() { return ''; }
+   protected function preText() {
+   return '';
+   }
+
+   /**
+* Add post-text to the form
+* @return String HTML which will be sent to $form-addPostText()
+*/
+   protected function postText() {
+   return '';
+   }
 
/**
 * Play with the HTMLForm if you need to more substantially

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98db22fe5028c97ad257ddd86524c0356881ff57
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Create self-standing IPython Notebook Puppet module - change (operations/puppet)

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

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


Change subject: Create self-standing IPython Notebook Puppet module
..

Create self-standing IPython Notebook Puppet module

- For the sake of portability, replaced dependency on 'systemuser' resource
  (from generic-definitions.pp) with equivalent user  group resources.

- Dito generic-definitions.pp's 'upstart_job' resource (which could stand to be
  improved..) Replaced with a proper service resource, specifying upstart as
  the provider, but also creating an init.d symlink to /lib/init/upstart-job.

- Added README, expanded parameter description, and documented default values.

- Change default IPYTHONDIR from '/var/lib/ipython' to '/srv/ipython', which
  better conforms to the Filesystem Hierarchy Standard.

- Changed ill-named 'graphs_dir' to 'matplotlib_dir'.

- Followed Puppet's style guide for specifying default values for parametrized
  classes that are based on other variables.

- In erb templates, use '@varname' rather than 'varname'. (The latter notation
  is liable to conflict with Ruby built-ins and is thus discouraged.)

I tested it using Vagrant and it works well.

Change-Id: I2db8206d91e929c943fddab8e09db60f458739b0
---
M modules/eventlogging/manifests/init.pp
D modules/eventlogging/manifests/notebook.pp
D modules/eventlogging/templates/ipython-notebook.conf.erb
A modules/notebook/README
A modules/notebook/manifests/init.pp
A modules/notebook/templates/ipython-notebook.conf.erb
R modules/notebook/templates/ipython_notebook_config.py.erb
7 files changed, 221 insertions(+), 140 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/87/60187/1

diff --git a/modules/eventlogging/manifests/init.pp 
b/modules/eventlogging/manifests/init.pp
index b3f3482..8d1ef53 100644
--- a/modules/eventlogging/manifests/init.pp
+++ b/modules/eventlogging/manifests/init.pp
@@ -3,14 +3,15 @@
 class eventlogging {
 
class { 'eventlogging::supervisor': }
-   class { 'eventlogging::notebook':
-   exec_files = [ '/var/lib/ipython/helpers/helpers.py' ],
-   }
class { 'eventlogging::ganglia': }
class { 'eventlogging::archive':
destinations = [ 'stat1.wikimedia.org' ],
}
 
+   class { 'notebook':
+   exec_files = [ '/var/lib/ipython/helpers/helpers.py' ],
+   }
+
class { 'mongodb':
dbpath  = '/srv/mongodb',
bind_ip = false,
diff --git a/modules/eventlogging/manifests/notebook.pp 
b/modules/eventlogging/manifests/notebook.pp
deleted file mode 100644
index 504c470..000
--- a/modules/eventlogging/manifests/notebook.pp
+++ /dev/null
@@ -1,110 +0,0 @@
-# == Class: eventlogging::notebook
-#
-# Configures an integrated, web-based numeric computation environment
-# (like Mathematica), based on PyLab and IPython Notebook.
-# See http://ipython.org/ipython-doc/dev/interactive/htmlnotebook.html
-# and http://www.scipy.org/PyLab.
-#
-# === Parameters
-#
-# [*ipython_dir*]
-#   IPython working directory.
-#
-# [*ipython_profile*]
-#   Name of IPython profile to create.
-#
-# [*ipython_user*]
-#   Create this user account and run IPython as this user.
-#
-# [*notebook_dir*]
-#   Specifies where IPython should archive notebooks.
-#
-# [*notebook_ip*]
-#   Interface on which the notebook server will listen (or '*' for all
-#   interfaces).
-#
-# [*notebook_port*]
-#   The port the notebook server will listen on.
-#
-# [*exec_files*]
-#   Array of Python files to execute at start of Notebook session.
-#
-class eventlogging::notebook(
-   $ipython_dir = '/var/lib/ipython',
-   $ipython_profile = 'nbserver',
-   $ipython_user = 'ipython',
-   $graph_dir = '/var/lib/ipython/graphs',
-   $notebook_dir = '/var/lib/ipython/notebooks',
-   $notebook_ip = '*',
-   $notebook_port = ,
-   $exec_files = []
-) {
-
-   package { [
-   'ipython-notebook',
-   'python-matplotlib',
-   'python-numpy',
-   'python-pandas',
-   'python-pexpect',
-   'python-scipy',
-   ]:
-   ensure = latest,
-   }
-
-   systemuser { $ipython_user:
-   name = $ipython_user,
-   home = $ipython_dir,
-   }
-
-   file { $notebook_dir:
-   ensure  = directory,
-   owner   = $ipython_user,
-   group   = $ipython_user,
-   mode= '0775',
-   require = Systemuser[$ipython_user],
-   }
-
-   file { $graph_dir:
-   ensure  = directory,
-   owner   = $ipython_user,
-   group   = $ipython_user,
-   mode= '0775',
-   require = Systemuser[$ipython_user],
-   }
-
-   exec { Create IPython profile ${ipython_profile}:
-   command = 

[MediaWiki-commits] [Gerrit] Move SMW_PageSchemas into auxiliaries directory + SMW\Auxili... - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Move SMW_PageSchemas into auxiliaries directory + SMW\Auxiliary 
ns
..

Move SMW_PageSchemas into auxiliaries directory + SMW\Auxiliary ns

* SMW_PageSchemas.php moved into \includes\auxiliaries\pageschema
* SMWPageSchemas was deprecated (is still valid) and moved to
SMW\Auxiliary\PageSchema\ExtensionHandler

Lua will be also moved into \includes\auxiliaries\lua

Change-Id: I690c355fdf3fc3eaafd67453d918197334dac463
---
M includes/Setup.php
R includes/auxiliaries/pageschema/ExtensionHandler.php
2 files changed, 20 insertions(+), 4 deletions(-)


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

diff --git a/includes/Setup.php b/includes/Setup.php
index b8fd9e7..083656d 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -350,8 +350,9 @@
// Maintenance scripts
$wgAutoloadClasses['SMWSetupScript'] = $smwgIP . 
'maintenance/SMW_setup.php';
 
-   // Other extensions
-   $wgAutoloadClasses['SMWPageSchemas'] = $smwgIP . 
'includes/SMW_PageSchemas.php';
+   // Auxiliary extensions
+   $wgAutoloadClasses['SMWPageSchemas']= 
$smwgIP . 'includes/auxiliaries/pageschema/ExtensionHandler.php'; // deprecated 
since 1.9
+   $wgAutoloadClasses['SMW\Auxiliary\PageSchema\ExtensionHandler'] = 
$smwgIP . 'includes/auxiliaries/pageschema/ExtensionHandler.php';
 }
 
 /**
diff --git a/includes/SMW_PageSchemas.php 
b/includes/auxiliaries/pageschema/ExtensionHandler.php
similarity index 95%
rename from includes/SMW_PageSchemas.php
rename to includes/auxiliaries/pageschema/ExtensionHandler.php
index 617206d..ab633cc 100644
--- a/includes/SMW_PageSchemas.php
+++ b/includes/auxiliaries/pageschema/ExtensionHandler.php
@@ -1,16 +1,24 @@
 ?php
 
+namespace SMW\Auxiliary\PageSchema;
+
+use Html;
+use PageSchemas;
+use Xml;
+use Title;
+use PSCreatePageJob;
+
 /**
  * Functions for handling Semantic MediaWiki data within the Page Schemas
  * extension.
- * 
+ *
  * @author Ankit Garg
  * @author Yaron Koren
  * @file SMW_PageSchemas.php
  * @ingroup SMW
  */
 
-class SMWPageSchemas extends PSExtensionHandler {
+class ExtensionHandler extends \PSExtensionHandler {
 
public static function getDisplayColor() {
return '#DEF';
@@ -238,3 +246,10 @@
return null;
}
 }
+
+/**
+ * SMWPageSchemas
+ *
+ * @deprecated since SMW 1.9
+ */
+class_alias( 'SMW\Auxiliary\PageSchema\ExtensionHandler', 'SMWPageSchemas' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I690c355fdf3fc3eaafd67453d918197334dac463
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix CSS issue with Chrome. - change (mediawiki...PageTriage)

2013-04-21 Thread Nischayn22 (Code Review)
Nischayn22 has uploaded a new change for review.

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


Change subject: Fix CSS issue with Chrome.
..

Fix CSS issue with Chrome.

The sort by text overflowed and was hidden in Chrome

Change-Id: I2f3a2b53efd3ea8823d73184f595f3ed8d03d117
---
M SpecialNewPagesFeed.php
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/SpecialNewPagesFeed.php b/SpecialNewPagesFeed.php
index fb5fe41..a762883 100644
--- a/SpecialNewPagesFeed.php
+++ b/SpecialNewPagesFeed.php
@@ -107,6 +107,12 @@
script type=text/template 
id=listControlNavTemplate
span 
class=mwe-pt-control-labelb%= mw.msg( 'pagetriage-showing' ) %/b span 
id=mwe-pt-filter-status/span/span
span 
class=mwe-pt-control-label-right id=mwe-pt-control-stats/spanbr/
+   span 
class=mwe-pt-control-label-rightb%= mw.msg( 'pagetriage-sort-by' ) %/b
+   span id=mwe-pt-sort-buttons
+   input type=radio 
id=mwe-pt-sort-newest name=sort /label for=mwe-pt-sort-newest%= 
mw.msg( 'pagetriage-newest' ) %/label
+   input type=radio 
id=mwe-pt-sort-oldest name=sort /label for=mwe-pt-sort-oldest%= 
mw.msg( 'pagetriage-oldest' ) %/label
+   /span
+   /span
span 
id=mwe-pt-filter-dropdown-control class=mwe-pt-control-label
b
%= mw.msg( 
'pagetriage-filter-list-prompt' ) %
@@ -176,12 +182,6 @@
/div
/form
/div
-   /span
-   span 
class=mwe-pt-control-label-rightb%= mw.msg( 'pagetriage-sort-by' ) %/b
-   span id=mwe-pt-sort-buttons
-   input type=radio 
id=mwe-pt-sort-newest name=sort /label for=mwe-pt-sort-newest%= 
mw.msg( 'pagetriage-newest' ) %/label
-   input type=radio 
id=mwe-pt-sort-oldest name=sort /label for=mwe-pt-sort-oldest%= 
mw.msg( 'pagetriage-oldest' ) %/label
-   /span
/span
/script
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2f3a2b53efd3ea8823d73184f595f3ed8d03d117
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageTriage
Gerrit-Branch: master
Gerrit-Owner: Nischayn22 nischay...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replaced Xml class by Html. The affected pages are the editi... - change (mediawiki...ProofreadPage)

2013-04-21 Thread TheDJ (Code Review)
TheDJ has submitted this change and it was merged.

Change subject: Replaced Xml class by Html. The affected pages are the edition 
pages of Special:Index pages and Index pages.
..


Replaced Xml class by Html.
The affected pages are the edition pages of Special:Index pages and Index pages.

Change-Id: I64e841469664af41ba96a5a3f865f0272b0fb48a
---
M SpecialProofreadPages.php
M includes/index/EditProofreadIndexPage.php
2 files changed, 27 insertions(+), 23 deletions(-)

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



diff --git a/SpecialProofreadPages.php b/SpecialProofreadPages.php
index a1419c9..4143a06 100644
--- a/SpecialProofreadPages.php
+++ b/SpecialProofreadPages.php
@@ -51,22 +51,22 @@
$orderSelect-addOption( $this-msg( 
'proofreadpage_alphabeticalorder' )-text(), 'alpha' );
 
$output-addHTML(
-   Xml::openElement( 'form', array( 'action' = 
$wgScript ) ) .
+   Html::openElement( 'form', array( 'action' = 
$wgScript) ) .
Html::hidden( 'title', 
$this-getTitle()-getPrefixedText() ) .
-   Xml::input( 'limit', false, $this-limit, 
array( 'type' = 'hidden' ) ) .
-   Xml::openElement( 'fieldset' ) .
-   Xml::element( 'legend', null, $this-msg( 
'proofreadpage_specialpage_legend' )-text() ) .
-   Xml::element( 'p' ) .
+   Html::input( 'limit', $this-limit, 'hidden', 
array() ) .
+   Html::openElement('fieldset', array() ) .
+   Html::element('legend', null, $this-msg( 
'proofreadpage_specialpage_legend' )-text() ) .
+   Html::openElement( 'p' ) .
Xml::label( $this-msg( 
'proofreadpage_specialpage_label_key' )-text(), 'key' )  . ' ' .
-   Xml::input( 'key', 20, $this-searchTerm ) .
-   Xml::closeElement( 'p' ) .
-   Xml::element( 'p' ) .
+   Html::input( 'key', $this-searchTerm ) .
+   Html::closeElement( 'p' ) .
+   Html::openElement( 'p' ) .
Xml::label( $this-msg( 
'proofreadpage_specialpage_label_orderby' )-text(), 'order' ) . ' ' . 
$orderSelect-getHtml() . ' ' .
Xml::checkLabel( $this-msg( 
'proofreadpage_specialpage_label_sortascending' )-text(), 'sortascending', 
'sortascending', $this-sortAscending ) . ' ' .
Xml::submitButton( $this-msg( 'ilsubmit' 
)-text() ) .
-   Xml::closeElement( 'p' ) .
-   Xml::closeElement( 'fieldset' ) .
-   Xml::closeElement( 'form' )
+   Html::closeElement( 'p' ) .
+   Html::closeElement( 'fieldset' ) .
+   Html::closeElement( 'form' )
);
if( $this-searchTerm ) {
$indexNamespaceId = 
ProofreadPage::getIndexNamespaceId();
diff --git a/includes/index/EditProofreadIndexPage.php 
b/includes/index/EditProofreadIndexPage.php
index debaf9a..289e1e2 100644
--- a/includes/index/EditProofreadIndexPage.php
+++ b/includes/index/EditProofreadIndexPage.php
@@ -40,14 +40,14 @@
$index = new ProofreadIndexPage( $this-mTitle, $this-textbox1 
);
$entries = $index-getIndexEntries();
 
-   $wgOut-addHTML( Xml::openElement( 'table', array( 'id' = 
'prp-formTable' ) ) );
+   $wgOut-addHTML( Html::openElement( 'table', array( 'id' = 
'prp-formTable' ) ) );
$i = 10;
foreach( $entries as $entry ) {
$inputAttributes['tabindex'] = $i;
$this-addEntry( $entry, $inputAttributes );
$i++;
}
-   $wgOut-addHTML( Xml::closeElement( 'table' ) );
+   $wgOut-addHTML( Html::closeElement( 'table' ) );
}
 
/**
@@ -65,20 +65,20 @@
$val = $this-safeUnicodeOutput( $entry-getStringValue() );
 
$wgOut-addHTML(
-   Xml::openElement( 'tr' ) .
-   Xml::openElement( 'th', array( 'scope' = 'row' 
) ) .
+   Html::openElement( 'tr' ) .
+   Html::openElement( 'th', array( 'scope' = 
'row' ) ) .
Xml::label( $entry-getLabel(), $key )
);
 
 
$help = $entry-getHelp();
if ( $help !== '' ) {
-   

[MediaWiki-commits] [Gerrit] Update tags for OSM - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Update tags for OSM
..

Update tags for OSM

Change-Id: Idf359d203baf5e8e077504651230b813972a8516
---
M groups/OpenStreetMap/OpenStreetMap.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/90/60190/1

diff --git a/groups/OpenStreetMap/OpenStreetMap.yaml 
b/groups/OpenStreetMap/OpenStreetMap.yaml
index 0098341..ba01e44 100644
--- a/groups/OpenStreetMap/OpenStreetMap.yaml
+++ b/groups/OpenStreetMap/OpenStreetMap.yaml
@@ -69,6 +69,7 @@
 - notifier.message_notification.subject_header
 - printable_name.with_version
 - site.edit.anon_edits
+- time.formats.blog
 # Users may or may not want to translate the OSM wiki too
 - layouts.help_wiki_url
 - layouts.intro_3_partners_url

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf359d203baf5e8e077504651230b813972a8516
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update tags for OSM - change (translatewiki)

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

Change subject: Update tags for OSM
..


Update tags for OSM

Change-Id: Idf359d203baf5e8e077504651230b813972a8516
---
M groups/OpenStreetMap/OpenStreetMap.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/groups/OpenStreetMap/OpenStreetMap.yaml 
b/groups/OpenStreetMap/OpenStreetMap.yaml
index 0098341..ba01e44 100644
--- a/groups/OpenStreetMap/OpenStreetMap.yaml
+++ b/groups/OpenStreetMap/OpenStreetMap.yaml
@@ -69,6 +69,7 @@
 - notifier.message_notification.subject_header
 - printable_name.with_version
 - site.edit.anon_edits
+- time.formats.blog
 # Users may or may not want to translate the OSM wiki too
 - layouts.help_wiki_url
 - layouts.intro_3_partners_url

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idf359d203baf5e8e077504651230b813972a8516
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Add essentials for supporting blockly. - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Add essentials for supporting blockly.
..

Add essentials for supporting blockly.

More to come. Also fix an incorrect variable for FUDforum.

Change-Id: I192f741df8b7b5ff16f694a8847671ff79b38d32
---
M REPOCONF
M bin/repocommit
M bin/repocreate
M bin/repoexport
M bin/repoupdate
M bin/update-externals
6 files changed, 44 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/91/60191/1

diff --git a/REPOCONF b/REPOCONF
index 19201bb..b78b1bf 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -7,6 +7,7 @@
 
 REPO_COMMONSANDROID=git://github.com/wikimedia/android-commons.git
 REPO_COMMONSIOS=git://github.com/wikimedia/Commons-iOS.git
+REPO_BLOCKLY=http://blockly.googlecode.com/svn/trunk/
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
diff --git a/bin/repocommit b/bin/repocommit
index 6c36f6f..6faede3 100755
--- a/bin/repocommit
+++ b/bin/repocommit
@@ -71,6 +71,31 @@
svn commit --message $COMMITMSG
cd ..
 
+# This needs more work.
+if [ $PROJECT = blockly ]
+then
+   cd $PROJECT
+   for i in `find . -name msg`
+   do
+   svn add -q $i
+   svn propset -q svn:mime-type text/plain $i
+   svn propset -q svn:eol-style native $i
+   done
+   svn commit --message $COMMITMSG
+   cd ..
+
+elif [ $PROJECT = fudforum ]
+then
+   cd $PROJECT
+   for i in `find . -name msg`
+   do
+   svn add -q $i
+   svn propset -q svn:mime-type text/plain $i
+   svn propset -q svn:eol-style native $i
+   done
+   svn commit --message $COMMITMSG
+   cd ..
+
 elif [ $PROJECT = ihris ]
 then
cd $PROJECT
diff --git a/bin/repocreate b/bin/repocreate
index 070667d..970450d 100755
--- a/bin/repocreate
+++ b/bin/repocreate
@@ -23,6 +23,13 @@
fi
git clone $REPO_COMMONSIOS $PROJECT
 
+elif [ $PROJECT = blockly ]
+then
+   if [ -z $REPO_BLOCKLY ]
+   then echo Add REPO_BLOCKLY to REPOCONF; exit 1
+   fi
+   svn checkout $REPO_BLOCKLY $PROJECT
+
 elif [ $PROJECT = eol ]
 then
if [ -z $REPO_EOL ]
@@ -56,7 +63,7 @@
if [ -z $REPO_FUDFORUM ]
then echo Add REPO_FUDFORUM to REPOCONF; exit 1
fi
-   svn checkout $REPO_FREECOL $PROJECT
+   svn checkout $REPO_FUDFORUM $PROJECT
 
 elif [ $PROJECT = fuel ]
 then
diff --git a/bin/repoexport b/bin/repoexport
index e495320..68befee 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -25,6 +25,10 @@
php $EXPORTER --target . --group=out-wikimedia-mobile-commons-ios* 
--lang '*' --skip en,qqq $THRESHOLD
php $EXPORTER --target . --group=out-wikimedia-mobile-commons-ios* 
--lang qqq
 
+elif [ $PROJECT = blockly ]
+then
+   php $EXPORTER --target . --group=out-blockly* --lang '*' --skip en 
$THRESHOLD
+
 elif [ $PROJECT = eol ]
 then
php $EXPORTER --target . --group=out-eol* --lang '*' --skip en 
$THRESHOLD
diff --git a/bin/repoupdate b/bin/repoupdate
index 7b1cc32..d03952d 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -54,7 +54,11 @@
fi
 done
 
-if [ $PROJECT = etherpad-lite ]
+if [ $PROJECT = blockly ]
+then
+   svn up $PROJECT
+
+elif [ $PROJECT = etherpad-lite ]
 then
gitupdate $PROJECT $REPO_ETHERPADLITE_BRANCH
 
diff --git a/bin/update-externals b/bin/update-externals
index 483eb9a..9482783 100755
--- a/bin/update-externals
+++ b/bin/update-externals
@@ -10,6 +10,7 @@
 for PROJECT in \
 commons-android \
 commons-ios \
+blockly \
 eol \
 etherpad-lite \
 freecol \

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I192f741df8b7b5ff16f694a8847671ff79b38d32
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add essentials for supporting blockly. - change (translatewiki)

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

Change subject: Add essentials for supporting blockly.
..


Add essentials for supporting blockly.

More to come. Also fix an incorrect variable for FUDforum.

Change-Id: I192f741df8b7b5ff16f694a8847671ff79b38d32
---
M REPOCONF
M bin/repocommit
M bin/repocreate
M bin/repoexport
M bin/repoupdate
M bin/update-externals
6 files changed, 45 insertions(+), 3 deletions(-)

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



diff --git a/REPOCONF b/REPOCONF
index 19201bb..b78b1bf 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -7,6 +7,7 @@
 
 REPO_COMMONSANDROID=git://github.com/wikimedia/android-commons.git
 REPO_COMMONSIOS=git://github.com/wikimedia/Commons-iOS.git
+REPO_BLOCKLY=http://blockly.googlecode.com/svn/trunk/
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
diff --git a/bin/repocommit b/bin/repocommit
index 6c36f6f..c33c96b 100755
--- a/bin/repocommit
+++ b/bin/repocommit
@@ -59,7 +59,32 @@
fi
 done
 
-if [ $PROJECT = fudforum ]
+# This needs more work.
+if [ $PROJECT = blockly ]
+then
+   cd $PROJECT
+   for i in `find . -name msg`
+   do
+   svn add -q $i
+   svn propset -q svn:mime-type text/plain $i
+   svn propset -q svn:eol-style native $i
+   done
+   svn commit --message $COMMITMSG
+   cd ..
+
+elif [ $PROJECT = fudforum ]
+then
+   cd $PROJECT
+   for i in `find . -name msg`
+   do
+   svn add -q $i
+   svn propset -q svn:mime-type text/plain $i
+   svn propset -q svn:eol-style native $i
+   done
+   svn commit --message $COMMITMSG
+   cd ..
+
+elif [ $PROJECT = fudforum ]
 then
cd $PROJECT
for i in `find . -name msg`
diff --git a/bin/repocreate b/bin/repocreate
index 070667d..970450d 100755
--- a/bin/repocreate
+++ b/bin/repocreate
@@ -23,6 +23,13 @@
fi
git clone $REPO_COMMONSIOS $PROJECT
 
+elif [ $PROJECT = blockly ]
+then
+   if [ -z $REPO_BLOCKLY ]
+   then echo Add REPO_BLOCKLY to REPOCONF; exit 1
+   fi
+   svn checkout $REPO_BLOCKLY $PROJECT
+
 elif [ $PROJECT = eol ]
 then
if [ -z $REPO_EOL ]
@@ -56,7 +63,7 @@
if [ -z $REPO_FUDFORUM ]
then echo Add REPO_FUDFORUM to REPOCONF; exit 1
fi
-   svn checkout $REPO_FREECOL $PROJECT
+   svn checkout $REPO_FUDFORUM $PROJECT
 
 elif [ $PROJECT = fuel ]
 then
diff --git a/bin/repoexport b/bin/repoexport
index e495320..68befee 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -25,6 +25,10 @@
php $EXPORTER --target . --group=out-wikimedia-mobile-commons-ios* 
--lang '*' --skip en,qqq $THRESHOLD
php $EXPORTER --target . --group=out-wikimedia-mobile-commons-ios* 
--lang qqq
 
+elif [ $PROJECT = blockly ]
+then
+   php $EXPORTER --target . --group=out-blockly* --lang '*' --skip en 
$THRESHOLD
+
 elif [ $PROJECT = eol ]
 then
php $EXPORTER --target . --group=out-eol* --lang '*' --skip en 
$THRESHOLD
diff --git a/bin/repoupdate b/bin/repoupdate
index 7b1cc32..d03952d 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -54,7 +54,11 @@
fi
 done
 
-if [ $PROJECT = etherpad-lite ]
+if [ $PROJECT = blockly ]
+then
+   svn up $PROJECT
+
+elif [ $PROJECT = etherpad-lite ]
 then
gitupdate $PROJECT $REPO_ETHERPADLITE_BRANCH
 
diff --git a/bin/update-externals b/bin/update-externals
index 483eb9a..9482783 100755
--- a/bin/update-externals
+++ b/bin/update-externals
@@ -10,6 +10,7 @@
 for PROJECT in \
 commons-android \
 commons-ios \
+blockly \
 eol \
 etherpad-lite \
 freecol \

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I192f741df8b7b5ff16f694a8847671ff79b38d32
Gerrit-PatchSet: 2
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Add config for blockly - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Add config for blockly
..

Add config for blockly

Change-Id: I85d5507bffe9833c3dbf6a78a963a8488f311d41
---
M TranslateSettings.php
A groups/Blockly/Blockly.yaml
2 files changed, 52 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/92/60192/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index 38de02e..31b70f5 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -381,3 +381,6 @@
 
 wfAddNamespace( 1254, 'FUEL' );
 $wgTranslateGroupFiles[] = $GROUPS/FUEL/FUEL.yaml;
+
+wfAddNamespace( 1256, 'Blockly' );
+$wgTranslateGroupFiles[] = $GROUPS/Blockly/Blockly.yaml;
diff --git a/groups/Blockly/Blockly.yaml b/groups/Blockly/Blockly.yaml
new file mode 100644
index 000..f54d5a5
--- /dev/null
+++ b/groups/Blockly/Blockly.yaml
@@ -0,0 +1,49 @@
+TEMPLATE:
+  BASIC:
+icon: wiki://Blockly-square.png
+namespace: NS_BLOCKLY
+class: FileBasedMessageGroup
+description: {{int:translate-group-desc-blockly}}
+
+  FILES:
+class: JsonFFS
+
+---
+BASIC:
+  id: out-blockly-0-all
+  label: Blockly
+  meta: yes
+  class: AggregateMessageGroup
+
+GROUPS:
+  - out-blockly-*
+
+---
+BASIC:
+  id: out-blockly-core
+  label: Blockly - Core
+
+MANGLER:
+  class: StringMatcher
+  prefix: core-
+  patterns:
+- *
+
+FILES:
+  sourcePattern: %GROUPROOT%/blockly/apps/%CODE%.json
+  targetPattern: blockly/apps/%CODE%.json
+
+---
+BASIC:
+  id: out-blockly-maze
+  label: Blockly - Maze
+
+MANGLER:
+  class: StringMatcher
+  prefix: maze-
+  patterns:
+- *
+
+FILES:
+  sourcePattern: %GROUPROOT%/blockly/apps/maze/%CODE%.json
+  targetPattern: blockly/apps/maze/%CODE%.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I85d5507bffe9833c3dbf6a78a963a8488f311d41
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add config for blockly - change (translatewiki)

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

Change subject: Add config for blockly
..


Add config for blockly

Change-Id: I85d5507bffe9833c3dbf6a78a963a8488f311d41
---
M TranslateSettings.php
A groups/Blockly/Blockly.yaml
2 files changed, 52 insertions(+), 0 deletions(-)

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



diff --git a/TranslateSettings.php b/TranslateSettings.php
index 38de02e..31b70f5 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -381,3 +381,6 @@
 
 wfAddNamespace( 1254, 'FUEL' );
 $wgTranslateGroupFiles[] = $GROUPS/FUEL/FUEL.yaml;
+
+wfAddNamespace( 1256, 'Blockly' );
+$wgTranslateGroupFiles[] = $GROUPS/Blockly/Blockly.yaml;
diff --git a/groups/Blockly/Blockly.yaml b/groups/Blockly/Blockly.yaml
new file mode 100644
index 000..f54d5a5
--- /dev/null
+++ b/groups/Blockly/Blockly.yaml
@@ -0,0 +1,49 @@
+TEMPLATE:
+  BASIC:
+icon: wiki://Blockly-square.png
+namespace: NS_BLOCKLY
+class: FileBasedMessageGroup
+description: {{int:translate-group-desc-blockly}}
+
+  FILES:
+class: JsonFFS
+
+---
+BASIC:
+  id: out-blockly-0-all
+  label: Blockly
+  meta: yes
+  class: AggregateMessageGroup
+
+GROUPS:
+  - out-blockly-*
+
+---
+BASIC:
+  id: out-blockly-core
+  label: Blockly - Core
+
+MANGLER:
+  class: StringMatcher
+  prefix: core-
+  patterns:
+- *
+
+FILES:
+  sourcePattern: %GROUPROOT%/blockly/apps/%CODE%.json
+  targetPattern: blockly/apps/%CODE%.json
+
+---
+BASIC:
+  id: out-blockly-maze
+  label: Blockly - Maze
+
+MANGLER:
+  class: StringMatcher
+  prefix: maze-
+  patterns:
+- *
+
+FILES:
+  sourcePattern: %GROUPROOT%/blockly/apps/maze/%CODE%.json
+  targetPattern: blockly/apps/maze/%CODE%.json

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I85d5507bffe9833c3dbf6a78a963a8488f311d41
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Add message for blockly groups - change (mediawiki...Translate)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Add message for blockly groups
..

Add message for blockly groups

Change-Id: Ieafae2c6742ea5ddbad3dcdea36e6c72d3e5f953
---
M TranslateGroupDescriptions.i18n.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/TranslateGroupDescriptions.i18n.php 
b/TranslateGroupDescriptions.i18n.php
index 32874d3..29058c7 100644
--- a/TranslateGroupDescriptions.i18n.php
+++ b/TranslateGroupDescriptions.i18n.php
@@ -37,6 +37,7 @@
'bw-desc-freecol' = '[[Translating:FreeCol|FreeCol]] is a turn-based 
strategy game',
'bw-desc-fudforum' = '[[Translating:FUDforum|FUDforum]] is web-based 
discussion forum software',
'bw-desc-mantisbt' = '[[Translating:MantisBT|MantisBT]] is web-based 
issue tracking software',
+   'translate-group-desc-blockly' = 'A message group for 
[[Translating:Blockly|Blockly]]',
'translate-group-desc-eol' = 'A message group for 
[[Translating:EOL|Encyclopedia of Life]]',
'translate-group-desc-frontlinesms' = 'A message group for 
[[Translating:FrontlineSMS|FrontlineSMS]]',
'translate-group-desc-fuel' = '[[Translating:FUEL|FUEL]] brings more 
consistency to software translation',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieafae2c6742ea5ddbad3dcdea36e6c72d3e5f953
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Bug 20828: Add rtl/ltr class to offline skin - change (mediawiki...DumpHTML)

2013-04-21 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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


Change subject: Bug 20828: Add rtl/ltr class to offline skin
..

Bug 20828: Add rtl/ltr class to offline skin

Change-Id: I3ca7102d40579b43af56e14b3f4bd8ddd33fb232
---
M SkinOffline.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/SkinOffline.php b/SkinOffline.php
index 730c6d9..89baa49 100644
--- a/SkinOffline.php
+++ b/SkinOffline.php
@@ -142,8 +142,7 @@
 ?php if($this-data['userjs']) { ?script type=?php 
$this-text('jsmimetype') ? src=?php $this-text('userjs') 
?/script?php } ?
 ?php if($this-data['userjsprev']) { ?script type=?php 
$this-text('jsmimetype') ??php  $this-html('userjsprev') 
?/script?php   } ?
   /head
-  body
-?php if($this-data['pageclass']) { ?class=?php 
$this-text('pageclass') ??php } ?
+  body class=mediawiki ?php $this-text('dir') ? ?php 
if($this-data['pageclass']) { $this-text('pageclass') } ?
 div id=globalWrapper
   div id=column-content
div id=content

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ca7102d40579b43af56e14b3f4bd8ddd33fb232
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DumpHTML
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove two unneeded description messages - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Remove two unneeded description messages
..

Remove two unneeded description messages

Change-Id: Ie6f02a2ebe1551dee91aa277382ea810b268ad1d
---
M groups/OpenImages/OpenImages.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/95/60195/1

diff --git a/groups/OpenImages/OpenImages.yaml 
b/groups/OpenImages/OpenImages.yaml
index 92afb49..2bcea0c 100644
--- a/groups/OpenImages/OpenImages.yaml
+++ b/groups/OpenImages/OpenImages.yaml
@@ -16,7 +16,7 @@
   id: out-openimages-core
   label: Open Images - Core
   icon: wiki://Open_Images.png
-  description: {{int:bw-desc-openimages}}
+  description: {{int:translate-group-desc-openimages-all}}
   namespace: NS_OPENIMAGES
   class: FileBasedMessageGroup
 
@@ -38,7 +38,7 @@
   id: out-openimages-verifyemailtemplate
   label: Open Images - Verify Email Template
   icon: wiki://Open_Images.png
-  description: {{int:translate-group-desc-openimages-verifyemailtemplate}}
+  description: {{int:translate-group-desc-openimages-all}}
   namespace: NS_OPENIMAGES
   class: FileBasedMessageGroup
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6f02a2ebe1551dee91aa277382ea810b268ad1d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Reduce used message group descriptions for iHRIS - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Reduce used message group descriptions for iHRIS
..

Reduce used message group descriptions for iHRIS

Change-Id: Ia0beab82f9385d2a188b628f218cde6e5efaace7
---
M groups/IHRIS/IHRISCommon.yaml
M groups/IHRIS/IHRISI2ce.yaml
M groups/IHRIS/IHRISManage.yaml
M groups/IHRIS/IHRISQualify.yaml
4 files changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/96/60196/1

diff --git a/groups/IHRIS/IHRISCommon.yaml b/groups/IHRIS/IHRISCommon.yaml
index bdcbf17..1ae27f7 100644
--- a/groups/IHRIS/IHRISCommon.yaml
+++ b/groups/IHRIS/IHRISCommon.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-common}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISI2ce.yaml b/groups/IHRIS/IHRISI2ce.yaml
index 2c4ef1a..6db67ec 100644
--- a/groups/IHRIS/IHRISI2ce.yaml
+++ b/groups/IHRIS/IHRISI2ce.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-i2ce}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISManage.yaml b/groups/IHRIS/IHRISManage.yaml
index bf96bbe..0778a4d 100644
--- a/groups/IHRIS/IHRISManage.yaml
+++ b/groups/IHRIS/IHRISManage.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-manage}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISQualify.yaml b/groups/IHRIS/IHRISQualify.yaml
index e84fb27..337d818 100644
--- a/groups/IHRIS/IHRISQualify.yaml
+++ b/groups/IHRIS/IHRISQualify.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-qualify}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia0beab82f9385d2a188b628f218cde6e5efaace7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove some no longer needed description messages - change (mediawiki...Translate)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Remove some no longer needed description messages
..

Remove some no longer needed description messages

Change-Id: I32b869601073dc4139345fd4afc33484f3d50e37
---
M TranslateGroupDescriptions.i18n.php
1 file changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/TranslateGroupDescriptions.i18n.php 
b/TranslateGroupDescriptions.i18n.php
index 29058c7..1e2142f 100644
--- a/TranslateGroupDescriptions.i18n.php
+++ b/TranslateGroupDescriptions.i18n.php
@@ -42,26 +42,18 @@
'translate-group-desc-frontlinesms' = 'A message group for 
[[Translating:FrontlineSMS|FrontlineSMS]]',
'translate-group-desc-fuel' = '[[Translating:FUEL|FUEL]] brings more 
consistency to software translation',
'translate-group-desc-ihris' = 'A message group for 
[[Translating:iHRIS|iHRIS]]',
-   'translate-group-desc-ihris-common' = 'A message group for 
[[Special:Translate/out-ihris-common-0-all|iHRIS Common]], a module of 
[[Translating:iHRIS|iHRIS]]',
-   'translate-group-desc-ihris-i2ce' = 'A message group for 
[[Special:Translate/out-ihris-i2ce-0-all|iHRIS I2CE]], a module of 
[[Translating:iHRIS|iHRIS]]',
-   'translate-group-desc-ihris-manage' = 'A message group for 
[[Special:Translate/out-ihris-manage-0-all|iHRIS Manage]], a module of 
[[Translating:iHRIS|iHRIS]]',
-   'translate-group-desc-ihris-qualify' = 'A message group for 
[[Special:Translate/out-ihris-qualify-0-all|iHRIS Qualify]], a module of 
[[Translating:iHRIS|iHRIS]]',
'translate-group-desc-kiwix' = 'A message group for 
[[Translating:Kiwix|Kiwix]]',
'translate-group-desc-mantisbt-plugin-core' = 'A core plugin for 
[[Translating:MantisBT|MantisBT]]',
'translate-group-desc-mediawiki-core-branch' = 'Messages for a stable 
version of [[Translating:MediaWiki|MediaWiki]]',
'translate-group-desc-mifos' = '[[Translating:Mifos|Mifos]] is a 
management information system for microfinance',
'bw-desc-mwlibrl' = '[[Translating:Mwlib.rl|Mwlib.rl]] is a library 
for creating PDF documents from MediaWiki pages',
'translate-group-desc-okawix' = '[[Translating:Okawix|Okawix]] is an 
offline Wikipedia reader',
-   'bw-desc-openimages' = '[[Translating:Open Images|Open Images]] is an 
open media platform',
-   'translate-group-desc-openimages-verifyemailtemplate' = 'These 
messages are part of the [[Translating:Open Images|Open Images]] email 
verification template',
'translate-group-desc-openimages-all' = 'These messages are part of 
the [[Translating:Open Images|Open Images]] project',
'bw-desc-openstreetmap' = 'All messages related to 
[[Translating:OpenStreetMap|OpenStreetMap]]',
'bw-desc-osm-site' = '[[Translating:OpenStreetMap|OpenStreetMap]] is 
an editable map of the whole world',
'translate-group-desc-potlatch2' = 
'[[Translating:OpenStreetMap|Potlatch2]] is a Flash-based OpenStreetMap editor',
'translate-group-desc-pywikipedia' = 
'[[Translating:Pywikipedia|Pywikipedia]] is a collection of tools to edit 
Wikipedia',
'bw-desc-shapado' = '[[Translating:Shapado|Shapado]] is web-based 
Question and Answer software',
-   'bw-desc-statusnet' = '[[Translating:StatusNet|StatusNet]] is a 
microblogging server',
-   'translate-group-desc-statusnet-plugin' = 'These messages are part of 
a plugin for [[Translating:StatusNet|StatusNet]]',
'translate-group-desc-tsint' = 'A message group for 
[http://toolserver.org/~krinkle/TsIntuition Toolserver Intuition], the i18n 
system for [http://toolserver.org Toolserver] tools (span 
class=plainlinks[[Translating talk:Toolserver|support]] middot; 
[https://wiki.toolserver.org/view/Toolserver_Intuition technical 
details]/span)',
'translate-group-desc-waymarked-trails' = '[[Translating:Waymarked 
Trails|Waymarked Trails]] is a service showing routes for hiking, cycling, 
mountain biking and inline skating around the world. It uses the GNU GPL 
license',
'bw-desc-wikiblame' = '[[Translating:WikiBlame|WikiBlame]] is able to 
quickly find the authors of a part of a page in a Wikimedia wiki',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I32b869601073dc4139345fd4afc33484f3d50e37
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove two unneeded description messages - change (translatewiki)

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

Change subject: Remove two unneeded description messages
..


Remove two unneeded description messages

Change-Id: Ie6f02a2ebe1551dee91aa277382ea810b268ad1d
---
M groups/OpenImages/OpenImages.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/groups/OpenImages/OpenImages.yaml 
b/groups/OpenImages/OpenImages.yaml
index 92afb49..2bcea0c 100644
--- a/groups/OpenImages/OpenImages.yaml
+++ b/groups/OpenImages/OpenImages.yaml
@@ -16,7 +16,7 @@
   id: out-openimages-core
   label: Open Images - Core
   icon: wiki://Open_Images.png
-  description: {{int:bw-desc-openimages}}
+  description: {{int:translate-group-desc-openimages-all}}
   namespace: NS_OPENIMAGES
   class: FileBasedMessageGroup
 
@@ -38,7 +38,7 @@
   id: out-openimages-verifyemailtemplate
   label: Open Images - Verify Email Template
   icon: wiki://Open_Images.png
-  description: {{int:translate-group-desc-openimages-verifyemailtemplate}}
+  description: {{int:translate-group-desc-openimages-all}}
   namespace: NS_OPENIMAGES
   class: FileBasedMessageGroup
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6f02a2ebe1551dee91aa277382ea810b268ad1d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Reduce used message group descriptions for iHRIS - change (translatewiki)

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

Change subject: Reduce used message group descriptions for iHRIS
..


Reduce used message group descriptions for iHRIS

Change-Id: Ia0beab82f9385d2a188b628f218cde6e5efaace7
---
M groups/IHRIS/IHRISCommon.yaml
M groups/IHRIS/IHRISI2ce.yaml
M groups/IHRIS/IHRISManage.yaml
M groups/IHRIS/IHRISQualify.yaml
4 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/groups/IHRIS/IHRISCommon.yaml b/groups/IHRIS/IHRISCommon.yaml
index bdcbf17..1ae27f7 100644
--- a/groups/IHRIS/IHRISCommon.yaml
+++ b/groups/IHRIS/IHRISCommon.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-common}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISI2ce.yaml b/groups/IHRIS/IHRISI2ce.yaml
index 2c4ef1a..6db67ec 100644
--- a/groups/IHRIS/IHRISI2ce.yaml
+++ b/groups/IHRIS/IHRISI2ce.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-i2ce}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISManage.yaml b/groups/IHRIS/IHRISManage.yaml
index bf96bbe..0778a4d 100644
--- a/groups/IHRIS/IHRISManage.yaml
+++ b/groups/IHRIS/IHRISManage.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-manage}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 
diff --git a/groups/IHRIS/IHRISQualify.yaml b/groups/IHRIS/IHRISQualify.yaml
index e84fb27..337d818 100644
--- a/groups/IHRIS/IHRISQualify.yaml
+++ b/groups/IHRIS/IHRISQualify.yaml
@@ -1,7 +1,7 @@
 TEMPLATE:
   BASIC:
 icon: wiki://IHRIS_suite_logo_square.png
-description: {{int:translate-group-desc-ihris-qualify}}
+description: {{int:translate-group-desc-ihris}}
 namespace: NS_IHRIS
 class: FileBasedMessageGroup
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia0beab82f9385d2a188b628f218cde6e5efaace7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Bug 6747 - Introducing a new variable {{ROOTPAGENAME}} - change (mediawiki/core)

2013-04-21 Thread Pragunbhutani (Code Review)
Pragunbhutani has uploaded a new change for review.

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


Change subject: Bug 6747 - Introducing a new variable {{ROOTPAGENAME}}
..

Bug 6747 - Introducing a new variable {{ROOTPAGENAME}}

Change-Id: I71ef0a15c95c9145462f3aa7fdb3ed11dac79265
---
M includes/MagicWord.php
M includes/parser/CoreParserFunctions.php
M includes/parser/Parser.php
M languages/messages/MessagesEn.php
M maintenance/fuzz-tester.php
M tests/parser/parserTests.txt
6 files changed, 29 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/60198/1

diff --git a/includes/MagicWord.php b/includes/MagicWord.php
index 86508ec..81602d1 100644
--- a/includes/MagicWord.php
+++ b/includes/MagicWord.php
@@ -138,6 +138,8 @@
'numberofactiveusers',
'numberofpages',
'currentversion',
+   'rootpagename',
+   'rootpagenamee',
'basepagename',
'basepagenamee',
'currenttimestamp',
diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 36bfb48..97ee40a 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -88,6 +88,8 @@
$parser-setFunctionHook( 'pagenamee',array( __CLASS__, 
'pagenamee'), SFH_NO_HASH );
$parser-setFunctionHook( 'fullpagename', array( __CLASS__, 
'fullpagename' ), SFH_NO_HASH );
$parser-setFunctionHook( 'fullpagenamee',array( __CLASS__, 
'fullpagenamee'), SFH_NO_HASH );
+   $parser-setFunctionHook( 'rootpagename', array( __CLASS__, 
'rootpagename' ), SFH_NO_HASH );
+   $parser-setFunctionHook( 'rootpagenamee',array( __CLASS__, 
'rootpagenamee'), SFH_NO_HASH );
$parser-setFunctionHook( 'basepagename', array( __CLASS__, 
'basepagename' ), SFH_NO_HASH );
$parser-setFunctionHook( 'basepagenamee',array( __CLASS__, 
'basepagenamee'), SFH_NO_HASH );
$parser-setFunctionHook( 'subpagename',  array( __CLASS__, 
'subpagename'  ), SFH_NO_HASH );
@@ -533,6 +535,18 @@
return '';
return wfEscapeWikiText( $t-getSubpageUrlForm() );
}
+   static function rootpagename( $parser, $title = null ) {
+   $t = Title::newFromText( $title );
+   if ( is_null( $t ) )
+   return '';
+   return wfEscapeWikiText( $t-getRootText() );
+   }
+   static function rootpagenamee( $parser, $title = null ) {
+   $t = Title::newFromText( $title );
+   if ( is_null( $t ) )
+   return '';
+   return wfEscapeWikiText( wfUrlEncode( str_replace( ' ', '_', 
$t-getRootText() ) ) );
+   }
static function basepagename( $parser, $title = null ) {
$t = Title::newFromText( $title );
if ( is_null( $t ) )
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 3ada925..4e6583a 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2746,6 +2746,12 @@
case 'subpagenamee':
$value = wfEscapeWikiText( 
$this-mTitle-getSubpageUrlForm() );
break;
+   case 'rootpagename':
+   $value = wfEscapeWikiText( 
$this-mTitle-getRootText() );
+   break;
+   case 'rootpagenamee':
+   $value = wfEscapeWikiText( wfUrlEncode( 
str_replace( ' ', '_', $this-mTitle-getRootText() ) ) );
+   break;
case 'basepagename':
$value = wfEscapeWikiText( 
$this-mTitle-getBaseText() );
break;
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index f3a0072..3a031b5 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -249,6 +249,8 @@
'fullpagenamee'   = array( 1,'FULLPAGENAMEE' ),
'subpagename' = array( 1,'SUBPAGENAME' ),
'subpagenamee'= array( 1,'SUBPAGENAMEE' ),
+   'rootpagename'= array( 1,'ROOTPAGENAME' ),
+   'rootpagenamee'   = array( 1,'ROOTPAGENAMEE' ),
'basepagename'= array( 1,'BASEPAGENAME' ),
'basepagenamee'   = array( 1,'BASEPAGENAMEE' ),
'talkpagename'= array( 1,'TALKPAGENAME' ),
diff --git a/maintenance/fuzz-tester.php b/maintenance/fuzz-tester.php
index 4c03980..bbf6140 100644
--- a/maintenance/fuzz-tester.php
+++ b/maintenance/fuzz-tester.php
@@ 

[MediaWiki-commits] [Gerrit] Add a OneLineStatementSniff - change (mediawiki...codesniffer)

2013-04-21 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Add a OneLineStatementSniff
..

Add a OneLineStatementSniff

This sniffs looks for curly braces around ifs and report missing braces

Feel free to expand or rename it.

Change-Id: I9a73087e6733732d0b8cb8a2fbec368e594f78b8
---
A MediaWiki/Sniffs/NamingConventions/OneLineStatementSniff.php
1 file changed, 48 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/codesniffer 
refs/changes/99/60199/1

diff --git a/MediaWiki/Sniffs/NamingConventions/OneLineStatementSniff.php 
b/MediaWiki/Sniffs/NamingConventions/OneLineStatementSniff.php
new file mode 100644
index 000..2345f0c
--- /dev/null
+++ b/MediaWiki/Sniffs/NamingConventions/OneLineStatementSniff.php
@@ -0,0 +1,48 @@
+?php
+/**
+ * Check, if all control structure have curly braces around the body
+ * Some one line ifs omitted these.
+ */
+class MediaWiki_Sniffs_NamingConventions_OneLineStatementSniff implements 
PHP_CodeSniffer_Sniff {
+
+   public function register() {
+   return array(
+   T_IF,
+   T_ELSEIF,
+   T_ELSE,
+   T_FOR,
+   T_FOREACH,
+   T_WHILE,
+   T_DO,
+   T_SWITCH,
+   T_TRY,
+   T_CATCH,
+   );
+   }
+
+   public function process( PHP_CodeSniffer_File $phpcsFile, $stackPtr ) {
+   $tokens = $phpcsFile-getTokens();
+
+   if ( !$this-isWhileOk( $tokens, $stackPtr )  (
+   !isset( $tokens[$stackPtr]['scope_opener'] ) ||
+   !isset( $tokens[$stackPtr]['scope_closer'] )
+   ) ) {
+   $error = 'Token \'%s\' without curly braces';
+   $type = 'noCurlyBraces';
+   $data = array( $tokens[$stackPtr]['content'] );
+   $phpcsFile-addError( $error, $stackPtr, $type, $data );
+   }
+   }
+
+   /**
+* by a do while the scope is at the do, so the ending while is 
reported as error,
+* but the missing scope is okay, when the while has a T_SEMICOLON 
after it
+*/
+   private function isWhileOk( $tokens, $stackPtr ) {
+   if ( $tokens[$stackPtr]['code'] !== T_WHILE ) {
+   return false;
+   }
+   $closer = $tokens[$stackPtr]['parenthesis_closer'];
+   return $closer  count( $tokens )  $tokens[$closer + 
1]['code'] === T_SEMICOLON;
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a73087e6733732d0b8cb8a2fbec368e594f78b8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/codesniffer
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de

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


[MediaWiki-commits] [Gerrit] Bug 25886: Serve stylesheets with Access-Control-Allow-Origi... - change (mediawiki/core)

2013-04-21 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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


Change subject: Bug 25886: Serve stylesheets with Access-Control-Allow-Origin: *
..

Bug 25886: Serve stylesheets with Access-Control-Allow-Origin: *

This allows Javascript to access our styling information (cssRules and
related cross domain protected dom information) even if it is hosted
on a different domain.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/00/60200/1

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index dd613a7..d57c47e 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -557,6 +557,7 @@
}
if ( $context-getOnly() === 'styles' ) {
header( 'Content-Type: text/css; charset=utf-8' );
+   header( 'Access-Control-Allow-Origin: *' );
} else {
header( 'Content-Type: text/javascript; charset=utf-8' 
);
}
@@ -786,6 +787,7 @@
// custom media type groups 
into @media .. {} sections as part of the css string.
// Module returns either an 
empty array or a numerical array with css strings.
$out .= isset( $styles['css'] ) 
? implode( '', $styles['css'] ) : '';
+   
break;
case 'messages':
$out .= 
self::makeMessageSetScript( new XmlJsCode( $messagesBlob ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8e05c13ae1a1589fd120d5c439b1a7128ce2b659
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TheDJ hartman.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use wfShellExec in MimeMagic - change (mediawiki/core)

2013-04-21 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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


Change subject: Use wfShellExec in MimeMagic
..

Use wfShellExec in MimeMagic

This avoids shell execution with backticks

Change-Id: I37ca19f4b19a3a7f2834a234051e4044653fcfb1
---
M includes/MimeMagic.php
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/01/60201/1

diff --git a/includes/MimeMagic.php b/includes/MimeMagic.php
index 24d803b..1c9b25d 100644
--- a/includes/MimeMagic.php
+++ b/includes/MimeMagic.php
@@ -876,9 +876,8 @@
 
$m = null;
if ( $wgMimeDetectorCommand ) {
-   // @todo FIXME: Use wfShellExec
-   $fn = wfEscapeShellArg( $file );
-   $m = `$wgMimeDetectorCommand $fn`;
+   $cmd = wfEscapeShellArg( $wgMimeDetectorCommand, $file 
);
+   $m = wfShellExec( $cmd );
} elseif ( function_exists( finfo_open )  function_exists( 
finfo_file ) ) {
 
# This required the fileinfo extension by PECL,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37ca19f4b19a3a7f2834a234051e4044653fcfb1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de

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


[MediaWiki-commits] [Gerrit] Fix some regressions included in EditProofreadIndePage - change (mediawiki...ProofreadPage)

2013-04-21 Thread Tpt (Code Review)
Tpt has uploaded a new change for review.

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


Change subject: Fix some regressions included in EditProofreadIndePage
..

Fix some regressions included in EditProofreadIndePage

fix change I64e841469664af41ba96a5a3f865f0272b0fb48a

Change-Id: Ie9bac2c00808f48bb2785fbbad28228933dfc615
---
M includes/index/EditProofreadIndexPage.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/includes/index/EditProofreadIndexPage.php 
b/includes/index/EditProofreadIndexPage.php
index 289e1e2..4a93c03 100644
--- a/includes/index/EditProofreadIndexPage.php
+++ b/includes/index/EditProofreadIndexPage.php
@@ -101,12 +101,12 @@
$inputAttributes['type'] = $inputType;
$inputAttributes['id'] = $key;
$inputAttributes['size'] = 60;
-   $inputAttributes['cols'] = 60;
-   $inputAttributes['rows'] = $size;
$wgOut-addHTML( Html::input( $key, $val, 
$inputType, $inputAttributes ) );
}
else {
-   $wgOut-addHTML( Html::textarea( $key, $val, 
$inputAttributes ) );
+   $inputAttributes['cols'] = 60;
+   $inputAttributes['rows'] = $size;
+   $wgOut-addHTML( Html::textarea( $key, $val, 
$inputAttributes ) );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9bac2c00808f48bb2785fbbad28228933dfc615
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt thoma...@hotmail.fr

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


[MediaWiki-commits] [Gerrit] fixed indentation infuzz-tester.php - change (mediawiki/core)

2013-04-21 Thread Pragunbhutani (Code Review)
Pragunbhutani has uploaded a new change for review.

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


Change subject: fixed indentation infuzz-tester.php
..

fixed indentation infuzz-tester.php

Change-Id: I56b352eeaa8de1285357790afd680e84b485ca06
---
M maintenance/fuzz-tester.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/03/60203/1

diff --git a/maintenance/fuzz-tester.php b/maintenance/fuzz-tester.php
index bbf6140..c75d004 100644
--- a/maintenance/fuzz-tester.php
+++ b/maintenance/fuzz-tester.php
@@ -655,10 +655,10 @@
'{{CURRENTDOW}}',
{{INT:{{LC:contribs-showhideminor}}|,
}},
-   {{INT:googlesearch|,
+   {{INT:googlesearch|,  
}},
-  {{ROOTPAGENAME}},
-   {{BASEPAGENAME}},
+   {{ROOTPAGENAME}},
+   {{BASEPAGENAME}},
{{CONTENTLANGUAGE}},
{{PAGESINNAMESPACE:}},
{{#language:,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56b352eeaa8de1285357790afd680e84b485ca06
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Pragunbhutani pragu...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fix some regressions included in EditProofreadIndePage - change (mediawiki...ProofreadPage)

2013-04-21 Thread Tpt (Code Review)
Tpt has submitted this change and it was merged.

Change subject: Fix some regressions included in EditProofreadIndePage
..


Fix some regressions included in EditProofreadIndePage

fix change I64e841469664af41ba96a5a3f865f0272b0fb48a

Change-Id: Ie9bac2c00808f48bb2785fbbad28228933dfc615
---
M includes/index/EditProofreadIndexPage.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/includes/index/EditProofreadIndexPage.php 
b/includes/index/EditProofreadIndexPage.php
index 289e1e2..4a93c03 100644
--- a/includes/index/EditProofreadIndexPage.php
+++ b/includes/index/EditProofreadIndexPage.php
@@ -101,12 +101,12 @@
$inputAttributes['type'] = $inputType;
$inputAttributes['id'] = $key;
$inputAttributes['size'] = 60;
-   $inputAttributes['cols'] = 60;
-   $inputAttributes['rows'] = $size;
$wgOut-addHTML( Html::input( $key, $val, 
$inputType, $inputAttributes ) );
}
else {
-   $wgOut-addHTML( Html::textarea( $key, $val, 
$inputAttributes ) );
+   $inputAttributes['cols'] = 60;
+   $inputAttributes['rows'] = $size;
+   $wgOut-addHTML( Html::textarea( $key, $val, 
$inputAttributes ) );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9bac2c00808f48bb2785fbbad28228933dfc615
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ProofreadPage
Gerrit-Branch: master
Gerrit-Owner: Tpt thoma...@hotmail.fr
Gerrit-Reviewer: Rtdwivedi ellydwivedi2...@gmail.com
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Tpt thoma...@hotmail.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] Add group description for Vicuña Uploader - change (mediawiki...Translate)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Add group description for Vicuña Uploader
..

Add group description for Vicuña Uploader

Change-Id: I935a916a14a37570a4511dd1f9c28652c20bb4dc
---
M TranslateGroupDescriptions.i18n.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Translate 
refs/changes/04/60204/1

diff --git a/TranslateGroupDescriptions.i18n.php 
b/TranslateGroupDescriptions.i18n.php
index 32874d3..60233c7 100644
--- a/TranslateGroupDescriptions.i18n.php
+++ b/TranslateGroupDescriptions.i18n.php
@@ -62,6 +62,7 @@
'bw-desc-statusnet' = '[[Translating:StatusNet|StatusNet]] is a 
microblogging server',
'translate-group-desc-statusnet-plugin' = 'These messages are part of 
a plugin for [[Translating:StatusNet|StatusNet]]',
'translate-group-desc-tsint' = 'A message group for 
[http://toolserver.org/~krinkle/TsIntuition Toolserver Intuition], the i18n 
system for [http://toolserver.org Toolserver] tools (span 
class=plainlinks[[Translating talk:Toolserver|support]] middot; 
[https://wiki.toolserver.org/view/Toolserver_Intuition technical 
details]/span)',
+   'translate-group-desc-vicuna' = 
'[[Translating:VicuñaUploader|VicuñaUploader]] is a tool to upload files to 
Wikimedia Commons and other Wikimedia projects',
'translate-group-desc-waymarked-trails' = '[[Translating:Waymarked 
Trails|Waymarked Trails]] is a service showing routes for hiking, cycling, 
mountain biking and inline skating around the world. It uses the GNU GPL 
license',
'bw-desc-wikiblame' = '[[Translating:WikiBlame|WikiBlame]] is able to 
quickly find the authors of a part of a page in a Wikimedia wiki',
'bw-desc-wikireader' = '[[Translating:WikiReader|WikiReader]] delivers 
an offline, text-only version of Wikipedia on a mobile device',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I935a916a14a37570a4511dd1f9c28652c20bb4dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updates for supporting VicuñaUploader - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Updates for supporting VicuñaUploader
..

Updates for supporting VicuñaUploader

Change-Id: Ibf28241e31d6803f14c2dc1f581ebd46f064677e
---
M TranslateSettings.php
M groups/Vicuna/Vicuna.yaml
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/05/60205/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index 31b70f5..54f2bc8 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -377,7 +377,7 @@
 
 # Not yet in use.
 wfAddNamespace( 1252, 'Vicuna' );
-#$wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
+$wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
 
 wfAddNamespace( 1254, 'FUEL' );
 $wgTranslateGroupFiles[] = $GROUPS/FUEL/FUEL.yaml;
diff --git a/groups/Vicuna/Vicuna.yaml b/groups/Vicuna/Vicuna.yaml
index 5cc0ba4..c3cba82 100644
--- a/groups/Vicuna/Vicuna.yaml
+++ b/groups/Vicuna/Vicuna.yaml
@@ -3,15 +3,15 @@
   id: out-vicuna
   label: VicuñaUploader
   icon: wiki://VicunaUploader_logo.png
-  description: [[Translating:VicuñaUploader|VicuñaUploader]] is a free tool 
to upload files to Wikimedia Commons and other Wikimedia projects
+  description: {{int:translate-group-desc-vicuna}}
   namespace: NS_VICUNA
   class: FileBasedMessageGroup
 
 FILES:
   class: JavaFFS
-  sourcePattern: %GROUPROOT%/src/cuploader/text/messages_%CODE%.properties
-  definitionFile: %GROUPROOT%/src/cuploader/text/messages.properties
-  targetPattern: vicuna/src/cuploader/text/messages_%CODE%.properties
+  sourcePattern: %GROUPROOT%/src/cuploader/text_utf8/messages_%CODE%.properties
+  definitionFile: %GROUPROOT%/src/cuploader/text_utf8/messages.properties
+  targetPattern: vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
   codeMap:
 cs:cs_CZ
 es:es_ES

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf28241e31d6803f14c2dc1f581ebd46f064677e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updates for supporting VicuñaUploader - change (translatewiki)

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

Change subject: Updates for supporting VicuñaUploader
..


Updates for supporting VicuñaUploader

Change-Id: Ibf28241e31d6803f14c2dc1f581ebd46f064677e
---
M TranslateSettings.php
M groups/Vicuna/Vicuna.yaml
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/TranslateSettings.php b/TranslateSettings.php
index 31b70f5..54f2bc8 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -377,7 +377,7 @@
 
 # Not yet in use.
 wfAddNamespace( 1252, 'Vicuna' );
-#$wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
+$wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
 
 wfAddNamespace( 1254, 'FUEL' );
 $wgTranslateGroupFiles[] = $GROUPS/FUEL/FUEL.yaml;
diff --git a/groups/Vicuna/Vicuna.yaml b/groups/Vicuna/Vicuna.yaml
index 5cc0ba4..c3cba82 100644
--- a/groups/Vicuna/Vicuna.yaml
+++ b/groups/Vicuna/Vicuna.yaml
@@ -3,15 +3,15 @@
   id: out-vicuna
   label: VicuñaUploader
   icon: wiki://VicunaUploader_logo.png
-  description: [[Translating:VicuñaUploader|VicuñaUploader]] is a free tool 
to upload files to Wikimedia Commons and other Wikimedia projects
+  description: {{int:translate-group-desc-vicuna}}
   namespace: NS_VICUNA
   class: FileBasedMessageGroup
 
 FILES:
   class: JavaFFS
-  sourcePattern: %GROUPROOT%/src/cuploader/text/messages_%CODE%.properties
-  definitionFile: %GROUPROOT%/src/cuploader/text/messages.properties
-  targetPattern: vicuna/src/cuploader/text/messages_%CODE%.properties
+  sourcePattern: %GROUPROOT%/src/cuploader/text_utf8/messages_%CODE%.properties
+  definitionFile: %GROUPROOT%/src/cuploader/text_utf8/messages.properties
+  targetPattern: vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
   codeMap:
 cs:cs_CZ
 es:es_ES

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf28241e31d6803f14c2dc1f581ebd46f064677e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Add group description for Vicuña Uploader - change (mediawiki...Translate)

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

Change subject: Add group description for Vicuña Uploader
..


Add group description for Vicuña Uploader

Change-Id: I935a916a14a37570a4511dd1f9c28652c20bb4dc
---
M TranslateGroupDescriptions.i18n.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/TranslateGroupDescriptions.i18n.php 
b/TranslateGroupDescriptions.i18n.php
index 32874d3..60233c7 100644
--- a/TranslateGroupDescriptions.i18n.php
+++ b/TranslateGroupDescriptions.i18n.php
@@ -62,6 +62,7 @@
'bw-desc-statusnet' = '[[Translating:StatusNet|StatusNet]] is a 
microblogging server',
'translate-group-desc-statusnet-plugin' = 'These messages are part of 
a plugin for [[Translating:StatusNet|StatusNet]]',
'translate-group-desc-tsint' = 'A message group for 
[http://toolserver.org/~krinkle/TsIntuition Toolserver Intuition], the i18n 
system for [http://toolserver.org Toolserver] tools (span 
class=plainlinks[[Translating talk:Toolserver|support]] middot; 
[https://wiki.toolserver.org/view/Toolserver_Intuition technical 
details]/span)',
+   'translate-group-desc-vicuna' = 
'[[Translating:VicuñaUploader|VicuñaUploader]] is a tool to upload files to 
Wikimedia Commons and other Wikimedia projects',
'translate-group-desc-waymarked-trails' = '[[Translating:Waymarked 
Trails|Waymarked Trails]] is a service showing routes for hiking, cycling, 
mountain biking and inline skating around the world. It uses the GNU GPL 
license',
'bw-desc-wikiblame' = '[[Translating:WikiBlame|WikiBlame]] is able to 
quickly find the authors of a part of a page in a Wikimedia wiki',
'bw-desc-wikireader' = '[[Translating:WikiReader|WikiReader]] delivers 
an offline, text-only version of Wikipedia on a mobile device',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I935a916a14a37570a4511dd1f9c28652c20bb4dc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Add message for blockly groups - change (mediawiki...Translate)

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

Change subject: Add message for blockly groups
..


Add message for blockly groups

Change-Id: Ieafae2c6742ea5ddbad3dcdea36e6c72d3e5f953
---
M TranslateGroupDescriptions.i18n.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/TranslateGroupDescriptions.i18n.php 
b/TranslateGroupDescriptions.i18n.php
index 32874d3..29058c7 100644
--- a/TranslateGroupDescriptions.i18n.php
+++ b/TranslateGroupDescriptions.i18n.php
@@ -37,6 +37,7 @@
'bw-desc-freecol' = '[[Translating:FreeCol|FreeCol]] is a turn-based 
strategy game',
'bw-desc-fudforum' = '[[Translating:FUDforum|FUDforum]] is web-based 
discussion forum software',
'bw-desc-mantisbt' = '[[Translating:MantisBT|MantisBT]] is web-based 
issue tracking software',
+   'translate-group-desc-blockly' = 'A message group for 
[[Translating:Blockly|Blockly]]',
'translate-group-desc-eol' = 'A message group for 
[[Translating:EOL|Encyclopedia of Life]]',
'translate-group-desc-frontlinesms' = 'A message group for 
[[Translating:FrontlineSMS|FrontlineSMS]]',
'translate-group-desc-fuel' = '[[Translating:FUEL|FUEL]] brings more 
consistency to software translation',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieafae2c6742ea5ddbad3dcdea36e6c72d3e5f953
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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 ClientStoreFactory into WikibaseClient. - change (mediawiki...Wikibase)

2013-04-21 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Factor ClientStoreFactory into WikibaseClient.
..


Factor ClientStoreFactory into WikibaseClient.

This removes one static entry point to the object graph.

Changing how our hook function access it remains to be done.

Change-Id: I89e98c138e8296e08d6d313231bb16b74c003a94
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/includes/ChangeHandler.php
M client/includes/EntityCacheUpdater.php
M client/includes/WikibaseClient.php
M client/includes/WikibaseLibrary.php
M client/includes/parserhooks/NoLangLinkHandler.php
M client/includes/parserhooks/PropertyParserFunction.php
D client/includes/store/ClientStoreFactory.php
M client/tests/phpunit/includes/WikibaseClientTest.php
M lib/includes/ChangeNotificationJob.php
M lib/tests/phpunit/store/SiteLinkLookupTest.php
12 files changed, 95 insertions(+), 100 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 3579b95..47bcce9 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -1,6 +1,8 @@
 ?php
 namespace Wikibase;
 
+use \Wikibase\Client\WikibaseClient;
+
 /**
  * File defining the hook handlers for the Wikibase Client extension.
  *
@@ -112,7 +114,7 @@
public static function onWikibaseDeleteData( $reportMessage ) {
wfProfileIn( __METHOD__ );
 
-   $store = ClientStoreFactory::getStore();
+   $store = WikibaseClient::getDefaultInstance()-getStore();
$stores = array_flip( $GLOBALS['wgWBClientStores'] );
 
$reportMessage( Deleting data from the  . $stores[get_class( 
$store )] .  store... );
@@ -147,7 +149,7 @@
public static function onWikibaseRebuildData( $reportMessage ) {
wfProfileIn( __METHOD__ );
 
-   $store = ClientStoreFactory::getStore();
+   $store = WikibaseClient::getDefaultInstance()-getStore();
$stores = array_flip( $GLOBALS['wgWBClientStores'] );
$reportMessage( Rebuilding all data in the  . 
$stores[get_class( $store )] .  store on the client... );
$store-rebuild();
@@ -178,7 +180,7 @@
 * @return bool
 */
public static function onSpecialMovepageAfterMove( \MovePageForm 
$movePage, \Title $oldTitle, \Title $newTitle ) {
-   $siteLinkCache = 
ClientStoreFactory::getStore()-newSiteLinkTable();
+   $siteLinkCache = 
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable();
$globalId = Settings::get( 'siteGlobalID' );
$itemId = $siteLinkCache-getItemIdForLink(
$globalId,
@@ -374,7 +376,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   ClientStoreFactory::getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
\Sites::singleton() );
 
$useRepoLinks = $langLinkHandler-useRepoLinks( 
$parser-getTitle(), $parser-getOutput() );
@@ -460,7 +462,7 @@
Settings::get( 'siteGlobalID' ),
Settings::get( 'namespaces' ),
Settings::get( 'excludeNamespaces' ),
-   ClientStoreFactory::getStore()-newSiteLinkTable(),
+   
WikibaseClient::getDefaultInstance()-getStore()-newSiteLinkTable(),
\Sites::singleton() );
 
$noExternalLangLinks = 
$langLinkHandler-getNoExternalLangLinks( $pout );
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index 9c2263d..ba013d1 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -94,7 +94,6 @@
 
 // includes/store
 $wgAutoloadClasses['Wikibase\ClientStore'] = $dir . 
'includes/store/ClientStore.php';
-$wgAutoloadClasses['Wikibase\ClientStoreFactory']  = $dir . 
'includes/store/ClientStoreFactory.php';
 $wgAutoloadClasses['Wikibase\EntityCache'] = $dir . 
'includes/store/EntityCache.php';
 
 // includes/store/sql
diff --git a/client/includes/ChangeHandler.php 
b/client/includes/ChangeHandler.php
index 8837be8..0df9c64 100644
--- a/client/includes/ChangeHandler.php
+++ b/client/includes/ChangeHandler.php
@@ -2,6 +2,8 @@
 
 namespace Wikibase;
 
+use \Wikibase\Client\WikibaseClient;
+
 /**
  * Interface for change handling. Whenever a change is detected,
  * it should be fed to this service which then takes care handling
@@ -118,11 +120,11 @@
}
 
if ( !$entityLookup ) {
-   $entityLookup = 

[MediaWiki-commits] [Gerrit] Fix paths for Vicuna Uploader - change (translatewiki)

2013-04-21 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Fix paths for Vicuna Uploader
..

Fix paths for Vicuna Uploader

Change-Id: Ib523d6aa368801ca7049d0b01fb8c2fa769fd664
---
M groups/Vicuna/Vicuna.yaml
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/06/60206/1

diff --git a/groups/Vicuna/Vicuna.yaml b/groups/Vicuna/Vicuna.yaml
index c3cba82..8ecedf4 100644
--- a/groups/Vicuna/Vicuna.yaml
+++ b/groups/Vicuna/Vicuna.yaml
@@ -9,8 +9,8 @@
 
 FILES:
   class: JavaFFS
-  sourcePattern: %GROUPROOT%/src/cuploader/text_utf8/messages_%CODE%.properties
-  definitionFile: %GROUPROOT%/src/cuploader/text_utf8/messages.properties
+  sourcePattern: 
%GROUPROOT%/vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
+  definitionFile: 
%GROUPROOT%/vicuna/src/cuploader/text_utf8/messages.properties
   targetPattern: vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
   codeMap:
 cs:cs_CZ

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib523d6aa368801ca7049d0b01fb8c2fa769fd664
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] fix mediawikiwiki URL for motd - change (mediawiki/vagrant)

2013-04-21 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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


Change subject: fix mediawikiwiki URL for motd
..

fix mediawikiwiki URL for motd

if using HTTPS at all then point somewhere that doesn't then
redirect you to HTTP

Change-Id: I5cc65a93ef4b12a4b71714f2d057d88cc56607be
---
M puppet/modules/misc/files/60-mediawiki-vagrant
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/07/60207/1

diff --git a/puppet/modules/misc/files/60-mediawiki-vagrant 
b/puppet/modules/misc/files/60-mediawiki-vagrant
index 41fdd60..b2c4327 100755
--- a/puppet/modules/misc/files/60-mediawiki-vagrant
+++ b/puppet/modules/misc/files/60-mediawiki-vagrant
@@ -3,5 +3,5 @@
 printf  * MediaWiki is located at \033[33;1m/vagrant/mediawiki\033[0m.\n
 printf  * To interactively evaluate PHP and MediaWiki code, run 
'\033[33mphpsh\033[0m'.\n
 printf  * For a database shell, run '\033[33mmysql\033[0m'.\n
-printf  * For help, visit \033[34;4mhttps://mediawiki.org\033[0m or 
\033[33m#mediawiki\033[0m on chat.freenode.net.\n\n
+printf  * For help, visit \033[34;4mhttps://www.mediawiki.org\033[0m or 
\033[33m#mediawiki\033[0m on chat.freenode.net.\n\n
 /usr/bin/landscape-sysinfo --exclude-sysinfo-plugins=LandscapeLink

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cc65a93ef4b12a4b71714f2d057d88cc56607be
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Jeremyb jer...@tuxmachine.com

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


[MediaWiki-commits] [Gerrit] Fix paths for Vicuna Uploader - change (translatewiki)

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

Change subject: Fix paths for Vicuna Uploader
..


Fix paths for Vicuna Uploader

Change-Id: Ib523d6aa368801ca7049d0b01fb8c2fa769fd664
---
M groups/Vicuna/Vicuna.yaml
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/groups/Vicuna/Vicuna.yaml b/groups/Vicuna/Vicuna.yaml
index c3cba82..8ecedf4 100644
--- a/groups/Vicuna/Vicuna.yaml
+++ b/groups/Vicuna/Vicuna.yaml
@@ -9,8 +9,8 @@
 
 FILES:
   class: JavaFFS
-  sourcePattern: %GROUPROOT%/src/cuploader/text_utf8/messages_%CODE%.properties
-  definitionFile: %GROUPROOT%/src/cuploader/text_utf8/messages.properties
+  sourcePattern: 
%GROUPROOT%/vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
+  definitionFile: 
%GROUPROOT%/vicuna/src/cuploader/text_utf8/messages.properties
   targetPattern: vicuna/src/cuploader/text_utf8/messages_%CODE%.properties
   codeMap:
 cs:cs_CZ

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib523d6aa368801ca7049d0b01fb8c2fa769fd664
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Fix encoding - change (translatewiki)

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

Change subject: Fix encoding
..


Fix encoding

Change-Id: I7e59a42be59f5df6965b8e83ec2534f3736d7cb3
---
M groups/Vicuna/Vicuna.yaml
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/groups/Vicuna/Vicuna.yaml b/groups/Vicuna/Vicuna.yaml
index 8ecedf4..6de419e 100644
--- a/groups/Vicuna/Vicuna.yaml
+++ b/groups/Vicuna/Vicuna.yaml
@@ -1,7 +1,7 @@
 ---
 BASIC:
   id: out-vicuna
-  label: VicuñaUploader
+  label: VicuñaUploader
   icon: wiki://VicunaUploader_logo.png
   description: {{int:translate-group-desc-vicuna}}
   namespace: NS_VICUNA

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e59a42be59f5df6965b8e83ec2534f3736d7cb3
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand siebr...@wikimedia.org
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] Fixed Bug 40464 Placeholder attribute of searchInput element - change (mediawiki/core)

2013-04-21 Thread TheDJ (Code Review)
TheDJ has submitted this change and it was merged.

Change subject: Fixed Bug 40464 Placeholder attribute of searchInput element
..


Fixed Bug 40464 Placeholder attribute of searchInput element

Removed the javascript code that sets the placeholder of #searchInput element.
Now the placeholder attribute of #searchInput element is set only in the 
original HTML.
On browsers that do not support placeholder attribute, placeholder.js will 
insert
the appropriate placeholder.

Bug: 40464
Change-Id: I6496716f2bd25307004ba16bceadca4c6723a5db
---
M includes/SkinTemplate.php
M resources/mediawiki/mediawiki.searchSuggest.js
2 files changed, 1 insertion(+), 5 deletions(-)

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



diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index 17ec88a..a5709ea 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -1804,6 +1804,7 @@
$realAttrs = array(
'type' = 'search',
'name' = 'search',
+   'placeholder' = wfMessage( 'searchsuggest-search' 
)-text(),
'value' = isset( $this-data['search'] ) ? 
$this-data['search'] : '',
);
$realAttrs = array_merge( $realAttrs, 
Linker::tooltipAndAccesskeyAttribs( 'search' ), $attrs );
diff --git a/resources/mediawiki/mediawiki.searchSuggest.js 
b/resources/mediawiki/mediawiki.searchSuggest.js
index 2bc7cea..516c58f 100644
--- a/resources/mediawiki/mediawiki.searchSuggest.js
+++ b/resources/mediawiki/mediawiki.searchSuggest.js
@@ -196,11 +196,6 @@
return;
}
 
-   // Placeholder text for search box
-   $searchInput
-   .attr( 'placeholder', mw.msg( 'searchsuggest-search' ) )
-   .placeholder();
-
// Special suggestions functionality for skin-provided search 
box
$searchInput.suggestions( {
result: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6496716f2bd25307004ba16bceadca4c6723a5db
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Prageck prag...@gmail.com
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Prageck prag...@gmail.com
Gerrit-Reviewer: TheDJ hartman.w...@gmail.com
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: Waldir wal...@email.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] Moved class registration of WikibaseRepo extension into dedi... - change (mediawiki...Wikibase)

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

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


Change subject: Moved class registration of WikibaseRepo extension into 
dedicated file
..

Moved class registration of WikibaseRepo extension into dedicated file

Change-Id: Ida5cf74d1389dc0b12412e6e0017a7b3038beaa7
---
A repo/Wikibase.classes.php
M repo/Wikibase.php
2 files changed, 162 insertions(+), 131 deletions(-)


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

diff --git a/repo/Wikibase.classes.php b/repo/Wikibase.classes.php
new file mode 100644
index 000..2a45f4d
--- /dev/null
+++ b/repo/Wikibase.classes.php
@@ -0,0 +1,154 @@
+?php
+
+/**
+ * Class registration file for the WikibaseRepo extension.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseRepo
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+return call_user_func( function() {
+
+   $classes = array(
+   'Wikibase\RepoHooks' = 'Wikibase.hooks.php',
+
+   // includes
+   'Wikibase\Autocomment' = 'includes/Autocomment.php',
+   'Wikibase\ClaimSaver' = 'includes/ClaimSaver.php',
+   'Wikibase\DataTypeSelector' = 'includes/DataTypeSelector.php',
+   'Wikibase\Repo\DBConnectionProvider' = 
'includes/DBConnectionProvider.php',
+   'Wikibase\EditEntity' = 'includes/EditEntity.php',
+   'Wikibase\EntityContentDiffView' = 
'includes/EntityContentDiffView.php',
+   'Wikibase\ItemContentDiffView' = 
'includes/ItemContentDiffView.php',
+   'Wikibase\ItemDisambiguation' = 
'includes/ItemDisambiguation.php',
+   'Wikibase\EntityView' = 'includes/EntityView.php',
+   'Wikibase\ExceptionWithCode' = 
'includes/ExceptionWithCode.php',
+   'Wikibase\ItemView' = 'includes/ItemView.php',
+   'Wikibase\LabelDescriptionDuplicateDetector' = 
'includes/LabelDescriptionDuplicateDetector.php',
+   'Wikibase\Repo\LazyDBConnectionProvider' = 
'includes/LazyDBConnectionProvider.php',
+   'Wikibase\MultiLangConstraintDetector' = 
'includes/MultiLangConstraintDetector.php',
+   'Wikibase\NamespaceUtils' = 'includes/NamespaceUtils.php',
+   'Wikibase\PropertyView' = 'includes/PropertyView.php',
+   'Wikibase\Summary' = 'includes/Summary.php',
+   'Wikibase\Repo\WikibaseRepo' = 'includes/WikibaseRepo.php',
+
+   // includes/actions
+   'Wikibase\HistoryEntityAction' = 
'includes/actions/HistoryEntityAction.php',
+   'Wikibase\HistoryItemAction' = 
'includes/actions/HistoryItemAction.php',
+   'Wikibase\HistoryPropertyAction' = 
'includes/actions/HistoryPropertyAction.php',
+   'Wikibase\EditEntityAction' = 
'includes/actions/EditEntityAction.php',
+   'Wikibase\EditItemAction' = 
'includes/actions/EditItemAction.php',
+   'Wikibase\EditPropertyAction' = 
'includes/actions/EditPropertyAction.php',
+   'Wikibase\ViewEntityAction' = 
'includes/actions/ViewEntityAction.php',
+   'Wikibase\ViewItemAction' = 
'includes/actions/ViewItemAction.php',
+   'Wikibase\ViewPropertyAction' = 
'includes/actions/ViewPropertyAction.php',
+   'Wikibase\SubmitEntityAction' = 
'includes/actions/EditEntityAction.php',
+   'Wikibase\SubmitItemAction' = 
'includes/actions/EditItemAction.php',
+   'Wikibase\SubmitPropertyAction' = 
'includes/actions/EditPropertyAction.php',
+
+   // includes/api
+   'Wikibase\Api\ApiWikibase' = 'includes/api/ApiWikibase.php',
+   'Wikibase\Api\IAutocomment' = 'includes/api/IAutocomment.php',
+   'Wikibase\Api\EditEntity' = 'includes/api/EditEntity.php',
+   'Wikibase\Api\GetEntities' = 'includes/api/GetEntities.php',
+   'Wikibase\Api\LinkTitles' = 'includes/api/LinkTitles.php',
+   'Wikibase\Api\ModifyClaim' = 'includes/api/ModifyClaim.php',
+   

[MediaWiki-commits] [Gerrit] Remove usage of LibRegistry from WBC extension - change (mediawiki...Wikibase)

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

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


Change subject: Remove usage of LibRegistry from WBC extension
..

Remove usage of LibRegistry from WBC extension

Change-Id: I608535e4eb871248b32a93832f58e7d3552b871a
---
M client/includes/WikibaseLibrary.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/client/includes/WikibaseLibrary.php 
b/client/includes/WikibaseLibrary.php
index 72ca7a7..96eb9bb 100644
--- a/client/includes/WikibaseLibrary.php
+++ b/client/includes/WikibaseLibrary.php
@@ -54,10 +54,11 @@
public function getEntity( $prefixedEntityId = null ) {
$this-checkType( 'getEntity', 1, $prefixedEntityId, 'string' );
$prefixedEntityId = trim( $prefixedEntityId );
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
+
+   $entityIdParser = 
WikibaseClient::getDefaultInstance()-getEntityIdParser();
 
try {
-   $entityId = $libRegistry-getEntityIdParser()-parse( 
$prefixedEntityId );
+   $entityId = $entityIdParser-parse( $prefixedEntityId );
}
catch ( ParseException $parseException ) {
throw $this-getEngine()-newException( 
'wikibase-error-invalid-entity-id' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I608535e4eb871248b32a93832f58e7d3552b871a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] Remove usage of LibRegistry in WBR API - change (mediawiki...Wikibase)

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

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


Change subject: Remove usage of LibRegistry in WBR API
..

Remove usage of LibRegistry in WBR API

Change-Id: I8bdbb677f7c47a81a9c6a8df527b2af628723117
---
M repo/includes/api/CreateClaim.php
M repo/includes/api/SetQualifier.php
2 files changed, 6 insertions(+), 4 deletions(-)


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

diff --git a/repo/includes/api/CreateClaim.php 
b/repo/includes/api/CreateClaim.php
index 80da322..ffb228e 100644
--- a/repo/includes/api/CreateClaim.php
+++ b/repo/includes/api/CreateClaim.php
@@ -9,6 +9,7 @@
 use Wikibase\Entity;
 use Wikibase\EntityContent;
 use Wikibase\EntityContentFactory;
+use Wikibase\Repo\WikibaseRepo;
 use Wikibase\SnakFactory;
 use Wikibase\LibRegistry;
 use Wikibase\Claim;
@@ -173,10 +174,10 @@
$params = $this-extractRequestParams();
 
$factory = new SnakFactory();
-   $libRegistry = new LibRegistry( Settings::singleton() );
+   $entityIdParser = 
WikibaseRepo::getDefaultInstance()-getEntityIdParser();
 
try {
-   $entityId = $libRegistry-getEntityIdParser()-parse( 
$params['property'] );
+   $entityId = $entityIdParser-parse( $params['property'] 
);
}
catch ( ParseException $parseException ) {
throw new MWException( $parseException-getMessage(), 
'setclaim-invalid-guid' );
diff --git a/repo/includes/api/SetQualifier.php 
b/repo/includes/api/SetQualifier.php
index 99db2aa..a19e09a 100644
--- a/repo/includes/api/SetQualifier.php
+++ b/repo/includes/api/SetQualifier.php
@@ -11,6 +11,7 @@
 use Wikibase\Entity;
 use Wikibase\EntityContentFactory;
 use Wikibase\Claim;
+use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Snaks;
 use Wikibase\SnakFactory;
 use Wikibase\PropertyValueSnak;
@@ -217,10 +218,10 @@
}
 
protected function getParsedEntityId( $prefixedId, $errorCode ) {
-   $libRegistry = new LibRegistry( Settings::singleton() );
+   $entityIdParser = 
WikibaseRepo::getDefaultInstance()-getEntityIdParser();
 
try {
-   $entityId = $libRegistry-getEntityIdParser()-parse( 
$prefixedId );
+   $entityId = $entityIdParser-parse( $prefixedId );
}
catch ( ParseException $parseException ) {
$this-dieUsage( $parseException-getMessage(), 
$errorCode );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8bdbb677f7c47a81a9c6a8df527b2af628723117
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] Remove usage of LibRegistry in WBR SpecialPages - change (mediawiki...Wikibase)

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

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


Change subject: Remove usage of LibRegistry in WBR SpecialPages
..

Remove usage of LibRegistry in WBR SpecialPages

Change-Id: I8496808a5b6ed54d8a071794c0844599977b3a04
---
M repo/includes/specials/SpecialNewProperty.php
1 file changed, 6 insertions(+), 5 deletions(-)


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

diff --git a/repo/includes/specials/SpecialNewProperty.php 
b/repo/includes/specials/SpecialNewProperty.php
index ede9789..bc1e159 100644
--- a/repo/includes/specials/SpecialNewProperty.php
+++ b/repo/includes/specials/SpecialNewProperty.php
@@ -1,7 +1,9 @@
 ?php
 
+use Wikibase\DataTypeSelector;
 use Wikibase\PropertyContent;
 use Wikibase\EntityContent;
+use Wikibase\Repo\WikibaseRepo;
 
 /**
  * Page for creating new Wikibase properties.
@@ -85,9 +87,9 @@
$status = parent::modifyEntity( $propertyContent );
 
if ( $this-dataType !== '' ) {
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
+   $dataTypeFactory = 
WikibaseRepo::getDefaultInstance()-getDataTypeFactory();
 
-   $dataType = 
$libRegistry-getDataTypeFactory()-getType( $this-dataType );
+   $dataType = $dataTypeFactory-getType( $this-dataType 
);
 
if ( $dataType === null ) {
$status-fatal( 
'wikibase-newproperty-invalid-datatype' );
@@ -104,10 +106,9 @@
 * @see SpecialNewEntity::additionalFormElements()
 */
protected function additionalFormElements() {
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-   $dataTypeFactory = $libRegistry-getDataTypeFactory();
+   $dataTypeFactory = 
WikibaseRepo::getDefaultInstance()-getDataTypeFactory();
 
-   $selector = new \Wikibase\DataTypeSelector( 
$dataTypeFactory-getTypes(), $this-getLanguage()-getCode() );
+   $selector = new DataTypeSelector( $dataTypeFactory-getTypes(), 
$this-getLanguage()-getCode() );
 
return parent::additionalFormElements()
. Html::element(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8496808a5b6ed54d8a071794c0844599977b3a04
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] Use Property-setDataTypeId rather then -setDataType so no ... - change (mediawiki...Wikibase)

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

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


Change subject: Use Property-setDataTypeId rather then -setDataType so no 
DataType construction is needed
..

Use Property-setDataTypeId rather then -setDataType so no DataType 
construction is needed

This gets rid of LibRegistry usage as well

Change-Id: I07e334767054310f1a725e43c304db8c91ec6ca0
---
M repo/maintenance/importProperties.php
M repo/tests/phpunit/includes/api/GetClaimsTest.php
M repo/tests/phpunit/includes/api/RemoveClaimsTest.php
M repo/tests/phpunit/includes/api/SetClaimValueTest.php
M repo/tests/phpunit/includes/content/PropertyContentTest.php
5 files changed, 7 insertions(+), 25 deletions(-)


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

diff --git a/repo/maintenance/importProperties.php 
b/repo/maintenance/importProperties.php
index 85f86f4..bbe547f 100644
--- a/repo/maintenance/importProperties.php
+++ b/repo/maintenance/importProperties.php
@@ -121,9 +121,7 @@
foreach ( $data as $lang = $title ) {
 $label = $title;
$property-setLabel( $lang, $label );
-
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-$property-setDataType( 
$libRegistry-getDataTypeFactory()-getType( 'wikibase-item' ) );
+$property-setDataTypeId( 'wikibase-item' );
}
 
$content = \Wikibase\PropertyContent::newFromProperty( 
$property );
diff --git a/repo/tests/phpunit/includes/api/GetClaimsTest.php 
b/repo/tests/phpunit/includes/api/GetClaimsTest.php
index 0c2e558..602daff 100644
--- a/repo/tests/phpunit/includes/api/GetClaimsTest.php
+++ b/repo/tests/phpunit/includes/api/GetClaimsTest.php
@@ -68,9 +68,7 @@
protected function getNewEntities() {
$property = \Wikibase\Property::newEmpty();
 
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-   $dataTypes = $libRegistry-getDataTypeFactory()-getTypes();
-   $property-setDataType( reset( $dataTypes ) );
+   $property-setDataTypeId( 'string' );
 
return array(
$this-addClaimsAndSave( \Wikibase\Item::newEmpty() ),
diff --git a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php 
b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
index 7e88acf..105d4c6 100644
--- a/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
+++ b/repo/tests/phpunit/includes/api/RemoveClaimsTest.php
@@ -62,11 +62,7 @@
 
public function entityProvider() {
$property = \Wikibase\Property::newEmpty();
-
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-   $dataTypes = $libRegistry-getDataTypeFactory()-getTypes();
-
-   $property-setDataType( reset( $dataTypes ) );
+   $property-setDataTypeId( 'string' );
 
return array(
$this-addClaimsAndSave( \Wikibase\Item::newEmpty() ),
diff --git a/repo/tests/phpunit/includes/api/SetClaimValueTest.php 
b/repo/tests/phpunit/includes/api/SetClaimValueTest.php
index 2520708..0ed51d8 100644
--- a/repo/tests/phpunit/includes/api/SetClaimValueTest.php
+++ b/repo/tests/phpunit/includes/api/SetClaimValueTest.php
@@ -66,11 +66,7 @@
 */
protected function getEntities( EntityId $propertyId ) {
$property = \Wikibase\Property::newEmpty();
-
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-   $dataTypes = $libRegistry-getDataTypeFactory()-getTypes();
-
-   $property-setDataType( reset( $dataTypes ) );
+   $property-setDataTypeId( 'string' );
 
return array(
$this-addClaimsAndSave( \Wikibase\Item::newEmpty(), 
$propertyId ),
diff --git a/repo/tests/phpunit/includes/content/PropertyContentTest.php 
b/repo/tests/phpunit/includes/content/PropertyContentTest.php
index ba7e599..d709458 100644
--- a/repo/tests/phpunit/includes/content/PropertyContentTest.php
+++ b/repo/tests/phpunit/includes/content/PropertyContentTest.php
@@ -59,10 +59,7 @@
 */
protected function newEmpty() {
$content = PropertyContent::newEmpty();
-
-   $libRegistry = new \Wikibase\LibRegistry( 
\Wikibase\Settings::singleton() );
-   $dataTypes = $libRegistry-getDataTypeFactory()-getTypes();
-   $content-getProperty()-setDataType( array_shift( $dataTypes ) 
);
+   $content-getProperty()-setDataTypeId( 'string' );
 
return $content;
}
@@ -70,20 +67,17 @@
public function testLabelUniquenessRestriction() {
\Wikibase\StoreFactory::getStore()-getTermIndex()-clear();
 
-   

[MediaWiki-commits] [Gerrit] Moved class registration of WikibaseLib into dedicated file - change (mediawiki...Wikibase)

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

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


Change subject: Moved class registration of WikibaseLib into dedicated file
..

Moved class registration of WikibaseLib into dedicated file

Change-Id: Id9e9d3f585e1b86160cbb133a410c035b46a13fe
---
A lib/WikibaseLib.classes.php
M lib/WikibaseLib.php
2 files changed, 165 insertions(+), 131 deletions(-)


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

diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
new file mode 100644
index 000..0d303f7
--- /dev/null
+++ b/lib/WikibaseLib.classes.php
@@ -0,0 +1,158 @@
+?php
+
+/**
+ * Class registration file for the WikibaseLib component.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+return call_user_func( function() {
+
+   $classes = array(
+   // Autoloading
+   'Wikibase\LibHooks' = 'WikibaseLib.hooks.php',
+
+   // includes
+   'Wikibase\Arrayalizer' = 'includes/Arrayalizer.php',
+   'Wikibase\ByPropertyIdArray' = 
'includes/ByPropertyIdArray.php',
+   'Wikibase\ChangeNotifier' = 'includes/ChangeNotifier.php',
+   'Wikibase\ChangeNotificationJob' = 
'includes/ChangeNotificationJob.php',
+   'Wikibase\ChangesTable' = 'includes/ChangesTable.php',
+   'Wikibase\DiffOpValueFormatter' = 
'includes/DiffOpValueFormatter.php',
+   'Wikibase\DiffView' = 'includes/DiffView.php',
+   'Wikibase\Lib\GuidGenerator' = 'includes/GuidGenerator.php',
+   'Wikibase\Lib\V4GuidGenerator' = 'includes/GuidGenerator.php',
+   'Wikibase\Lib\EntityRetrievingDataTypeLookup' = 
'includes/EntityRetrievingDataTypeLookup.php',
+   'Wikibase\Lib\ClaimGuidGenerator' = 
'includes/GuidGenerator.php',
+   'Wikibase\HashableObjectStorage' = 
'includes/HashableObjectStorage.php',
+   'Wikibase\HashArray' = 'includes/HashArray.php',
+   'Wikibase\Lib\InMemoryDataTypeLookup' = 
'includes/InMemoryDataTypeLookup.php',
+   'Wikibase\LibRegistry' = 'includes/LibRegistry.php',
+   'Wikibase\Template' = 'includes/TemplateRegistry.php',
+   'Wikibase\TemplateRegistry' = 'includes/TemplateRegistry.php',
+   'Wikibase\MapHasher' = 'includes/MapHasher.php',
+   'Wikibase\MapValueHasher' = 'includes/MapValueHasher.php',
+   'Wikibase\ReferencedEntitiesFinder' = 
'includes/ReferencedEntitiesFinder.php',
+   'Wikibase\ObjectComparer' = 'includes/ObjectComparer.php',
+   'Wikibase\Lib\PropertyDataTypeLookup' = 
'includes/PropertyDataTypeLookup.php',
+   'Wikibase\Settings' = 'includes/Settings.php',
+   'Wikibase\SettingsArray' = 'includes/SettingsArray.php',
+   'Wikibase\Lib\SnakFormatter' = 'includes/SnakFormatter.php',
+   'Wikibase\Term' = 'includes/Term.php',
+   'Wikibase\Lib\TermsToClaimsTranslator' = 
'includes/TermsToClaimsTranslator.php',
+   'Wikibase\Lib\TypedValueFormatter' = 
'includes/TypedValueFormatter.php',
+   'Wikibase\Utils' = 'includes/Utils.php',
+   'Wikibase\WikibaseDiffOpFactory' = 
'includes/WikibaseDiffOpFactory.php',
+
+   // includes/changes
+   'Wikibase\Change' = 'includes/changes/Change.php',
+   'Wikibase\ChangeRow' = 'includes/changes/ChangeRow.php',
+   'Wikibase\DiffChange' = 'includes/changes/DiffChange.php',
+   'Wikibase\EntityChange' = 'includes/changes/EntityChange.php',
+   'Wikibase\ItemChange' = 'includes/changes/ItemChange.php',
+
+   'Wikibase\ClaimDiffer' = 'includes/ClaimDiffer.php',
+   'Wikibase\ClaimDifference' = 'includes/ClaimDifference.php',
+   'Wikibase\ClaimDifferenceVisualizer' = 
'includes/ClaimDifferenceVisualizer.php',
+
+
+   'Wikibase\EntityDiff' = 

[MediaWiki-commits] [Gerrit] Minor cleanup in various files - change (analytics/udp-filters)

2013-04-21 Thread Diederik (Code Review)
Diederik has submitted this change and it was merged.

Change subject: Minor cleanup in various files
..


Minor cleanup in various files

Changed 1 to true in a couple of places that I missed earlier.
-- Add SimpleMake makefile to build without needing autoconf, automake and
   friends.
-- countries.{h,c}: fix mismatch in array declaration and add const;
   remove superfluous array size; include header in C file so that
   mismatches can be caught by compiler.
-- udp-filter.h: remove explicit assignment of values since enums, by default
   start at 0 and increment by 1; add last member to track number of values.
-- udp-filter.c: use MAX_FILTER instead of manifest constant; remove
   superfluous variable num_predefined_filters; use bool type where appropriate;
   remove unused variable found_multiple_ips.
-- utils.c: include header in C file

Change-Id: Id47ec9a4e4855d43e632ea0d71ef83323a30413f
---
A SimpleMake
M src/countries.c
M src/countries.h
M src/udp-filter.c
M src/udp-filter.h
M src/utils.c
6 files changed, 79 insertions(+), 39 deletions(-)

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



diff --git a/SimpleMake b/SimpleMake
new file mode 100644
index 000..0239501
--- /dev/null
+++ b/SimpleMake
@@ -0,0 +1,40 @@
+CC = gcc
+CFLAGS = -std=gnu99 -O2 -Wall -Wextra
+LDFLAGS = -lGeoIP -lcidr -lanon
+
+TARGETS = udp-filter
+
+HDRS = src/udp-filter.h   \
+   src/countries.h\
+   src/collector-output.h \
+   src/geo.h  \
+   src/anonymize.h\
+   src/match.h\
+   src/utils.h
+
+SRCS = src/udp-filter.c   \
+   src/countries.c\
+   src/collector-output.c \
+   src/geo.c  \
+   src/anonymize.c\
+   src/match.c\
+   src/utils.c
+
+OBJS = $(SRCS:%.c=%.o)
+
+$(TARGETS): $(OBJS)
+   $(CC) -o $@ $^ $(LDFLAGS)
+
+clean:
+   rm -f udp-filter $(OBJS)
+
+.PHONY: clean
+
+# dependencies
+src/udp-filter.o: src/udp-filter.c $(HDRS)
+src/countries.o: src/countries.c src/countries.h
+src/collector-output.o: src/collector-output.c src/collector-output.h
+src/geo.o: src/geo.c src/geo.h src/udp-filter.h src/utils.h
+src/anonymize.o: src/anonymize.c src/anonymize.h src/udp-filter.h
+src/match.o: src/match.c src/match.h src/udp-filter.h src/utils.h
+src/utils.o: src/utils.c src/utils.h
diff --git a/src/countries.c b/src/countries.c
index f9e7440..9e40fd1 100644
--- a/src/countries.c
+++ b/src/countries.c
@@ -19,9 +19,11 @@
 #include string.h
 #include stdio.h
 
+#include countries.h
+
 // This is an array with valid country codes, the country codes that are
 // supplied on the command line will be checked against this array.
-const char *country_code_array[253] = {
+const char *const country_code_array[] = {
 A1,//,Anonymous Proxy
 A2,//,Satellite Provider
 O1,//,Other Country
diff --git a/src/countries.h b/src/countries.h
index 320963c..36c3573 100644
--- a/src/countries.h
+++ b/src/countries.h
@@ -19,5 +19,4 @@
 
 int verify_country_code(char *country_code);
 
-
-extern const char country_code_array[253];
+extern const char *const country_code_array[];
diff --git a/src/udp-filter.c b/src/udp-filter.c
index a7e7677..8c44f9d 100644
--- a/src/udp-filter.c
+++ b/src/udp-filter.c
@@ -68,8 +68,7 @@
 
 
 
-int params[7];  // Increase this when you add a new filter to ScreenType enum.
-const int num_predefined_filters = sizeof(params)/sizeof(int);
+bool params[ MAX_FILTER ];
 int verbose_flag = 0;   // this flag indicates whether we 
should output detailed debug messages, default is off.
 
 
@@ -653,32 +652,32 @@
 
 
// DETERMINE NUMBER OF FILTERS
-   for(n=0; nnum_predefined_filters; n++){
+   for(n=0; nMAX_FILTER; n++){
switch (n) {
 
case DOMAIN_FILTER:
-   if(params[n] == 1){
+   if(params[n] == true){
num_domain_filters = 
determine_num_obs(domain_input,comma_delimiter);
required_hits+=1;
}
break;
 
case PATH_FILTER:
-   if(params[n] ==1 ){
+   if(params[n] == true ){
num_path_filters = 
determine_num_obs(path_input,comma_delimiter);
required_hits+=1;
}
break;
 
case IP_FILTER:
-   if(params[n] == 1){
+   if(params[n] == true){
num_ipaddress_filters = 
determine_num_obs(ipaddress_input, comma_delimiter);
required_hits+=1;
}
break;
 
case GEO_FILTER:
-   if(params[n] == 1){
+   if(params[n] == 

[MediaWiki-commits] [Gerrit] Load only lib and client settings for client - change (mediawiki...Wikibase)

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

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


Change subject: Load only lib and client settings for client
..

Load only lib and client settings for client

Change-Id: Ibec2cec1190fceafdbd32872ed85ca223b45d097
---
M client/includes/WikibaseClient.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 5b7ca2d..061ee73 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -235,7 +235,12 @@
 * @return WikibaseClient
 */
public static function newInstance() {
-   return new self( Settings::singleton(), defined( 
'MW_PHPUNIT_TEST' ) );
+   $settings = new SettingsArray( array_merge(
+   $GLOBALS['wgWBSettings'],
+   $GLOBALS['wgWBClientSettings']
+   ) );
+
+   return new self( $settings, defined( 'MW_PHPUNIT_TEST' ) );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibec2cec1190fceafdbd32872ed85ca223b45d097
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] Load only lib and repo settings for repo - change (mediawiki...Wikibase)

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

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


Change subject: Load only lib and repo settings for repo
..

Load only lib and repo settings for repo

Change-Id: I55988d3e9a65887512197b72c21f354fbd112349
---
M repo/includes/WikibaseRepo.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index e3245b6..5f2749d 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -106,7 +106,12 @@
 * @return WikibaseRepo
 */
public static function newInstance() {
-   return new self( Settings::singleton() );
+   $settings = new SettingsArray( array_merge(
+   $GLOBALS['wgWBSettings'],
+   $GLOBALS['wgWBRepoSettings']
+   ) );
+
+   return new self( $settings );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I55988d3e9a65887512197b72c21f354fbd112349
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
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] Moved class registration of WikibaseLib into dedicated file - change (mediawiki...Wikibase)

2013-04-21 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Moved class registration of WikibaseLib into dedicated file
..


Moved class registration of WikibaseLib into dedicated file

Change-Id: Id9e9d3f585e1b86160cbb133a410c035b46a13fe
---
A lib/WikibaseLib.classes.php
M lib/WikibaseLib.php
2 files changed, 165 insertions(+), 131 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
new file mode 100644
index 000..0d303f7
--- /dev/null
+++ b/lib/WikibaseLib.classes.php
@@ -0,0 +1,158 @@
+?php
+
+/**
+ * Class registration file for the WikibaseLib component.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw  jeroended...@gmail.com 
+ */
+return call_user_func( function() {
+
+   $classes = array(
+   // Autoloading
+   'Wikibase\LibHooks' = 'WikibaseLib.hooks.php',
+
+   // includes
+   'Wikibase\Arrayalizer' = 'includes/Arrayalizer.php',
+   'Wikibase\ByPropertyIdArray' = 
'includes/ByPropertyIdArray.php',
+   'Wikibase\ChangeNotifier' = 'includes/ChangeNotifier.php',
+   'Wikibase\ChangeNotificationJob' = 
'includes/ChangeNotificationJob.php',
+   'Wikibase\ChangesTable' = 'includes/ChangesTable.php',
+   'Wikibase\DiffOpValueFormatter' = 
'includes/DiffOpValueFormatter.php',
+   'Wikibase\DiffView' = 'includes/DiffView.php',
+   'Wikibase\Lib\GuidGenerator' = 'includes/GuidGenerator.php',
+   'Wikibase\Lib\V4GuidGenerator' = 'includes/GuidGenerator.php',
+   'Wikibase\Lib\EntityRetrievingDataTypeLookup' = 
'includes/EntityRetrievingDataTypeLookup.php',
+   'Wikibase\Lib\ClaimGuidGenerator' = 
'includes/GuidGenerator.php',
+   'Wikibase\HashableObjectStorage' = 
'includes/HashableObjectStorage.php',
+   'Wikibase\HashArray' = 'includes/HashArray.php',
+   'Wikibase\Lib\InMemoryDataTypeLookup' = 
'includes/InMemoryDataTypeLookup.php',
+   'Wikibase\LibRegistry' = 'includes/LibRegistry.php',
+   'Wikibase\Template' = 'includes/TemplateRegistry.php',
+   'Wikibase\TemplateRegistry' = 'includes/TemplateRegistry.php',
+   'Wikibase\MapHasher' = 'includes/MapHasher.php',
+   'Wikibase\MapValueHasher' = 'includes/MapValueHasher.php',
+   'Wikibase\ReferencedEntitiesFinder' = 
'includes/ReferencedEntitiesFinder.php',
+   'Wikibase\ObjectComparer' = 'includes/ObjectComparer.php',
+   'Wikibase\Lib\PropertyDataTypeLookup' = 
'includes/PropertyDataTypeLookup.php',
+   'Wikibase\Settings' = 'includes/Settings.php',
+   'Wikibase\SettingsArray' = 'includes/SettingsArray.php',
+   'Wikibase\Lib\SnakFormatter' = 'includes/SnakFormatter.php',
+   'Wikibase\Term' = 'includes/Term.php',
+   'Wikibase\Lib\TermsToClaimsTranslator' = 
'includes/TermsToClaimsTranslator.php',
+   'Wikibase\Lib\TypedValueFormatter' = 
'includes/TypedValueFormatter.php',
+   'Wikibase\Utils' = 'includes/Utils.php',
+   'Wikibase\WikibaseDiffOpFactory' = 
'includes/WikibaseDiffOpFactory.php',
+
+   // includes/changes
+   'Wikibase\Change' = 'includes/changes/Change.php',
+   'Wikibase\ChangeRow' = 'includes/changes/ChangeRow.php',
+   'Wikibase\DiffChange' = 'includes/changes/DiffChange.php',
+   'Wikibase\EntityChange' = 'includes/changes/EntityChange.php',
+   'Wikibase\ItemChange' = 'includes/changes/ItemChange.php',
+
+   'Wikibase\ClaimDiffer' = 'includes/ClaimDiffer.php',
+   'Wikibase\ClaimDifference' = 'includes/ClaimDifference.php',
+   'Wikibase\ClaimDifferenceVisualizer' = 
'includes/ClaimDifferenceVisualizer.php',
+
+
+   'Wikibase\EntityDiff' = 'includes/EntityDiff.php',
+   

[MediaWiki-commits] [Gerrit] Move HashArray from lib to DataModel, as it is directly need... - change (mediawiki...Wikibase)

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

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


Change subject: Move HashArray from lib to DataModel, as it is directly needed 
in DataModel and not in lib
..

Move HashArray from lib to DataModel, as it is directly needed in DataModel and 
not in lib

Change-Id: I120076057786f4fd0d73b95f312b557bbaa34c83
---
M DataModel/DataModel.classes.php
M DataModel/DataModel.mw.php
R DataModel/DataModel/HashArray.php
R DataModel/tests/phpunit/hasharray/HashArrayElement.php
R DataModel/tests/phpunit/hasharray/HashArrayTest.php
R DataModel/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php
R DataModel/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php
M lib/WikibaseLib.classes.php
M lib/WikibaseLib.hooks.php
9 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/DataModel/DataModel.classes.php b/DataModel/DataModel.classes.php
index 9cea709..a21c91a 100644
--- a/DataModel/DataModel.classes.php
+++ b/DataModel/DataModel.classes.php
@@ -53,6 +53,7 @@
'Wikibase\SnakRole' = 'DataModel/Snak/SnakRole.php',
'Wikibase\Snaks' = 'DataModel/Snak/Snaks.php',
 
+   'Wikibase\HashArray' = 'DataModel/HashArray.php',
'Wikibase\Reference' = 'DataModel/Reference.php',
'Wikibase\ReferenceObject' = 'DataModel/Reference.php', // 
Deprecated
'Wikibase\ReferenceList' = 'DataModel/ReferenceList.php',
diff --git a/DataModel/DataModel.mw.php b/DataModel/DataModel.mw.php
index 4ef636e..adf2494 100644
--- a/DataModel/DataModel.mw.php
+++ b/DataModel/DataModel.mw.php
@@ -48,6 +48,9 @@
$wgAutoloadClasses['Wikibase\Test\EntityTest'] = __DIR__ . 
'/tests/phpunit/Entity/EntityTest.php';
$wgAutoloadClasses['Wikibase\Test\TestItems'] = __DIR__  . 
'/tests/phpunit/Entity/TestItems.php';
$wgAutoloadClasses['Wikibase\Test\SnakObjectTest'] = __DIR__  . 
'/tests/phpunit/Snak/SnakObjectTest.php';
+
+   $wgAutoloadClasses['Wikibase\Test\HashArrayTest'] = __DIR__ . 
'/tests/phpunit/hasharray/HashArrayTest.php';
+   $wgAutoloadClasses['Wikibase\Test\HashArrayElement'] = __DIR__ . 
'/tests/phpunit/hasharray/HashArrayElement.php';
 }
 
 /**
@@ -84,6 +87,9 @@
'Reference',
 
'SiteLink',
+
+   'hasharray/HashArrayWithoutDuplicates',
+   'hasharray/HashArrayWithDuplicates',
);
 
foreach ( $testFiles as $file ) {
diff --git a/lib/includes/HashArray.php b/DataModel/DataModel/HashArray.php
similarity index 100%
rename from lib/includes/HashArray.php
rename to DataModel/DataModel/HashArray.php
diff --git a/lib/tests/phpunit/hasharray/HashArrayElement.php 
b/DataModel/tests/phpunit/hasharray/HashArrayElement.php
similarity index 100%
rename from lib/tests/phpunit/hasharray/HashArrayElement.php
rename to DataModel/tests/phpunit/hasharray/HashArrayElement.php
diff --git a/lib/tests/phpunit/hasharray/HashArrayTest.php 
b/DataModel/tests/phpunit/hasharray/HashArrayTest.php
similarity index 100%
rename from lib/tests/phpunit/hasharray/HashArrayTest.php
rename to DataModel/tests/phpunit/hasharray/HashArrayTest.php
diff --git a/lib/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php 
b/DataModel/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php
similarity index 100%
rename from lib/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php
rename to DataModel/tests/phpunit/hasharray/HashArrayWithDuplicatesTest.php
diff --git a/lib/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php 
b/DataModel/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php
similarity index 100%
rename from lib/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php
rename to DataModel/tests/phpunit/hasharray/HashArrayWithoutDuplicatesTest.php
diff --git a/lib/WikibaseLib.classes.php b/lib/WikibaseLib.classes.php
index 0d303f7..4cca7d8 100644
--- a/lib/WikibaseLib.classes.php
+++ b/lib/WikibaseLib.classes.php
@@ -45,7 +45,6 @@
'Wikibase\Lib\EntityRetrievingDataTypeLookup' = 
'includes/EntityRetrievingDataTypeLookup.php',
'Wikibase\Lib\ClaimGuidGenerator' = 
'includes/GuidGenerator.php',
'Wikibase\HashableObjectStorage' = 
'includes/HashableObjectStorage.php',
-   'Wikibase\HashArray' = 'includes/HashArray.php',
'Wikibase\Lib\InMemoryDataTypeLookup' = 
'includes/InMemoryDataTypeLookup.php',
'Wikibase\LibRegistry' = 'includes/LibRegistry.php',
'Wikibase\Template' = 'includes/TemplateRegistry.php',
@@ -133,9 +132,6 @@
 
// tests
'Wikibase\Test\SpecialPageTestBase' = 
'tests/phpunit/specials/SpecialPageTestBase.php',
-
-   'Wikibase\Test\HashArrayTest' = 
'tests/phpunit/hasharray/HashArrayTest.php',
-   

[MediaWiki-commits] [Gerrit] Fix mediawikiwiki URL in MOTD - change (mediawiki/vagrant)

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

Change subject: Fix mediawikiwiki URL in MOTD
..


Fix mediawikiwiki URL in MOTD

Requests to 'https://mediawiki.org' get redirected to the HTTP site. Changed to
'https://www.mediawiki.org'.

Change-Id: I5cc65a93ef4b12a4b71714f2d057d88cc56607be
---
M puppet/modules/misc/files/60-mediawiki-vagrant
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/puppet/modules/misc/files/60-mediawiki-vagrant 
b/puppet/modules/misc/files/60-mediawiki-vagrant
index 41fdd60..b2c4327 100755
--- a/puppet/modules/misc/files/60-mediawiki-vagrant
+++ b/puppet/modules/misc/files/60-mediawiki-vagrant
@@ -3,5 +3,5 @@
 printf  * MediaWiki is located at \033[33;1m/vagrant/mediawiki\033[0m.\n
 printf  * To interactively evaluate PHP and MediaWiki code, run 
'\033[33mphpsh\033[0m'.\n
 printf  * For a database shell, run '\033[33mmysql\033[0m'.\n
-printf  * For help, visit \033[34;4mhttps://mediawiki.org\033[0m or 
\033[33m#mediawiki\033[0m on chat.freenode.net.\n\n
+printf  * For help, visit \033[34;4mhttps://www.mediawiki.org\033[0m or 
\033[33m#mediawiki\033[0m on chat.freenode.net.\n\n
 /usr/bin/landscape-sysinfo --exclude-sysinfo-plugins=LandscapeLink

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5cc65a93ef4b12a4b71714f2d057d88cc56607be
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Jeremyb jer...@tuxmachine.com
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 config.h to repo - change (analytics/udp-filters)

2013-04-21 Thread Diederik (Code Review)
Diederik has uploaded a new change for review.

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


Change subject: Add config.h to repo
..

Add config.h to repo

Change-Id: I6edb4a2fdee753691849039d18dd88a0184610dd
---
A config.h
1 file changed, 137 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/udp-filters 
refs/changes/22/60222/1

diff --git a/config.h b/config.h
new file mode 100644
index 000..0ef4757
--- /dev/null
+++ b/config.h
@@ -0,0 +1,137 @@
+/* config.h.  Generated from config.h.in by configure.  */
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if you have the arpa/inet.h header file. */
+#define HAVE_ARPA_INET_H 1
+
+/* Define to 1 if you have the ctype.h header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the GeoIPCity.h header file. */
+#define HAVE_GEOIPCITY_H 1
+
+/* Define to 1 if you have the GeoIP.h header file. */
+#define HAVE_GEOIP_H 1
+
+/* Define to 1 if you have the getopt.h header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the inttypes.h header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the libcidr.h header file. */
+/* #undef HAVE_LIBCIDR_H */
+
+/* Define to 1 if you have the `geoip' library (-lgeoip). */
+#define HAVE_LIBGEOIP 1
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#define HAVE_MALLOC 1
+
+/* Define to 1 if you have the memory.h header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the `memset' function. */
+#define HAVE_MEMSET 1
+
+/* Define to 1 if you have the netdb.h header file. */
+#define HAVE_NETDB_H 1
+
+/* Define to 1 if you have the netinet/in.h header file. */
+#define HAVE_NETINET_IN_H 1
+
+/* Define to 1 if you have the `regcomp' function. */
+#define HAVE_REGCOMP 1
+
+/* Define to 1 if you have the regex.h header file. */
+#define HAVE_REGEX_H 1
+
+/* Define to 1 if you have the stddef.h header file. */
+#define HAVE_STDDEF_H 1
+
+/* Define to 1 if you have the stdint.h header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the stdio.h header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the stdlib.h header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the `strchr' function. */
+#define HAVE_STRCHR 1
+
+/* Define to 1 if you have the `strdup' function. */
+#define HAVE_STRDUP 1
+
+/* Define to 1 if you have the strings.h header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the string.h header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the `strstr' function. */
+#define HAVE_STRSTR 1
+
+/* Define to 1 if you have the sys/socket.h header file. */
+#define HAVE_SYS_SOCKET_H 1
+
+/* Define to 1 if you have the sys/stat.h header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the sys/types.h header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the unistd.h header file. */
+#define HAVE_UNISTD_H 1
+
+/* Name of package */
+#define PACKAGE udp-filters
+
+/* Define to the address where bug reports for this package should be sent. */
+#define PACKAGE_BUGREPORT dvanli...@wikimedia.org
+
+/* Define to the full name of this package. */
+#define PACKAGE_NAME udp-filters
+
+/* Define to the full name and version of this package. */
+#define PACKAGE_STRING udp-filters DEBIANIZE_REPLACES_THIS_VERSION
+
+/* Define to the one symbol short name of this package. */
+#define PACKAGE_TARNAME udp-filters
+
+/* Define to the home page for this package. */
+#define PACKAGE_URL 
+
+/* Define to the version of this package. */
+#define PACKAGE_VERSION DEBIANIZE_REPLACES_THIS_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Version number of package */
+#define VERSION DEBIANIZE_REPLACES_THIS_VERSION
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to rpl_malloc if the replacement function should be used. */
+/* #undef malloc */
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+   nothing if this is not supported.  Do not define if restrict is
+   supported directly.  */
+#define restrict __restrict
+/* Work around a bug in Sun C++: it does not support _Restrict or
+   __restrict__, even though the corresponding Sun C compiler ends up with
+   #define restrict _Restrict or #define restrict __restrict__ in the
+   previous line.  Perhaps some future version of Sun C++ will work with
+   restrict; if so, hopefully it defines __RESTRICT like Sun C does.  */
+#if defined __SUNPRO_CC  !defined __RESTRICT
+# define _Restrict
+# define __restrict__
+#endif
+
+/* Define to `unsigned int' if sys/types.h does not define. */
+/* #undef size_t */

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


[MediaWiki-commits] [Gerrit] Remove uls-select-content-language - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: Remove uls-select-content-language
..

Remove uls-select-content-language

Doesn't seem to be used.

Change-Id: I1ed94d165ccdc8d67278e8ad447322a5e637464e
---
M UniversalLanguageSelector.i18n.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/UniversalLanguageSelector.i18n.php 
b/UniversalLanguageSelector.i18n.php
index 28b057f..0c565d7 100644
--- a/UniversalLanguageSelector.i18n.php
+++ b/UniversalLanguageSelector.i18n.php
@@ -27,7 +27,6 @@
 $messages['en'] = array(
'UniversalLanguageSelector' = 'Universal Language Selector',
'uls-desc' = 'Gives the user several ways to select a language and to 
adjust language settings',
-   'uls-select-content-language' = 'Select language',
 );
 
 /** Message documentation (Message documentation)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ed94d165ccdc8d67278e8ad447322a5e637464e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
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] Sync 1.21 release notes from master - change (mediawiki/core)

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

Change subject: Sync 1.21 release notes from master
..


Sync 1.21 release notes from master

Change I5e6f7d48, which is not supposed to be backported to 1.21
(see Id442e6f) included unrelated changes to RELEASE-NOTES-1.21,
which are applied to REL1_21 in this patch.

Other release notes were apparently added in error and have been
deleted from master in I6a51e3ee, so they are deleted here.

Change-Id: Iea528109cf8a23d9da2bd370ce7e4e50fba4c6db
---
M RELEASE-NOTES-1.21
1 file changed, 2 insertions(+), 4 deletions(-)

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



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index dd53387..1930636 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -125,8 +125,6 @@
 === Bug fixes in 1.21 ===
 * (bug 42649) PHP Fatal error: Call to a member function isLocal() on a
   non-object in Title.php
-* (bug 46787) API: Fix rccontinue handling
-* (bug 46719) Remove link to Special:ActiveUsers from Special:Statistics
 * (bug 46493) Special:ProtectedPages results in whitepage when a bad title is 
protected
 * (bug 40617) Installer can now customize the logo in LocalSettings.php
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
@@ -320,7 +318,7 @@
   were using it, you have to either copy it to your extension, or install the
   Vector extension (and possibly disable its features using config settings if
   you don't want them).
-* Experimental IBM DB2 support was removed due to lack of interest and 
maintainership
+* Experimental IBM DB2 support was removed due to lack of interest and 
maintainership.
 * BREAKING CHANGE: Filenames of maintenance scripts were standardized into
   lowerCamelCase format, and made more explicit:
   - clear_stats.php - clearCacheStats.php
@@ -345,7 +343,7 @@
 ** The sets of characters escaped by default, along with the precise escape
sequences used, have changed (except for the Xml::escapeJsString()
function, which is now deprecated).
-* BREAKING CHANGE: The Services_JSON class has been removed; if necessary,
+* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
   be sure to upgrade affected extensions at the same time (e.g. Collection).
 
 == Compatibility ==

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iea528109cf8a23d9da2bd370ce7e4e50fba4c6db
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand pleasest...@live.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: MarkAHershberger mhershber...@wikimedia.org
Gerrit-Reviewer: PleaseStand pleasest...@live.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 parser method to call parser functions - change (mediawiki/core)

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

Change subject: Add parser method to call parser functions
..


Add parser method to call parser functions

There is currently no straightforward way for anything to call a parser
function and get the result. This abstracts out that portion of
braceSubstitution() to allow this.

The immediate motivation for this patch is to close bug 41769 against
Scribunto, see I0138836654b0e34c5c23daaedcdf5d4f9d1c7ab2.

Bug: 41769
Change-Id: I339b882010dedd714e7965e25ad650ed8b8cd48f
---
M includes/parser/Parser.php
M tests/phpunit/includes/parser/ParserMethodsTest.php
2 files changed, 145 insertions(+), 62 deletions(-)

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



diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 0b494c2..5ef0bc7 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -3242,70 +3242,22 @@
 
$colonPos = strpos( $part1, ':' );
if ( $colonPos !== false ) {
-   # Case sensitive functions
-   $function = substr( $part1, 0, $colonPos );
-   if ( isset( 
$this-mFunctionSynonyms[1][$function] ) ) {
-   $function = 
$this-mFunctionSynonyms[1][$function];
-   } else {
-   # Case insensitive functions
-   $function = $wgContLang-lc( $function 
);
-   if ( isset( 
$this-mFunctionSynonyms[0][$function] ) ) {
-   $function = 
$this-mFunctionSynonyms[0][$function];
-   } else {
-   $function = false;
-   }
+   $func = substr( $part1, 0, $colonPos );
+   $funcArgs = array( trim( substr( $part1, 
$colonPos + 1 ) ) );
+   for ( $i = 0; $i  $args-getLength(); $i++ ) {
+   $funcArgs[] = $args-item( $i );
}
-   if ( $function ) {
-   wfProfileIn( __METHOD__ . '-pfunc-' . 
$function );
-   list( $callback, $flags ) = 
$this-mFunctionHooks[$function];
-   $initialArgs = array( $this );
-   $funcArgs = array( trim( substr( 
$part1, $colonPos + 1 ) ) );
-   if ( $flags  SFH_OBJECT_ARGS ) {
-   # Add a frame parameter, and 
pass the arguments as an array
-   $allArgs = $initialArgs;
-   $allArgs[] = $frame;
-   for ( $i = 0; $i  
$args-getLength(); $i++ ) {
-   $funcArgs[] = 
$args-item( $i );
-   }
-   $allArgs[] = $funcArgs;
-   } else {
-   # Convert arguments to plain 
text
-   for ( $i = 0; $i  
$args-getLength(); $i++ ) {
-   $funcArgs[] = trim( 
$frame-expand( $args-item( $i ) ) );
-   }
-   $allArgs = array_merge( 
$initialArgs, $funcArgs );
-   }
-
-   # Workaround for PHP bug 35229 and 
similar
-   if ( !is_callable( $callback ) ) {
-   wfProfileOut( __METHOD__ . 
'-pfunc-' . $function );
-   wfProfileOut( __METHOD__ . 
'-pfunc' );
-   wfProfileOut( __METHOD__ );
-   throw new MWException( Tag 
hook for $function is not callable\n );
-   }
-   $result = call_user_func_array( 
$callback, $allArgs );
-   $found = true;
-   $noparse = true;
-   $preprocessFlags = 0;
-
-   if ( is_array( $result ) ) {
-   if ( isset( $result[0] ) ) {
-   $text = 

[MediaWiki-commits] [Gerrit] Initial version of Disambiguator extension - change (mediawiki...Disambiguator)

2013-04-21 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Initial version of Disambiguator extension
..


Initial version of Disambiguator extension

Enables the designation of disambiguation pages with the __DISAMBIG__
magic word. Also provides the following:
* Special Page listing all disambiguation pages
* Special Page listing all pages that link to disambiguation pages
* APIs for both of the above

Solves bug 6754 and bug 35981 and bug 44040

See https://www.mediawiki.org/wiki/Extension:Disambiguator

Change-Id: Idf9e37a576c7bb52c717f754bf09be5809391242
---
A Disambiguator.hooks.php
A Disambiguator.i18n.alias.php
A Disambiguator.i18n.magic.php
A Disambiguator.i18n.php
A Disambiguator.php
A specials/SpecialDisambiguationPageLinks.php
A specials/SpecialDisambiguationPages.php
7 files changed, 310 insertions(+), 0 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/Disambiguator.hooks.php b/Disambiguator.hooks.php
new file mode 100644
index 000..ea7fc20
--- /dev/null
+++ b/Disambiguator.hooks.php
@@ -0,0 +1,30 @@
+?php
+/**
+ * Hooks for Disambiguator extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+class DisambiguatorHooks {
+   /**
+* @param array $doubleUnderscoreIDs
+* @return bool
+*/
+   public static function onGetDoubleUnderscoreIDs( $doubleUnderscoreIDs 
) {
+   $doubleUnderscoreIDs[] = 'disambiguation';
+   return true;
+   }
+   
+   /**
+* Add the Disambiguator special pages to the list of QueryPages. This
+* allows direct access via the API.
+* @param array $queryPages
+* @return bool
+*/
+   public static function onwgQueryPages( $queryPages ) {
+   $queryPages[] = array( 'SpecialDisambiguationPages', 
'DisambiguationPages' );
+   $queryPages[] = array( 'SpecialDisambiguationPageLinks', 
'DisambiguationPageLinks' );
+   return true;
+   }
+}
diff --git a/Disambiguator.i18n.alias.php b/Disambiguator.i18n.alias.php
new file mode 100644
index 000..f27e250
--- /dev/null
+++ b/Disambiguator.i18n.alias.php
@@ -0,0 +1,14 @@
+?php
+/**
+ * Aliases for special pages of the Disambiguator extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$specialPageAliases = array();
+
+/** English (English) */
+$specialPageAliases['en'] = array(
+   'DisambiguationPageLinks' = array( 'DisambiguationPageLinks' ),
+);
diff --git a/Disambiguator.i18n.magic.php b/Disambiguator.i18n.magic.php
new file mode 100644
index 000..0b50339
--- /dev/null
+++ b/Disambiguator.i18n.magic.php
@@ -0,0 +1,14 @@
+?php
+/**
+ * Internationalisation file for magic words in the Disambiguator extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$magicWords = array();
+
+/** English (English) */
+$magicWords['en'] = array(
+   'disambiguation' = array( 1, '__DISAMBIG__' ),
+);
diff --git a/Disambiguator.i18n.php b/Disambiguator.i18n.php
new file mode 100644
index 000..35fd3ff
--- /dev/null
+++ b/Disambiguator.i18n.php
@@ -0,0 +1,34 @@
+?php
+/**
+ * Internationalisation file for the Disambiguator extension
+ *
+ * @file
+ * @ingroup Extensions
+ */
+
+$messages = array();
+
+/** English
+ */
+$messages['en'] = array(
+   'disambig-desc' = 'Adds the tag 
codenowiki__DISAMBIG__/nowiki/code to mark 
[[Special:DisambiguationPages|disambiguation pages]].',
+   # Special:DisambiguationPages
+   'disambiguationpages' = 'Disambiguation pages',
+   'disambiguationpages-summary' = The following is a list of all 
disambiguation pages on {{SITENAME}}.br /
+A page is treated as a disambiguation page if the page contains the tag 
codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias).,
+   # Special:DisambiguationPageLinks
+   'disambiguationpagelinks' = 'Pages linking to disambiguation pages',
+   'disambiguationpagelinks-summary'  = The following pages contain at 
least one link to a disambiguation page.
+They may need to link to a more appropriate page instead.br /
+A page is treated as a disambiguation page if the page contains the tag 
codenowiki__DISAMBIG__/nowiki/code (or an equivalent alias).,
+);
+
+/** Message documentation (Message documentation)
+ */
+$messages['qqq'] = array(
+   'disambig-desc' = '{{desc}}',
+   'disambiguationpages' = 'Title of the Special Page that shows all 
disambiguation pages',
+   'disambiguationpages-summary'  = 'Header text explaining the purpose 
of the Special:DisambiguationPages page. It is not necessary to translate 
nowiki__DISAMBIG__/nowiki.',
+   'disambiguationpagelinks' = 'Title of the Special Page that shows all 
pages with links needing disambiguation',
+   'disambiguationpagelinks-summary' = 'Header text explaining the 
purpose of the Special:DisambiguationPageLinks page. It is not necessary to 
translate nowiki__DISAMBIG__/nowiki.',
+);
diff 

[MediaWiki-commits] [Gerrit] Add manage-nfs-volumes-daemon - change (operations/puppet)

2013-04-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Add manage-nfs-volumes-daemon
..


Add manage-nfs-volumes-daemon

This is the short-term future of labs storage.

Change-Id: Ied54fcd71ae20377d62beb21838b436fd2235212
---
A files/ldap/scripts/manage-nfs-volumes-daemon
A files/upstart/manage-nfs-volumes.conf
M manifests/ldap.pp
M manifests/openstack.pp
M manifests/site.pp
5 files changed, 364 insertions(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon 
b/files/ldap/scripts/manage-nfs-volumes-daemon
new file mode 100755
index 000..9bf4b8a
--- /dev/null
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -0,0 +1,331 @@
+#!/usr/bin/python
+
+#
+### THIS FILE IS MANAGED BY PUPPET
+### puppet:///files/ldap/scripts/manage-nfs-volumes
+#
+
+import datetime
+import ldapsupportlib
+from optparse import OptionParser
+import os
+import socket
+import subprocess
+import sys
+import time
+import traceback
+
+try:
+import ldap
+import ldap.modlist
+except ImportError:
+sys.stderr.write(Unable to import LDAP library.\n)
+
+NONE = 0
+INFO = 10
+DEBUG = 20
+
+
+class VolumeManager:
+def __init__(self):
+# Turn on for testing
+self.dry_run = True
+
+# TODO: Pull this info from a configuration file
+self.base_dir = '/srv/'
+self.base_snapshot_dir = '/time/'
+self.base_export_volume_dir = '/exp/'
+self.export_snapshot_dir = '.snapshot'
+self.base_exports_dir = '/etc/exports.d/'
+# Volumes in projects listed as global; so: { 'dumps': ['xml'] } would 
be
+# an xml share in the dumps project being listed as global.
+self.global_shares = {'publicdata': ['project']}
+# Volumes which need to have hosts manually added to the export list; 
so, { 'dumps':
+# { 'project': ['10.0.0.1'] } } would manually add 10.0.0.1 to the 
dumps-project access list
+self.manual_shares = {'publicdata': {'project': ['208.80.154.11']}}
+self.volume_names = ['home', 'project']
+self.loglevel = INFO
+self.logfile = None
+
+def run(self):
+parser = OptionParser(conflict_handler=resolve)
+parser.set_usage('manage-volumes [options]')
+
+self.ldapSupportLib = ldapsupportlib.LDAPSupportLib()
+self.ldapSupportLib.addParserOptions(parser)
+
+parser.add_option(--logfile, dest=logfile, help=Write output to 
the specified log file. (default: stdin))
+parser.add_option(--loglevel, dest=loglevel, help=Change level of 
logging; NONE, INFO, DEBUG (default: INFO))
+(options, args) = parser.parse_args()
+self.ldapSupportLib.setBindInfoByOptions(options, parser)
+
+if options.logfile:
+self.logfile = options.logfile
+if options.loglevel:
+self.loglevel = options.loglevel
+
+while True:
+self.refresh_volumes()
+time.sleep(180)
+
+# Updates a member var:
+#
+# self.project_volumes:  A dict of existing volumes of the form
+# project_volumes[project_name][timestamp|present'] =
+#   array of volnames
+def update_volume_info(self):
+self.project_volumes = {}
+project_dirs = os.listdir(self.base_dir)
+for project_name in project_dirs:
+project_path = os.path.join(self.base_dir, project_name)
+if not os.path.isdir(project_path):
+continue
+
+self.project_volumes[project_name] = {}
+self.project_volumes[project_name][present] = 
os.listdir(project_path)
+
+snap_dirs = os.listdir(self.base_snapshot_dir)
+for snap_time in snap_dirs:
+snap_path = os.path.join(self.base_snapshot_dir, snap_time)
+if not os.path.isdir(snap_path):
+continue
+
+project_snap_dirs = os.listdir(snap_path)
+for project_name in project_snap_dirs:
+project_snap_path = os.path.join(snap_path, project_name)
+if not os.path.isdir(project_snap_path):
+continue
+
+if project_name not in self.project_volumes:
+self.project_volumes[project_name] = {}
+self.project_volumes[project_name][snap_time] = 
os.listdir(project_snap_path)
+
+def refresh_volumes(self):
+base = self.ldapSupportLib.getBase()
+ds = self.ldapSupportLib.connect()
+projectdata = self.search_s(ds, ou=projects, + base, 
ldap.SCOPE_ONELEVEL, (objectclass=groupofnames))
+self.groupdata = self.search_s(ds, ou=groups, + base, 
ldap.SCOPE_ONELEVEL, (objectclass=groupofnames))

[MediaWiki-commits] [Gerrit] Minor bugfix to manage-nfs-volumes upstart script - change (operations/puppet)

2013-04-21 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Minor bugfix to manage-nfs-volumes upstart script
..

Minor bugfix to manage-nfs-volumes upstart script

* use proper home for log file

Change-Id: I897631504743c27991fad0092a92d98f0e051fec
---
M files/upstart/manage-nfs-volumes.conf
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/24/60224/1

diff --git a/files/upstart/manage-nfs-volumes.conf 
b/files/upstart/manage-nfs-volumes.conf
index 323fe48..b32f741 100644
--- a/files/upstart/manage-nfs-volumes.conf
+++ b/files/upstart/manage-nfs-volumes.conf
@@ -5,4 +5,4 @@
 respawn
 respawn limit 10 5
 
-exec su -c /usr/bin/python /usr/local/sbin/manage-nfs-volumes-daemon 
--logfile=/var/lib/glustermanager/manage-nfs-volumes.log nfsmanager
+exec su -c /usr/bin/python /usr/local/sbin/manage-nfs-volumes-daemon 
--logfile=/var/lib/nfsmanager/manage-nfs-volumes.log nfsmanager

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I897631504743c27991fad0092a92d98f0e051fec
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Include cluster name in JobQueueDB cache keys. - change (mediawiki/core)

2013-04-21 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Include cluster name in JobQueueDB cache keys.
..

Include cluster name in JobQueueDB cache keys.

* This makes it work properly with JobQueueFederated.

Change-Id: I0309dee7e97fa3813dfa5f1ae1eb1fcbca14b829
---
M includes/job/JobQueueDB.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/60225/1

diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php
index e8e0385..bd952e0 100644
--- a/includes/job/JobQueueDB.php
+++ b/includes/job/JobQueueDB.php
@@ -689,7 +689,8 @@
 */
private function getCacheKey( $property ) {
list( $db, $prefix ) = wfSplitWikiID( $this-wiki );
-   return wfForeignMemcKey( $db, $prefix, 'jobqueue', $this-type, 
$property );
+   $cluster = $this-cluster ?: 'main';
+   return wfForeignMemcKey( $db, $prefix, 'jobqueue', $cluster, 
$this-type, $property );
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Minor bugfix to manage-nfs-volumes upstart script - change (operations/puppet)

2013-04-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Minor bugfix to manage-nfs-volumes upstart script
..


Minor bugfix to manage-nfs-volumes upstart script

* use proper home for log file

Change-Id: I897631504743c27991fad0092a92d98f0e051fec
---
M files/upstart/manage-nfs-volumes.conf
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Andrew Bogott: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/files/upstart/manage-nfs-volumes.conf 
b/files/upstart/manage-nfs-volumes.conf
index 323fe48..b32f741 100644
--- a/files/upstart/manage-nfs-volumes.conf
+++ b/files/upstart/manage-nfs-volumes.conf
@@ -5,4 +5,4 @@
 respawn
 respawn limit 10 5
 
-exec su -c /usr/bin/python /usr/local/sbin/manage-nfs-volumes-daemon 
--logfile=/var/lib/glustermanager/manage-nfs-volumes.log nfsmanager
+exec su -c /usr/bin/python /usr/local/sbin/manage-nfs-volumes-daemon 
--logfile=/var/lib/nfsmanager/manage-nfs-volumes.log nfsmanager

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I897631504743c27991fad0092a92d98f0e051fec
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren mpellet...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@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] Break up our 'sudo' commands into separate args. - change (operations/puppet)

2013-04-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Break up our 'sudo' commands into separate args.
..

Break up our 'sudo' commands into separate args.

This makes 'sudo' happier.

Change-Id: Iaead542d633eda99d94d43facb02a25fc857d549
---
M files/ldap/scripts/manage-nfs-volumes-daemon
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/26/60226/1

diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon 
b/files/ldap/scripts/manage-nfs-volumes-daemon
index 9bf4b8a..e75b136 100755
--- a/files/ldap/scripts/manage-nfs-volumes-daemon
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -234,8 +234,8 @@
 
 # We need to clean up from partially-failed runs.  rmdir is pretty 
conservative; it will
 #  only clean up empty dirs.
-cmds1 = ['sudo', 'rmdir %s' % voldir]
-cmds2 = ['sudo', 'mkdir -p %s' % voldir]
+cmds1 = ['sudo', 'rmdir', voldir]
+cmds2 = ['sudo', 'mkdir', '-p', voldir]
 
 if self.dry_run:
 print Exec %s % cmds1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaead542d633eda99d94d43facb02a25fc857d549
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Break up our 'sudo' commands into separate args. - change (operations/puppet)

2013-04-21 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Break up our 'sudo' commands into separate args.
..


Break up our 'sudo' commands into separate args.

This makes 'sudo' happier.

Change-Id: Iaead542d633eda99d94d43facb02a25fc857d549
---
M files/ldap/scripts/manage-nfs-volumes-daemon
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon 
b/files/ldap/scripts/manage-nfs-volumes-daemon
index 9bf4b8a..e75b136 100755
--- a/files/ldap/scripts/manage-nfs-volumes-daemon
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -234,8 +234,8 @@
 
 # We need to clean up from partially-failed runs.  rmdir is pretty 
conservative; it will
 #  only clean up empty dirs.
-cmds1 = ['sudo', 'rmdir %s' % voldir]
-cmds2 = ['sudo', 'mkdir -p %s' % voldir]
+cmds1 = ['sudo', 'rmdir', voldir]
+cmds2 = ['sudo', 'mkdir', '-p', voldir]
 
 if self.dry_run:
 print Exec %s % cmds1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaead542d633eda99d94d43facb02a25fc857d549
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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] Improve use of index for fetching most recent feedback activ... - change (mediawiki...ArticleFeedbackv5)

2013-04-21 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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


Change subject: Improve use of index for fetching most recent feedback activity 
from logging table
..

Improve use of index for fetching most recent feedback activity from logging 
table

Previous code (on current enwiki.logging)
+--+-+-+--+---+---+-+---+-+--+
| id   | select_type | table   | type | possible_keys | key   | key_len | 
ref   | rows| Extra|
+--+-+-+--+---+---+-+---+-+--+
|1 | SIMPLE  | logging | ref  | page_time | page_time | 4   | 
const | 1330612 | Using where; Using temporary; Using filesort |
+--+-+-+--+---+---+-+---+-+--+

This patch (on current enwiki.logging)
+--+-+-+---+---+---+-+--+--+-+
| id   | select_type | table   | type  | possible_keys | key   | key_len | 
ref  | rows | Extra 
  |
+--+-+-+---+---+---+-+--+--+-+
|1 | SIMPLE  | logging | range | page_time | page_time | 261 | 
NULL |   76 | Using index condition; Using where; Using temporary; Using 
filesort |
+--+-+-+---+---+---+-+--+--+-+

Change-Id: Ib6755276a561a30bee1feadd9df5a8442b1ef6e8
---
M ArticleFeedbackv5.activity.php
1 file changed, 18 insertions(+), 9 deletions(-)


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

diff --git a/ArticleFeedbackv5.activity.php b/ArticleFeedbackv5.activity.php
index d872dc3..39cc937 100644
--- a/ArticleFeedbackv5.activity.php
+++ b/ArticleFeedbackv5.activity.php
@@ -380,6 +380,7 @@
 
$activity = array();
$where = array();
+   $titles = array();
 
// build where-clause for all feedback entries
foreach ( $entries as $entry ) {
@@ -418,6 +419,7 @@
$actions = self::buildWhereActions( array(), 
$actions );
if ( $actions ) {
$title = self::buildWhereFeedback( 
$feedback );
+   $titles[] = $title;
$where[] = 'log_title = 
'.$dbr-addQuotes( $title ).' AND '.$actions;
}
}
@@ -425,8 +427,23 @@
 
// if there are entries not found in cache, fetch them from DB
if ( $where ) {
+   $options = array();
+
+   // specific conditions to find the exact action we're 
looking for, per page
$where = array( '('.implode( ') OR (', $where ).')' );
+   $options['GROUP BY'] = array( 'log_namespace', 
'log_title' );
+
+   /*
+* Even though log_title is already in the above 
where-conditions (to find
+* specific actions per title), we'll add these again 
to target index
+* page_time (on _namespace, _title, _timestamp). This 
will result in very
+* few remaining columns (all logging data for maximum
+* ArticleFeedbackv5Model::LIST_LIMIT pages), which can 
then easily be
+* scanned using WHERE.
+*/
$where['log_namespace'] = NS_SPECIAL;
+   $where['log_title'] = $titles;
+   $options['USE INDEX'] = 'page_time';
 
/*
 * The goal is to fetch only the last (editor) action 
for every feedback
@@ -439,15 +456,7 @@
array( 'last_id' = 'MAX(log_id)' ),
$where,
__METHOD__,
-   array(
-   'GROUP BY' = array( 'log_namespace', 
'log_title' ),
-   // Force the page_time index (on 
_namespace, _title, _timestamp)
-   // We don't expect many if any rows for 
Special:ArticleFeedbackv5/foo that
-   

[MediaWiki-commits] [Gerrit] Remove an unwanted arg from a string format. - change (operations/puppet)

2013-04-21 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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


Change subject: Remove an unwanted arg from a string format.
..

Remove an unwanted arg from a string format.

This was just a copy/paste error.

Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
---
M files/ldap/scripts/manage-nfs-volumes-daemon
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/60228/1

diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon 
b/files/ldap/scripts/manage-nfs-volumes-daemon
index e75b136..5861232 100755
--- a/files/ldap/scripts/manage-nfs-volumes-daemon
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -215,7 +215,7 @@
 if * in hosts:
 # Add a special-case read-only line for this
 exportline = %s 
-ro,fsid=%s,subtree_check,async,no_root_squash *\n % (
-volpath, permissions, fsid)
+volpath, fsid)
 f.write(exportline)
 hosts.remove(*)
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Detect user rights conflicts from user_touched - change (mediawiki/core)

2013-04-21 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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


Change subject: Detect user rights conflicts from user_touched
..

Detect user rights conflicts from user_touched

User_touched gets updated by other things changing, but this is
unlikely to happen in the middle of a user rights change, so I don't
think it's worth storing extra data to detect only rights changes.

Bug: 38989
Change-Id: I75996605885c1b5300da8ad7b03c48560450a0c4
---
M includes/User.php
M includes/UserRightsProxy.php
M includes/specials/SpecialUserrights.php
M languages/messages/MessagesEn.php
M languages/messages/MessagesQqq.php
M maintenance/language/messages.inc
6 files changed, 38 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/60229/1

diff --git a/includes/User.php b/includes/User.php
index ed97deb..1e5fb04 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -1933,7 +1933,7 @@
 * user_touched field when we update things.
 * @return String Timestamp in TS_MW format
 */
-   private static function newTouchedTimestamp() {
+   public static function newTouchedTimestamp() {
global $wgClockSkewFudge;
return wfTimestamp( TS_MW, time() + $wgClockSkewFudge );
}
diff --git a/includes/UserRightsProxy.php b/includes/UserRightsProxy.php
index cd5dff8..cda014c 100644
--- a/includes/UserRightsProxy.php
+++ b/includes/UserRightsProxy.php
@@ -36,12 +36,13 @@
 * @param string $name user name
 * @param $id Integer: user ID
 */
-   private function __construct( $db, $database, $name, $id ) {
+   private function __construct( $db, $database, $name, $id, $touched ) {
$this-db = $db;
$this-database = $database;
$this-name = $name;
$this-id = intval( $id );
$this-newOptions = array();
+   $this-touched = $touched;
}
 
/**
@@ -116,13 +117,15 @@
$db = self::getDB( $database, $ignoreInvalidDB );
if( $db ) {
$row = $db-selectRow( 'user',
-   array( 'user_id', 'user_name' ),
+   array( 'user_id', 'user_name', 'user_touched' ),
array( $field = $value ),
__METHOD__ );
if( $row !== false ) {
return new UserRightsProxy( $db, $database,
$row-user_name,
-   intval( $row-user_id ) );
+   intval( $row-user_id ),
+   $row-user_touched
+   );
}
}
return null;
@@ -258,4 +261,8 @@
$key = wfForeignMemcKey( $this-database, false, 'user', 'id', 
$this-id );
$wgMemc-delete( $key );
}
+
+   function getTouched() {
+   return $this-touched;
+   }
 }
diff --git a/includes/specials/SpecialUserrights.php 
b/includes/specials/SpecialUserrights.php
index 7501371..d1ca166 100644
--- a/includes/specials/SpecialUserrights.php
+++ b/includes/specials/SpecialUserrights.php
@@ -127,19 +127,29 @@
$this-switchForm();
}
 
-   if( $request-wasPosted() ) {
+   if ( $request-wasPosted() ) {
// save settings
-   if( $request-getCheck( 'saveusergroups' ) ) {
-   $reason = $request-getVal( 'user-reason' );
-   $tok = $request-getVal( 'wpEditToken' );
-   if( $user-matchEditToken( $tok, $this-mTarget 
) ) {
-   $this-saveUserGroups(
-   $this-mTarget,
-   $reason
-   );
+   if ( $request-getCheck( 'saveusergroups' ) ) {
+   if ( $user-matchEditToken( $request-getVal( 
'wpEditToken' ), $this-mTarget ) ) {
+   $status = $this-fetchUser( 
$this-mTarget );
+   if ( !$status-isOK() ) {
+   
$this-getOutput()-addWikiText( $status-getWikiText() );
+   return;
+   } else {
+   $targetUser = $status-value;
+   }
+   if ( $targetUser-getTouched()  
$request-getVal( 'formLoadTimestamp' ) ) {
+   

[MediaWiki-commits] [Gerrit] Turn off dry_run, and fix a few small errors. - change (operations/puppet)

2013-04-21 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Turn off dry_run, and fix a few small errors.
..


Turn off dry_run, and fix a few small errors.

- Don't complain about a missing volume if we aren't
  going to use it anyway.
- Fix a copy/paste error that broke global volumes.

This was just a copy/paste error.

Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
---
M files/ldap/scripts/manage-nfs-volumes-daemon
1 file changed, 4 insertions(+), 3 deletions(-)

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



diff --git a/files/ldap/scripts/manage-nfs-volumes-daemon 
b/files/ldap/scripts/manage-nfs-volumes-daemon
index e75b136..c385894 100755
--- a/files/ldap/scripts/manage-nfs-volumes-daemon
+++ b/files/ldap/scripts/manage-nfs-volumes-daemon
@@ -29,7 +29,7 @@
 class VolumeManager:
 def __init__(self):
 # Turn on for testing
-self.dry_run = True
+self.dry_run = False
 
 # TODO: Pull this info from a configuration file
 self.base_dir = '/srv/'
@@ -183,7 +183,8 @@
 
 def update_exports(self, project_name, volume_name, hosts):
 if project_name not in self.project_volumes:
-self.log(Unable to set exports for %s, %s because we can't find 
it. % (project_name, volume_name))
+if hosts:
+self.log(Unable to set exports for %s, %s because we can't 
find it. % (project_name, volume_name))
 return False
 
 if self.dry_run:
@@ -215,7 +216,7 @@
 if * in hosts:
 # Add a special-case read-only line for this
 exportline = %s 
-ro,fsid=%s,subtree_check,async,no_root_squash *\n % (
-volpath, permissions, fsid)
+volpath, fsid)
 f.write(exportline)
 hosts.remove(*)
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7ec4c3a4dd0908270f5b0ab3020c2d56d4fce012
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: coren mpellet...@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 release notes - change (mediawiki/core)

2013-04-21 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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


Change subject: update release notes
..

update release notes

Change-Id: I6822307a25996654ee88d5185ef0ae0b2df38aea
---
M RELEASE-NOTES-1.21
1 file changed, 8 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/30/60230/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 387f89a..b8e8cba 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -123,10 +123,15 @@
   quotmarks, order and whitespace in the attribute list).
 
 === Bug fixes in 1.21 ===
+* (bug 41769) Add parser method to call parser functions.
+* (bug 46575) mw.loader: Guard against odd setTimeout behaviour in old Firefox.
+* (bug 46084) Sanitize $limitReport before outputting.
+* (bug 46859) Disable external entities in XMLReader.
+* (bug 47251) Disable external entities in Import.
 * (bug 42649) PHP Fatal error: Call to a member function isLocal() on a
-  non-object in Title.php
-* (bug 46493) Special:ProtectedPages results in whitepage when a bad title is 
protected
-* (bug 40617) Installer can now customize the logo in LocalSettings.php
+  non-object in Title.php.
+* (bug 46493) Special:ProtectedPages results in whitepage when a bad title is 
protected.
+* (bug 40617) Installer can now customize the logo in LocalSettings.php.
 * (bug 40353) SpecialDoubleRedirect should support interwiki redirects.
 * (bug 40352) fixDoubleRedirects.php should support interwiki redirects.
 * (bug 9237) SpecialBrokenRedirect should not list interwiki redirects.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6822307a25996654ee88d5185ef0ae0b2df38aea
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger mhershber...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove $wgMemCachedInstanceSize - change (operations/mediawiki-config)

2013-04-21 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Remove $wgMemCachedInstanceSize
..

Remove $wgMemCachedInstanceSize

Non existent global

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


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

diff --git a/wmf-config/mc-labs.php b/wmf-config/mc-labs.php
index 34116a2..bab2693 100644
--- a/wmf-config/mc-labs.php
+++ b/wmf-config/mc-labs.php
@@ -18,8 +18,6 @@
 $wgMemCachedTimeout = 50; # micro seconds
 $wgSessionsInMemcached = true;
 
-$wgMemCachedInstanceSize = 2000;
-
 $wgMemCachedServers = array(
0 = '10.4.0.166:11211',  # apache32
1 = '10.4.0.187:11211',  # apache33

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia7eb7ad9595de53e551a7b58c5cc6e433d851c80
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] Swap port from 110000 to 11211 in $wgMemCachedServers - change (mediawiki/core)

2013-04-21 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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


Change subject: Swap port from 11 to 11211 in $wgMemCachedServers
..

Swap port from 11 to 11211 in $wgMemCachedServers

http://linux.die.net/man/1/memcached

...the default is port 11211.

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/60232/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index ff299fc..da2f321 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1873,7 +1873,7 @@
 $wgMemCachedDebug = false;
 
 /** The list of MemCached servers and port numbers */
-$wgMemCachedServers = array( '127.0.0.1:11000' );
+$wgMemCachedServers = array( '127.0.0.1:11211' );
 
 /**
  * Use persistent connections to MemCached, which are shared across multiple

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I923a1b3208c2ea1f29657cc51e813c547154eb32
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] (Bug 47482) Update redis in bulk onTransactionIdle - change (mediawiki...GettingStarted)

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

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


Change subject: (Bug 47482) Update redis in bulk onTransactionIdle
..

(Bug 47482) Update redis in bulk onTransactionIdle

Change I00107ffc9 in mediawiki/core makes WikiPage::updateCategoryCounts defer
work to a callback function which executes at the end of the current
transaction, if one is open. This means that LinksUpdateComplete is no longer
guaranteed to run after all updates have, in fact, completed, and that
consequently we can no longer rely on it for batch-processing all pending
updates.

This change uses a different mechanism to defer batch processing of redis
updates: it registers a callback using Database-onTransactionIdle.

IMHO the change to when LinksUpdateComplete fires amounts to a bug in core.
I'll file a bug, but I'd rather we not wait for it to be fixed to resolve this
particular issue.

Change-Id: Ib073661c267cbabbe2ab2245224afd12b8784fca
---
M GettingStarted.php
M RedisCategorySync.php
2 files changed, 36 insertions(+), 23 deletions(-)


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

diff --git a/GettingStarted.php b/GettingStarted.php
index d8a5308..45f9bf1 100644
--- a/GettingStarted.php
+++ b/GettingStarted.php
@@ -164,7 +164,6 @@
 $wgHooks[ 'RecentChange_save' ][] = 'GettingStartedHooks::onRecentChange_save';
 $wgHooks[ 'CategoryAfterPageAdded' ][] = 
'RedisCategorySync::onCategoryAfterPageAdded';
 $wgHooks[ 'CategoryAfterPageRemoved' ][] = 
'RedisCategorySync::onCategoryAfterPageRemoved';
-$wgHooks[ 'LinksUpdateComplete' ][] = 
'RedisCategorySync::onLinksUpdateComplete';
 $wgHooks[ 'ListDefinedTags' ][] = 'GettingStartedHooks::onListDefinedTags';
 $wgHooks[ 'MakeGlobalVariablesScript' ][] = 
'GettingStartedHooks::onMakeGlobalVariablesScript';
 $wgHooks[ 'BeforeCreateEchoEvent' ][] = 
'GettingStartedHooks::onBeforeCreateEchoEvent';
diff --git a/RedisCategorySync.php b/RedisCategorySync.php
index 18e2bc2..fdd2cf9 100644
--- a/RedisCategorySync.php
+++ b/RedisCategorySync.php
@@ -22,6 +22,10 @@
/** @var array: arrays of [Category, WikiPage] removals to process. **/
public static $removals = array();
 
+   /** @var bool: whether or not an update callback has been registered. 
**/
+   public static $callbackSet = false;
+
+
/**
 * Acquire a Redis connection.
 * @return Redis|bool Redis client or false.
@@ -87,6 +91,7 @@
public static function onCategoryAfterPageAdded( Category $category, 
WikiPage $page ) {
if ( self::isUpdateRelevant( $category, $page ) ) {
self::$additions[] = array( $category, $page );
+   self::setCallback();
}
return true;
}
@@ -98,39 +103,48 @@
public static function onCategoryAfterPageRemoved( Category $category, 
WikiPage $page ) {
if ( self::isUpdateRelevant( $category, $page ) ) {
self::$removals[] = array( $category, $page );
+   self::setCallback();
}
return true;
}
 
/**
-* @param LinksUpdate $linksUpdate
+* Register a callback function that will perform all redis updates once
+* the current transaction completes.
+* @return bool True if callback was set, false if it was set already.
 */
-   public static function onLinksUpdateComplete( $linksUpdate ) {
-   if ( !count( self::$additions )  !count( self::$removals ) ) {
-   return true;
+   public static function setCallback() {
+   if ( self::$callbackSet ) {
+   return false;
}
 
-   $conn = self::getClient();
-   if ( !$conn ) {
-   wfDebugLog( 'GettingStarted', Unable to acquire redis 
connection.\n );
-   return true;
-   }
+   $dbw = wfGetDB( DB_MASTER );
+   $dbw-onTransactionIdle( function () {
+   // Any category updates that happen after this will 
require an
+   // additional run of the callback.
+   RedisCategorySync::$callbackSet = false;
 
-   try {
-   $redis = $conn-multi( Redis::PIPELINE );
-   foreach( self::$additions as $addition ) {
-   list( $category, $page ) = $addition;
-   $redis-sAdd( self::makeCategoryKey( $category 
), $page-getId() );
+   $conn = RedisCategorySync::getClient();
+   if ( !$conn ) {
+   wfDebugLog( 'GettingStarted', Unable to 
acquire redis connection.\n );
+   return;
}
-  

[MediaWiki-commits] [Gerrit] Handle search engine returning status objects to the API - change (mediawiki/core)

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

Change subject: Handle search engine returning status objects to the API
..


Handle search engine returning status objects to the API

This is a followup to I54ab5207, which allowed search backends
to return status objects. We handled it in Special:Search, but
the API was overlooked.

Bug: 47353
Change-Id: Ib7abe8d5bc19d27c472053602c0e43cb1301b078
---
M includes/api/ApiQuerySearch.php
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index 8618339..ab78ba6 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -93,6 +93,8 @@
}
if ( is_null( $matches ) ) {
$this-dieUsage( {$what} search is disabled, 
search-{$what}-disabled );
+   } elseif( $matches instanceof Status  !$matches-isGood() ) {
+   $this-dieUsage( $matches-getWikiText(), 
'search-error' );
}
 
$apiResult = $this-getResult();
@@ -345,6 +347,7 @@
return array_merge( parent::getPossibleErrors(), array(
array( 'code' = 'search-text-disabled', 'info' = 
'text search is disabled' ),
array( 'code' = 'search-title-disabled', 'info' = 
'title search is disabled' ),
+   array( 'code' = 'search-error', 'info' = 'search 
error has occurred' ),
) );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib7abe8d5bc19d27c472053602c0e43cb1301b078
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Demon ch...@wikimedia.org
Gerrit-Reviewer: Ram r...@wikimedia.org
Gerrit-Reviewer: Tim Starling tstarl...@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: 43544: Improve error handling to not hide internal errors. - change (operations...lucene-search-2)

2013-04-21 Thread Tim Starling (Code Review)
Tim Starling has submitted this change and it was merged.

Change subject: Bug: 43544: Improve error handling to not hide internal errors.
..


Bug: 43544: Improve error handling to not hide internal errors.

Change error handling to set the error flag when invoking certain functions
such as searchPart() and highlight(); the log files currently show errors
from these functions. There are a couple more such as getFuzzy() and
similar() that may need analogous changes but we currently do not see any
issues from these in the log files, so they are deferred till later.

Bug: 43544
Change-Id: Ibeef63f45a3276e870afbcadbd08c7bd2967b9e6
---
M src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java
M src/org/wikimedia/lsearch/search/SearchEngine.java
2 files changed, 69 insertions(+), 23 deletions(-)

Approvals:
  Tim Starling: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java 
b/src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java
index 4c25489..9b2ed8a 100644
--- a/src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java
+++ b/src/org/wikimedia/lsearch/interoperability/RMIMessengerClient.java
@@ -184,7 +184,7 @@
}
}

-   public HighlightPack searchPart(IndexId iid, String searchterm, Query 
query, FilterWrapper filter, int offset, int limit, boolean explain, String 
host){
+   public HighlightPack searchPart(IndexId iid, String searchterm, Query 
query, FilterWrapper filter, int offset, int limit, boolean explain, String 
host) throws Exception {
try {
RMIMessenger r = messengerFromCache(host);
log.debug(Calling 
searchPart(+iid+,(+query+),+offset+,+limit+) on +host);
@@ -193,11 +193,9 @@
return res;
} catch (Exception e) {
recheckRemote(iid,host);
-   HighlightPack pack = new HighlightPack(new 
SearchResults());
-   pack.res.retry();   
log.warn(Error invoking 
searchPart(+iid+,(term=+searchterm+),(q=+query+),+offset+,+limit+) on 
+host+ : +e.getMessage(),e);
e.printStackTrace();
-   return pack;
+   throw e;
}
}

@@ -255,7 +253,8 @@
} catch(Exception e){
log.warn(Exception highligthing words=+words+ on 
host=+host, e);
recheckRemote(IndexId.get(dbrole).getHighlight(),host);
-   return new Highlight.ResultSet(new 
HashMapString,HighlightResult(),new HashSetString(),new 
HashSetString(),false,0,new HashSetString(),false);
+   //return new Highlight.ResultSet(new 
HashMapString,HighlightResult(),new HashSetString(),new 
HashSetString(),false,0,new HashSetString(),false);
+   return null;
}   
}

@@ -270,7 +269,7 @@
}
recheckRemote(dbrole,host);
SearchResults res = new SearchResults();
-   res.setErrorMsg(Error searching titles: 
+e.getMessage()); 
+   res.setErrorMsg(Error searching titles: 
+e.getMessage());
log.warn(Error invoking remote method searchTitles on 
host +host+ : +e.getMessage(),e);
return res;
}
diff --git a/src/org/wikimedia/lsearch/search/SearchEngine.java 
b/src/org/wikimedia/lsearch/search/SearchEngine.java
index e66645f..bf5e24c 100644
--- a/src/org/wikimedia/lsearch/search/SearchEngine.java
+++ b/src/org/wikimedia/lsearch/search/SearchEngine.java
@@ -19,7 +19,6 @@
 import org.apache.lucene.index.Term;
 import org.apache.lucene.index.TermDocs;
 import org.apache.lucene.index.TermEnum;
-import org.apache.lucene.queryParser.ParseException;
 import org.apache.lucene.search.ArticleNamespaceScaling;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.Searchable;
@@ -85,9 +84,16 @@
/** dbname - ns_index - ns_string */
protected static HashtableString,HashtableInteger,String 
dbNamespaceNames = new HashtableString,HashtableInteger,String();

+   /** non-existent host name */
+   protected String nullHost;
+
public SearchEngine(){
if(config == null)
config = Configuration.open();
+
+   nullHost = config.getString( Search, nullHost,  );// 
non-existent host
+   log.info( nullHost =  + nullHost );
+
if(global == null){
global = GlobalConfiguration.getInstance();
maxlimit = global.getMaxSearchLimit();
@@ -682,15 +688,38 @@
  

[MediaWiki-commits] [Gerrit] update version number - change (mediawiki/core)

2013-04-21 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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


Change subject: update version number
..

update version number

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/60234/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 9d4a602..f5f46c4 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -63,7 +63,7 @@
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.21.0rc3';
+$wgVersion = '1.21.0rc4';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6558f21bef512f7de456fd9edaf6860bcd12315
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger mhershber...@wikimedia.org

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