[MediaWiki-commits] [Gerrit] * solve sub-optimal messages to user (indicate needed admin ... - change (pywikibot/compat)

2013-08-20 Thread DrTrigon (Code Review)
DrTrigon has uploaded a new change for review.

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


Change subject: * solve sub-optimal messages to user (indicate needed admin 
rights) * add missing ubuntu package names * message improved in case if NO was 
chosen
..

* solve sub-optimal messages to user (indicate needed admin rights)
* add missing ubuntu package names
* message improved in case if NO was chosen

Change-Id: Ibe5e42e6c7cf5450ac527dd0fec681d93ced649e
---
M externals/__init__.py
1 file changed, 15 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/77/79977/1

diff --git a/externals/__init__.py b/externals/__init__.py
index e7db1c4..d3f57da 100644
--- a/externals/__init__.py
+++ b/externals/__init__.py
@@ -55,12 +55,12 @@
 # spelling 
http://svn.wikimedia.org/svnroot/pywikipedia/trunk/spelling/
 #   $ git submodule add 
https://gerrit.wikimedia.org/r/p/pywikibot/spelling.git externals/spelling
'BeautifulSoup.py': ({'linux-fedora': ['python-BeautifulSoup'],
- 'linux-ubuntu': ['']},
+ 'linux-ubuntu': ['python-beautifulsoup']},
 {  'url': 
'https://pypi.python.org/packages/source/B/BeautifulSoup/BeautifulSoup-3.2.0.tar.gz',
   'path': 'BeautifulSoup-3.2.0/BeautifulSoup.py'},
 {}),   # OK
  'irclib': ({'linux-fedora': ['python-irclib'],
- 'linux-ubuntu': ['']},
+ 'linux-ubuntu': ['python-irclib']},
 {}, # http://python-irclib.sourceforge.net/
 {}),   # OK
'mwparserfromhell': ({},
@@ -197,13 +197,14 @@
 return (%s-%s % (platform.system(), platform.dist()[0])).lower()
 
 
-def show_question(which_files):
+def show_question(which_files, admin=True):
 lowlevel_warning(Required package missing: %s % which_files)
 lowlevel_warning(A required package is missing, but externals can
-  automatically install it.
-  If you say Yes, externals will need administrator
-  privileges, and you might be asked for the 
administrator
-  password.)
+  automatically install it.)
+if admin:
+lowlevel_warning(If you say Yes, externals will need administrator
+  privileges, and you might be asked for the
+  administrator password.)
 lowlevel_warning(Give externals permission to try to install package?
   (y/N))
 v = raw_input().upper()
@@ -306,7 +307,7 @@
 
 
 def download_install(package, module, path):
-if package and show_question(module):
+if package and show_question(module, admin=False):
 lowlevel_warning(u'Download package %s from %s'
  % (module, package['url']))
 import mimetypes
@@ -391,13 +392,19 @@
 lowlevel_warning(u'Trying to install by use of %s package management 
system:' % dist)
 if (func in globals()) and globals()[func](modules_needed[m][0]):
 return
+else:
+lowlevel_warning(u'No suitable package could be installed or found!')
 lowlevel_warning(u'Trying to install by download from source URL:')
 if download_install(modules_needed[m][1], m, path):
 return
+else:
+lowlevel_warning(u'No suitable package could be installed or found!')
 lowlevel_warning(u'Trying to install by use of mercurial:')
 if (len(modules_needed[m])  2) and\
mercurial_repo_install(modules_needed[m][2], m, path):
 return
+else:
+lowlevel_warning(u'No suitable package could be installed or found!')
 
 lowlevel_warning(u'Package %s could not be found nor installed!' % m)
 lowlevel_warning(u'Several scripts might fail, if some modules are not'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibe5e42e6c7cf5450ac527dd0fec681d93ced649e
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch

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


[MediaWiki-commits] [Gerrit] add - RegexConverter for url mapping. - change (analytics/user-metrics)

2013-08-20 Thread Rfaulk (Code Review)
Rfaulk has uploaded a new change for review.

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


Change subject: add - RegexConverter for url mapping.
..

add - RegexConverter for url mapping.

Change-Id: I9077957f1050aea7011e2c9c8ad012deb540634c
---
M user_metrics/api/views.py
1 file changed, 9 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/user-metrics 
refs/changes/78/79978/1

diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py
index 9534a7e..32b581b 100644
--- a/user_metrics/api/views.py
+++ b/user_metrics/api/views.py
@@ -542,6 +542,15 @@
 }
 
 # Dict stores routing paths for each view
+
+from werkzeug.routing import BaseConverter
+class RegexConverter(BaseConverter):
+def __init__(self, url_map, *items):
+super(RegexConverter, self).__init__(url_map)
+self.regex = items[0]
+
+app.url_map.converters['regex'] = RegexConverter
+
 route_deco = {
 api_root.__name__: app.route('/'),
 all_urls.__name__: app.route('/all_requests'),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9077957f1050aea7011e2c9c8ad012deb540634c
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] add - RegexConverter for url mapping. - change (analytics/user-metrics)

2013-08-20 Thread Rfaulk (Code Review)
Rfaulk has submitted this change and it was merged.

Change subject: add - RegexConverter for url mapping.
..


add - RegexConverter for url mapping.

Change-Id: I9077957f1050aea7011e2c9c8ad012deb540634c
---
M user_metrics/api/views.py
1 file changed, 9 insertions(+), 0 deletions(-)

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



diff --git a/user_metrics/api/views.py b/user_metrics/api/views.py
index 9534a7e..32b581b 100644
--- a/user_metrics/api/views.py
+++ b/user_metrics/api/views.py
@@ -542,6 +542,15 @@
 }
 
 # Dict stores routing paths for each view
+
+from werkzeug.routing import BaseConverter
+class RegexConverter(BaseConverter):
+def __init__(self, url_map, *items):
+super(RegexConverter, self).__init__(url_map)
+self.regex = items[0]
+
+app.url_map.converters['regex'] = RegexConverter
+
 route_deco = {
 api_root.__name__: app.route('/'),
 all_urls.__name__: app.route('/all_requests'),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9077957f1050aea7011e2c9c8ad012deb540634c
Gerrit-PatchSet: 1
Gerrit-Project: analytics/user-metrics
Gerrit-Branch: master
Gerrit-Owner: Rfaulk rfaulk...@wikimedia.org
Gerrit-Reviewer: Rfaulk rfaulk...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix super long line - change (mediawiki/core)

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

Change subject: Fix super long line
..


Fix super long line

Change-Id: Ib76a2b6209137bcf18db9b756fa7406547611129
---
M includes/Wiki.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/includes/Wiki.php b/includes/Wiki.php
index 998ec41..55805ba 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -307,7 +307,8 @@
$output-redirect( $article );
} else {
wfProfileOut( __METHOD__ );
-   throw new MWException( Shouldn't happen: 
MediaWiki::initializeArticle() returned neither an object nor a URL );
+   throw new MWException( Shouldn't happen: 
MediaWiki::initializeArticle()
+   .  returned neither an object nor a 
URL );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib76a2b6209137bcf18db9b756fa7406547611129
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove CT from icinga paging - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: Remove CT from icinga paging
..

Remove CT from icinga paging

Change-Id: I235c39c1727b04ac4661034b222d6b189e7df69f
---
M files/icinga/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/79979/1

diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg
index 5b0fd95..8668965 100644
--- a/files/icinga/contactgroups.cfg
+++ b/files/icinga/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
contactgroup_name   sms
-   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
+   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
 }
 
  define contactgroup {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I235c39c1727b04ac4661034b222d6b189e7df69f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove CT from icinga paging - change (operations/puppet)

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

Change subject: Remove CT from icinga paging
..


Remove CT from icinga paging

Change-Id: I235c39c1727b04ac4661034b222d6b189e7df69f
---
M files/icinga/contactgroups.cfg
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/files/icinga/contactgroups.cfg b/files/icinga/contactgroups.cfg
index 5b0fd95..8668965 100644
--- a/files/icinga/contactgroups.cfg
+++ b/files/icinga/contactgroups.cfg
@@ -6,7 +6,7 @@
 
 define contactgroup {
contactgroup_name   sms
-   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,ctwoo,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
+   members 
akosiaris,afeldman,atglenn,bblack,cmjohnson,dzahn,faidon,jgreen,ksnider,lcarr,mark,rlane,rkattouw,robh,tstarling
 }
 
  define contactgroup {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I235c39c1727b04ac4661034b222d6b189e7df69f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Consistency tweaks in preparation for adding extension to tr... - change (mediawiki...SectionDisqus)

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

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


Change subject: Consistency tweaks in preparation for adding extension to 
translatewiki.net
..

Consistency tweaks in preparation for adding extension to translatewiki.net

* Fix type of extension. It is not a special pahe
* Fix extension name in qqq section
* Remove full stop at end of description message

Change-Id: Iaab4609a9210c4ad4d95ec1c0a72c7ab7d37d06e
---
M SectionDisqus.i18n.php
M SectionDisqus.php
2 files changed, 5 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SectionDisqus 
refs/changes/80/79980/1

diff --git a/SectionDisqus.i18n.php b/SectionDisqus.i18n.php
index 509e78f..9ec33a1 100644
--- a/SectionDisqus.i18n.php
+++ b/SectionDisqus.i18n.php
@@ -12,15 +12,15 @@
  * @author Luis Felipe Schenone
  */
 $messages['en'] = array(
-   'sectiondisqus-desc' = 'Adds a Discuss button next to the Edit 
button of every section, that when clicked, opens a Disqus lightbox for that 
section.',
+   'sectiondisqus-desc' = 'Adds a Discuss button next to the Edit 
button of every section, that when clicked, opens a Disqus lightbox for that 
section',
 );
 
 /** Message documentation (Message documentation)
+ * @author Luis Felipe Schenone
  * @author Raimond Spekking
- * @author Shirayuki
  */
 $messages['qqq'] = array(
-   'sectiondisqus-desc' = 
'{{desc|name=SectionDisqus|url=http://www.mediawiki.org/wiki/Extension:HoverGallery}}',
+   'sectiondisqus-desc' = 
'{{desc|name=SectionDisqus|url=https://www.mediawiki.org/wiki/Extension:SectionDisqus}}',
 );
 
 /** Spanish (espaƱol)
diff --git a/SectionDisqus.php b/SectionDisqus.php
index ff28796..a1261ce 100644
--- a/SectionDisqus.php
+++ b/SectionDisqus.php
@@ -10,14 +10,13 @@
  * @version 0.1
  */
 
-$wgExtensionCredits['specialpage'][] = array(
+$wgExtensionCredits['other'][] = array(
'path'   = __FILE__,
'name'   = 'SectionDisqus',
-   'description'= 'Adds a disqus button next to the edit button 
of every section, that when clicked, opens a Disqus dialog for that section.',
'descriptionmsg' = 'sectiondisqus-desc',
'version'= '0.1',
'author' = 'Luis Felipe Schenone',
-   'url'= 
'http://www.mediawiki.org/wiki/Extension:SectionDisqus'
+   'url'= 
'https://www.mediawiki.org/wiki/Extension:SectionDisqus'
 );
 
 $wgResourceModules['ext.SectionDisqus'] = array(

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

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

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


[MediaWiki-commits] [Gerrit] OmegaWiki Development CSV update - change (mediawiki...WikiLexicalData)

2013-08-20 Thread Kipcool (Code Review)
Kipcool has submitted this change and it was merged.

Change subject: OmegaWiki Development CSV update
..


OmegaWiki Development CSV update

Change-Id: If75c21948a47a15b783c32cfcca7e49b45845bfa
---
M includes/jobs/OWOwdListJob.php
M includes/specials/SpecialOWDownloads.php
2 files changed, 76 insertions(+), 12 deletions(-)

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



diff --git a/includes/jobs/OWOwdListJob.php b/includes/jobs/OWOwdListJob.php
index 59b7c56..2a4af32 100644
--- a/includes/jobs/OWOwdListJob.php
+++ b/includes/jobs/OWOwdListJob.php
@@ -60,7 +60,7 @@
// the greater the value of $sqlLimit the faster the download 
file is
// finished but the slower each web page loads while the job is 
being
// processed.
-   $sqlLimit = 100;
+   $sqlLimit = 125;
$ctrOver = $sqlLimit + 1;
 
$options['OFFSET'] = $start;
@@ -84,6 +84,7 @@
// create File name
$zippedAs = $type . _$code . .$format;
$synZippedAs = $type . '_syn_' . $code . .$format;
+   $iniZippedAs = $type . _$code . '.ini';
 
$zipName = $wgWldDownloadScriptPath . $type . _$code . 
_$format . .zip;
 
@@ -95,11 +96,16 @@
$tempFileName .= $format . _$type . _$code.tmp;
$tempSynFileName = $wgWldDownloadScriptPath;
$tempSynFileName .= $format . _$type . '_syn_' . $code.tmp;
+   $tempIniFileName = $wgWldDownloadScriptPath;
+   $tempIniFileName .= $iniZippedAs;
 
if ( $start == 1 ) {
$translations = array();
$fh = fopen ( $tempFileName, 'w' );
$fhsyn = fopen ( $tempSynFileName, 'w' );
+   $fhini = fopen ( $tempIniFileName, 'w' );
+   fwrite( $fhini, version:1.0\n );
+   fclose( $fhini );
} else {
$fh = fopen ( $tempFileName, 'a' );
$fhsyn = fopen ( $tempSynFileName, 'a' );
@@ -121,6 +127,7 @@
$this-Attributes = new Attributes;
foreach ( $expressions as $spelling ) {
$IPA = null;
+   $pinyin = null;
$hyphenation = null;
$example = null;
$usage = null;
@@ -130,9 +137,14 @@
$textAttributes = 
Attributes::getTextAttributes( $syntransId, array( 'languageId' = 
WLD_ENGLISH_LANG_ID ) );
foreach ( $textAttributes as 
$row ) {
$row['text'] = 
preg_replace( '/\n/', '\\n', $row['text'] );
-   $row['text'] = 
preg_replace( '/\t/', '\\t', $row['text'] );
+   // Convert tabs to space
+   $row['text'] = 
preg_replace( '/\t/', ' ', $row['text'] );
if ( 
$row['attribute_name'] == 'International Phonetic Alphabet') {
$IPA .= 
$row['text'] . ';';
+   $row = array( 
'text' = null, 'attribute_name' = null );
+   }
+   if ( 
$row['attribute_name'] == 'pinyin') {
+   $pinyin .= 
$row['text'] . ';';
$row = array( 
'text' = null, 'attribute_name' = null );
}
if ( 
$row['attribute_name'] == 'hyphenation') {
@@ -147,23 +159,29 @@
$usage .= 
$row['text'] . ';';
$row = array( 
'text' = null, 'attribute_name' = null );
}
-   //  if ( $row['text'] != 
null ) {
-   //  echo TEXT:  . 
$row['attribute_name'] .  = ;
-   //  echo 
$row['text'] . \n;
-   //  }
+   if ( $row['text'] != 
null ) {

[MediaWiki-commits] [Gerrit] Update jquery.ime from upstream - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Update jquery.ime from upstream
..


Update jquery.ime from upstream

Fixes bug 53041 (upstream patch by Matmarex)

Bug: 53041
Change-Id: I8653404833d83a6d798551a47e37d87e6c0c1eaf
---
M lib/jquery.ime/jquery.ime.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index ace47dc..d823850 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -856,7 +856,9 @@
} );
 
// Hide the menu when clicked outside
-   $( 'html' ).click( $.proxy( this.hide, this ) );
+   $( 'html' ).click( function () {
+   imeselector.hide();
+   } );
 
// ... but when clicked on window do not propagate it.
this.$menu.on( 'click', function ( event ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8653404833d83a6d798551a47e37d87e6c0c1eaf
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Santhosh santhosh.thottin...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] valueview experts have a clear definition of destroy now - change (mediawiki...DataValues)

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

Change subject: valueview experts have a clear definition of destroy now
..


valueview experts have a clear definition of destroy now

- documented destroy properly, removed related TODOs
- implemented missing destroy methods
- added tests for destroy to testExpert and improved some other existing tests

Change-Id: I634c67b27e30f3b8d3a3202f1908b9752aded7a3
---
M ValueView/resources/jquery.ui/jquery.ui.inputextender.js
M ValueView/resources/jquery.valueview/valueview.Expert.js
M 
ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js
M ValueView/resources/jquery.valueview/valueview.experts/experts.StringValue.js
M ValueView/resources/jquery.valueview/valueview.experts/experts.TimeInput.js
M ValueView/resources/jquery.valueview/valueview.valueview.js
M ValueView/tests/qunit/jquery.valueview/valueview.tests.testExpert.js
7 files changed, 117 insertions(+), 37 deletions(-)

Approvals:
  Henning Snater: Looks good to me, approved
  Jeroen De Dauw: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js 
b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
index 8064753..7172dae 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
@@ -91,6 +91,7 @@
this.element
.addClass( this.widgetBaseClass + '-input' );
 
+   // TODO: Extension should only be built on demand.
this.$extension = $( 'div/' )
.addClass( this.widgetBaseClass + '-extension 
ui-widget-content' )
.on( 'click.' + this.widgetName, function( event ) {
diff --git a/ValueView/resources/jquery.valueview/valueview.Expert.js 
b/ValueView/resources/jquery.valueview/valueview.Expert.js
index da531cb..1dd5947 100644
--- a/ValueView/resources/jquery.valueview/valueview.Expert.js
+++ b/ValueView/resources/jquery.valueview/valueview.Expert.js
@@ -88,7 +88,7 @@
if( viewPortNode instanceof $
 viewPortNode.length === 1
) {
-   viewPortNode = viewPortNode[0];
+   viewPortNode = viewPortNode.get( 0 );
}
 
if( !( viewPortNode.nodeType ) ) { // IE8 can't check for 
instanceof HTMLELement
@@ -158,18 +158,27 @@
_init: function() {},
 
/**
-* Gets called when the valueview's destroy function is called.
+* Destroys the expert. All generated viewport output is being 
deleted and all resources
+* (private members, events handlers) will be released.
 *
-* TODO: think about and document definition of this destroy. 
What is the destroy supposed
-*  to do exactly? E.g. when having an expert responsible for 
displaying an input, should
-*  the destroy leave the input or load an expert for 
displaying the value statically first?
+* This will not preserve the plain text of the last 
represented value as one might expect
+* when thinking about the common jQuery.Widget's behavior. 
This is mostly because it is
+* not the Expert's responsibility to be able to serve a plain 
text representation of the
+* value. If the value should be represented as plain text 
after the expert's construction,
+* let the responsible controller use a value formatter for 
that.
 *
 * @since 0.1
 */
destroy: function() {
-   this.$viewPort.removeClass( this.uiBaseClass );
+   if( !this.$viewPort ) {
+   return; // destroyed already
+   }
+   this.$viewPort.removeClass( this.uiBaseClass ).empty();
this.$viewPort = null;
this._viewState = null;
+   this._viewNotifier = null;
+   this._messageProvider = null;
+   this._options = null;
},
 
/**
diff --git 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js
 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js
index 1474c86..5e1fb17 100644
--- 
a/ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js
+++ 
b/ValueView/resources/jquery.valueview/valueview.experts/experts.GlobeCoordinateInput.js
@@ -148,18 +148,32 @@
 * @see jQuery.valueview.Expert.destroy
 */
destroy: function() {
-   

[MediaWiki-commits] [Gerrit] authdns: add Ganglia plugin for gdnsd - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: authdns: add Ganglia plugin for gdnsd
..

authdns: add Ganglia plugin for gdnsd

Mostly untested, let's see if this will output anything useful :)

Change-Id: I5ad089c6fd231ee758b7059aae7febb541ae6e50
---
M manifests/role/authdns.pp
M manifests/site.pp
A modules/authdns/files/ganglia/ganglia_gdnsd.py
A modules/authdns/files/ganglia/gdnsd.pyconf
A modules/authdns/manifests/ganglia.pp
M modules/authdns/manifests/monitoring.pp
6 files changed, 300 insertions(+), 1 deletion(-)


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

diff --git a/manifests/role/authdns.pp b/manifests/role/authdns.pp
index dddf2c6..f7f0f22 100644
--- a/manifests/role/authdns.pp
+++ b/manifests/role/authdns.pp
@@ -13,6 +13,7 @@
 $gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
 
 include authdns::monitoring
+include authdns::ganglia
 }
 
 # ns0 @ eqiad
diff --git a/manifests/site.pp b/manifests/site.pp
index b98c2c4..6a96772 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -809,6 +809,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node ekrem.wikimedia.org {
@@ -1839,6 +1840,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node mchenry.wikimedia.org {
@@ -1885,6 +1887,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node /mobile100[1-4]\.wikimedia\.org/ {
diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
new file mode 100644
index 000..0352874
--- /dev/null
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -0,0 +1,187 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (c) 2013 Faidon Liambotis
+# Copyright (c) 2013 Wikimedia Foundation, Inc.
+#
+# 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.
+#
+Gmond module for gdnsd statistics
+
+:copyright: (c) 2013 Faidon Liambotis and Wikimedia Foundation Inc.
+:author: Faidon Liambotis
+:license: GPLv2+
+
+
+import urllib2
+import json
+
+CONF = {
+'stats_url': 'http://127.0.0.1:3506/json',
+'prefix': 'gdnsd',
+'groups': 'gdnsd',
+}
+DESCRIPTIONS = {
+'stats_formerr': 'FORMERR',
+'stats_v6': 'IPv6',
+'stats_refused': 'REFUSED',
+'stats_badvers': 'BADVERS',
+'stats_noerror': 'NOERROR',
+'stats_dropped': 'Dropped',
+'stats_nxdomain': 'NXDOMAIN',
+'stats_edns_clientsub': 'EDNS Client Subnet',
+'stats_notimp': 'NOTIMP',
+'stats_edns': 'EDNS',
+'udp_edns_big': 'UDP EDNS Big',
+'udp_reqs': 'UDP requests',
+'udp_sendfail': 'UDP sendfail',
+'udp_edns_tc': 'UDP EDNS TC-bit',
+'udp_recvfail': 'UDP recvfail',
+'udp_tc': 'UDP TC-bit',
+'tcp_sendfail': 'TCP sendfail',
+'tcp_recvfail': 'TCP recvfail',
+'tcp_reqs': 'TCP requests',
+}
+
+
+def build_desc(skel, prop):
+Build a description dict from a template.
+
+:param skel: template dict
+:param prop: substitution dict
+:returns: New dict
+
+new = skel.copy()
+for key, value in prop.iteritems():
+new[key] = value
+return new
+
+
+def fetch_metrics(url=CONF['stats_url']):
+Fetches  decodes metrics from gdnsd.
+
+:param url: URL for gdnsd's json output
+:returns: decoded dict
+
+metrics = {}
+try:
+response = urllib2.urlopen(url)
+data = response.read()
+response.close()
+metrics = json.loads(data)
+except urllib2.URLError:
+pass
+except KeyError:
+pass
+except:
+pass
+
+return metrics
+
+
+def metric_handler(name):
+Callback to return the current value for a metric.
+
+:param name: metric name
+:returns: metric value
+
+raw = fetch_metrics()
+try:
+_, category, metric = name.split('_', 2)
+val = raw[category][metric]
+except KeyError:
+val = 0
+return val
+
+
+def metric_init(params):
+Initialize module at gmond startup.
+
+for key, value in params.iteritems():
+CONF[key] = value
+
+skel = {
+#'name': '',
+#'description': '',
+'call_back': metric_handler,
+'time_max': 60,
+'value_type': 'uint',
+'units': 'pkts/s',
+'slope': 

[MediaWiki-commits] [Gerrit] authdns: add Ganglia plugin for gdnsd - change (operations/puppet)

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

Change subject: authdns: add Ganglia plugin for gdnsd
..


authdns: add Ganglia plugin for gdnsd

Mostly untested, let's see if this will output anything useful :)

Change-Id: I5ad089c6fd231ee758b7059aae7febb541ae6e50
---
M manifests/role/authdns.pp
M manifests/site.pp
A modules/authdns/files/ganglia/ganglia_gdnsd.py
A modules/authdns/files/ganglia/gdnsd.pyconf
A modules/authdns/manifests/ganglia.pp
M modules/authdns/manifests/monitoring.pp
6 files changed, 300 insertions(+), 1 deletion(-)

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



diff --git a/manifests/role/authdns.pp b/manifests/role/authdns.pp
index dddf2c6..f7f0f22 100644
--- a/manifests/role/authdns.pp
+++ b/manifests/role/authdns.pp
@@ -13,6 +13,7 @@
 $gitrepo = 'https://gerrit.wikimedia.org/r/p/operations/dns.git'
 
 include authdns::monitoring
+include authdns::ganglia
 }
 
 # ns0 @ eqiad
diff --git a/manifests/site.pp b/manifests/site.pp
index b98c2c4..6a96772 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -809,6 +809,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node ekrem.wikimedia.org {
@@ -1839,6 +1840,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node mchenry.wikimedia.org {
@@ -1885,6 +1887,7 @@
 nameservers   = $nameservers,
 gitrepo   = $gitrepo,
 }
+include authdns::ganglia
 }
 
 node /mobile100[1-4]\.wikimedia\.org/ {
diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
new file mode 100644
index 000..0352874
--- /dev/null
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -0,0 +1,187 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+# Copyright (c) 2013 Faidon Liambotis
+# Copyright (c) 2013 Wikimedia Foundation, Inc.
+#
+# 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.
+#
+Gmond module for gdnsd statistics
+
+:copyright: (c) 2013 Faidon Liambotis and Wikimedia Foundation Inc.
+:author: Faidon Liambotis
+:license: GPLv2+
+
+
+import urllib2
+import json
+
+CONF = {
+'stats_url': 'http://127.0.0.1:3506/json',
+'prefix': 'gdnsd',
+'groups': 'gdnsd',
+}
+DESCRIPTIONS = {
+'stats_formerr': 'FORMERR',
+'stats_v6': 'IPv6',
+'stats_refused': 'REFUSED',
+'stats_badvers': 'BADVERS',
+'stats_noerror': 'NOERROR',
+'stats_dropped': 'Dropped',
+'stats_nxdomain': 'NXDOMAIN',
+'stats_edns_clientsub': 'EDNS Client Subnet',
+'stats_notimp': 'NOTIMP',
+'stats_edns': 'EDNS',
+'udp_edns_big': 'UDP EDNS Big',
+'udp_reqs': 'UDP requests',
+'udp_sendfail': 'UDP sendfail',
+'udp_edns_tc': 'UDP EDNS TC-bit',
+'udp_recvfail': 'UDP recvfail',
+'udp_tc': 'UDP TC-bit',
+'tcp_sendfail': 'TCP sendfail',
+'tcp_recvfail': 'TCP recvfail',
+'tcp_reqs': 'TCP requests',
+}
+
+
+def build_desc(skel, prop):
+Build a description dict from a template.
+
+:param skel: template dict
+:param prop: substitution dict
+:returns: New dict
+
+new = skel.copy()
+for key, value in prop.iteritems():
+new[key] = value
+return new
+
+
+def fetch_metrics(url=CONF['stats_url']):
+Fetches  decodes metrics from gdnsd.
+
+:param url: URL for gdnsd's json output
+:returns: decoded dict
+
+metrics = {}
+try:
+response = urllib2.urlopen(url)
+data = response.read()
+response.close()
+metrics = json.loads(data)
+except urllib2.URLError:
+pass
+except KeyError:
+pass
+except:
+pass
+
+return metrics
+
+
+def metric_handler(name):
+Callback to return the current value for a metric.
+
+:param name: metric name
+:returns: metric value
+
+raw = fetch_metrics()
+try:
+_, category, metric = name.split('_', 2)
+val = raw[category][metric]
+except KeyError:
+val = 0
+return val
+
+
+def metric_init(params):
+Initialize module at gmond startup.
+
+for key, value in params.iteritems():
+CONF[key] = value
+
+skel = {
+#'name': '',
+#'description': '',
+'call_back': metric_handler,
+'time_max': 60,
+'value_type': 'uint',
+'units': 'pkts/s',
+'slope': 'positive',
+'format': '%u',
+

[MediaWiki-commits] [Gerrit] Improved jQuery.ui.inputextender/jQuery.ui.listrotator destr... - change (mediawiki...DataValues)

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

Change subject: Improved jQuery.ui.inputextender/jQuery.ui.listrotator destroy 
implementations
..


Improved jQuery.ui.inputextender/jQuery.ui.listrotator destroy implementations

Change-Id: I0c6a377bafab7132ddd4be44b86c79efb5da39cb
---
M ValueView/resources/jquery.ui/jquery.ui.inputextender.js
M ValueView/resources/jquery.ui/jquery.ui.listrotator.js
2 files changed, 25 insertions(+), 7 deletions(-)

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



diff --git a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js 
b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
index 8064753..6a36c4a 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.inputextender.js
@@ -212,10 +212,6 @@
this.options.initCallback();
}
 
-   $.each( this.options.content, function( i, node ) {
-   $( node ).addClass( self.widgetBaseClass + 
'-contentnode' );
-   } );
-
this.$extension.hide();
},
 
@@ -223,10 +219,28 @@
 * @see jQuery.Widget.destroy
 */
destroy: function() {
-   this.$extension.remove();
+   if( !this.$extension ) {
+   return; // already destroyed
+   }
+
+   clearTimeout( this._animationTimeout );
+   this._animationTimeout = null;
+
+   this.element.removeClass( this.widgetBaseClass + 
'-input' );
+
+   this.$extension.stop( true );
+   this.$extension.detach();
+   // There might be references to extension's content 
nodes on the outside, so make sure
+   // those content nodes get cleaned up as well:
+   this.$extension.children().removeClass( 
this.widgetBaseClass + '-contentnode' );
+   this.$extension = null;
+
+   this.$closeIcon.remove();
+   this.$closeIcon = null;
 
$.Widget.prototype.destroy.call( this );
 
+   // TODO: Improve performance by maintaining array with 
widget references instead.
if( $( ':' + this.widgetBaseClass ).length === 0 ) {
$( 'html' ).off( '.' + this.widgetName );
}
@@ -241,6 +255,7 @@
this.$extension.empty().append( this.$closeIcon );
 
$.each( this.options.content, function( i, $node ) {
+   $node.addClass( self.widgetBaseClass + 
'-contentnode' );
self.$extension.append( $node );
} );
},
diff --git a/ValueView/resources/jquery.ui/jquery.ui.listrotator.js 
b/ValueView/resources/jquery.ui/jquery.ui.listrotator.js
index 4a562aa..4659fc3 100644
--- a/ValueView/resources/jquery.ui/jquery.ui.listrotator.js
+++ b/ValueView/resources/jquery.ui/jquery.ui.listrotator.js
@@ -243,9 +243,12 @@
 * @see $.Widget.destroy
 */
destroy: function() {
-   this.$menu.data( 'menu' ).destroy();
-   this.$menu.remove();
+   var menu = this.$menu.data( 'menu' );
+   if( menu ) {
+   menu.destroy();
+   }
 
+   this.$menu.remove();
this.$auto.remove();
this.$curr.remove();
this.$prev.remove();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c6a377bafab7132ddd4be44b86c79efb5da39cb
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Daniel Werner daniel.wer...@wikimedia.de
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] authdns: fix for Ganglia unicode string bug - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: authdns: fix for Ganglia unicode string bug
..

authdns: fix for Ganglia unicode string bug

Ganglia isn't happy when passed a Unicode string as a plugin name. Use
str() for name  description.

Change-Id: I453d2861b8b38a7888c127185e717aded5d7e009
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/82/79982/1

diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index 0352874..c64aa9a 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -124,8 +124,8 @@
 for category in raw:
 try:
 for metric in raw[category]:
-name = %s_%s_%s % (CONF['prefix'], category, metric)
-desc = %s_%s % (category, metric)
+name = str(%s_%s_%s % (CONF['prefix'], category, metric))
+desc = str(%s_%s % (category, metric))
 descriptors.append(build_desc(skel, {
 'name': name,
 'description': DESCRIPTIONS.get(desc, desc),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I453d2861b8b38a7888c127185e717aded5d7e009
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] authdns: fix for Ganglia unicode string bug - change (operations/puppet)

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

Change subject: authdns: fix for Ganglia unicode string bug
..


authdns: fix for Ganglia unicode string bug

Ganglia isn't happy when passed a Unicode string as a plugin name. Use
str() for name  description.

Change-Id: I453d2861b8b38a7888c127185e717aded5d7e009
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index 0352874..c64aa9a 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -124,8 +124,8 @@
 for category in raw:
 try:
 for metric in raw[category]:
-name = %s_%s_%s % (CONF['prefix'], category, metric)
-desc = %s_%s % (category, metric)
+name = str(%s_%s_%s % (CONF['prefix'], category, metric))
+desc = str(%s_%s % (category, metric))
 descriptors.append(build_desc(skel, {
 'name': name,
 'description': DESCRIPTIONS.get(desc, desc),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I453d2861b8b38a7888c127185e717aded5d7e009
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@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 diff-multi to classes with explicit direction - change (mediawiki/core)

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

Change subject: Add diff-multi to classes with explicit direction
..


Add diff-multi to classes with explicit direction

This ensures that the direction of the notice about the intermediate
versions is in the user language's direction.

Bug: 52321
Change-Id: I1ef8b85dc7a2f6e4a7e6be055ed0f962d5532c7f
---
M skins/common/shared.css
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/skins/common/shared.css b/skins/common/shared.css
index a9b9d2b..3b44c45 100644
--- a/skins/common/shared.css
+++ b/skins/common/shared.css
@@ -1110,6 +1110,7 @@
direction: ltr;
unicode-bidi: embed;
 }
+.diff-multi,
 .diff-otitle,
 .diff-ntitle,
 .diff-lineno {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ef8b85dc7a2f6e4a7e6be055ed0f962d5532c7f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fire the ime-enable/disable hook upon saving the preferences - change (mediawiki...UniversalLanguageSelector)

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

Change subject: Fire the ime-enable/disable hook upon saving the preferences
..


Fire the ime-enable/disable hook upon saving the preferences

Change-Id: I98e502cd8dc1990b10b1f824614c84d3bf5b993f
---
M resources/js/ext.uls.eventlogger.js
M resources/js/ext.uls.ime.js
M resources/js/ext.uls.inputsettings.js
3 files changed, 16 insertions(+), 7 deletions(-)

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



diff --git a/resources/js/ext.uls.eventlogger.js 
b/resources/js/ext.uls.eventlogger.js
index 75db115..d9ecb19 100644
--- a/resources/js/ext.uls.eventlogger.js
+++ b/resources/js/ext.uls.eventlogger.js
@@ -110,16 +110,18 @@
 
/**
 * Log IME disabling
+* @param {string} context Where the setting was changed.
 */
-   disableIME: function () {
-   this.log( { action: 'ime-disable' } );
+   disableIME: function ( context ) {
+   this.log( { action: 'ime-disable', context: context } );
},
 
/**
 * Log IME enabling
+* @param {string} context Where the setting was changed.
 */
-   enableIME: function () {
-   this.log( { action: 'ime-enable' } );
+   enableIME: function ( context ) {
+   this.log( { action: 'ime-enable', context: context } );
},
 
/**
diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index 819bab4..38683a9 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -81,13 +81,11 @@
disable: function () {
this.registry.isDirty = true;
this.registry.enable = false;
-   mw.hook( 'mw.uls.ime.disable' ).fire();
},
 
enable: function () {
this.registry.isDirty = true;
this.registry.enable = true;
-   mw.hook( 'mw.uls.ime.enable' ).fire();
},
 
isEnabled: function () {
@@ -152,6 +150,7 @@
$.ime.preferences.save( function () {
mw.ime.disable();
imeNotification();
+   mw.hook( 'mw.uls.ime.disable' ).fire( 'menu' );
} );
e.stopPropagation();
} );
diff --git a/resources/js/ext.uls.inputsettings.js 
b/resources/js/ext.uls.inputsettings.js
index ea98ea3..ffe91ae 100644
--- a/resources/js/ext.uls.inputsettings.js
+++ b/resources/js/ext.uls.inputsettings.js
@@ -528,12 +528,20 @@
 * Handle the apply button press
 */
apply: function () {
-   var inputSettings = this;
+   var toggleHookName,
+   inputSettings = this;
 
mw.hook( 'mw.uls.ime.change' ).fire(
$.ime.preferences.getIM( 
$.ime.preferences.getLanguage() )
);
 
+   if ( inputSettings.savedRegistry.enable !== 
$.ime.preferences.isEnabled() ) {
+   toggleHookName = $.ime.preferences.isEnabled() ?
+   'mw.uls.ime.enable' :
+   'mw.uls.ime.disable';
+   mw.hook( toggleHookName ).fire( 'inputsettings' 
);
+   }
+
// Save the preferences
$.ime.preferences.save( function ( result ) {
// closure for not losing the scope

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I98e502cd8dc1990b10b1f824614c84d3bf5b993f
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Eliminate confusing redundancy in accmailtext - change (mediawiki/core)

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

Change subject: Eliminate confusing redundancy in accmailtext
..


Eliminate confusing redundancy in accmailtext

It's the same password for the same account as mentioned
in the line below; let's not add degrees of confusion.

Change-Id: I6b434509b673b69ae96ea4581a5194fe4b0780ab
---
M languages/messages/MessagesEn.php
1 file changed, 1 insertion(+), 3 deletions(-)

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



diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 75e3532..e68501f 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -1434,9 +1434,7 @@
 'loginreqlink' = 'log in',
 'loginreqpagetext' = 'You must $1 to view other pages.',
 'accmailtitle' = 'Password sent',
-'accmailtext'  = A randomly generated password for 
[[User talk:$1|$1]] has been sent to $2.
-
-The password for this new account can be changed on the 
''[[Special:ChangePassword|change password]]'' page upon logging in.,
+'accmailtext'  = A randomly generated password for 
[[User talk:$1|$1]] has been sent to $2. It can be changed on the 
''[[Special:ChangePassword|change password]]'' page upon logging in.,
 'newarticle'   = '(New)',
 'newarticletext'   = You have followed a link to a page that 
does not exist yet.
 To create the page, start typing in the box below (see the 
[[{{MediaWiki:Helppage}}|help page]] for more info).

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b434509b673b69ae96ea4581a5194fe4b0780ab
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Nemo bis federicol...@tiscali.it
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] authdns: more Ganglia plugin fixups - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: authdns: more Ganglia plugin fixups
..

authdns: more Ganglia plugin fixups

Ori was kind enough to give a review and catch some style issues that
pep8/pylint didn't. Plus, amend the metric descriptions a bit to be more
clear; more work needed in this area, though.

Change-Id: Iaebaa42725a14b4726534bb168120da228013721
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
1 file changed, 31 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/83/79983/1

diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index c64aa9a..18f14f7 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -23,31 +23,32 @@
 import urllib2
 import json
 
+
 CONF = {
 'stats_url': 'http://127.0.0.1:3506/json',
 'prefix': 'gdnsd',
 'groups': 'gdnsd',
 }
 DESCRIPTIONS = {
-'stats_formerr': 'FORMERR',
-'stats_v6': 'IPv6',
-'stats_refused': 'REFUSED',
-'stats_badvers': 'BADVERS',
-'stats_noerror': 'NOERROR',
-'stats_dropped': 'Dropped',
-'stats_nxdomain': 'NXDOMAIN',
-'stats_edns_clientsub': 'EDNS Client Subnet',
-'stats_notimp': 'NOTIMP',
-'stats_edns': 'EDNS',
-'udp_edns_big': 'UDP EDNS Big',
-'udp_reqs': 'UDP requests',
-'udp_sendfail': 'UDP sendfail',
-'udp_edns_tc': 'UDP EDNS TC-bit',
-'udp_recvfail': 'UDP recvfail',
-'udp_tc': 'UDP TC-bit',
-'tcp_sendfail': 'TCP sendfail',
-'tcp_recvfail': 'TCP recvfail',
-'tcp_reqs': 'TCP requests',
+'stats_v6': 'DNS queries over IPv6',
+'stats_badvers': ' DNS BADVERS responses',
+'stats_formerr': 'DNS FORMERR responses',
+'stats_noerror': ' DNS NOERROR responses',
+'stats_notimp': 'DNS NOTIMP responses',
+'stats_nxdomain': 'DNS NXDOMAIN responses',
+'stats_refused': 'DNS REFUSED responses',
+'stats_dropped': 'DNS dropped packets',
+'stats_edns': 'DNS EDNS queries',
+'stats_edns_clientsub': 'DNS queries with EDNS Client Subnet',
+'udp_reqs': 'DNS UDP requests',
+'tcp_reqs': 'DNS TCP requests',
+'udp_edns_big': 'DNS UDP EDNS big',
+'udp_tc': 'DNS UDP TC-bit',
+'udp_edns_tc': 'DNS UDP EDNS TC-bit',
+'udp_sendfail': 'DNS UDP sendfail',
+'udp_recvfail': 'DNS UDP recvfail',
+'tcp_sendfail': 'DNS TCP sendfail',
+'tcp_recvfail': 'DNS TCP recvfail',
 }
 
 
@@ -76,11 +77,7 @@
 data = response.read()
 response.close()
 metrics = json.loads(data)
-except urllib2.URLError:
-pass
-except KeyError:
-pass
-except:
+except (urllib2.URLError, KeyError):
 pass
 
 return metrics
@@ -139,9 +136,11 @@
 
 def metric_config(params):
 Returns a pyconf to accompany this
+import textwrap
+
 descriptors = metric_init(params)
 
-out = 
+out = \
 # gdnsd plugin for Ganglia monitor, automatically generated config file
 
 modules {
@@ -158,17 +157,15 @@
 
 for desc in descriptors:
 out += 
-metric {{
-name = {name}
-title = {description}
-}}.format(**desc)  # pylint: disable-msg=W0142
+metric {
+name = %(name)s
+title = %(description)s
+} % desc
 
 out += 
-}
-
+}
 
-import textwrap
-return textwrap.dedent(out).strip()
+return textwrap.dedent(out)
 
 
 def metric_cleanup():
@@ -183,5 +180,4 @@
 else:
 for d in metric_init({}):
 d['value'] = d['call_back'](d['name'])
-fmt = ' {name}: {units} {value} [{description}]'
-print fmt.format(**d)  # pylint: disable-msg=W0142
+print ' %(name)s: %(units)s %(value)s [%(description)s]' % d

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaebaa42725a14b4726534bb168120da228013721
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] authdns: more Ganglia plugin fixups - change (operations/puppet)

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

Change subject: authdns: more Ganglia plugin fixups
..


authdns: more Ganglia plugin fixups

Ori was kind enough to give a review and catch some style issues that
pep8/pylint didn't. Plus, amend the metric descriptions a bit to be more
clear; more work needed in this area, though.

Change-Id: Iaebaa42725a14b4726534bb168120da228013721
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
1 file changed, 31 insertions(+), 35 deletions(-)

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



diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index c64aa9a..18f14f7 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -23,31 +23,32 @@
 import urllib2
 import json
 
+
 CONF = {
 'stats_url': 'http://127.0.0.1:3506/json',
 'prefix': 'gdnsd',
 'groups': 'gdnsd',
 }
 DESCRIPTIONS = {
-'stats_formerr': 'FORMERR',
-'stats_v6': 'IPv6',
-'stats_refused': 'REFUSED',
-'stats_badvers': 'BADVERS',
-'stats_noerror': 'NOERROR',
-'stats_dropped': 'Dropped',
-'stats_nxdomain': 'NXDOMAIN',
-'stats_edns_clientsub': 'EDNS Client Subnet',
-'stats_notimp': 'NOTIMP',
-'stats_edns': 'EDNS',
-'udp_edns_big': 'UDP EDNS Big',
-'udp_reqs': 'UDP requests',
-'udp_sendfail': 'UDP sendfail',
-'udp_edns_tc': 'UDP EDNS TC-bit',
-'udp_recvfail': 'UDP recvfail',
-'udp_tc': 'UDP TC-bit',
-'tcp_sendfail': 'TCP sendfail',
-'tcp_recvfail': 'TCP recvfail',
-'tcp_reqs': 'TCP requests',
+'stats_v6': 'DNS queries over IPv6',
+'stats_badvers': ' DNS BADVERS responses',
+'stats_formerr': 'DNS FORMERR responses',
+'stats_noerror': ' DNS NOERROR responses',
+'stats_notimp': 'DNS NOTIMP responses',
+'stats_nxdomain': 'DNS NXDOMAIN responses',
+'stats_refused': 'DNS REFUSED responses',
+'stats_dropped': 'DNS dropped packets',
+'stats_edns': 'DNS EDNS queries',
+'stats_edns_clientsub': 'DNS queries with EDNS Client Subnet',
+'udp_reqs': 'DNS UDP requests',
+'tcp_reqs': 'DNS TCP requests',
+'udp_edns_big': 'DNS UDP EDNS big',
+'udp_tc': 'DNS UDP TC-bit',
+'udp_edns_tc': 'DNS UDP EDNS TC-bit',
+'udp_sendfail': 'DNS UDP sendfail',
+'udp_recvfail': 'DNS UDP recvfail',
+'tcp_sendfail': 'DNS TCP sendfail',
+'tcp_recvfail': 'DNS TCP recvfail',
 }
 
 
@@ -76,11 +77,7 @@
 data = response.read()
 response.close()
 metrics = json.loads(data)
-except urllib2.URLError:
-pass
-except KeyError:
-pass
-except:
+except (urllib2.URLError, KeyError):
 pass
 
 return metrics
@@ -139,9 +136,11 @@
 
 def metric_config(params):
 Returns a pyconf to accompany this
+import textwrap
+
 descriptors = metric_init(params)
 
-out = 
+out = \
 # gdnsd plugin for Ganglia monitor, automatically generated config file
 
 modules {
@@ -158,17 +157,15 @@
 
 for desc in descriptors:
 out += 
-metric {{
-name = {name}
-title = {description}
-}}.format(**desc)  # pylint: disable-msg=W0142
+metric {
+name = %(name)s
+title = %(description)s
+} % desc
 
 out += 
-}
-
+}
 
-import textwrap
-return textwrap.dedent(out).strip()
+return textwrap.dedent(out)
 
 
 def metric_cleanup():
@@ -183,5 +180,4 @@
 else:
 for d in metric_init({}):
 d['value'] = d['call_back'](d['name'])
-fmt = ' {name}: {units} {value} [{description}]'
-print fmt.format(**d)  # pylint: disable-msg=W0142
+print ' %(name)s: %(units)s %(value)s [%(description)s]' % d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaebaa42725a14b4726534bb168120da228013721
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@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] force snmp traps to be sent with canonical client ip addr - change (operations/puppet)

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

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


Change subject: force snmp traps to be sent with canonical client ip addr
..

force snmp traps to be sent with canonical client ip addr

Change-Id: I9c7b1c11aeef2ff984ab25c7c81514be3c5897db
---
M manifests/base.pp
A templates/snmp/snmp.conf.erb
2 files changed, 20 insertions(+), 0 deletions(-)


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

diff --git a/manifests/base.pp b/manifests/base.pp
index 2a0ef7e..304478a 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -97,6 +97,15 @@
ensure = latest;
}
 
+   file { /etc/snmp/snmp.conf:
+   ensure = present,
+   owner = root,
+   group = root,
+   mode  = 0444,
+   content = template(snmp/snmp.conf.erb),
+   require = Package[ snmp ];
+   }
+
monitor_service { puppet freshness: description = Puppet 
freshness, check_command = puppet-FAIL, passive = true, freshness = 
36000, retries = 1 ; }
 
case $::realm {
diff --git a/templates/snmp/snmp.conf.erb b/templates/snmp/snmp.conf.erb
new file mode 100644
index 000..2d2de08
--- /dev/null
+++ b/templates/snmp/snmp.conf.erb
@@ -0,0 +1,11 @@
+#
+ THIS FILE IS MANAGED BY PUPPET
+ puppet:///templates/snmp/snmp.conf.erb
+
+  Changes to this file will be discarded by Puppet periodically
+  and without warning.
+
+##
+
+mibs :
+clientaddr %= scope.lookupvar('::ipaddress') %

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

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

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


[MediaWiki-commits] [Gerrit] force snmp traps to be sent with canonical client ip addr - change (operations/puppet)

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

Change subject: force snmp traps to be sent with canonical client ip addr
..


force snmp traps to be sent with canonical client ip addr

Change-Id: I9c7b1c11aeef2ff984ab25c7c81514be3c5897db
---
M manifests/base.pp
A templates/snmp/snmp.conf.erb
2 files changed, 20 insertions(+), 0 deletions(-)

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



diff --git a/manifests/base.pp b/manifests/base.pp
index 2a0ef7e..304478a 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -97,6 +97,15 @@
ensure = latest;
}
 
+   file { /etc/snmp/snmp.conf:
+   ensure = present,
+   owner = root,
+   group = root,
+   mode  = 0444,
+   content = template(snmp/snmp.conf.erb),
+   require = Package[ snmp ];
+   }
+
monitor_service { puppet freshness: description = Puppet 
freshness, check_command = puppet-FAIL, passive = true, freshness = 
36000, retries = 1 ; }
 
case $::realm {
diff --git a/templates/snmp/snmp.conf.erb b/templates/snmp/snmp.conf.erb
new file mode 100644
index 000..2d2de08
--- /dev/null
+++ b/templates/snmp/snmp.conf.erb
@@ -0,0 +1,11 @@
+#
+ THIS FILE IS MANAGED BY PUPPET
+ puppet:///templates/snmp/snmp.conf.erb
+
+  Changes to this file will be discarded by Puppet periodically
+  and without warning.
+
+##
+
+mibs :
+clientaddr %= scope.lookupvar('::ipaddress') %

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9c7b1c11aeef2ff984ab25c7c81514be3c5897db
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Introduced GlobeCoordinateParser - change (mediawiki...DataValues)

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

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


Change subject: Introduced GlobeCoordinateParser
..

Introduced GlobeCoordinateParser

This new parser has the same behaviour as the old GeoCoordinateParser.
The later now returnes a simple LatLongValue and no longer does precision
detection. Existing behaviour of this component should not have changed
visibily to the outside.

Change-Id: I20012795ced95e8afda7f2c21fd32730dc408432
---
M ValueParsers/ValueParsers.classes.php
M ValueParsers/ValueParsers.php
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
A ValueParsers/includes/parsers/GlobeCoordinateParser.php
M ValueParsers/tests/phpunit/api/ApiParseValueTest.php
M ValueParsers/tests/phpunit/parsers/DdCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmsCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/FloatCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/GeoCoordinateParserTest.php
A ValueParsers/tests/phpunit/parsers/GlobeCoordinateParserTest.php
16 files changed, 417 insertions(+), 276 deletions(-)


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

diff --git a/ValueParsers/ValueParsers.classes.php 
b/ValueParsers/ValueParsers.classes.php
index 3e37476..756e007 100644
--- a/ValueParsers/ValueParsers.classes.php
+++ b/ValueParsers/ValueParsers.classes.php
@@ -26,6 +26,7 @@
'ValueParsers\FloatCoordinateParser' = 
'includes/parsers/FloatCoordinateParser.php',
'ValueParsers\GeoCoordinateParser' = 
'includes/parsers/GeoCoordinateParser.php',
'ValueParsers\GeoCoordinateParserBase' = 
'includes/parsers/GeoCoordinateParserBase.php',
+   'ValueParsers\GlobeCoordinateParser' = 
'includes/parsers/GlobeCoordinateParser.php',
'ValueParsers\FloatParser' = 'includes/parsers/FloatParser.php',
'ValueParsers\IntParser' = 'includes/parsers/IntParser.php',
'ValueParsers\NullParser' = 'includes/parsers/NullParser.php',
diff --git a/ValueParsers/ValueParsers.php b/ValueParsers/ValueParsers.php
index 06b2571..73e3abb 100644
--- a/ValueParsers/ValueParsers.php
+++ b/ValueParsers/ValueParsers.php
@@ -46,7 +46,7 @@
 
 $wgValueParsers['bool'] = 'ValueParsers\BoolParser';
 $wgValueParsers['float'] = 'ValueParsers\FloatParser';
-$wgValueParsers['globecoordinate'] = 'ValueParsers\GeoCoordinateParser';
+$wgValueParsers['globecoordinate'] = 'ValueParsers\GlobeCoordinateParser';
 $wgValueParsers['int'] = 'ValueParsers\IntParser';
 $wgValueParsers['null'] = 'ValueParsers\NullParser';
 
diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index c6f0a87..1789236 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -46,22 +46,6 @@
}
 
/**
-* @see GeoCoordinateParserBase::detectPrecision
-*/
-   protected function detectPrecision( $number ) {
-   // TODO: Implement localized decimal separator.
-   $split = explode( '.', $number );
-
-   $precision = 1;
-
-   if( isset( $split[1] ) ) {
-   $precision = pow( 10, -1 * strlen( $split[1] ) );
-   }
-
-   return $precision;
-   }
-
-   /**
 * @see GeoCoordinateParserBase::areValidCoordinates
 */
protected function areValidCoordinates( $normalizedCoordinateSegments ) 
{
diff --git a/ValueParsers/includes/parsers/DmCoordinateParser.php 
b/ValueParsers/includes/parsers/DmCoordinateParser.php
index 296af05..8039e36 100644
--- a/ValueParsers/includes/parsers/DmCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmCoordinateParser.php
@@ -38,33 +38,6 @@
}
 
/**
-* @see GeoCoordinateParserBase::detectPrecision
-*/
-   protected function detectPrecision( $number ) {
-   $minutes = $number * 60;
-
-   // Since we are in the DM parser, we know that precision needs 
at least to be an arcminute:
-   $precision = 1 / 60;
-
-   // The minute may be a float; In order to detect a proper 
precision, we convert the minutes
-   // to seconds.
-   if( $minutes - floor( $minutes )  0 ) {
-   $seconds = $minutes * 60;
-
-   $precision = 1 / 3600;
-
-   // TODO: Implement localized decimal separator.
-   $secondsSplit = explode( '.', 

[MediaWiki-commits] [Gerrit] When applying settings, log ime-change only if needed - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: When applying settings, log ime-change only if needed
..

When applying settings, log ime-change only if needed

Change-Id: I62b4ce777948c18cec5117279523198f4514c3a6
---
M resources/js/ext.uls.inputsettings.js
1 file changed, 18 insertions(+), 10 deletions(-)


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

diff --git a/resources/js/ext.uls.inputsettings.js 
b/resources/js/ext.uls.inputsettings.js
index ffe91ae..58eff10 100644
--- a/resources/js/ext.uls.inputsettings.js
+++ b/resources/js/ext.uls.inputsettings.js
@@ -528,18 +528,26 @@
 * Handle the apply button press
 */
apply: function () {
-   var toggleHookName,
-   inputSettings = this;
+   var previousIM,
+   inputSettings = this,
+   previousLanguage = 
inputSettings.savedRegistry.language,
+   currentlyEnabled = 
$.ime.preferences.isEnabled(),
+   currentLanguage = 
$.ime.preferences.getLanguage(),
+   currentIM = $.ime.preferences.getIM( 
currentLanguage );
 
-   mw.hook( 'mw.uls.ime.change' ).fire(
-   $.ime.preferences.getIM( 
$.ime.preferences.getLanguage() )
-   );
+   if ( previousLanguage ) {
+   previousIM = 
inputSettings.savedRegistry.imes[previousLanguage];
+   }
 
-   if ( inputSettings.savedRegistry.enable !== 
$.ime.preferences.isEnabled() ) {
-   toggleHookName = $.ime.preferences.isEnabled() ?
-   'mw.uls.ime.enable' :
-   'mw.uls.ime.disable';
-   mw.hook( toggleHookName ).fire( 'inputsettings' 
);
+   if ( currentLanguage !== 
inputSettings.savedRegistry.language ||
+   currentIM !== previousIM
+   ) {
+   mw.hook( 'mw.uls.ime.change' ).fire( currentIM 
);
+   }
+
+   if ( inputSettings.savedRegistry.enable !== 
currentlyEnabled ) {
+   mw.hook( currentlyEnabled ? 'mw.uls.ime.enable' 
: 'mw.uls.ime.disable' )
+   .fire( 'inputsettings' );
}
 
// Save the preferences

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62b4ce777948c18cec5117279523198f4514c3a6
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] Add Danwe and Henning as author - change (mediawiki...DataValues)

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

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


Change subject: Add Danwe and Henning as author
..

Add Danwe and Henning as author

Change-Id: Idb22133b1a768413d588aa31b95ec3dc17dfe24e
---
M ValueParsers/ValueParsers.mw.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/ValueParsers/ValueParsers.mw.php b/ValueParsers/ValueParsers.mw.php
index e72bc41..4985927 100644
--- a/ValueParsers/ValueParsers.mw.php
+++ b/ValueParsers/ValueParsers.mw.php
@@ -22,7 +22,11 @@
'path' = __DIR__,
'name' = 'ValueParsers',
'version' = ValueParsers_VERSION,
-   'author' = array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw 
Jeroen De Dauw]' ),
+   'author' = array(
+   '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
+   ),
'url' = 'https://www.mediawiki.org/wiki/Extension:ValueParsers',
'descriptionmsg' = 'valueparsers-desc',
 );

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

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

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


[MediaWiki-commits] [Gerrit] add url/link which points to more info about installation an... - change (pywikibot/compat)

2013-08-20 Thread DrTrigon (Code Review)
DrTrigon has uploaded a new change for review.

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


Change subject: add url/link which points to more info about installation and 
patch
..

add url/link which points to more info about installation and patch

Change-Id: I44550cc294d2762d1ea5285221cd23221ba80d75
---
M externals/__init__.py
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/89/79989/1

diff --git a/externals/__init__.py b/externals/__init__.py
index e7db1c4..3bb6677 100644
--- a/externals/__init__.py
+++ b/externals/__init__.py
@@ -203,7 +203,9 @@
   automatically install it.
   If you say Yes, externals will need administrator
   privileges, and you might be asked for the 
administrator
-  password.)
+  password. For more info, please confer:\n
+   http://www.mediawiki.org/wiki/Manual:Pywikipediabot/;
+ Installation#Dependencies)
 lowlevel_warning(Give externals permission to try to install package?
   (y/N))
 v = raw_input().upper()

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I44550cc294d2762d1ea5285221cd23221ba80d75
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: DrTrigon dr.tri...@surfeu.ch

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


[MediaWiki-commits] [Gerrit] Add Danwe and Henning as author - change (mediawiki...DataValues)

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

Change subject: Add Danwe and Henning as author
..


Add Danwe and Henning as author

Change-Id: Idb22133b1a768413d588aa31b95ec3dc17dfe24e
---
M ValueParsers/ValueParsers.mw.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/ValueParsers/ValueParsers.mw.php b/ValueParsers/ValueParsers.mw.php
index e72bc41..4985927 100644
--- a/ValueParsers/ValueParsers.mw.php
+++ b/ValueParsers/ValueParsers.mw.php
@@ -22,7 +22,11 @@
'path' = __DIR__,
'name' = 'ValueParsers',
'version' = ValueParsers_VERSION,
-   'author' = array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw 
Jeroen De Dauw]' ),
+   'author' = array(
+   '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
+   ),
'url' = 'https://www.mediawiki.org/wiki/Extension:ValueParsers',
'descriptionmsg' = 'valueparsers-desc',
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb22133b1a768413d588aa31b95ec3dc17dfe24e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] When applying settings, log ime-change only if needed - change (mediawiki...UniversalLanguageSelector)

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

Change subject: When applying settings, log ime-change only if needed
..


When applying settings, log ime-change only if needed

Change-Id: I62b4ce777948c18cec5117279523198f4514c3a6
---
M resources/js/ext.uls.inputsettings.js
1 file changed, 18 insertions(+), 10 deletions(-)

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



diff --git a/resources/js/ext.uls.inputsettings.js 
b/resources/js/ext.uls.inputsettings.js
index ffe91ae..58eff10 100644
--- a/resources/js/ext.uls.inputsettings.js
+++ b/resources/js/ext.uls.inputsettings.js
@@ -528,18 +528,26 @@
 * Handle the apply button press
 */
apply: function () {
-   var toggleHookName,
-   inputSettings = this;
+   var previousIM,
+   inputSettings = this,
+   previousLanguage = 
inputSettings.savedRegistry.language,
+   currentlyEnabled = 
$.ime.preferences.isEnabled(),
+   currentLanguage = 
$.ime.preferences.getLanguage(),
+   currentIM = $.ime.preferences.getIM( 
currentLanguage );
 
-   mw.hook( 'mw.uls.ime.change' ).fire(
-   $.ime.preferences.getIM( 
$.ime.preferences.getLanguage() )
-   );
+   if ( previousLanguage ) {
+   previousIM = 
inputSettings.savedRegistry.imes[previousLanguage];
+   }
 
-   if ( inputSettings.savedRegistry.enable !== 
$.ime.preferences.isEnabled() ) {
-   toggleHookName = $.ime.preferences.isEnabled() ?
-   'mw.uls.ime.enable' :
-   'mw.uls.ime.disable';
-   mw.hook( toggleHookName ).fire( 'inputsettings' 
);
+   if ( currentLanguage !== 
inputSettings.savedRegistry.language ||
+   currentIM !== previousIM
+   ) {
+   mw.hook( 'mw.uls.ime.change' ).fire( currentIM 
);
+   }
+
+   if ( inputSettings.savedRegistry.enable !== 
currentlyEnabled ) {
+   mw.hook( currentlyEnabled ? 'mw.uls.ime.enable' 
: 'mw.uls.ime.disable' )
+   .fire( 'inputsettings' );
}
 
// Save the preferences

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I62b4ce777948c18cec5117279523198f4514c3a6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] $wgHooks: add closure docs admonition to register handlers... - change (mediawiki/core)

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

Change subject: $wgHooks: add closure docs  admonition to register handlers 
early
..


$wgHooks: add closure docs  admonition to register handlers early

This patch takes Tim's advice to amend the doc block for $wgHooks with an
admonition to register hook handlers early. (This was after it was determined
that late registration of a CanonicalNamespace handler was responsible for bug
45031). Since I was already here, I also documented the use of closures with
$wgHooks, fulfilling a @TODO.

Change-Id: Id16148dbfbcc89e0365860e078e089ae541ba08f
---
M includes/DefaultSettings.php
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 86b0849..c638f52 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -5491,17 +5491,24 @@
  * @endcode
  * - A function with some data:
  * @code
- * $wgHooks['event_name'][] = array($function, $data);
+ * $wgHooks['event_name'][] = array( $function, $data );
  * @endcode
  * - A an object method:
  * @code
- * $wgHooks['event_name'][] = array($object, 'method');
+ * $wgHooks['event_name'][] = array( $object, 'method' );
+ * @endcode
+ * - A closure:
+ * @code
+ * $wgHooks['event_name'][] = function ( $hookParam ) {
+ * // Handler code goes here.
+ * };
  * @endcode
  *
  * @warning You should always append to an event array or you will end up
  * deleting a previous registered hook.
  *
- * @todo Does it support PHP closures?
+ * @warning Hook handlers should be registered at file scope. Registering
+ * handlers after file scope can lead to unexpected results due to caching.
  */
 $wgHooks = array();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id16148dbfbcc89e0365860e078e089ae541ba08f
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.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] Update Chechen language namespace names from translatewiki - change (mediawiki/core)

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

Change subject: Update Chechen language namespace names from translatewiki
..


Update Chechen language namespace names from translatewiki

Also adding old name back in as an alias.

Bug: 51783
Change-Id: I88790d1e6ccc63bbcd2aff9c26403a710b7e6ff8
---
M languages/messages/MessagesCe.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/languages/messages/MessagesCe.php 
b/languages/messages/MessagesCe.php
index 9cd5cf4..b6dcf80 100644
--- a/languages/messages/MessagesCe.php
+++ b/languages/messages/MessagesCe.php
@@ -22,7 +22,7 @@
NS_SPECIAL  = 'Š‘ŠµŠ»Ń…Š°Š½',
NS_TALK = 'Š”ŠøŠ¹Ń†Š°Ń€Šµ',
NS_USER = 'Š”ŠµŠŗъŠ°ŃˆŃ…Š¾',
-   NS_USER_TALK= 'Š”ŠµŠŗъŠ°ŃˆŃ…Š¾Š½_Š“ŠøŠ¹Ń†Š°Ń€Šµ',
+   NS_USER_TALK= 'Š”ŠµŠŗъŠ°ŃˆŃ…Š¾Ń‡ŃƒŠ½_Š“ŠøŠ¹Ń†Š°Ń€Šµ',
NS_PROJECT_TALK = '{{GRAMMAR:genitive|$1}}_Š“ŠøŠ¹Ń†Š°Ń€Šµ',
NS_FILE = 'Š¤Š°Š¹Š»',
NS_FILE_TALK= 'Š¤Š°Š¹Š»Š°Š½_Š“ŠøŠ¹Ń†Š°Ń€Šµ',
@@ -43,6 +43,7 @@
'Š®Š·ŠµŃ€' = NS_USER,
'Š®Š·ŠµŃ€Šø_Š“ŠøŠ¹Ń†Š°'  = NS_USER_TALK,
'Š”ŠøŠ¹Ń†Š°Ń€Šµ_Š“ŠµŠŗъŠ°ŃˆŃ…Š¾' = NS_USER_TALK,
+   'Š”ŠµŠŗъŠ°ŃˆŃ…Š¾Š½_Š“ŠøŠ¹Ń†Š°Ń€Šµ' = NS_USER_TALK,
'$1_Š”ŠøŠ¹Ń†Š°' = NS_PROJECT_TALK,
'Š”ŠøŠ¹Ń†Š°Ń€Šµ_{{GRAMMAR:genitive|$1}}' = NS_PROJECT_TALK,
'Š”урт' = NS_FILE,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I88790d1e6ccc63bbcd2aff9c26403a710b7e6ff8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Set Wikibase sort order to alphabetic for ilowiki - change (operations/mediawiki-config)

2013-08-20 Thread TTO (Code Review)
TTO has uploaded a new change for review.

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


Change subject: Set Wikibase sort order to alphabetic for ilowiki
..

Set Wikibase sort order to alphabetic for ilowiki

The sole active user at this wiki has made this innocuous request.

Bug: 46245
Change-Id: Ia825f9e02fb806044fbc3e0365e3e3d1b8eceb23
---
M wmf-config/InitialiseSettings.php
1 file changed, 3 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 3a6a697..5767729 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -12415,6 +12415,9 @@
'huwiki' = array(
'sortPrepend' = array( 'en' ),
),
+   'ilowiki' = array(
+   'sort' = 'alphabetic',
+   ),
'lbwiki' = array(
'sort' = 'alphabetic',
),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia825f9e02fb806044fbc3e0365e3e3d1b8eceb23
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: TTO at.li...@live.com.au

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


[MediaWiki-commits] [Gerrit] Make use of Time data value formatter in EntityView - change (mediawiki...Wikibase)

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

Change subject: Make use of Time data value formatter in EntityView
..


Make use of Time data value formatter in EntityView

Removes the special treatment for displaying instances of \DataValues\TimeValue 
in EntityView.

Requires I0dd02909834ce8b428daea86e8bd2bf87ba9a085 in DataValues repo.

Change-Id: I72bd2c49958a236028d8a5374d2fc64553955a97
---
M repo/includes/EntityView.php
1 file changed, 19 insertions(+), 22 deletions(-)

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



diff --git a/repo/includes/EntityView.php b/repo/includes/EntityView.php
index 2f43169..6120861 100644
--- a/repo/includes/EntityView.php
+++ b/repo/includes/EntityView.php
@@ -19,7 +19,9 @@
 use ValueFormatters\ValueFormatterFactory;
 use ValueFormatters\FormatterOptions;
 use ValueFormatters\ValueFormatter;
+use ValueFormatters\TimeFormatter;
 use Wikibase\Repo\WikibaseRepo;
+use Wikibase\Lib\MwTimeIsoFormatter;
 
 /**
  * Base class for creating views for all different kinds of Wikibase\Entity.
@@ -621,7 +623,8 @@
}
$valueFormatterOptions = new FormatterOptions( array(
ValueFormatter::OPT_LANG = $languageCode,
-   Lib\EntityIdFormatter::OPT_PREFIX_MAP = 
$entitiesPrefixMap
+   Lib\EntityIdFormatter::OPT_PREFIX_MAP = 
$entitiesPrefixMap,
+   TimeFormatter::OPT_TIME_ISO_FORMATTER = new 
MwTimeIsoFormatter( \Language::factory( $languageCode ) ),
) );
 
// TODO: display a placeholder message for novalue/somevalue 
snak
@@ -629,29 +632,23 @@
if ( $claim-getMainSnak()-getType() === 'value' ) {
$value = $claim-getMainSnak()-getDataValue();
 
-   // TODO: Bad to have a switch for different data types 
here, implement a formatter!
-   if( $value instanceof \DataValues\TimeValue ) {
-   $value = $value-getTime() . ' (' . 
$value-getCalendarModel() . ')';
-   } elseif( $value instanceof 
\DataValues\UnDeserializableValue ) {
-   $value = $value-getReason();
+   $valueFormatter = $this-valueFormatters-newFormatter(
+   $value-getType(), $valueFormatterOptions
+   );
+
+   if ( $valueFormatter !== null ) {
+   $value = $valueFormatter-format( $value );
} else {
-   // Proper way, use value formatter:
-   $valueFormatter = 
$this-valueFormatters-newFormatter(
-   $value-getType(), 
$valueFormatterOptions
-   );
-
-   if( $valueFormatter !== null ) {
-   $value = $valueFormatter-format( 
$value );
-   } else {
-   // If value representation is a string, 
just display that one as a
-   // fallback for values not having a 
formatter implemented yet.
+   // If value representation is a string, just 
display that one as a
+   // fallback for values not having a formatter 
implemented yet.
+   if ( is_string( $value-getValue() ) ) {
$value = $value-getValue();
-
-   if( !is_string( $value ) ) {
-   // TODO: don't fail here, 
display a message in the UI instead
-   throw new MWException( 
'Displaying of values of type '
-   . $value-getType() . 
' not supported yet' );
-   }
+   } elseif ( $value instanceof 
\DataValues\UnDeserializableValue ) {
+   $value = $value-getReason();
+   } else {
+   // TODO: don't fail here, display a 
message in the UI instead
+   throw new MWException( 'Displaying of 
values of type '
+   . $value-getType() . ' not 
supported yet' );
}
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72bd2c49958a236028d8a5374d2fc64553955a97
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master

[MediaWiki-commits] [Gerrit] Post-edit confirmation: ensure consistent font-size across s... - change (mediawiki/core)

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

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


Change subject: Post-edit confirmation: ensure consistent font-size across skins
..

Post-edit confirmation: ensure consistent font-size across skins

The post-edit confirmation display looks awful in MonoBook, because it
specifies an x-small font-size for the entire body. This patch ensures
a legible font size of 13px across skins.

Bug: 41404
Change-Id: I772840748adb90dca0b849f1e679d290cbd84413
---
M resources/mediawiki.action/mediawiki.action.view.postEdit.css
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/79991/1

diff --git a/resources/mediawiki.action/mediawiki.action.view.postEdit.css 
b/resources/mediawiki.action/mediawiki.action.view.postEdit.css
index ae2e898..6e86415 100644
--- a/resources/mediawiki.action/mediawiki.action.view.postEdit.css
+++ b/resources/mediawiki.action/mediawiki.action.view.postEdit.css
@@ -5,6 +5,7 @@
height: 0;
left: 50%;
z-index: 1000;
+   font-size: 13px;
 }
 
 .postedit-container:hover {
@@ -16,7 +17,7 @@
top: 0.6em;
left: -50%;
padding: .6em 3.6em .6em 1.1em;
-   font-size: 0.8em;
+   font-size: 1em;
line-height: 1.5625em;
color: #626465;
background-color: #f4f4f4;

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

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

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


[MediaWiki-commits] [Gerrit] Make use of LatLongValue rather then GeoCoordinateValue - change (mediawiki...Maps)

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

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


Change subject: Make use of LatLongValue rather then GeoCoordinateValue
..

Make use of LatLongValue rather then GeoCoordinateValue

Change-Id: I7a8368487b23d09a873bb942aeca273b6e8a554e
---
M includes/Geocoders.php
M includes/Maps_GeoFunctions.php
M includes/elements/Circle.php
M includes/elements/ImageOverlay.php
M includes/elements/Line.php
M includes/elements/Location.php
M includes/elements/Rectangle.php
M includes/parserhooks/Maps_Finddestination.php
M includes/parserhooks/Maps_Geocode.php
M includes/parserhooks/Maps_Geodistance.php
M includes/parsers/LineParser.php
M includes/parsers/LocationParser.php
M tests/phpunit/ElementTest.php
M tests/phpunit/elements/CircleTest.php
M tests/phpunit/elements/LineTest.php
M tests/phpunit/elements/LocationTest.php
M tests/phpunit/elements/RectangleTest.php
M tests/phpunit/parserhooks/CoordinatesTest.php
M tests/phpunit/parserhooks/DisplayMapTest.php
M tests/phpunit/parserhooks/GeocodeTest.php
M tests/phpunit/parserhooks/GeodistanceTest.php
M tests/phpunit/parsers/LineParserTest.php
M tests/phpunit/parsers/LocationParserTest.php
23 files changed, 112 insertions(+), 112 deletions(-)


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

diff --git a/includes/Geocoders.php b/includes/Geocoders.php
index e8f3390..8d063e6 100644
--- a/includes/Geocoders.php
+++ b/includes/Geocoders.php
@@ -2,7 +2,7 @@
 
 namespace Maps;
 
-use DataValues\GeoCoordinateValue;
+use DataValues\LatLongValue;
 use MWException;
 use ValueParsers\ParseException;
 
@@ -20,7 +20,7 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 final class Geocoders {
-   
+
/**
 * Associative with geoservice identifiers as keys containing instances 
of
 * the geocoder classes. 
@@ -125,7 +125,7 @@
 * @param string|false $mappingService
 * @param boolean $checkForCoords
 *
-* @return GeoCoordinateValue|false
+* @return LatLongValue|false
 */
public static function attemptToGeocode( $coordsOrAddress, $geoservice 
= '', $mappingService = false, $checkForCoords = true ) {
if ( $checkForCoords ) {
@@ -198,7 +198,7 @@
 * @param string $geoService
 * @param string|false $mappingService
 * 
-* @return GeoCoordinateValue|false
+* @return LatLongValue|false
 * @throws MWException
 */
public static function geocode( $address, $geoService = '', 
$mappingService = false ) {
@@ -222,7 +222,7 @@

// This means the cache returned an already computed 
set of coordinates.
if ( $cacheResult !== false ) {
-   assert( $cacheResult instanceof 
GeoCoordinateValue );
+   assert( $cacheResult instanceof LatLongValue );
return $cacheResult;
}   
}
@@ -240,7 +240,7 @@
return false;
}
 
-   $coordinates = new GeoCoordinateValue(
+   $coordinates = new LatLongValue(
$coordinates['lat'],
$coordinates['lon']
);
@@ -258,7 +258,7 @@
 * 
 * @param string $address
 * 
-* @return GeoCoordinateValue|boolean false
+* @return LatLongValue|boolean false
 */
protected static function cacheRead( $address ) {
global $egMapsEnableGeoCache;
@@ -277,9 +277,9 @@
 * @since 0.7
 * 
 * @param string $address
-* @param GeoCoordinateValue $coordinates
+* @param LatLongValue $coordinates
 */
-   protected static function cacheWrite( $address, GeoCoordinateValue 
$coordinates ) {
+   protected static function cacheWrite( $address, LatLongValue 
$coordinates ) {
global $egMapsEnableGeoCache;

// Add the obtained coordinates to the cache when there is a 
result and the cache is enabled.
diff --git a/includes/Maps_GeoFunctions.php b/includes/Maps_GeoFunctions.php
index 7d4fc05..7d8aa89 100644
--- a/includes/Maps_GeoFunctions.php
+++ b/includes/Maps_GeoFunctions.php
@@ -1,7 +1,7 @@
 ?php
 
 // The approximate radius of the earth in meters, according to 
http://en.wikipedia.org/wiki/Earth_radius.
-use DataValues\GeoCoordinateValue;
+use DataValues\LatLongValue;
 
 define( 'Maps_EARTH_RADIUS', 6371000 );
 
@@ -26,12 +26,12 @@
 * 
 * @since 2.0
 * 
-* @param GeoCoordinateValue $start
-* @param GeoCoordinateValue $end
+* @param LatLongValue $start
+* @param LatLongValue $end
 * 
 * @return float Distance in m.

[MediaWiki-commits] [Gerrit] Match GlobeCoordinateValue chanes in DataValues - change (mediawiki...WikibaseQueryEngine)

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

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


Change subject: Match GlobeCoordinateValue chanes in DataValues
..

Match GlobeCoordinateValue chanes in DataValues

Change-Id: I39debcea282eef6999050002e9e4254461211a6b
---
M src/SQLStore/DVHandler/GeoCoordinateHandler.php
M tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
2 files changed, 17 insertions(+), 21 deletions(-)


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

diff --git a/src/SQLStore/DVHandler/GeoCoordinateHandler.php 
b/src/SQLStore/DVHandler/GeoCoordinateHandler.php
index aa49ad7..281a56e 100644
--- a/src/SQLStore/DVHandler/GeoCoordinateHandler.php
+++ b/src/SQLStore/DVHandler/GeoCoordinateHandler.php
@@ -3,14 +3,14 @@
 namespace Wikibase\QueryEngine\SQLStore\DVHandler;
 
 use DataValues\DataValue;
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
 use InvalidArgumentException;
 use Wikibase\Database\FieldDefinition;
 use Wikibase\Database\TableDefinition;
 use Wikibase\QueryEngine\SQLStore\DataValueHandler;
 
 /**
- * Represents the mapping between DataValues\GeoCoordinateValue and
+ * Represents the mapping between DataValues\GlobeCoordinateValue and
  * the corresponding table in the store.
  *
  * @since 0.1
@@ -33,7 +33,7 @@
 * @return DataValue
 */
public function newDataValueFromValueField( $valueFieldValue ) {
-   return GeoCoordinateValue::newFromArray( json_decode( 
$valueFieldValue, true ) );
+   return GlobeCoordinateValue::newFromArray( json_decode( 
$valueFieldValue, true ) );
}
 
/**
@@ -47,8 +47,8 @@
 * @throws InvalidArgumentException
 */
public function getWhereConditions( DataValue $value ) {
-   if ( !( $value instanceof GeoCoordinateValue ) ) {
-   throw new InvalidArgumentException( 'Value is not a 
GeoCoordinateValue' );
+   if ( !( $value instanceof GlobeCoordinateValue ) ) {
+   throw new InvalidArgumentException( 'Value is not a 
GlobeCoordinateValue' );
}
 
return array(
@@ -69,26 +69,21 @@
 * @throws InvalidArgumentException
 */
public function getInsertValues( DataValue $value ) {
-   if ( !( $value instanceof GeoCoordinateValue ) ) {
-   throw new InvalidArgumentException( 'Value is not a 
GeoCoordinateValue' );
+   if ( !( $value instanceof GlobeCoordinateValue ) ) {
+   throw new InvalidArgumentException( 'Value is not a 
GlobeCoordinateValue' );
}
 
$values = array(
'lat' = $value-getLatitude(),
'lon' = $value-getLongitude(),
 
+   'precision' = $value-getPrecision(),
+   'globe' = $value-getGlobe(),
+
// Note: the code in this package is not dependent on 
MW.
// So do not replace this with FormatJSON::encode.
'json' = json_encode( $value-getArrayValue() ),
);
-
-   if ( $value-getAltitude() !== null ) {
-   $values['alt'] = $value-getAltitude();
-   }
-
-   if ( $value-getGlobe() !== null ) {
-   $values['globe'] = $value-getGlobe();
-   }
 
return $values;
}
diff --git a/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php 
b/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
index 5ecaf32..fcb3d9d 100644
--- a/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
+++ b/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
@@ -2,7 +2,8 @@
 
 namespace Wikibase\QueryEngine\Tests\SQLStore\DVHandler;
 
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
+use DataValues\LatLongValue;
 use Wikibase\QueryEngine\SQLStore\DataValueHandler;
 use Wikibase\QueryEngine\SQLStore\DataValueHandlers;
 use Wikibase\QueryEngine\Tests\SQLStore\DataValueHandlerTest;
@@ -44,15 +45,15 @@
 *
 * @since 0.1
 *
-* @return GeoCoordinateValue[]
+* @return GlobeCoordinateValue[]
 */
protected function getValues() {
$values = array();
 
-   $values[] = new GeoCoordinateValue( 0, 0 );
-   $values[] = new GeoCoordinateValue( 23, 42 );
-   $values[] = new GeoCoordinateValue( 2.3, 4.2, 9000.1 );
-   $values[] = new GeoCoordinateValue( -2.3, -4.2, -9000.1, null, 
'mars' );
+   $values[] = new GlobeCoordinateValue( new LatLongValue( 0, 0 ), 
1 );
+   $values[] = new GlobeCoordinateValue( new LatLongValue( 23, 42 
), 0.1 );
+   $values[] = 

[MediaWiki-commits] [Gerrit] Match GlobeCoordinateValue chanes in DataValues - change (mediawiki...Wikibase)

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

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


Change subject: Match GlobeCoordinateValue chanes in DataValues
..

Match GlobeCoordinateValue chanes in DataValues

Change-Id: Ieed337f516d643cfab21df955286d1d0ae9afc58
---
M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
1 file changed, 9 insertions(+), 7 deletions(-)


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

diff --git a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php 
b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
index bec672f..5079bc8 100644
--- a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
+++ b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
@@ -19,7 +19,8 @@
 
 use DataTypes\DataType;
 use DataTypes\DataTypeFactory;
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
+use DataValues\LatLongValue;
 use DataValues\NumberValue;
 use DataValues\StringValue;
 use DataValues\TimeValue;
@@ -110,14 +111,15 @@
//TODO: must be from a list of configured values
 
//globe-coordinate
-   array( 'globe-coordinate', 'Foo', false, 
'GeoCoordinateValue expected, string supplied' ),
-   array( 'globe-coordinate', new NumberValue( 7 ), false, 
'GeoCoordinateValue expected' ),
+   array( 'globe-coordinate', 'Foo', false, 
'GlobeCoordinateValue expected, string supplied' ),
+   array( 'globe-coordinate', new NumberValue( 7 ), false, 
'GlobeCoordinateValue expected' ),
 
//globe-coordinate[globe]
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, '' ), false, 'globe: empty string should be invalid' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, 'http://' . str_repeat('x', 256) ), false, 'globe: too long' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, 'http://acme.com/globe' ), true, 'globe: URL' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, ' http://acme.com/globe ' ), false, 'globe: untrimmed' ),
+   // FIXME: this is testing unimplemented behaviour? 
Probably broken...
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, '' ), false, 'globe: empty string should be 
invalid' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, 'http://' . str_repeat('x', 256) ), false, 'globe: 
too long' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, 'http://acme.com/globe' ), true, 'globe: URL' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, ' http://acme.com/globe ' ), false, 'globe: 
untrimmed' ),
//TODO: must be an item reference
//TODO: must be from a list of configured values
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieed337f516d643cfab21df955286d1d0ae9afc58
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 nonexistent hosts virt3 and virt4 from nagios checks - change (operations/puppet)

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

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


Change subject: remove nonexistent hosts virt3 and virt4 from nagios checks
..

remove nonexistent hosts virt3 and virt4 from nagios checks

Change-Id: Ib59a2552234e96aa1e54f04721cbb20bf91548da
---
M files/dsh/group/nagios
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/files/dsh/group/nagios b/files/dsh/group/nagios
index f757a21..089d279 100644
--- a/files/dsh/group/nagios
+++ b/files/dsh/group/nagios
@@ -311,7 +311,6 @@
 knsq19
 mw1072
 amslvs3
-virt4
 amssq46
 bayes
 db14
@@ -598,7 +597,6 @@
 sq68
 mw1064
 mw1110
-virt3
 mw1132
 knsq21
 mw1119

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

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

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


[MediaWiki-commits] [Gerrit] remove nonexistent hosts virt3 and virt4 from nagios checks - change (operations/puppet)

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

Change subject: remove nonexistent hosts virt3 and virt4 from nagios checks
..


remove nonexistent hosts virt3 and virt4 from nagios checks

Change-Id: Ib59a2552234e96aa1e54f04721cbb20bf91548da
---
M files/dsh/group/nagios
1 file changed, 0 insertions(+), 2 deletions(-)

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



diff --git a/files/dsh/group/nagios b/files/dsh/group/nagios
index f757a21..089d279 100644
--- a/files/dsh/group/nagios
+++ b/files/dsh/group/nagios
@@ -311,7 +311,6 @@
 knsq19
 mw1072
 amslvs3
-virt4
 amssq46
 bayes
 db14
@@ -598,7 +597,6 @@
 sq68
 mw1064
 mw1110
-virt3
 mw1132
 knsq21
 mw1119

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib59a2552234e96aa1e54f04721cbb20bf91548da
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] create parent directory /etc/dsh for dsh node group files - change (operations/puppet)

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

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


Change subject: create parent directory /etc/dsh for dsh node group files
..

create parent directory /etc/dsh for dsh node group files

Change-Id: I56311120cdfed3c4494475156e216954eee3344e
---
M manifests/misc/dsh.pp
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index df76890..c32748a 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -8,6 +8,11 @@

class files {
file {
+   /etc/dsh:
+   ensure = true,
+   owner = root,
+   group = root,
+   mode = 0444;
/etc/dsh/group:
owner = root,
group = root,

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

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

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


[MediaWiki-commits] [Gerrit] create parent directory /etc/dsh for dsh node group files - change (operations/puppet)

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

Change subject: create parent directory /etc/dsh for dsh node group files
..


create parent directory /etc/dsh for dsh node group files

Change-Id: I56311120cdfed3c4494475156e216954eee3344e
---
M manifests/misc/dsh.pp
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index df76890..c32748a 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -8,6 +8,11 @@

class files {
file {
+   /etc/dsh:
+   ensure = true,
+   owner = root,
+   group = root,
+   mode = 0444;
/etc/dsh/group:
owner = root,
group = root,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56311120cdfed3c4494475156e216954eee3344e
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] authdns: also adjust descriptions on gdnsd.pyconf - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: authdns: also adjust descriptions on gdnsd.pyconf
..

authdns: also adjust descriptions on gdnsd.pyconf

Duh!

Change-Id: I17816fb397e6c3ffc7cabee820bf2b2c01a9f2cd
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
M modules/authdns/files/ganglia/gdnsd.pyconf
2 files changed, 21 insertions(+), 21 deletions(-)


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

diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index 18f14f7..97792aa 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -31,9 +31,9 @@
 }
 DESCRIPTIONS = {
 'stats_v6': 'DNS queries over IPv6',
-'stats_badvers': ' DNS BADVERS responses',
+'stats_badvers': 'DNS BADVERS responses',
 'stats_formerr': 'DNS FORMERR responses',
-'stats_noerror': ' DNS NOERROR responses',
+'stats_noerror': 'DNS NOERROR responses',
 'stats_notimp': 'DNS NOTIMP responses',
 'stats_nxdomain': 'DNS NXDOMAIN responses',
 'stats_refused': 'DNS REFUSED responses',
diff --git a/modules/authdns/files/ganglia/gdnsd.pyconf 
b/modules/authdns/files/ganglia/gdnsd.pyconf
index 7fbf65f..9724a34 100644
--- a/modules/authdns/files/ganglia/gdnsd.pyconf
+++ b/modules/authdns/files/ganglia/gdnsd.pyconf
@@ -13,78 +13,78 @@
 
 metric {
 name = gdnsd_stats_formerr
-title = FORMERR
+title = DNS FORMERR responses
 }
 metric {
 name = gdnsd_stats_v6
-title = IPv6
+title = DNS queries over IPv6
 }
 metric {
 name = gdnsd_stats_refused
-title = REFUSED
+title = DNS REFUSED responses
 }
 metric {
 name = gdnsd_stats_badvers
-title = BADVERS
+title = DNS BADVERS responses
 }
 metric {
 name = gdnsd_stats_noerror
-title = NOERROR
+title = DNS NOERROR responses
 }
 metric {
 name = gdnsd_stats_dropped
-title = Dropped
+title = DNS dropped packets
 }
 metric {
 name = gdnsd_stats_nxdomain
-title = NXDOMAIN
+title = DNS NXDOMAIN responses
 }
 metric {
 name = gdnsd_stats_edns_clientsub
-title = EDNS Client Subnet
+title = DNS queries with EDNS Client Subnet
 }
 metric {
 name = gdnsd_stats_notimp
-title = NOTIMP
+title = DNS NOTIMP responses
 }
 metric {
 name = gdnsd_stats_edns
-title = EDNS
+title = DNS EDNS queries
 }
 metric {
 name = gdnsd_udp_edns_big
-title = UDP EDNS Big
+title = DNS UDP EDNS big
 }
 metric {
 name = gdnsd_udp_reqs
-title = UDP requests
+title = DNS UDP requests
 }
 metric {
 name = gdnsd_udp_sendfail
-title = UDP sendfail
+title = DNS UDP sendfail
 }
 metric {
 name = gdnsd_udp_edns_tc
-title = UDP EDNS TC-bit
+title = DNS UDP EDNS TC-bit
 }
 metric {
 name = gdnsd_udp_recvfail
-title = UDP recvfail
+title = DNS UDP recvfail
 }
 metric {
 name = gdnsd_udp_tc
-title = UDP TC-bit
+title = DNS UDP TC-bit
 }
 metric {
 name = gdnsd_tcp_sendfail
-title = TCP sendfail
+title = DNS TCP sendfail
 }
 metric {
 name = gdnsd_tcp_recvfail
-title = TCP recvfail
+title = DNS TCP recvfail
 }
 metric {
 name = gdnsd_tcp_reqs
-title = TCP requests
+title = DNS TCP requests
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17816fb397e6c3ffc7cabee820bf2b2c01a9f2cd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] authdns: also adjust descriptions on gdnsd.pyconf - change (operations/puppet)

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

Change subject: authdns: also adjust descriptions on gdnsd.pyconf
..


authdns: also adjust descriptions on gdnsd.pyconf

Duh!

Change-Id: I17816fb397e6c3ffc7cabee820bf2b2c01a9f2cd
---
M modules/authdns/files/ganglia/ganglia_gdnsd.py
M modules/authdns/files/ganglia/gdnsd.pyconf
2 files changed, 21 insertions(+), 21 deletions(-)

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



diff --git a/modules/authdns/files/ganglia/ganglia_gdnsd.py 
b/modules/authdns/files/ganglia/ganglia_gdnsd.py
index 18f14f7..97792aa 100644
--- a/modules/authdns/files/ganglia/ganglia_gdnsd.py
+++ b/modules/authdns/files/ganglia/ganglia_gdnsd.py
@@ -31,9 +31,9 @@
 }
 DESCRIPTIONS = {
 'stats_v6': 'DNS queries over IPv6',
-'stats_badvers': ' DNS BADVERS responses',
+'stats_badvers': 'DNS BADVERS responses',
 'stats_formerr': 'DNS FORMERR responses',
-'stats_noerror': ' DNS NOERROR responses',
+'stats_noerror': 'DNS NOERROR responses',
 'stats_notimp': 'DNS NOTIMP responses',
 'stats_nxdomain': 'DNS NXDOMAIN responses',
 'stats_refused': 'DNS REFUSED responses',
diff --git a/modules/authdns/files/ganglia/gdnsd.pyconf 
b/modules/authdns/files/ganglia/gdnsd.pyconf
index 7fbf65f..9724a34 100644
--- a/modules/authdns/files/ganglia/gdnsd.pyconf
+++ b/modules/authdns/files/ganglia/gdnsd.pyconf
@@ -13,78 +13,78 @@
 
 metric {
 name = gdnsd_stats_formerr
-title = FORMERR
+title = DNS FORMERR responses
 }
 metric {
 name = gdnsd_stats_v6
-title = IPv6
+title = DNS queries over IPv6
 }
 metric {
 name = gdnsd_stats_refused
-title = REFUSED
+title = DNS REFUSED responses
 }
 metric {
 name = gdnsd_stats_badvers
-title = BADVERS
+title = DNS BADVERS responses
 }
 metric {
 name = gdnsd_stats_noerror
-title = NOERROR
+title = DNS NOERROR responses
 }
 metric {
 name = gdnsd_stats_dropped
-title = Dropped
+title = DNS dropped packets
 }
 metric {
 name = gdnsd_stats_nxdomain
-title = NXDOMAIN
+title = DNS NXDOMAIN responses
 }
 metric {
 name = gdnsd_stats_edns_clientsub
-title = EDNS Client Subnet
+title = DNS queries with EDNS Client Subnet
 }
 metric {
 name = gdnsd_stats_notimp
-title = NOTIMP
+title = DNS NOTIMP responses
 }
 metric {
 name = gdnsd_stats_edns
-title = EDNS
+title = DNS EDNS queries
 }
 metric {
 name = gdnsd_udp_edns_big
-title = UDP EDNS Big
+title = DNS UDP EDNS big
 }
 metric {
 name = gdnsd_udp_reqs
-title = UDP requests
+title = DNS UDP requests
 }
 metric {
 name = gdnsd_udp_sendfail
-title = UDP sendfail
+title = DNS UDP sendfail
 }
 metric {
 name = gdnsd_udp_edns_tc
-title = UDP EDNS TC-bit
+title = DNS UDP EDNS TC-bit
 }
 metric {
 name = gdnsd_udp_recvfail
-title = UDP recvfail
+title = DNS UDP recvfail
 }
 metric {
 name = gdnsd_udp_tc
-title = UDP TC-bit
+title = DNS UDP TC-bit
 }
 metric {
 name = gdnsd_tcp_sendfail
-title = TCP sendfail
+title = DNS TCP sendfail
 }
 metric {
 name = gdnsd_tcp_recvfail
-title = TCP recvfail
+title = DNS TCP recvfail
 }
 metric {
 name = gdnsd_tcp_reqs
-title = TCP requests
+title = DNS TCP requests
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17816fb397e6c3ffc7cabee820bf2b2c01a9f2cd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@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 virt3, 4 to decommissioned list since they are nonexistant - change (operations/puppet)

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

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


Change subject: add virt3,4 to decommissioned list since they are nonexistant
..

add virt3,4 to decommissioned list since they are nonexistant

Change-Id: I5edb791da83490b6e5cde4ff6a02ef948baf2988
---
M manifests/decommissioning.pp
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index f9a33f2..c47e657 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -322,6 +322,8 @@
 'virt1001',
 'virt1002',
 'virt1003',
+'virt3',
+'virt4',
 'zinc', #reclaimed, not really decommissioned
 'wikinews-lb.wikimedia.org',
 'wtp1',

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

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

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


[MediaWiki-commits] [Gerrit] add virt3, 4 to decommissioned list since they are nonexistant - change (operations/puppet)

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

Change subject: add virt3,4 to decommissioned list since they are nonexistant
..


add virt3,4 to decommissioned list since they are nonexistant

Change-Id: I5edb791da83490b6e5cde4ff6a02ef948baf2988
---
M manifests/decommissioning.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/manifests/decommissioning.pp b/manifests/decommissioning.pp
index f9a33f2..c47e657 100644
--- a/manifests/decommissioning.pp
+++ b/manifests/decommissioning.pp
@@ -322,6 +322,8 @@
 'virt1001',
 'virt1002',
 'virt1003',
+'virt3',
+'virt4',
 'zinc', #reclaimed, not really decommissioned
 'wikinews-lb.wikimedia.org',
 'wtp1',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5edb791da83490b6e5cde4ff6a02ef948baf2988
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] \SMW\SimpleDependencyBuilder + \SMW\DependencyInjector - change (mediawiki...SemanticMediaWiki)

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

Change subject: \SMW\SimpleDependencyBuilder + \SMW\DependencyInjector
..


\SMW\SimpleDependencyBuilder + \SMW\DependencyInjector

A basic framework to enable dependency injection in Semantic MediaWiki for
immutable or service objects to be injected independently into a client.

\SMW\SimpleDependencyBuilder
Code coverage: 100%
CRAP: 18

\SMW\DependencyInjector
Code coverage: 100%
CRAP: 2

\SMW\CommonDependencyContainer
Code coverage: 100%
CRAP: 3

\SMW\DependencyContainerBase
Code coverage: 100%
CRAP: 8

* Support of predefined DependencyContainer
* Support to register of multiple container
* Support to create objects using eager or lazy loading
* Support for named constructor arguments

== DependencyContainer ==
* DependencyObject an interface that specifies a method to register a dependency
object
* DependencyContainer an interface that specifies all necessary methods required
by a container
* DependencyContainerBase abstract class implementing the ObjectStorage

=== EmptyDependencyContainer class ===
An empty container that is also used as default container for when
SimpleDependencyBuilder does not invoke a constructor object.

pre
$container = new EmptyDependencyContainer();

// Eager loading
$container-someFunnyTitle = $this-newTitle();

// Lazy loading
$container-diwikipage = function ( DependencyBuilder $builder ) {
return DIWikiPage::newFromTitle( $builder-getArgument( 'Title' ) );
};

$container-registerObject( 'Foo', new \stdClass );

// Access objects through a builder
$builder = new SimpleDependencyBuilder( $container );

$builder-newObject( 'Foo' );
$builder-newObject( 'someFunnyTitle ' );

$builder-addArgument( 'Title', $builder-newObject( 'someFunnyTitle' ) );
$builder-newObject( 'diwikipage' );
/pre

=== CommonDependencyContainer class ===
Implementation of the DependencyContainer to provide common objects used
during Semantic MediaWiki's life cycle.

pre
$builder = new SimpleDependencyBuilder( new CommonDependencyContainer () );
$builder-newObject( 'Settings' );
$builder-newObject( 'Title' );
...
/pre

== DependencyBuilder  ==
* DependencyFactory an interface that specifies a method to create a new object
* DependencyBuilder an interface that extends DependencyFactory and specifies
the registration process as well as methods to access constructor arguments.

=== SimpleDependencyBuilder class ===
Implementation of the DependencyBuilder to access DI objects and its invoked 
arguments.

pre
// Register container
$builder = new SimpleDependencyBuilder();
$builder-registerContainer( new EmptyDependencyContainer() );

// Register objects though the container
$builder-getContainer()-registerObject( 'DIWikiPage', function ( 
DependencyBuilder $builder ) {
return DIWikiPage::newFromTitle( $builder-getArgument( 'Title' ) );
} );

// Object instantiation
$diWikiPage = $builder-newObject( 'DIWikiPage', array( $title ) ) or
$diWikiPage = $builder-addArgument( 'Title', $title )-newObject( 'DIWikiPage' 
);
/pre

== DependencyInjector ==
* DependencyRequestor an interface that specifies methods to access a
DependencyBuilder within a client that requests dependency injection.
* DependencyInjector an abstract class that implements the DependencyRequestor
to enable convenience access to an injected DependencyBuilder

pre
$articlePurge = new ArticlePurge( ... );

$articlePurge-setDependencyBuilder( new SimpleDependencyBuilder(
new CommonDependencyContainer()
) )

$articlePurge-getDependencyBuilder()-newObject( 'Foo' );
/pre

## Example
Example implementation of the DI framework in \SMW\ArticlePurge

## Example injection process
SMW\ArticlePurge-process( )
SMW\SimpleDependencyBuilder-newObject( )
SMW\SimpleDependencyBuilder-build( )
SMW\CommonDependencyContainer-SMW\{closure}( )

Change-Id: I1d5e7a6ea94270659c696f04fe7bc4d9539f32cd
---
M SemanticMediaWiki.classes.php
M SemanticMediaWiki.hooks.php
M docs/doxygen.group.definitions.php
A includes/DependencyBuilder.php
A includes/DependencyContainer.php
A includes/DependencyInjector.php
A includes/hooks/ArticlePurge.php
M includes/hooks/HooksLoader.php
A tests/phpunit/includes/CommonDependencyContainerTest.php
A tests/phpunit/includes/DependencyInjectorTest.php
A tests/phpunit/includes/SimpleDependencyBuilderTest.php
A tests/phpunit/includes/hooks/ArticlePurgeTest.php
12 files changed, 1,286 insertions(+), 12 deletions(-)

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



diff --git a/SemanticMediaWiki.classes.php b/SemanticMediaWiki.classes.php
index 81a3796..d836d93 100644
--- a/SemanticMediaWiki.classes.php
+++ b/SemanticMediaWiki.classes.php
@@ -63,6 +63,7 @@
'SMW\ObjectStorage' = 'includes/ObjectStorage.php',
'SMW\SimpleDictionary'  = 'includes/SimpleDictionary.php',
 
+   // Observer subject pattern
'SMW\Observable'   

[MediaWiki-commits] [Gerrit] SimpleSiteLink: make badges poing to Items - change (mediawiki...WikibaseDataModel)

2013-08-20 Thread Code Review
Michał Łazowik has uploaded a new change for review.

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


Change subject: SimpleSiteLink: make badges poing to Items
..

SimpleSiteLink: make badges poing to Items

Per decision made by the Wikidata team. Prevoisly badges were
just strings.

Bug: 40810
Change-Id: I12339d01efe53e9226a7a3337d3691da4ee247e7
---
M DataModel/SimpleSiteLink.php
M tests/phpunit/SimpleSiteLinkTest.php
2 files changed, 33 insertions(+), 12 deletions(-)


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

diff --git a/DataModel/SimpleSiteLink.php b/DataModel/SimpleSiteLink.php
index 6bc7dfe..9c9729e 100644
--- a/DataModel/SimpleSiteLink.php
+++ b/DataModel/SimpleSiteLink.php
@@ -36,8 +36,8 @@
}
 
foreach( $badges as $badge ) {
-   if ( !is_string( $badge ) ) {
-   throw new InvalidArgumentException( 'Each value 
of $badges needs to be a string' );
+   if ( !( $badge instanceof \Wikibase\EntityId ) || 
$badge-getEntityType() !== \Wikibase\Item::ENTITY_TYPE ) {
+   throw new InvalidArgumentException( 'Each value 
of $badges needs to be a EntityId pointing to an Item' );
}
}
 
diff --git a/tests/phpunit/SimpleSiteLinkTest.php 
b/tests/phpunit/SimpleSiteLinkTest.php
index f532891..5c2a6fa 100644
--- a/tests/phpunit/SimpleSiteLinkTest.php
+++ b/tests/phpunit/SimpleSiteLinkTest.php
@@ -106,16 +106,25 @@
$argLists[] = array( $badges, $expected );
 
 
-   $badges = array( 'Nyan Certified' );
+   $badges = array(
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 
149 )
+   );
$expected = array_values( $badges );
 
$argLists[] = array( $badges, $expected );
 
 
// removing from the middle of array
-   $badges = array( 'FA', 'Nyan Certified', 'stub' );
+   $badges = array(
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 36 
),
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 
149 ),
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 7 )
+   );
 
-   $key = array_search( 'Nyan Certified', $badges );
+   $key = array_search(
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 
149 ),
+   $badges
+   );
unset( $badges[$key] );
 
$expected = array_values( $badges );
@@ -146,20 +155,32 @@
}
 
/**
-* @dataProvider stuffThatIsNotArrayOfStringsProvider
+* @dataProvider stuffThatIsNotArrayOfEntityIdsOfItemsProvider
 */
-   public function testCannotConstructWithNonArrayOfStringsBadges( 
$invalidBadges ) {
+   public function 
testCannotConstructWithNonArrayOfEntityIdsOfItemsBadges( $invalidBadges ) {
$this-setExpectedException( 'InvalidArgumentException' );
new SimpleSiteLink( 'enwiki', 'Wikidata', $invalidBadges );
}
 
-   public function stuffThatIsNotArrayOfStringsProvider() {
+   public function stuffThatIsNotArrayOfEntityIdsOfItemsProvider() {
$argLists = array();
 
-   $argLists[] = array( array( 'nyan', 42 ) );
-   $argLists[] = array( array( 'nyan', true ) );
-   $argLists[] = array( array( 'nyan', array() ) );
-   $argLists[] = array( array( 'nyan', null ) );
+   $argLists[] = array( array(
+   'nyan',
+   42
+   ) );
+   $argLists[] = array( array(
+   'nyan',
+   array()
+   ) );
+   $argLists[] = array( array(
+   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 2 ),
+   new \Wikibase\EntityId( \Wikibase\Item::ENTITY_TYPE, 
149 )
+   ) );
+   $argLists[] = array( array(
+   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 2 ),
+   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 3 )
+   ) );
 
return $argLists;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12339d01efe53e9226a7a3337d3691da4ee247e7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseDataModel
Gerrit-Branch: master
Gerrit-Owner: Michał Łazowik mlazo...@gmail.com

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

[MediaWiki-commits] [Gerrit] Add link to readme - change (mediawiki...Ask)

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

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


Change subject: Add link to readme
..

Add link to readme

Change-Id: I4191d33de8b2490729013510ab7c9a874717bc40
---
M README.md
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Ask 
refs/changes/01/80001/1

diff --git a/README.md b/README.md
index 685db73..b0589a4 100644
--- a/README.md
+++ b/README.md
@@ -230,4 +230,5 @@
 * [Ask on Ohloh](https://www.ohloh.net/p/ask)
 * [Ask on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
 * [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
+* [NodeJS implementation of Ask](https://github.com/JeroenDeDauw/AskJS)
 * [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Ask/blob/master/README.md)
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4191d33de8b2490729013510ab7c9a874717bc40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
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] correct ensure for /etc/dsh - change (operations/puppet)

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

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


Change subject: correct ensure for /etc/dsh
..

correct ensure for /etc/dsh

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/80002/1

diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index c32748a..0f9aac8 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -9,7 +9,7 @@
class files {
file {
/etc/dsh:
-   ensure = true,
+   ensure = present,
owner = root,
group = root,
mode = 0444;

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

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

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


[MediaWiki-commits] [Gerrit] correct ensure for /etc/dsh - change (operations/puppet)

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

Change subject: correct ensure for /etc/dsh
..


correct ensure for /etc/dsh

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

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



diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index c32748a..0f9aac8 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -9,7 +9,7 @@
class files {
file {
/etc/dsh:
-   ensure = true,
+   ensure = present,
owner = root,
group = root,
mode = 0444;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I46482e0f56e8f3c5f6a7d2cfdf196589018f2362
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Making SSL connection true as default per disabling http for... - change (pywikibot/compat)

2013-08-20 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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


Change subject: Making SSL connection true as default per disabling http for 
logged in users in 21 August
..

Making SSL connection true as default per disabling http for logged in users in 
21 August

Change-Id: I856ac9eac7261912eb6778ed7e04c1c7771f9981
---
M config.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/03/80003/1

diff --git a/config.py b/config.py
index ef495ca..0b332bb 100644
--- a/config.py
+++ b/config.py
@@ -65,7 +65,7 @@
 authenticate = {}
 
 #Secure Connection to all Wikimedia Projects
-SSL_connection = False
+SSL_connection = True
 
 # password_file = .passwd
 # A password file with default passwords. For more information, please

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I856ac9eac7261912eb6778ed7e04c1c7771f9981
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] third time's a charm? - change (operations/puppet)

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

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


Change subject: third time's a charm?
..

third time's a charm?

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


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

diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index 0f9aac8..8d5cd73 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -9,7 +9,7 @@
class files {
file {
/etc/dsh:
-   ensure = present,
+   ensure = directory,
owner = root,
group = root,
mode = 0444;

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

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

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


[MediaWiki-commits] [Gerrit] third time's a charm? - change (operations/puppet)

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

Change subject: third time's a charm?
..


third time's a charm?

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

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



diff --git a/manifests/misc/dsh.pp b/manifests/misc/dsh.pp
index 0f9aac8..8d5cd73 100644
--- a/manifests/misc/dsh.pp
+++ b/manifests/misc/dsh.pp
@@ -9,7 +9,7 @@
class files {
file {
/etc/dsh:
-   ensure = present,
+   ensure = directory,
owner = root,
group = root,
mode = 0444;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9ffa24211e406db0e6583a1a8515b39fd4fd2052
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Implemented ordering of snaks within SnakList - change (mediawiki...Wikibase)

2013-08-20 Thread Henning Snater (Code Review)
Henning Snater has uploaded a new change for review.

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


Change subject: Implemented ordering of snaks within SnakList
..

Implemented ordering of snaks within SnakList

(bug 52391)
Implemented move functions in wikibase.SnakList which allow moving snaks 
within
the SnakList while considering the snaks being grouped by property.

Change-Id: Ic3e23827144b047038790afddf86996c3efa5c34
---
M lib/resources/wikibase.datamodel/wikibase.SnakList.js
M lib/tests/qunit/wikibase.datamodel/Wikibase.SnakList.tests.js
2 files changed, 374 insertions(+), 3 deletions(-)


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

diff --git a/lib/resources/wikibase.datamodel/wikibase.SnakList.js 
b/lib/resources/wikibase.datamodel/wikibase.SnakList.js
index d9a7653..a1a7472 100644
--- a/lib/resources/wikibase.datamodel/wikibase.SnakList.js
+++ b/lib/resources/wikibase.datamodel/wikibase.SnakList.js
@@ -3,6 +3,7 @@
  * @ingroup WikibaseLib
  * @licence GNU GPL v2+
  * @author Daniel Werner  daniel.wer...@wikimedia.de 
+ * @author H. Snater  mediaw...@snater.com 
  */
 ( function( wb, $ ) {
 'use strict';
@@ -151,11 +152,16 @@
) {
return false;
}
-   for( var i in this._snaks ) {
-   if( !snakList.hasSnak( this._snaks[i] ) ) {
+
+   var otherSnaks = snakList.toArray();
+
+   // Compare to other snak lists snaks considering order:
+   for( var i = 0; i  otherSnaks.length; i++ ) {
+   if( !this._snaks[i].equals( otherSnaks[i] ) ) {
return false;
}
}
+
return true;
},
 
@@ -196,6 +202,179 @@
},
 
/**
+* Returns a snak's index within the snak list. Returns -1 when the 
snak could not be found.
+* @since 0.4
+*
+* @param {wikibase.Snak} snak
+* @return {number}
+*/
+   indexOf: function( snak ) {
+   for( var i = 0; i  this._snaks.length; i++ ) {
+   if( this._snaks[i].equals( snak ) ) {
+   return i;
+   }
+   }
+   return -1;
+   },
+
+   /**
+* Returns the indices of the snak list where a certain snak may be 
moved to. A snak may be
+* moved within its property group. It may also be moved to the slots 
between property groups
+* which involves moving the whole property group the snak belongs to.
+* @since 0.4
+*
+* @param {wikibase.Snak} snak
+* @return {number[]}
+*/
+   getValidMoveIndices: function( snak ) {
+   var self = this,
+   indices = [],
+   isGroupLast = false;
+
+   this.each( function( i, snakListSnak ) {
+   if( snakListSnak.getPropertyId() === 
snak.getPropertyId() ) {
+   // Detect slots within the snak's property 
group.
+   if( snakListSnak !== snak ) {
+   indices.push( i );
+   } else {
+   var nextSnak = self._snaks[i + 1];
+   if( nextSnak  
nextSnak.getPropertyId() !== snak.getPropertyId() ) {
+   // Snak is the last of its 
group.
+   isGroupLast = true;
+   }
+   }
+   } else {
+   // Detect slots between property groups.
+   var previousSnak = self._snaks[i - 1],
+   isNewPropertyGroup = (
+   i !== 0
+snakListSnak.getPropertyId() 
!== previousSnak.getPropertyId()
+   );
+
+   if(
+   // Since this snak's property group is 
not at the top of the snak list, the
+   // snak (with its group) may always be 
moved to the top:
+   i === 0
+   // The snak (with its group) may always 
be moved to between groups except to
+   // adjacent slots between property 
groups since the snak's property group would
+   // in fact not be moved.
+   || isNewPropertyGroup  
previousSnak.getPropertyId() !== snak.getPropertyId()
+   ) {
+ 

[MediaWiki-commits] [Gerrit] Added support for escaping troublesome characters in tag con... - change (operations...varnishkafka)

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

Change subject: Added support for escaping troublesome characters in tag 
content.
..


Added support for escaping troublesome characters in tag content.

Change-Id: I7888bea7fde6d6d70826c73c83cda3d0d3e1e59c
---
M varnishkafka.c
M varnishkafka.conf.example
M varnishkafka.h
3 files changed, 328 insertions(+), 73 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/varnishkafka.c b/varnishkafka.c
index 308ddeb..d166bc0 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -114,12 +114,13 @@
 
_DBG(%i/%i formats:, conf.fmt_cnt, conf.fmt_size);
for (i = 0 ; i  conf.fmt_cnt ; i++) {
-   _DBG( #%-3i  fmt %i (%c)  var \%s\, def \%.*s\,
+   _DBG( #%-3i  fmt %i (%c)  var \%s\, def (%i)\%.*s\%s,
 i,
 conf.fmt[i].id,
-isprint(conf.fmt[i].id) ? (char)conf.fmt[i].id : 0,
+isprint(conf.fmt[i].id) ? (char)conf.fmt[i].id : ' ',
 conf.fmt[i].var ? : ,
-conf.fmt[i].deflen, conf.fmt[i].def);
+conf.fmt[i].deflen, conf.fmt[i].deflen, conf.fmt[i].def,
+conf.fmt[i].flags  FMT_F_ESCAPE ? , escape : );
}
 }
 
@@ -157,6 +158,7 @@
 static int format_add (int fmtr,
   const char *var, ssize_t varlen,
   const char *def, ssize_t deflen,
+  int flags,
   char *errstr, size_t errstr_size) {
struct fmt *fmt;
 
@@ -167,9 +169,9 @@
 
fmt = conf.fmt[conf.fmt_cnt];
 
-   fmt-id = fmtr;
-   fmt-idx = conf.fmt_cnt;
-
+   fmt-id= fmtr;
+   fmt-idx   = conf.fmt_cnt;
+   fmt-flags = flags;
if (var) {
if (varlen == -1)
varlen = strlen(var);
@@ -237,17 +239,29 @@
 }
 
 
+
+static inline void match_assign0 (const struct tag *tag, struct logline *lp,
+ const char *ptr, int len);
+static void match_assign (const struct tag *tag, struct logline *lp,
+ const char *ptr, int len);
+
+
+
+
 /**
- * Assign 'PTR' of size 'LEN' as a match for 'TAG' in logline 'LP'.
- *
- * 'PTR' must be a pointer to persistent memory:
- *   - either VSL shared memory (original VSL tag payload)
- *   - or to a buffer allocated in the 'LP' scratch buffer.
+ * Returns true if 'ptr' is within 'lp's scratch pad, else false.
  */
-#define MATCH_ASSIGN(TAG,LP,PTR,LEN) do {  \
-   (LP)-match[(TAG)-fmt-idx].ptr = (PTR);   \
-   (LP)-match[(TAG)-fmt-idx].len = (LEN);   \
-   } while (0)
+static inline int is_scratch_ptr (const struct logline *lp, const char *ptr) {
+   return (lp-scratch = ptr  ptr  lp-scratch + sizeof(lp-scratch));
+}
+
+/**
+ * Rewinds (deallocates) the last allocation by 'len' bytes.
+ */
+static inline void scratch_rewind (struct logline *lp, int len) {
+   assert(lp-sof = len);
+   lp-sof -= len;
+}
 
 
 /**
@@ -284,9 +298,86 @@
 
memcpy(dst, src, len);
 
-   MATCH_ASSIGN(tag, lp, dst, len);
+   match_assign(tag, lp, dst, len);
 
return len;
+}
+
+
+/**
+ * Writes 'src' of 'len' bytes to scratch buffer, escaping
+ * all unprintable characters as well as the ones defined in 'map' below.
+ * Returns -1 on error.
+ */
+static inline int scratch_write_escaped (const struct tag *tag,
+struct logline *lp,
+const char *src, int len) {
+   static const char *map[256] = {
+   ['\t'] = \\t,
+   ['\n'] = \\n,
+   ['\r'] = \\r,
+   ['\v'] = \\v,
+   ['\f'] = \\f,
+   ['']  = \\\,
+   [' ']  = \\ ,
+   };
+   char *dst;
+   char *dstend;
+   char *d;
+   const char *s, *srcend = src + len;
+
+   /* Allocate initial space for escaped string. */
+   if (unlikely((dst = scratch_alloc(tag, lp, len + 10)) == NULL))
+   return -1;
+
+   dstend = dst + len + 10;
+
+   s = src;
+   d = dst;
+   while (s  srcend) {
+   int outlen = 1;
+   const char *out;
+   char tmp[6];
+
+   if (unlikely((out = map[(int)*s]) != NULL)) {
+   /* Escape from 'map' */
+   outlen = 2;
+
+   } else if (unlikely(!isprint(*s))) {
+   /* Escape non-printables as \octal */
+   sprintf(tmp, \%04o, (int)*s);
+   out = tmp;
+   outlen = 5;
+
+   } else {
+   /* No escaping */
+   out = s;
+   }
+
+   /* Increase scratch pad if necessary. */
+   

[MediaWiki-commits] [Gerrit] When reading offline VSL files (-r ..) make a copy of each m... - change (operations...varnishkafka)

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

Change subject: When reading offline VSL files (-r ..) make a copy of each 
matched tags data since the data is volatile.
..


When reading offline VSL files (-r ..) make a copy of each matched tags data 
since the data is volatile.

This is controlled manually by the new 'log.data.copy = true|false' config 
property
which defaults to true.

Increases the scratch pad per logline from 512 to 2K.

Change-Id: I8935d10eae2496a2096a44f9f10d89585a48ae8c
---
M config.c
M varnishkafka.c
M varnishkafka.conf.example
M varnishkafka.h
4 files changed, 38 insertions(+), 4 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/config.c b/config.c
index feb5479..9ad9648 100644
--- a/config.c
+++ b/config.c
@@ -169,8 +169,9 @@
 try \stdout\ or \kafka\, val);
return -1;
}
-
-   } else if (!strncmp(name, varnish.arg., strlen(varnish.arg.))) {
+   } else if (!strcmp(name, log.data.copy))
+   conf.datacopy = conf_tof(val);
+   else if (!strncmp(name, varnish.arg., strlen(varnish.arg.))) {
const char *t = name + strlen(varnish.arg.);
int r = 0;
if (*t == '-')
diff --git a/varnishkafka.c b/varnishkafka.c
index 368a361..1fafeae 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -306,6 +306,24 @@
return len;
 }
 
+/**
+ * Same as scratch_write0() but calls match_assign0() directly, thus
+ * not supporting escaping.
+ */
+static inline int scratch_write0 (const struct tag *tag, struct logline *lp,
+const char *src, int len) {
+   char *dst;
+
+   if (unlikely((dst = scratch_alloc(tag, lp, len)) == NULL))
+   return -1;
+
+   memcpy(dst, src, len);
+
+   match_assign0(tag, lp, dst, len);
+
+   return len;
+}
+
 
 /**
  * Writes 'src' of 'len' bytes to scratch buffer, escaping
@@ -444,7 +462,10 @@
scratch_write_escaped(tag, lp, ptr, len);
 
} else {
-   match_assign0(tag, lp, ptr, len);
+   if (conf.datacopy) /* copy volatile data */
+   scratch_write0(tag, lp, ptr, len);
+   else  /* point to persistent data */
+   match_assign0(tag, lp, ptr, len);
}
 }
 
diff --git a/varnishkafka.conf.example b/varnishkafka.conf.example
index a28bdd0..c8171b0 100644
--- a/varnishkafka.conf.example
+++ b/varnishkafka.conf.example
@@ -86,6 +86,17 @@
 output = kafka
 
 
+# EXPERIMENTAL
+# Indicates if the log tag data read from VSL files should be copied instantly
+# when read (true). If this is set to false the data is assumed to be
+# persistent (for the duration of collecting and formatting a single request)
+# and no copies will be made, thus improving performance.
+#
+# NOTE:
+#   Must be set to true for offline files (-r file..) due to the way
+#   libvarnishapi reads its data.
+log.data.copy = true
+
 
 # Start for sequence number (%n)
 # Either a number, or the string time which will set it to the current
diff --git a/varnishkafka.h b/varnishkafka.h
index f118b84..7a3ce13 100644
--- a/varnishkafka.h
+++ b/varnishkafka.h
@@ -68,7 +68,7 @@
 
/* Scratch pad */
int  sof;
-   char scratch[512];  /* Must be at end of struct */
+   char scratch[2048];  /* Must be at end of struct */
 };
 
 
@@ -128,6 +128,7 @@
 
uint64_tsequence_number;
 
+   int datacopy;
enum {
VK_FORMAT_STRING,
VK_FORMAT_JSON,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8935d10eae2496a2096a44f9f10d89585a48ae8c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Added JSON formatter, field name identifers and type casting... - change (operations...varnishkafka)

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

Change subject: Added JSON formatter, field name identifers and type casting 
option.
..


Added JSON formatter, field name identifers and type casting option.

 * format.type = string|json|protobuf|avro config option
 * field name identifiers %{@NAME}x (for JSON,etc encoding)
 * type-casting to !options (!num supported)

Change-Id: Ia5d61c0a3be01722d8191d0ea4a8010445530ff9
---
M Makefile
M config.c
M varnishkafka.c
M varnishkafka.conf.example
M varnishkafka.h
5 files changed, 171 insertions(+), 29 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/Makefile b/Makefile
index 3152458..41642a8 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,8 @@
 CFLAGS  += -DVARNISHKAFKA_CONF_PATH=\$(CFPATH)\
 
 CFLAGS += -Wall -Werror -O2 -g 
-LIBS+= -lrdkafka -lvarnishapi -lpthread
+LIBS   += -lyajl
+LIBS+= -lrdkafka -lvarnishapi -lpthread -lrt
 
 
 all:
diff --git a/config.c b/config.c
index d69a190..1d11f4c 100644
--- a/config.c
+++ b/config.c
@@ -123,7 +123,21 @@
conf.partition = atoi(val);
else if (!strcmp(name, format))
conf.format = strdup(val);
-   else if (!strcmp(name, log.level))
+   else if (!strcmp(name, format.type)) {
+   if (!strcmp(val, string))
+   conf.format_type = VK_FORMAT_STRING;
+   else if (!strcmp(val, json))
+   conf.format_type = VK_FORMAT_JSON;
+   else if (!strcmp(val, protobuf))
+   conf.format_type = VK_FORMAT_PROTOBUF;
+   else if (!strcmp(val, avro))
+   conf.format_type = VK_FORMAT_AVRO;
+   else {
+   snprintf(errstr, errstr_size,
+Unknown format.type value \%s\, val);
+   return -1;
+   }
+   } else if (!strcmp(name, log.level))
conf.log_level = atoi(val);
else if (!strcmp(name, log.stderr)) {
if (conf_tof(val))
diff --git a/varnishkafka.c b/varnishkafka.c
index d166bc0..142c59c 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -49,6 +49,9 @@
 #include varnish/varnishapi.h
 #include librdkafka/rdkafka.h
 
+#include yajl/yajl_common.h
+#include yajl/yajl_gen.h
+
 #include varnishkafka.h
 #include base64.h
 
@@ -861,9 +864,12 @@
int varlen = 0;
const char *def = NULL;
int deflen = -1;
+   const char *name = NULL;
+   int namelen = -1;
int fmtid;
int i;
int flags = 0;
+   int type = FMT_TYPE_STRING;
 
if (*s != '%') {
s++;
@@ -931,8 +937,8 @@
 
var = a;
 
-   /* Check for ?DEF and !OPTIONs */
-   if ((q = strnchrs(a, (int)(b-a), ?!))) {
+   /* Check for @NAME, ?DEF and !OPTIONs */
+   if ((q = strnchrs(a, (int)(b-a), @?!))) {
const char *q2 = q;
 
varlen = (int)(q - a);
@@ -946,21 +952,31 @@
q++;
 
if ((q2 = strnchrs(q, (int)(b-q2-1),
-  ?!)))
+  @?!)))
qlen = (int)(q2-q);
else
qlen = (int)(b-q);
 
switch (*(q-1))
{
+   case '@':
+   /* Output format field name */
+   name = q;
+   namelen = qlen;
+   break;
case '?':
+   /* Default value */
def = q;
deflen = qlen;
break;
case '!':
+   /* Options */
if (!strncasecmp(q, escape,
 qlen))
flags |= FMT_F_ESCAPE;
+   else if (!strncasecmp(q, num,
+ qlen))
+   type = FMT_TYPE_NUMBER;
  

[MediaWiki-commits] [Gerrit] Added 'output = null' for testing purposes. - change (operations...varnishkafka)

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

Change subject: Added 'output = null' for testing purposes.
..


Added 'output = null' for testing purposes.

Change-Id: If5f1e2fe89acf5caa60c21a3c4b1b88723097fa6
---
M config.c
M varnishkafka.c
M varnishkafka.conf.example
M varnishkafka.h
4 files changed, 10 insertions(+), 0 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/config.c b/config.c
index 1d11f4c..feb5479 100644
--- a/config.c
+++ b/config.c
@@ -161,6 +161,8 @@
outfunc = out_kafka;
else if (!strcmp(val, -) || !strcmp(val, stdout))
outfunc = out_stdout;
+   else if (!strcmp(val, null))
+   outfunc = out_null;
else {
snprintf(errstr, errstr_size,
 Unknown outputter \%s\:  
diff --git a/varnishkafka.c b/varnishkafka.c
index 142c59c..368a361 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -1112,6 +1112,12 @@
printf(%.*s\n, (int)len, buf);
 }
 
+/**
+ * Null outputter
+ */
+void out_null (const char *buf, size_t len) {
+}
+
 
 /**
  * Currently selected outputter.
diff --git a/varnishkafka.conf.example b/varnishkafka.conf.example
index f63fc15..a28bdd0 100644
--- a/varnishkafka.conf.example
+++ b/varnishkafka.conf.example
@@ -82,6 +82,7 @@
 # Where to output varnish log lines:
 #  kafka  - (default) send to kafka broker
 #  stdout - just print to stdout (behave like varnishncsa)
+#  null   - (test) collect all tags specified by format but dont output 
anything
 output = kafka
 
 
diff --git a/varnishkafka.h b/varnishkafka.h
index 0434920..f118b84 100644
--- a/varnishkafka.h
+++ b/varnishkafka.h
@@ -173,4 +173,5 @@
 
 void out_kafka (const char *buf, size_t len);
 void out_stdout (const char *buf, size_t len);
+void out_null (const char *buf, size_t len);
 extern void (*outfunc) (const char *buf, size_t len);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If5f1e2fe89acf5caa60c21a3c4b1b88723097fa6
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Indent fix and clarified comment. - change (operations...varnishkafka)

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

Change subject: Indent fix and clarified comment.
..


Indent fix and clarified comment.

Change-Id: Ibbb3cd158f7cac518dd5dea3301130b595f49a3f
---
M varnishkafka.conf.example
M varnishkafka.h
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/varnishkafka.conf.example b/varnishkafka.conf.example
index c8171b0..b36b267 100644
--- a/varnishkafka.conf.example
+++ b/varnishkafka.conf.example
@@ -116,7 +116,7 @@
 # varnishkafka log level (1 = emergencies .. 7 = debug)
 log.level = 7
 
-# specify log output
+# specify log output (multiples allowed)
 log.stderr = true
 log.syslog = true
 
diff --git a/varnishkafka.h b/varnishkafka.h
index 7a3ce13..b2589e2 100644
--- a/varnishkafka.h
+++ b/varnishkafka.h
@@ -149,7 +149,7 @@
 #define VK_LOG_SYSLOG 0x2
 
char   *format;
-   int daemonize; 
+   int daemonize;
 
rd_kafka_conf_t   rk_conf;
rd_kafka_topic_conf_t topic_conf;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbb3cd158f7cac518dd5dea3301130b595f49a3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Handle Var: Val with empty Vals. - change (operations...varnishkafka)

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

Change subject: Handle Var: Val with empty  Vals.
..


Handle Var: Val with empty  Vals.

Change-Id: I38980e81f6df32ee553695cf6998c80af1f69883
---
M varnishkafka.c
1 file changed, 10 insertions(+), 2 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/varnishkafka.c b/varnishkafka.c
index 1fafeae..70d795e 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -437,6 +437,7 @@
 
 static inline void match_assign0 (const struct tag *tag, struct logline *lp,
  const char *ptr, int len) {
+   assert(len = 0);
lp-match[tag-fmt-idx].ptr = ptr;
lp-match[tag-fmt-idx].len = len;
 }
@@ -1375,8 +1376,15 @@
strncasecmp(ptr, tag-var, tag-varlen))
continue;
 
-   ptr2 = t+2; /* :  */
-   len2 = len - (int)(ptr2-ptr);
+   if (likely(len  tag-varlen + 1 /* : */)) {
+   ptr2 = t+2; /* :  */
+   len2 = len - (int)(ptr2-ptr);
+   } else {
+   /* Empty value */
+   len2 = 0;
+   ptr2 = NULL;
+   }
+
} else {
ptr2 = ptr;
len2 = len;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I38980e81f6df32ee553695cf6998c80af1f69883
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Dont redeclare 'len' - change (operations...varnishkafka)

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

Change subject: Dont redeclare 'len'
..


Dont redeclare 'len'

Change-Id: Ia802061e426d02c57f23c011a4515aad266828f5
---
M varnishkafka.c
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/varnishkafka.c b/varnishkafka.c
index 70d795e..4d68e1c 100644
--- a/varnishkafka.c
+++ b/varnishkafka.c
@@ -1205,7 +1205,7 @@
yajl_gen g;
int  i;
const unsigned char *buf;
-   size_t   len;
+   size_t   buflen;
 
g = yajl_gen_alloc(NULL);
yajl_gen_map_open(g);
@@ -1250,10 +1250,10 @@
 
yajl_gen_map_close(g);
 
-   yajl_gen_get_buf(g, buf, len);
+   yajl_gen_get_buf(g, buf, buflen);
 
/* Pass rendered log line to outputter function */
-   outfunc((const char *)buf, len);
+   outfunc((const char *)buf, buflen);
 
yajl_gen_clear(g);
yajl_gen_free(g);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia802061e426d02c57f23c011a4515aad266828f5
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Decrease default log.level to 6 (info) - change (operations...varnishkafka)

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

Change subject: Decrease default log.level to 6 (info)
..


Decrease default log.level to 6 (info)

Change-Id: Ic4921a7db19512422ece92a3fd749b6e63a833a1
---
M varnishkafka.conf.example
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Mark Bergsma: Verified; Looks good to me, approved



diff --git a/varnishkafka.conf.example b/varnishkafka.conf.example
index b36b267..c46fda8 100644
--- a/varnishkafka.conf.example
+++ b/varnishkafka.conf.example
@@ -114,7 +114,7 @@
 #
 
 # varnishkafka log level (1 = emergencies .. 7 = debug)
-log.level = 7
+log.level = 6
 
 # specify log output (multiples allowed)
 log.stderr = true

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic4921a7db19512422ece92a3fd749b6e63a833a1
Gerrit-PatchSet: 1
Gerrit-Project: operations/software/varnish/varnishkafka
Gerrit-Branch: master
Gerrit-Owner: Edenhill mag...@edenhill.se
Gerrit-Reviewer: BBlack bbl...@wikimedia.org
Gerrit-Reviewer: Mark Bergsma m...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Making SSL connection true as default per disabling http for... - change (pywikibot/core)

2013-08-20 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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


Change subject: Making SSL connection true as default per disabling http for 
logged in users in 21 August
..

Making SSL connection true as default per disabling http for logged in users in 
21 August

Change-Id: I7a95c627970ba7a691cde899b650291db3c21947
---
M pywikibot/config2.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/06/80006/1

diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index 8fec8c0..b42deb9 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -73,8 +73,8 @@
 #
 #Security Connection for Wikimedia Projects
 #
-use_SSL_onlogin = False  # if available, use SSL when logging in
-use_SSL_always = False   # if available, use SSL for all API queries
+use_SSL_onlogin = True  # if available, use SSL when logging in
+use_SSL_always = True   # if available, use SSL for all API queries
 
 # Available security projects
 available_ssl_project = [

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a95c627970ba7a691cde899b650291db3c21947
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add Henning as author - change (mediawiki...DataTypes)

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

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


Change subject: Add Henning as author
..

Add Henning as author

Change-Id: Ibbefe218ee0c23ba76d866dff0f38d803bd80466
---
M DataTypes.mw.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTypes 
refs/changes/08/80008/1

diff --git a/DataTypes.mw.php b/DataTypes.mw.php
index e2e8b33..9ca5306 100644
--- a/DataTypes.mw.php
+++ b/DataTypes.mw.php
@@ -26,7 +26,8 @@
'version' = DataTypes_VERSION,
'author' = array(
'[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
-   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]'
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
),
'url' = 'https://www.mediawiki.org/wiki/Extension:DataTypes',
'descriptionmsg' = 'datatypes-desc',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibbefe218ee0c23ba76d866dff0f38d803bd80466
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataTypes
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] Improve autoloading and namespace consistency - change (mediawiki...DataTypes)

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

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


Change subject: Improve autoloading and namespace consistency
..

Improve autoloading and namespace consistency

Change-Id: I910f73d1a25af3262b2f68b7b63deca0f8bba073
---
D DataTypes.classes.php
M DataTypes.mw.php
M DataTypes.php
M phpunit.xml.dist
R src/DataTypes/DataType.php
R src/DataTypes/DataTypeFactory.php
R src/DataTypes/DataTypesModule.php
R src/DataTypes/Modules/DataTypesModule.php
R tests/Modules/DataTypesModuleTest.php
R tests/Phpunit/DataTypeFactoryTest.php
R tests/Phpunit/DataTypeTest.php
11 files changed, 27 insertions(+), 50 deletions(-)


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

diff --git a/DataTypes.classes.php b/DataTypes.classes.php
deleted file mode 100644
index 945bb1e..000
--- a/DataTypes.classes.php
+++ /dev/null
@@ -1,17 +0,0 @@
-?php
-
-/**
- * Class registration file for the DataTypes library.
- *
- * @since 0.1
- *
- * @file
- * @ingroup DataTypes
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- */
-return array(
-   'DataTypes\DataType' = 'includes/DataType.php',
-   'DataTypes\DataTypeFactory' = 'includes/DataTypeFactory.php',
-);
diff --git a/DataTypes.mw.php b/DataTypes.mw.php
index 9ca5306..d2cf017 100644
--- a/DataTypes.mw.php
+++ b/DataTypes.mw.php
@@ -18,7 +18,7 @@
die( 'Not an entry point.' );
 }
 
-global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgAutoloadClasses, 
$wgHooks, $wgResourceModules;
+global $wgExtensionCredits, $wgExtensionMessagesFiles, $wgHooks, 
$wgResourceModules;
 
 $wgExtensionCredits['datavalues'][] = array(
'path' = __DIR__,
@@ -34,10 +34,6 @@
 );
 
 $wgExtensionMessagesFiles['DataTypes'] = __DIR__ . '/DataTypes.i18n.php';
-
-// modules
-$wgAutoloadClasses['DataTypes\Modules\DataTypesModule'] = __DIR__ . '/' . 
'includes/modules/DataTypesModule.php';
-$wgAutoloadClasses['DataTypes\DataTypesModule'] = __DIR__ . '/' . 
'includes/DataTypesModule.php';
 
 if ( defined( 'MW_PHPUNIT_TEST' ) ) {
require_once __DIR__ . '/tests/testLoader.php';
diff --git a/DataTypes.php b/DataTypes.php
index a5f5691..2d61c8d 100644
--- a/DataTypes.php
+++ b/DataTypes.php
@@ -80,31 +80,28 @@
'time' = array(
'datavalue' = 'time',
),
-
-// 'geo' = array(
-// 'datavalue' = 'geo-dv',
-// 'parser' = 'geo-parser',
-// 'formatter' = 'geo-formatter',
-// ),
-// 'positive-number' = array(
-// 'datavalue' = 'numeric-dv',
-// 'parser' = 'numeric-parser',
-// 'formatter' = 'numeric-formatter',
-// 'validators' = array( $rangeValidator ),
-// ),
 );
 
 // @codeCoverageIgnoreStart
-
 spl_autoload_register( function ( $className ) {
-   static $classes = false;
+   $className = ltrim( $className, '\\' );
+   $fileName = '';
+   $namespace = '';
 
-   if ( $classes === false ) {
-   $classes = include( __DIR__ . '/' . 'DataTypes.classes.php' );
+   if ( $lastNsPos = strripos( $className, '\\') ) {
+   $namespace = substr( $className, 0, $lastNsPos );
+   $className = substr( $className, $lastNsPos + 1 );
+   $fileName  = str_replace( '\\', '/', $namespace ) . '/';
}
 
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/' . $classes[$className];
+   $fileName .= str_replace( '_', '/', $className ) . '.php';
+
+   $namespaceSegments = explode( '\\', $namespace );
+
+   if ( $namespaceSegments[0] === 'DataTypes' ) {
+   if ( count( $namespaceSegments ) === 1 || $namespaceSegments[1] 
!== 'Tests' ) {
+   require_once __DIR__ . '/src/' . $fileName;
+   }
}
 } );
 
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index cb008e2..9c4091a 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -14,7 +14,7 @@
  verbose=true
 testsuites
 testsuite name=DataTypes
-directorytests/phpunit/directory
+directorytests/Phpunit/directory
 /testsuite
 /testsuites
 /phpunit
diff --git a/includes/DataType.php b/src/DataTypes/DataType.php
similarity index 100%
rename from includes/DataType.php
rename to src/DataTypes/DataType.php
diff --git a/includes/DataTypeFactory.php b/src/DataTypes/DataTypeFactory.php
similarity index 100%
rename from includes/DataTypeFactory.php
rename to src/DataTypes/DataTypeFactory.php
diff --git a/includes/DataTypesModule.php b/src/DataTypes/DataTypesModule.php
similarity index 100%
rename from includes/DataTypesModule.php
rename to src/DataTypes/DataTypesModule.php
diff --git a/includes/modules/DataTypesModule.php 
b/src/DataTypes/Modules/DataTypesModule.php
similarity index 99%
rename from 

[MediaWiki-commits] [Gerrit] Update readme file - change (mediawiki...DataTypes)

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

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


Change subject: Update readme file
..

Update readme file

Change-Id: I3817f9d68d5c2a3606e59997a635d2284268984b
---
D README
A README.md
2 files changed, 70 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataTypes 
refs/changes/10/80010/1

diff --git a/README b/README
deleted file mode 100644
index fde66b8..000
--- a/README
+++ /dev/null
@@ -1,16 +0,0 @@
-These is the readme file for the DataTypes library.
-
-Extension page on mediawiki.org: 
https://www.mediawiki.org/wiki/Extension:DataTypes
-Latest version of the readme file: 
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/DataValues.git;a=blob;f=DataTypes/README
-
-== About ==
-
-DataTypes defines a collection of data types.
-A data type consists out of:
-
-* An unique type identifier
-* An internationalized label
-* Information which data value type is used for representing values of the 
data type
-* Zero or one ValueParser
-* Zero or one ValueFormatter
-* Zero or more ValueValidator objects
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 000..81f3164
--- /dev/null
+++ b/README.md
@@ -0,0 +1,70 @@
+# DataTypes
+
+PHP library defining the DataTypes\DataType class.
+
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-DataTypes.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-DataTypes)
+[![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-DataTypes/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-DataTypes?branch=master)
+[![Dependency 
Status](https://www.versioneye.com/package/php--data-values--data-types/badge.png)](https://www.versioneye.com/package/php--data-values--data-types)
+
+On [Packagist](https://packagist.org/packages/data-values/data-types):
+[![Latest Stable 
Version](https://poser.pugx.org/data-values/data-types/version.png)](https://packagist.org/packages/data-values/data-types)
+[![Download 
count](https://poser.pugx.org/data-values/data-types/d/total.png)](https://packagist.org/packages/data-values/data-types)
+
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:ValueValidators) 0.1 
or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `data-values/data-types` to your project's `composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+DataTypes 1.0:
+
+{
+require: {
+data-values/data-types: 1.0.*
+}
+}
+
+### Manual
+
+Get the DataTypes code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the DataTypes library by including its 
entry point:
+DataTypes.php.
+
+## Tests
+
+This library comes with a set up PHPUnit tests that cover all non-trivial 
code. You can run these
+tests using the PHPUnit configuration file found in the root directory. The 
tests can also be run
+via TravisCI, as a TravisCI configuration file is also provided in the root 
directory.
+
+## Authors
+
+DataTypes has been written by the Wikidata team at [Wikimedia 
Germany](https://wikimedia.de)
+for the [Wikidata project](https://wikidata.org/).
+
+## Release notes
+
+### 0.1 (under development)
+
+Initial release with these features:
+
+*
+
+## Links
+
+* [DataTypes on 
Packagist](https://packagist.org/packages/data-values/data-types)
+* [DataTypes on Ohloh](https://www.ohloh.net/p/DataTypesPHP)
+* [DataTypes on 
MediaWiki.org](https://www.mediawiki.org/wiki/Extension:DataTypes)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-DataTypes)
+* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-DataTypes/blob/master/README.md)
\ No newline at end of file

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

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

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

[MediaWiki-commits] [Gerrit] Remove verbose GPL headers - change (mediawiki...DataTypes)

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

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


Change subject: Remove verbose GPL headers
..

Remove verbose GPL headers

Change-Id: I10181c90d528cf48368d3c85900352494300f16c
---
M DataTypes.classes.php
M DataTypes.i18n.php
M DataTypes.mw.php
M DataTypes.php
M Resources.php
M includes/DataType.php
M includes/DataTypeFactory.php
M tests/modules/DataTypesModuleTest.php
M tests/phpunit/DataTypeFactoryTest.php
M tests/phpunit/DataTypeTest.php
10 files changed, 0 insertions(+), 150 deletions(-)


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

diff --git a/DataTypes.classes.php b/DataTypes.classes.php
index e45d78e..945bb1e 100644
--- a/DataTypes.classes.php
+++ b/DataTypes.classes.php
@@ -3,21 +3,6 @@
 /**
  * Class registration file for the DataTypes library.
  *
- * 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.1
  *
  * @file
diff --git a/DataTypes.i18n.php b/DataTypes.i18n.php
index bca4bbb..2f36f39 100644
--- a/DataTypes.i18n.php
+++ b/DataTypes.i18n.php
@@ -3,21 +3,6 @@
 /**
  * Internationalization file for the DataTypes 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.1
  *
  * @file
diff --git a/DataTypes.mw.php b/DataTypes.mw.php
index c6fb13d..e2e8b33 100644
--- a/DataTypes.mw.php
+++ b/DataTypes.mw.php
@@ -3,21 +3,6 @@
 /**
  * MediaWiki setup for the DataTypes 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.1
  *
  * @file
diff --git a/DataTypes.php b/DataTypes.php
index bcaa409..a5f5691 100644
--- a/DataTypes.php
+++ b/DataTypes.php
@@ -7,21 +7,6 @@
  * Support 
https://www.mediawiki.org/wiki/Extension_talk:DataTypes
  * Source code:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/DataValues.git
  *
- * 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.1
  *
  * @file
diff --git a/Resources.php b/Resources.php
index 

[MediaWiki-commits] [Gerrit] Make FakeConverter more realistic - change (mediawiki/core)

2013-08-20 Thread Liangent (Code Review)
Liangent has uploaded a new change for review.

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


Change subject: Make FakeConverter more realistic
..

Make FakeConverter more realistic

Spotted by Aude in I38298ceb.

Change-Id: I5c5605770077752cd189a5a5f1233949e6eec1d8
---
M languages/Language.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/11/80011/1

diff --git a/languages/Language.php b/languages/Language.php
index 262d86f..398d941 100644
--- a/languages/Language.php
+++ b/languages/Language.php
@@ -49,12 +49,14 @@
 */
public $mLang;
function __construct( $langobj ) { $this-mLang = $langobj; }
+   function autoConvert( $text, $variant = false ) { return $text; }
function autoConvertToAllVariants( $text ) { return array( 
$this-mLang-getCode() = $text ); }
function convert( $t ) { return $t; }
function convertTo( $text, $variant ) { return $text; }
function convertTitle( $t ) { return $t-getPrefixedText(); }
function convertNamespace( $ns ) { return 
$this-mLang-getFormattedNsText( $ns ); }
function getVariants() { return array( $this-mLang-getCode() ); }
+   function getVariantFallbacks() { return $this-mLang-getCode(); }
function getPreferredVariant() { return $this-mLang-getCode(); }
function getDefaultVariant() { return $this-mLang-getCode(); }
function getURLVariant() { return ''; }
@@ -66,6 +68,8 @@
function convertCategoryKey( $key ) { return $key; }
function convertLinkToAllVariants( $text ) { return 
$this-autoConvertToAllVariants( $text ); }
function armourMath( $text ) { return $text; }
+   function validateVariant( $variant = null ) { return $variant === 
$this-mLang-getCode() ? $variant : null; }
+   function translate( $text, $variant ) { return $text; }
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c5605770077752cd189a5a5f1233949e6eec1d8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liangent liang...@gmail.com

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


[MediaWiki-commits] [Gerrit] Remove verbose GPL headers - change (mediawiki...DataTypes)

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

Change subject: Remove verbose GPL headers
..


Remove verbose GPL headers

Change-Id: I10181c90d528cf48368d3c85900352494300f16c
---
M DataTypes.classes.php
M DataTypes.i18n.php
M DataTypes.mw.php
M DataTypes.php
M Resources.php
M includes/DataType.php
M includes/DataTypeFactory.php
M tests/modules/DataTypesModuleTest.php
M tests/phpunit/DataTypeFactoryTest.php
M tests/phpunit/DataTypeTest.php
10 files changed, 0 insertions(+), 150 deletions(-)

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



diff --git a/DataTypes.classes.php b/DataTypes.classes.php
index e45d78e..945bb1e 100644
--- a/DataTypes.classes.php
+++ b/DataTypes.classes.php
@@ -3,21 +3,6 @@
 /**
  * Class registration file for the DataTypes library.
  *
- * 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.1
  *
  * @file
diff --git a/DataTypes.i18n.php b/DataTypes.i18n.php
index bca4bbb..2f36f39 100644
--- a/DataTypes.i18n.php
+++ b/DataTypes.i18n.php
@@ -3,21 +3,6 @@
 /**
  * Internationalization file for the DataTypes 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.1
  *
  * @file
diff --git a/DataTypes.mw.php b/DataTypes.mw.php
index c6fb13d..e2e8b33 100644
--- a/DataTypes.mw.php
+++ b/DataTypes.mw.php
@@ -3,21 +3,6 @@
 /**
  * MediaWiki setup for the DataTypes 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.1
  *
  * @file
diff --git a/DataTypes.php b/DataTypes.php
index bcaa409..a5f5691 100644
--- a/DataTypes.php
+++ b/DataTypes.php
@@ -7,21 +7,6 @@
  * Support 
https://www.mediawiki.org/wiki/Extension_talk:DataTypes
  * Source code:
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/DataValues.git
  *
- * 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.1
  *
  * @file
diff --git a/Resources.php b/Resources.php
index 7df6f49..5fa6a12 100644
--- a/Resources.php
+++ b/Resources.php

[MediaWiki-commits] [Gerrit] Add Henning as author - change (mediawiki...DataTypes)

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

Change subject: Add Henning as author
..


Add Henning as author

Change-Id: Ibbefe218ee0c23ba76d866dff0f38d803bd80466
---
M DataTypes.mw.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/DataTypes.mw.php b/DataTypes.mw.php
index e2e8b33..9ca5306 100644
--- a/DataTypes.mw.php
+++ b/DataTypes.mw.php
@@ -26,7 +26,8 @@
'version' = DataTypes_VERSION,
'author' = array(
'[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
-   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]'
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
),
'url' = 'https://www.mediawiki.org/wiki/Extension:DataTypes',
'descriptionmsg' = 'datatypes-desc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibbefe218ee0c23ba76d866dff0f38d803bd80466
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataTypes
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add link to readme - change (mediawiki...Ask)

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

Change subject: Add link to readme
..


Add link to readme

Change-Id: I4191d33de8b2490729013510ab7c9a874717bc40
---
M README.md
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/README.md b/README.md
index 685db73..b0589a4 100644
--- a/README.md
+++ b/README.md
@@ -230,4 +230,5 @@
 * [Ask on Ohloh](https://www.ohloh.net/p/ask)
 * [Ask on MediaWiki.org](https://www.mediawiki.org/wiki/Extension:Ask)
 * [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Ask)
+* [NodeJS implementation of Ask](https://github.com/JeroenDeDauw/AskJS)
 * [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Ask/blob/master/README.md)
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4191d33de8b2490729013510ab7c9a874717bc40
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Ask
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] LanguageWithConversion fix - change (mediawiki...Wikibase)

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

Change subject: LanguageWithConversion fix
..


LanguageWithConversion fix

Should have been done when lazy Language initialization was added.

Change-Id: I7e90e752e1403da4bf154c05809d69fe1286a16d
---
M lib/includes/LanguageWithConversion.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Aude: Looks good to me, approved
  Jeroen De Dauw: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/includes/LanguageWithConversion.php 
b/lib/includes/LanguageWithConversion.php
index c8de917..802d568 100644
--- a/lib/includes/LanguageWithConversion.php
+++ b/lib/includes/LanguageWithConversion.php
@@ -251,7 +251,7 @@
$pieces = array_keys( $this-translatePool );
$block = implode( \0, $pieces );
$translatedBlock = 
$this-parentLanguage-getConverter()-translate(
-   $block, $this-language-getCode()
+   $block, $this-languageCode
);
$translatedPieces = explode( \0, $translatedBlock );
$this-translateCache += array_combine( $pieces, 
$translatedPieces );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e90e752e1403da4bf154c05809d69fe1286a16d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Liangent liang...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Denny Vrandecic denny.vrande...@wikimedia.de
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Liangent liang...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add Danwe and Henning to DataValues authors list - change (mediawiki...DataValues)

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

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


Change subject: Add Danwe and Henning to DataValues authors list
..

Add Danwe and Henning to DataValues authors list

Change-Id: I89d18378815604392e5fd6ba185a951178e7c501
---
M DataValues/DataValues.mw.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/DataValues/DataValues.mw.php b/DataValues/DataValues.mw.php
index 26fe42e..e9d4c95 100644
--- a/DataValues/DataValues.mw.php
+++ b/DataValues/DataValues.mw.php
@@ -18,7 +18,11 @@
'path' = __DIR__,
'name' = 'DataValues',
'version' = DataValues_VERSION,
-   'author' = array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw 
Jeroen De Dauw]' ),
+   'author' = array(
+   '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
+   ),
'url' = 'https://www.mediawiki.org/wiki/Extension:DataValues',
'descriptionmsg' = 'datavalues-desc',
 );

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

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

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


[MediaWiki-commits] [Gerrit] Add Danwe and Henning to DataValues authors list - change (mediawiki...DataValues)

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

Change subject: Add Danwe and Henning to DataValues authors list
..


Add Danwe and Henning to DataValues authors list

Change-Id: I89d18378815604392e5fd6ba185a951178e7c501
---
M DataValues/DataValues.mw.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/DataValues/DataValues.mw.php b/DataValues/DataValues.mw.php
index 26fe42e..e9d4c95 100644
--- a/DataValues/DataValues.mw.php
+++ b/DataValues/DataValues.mw.php
@@ -18,7 +18,11 @@
'path' = __DIR__,
'name' = 'DataValues',
'version' = DataValues_VERSION,
-   'author' = array( '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw 
Jeroen De Dauw]' ),
+   'author' = array(
+   '[https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw Jeroen De 
Dauw]',
+   '[https://www.mediawiki.org/wiki/User:Danwe Daniel Werner]',
+   '[http://www.snater.com H. Snater]',
+   ),
'url' = 'https://www.mediawiki.org/wiki/Extension:DataValues',
'descriptionmsg' = 'datavalues-desc',
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I89d18378815604392e5fd6ba185a951178e7c501
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Introduced GlobeCoordinateParser - change (mediawiki...DataValues)

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

Change subject: Introduced GlobeCoordinateParser
..


Introduced GlobeCoordinateParser

This new parser has the same behaviour as the old GeoCoordinateParser.
Now, the latter returns a simple LatLongValue and no longer does precision
detection. Existing behaviour of this component should not have changed
visibly to the outside.

Change-Id: I20012795ced95e8afda7f2c21fd32730dc408432
---
M ValueParsers/ValueParsers.classes.php
M ValueParsers/ValueParsers.php
M ValueParsers/includes/parsers/DdCoordinateParser.php
M ValueParsers/includes/parsers/DmCoordinateParser.php
M ValueParsers/includes/parsers/DmsCoordinateParser.php
M ValueParsers/includes/parsers/FloatCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParser.php
M ValueParsers/includes/parsers/GeoCoordinateParserBase.php
A ValueParsers/includes/parsers/GlobeCoordinateParser.php
M ValueParsers/tests/phpunit/api/ApiParseValueTest.php
M ValueParsers/tests/phpunit/parsers/DdCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/DmsCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/FloatCoordinateParserTest.php
M ValueParsers/tests/phpunit/parsers/GeoCoordinateParserTest.php
A ValueParsers/tests/phpunit/parsers/GlobeCoordinateParserTest.php
16 files changed, 420 insertions(+), 276 deletions(-)

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



diff --git a/ValueParsers/ValueParsers.classes.php 
b/ValueParsers/ValueParsers.classes.php
index 3e37476..756e007 100644
--- a/ValueParsers/ValueParsers.classes.php
+++ b/ValueParsers/ValueParsers.classes.php
@@ -26,6 +26,7 @@
'ValueParsers\FloatCoordinateParser' = 
'includes/parsers/FloatCoordinateParser.php',
'ValueParsers\GeoCoordinateParser' = 
'includes/parsers/GeoCoordinateParser.php',
'ValueParsers\GeoCoordinateParserBase' = 
'includes/parsers/GeoCoordinateParserBase.php',
+   'ValueParsers\GlobeCoordinateParser' = 
'includes/parsers/GlobeCoordinateParser.php',
'ValueParsers\FloatParser' = 'includes/parsers/FloatParser.php',
'ValueParsers\IntParser' = 'includes/parsers/IntParser.php',
'ValueParsers\NullParser' = 'includes/parsers/NullParser.php',
diff --git a/ValueParsers/ValueParsers.php b/ValueParsers/ValueParsers.php
index 06b2571..73e3abb 100644
--- a/ValueParsers/ValueParsers.php
+++ b/ValueParsers/ValueParsers.php
@@ -46,7 +46,7 @@
 
 $wgValueParsers['bool'] = 'ValueParsers\BoolParser';
 $wgValueParsers['float'] = 'ValueParsers\FloatParser';
-$wgValueParsers['globecoordinate'] = 'ValueParsers\GeoCoordinateParser';
+$wgValueParsers['globecoordinate'] = 'ValueParsers\GlobeCoordinateParser';
 $wgValueParsers['int'] = 'ValueParsers\IntParser';
 $wgValueParsers['null'] = 'ValueParsers\NullParser';
 
diff --git a/ValueParsers/includes/parsers/DdCoordinateParser.php 
b/ValueParsers/includes/parsers/DdCoordinateParser.php
index c6f0a87..1789236 100644
--- a/ValueParsers/includes/parsers/DdCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DdCoordinateParser.php
@@ -46,22 +46,6 @@
}
 
/**
-* @see GeoCoordinateParserBase::detectPrecision
-*/
-   protected function detectPrecision( $number ) {
-   // TODO: Implement localized decimal separator.
-   $split = explode( '.', $number );
-
-   $precision = 1;
-
-   if( isset( $split[1] ) ) {
-   $precision = pow( 10, -1 * strlen( $split[1] ) );
-   }
-
-   return $precision;
-   }
-
-   /**
 * @see GeoCoordinateParserBase::areValidCoordinates
 */
protected function areValidCoordinates( $normalizedCoordinateSegments ) 
{
diff --git a/ValueParsers/includes/parsers/DmCoordinateParser.php 
b/ValueParsers/includes/parsers/DmCoordinateParser.php
index 296af05..8039e36 100644
--- a/ValueParsers/includes/parsers/DmCoordinateParser.php
+++ b/ValueParsers/includes/parsers/DmCoordinateParser.php
@@ -38,33 +38,6 @@
}
 
/**
-* @see GeoCoordinateParserBase::detectPrecision
-*/
-   protected function detectPrecision( $number ) {
-   $minutes = $number * 60;
-
-   // Since we are in the DM parser, we know that precision needs 
at least to be an arcminute:
-   $precision = 1 / 60;
-
-   // The minute may be a float; In order to detect a proper 
precision, we convert the minutes
-   // to seconds.
-   if( $minutes - floor( $minutes )  0 ) {
-   $seconds = $minutes * 60;
-
-   $precision = 1 / 3600;
-
-   // TODO: Implement localized decimal separator.
-   $secondsSplit = explode( '.', $seconds );
-
-   if( isset( 

[MediaWiki-commits] [Gerrit] fix up path of check-raid.py for sudoers - change (operations/puppet)

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

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


Change subject: fix up path of check-raid.py for sudoers
..

fix up path of check-raid.py for sudoers

Change-Id: Ib26733d0b810f3ae5698e070d7db71c2baecc12f
---
M files/sudo/sudoers.appserver
M files/sudo/sudoers.search
M manifests/base.pp
3 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/files/sudo/sudoers.appserver b/files/sudo/sudoers.appserver
index 32d411b..7721d92 100644
--- a/files/sudo/sudoers.appserver
+++ b/files/sudo/sudoers.appserver
@@ -52,4 +52,4 @@
 # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 # %users  localhost=/sbin/shutdown -h now
 
-nagios ALL=NOPASSWD: /usr/bin/check-raid.py 
+nagios ALL=NOPASSWD: /usr/local/bin/check-raid.py 
diff --git a/files/sudo/sudoers.search b/files/sudo/sudoers.search
index 91dc8c2..db08f91 100644
--- a/files/sudo/sudoers.search
+++ b/files/sudo/sudoers.search
@@ -50,4 +50,4 @@
 # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 # %users  localhost=/sbin/shutdown -h now
 
-nagios ALL=NOPASSWD: /usr/bin/check-raid.py 
+nagios ALL=NOPASSWD: /usr/local/bin/check-raid.py 
diff --git a/manifests/base.pp b/manifests/base.pp
index 304478a..66c8482 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -450,8 +450,8 @@
group = root,
mode = 0440,
content = 
-nagios  ALL = (root) NOPASSWD: /usr/bin/check-raid.py
-icinga  ALL = (root) NOPASSWD: /usr/bin/check-raid.py
+nagios  ALL = (root) NOPASSWD: /usr/local/bin/check-raid.py
+icinga  ALL = (root) NOPASSWD: /usr/local/bin/check-raid.py
 nagios  ALL = (root) NOPASSWD: /usr/bin/arcconf getconfig 1
 icinga  ALL = (root) NOPASSWD: /usr/bin/arcconf getconfig 1
 ;

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

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

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


[MediaWiki-commits] [Gerrit] fix up path of check-raid.py for sudoers - change (operations/puppet)

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

Change subject: fix up path of check-raid.py for sudoers
..


fix up path of check-raid.py for sudoers

Change-Id: Ib26733d0b810f3ae5698e070d7db71c2baecc12f
---
M files/sudo/sudoers.appserver
M files/sudo/sudoers.search
M manifests/base.pp
3 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/files/sudo/sudoers.appserver b/files/sudo/sudoers.appserver
index 32d411b..7721d92 100644
--- a/files/sudo/sudoers.appserver
+++ b/files/sudo/sudoers.appserver
@@ -52,4 +52,4 @@
 # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 # %users  localhost=/sbin/shutdown -h now
 
-nagios ALL=NOPASSWD: /usr/bin/check-raid.py 
+nagios ALL=NOPASSWD: /usr/local/bin/check-raid.py 
diff --git a/files/sudo/sudoers.search b/files/sudo/sudoers.search
index 91dc8c2..db08f91 100644
--- a/files/sudo/sudoers.search
+++ b/files/sudo/sudoers.search
@@ -50,4 +50,4 @@
 # %users  ALL=/sbin/mount /cdrom,/sbin/umount /cdrom
 # %users  localhost=/sbin/shutdown -h now
 
-nagios ALL=NOPASSWD: /usr/bin/check-raid.py 
+nagios ALL=NOPASSWD: /usr/local/bin/check-raid.py 
diff --git a/manifests/base.pp b/manifests/base.pp
index 304478a..66c8482 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -450,8 +450,8 @@
group = root,
mode = 0440,
content = 
-nagios  ALL = (root) NOPASSWD: /usr/bin/check-raid.py
-icinga  ALL = (root) NOPASSWD: /usr/bin/check-raid.py
+nagios  ALL = (root) NOPASSWD: /usr/local/bin/check-raid.py
+icinga  ALL = (root) NOPASSWD: /usr/local/bin/check-raid.py
 nagios  ALL = (root) NOPASSWD: /usr/bin/arcconf getconfig 1
 icinga  ALL = (root) NOPASSWD: /usr/bin/arcconf getconfig 1
 ;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib26733d0b810f3ae5698e070d7db71c2baecc12f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: ArielGlenn ar...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Correct unicode range in legal title regular expression - change (mediawiki...VisualEditor)

2013-08-20 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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


Change subject: Correct unicode range in legal title regular expression
..

Correct unicode range in legal title regular expression

TODO: David will explain why in this commit message.

Change-Id: I674b89f757b60331dd1cb23fd7ff8b18775012e9
---
M modules/ve-mw/ui/inspectors/ve.ui.MWLinkInspector.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkInspector.js 
b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkInspector.js
index 05019cf..36a57d5 100644
--- a/modules/ve-mw/ui/inspectors/ve.ui.MWLinkInspector.js
+++ b/modules/ve-mw/ui/inspectors/ve.ui.MWLinkInspector.js
@@ -89,7 +89,7 @@
  *
  * @type {RegExp}
  */
-ve.ui.MWLinkInspector.static.legalTitle = /^[ 
%!$'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\u00FF+]+$/;
+ve.ui.MWLinkInspector.static.legalTitle = /^[ 
%!$'()*,\-.\/0-9:;=?@A-Z\\^_`a-z~\u0080-\u+]+$/;
 
 /* Registration */
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I674b89f757b60331dd1cb23fd7ff8b18775012e9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org
Gerrit-Reviewer: Divec da...@sheetmusic.org.uk

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


[MediaWiki-commits] [Gerrit] Added validation to QueryEntityDeserializer - change (mediawiki...WikibaseQuery)

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

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


Change subject: Added validation to QueryEntityDeserializer
..

Added validation to QueryEntityDeserializer

Change-Id: I169aab35421eff5278bfdc826b39eb6ce6e62ed0
---
M Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php
M src/Wikibase/Query/QueryEntityDeserializer.php
2 files changed, 269 insertions(+), 16 deletions(-)


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

diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php 
b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php
index 1044646..70662e1 100644
--- a/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php
+++ b/Tests/Phpunit/Wikibase/Query/QueryEntityDeserializerTest.php
@@ -251,4 +251,204 @@
);
}
 
+   /**
+* @dataProvider invalidIdProvider
+*/
+   public function testCannotDeserializeWithInvalidId( 
$invalidIdSerialization ) {
+   $serialization = $this-newQueryEntitySerialization();
+   $serialization['entity'] = $invalidIdSerialization;
+
+   $this-setExpectedException( 
'Deserializers\Exceptions\DeserializationException' );
+   $this-newQueryEntityDeserializer()-deserialize( 
$serialization );
+   }
+
+   public function invalidIdProvider() {
+   $argLists = array();
+
+   $argLists[] = array(
+   'foo'
+   );
+
+   $argLists[] = array(
+   array()
+   );
+
+   $argLists[] = array(
+   array( 'item' )
+   );
+
+   $argLists[] = array(
+   array( 'item', '42' )
+   );
+
+   $argLists[] = array(
+   array( 42, 42 )
+   );
+
+   $argLists[] = array(
+   array( 'item', 42, 'foo' )
+   );
+
+   $argLists[] = array(
+   array( array(), false )
+   );
+
+   return $argLists;
+   }
+
+   /**
+* @dataProvider invalidLabelsProvider
+*/
+   public function testCannotDeserializeWithInvalidLabels( 
$invalidLabelsSerialization ) {
+   $serialization = $this-newQueryEntitySerialization();
+   $serialization['label'] = $invalidLabelsSerialization;
+
+   $this-setExpectedException( 
'Deserializers\Exceptions\DeserializationException' );
+   $this-newQueryEntityDeserializer()-deserialize( 
$serialization );
+   }
+
+   public function invalidLabelsProvider() {
+   $argLists = array();
+
+   $argLists[] = array(
+   'foo'
+   );
+
+   $argLists[] = array(
+   array( array() )
+   );
+
+   $argLists[] = array(
+   array( 'de' = array( 'foo' ) )
+   );
+
+   $argLists[] = array(
+   42 = 'foo'
+   );
+
+   $argLists[] = array(
+   'en' = 'foo',
+   'bar'
+   );
+
+   $argLists[] = array(
+   'en' = 'foo',
+   'de' = false
+   );
+
+   return $argLists;
+   }
+
+   /**
+* @dataProvider invalidLabelsProvider
+*/
+   public function testCannotDeserializeWithInvalidDescriptions( 
$invalidDescriptionsSerialization ) {
+   $serialization = $this-newQueryEntitySerialization();
+   $serialization['description'] = 
$invalidDescriptionsSerialization;
+
+   $this-setExpectedException( 
'Deserializers\Exceptions\DeserializationException' );
+   $this-newQueryEntityDeserializer()-deserialize( 
$serialization );
+   }
+
+   /**
+* @dataProvider invalidAliasesProvider
+*/
+   public function testCannotDeserializeWithInvalidAliases( 
$invalidAliasesSerialization ) {
+   $serialization = $this-newQueryEntitySerialization();
+   $serialization['aliases'] = $invalidAliasesSerialization;
+
+   $this-setExpectedException( 
'Deserializers\Exceptions\DeserializationException' );
+   $this-newQueryEntityDeserializer()-deserialize( 
$serialization );
+   }
+
+   public function invalidAliasesProvider() {
+   $argLists = array();
+
+   $argLists[] = array(
+   'foo'
+   );
+
+   $argLists[] = array(
+   array( array() )
+   );
+
+   $argLists[] = array(
+   array( 'de' = 'foo' )
+   );
+
+   

[MediaWiki-commits] [Gerrit] Implement Serializer and Deserializer interfaces - change (mediawiki...WikibaseQuery)

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

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


Change subject: Implement Serializer and Deserializer interfaces
..

Implement Serializer and Deserializer interfaces

Change-Id: Ie2bbbee182c69da3d3e95fe139482db19da4b811
---
M Tests/Phpunit/Wikibase/Query/QueryEntitySerializerTest.php
M src/Wikibase/Query/QueryEntityDeserializer.php
M src/Wikibase/Query/QueryEntitySerializer.php
3 files changed, 22 insertions(+), 2 deletions(-)


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

diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntitySerializerTest.php 
b/Tests/Phpunit/Wikibase/Query/QueryEntitySerializerTest.php
index 7b6dd42..50af9ad 100644
--- a/Tests/Phpunit/Wikibase/Query/QueryEntitySerializerTest.php
+++ b/Tests/Phpunit/Wikibase/Query/QueryEntitySerializerTest.php
@@ -70,6 +70,21 @@
return $argLists;
}
 
+   /**
+* @dataProvider notAQueryEntityProvider
+*/
+   public function testCannotSerialize( $notAQueryEntity ) {
+   $serializer = $this-newSimpleQueryEntitySerializer();
+
+   $this-assertFalse( $serializer-canSerialize( $notAQueryEntity 
) );
+   }
+
+   public function testCanSerialize() {
+   $queryEntity = $this-newSimpleEntity();
+   $serializer = $this-newSimpleQueryEntitySerializer();
+   $this-assertTrue( $serializer-canSerialize( $queryEntity ) );
+   }
+
public function testSerializationCallsQuerySerialization() {
$querySerializer = $this-getMock( 'Serializers\Serializer' );
 
diff --git a/src/Wikibase/Query/QueryEntityDeserializer.php 
b/src/Wikibase/Query/QueryEntityDeserializer.php
index c799187..1a05fcc 100644
--- a/src/Wikibase/Query/QueryEntityDeserializer.php
+++ b/src/Wikibase/Query/QueryEntityDeserializer.php
@@ -17,7 +17,7 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  * @author Adam Shorland  adamshorl...@gmail.com 
  */
-class QueryEntityDeserializer {
+class QueryEntityDeserializer implements Deserializer {
 
protected $queryDeserializer;
 
diff --git a/src/Wikibase/Query/QueryEntitySerializer.php 
b/src/Wikibase/Query/QueryEntitySerializer.php
index 919dab0..fd57838 100644
--- a/src/Wikibase/Query/QueryEntitySerializer.php
+++ b/src/Wikibase/Query/QueryEntitySerializer.php
@@ -16,7 +16,7 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  * @author Adam Shorland  adamshorl...@gmail.com 
  */
-class QueryEntitySerializer {
+class QueryEntitySerializer implements Serializer {
 
protected $querySerializer;
 
@@ -66,4 +66,9 @@
return $serializedClaims;
}
 
+
+   public function canSerialize( $mixed ) {
+   return $mixed instanceof QueryEntity;
+   }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie2bbbee182c69da3d3e95fe139482db19da4b811
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikibaseQuery
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] WIP: Show an autonym for languages that don't have input met... - change (mediawiki...UniversalLanguageSelector)

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

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


Change subject: WIP: Show an autonym for languages that don't have input methods
..

WIP: Show an autonym for languages that don't have input methods

This change requires he merging of this upstream pull request:
https://github.com/wikimedia/jquery.ime/pull/265

Bug: 51025
Change-Id: I4a6cc9a79f186941cc79533de90ab0fb7e104673
---
M lib/jquery.ime/jquery.ime.js
M resources/js/ext.uls.ime.js
2 files changed, 13 insertions(+), 4 deletions(-)


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

diff --git a/lib/jquery.ime/jquery.ime.js b/lib/jquery.ime/jquery.ime.js
index d823850..8cf5f74 100644
--- a/lib/jquery.ime/jquery.ime.js
+++ b/lib/jquery.ime/jquery.ime.js
@@ -1052,15 +1052,17 @@
 * @return {string|bool} Selected input method id or false
 */
selectLanguage: function ( languageCode ) {
-   var ime,
+   var ime = this.$element.data( 'ime' ),
imePref = $.ime.preferences.getIM( languageCode 
),
language = $.ime.languages[languageCode];
 
if ( !language ) {
+   if ( $.isFunction( ime.options.getAutonym ) ) {
+   this.setMenuTitle( 
ime.options.getAutonym( languageCode ) );
+   }
+
return false;
}
-
-   ime = this.$element.data( 'ime' );
 
if ( ime.getLanguage() === languageCode ) {
// Nothing to do. It is same as the current 
language,
@@ -1075,7 +1077,7 @@
this.$menu.find( 'li.ime-lang' ).show();
this.$menu.find( 'li[lang=' + languageCode + ']' 
).hide();
 
-   this.$menu.find( '.ime-list-title' ).text( 
language.autonym );
+   this.setMenuTitle( language.autonym );
this.prepareInputMethods( languageCode );
this.hide();
// And select the default inputmethod
@@ -1086,6 +1088,10 @@
return $.ime.preferences.getIM( languageCode );
},
 
+   setMenuTitle: function ( title ) {
+   this.$menu.find( '.ime-list-title' ).text( title );
+   },
+
/**
 * Decide on initial language to select
 */
diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index 38683a9..32b59bd 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -179,6 +179,9 @@
$.extend( $.ime.preferences, ulsIMEPreferences );
// MediaWiki specific overrides for jquery.ime
$.extend( $.ime.defaults, {
+   getAutonym: function ( langCode ) {
+   return $.uls.data.getAutonym( langCode );
+   },
imePath: mwImeRulesPath
} );
// Load the ime preferences

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a6cc9a79f186941cc79533de90ab0fb7e104673
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Amire80 amir.ahar...@mail.huji.ac.il
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove parts of rendered page from search. - change (mediawiki...CirrusSearch)

2013-08-20 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Remove parts of rendered page from search.
..

Remove parts of rendered page from search.

We remove the toc, the edit tokens, and the contents of video tags
from search.  Like the contents of the script tags that are stripped
when removing html tags we just don't want to search (or highlight!)
these.

Change-Id: Idf7b6b4e56422e0510bdcd3a4c7aecf24f8d72ca
---
M CirrusSearch.body.php
1 file changed, 29 insertions(+), 1 deletion(-)


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

diff --git a/CirrusSearch.body.php b/CirrusSearch.body.php
index 458b9da..199d348 100644
--- a/CirrusSearch.body.php
+++ b/CirrusSearch.body.php
@@ -26,6 +26,13 @@
const CONTENT_INDEX_TYPE = 'content';
const GENERAL_INDEX_TYPE = 'general';
/**
+* Regex to remove text we don't want to search but that isn't already
+* removed when stripping HTML or the toc.
+*/
+   const SANITIZE = '/
+   video .*?\/video  # remove the sorry, not supported message
+   /x';
+   /**
 * Maximum title length that we'll check in prefix search.  Since 
titles can
 * be 255 bytes in length we're setting this to 255 characters but this
 * might cause bloat in the title's prefix index so we'll have to keep 
an
@@ -450,7 +457,11 @@
switch ( $c-getModel() ) {
case CONTENT_MODEL_WIKITEXT:
$article = new Article( $t, 0 );
-   $text = 
$article-getParserOutput()-getText();
+   $parserOutput = 
$article-getParserOutput();
+   $parserOutput-setEditSectionTokens( 
false );   // Don't add edit tokens
+   $text = $parserOutput-getText();   
// Fetch the page
+   $text = $this-stripToc( $text );   
// Strip the table of contents
+   $text = preg_replace( self::SANITIZE, 
'', $text );  // Strip other non-searchable text
break;
default:
$text = SearchUpdate::updateText( $text 
);
@@ -463,6 +474,23 @@
public function textAlreadyUpdatedForIndex() {
return true;
}
+
+   /**
+* Strip the table of contents from a rendered page.  Note that we 
don't use
+* regexes for this because we're removing whole lines.
+*
+* @var $text string the rendered page
+* @return string the rendered page without the toc
+*/
+   private function stripToc( $text ) {
+   $t = explode( \n, $text );
+   $t = array_filter( $t, function( $line ) {
+   return strpos( $line, 'id=toctitle' ) === false   
// Strip the beginning of the toc
+strpos( $line, 'class=tocnumber') === false 
 // And any lines with toc numbers
+strpos( $line, 'class=toctext') === false;   
  // And finally lines with toc text
+   });
+   return implode( \n, $t );
+   }
 }
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf7b6b4e56422e0510bdcd3a4c7aecf24f8d72ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: Manybubbles never...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make use of LatLongValue rather then GeoCoordinateValue - change (mediawiki...Maps)

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

Change subject: Make use of LatLongValue rather then GeoCoordinateValue
..


Make use of LatLongValue rather then GeoCoordinateValue

Change-Id: I7a8368487b23d09a873bb942aeca273b6e8a554e
---
M includes/Geocoders.php
M includes/Maps_GeoFunctions.php
M includes/elements/Circle.php
M includes/elements/ImageOverlay.php
M includes/elements/Line.php
M includes/elements/Location.php
M includes/elements/Rectangle.php
M includes/parserhooks/Maps_Finddestination.php
M includes/parserhooks/Maps_Geocode.php
M includes/parserhooks/Maps_Geodistance.php
M includes/parsers/LineParser.php
M includes/parsers/LocationParser.php
M tests/phpunit/ElementTest.php
M tests/phpunit/elements/CircleTest.php
M tests/phpunit/elements/LineTest.php
M tests/phpunit/elements/LocationTest.php
M tests/phpunit/elements/RectangleTest.php
M tests/phpunit/parserhooks/CoordinatesTest.php
M tests/phpunit/parserhooks/DisplayMapTest.php
M tests/phpunit/parserhooks/GeocodeTest.php
M tests/phpunit/parserhooks/GeodistanceTest.php
M tests/phpunit/parsers/LineParserTest.php
M tests/phpunit/parsers/LocationParserTest.php
23 files changed, 112 insertions(+), 112 deletions(-)

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



diff --git a/includes/Geocoders.php b/includes/Geocoders.php
index e8f3390..8d063e6 100644
--- a/includes/Geocoders.php
+++ b/includes/Geocoders.php
@@ -2,7 +2,7 @@
 
 namespace Maps;
 
-use DataValues\GeoCoordinateValue;
+use DataValues\LatLongValue;
 use MWException;
 use ValueParsers\ParseException;
 
@@ -20,7 +20,7 @@
  * @author Jeroen De Dauw  jeroended...@gmail.com 
  */
 final class Geocoders {
-   
+
/**
 * Associative with geoservice identifiers as keys containing instances 
of
 * the geocoder classes. 
@@ -125,7 +125,7 @@
 * @param string|false $mappingService
 * @param boolean $checkForCoords
 *
-* @return GeoCoordinateValue|false
+* @return LatLongValue|false
 */
public static function attemptToGeocode( $coordsOrAddress, $geoservice 
= '', $mappingService = false, $checkForCoords = true ) {
if ( $checkForCoords ) {
@@ -198,7 +198,7 @@
 * @param string $geoService
 * @param string|false $mappingService
 * 
-* @return GeoCoordinateValue|false
+* @return LatLongValue|false
 * @throws MWException
 */
public static function geocode( $address, $geoService = '', 
$mappingService = false ) {
@@ -222,7 +222,7 @@

// This means the cache returned an already computed 
set of coordinates.
if ( $cacheResult !== false ) {
-   assert( $cacheResult instanceof 
GeoCoordinateValue );
+   assert( $cacheResult instanceof LatLongValue );
return $cacheResult;
}   
}
@@ -240,7 +240,7 @@
return false;
}
 
-   $coordinates = new GeoCoordinateValue(
+   $coordinates = new LatLongValue(
$coordinates['lat'],
$coordinates['lon']
);
@@ -258,7 +258,7 @@
 * 
 * @param string $address
 * 
-* @return GeoCoordinateValue|boolean false
+* @return LatLongValue|boolean false
 */
protected static function cacheRead( $address ) {
global $egMapsEnableGeoCache;
@@ -277,9 +277,9 @@
 * @since 0.7
 * 
 * @param string $address
-* @param GeoCoordinateValue $coordinates
+* @param LatLongValue $coordinates
 */
-   protected static function cacheWrite( $address, GeoCoordinateValue 
$coordinates ) {
+   protected static function cacheWrite( $address, LatLongValue 
$coordinates ) {
global $egMapsEnableGeoCache;

// Add the obtained coordinates to the cache when there is a 
result and the cache is enabled.
diff --git a/includes/Maps_GeoFunctions.php b/includes/Maps_GeoFunctions.php
index 7d4fc05..7d8aa89 100644
--- a/includes/Maps_GeoFunctions.php
+++ b/includes/Maps_GeoFunctions.php
@@ -1,7 +1,7 @@
 ?php
 
 // The approximate radius of the earth in meters, according to 
http://en.wikipedia.org/wiki/Earth_radius.
-use DataValues\GeoCoordinateValue;
+use DataValues\LatLongValue;
 
 define( 'Maps_EARTH_RADIUS', 6371000 );
 
@@ -26,12 +26,12 @@
 * 
 * @since 2.0
 * 
-* @param GeoCoordinateValue $start
-* @param GeoCoordinateValue $end
+* @param LatLongValue $start
+* @param LatLongValue $end
 * 
 * @return float Distance in m.
 */
-   public static function 

[MediaWiki-commits] [Gerrit] Match GlobeCoordinateValue chanes in DataValues - change (mediawiki...WikibaseQueryEngine)

2013-08-20 Thread Henning Snater (Code Review)
Henning Snater has submitted this change and it was merged.

Change subject: Match GlobeCoordinateValue chanes in DataValues
..


Match GlobeCoordinateValue chanes in DataValues

Depends on https://gerrit.wikimedia.org/r/79992

Change-Id: I39debcea282eef6999050002e9e4254461211a6b
---
M src/SQLStore/DVHandler/GeoCoordinateHandler.php
M tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
2 files changed, 17 insertions(+), 21 deletions(-)

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



diff --git a/src/SQLStore/DVHandler/GeoCoordinateHandler.php 
b/src/SQLStore/DVHandler/GeoCoordinateHandler.php
index aa49ad7..281a56e 100644
--- a/src/SQLStore/DVHandler/GeoCoordinateHandler.php
+++ b/src/SQLStore/DVHandler/GeoCoordinateHandler.php
@@ -3,14 +3,14 @@
 namespace Wikibase\QueryEngine\SQLStore\DVHandler;
 
 use DataValues\DataValue;
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
 use InvalidArgumentException;
 use Wikibase\Database\FieldDefinition;
 use Wikibase\Database\TableDefinition;
 use Wikibase\QueryEngine\SQLStore\DataValueHandler;
 
 /**
- * Represents the mapping between DataValues\GeoCoordinateValue and
+ * Represents the mapping between DataValues\GlobeCoordinateValue and
  * the corresponding table in the store.
  *
  * @since 0.1
@@ -33,7 +33,7 @@
 * @return DataValue
 */
public function newDataValueFromValueField( $valueFieldValue ) {
-   return GeoCoordinateValue::newFromArray( json_decode( 
$valueFieldValue, true ) );
+   return GlobeCoordinateValue::newFromArray( json_decode( 
$valueFieldValue, true ) );
}
 
/**
@@ -47,8 +47,8 @@
 * @throws InvalidArgumentException
 */
public function getWhereConditions( DataValue $value ) {
-   if ( !( $value instanceof GeoCoordinateValue ) ) {
-   throw new InvalidArgumentException( 'Value is not a 
GeoCoordinateValue' );
+   if ( !( $value instanceof GlobeCoordinateValue ) ) {
+   throw new InvalidArgumentException( 'Value is not a 
GlobeCoordinateValue' );
}
 
return array(
@@ -69,26 +69,21 @@
 * @throws InvalidArgumentException
 */
public function getInsertValues( DataValue $value ) {
-   if ( !( $value instanceof GeoCoordinateValue ) ) {
-   throw new InvalidArgumentException( 'Value is not a 
GeoCoordinateValue' );
+   if ( !( $value instanceof GlobeCoordinateValue ) ) {
+   throw new InvalidArgumentException( 'Value is not a 
GlobeCoordinateValue' );
}
 
$values = array(
'lat' = $value-getLatitude(),
'lon' = $value-getLongitude(),
 
+   'precision' = $value-getPrecision(),
+   'globe' = $value-getGlobe(),
+
// Note: the code in this package is not dependent on 
MW.
// So do not replace this with FormatJSON::encode.
'json' = json_encode( $value-getArrayValue() ),
);
-
-   if ( $value-getAltitude() !== null ) {
-   $values['alt'] = $value-getAltitude();
-   }
-
-   if ( $value-getGlobe() !== null ) {
-   $values['globe'] = $value-getGlobe();
-   }
 
return $values;
}
diff --git a/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php 
b/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
index 5ecaf32..fcb3d9d 100644
--- a/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
+++ b/tests/phpunit/SQLStore/DVHandler/GeoCoordinateHandlerTest.php
@@ -2,7 +2,8 @@
 
 namespace Wikibase\QueryEngine\Tests\SQLStore\DVHandler;
 
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
+use DataValues\LatLongValue;
 use Wikibase\QueryEngine\SQLStore\DataValueHandler;
 use Wikibase\QueryEngine\SQLStore\DataValueHandlers;
 use Wikibase\QueryEngine\Tests\SQLStore\DataValueHandlerTest;
@@ -44,15 +45,15 @@
 *
 * @since 0.1
 *
-* @return GeoCoordinateValue[]
+* @return GlobeCoordinateValue[]
 */
protected function getValues() {
$values = array();
 
-   $values[] = new GeoCoordinateValue( 0, 0 );
-   $values[] = new GeoCoordinateValue( 23, 42 );
-   $values[] = new GeoCoordinateValue( 2.3, 4.2, 9000.1 );
-   $values[] = new GeoCoordinateValue( -2.3, -4.2, -9000.1, null, 
'mars' );
+   $values[] = new GlobeCoordinateValue( new LatLongValue( 0, 0 ), 
1 );
+   $values[] = new GlobeCoordinateValue( new LatLongValue( 23, 42 
), 0.1 );
+   $values[] = new 

[MediaWiki-commits] [Gerrit] Match GlobeCoordinateValue chanes in DataValues - change (mediawiki...Wikibase)

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

Change subject: Match GlobeCoordinateValue chanes in DataValues
..


Match GlobeCoordinateValue chanes in DataValues

Depends on https://gerrit.wikimedia.org/r/79992

Change-Id: Ieed337f516d643cfab21df955286d1d0ae9afc58
---
M lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
1 file changed, 9 insertions(+), 7 deletions(-)

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



diff --git a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php 
b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
index bec672f..5079bc8 100644
--- a/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
+++ b/lib/tests/phpunit/WikibaseDataTypeBuildersTest.php
@@ -19,7 +19,8 @@
 
 use DataTypes\DataType;
 use DataTypes\DataTypeFactory;
-use DataValues\GeoCoordinateValue;
+use DataValues\GlobeCoordinateValue;
+use DataValues\LatLongValue;
 use DataValues\NumberValue;
 use DataValues\StringValue;
 use DataValues\TimeValue;
@@ -110,14 +111,15 @@
//TODO: must be from a list of configured values
 
//globe-coordinate
-   array( 'globe-coordinate', 'Foo', false, 
'GeoCoordinateValue expected, string supplied' ),
-   array( 'globe-coordinate', new NumberValue( 7 ), false, 
'GeoCoordinateValue expected' ),
+   array( 'globe-coordinate', 'Foo', false, 
'GlobeCoordinateValue expected, string supplied' ),
+   array( 'globe-coordinate', new NumberValue( 7 ), false, 
'GlobeCoordinateValue expected' ),
 
//globe-coordinate[globe]
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, '' ), false, 'globe: empty string should be invalid' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, 'http://' . str_repeat('x', 256) ), false, 'globe: too long' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, 'http://acme.com/globe' ), true, 'globe: URL' ),
-   array( 'globe-coordinate', new GeoCoordinateValue( 0, 
0, 0, 0, ' http://acme.com/globe ' ), false, 'globe: untrimmed' ),
+   // FIXME: this is testing unimplemented behaviour? 
Probably broken...
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, '' ), false, 'globe: empty string should be 
invalid' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, 'http://' . str_repeat('x', 256) ), false, 'globe: 
too long' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, 'http://acme.com/globe' ), true, 'globe: URL' ),
+   array( 'globe-coordinate', new GlobeCoordinateValue( 
new LatLongValue( 0, 0 ), 1, ' http://acme.com/globe ' ), false, 'globe: 
untrimmed' ),
//TODO: must be an item reference
//TODO: must be from a list of configured values
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieed337f516d643cfab21df955286d1d0ae9afc58
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Get rid of manual autoloading and pointless test runner - change (mediawiki...DataValues)

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

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


Change subject: Get rid of manual autoloading and pointless test runner
..

Get rid of manual autoloading and pointless test runner

Change-Id: I88aba9eb3da845e8d29f7daeabe0ed8954ba3028
---
D DataValues/DataValues.classes.php
M DataValues/DataValues.php
R DataValues/interfaces/Comparable.php
R DataValues/interfaces/Copyable.php
R DataValues/interfaces/Hashable.php
R DataValues/interfaces/Immutable.php
M DataValues/phpunit.xml.dist
R DataValues/src/BooleanValue.php
R DataValues/src/DataValue.php
R DataValues/src/DataValueFactory.php
R DataValues/src/DataValueObject.php
R DataValues/src/GlobeCoordinateValue.php
R DataValues/src/IllegalValueException.php
R DataValues/src/IriValue.php
R DataValues/src/LatLongValue.php
R DataValues/src/MonolingualTextValue.php
R DataValues/src/MultilingualTextValue.php
R DataValues/src/NumberValue.php
R DataValues/src/QuantityValue.php
R DataValues/src/StringValue.php
R DataValues/src/TimeValue.php
R DataValues/src/UnDeserializableValue.php
R DataValues/src/UnknownValue.php
R DataValues/tests/phpunit/BooleanValueTest.php
R DataValues/tests/phpunit/DataValueFactoryTest.php
R DataValues/tests/phpunit/DataValueTest.php
R DataValues/tests/phpunit/GlobeCoordinateValueTest.php
R DataValues/tests/phpunit/IriValueTest.php
R DataValues/tests/phpunit/LatLongValueTest.php
R DataValues/tests/phpunit/MonolingualTextValueTest.php
R DataValues/tests/phpunit/MultilingualTextValueTest.php
R DataValues/tests/phpunit/NumberValueTest.php
R DataValues/tests/phpunit/QuantityValueTest.php
R DataValues/tests/phpunit/StringValueTest.php
R DataValues/tests/phpunit/TimeValueTest.php
R DataValues/tests/phpunit/UnDeserializableValueTest.php
R DataValues/tests/phpunit/UnknownValueTest.php
D DataValues/tests/phpunit/phpunit.php
M DataValues/tests/testLoader.php
39 files changed, 56 insertions(+), 88 deletions(-)


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

diff --git a/DataValues/DataValues.classes.php 
b/DataValues/DataValues.classes.php
deleted file mode 100644
index 97bd64b..000
--- a/DataValues/DataValues.classes.php
+++ /dev/null
@@ -1,40 +0,0 @@
-?php
-
-/**
- * Class registration file for the DataValues library.
- *
- * @since 0.1
- *
- * @file
- * @ingroup DataValues
- *
- * @licence GNU GPL v2+
- * @author Jeroen De Dauw  jeroended...@gmail.com 
- */
-return array(
-   'DataValues\BooleanValue' = 'includes/values/BooleanValue.php',
-   'DataValues\GlobeCoordinateValue' = 
'includes/values/GlobeCoordinateValue.php',
-   'DataValues\IriValue' = 'includes/values/IriValue.php',
-   'DataValues\LatLongValue' = 'includes/values/LatLongValue.php',
-   'DataValues\MonolingualTextValue' = 
'includes/values/MonolingualTextValue.php',
-   'DataValues\MultilingualTextValue' = 
'includes/values/MultilingualTextValue.php',
-   'DataValues\NumberValue' = 'includes/values/NumberValue.php',
-   'DataValues\QuantityValue' = 'includes/values/QuantityValue.php',
-   'DataValues\StringValue' = 'includes/values/StringValue.php',
-   'DataValues\TimeValue' = 'includes/values/TimeValue.php',
-   'DataValues\UnknownValue' = 'includes/values/UnknownValue.php',
-   'DataValues\UnDeserializableValue' = 
'includes/values/UnDeserializableValue.php',
-
-   'DataValues\DataValue' = 'includes/DataValue.php',
-   'DataValues\DataValueFactory' = 'includes/DataValueFactory.php',
-   'DataValues\DataValueObject' = 'includes/DataValueObject.php',
-
-   'DataValues\IllegalValueException' = 
'includes/IllegalValueException.php',
-
-   'Comparable' = 'includes/Comparable.php',
-   'Copyable' = 'includes/Copyable.php',
-   'Hashable' = 'includes/Hashable.php',
-   'Immutable' = 'includes/Immutable.php',
-
-   'DataValues\Test\DataValueTest' = 
'tests/phpunit/includes/DataValueTest.php',
-);
diff --git a/DataValues/DataValues.php b/DataValues/DataValues.php
index bf2ea79..e729c27 100644
--- a/DataValues/DataValues.php
+++ b/DataValues/DataValues.php
@@ -37,17 +37,30 @@
 define( 'DataValues_VERSION', '0.1 alpha' );
 
 spl_autoload_register( function ( $className ) {
-   // @codeCoverageIgnoreStart
-   static $classes = false;
-
-   if ( $classes === false ) {
-   $classes = include( __DIR__ . '/' . 'DataValues.classes.php' );
+   if ( in_array( $className, array( 'Comparable', 'Copyable', 'Hashable', 
'Immutable' ) ) ) {
+   require_once __DIR__ . '/interfaces/' . $className . '.php';
+   return;
}
 
-   if ( array_key_exists( $className, $classes ) ) {
-   include_once __DIR__ . '/' . $classes[$className];
+   $className = ltrim( $className, '\\' );
+   $fileName = '';
+   $namespace = '';
+
+   if ( $lastNsPos = strripos( $className, '\\') ) {
+ 

[MediaWiki-commits] [Gerrit] Remove adittions to deprecated global variable that are not ... - change (mediawiki...DataValues)

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

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


Change subject: Remove adittions to deprecated global variable that are not in 
use anyway
..

Remove adittions to deprecated global variable that are not in use anyway

Change-Id: Id832245e4d75864efc6a7f9bde6528ce968a412b
---
M DataValues/DataValues.php
1 file changed, 1 insertion(+), 8 deletions(-)


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

diff --git a/DataValues/DataValues.php b/DataValues/DataValues.php
index bf2ea79..31d1d93 100644
--- a/DataValues/DataValues.php
+++ b/DataValues/DataValues.php
@@ -60,13 +60,6 @@
  */
 $wgDataValues = array();
 
-$wgDataValues['boolean'] = 'DataValues\BooleanValue';
 $wgDataValues['globecoordinate'] = 'DataValues\GlobeCoordinateValue';
-$wgDataValues['iri'] = 'DataValues\IriValue';
-$wgDataValues['monolingualtext'] = 'DataValues\MonolingualTextValue';
-$wgDataValues['multilingualtext'] = 'DataValues\MultilingualTextValue';
-$wgDataValues['number'] = 'DataValues\NumberValue';
-$wgDataValues['quantity'] = 'DataValues\QuantityValue';
 $wgDataValues['string'] = 'DataValues\StringValue';
-$wgDataValues['time'] = 'DataValues\TimeValue';
-$wgDataValues['unknown'] = 'DataValues\UnknownValue';
+$wgDataValues['time'] = 'DataValues\TimeValue';
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id832245e4d75864efc6a7f9bde6528ce968a412b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
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] Test remove parts of rendered page from search. - change (mediawiki...CirrusSearch)

2013-08-20 Thread Manybubbles (Code Review)
Manybubbles has uploaded a new change for review.

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


Change subject: Test remove parts of rendered page from search.
..

Test remove parts of rendered page from search.

This requires instant commons and proper ogg support which already is
setup in beta but needs to be setup on newly built instances.  I've added
some instructions for that as well.

Change-Id: I942b42645544be60fb82a6d64d72034cd3a285f2
---
M tests/browser/README
M tests/browser/features/full_text.feature
M tests/browser/features/support/build_pages.rb
3 files changed, 58 insertions(+), 21 deletions(-)


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

diff --git a/tests/browser/README b/tests/browser/README
index 9f68200..b438922 100644
--- a/tests/browser/README
+++ b/tests/browser/README
@@ -27,6 +27,36 @@
 While you could technically just change config.yml that wouldn't be a good idea
 because it'd be too easy to accidentally commit your password.
 
+Some tests use instant commans.  You should make sure mediawiki is configured
+to allow this.  If you are using this:
+https://wikitech.wikimedia.org/wiki/Help:Single_Node_MediaWiki
+then you'll just need to switch
+ $wgUseInstantCommons = false;
+to
+ $wgUseInstantCommons = true;
+in orig/LocalSettings.php
+
+And some tests require Ogg support.  Install it too  On single node
+mediawiki you can do this:
+ pushd /srv/
+ if [ ! -d TimedMediaHandler ]; then git clone 
https://gerrit.wikimedia.org/r/mediawiki/extensions/TimedMediaHandler; fi
+ if [ ! -d MwEmbedSupport ]; then git clone 
https://gerrit.wikimedia.org/r/mediawiki/extensions/MwEmbedSupport; fi
+ pushd mediawiki/extensions
+ if [ ! -d TimedMediaHandler ]; then ln -s ../../TimedMediaHandler; fi
+ if [ ! -d MwEmbedSupport ]; then ln -s ../../MwEmbedSupport; fi
+ sudo su -c 'crontab -u www-data -l'  /tmp/www-data-crontab
+ echo '* * * * * php /srv/mediawiki/maintenance/runJobs.php --type 
webVideoTranscode --maxjobs 1  /tmp/mw-transcode-log'  /tmp/www-data-crontab
+ echo '0 0 * * * rm /tmp/mw-transcode-log'  /tmp/www-data-crontab
+ sort /tmp/www-data-crontab | uniq | sudo su -c 'crontab -u www-data -'
+ rm /tmp/www-data-crontab
+ sudo apt-get install -y oggvideotools ffmpeg ffmpeg2theora libav-tools 
libavcodec-extra-53
+ popd
+ popd
+Then add this to your localsettings:
+ require( $IP/extensions/MwEmbedSupport/MwEmbedSupport.php );
+ require( $IP/extensions/TimedMediaHandler/TimedMediaHandler.php );
+ $wgOggThumbLocation = '/usr/bin/oggThumb';
+
 Running
 ---
 If you want to run tests against anything other than
diff --git a/tests/browser/features/full_text.feature 
b/tests/browser/features/full_text.feature
index 7dd0410..9e4557d 100644
--- a/tests/browser/features/full_text.feature
+++ b/tests/browser/features/full_text.feature
@@ -7,27 +7,33 @@
 And first_result the first search result
 But Two Words is two_words_is_in the search results
   Examples:
-| term | first_result  
| two_words_is_in |
-| catapult | Catapult is in
| in  |
-| pickles  | Two Words is  
| in  |
-| catapul* | Catapult is in
| in  |
-| rdir | Two Words (redirect is in 
| not in  |
-| intitle:catapult | Catapult is in
| not in  |
-| intitle:catapul* | Catapult is in
| not in  |
-| intitle:catapult amazing | Amazing Catapult is   
| not in  |
-| intitle:catapul* amaz*   | Amazing Catapult is   
| not in  |
-| incategory:weaponry  | Catapult is in
| not in  |
-| incategory:weaponry amazing  | Amazing Catapult is   
| not in  |
-| incategory:weaponry intitle:catapult | Catapult is in
| not in  |
-| incategory:alpha incategory:beta | AlphaBeta is  
| not in  |
-| incategory:twowords catapult | Two Words is  
| in  |
-| incategory:twowords intitle:catapult | none is   
| not in  |
-| incategory:templatetagged two words  | Two Words is  
| in  |
-| talk:catapult| Talk:Two Words is 
| not in  |
-| talk:intitle:words   | Talk:Two Words is 
| not in  |
-| template:pickles | Template:Template Test is 
| not in  |
-| pickles/   

[MediaWiki-commits] [Gerrit] Implemented stubbing in QueryEntity - change (mediawiki...WikibaseQuery)

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

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


Change subject: Implemented stubbing in QueryEntity
..

Implemented stubbing in QueryEntity

Change-Id: Iea6fe41bcf6dc1b5e5437dfae5d5152df91e1df6
---
M Tests/Phpunit/Wikibase/Query/QueryEntityTest.php
M src/Wikibase/Query/QueryEntity.php
2 files changed, 39 insertions(+), 54 deletions(-)


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

diff --git a/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php 
b/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php
index 73a5782..8c070ad 100644
--- a/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php
+++ b/Tests/Phpunit/Wikibase/Query/QueryEntityTest.php
@@ -52,34 +52,18 @@
$this-assertTrue( true );
}
 
-// public function testStubDoesNotMessThingsUp() {
-// $queryEntity = $this-getNewSimpleEntity();
-//
-// $query = $this-newQuery();
-//
-// $queryEntity-setQuery( $query );
-//
-// $queryEntity-stub();
-// $obtainedQuery = $queryEntity-getQuery();
-//
-// $this-assertInstanceOf( 'Ask\Language\Query', $obtainedQuery );
-// $this-assertEquals( $query, $obtainedQuery );
-// }
-//
-// public function testArraySerlialzationRoundtripWithQuery() {
-// $queryEntity = $this-getNewSimpleEntity();
-//
-// $query = $this-newQuery();
-//
-// $queryEntity-setQuery( $query );
-//
-// $serialization = $queryEntity-toArray();
-//
-// $newQueryEntity = $queryEntity::newFromArray( $serialization );
-//
-// $queryEntity-stub();
-//
-// $this-assertEquals( $queryEntity, $newQueryEntity );
-// }
+   public function testStubDoesNotMessThingsUp() {
+   $queryEntity = $this-getNewSimpleEntity();
+
+   $query = $this-newQuery();
+
+   $queryEntity-setQuery( $query );
+
+   $queryEntity-stub();
+   $obtainedQuery = $queryEntity-getQuery();
+
+   $this-assertInstanceOf( 'Ask\Language\Query', $obtainedQuery );
+   $this-assertEquals( $query, $obtainedQuery );
+   }
 
 }
diff --git a/src/Wikibase/Query/QueryEntity.php 
b/src/Wikibase/Query/QueryEntity.php
index ea134d5..abb3e1c 100644
--- a/src/Wikibase/Query/QueryEntity.php
+++ b/src/Wikibase/Query/QueryEntity.php
@@ -5,7 +5,6 @@
 use Ask\DeserializerFactory;
 use Ask\Language\Query;
 use Ask\SerializerFactory;
-use InvalidArgumentException;
 use MWException;
 use RuntimeException;
 use Wikibase\Entity;
@@ -49,6 +48,8 @@
 * @throws RuntimeException
 */
public function getQuery() {
+   $this-unstubQuery();
+
return $this-query;
}
 
@@ -74,29 +75,29 @@
return QueryEntity::ENTITY_TYPE;
}
 
-// /**
-//  * @see Entity::stub
-//  */
-// public function stub() {
-// parent::stub();
-//
-// if ( $this-query !== null ) {
-// $serializerFactory = new SerializerFactory();
-//
-// $this-data['query'] = 
$serializerFactory-newQuerySerializer()-serialize( $this-query );
-// $this-query = null;
-// }
-// }
-//
-// /**
-//  * @see Entity::unstubQuery
-//  */
-// protected function unstubQuery() {
-// if( $this-query === null  array_key_exists( 'query', 
$this-data ) ) {
-// $deserializerFactory = new DeserializerFactory( 
WikibaseRepo::getDefaultInstance()-getDataValueFactory() );
-//
-// $this-query = 
$deserializerFactory-newQueryDeSerializer()-deserialize( $this-data['query'] 
);
-// }
-// }
+   /**
+* @see Entity::stub
+*/
+   public function stub() {
+   parent::stub();
+
+   if ( $this-query !== null ) {
+   $serializerFactory = new SerializerFactory();
+
+   $this-data['query'] = 
$serializerFactory-newQuerySerializer()-serialize( $this-query );
+   $this-query = null;
+   }
+   }
+
+   /**
+* @see Entity::unstubQuery
+*/
+   protected function unstubQuery() {
+   if( $this-query === null  array_key_exists( 'query', 
$this-data ) ) {
+   $deserializerFactory = new DeserializerFactory( 
WikibaseRepo::getDefaultInstance()-getDataValueFactory() );
+
+   $this-query = 
$deserializerFactory-newQueryDeSerializer()-deserialize( $this-data['query'] 
);
+   }
+   }
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] Update release notes - change (mediawiki...Validator)

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

Change subject: Update release notes
..


Update release notes

Change-Id: I6106cfd14032e7fed09620eae101774fbcf6b12b
---
M README.md
D RELEASE-NOTES-1.0
D releasenotes/RELEASE-NOTES
3 files changed, 182 insertions(+), 257 deletions(-)

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



diff --git a/README.md b/README.md
index c8c8d7f..6c7251e 100644
--- a/README.md
+++ b/README.md
@@ -32,7 +32,7 @@
 To add this package as a local, per-project dependency to your project, simply 
add a
 dependency on `param-processor/param-processor` to your project's 
`composer.json` file.
 Here is a minimal example of a `composer.json` file that just defines a 
dependency on
-Ask 1.0:
+ParamProcessor 1.0:
 
 {
 require: {
@@ -66,7 +66,188 @@
 
 ### 1.0 (under development)
 
+ParamProcessor 1.0 is currently in beta-quality and is not recommended for use 
in
+production until the actual release.
 
+This release is primarily a redesign of many internal APIs aimed at greater
+stability and cleaner interfaces exposed to the outside.
+
+# Compatibility changes
+
+* DataValues 0.1 or higher is now required
+* ValueParser 0.1 or higher is now required
+* ValueValidator 0.1 or higher is now required
+* ValueFormatter 0.1 or higher is now required
+* Changed minimum MediaWiki version from 1.16 to 1.18.
+* Full compatibility with MediaWiki 1.20, 1.21, 1.22 and forward-compatibility 
with 1.23.
+* Added compatibility with PHP 5.4.x and PHP 5.5.x
+* Dropped support for Validator 0.4.x parameter definitions, including 
Criteria and Manipulations
+
+### Validator 0.4.14 (2012-03-10)
+
+* New built-in parameter type 'title'. Accepts existing and non-existing page 
titles which are valid within the wiki.
+
+### Validator 0.4.13 (2011-11-30)
+
+* ParserHook::$parser now is a reference to the original parser object, as one 
would suspect.
+  Before this has only been the case for tag extension but not for parser 
function calls.
+
+* if SFH_OBJECT_ARGS and therefore object parser function arguments are 
available in the MW
+  version used with Validator, ParserHook::$frame will not be null anymore. 
Therefore a new
+  function ParserHook::renderFunctionObj() is introduced, handling these 
SFH_OBJECT_ARGS hooks.
+
+* ParserHook constructor now accepts a bitfield for flags to define further 
customization for
+  registered Hooks. First option can be set via ParserHook::FH_NO_HASH to 
define that the function
+  hook should be callable without leading hash ({{plural:...}}-like style).
+
+* Option for unnamed parameter handling to work without named fallback. This 
allows to ignore '='
+  within parameter values entirely, these parameters bust be set before any 
named parameter then.
+  See Validator::setFunctionParams() and ParserHook::getParameterInfo() for 
details.
+
+* ParserHook Validation messages will now output text in global content 
language instead of users interface language.
+
+### Validator 0.4.12 (2011-10-15)
+
+* Internationalization fix in the describe parser hook.
+
+### Validator 0.4.11 (2011-09-14)
+
+* Fixed compatibility fallback in Parameter::getDescription.
+* Fixed handling of list parameters in ParameterInput.
+
+### Validator 0.4.10 (2011-08-04)
+
+* Added language parameter to describe that allows setting the lang for the 
generated docs.
+* Added getMessage method to ParserHook class for better i18n.
+
+### Validator 0.4.9 (2011-07-30)
+
+* Added setMessage and getMessage methods to Parameter class for better i18n.
+
+### Validator 0.4.8 (2011-07-19)
+
+* Added unit tests for the criteria.
+* Fixed issue with handling floats in CriterionInRange.
+* Added support for open limits in CriterionHasLength and CriterionItemCount.
+
+### Validator 0.4.7 (2011-05-15)
+
+* Added ParameterInput class to generate HTML inputs for parameters, based on 
code from SMWs Special:Ask.
+* Added $manipulate = true as second parameter for Parameter::setDefault,
+  which gets passed to Parameter::setDoManipulationOfDefault.
+* Boolean manipulation now ignores values that are already a boolean.
+
+### Validator 0.4.6 (2011-03-21)
+
+* Removed ParamManipulationBoolstr.
+* Added method to get the allowed values to CriterionInArray.
+* Added automatic non-using of boolean manipulation when a boolean param was 
defaulted to a boolean value.
+* Parameter fix in ListParameter::setDefault, follow up to change in 0.4.5.
+
+### Validator 0.4.5 (2011-03-05)
+
+* Escaping fix in the describe parser hook.
+* Added string manipulation, applied by default on strings and chars.
+
+### Validator 0.4.4 (2011-02-16)
+
+* Tweaks to parser usage in the ParserHook class.
+* Fixed incorrect output of nested pre-tags in the describe parser hook.
+
+### Validator 0.4.3.1 (2011-01-20)
+
+* Removed underscore and space switching behavior for tag extensions and 
parser functions.
+
+### 

[MediaWiki-commits] [Gerrit] Update README file - change (mediawiki...Validator)

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

Change subject: Update README file
..


Update README file

Change-Id: I8b16c7e3eae071d5bc0d4fbce750598e68408e8b
---
M README.md
1 file changed, 71 insertions(+), 10 deletions(-)

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



diff --git a/README.md b/README.md
index 3dff27d..c8c8d7f 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,77 @@
-[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Validator.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Validator)
+# ParamProcessor
 
-These are the readme of the ParamProcessor extension.
-
-Extension page on mediawiki.org: 
https://www.mediawiki.org/wiki/Extension:ParamProcessor
-
-About
--
-
-The ParamProcessor extension, formerly known as Validator, is a parameter 
processing
+The ParamProcessor MediaWiki extension, formerly known as Validator, is a 
parameter processing
 framework that provides a way to declaratively define a set of parameters and 
how they
 should be processed. It can take such declarations together with a list of raw
 parameters and provide the processed values.
 
-Notes on installing ParamProcessor are found in the file INSTALL.
+[![Build 
Status](https://secure.travis-ci.org/wikimedia/mediawiki-extensions-Validator.png?branch=master)](http://travis-ci.org/wikimedia/mediawiki-extensions-Validator)
+[![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-Validator/badge.png?branch=master)](https://coveralls.io/r/wikimedia/mediawiki-extensions-Validator?branch=master)
+[![Dependency 
Status](https://www.versioneye.com/php/param-processor:param-processor/dev-master/badge.png)](https://www.versioneye.com/php/param-processor:param-processor/dev-master)
 
+On [Packagist](https://packagist.org/packages/param-processor/param-processor):
+[![Latest Stable 
Version](https://poser.pugx.org/param-processor/param-processor/version.png)](https://packagist.org/packages/param-processor/param-processor)
+[![Download 
count](https://poser.pugx.org/param-processor/param-processor/d/total.png)](https://packagist.org/packages/param-processor/param-processor)
+
+## Requirements
+
+* PHP 5.3 or later
+* [DataValues](https://www.mediawiki.org/wiki/Extension:DataValues) 0.1 or 
later
+* [ValueParsers](https://www.mediawiki.org/wiki/Extension:ValueParsers) 0.1 or 
later
+* [ValueValidators](https://www.mediawiki.org/wiki/Extension:ValueValidators) 
0.1 or later
+* [ValueFormatters](https://www.mediawiki.org/wiki/Extension:ValueFormatters) 
0.1 or later
+
+## Installation
+
+You can use [Composer](http://getcomposer.org/) to download and install
+this package as well as its dependencies. Alternatively you can simply clone
+the git repository and take care of loading yourself.
+
+### Composer
+
+To add this package as a local, per-project dependency to your project, simply 
add a
+dependency on `param-processor/param-processor` to your project's 
`composer.json` file.
+Here is a minimal example of a `composer.json` file that just defines a 
dependency on
+Ask 1.0:
+
+{
+require: {
+param-processor/param-processor: 1.0.*
+}
+}
+
+### Manual
+
+Get the ParamProcessor code, either via git, or some other means. Also get all 
dependencies.
+You can find a list of the dependencies in the require section of the 
composer.json file.
+Load all dependencies and the load the ParamProcessor library by including its 
entry point:
+ParamProcessor.php.
+
+## Tests
+
+This library comes with a set up PHPUnit tests that cover all non-trivial 
code. You can run these
+tests using the PHPUnit configuration file found in the root directory. The 
tests can also be run
+via TravisCI, as a TravisCI configuration file is also provided in the root 
directory.
+
+## Authors
+
+ParamProcessor has been written by
+[Jeroen De Dauw](https://www.mediawiki.org/wiki/User:Jeroen_De_Dauw)
+to support
+[Maps](https://www.mediawiki.org/wiki/Extension:Maps)
+and
+[Semantic MediaWiki](https://semantic-mediawiki.org/)
+
+## Release notes
+
+### 1.0 (under development)
+
+
+
+## Links
+
+* [ParamProcessor on 
Packagist](https://packagist.org/packages/param-processor/param-processor)
+* [ParamProcessor on Ohloh](https://www.ohloh.net/p/validator)
+* [ParamProcessor on 
MediaWiki.org](https://www.mediawiki.org/wiki/Extension:ParamProcessor)
+* [TravisCI build 
status](https://travis-ci.org/wikimedia/mediawiki-extensions-Validator)
+* [Latest version of the readme 
file](https://github.com/wikimedia/mediawiki-extensions-Validator/blob/master/README.md)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8b16c7e3eae071d5bc0d4fbce750598e68408e8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Validator
Gerrit-Branch: 

[MediaWiki-commits] [Gerrit] Add coveralls.io support - change (mediawiki...Validator)

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

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


Change subject: Add coveralls.io support
..

Add coveralls.io support

Change-Id: Ib680ce580dc5df300bec47e252398d8a86e88b6c
---
M .travis.yml
M README.md
2 files changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/.travis.yml b/.travis.yml
index 11ee7dc..63c87c9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,12 @@
 before_script:
   - composer install
 
+script:
+  - phpunit --coverage-clover build/logs/clover.xml
+
+after_script:
+  - php vendor/bin/coveralls -v
+
 notifications:
   email:
 recipients:
diff --git a/README.md b/README.md
index 6c7251e..5adb5b7 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,7 @@
 to support
 [Maps](https://www.mediawiki.org/wiki/Extension:Maps)
 and
-[Semantic MediaWiki](https://semantic-mediawiki.org/)
+[Semantic MediaWiki](https://semantic-mediawiki.org/).
 
 ## Release notes
 

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

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

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


[MediaWiki-commits] [Gerrit] Add coveralls.io support - change (mediawiki...Validator)

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

Change subject: Add coveralls.io support
..


Add coveralls.io support

Change-Id: Ib680ce580dc5df300bec47e252398d8a86e88b6c
---
M .travis.yml
M README.md
2 files changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/.travis.yml b/.travis.yml
index 11ee7dc..63c87c9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -8,6 +8,12 @@
 before_script:
   - composer install
 
+script:
+  - phpunit --coverage-clover build/logs/clover.xml
+
+after_script:
+  - php vendor/bin/coveralls -v
+
 notifications:
   email:
 recipients:
diff --git a/README.md b/README.md
index 6c7251e..5adb5b7 100644
--- a/README.md
+++ b/README.md
@@ -60,7 +60,7 @@
 to support
 [Maps](https://www.mediawiki.org/wiki/Extension:Maps)
 and
-[Semantic MediaWiki](https://semantic-mediawiki.org/)
+[Semantic MediaWiki](https://semantic-mediawiki.org/).
 
 ## Release notes
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib680ce580dc5df300bec47e252398d8a86e88b6c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Validator
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: Jeroen De Dauw jeroended...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Log Accept headers in conjunction with User-agent - change (mediawiki...MobileFrontend)

2013-08-20 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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


Change subject: Log Accept headers in conjunction with User-agent
..

Log Accept headers in conjunction with User-agent

I need this to figure out what to do with X-WAP detection.

Change-Id: I51d4420ac8a1e21a5ed29fefc07941cf7e4180af
---
M includes/MobileFrontend.body.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/includes/MobileFrontend.body.php b/includes/MobileFrontend.body.php
index 0251f87..0ce5e44 100644
--- a/includes/MobileFrontend.body.php
+++ b/includes/MobileFrontend.body.php
@@ -7,6 +7,13 @@
 * @return string
 */
public static function DOMParse( OutputPage $out ) {
+   // Debug logging: we need a list of Accept: headers to make 
some WAP detection decisions
+   // Done here to make sure that only mobile view requests are 
logged
+   if ( mt_rand( 0, 1 ) == 0 ) {
+   $req = $out-getRequest();
+   wfDebugLog( 'mobile', User-agent: '{$req-getHeader( 
'User-agent' )}', Accept: '{$req-getHeader( 'Accept' )}' );
+   }
+
wfProfileIn( __METHOD__ );
 
$html = $out-getHTML();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I51d4420ac8a1e21a5ed29fefc07941cf7e4180af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: MaxSem maxsem.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Turn HTTPs on by default for beta - change (operations/mediawiki-config)

2013-08-20 Thread Demon (Code Review)
Demon has uploaded a new change for review.

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


Change subject: Turn HTTPs on by default for beta
..

Turn HTTPs on by default for beta

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


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

diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 561ff0a..501f80e 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -271,7 +271,7 @@
),
 
'wgSecureLogin' = array(
-'default' = false,
+'default' = true,
 'loginwiki' = true,
 ),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I80ef4eea78140dea047dbb877ad2a91496681ba2
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] removing sq41 role/cache ganglia - change (operations/puppet)

2013-08-20 Thread Cmjohnson (Code Review)
Cmjohnson has uploaded a new change for review.

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


Change subject: removing sq41 role/cache  ganglia
..

removing sq41 role/cache  ganglia

Change-Id: Ie45f4be6cba6c51802aa2090118b1b9841069fc5
---
M manifests/ganglia.pp
M manifests/role/cache.pp
2 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 7612e82..d07c595 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -300,7 +300,7 @@
 Search pmtpa = search13.pmtpa.wmnet 
search14.pmtpa.wmnet,
 MySQL = db50.pmtpa.wmnet db51.pmtpa.wmnet,
 PDF servers = pdf1.wikimedia.org 
pdf2.wikimedia.org,
-Upload squids = sq41.wikimedia.org 
sq42.wikimedia.org,
+Upload squids = sq42.wikimedia.org,
 API squids = sq31.wikimedia.org 
sq35.wikimedia.org,
 LVS loadbalancers pmtpa = lvs1.wikimedia.org 
lvs2.wikimedia.org,
 Miscellaneous = hooper.wikimedia.org 
tarin.pmtpa.wmnet,
diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index cd292ba..62c4f89 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -135,7 +135,6 @@
},
upload = {
pmtpa-squid = [
-   'sq41.wikimedia.org',
'sq42.wikimedia.org',
'sq43.wikimedia.org',
'sq44.wikimedia.org',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie45f4be6cba6c51802aa2090118b1b9841069fc5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] removing sq41 role/cache ganglia - change (operations/puppet)

2013-08-20 Thread Cmjohnson (Code Review)
Cmjohnson has submitted this change and it was merged.

Change subject: removing sq41 role/cache  ganglia
..


removing sq41 role/cache  ganglia

Change-Id: Ie45f4be6cba6c51802aa2090118b1b9841069fc5
---
M manifests/ganglia.pp
M manifests/role/cache.pp
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index 7612e82..d07c595 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -300,7 +300,7 @@
 Search pmtpa = search13.pmtpa.wmnet 
search14.pmtpa.wmnet,
 MySQL = db50.pmtpa.wmnet db51.pmtpa.wmnet,
 PDF servers = pdf1.wikimedia.org 
pdf2.wikimedia.org,
-Upload squids = sq41.wikimedia.org 
sq42.wikimedia.org,
+Upload squids = sq42.wikimedia.org,
 API squids = sq31.wikimedia.org 
sq35.wikimedia.org,
 LVS loadbalancers pmtpa = lvs1.wikimedia.org 
lvs2.wikimedia.org,
 Miscellaneous = hooper.wikimedia.org 
tarin.pmtpa.wmnet,
diff --git a/manifests/role/cache.pp b/manifests/role/cache.pp
index cd292ba..62c4f89 100644
--- a/manifests/role/cache.pp
+++ b/manifests/role/cache.pp
@@ -135,7 +135,6 @@
},
upload = {
pmtpa-squid = [
-   'sq41.wikimedia.org',
'sq42.wikimedia.org',
'sq43.wikimedia.org',
'sq44.wikimedia.org',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie45f4be6cba6c51802aa2090118b1b9841069fc5
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Cmjohnson cmjohn...@wikimedia.org
Gerrit-Reviewer: Cmjohnson cmjohn...@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] exim: switch sodium non-list mail to its own IP - change (operations/puppet)

2013-08-20 Thread Faidon (Code Review)
Faidon has uploaded a new change for review.

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


Change subject: exim: switch sodium non-list mail to its own IP
..

exim: switch sodium non-list mail to its own IP

Don't use the lists service IP fqdn (as HELO) for mail relay traffic but
keep it only for lists traffic.

Change-Id: I0d24518dd0f1168b2d50c783cce4f3b1354cdf7c
---
M manifests/site.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
2 files changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/manifests/site.pp b/manifests/site.pp
index 6a96772..0c3f33b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2481,7 +2481,7 @@
 }
 
 class { exim::roled:
-outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
+outbound_ips = [ 208.80.154.61, 2620:0:861:1:208:80:154:61 ],
 list_outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
 local_domains = [ +system_domains, +mailman_domains ],
 enable_mail_relay = secondary,
diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb 
b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
index 7ce2707..79fc48f 100644
--- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
+++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
@@ -669,7 +669,6 @@
interface = ; %= outbound_ips.join( ; ) %
 % end -%
 % if enable_mailman == true -%
-   helo_data = lists.wikimedia.org
 
 list_smtp:
driver = smtp

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0d24518dd0f1168b2d50c783cce4f3b1354cdf7c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] exim: switch sodium non-list mail to its own IP - change (operations/puppet)

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

Change subject: exim: switch sodium non-list mail to its own IP
..


exim: switch sodium non-list mail to its own IP

Don't use the lists service IP fqdn (as HELO) for mail relay traffic but
keep it only for lists traffic.

Change-Id: I0d24518dd0f1168b2d50c783cce4f3b1354cdf7c
---
M manifests/site.pp
M templates/exim/exim4.conf.SMTP_IMAP_MM.erb
2 files changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 6a96772..0c3f33b 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2481,7 +2481,7 @@
 }
 
 class { exim::roled:
-outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
+outbound_ips = [ 208.80.154.61, 2620:0:861:1:208:80:154:61 ],
 list_outbound_ips = [ 208.80.154.4, 2620:0:861:1::2 ],
 local_domains = [ +system_domains, +mailman_domains ],
 enable_mail_relay = secondary,
diff --git a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb 
b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
index 7ce2707..79fc48f 100644
--- a/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
+++ b/templates/exim/exim4.conf.SMTP_IMAP_MM.erb
@@ -669,7 +669,6 @@
interface = ; %= outbound_ips.join( ; ) %
 % end -%
 % if enable_mailman == true -%
-   helo_data = lists.wikimedia.org
 
 list_smtp:
driver = smtp

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d24518dd0f1168b2d50c783cce4f3b1354cdf7c
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Faidon fai...@wikimedia.org
Gerrit-Reviewer: Faidon fai...@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] Turn HTTPs on by default for beta - change (operations/mediawiki-config)

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

Change subject: Turn HTTPs on by default for beta
..


Turn HTTPs on by default for beta

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

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



diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 561ff0a..501f80e 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -271,7 +271,7 @@
),
 
'wgSecureLogin' = array(
-'default' = false,
+'default' = true,
 'loginwiki' = true,
 ),
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80ef4eea78140dea047dbb877ad2a91496681ba2
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Demon ch...@wikimedia.org
Gerrit-Reviewer: Demon ch...@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] Adding some missing messages - change (mediawiki...OAuth)

2013-08-20 Thread CSteipp (Code Review)
CSteipp has submitted this change and it was merged.

Change subject: Adding some missing messages
..


Adding some missing messages

Change-Id: I84d60b056cacf79e2cf54d7bc7227f564bc963d0
---
M control/MWOAuthConsumerSubmitControl.php
M frontend/language/MWOAuth.i18n.php
2 files changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/control/MWOAuthConsumerSubmitControl.php 
b/control/MWOAuthConsumerSubmitControl.php
index a58e104..60a3417 100644
--- a/control/MWOAuthConsumerSubmitControl.php
+++ b/control/MWOAuthConsumerSubmitControl.php
@@ -128,10 +128,10 @@
if ( !$user-isAllowed( 'mwoauthproposeconsumer' ) ) {
return $this-failure( 'permission_denied', 
'badaccess-group0' );
} elseif ( !$user-isEmailConfirmed() ) {
-   return $this-failure( 'email_not_confirmed', 
'mwoauth-email-not-confirmed' );
+   return $this-failure( 'email_not_confirmed', 
'mwoauth-consumer-email-unconfirmed' );
} elseif ( $user-getEmail() !== $this-vals['email'] ) 
{
// @TODO: allow any email and don't set 
emailAuthenticated below
-   return $this-failure( 'email_mismatched', 
'mwoauth-email-email_mismatched' );
+   return $this-failure( 'email_mismatched', 
'mwoauth-consumer-email-mismatched' );
}
 
if ( MWOAuthConsumer::newFromNameVersionUser(
diff --git a/frontend/language/MWOAuth.i18n.php 
b/frontend/language/MWOAuth.i18n.php
index 365fb4c..6ded8a8 100644
--- a/frontend/language/MWOAuth.i18n.php
+++ b/frontend/language/MWOAuth.i18n.php
@@ -39,6 +39,8 @@
'mwoauth-consumer-secretkey' = 'Consumer secret token:',
'mwoauth-consumer-accesstoken' = 'Access token:',
'mwoauth-consumer-reason' = 'Reason:',
+   'mwoauth-consumer-email-unconfirmed' = 'Your account email address has 
not yet been confirmed.',
+   'mwoauth-consumer-email-mismatched' = 'Provided email address must 
match that of your account.',
'mwoauth-consumer-alreadyexists' = 'A consumer with this 
name/version/publisher combination already exists',
'mwoauth-consumer-alreadyexistsversion' = 'A consumer with this 
name/publisher combination already exists with an equal or higher version 
($1)',
'mwoauth-consumer-not-accepted' = 'Cannot update information for a 
pending consumer request',
@@ -351,6 +353,8 @@
'mwoauth-consumer-accesstoken' = 'Unused at this time.',
'mwoauth-consumer-reason' = 'Used as label for the Reason value.
 {{Identical|Reason}}',
+   'mwoauth-consumer-email-unconfirmed' = 'Used as failure message.',
+   'mwoauth-consumer-email-mismatched' = 'Used as failure message.',
'mwoauth-consumer-alreadyexists' = 'Used as failure message.',
'mwoauth-consumer-alreadyexistsversion' = 'Used as failure message. 
Parameters:
 * $1 - current consumer version number',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84d60b056cacf79e2cf54d7bc7227f564bc963d0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


  1   2   3   4   >