[MediaWiki-commits] [Gerrit] New Wikidata Build - change (mediawiki...Wikidata)

2014-02-09 Thread Anonymous Coward (Code Review)
wikidata-servi...@wikimedia.de has uploaded a new change for review.

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

Change subject: New Wikidata Build
..

New Wikidata Build

Change-Id: Iec69da25c4c1cca4273ca76a1121ace0ad41bbe4
---
M composer.lock
M extensions/Wikibase/client/WikibaseClient.i18n.php
M extensions/Wikibase/repo/Wikibase.i18n.php
M vendor/autoload.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
6 files changed, 21 insertions(+), 16 deletions(-)


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

diff --git a/composer.lock b/composer.lock
index 8d50c16..a204f4f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -848,12 +848,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: b7804a5646a28add24a9c19194415f90fe882a6c
+reference: 735bbed55d894b35a0c8b948a428cb0de240ef23
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/b7804a5646a28add24a9c19194415f90fe882a6c;,
-reference: b7804a5646a28add24a9c19194415f90fe882a6c,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/735bbed55d894b35a0c8b948a428cb0de240ef23;,
+reference: 735bbed55d894b35a0c8b948a428cb0de240ef23,
 shasum: 
 },
 require: {
@@ -912,7 +912,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2014-02-07 21:32:02
+time: 2014-02-08 21:25:42
 }
 ],
 packages-dev: [
diff --git a/extensions/Wikibase/client/WikibaseClient.i18n.php 
b/extensions/Wikibase/client/WikibaseClient.i18n.php
index 7bcb3ea..e9ddac9 100644
--- a/extensions/Wikibase/client/WikibaseClient.i18n.php
+++ b/extensions/Wikibase/client/WikibaseClient.i18n.php
@@ -327,6 +327,7 @@
  * @author Abanima
  * @author Ali1
  * @author Basharh
+ * @author Meno25
  * @author OsamaK
  * @author Peadara
  * @author Tarawneh
@@ -340,7 +341,7 @@
'wikibase-comment-linked' = 'تم ربط عنصر ويكيبيانات مع هذه الصفحة.',
'wikibase-comment-unlink' = 'تم فصل ارتباط هذه الصفحة من البند 
ويكيبيانات. تم إزالة روابط اللغة.',
'wikibase-comment-restore' = 'تم استرجاع بند ويكيبيانات المرتبط. روابط 
اللغة أعيدت.',
-   'wikibase-comment-update' = 'روابط اللغة حُدثت.', # Fuzzy
+   'wikibase-comment-update' = 'مدخلة ويكي بيانات تم تغييرها',
'wikibase-comment-sitelink-add' = 'وصلة اللغة المُضافة:$1',
'wikibase-comment-sitelink-change' = 'تم تعديل وصلة اللغة من $1 إلى 
$2',
'wikibase-comment-sitelink-remove' = 'وصلة اللغة المُلغاة:$1',
diff --git a/extensions/Wikibase/repo/Wikibase.i18n.php 
b/extensions/Wikibase/repo/Wikibase.i18n.php
index 886d139..a582467 100644
--- a/extensions/Wikibase/repo/Wikibase.i18n.php
+++ b/extensions/Wikibase/repo/Wikibase.i18n.php
@@ -1563,7 +1563,7 @@
'wikibase-save-inprogress' = 'يحفظ...',
'wikibase-remove-inprogress' = 'يزيل...',
'wikibase-sitelink-site-edit-placeholder' = 'موقع',
-   'wikibase-sitelink-page-edit-placeholder' = 'مقال', # Fuzzy
+   'wikibase-sitelink-page-edit-placeholder' = 'صفحة',
'wikibase-statements' = 'بيانات',
'wikibase-terms' = 'بلغات أخرى',
'wikibase-remove' = 'ألغ',
@@ -1583,7 +1583,7 @@
'special-newproperty' = 'إنشاء خاصية جديدة',
'wikibase-newproperty-fieldset' = 'أنشئ خاصية جديدة',
'wikibase-newproperty-datatype' = 'نوع البيانات:',
-   'wikibase-newproperty-invalid-datatype' = 'تم تحديد نوع بيانات غير 
صالح', # Fuzzy
+   'wikibase-newproperty-invalid-datatype' = 'نوع بيانات غير صحيح تم 
تحديده.',
'special-newitem' = 'إنشاء عنصر جديد',
'wikibase-newitem-fieldset' = 'أنشئ عنصر جديد',
'wikibase-newentity-description' = 'الوصف:',
@@ -11180,6 +11180,7 @@
'wikibase-modifyterm-language' = 'Sprooch:',
'special-mergeitems' = 'Zwee Elementer zesummeleeën',
'wikibase-mergeitems-intro' = 'Wann Dir zwee Elementer zesummeleet da 
ginn all Etiketten, Aliasen, Linken op Siten an Declaratioun vun engem op deen 
Anere geréckelt.',
+   'wikibase-mergeitems-fromid' = D'ID vun där zesummegeluecht gëtt,
'wikibase-mergeitems-toid' = D'ID op déi zesummegeluecht gëtt,
'wikibase-mergeitems-submit' = 'Elementer zesummeleeën',
'wikibase-dispatchstats-no-stats' = 'Et sinn elo keng Statistiken 
disponibel.',
@@ -11301,10 +11302,12 @@
'wikibase-time-precision-annum' = 'a(n) $1 Joer',
'wikibase-time-precision-millennium' = '$1. Joerdausend',
'wikibase-time-precision-century' = '$1. Joerhonnert',
+   'wikibase-time-precision-10annum' = '$1s',
 );
 
 /** لوری (لوری)
  * 

[MediaWiki-commits] [Gerrit] New Wikidata Build - change (mediawiki...Wikidata)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: New Wikidata Build
..


New Wikidata Build

Change-Id: Iec69da25c4c1cca4273ca76a1121ace0ad41bbe4
---
M composer.lock
M extensions/Wikibase/client/WikibaseClient.i18n.php
M extensions/Wikibase/repo/Wikibase.i18n.php
M vendor/autoload.php
M vendor/composer/autoload_real.php
M vendor/composer/installed.json
6 files changed, 21 insertions(+), 16 deletions(-)

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



diff --git a/composer.lock b/composer.lock
index 8d50c16..a204f4f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -848,12 +848,12 @@
 source: {
 type: git,
 url: 
https://github.com/wikimedia/mediawiki-extensions-Wikibase.git;,
-reference: b7804a5646a28add24a9c19194415f90fe882a6c
+reference: 735bbed55d894b35a0c8b948a428cb0de240ef23
 },
 dist: {
 type: zip,
-url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/b7804a5646a28add24a9c19194415f90fe882a6c;,
-reference: b7804a5646a28add24a9c19194415f90fe882a6c,
+url: 
https://api.github.com/repos/wikimedia/mediawiki-extensions-Wikibase/zipball/735bbed55d894b35a0c8b948a428cb0de240ef23;,
+reference: 735bbed55d894b35a0c8b948a428cb0de240ef23,
 shasum: 
 },
 require: {
@@ -912,7 +912,7 @@
 wikibaserepo,
 wikidata
 ],
-time: 2014-02-07 21:32:02
+time: 2014-02-08 21:25:42
 }
 ],
 packages-dev: [
diff --git a/extensions/Wikibase/client/WikibaseClient.i18n.php 
b/extensions/Wikibase/client/WikibaseClient.i18n.php
index 7bcb3ea..e9ddac9 100644
--- a/extensions/Wikibase/client/WikibaseClient.i18n.php
+++ b/extensions/Wikibase/client/WikibaseClient.i18n.php
@@ -327,6 +327,7 @@
  * @author Abanima
  * @author Ali1
  * @author Basharh
+ * @author Meno25
  * @author OsamaK
  * @author Peadara
  * @author Tarawneh
@@ -340,7 +341,7 @@
'wikibase-comment-linked' = 'تم ربط عنصر ويكيبيانات مع هذه الصفحة.',
'wikibase-comment-unlink' = 'تم فصل ارتباط هذه الصفحة من البند 
ويكيبيانات. تم إزالة روابط اللغة.',
'wikibase-comment-restore' = 'تم استرجاع بند ويكيبيانات المرتبط. روابط 
اللغة أعيدت.',
-   'wikibase-comment-update' = 'روابط اللغة حُدثت.', # Fuzzy
+   'wikibase-comment-update' = 'مدخلة ويكي بيانات تم تغييرها',
'wikibase-comment-sitelink-add' = 'وصلة اللغة المُضافة:$1',
'wikibase-comment-sitelink-change' = 'تم تعديل وصلة اللغة من $1 إلى 
$2',
'wikibase-comment-sitelink-remove' = 'وصلة اللغة المُلغاة:$1',
diff --git a/extensions/Wikibase/repo/Wikibase.i18n.php 
b/extensions/Wikibase/repo/Wikibase.i18n.php
index 886d139..a582467 100644
--- a/extensions/Wikibase/repo/Wikibase.i18n.php
+++ b/extensions/Wikibase/repo/Wikibase.i18n.php
@@ -1563,7 +1563,7 @@
'wikibase-save-inprogress' = 'يحفظ...',
'wikibase-remove-inprogress' = 'يزيل...',
'wikibase-sitelink-site-edit-placeholder' = 'موقع',
-   'wikibase-sitelink-page-edit-placeholder' = 'مقال', # Fuzzy
+   'wikibase-sitelink-page-edit-placeholder' = 'صفحة',
'wikibase-statements' = 'بيانات',
'wikibase-terms' = 'بلغات أخرى',
'wikibase-remove' = 'ألغ',
@@ -1583,7 +1583,7 @@
'special-newproperty' = 'إنشاء خاصية جديدة',
'wikibase-newproperty-fieldset' = 'أنشئ خاصية جديدة',
'wikibase-newproperty-datatype' = 'نوع البيانات:',
-   'wikibase-newproperty-invalid-datatype' = 'تم تحديد نوع بيانات غير 
صالح', # Fuzzy
+   'wikibase-newproperty-invalid-datatype' = 'نوع بيانات غير صحيح تم 
تحديده.',
'special-newitem' = 'إنشاء عنصر جديد',
'wikibase-newitem-fieldset' = 'أنشئ عنصر جديد',
'wikibase-newentity-description' = 'الوصف:',
@@ -11180,6 +11180,7 @@
'wikibase-modifyterm-language' = 'Sprooch:',
'special-mergeitems' = 'Zwee Elementer zesummeleeën',
'wikibase-mergeitems-intro' = 'Wann Dir zwee Elementer zesummeleet da 
ginn all Etiketten, Aliasen, Linken op Siten an Declaratioun vun engem op deen 
Anere geréckelt.',
+   'wikibase-mergeitems-fromid' = D'ID vun där zesummegeluecht gëtt,
'wikibase-mergeitems-toid' = D'ID op déi zesummegeluecht gëtt,
'wikibase-mergeitems-submit' = 'Elementer zesummeleeën',
'wikibase-dispatchstats-no-stats' = 'Et sinn elo keng Statistiken 
disponibel.',
@@ -11301,10 +11302,12 @@
'wikibase-time-precision-annum' = 'a(n) $1 Joer',
'wikibase-time-precision-millennium' = '$1. Joerdausend',
'wikibase-time-precision-century' = '$1. Joerhonnert',
+   'wikibase-time-precision-10annum' = '$1s',
 );
 
 /** لوری (لوری)
  * @author Bonevarluri
+ * @author Mogoeilor
  */
 

[MediaWiki-commits] [Gerrit] (bugfix) follow-up for https://gerrit.wikimedia.org/r/#/c/11... - change (pywikibot/core)

2014-02-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: (bugfix) follow-up for 
https://gerrit.wikimedia.org/r/#/c/112195/
..

(bugfix) follow-up for https://gerrit.wikimedia.org/r/#/c/112195/

Since the last committ we use Site.fromDBName() to get the the site
code instead extracting them directly. Site.fromDBName() creates a
site object and this may fail with NoSuchSite exception if the
dbname returned by wikidata is a obsolete site. Unfortunately
that may occur.

In this case we can no longer test against that exception outside
generator because the site object is already been created but we
must check it inside the generator. This is impossible for
generator expressions. We need a generator method instead.

Change-Id: I990b0d65909fe9f2adfec96a270b88bb62336360
---
M scripts/featured.py
1 file changed, 20 insertions(+), 15 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/22/112322/1

diff --git a/scripts/featured.py b/scripts/featured.py
index 9db0162..5277e53 100644
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -242,19 +242,27 @@
 
 def itercode(self, task):
  generator for site codes to be processed 
-if task == 'good':
-item_no = good_name['wikidata'][1]
-elif task == 'featured':
-item_no = featured_name['wikidata'][1]
-elif task == 'former':
-item_no = former_name['wikidata'][1]
-dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
-dp.get()
 
-generator = (site.code for site in
- sorted([self.site.fromDBName(key)
- for key in dp.sitelinks.keys()])
- if site.family == self.site.family)  # wikipedia sites 
only
+def _generator():
+if task == 'good':
+item_no = good_name['wikidata'][1]
+elif task == 'featured':
+item_no = featured_name['wikidata'][1]
+elif task == 'former':
+item_no = former_name['wikidata'][1]
+dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
+dp.get()
+for key in dp.sitelinks.keys():
+try:
+site = self.site.fromDBName(key)
+except pywikibot.NoSuchSite:
+pywikibot.output('%s is not a valid site. Skipping...'
+ % key)
+else:
+if site.family == self.site.family:
+yield site.code
+
+generator = _generator()
 
 if self.getOption('fromall'):
 return generator
@@ -327,9 +335,6 @@
 except KeyboardInterrupt:
 pywikibot.output('\nQuitting %s treat...' % task)
 break
-except pywikibot.NoSuchSite:
-pywikibot.output('%s is not a valid site. Skipping...' % 
code)
-continue
 self.writecache()
 
 def treat(self, code, process):

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I990b0d65909fe9f2adfec96a270b88bb62336360
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] (bugfix) follow-up for https://gerrit.wikimedia.org/r/#/c/11... - change (pywikibot/core)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bugfix) follow-up for 
https://gerrit.wikimedia.org/r/#/c/112195/
..


(bugfix) follow-up for https://gerrit.wikimedia.org/r/#/c/112195/

Since the last committ we use Site.fromDBName() to get the the site
code instead extracting them directly. Site.fromDBName() creates a
site object and this may fail with NoSuchSite exception if the
dbname returned by wikidata is a obsolete site. Unfortunately
that may occur.

In this case we can no longer test against that exception outside
generator because the site object is already been created but we
must check it inside the generator. This is impossible for
generator expressions. We need a generator method instead.

Change-Id: I990b0d65909fe9f2adfec96a270b88bb62336360
---
M scripts/featured.py
1 file changed, 20 insertions(+), 15 deletions(-)

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



diff --git a/scripts/featured.py b/scripts/featured.py
index 9db0162..5277e53 100644
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -242,19 +242,27 @@
 
 def itercode(self, task):
  generator for site codes to be processed 
-if task == 'good':
-item_no = good_name['wikidata'][1]
-elif task == 'featured':
-item_no = featured_name['wikidata'][1]
-elif task == 'former':
-item_no = former_name['wikidata'][1]
-dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
-dp.get()
 
-generator = (site.code for site in
- sorted([self.site.fromDBName(key)
- for key in dp.sitelinks.keys()])
- if site.family == self.site.family)  # wikipedia sites 
only
+def _generator():
+if task == 'good':
+item_no = good_name['wikidata'][1]
+elif task == 'featured':
+item_no = featured_name['wikidata'][1]
+elif task == 'former':
+item_no = former_name['wikidata'][1]
+dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
+dp.get()
+for key in dp.sitelinks.keys():
+try:
+site = self.site.fromDBName(key)
+except pywikibot.NoSuchSite:
+pywikibot.output('%s is not a valid site. Skipping...'
+ % key)
+else:
+if site.family == self.site.family:
+yield site.code
+
+generator = _generator()
 
 if self.getOption('fromall'):
 return generator
@@ -327,9 +335,6 @@
 except KeyboardInterrupt:
 pywikibot.output('\nQuitting %s treat...' % task)
 break
-except pywikibot.NoSuchSite:
-pywikibot.output('%s is not a valid site. Skipping...' % 
code)
-continue
 self.writecache()
 
 def treat(self, code, process):

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I990b0d65909fe9f2adfec96a270b88bb62336360
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Pyfisch pyfi...@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] Implement listing for tracking categories - change (mediawiki/core)

2014-02-09 Thread Kunalgrover05 (Code Review)
Kunalgrover05 has uploaded a new change for review.

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

Change subject: Implement listing for tracking categories
..

Implement listing for tracking categories

Extension for implementing tracking categories list on a Special page. Needs to 
be enabled in LocalSettings.php. Global added  containing list of tracking 
categories and pages
Bug:60333

Change-Id: I7d4bb90622a6bae60845942ef93cfe64f229d2d2
---
A extensions/TrackingCategories/SpecialTrackingCategories.php
A extensions/TrackingCategories/TrackingCategories.alias.php
A extensions/TrackingCategories/TrackingCategories.i18n.php
A extensions/TrackingCategories/TrackingCategories.php
M includes/DefaultSettings.php
5 files changed, 177 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/112323/1

diff --git a/extensions/TrackingCategories/SpecialTrackingCategories.php 
b/extensions/TrackingCategories/SpecialTrackingCategories.php
new file mode 100644
index 000..d1b7895
--- /dev/null
+++ b/extensions/TrackingCategories/SpecialTrackingCategories.php
@@ -0,0 +1,112 @@
+?php
+/**
+ * Implements Special:TrackingCategories
+ *
+ * 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
+ *
+ * @file   
+ * @ingroup SpecialPage
+ */
+class SpecialTrackingCategories extends SpecialPage {
+
+   function __construct() {
+   parent::__construct( 'TrackingCategories' );
+   }
+
+   function execute( $par ) {
+   ///Global array containing names of tracking categories and 
pagenames
+   global $wgTrackingCat;
+   
+   $this-setHeaders();
+   $this-outputHeader();
+   $this-getOutput()-allowClickjacking();
+   $this-getOutput()-addHTML(
+   wfMessage( 'trackingcategories-desc' )-text() .
+   'hr'
+   );
+
+   foreach( $wgTrackingCat as $catname=$cat_pagename ) {
+   /**
+* Check if the tracking category varies by namespace
+* Otherwise only pages in the current namespace will 
be displayed
+* If it does vary, show pages considering all 
namespaces
+   **/
+   if( strstr( $this-msg( $catname )-plain() , '{') ) {
+   $mw = new MWNamespace();
+   $ns = $mw-getValidNamespaces() ;
+   foreach ( $ns as $namesp ) {
+   $cat_title = Title::makeTitleSafe( 
$namesp , $cat_pagename );
+   $cat_titleText = Linker::link(
+   $cat_title ,
+   htmlspecialchars( 
$cat_title-getText() )
+   );
+   
+   $newContext = new DerivativeContext( 
$this-getContext() );
+   $newContext-setTitle( $cat_title );
+   $cat_msg = wfMessage( $catname 
)-setContext( $newContext )-text();
+   $cat_desc = $catname . '-desc';
+   
+   $this-getOutput()-addHTML(
+   'li'.
+   $cat_titleText.
+   '-'.
+   $cat_msg
+   );
+
+   /**
+* Show category description if it 
exists as a system message
+* as category-name-desc
+*/
+   if ( !wfMessage( $cat_desc 
)-inContentLanguage()-isBlank() ) {
+   $this-getOutput()-addHTML (
+   '-(' 

[MediaWiki-commits] [Gerrit] Introduce orthogonal option to enable MathJax - change (mediawiki...Math)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Introduce orthogonal option to enable MathJax
..

Introduce orthogonal option to enable MathJax

In the current version MathJax is bound to the MW_MATH_SOURCE
rendering mode. This change makes the base mode user configurable.
That means before MathJax is loaded the png fallback image could
be displayed.

ATTENTION: This change modifies global variables as follows:
* $wgUseMathJax is removed.
* MW_MATH_MATHJAX is deprecated.
* $wgMathJax is introduced.

Change-Id: Ibf705cb66754d04e4c7eafd1e98608b25d7dbb94
---
M Math.hooks.php
M Math.php
M modules/ext.math.mathjax.enabler.js
3 files changed, 20 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/28/112328/1

diff --git a/Math.hooks.php b/Math.hooks.php
index 498c66b..7af3a0d 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -92,7 +92,8 @@
 * @return string
 */
static function mathTagHook( $content, $attributes, $parser ) {
-   global $wgUseMathJax, $wgMathDisableTexFilter;
+   global $wgMathJax, $wgMathDisableTexFilter;
+
 
if ( trim( $content ) === '' ) { // bug 8372
return '';
@@ -122,7 +123,7 @@
 
$renderedMath = $renderer-render();
 
-   if ( $wgUseMathJax  $mode == MW_MATH_MATHJAX ) {
+   if ( $wgMathJax ) {
$parser-getOutput()-addModules( array( 
'ext.math.mathjax.enabler' ) );
}
 
@@ -140,13 +141,20 @@
 * @return Boolean: true
 */
static function onGetPreferences( $user, $defaultPreferences ) {
+   global $wgMathJax;
$defaultPreferences['math'] = array(
'type' = 'radio',
'options' = array_flip( self::getMathNames() ),
'label' = '#160;',
'section' = 'rendering/math',
);
-
+   if ( $wgMathJax ) {
+   $defaultPreferences['mathJax'] = array(
+   'type' = 'toggle',
+   'label-message' = 'mw_math_mathjax',
+   'section' = 'rendering/math',
+   );
+   }
return true;
}
 
diff --git a/Math.php b/Math.php
index 8a437fe..bfb2428 100644
--- a/Math.php
+++ b/Math.php
@@ -37,7 +37,7 @@
 define( 'MW_MATH_SOURCE', 3 );
 define( 'MW_MATH_MODERN', 4 ); /// @deprecated
 define( 'MW_MATH_MATHML', 5 ); /// @deprecated
-define( 'MW_MATH_MATHJAX', 6 ); /// new in 1.19/1.20
+define( 'MW_MATH_MATHJAX', 6 ); /// @deprecated
 define( 'MW_MATH_LATEXML', 7 ); /// new in 1.22
 /**@}*/
 
@@ -99,15 +99,14 @@
 $wgMathDirectory = false;
 
 /**
- * Experimental option to use MathJax library to do client-side math rendering
+ * Enables the option to use MathJax library to do client-side math rendering
  * when JavaScript is available. In supporting browsers this makes nice output
- * that's scalable for zooming, printing, and high-resolution displays.
- *
- * Not guaranteed to be stable at this time.
+ * that's scalable for zooming, printing, and high-resolution displays, even if
+ * the browsers do not support HTML5 (i.e. MathML).
  *
  * @todo Rename to $wgMathJax
  */
-$wgUseMathJax = false;
+$wgMathJax = false;
 
 /**
  * Use of LaTeXML for details see
diff --git a/modules/ext.math.mathjax.enabler.js 
b/modules/ext.math.mathjax.enabler.js
index 7a07546..4f675da 100644
--- a/modules/ext.math.mathjax.enabler.js
+++ b/modules/ext.math.mathjax.enabler.js
@@ -3,6 +3,10 @@
  */
 /*global mathJax:true, MathJax:true */
 ( function ( mw, $ ) {
+
+  if( ! mw.user.options.get( 'mathJax' ) ) {
+return true;
+  }
   if ( typeof mathJax === 'undefined' ) {
 mathJax = {};
   }
@@ -243,5 +247,4 @@
   $( document ).ready( function () {
 mathJax.Load();
   } );
-
 }( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf705cb66754d04e4c7eafd1e98608b25d7dbb94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: math2_0_0
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Introduce $wgMathValidModes to adjust the selectable math re... - change (mediawiki...Math)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Introduce $wgMathValidModes to adjust the selectable math 
rendering modes in user preferences
..

Introduce $wgMathValidModes to adjust the selectable math rendering modes in 
user preferences

* $wgUseLaTeXML becomes unnecessary use $wgMathValidModes[] = MW_MATH_LATEXML;
  to enable the LaTeXML rendering mode
* add $wgMathValidModes[] = MW_MATH_MATHJAX; to enable MathJax

Bug: 57981
Change-Id: I780ab030d5cd608fa13d4241d47061bf99e1
---
M Math.hooks.php
M Math.php
M MathRenderer.php
M RELEASE-NOTES-2.0
M tests/MathLaTeXMLTest.php
5 files changed, 27 insertions(+), 23 deletions(-)


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

diff --git a/Math.hooks.php b/Math.hooks.php
index 8bf0f96..498c66b 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -156,19 +156,17 @@
 * @return array of strings
 */
private static function getMathNames() {
-   global $wgUseMathJax, $wgUseLaTeXML;
-
-   $names = array(
-   MW_MATH_PNG = wfMessage( 'mw_math_png' )-escaped(),
-   MW_MATH_SOURCE = wfMessage( 'mw_math_source' 
)-escaped(),
+   global $wgMathValidModes;
+   $MathConstantNames = array(
+   MW_MATH_SOURCE = 'mw_math_source',
+   MW_MATH_PNG = 'mw_math_png',
+   MW_MATH_MATHML = 'mw_math_mathml',
+   MW_MATH_LATEXML = 'mw_math_latexml',
+   MW_MATH_MATHJAX = 'mw_math_mathjax'
);
-
-   if ( $wgUseMathJax ) {
-   $names[MW_MATH_MATHJAX] = wfMessage( 'mw_math_mathjax' 
)-escaped();
-   }
-
-   if ( $wgUseLaTeXML ) {
-   $names[MW_MATH_LATEXML] = wfMessage( 'mw_math_latexml' 
)-escaped();
+   $names = array();
+   foreach ( $wgMathValidModes as $mode ) {
+   $names[$mode] = wfMessage( $MathConstantNames[$mode] 
)-escaped();
}
 
return $names;
diff --git a/Math.php b/Math.php
index 5f42ff7..8a437fe 100644
--- a/Math.php
+++ b/Math.php
@@ -41,6 +41,14 @@
 define( 'MW_MATH_LATEXML', 7 ); /// new in 1.22
 /**@}*/
 
+/**@var array defines the mode allowed on the server */
+$wgMathValidModes = array( MW_MATH_PNG, MW_MATH_SOURCE );
+
+/*
+ * The default rendering mode for anonymous users.
+ * Valid options are defined in $wgMathValidModes.
+ */
+$wgDefaultUserOptions['math'] = MW_MATH_PNG;
 /** Location of the texvc binary */
 $wgTexvc = dirname( __FILE__ ) . '/math/texvc';
 /**
@@ -117,11 +125,6 @@
 $wgMathLaTeXMLUrl = 'http://latexml.mathweb.org/convert';
 
 /**
- * Allows to use LaTeXML as renderer for mathematical equation.
- */
-$wgUseLaTeXML = false;
-
-/**
  * The timeout for the HTTP-Request sent to the LaTeXML to render an equation,
  * in seconds.
  */
@@ -161,8 +164,6 @@
  */
 $wgMathDisableTexFilter = false;
 // end of config settings.
-
-$wgDefaultUserOptions['math'] = MW_MATH_PNG;
 
 $wgExtensionFunctions[] = 'MathHooks::setup';
 $wgHooks['ParserFirstCallInit'][] = 'MathHooks::onParserFirstCallInit';
diff --git a/MathRenderer.php b/MathRenderer.php
index 6044a6d..1d1b8e3 100644
--- a/MathRenderer.php
+++ b/MathRenderer.php
@@ -86,10 +86,10 @@
 * @return MathRenderer appropriate renderer for mode
 */
public static function getRenderer( $tex, $params = array(),  $mode = 
MW_MATH_PNG ) {
-   global $wgDefaultUserOptions;
-   $validModes = array( MW_MATH_PNG, MW_MATH_SOURCE, 
MW_MATH_MATHJAX, MW_MATH_LATEXML );
-   if ( !in_array( $mode, $validModes ) )
+   global $wgDefaultUserOptions, $wgMathValidModes;
+   if ( !in_array( $mode, $wgMathValidModes ) ) {
$mode = $wgDefaultUserOptions['math'];
+   }
switch ( $mode ) {
case MW_MATH_MATHJAX:
case MW_MATH_SOURCE:
diff --git a/RELEASE-NOTES-2.0 b/RELEASE-NOTES-2.0
index 86531e0..43bf86c 100644
--- a/RELEASE-NOTES-2.0
+++ b/RELEASE-NOTES-2.0
@@ -8,3 +8,7 @@
 === Configuration changes in 2.0 ===
 * $wgLaTeXMLUrl was renamed to $wgMathLaTeXMLUrl
 * $wgLaTeXMLTimeout was renamed to $wgMathLaTeXMLTimeout
+* $wgMathValidModes is introduced:
+  It determines the selectable math rendering modes MW_MATH_(PNG|MATHML|...) 
in user preferences.
+* $wgUseLaTeXML becomes unnecessary use $wgMathValidModes[] = MW_MATH_LATEXML;
+  to enable the LaTeXML rendering mode.
diff --git a/tests/MathLaTeXMLTest.php b/tests/MathLaTeXMLTest.php
index 754f7e0..2ecbd96 100644
--- a/tests/MathLaTeXMLTest.php
+++ b/tests/MathLaTeXMLTest.php
@@ -129,8 +129,9 @@
 * i.e. if the span element is generated right.
  

[MediaWiki-commits] [Gerrit] Change database layout - change (mediawiki...Math)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Change database layout
..

Change database layout

Add new table called mathoid for the new rendering mode
that will store MathML and SVG in the database.

Change-Id: I599c4390da9b8f36d800f379a33ad5ce90f5096c
---
M Math.hooks.php
M MathRenderer.php
M MathTexvc.php
R db/math.mysql.sql
A db/mathoid.mssql.sql
A db/mathoid.mysql.sql
A db/mathoid.oracle.sql
A db/mathoid.pg.sql
M tests/MathDatabaseTest.php
M tests/MathRendererTest.php
M tests/MathTexvcTest.php
11 files changed, 403 insertions(+), 173 deletions(-)


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

diff --git a/Math.hooks.php b/Math.hooks.php
index 160cffd..8bf0f96 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -198,26 +198,21 @@
 */
static function onLoadExtensionSchemaUpdates( $updater = null ) {
if ( is_null( $updater ) ) {
-   throw new MWException( 'Math extension is only 
necessary in 1.18 or above' );
+   throw new MWException( Math extension is only 
necessary in 1.18 or above );
}
-
-   $map = array(
-   'mysql' = 'math.sql',
-   'sqlite' = 'math.sql',
-   'postgres' = 'math.pg.sql',
-   'oracle' = 'math.oracle.sql',
-   'mssql' = 'math.mssql.sql',
-   );
-
+   $map = array( 'mysql', 'sqlite', 'postgres', 'oracle', 'mssql' 
);
$type = $updater-getDB()-getType();
-
-   if ( isset( $map[$type] ) ) {
-   $sql = dirname( __FILE__ ) . '/db/' . $map[$type];
-   $updater-addExtensionTable( 'math', $sql );
-   } else {
-   throw new MWException( Math extension does not 
currently support $type database. );
+   if ( $type == 'sqlite' ) {
+   $type = 'mysql'; // The commands used from the updater 
are the same
}
-
+   if ( in_array( $type, $map ) ) {
+   $sql = dirname( __FILE__ ) . '/db/math.' . $type . 
'.sql';
+   $updater-addExtensionTable( 'math', $sql );
+   $sql = dirname( __FILE__ ) . '/db/mathoid.' . $type . 
'.sql';
+   $updater-addExtensionTable( 'mathoid', $sql );
+   } else {
+   throw new MWException( Math extension does not 
currently support $type database.\n );
+   }
return true;
}
 
@@ -230,7 +225,7 @@
 */
static function onParserTestTables( $tables ) {
$tables[] = 'math';
-
+   $tables[] = 'mathoid';
return true;
}
 
diff --git a/MathRenderer.php b/MathRenderer.php
index 925321f..6044a6d 100644
--- a/MathRenderer.php
+++ b/MathRenderer.php
@@ -21,33 +21,36 @@
  * @author Moritz Schubotz
  */
 abstract class MathRenderer {
-   /**
-*  The following variables should made private, as soon it can be 
verified
-*  that they are not being directly accessed by other extensions.
-*/
-   protected $mode = MW_MATH_PNG;
+
+   // REPRESENTATIONS OF THE MATHEMATCAL CONTENT
+   /** @var string tex representation */
protected $tex = '';
+   /** @var string MathML content and presentation */
+   protected $mathml = '';
+   /** @var string SVG layout only (no semantics)*/
+   protected $svg = '';
/** @var string the original user input string (which was used to 
caculate the inputhash) */
protected $userInputTex = '';
-   /**
-* is calculated by texvc.
-* @var string
-*/
-   protected $hash = '';
-   protected $html = '';
-   protected $mathml = '';
-   protected $conservativeness = 0;
+   /** @var array with user-defined parameters passed to the extension 
(not used) */
protected $params = '';
-   //STATE OF THE CLASS INSTANCE
+
+   // STATE OF THE CLASS INSTANCE
/** @var boolean has variable tex been security-checked */
protected $texSecure = false;
+   /** @var boolean has the mathtematical content changed */
protected $changed = false;
-   /**
-* @var boolean forces rerendering if set to true
-*/
+   /** @var boolean is there a database entry for the mathematical content 
*/
+   protected $storedInDatabase = null;
+   /** @var boolean is there a request to purge the existing mathematical 
content */
protected $purge = false;
-   protected $recall;
+   /** @var string with last occurred error */
protected $lastError = '';
+   /** @var string md5 value from userInputTex */
+   protected $md5 = '';

[MediaWiki-commits] [Gerrit] remove armourMath and wgContLang (bug 60799) - change (mediawiki...Math)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: remove armourMath and wgContLang (bug 60799)
..

remove armourMath and wgContLang (bug 60799)

* armourMath is no longer needed

Bug: 60799
Change-Id: I1134d34d403b527821a1f7ccd370e78cf6197d71
---
M Math.hooks.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/Math.hooks.php b/Math.hooks.php
index b9453a5..160cffd 100644
--- a/Math.hooks.php
+++ b/Math.hooks.php
@@ -92,7 +92,7 @@
 * @return string
 */
static function mathTagHook( $content, $attributes, $parser ) {
-   global $wgContLang, $wgUseMathJax, $wgMathDisableTexFilter;
+   global $wgUseMathJax, $wgMathDisableTexFilter;
 
if ( trim( $content ) === '' ) { // bug 8372
return '';
@@ -127,10 +127,9 @@
}
 
$renderer-writeCache();
-   $result = $wgContLang-armourMath( $renderedMath );
wfProfileOut( __METHOD__ );
 
-   return $result;
+   return array( $renderedMath, markerType = 'nowiki' );
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1134d34d403b527821a1f7ccd370e78cf6197d71
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: math2_0_0
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Fix: Allow div / as valid Math output - change (mediawiki...Math)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Fix: Allow div / as valid Math output
..

Fix: Allow div / as valid Math output

Some simple math tags such as the rendering result of
$\mathcal{ABC}$
are converted to an HTML-div tag by LaTeXML if inline-mode
is used. This change
* makes the $wgMathDefaultLaTeXMLSetting easier to read
* improves the XML validation of the LaTeXML output.

Change-Id: I92cf5189bfce6c05e7e794155b4e412545db3723
---
M Math.php
M MathLaTeXML.php
M tests/MathLaTeXMLTest.php
3 files changed, 90 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Math 
refs/changes/25/112325/1

diff --git a/Math.php b/Math.php
index 6ed0d6c..5f42ff7 100644
--- a/Math.php
+++ b/Math.php
@@ -130,7 +130,26 @@
  * Setting for the LaTeXML renderer.
  * See http://dlmf.nist.gov/LaTeXML/manual/commands/latexmlpost.xhtml for 
details.
  */
-$wgMathDefaultLaTeXMLSetting = 
'format=xhtmlwhatsin=mathwhatsout=mathpmmlcmmlnodefaultresourcespreload=LaTeX.poolpreload=article.clspreload=amsmath.stypreload=amsthm.stypreload=amstext.stypreload=amssymb.stypreload=eucal.stypreload=[dvipsnames]xcolor.stypreload=url.stypreload=hyperref.stypreload=[ids]latexml.stypreload=texvc';
+$wgMathDefaultLaTeXMLSetting = array( 'format' = 'xhtml',
+   'whatsin' = 'math',
+   'whatsout' = 'math',
+   'pmml',
+   'cmml',
+   'nodefaultresources',
+   'preload' = array( 'LaTeX.pool',
+   'article.cls',
+   'amsmath.sty',
+   'amsthm.sty',
+   'amstext.sty',
+   'amssymb.sty',
+   'eucal.sty',
+   '[dvipsnames]xcolor.sty',
+   'url.sty',
+   'hyperref.sty',
+   '[ids]latexml.sty',
+   'texvc' ),
+   );
+
 /**
  * The link to the texvc executable
  */
diff --git a/MathLaTeXML.php b/MathLaTeXML.php
index f3dce52..b65ebd6 100644
--- a/MathLaTeXML.php
+++ b/MathLaTeXML.php
@@ -15,6 +15,10 @@
 * @var String settings for LaTeXML daemon
 */
private $LaTeXMLSettings = '';
+   /** @var boolean if false LaTeXML output is not validated*/
+   private $XMLValidation = true;
+   protected static $DEFAULT_ALLOWED_ROOT_ELEMENTS = array( 'math', 'div', 
'table', 'query' );
+   protected $allowedRootElements = '';
 
/**
 * Converts an array with LaTeXML settings to a URL encoded String.
@@ -30,7 +34,10 @@
//removes the [1] [2]... for the unnamed subarrays 
since LaTeXML
//assigns multiple values to one key e.g.

//preload=amsmath.stypreload=amsthm.stypreload=amstext.sty
-   return preg_replace('|\%5B\d+\%5D|', '', 
wfArrayToCgi($array)) ;
+   $cgi_string = wfArrayToCgi( $array );
+   $cgi_string = preg_replace( '|\%5B\d+\%5D|', '', 
$cgi_string );
+   $cgi_string = preg_replace( '|\d+=|', '', $cgi_string 
);
+   return $cgi_string;
}
}
/**
@@ -57,6 +64,28 @@
 */
public function setLaTeXMLSettings( $settings ) {
$this-LaTeXMLSettings = $settings;
+   }
+
+   /**
+* Gets the allowed root elements the rendered math tag might have.
+*
+* @return array
+*/
+   public function getAllowedRootElements() {
+   if ( $this-allowedRootElements ) {
+   return $this-allowedRootElements;
+   } else {
+   return self::$DEFAULT_ALLOWED_ROOT_ELEMENTS;
+   }
+   }
+
+   /**
+* Sets the allowed root elements the rendered math tag might have.
+* An empty value indicates to use the default settings.
+* @param array $settings
+*/
+   public function setAllowedRootElments( $settings ) {
+   $this-allowedRootElements = $settings;
}
 
/* (non-PHPdoc)
@@ -90,7 +119,7 @@
} else {
$dbres = $this-readFromDatabase();
if ( $dbres ) {
-   if ( self::isValidMathML( $this-getMathml() ) 
) {
+   if ( $this-isValidMathML( $this-getMathml() ) 
) {
wfDebugLog( Math, Valid entry found 
in database. );
return false;
} else {
@@ -199,7 +228,7 @@
if ( $this-makeRequest( $host, $post, $res, $this-lastError ) 
) {
$result = json_decode( $res );
if ( json_last_error() === JSON_ERROR_NONE ) {
-   if ( self::isValidMathML( $result-result ) ) {
+   if ( 

[MediaWiki-commits] [Gerrit] Use site object from site generator directly sorted by dbname - change (pywikibot/core)

2014-02-09 Thread Xqt (Code Review)
Xqt has uploaded a new change for review.

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

Change subject: Use site object from site generator directly sorted by dbname
..

Use site object from site generator directly sorted by dbname

Since we have the site objects now, we use them directly without
re-creating them with it's language code. Also we sort the sites
by their dbnames.

Change-Id: If5b4f155a04665f2c32cf11931a13102d704d42a
---
M scripts/featured.py
1 file changed, 9 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/29/112329/1

diff --git a/scripts/featured.py b/scripts/featured.py
index 5277e53..d8cbedf 100644
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -240,7 +240,7 @@
 if not self.tasks:
 self.tasks = ['featured']
 
-def itercode(self, task):
+def itersites(self, task):
  generator for site codes to be processed 
 
 def _generator():
@@ -252,7 +252,7 @@
 item_no = former_name['wikidata'][1]
 dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
 dp.get()
-for key in dp.sitelinks.keys():
+for key in sorted(dp.sitelinks.keys()):
 try:
 site = self.site.fromDBName(key)
 except pywikibot.NoSuchSite:
@@ -274,10 +274,10 @@
 start = 
 if not end:
 end = zzz
-return (code for code in generator
-if code = start and code = end)
+return (site for site in generator
+if site.code = start and site.code = end)
 else:
-return (code for code in generator if code in fromlang)
+return (site for site in generator if site.code in fromlang)
 else:
 pywikibot.warning(u'No sites given to verify %s articles.\n'
   u'Please use -fromlang: or fromall option\n'
@@ -329,18 +329,17 @@
 return
 
 self.readcache(task)
-for code in self.itercode(task):
+for site in self.itersites(task):
 try:
-self.treat(code, task)
+self.treat(site, task)
 except KeyboardInterrupt:
 pywikibot.output('\nQuitting %s treat...' % task)
 break
 self.writecache()
 
-def treat(self, code, process):
-fromsite = pywikibot.Site(code)
+def treat(self, fromsite, task):
 if fromsite != self.site:
-self.featuredWithInterwiki(fromsite, process)
+self.featuredWithInterwiki(fromsite, task)
 
 def featuredArticles(self, site, task, cache):
 code = site.lang

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If5b4f155a04665f2c32cf11931a13102d704d42a
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Fix problems with translations. - change (mediawiki...VoteNY)

2014-02-09 Thread Toniher (Code Review)
Toniher has uploaded a new change for review.

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

Change subject: Fix problems with translations.
..

Fix problems with translations.

Change-Id: I5dba043737024445d8ff13c932a073bf4dc0f895
---
M Vote.i18n.php
M Vote.php
2 files changed, 259 insertions(+), 259 deletions(-)


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

diff --git a/Vote.i18n.php b/Vote.i18n.php
index a225a6b..22da8b1 100644
--- a/Vote.i18n.php
+++ b/Vote.i18n.php
@@ -15,10 +15,10 @@
 $messages['en'] = array(
'voteny-desc' = 'JavaScript-based voting with the 
ttlt;votegt;/tt tag',
'voteny-link' = 'Vote',
-   'voteny-unvote-link' = 'unvote',
-   'voteny-community-score' = 'community score: $1',
+   'voteny-unvote-link' = 'voteny-unvote',
+   'voteny-community-score' = 'voteny-community score: $1',
'voteny-ratings' = '{{PLURAL:$1|one rating|$1 ratings}}',
-   'voteny-remove' = 'remove',
+   'voteny-remove' = 'voteny-remove',
'voteny-gave-this' = 'you gave this a $1',
'voteny-votes' = '{{PLURAL:$1|one vote|$1 votes}}',
// Special:TopRatings
@@ -34,23 +34,23 @@
  * @author Shirayuki
  */
 $messages['qqq'] = array(
-   'desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
-   'link' = 'Link title',
-   'unvote-link' = 'Displayed to the user after their vote has been 
successfully added; they can click on this link to remove their vote.',
-   'community-score' = 'Community score is the average of votes a page 
has been given.
+   'voteny-desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
+   'voteny-link' = 'voteny-link title',
+   'voteny-unvote-link' = 'Displayed to the user after their vote has 
been successfully added; they can click on this link to remove their vote.',
+   'voteny-community-score' = 'voteny-community score is the average of 
votes a page has been given.
 
 Parameters:
 * $1 - the actual score in numbers (i.e. 4.5 or 3)',
-   'ratings' = 'Parameters:
+   'voteny-ratings' = 'Parameters:
 * $1 - the number of ratings, if said number is greater than 1',
-   'remove' = 'Link title, clicking on this link removes your vote. Refer 
to the [[mw:File:VoteNY.png|image]] for details.',
-   'gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
+   'voteny-remove' = 'voteny-link title, clicking on this link removes 
your vote. Refer to the [[mw:File:VoteNY.png|image]] for details.',
+   'voteny-gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
 
 Parameter:
 * $1 - a number, the vote the user gave to the page.
 
 Refer to the [[mw:File:VoteNY.png|image]] for details.',
-   'votes' = 'Parameters:
+   'voteny-votes' = 'Parameters:
 * $1 - number of votes',
'topratings' = '{{doc-special|TopRatings}}',
'topratings-no-pages' = 'Displayed on Special:TopRatings if there are 
no top rated pages, i.e. if no pages have been rated on the wiki at all.',
@@ -62,14 +62,14 @@
  * @author Xuacu
  */
 $messages['ast'] = array(
-   'desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
-   'link' = 'Votar',
-   'unvote-link' = 'retirar el votu',
-   'community-score' = 'puntuación de la comunidá: $1',
-   'ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
-   'remove' = 'desaniciar',
-   'gave-this' = 'dio-y a esto un $1',
-   'votes' = '{{PLURAL:$1|un votu|$1 votos}}',
+   'voteny-desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
+   'voteny-link' = 'Votar',
+   'voteny-unvote-link' = 'retirar el votu',
+   'voteny-community-score' = 'puntuación de la comunidá: $1',
+   'voteny-ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
+   'voteny-remove' = 'desaniciar',
+   'voteny-gave-this' = 'dio-y a esto un $1',
+   'voteny-votes' = '{{PLURAL:$1|un votu|$1 votos}}',
'topratings' = 'Páxines meyor calificaes',
'topratings-no-pages' = 'Nun hai páxines meyor calificaes',
'right-vote' = 'Votar páxines',
@@ -79,21 +79,21 @@
  * @author පසිඳු කාවින්ද
  */
 $messages['bg'] = array(
-   'remove' = 'премахване',
+   'voteny-remove' = 'премахване',
 );
 
 /** Catalan (català)
  * @author Toniher
  */
 $messages['ca'] = array(
-   'desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
-   'link' = 'Vota',
-   'unvote-link' = 'anul·la el vot',
-   'community-score' = 'puntuació comunitària: $1',
-   'ratings' = '{{PLURAL:$1|una valoració|$1 valoracions}}',
-   'remove' = 'suprimeix',
-   'gave-this' = 'vau donar-li un $1',
-   'votes' = '{{PLURAL:$1|un vot|$1 vots}}',
+   'voteny-desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
+   

[MediaWiki-commits] [Gerrit] Various JS fixes - change (mediawiki...MediaWikiChat)

2014-02-09 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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

Change subject: Various JS fixes
..

Various JS fixes

Attempt to get some IE compatibilty

Change-Id: If74a3c24447865e45f9feadb8dbbcb1249079ce3
---
M MediaWikiChat.js
1 file changed, 79 insertions(+), 90 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat 
refs/changes/31/112331/1

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 3da009f..f35199c 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -1,4 +1,4 @@
-/* global $, mw, sajax_do_call */
+/* global $, mw */
 var MediaWikiChat = {
users: [],
amIMod: false,
@@ -42,7 +42,7 @@
},
 
realTimestamp: function( timestamp ) {
-   var d = new Date(), month = '';
+   var d = new Date();
 
d.setTime( timestamp * 10 );
 
@@ -63,7 +63,7 @@
var dayThen = dateThen.getDate();
 
var dateNow = new Date();
-   var tsNow = parseInt( dateNow.getTime() / 10 );
+   var tsNow = parseInt( dateNow.getTime() / 10, 10 );
var dayNow = dateNow.getDate();
 
var diff = ( tsNow - timestamp ) / 100;
@@ -94,13 +94,14 @@
 
redoTimestamps: function() {
$.each( $( '.mwchat-item-timestamp.pretty' ), function( index, 
item ) {
-   var timestamp = $( this ).attr( 'data-timestamp' );
-   var oldPretty = $( this ).html();
+   item = $( item );
+   var timestamp = item.attr( 'data-timestamp' );
+   var oldPretty = item.html();
var newPretty = MediaWikiChat.prettyTimestamp( 
timestamp );
if ( oldPretty != newPretty ) {
-   $( this ).fadeOut( 250, function() {
-   $( this ).html( newPretty );
-   $( this ).fadeIn( 250 );
+   item.fadeOut( 250, function() {
+   item.html( newPretty );
+   item.fadeIn( 250 );
});
}
});
@@ -116,66 +117,64 @@
return html;
},
 
-   getNew: function( called ) {
-   $.ajax({
+   getNew: function() {
+   $.ajax( {
url: mw.config.get( 'wgScriptPath' ) + '/api.php',
-   data: { 'action': 'chatgetnew', 'format': 'json' },
-   })
-   .done( function( response ) {
+   data: { 'action': 'chatgetnew', 'format': 'json' }
+   } ).done( function( response ) {
var data = response.chatgetnew;
 
var onlineUsers = [];
 
for ( var userId in data.users ) {
-   var obj = data.users[userId];
-   MediaWikiChat.userData[userId] = { 'name': 
obj.name, 'avatar': obj.avatar, 'gender': obj.gender };
-   if ( obj.mod ) {
+   var user = data.users[userId];
+   MediaWikiChat.userData[userId] = { 'name': 
user.name, 'avatar': user.avatar, 'gender': user.gender };
+   if ( user.mod ) {
MediaWikiChat.userData[userId].mod = 
true;
}
-   if ( obj.online ) {
+   if ( user.online ) {
onlineUsers[onlineUsers.length] = 
userId;
}
}
 
-   MediaWikiChat.amIMod = data.users[wgUserId].mod;
+   MediaWikiChat.amIMod = data.users[mw.config.get( 
'wgUserId' )].mod;
 
MediaWikiChat.doUsers( onlineUsers );
 
-   for ( var timestamp in data.messages ) {
-   var obj = data.messages[timestamp];
+   for ( var messageTimestamp in data.messages ) {
+   var message = data.messages[messageTimestamp];
MediaWikiChat.addMessage(
-   obj.from,
-   obj['*'],
-   timestamp
+   message.from,
+   message['*'],
+   messageTimestamp
);
}
 
-   for ( var timestamp in data.pms ) {
-   var obj = data.pms[timestamp];
-  

[MediaWiki-commits] [Gerrit] Various JS fixes - change (mediawiki...MediaWikiChat)

2014-02-09 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Various JS fixes
..


Various JS fixes

Attempt to get some IE compatibilty

Change-Id: If74a3c24447865e45f9feadb8dbbcb1249079ce3
---
M MediaWikiChat.js
1 file changed, 79 insertions(+), 90 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 3da009f..f35199c 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -1,4 +1,4 @@
-/* global $, mw, sajax_do_call */
+/* global $, mw */
 var MediaWikiChat = {
users: [],
amIMod: false,
@@ -42,7 +42,7 @@
},
 
realTimestamp: function( timestamp ) {
-   var d = new Date(), month = '';
+   var d = new Date();
 
d.setTime( timestamp * 10 );
 
@@ -63,7 +63,7 @@
var dayThen = dateThen.getDate();
 
var dateNow = new Date();
-   var tsNow = parseInt( dateNow.getTime() / 10 );
+   var tsNow = parseInt( dateNow.getTime() / 10, 10 );
var dayNow = dateNow.getDate();
 
var diff = ( tsNow - timestamp ) / 100;
@@ -94,13 +94,14 @@
 
redoTimestamps: function() {
$.each( $( '.mwchat-item-timestamp.pretty' ), function( index, 
item ) {
-   var timestamp = $( this ).attr( 'data-timestamp' );
-   var oldPretty = $( this ).html();
+   item = $( item );
+   var timestamp = item.attr( 'data-timestamp' );
+   var oldPretty = item.html();
var newPretty = MediaWikiChat.prettyTimestamp( 
timestamp );
if ( oldPretty != newPretty ) {
-   $( this ).fadeOut( 250, function() {
-   $( this ).html( newPretty );
-   $( this ).fadeIn( 250 );
+   item.fadeOut( 250, function() {
+   item.html( newPretty );
+   item.fadeIn( 250 );
});
}
});
@@ -116,66 +117,64 @@
return html;
},
 
-   getNew: function( called ) {
-   $.ajax({
+   getNew: function() {
+   $.ajax( {
url: mw.config.get( 'wgScriptPath' ) + '/api.php',
-   data: { 'action': 'chatgetnew', 'format': 'json' },
-   })
-   .done( function( response ) {
+   data: { 'action': 'chatgetnew', 'format': 'json' }
+   } ).done( function( response ) {
var data = response.chatgetnew;
 
var onlineUsers = [];
 
for ( var userId in data.users ) {
-   var obj = data.users[userId];
-   MediaWikiChat.userData[userId] = { 'name': 
obj.name, 'avatar': obj.avatar, 'gender': obj.gender };
-   if ( obj.mod ) {
+   var user = data.users[userId];
+   MediaWikiChat.userData[userId] = { 'name': 
user.name, 'avatar': user.avatar, 'gender': user.gender };
+   if ( user.mod ) {
MediaWikiChat.userData[userId].mod = 
true;
}
-   if ( obj.online ) {
+   if ( user.online ) {
onlineUsers[onlineUsers.length] = 
userId;
}
}
 
-   MediaWikiChat.amIMod = data.users[wgUserId].mod;
+   MediaWikiChat.amIMod = data.users[mw.config.get( 
'wgUserId' )].mod;
 
MediaWikiChat.doUsers( onlineUsers );
 
-   for ( var timestamp in data.messages ) {
-   var obj = data.messages[timestamp];
+   for ( var messageTimestamp in data.messages ) {
+   var message = data.messages[messageTimestamp];
MediaWikiChat.addMessage(
-   obj.from,
-   obj['*'],
-   timestamp
+   message.from,
+   message['*'],
+   messageTimestamp
);
}
 
-   for ( var timestamp in data.pms ) {
-   var obj = data.pms[timestamp];
-   var convWith = obj.conv;
+ 

[MediaWiki-commits] [Gerrit] Provide language names on action=parseprop=langlinks - change (mediawiki/core)

2014-02-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Provide language names on action=parseprop=langlinks
..

Provide language names on action=parseprop=langlinks

This can helps the client to build a language html.

Bug: 58627
Change-Id: Iaa475cbe7b0268ee86e40ec0fa42bbe51bba02c9
---
M RELEASE-NOTES-1.23
M includes/api/ApiParse.php
2 files changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23
index 660869c..4fc198a 100644
--- a/RELEASE-NOTES-1.23
+++ b/RELEASE-NOTES-1.23
@@ -163,6 +163,7 @@
 * Added siprop=restrictions to API action=querymeta=siteinfo for querying
   possible page restriction (protection) levels and types.
 * Added prop 'limitreportdata' and 'limitreporthtml' to action=parse.
+* (bug 58627) Provide language names on action=parseprop=langlinks.
 
 === Languages updated in 1.23 ===
 
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index 495071a..f5c072a 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -487,6 +487,10 @@
$entry['lang'] = $bits[0];
if ( $title ) {
$entry['url'] = wfExpandUrl( 
$title-getFullURL(), PROTO_CURRENT );
+   // localised language name in user language 
(maybe set by uselang=)
+   $entry['langname'] = 
Language::fetchLanguageName( $title-getInterwiki(), 
$this-getLanguage()-getCode() );
+   // native language name
+   $entry['autonym'] = 
Language::fetchLanguageName( $title-getInterwiki() );
}
ApiResult::setContent( $entry, $bits[1] );
$result[] = $entry;

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

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

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


[MediaWiki-commits] [Gerrit] Fix translation problems in files - change (mediawiki...VoteNY)

2014-02-09 Thread Toniher (Code Review)
Toniher has uploaded a new change for review.

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

Change subject: Fix translation problems in files
..

Fix translation problems in files

Change-Id: Ib5264d0ff9ad3aeabd9fc13dec277bf3878cc0ec
---
M Vote.i18n.php
M Vote.php
2 files changed, 256 insertions(+), 256 deletions(-)


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

diff --git a/Vote.i18n.php b/Vote.i18n.php
index a225a6b..71245c2 100644
--- a/Vote.i18n.php
+++ b/Vote.i18n.php
@@ -34,23 +34,23 @@
  * @author Shirayuki
  */
 $messages['qqq'] = array(
-   'desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
-   'link' = 'Link title',
-   'unvote-link' = 'Displayed to the user after their vote has been 
successfully added; they can click on this link to remove their vote.',
-   'community-score' = 'Community score is the average of votes a page 
has been given.
+   'voteny-desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
+   'voteny-link' = 'link title',
+   'voteny-unvote-link' = 'Displayed to the user after their vote has 
been successfully added; they can click on this link to remove their vote.',
+   'voteny-community-score' = 'community score is the average of votes a 
page has been given.
 
 Parameters:
 * $1 - the actual score in numbers (i.e. 4.5 or 3)',
-   'ratings' = 'Parameters:
+   'voteny-ratings' = 'Parameters:
 * $1 - the number of ratings, if said number is greater than 1',
-   'remove' = 'Link title, clicking on this link removes your vote. Refer 
to the [[mw:File:VoteNY.png|image]] for details.',
-   'gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
+   'voteny-remove' = 'link title, clicking on this link removes your 
vote. Refer to the [[mw:File:VoteNY.png|image]] for details.',
+   'voteny-gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
 
 Parameter:
 * $1 - a number, the vote the user gave to the page.
 
 Refer to the [[mw:File:VoteNY.png|image]] for details.',
-   'votes' = 'Parameters:
+   'voteny-votes' = 'Parameters:
 * $1 - number of votes',
'topratings' = '{{doc-special|TopRatings}}',
'topratings-no-pages' = 'Displayed on Special:TopRatings if there are 
no top rated pages, i.e. if no pages have been rated on the wiki at all.',
@@ -62,14 +62,14 @@
  * @author Xuacu
  */
 $messages['ast'] = array(
-   'desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
-   'link' = 'Votar',
-   'unvote-link' = 'retirar el votu',
-   'community-score' = 'puntuación de la comunidá: $1',
-   'ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
-   'remove' = 'desaniciar',
-   'gave-this' = 'dio-y a esto un $1',
-   'votes' = '{{PLURAL:$1|un votu|$1 votos}}',
+   'voteny-desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
+   'voteny-link' = 'Votar',
+   'voteny-unvote-link' = 'retirar el votu',
+   'voteny-community-score' = 'puntuación de la comunidá: $1',
+   'voteny-ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
+   'voteny-remove' = 'desaniciar',
+   'voteny-gave-this' = 'dio-y a esto un $1',
+   'voteny-votes' = '{{PLURAL:$1|un votu|$1 votos}}',
'topratings' = 'Páxines meyor calificaes',
'topratings-no-pages' = 'Nun hai páxines meyor calificaes',
'right-vote' = 'Votar páxines',
@@ -79,21 +79,21 @@
  * @author පසිඳු කාවින්ද
  */
 $messages['bg'] = array(
-   'remove' = 'премахване',
+   'voteny-remove' = 'премахване',
 );
 
 /** Catalan (català)
  * @author Toniher
  */
 $messages['ca'] = array(
-   'desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
-   'link' = 'Vota',
-   'unvote-link' = 'anul·la el vot',
-   'community-score' = 'puntuació comunitària: $1',
-   'ratings' = '{{PLURAL:$1|una valoració|$1 valoracions}}',
-   'remove' = 'suprimeix',
-   'gave-this' = 'vau donar-li un $1',
-   'votes' = '{{PLURAL:$1|un vot|$1 vots}}',
+   'voteny-desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
+   'voteny-link' = 'Vota',
+   'voteny-unvote-link' = 'anul·la el vot',
+   'voteny-community-score' = 'puntuació comunitària: $1',
+   'voteny-ratings' = '{{PLURAL:$1|una valoració|$1 valoracions}}',
+   'voteny-remove' = 'suprimeix',
+   'voteny-gave-this' = 'vau donar-li un $1',
+   'voteny-votes' = '{{PLURAL:$1|un vot|$1 vots}}',
'topratings' = 'Pàgines més puntuades',
'topratings-no-pages' = 'No hi ha cap pàgina puntuada.',
'right-vote' = 'Pàgines de votació',
@@ -105,14 +105,14 @@
  * @author Purodha
  */
 $messages['de'] = array(
-   'desc' = 'Ergänzt das Tag ttlt;votegt;/tt zum Durchführen 

[MediaWiki-commits] [Gerrit] (bug 59970) Python 3 import blocks are now explicit - change (pywikibot/core)

2014-02-09 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: (bug 59970) Python 3 import blocks are now explicit
..

(bug 59970) Python 3 import blocks are now explicit

Instead of try:... except ImportError:..., we now use
if sys.version_info[0] == 2.

Change-Id: Ib4199604b62d8bb276db6d1d3ff592a71a4e5e93
---
M pywikibot/__init__.py
M pywikibot/comms/http.py
M pywikibot/comms/threadedhttp.py
M pywikibot/textlib.py
4 files changed, 10 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/34/112334/1

diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index bd7bd73..b9edb35 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -18,10 +18,10 @@
 import sys
 import threading
 
-try:
-from queue import Queue
-except ImportError:
+if sys.version_info[0] == 2:
 from Queue import Queue
+else:
+from queue import Queue
 
 # Use pywikibot. prefix for all in-package imports; this is to prevent
 # confusion with similarly-named modules in version 1 framework, for users
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 2aafc7d..a3a25fc 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -27,12 +27,12 @@
 import atexit
 import time
 
-try:
+if sys.version_info[0] == 2:
 from httplib2 import SSLHandshakeError
 import Queue
 import urlparse
 import cookielib
-except ImportError:
+else:
 from ssl import SSLError as SSLHandshakeError
 import queue as Queue
 import urllib as urlparse
diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index 0447b77..3b6f6a8 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -29,9 +29,9 @@
 
 import urllib
 
-try:
+if sys.version_info[0] == 2:
 import cookielib
-except ImportError:
+else:
 from http import cookiejar as cookielib
 
 import pywikibot
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 4ce5607..725d676 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -21,9 +21,10 @@
 import pywikibot
 import datetime
 import re
-try:
+import sys
+if sys.version_info[0] == 2:
 from HTMLParser import HTMLParser
-except ImportError:
+else:
 from html.parser import HTMLParser
 
 from . import config2 as config

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4199604b62d8bb276db6d1d3ff592a71a4e5e93
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] (bug 59970) Python 3 import blocks are now explicit - change (pywikibot/core)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bug 59970) Python 3 import blocks are now explicit
..


(bug 59970) Python 3 import blocks are now explicit

Instead of try:... except ImportError:..., we now use
if sys.version_info[0] == 2.

Change-Id: Ib4199604b62d8bb276db6d1d3ff592a71a4e5e93
---
M pywikibot/__init__.py
M pywikibot/comms/http.py
M pywikibot/comms/threadedhttp.py
M pywikibot/textlib.py
4 files changed, 10 insertions(+), 9 deletions(-)

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



diff --git a/pywikibot/__init__.py b/pywikibot/__init__.py
index bd7bd73..b9edb35 100644
--- a/pywikibot/__init__.py
+++ b/pywikibot/__init__.py
@@ -18,10 +18,10 @@
 import sys
 import threading
 
-try:
-from queue import Queue
-except ImportError:
+if sys.version_info[0] == 2:
 from Queue import Queue
+else:
+from queue import Queue
 
 # Use pywikibot. prefix for all in-package imports; this is to prevent
 # confusion with similarly-named modules in version 1 framework, for users
diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 2aafc7d..a3a25fc 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -27,12 +27,12 @@
 import atexit
 import time
 
-try:
+if sys.version_info[0] == 2:
 from httplib2 import SSLHandshakeError
 import Queue
 import urlparse
 import cookielib
-except ImportError:
+else:
 from ssl import SSLError as SSLHandshakeError
 import queue as Queue
 import urllib as urlparse
diff --git a/pywikibot/comms/threadedhttp.py b/pywikibot/comms/threadedhttp.py
index 0447b77..3b6f6a8 100644
--- a/pywikibot/comms/threadedhttp.py
+++ b/pywikibot/comms/threadedhttp.py
@@ -29,9 +29,9 @@
 
 import urllib
 
-try:
+if sys.version_info[0] == 2:
 import cookielib
-except ImportError:
+else:
 from http import cookiejar as cookielib
 
 import pywikibot
diff --git a/pywikibot/textlib.py b/pywikibot/textlib.py
index 4ce5607..725d676 100644
--- a/pywikibot/textlib.py
+++ b/pywikibot/textlib.py
@@ -21,9 +21,10 @@
 import pywikibot
 import datetime
 import re
-try:
+import sys
+if sys.version_info[0] == 2:
 from HTMLParser import HTMLParser
-except ImportError:
+else:
 from html.parser import HTMLParser
 
 from . import config2 as config

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4199604b62d8bb276db6d1d3ff592a71a4e5e93
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Xqt i...@gno.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] Use python version dependent import - change (pywikibot...httplib2)

2014-02-09 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: Use python version dependent import
..

Use python version dependent import

Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
---
M __init__.py
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/externals/httplib2 
refs/changes/35/112335/1

diff --git a/__init__.py b/__init__.py
index 8b48476..18f9398 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,3 +1,7 @@
 import inspect
-import python2.httplib2 as httplib2
+import sys
+if sys.version_info[0] == 2:
+from .python2 import httplib2
+else:
+from .python3 import httplib2
 globals().update(inspect.getmembers(httplib2))

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/externals/httplib2
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] (bug 59970) show clear error message if httplib2 is not found - change (pywikibot/core)

2014-02-09 Thread Merlijn van Deen (Code Review)
Merlijn van Deen has uploaded a new change for review.

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

Change subject: (bug 59970) show clear error message if httplib2 is not found
..

(bug 59970) show clear error message if httplib2 is not found

and suggest to git submodule update --init to get it

Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
---
M pwb.py
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/36/112336/1

diff --git a/pwb.py b/pwb.py
index 86c9b9e..b07b0e9 100644
--- a/pwb.py
+++ b/pwb.py
@@ -103,6 +103,14 @@
 os.path.join(rewrite_path, 'externals')
 ] + sys.path[1:]
 
+# try importing the known externals, and raise an error if they are not found
+try:
+import httplib2
+except ImportError as e:
+print(ImportError: %s % e)
+print(Did you clone without --recursive? Try running 'git submodule 
update --init'.)
+sys.exit(1)
+
 if PYWIKIBOT2_DIR not in os.environ:
 os.environ[PYWIKIBOT2_DIR] = os.path.split(__file__)[0]
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl

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


[MediaWiki-commits] [Gerrit] Enable -count option, use site objects from site generator - change (pywikibot/core)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Enable -count option, use site objects from site generator
..


Enable -count option, use site objects from site generator

Since we have the site objects now, we use them directly without
re-creating them with it's language code. Also we sort the sites
by their dbnames.

Change-Id: If5b4f155a04665f2c32cf11931a13102d704d42a
---
M scripts/featured.py
1 file changed, 32 insertions(+), 26 deletions(-)

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



diff --git a/scripts/featured.py b/scripts/featured.py
index 5277e53..e958979 100644
--- a/scripts/featured.py
+++ b/scripts/featured.py
@@ -47,7 +47,6 @@
   Example: featured.py -fromlang:en,he -count
   counts how many featured articles exist in the en and he
   wikipedias.
-  (sorry, not implemented yet)
 
 -quietno corresponding pages are displayed.
 
@@ -55,7 +54,7 @@
 #
 # (C) Maxim Razin, 2005
 # (C) Leonardo Gregianin, 2005-2008
-# (C) xqt, 2009-2013
+# (C) xqt, 2009-2014
 # (C) Pywikibot team, 2005-2012
 #
 # Distributed under the terms of the MIT license.
@@ -240,7 +239,7 @@
 if not self.tasks:
 self.tasks = ['featured']
 
-def itercode(self, task):
+def itersites(self, task):
  generator for site codes to be processed 
 
 def _generator():
@@ -252,7 +251,7 @@
 item_no = former_name['wikidata'][1]
 dp = pywikibot.ItemPage(self.site.data_repository(), item_no)
 dp.get()
-for key in dp.sitelinks.keys():
+for key in sorted(dp.sitelinks.keys()):
 try:
 site = self.site.fromDBName(key)
 except pywikibot.NoSuchSite:
@@ -260,7 +259,7 @@
  % key)
 else:
 if site.family == self.site.family:
-yield site.code
+yield site
 
 generator = _generator()
 
@@ -274,10 +273,10 @@
 start = 
 if not end:
 end = zzz
-return (code for code in generator
-if code = start and code = end)
+return (site for site in generator
+if site.code = start and site.code = end)
 else:
-return (code for code in generator if code in fromlang)
+return (site for site in generator if site.code in fromlang)
 else:
 pywikibot.warning(u'No sites given to verify %s articles.\n'
   u'Please use -fromlang: or fromall option\n'
@@ -297,18 +296,21 @@
 return True
 
 def readcache(self, task):
-if not self.getOption('nocache') is True:
-self.filename = pywikibot.config.datafilepath(cache, task)
-try:
-f = open(self.filename, rb)
-self.cache = pickle.load(f)
-f.close()
-pywikibot.output(u'Cache file %s found with %d items.'
- % (self.filename, len(self.cache)))
-except IOError:
-pywikibot.output(u'Cache file %s not found.' % self.filename)
+if self.getOption('count') or self.getOption('nocache') is True:
+return
+self.filename = pywikibot.config.datafilepath(cache, task)
+try:
+f = open(self.filename, rb)
+self.cache = pickle.load(f)
+f.close()
+pywikibot.output(u'Cache file %s found with %d items.'
+ % (self.filename, len(self.cache)))
+except IOError:
+pywikibot.output(u'Cache file %s not found.' % self.filename)
 
 def writecache(self):
+if self.getOption('count'):
+return
 if not self.getOption('nocache') is True:
 pywikibot.output(u'Writing %d items to cache file %s.'
  % (len(self.cache), self.filename))
@@ -329,18 +331,17 @@
 return
 
 self.readcache(task)
-for code in self.itercode(task):
+for site in self.itersites(task):
 try:
-self.treat(code, task)
+self.treat(site, task)
 except KeyboardInterrupt:
 pywikibot.output('\nQuitting %s treat...' % task)
 break
 self.writecache()
 
-def treat(self, code, process):
-fromsite = pywikibot.Site(code)
+def treat(self, fromsite, task):
 if fromsite != self.site:
-self.featuredWithInterwiki(fromsite, process)
+self.featuredWithInterwiki(fromsite, task)
 
 def featuredArticles(self, site, task, cache):
  

[MediaWiki-commits] [Gerrit] Let admins add users to 'accountcreator' on itwiki - change (operations/mediawiki-config)

2014-02-09 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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

Change subject: Let admins add users to 'accountcreator' on itwiki
..

Let admins add users to 'accountcreator' on itwiki

This patch lets administrators add users to and
remove from the 'accountcreator' user group on
the Italian Wikipedia.

See bug for URL with on-wiki consensus for this
change.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bfe1d8..583ad4a 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7851,7 +7851,7 @@
),
'+itwiki' = array(
'bureaucrat' = array( 'rollbacker' ),
-   'sysop' = array( 'autopatrolled', 'flood', 'filemover' ), // 
Bug 53913 (filemover)
+   'sysop' = array( 'accountcreator', 'autopatrolled', 'flood', 
'filemover' ), // bug 53913, 61109
),
'+itwikibooks' = array(
'sysop' = array( 'autopatrolled', 'patroller' ),
@@ -8333,8 +8333,8 @@
'bureaucrat' = array( 'test-sysop', 'translator', 'import', 
'translationadmin' ),
),
'+itwiki' = array(
-   'bureaucrat' = array( 'rollbacker', 'autopatrolled', 
'filemover' ), // Bug 53913 (filemover)
-   'sysop' = array( 'flood', ),
+   'bureaucrat' = array( 'rollbacker', 'autopatrolled', 
'filemover' ), // bug 53913
+   'sysop' = array( 'accountcreator', 'flood', ), // bug 61109
),
'+itwikibooks' = array(
'sysop' = array( 'autopatrolled', 'patroller', 'flooder' ), // 
Flooder added per bug 39569

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

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

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


[MediaWiki-commits] [Gerrit] Prevent use of caching on getNew requests - change (mediawiki...MediaWikiChat)

2014-02-09 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has uploaded a new change for review.

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

Change subject: Prevent use of caching on getNew requests
..

Prevent use of caching on getNew requests

These are what's failing in IE

Change-Id: Ifc453f67c61ff5489defaa9e3ecea7ade2760616
---
M MediaWikiChat.js
M MediaWikiChat.php
2 files changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index f35199c..c9a42b8 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -120,7 +120,8 @@
getNew: function() {
$.ajax( {
url: mw.config.get( 'wgScriptPath' ) + '/api.php',
-   data: { 'action': 'chatgetnew', 'format': 'json' }
+   data: { 'action': 'chatgetnew', 'format': 'json' },
+   cache: false
} ).done( function( response ) {
var data = response.chatgetnew;
 
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index 04c4cdb..6b1adb0 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -17,7 +17,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
'name' = 'MediaWikiChat',
-   'version' = '2.5.2',
+   'version' = '2.5.3',
'author' = 'Adam Carter/UltrasonicNXT',
'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' = 'chat-desc',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc453f67c61ff5489defaa9e3ecea7ade2760616
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Prevent use of caching on getNew requests - change (mediawiki...MediaWikiChat)

2014-02-09 Thread UltrasonicNXT (Code Review)
UltrasonicNXT has submitted this change and it was merged.

Change subject: Prevent use of caching on getNew requests
..


Prevent use of caching on getNew requests

These are what's failing in IE

Change-Id: Ifc453f67c61ff5489defaa9e3ecea7ade2760616
---
M MediaWikiChat.js
M MediaWikiChat.php
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index f35199c..c9a42b8 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -120,7 +120,8 @@
getNew: function() {
$.ajax( {
url: mw.config.get( 'wgScriptPath' ) + '/api.php',
-   data: { 'action': 'chatgetnew', 'format': 'json' }
+   data: { 'action': 'chatgetnew', 'format': 'json' },
+   cache: false
} ).done( function( response ) {
var data = response.chatgetnew;
 
diff --git a/MediaWikiChat.php b/MediaWikiChat.php
index 04c4cdb..6b1adb0 100644
--- a/MediaWikiChat.php
+++ b/MediaWikiChat.php
@@ -17,7 +17,7 @@
 $wgExtensionCredits['specialpage'][] = array(
'path' = __FILE__,
'name' = 'MediaWikiChat',
-   'version' = '2.5.2',
+   'version' = '2.5.3',
'author' = 'Adam Carter/UltrasonicNXT',
'url' = 'https://www.mediawiki.org/wiki/Extension:MediaWikiChat',
'descriptionmsg' = 'chat-desc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifc453f67c61ff5489defaa9e3ecea7ade2760616
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT adamr_car...@btinternet.com
Gerrit-Reviewer: UltrasonicNXT adamr_car...@btinternet.com

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


[MediaWiki-commits] [Gerrit] Remove redundant GroupOverride entries - change (operations/mediawiki-config)

2014-02-09 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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

Change subject: Remove redundant GroupOverride entries
..

Remove redundant GroupOverride entries

They are already defined in GroupOverrides2.

Change-Id: Id057d32a33cf1bd69708519a6d3416a644bfd93a
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bfe1d8..bed4627 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -6515,7 +6515,6 @@
'autopatrolled' = array( 'autopatrol' = true ),
'sysop' = array( 'patrol' = true ),
'rollbacker' = array( 'rollback' = true ),
-   'accountcreator' = array( 'noratelimit' = true ), // bug 56570
),
'+checkuserwiki'  = array( // 
http://bugzilla.wikimedia.org/show_bug.cgi?id=28781
'autoconfirmed' = array(
@@ -7365,7 +7364,6 @@
'svwiki' = array(
'autoconfirmed' = array( 'patrol' = true ),
'rollbacker'= array( 'rollback' = true, 'autopatrol' = 
true ),
-   'accountcreator' = array( 'noratelimit' = true ), // bug 54922
),
'svwikisource' = array( // Bug 28614  36895
'autopatrolled' = array( 'autopatrol' = true, 
'suppressredirect' = true, 'upload' = true, 'reupload' = true ),
@@ -7682,7 +7680,7 @@
'bureaucrat' = array( 'patroller', 'autopatrolled', 
'rollbacker' ),
),
'+cawiki' = array(
-   'sysop' = array( 'rollbacker', 'autopatrolled', 'abusefilter', 
'accountcreator', ),
+   'sysop' = array( 'rollbacker', 'autopatrolled', 'abusefilter', 
'accountcreator' ), // bug 56570
),
'+checkuserwiki' = array(
'bureaucrat' = array( 'accountcreator', 'import', 'transwiki', 
'user', 'autoconfirmed', 'ipblock-exempt', ),
@@ -8156,7 +8154,7 @@
'bureaucrat' = array( 'patroller', 'autopatrolled', 
'rollbacker' ),
),
'+cawiki' = array(
-   'sysop' = array( 'rollbacker', 'autopatrolled', 'abusefilter', 
'accountcreator', ),
+   'sysop' = array( 'rollbacker', 'autopatrolled', 'abusefilter', 
'accountcreator' ), // bug 56570
),
'+checkuserwiki' = array(
'bureaucrat' = array( 'sysop', 'accountcreator', 'import', 
'transwiki', 'user', 'autoconfirmed', 'ipblock-exempt',  'bureaucrat', ),

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

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

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


[MediaWiki-commits] [Gerrit] Use python version dependent import - change (pywikibot...httplib2)

2014-02-09 Thread Xqt (Code Review)
Xqt has submitted this change and it was merged.

Change subject: Use python version dependent import
..


Use python version dependent import

Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
---
M __init__.py
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/__init__.py b/__init__.py
index 8b48476..18f9398 100644
--- a/__init__.py
+++ b/__init__.py
@@ -1,3 +1,7 @@
 import inspect
-import python2.httplib2 as httplib2
+import sys
+if sys.version_info[0] == 2:
+from .python2 import httplib2
+else:
+from .python3 import httplib2
 globals().update(inspect.getmembers(httplib2))

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae6bc0cc8d526162b91d0c18cf1fba1461aa9f98
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/externals/httplib2
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Xqt i...@gno.de

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


[MediaWiki-commits] [Gerrit] Fix translation problems in files - change (mediawiki...VoteNY)

2014-02-09 Thread Jack Phoenix (Code Review)
Jack Phoenix has submitted this change and it was merged.

Change subject: Fix translation problems in files
..


Fix translation problems in files

Change-Id: Ib5264d0ff9ad3aeabd9fc13dec277bf3878cc0ec
---
M Vote.i18n.php
M Vote.php
2 files changed, 256 insertions(+), 256 deletions(-)

Approvals:
  Jack Phoenix: Verified; Looks good to me, approved



diff --git a/Vote.i18n.php b/Vote.i18n.php
index a225a6b..c3e8063 100644
--- a/Vote.i18n.php
+++ b/Vote.i18n.php
@@ -34,23 +34,23 @@
  * @author Shirayuki
  */
 $messages['qqq'] = array(
-   'desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
-   'link' = 'Link title',
-   'unvote-link' = 'Displayed to the user after their vote has been 
successfully added; they can click on this link to remove their vote.',
-   'community-score' = 'Community score is the average of votes a page 
has been given.
+   'voteny-desc' = '{{desc|name=Vote 
NY|url=http://www.mediawiki.org/wiki/Extension:VoteNY}}',
+   'voteny-link' = 'Link title',
+   'voteny-unvote-link' = 'Displayed to the user after their vote has 
been successfully added; they can click on this link to remove their vote.',
+   'voteny-community-score' = 'Community score is the average of votes a 
page has been given.
 
 Parameters:
 * $1 - the actual score in numbers (i.e. 4.5 or 3)',
-   'ratings' = 'Parameters:
+   'voteny-ratings' = 'Parameters:
 * $1 - the number of ratings, if said number is greater than 1',
-   'remove' = 'Link title, clicking on this link removes your vote. Refer 
to the [[mw:File:VoteNY.png|image]] for details.',
-   'gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
+   'voteny-remove' = 'Link title, clicking on this link removes your 
vote. Refer to the [[mw:File:VoteNY.png|image]] for details.',
+   'voteny-gave-this' = 'Followed by the action link text 
{{msg-mw|Voteny-remove}}.
 
 Parameter:
 * $1 - a number, the vote the user gave to the page.
 
 Refer to the [[mw:File:VoteNY.png|image]] for details.',
-   'votes' = 'Parameters:
+   'voteny-votes' = 'Parameters:
 * $1 - number of votes',
'topratings' = '{{doc-special|TopRatings}}',
'topratings-no-pages' = 'Displayed on Special:TopRatings if there are 
no top rated pages, i.e. if no pages have been rated on the wiki at all.',
@@ -62,14 +62,14 @@
  * @author Xuacu
  */
 $messages['ast'] = array(
-   'desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
-   'link' = 'Votar',
-   'unvote-link' = 'retirar el votu',
-   'community-score' = 'puntuación de la comunidá: $1',
-   'ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
-   'remove' = 'desaniciar',
-   'gave-this' = 'dio-y a esto un $1',
-   'votes' = '{{PLURAL:$1|un votu|$1 votos}}',
+   'voteny-desc' = 'Votación basada en JavaScript cola etiqueta 
ttlt;votegt;/tt',
+   'voteny-link' = 'Votar',
+   'voteny-unvote-link' = 'retirar el votu',
+   'voteny-community-score' = 'puntuación de la comunidá: $1',
+   'voteny-ratings' = '{{PLURAL:$1|una valoración|$1 valoraciones}}',
+   'voteny-remove' = 'desaniciar',
+   'voteny-gave-this' = 'dio-y a esto un $1',
+   'voteny-votes' = '{{PLURAL:$1|un votu|$1 votos}}',
'topratings' = 'Páxines meyor calificaes',
'topratings-no-pages' = 'Nun hai páxines meyor calificaes',
'right-vote' = 'Votar páxines',
@@ -79,21 +79,21 @@
  * @author පසිඳු කාවින්ද
  */
 $messages['bg'] = array(
-   'remove' = 'премахване',
+   'voteny-remove' = 'премахване',
 );
 
 /** Catalan (català)
  * @author Toniher
  */
 $messages['ca'] = array(
-   'desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
-   'link' = 'Vota',
-   'unvote-link' = 'anul·la el vot',
-   'community-score' = 'puntuació comunitària: $1',
-   'ratings' = '{{PLURAL:$1|una valoració|$1 valoracions}}',
-   'remove' = 'suprimeix',
-   'gave-this' = 'vau donar-li un $1',
-   'votes' = '{{PLURAL:$1|un vot|$1 vots}}',
+   'voteny-desc' = Votació basada en JavaScript amb l'etiqueta 
ttlt;votegt;/tt,
+   'voteny-link' = 'Vota',
+   'voteny-unvote-link' = 'anul·la el vot',
+   'voteny-community-score' = 'puntuació comunitària: $1',
+   'voteny-ratings' = '{{PLURAL:$1|una valoració|$1 valoracions}}',
+   'voteny-remove' = 'suprimeix',
+   'voteny-gave-this' = 'vau donar-li un $1',
+   'voteny-votes' = '{{PLURAL:$1|un vot|$1 vots}}',
'topratings' = 'Pàgines més puntuades',
'topratings-no-pages' = 'No hi ha cap pàgina puntuada.',
'right-vote' = 'Pàgines de votació',
@@ -105,14 +105,14 @@
  * @author Purodha
  */
 $messages['de'] = array(
-   'desc' = 'Ergänzt das Tag ttlt;votegt;/tt zum Durchführen 
JavaScript-gestützter Abstimmungen',
-   'link' = 'Abstimmen',
-   

[MediaWiki-commits] [Gerrit] Update copyright year to 2014 - change (translatewiki)

2014-02-09 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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

Change subject: Update copyright year to 2014
..

Update copyright year to 2014

Change-Id: Ia71eff1bdffd36cebaa7d2f0fc9dd538fc86b361
---
M groups/IHRIS/IHRIS.yaml
M groups/IHRIS/IHRISCommon.yaml
M groups/IHRIS/IHRISI2ce.yaml
M groups/IHRIS/IHRISManage.yaml
M groups/IHRIS/IHRISQualify.yaml
M groups/MantisBT/MantisBT.yaml
M groups/OpenStreetMap/WaymarkedTrails.yaml
7 files changed, 17 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/40/112340/1

diff --git a/groups/IHRIS/IHRIS.yaml b/groups/IHRIS/IHRIS.yaml
index c29e563..d1c725d 100644
--- a/groups/IHRIS/IHRIS.yaml
+++ b/groups/IHRIS/IHRIS.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISCommon.yaml b/groups/IHRIS/IHRISCommon.yaml
index 38af9fe..a7392b2 100644
--- a/groups/IHRIS/IHRISCommon.yaml
+++ b/groups/IHRIS/IHRISCommon.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISI2ce.yaml b/groups/IHRIS/IHRISI2ce.yaml
index 43bdc64..1d89f70 100644
--- a/groups/IHRIS/IHRISI2ce.yaml
+++ b/groups/IHRIS/IHRISI2ce.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISManage.yaml b/groups/IHRIS/IHRISManage.yaml
index 64ea24a..49c7418 100644
--- a/groups/IHRIS/IHRISManage.yaml
+++ b/groups/IHRIS/IHRISManage.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISQualify.yaml b/groups/IHRIS/IHRISQualify.yaml
index ce8ee6e..ef5674b 100644
--- a/groups/IHRIS/IHRISQualify.yaml
+++ b/groups/IHRIS/IHRISQualify.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/MantisBT/MantisBT.yaml b/groups/MantisBT/MantisBT.yaml
index 

[MediaWiki-commits] [Gerrit] Exclude prop=uploadwarning from allimages and stashimageinfo - change (mediawiki/core)

2014-02-09 Thread Umherirrender (Code Review)
Umherirrender has uploaded a new change for review.

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

Change subject: Exclude prop=uploadwarning from allimages and stashimageinfo
..

Exclude prop=uploadwarning from allimages and stashimageinfo

Was added with I4a0af8986f924cd127a73828e72da6998f28536c,
but looks only useful on prop=imageinfo

Change-Id: I59c5f11f83be7e59f317686ab7fa16ad6fda008b
---
M includes/api/ApiQueryAllImages.php
M includes/api/ApiQueryStashImageInfo.php
2 files changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/112341/1

diff --git a/includes/api/ApiQueryAllImages.php 
b/includes/api/ApiQueryAllImages.php
index 4095bd8..4646bc4 100644
--- a/includes/api/ApiQueryAllImages.php
+++ b/includes/api/ApiQueryAllImages.php
@@ -378,7 +378,7 @@
);
}
 
-   private $propertyFilter = array( 'archivename', 'thumbmime' );
+   private $propertyFilter = array( 'archivename', 'thumbmime', 
'uploadwarning' );
 
public function getResultProperties() {
return array_merge(
diff --git a/includes/api/ApiQueryStashImageInfo.php 
b/includes/api/ApiQueryStashImageInfo.php
index 248b3d8..b438e75 100644
--- a/includes/api/ApiQueryStashImageInfo.php
+++ b/includes/api/ApiQueryStashImageInfo.php
@@ -72,7 +72,7 @@
 
private $propertyFilter = array(
'user', 'userid', 'comment', 'parsedcomment',
-   'mediatype', 'archivename',
+   'mediatype', 'archivename', 'uploadwarning',
);
 
public function getAllowedParams() {

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

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

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


[MediaWiki-commits] [Gerrit] Update copyright year to 2014 - change (translatewiki)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Update copyright year to 2014
..


Update copyright year to 2014

Change-Id: Ia71eff1bdffd36cebaa7d2f0fc9dd538fc86b361
---
M groups/IHRIS/IHRIS.yaml
M groups/IHRIS/IHRISCommon.yaml
M groups/IHRIS/IHRISI2ce.yaml
M groups/IHRIS/IHRISManage.yaml
M groups/IHRIS/IHRISQualify.yaml
M groups/MantisBT/MantisBT.yaml
M groups/OpenStreetMap/WaymarkedTrails.yaml
7 files changed, 17 insertions(+), 17 deletions(-)

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



diff --git a/groups/IHRIS/IHRIS.yaml b/groups/IHRIS/IHRIS.yaml
index c29e563..d1c725d 100644
--- a/groups/IHRIS/IHRIS.yaml
+++ b/groups/IHRIS/IHRIS.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISCommon.yaml b/groups/IHRIS/IHRISCommon.yaml
index 38af9fe..a7392b2 100644
--- a/groups/IHRIS/IHRISCommon.yaml
+++ b/groups/IHRIS/IHRISCommon.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISI2ce.yaml b/groups/IHRIS/IHRISI2ce.yaml
index 43bdc64..1d89f70 100644
--- a/groups/IHRIS/IHRISI2ce.yaml
+++ b/groups/IHRIS/IHRISI2ce.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISManage.yaml b/groups/IHRIS/IHRISManage.yaml
index 64ea24a..49c7418 100644
--- a/groups/IHRIS/IHRISManage.yaml
+++ b/groups/IHRIS/IHRISManage.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/IHRIS/IHRISQualify.yaml b/groups/IHRIS/IHRISQualify.yaml
index ce8ee6e..ef5674b 100644
--- a/groups/IHRIS/IHRISQualify.yaml
+++ b/groups/IHRIS/IHRISQualify.yaml
@@ -15,9 +15,9 @@
   zh-hant: zh_TW
 
 header: |
-  # Copyright (c) 2011-2013 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
-  # Copyright (c) 2011-2013 Rosetta Contributors and Canonical Ltd 
2011-2013
-  # Copyright (c) 2011-2013 translatewiki.net contributors
+  # Copyright (c) 2011-2014 h...@capacityproject.org Capacity Project 
partnership via IntraHealth International, Inc.
+  # Copyright (c) 2011-2014 Rosetta Contributors and Canonical Ltd
+  # Copyright (c) 2011-2014 translatewiki.net contributors
   # This file is distributed under the same license as the iHRIS package.
   #
 
diff --git a/groups/MantisBT/MantisBT.yaml b/groups/MantisBT/MantisBT.yaml
index 7336c93..7cbaad5 100644
--- 

[MediaWiki-commits] [Gerrit] [WIP] UploadWizard:OSM embedding - change (mediawiki...UploadWizard)

2014-02-09 Thread Inchikutty (Code Review)
Inchikutty has uploaded a new change for review.

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

Change subject: [WIP] UploadWizard:OSM embedding
..

[WIP] UploadWizard:OSM embedding

Work In Progress!!!

Bug:56614
Change-Id: I3daee45a61afbf7ca0dda620f1f61a296586c545
---
M resources/mw.GeoMap.js
M resources/uploadWizard.css
2 files changed, 52 insertions(+), 52 deletions(-)


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

diff --git a/resources/mw.GeoMap.js b/resources/mw.GeoMap.js
index f1632a5..657cbb3 100644
--- a/resources/mw.GeoMap.js
+++ b/resources/mw.GeoMap.js
@@ -13,30 +13,40 @@
_this.isGeoMapInitialized = false;
_this.map = null;
 
-   mw.GeoMap.numInstances = ( mw.GeoMap.numInstances || 0 ) + 1;
-   var mapId = mapcontainer-mwe-loc-map-+ mw.GeoMap.numInstances;
-   var mapDiv =  $( 'div class=mwe-loc-mapid='+mapId+'/div' );
-   _this.$form.find( '.mwe-location-label' ).append( mapDiv );
+   mw.GeoMap.mapId = ( mw.GeoMap.mapId || 0 ) + 1;
+   var mapDiv = $( 'div 
class=mwe-loc-mapid=mwe-location-map'+mw.GeoMap.mapId+'/div' );
+   var showStaticMap = $( 'div 
class=mwe-loc-map-labelid=mwe-loc-map-label/div' ).append($('a 
class=mwe-loc-linkstatic/a'));
+   var showLeafletMap = $( 'div 
class=mwe-loc-map-labelid=mwe-loc-map-label/div' ).append($('a 
class=mwe-loc-linkdynamic/a'));
+   var geoMapDiv = $( 'div class=mwe-location-map/div' )
+   .append( showStaticMap, showLeafletMap, mapDiv );
+   _this.$form.find( '.mwe-location-label' ).append( geoMapDiv );
 
var $list = _this.$form.find( '.mwe-loc-lat, .mwe-loc-lon ' );
-   $list.on( 'input keyup change cut paste', function() {
+   $list.on( 'input cut keyup paste uw-copy', function() {
if (  $list.valid() ){
if( _this.isGeoMapInitialized ){
-   _this.geoMap( $list.eq(0).val(), 
$list.eq(1).val() );
+   _this.geoMapInit( $list.eq(0).val(), 
$list.eq(1).val(), mapDiv  );
}
else{
_this.staticMap( $list.eq(0).val(), 
$list.eq(1).val(), mapDiv  );
}
+   showLeafletMap.click( function(){
+   _this.mapRemove( mapDiv );
+   _this.geoMapInit( $list.eq(0).val(), 
$list.eq(1).val(), mapDiv  );
+   });
+   showStaticMap.click( function(){
+   _this.mapRemove( mapDiv );
+   _this.staticMap( $list.eq(0).val(), 
$list.eq(1).val(), mapDiv  );
+   });
}
else{
-   if( _this.isGeoMapInitialized ){
-   _this.geoMapRemove( mapDiv );
-   }
-   else{
-   _this.staticMapRemove( mapDiv );
-   }
+   _this.mapRemove( mapDiv );
}
});
+
+/* $list.trigger( uw-input, function() {
+   $(this).on ('input cut keyup paste');
+   });*/
 
_this.marker = L.marker([ 0 , 0 ]);
L.Icon.Default.imagePath = 
'../extensions/UploadWizard/resources/leaflet/images';
@@ -65,21 +75,9 @@
 */
staticMap: function( latVal , lonVal, mapDiv ) {
var _this =this;
-   _this.staticMapRemove( mapDiv );
+   _this.mapRemove( mapDiv );
var link = _this.staticMapLink( latVal, lonVal );
-   $( 'img/img' ).attr('src', link 
).addClass('mwe-loc-map').appendTo( mapDiv )
-   .click( function(){
-   _this.staticMapRemove( mapDiv );
-   _this.geoMapInit( latVal, lonVal, mapDiv );
-   });
-   },
-
-   /**
-*Removes static map
-*@param {HTMLDivElement} MapDiv The div that contains static map
-*/
-   staticMapRemove: function( mapDiv ) {
-   mapDiv.empty();
+   $( 'img/img' ).attr('src', link 
).addClass('mwe-loc-map').appendTo( mapDiv );
},
 
/**
@@ -89,20 +87,13 @@
 *@param {HTMLDivElement} MapDiv The div to append the map into
 */
geoMapInit: function( latVal, lonVal, mapDiv) {
-   this.map = new L.map( mapDiv.attr(id), { center: [ latVal, 
lonVal ], zoom: 14 } );
-   this.isGeoMapInitialized = true;
-   new L.TileLayer( 
'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',{
-   minZoom: 1, maxZoom: 20, attribution: 'Map data by 
OpenStreetMap contributors' } )
-   .addTo( this.map );
-   this.geoMap( latVal, lonVal );
-   },
-
-   

[MediaWiki-commits] [Gerrit] Fix syntax error in YetAnotherKeywords.i18n.php - change (mediawiki...YetAnotherKeywords)

2014-02-09 Thread Siebrand (Code Review)
Siebrand has submitted this change and it was merged.

Change subject: Fix syntax error in YetAnotherKeywords.i18n.php
..


Fix syntax error in YetAnotherKeywords.i18n.php

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

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



diff --git a/YetAnotherKeywords.i18n.php b/YetAnotherKeywords.i18n.php
index f5f3506..b26bb94 100644
--- a/YetAnotherKeywords.i18n.php
+++ b/YetAnotherKeywords.i18n.php
@@ -5,7 +5,6 @@
  * @file
  * @ingroup Extensions
  */
- */
 
 $messages = array();
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I723c7a2edac133e084634b5f9491ead3108203b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/YetAnotherKeywords
Gerrit-Branch: master
Gerrit-Owner: Shirayuki shirayuk...@gmail.com
Gerrit-Reviewer: Siebrand siebr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] i18n: give grep a chance to find the usages - change (mediawiki...Wikibase)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: i18n: give grep a chance to find the usages
..


i18n: give grep a chance to find the usages

Change-Id: I81644dd310b2fb91c0def8a348e91f467654a74a
---
M lib/includes/ClaimDifferenceVisualizer.php
M lib/includes/changes/EntityChange.php
M lib/includes/formatters/QuantityDetailsFormatter.php
M repo/includes/ClaimHtmlGenerator.php
M repo/includes/MultiLangConstraintDetector.php
M repo/includes/content/EntityContent.php
M repo/includes/specials/SpecialMergeItems.php
M repo/includes/specials/SpecialModifyTerm.php
M repo/includes/specials/SpecialMyLanguageFallbackChain.php
9 files changed, 22 insertions(+), 3 deletions(-)

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



diff --git a/lib/includes/ClaimDifferenceVisualizer.php 
b/lib/includes/ClaimDifferenceVisualizer.php
index 367dc5a..bbe7980 100644
--- a/lib/includes/ClaimDifferenceVisualizer.php
+++ b/lib/includes/ClaimDifferenceVisualizer.php
@@ -224,6 +224,8 @@
$rank = ClaimSerializer::serializeRank( $rank );
}
 
+   // Messages: wikibase-diffview-rank-preferred, 
wikibase-diffview-rank-normal,
+   // wikibase-diffview-rank-deprecated
$msg = wfMessage( 'wikibase-diffview-rank-' . $rank );
return $msg-inLanguage( $this-langCode )-parse();
}
diff --git a/lib/includes/changes/EntityChange.php 
b/lib/includes/changes/EntityChange.php
index d68e747..d4a3df7 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -193,6 +193,8 @@
if ( $comment !== null ) {
$this-comment = $comment;
} else {
+   // Messages: wikibase-comment-add, 
wikibase-comment-remove, wikibase-comment-linked,
+   // wikibase-comment-unlink, wikibase-comment-restore, 
wikibase-comment-update
$this-comment = 'wikibase-comment-' . 
$this-getAction();
}
}
diff --git a/lib/includes/formatters/QuantityDetailsFormatter.php 
b/lib/includes/formatters/QuantityDetailsFormatter.php
index 3a5c63d..952c40a 100644
--- a/lib/includes/formatters/QuantityDetailsFormatter.php
+++ b/lib/includes/formatters/QuantityDetailsFormatter.php
@@ -86,6 +86,8 @@
protected function getFieldLabel( $fieldName ) {
$lang = $this-getOption( ValueFormatter::OPT_LANG );
 
+   // Messages: wikibase-quantitydetails-amount, 
wikibase-quantitydetails-upperbound,
+   // wikibase-quantitydetails-lowerbound, 
wikibase-quantitydetails-unit
$key = 'wikibase-quantitydetails-' . strtolower( $fieldName );
$msg = wfMessage( $key )-inLanguage( $lang );
 
diff --git a/repo/includes/ClaimHtmlGenerator.php 
b/repo/includes/ClaimHtmlGenerator.php
index 6cd49dc..3e7e254 100644
--- a/repo/includes/ClaimHtmlGenerator.php
+++ b/repo/includes/ClaimHtmlGenerator.php
@@ -102,6 +102,8 @@
if( is_a( $claim, 'Wikibase\Statement' ) ) {
$serializedRank = ClaimSerializer::serializeRank( 
$claim-getRank() );
 
+   // Messages: wikibase-statementview-rank-preferred, 
wikibase-statementview-rank-normal,
+   // wikibase-statementview-rank-deprecated
$rankHtml = wfTemplate( 'wb-rankselector',
'wb-rankselector-' . $serializedRank,
wfMessage( 'wikibase-statementview-rank-' . 
$serializedRank )-text()
diff --git a/repo/includes/MultiLangConstraintDetector.php 
b/repo/includes/MultiLangConstraintDetector.php
index 0527454..ab224f1 100644
--- a/repo/includes/MultiLangConstraintDetector.php
+++ b/repo/includes/MultiLangConstraintDetector.php
@@ -145,7 +145,7 @@
}
);
$langValues = $wgLang-semicolonList( 
$langValues );
-   // Give grep a chance to find the usages: 
wikibase-error-constraint-violation-label,
+   // Messages: 
wikibase-error-constraint-violation-label,
// 
wikibase-error-constraint-violation-description, 
wikibase-error-constraint-violation-aliases
$status-fatal(
'wikibase-error-constraint-violation-' 
. $section,
diff --git a/repo/includes/content/EntityContent.php 
b/repo/includes/content/EntityContent.php
index 16b71ad..9634e2e 100644
--- a/repo/includes/content/EntityContent.php
+++ b/repo/includes/content/EntityContent.php
@@ -719,8 +719,7 @@
 */
foreach ( $foundLabels as $foundLabel ) {
if ( 

[MediaWiki-commits] [Gerrit] (bug 59970) show clear error message if httplib2 is not found - change (pywikibot/core)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: (bug 59970) show clear error message if httplib2 is not found
..


(bug 59970) show clear error message if httplib2 is not found

and suggest to git submodule update --init to get it

Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
---
M pwb.py
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/pwb.py b/pwb.py
index 86c9b9e..b07b0e9 100644
--- a/pwb.py
+++ b/pwb.py
@@ -103,6 +103,14 @@
 os.path.join(rewrite_path, 'externals')
 ] + sys.path[1:]
 
+# try importing the known externals, and raise an error if they are not found
+try:
+import httplib2
+except ImportError as e:
+print(ImportError: %s % e)
+print(Did you clone without --recursive? Try running 'git submodule 
update --init'.)
+sys.exit(1)
+
 if PYWIKIBOT2_DIR not in os.environ:
 os.environ[PYWIKIBOT2_DIR] = os.path.split(__file__)[0]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6abae2d811311e340f3756d6084c461faff1b3dc
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Xqt i...@gno.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] Module we may want to make available - change (wikimedia...crm)

2014-02-09 Thread Adamw (Code Review)
Adamw has uploaded a new change for review.

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

Change subject: Module we may want to make available
..

Module we may want to make available

Change-Id: Idad3f4efbed725b36ec21c879d68e9f8d3d70ca6
---
A sites/all/modules/mass_pwreset/LICENSE.txt
A sites/all/modules/mass_pwreset/README.txt
A sites/all/modules/mass_pwreset/mass_pwreset.admin.inc
A sites/all/modules/mass_pwreset/mass_pwreset.info
A sites/all/modules/mass_pwreset/mass_pwreset.install
A sites/all/modules/mass_pwreset/mass_pwreset.module
6 files changed, 564 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/47/112347/1

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

[MediaWiki-commits] [Gerrit] Encode URL parameter - change (mediawiki...Wikibase)

2014-02-09 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Encode URL parameter
..

Encode URL parameter

* languageCode gets correctly encoded.
* getUrl() uses correct parameter separator '?' oder ''.

Change-Id: I97975d3bf45550c599968cee90748c5ed7a2f757
---
M repo/resources/wikibase.ui.initTermBox.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/repo/resources/wikibase.ui.initTermBox.js 
b/repo/resources/wikibase.ui.initTermBox.js
index 79ced99..b5ff819 100644
--- a/repo/resources/wikibase.ui.initTermBox.js
+++ b/repo/resources/wikibase.ui.initTermBox.js
@@ -137,7 +137,7 @@
'',
'',
'',
-   title.getUrl() + '?setlang=' + languageCode
+   title.getUrl( { setlang: languageCode } )
) );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97975d3bf45550c599968cee90748c5ed7a2f757
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] Use hasOwnProperty() instead of !== undefined - change (mediawiki...Wikibase)

2014-02-09 Thread Gerrit Patch Uploader (Code Review)
Gerrit Patch Uploader has uploaded a new change for review.

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

Change subject: Use hasOwnProperty() instead of !== undefined
..

Use hasOwnProperty() instead of !== undefined

This prevents conflicts with predefined object methods.

Change-Id: I3804d3c7c1439d0818a01c03b5fb5b0328c953a4
---
M repo/resources/wikibase.ui.initTermBox.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/repo/resources/wikibase.ui.initTermBox.js 
b/repo/resources/wikibase.ui.initTermBox.js
index 79ced99..0093a3f 100644
--- a/repo/resources/wikibase.ui.initTermBox.js
+++ b/repo/resources/wikibase.ui.initTermBox.js
@@ -131,8 +131,8 @@
languageCode,
alternatingClass,
$.uls.data.getAutonym( languageCode ),
-   ( labels[languageCode] !== undefined ) ? 
labels[languageCode] : '',
-   ( descriptions[languageCode] !== undefined ) ? 
descriptions[languageCode] : '',
+   labels.hasOwnProperty( languageCode ) ? 
labels[languageCode] : '',
+   descriptions.hasOwnProperty( languageCode ) ? 
descriptions[languageCode] : '',
'',
'',
'',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3804d3c7c1439d0818a01c03b5fb5b0328c953a4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Gerrit Patch Uploader gerritpatchuploa...@gmail.com

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


[MediaWiki-commits] [Gerrit] OpenBadges Special page - change (mediawiki...OpenBadges)

2014-02-09 Thread Hchuying (Code Review)
Hchuying has uploaded a new change for review.

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

Change subject: OpenBadges Special page
..

OpenBadges Special page

Change-Id: If2c244d98b29807219da288f0418efdedce9c549
---
A ApiOpenBadges.php
A OpenBadges.i18n.php
A OpenBadges.php
A SpecialOpenBadges.php
4 files changed, 100 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/OpenBadges 
refs/changes/50/112350/1

diff --git a/ApiOpenBadges.php b/ApiOpenBadges.php
new file mode 100644
index 000..c9db00d
--- /dev/null
+++ b/ApiOpenBadges.php
@@ -0,0 +1,23 @@
+?php
+/**
+ * Aliases for openbadges
+ *
+ * @file
+ * @ingroup Extensions
+ */
+ 
+$specialPageAliases = array();
+ 
+/** English
+ * @author your username
+ */
+$specialPageAliases[ 'en' ] = array(
+   'OpenBadges' = array( 'OpenBadges', 'Open Badges' ),
+);
+ 
+/** Deutsch
+ * @author your username
+ */
+$specialPageAliases[ 'de' ] = array(
+   'OpenBadges' = array( 'MeineErweiterung', 'Meine Erweiterung' ),
+);
diff --git a/OpenBadges.i18n.php b/OpenBadges.i18n.php
new file mode 100644
index 000..97f5e46
--- /dev/null
+++ b/OpenBadges.i18n.php
@@ -0,0 +1,24 @@
+?php
+/**
+ * Internationalisation for openbadges
+ *
+ * @file
+ * @ingroup Extensions
+ */
+$messages = array();
+ 
+/** English
+ * @author your username
+ */
+$messages[ 'en' ] = array(
+   'openbadges' = Open Badges,
+   'openbadges-desc' = Extension's description,
+);
+ 
+/** Message documentation
+ * @author your username
+ */
+$messages[ 'qqq' ] = array(
+   'openbadges' = The name of the extension's entry in 
Special:SpecialPages,
+   'openbadges-desc' = {{desc}},
+);
diff --git a/OpenBadges.php b/OpenBadges.php
new file mode 100644
index 000..e8c3d6e
--- /dev/null
+++ b/OpenBadges.php
@@ -0,0 +1,32 @@
+?php
+/* Alert the user that this is not a valid access point to MediaWiki 
+if they try to access the special pages file directly.
+*/
+
+if ( !defined( 'MEDIAWIKI' ) ) {
+   echo EOT
+To install my extension, put the following line in LocalSettings.php:
+require_once( \$IP/extensions/MyExtension/MyExtension.php );
+EOT;
+   exit( 1 );
+}
+ 
+$wgExtensionCredits[ 'specialpage' ][] = array(
+   'path' = __FILE__,
+   'name' = 'OpenBadges',
+   'author' = '',
+   'url' = 'https://www.mediawiki.org/wiki/Extension:OpenBadges',
+   'descriptionmsg' = 'OpenBadges-desc',
+   'version' = '0.0.0',
+);
+
+
+//Location of the SpecialMyExtension class (Tell MediaWiki to load this file)
+$wgAutoloadClasses[ 'SpecialOpenBadges' ] = __DIR__ . '/SpecialOpenBadges.php';
+//Location of a messages file (Tell MediaWiki to load this file)
+$wgExtensionMessagesFiles[ 'OpenBadges' ] = __DIR__ . '/OpenBadges.i18n.php';
+// Location of an aliases file (Tell MediaWiki to load this file)
+$wgExtensionMessagesFiles[ 'OpenBadgesAlias' ] = __DIR__ . 
'/OpenBadges.alias.php';
+// Tell MediaWiki about the new special page and its class name
+$wgSpecialPages[ 'OpenBadges' ] = 'SpecialOpenBadges'; 
+$wgSpecialPageGroups[ 'MyExtension' ] = 'other';
diff --git a/SpecialOpenBadges.php b/SpecialOpenBadges.php
new file mode 100644
index 000..94f132a
--- /dev/null
+++ b/SpecialOpenBadges.php
@@ -0,0 +1,21 @@
+?php
+class SpecialOpenBadges extends SpecialPage {
+   function __construct() {
+   parent::__construct( 'OpenBadges' );
+   }
+ 
+   function execute( $par ) {
+   $request = $this-getRequest();
+   $output = $this-getOutput();
+   $this-setHeaders();
+ 
+   # Get request data from, e.g.
+   $param = $request-getText( 'param' );
+ 
+   # Do stuff
+   # ...
+   $wikitext = 'Hello world!';
+   $output-addWikiText( $wikitext );
+   }
+}
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If2c244d98b29807219da288f0418efdedce9c549
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OpenBadges
Gerrit-Branch: master
Gerrit-Owner: Hchuying chuye...@gmail.com

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


[MediaWiki-commits] [Gerrit] Replace mathsearch module with a self-contained role class - change (mediawiki/vagrant)

2014-02-09 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Replace mathsearch module with a self-contained role class
..

Replace mathsearch module with a self-contained role class

* Remove mathsearch module but move its logic to the role class.
* Two assignment statements are not enough to warrant a full-blown template
  file. Replace them with an array of string literals instead.
* Misc. linting.

Change-Id: I53eab704f5355e3ddb4a6ca4c2570f7dbf420248
---
M puppet/manifests/roles.pp
M puppet/modules/browsertests/manifests/init.pp
D puppet/modules/mathsearch/manifests/init.pp
D puppet/modules/mathsearch/templates/MathSearch.php.erb
4 files changed, 31 insertions(+), 39 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/51/112351/1

diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index cbfcce2..ad8bb34 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -148,8 +148,8 @@
 mediawiki::extension { 'EventLogging':
 priority = $LOAD_EARLY,
 settings = {
-wgEventLoggingBaseUri= 'http://localhost:8100/event.gif',
-wgEventLoggingFile   = '/vagrant/logs/eventlogging.log',
+wgEventLoggingBaseUri = '//localhost:8100/event.gif',
+wgEventLoggingFile= '/vagrant/logs/eventlogging.log',
 }
 }
 }
@@ -566,15 +566,6 @@
 creates = '/vagrant/mediawiki/extensions/Math/texvccheck/texvccheck',
 require = Package['mediawiki-math', 'ocaml-native-compilers'],
 }
-}
-
-# == Class: role::mathsearch
-#
-# The MathSearch extension makes mathematical formulae searchable at mediawiki.
-class role::mathsearch {
-include role::math
-include role::geshi
-include ::mathsearch
 }
 
 # == Class: role::chromium
@@ -1030,7 +1021,7 @@
 
 # == Class role::wikilove
 # The WikiLove extension lets people send love to other wiki users
-# in the form of the Internet's most preferred currency, kittens
+# in the form of the Internet's most preferred currency, kittens.
 class role::wikilove {
 mediawiki::extension { 'WikiLove':
 needs_update   = true,
@@ -1060,16 +1051,16 @@
 }
 
 # == Class role::popups
-# The Popups extension shows a popup when people hover over article links
+# The Popups extension shows a popup when people hover over article
+# links.
 class role::popups {
-
 mediawiki::extension { 'TextExtracts': }
 mediawiki::extension { 'PageImages': }
 
 mediawiki::extension { 'Popups':
 require = [
 Mediawiki::Extension['TextExtracts'],
-Mediawiki::Extension['PageImages']
+Mediawiki::Extension['PageImages'],
 ],
 }
 }
@@ -1078,6 +1069,29 @@
 # The extension that powers the New Page Patrol workflow
 class role::pagetriage {
 mediawiki::extension { 'PageTriage':
-needs_update = true
+needs_update = true,
+}
+}
+
+# == Class: role::math::search
+#
+# The MathSearch extension integrates the MathWeb Search, a
+# content-based search engine for mathematical formulae. It indexes
+# MathML formulae, using a technique derived from automated theorem
+# proving: term indexing.
+class role::mathsearch inherits role::math {
+include role::geshi
+
+Mediawiki::Extension['Math'] {
+branch + 'dev',
+}
+
+mediawiki::extension { 'MathSearch':
+require  = Mediawiki::Extension['Math'],
+needs_update = true,
+settings = [
+'$wgMathValidModes[] = MW_MATH_LATEXML',
+'$wgDefaultUserOptions[math] = MW_MATH_LATEXML',
+],
 }
 }
diff --git a/puppet/modules/browsertests/manifests/init.pp 
b/puppet/modules/browsertests/manifests/init.pp
index 8ba9a85..448777c 100644
--- a/puppet/modules/browsertests/manifests/init.pp
+++ b/puppet/modules/browsertests/manifests/init.pp
@@ -49,7 +49,7 @@
 }
 
 file { ${install_location}/config:
-ensure = directory,
+ensure  = directory,
 require = Git::Clone['qa/browsertests'],
 }
 
diff --git a/puppet/modules/mathsearch/manifests/init.pp 
b/puppet/modules/mathsearch/manifests/init.pp
deleted file mode 100644
index a3e7ff3..000
--- a/puppet/modules/mathsearch/manifests/init.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-# == Class: mathsearch
-#
-# Module for the extension math search.
-#
-class mathsearch {
-
-exec { switch to dev branch of math:
-command = git checkout -b dev origin/dev,
-onlyif  = git status | grep -c 'master',
-cwd = /vagrant/mediawiki/extensions/Math,
-require = [ Package['git'], Mediawiki::Extension['Math'] ],
-environment = 'HOME=/home/vagrant',
-timeout = 0,
-}
-
-mediawiki::extension { 'MathSearch':
-needs_update = true,
-settings = 

[MediaWiki-commits] [Gerrit] Replace mathsearch module with a self-contained role class - change (mediawiki/vagrant)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Replace mathsearch module with a self-contained role class
..


Replace mathsearch module with a self-contained role class

* Remove mathsearch module but move its logic to the role class.
* Two assignment statements are not enough to warrant a full-blown template
  file. Replace them with an array of string literals instead.
* Misc. linting.

Change-Id: I53eab704f5355e3ddb4a6ca4c2570f7dbf420248
---
M Rakefile
M puppet/manifests/roles.pp
M puppet/modules/browsertests/manifests/init.pp
D puppet/modules/mathsearch/manifests/init.pp
D puppet/modules/mathsearch/templates/MathSearch.php.erb
M puppet/modules/wikimania_scholarships/manifests/init.pp
6 files changed, 33 insertions(+), 40 deletions(-)

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



diff --git a/Rakefile b/Rakefile
index 5fd54e3..b4c6be8 100644
--- a/Rakefile
+++ b/Rakefile
@@ -12,6 +12,7 @@
 'puppet/manifests/roles.pp',
 'puppet/manifests/packages.pp',
 'puppet/modules/apache/manifests/mods.pp',
+'puppet/modules/hhvm/manifests/init.pp',
 ]
 
 task :default = [:lint]
diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index cbfcce2..ad8bb34 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -148,8 +148,8 @@
 mediawiki::extension { 'EventLogging':
 priority = $LOAD_EARLY,
 settings = {
-wgEventLoggingBaseUri= 'http://localhost:8100/event.gif',
-wgEventLoggingFile   = '/vagrant/logs/eventlogging.log',
+wgEventLoggingBaseUri = '//localhost:8100/event.gif',
+wgEventLoggingFile= '/vagrant/logs/eventlogging.log',
 }
 }
 }
@@ -566,15 +566,6 @@
 creates = '/vagrant/mediawiki/extensions/Math/texvccheck/texvccheck',
 require = Package['mediawiki-math', 'ocaml-native-compilers'],
 }
-}
-
-# == Class: role::mathsearch
-#
-# The MathSearch extension makes mathematical formulae searchable at mediawiki.
-class role::mathsearch {
-include role::math
-include role::geshi
-include ::mathsearch
 }
 
 # == Class: role::chromium
@@ -1030,7 +1021,7 @@
 
 # == Class role::wikilove
 # The WikiLove extension lets people send love to other wiki users
-# in the form of the Internet's most preferred currency, kittens
+# in the form of the Internet's most preferred currency, kittens.
 class role::wikilove {
 mediawiki::extension { 'WikiLove':
 needs_update   = true,
@@ -1060,16 +1051,16 @@
 }
 
 # == Class role::popups
-# The Popups extension shows a popup when people hover over article links
+# The Popups extension shows a popup when people hover over article
+# links.
 class role::popups {
-
 mediawiki::extension { 'TextExtracts': }
 mediawiki::extension { 'PageImages': }
 
 mediawiki::extension { 'Popups':
 require = [
 Mediawiki::Extension['TextExtracts'],
-Mediawiki::Extension['PageImages']
+Mediawiki::Extension['PageImages'],
 ],
 }
 }
@@ -1078,6 +1069,29 @@
 # The extension that powers the New Page Patrol workflow
 class role::pagetriage {
 mediawiki::extension { 'PageTriage':
-needs_update = true
+needs_update = true,
+}
+}
+
+# == Class: role::math::search
+#
+# The MathSearch extension integrates the MathWeb Search, a
+# content-based search engine for mathematical formulae. It indexes
+# MathML formulae, using a technique derived from automated theorem
+# proving: term indexing.
+class role::mathsearch inherits role::math {
+include role::geshi
+
+Mediawiki::Extension['Math'] {
+branch + 'dev',
+}
+
+mediawiki::extension { 'MathSearch':
+require  = Mediawiki::Extension['Math'],
+needs_update = true,
+settings = [
+'$wgMathValidModes[] = MW_MATH_LATEXML',
+'$wgDefaultUserOptions[math] = MW_MATH_LATEXML',
+],
 }
 }
diff --git a/puppet/modules/browsertests/manifests/init.pp 
b/puppet/modules/browsertests/manifests/init.pp
index 8ba9a85..448777c 100644
--- a/puppet/modules/browsertests/manifests/init.pp
+++ b/puppet/modules/browsertests/manifests/init.pp
@@ -49,7 +49,7 @@
 }
 
 file { ${install_location}/config:
-ensure = directory,
+ensure  = directory,
 require = Git::Clone['qa/browsertests'],
 }
 
diff --git a/puppet/modules/mathsearch/manifests/init.pp 
b/puppet/modules/mathsearch/manifests/init.pp
deleted file mode 100644
index a3e7ff3..000
--- a/puppet/modules/mathsearch/manifests/init.pp
+++ /dev/null
@@ -1,20 +0,0 @@
-# == Class: mathsearch
-#
-# Module for the extension math search.
-#
-class mathsearch {
-
-exec { switch to dev branch of math:
-command = git checkout -b dev origin/dev,
-onlyif  = git status | grep -c 'master',
-cwd  

[MediaWiki-commits] [Gerrit] Call Twitter API 1.1 instead of 1.0 - change (mediawiki...TweetANew)

2014-02-09 Thread Varnent (Code Review)
Varnent has submitted this change and it was merged.

Change subject: Call Twitter API 1.1 instead of 1.0
..


Call Twitter API 1.1 instead of 1.0

Twitter API 1.0 is now retired, replacing the 1/statuses/update call
by a 1.1/statuses/update call.

Thank you to ISAKA Yoji to have reporting this.

Bug: 59994
Change-Id: I48a813d47072803fee85ca36da25e839eb3e7410
---
M TweetANew.body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/TweetANew.body.php b/TweetANew.body.php
index 4f52685..fddf55e 100644
--- a/TweetANew.body.php
+++ b/TweetANew.body.php
@@ -254,7 +254,7 @@
 
# Make tweet message
$tmhOAuth-request( 'POST',
-   $tmhOAuth-url( '1/statuses/update' ),
+   $tmhOAuth-url( '1.1/statuses/update' ),
array( 'status' = $tweet_text )
);
return true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I48a813d47072803fee85ca36da25e839eb3e7410
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TweetANew
Gerrit-Branch: master
Gerrit-Owner: Dereckson dereck...@espace-win.org
Gerrit-Reviewer: Johnduhart j...@compwhizii.net
Gerrit-Reviewer: Varnent ad...@wikiqueer.org

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


[MediaWiki-commits] [Gerrit] Lint: colon after 'Class' in role comment headers - change (mediawiki/vagrant)

2014-02-09 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Lint: colon after 'Class' in role comment headers
..

Lint: colon after 'Class' in role comment headers

Change-Id: I671a64e26bd63eea3dadcf953a3f7cf1fad15304
---
M puppet/manifests/roles.pp
1 file changed, 11 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/52/112352/1

diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index ad8bb34..3247941 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -433,7 +433,7 @@
 }
 }
 
-# == Class role::xhprof
+# == Class: role::xhprof
 # This class enables support for function-level hierarchical profiling of PHP
 # using XHProf. The graphical interface for the profiler is available at
 # /xhprof on the same port as the wiki.
@@ -796,7 +796,7 @@
 }
 
 
-# == Class role::wikimetrics
+# == Class: role::wikimetrics
 # Wikimetrics is a Wikimedia Foundation developed tool that provides
 # access to the Wikimedia API. It allows users to pull data about a
 # group of usernames (called cohorts) to discover retention rates for
@@ -886,7 +886,7 @@
 }
 
 
-# == Class role::analytics
+# == Class: role::analytics
 # Includes all analytics related roles:
 # - hadoop
 # - hive
@@ -905,7 +905,7 @@
 }
 
 
-# == Class role::hadoop
+# == Class: role::hadoop
 # Installs and runs all hadoop services.
 class role::hadoop {
 # need java before hadoop is installed
@@ -968,7 +968,7 @@
 }
 }
 
-# == Class role::hive
+# == Class: role::hive
 # Installs and runs hive client, hive metastore and hive server.
 class role::hive {
 # Mediawiki includes the mysql module.
@@ -1002,14 +1002,14 @@
 }
 }
 
-# == Class role::gadgets
+# == Class: role::gadgets
 # The Gadgets extension provides a way for users to pick JavaScript
 # or CSS based gadgets that other wiki users provide.
 class role::gadgets {
 mediawiki::extension { 'Gadgets': }
 }
 
-# == Class role::geodata
+# == Class: role::geodata
 # GeoData is an extension that allows storing coordinates in articles
 # and searching for them.
 class role::geodata {
@@ -1019,7 +1019,7 @@
 }
 }
 
-# == Class role::wikilove
+# == Class: role::wikilove
 # The WikiLove extension lets people send love to other wiki users
 # in the form of the Internet's most preferred currency, kittens.
 class role::wikilove {
@@ -1031,7 +1031,7 @@
 }
 }
 
-# == Class role::wikimania_scholarships
+# == Class: role::wikimania_scholarships
 # Provisions the Wikimania Scholarships application.
 #
 # *Note*: The application is provisioned using an Apache named virtual host.
@@ -1050,7 +1050,7 @@
 }
 }
 
-# == Class role::popups
+# == Class: role::popups
 # The Popups extension shows a popup when people hover over article
 # links.
 class role::popups {
@@ -1065,7 +1065,7 @@
 }
 }
 
-# == Class role::pagetriage
+# == Class: role::pagetriage
 # The extension that powers the New Page Patrol workflow
 class role::pagetriage {
 mediawiki::extension { 'PageTriage':

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I671a64e26bd63eea3dadcf953a3f7cf1fad15304
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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] Lint: colon after 'Class' in role comment headers - change (mediawiki/vagrant)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Lint: colon after 'Class' in role comment headers
..


Lint: colon after 'Class' in role comment headers

Change-Id: I671a64e26bd63eea3dadcf953a3f7cf1fad15304
---
M puppet/manifests/roles.pp
1 file changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index ad8bb34..3247941 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -433,7 +433,7 @@
 }
 }
 
-# == Class role::xhprof
+# == Class: role::xhprof
 # This class enables support for function-level hierarchical profiling of PHP
 # using XHProf. The graphical interface for the profiler is available at
 # /xhprof on the same port as the wiki.
@@ -796,7 +796,7 @@
 }
 
 
-# == Class role::wikimetrics
+# == Class: role::wikimetrics
 # Wikimetrics is a Wikimedia Foundation developed tool that provides
 # access to the Wikimedia API. It allows users to pull data about a
 # group of usernames (called cohorts) to discover retention rates for
@@ -886,7 +886,7 @@
 }
 
 
-# == Class role::analytics
+# == Class: role::analytics
 # Includes all analytics related roles:
 # - hadoop
 # - hive
@@ -905,7 +905,7 @@
 }
 
 
-# == Class role::hadoop
+# == Class: role::hadoop
 # Installs and runs all hadoop services.
 class role::hadoop {
 # need java before hadoop is installed
@@ -968,7 +968,7 @@
 }
 }
 
-# == Class role::hive
+# == Class: role::hive
 # Installs and runs hive client, hive metastore and hive server.
 class role::hive {
 # Mediawiki includes the mysql module.
@@ -1002,14 +1002,14 @@
 }
 }
 
-# == Class role::gadgets
+# == Class: role::gadgets
 # The Gadgets extension provides a way for users to pick JavaScript
 # or CSS based gadgets that other wiki users provide.
 class role::gadgets {
 mediawiki::extension { 'Gadgets': }
 }
 
-# == Class role::geodata
+# == Class: role::geodata
 # GeoData is an extension that allows storing coordinates in articles
 # and searching for them.
 class role::geodata {
@@ -1019,7 +1019,7 @@
 }
 }
 
-# == Class role::wikilove
+# == Class: role::wikilove
 # The WikiLove extension lets people send love to other wiki users
 # in the form of the Internet's most preferred currency, kittens.
 class role::wikilove {
@@ -1031,7 +1031,7 @@
 }
 }
 
-# == Class role::wikimania_scholarships
+# == Class: role::wikimania_scholarships
 # Provisions the Wikimania Scholarships application.
 #
 # *Note*: The application is provisioned using an Apache named virtual host.
@@ -1050,7 +1050,7 @@
 }
 }
 
-# == Class role::popups
+# == Class: role::popups
 # The Popups extension shows a popup when people hover over article
 # links.
 class role::popups {
@@ -1065,7 +1065,7 @@
 }
 }
 
-# == Class role::pagetriage
+# == Class: role::pagetriage
 # The extension that powers the New Page Patrol workflow
 class role::pagetriage {
 mediawiki::extension { 'PageTriage':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I671a64e26bd63eea3dadcf953a3f7cf1fad15304
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Test case generator - change (mediawiki...MathSearch)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Test case generator
..

Test case generator

Generates phpUnitTest data from a given page.
* Not compatible to dev branch.

Bug: 61090
Change-Id: Ia406df98de94f9c9849c50f9d801c97466a53039
---
M SpecialMathDebug.php
1 file changed, 33 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MathSearch 
refs/changes/54/112354/1

diff --git a/SpecialMathDebug.php b/SpecialMathDebug.php
index f364ccb..ddff598 100644
--- a/SpecialMathDebug.php
+++ b/SpecialMathDebug.php
@@ -18,8 +18,6 @@
 
function execute( $par ) {
global $wgMathDebug, $wgRequest;
-   $output = $this-getOutput();
-   $this-setHeaders();
$offset = $wgRequest-getVal( 'offset', 0 );
$length = $wgRequest-getVal( 'length', 10 );
$page = $wgRequest-getVal( 'page', 'Testpage' );
@@ -27,19 +25,26 @@
$purge = $wgRequest-getVal( 'purge', '' );
if (  !$this-userCanExecute( $this-getUser() )  ) {
$this-displayRestrictionError();
-   return;
} else {
-   $this-displayButtons( $offset, $length, $page, 
$action, $purge );
-   if ( $action == 'parserTest' ) {
-   $this-generateLaTeXMLOutput( $offset, $length, 
$page );
-   return;
-   } elseif ( $action == 'parserDiff' ) {
-   $this-compareParser( $offset, $length, $page );
-   return;
-   } else {
-   $this-testParser( $offset, $length, $page, 
$purge=='checked'?true:false );
+   if ( $action != 'generateParserTests'  ){
+   $this-setHeaders();
+   $this-displayButtons( $offset, $length, $page, 
$action, $purge );
+   }
+   switch ( $action ){
+   case 'parserTest':
+   $this-generateLaTeXMLOutput( $offset, 
$length, $page );
+   break;
+   case 'parserDiff':
+   $this-compareParser( $offset, $length, 
$page );
+   break;
+   case 'generateParserTests':
+   $this-generateParserTests( $offset, 
$length, $page );
+   break;
+   default:
+   $this-testParser( $offset, $length, 
$page, $purge=='checked'?true:false );
}
}
+   return;
}
function displayButtons( $offset = 0, $length = 10, $page = 'Testpage', 
$action = 'show', $purge='' ) {
$out = $this-getOutput();
@@ -137,6 +142,22 @@
echo $i;
}
 
+   public function generateParserTests( $offset = 0, $length = 10, $page = 
'Testpage' , $purge = true ) {
+   $res = $this-getRequest()-response();
+   $res-header('Content-Type: application/octet-stream');
+   $res-header('charset=utf-8');
+   $res-header('Content-Disposition: 
attachment;filename=ParserTest.data');
+
+   $out = $this-getOutput();
+   $out-setArticleBodyOnly( true );
+   $parserTests= array();
+   foreach ( array_slice( self::getMathTagsFromPage( $page ), 
$offset, $length, true ) as $key = $input ) {
+   $output = MathRenderer::renderMath( $input, array(), 
MW_MATH_PNG );
+   $parserTests[(string) $input ]= $output;
+   }
+   $out-addHTML( serialize($parserTests) );
+   }
+
function generateLaTeXMLOutput( $offset = 0, $length = 10, $page = 
'Testpage' ) {
global $wgMathUseLaTeXML;
$out = $this-getOutput();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia406df98de94f9c9849c50f9d801c97466a53039
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Test case generator - change (mediawiki...MathSearch)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has submitted this change and it was merged.

Change subject: Test case generator
..


Test case generator

Generates phpUnitTest data from a given page.
* Not compatible to dev branch.

Bug: 61090
Change-Id: Ia406df98de94f9c9849c50f9d801c97466a53039
---
M SpecialMathDebug.php
1 file changed, 33 insertions(+), 12 deletions(-)

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



diff --git a/SpecialMathDebug.php b/SpecialMathDebug.php
index f364ccb..ddff598 100644
--- a/SpecialMathDebug.php
+++ b/SpecialMathDebug.php
@@ -18,8 +18,6 @@
 
function execute( $par ) {
global $wgMathDebug, $wgRequest;
-   $output = $this-getOutput();
-   $this-setHeaders();
$offset = $wgRequest-getVal( 'offset', 0 );
$length = $wgRequest-getVal( 'length', 10 );
$page = $wgRequest-getVal( 'page', 'Testpage' );
@@ -27,19 +25,26 @@
$purge = $wgRequest-getVal( 'purge', '' );
if (  !$this-userCanExecute( $this-getUser() )  ) {
$this-displayRestrictionError();
-   return;
} else {
-   $this-displayButtons( $offset, $length, $page, 
$action, $purge );
-   if ( $action == 'parserTest' ) {
-   $this-generateLaTeXMLOutput( $offset, $length, 
$page );
-   return;
-   } elseif ( $action == 'parserDiff' ) {
-   $this-compareParser( $offset, $length, $page );
-   return;
-   } else {
-   $this-testParser( $offset, $length, $page, 
$purge=='checked'?true:false );
+   if ( $action != 'generateParserTests'  ){
+   $this-setHeaders();
+   $this-displayButtons( $offset, $length, $page, 
$action, $purge );
+   }
+   switch ( $action ){
+   case 'parserTest':
+   $this-generateLaTeXMLOutput( $offset, 
$length, $page );
+   break;
+   case 'parserDiff':
+   $this-compareParser( $offset, $length, 
$page );
+   break;
+   case 'generateParserTests':
+   $this-generateParserTests( $offset, 
$length, $page );
+   break;
+   default:
+   $this-testParser( $offset, $length, 
$page, $purge=='checked'?true:false );
}
}
+   return;
}
function displayButtons( $offset = 0, $length = 10, $page = 'Testpage', 
$action = 'show', $purge='' ) {
$out = $this-getOutput();
@@ -137,6 +142,22 @@
echo $i;
}
 
+   public function generateParserTests( $offset = 0, $length = 10, $page = 
'Testpage' , $purge = true ) {
+   $res = $this-getRequest()-response();
+   $res-header('Content-Type: application/octet-stream');
+   $res-header('charset=utf-8');
+   $res-header('Content-Disposition: 
attachment;filename=ParserTest.data');
+
+   $out = $this-getOutput();
+   $out-setArticleBodyOnly( true );
+   $parserTests= array();
+   foreach ( array_slice( self::getMathTagsFromPage( $page ), 
$offset, $length, true ) as $key = $input ) {
+   $output = MathRenderer::renderMath( $input, array(), 
MW_MATH_PNG );
+   $parserTests[(string) $input ]= $output;
+   }
+   $out-addHTML( serialize($parserTests) );
+   }
+
function generateLaTeXMLOutput( $offset = 0, $length = 10, $page = 
'Testpage' ) {
global $wgMathUseLaTeXML;
$out = $this-getOutput();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia406df98de94f9c9849c50f9d801c97466a53039
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Install MathWebSearch service - change (mediawiki/vagrant)

2014-02-09 Thread Physikerwelt (Code Review)
Physikerwelt has uploaded a new change for review.

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

Change subject: Install MathWebSearch service
..

Install MathWebSearch service

* Creates the formulae-index
* Installs the MathWebSearch service

Change-Id: Id773a74d2f5328f2ba882f0a595708afcf59bcb5
---
M puppet/manifests/roles.pp
1 file changed, 22 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/55/112355/1

diff --git a/puppet/manifests/roles.pp b/puppet/manifests/roles.pp
index 3247941..2c1d277 100644
--- a/puppet/manifests/roles.pp
+++ b/puppet/manifests/roles.pp
@@ -1094,4 +1094,26 @@
 '$wgDefaultUserOptions[math] = MW_MATH_LATEXML',
 ],
 }
+
+file { [/srv/mwsd, /srv/mwsd/data,/srv/mwsd/data/wiki]:
+  ensure = 'directory',
+}
+
+exec { 'ReRenderMath':
+  cwd = /vagrant/mediawiki/extensions/MathSearch/maintenance/,
+  command = /usr/bin/php UpdateMath.php  /usr/bin/php 
CreateMathIndex.php /srv/mwsd/data/wiki --mwsns=mws: ,
+  creates = '/srv/mwsd/data/wiki/math.xml',
+  require = [
+File['/srv/mwsd/data/wiki'],
+Mediawiki::Extension['MathSearch'],
+  ],
+}
+
+exec { 'install mwsd':
+  cwd = /vagrant/mediawiki/extensions/MathSearch/mws,
+  command = '/bin/bash install.sh',
+  creates = '/etc/init.d/restd_wiki',
+  user= 'root',
+  require  = Exec['ReRenderMath'],
+}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id773a74d2f5328f2ba882f0a595708afcf59bcb5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Physikerwelt w...@physikerwelt.de

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 783f99b..a498cb1 - change (mediawiki/extensions)

2014-02-09 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 783f99b..a498cb1
..


Syncronize VisualEditor: 783f99b..a498cb1

Change-Id: Iec14c8d7c5f80d5ff9e29ad7b789437bff046404
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)

Approvals:
  Jenkins-mwext-sync: Verified; Looks good to me, approved



diff --git a/VisualEditor b/VisualEditor
index 783f99b..a498cb1 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 783f99b45d986ca425e055cebfd3cda8ad4f87e6
+Subproject commit a498cb19f8c28cbaac86303832e44558e09a1238

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iec14c8d7c5f80d5ff9e29ad7b789437bff046404
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org
Gerrit-Reviewer: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 783f99b..a498cb1 - change (mediawiki/extensions)

2014-02-09 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 783f99b..a498cb1
..

Syncronize VisualEditor: 783f99b..a498cb1

Change-Id: Iec14c8d7c5f80d5ff9e29ad7b789437bff046404
---
M VisualEditor
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/98/112398/1

diff --git a/VisualEditor b/VisualEditor
index 783f99b..a498cb1 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 783f99b45d986ca425e055cebfd3cda8ad4f87e6
+Subproject commit a498cb19f8c28cbaac86303832e44558e09a1238

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec14c8d7c5f80d5ff9e29ad7b789437bff046404
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync jenkins-...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Updated thank you translations - change (wikimedia...crm)

2014-02-09 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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

Change subject: Updated thank you translations
..

Updated thank you translations

Change-Id: I5264f5ba94bb3c4e1d651bf64a0b61c557317613
---
M sites/all/modules/thank_you/templates/html/thank_you.cs.html
M sites/all/modules/thank_you/templates/html/thank_you.et.html
M sites/all/modules/thank_you/templates/html/thank_you.fi.html
M sites/all/modules/thank_you/templates/html/thank_you.hu.html
M sites/all/modules/thank_you/templates/html/thank_you.it.html
M sites/all/modules/thank_you/templates/html/thank_you.nl.html
M sites/all/modules/thank_you/templates/html/thank_you.pt-br.html
M sites/all/modules/thank_you/templates/html/thank_you.ru.html
M sites/all/modules/thank_you/templates/html/thank_you.zh.html
9 files changed, 168 insertions(+), 121 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/00/112400/1

diff --git a/sites/all/modules/thank_you/templates/html/thank_you.cs.html 
b/sites/all/modules/thank_you/templates/html/thank_you.cs.html
index b12905a..5381e4a 100644
--- a/sites/all/modules/thank_you/templates/html/thank_you.cs.html
+++ b/sites/all/modules/thank_you/templates/html/thank_you.cs.html
@@ -1,4 +1,4 @@
-pMilý/á {{contact.first_name}},/p
+pVážený dářče,/p
 
 pJe to od Vás fantastické. DĚKUJI VÁM za podporu nadace Wikimedia, neziskové 
organizace,
 která provozuje Wikipedii a její sesterské projekty./p
@@ -6,35 +6,36 @@
 pVáš příspěvek pomáhá krýt náklady nejen Vašeho používání Wikipedie, ale i 
náklady
 dalších čtenářů Wikipedie./p
 
-pJako zemědělce-důchodce v New Yorku, který s pomocí Wikipedie studuje vědu 
kalů a studenta
-v Kuala Lumpuru, který zkoumá organickou chemii. Britského mechanika, který 
poté, co si zlomil
-páteř při nehodě, použil Wikipedii k rekvalifikaci na webového vývojáře. 
Úředník ve
-Finsku, který sestavil offline verzi Wikipedie pro malou školu v Ghaně. A otce 
v Mexico City,
-který se svými dcerkami chodí o víkendech do muzea a používá Wikipedii, aby 
jim pomohl
-pochopit vše, co je tam k vidění./p
+pJako třeba newyorského zemědělce v důchodu, který s pomocí Wikipedie 
studuje vědu kalů,
+a studenta v Kuala Lumpur, který zkoumá organickou chemii. Nebo britského 
mechanika, který
+poté, co si zlomil páteř při nehodě, použil Wikipedii ke své rekvalifikaci na 
webového
+vývojáře. Či úředníka ve Finsku, který sestavil offline verzi Wikipedie pro 
malou školu v
+Ghaně. Případně otce v Mexico City, který se svými dcerkami chodí o víkendech 
do muzea a
+používá Wikipedii, aby jim pomohl pochopit vše, co je tam k vidění./p
 
 pÚkolem Wikipedie je zpřístupnit souhrn všech lidských vědomostí každému na 
celém
 světě v jeho vlastním jazyce. To je dost odvážné poslání, ale se 30 miliony 
článků a 287
 jazyky bych řekla, že díky Vám a lidem jako jste Vy se nám to daří./p
 
 pJménem nadace Wikimedia a půl miliardy dalších čtenářů Wikipedie po celém 
světě:
-děkujeme. Díky Vaší pomoci s úhradou nákladů na provoz se Wikipedie obejde bez 
inzerce a
-zůstává nezávislá na cizích zájmech a zaměřená výhradně na pomoc svým čtenářům.
-Přesně tak, jak to má být…/p
+děkujeme. Díky tomu, že nám pomáháte pokrývat náklady na provoz, se Wikipedie 
obejde bez
+inzerce a zůstává nezávislá na cizích zájmech, zaměřená výhradně na pomoc svým
+čtenářům. Přesně tak, jak to má být./p
 
-pMožná jste si všimli, že poprvé v letošním roce jsme vylepšili náš 
fundraising tak, že
-většina lidí uvidí naše bannery pouze několikrát, namísto po celé týdny. To je 
záměrné:
-nechceme lidi dráždit příliš častými výzvami. Ale to znamená, že se méně lidí 
dozví,
-že jsme neziskovka a že potřebujeme jejich pomoc. Takže pokud jste ochotní, 
ocenila bych Vaši
-pomoc přeposláním tohoto e-mailu několika Vašim přátelům./p
+pMožná jste si všimli, že poprvé v letošním roce jsme vylepšili výběr 
finančních
+prostředků tak, že většina lidí uvidí naše bannery pouze několikrát, namísto 
po celé
+týdny. To je záměrné: nechceme lidi dráždit příliš častými výzvami. Ale to 
znamená, že
+se méně lidí dozví, že jsme nezisková společnost a že potřebujeme jejich 
pomoc. Takže
+pokud jste ochotní, ocenila bych Vaši pomoc přeposláním tohoto e-mailu 
několika Vašim
+přátelům./p
 
 pA co takhle pokusit se k nám připojit a napsat něco do Wikipedie? To by 
bylo skvělé!
 Wikipedii píšou pouze dobrovolníci – desetitisíce obyčejných lidí jako my. 
Uvidíte-li
 někde překlep nebo nějakou chybu, opravte to. Víte o něčem, co by stálo za to 
doplnit?
-Udělejte to! Některé lidi to ohromně uspokojuje, třeba to bude i váš 
případ./p
+Udělejte to! Některé lidi to ohromně naplňuje, třeba to bude i Váš případ./p
 
-pJeště jednou děkuji. Vážím si toho, že nám věříte, a slibuji, že vaše peníze
-využijeme pečlivě a dobře./p
+pJeště jednou děkuji. Vážím si toho, že nám věříte, a slibuji, že Vaše peníze
+využijeme pečlivě a uvážlivě./p
 
 pDíky,br/
 Sue/p
@@ -45,29 

[MediaWiki-commits] [Gerrit] Bug 60753 - Images: Empty link not accepted in image caption - change (mediawiki...parsoid)

2014-02-09 Thread Hardikj (Code Review)
Hardikj has uploaded a new change for review.

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

Change subject: Bug 60753 - Images: Empty link not accepted in image caption
..

Bug 60753 - Images: Empty link not accepted in image caption

Change-Id: I484b591fc0e2711d81f6f4a834889df1ca537991
---
M lib/pegTokenizer.pegjs.txt
1 file changed, 11 insertions(+), 1 deletion(-)


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

diff --git a/lib/pegTokenizer.pegjs.txt b/lib/pegTokenizer.pegjs.txt
index ee7a55f..ab4b44c 100644
--- a/lib/pegTokenizer.pegjs.txt
+++ b/lib/pegTokenizer.pegjs.txt
@@ -1159,7 +1159,7 @@
 ! url
 //target:link_target
 // XXX: disallow pipe!
-target:wikilink_preprocessor_text
+target:wikilink_preprocessor_text?
 tpos:({return pos;})
 lcontent:wikilink_content?
 ]]
@@ -1169,6 +1169,16 @@
   }
   //console.warn('lcontent: ' + JSON.stringify( lcontent, null, 2 ) );
 
+  if ( target === '' ){
+var src = [[]];
+var obj1 = new TagTk( 'span', 
+  [ new KV( 'typeof', 'mw:Placeholder' ) ], 
+  { src: src, tsr: [pos0, pos] } 
+);
+var obj2 = new EndTagTk( 'span', [], { tsr: [pos, pos] } )
+return [obj1, src, obj2];
+  }
+
   var obj = new SelfclosingTagTk( 'wikilink' ),
   textTokens = [],
   hrefKV = new KV('href', target);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I484b591fc0e2711d81f6f4a834889df1ca537991
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Hardikj hardikjuneja...@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] repo conf addition -- test - change (translatewiki)

2014-02-09 Thread Johnmclear (Code Review)
Johnmclear has uploaded a new change for review.

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

Change subject: repo conf addition -- test
..

repo conf addition -- test

Change-Id: Id2ee257757fa5d5e06ef07450e57f46fd072ed5a
---
M REPOCONF
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/02/112402/1

diff --git a/REPOCONF b/REPOCONF
index a287473..5a79cf3 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,6 +11,7 @@
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
+REPO_NFCRINGCONTROL=git://github.com/mclear/NFC_Ring_Control.git
 REPO_FREECOL=git://git.code.sf.net/p/freecol/git
 
REPO_FUDFORUM=svn://svn.code.sf.net/p/fudforum/code/trunk/install/forum_data/thm/default/i18n
 REPO_FUEL=git://git.fedorahosted.org/fuel.git

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2ee257757fa5d5e06ef07450e57f46fd072ed5a
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Johnmclear j...@mclear.co.uk

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


[MediaWiki-commits] [Gerrit] Put line breaks after each element in OutputPage::headElement() - change (mediawiki/core)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Put line breaks after each element in OutputPage::headElement()
..


Put line breaks after each element in OutputPage::headElement()

Change-Id: I4e7715a354e9d599fb2c77c09ac72a55462aaa5d
---
M includes/OutputPage.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index aff4b16..2b1d4a0 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -2510,14 +2510,14 @@
// Our XML declaration is output by Html::htmlHeader.
// 
http://www.whatwg.org/html/semantics.html#attr-meta-http-equiv-content-type
// http://www.whatwg.org/html/semantics.html#charset
-   $ret .= Html::element( 'meta', array( 'charset' = 
'UTF-8' ) );
+   $ret .= Html::element( 'meta', array( 'charset' = 
'UTF-8' ) ) . \n;
}
 
$ret .= Html::element( 'title', null, $this-getHTMLTitle() ) . 
\n;
 
// Avoid Internet Explorer compatibility view, so that
// jQuery can work correctly.
-   $ret .= Html::element( 'meta', array( 'http-equiv' = 
'X-UA-Compatible', 'content' = 'IE=EDGE' ) );
+   $ret .= Html::element( 'meta', array( 'http-equiv' = 
'X-UA-Compatible', 'content' = 'IE=EDGE' ) ) . \n;
 
$ret .= implode( \n, array(
$this-getHeadLinks(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e7715a354e9d599fb2c77c09ac72a55462aaa5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex coderev...@emsenhuber.ch
Gerrit-Reviewer: Daniel Friesen dan...@nadir-seen-fire.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] Include NFC Ring Control translations - change (translatewiki)

2014-02-09 Thread Johnmclear (Code Review)
Johnmclear has uploaded a new change for review.

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

Change subject: Include NFC Ring Control translations
..

Include NFC Ring Control translations

Change-Id: Ifc843f4585452d8b002cb822a6645a818b71250d
---
M REPOCONF
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/03/112403/1

diff --git a/REPOCONF b/REPOCONF
index a287473..5a79cf3 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,6 +11,7 @@
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
+REPO_NFCRINGCONTROL=git://github.com/mclear/NFC_Ring_Control.git
 REPO_FREECOL=git://git.code.sf.net/p/freecol/git
 
REPO_FUDFORUM=svn://svn.code.sf.net/p/fudforum/code/trunk/install/forum_data/thm/default/i18n
 REPO_FUEL=git://git.fedorahosted.org/fuel.git

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifc843f4585452d8b002cb822a6645a818b71250d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Johnmclear j...@mclear.co.uk

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


[MediaWiki-commits] [Gerrit] repo conf addition -- test - change (translatewiki)

2014-02-09 Thread Johnmclear (Code Review)
Johnmclear has uploaded a new change for review.

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

Change subject: repo conf addition -- test
..

repo conf addition -- test

support NFC Rinc Control translations

Change-Id: Ifc843f4585452d8b002cb822a6645a818b71250d

config files for nfc ring control translation

Change-Id: I976fcea059474ef2db92d6455cd4a66e390b8ddb
---
M REPOCONF
M TranslateSettings.php
M bin/repocommit
M bin/repocreate
M bin/repoexport
M bin/repoupdate
A groups/NFCRingControl/NFCRingControl.yaml
7 files changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/04/112404/1

diff --git a/REPOCONF b/REPOCONF
index a287473..5a79cf3 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,6 +11,7 @@
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
+REPO_NFCRINGCONTROL=git://github.com/mclear/NFC_Ring_Control.git
 REPO_FREECOL=git://git.code.sf.net/p/freecol/git
 
REPO_FUDFORUM=svn://svn.code.sf.net/p/fudforum/code/trunk/install/forum_data/thm/default/i18n
 REPO_FUEL=git://git.fedorahosted.org/fuel.git
diff --git a/TranslateSettings.php b/TranslateSettings.php
index be2d30a..2d0186e 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -396,6 +396,9 @@
 wfAddNamespace( 1250, 'EtherpadLite' );
 $wgTranslateGroupFiles[] = $GROUPS/EtherpadLite/EtherpadLite.yaml;
 
+wfAddNamespace( 1250, 'NFCRingControl' );
+$wgTranslateGroupFiles[] = $GROUPS/NFCRingControl/NFCringControl.yaml;
+
 wfAddNamespace( 1252, 'Vicuna' );
 $wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
 
diff --git a/bin/repocommit b/bin/repocommit
index 61610b6..ccefe11 100755
--- a/bin/repocommit
+++ b/bin/repocommit
@@ -45,6 +45,7 @@
 GITPROJECTS=\
 eol \
 etherpad-lite \
+nfcring-control \
 freecol \
 fuel \
 intuition \
diff --git a/bin/repocreate b/bin/repocreate
index 4f291ab..bcc17b1 100755
--- a/bin/repocreate
+++ b/bin/repocreate
@@ -66,6 +66,13 @@
fi
git clone $REPO_ETHERPADLITE $PROJECT --branch develop
 
+elif [ $PROJECT = nfcring-control ]
+then
+if [ -z $REPO_NFCRINGCONTROL ]
+then echo Add REPO_NFCRINGCONTROL to REPOCONF; exit 1
+fi
+git clone $REPO_NFCRINGCONTROL $PROJECT
+
 elif [ $PROJECT = freecol ]
 then
if [ -z $REPO_FREECOL ]
diff --git a/bin/repoexport b/bin/repoexport
index 537c96f..0de6e7b 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -41,6 +41,10 @@
 then
php $EXPORTER --target . --group=out-$PROJECT --lang '*' --skip 
en,qqq $THRESHOLD
 
+elif [ $PROJECT = nfcring-control ]
+then
+php $EXPORTER --target . --group=out-$PROJECT --lang '*' --skip 
en,qqq $THRESHOLD
+
 elif [ $PROJECT = freecol ]
 then
php $EXPORTER --target . --group=out-freecol --lang '*' --skip en,qqq 
$THRESHOLD
diff --git a/bin/repoupdate b/bin/repoupdate
index db3d4f3..5ae54fd 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -109,6 +109,10 @@
 then
gitupdate $PROJECT $REPO_ETHERPADLITE_BRANCH
 
+elif [ $PROJECT = nfcring-control ]
+then
+gitupdate $PROJECT $REPO_NFCRINGCONTROL
+
 elif [ $PROJECT = fudforum ]
 then
svn up -q $PROJECT
diff --git a/groups/NFCRingControl/NFCRingControl.yaml 
b/groups/NFCRingControl/NFCRingControl.yaml
new file mode 100644
index 000..6d1fc9d
--- /dev/null
+++ b/groups/NFCRingControl/NFCRingControl.yaml
@@ -0,0 +1,12 @@
+---
+BASIC:
+  id: out-nfcring-control
+  label: NFC Ring Control
+  icon: wiki://NFCRingControl.svg
+  description: {{int:translate-group-desc-nfcring-control}}
+  namespace: NS_NFCRINGCONTROL
+  class: FileBasedMessageGroup
+
+FILES:
+  class: JsonFFS
+  sourcePattern: %GROUPROOT%/nfcring-control/www/locales/%CODE%.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I976fcea059474ef2db92d6455cd4a66e390b8ddb
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Johnmclear j...@mclear.co.uk

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


[MediaWiki-commits] [Gerrit] Use context instead of global variables, add typehinting - change (mediawiki...CodeEditor)

2014-02-09 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use context instead of global variables, add typehinting
..

Use context instead of global variables, add typehinting

Change-Id: I316fc36b97ee648af303d2cafde0eb69f8c83b83
---
M CodeEditor.hooks.php
1 file changed, 7 insertions(+), 10 deletions(-)


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

diff --git a/CodeEditor.hooks.php b/CodeEditor.hooks.php
index 470f82e..b8c3a35 100644
--- a/CodeEditor.hooks.php
+++ b/CodeEditor.hooks.php
@@ -1,7 +1,7 @@
 ?php
 
 class CodeEditorHooks {
-   static function getPageLanguage( $title ) {
+   static function getPageLanguage( Title $title ) {
global $wgCodeEditorEnableCore;
 
if ( $wgCodeEditorEnableCore  method_exists( $title, 
getContentModel ) ) {
@@ -25,26 +25,23 @@
return $lang;
}

-   public static function editPageShowEditFormInitial( $toolbar ) {
-   global $wgOut, $wgTitle;
-   $lang = self::getPageLanguage( $wgTitle );
+   public static function editPageShowEditFormInitial( EditPage $editPage, 
OutputPage $out ) {
+   $lang = self::getPageLanguage( $out-getTitle() );
if ( $lang ) {
-   $wgOut-addModules( 'ext.codeEditor' );
+   $out-addModules( 'ext.codeEditor' );
}
return true;
}
 
-   public static function onMakeGlobalVariablesScript( $vars, $output ) {
-   global $wgTitle;
-   
-   $lang = self::getPageLanguage( $wgTitle );
+   public static function onMakeGlobalVariablesScript( $vars, OutputPage 
$output ) {
+   $lang = self::getPageLanguage( $output-getTitle() );
if( $lang ) {
$vars['wgCodeEditorCurrentLanguage'] = $lang;
}
return true;
}

-   public static function onBeforePageDisplay( $out, $skin ) {
+   public static function onBeforePageDisplay( OutputPage $out, Skin $skin 
) {
global $wgCodeEditorGeshiIntegration;
if ( $wgCodeEditorGeshiIntegration ) {
$out-addModules( 'ext.codeEditor.geshi' );

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

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

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


[MediaWiki-commits] [Gerrit] NFC Ring Control Translation config files - change (translatewiki)

2014-02-09 Thread Johnmclear (Code Review)
Johnmclear has uploaded a new change for review.

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

Change subject: NFC Ring Control Translation config files
..

NFC Ring Control Translation config files

Change-Id: Ic7f3a9ee86b809bf6e2748abe209c2b7041e2c7e
---
M REPOCONF
M TranslateSettings.php
M bin/repocommit
M bin/repocreate
M bin/repoexport
M bin/repoupdate
A groups/NFCRingControl/NFCRingControl.yaml
7 files changed, 32 insertions(+), 0 deletions(-)


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

diff --git a/REPOCONF b/REPOCONF
index a287473..5a79cf3 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,6 +11,7 @@
 REPO_EOL=git://github.com/EOL/eol.git
 REPO_ETHERPADLITE=git://github.com/ether/etherpad-lite.git
 REPO_ETHERPADLITE_BRANCH=develop
+REPO_NFCRINGCONTROL=git://github.com/mclear/NFC_Ring_Control.git
 REPO_FREECOL=git://git.code.sf.net/p/freecol/git
 
REPO_FUDFORUM=svn://svn.code.sf.net/p/fudforum/code/trunk/install/forum_data/thm/default/i18n
 REPO_FUEL=git://git.fedorahosted.org/fuel.git
diff --git a/TranslateSettings.php b/TranslateSettings.php
index be2d30a..2d0186e 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -396,6 +396,9 @@
 wfAddNamespace( 1250, 'EtherpadLite' );
 $wgTranslateGroupFiles[] = $GROUPS/EtherpadLite/EtherpadLite.yaml;
 
+wfAddNamespace( 1250, 'NFCRingControl' );
+$wgTranslateGroupFiles[] = $GROUPS/NFCRingControl/NFCringControl.yaml;
+
 wfAddNamespace( 1252, 'Vicuna' );
 $wgTranslateGroupFiles[] = $GROUPS/Vicuna/Vicuna.yaml;
 
diff --git a/bin/repocommit b/bin/repocommit
index 61610b6..ccefe11 100755
--- a/bin/repocommit
+++ b/bin/repocommit
@@ -45,6 +45,7 @@
 GITPROJECTS=\
 eol \
 etherpad-lite \
+nfcring-control \
 freecol \
 fuel \
 intuition \
diff --git a/bin/repocreate b/bin/repocreate
index 4f291ab..bcc17b1 100755
--- a/bin/repocreate
+++ b/bin/repocreate
@@ -66,6 +66,13 @@
fi
git clone $REPO_ETHERPADLITE $PROJECT --branch develop
 
+elif [ $PROJECT = nfcring-control ]
+then
+if [ -z $REPO_NFCRINGCONTROL ]
+then echo Add REPO_NFCRINGCONTROL to REPOCONF; exit 1
+fi
+git clone $REPO_NFCRINGCONTROL $PROJECT
+
 elif [ $PROJECT = freecol ]
 then
if [ -z $REPO_FREECOL ]
diff --git a/bin/repoexport b/bin/repoexport
index 537c96f..0de6e7b 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -41,6 +41,10 @@
 then
php $EXPORTER --target . --group=out-$PROJECT --lang '*' --skip 
en,qqq $THRESHOLD
 
+elif [ $PROJECT = nfcring-control ]
+then
+php $EXPORTER --target . --group=out-$PROJECT --lang '*' --skip 
en,qqq $THRESHOLD
+
 elif [ $PROJECT = freecol ]
 then
php $EXPORTER --target . --group=out-freecol --lang '*' --skip en,qqq 
$THRESHOLD
diff --git a/bin/repoupdate b/bin/repoupdate
index db3d4f3..5ae54fd 100755
--- a/bin/repoupdate
+++ b/bin/repoupdate
@@ -109,6 +109,10 @@
 then
gitupdate $PROJECT $REPO_ETHERPADLITE_BRANCH
 
+elif [ $PROJECT = nfcring-control ]
+then
+gitupdate $PROJECT $REPO_NFCRINGCONTROL
+
 elif [ $PROJECT = fudforum ]
 then
svn up -q $PROJECT
diff --git a/groups/NFCRingControl/NFCRingControl.yaml 
b/groups/NFCRingControl/NFCRingControl.yaml
new file mode 100644
index 000..6d1fc9d
--- /dev/null
+++ b/groups/NFCRingControl/NFCRingControl.yaml
@@ -0,0 +1,12 @@
+---
+BASIC:
+  id: out-nfcring-control
+  label: NFC Ring Control
+  icon: wiki://NFCRingControl.svg
+  description: {{int:translate-group-desc-nfcring-control}}
+  namespace: NS_NFCRINGCONTROL
+  class: FileBasedMessageGroup
+
+FILES:
+  class: JsonFFS
+  sourcePattern: %GROUPROOT%/nfcring-control/www/locales/%CODE%.json

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic7f3a9ee86b809bf6e2748abe209c2b7041e2c7e
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Johnmclear j...@mclear.co.uk

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


[MediaWiki-commits] [Gerrit] Fix some more places broken by wgDebugToolbar - change (mediawiki...VisualEditor)

2014-02-09 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Fix some more places broken by wgDebugToolbar
..

Fix some more places broken by wgDebugToolbar

See I907ef6fc

Change-Id: Ie44faa15629ebba834cb08ba6247ff3beaabd0ae
---
M modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
M modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
2 files changed, 6 insertions(+), 8 deletions(-)


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

diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
index f71c340..5ecff67 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWCategoryInputWidget.js
@@ -70,14 +70,12 @@
  */
 ve.ui.MWCategoryInputWidget.prototype.getLookupCacheItemFromData = function ( 
data ) {
var i, len, title, result = [];
-   if ( ve.isArray( data )  data.length ) {
-   for ( i = 0, len = data[1].length; i  len; i++ ) {
-   title = mw.Title.newFromText( data[1][i] );
-   if ( title ) {
-   result.push( title.getMainText() );
-   }
-   // If the received title isn't valid, just ignore it
+   for ( i = 0, len = data[1].length; i  len; i++ ) {
+   title = mw.Title.newFromText( data[1][i] );
+   if ( title ) {
+   result.push( title.getMainText() );
}
+   // If the received title isn't valid, just ignore it
}
return result;
 };
diff --git a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js 
b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
index cd5bda8..759a399 100644
--- a/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
+++ b/modules/ve-mw/ui/widgets/ve.ui.MWTitleInputWidget.js
@@ -92,7 +92,7 @@
  * @param {Mixed} data Response from server
  */
 ve.ui.MWTitleInputWidget.prototype.getLookupCacheItemFromData = function ( 
data ) {
-   return ve.isArray( data )  data.length ? data[1] : [];
+   return data[1] || [];
 };
 
 /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie44faa15629ebba834cb08ba6247ff3beaabd0ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk kren...@gmail.com

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


[MediaWiki-commits] [Gerrit] Update to 1.0.20140209 - changelog on MediaWiki.org - change (mediawiki...TweetANew)

2014-02-09 Thread Varnent (Code Review)
Varnent has uploaded a new change for review.

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

Change subject: Update to 1.0.20140209 - changelog on MediaWiki.org
..

Update to 1.0.20140209 - changelog on MediaWiki.org

Change-Id: I0372c272d9bdada1978f9d92be763253ee93200c
---
M TweetANew.body.php
M TweetANew.php
A lib/GoogleURL.php
3 files changed, 208 insertions(+), 40 deletions(-)


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

diff --git a/TweetANew.body.php b/TweetANew.body.php
old mode 100644
new mode 100755
index fddf55e..f522875
--- a/TweetANew.body.php
+++ b/TweetANew.body.php
@@ -1,4 +1,4 @@
-?php
+ ?php
 if ( !defined( 'MEDIAWIKI' ) ) {
die();
 }
@@ -73,6 +73,7 @@

# Call to function for assembling and trimming tweet 
(if necessary) - then connecting and sending tweet to Twitter
self::makeSendTweet(
+   $article,
$tweet_text,
$finalurl
);
@@ -159,7 +160,7 @@
$tweet_text = wfMsg( 'tweetanew-minoredit' );
# Add a space after the indicator if 
$wgTweetANewText['MinorSpace'] is true
if ( $minoredit !== 0  
$wgTweetANewText['MinorSpace'] ) {
-   $tweet_text .= 'nbsp;';
+   $tweet_text .= ' ';
}
}
 
@@ -191,6 +192,7 @@
 
# Call to function for preparing and sending tweet
self::makeSendTweet(
+   $article,
$tweet_text,
$finalurl
);
@@ -205,17 +207,28 @@
 * @return string
 */
public static function makeFinalUrl( $longurl ) {
-   global $wgTweetANewBitly, $wgOut;
+   global $wgTweetANewBitly, $wgOut, $wgTweetANewGoogl;

# Check setting to enable/disable use of bitly
if ( $wgTweetANewBitly['Enable'] ) {
+
# Generate url for bitly
$shortened = 
https://api-ssl.bitly.com/v3/shorten?longUrl=;
. urlencode( $longurl ) . login= . 
$wgTweetANewBitly['Login']
. apiKey= . $wgTweetANewBitly['API'] . 
format=txt;
 
-   # Get the url
+   # Get the url from bitly
$response = Http::get($shortened);
+   }
+   
+   # Check setting to enable/disable use of goo.gl
+   elseif ( $wgTweetANewGoogl['Enable'] ) {
+
+   # Setup goo.gl
+   $url = new GoogleURL($wgTweetANewGoogl['API']);
+
+   # Generate url from goo.gl
+   $response = $url-shorten($longurl);
} else {
$response = $longurl;
}
@@ -225,38 +238,43 @@
/**
 * Function for connecting to Twitter, preparing and then sending tweet
 *
+* @param $article Article
 * @param $tweet_text
 * @param $finalurl
 * @return bool
 */
-   public static function makeSendTweet( $tweet_text, $finalurl ) {
-   global $wgTweetANewTwitter, $wgLang;
-   
-   # Calculate length of tweet factoring in longURL
-   if ( strlen( $finalurl )  20 ) {
-   $tweet_text_count = ( strlen( $finalurl ) - 20 ) + 140;
-   } else {
-   $tweet_text_count = 140;
+   public static function makeSendTweet( $article, $tweet_text, $finalurl 
) {
+   global $wgTweetANewTwitter, $wgTweetANewBlacklist, $wgLang;
+
+   if ( !in_array($article-getTitle()-getText(), 
$wgTweetANewBlacklist) ) {
+   # Calculate length of tweet factoring in t.co 
+  if ( stripos( $finalurl, 'https:' ) !== false ) {
+   $tweet_text_count = 140 - 23 + mb_strlen( $finalurl );
+   } elseif ( stripos( $finalurl, 'http:' ) !== false ) {
+   $tweet_text_count = 140 - 22 + mb_strlen( $finalurl );
+   } else {
+   $tweet_text_count = 140;
+   }
+
+   # Check if length of tweet is beyond 140 characters and 
shorten if necessary
+   if ( mb_strlen( $tweet_text )  $tweet_text_count ) {
+   $tweet_text = $wgLang-mb_substr( $tweet_text, 
0, $tweet_text_count - 3 )  . '...';
+   }
+
+   # Make 

[MediaWiki-commits] [Gerrit] Update to 1.0.20140209 - changelog on MediaWiki.org - change (mediawiki...TweetANew)

2014-02-09 Thread Varnent (Code Review)
Varnent has submitted this change and it was merged.

Change subject: Update to 1.0.20140209 - changelog on MediaWiki.org
..


Update to 1.0.20140209 - changelog on MediaWiki.org

Change-Id: I0372c272d9bdada1978f9d92be763253ee93200c
---
M TweetANew.body.php
M TweetANew.php
A lib/GoogleURL.php
3 files changed, 208 insertions(+), 40 deletions(-)

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



diff --git a/TweetANew.body.php b/TweetANew.body.php
old mode 100644
new mode 100755
index fddf55e..f522875
--- a/TweetANew.body.php
+++ b/TweetANew.body.php
@@ -1,4 +1,4 @@
-?php
+ ?php
 if ( !defined( 'MEDIAWIKI' ) ) {
die();
 }
@@ -73,6 +73,7 @@

# Call to function for assembling and trimming tweet 
(if necessary) - then connecting and sending tweet to Twitter
self::makeSendTweet(
+   $article,
$tweet_text,
$finalurl
);
@@ -159,7 +160,7 @@
$tweet_text = wfMsg( 'tweetanew-minoredit' );
# Add a space after the indicator if 
$wgTweetANewText['MinorSpace'] is true
if ( $minoredit !== 0  
$wgTweetANewText['MinorSpace'] ) {
-   $tweet_text .= 'nbsp;';
+   $tweet_text .= ' ';
}
}
 
@@ -191,6 +192,7 @@
 
# Call to function for preparing and sending tweet
self::makeSendTweet(
+   $article,
$tweet_text,
$finalurl
);
@@ -205,17 +207,28 @@
 * @return string
 */
public static function makeFinalUrl( $longurl ) {
-   global $wgTweetANewBitly, $wgOut;
+   global $wgTweetANewBitly, $wgOut, $wgTweetANewGoogl;

# Check setting to enable/disable use of bitly
if ( $wgTweetANewBitly['Enable'] ) {
+
# Generate url for bitly
$shortened = 
https://api-ssl.bitly.com/v3/shorten?longUrl=;
. urlencode( $longurl ) . login= . 
$wgTweetANewBitly['Login']
. apiKey= . $wgTweetANewBitly['API'] . 
format=txt;
 
-   # Get the url
+   # Get the url from bitly
$response = Http::get($shortened);
+   }
+   
+   # Check setting to enable/disable use of goo.gl
+   elseif ( $wgTweetANewGoogl['Enable'] ) {
+
+   # Setup goo.gl
+   $url = new GoogleURL($wgTweetANewGoogl['API']);
+
+   # Generate url from goo.gl
+   $response = $url-shorten($longurl);
} else {
$response = $longurl;
}
@@ -225,38 +238,43 @@
/**
 * Function for connecting to Twitter, preparing and then sending tweet
 *
+* @param $article Article
 * @param $tweet_text
 * @param $finalurl
 * @return bool
 */
-   public static function makeSendTweet( $tweet_text, $finalurl ) {
-   global $wgTweetANewTwitter, $wgLang;
-   
-   # Calculate length of tweet factoring in longURL
-   if ( strlen( $finalurl )  20 ) {
-   $tweet_text_count = ( strlen( $finalurl ) - 20 ) + 140;
-   } else {
-   $tweet_text_count = 140;
+   public static function makeSendTweet( $article, $tweet_text, $finalurl 
) {
+   global $wgTweetANewTwitter, $wgTweetANewBlacklist, $wgLang;
+
+   if ( !in_array($article-getTitle()-getText(), 
$wgTweetANewBlacklist) ) {
+   # Calculate length of tweet factoring in t.co 
+  if ( stripos( $finalurl, 'https:' ) !== false ) {
+   $tweet_text_count = 140 - 23 + mb_strlen( $finalurl );
+   } elseif ( stripos( $finalurl, 'http:' ) !== false ) {
+   $tweet_text_count = 140 - 22 + mb_strlen( $finalurl );
+   } else {
+   $tweet_text_count = 140;
+   }
+
+   # Check if length of tweet is beyond 140 characters and 
shorten if necessary
+   if ( mb_strlen( $tweet_text )  $tweet_text_count ) {
+   $tweet_text = $wgLang-mb_substr( $tweet_text, 
0, $tweet_text_count - 3 )  . '...';
+   }
+
+   # Make connection to Twitter
+   $tmhOAuth = new tmhOAuth( 

[MediaWiki-commits] [Gerrit] Add namespace aliases for ang.wikipedia and wiktionary - change (operations/mediawiki-config)

2014-02-09 Thread Ebe123 (Code Review)
Ebe123 has uploaded a new change for review.

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

Change subject: Add namespace aliases for ang.wikipedia and wiktionary
..

Add namespace aliases for ang.wikipedia and wiktionary

This chnage adds many aliases to Project: and Project talk: namespaces
for ang.wikipedia and ang.wikibooks.

Bug: 58711
Change-Id: I225ca79c35125b3e1e315482def7c48dd03465c1
---
M wmf-config/InitialiseSettings.php
1 file changed, 17 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 6bfe1d8..47c5bc8 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -2284,15 +2284,30 @@
'+amwiki' = array(
100 = 'በር',
),
-   '+angwiki' = array( // bug 56634
+   '+angwiki' = array( // bug 56634, 58711
'Wikipedia' = NS_PROJECT,
'Wikipaedia' = NS_PROJECT,
'Wikipædiamotung' = NS_PROJECT_TALK,
'Wikipaediamotung' = NS_PROJECT_TALK,
+   'Wicipǣdiamōtung' = NS_PROJECT_TALK,
+   'Wicipædia' = NS_PROJECT,
+   'Wicipaedia' = NS_PROJECT,
+   'Ƿikipǣdiamōtung' = NS_PROJECT_TALK,
+   'Ƿikipædia' = NS_PROJECT,
+   'Ƿikipaedia' = NS_PROJECT,
+   'Ƿicipǣdiamōtung' = NS_PROJECT_TALK,
+   'Ƿicipædia' = NS_PROJECT,
+   'Ƿicipaedia' = NS_PROJECT,
),
-   '+angwiktionary' = array( // bug 56634
+   '+angwiktionary' = array( // bug 56634, 58711
'Wikiwordboc' = NS_PROJECT,
'Wikiwordbocmotung' = NS_PROJECT_TALK,
+   'Wiciwordbōcmōtung' = NS_PROJECT_TALK,
+   'Wiciwordboc' = NS_PROJECT,
+   'Ƿikiƿordbōcmōtung' = NS_PROJECT_TALK,
+   'Ƿikiƿordbocmotung' = NS_PROJECT_TALK,
+   'Ƿiciƿordbōcmōtung' = NS_PROJECT_TALK,
+   'Ƿiciƿordbocmotung' = NS_PROJECT_TALK,
'Æteaca' = 100,
'Æteacmotung' = 101,
'Aeteaca' = 100,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I225ca79c35125b3e1e315482def7c48dd03465c1
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ebe123 beauleetien...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add newlines around scribunto-doc-page-show wikitext - change (mediawiki...Scribunto)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Add newlines around scribunto-doc-page-show wikitext
..


Add newlines around scribunto-doc-page-show wikitext

Change I15c10379 wrapped the scribunto-doc-page-show message in a div,
which is breaking things when the content of that message starts with
start-of-line-sensitive wikitext. So add a newline inside the div.

Bug: 60664
Change-Id: If596bed72f779f5980348ac111b63e7876d21ff4
---
M common/ScribuntoContent.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/common/ScribuntoContent.php b/common/ScribuntoContent.php
index d587e50..fedaa5c 100644
--- a/common/ScribuntoContent.php
+++ b/common/ScribuntoContent.php
@@ -47,7 +47,7 @@
// can't use $msg-parse().
$docViewLang = $doc-getPageViewLanguage();
$docWikitext = 'div lang=' . 
htmlspecialchars( $docViewLang-getHtmlCode() ) . ''
-   . ' dir=' . $docViewLang-getDir() . 
'' . $msg-plain() . '/div';
+   . ' dir=' . $docViewLang-getDir() . 
\\n . $msg-plain() . \n/div;
if ( !$options ) {
// NOTE: use canonical options per 
default to produce cacheable output
$options = ContentHandler::getForTitle( 
$doc )-makeParserOptions( 'canonical' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If596bed72f779f5980348ac111b63e7876d21ff4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Liangent liang...@gmail.com
Gerrit-Reviewer: MZMcBride w...@mzmcbride.com
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix PHP implementation of mw.ustring %W - change (mediawiki...Scribunto)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix PHP implementation of mw.ustring %W
..


Fix PHP implementation of mw.ustring %W

Incorrect regex is making it match basically everything.

Bug: 60908
Change-Id: Ic1c5a740c6b825bb7dfacf684d0c7fa905b135ee
---
M engines/LuaCommon/UstringLibrary.php
M tests/engines/LuaCommon/UstringLibraryTests.lua
2 files changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/engines/LuaCommon/UstringLibrary.php 
b/engines/LuaCommon/UstringLibrary.php
index 57f8e6c..ce3364d 100644
--- a/engines/LuaCommon/UstringLibrary.php
+++ b/engines/LuaCommon/UstringLibrary.php
@@ -265,7 +265,7 @@
'P' = '\P{P}',
'S' = '\P{Xps}',
'U' = '\P{Lu}',
-   'W' = '[\P{L}\P{Nd}]',
+   'W' = '[^\p{L}\p{Nd}]',
'X' = '[^0-9A-Fa-f0-9A-Fa-f]',
'Z' = '[^\0]',
);
diff --git a/tests/engines/LuaCommon/UstringLibraryTests.lua 
b/tests/engines/LuaCommon/UstringLibraryTests.lua
index 86d5f33..c15466c 100644
--- a/tests/engines/LuaCommon/UstringLibraryTests.lua
+++ b/tests/engines/LuaCommon/UstringLibraryTests.lua
@@ -328,6 +328,10 @@
  args = { fóó? bar, '%A+' },
  expect = { 4, 5 }
},
+   { name = 'find: (%W)', func = mw.ustring.find,
+ args = { fóó? bar, '%W+' },
+ expect = { 4, 5 }
+   },
{ name = 'find: ([^])', func = mw.ustring.find,
  args = { fóó? bar, '[^a-zó]+' },
  expect = { 4, 5 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic1c5a740c6b825bb7dfacf684d0c7fa905b135ee
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Aaron Schulz asch...@wikimedia.org
Gerrit-Reviewer: Tim Starling tstarl...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Enable VisualEditor on Wikimedia Incubator - change (operations/mediawiki-config)

2014-02-09 Thread SPQRobin (Code Review)
SPQRobin has uploaded a new change for review.

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

Change subject: Enable VisualEditor on Wikimedia Incubator
..

Enable VisualEditor on Wikimedia Incubator

Change-Id: I2d30b092b49ef21a808bf9eb7e86e97e7ee59544
---
M visualeditor.dblist
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/visualeditor.dblist b/visualeditor.dblist
index 9d8f120..b4520ba 100644
--- a/visualeditor.dblist
+++ b/visualeditor.dblist
@@ -294,5 +294,6 @@
 sewikimedia
 boardwiki
 collabwiki
+incubatorwiki
 officewiki
 wikimaniateamwiki

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d30b092b49ef21a808bf9eb7e86e97e7ee59544
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: SPQRobin robinp.1...@gmail.com

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


[MediaWiki-commits] [Gerrit] depool db1002 for schema changes - change (operations/mediawiki-config)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: depool db1002 for schema changes
..

depool db1002 for schema changes

Change-Id: Iefc9c9235aa1d8e4c9781d973c4c8a9f94e0be07
---
M wmf-config/db-eqiad.php
1 file changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 8319601..c035e2d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,8 +98,8 @@
's2' = array(
'db1036'= 0,
'db1018'= 0, # snapshot, vslow, dump
-   'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
-   'db1009'= 50,
+   #'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
+   'db1009'= 300,
'db1024'= 300,
'db1060'= 400,
),
@@ -161,18 +161,18 @@
'dump' = array(
'db1018' = 1,
),
-   'watchlist' = array(
-   'db1002' = 1,
-   ),
-   'recentchangeslinked' = array(
-   'db1002' = 1,
-   ),
-   'contributions' = array(
-   'db1002' = 1,
-   ),
-   'logpager' = array(
-   'db1002' = 1,
-   ),
+#  'watchlist' = array(
+#  'db1002' = 1,
+#  ),
+#  'recentchangeslinked' = array(
+#  'db1002' = 1,
+#  ),
+#  'contributions' = array(
+#  'db1002' = 1,
+#  ),
+#  'logpager' = array(
+#  'db1002' = 1,
+#  ),
),
/* s3 */ 'DEFAULT' = array(
'vslow' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iefc9c9235aa1d8e4c9781d973c4c8a9f94e0be07
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] depool db1002 for schema changes - change (operations/mediawiki-config)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: depool db1002 for schema changes
..


depool db1002 for schema changes

Change-Id: Iefc9c9235aa1d8e4c9781d973c4c8a9f94e0be07
---
M wmf-config/db-eqiad.php
1 file changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 8319601..c035e2d 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,8 +98,8 @@
's2' = array(
'db1036'= 0,
'db1018'= 0, # snapshot, vslow, dump
-   'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
-   'db1009'= 50,
+   #'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
+   'db1009'= 300,
'db1024'= 300,
'db1060'= 400,
),
@@ -161,18 +161,18 @@
'dump' = array(
'db1018' = 1,
),
-   'watchlist' = array(
-   'db1002' = 1,
-   ),
-   'recentchangeslinked' = array(
-   'db1002' = 1,
-   ),
-   'contributions' = array(
-   'db1002' = 1,
-   ),
-   'logpager' = array(
-   'db1002' = 1,
-   ),
+#  'watchlist' = array(
+#  'db1002' = 1,
+#  ),
+#  'recentchangeslinked' = array(
+#  'db1002' = 1,
+#  ),
+#  'contributions' = array(
+#  'db1002' = 1,
+#  ),
+#  'logpager' = array(
+#  'db1002' = 1,
+#  ),
),
/* s3 */ 'DEFAULT' = array(
'vslow' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iefc9c9235aa1d8e4c9781d973c4c8a9f94e0be07
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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] repool db1002, depool db1060 schema changes - change (operations/mediawiki-config)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: repool db1002, depool db1060 schema changes
..

repool db1002, depool db1060 schema changes

Change-Id: Id631131f15f9ca9b5a6cb12c38f79b30e61ee6ca
---
M wmf-config/db-eqiad.php
1 file changed, 14 insertions(+), 14 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c035e2d..0808629 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,10 +98,10 @@
's2' = array(
'db1036'= 0,
'db1018'= 0, # snapshot, vslow, dump
-   #'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
+   'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1024'= 300,
-   'db1060'= 400,
+   # schema changes 'db1060'= 400,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
@@ -161,18 +161,18 @@
'dump' = array(
'db1018' = 1,
),
-#  'watchlist' = array(
-#  'db1002' = 1,
-#  ),
-#  'recentchangeslinked' = array(
-#  'db1002' = 1,
-#  ),
-#  'contributions' = array(
-#  'db1002' = 1,
-#  ),
-#  'logpager' = array(
-#  'db1002' = 1,
-#  ),
+   'watchlist' = array(
+   'db1002' = 1,
+   ),
+   'recentchangeslinked' = array(
+   'db1002' = 1,
+   ),
+   'contributions' = array(
+   'db1002' = 1,
+   ),
+   'logpager' = array(
+   'db1002' = 1,
+   ),
),
/* s3 */ 'DEFAULT' = array(
'vslow' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id631131f15f9ca9b5a6cb12c38f79b30e61ee6ca
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] repool db1002, depool db1060 schema changes - change (operations/mediawiki-config)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: repool db1002, depool db1060 schema changes
..


repool db1002, depool db1060 schema changes

Change-Id: Id631131f15f9ca9b5a6cb12c38f79b30e61ee6ca
---
M wmf-config/db-eqiad.php
1 file changed, 14 insertions(+), 14 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c035e2d..0808629 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -98,10 +98,10 @@
's2' = array(
'db1036'= 0,
'db1018'= 0, # snapshot, vslow, dump
-   #'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
+   'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1024'= 300,
-   'db1060'= 400,
+   # schema changes 'db1060'= 400,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
@@ -161,18 +161,18 @@
'dump' = array(
'db1018' = 1,
),
-#  'watchlist' = array(
-#  'db1002' = 1,
-#  ),
-#  'recentchangeslinked' = array(
-#  'db1002' = 1,
-#  ),
-#  'contributions' = array(
-#  'db1002' = 1,
-#  ),
-#  'logpager' = array(
-#  'db1002' = 1,
-#  ),
+   'watchlist' = array(
+   'db1002' = 1,
+   ),
+   'recentchangeslinked' = array(
+   'db1002' = 1,
+   ),
+   'contributions' = array(
+   'db1002' = 1,
+   ),
+   'logpager' = array(
+   'db1002' = 1,
+   ),
),
/* s3 */ 'DEFAULT' = array(
'vslow' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id631131f15f9ca9b5a6cb12c38f79b30e61ee6ca
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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] repool db1060 warm up - change (operations/mediawiki-config)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: repool db1060 warm up
..

repool db1060 warm up

Change-Id: I2ec4b28817d9a698e3b81975c20741c7a5a1e44a
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 0808629..1fb9293 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -101,7 +101,7 @@
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1024'= 300,
-   # schema changes 'db1060'= 400,
+   'db1060'= 50,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2ec4b28817d9a698e3b81975c20741c7a5a1e44a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] repool db1060 warm up - change (operations/mediawiki-config)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: repool db1060 warm up
..


repool db1060 warm up

Change-Id: I2ec4b28817d9a698e3b81975c20741c7a5a1e44a
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 0808629..1fb9293 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -101,7 +101,7 @@
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1024'= 300,
-   # schema changes 'db1060'= 400,
+   'db1060'= 50,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2ec4b28817d9a698e3b81975c20741c7a5a1e44a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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] prepare for s2 master rotation db1036 to db1024 - change (operations/mediawiki-config)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: prepare for s2 master rotation db1036 to db1024
..

prepare for s2 master rotation db1036 to db1024

Change-Id: Ie9af63b1ce192eaccd718ac4ff91381d83d0f967
---
M wmf-config/db-eqiad.php
M wmf-config/db-pmtpa.php
2 files changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 1fb9293..c711274 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -93,15 +93,15 @@
'db1037'= 300, # 1.4TB sas 64GB
'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
-   # old master 'db1056'= 0, # 2.8TB sas 96GB
),
's2' = array(
-   'db1036'= 0,
+   'db1056'= 0, # haproxy rotation db1036 db1024
+   #'db1036'= 0, # old master
+   'db1024'= 0, # new master
'db1018'= 0, # snapshot, vslow, dump
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
-   'db1024'= 300,
-   'db1060'= 50,
+   'db1060'= 400,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
diff --git a/wmf-config/db-pmtpa.php b/wmf-config/db-pmtpa.php
index 42337df..088119c 100644
--- a/wmf-config/db-pmtpa.php
+++ b/wmf-config/db-pmtpa.php
@@ -88,7 +88,7 @@
'db63'= 100, # pmtpa master
),
's2' = array(
-   'db1036'  = 0,
+   'db1056'  = 0, # haproxy rotation db1036 db1024
'db69'= 100, # pmtpa master
),
/* s3 */ 'DEFAULT' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie9af63b1ce192eaccd718ac4ff91381d83d0f967
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] prepare for s2 master rotation db1036 to db1024 - change (operations/mediawiki-config)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: prepare for s2 master rotation db1036 to db1024
..


prepare for s2 master rotation db1036 to db1024

Change-Id: Ie9af63b1ce192eaccd718ac4ff91381d83d0f967
---
M wmf-config/db-eqiad.php
M wmf-config/db-pmtpa.php
2 files changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 1fb9293..c711274 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -93,15 +93,15 @@
'db1037'= 300, # 1.4TB sas 64GB
'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
-   # old master 'db1056'= 0, # 2.8TB sas 96GB
),
's2' = array(
-   'db1036'= 0,
+   'db1056'= 0, # haproxy rotation db1036 db1024
+   #'db1036'= 0, # old master
+   'db1024'= 0, # new master
'db1018'= 0, # snapshot, vslow, dump
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
-   'db1024'= 300,
-   'db1060'= 50,
+   'db1060'= 400,
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
diff --git a/wmf-config/db-pmtpa.php b/wmf-config/db-pmtpa.php
index 42337df..088119c 100644
--- a/wmf-config/db-pmtpa.php
+++ b/wmf-config/db-pmtpa.php
@@ -88,7 +88,7 @@
'db63'= 100, # pmtpa master
),
's2' = array(
-   'db1036'  = 0,
+   'db1056'  = 0, # haproxy rotation db1036 db1024
'db69'= 100, # pmtpa master
),
/* s3 */ 'DEFAULT' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9af63b1ce192eaccd718ac4ff91381d83d0f967
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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] s2 switch master to db1024 - change (operations/mediawiki-config)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: s2 switch master to db1024
..

s2 switch master to db1024

Change-Id: I5e56db5caecfcaca60b59f4bdce0210b0c1c1b9b
---
M wmf-config/db-eqiad.php
M wmf-config/db-pmtpa.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c711274..ba90ed7 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -93,15 +93,15 @@
'db1037'= 300, # 1.4TB sas 64GB
'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
+   #'db1056'= 0, # old master
),
's2' = array(
-   'db1056'= 0, # haproxy rotation db1036 db1024
-   #'db1036'= 0, # old master
-   'db1024'= 0, # new master
+   'db1024'= 0,
'db1018'= 0, # snapshot, vslow, dump
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1060'= 400,
+   #'db1036'= 0, # old master
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
diff --git a/wmf-config/db-pmtpa.php b/wmf-config/db-pmtpa.php
index 088119c..d8f9308 100644
--- a/wmf-config/db-pmtpa.php
+++ b/wmf-config/db-pmtpa.php
@@ -88,7 +88,7 @@
'db63'= 100, # pmtpa master
),
's2' = array(
-   'db1056'  = 0, # haproxy rotation db1036 db1024
+   'db1024'  = 0,
'db69'= 100, # pmtpa master
),
/* s3 */ 'DEFAULT' = array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5e56db5caecfcaca60b59f4bdce0210b0c1c1b9b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] s2 switch master to db1024 - change (operations/mediawiki-config)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: s2 switch master to db1024
..


s2 switch master to db1024

Change-Id: I5e56db5caecfcaca60b59f4bdce0210b0c1c1b9b
---
M wmf-config/db-eqiad.php
M wmf-config/db-pmtpa.php
2 files changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index c711274..ba90ed7 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -93,15 +93,15 @@
'db1037'= 300, # 1.4TB sas 64GB
'db1049'= 300, # 2.8TB sas 64GB
'db1051'= 400, # 2.8TB sas 96GB
+   #'db1056'= 0, # old master
),
's2' = array(
-   'db1056'= 0, # haproxy rotation db1036 db1024
-   #'db1036'= 0, # old master
-   'db1024'= 0, # new master
+   'db1024'= 0,
'db1018'= 0, # snapshot, vslow, dump
'db1002'= 0, # watchlist, recentchangeslinked, 
contributions, logpager
'db1009'= 300,
'db1060'= 400,
+   #'db1036'= 0, # old master
),
/* s3 */ 'DEFAULT' = array(
'db1038'= 0,
diff --git a/wmf-config/db-pmtpa.php b/wmf-config/db-pmtpa.php
index 088119c..d8f9308 100644
--- a/wmf-config/db-pmtpa.php
+++ b/wmf-config/db-pmtpa.php
@@ -88,7 +88,7 @@
'db63'= 100, # pmtpa master
),
's2' = array(
-   'db1056'  = 0, # haproxy rotation db1036 db1024
+   'db1024'  = 0,
'db69'= 100, # pmtpa master
),
/* s3 */ 'DEFAULT' = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e56db5caecfcaca60b59f4bdce0210b0c1c1b9b
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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 dns for s2 master switch to db1024 - change (operations/dns)

2014-02-09 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: update dns for s2 master switch to db1024
..


update dns for s2 master switch to db1024

Change-Id: Ie41f1c8062a1baaf337207b0a830ab46ac9efc6f
---
M templates/wmnet
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/templates/wmnet b/templates/wmnet
index d223b88..b99d709 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -687,7 +687,7 @@
 carbon-relay   1H  IN CNAMEtungsten.eqiad.wmnet.
 statsd 1H  IN CNAMEtungsten.eqiad.wmnet.
 s1-master  5M  IN CNAMEdb1052.eqiad.wmnet.
-s2-master  5M  IN CNAMEdb1036.eqiad.wmnet.
+s2-master  5M  IN CNAMEdb1024.eqiad.wmnet.
 s3-master  5M  IN CNAMEdb1038.eqiad.wmnet.
 s4-master  5M  IN CNAMEdb1040.eqiad.wmnet.
 s5-master  5M  IN CNAMEdb1058.eqiad.wmnet.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie41f1c8062a1baaf337207b0a830ab46ac9efc6f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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 dns for s2 master switch to db1024 - change (operations/dns)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: update dns for s2 master switch to db1024
..

update dns for s2 master switch to db1024

Change-Id: Ie41f1c8062a1baaf337207b0a830ab46ac9efc6f
---
M templates/wmnet
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/17/112417/1

diff --git a/templates/wmnet b/templates/wmnet
index d223b88..b99d709 100644
--- a/templates/wmnet
+++ b/templates/wmnet
@@ -687,7 +687,7 @@
 carbon-relay   1H  IN CNAMEtungsten.eqiad.wmnet.
 statsd 1H  IN CNAMEtungsten.eqiad.wmnet.
 s1-master  5M  IN CNAMEdb1052.eqiad.wmnet.
-s2-master  5M  IN CNAMEdb1036.eqiad.wmnet.
+s2-master  5M  IN CNAMEdb1024.eqiad.wmnet.
 s3-master  5M  IN CNAMEdb1038.eqiad.wmnet.
 s4-master  5M  IN CNAMEdb1040.eqiad.wmnet.
 s5-master  5M  IN CNAMEdb1058.eqiad.wmnet.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie41f1c8062a1baaf337207b0a830ab46ac9efc6f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] update coredb topology for s2 master switch - change (operations/puppet)

2014-02-09 Thread Springle (Code Review)
Springle has uploaded a new change for review.

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

Change subject: update coredb topology for s2 master switch
..

update coredb topology for s2 master switch

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


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

diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp
index 43fa153..05a51b7 100644
--- a/manifests/role/coredb.pp
+++ b/manifests/role/coredb.pp
@@ -20,7 +20,7 @@
'hosts' = { 'pmtpa' = [ 'db69' ],
'eqiad' = [ 'db1002', 'db1009', 'db1018', 
'db1034', 'db1036', 'db1060' ] },
'primary_site' = $::mw_primary,
-   'masters' = { 'pmtpa' = 'db69', 'eqiad' = 'db1036' },
+   'masters' = { 'pmtpa' = 'db69', 'eqiad' = 'db1024' },
'snapshot' = [ 'db1018' ],
'no_master' = [ 'db1002', 'db1018' ]
},

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie4209d3894b02a5db55b9d32d50837134caddbf7
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] update coredb topology for s2 master switch - change (operations/puppet)

2014-02-09 Thread Springle (Code Review)
Springle has submitted this change and it was merged.

Change subject: update coredb topology for s2 master switch
..


update coredb topology for s2 master switch

Change-Id: Ie4209d3894b02a5db55b9d32d50837134caddbf7
---
M manifests/role/coredb.pp
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/coredb.pp b/manifests/role/coredb.pp
index 43fa153..3a0eeb9 100644
--- a/manifests/role/coredb.pp
+++ b/manifests/role/coredb.pp
@@ -18,9 +18,9 @@
},
's2' = {
'hosts' = { 'pmtpa' = [ 'db69' ],
-   'eqiad' = [ 'db1002', 'db1009', 'db1018', 
'db1034', 'db1036', 'db1060' ] },
+   'eqiad' = [ 'db1002', 'db1009', 'db1018', 
'db1024', 'db1034', 'db1036', 'db1060' ] },
'primary_site' = $::mw_primary,
-   'masters' = { 'pmtpa' = 'db69', 'eqiad' = 'db1036' },
+   'masters' = { 'pmtpa' = 'db69', 'eqiad' = 'db1024' },
'snapshot' = [ 'db1018' ],
'no_master' = [ 'db1002', 'db1018' ]
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie4209d3894b02a5db55b9d32d50837134caddbf7
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle sprin...@wikimedia.org
Gerrit-Reviewer: Springle sprin...@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] v1.2.2.1 - change (xowa)

2014-02-09 Thread Gnosygnu (Code Review)
Gnosygnu has uploaded a new change for review.

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

Change subject: v1.2.2.1
..

v1.2.2.1

Change-Id: Ifc25345f512181ca6b941ccf5b339babf6d2e95c
---
M 100_core/src_110_primitive/gplx/ByteAry_.java
M 100_core/src_110_primitive/gplx/ByteAry_tst.java
M 100_core/src_110_primitive/gplx/Byte_ascii.java
M 100_core/src_110_primitive/gplx/Int_.java
M 100_core/src_110_primitive/gplx/Int_ary_.java
M 100_core/src_110_primitive/gplx/String_.java
M 100_core/src_120_basicDataType/gplx/Yn.java
M 100_core/src_140_list/gplx/Hash_adp_bry.java
M 100_core/src_300_classXtn/gplx/StringClassXtn.java
M 100_core/src_311_gfoObj/gplx/GfoMsg_.java
M 110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java
M 110_gfml/src_100_tkn/gplx/gfml/GfmlTrie.java
M 140_dbs/xtn/gplx/dbs/SqliteDbMain.java
M 400_xowa/src/gplx/php/Php_srl_parser.java
M 400_xowa/src/gplx/php/Php_text_itm_parser.java
M 400_xowa/src/gplx/php/Php_tkn.java
M 400_xowa/src/gplx/xowa/Xoa_app.java
M 400_xowa/src/gplx/xowa/Xoa_app_.java
M 400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_fsdb_make.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_regy_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_temp_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_temp_wkr.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_orig_regy_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_orig_regy_tbl.java
A 400_xowa/src/gplx/xowa/bldrs/files/Xob_page_regy_cmd.java
R 400_xowa/src/gplx/xowa/bldrs/files/Xob_page_regy_tbl.java
D 400_xowa/src/gplx/xowa/bldrs/files/Xob_repo_page_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_regy_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_cmd_thumb.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_itm.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_itm_tst.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/imports/Xob_search_base.java
M 400_xowa/src/gplx/xowa/bldrs/imports/ctgs/Xob_categorylinks_base.java
M 400_xowa/src/gplx/xowa/bldrs/imports/ctgs/Xoctg_hiddencat_parser_base.java
M 400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java
M 400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java
M 400_xowa/src/gplx/xowa/bldrs/oimgs/Xob_xfer_update_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/oimgs/Xodb_db_file.java
M 400_xowa/src/gplx/xowa/bldrs/wikis/images/Xob_wiki_image_sql.java
M 400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java
M 400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java
M 400_xowa/src/gplx/xowa/ctgs/Xoa_ctg_mgr.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_url.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_url_tst.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_view_ctg.java
M 400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java
M 400_xowa/src/gplx/xowa/dbs/tbls/Xodb_wdata_pids_tbl.java
M 400_xowa/src/gplx/xowa/dbs/tbls/Xodb_wdata_qids_tbl.java
M 400_xowa/src/gplx/xowa/files/Xof_lnki_file_mgr.java
D 400_xowa/src/gplx/xowa/files/qrys/dirs/Xof_qry_dir.java
M 400_xowa/src/gplx/xowa/files/qrys/dirs/Xof_qry_wkr_dir.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_dir.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil_mgr.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil_tbl.java
M 400_xowa/src/gplx/xowa/gui/menus/contexts/Xog_mnu_grp.java
M 400_xowa/src/gplx/xowa/gui/wins/Xog_url_wkr_tst.java
M 400_xowa/src/gplx/xowa/gui/wins/url_macros/Xog_url_macro_mgr.java
M 400_xowa/src/gplx/xowa/gui/wins/url_macros/Xog_url_macro_mgr_tst.java
M 400_xowa/src/gplx/xowa/html/Xoh_imgs_mgr.java
M 400_xowa/src/gplx/xowa/html/Xoh_page_mgr.java
M 400_xowa/src/gplx/xowa/html/Xow_html_mgr.java
M 400_xowa/src/gplx/xowa/html/tocs/Xop_toc_mgr.java
M 400_xowa/src/gplx/xowa/html/tocs/Xop_toc_mgr_tst.java
M 400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java
M 400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner_tst.java
M 400_xowa/src/gplx/xowa/langs/cnvs/Xol_cnv_mgr_tst.java
M 400_xowa/src/gplx/xowa/langs/grammars/Xol_grammar_.java
M 400_xowa/src/gplx/xowa/langs/vnts/Xop_vnt_lxr_tst.java
M 400_xowa/src/gplx/xowa/langs/vnts/Xop_vnt_parser_tst.java
M 400_xowa/src/gplx/xowa/servers/Xosrv_msg_rdr.java
M 400_xowa/src/gplx/xowa/setup/maints/Wmf_dump_list_parser.java
M 400_xowa/src/gplx/xowa/setup/maints/Wmf_dump_list_parser_tst.java
M 400_xowa/src/gplx/xowa/setup/maints/Xow_maint_mgr.java
M 400_xowa/src/gplx/xowa/specials/nearby/Nearby_mgr_tst.java
M 400_xowa/src/gplx/xowa/specials/randoms/Xop_randomRootPage_page_tst.java
M 400_xowa/src/gplx/xowa/specials/search/Xog_search_suggest_mgr.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_core.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_ns_mgr.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_scanner.java
M 400_xowa/src/gplx/xowa/users/Xou_log_mgr.java
M 

[MediaWiki-commits] [Gerrit] Use the new limit report hooks - change (mediawiki...Scribunto)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Use the new limit report hooks
..


Use the new limit report hooks

Change Ie065c7b5 added an option to show profiling data at the bottom of
preview pages, and with it new hooks to gather and format this data in a
more structured way than is possible with ParserLimitReport. This change
adds support for the new hooks.

Depends-On: I7799616a602d90e1b8d3f0ece35811ca387bade7
Change-Id: Idffd2d78f9a0217c99c07cbbfc844d6daf0172f7
---
M Scribunto.i18n.php
M Scribunto.php
M common/Base.php
M common/Hooks.php
M engines/LuaSandbox/Engine.php
M engines/LuaStandalone/LuaStandaloneEngine.php
6 files changed, 270 insertions(+), 21 deletions(-)

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



diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php
index b1a1c08..e384c3b 100644
--- a/Scribunto.i18n.php
+++ b/Scribunto.i18n.php
@@ -66,6 +66,18 @@
'scribunto-luastandalone-exited' = 'Lua error: Internal error: The 
interpreter exited with status $2.',
 
'scribunto-module-with-errors-category' = 'Scribunto modules with 
errors',
+
+   'scribunto-limitreport-timeusage' = 'Lua time usage',
+   'scribunto-limitreport-timeusage-value' = '$1/$2 seconds',
+   'scribunto-limitreport-virtmemusage' = 'Lua virtual size',
+   'scribunto-limitreport-virtmemusage-value' = '$1/$2',
+   'scribunto-limitreport-estmemusage' = 'Lua estimated memory usage',
+   'scribunto-limitreport-estmemusage-value' = '$1',
+   'scribunto-limitreport-memusage' = 'Lua memory usage',
+   'scribunto-limitreport-memusage-value' = '$1/$2',
+   'scribunto-limitreport-profile' = 'Lua Profile',
+   'scribunto-limitreport-profile-ms' = '$1 ms',
+   'scribunto-limitreport-profile-percent' = '$1%',
 );
 
 /** Message documentation (Message documentation)
@@ -178,6 +190,26 @@
 
 See also:
 * {{msg-mw|scribunto-ignore-errors}}',
+   'scribunto-limitreport-timeusage' = 'Label for the Lua time usage 
row in the limit report table',
+   'scribunto-limitreport-timeusage-value' = 'Format for the Lua time 
usage value in the limit report table.
+* $1 is the usage in seconds
+* $2 is the maximum',
+   'scribunto-limitreport-virtmemusage' = 'Label for the Lua virtual 
size row in the limit report table',
+   'scribunto-limitreport-virtmemusage-value' = 'Format for the Lua 
virtual size value in the limit report table.
+* $1 is the usage
+* $2 is the maximum',
+   'scribunto-limitreport-estmemusage' = 'Label for the Lua estimated 
memory usage row in the limit report table',
+   'scribunto-limitreport-estmemusage-value' = 'Format for the Lua 
estimated memory usage value in the limit report table.
+* $1 is the value',
+   'scribunto-limitreport-memusage' = 'Label for the Lua memory usage 
row in the limit report table',
+   'scribunto-limitreport-memusage-value' = 'Format for the Lua memory 
usage value in the limit report table.
+* $1 is the usage
+* $2 is the maximum',
+   'scribunto-limitreport-profile' = 'Label for the Lua Profile row in 
the limit report table',
+   'scribunto-limitreport-profile-ms' = 'Text to format the milliseconds 
in the Lua Profile table
+* $1 is the time in milliseconds',
+   'scribunto-limitreport-profile-percent' = 'Text to format the time 
percentage in the Lua Profile table
+* $1 is the percentage',
 );
 
 /** Afrikaans (Afrikaans)
diff --git a/Scribunto.php b/Scribunto.php
index 5ead8af..9c13ede 100644
--- a/Scribunto.php
+++ b/Scribunto.php
@@ -48,7 +48,9 @@
 $wgHooks['SoftwareInfo'][] = 'ScribuntoHooks::getSoftwareInfo';
 
 $wgHooks['ParserFirstCallInit'][] = 'ScribuntoHooks::setupParserHook';
-$wgHooks['ParserLimitReport'][] = 'ScribuntoHooks::reportLimits';
+$wgHooks['ParserLimitReport']['scribunto'] = 'ScribuntoHooks::reportLimits';
+$wgHooks['ParserLimitReportPrepare'][] = 'ScribuntoHooks::reportLimitData';
+$wgHooks['ParserLimitReportFormat'][] = 'ScribuntoHooks::formatLimitData';
 $wgHooks['ParserClearState'][] = 'ScribuntoHooks::clearState';
 $wgHooks['ParserCloned'][] = 'ScribuntoHooks::parserCloned';
 
diff --git a/common/Base.php b/common/Base.php
index 78a5bf4..6041233 100644
--- a/common/Base.php
+++ b/common/Base.php
@@ -209,6 +209,39 @@
wfRunHooks( 'ScribuntoExternalLibraryPaths', array( $engine, 
$extraLibraryPaths ) );
return array_merge( $coreLibraryPaths, $extraLibraryPaths );
}
+
+   /**
+* Get text for the limit report, old style
+*
+* @deprecated
+* @return string
+*/
+   public function getLimitReport(){
+   return '';
+   }
+
+   /**
+* Add limit report data to a ParserOutput object
+*
+* @param $output ParserOutput ParserOutput object in which to add 
limit data
+* @return null
+*/
+   public function 

[MediaWiki-commits] [Gerrit] v1.2.2.1 - change (xowa)

2014-02-09 Thread Gnosygnu (Code Review)
Gnosygnu has submitted this change and it was merged.

Change subject: v1.2.2.1
..


v1.2.2.1

Change-Id: Ifc25345f512181ca6b941ccf5b339babf6d2e95c
---
M 100_core/src_110_primitive/gplx/ByteAry_.java
M 100_core/src_110_primitive/gplx/ByteAry_tst.java
M 100_core/src_110_primitive/gplx/Byte_ascii.java
M 100_core/src_110_primitive/gplx/Int_.java
M 100_core/src_110_primitive/gplx/Int_ary_.java
M 100_core/src_110_primitive/gplx/String_.java
M 100_core/src_120_basicDataType/gplx/Yn.java
M 100_core/src_140_list/gplx/Hash_adp_bry.java
M 100_core/src_300_classXtn/gplx/StringClassXtn.java
M 100_core/src_311_gfoObj/gplx/GfoMsg_.java
M 110_gfml/src_100_tkn/gplx/gfml/GfmlLxr_.java
M 110_gfml/src_100_tkn/gplx/gfml/GfmlTrie.java
M 140_dbs/xtn/gplx/dbs/SqliteDbMain.java
M 400_xowa/src/gplx/php/Php_srl_parser.java
M 400_xowa/src/gplx/php/Php_text_itm_parser.java
M 400_xowa/src/gplx/php/Php_tkn.java
M 400_xowa/src/gplx/xowa/Xoa_app.java
M 400_xowa/src/gplx/xowa/Xoa_app_.java
M 400_xowa/src/gplx/xowa/bldrs/Xob_cmd_mgr.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_fsdb_make.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_regy_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_temp_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_lnki_temp_wkr.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_orig_regy_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_orig_regy_tbl.java
A 400_xowa/src/gplx/xowa/bldrs/files/Xob_page_regy_cmd.java
R 400_xowa/src/gplx/xowa/bldrs/files/Xob_page_regy_tbl.java
D 400_xowa/src/gplx/xowa/bldrs/files/Xob_repo_page_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_regy_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_cmd_thumb.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_itm.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_itm_tst.java
M 400_xowa/src/gplx/xowa/bldrs/files/Xob_xfer_temp_tbl.java
M 400_xowa/src/gplx/xowa/bldrs/imports/Xob_search_base.java
M 400_xowa/src/gplx/xowa/bldrs/imports/ctgs/Xob_categorylinks_base.java
M 400_xowa/src/gplx/xowa/bldrs/imports/ctgs/Xoctg_hiddencat_parser_base.java
M 400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser.java
M 400_xowa/src/gplx/xowa/bldrs/langs/Xol_mw_lang_parser_tst.java
M 400_xowa/src/gplx/xowa/bldrs/oimgs/Xob_xfer_update_cmd.java
M 400_xowa/src/gplx/xowa/bldrs/oimgs/Xodb_db_file.java
M 400_xowa/src/gplx/xowa/bldrs/wikis/images/Xob_wiki_image_sql.java
M 400_xowa/src/gplx/xowa/bldrs/xmls/Xob_siteinfo_parser.java
M 400_xowa/src/gplx/xowa/bldrs/xmls/Xob_xml_parser.java
M 400_xowa/src/gplx/xowa/ctgs/Xoa_ctg_mgr.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_all.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_fmtr_itm.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_url.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_url_tst.java
M 400_xowa/src/gplx/xowa/ctgs/Xoctg_view_ctg.java
M 400_xowa/src/gplx/xowa/dbs/Xodb_load_mgr_txt.java
M 400_xowa/src/gplx/xowa/dbs/tbls/Xodb_wdata_pids_tbl.java
M 400_xowa/src/gplx/xowa/dbs/tbls/Xodb_wdata_qids_tbl.java
M 400_xowa/src/gplx/xowa/files/Xof_lnki_file_mgr.java
D 400_xowa/src/gplx/xowa/files/qrys/dirs/Xof_qry_dir.java
M 400_xowa/src/gplx/xowa/files/qrys/dirs/Xof_qry_wkr_dir.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_dir.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil_mgr.java
A 400_xowa/src/gplx/xowa/files/qrys/dirs/Xoq_fil_tbl.java
M 400_xowa/src/gplx/xowa/gui/menus/contexts/Xog_mnu_grp.java
M 400_xowa/src/gplx/xowa/gui/wins/Xog_url_wkr_tst.java
M 400_xowa/src/gplx/xowa/gui/wins/url_macros/Xog_url_macro_mgr.java
M 400_xowa/src/gplx/xowa/gui/wins/url_macros/Xog_url_macro_mgr_tst.java
M 400_xowa/src/gplx/xowa/html/Xoh_imgs_mgr.java
M 400_xowa/src/gplx/xowa/html/Xoh_page_mgr.java
M 400_xowa/src/gplx/xowa/html/Xow_html_mgr.java
M 400_xowa/src/gplx/xowa/html/tocs/Xop_toc_mgr.java
M 400_xowa/src/gplx/xowa/html/tocs/Xop_toc_mgr_tst.java
M 400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner.java
M 400_xowa/src/gplx/xowa/html/utils/Xoh_js_cleaner_tst.java
M 400_xowa/src/gplx/xowa/langs/cnvs/Xol_cnv_mgr_tst.java
M 400_xowa/src/gplx/xowa/langs/grammars/Xol_grammar_.java
M 400_xowa/src/gplx/xowa/langs/vnts/Xop_vnt_lxr_tst.java
M 400_xowa/src/gplx/xowa/langs/vnts/Xop_vnt_parser_tst.java
M 400_xowa/src/gplx/xowa/servers/Xosrv_msg_rdr.java
M 400_xowa/src/gplx/xowa/setup/maints/Wmf_dump_list_parser.java
M 400_xowa/src/gplx/xowa/setup/maints/Wmf_dump_list_parser_tst.java
M 400_xowa/src/gplx/xowa/setup/maints/Xow_maint_mgr.java
M 400_xowa/src/gplx/xowa/specials/nearby/Nearby_mgr_tst.java
M 400_xowa/src/gplx/xowa/specials/randoms/Xop_randomRootPage_page_tst.java
M 400_xowa/src/gplx/xowa/specials/search/Xog_search_suggest_mgr.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_core.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_ns_mgr.java
M 400_xowa/src/gplx/xowa/specials/search/Xosrh_scanner.java
M 400_xowa/src/gplx/xowa/users/Xou_log_mgr.java
M 

[MediaWiki-commits] [Gerrit] Added role::nova::manager to virt1000, so I can debug OSM. - change (operations/puppet)

2014-02-09 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Added role::nova::manager to virt1000, so I can debug OSM.
..

Added role::nova::manager to virt1000, so I can debug OSM.

Change-Id: I2f0da424bd773144b160d9d004a51e73d9079351
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/20/112420/1

diff --git a/manifests/site.pp b/manifests/site.pp
index b747d2c..a9f0a44 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2541,6 +2541,7 @@
 ldap::role::server::labs,
 ldap::role::client::labs,
 role::nova::controller,
+role::nova::manager,
 role::salt::masters::labs,
 role::deployment::salt_masters::labs
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove duplicate code and add todo - change (mediawiki...UniversalLanguageSelector)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Remove duplicate code and add todo
..


Remove duplicate code and add todo

Found while looking at bug 47974

Change-Id: I7d4ef165e36e96cb6a61880a3413d8883c51c7fd
---
M resources/js/ext.uls.ime.js
1 file changed, 2 insertions(+), 11 deletions(-)

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



diff --git a/resources/js/ext.uls.ime.js b/resources/js/ext.uls.ime.js
index c379101..c30885d 100644
--- a/resources/js/ext.uls.ime.js
+++ b/resources/js/ext.uls.ime.js
@@ -117,6 +117,8 @@
$moreSettingsLink = $( 'span' )
.addClass( 'uls-ime-more-settings-link' );
 
+   // Apparently we depend on some styles which are loaded with
+   // these modules. This needs refactoring.
mw.loader.using( mw.uls.languageSettingsModules, function () {
$moreSettingsLink.languagesettings( {
defaultModule: 'input',
@@ -130,18 +132,7 @@
 
// Hide the menu.
$moreSettingsLink.on( 'click', function ( e ) {
-   var languageSettings = $( this ).data( 
'languagesettings' );
imeselector.hide();
-   if ( !languageSettings ) {
-   $( this ).languagesettings( {
-   defaultModule: 'input',
-   onClose: function () {
-   // on close of input settings, 
keep focus in input area.
-   imeselector.$element.focus();
-   },
-   top: imeselector.$element.offset().top
-   } ).click();
-   }
e.stopPropagation();
} );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d4ef165e36e96cb6a61880a3413d8883c51c7fd
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: KartikMistry kartik.mis...@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] Added role::nova::manager to virt1000, so I can debug OSM. - change (operations/puppet)

2014-02-09 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Added role::nova::manager to virt1000, so I can debug OSM.
..


Added role::nova::manager to virt1000, so I can debug OSM.

Change-Id: I2f0da424bd773144b160d9d004a51e73d9079351
---
M manifests/site.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index b747d2c..a9f0a44 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2541,6 +2541,7 @@
 ldap::role::server::labs,
 ldap::role::client::labs,
 role::nova::controller,
+role::nova::manager,
 role::salt::masters::labs,
 role::deployment::salt_masters::labs
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2f0da424bd773144b160d9d004a51e73d9079351
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] add Variable handling Functions - change (mediawiki...PhpTagsFunctions)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: add Variable handling Functions
..


add Variable handling Functions

Change-Id: I2fb4c5bf8aa2704db62fd0007adcb24dd2dd81b6
---
M PhpTagsFunctions.class.php
M PhpTagsFunctions.init.php
M PhpTagsFunctions.php
A tests/phpunit/PhpTagsFunctions_Var_Test.php
4 files changed, 840 insertions(+), 15 deletions(-)

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



diff --git a/PhpTagsFunctions.class.php b/PhpTagsFunctions.class.php
index 89e1bdf..3686427 100644
--- a/PhpTagsFunctions.class.php
+++ b/PhpTagsFunctions.class.php
@@ -782,15 +782,135 @@
),
 
 
-
-
-
+// Variable handling Functions
+// @see http://www.php.net/manual/en/ref.var.php
+   'boolval' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 'phptags_boolval_1' 
), // @todo PHP 5 = 5.5.0
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'doubleval' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'floatval' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'get_defined_vars' = array(
+   0 = array( PHPTAGS_TYPE_ARRAY, false, null ),
+   PHPTAGS_HOOK_INVOKE = array( 0 = 
'phptags_get_defined_vars_0' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'gettype' = array(
+   0 = array( PHPTAGS_TYPE_STRING, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'intval' = array(
+   0 = array( PHPTAGS_TYPE_INT, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   2 = array( PHPTAGS_TYPE_INT, false, 10 ),
+   PHPTAGS_HOOK_INVOKE = array( 2 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_array' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_bool' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_double' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_float' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_int' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = array( PHPTAGS_GROUP_VAR ),
+   ),
+   'is_integer' = array(
+   0 = array( PHPTAGS_TYPE_BOOL, false, null ),
+   1 = array( PHPTAGS_TYPE_MIXED, false ),
+   PHPTAGS_HOOK_INVOKE = array( 1 = 
'call_php_native_function' ),
+   PHPTAGS_HOOK_GROUP = 

[MediaWiki-commits] [Gerrit] Fix remaining strings not participating in live language pre... - change (mediawiki...UniversalLanguageSelector)

2014-02-09 Thread jenkins-bot (Code Review)
jenkins-bot has submitted this change and it was merged.

Change subject: Fix remaining strings not participating in live language preview
..


Fix remaining strings not participating in live language preview

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

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



diff --git a/resources/js/ext.uls.displaysettings.js 
b/resources/js/ext.uls.displaysettings.js
index db70e41..b988fe6 100644
--- a/resources/js/ext.uls.displaysettings.js
+++ b/resources/js/ext.uls.displaysettings.js
@@ -81,8 +81,8 @@
+ '/div'; // End font settings section
 
function DisplaySettings( $parent ) {
-   this.name = $.i18n( 'ext-uls-display-settings-title-short' );
-   this.description = $.i18n( 'ext-uls-display-settings-desc' );
+   this.nameI18n = 'ext-uls-display-settings-title-short';
+   this.descriptionI18n = 'ext-uls-display-settings-desc';
this.$template = $( template );
this.uiLanguage = this.getUILanguage();
this.contentLanguage = this.getContentLanguage();
diff --git a/resources/js/ext.uls.inputsettings.js 
b/resources/js/ext.uls.inputsettings.js
index 11e592f..c75ab99 100644
--- a/resources/js/ext.uls.inputsettings.js
+++ b/resources/js/ext.uls.inputsettings.js
@@ -56,8 +56,8 @@
+ '/div';
 
function InputSettings( $parent ) {
-   this.name = $.i18n( 'ext-uls-input-settings-title-short' );
-   this.description = $.i18n( 'ext-uls-input-settings-desc' );
+   this.nameI18n = 'ext-uls-input-settings-title-short';
+   this.descriptionI18n = 'ext-uls-input-settings-desc';
this.$template = $( template );
this.uiLanguage = this.getInterfaceLanguage();
this.contentLanguage = this.getContentLanguage();
diff --git a/resources/js/ext.uls.languagesettings.js 
b/resources/js/ext.uls.languagesettings.js
index b82ace4..8bf50db 100644
--- a/resources/js/ext.uls.languagesettings.js
+++ b/resources/js/ext.uls.languagesettings.js
@@ -126,10 +126,10 @@
 
$settingsTitle = $( 'div' )
.addClass( 'settings-title' )
-   .text( module.name );
+   .attr( 'data-i18n', module.nameI18n );
$settingsText = $( 'span' )
.addClass( 'settings-text' )
-   .text( module.description );
+   .attr( 'data-i18n', module.descriptionI18n );
$settingsLink = $( 'div' )
.addClass( moduleName + '-settings-block 
menu-section' )
.prop( 'id', moduleName + '-panel-trigger' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2dc9279e4bfae499a6e8b00a34a74c5505512b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: 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] puppetize ports-wikitech.conf on wikitech hosts. - change (operations/puppet)

2014-02-09 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: puppetize ports-wikitech.conf on wikitech hosts.
..

puppetize ports-wikitech.conf on wikitech hosts.

Change-Id: I49fa3244cd3a74f320b3b53fa3bf59057c4fe123
---
M manifests/openstack.pp
A templates/openstack/common/controller/ports-wikitech.conf.erb
2 files changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/21/112421/1

diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index 091c302..beff866 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -400,6 +400,15 @@
 source = puppet:///files/openstack/mw-xml.sh;
 }
 
+file { /etc/apache2/conf.d/ports-wikitech.conf:
+ensure = present,
+require = [ Package[php5] ],
+mode = 0644,
+owner = root,
+group = root,
+content = 
template(openstack/common/controller/ports-wikitech.conf.erb),
+}
+
 cron {
 run-jobs:
 user = mwdeploy,
diff --git a/templates/openstack/common/controller/ports-wikitech.conf.erb 
b/templates/openstack/common/controller/ports-wikitech.conf.erb
new file mode 100644
index 000..24c3bb2
--- /dev/null
+++ b/templates/openstack/common/controller/ports-wikitech.conf.erb
@@ -0,0 +1,2 @@
+Listen 80
+Listen 443

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

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

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


[MediaWiki-commits] [Gerrit] logstash: Add normalized_message field to all events - change (operations/puppet)

2014-02-09 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: logstash: Add normalized_message field to all events
..


logstash: Add normalized_message field to all events

Copy the message of all events destined for storage in Elasticsearch
into a normalized_message field that is truncated to 255 characters.
This can be used in dashboards as a term search to correlate common
messages.

Change-Id: I01c50456cf0e334075acacbe2aebe5d8fc941d31
---
A files/logstash/filter-add-normalized-message.conf
M manifests/role/logstash.pp
2 files changed, 40 insertions(+), 1 deletion(-)

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



diff --git a/files/logstash/filter-add-normalized-message.conf 
b/files/logstash/filter-add-normalized-message.conf
new file mode 100644
index 000..b77662a
--- /dev/null
+++ b/files/logstash/filter-add-normalized-message.conf
@@ -0,0 +1,34 @@
+# vim:set sw=2 ts=2 sts=2 et
+# Add normalized_message field to events bound for logstash
+filter {
+
+  if es in [tags] and ![normalized_message] {
+mutate {
+  # Create a copy of message field that can be normalized
+  add_field = [ normalized_message, %{message} ]
+}
+# Remove documentation anchor tags
+mutate {
+  gsub = [
+normalized_message,
+ \[a href='[^']*'[^]*/a\],
+
+  ]
+}
+# Trim the normalized_message to a maximum of 255 characters
+# This is done because our Elasticsearch schema doesn't store raw fields
+# for strings longer than 255 characters and we want something to show
+# in terms queries even if it's shortened.
+grok {
+  match = [
+normalized_message,
+^(?normalized_message.{255}).*$
+  ]
+  overwrite = [ normalized_message ]
+  named_captures_only = true
+  add_tag = [ normalized_message_trimmed ]
+  tag_on_failure = [ normalized_message_untrimmed ]
+}
+  }
+
+}
diff --git a/manifests/role/logstash.pp b/manifests/role/logstash.pp
index d17f25a..2ad37d2 100644
--- a/manifests/role/logstash.pp
+++ b/manifests/role/logstash.pp
@@ -57,7 +57,7 @@
 
 logstash::conf { 'filter_strip_ansi_color':
 source   = 'puppet:///files/logstash/filter-strip-ansi-color.conf',
-priority = 50,
+priority = 40,
 }
 
 logstash::conf { 'filter_syslog':
@@ -70,6 +70,11 @@
 priority = 50,
 }
 
+logstash::conf { 'filter_add_normalized_message':
+source   = 
'puppet:///files/logstash/filter-add-normalized-message.conf',
+priority = 60,
+}
+
 class { '::logstash::output::elasticsearch':
 host= '127.0.0.1',
 replication = 'async',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I01c50456cf0e334075acacbe2aebe5d8fc941d31
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: BryanDavis bda...@wikimedia.org
Gerrit-Reviewer: Faidon Liambotis fai...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] puppetize ports-wikitech.conf on wikitech hosts. - change (operations/puppet)

2014-02-09 Thread Alexandros Kosiaris (Code Review)
Alexandros Kosiaris has submitted this change and it was merged.

Change subject: puppetize ports-wikitech.conf on wikitech hosts.
..


puppetize ports-wikitech.conf on wikitech hosts.

Change-Id: I49fa3244cd3a74f320b3b53fa3bf59057c4fe123
---
M manifests/openstack.pp
A templates/openstack/common/controller/ports-wikitech.conf.erb
2 files changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/manifests/openstack.pp b/manifests/openstack.pp
index 091c302..a1fe533 100644
--- a/manifests/openstack.pp
+++ b/manifests/openstack.pp
@@ -400,6 +400,15 @@
 source = puppet:///files/openstack/mw-xml.sh;
 }
 
+file { '/etc/apache2/conf.d/ports-wikitech.conf':
+ensure = present,
+require = 
File[/etc/apache2/sites-available/${controller_hostname}],
+mode = '0644',
+owner = 'root',
+group = 'root',
+content = 
template('openstack/common/controller/ports-wikitech.conf.erb'),
+}
+
 cron {
 run-jobs:
 user = mwdeploy,
diff --git a/templates/openstack/common/controller/ports-wikitech.conf.erb 
b/templates/openstack/common/controller/ports-wikitech.conf.erb
new file mode 100644
index 000..24c3bb2
--- /dev/null
+++ b/templates/openstack/common/controller/ports-wikitech.conf.erb
@@ -0,0 +1,2 @@
+Listen 80
+Listen 443

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49fa3244cd3a74f320b3b53fa3bf59057c4fe123
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Alexandros Kosiaris akosia...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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