[MediaWiki-commits] [Gerrit] Clean up inTransclusion flags. - change (mediawiki...Parsoid)

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

Change subject: Clean up inTransclusion flags.
..


Clean up inTransclusion flags.

Bug: 54355
Change-Id: I0fa30ea9cac7bd0d1050964cedd9f45d9dab4c3a
---
M js/lib/dom.markFosteredContent.js
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/js/lib/dom.markFosteredContent.js 
b/js/lib/dom.markFosteredContent.js
index 21b96eb..aa6bbef 100644
--- a/js/lib/dom.markFosteredContent.js
+++ b/js/lib/dom.markFosteredContent.js
@@ -116,8 +116,13 @@
 
} else if ( DU.isMarkerMeta( c, mw:TransclusionShadow ) ) {
DU.deleteNode( c );
-   } else if ( c.childNodes.length  0 ) {
-   markFosteredContent( c, env );
+   } else if ( DU.isElt( c ) ) {
+   if ( c.data  c.data.parsoid ) {
+   delete c.data.parsoid.inTransclusion;
+   }
+   if ( c.childNodes.length  0 ) {
+   markFosteredContent( c, env );
+   }
}
 
c = sibling;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0fa30ea9cac7bd0d1050964cedd9f45d9dab4c3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra abrea...@wikimedia.org
Gerrit-Reviewer: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove 404.html symlinks, 404s are handled by w/404.php - change (operations/mediawiki-config)

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

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


Change subject: Remove 404.html symlinks, 404s are handled by w/404.php
..

Remove 404.html symlinks, 404s are handled by w/404.php

Change-Id: I26aa9832ad4f317eb4d2782cbfdda7272d0f281c
---
D docroot/advisory/404.html
D docroot/arbcom_dewiki/404.html
D docroot/arbcom_fiwiki/404.html
D docroot/arbcom_nlwiki/404.html
D docroot/auditcom/404.html
D docroot/board/404.html
D docroot/boardgovcom/404.html
D docroot/chair/404.html
D docroot/chapcom/404.html
D docroot/checkuser/404.html
D docroot/collab/404.html
D docroot/commons/404.html
D docroot/donate/404.html
D docroot/exec/404.html
D docroot/fdc/404.html
D docroot/foundation/404.html
D docroot/grants/404.html
D docroot/iegcom/404.html
D docroot/incubator/404.html
D docroot/internal/404.html
D docroot/login/404.html
D docroot/mediawiki/404.html
D docroot/meta/404.html
D docroot/movementroles/404.html
D docroot/nomcom/404.html
D docroot/office/404.html
D docroot/ombudsmen/404.html
D docroot/otrs-wiki/404.html
D docroot/outreach/404.html
D docroot/quality/404.html
D docroot/searchcom/404.html
D docroot/skel-1.5/404.html
D docroot/sources/404.html
D docroot/spcom/404.html
D docroot/species/404.html
D docroot/steward/404.html
D docroot/strategy/404.html
D docroot/tenwiki/404.html
D docroot/test/404.html
D docroot/testwikidata/404.html
D docroot/transitionteam/404.html
D docroot/ukwikimedia/404.html
D docroot/usability/404.html
D docroot/vote/404.html
D docroot/wikibooks.org/404.html
D docroot/wikidata/404.html
D docroot/wikimania/404.html
D docroot/wikimania2005/404.html
D docroot/wikimania2006/404.html
D docroot/wikimania2007/404.html
D docroot/wikimania2008/404.html
D docroot/wikimania2009/404.html
D docroot/wikimania2010/404.html
D docroot/wikimania2011/404.html
D docroot/wikimania2012/404.html
D docroot/wikimania2013/404.html
D docroot/wikimania2014/404.html
D docroot/wikimaniateam/404.html
D docroot/wikimedia.org/404.html
D docroot/wikinews.org/404.html
D docroot/wikipedia.org/404.html
D docroot/wikiquote.org/404.html
D docroot/wikisource.org/404.html
D docroot/wikiversity.org/404.html
D docroot/wikivoyage.org/404.html
D docroot/wiktionary.org/404.html
66 files changed, 0 insertions(+), 66 deletions(-)


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

diff --git a/docroot/advisory/404.html b/docroot/advisory/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/advisory/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/arbcom_dewiki/404.html b/docroot/arbcom_dewiki/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/arbcom_dewiki/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/arbcom_fiwiki/404.html b/docroot/arbcom_fiwiki/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/arbcom_fiwiki/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/arbcom_nlwiki/404.html b/docroot/arbcom_nlwiki/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/arbcom_nlwiki/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/auditcom/404.html b/docroot/auditcom/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/auditcom/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/board/404.html b/docroot/board/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/board/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/boardgovcom/404.html b/docroot/boardgovcom/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/boardgovcom/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/chair/404.html b/docroot/chair/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/chair/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/chapcom/404.html b/docroot/chapcom/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/chapcom/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/checkuser/404.html b/docroot/checkuser/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/checkuser/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git a/docroot/collab/404.html b/docroot/collab/404.html
deleted file mode 12
index d853aae..000
--- a/docroot/collab/404.html
+++ /dev/null
@@ -1 +0,0 @@
-/apache/common/404.html
\ No newline at end of file
diff --git 

[MediaWiki-commits] [Gerrit] Unbreak translatewiki.net scripts - change (mediawiki...PronunciationRecording)

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

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


Change subject: Unbreak translatewiki.net scripts
..

Unbreak translatewiki.net scripts

Followup to 
https://gerrit.wikimedia.org/r/#/c/81503/9/PronunciationRecording.i18n.php,unified

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


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/PronunciationRecording 
refs/changes/76/85176/1

diff --git a/PronunciationRecording.i18n.php b/PronunciationRecording.i18n.php
index 23a9fbc..d9eefed 100644
--- a/PronunciationRecording.i18n.php
+++ b/PronunciationRecording.i18n.php
@@ -21,7 +21,7 @@
'pronunciationrecording-toolbar-upload-label' = 'Upload',
'pronunciationrecording-webaudio-not-supported' = 'WebAudio API is not 
supported for this browser',
'pronunciationrecording-specialpage-error-nologin' = 'You must be [$1 
logged in] to record and upload pronunciations.',
-   );
+);
 
 /** Message documentation (Message documentation)
  * @author Shirayuki

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

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

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


[MediaWiki-commits] [Gerrit] Unbreak translatewiki.net scripts - change (mediawiki...PronunciationRecording)

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

Change subject: Unbreak translatewiki.net scripts
..


Unbreak translatewiki.net scripts

Followup to 
https://gerrit.wikimedia.org/r/#/c/81503/9/PronunciationRecording.i18n.php,unified

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

Approvals:
  Raimond Spekking: Verified; Looks good to me, approved



diff --git a/PronunciationRecording.i18n.php b/PronunciationRecording.i18n.php
index 23a9fbc..d9eefed 100644
--- a/PronunciationRecording.i18n.php
+++ b/PronunciationRecording.i18n.php
@@ -21,7 +21,7 @@
'pronunciationrecording-toolbar-upload-label' = 'Upload',
'pronunciationrecording-webaudio-not-supported' = 'WebAudio API is not 
supported for this browser',
'pronunciationrecording-specialpage-error-nologin' = 'You must be [$1 
logged in] to record and upload pronunciations.',
-   );
+);
 
 /** Message documentation (Message documentation)
  * @author Shirayuki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iae58a233a3795044b3b07a4bb620e9ff4fcb7e83
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PronunciationRecording
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com

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


[MediaWiki-commits] [Gerrit] Enable PHP on w/404.php on bits - change (operations/apache-config)

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

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


Change subject: Enable PHP on w/404.php on bits
..

Enable PHP on w/404.php on bits

Change-Id: I0cdc74388235b6cd822afe1bb1a3387c7e5ab513
---
M wikimedia.conf
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/apache-config 
refs/changes/77/85177/1

diff --git a/wikimedia.conf b/wikimedia.conf
index 108cd44..65776f7 100644
--- a/wikimedia.conf
+++ b/wikimedia.conf
@@ -143,6 +143,12 @@
php_admin_flag engine off
 /IfModule
 
+File /usr/local/apache/common/docroot/wikimedia.org/w/404.php
+   IfModule mod_php5.c
+   php_admin_flag engine on
+/IfModule
+/File
+
 # Used for Firefox OS web application manifest living on bits.wikimedia.org
 AddType application/x-web-app-manifest+json .webapp
 /VirtualHost

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0cdc74388235b6cd822afe1bb1a3387c7e5ab513
Gerrit-PatchSet: 1
Gerrit-Project: operations/apache-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add w symlink for 404.php - change (operations/mediawiki-config)

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

Change subject: Add w symlink for 404.php
..


Add w symlink for 404.php

Change-Id: Ida784bf5d87aa89331306cbb6b4dfeded2f129bc
---
A docroot/bits/w
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/docroot/bits/w b/docroot/bits/w
new file mode 12
index 000..e91fae3
--- /dev/null
+++ b/docroot/bits/w
@@ -0,0 +1 @@
+/apache/common/live-1.5
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ida784bf5d87aa89331306cbb6b4dfeded2f129bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@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 w symlink for 404.php - change (operations/mediawiki-config)

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

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


Change subject: Add w symlink for 404.php
..

Add w symlink for 404.php

Change-Id: Ida784bf5d87aa89331306cbb6b4dfeded2f129bc
---
A docroot/bits/w
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/docroot/bits/w b/docroot/bits/w
new file mode 12
index 000..e91fae3
--- /dev/null
+++ b/docroot/bits/w
@@ -0,0 +1 @@
+/apache/common/live-1.5
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida784bf5d87aa89331306cbb6b4dfeded2f129bc
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Implement wblinktitles action - change (pywikibot/core)

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

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


Change subject: Implement wblinktitles action
..

Implement wblinktitles action

Change-Id: Ida539babbdcbaa664ddfbbea808004e679a7cb63
---
M pywikibot/site.py
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/80/85180/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 13477b0..52adbf4 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3681,6 +3681,29 @@
 data = req.submit()
 return data
 
+def linkTitles(self, page1, page2, bot=True):
+
+Link two pages together
+@param page1: First page to link
+@type page1: pywikibot.Page
+@param page2: Second page to link
+@type page2: pywikibot.Page
+@param bot: whether to mark edit as bot
+@return: dict API output
+
+params = {
+'tosite': page1.site.dbName(),
+'totitle': page1.title(),
+'fromsite': page2.site.dbName(),
+'fromtitle': page2.title(),
+'token': self.token(page1, 'edit')
+}
+if bot:
+params['bot'] = 1
+req = api.Request(site=self, **params)
+data = req.submit()
+return data
+
 # deprecated BaseSite methods
 def fam(self):
 raise NotImplementedError

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ida539babbdcbaa664ddfbbea808004e679a7cb63
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
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] [WIP] Function to create a new item - change (pywikibot/core)

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

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


Change subject: [WIP] Function to create a new item
..

[WIP] Function to create a new item

Based on the provided page, it would add each of the langlinks
as connected pages.

Some TODOs:

* Option to add aliases based on redirects
* Check against already existing links upon errors
* Use linktitles if one of the links already exists

Change-Id: I5d497926c447d4c08e022c9b924cf028656378fd
---
M pywikibot/site.py
1 file changed, 36 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/79/85179/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index 13477b0..2f8e4be 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -3681,6 +3681,42 @@
 data = req.submit()
 return data
 
+def createNewItemFromPage(self, page, bot=True, **kwargs):
+
+Create a new Wikibase item for a provided page
+@param page: page to fetch links from
+@type page: pywikibot.Page
+@param bot: whether to mark the edit as bot
+@return: pywikibot.ItemPage of newly created item
+
+sitelinks = {
+page.site.dbName(): {
+'site': page.site.dbName(),
+'title': page.title(),
+}
+}
+labels = {
+page.site.language(): {
+'language': page.site.language(),
+'value': page.title(),
+}
+}
+for link in page.iterlanglinks():
+sitelinks[link.site.dbName()] = {
+'site': link.site.dbName(),
+'title': link.title,
+}
+labels[link.site.language()] = {
+'language': link.site.language(),
+'value': link.title,
+}
+data = {
+'sitelinks': sitelinks,
+'labels': labels,
+}
+result = self.editEntity({}, data, bot=bot, **kwargs)
+return pywikibot.ItemPage(self, result['entity']['id'])
+
 # deprecated BaseSite methods
 def fam(self):
 raise NotImplementedError

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5d497926c447d4c08e022c9b924cf028656378fd
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
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] Page.data_item() function to get a Wikibase item of a page - change (pywikibot/core)

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

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


Change subject: Page.data_item() function to get a Wikibase item of a page
..

Page.data_item() function to get a Wikibase item of a page

Change-Id: I10e5b4162b0ee4ec479c312acbdd833640e488aa
---
M pywikibot/page.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/81/85181/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 6203459..86be801 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -998,6 +998,13 @@
 # iterated upon.
 return self.site.pagelanglinks(self, step=step, total=total)
 
+def data_item(self):
+
+Convinience function to get the Wikibase item of a page
+@return: ItemPage
+
+return ItemPage.fromPage(self)
+
 def templates(self, content=False):
 Return a list of Page objects for templates used on this Page.
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10e5b4162b0ee4ec479c312acbdd833640e488aa
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
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] [DisqusTag] Register extension - change (translatewiki)

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

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


Change subject: [DisqusTag] Register extension
..

[DisqusTag] Register extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/82/85182/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 7dc1bbc..a1d1a3d 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -384,6 +384,8 @@
 ignored = sitenotice_id
 optional = sitenotice_close-brackets
 
+Disqus Tag
+
 Donation Interface - Adyen Gateway
 id = ext-di-adyen
 file = DonationInterface/adyen_gateway/adyen_gateway.i18n.php

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

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

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


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

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

Change subject: [DisqusTag] Register extension
..


[DisqusTag] Register extension

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 7dc1bbc..a1d1a3d 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -384,6 +384,8 @@
 ignored = sitenotice_id
 optional = sitenotice_close-brackets
 
+Disqus Tag
+
 Donation Interface - Adyen Gateway
 id = ext-di-adyen
 file = DonationInterface/adyen_gateway/adyen_gateway.i18n.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0077843fca2a9d181bb02ba1244d7b119317f14d
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] add message for Commons site link section on Wikidata - change (mediawiki...WikimediaMessages)

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

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


Change subject: add message for Commons site link section on Wikidata
..

add message for Commons site link section on Wikidata

Change-Id: I1f1d809b9461370dea09d42d88057d3d74d9d84d
---
M WikimediaMessages.i18n.php
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/83/85183/1

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index cb183e8..2045a81 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -236,6 +236,7 @@
 
# Wikidata-specific messages
'wikibase-sitelinks-wikivoyage' = 'Wikivoyage pages linked to this 
item',
+   'wikibase-sitelinks-commons' = 'Wikimedia Commons pages linked to this 
item',
 
# Custom message for enwiki to stop from deleting the mainpage
'cant-delete-main-page' = 'You cannot delete or move the main page.',
@@ -496,6 +497,7 @@
 
 {{Identical/Wikimedia-licensing}}',
'wikibase-sitelinks-wikivoyage' = 'Section heading on Wikidata item 
page for Wikivoyage site links',
+   'wikibase-sitelinks-commons' = 'Section heading on Wikidata item page 
for Wikimedia Commons site links',
'wikimedia-translationnotifications-signup-legal' = 'Legal text about 
the notifications sent to translators.',
'upload-more-photos-of-this-monument' = 'This message is addded by the 
WLM app linking to the upload wizard with the parameters set for a new upload 
of the same monument.',
'extdist-branch-master' = 'Message used for an extensions git master 
version; the latest development version',
@@ -9501,8 +9503,8 @@
'shared-repo-name-shared' = 'Wikimedia Commons',
'wikimedia-copyright' = 'Teks tasadio jo a 
href=https://creativecommons.org/licenses/by-sa/3.0/deed.id;Lisensi 
Atribusi-BabagiSarupo Creative Commons/a; katantuan tambahan mungkin balaku. 
Caliak a 
href=https://wikimediafoundation.org/wiki/Terms_of_use-Summary/min;Katantuan 
Panggunoan/a untuak labiah jaleh.',
'wikidata-copyright' = 'Sado struktur data dari ruangnamo utamo jo 
properti tasadio jo a 
href=https://creativecommons.org/publicdomain/zero/1.0/deed.id; 
title=Definisi dari lisensi Creative Commons CC-nolLisensi Dedikasi Domain 
Publik CC-nol Creative Commons/a;
-teks dalam ruangnamo lain tasadio jo a 
href=https://creativecommons.org/licenses/by-sa/3.0/deed.id; title=Definisi 
dari lisensi Creative Commons Attribusi-BabagiSarupoLisensi 
Atribusi-BabagiSarupo Creative Commons/a; 
-katantuan tambahan mungkin balaku. 
+teks dalam ruangnamo lain tasadio jo a 
href=https://creativecommons.org/licenses/by-sa/3.0/deed.id; title=Definisi 
dari lisensi Creative Commons Attribusi-BabagiSarupoLisensi 
Atribusi-BabagiSarupo Creative Commons/a;
+katantuan tambahan mungkin balaku.
 Caliak a 
href=https://wikimediafoundation.org/wiki/Terms_of_use-Summary/min;Katantuan 
Panggunoan/a untuak labiah jaleh.',
'wikidata-shortcopyrightwarning' = 'Jo manakan tombol 
{{int:savearticle}}, Sanak satuju pado 
[https://wikimediafoundation.org/wiki/Terms_of_use-Summary/min Katantuan 
Panggunoan], dan malapeh jariah Sanak jo 
[https://creativecommons.org/publicdomain/zero/1.0/deed.id lisensi CC-nol].',
'wikimedia-copyrightwarning' = 'Jo manakan tombol 
{{int:savearticle}}, Sanak satuju pado 
[https://wikimediafoundation.org/wiki/Terms_of_use-Summary/min Katantuan 
Panggunoan], dan malapeh jariah Sanak jo 
[https://id.wikipedia.org/wiki/Wikipedia:Teks_Lisensi_Creative_Commons_Atribusi-BerbagiSerupa_3.0
 Lisensi Atribusi-BabagiSarupo Creative Commons] jo 
[https://id.wikipedia.org/wiki/Wikipedia:Lisensi_Dokumentasi_Bebas_GNU GFDL]. 
Sanak satuju dek pambarian pautan atau URL marupoan atribusi nan cukuik di 
bawah lisensi Creative Commons.',

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

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

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


[MediaWiki-commits] [Gerrit] Fix comment about Math compnent to report bugs etc - change (mediawiki...Math)

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

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


Change subject: Fix comment about Math compnent to report bugs etc
..

Fix comment about Math compnent to report bugs etc

There isn't a texvc component in extensions

Change-Id: I7d868a37142be0d4163ff891f7392887643ead26
---
M math/README
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/math/README b/math/README
index cdf5806..8491c00 100644
--- a/math/README
+++ b/math/README
@@ -11,7 +11,7 @@
 under the GPL license.
 
 Please report bugs at: https://bugzilla.wikimedia.org/
-with MediaWiki extensions as product and texvc as component.
+with MediaWiki extensions as product and Math as component.
 
 == Setup ==
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d868a37142be0d4163ff891f7392887643ead26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix comment about Math compnent to report bugs etc - change (mediawiki...Math)

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

Change subject: Fix comment about Math compnent to report bugs etc
..


Fix comment about Math compnent to report bugs etc

There isn't a texvc component in extensions

Change-Id: I7d868a37142be0d4163ff891f7392887643ead26
---
M math/README
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/math/README b/math/README
index cdf5806..8491c00 100644
--- a/math/README
+++ b/math/README
@@ -11,7 +11,7 @@
 under the GPL license.
 
 Please report bugs at: https://bugzilla.wikimedia.org/
-with MediaWiki extensions as product and texvc as component.
+with MediaWiki extensions as product and Math as component.
 
 == Setup ==
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d868a37142be0d4163ff891f7392887643ead26
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Math
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Physikerwelt w...@physikerwelt.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] Add missing message - change (mediawiki...SpamBlacklist)

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

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


Change subject: Add missing message
..

Add missing message

Currently this is shown:

You do not have permission to action-spamblacklistlog, for the following 
reason:

Change-Id: I5bb7f4fccf4a8970f646b516beff4135da8a9e75
---
M SpamBlacklist.i18n.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/SpamBlacklist.i18n.php b/SpamBlacklist.i18n.php
index d81a626..73a3bf3 100644
--- a/SpamBlacklist.i18n.php
+++ b/SpamBlacklist.i18n.php
@@ -58,6 +58,7 @@
'log-description-spamblacklist' = 'These events track spam blacklist 
hits.',
'logentry-spamblacklist-hit' = '$1 caused a spam blacklist hit on $3 
by attempting to add $4.',
'right-spamblacklistlog' = 'View spam blacklist log',
+   'action-spamblacklistlog' = 'view spam blacklist log',
 );
 
 /** Message documentation (Message documentation)
@@ -91,7 +92,7 @@
 * $3 is the page the user attempted to edit.
 * $4 is the url the user tried to add.',
'right-spamblacklistlog' = '{{doc-right|spamblacklistlog}}',
-
+   'action-spamblacklistlog' = '{{doc-action|spamblacklistlog}}',
 );
 
 /** Aragonese (aragonés)

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

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

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


[MediaWiki-commits] [Gerrit] add message for Commons site link section on Wikidata - change (mediawiki...WikimediaMessages)

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

Change subject: add message for Commons site link section on Wikidata
..


add message for Commons site link section on Wikidata

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

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



diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index cb183e8..3fd453d 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -236,6 +236,7 @@
 
# Wikidata-specific messages
'wikibase-sitelinks-wikivoyage' = 'Wikivoyage pages linked to this 
item',
+   'wikibase-sitelinks-commons' = 'Wikimedia Commons pages linked to this 
item',
 
# Custom message for enwiki to stop from deleting the mainpage
'cant-delete-main-page' = 'You cannot delete or move the main page.',
@@ -496,6 +497,7 @@
 
 {{Identical/Wikimedia-licensing}}',
'wikibase-sitelinks-wikivoyage' = 'Section heading on Wikidata item 
page for Wikivoyage site links',
+   'wikibase-sitelinks-commons' = 'Section heading on Wikidata item page 
for Wikimedia Commons site links',
'wikimedia-translationnotifications-signup-legal' = 'Legal text about 
the notifications sent to translators.',
'upload-more-photos-of-this-monument' = 'This message is addded by the 
WLM app linking to the upload wizard with the parameters set for a new upload 
of the same monument.',
'extdist-branch-master' = 'Message used for an extensions git master 
version; the latest development version',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1f1d809b9461370dea09d42d88057d3d74d9d84d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Daniel Kinzler daniel.kinz...@wikimedia.de
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Made SnakList/Reference order-aware - change (mediawiki...WikibaseDataModel)

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

Change subject: Made SnakList/Reference order-aware
..


Made SnakList/Reference order-aware

Change-Id: I2ce18fb2151d7d940bb020bcb7a594d74bfea35d
---
M DataModel/Reference.php
M DataModel/Snak/SnakList.php
M tests/phpunit/ReferenceTest.php
M tests/phpunit/Snak/SnakListTest.php
4 files changed, 200 insertions(+), 6 deletions(-)

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



diff --git a/DataModel/Reference.php b/DataModel/Reference.php
index b8f6e8f..cca512c 100644
--- a/DataModel/Reference.php
+++ b/DataModel/Reference.php
@@ -65,7 +65,14 @@
 * @return string
 */
public function getHash() {
-   return $this-snaks-getHash();
+   // For considering the reference snaks' property order without 
actually manipulating the
+   // reference snaks's order, a new SnakList is generated. The 
new SnakList is ordered
+   // by property and its hash is returned.
+   $orderedSnaks = new SnakList( $this-snaks );
+
+   $orderedSnaks-orderByProperty();
+
+   return $orderedSnaks-getHash();
}
 
/**
diff --git a/DataModel/Snak/SnakList.php b/DataModel/Snak/SnakList.php
index 5ba78cf..66d2619 100644
--- a/DataModel/Snak/SnakList.php
+++ b/DataModel/Snak/SnakList.php
@@ -102,6 +102,49 @@
}
 
/**
+* @see HashArray::getHash
+*
+* @since 0.5
+*
+* @return string
+*/
+   public function getHash() {
+   $args = func_get_args();
+
+   /**
+* @var MapHasher $hasher
+*/
+   $hasher = array_key_exists( 0, $args ) ? $args[0] : new 
MapValueHasher( true );
+
+   return parent::getHash( $hasher );
+   }
+
+   /**
+* Orders the snaks in the list grouping them by property.
+*
+* @since 0.5
+*/
+   public function orderByProperty() {
+   $snaksByProperty = array();
+
+   foreach( $this as $snak ) {
+   $propertyId = 
$snak-getPropertyId()-getSerialization();
+
+   if( !isset( $snaksByProperty[$propertyId] ) ) {
+   $snaksByProperty[$propertyId] = array();
+   }
+   $snaksByProperty[$propertyId][] = $snak;
+   }
+
+   foreach( $snaksByProperty as $snaks ) {
+   foreach( $snaks as $snak ) {
+   $this-removeSnak( $snak );
+   $this-addSnak( $snak );
+   }
+   }
+   }
+
+   /**
 * @see Snaks::toArray
 *
 * @since 0.3
diff --git a/tests/phpunit/ReferenceTest.php b/tests/phpunit/ReferenceTest.php
index 3d02be9..3fe5925 100644
--- a/tests/phpunit/ReferenceTest.php
+++ b/tests/phpunit/ReferenceTest.php
@@ -3,6 +3,10 @@
 namespace Wikibase\Test;
 
 use DataValues\StringValue;
+use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\Property;
+use Wikibase\PropertyNoValueSnak;
+use Wikibase\PropertySomeValueSnak;
 use Wikibase\PropertyValueSnak;
 use Wikibase\Reference;
 use Wikibase\SnakList;
@@ -32,13 +36,13 @@
$snakLists[] = new SnakList();
 
$snakLists[] = new SnakList(
-   array( new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
+   array( new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
);
 
$snakLists[] = new SnakList( array(
-   new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
-   new \Wikibase\PropertySomeValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 2 ) ),
-   new \Wikibase\PropertyNoValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 3 ) )
+   new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
+   new PropertySomeValueSnak( new EntityId( 
Property::ENTITY_TYPE, 2 ) ),
+   new PropertyNoValueSnak( new EntityId( 
Property::ENTITY_TYPE, 3 ) )
) );
 
$argLists = array();
@@ -56,7 +60,7 @@
$references[] = new Reference();
 
$references[] = new Reference( new SnakList( array( new 
PropertyValueSnak(
-   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ),
+   new EntityId( Property::ENTITY_TYPE, 1 ),
new StringValue( 'a' )
) ) ) );
 
@@ -99,4 +103,69 @@
 

[MediaWiki-commits] [Gerrit] Adjust ReferenceSerializer tests to change in WikibaseDataModel - change (mediawiki...Wikibase)

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

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


Change subject: Adjust ReferenceSerializer tests to change in WikibaseDataModel
..

Adjust ReferenceSerializer tests to change in WikibaseDataModel

Refers to change I2ce18fb2151d7d940bb020bcb7a594d74bfea35d

Change-Id: I36f5a98a443c4a1f1ba9e5e85cc3de676f812637
---
M lib/tests/phpunit/serializers/ReferenceSerializerTest.php
M lib/tests/phpunit/serializers/SerializerBaseTest.php
2 files changed, 14 insertions(+), 1 deletion(-)


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

diff --git a/lib/tests/phpunit/serializers/ReferenceSerializerTest.php 
b/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
index 0895b38..bb380cc 100644
--- a/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
+++ b/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
@@ -54,6 +54,9 @@
$snakSerializer = new SnakSerializer();
 
$reference = new \Wikibase\Reference( new \Wikibase\SnakList( 
$snaks ) );
+   $sortedReference = new \Wikibase\Reference( new 
\Wikibase\SnakList(
+   array( $snaks[0], $snaks[2], $snaks[1], $snaks[3], 
$snaks[4] )
+   ) );
 
$validArgs[] = array(
$reference,
@@ -73,6 +76,8 @@
),
),
),
+   null,
+   $sortedReference,
);
 
return $validArgs;
diff --git a/lib/tests/phpunit/serializers/SerializerBaseTest.php 
b/lib/tests/phpunit/serializers/SerializerBaseTest.php
index b125875..62d3ae1 100644
--- a/lib/tests/phpunit/serializers/SerializerBaseTest.php
+++ b/lib/tests/phpunit/serializers/SerializerBaseTest.php
@@ -53,7 +53,12 @@
 *
 * @since 0.2
 */
-   public function testGetSerializedValid( $input, array $expected = null, 
SerializationOptions $options = null ) {
+   public function testGetSerializedValid(
+   $input,
+   array $expected = null,
+   SerializationOptions $options = null,
+   $normalizedInput = null
+   ) {
$serializer = $this-getInstance();
 
if ( $options !== null ) {
@@ -69,6 +74,9 @@
 
if ( $serializer instanceof Unserializer ) {
$roundtrippedValue = $serializer-newFromSerialization( 
$output );
+   if( !is_null( $normalizedInput ) ) {
+   $input = $normalizedInput;
+   }
$this-assertMeaningfulEquals( $input, 
$roundtrippedValue, 'getSerialized, getUnserialized roundtrip should result in 
input value' );
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I36f5a98a443c4a1f1ba9e5e85cc3de676f812637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Adjust ReferenceSerializer tests to change in WikibaseDataModel - change (mediawiki...Wikibase)

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

Change subject: Adjust ReferenceSerializer tests to change in WikibaseDataModel
..


Adjust ReferenceSerializer tests to change in WikibaseDataModel

Refers to change I2ce18fb2151d7d940bb020bcb7a594d74bfea35d

Change-Id: I36f5a98a443c4a1f1ba9e5e85cc3de676f812637
---
M lib/tests/phpunit/serializers/ReferenceSerializerTest.php
M lib/tests/phpunit/serializers/SerializerBaseTest.php
2 files changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/lib/tests/phpunit/serializers/ReferenceSerializerTest.php 
b/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
index 0895b38..bb380cc 100644
--- a/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
+++ b/lib/tests/phpunit/serializers/ReferenceSerializerTest.php
@@ -54,6 +54,9 @@
$snakSerializer = new SnakSerializer();
 
$reference = new \Wikibase\Reference( new \Wikibase\SnakList( 
$snaks ) );
+   $sortedReference = new \Wikibase\Reference( new 
\Wikibase\SnakList(
+   array( $snaks[0], $snaks[2], $snaks[1], $snaks[3], 
$snaks[4] )
+   ) );
 
$validArgs[] = array(
$reference,
@@ -73,6 +76,8 @@
),
),
),
+   null,
+   $sortedReference,
);
 
return $validArgs;
diff --git a/lib/tests/phpunit/serializers/SerializerBaseTest.php 
b/lib/tests/phpunit/serializers/SerializerBaseTest.php
index b125875..62d3ae1 100644
--- a/lib/tests/phpunit/serializers/SerializerBaseTest.php
+++ b/lib/tests/phpunit/serializers/SerializerBaseTest.php
@@ -53,7 +53,12 @@
 *
 * @since 0.2
 */
-   public function testGetSerializedValid( $input, array $expected = null, 
SerializationOptions $options = null ) {
+   public function testGetSerializedValid(
+   $input,
+   array $expected = null,
+   SerializationOptions $options = null,
+   $normalizedInput = null
+   ) {
$serializer = $this-getInstance();
 
if ( $options !== null ) {
@@ -69,6 +74,9 @@
 
if ( $serializer instanceof Unserializer ) {
$roundtrippedValue = $serializer-newFromSerialization( 
$output );
+   if( !is_null( $normalizedInput ) ) {
+   $input = $normalizedInput;
+   }
$this-assertMeaningfulEquals( $input, 
$roundtrippedValue, 'getSerialized, getUnserialized roundtrip should result in 
input value' );
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I36f5a98a443c4a1f1ba9e5e85cc3de676f812637
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix validation of snakhash parameter - change (mediawiki...Wikibase)

2013-09-20 Thread Daniel Kinzler (Code Review)
Daniel Kinzler has uploaded a new change for review.

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


Change subject: Fix validation of snakhash parameter
..

Fix validation of snakhash parameter

Change-Id: Ib57c03fe8522f5cfb637f371423e1f93b331fa3a
---
M repo/includes/api/SetQualifier.php
1 file changed, 3 insertions(+), 4 deletions(-)


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

diff --git a/repo/includes/api/SetQualifier.php 
b/repo/includes/api/SetQualifier.php
index bc0bbe1..1614dfd 100644
--- a/repo/includes/api/SetQualifier.php
+++ b/repo/includes/api/SetQualifier.php
@@ -3,7 +3,6 @@
 namespace Wikibase\Api;
 
 use ApiBase;
-use Wikibase\Entity;
 use Wikibase\Claim;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\ChangeOpQualifier;
@@ -44,7 +43,7 @@
$claim = $this-claimModificationHelper-getClaimFromEntity( 
$params['claim'], $entity );
 
if ( isset( $params['snakhash'] ) ) {
-   $this-validateReferenceHash( $claim, 
$params['snakhash'] );
+   $this-validateQualifierHash( $claim, 
$params['snakhash'] );
}
 
$changeOp = $this-getChangeOp();
@@ -95,8 +94,8 @@
 * @param string $qualifierHash
 */
protected function validateQualifierHash( Claim $claim, $qualifierHash 
) {
-   if ( !$claim-getReferences()-hasReferenceHash( $qualifierHash 
) ) {
-   $this-dieUsage( Claim does not have a qualifier with 
the given hash , 'no-such-reference' );
+   if ( !$claim-getQualifiers()-hasSnakHash( $qualifierHash ) ) {
+   $this-dieUsage( Claim does not have a qualifier with 
the given hash , 'no-such-qualifier' );
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib57c03fe8522f5cfb637f371423e1f93b331fa3a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Kinzler daniel.kinz...@wikimedia.de

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


[MediaWiki-commits] [Gerrit] Better error reporting for GCC - change (operations...incremental)

2013-09-20 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

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


Change subject: Better error reporting for GCC
..

Better error reporting for GCC

Change-Id: Icab577fcc7a61e1570dbb884a9e602d603cdf76f
---
M main.cpp
1 file changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/89/85189/1

diff --git a/main.cpp b/main.cpp
index 26fba7c..78e5b16 100644
--- a/main.cpp
+++ b/main.cpp
@@ -285,8 +285,31 @@
 diffReader.Read();
 }
 
+#ifdef __GNUC__
+void terminate_handler()
+{
+void** buffer = new void*[50];
+int count = backtrace(buffer, 50);
+backtrace_symbols_fd(buffer, count, STDERR_FILENO);
+
+auto ptr = std::current_exception();
+try
+{
+std::rethrow_exception(ptr);
+}
+catch (std::exception p)
+{
+std::cerr  p.what()  \n;
+}
+}
+#endif
+
 int main(int argc, const char* argv[])
 {
+#ifdef __GNUC__
+std::set_terminate(terminate_handler);
+#endif
+
 if (argc == 1)
 {
 printUsage();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icab577fcc7a61e1570dbb884a9e602d603cdf76f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/incremental
Gerrit-Branch: gsoc
Gerrit-Owner: Petr Onderka gsv...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert Made SnakList/Reference order-aware - change (mediawiki...WikibaseDataModel)

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

Change subject: Revert Made SnakList/Reference order-aware
..


Revert Made SnakList/Reference order-aware

This reverts commit c9a830440a61e6d41c9deb64fee2c76dd0987a8f.

Change-Id: I38f1990375b11b26d30d4c51797d5a4f3cff660f
---
M DataModel/Reference.php
M DataModel/Snak/SnakList.php
M tests/phpunit/ReferenceTest.php
M tests/phpunit/Snak/SnakListTest.php
4 files changed, 6 insertions(+), 200 deletions(-)

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



diff --git a/DataModel/Reference.php b/DataModel/Reference.php
index cca512c..b8f6e8f 100644
--- a/DataModel/Reference.php
+++ b/DataModel/Reference.php
@@ -65,14 +65,7 @@
 * @return string
 */
public function getHash() {
-   // For considering the reference snaks' property order without 
actually manipulating the
-   // reference snaks's order, a new SnakList is generated. The 
new SnakList is ordered
-   // by property and its hash is returned.
-   $orderedSnaks = new SnakList( $this-snaks );
-
-   $orderedSnaks-orderByProperty();
-
-   return $orderedSnaks-getHash();
+   return $this-snaks-getHash();
}
 
/**
diff --git a/DataModel/Snak/SnakList.php b/DataModel/Snak/SnakList.php
index 66d2619..5ba78cf 100644
--- a/DataModel/Snak/SnakList.php
+++ b/DataModel/Snak/SnakList.php
@@ -102,49 +102,6 @@
}
 
/**
-* @see HashArray::getHash
-*
-* @since 0.5
-*
-* @return string
-*/
-   public function getHash() {
-   $args = func_get_args();
-
-   /**
-* @var MapHasher $hasher
-*/
-   $hasher = array_key_exists( 0, $args ) ? $args[0] : new 
MapValueHasher( true );
-
-   return parent::getHash( $hasher );
-   }
-
-   /**
-* Orders the snaks in the list grouping them by property.
-*
-* @since 0.5
-*/
-   public function orderByProperty() {
-   $snaksByProperty = array();
-
-   foreach( $this as $snak ) {
-   $propertyId = 
$snak-getPropertyId()-getSerialization();
-
-   if( !isset( $snaksByProperty[$propertyId] ) ) {
-   $snaksByProperty[$propertyId] = array();
-   }
-   $snaksByProperty[$propertyId][] = $snak;
-   }
-
-   foreach( $snaksByProperty as $snaks ) {
-   foreach( $snaks as $snak ) {
-   $this-removeSnak( $snak );
-   $this-addSnak( $snak );
-   }
-   }
-   }
-
-   /**
 * @see Snaks::toArray
 *
 * @since 0.3
diff --git a/tests/phpunit/ReferenceTest.php b/tests/phpunit/ReferenceTest.php
index 3fe5925..3d02be9 100644
--- a/tests/phpunit/ReferenceTest.php
+++ b/tests/phpunit/ReferenceTest.php
@@ -3,10 +3,6 @@
 namespace Wikibase\Test;
 
 use DataValues\StringValue;
-use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Property;
-use Wikibase\PropertyNoValueSnak;
-use Wikibase\PropertySomeValueSnak;
 use Wikibase\PropertyValueSnak;
 use Wikibase\Reference;
 use Wikibase\SnakList;
@@ -36,13 +32,13 @@
$snakLists[] = new SnakList();
 
$snakLists[] = new SnakList(
-   array( new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
+   array( new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
);
 
$snakLists[] = new SnakList( array(
-   new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
-   new PropertySomeValueSnak( new EntityId( 
Property::ENTITY_TYPE, 2 ) ),
-   new PropertyNoValueSnak( new EntityId( 
Property::ENTITY_TYPE, 3 ) )
+   new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
+   new \Wikibase\PropertySomeValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 2 ) ),
+   new \Wikibase\PropertyNoValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 3 ) )
) );
 
$argLists = array();
@@ -60,7 +56,7 @@
$references[] = new Reference();
 
$references[] = new Reference( new SnakList( array( new 
PropertyValueSnak(
-   new EntityId( Property::ENTITY_TYPE, 1 ),
+   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ),
new 

[MediaWiki-commits] [Gerrit] Ensure populate sites works for updating existing sites - change (mediawiki...Wikibase)

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

Change subject: Ensure populate sites works for updating existing sites
..


Ensure populate sites works for updating existing sites

also:

* add 'en' as language code for special sites,
parts of wikibase depend on there being a language
for all sites.
* improve site matrix parser test

Change-Id: I2f50f40d0a796f03ef78c524bca63018595207e5
---
M lib/includes/sites/SiteMatrixParser.php
M lib/includes/sites/SitesBuilder.php
M lib/maintenance/populateSitesTable.php
M lib/tests/phpunit/sites/SiteMatrixParserTest.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
5 files changed, 86 insertions(+), 59 deletions(-)

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



diff --git a/lib/includes/sites/SiteMatrixParser.php 
b/lib/includes/sites/SiteMatrixParser.php
index df3020b..ffdc559 100644
--- a/lib/includes/sites/SiteMatrixParser.php
+++ b/lib/includes/sites/SiteMatrixParser.php
@@ -94,8 +94,12 @@
 
foreach( $specialSites as $specialSite ) {
$site = $this-getSiteFromSiteData( $specialSite );
-   $siteId= $site-getGlobalId();
-   $sites[$siteId] = $this-getSiteFromSiteData( 
$specialSite );
+   $siteId = $site-getGlobalId();
+
+   // todo: get this from $wgConf
+   $site-setLanguageCode( 'en' );
+
+   $sites[$siteId] = $site;
}
 
return $sites;
@@ -138,13 +142,13 @@
 
// @note: expandGroup is specific to wikimedia site matrix 
sources
$siteGroup = ( $this-expandGroup  $siteData['code'] === 
'wiki' )
-? 'wikipedia' : $siteData['code'];
+   ? 'wikipedia' : $siteData['code'];
 
$site-setGroup( $siteGroup );
 
$url = $siteData['url'];
 
-   if ( $this-stripProtocol === 'stripProtocol' ) {
+   if ( $this-stripProtocol ) {
$url = preg_replace( '@^https?:@', '', $url );
}
 
diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index 4857e50..50e0455 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -29,7 +29,17 @@
public function buildStore( array $sites, $siteGroup, $wikiId ) {
$sites = $this-addInterwikiIdsToGroup( $sites, $siteGroup, 
$wikiId );
 
-   $this-store-getSites( nocache );
+   $existingSites = $this-store-getSites( nocache );
+
+   foreach( $sites as $site ) {
+   $siteId = $site-getGlobalId();
+
+   if ( $existingSites-hasSite( $siteId ) ) {
+   $existingSite = $existingSites-getSite( 
$siteId );
+   $site-setInternalId( 
$existingSite-getInternalId() );
+   }
+   }
+
$this-store-saveSites( $sites );
}
 
diff --git a/lib/maintenance/populateSitesTable.php 
b/lib/maintenance/populateSitesTable.php
index 080bb82..cb48a36 100644
--- a/lib/maintenance/populateSitesTable.php
+++ b/lib/maintenance/populateSitesTable.php
@@ -37,7 +37,7 @@
}
 
public function execute() {
-   $stripProtocols = $this-getOption( 'strip-protocols' ) ? 
stripProtocol : false;
+   $stripProtocols = $this-getOption( 'strip-protocols', false );
$url = $this-getOption( 'load-from', 
'https://meta.wikimedia.org/w/api.php' );
$scriptPath = $this-getOption( 'script-path', '/w/$1' );
$articlePath = $this-getOption( 'article-path', '/wiki/$1' );
@@ -78,7 +78,7 @@
$json = Http::get( $url, 'default', array( 'raiseException' = 
true ) );
 
if ( !$json ) {
-   throw new MWException( Got no data from $url );
+   throw new MWException( Got no data from $url\n );
}
 
return $json;
diff --git a/lib/tests/phpunit/sites/SiteMatrixParserTest.php 
b/lib/tests/phpunit/sites/SiteMatrixParserTest.php
index 3483efa..a1ef2bb 100644
--- a/lib/tests/phpunit/sites/SiteMatrixParserTest.php
+++ b/lib/tests/phpunit/sites/SiteMatrixParserTest.php
@@ -3,7 +3,7 @@
 /**
  * @covers SiteMatrixParser
  *
- * @since 0.1
+ * @since 0.5
  *
  * @group Wikibase
  *
@@ -15,20 +15,31 @@
/**
 * @dataProvider sitesFromJsonProvider
 */
-   public function testSitesFromJson( $json, $expected ) {
-   $siteMatrixParser = new SiteMatrixParser( '/w/$1', '/wiki/$1', 
false );
+   public function testSitesFromJson( $scriptPath, $articlePath, $expected 
) {
+   $json = $this-getSiteMatrixJson();
+
+   $siteMatrixParser = new SiteMatrixParser( 

[MediaWiki-commits] [Gerrit] Fix misc::maintenance::updatequerypages duplicate cronjobs - change (operations/puppet)

2013-09-20 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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


Change subject: Fix misc::maintenance::updatequerypages duplicate cronjobs
..

Fix misc::maintenance::updatequerypages duplicate cronjobs

Let's not redeclare the same cronjobs 6 times. Puppet died out of confusion.
Followup to Ic453d6e47c8548ea164fde9e95435fce6e503b27

Change-Id: I0a5d86034f8eff038589a742e52147f91d100527
---
M manifests/misc/maintenance.pp
1 file changed, 17 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/92/85192/1

diff --git a/manifests/misc/maintenance.pp b/manifests/misc/maintenance.pp
index 8c111b1..870209a 100644
--- a/manifests/misc/maintenance.pp
+++ b/manifests/misc/maintenance.pp
@@ -475,10 +475,20 @@
   default = absent
 };
 }
+}
+
+define updatequerypages::enwiki::cronjob() {
+
+Cron {
+user = mwdeploy,
+hour = 1,
+minute = 0,
+}
 
 cron { cron-updatequerypages-lonelypages-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Lonelypages  
/home/mwdeploy/updateSpecialPages/${name}-LonelyPages.log 21,
 month = [1, 7],
+monthday = 18,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -489,6 +499,7 @@
 cron { cron-updatequerypages-mostcategories-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Mostcategories  
/home/mwdeploy/updateSpecialPages/${name}-MostCategories.log 21,
 month = [2, 8],
+monthday = 19,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -499,6 +510,7 @@
 cron { cron-updatequerypages-mostlinkedcategories-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Mostlinkedcategories  
/home/mwdeploy/updateSpecialPages/${name}-MostLinkedCategories.log 21,
 month = [3, 9],
+monthday = 20,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -509,6 +521,7 @@
 cron { cron-updatequerypages-mostlinkedtemplates-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Mostlinkedtemplates  
/home/mwdeploy/updateSpecialPages/${name}-MostLinkedTemplates.log 21,
 month = [4, 10],
+monthday = 21,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -519,6 +532,7 @@
 cron { cron-updatequerypages-uncategorizedcategories-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Uncategorizedcategories  
/home/mwdeploy/updateSpecialPages/${name}-UncategorizedCategories.log 21,
 month = [5, 11],
+monthday = 22,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -529,6 +543,7 @@
 cron { cron-updatequerypages-wantedtemplates-s1:
 command = /usr/local/bin/mwscriptwikiset 
updateSpecialPages.php s1.dblist --override --only=Wantedtemplates  
/home/mwdeploy/updateSpecialPages/${name}-WantedTemplates.log 21,
 month = [6, 12],
+monthday = 23,
 ensure = $enabled ?{
   true = present,
   false = absent,
@@ -538,5 +553,6 @@
 }
 
 # add cron jobs - usage: cluster@day of month
-updatequerypages::cronjob { ['s1@11', 's2@12', 's3@13', 's4@14', 
's5@15', 's6@16', 's7@17', 's1@18', 's1@19', 's1@20', 's1@21', 's1@22', 
's1@23']: }
+updatequerypages::cronjob { ['s1@11', 's2@12', 's3@13', 's4@14', 
's5@15', 's6@16', 's7@17']: }
+updatequerypages::enwiki::cronjob { updatequerypages-enwiki-disabled }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a5d86034f8eff038589a742e52147f91d100527
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Nemo bis federicol...@tiscali.it


[MediaWiki-commits] [Gerrit] Better error reporting for GCC - change (operations...incremental)

2013-09-20 Thread Petr Onderka (Code Review)
Petr Onderka has submitted this change and it was merged.

Change subject: Better error reporting for GCC
..


Better error reporting for GCC

Change-Id: Icab577fcc7a61e1570dbb884a9e602d603cdf76f
---
M main.cpp
1 file changed, 25 insertions(+), 0 deletions(-)

Approvals:
  Petr Onderka: Verified; Looks good to me, approved



diff --git a/main.cpp b/main.cpp
index 26fba7c..2baff49 100644
--- a/main.cpp
+++ b/main.cpp
@@ -285,8 +285,33 @@
 diffReader.Read();
 }
 
+#ifdef __GNUC__
+#include execinfo.h
+
+void terminate_handler()
+{
+void** buffer = new void*[50];
+int count = backtrace(buffer, 50);
+backtrace_symbols_fd(buffer, count, STDERR_FILENO);
+
+auto ptr = std::current_exception();
+try
+{
+std::rethrow_exception(ptr);
+}
+catch (std::exception p)
+{
+std::cerr  p.what()  \n;
+}
+}
+#endif
+
 int main(int argc, const char* argv[])
 {
+#ifdef __GNUC__
+std::set_terminate(terminate_handler);
+#endif
+
 if (argc == 1)
 {
 printUsage();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icab577fcc7a61e1570dbb884a9e602d603cdf76f
Gerrit-PatchSet: 2
Gerrit-Project: operations/dumps/incremental
Gerrit-Branch: gsoc
Gerrit-Owner: Petr Onderka gsv...@gmail.com
Gerrit-Reviewer: Petr Onderka gsv...@gmail.com

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


[MediaWiki-commits] [Gerrit] Revert debian glue triggers jobs by itself - change (integration/zuul-config)

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

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


Change subject: Revert debian glue triggers jobs by itself
..

Revert debian glue triggers jobs by itself

Putting it back so we get a nice status report in Gerrit.

This reverts commit f19f807a0b4ab32a1d311bc552aa07634b1a8615.

Change-Id: I12cee05f48ac7c96e833bb49af43cbd22cfc5b25
---
M layout.yaml
1 file changed, 7 insertions(+), 1 deletion(-)


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

diff --git a/layout.yaml b/layout.yaml
index 7a2198c..1519382 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -227,6 +227,10 @@
   # based on jenkins-debian-glue
   - name: ^.*-source$
 voting: false
+  - name: ^.*-binaries$
+voting: false
+  - name: ^.*-piuparts$
+voting: false
 
   - name: ^.*-erblint-HEAD$
 files:
@@ -547,7 +551,9 @@
   # Package building using jenkins-debian-glue
   - name: debian-glue
 test:
- - '{project}-source'
+ - '{project}-source':
+   - '{project}-binaries':
+ - '{project}-piuparts'
 
   # Template for MediaWiki extensions.
   # Does run the unit tests on 'test' and 'gate-and-submit'

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

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

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


[MediaWiki-commits] [Gerrit] Revert debian glue triggers jobs by itself - change (integration/zuul-config)

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

Change subject: Revert debian glue triggers jobs by itself
..


Revert debian glue triggers jobs by itself

Putting it back so we get a nice status report in Gerrit.

This reverts commit f19f807a0b4ab32a1d311bc552aa07634b1a8615.

Change-Id: I12cee05f48ac7c96e833bb49af43cbd22cfc5b25
---
M layout.yaml
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/layout.yaml b/layout.yaml
index 7a2198c..1519382 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -227,6 +227,10 @@
   # based on jenkins-debian-glue
   - name: ^.*-source$
 voting: false
+  - name: ^.*-binaries$
+voting: false
+  - name: ^.*-piuparts$
+voting: false
 
   - name: ^.*-erblint-HEAD$
 files:
@@ -547,7 +551,9 @@
   # Package building using jenkins-debian-glue
   - name: debian-glue
 test:
- - '{project}-source'
+ - '{project}-source':
+   - '{project}-binaries':
+ - '{project}-piuparts'
 
   # Template for MediaWiki extensions.
   # Does run the unit tests on 'test' and 'gate-and-submit'

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

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

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


[MediaWiki-commits] [Gerrit] Revert Revert Made SnakList/Reference order-aware - change (mediawiki...WikibaseDataModel)

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

Change subject: Revert Revert Made SnakList/Reference order-aware
..


Revert Revert Made SnakList/Reference order-aware

This reverts commit 4ca5b5134bfdc85493284263321cd445ae039aba.

Change-Id: Ieccf758b249fb95daaffdc8d0f79b08f98d17b4f
---
M DataModel/Reference.php
M DataModel/Snak/SnakList.php
M tests/phpunit/ReferenceTest.php
M tests/phpunit/Snak/SnakListTest.php
4 files changed, 200 insertions(+), 6 deletions(-)

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



diff --git a/DataModel/Reference.php b/DataModel/Reference.php
index b8f6e8f..cca512c 100644
--- a/DataModel/Reference.php
+++ b/DataModel/Reference.php
@@ -65,7 +65,14 @@
 * @return string
 */
public function getHash() {
-   return $this-snaks-getHash();
+   // For considering the reference snaks' property order without 
actually manipulating the
+   // reference snaks's order, a new SnakList is generated. The 
new SnakList is ordered
+   // by property and its hash is returned.
+   $orderedSnaks = new SnakList( $this-snaks );
+
+   $orderedSnaks-orderByProperty();
+
+   return $orderedSnaks-getHash();
}
 
/**
diff --git a/DataModel/Snak/SnakList.php b/DataModel/Snak/SnakList.php
index 5ba78cf..66d2619 100644
--- a/DataModel/Snak/SnakList.php
+++ b/DataModel/Snak/SnakList.php
@@ -102,6 +102,49 @@
}
 
/**
+* @see HashArray::getHash
+*
+* @since 0.5
+*
+* @return string
+*/
+   public function getHash() {
+   $args = func_get_args();
+
+   /**
+* @var MapHasher $hasher
+*/
+   $hasher = array_key_exists( 0, $args ) ? $args[0] : new 
MapValueHasher( true );
+
+   return parent::getHash( $hasher );
+   }
+
+   /**
+* Orders the snaks in the list grouping them by property.
+*
+* @since 0.5
+*/
+   public function orderByProperty() {
+   $snaksByProperty = array();
+
+   foreach( $this as $snak ) {
+   $propertyId = 
$snak-getPropertyId()-getSerialization();
+
+   if( !isset( $snaksByProperty[$propertyId] ) ) {
+   $snaksByProperty[$propertyId] = array();
+   }
+   $snaksByProperty[$propertyId][] = $snak;
+   }
+
+   foreach( $snaksByProperty as $snaks ) {
+   foreach( $snaks as $snak ) {
+   $this-removeSnak( $snak );
+   $this-addSnak( $snak );
+   }
+   }
+   }
+
+   /**
 * @see Snaks::toArray
 *
 * @since 0.3
diff --git a/tests/phpunit/ReferenceTest.php b/tests/phpunit/ReferenceTest.php
index 3d02be9..3fe5925 100644
--- a/tests/phpunit/ReferenceTest.php
+++ b/tests/phpunit/ReferenceTest.php
@@ -3,6 +3,10 @@
 namespace Wikibase\Test;
 
 use DataValues\StringValue;
+use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\Property;
+use Wikibase\PropertyNoValueSnak;
+use Wikibase\PropertySomeValueSnak;
 use Wikibase\PropertyValueSnak;
 use Wikibase\Reference;
 use Wikibase\SnakList;
@@ -32,13 +36,13 @@
$snakLists[] = new SnakList();
 
$snakLists[] = new SnakList(
-   array( new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
+   array( new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ) )
);
 
$snakLists[] = new SnakList( array(
-   new PropertyValueSnak( new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
-   new \Wikibase\PropertySomeValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 2 ) ),
-   new \Wikibase\PropertyNoValueSnak( new 
\Wikibase\EntityId( \Wikibase\Property::ENTITY_TYPE, 3 ) )
+   new PropertyValueSnak( new EntityId( 
Property::ENTITY_TYPE, 1 ), new StringValue( 'a' ) ),
+   new PropertySomeValueSnak( new EntityId( 
Property::ENTITY_TYPE, 2 ) ),
+   new PropertyNoValueSnak( new EntityId( 
Property::ENTITY_TYPE, 3 ) )
) );
 
$argLists = array();
@@ -56,7 +60,7 @@
$references[] = new Reference();
 
$references[] = new Reference( new SnakList( array( new 
PropertyValueSnak(
-   new \Wikibase\EntityId( 
\Wikibase\Property::ENTITY_TYPE, 1 ),
+   new EntityId( Property::ENTITY_TYPE, 1 ),
new 

[MediaWiki-commits] [Gerrit] Adding descriptions about whom the patch is assigned to - change (pywikibot/sf-export)

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

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


Change subject: Adding descriptions about whom the patch is assigned to
..

Adding descriptions about whom the patch is assigned to

Change-Id: I9f569fcfe07713ff38870bc05a035718d5d4299e
---
M sf.py
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/sf-export 
refs/changes/95/85195/1

diff --git a/sf.py b/sf.py
index 5b60f6f..0832d93 100644
--- a/sf.py
+++ b/sf.py
@@ -81,9 +81,11 @@
 return self.json['ticket']['status']
 
 def owner(self):
-if self.json['ticket']['assigned_to_id'] == null:
+if not self.json['ticket'].has_key('assigned_to'):
 return None
-return self.json['ticket']['assigned_to_id']
+if self.json['ticket']['assigned_to'] == null:
+return None
+return self.json['ticket']['assigned_to']
 
 def comments(self):
 for cmt in self.json['ticket']['discussion_thread']['posts']:
@@ -137,6 +139,9 @@
 t += 'Reported by: {0}\n'.format(self.reporter())
 t += 'Created on: 
{0}\n'.format(parse_ts(self.json['ticket']['created_date']))
 t += 'Subject: {0}\n'.format(self.summary())
+assignee = self.owner()
+if assignee:
+t += 'Assigned to: {0}\n'.format(assignee)
 if len(self.labels())  1:
 t+= 'Original labels: ' + ', '.join(self.labels())
 t += 'Original description:\n{0}\n'.format(self.description())

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

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

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


[MediaWiki-commits] [Gerrit] Fixed exception when reading near end of stream - change (operations...incremental)

2013-09-20 Thread Petr Onderka (Code Review)
Petr Onderka has uploaded a new change for review.

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


Change subject: Fixed exception when reading near end of stream
..

Fixed exception when reading near end of stream

Change-Id: I13e04af52d293cbb5aff78521a2c56e2771ed3e1
---
M XmlInput/WrapperInputStream.h
M main.cpp
2 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps/incremental 
refs/changes/96/85196/1

diff --git a/XmlInput/WrapperInputStream.h b/XmlInput/WrapperInputStream.h
index ea11593..e9d8426 100644
--- a/XmlInput/WrapperInputStream.h
+++ b/XmlInput/WrapperInputStream.h
@@ -21,6 +21,13 @@
 wrapped.read(buf, bufLen);
 auto count = wrapped.gcount();
 
+if (!wrapped.good())
+{
+// failure that's not end of stream
+if (!wrapped.eof()  wrapped.fail())
+throw DumpException(Reading from stream failed.);
+}
+
 if (sideAction != nullptr)
 sideAction(count);
 
diff --git a/main.cpp b/main.cpp
index 2baff49..caddb02 100644
--- a/main.cpp
+++ b/main.cpp
@@ -211,13 +211,13 @@
 
 if (inputFileName == -)
 {
-std::cin.exceptions(std::ios::failbit | std::ios::badbit);
+std::cin.exceptions(std::ios::badbit);
 createDumpCore(progressWriter, std::cin);
 }
 else
 {
 std::ifstream stream(inputFileName, std::ios::binary);
-stream.exceptions(std::ios::failbit | std::ios::badbit);
+stream.exceptions(std::ios::badbit);
 createDumpCore(progressWriter, stream);
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I13e04af52d293cbb5aff78521a2c56e2771ed3e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/incremental
Gerrit-Branch: gsoc
Gerrit-Owner: Petr Onderka gsv...@gmail.com

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


[MediaWiki-commits] [Gerrit] Fixed exception when reading near end of stream - change (operations...incremental)

2013-09-20 Thread Petr Onderka (Code Review)
Petr Onderka has submitted this change and it was merged.

Change subject: Fixed exception when reading near end of stream
..


Fixed exception when reading near end of stream

Change-Id: I13e04af52d293cbb5aff78521a2c56e2771ed3e1
---
M XmlInput/WrapperInputStream.h
M main.cpp
2 files changed, 9 insertions(+), 2 deletions(-)

Approvals:
  Petr Onderka: Verified; Looks good to me, approved



diff --git a/XmlInput/WrapperInputStream.h b/XmlInput/WrapperInputStream.h
index ea11593..e9d8426 100644
--- a/XmlInput/WrapperInputStream.h
+++ b/XmlInput/WrapperInputStream.h
@@ -21,6 +21,13 @@
 wrapped.read(buf, bufLen);
 auto count = wrapped.gcount();
 
+if (!wrapped.good())
+{
+// failure that's not end of stream
+if (!wrapped.eof()  wrapped.fail())
+throw DumpException(Reading from stream failed.);
+}
+
 if (sideAction != nullptr)
 sideAction(count);
 
diff --git a/main.cpp b/main.cpp
index 2baff49..caddb02 100644
--- a/main.cpp
+++ b/main.cpp
@@ -211,13 +211,13 @@
 
 if (inputFileName == -)
 {
-std::cin.exceptions(std::ios::failbit | std::ios::badbit);
+std::cin.exceptions(std::ios::badbit);
 createDumpCore(progressWriter, std::cin);
 }
 else
 {
 std::ifstream stream(inputFileName, std::ios::binary);
-stream.exceptions(std::ios::failbit | std::ios::badbit);
+stream.exceptions(std::ios::badbit);
 createDumpCore(progressWriter, stream);
 }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I13e04af52d293cbb5aff78521a2c56e2771ed3e1
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps/incremental
Gerrit-Branch: gsoc
Gerrit-Owner: Petr Onderka gsv...@gmail.com
Gerrit-Reviewer: Petr Onderka gsv...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent naming collisions when generating unique reference n... - change (mediawiki...VisualEditor)

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

Change subject: Prevent naming collisions when generating unique reference names
..


Prevent naming collisions when generating unique reference names

Simply generating ':3' as the unique name for the 4th reference
doesn't work. Even if getUniqueListKey() had been used, that only
checks for conflicts with names that have already been encountered
(i.e. occur in ref tags that precede the current one), not for
conflicts with names that first occur further down in the document.

The solution is to generate names at serialization time, when we
have full knowledge of which names are in use. Internally, we use
'literal/name' for names that literally appeared in the source,
and 'auto/number' for unnamed references. Then at serialization
time, we translate 'auto/number' to 'literal/:number' if needed
(i.e. if the reference was reused).

ve.dm.MWReferenceNode.js:
* toDataElement()
** Prefix listKey with literal/ or auto/ as appropriate
* toDomElements()
** Map auto/ listKeys to unique names
** Don't try to unset the name if not present (was unsetting a property
   that didn't exist anyway)

ve.dm.InternalList.js:
* Remove now-unused isUniqueListKey()
* Rewrite getUniqueListKey()
** Make prefix configurable
** Take previously generated unique keys into account
** Map the same old key (auto/N) to the same generated key (literal/:M)
* Add getNextUniqueNumber() as a source for auto/N numbers: previously
  used the length of the itemHtmlQueue, but that only works during
  conversion, not from the UI dialog

ve.ui.MWReferenceDialog.js:
* For new references or conflicting names, generate an auto/N key and
  let toDomElements() deal with actually mapping that to name

ve.dm.InternalList.test.js:
* Rename listKeys to new style
* Split the test case into two groups so we can test multi-group cases
* Add tests for getUniqueListKey()

ve.dm.mwExample.js:
* Rename things to new style
* Modify the test case so it attempts to trigger bug 54341

Bug: 54341
Change-Id: I726fb83e6fb66ffec643d996768a854ec9474b3d
---
M modules/ve-mw/dm/nodes/ve.dm.MWReferenceNode.js
M modules/ve-mw/test/dm/ve.dm.InternalList.test.js
M modules/ve-mw/test/dm/ve.dm.mwExample.js
M modules/ve-mw/ui/dialogs/ve.ui.MWReferenceDialog.js
M modules/ve/dm/ve.dm.InternalList.js
5 files changed, 193 insertions(+), 105 deletions(-)

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



diff --git a/modules/ve-mw/dm/nodes/ve.dm.MWReferenceNode.js 
b/modules/ve-mw/dm/nodes/ve.dm.MWReferenceNode.js
index c471efe..b64b2c2 100644
--- a/modules/ve-mw/dm/nodes/ve.dm.MWReferenceNode.js
+++ b/modules/ve-mw/dm/nodes/ve.dm.MWReferenceNode.js
@@ -46,7 +46,8 @@
body = mwData.body ? mwData.body.html : '',
refGroup = mwData.attrs  mwData.attrs.group || '',
listGroup = this.name + '/' + refGroup,
-   listKey = mwData.attrs  mwData.attrs.name !== undefined ? 
mwData.attrs.name : ':' + converter.internalList.itemHtmlQueue.length,
+   autoKeyed = !mwData.attrs || mwData.attrs.name === undefined,
+   listKey = autoKeyed ? 'auto/' + 
converter.internalList.getNextUniqueNumber() : 'literal/' + mwData.attrs.name,
queueResult = converter.internalList.queueItemHtml( listGroup, 
listKey, body ),
listIndex = queueResult.index,
contentsUsed = ( body !== ''  queueResult.isNew );
@@ -69,7 +70,7 @@
 
 ve.dm.MWReferenceNode.static.toDomElements = function ( dataElement, doc, 
converter ) {
var itemNodeHtml, originalHtml, mwData, i, iLen, keyedNodes, 
setContents, contentsAlreadySet,
-   originalMw, childDomElements,
+   originalMw, childDomElements, listKeyParts, name,
el = doc.createElement( 'span' ),
itemNodeWrapper = doc.createElement( 'div' ),
itemNode = converter.internalList.getItemNode( 
dataElement.attributes.listIndex ),
@@ -131,16 +132,30 @@
}
}
 
-   // Set or clear key
-   if (
-   // We always assign unique keys. If the key hasn't be reused, 
then don't render it.
-   keyedNodes.length !== 1 ||
-   !ve.dm.InternalList.static.isUniqueListKey( 
dataElement.attributes.listKey )
-   ) {
-   ve.setProp( mwData, 'attrs', 'name', 
dataElement.attributes.listKey );
-   } else if ( mwData.attrs ) {
-   delete mwData.attrs.listKey;
+   // Generate name
+   listKeyParts = dataElement.attributes.listKey.match( 
/^(auto|literal)\/(.*)$/ );
+   if ( listKeyParts[1] === 'auto' ) {
+   // Only render a name if this key was reused
+   if ( keyedNodes.length  1 ) {
+   // Allocate a unique list key, then strip the 
'literal/'' prefix
+   name = 

[MediaWiki-commits] [Gerrit] LinkFilter: use wfMakeUrlIndexes in makeLikeArray - change (mediawiki/core)

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

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


Change subject: LinkFilter: use wfMakeUrlIndexes in makeLikeArray
..

LinkFilter: use wfMakeUrlIndexes in makeLikeArray

De-duplicate the link munging logic shared by wfMakeUrlIndexes
(used to index links in the first place) and LinkFilter::makeLikeArray
(used when searching for those links).  Searching for links with
a port number is now possible, as long as you specify the port
or a subdomain wildcard.  Also, searching for mailto links with
no @ sign now distinguishes between single domains and subdomains.

Change-Id: I5fbd90d4e925420ba76f16c80f6eeab097192561
---
M includes/LinkFilter.php
1 file changed, 30 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/85199/1

diff --git a/includes/LinkFilter.php b/includes/LinkFilter.php
index d552c69..0c8b8bb 100644
--- a/includes/LinkFilter.php
+++ b/includes/LinkFilter.php
@@ -90,10 +90,11 @@
 */
public static function makeLikeArray( $filterEntry, $prot = 'http://' ) 
{
$db = wfGetDB( DB_MASTER );
+   $entryNoStar = $filterEntry;
if ( substr( $filterEntry, 0, 2 ) == '*.' ) {
$subdomains = true;
-   $filterEntry = substr( $filterEntry, 2 );
-   if ( $filterEntry == '' ) {
+   $entryNoStar = substr( $filterEntry, 2 );
+   if ( $entryNoStar == '' ) {
// We don't want to make a clause that will 
match everything,
// that could be dangerous
return false;
@@ -104,45 +105,39 @@
// No stray asterisks, that could cause confusion
// It's not simple or efficient to handle it properly so we 
don't
// handle it at all.
-   if ( strpos( $filterEntry, '*' ) !== false ) {
+   if ( strpos( $entryNoStar, '*' ) !== false ) {
return false;
}
-   $slash = strpos( $filterEntry, '/' );
-   if ( $slash !== false ) {
-   $path = substr( $filterEntry, $slash );
-   $host = substr( $filterEntry, 0, $slash );
+   // Use wfMakeUrlIndexes to be consistent with the logic used to
+   // munge the links on their way into the database.  It has a
+   // funny way of handling mailto links, so we work around it.
+   if ( $prot == 'mailto:'  !strpos( $filterEntry, '@' ) ) {
+   $filterEntry = '@' . $filterEntry;
+   $mailtoDomain = true;
} else {
-   $path = '/';
-   $host = $filterEntry;
+   $mailtoDomain = false;
}
-   // Reverse the labels in the hostname, convert to lower case
-   // For emails reverse domainpart only
-   if ( $prot == 'mailto:'  strpos( $host, '@' ) ) {
-   // complete email address
-   $mailparts = explode( '@', $host );
-   $domainpart = strtolower( implode( '.', array_reverse( 
explode( '.', $mailparts[1] ) ) ) );
-   $host = $domainpart . '@' . $mailparts[0];
-   $like = array( $prot$host, $db-anyString() );
-   } elseif ( $prot == 'mailto:' ) {
-   // domainpart of email address only. do not add '.'
-   $host = strtolower( implode( '.', array_reverse( 
explode( '.', $host ) ) ) );
-   $like = array( $prot$host, $db-anyString() );
-   } else {
-   $host = strtolower( implode( '.', array_reverse( 
explode( '.', $host ) ) ) );
-   if ( substr( $host, -1, 1 ) !== '.' ) {
-   $host .= '.';
-   }
-   $like = array( $prot$host );
-
-   if ( $subdomains ) {
-   $like[] = $db-anyString();
-   }
-   if ( !$subdomains || $path !== '/' ) {
-   $like[] = $path;
-   $like[] = $db-anyString();
+   $munged = wfMakeUrlIndexes( $prot . $filterEntry )[0];
+   if ( $mailtoDomain ) {
+   $munged = str_replace( '.*@', '*', $munged );
+   $munged = str_replace( '@.', '@', $munged );
+   }
+   $munged = str_replace( '*.', '*', $munged );
+   // Preserve original trimming of bare '/' path if url
+   // had no slashes or just one at the end.
+   if ( $subdomains  substr( $munged, -1, 1 ) == '/' ) {
+ 

[MediaWiki-commits] [Gerrit] Remove some no longer needed scrutinizer config - change (mediawiki...Wikibase)

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

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


Change subject: Remove some no longer needed scrutinizer config
..

Remove some no longer needed scrutinizer config

Change-Id: Ic223ee9256fefca3d21ed6bded8735dbcc4ed7fd
---
M .scrutinizer.yml
1 file changed, 1 insertion(+), 7 deletions(-)


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

diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index b2511df..e455f06 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -2,13 +2,7 @@
 
 tools:
 php_code_coverage: false
-php_code_sniffer:
-enabled: true
-config:
-sniffs:
-squiz:
-php:
-commented_out_code_sniff: false
+php_code_sniffer: true
 php_cpd: true
 php_cs_fixer: true
 php_loc: true

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

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

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


[MediaWiki-commits] [Gerrit] Remove some no longer needed scrutinizer config - change (mediawiki...Wikibase)

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

Change subject: Remove some no longer needed scrutinizer config
..


Remove some no longer needed scrutinizer config

Change-Id: Ic223ee9256fefca3d21ed6bded8735dbcc4ed7fd
---
M .scrutinizer.yml
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved



diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index b2511df..e455f06 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -2,13 +2,7 @@
 
 tools:
 php_code_coverage: false
-php_code_sniffer:
-enabled: true
-config:
-sniffs:
-squiz:
-php:
-commented_out_code_sniff: false
+php_code_sniffer: true
 php_cpd: true
 php_cs_fixer: true
 php_loc: true

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

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

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


[MediaWiki-commits] [Gerrit] Remove some no longer needed scrutinizer config - change (mediawiki...SemanticMediaWiki)

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

Change subject: Remove some no longer needed scrutinizer config
..


Remove some no longer needed scrutinizer config

Change-Id: Iee0021cfe1b543d4f517eea47092aa0ef4077f8f
---
M .scrutinizer.yml
1 file changed, 1 insertion(+), 7 deletions(-)

Approvals:
  Jeroen De Dauw: Verified; Looks good to me, approved



diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index b2511df..e455f06 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -2,13 +2,7 @@
 
 tools:
 php_code_coverage: false
-php_code_sniffer:
-enabled: true
-config:
-sniffs:
-squiz:
-php:
-commented_out_code_sniff: false
+php_code_sniffer: true
 php_cpd: true
 php_cs_fixer: true
 php_loc: true

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

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

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


[MediaWiki-commits] [Gerrit] Remove some no longer needed scrutinizer config - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Remove some no longer needed scrutinizer config
..

Remove some no longer needed scrutinizer config

Change-Id: Iee0021cfe1b543d4f517eea47092aa0ef4077f8f
---
M .scrutinizer.yml
1 file changed, 1 insertion(+), 7 deletions(-)


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

diff --git a/.scrutinizer.yml b/.scrutinizer.yml
index b2511df..e455f06 100644
--- a/.scrutinizer.yml
+++ b/.scrutinizer.yml
@@ -2,13 +2,7 @@
 
 tools:
 php_code_coverage: false
-php_code_sniffer:
-enabled: true
-config:
-sniffs:
-squiz:
-php:
-commented_out_code_sniff: false
+php_code_sniffer: true
 php_cpd: true
 php_cs_fixer: true
 php_loc: true

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

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

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


[MediaWiki-commits] [Gerrit] fix testextensions clone destination - change (integration/jenkins-job-builder-config)

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

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


Change subject: fix testextensions clone destination
..

fix testextensions clone destination

When I have updated the defaults for MediaWiki extension, I tried to be
smart in reusing $ZUUL_PROJECT as the extension destination directory.
Since the extensions are prefixed in Gerrit with 'mediawiki/', they
ended up not being found.

Additionally, Jenkins does not seem to be properly wiping the workspaces
when trying the build.  Even if the change got deployed around 1am on
Sep 19th, most job still have an old checkout of the extension and thus
are more or less always testing the same patch.

The fix is to revert back the git destination to extensions/{ext-name}
as it was before 18a6caa88b56.

Updates all mwext-**-testextensions-master jobs.

Danke, Tobias und addshore, dass ihr dieses Problem gefunden habt. =)

Change-Id: I61e335ed5d906c8724679891e802fc1b0c6ae776
---
M defaults.yaml
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/defaults.yaml b/defaults.yaml
index 6fe2855..8b0b505 100644
--- a/defaults.yaml
+++ b/defaults.yaml
@@ -83,7 +83,10 @@
 branches:
  - '$ZUUL_COMMIT'
 refspec: '$ZUUL_REF'
-basedir: '$ZUUL_PROJECT'
+# Fetch under /extensions/
+# We can not use ZUUL_PROJECT there since the MediaWiki extensions
+# project names are prefixed with 'mediawiki/' in Gerrit.
+basedir: 'extensions/{ext-name}'
 
 wrappers:
   - timeout:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I61e335ed5d906c8724679891e802fc1b0c6ae776
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr

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


[MediaWiki-commits] [Gerrit] Use the API to retrieve redirects to the category redirect t... - change (pywikibot/core)

2013-09-20 Thread Russell Blau (Code Review)
Russell Blau has uploaded a new change for review.

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


Change subject: Use the API to retrieve redirects to the category redirect 
template (this time with caching)
..

Use the API to retrieve redirects to the category redirect template
(this time with caching)

Change-Id: I7af283b3b7a18bd713627cb5f1d8667773e3f3c6
---
M pywikibot/families/wikipedia_family.py
M pywikibot/family.py
2 files changed, 24 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/03/85203/1

diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 9e57685..d35d4e9 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -54,11 +54,7 @@
 'arz': (u'تحويل تصنيف',),
 'cs': (u'Zastaralá kategorie',),
 'da': (u'Kategoriomdirigering',),
-'en': (u'Category redirect',
-   u'Category Redirect',
-   uCategoryredirect,
-   u'Catredirect',
-   u'Cat redirect',),
+'en': (u'Category redirect',),
 'es': (u'Categoría redirigida',),
 'eu': (u'Kategoria redirect',),
 'fa': (u'رده بهتر',
diff --git a/pywikibot/family.py b/pywikibot/family.py
index 88eb3d3..291f523 100644
--- a/pywikibot/family.py
+++ b/pywikibot/family.py
@@ -545,7 +545,6 @@
 }
 
 # A list of category redirect template names in different languages
-# Note: It *is* necessary to list template redirects here
 self.category_redirect_templates = {
 '_default': []
 }
@@ -750,15 +749,34 @@
 % {'language_code': code})
 
 def category_redirects(self, code, fallback=_default):
-if code in self.category_redirect_templates:
-return self.category_redirect_templates[code]
-elif fallback:
-return self.category_redirect_templates[fallback]
+if not hasattr(self, _catredirtemplates) or code not in 
self._catredirtemplates:
+self.get_cr_templates(code, fallback)
+if code in self._catredirtemplates:
+return self._catredirtemplates[code]
 else:
 raise KeyError(
 ERROR: title for category redirect template in language '%s' unknown
 % code)
 
+def get_cr_templates(self, code, fallback):
+if not hasattr(self, _catredirtemplates):
+self._catredirtemplates={}
+if code in self.category_redirect_templates:
+cr_template = self.category_redirect_templates[code][0]
+else:
+cr_template = self.category_redirect_templates[fallback][0]
+# start with list of category redirect templates from family file
+cr_page = pywikibot.Page(pywikibot.Site(code, self),
+ Template: + cr_template)
+cr_list = list(self.category_redirect_templates[code])
+# retrieve all redirects to primary template from API,
+# add any that are not already on the list
+for t in cr_page.backlinks(filterRedirects=True, namespaces=10):
+newtitle = t.title(withNamespace=False)
+if newtitle not in cr_list:
+cr_list.append(newtitle)
+self._catredirtemplates[code] = cr_list
+
 def disambig(self, code, fallback='_default'):
 if code in self.disambiguationTemplates:
 return self.disambiguationTemplates[code]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7af283b3b7a18bd713627cb5f1d8667773e3f3c6
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Russell Blau russb...@imapmail.org

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


[MediaWiki-commits] [Gerrit] fix testextensions clone destination - change (integration/jenkins-job-builder-config)

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

Change subject: fix testextensions clone destination
..


fix testextensions clone destination

When I have updated the defaults for MediaWiki extension, I tried to be
smart in reusing $ZUUL_PROJECT as the extension destination directory.
Since the extensions are prefixed in Gerrit with 'mediawiki/', they
ended up not being found.

Additionally, Jenkins does not seem to be properly wiping the workspaces
when trying the build.  Even if the change got deployed around 1am on
Sep 19th, most job still have an old checkout of the extension and thus
are more or less always testing the same patch.

The fix is to revert back the git destination to extensions/{ext-name}
as it was before 18a6caa88b56.

Updates all mwext-**-testextensions-master jobs.

Danke, Tobias und addshore, dass ihr dieses Problem gefunden habt. =)

Change-Id: I61e335ed5d906c8724679891e802fc1b0c6ae776
---
M defaults.yaml
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/defaults.yaml b/defaults.yaml
index 6fe2855..8b0b505 100644
--- a/defaults.yaml
+++ b/defaults.yaml
@@ -83,7 +83,10 @@
 branches:
  - '$ZUUL_COMMIT'
 refspec: '$ZUUL_REF'
-basedir: '$ZUUL_PROJECT'
+# Fetch under /extensions/
+# We can not use ZUUL_PROJECT there since the MediaWiki extensions
+# project names are prefixed with 'mediawiki/' in Gerrit.
+basedir: 'extensions/{ext-name}'
 
 wrappers:
   - timeout:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61e335ed5d906c8724679891e802fc1b0c6ae776
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins-job-builder-config
Gerrit-Branch: master
Gerrit-Owner: Hashar has...@free.fr
Gerrit-Reviewer: Addshore addshorew...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Only listen for copy/paste on documentNode and pasteTarget - change (mediawiki...VisualEditor)

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

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


Change subject: Only listen for copy/paste on documentNode and pasteTarget
..

Only listen for copy/paste on documentNode and pasteTarget

As these are the only places we want to override the events.

Bug: 54375
Change-Id: I8a4e207f38508cdaf35cd869f267dd9f1059c83d
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 7 insertions(+), 9 deletions(-)


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

diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 99c59ff..5eadc52 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -60,24 +60,22 @@
 
$documentNode = this.documentView.getDocumentNode().$;
$documentNode.on( {
+   'cut': ve.bind( this.onCut, this ),
+   'copy': ve.bind( this.onCopy, this ),
'focus': ve.bind( this.documentOnFocus, this ),
'blur': ve.bind( this.documentOnBlur, this )
} );
+   this.$pasteTarget.on( {
+   'cut': ve.bind( this.onCut, this ),
+   'copy': ve.bind( this.onCopy, this )
+   } );
+   $documentNode.on( $.browser.msie ? 'beforepaste' : 'paste', ve.bind( 
this.onPaste, this ) );
$documentNode.on( 'focus', 'a', function () {
// Opera triggers 'blur' on document node before any link is
// focused and we don't want that
$documentNode.focus();
} );
 
-   this.$document.on( {
-   'cut': ve.bind( this.onCut, this ),
-   'copy': ve.bind( this.onCopy, this )
-   } );
-   if ( $.browser.msie ) {
-   this.$document.on( 'beforepaste', ve.bind( this.onPaste, this ) 
);
-   } else {
-   this.$document.on( 'paste', ve.bind( this.onPaste, this ) );
-   }
this.$.on( {
'dragover': ve.bind( this.onDocumentDragOver, this ),
'drop': ve.bind( this.onDocumentDrop, this )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a4e207f38508cdaf35cd869f267dd9f1059c83d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Added zoom buttons to the toolbar. - change (mediawiki...ProofreadPage)

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

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


Change subject: Added zoom buttons to the toolbar.
..

Added zoom buttons to the toolbar.

Change-Id: I26d017b1f4556efb83eeb1aa924e1b7e72118dfe
---
M modules/ext.proofreadpage.page/ext.proofreadpage.page.js
A modules/ext.proofreadpage.page/images/Button_pan_down.png
A modules/ext.proofreadpage.page/images/Button_pan_left.png
A modules/ext.proofreadpage.page/images/Button_pan_right.png
A modules/ext.proofreadpage.page/images/Button_pan_up.png
5 files changed, 129 insertions(+), 0 deletions(-)


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

diff --git a/modules/ext.proofreadpage.page/ext.proofreadpage.page.js 
b/modules/ext.proofreadpage.page/ext.proofreadpage.page.js
index 03011e2..c535a71 100644
--- a/modules/ext.proofreadpage.page/ext.proofreadpage.page.js
+++ b/modules/ext.proofreadpage.page/ext.proofreadpage.page.js
@@ -29,11 +29,139 @@
} );
 }
 
+function prAddButtons() {
+   if( proofreadPageIsEdit ) {
+   var tools = {
+   'section': 'proofreadpage-tools',
+   'groups': {
+   'zoom': {
+   'label': mw.msg( 
'proofreadpage-group-zoom' ),
+   'tools': {
+   'zoom-in': {
+   label: mw.msg( 
'proofreadpage-button-zoom-in-label' ),
+   type: 'button',
+   icon: 
mw.config.get( 'wgExtensionAssetsPath' ) + 
'/ProofreadPage/modules/ext.proofreadpage.page/images/Button_zoom_in.png',
+   action: {
+   type: 
'callback',
+   
execute: function() {
+   }
+   }
+   },
+   'zoom-out': {
+   label: mw.msg( 
'proofreadpage-button-zoom-out-label' ),
+   type: 'button',
+   icon: 
mw.config.get( 'wgExtensionAssetsPath' ) + 
'/ProofreadPage/modules/ext.proofreadpage.page/images/Button_zoom_out.png',
+   action: {
+   type: 
'callback',
+   
execute: function() {
+   }
+   }
+   },
+   'reset-zoom': {
+   label: mw.msg( 
'proofreadpage-button-reset-zoom-label' ),
+   type: 'button',
+   icon: 
mw.config.get( 'wgExtensionAssetsPath' ) + 
'/ProofreadPage/modules/ext.proofreadpage.page/images/Button_examine.png',
+   action: {
+   type: 
'callback',
+   
execute: function() {
+   }
+   }
+   },
+   'pan-up': {
+   label: mw.msg( 
'proofreadpage-button-pan-up-label' ),
+   type: 'button',
+   icon: 
mw.config.get( 'wgExtensionAssetsPath' ) + 
'/ProofreadPage/modules/ext.proofreadpage.page/images/Button_pan_up.png',
+   action: {
+   type: 
'callback',
+   
execute: function() {
+

[MediaWiki-commits] [Gerrit] Highlight changed words in suggestions. - change (mediawiki...CirrusSearch)

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

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


Change subject: Highlight changed words in suggestions.
..

Highlight changed words in suggestions.

Bug: 52286
Change-Id: Ib0b6af9766896e826517cf5f9f9632a09e377cbe
---
M CirrusSearchSearcher.php
1 file changed, 44 insertions(+), 10 deletions(-)


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

diff --git a/CirrusSearchSearcher.php b/CirrusSearchSearcher.php
index 2afb534..f132635 100644
--- a/CirrusSearchSearcher.php
+++ b/CirrusSearchSearcher.php
@@ -21,6 +21,8 @@
 class CirrusSearchSearcher {
const PHRASE_TITLE = 'phrase_title';
const PHRASE_TEXT = 'phrase_text';
+   const SUGGESTION_HIGHLIGHT_PRE = 'em';
+   const SUGGESTION_HIGHLIGHT_POST = '/em';
const HIGHLIGHT_PRE = 'span class=searchmatch';
const HIGHLIGHT_POST = '/span';
 
@@ -186,6 +188,10 @@
'suggest_mode' 
= 'always', // Forces us to generate lots of phrases to try.
),
),
+   'highlight' = array(
+   'pre_tag' = 
self::SUGGESTION_HIGHLIGHT_PRE,
+   'post_tag' = 
self::SUGGESTION_HIGHLIGHT_POST,
+   ),
)
),
self::PHRASE_TEXT = array(
@@ -199,6 +205,10 @@
'field' = 
'text.suggest',
'suggest_mode' 
= 'always', // Forces us to generate lots of phrases to try.
),
+   ),
+   'highlight' = array(
+   'pre_tag' = 
self::SUGGESTION_HIGHLIGHT_PRE,
+   'post_tag' = 
self::SUGGESTION_HIGHLIGHT_POST,
),
)
)
@@ -487,17 +497,27 @@
  * A set of results from Elasticsearch.
  */
 class CirrusSearchResultSet extends SearchResultSet {
+   /**
+* @var string|null lazy built escaped copy of 
CirrusSearchSearcher::SUGGESTION_HIGHLIGHT_PRE
+*/
+   private static $suggestionHighlightPreEscaped = null;
+   /**
+* @var string|null lazy built escaped copy of 
CirrusSearchSearcher::SUGGESTION_HIGHLIGHT_POST
+*/
+   private static $suggestionHighlightPostEscaped = null;
+
private $result, $hits, $totalHits, $suggestionQuery, 
$suggestionSnippet;
 
public function __construct( $res ) {
$this-result = $res;
$this-hits = $res-count();
$this-totalHits = $res-getTotalHits();
-   $this-suggestionQuery = $this-findSuggestionQuery();
-   $this-suggestionSnippet = 
$this-highlightingSuggestionSnippet();
+   $suggestion = $this-findSuggestion();
+   $this-suggestionQuery = $suggestion[ 'text' ];
+   $this-suggestionSnippet = self::escapeHighlightedSuggestion( 
$suggestion[ 'highlighted' ] );
}
 
-   private function findSuggestionQuery() {
+   private function findSuggestion() {
// TODO some kind of weighting?
$suggest = $this-result-getResponse()-getData();
if ( !array_key_exists( 'suggest', $suggest ) ) {
@@ -505,17 +525,29 @@
}
$suggest = $suggest[ 'suggest' ];
foreach ( $suggest[ CirrusSearchSearcher::PHRASE_TITLE ][ 0 ][ 
'options' ] as $option ) {
-   return $option[ 'text' ];
+   return $option;
}
foreach ( $suggest[ CirrusSearchSearcher::PHRASE_TEXT ][ 0 ][ 
'options' ] as $option ) {
-   return $option[ 'text' ];
+   return $option;
}
return null;
}
 
-   private function highlightingSuggestionSnippet() {
-   // TODO wrap the corrections in ems ES doesn't make this 
easy.
-   return $this-suggestionQuery;
+   /**
+* Escape a highlighted suggestion coming back from Elasticsearch.
+* @param $suggestion string suggestion from elasticsearch
+* @return string $suggestion with html escaped _except_ highlighting 
pre and post tags
+*/
+   private static function 

[MediaWiki-commits] [Gerrit] Tests for highlight changed words in suggestions. - change (mediawiki...CirrusSearch)

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

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


Change subject: Tests for highlight changed words in suggestions.
..

Tests for highlight changed words in suggestions.

Bug: 52286
Change-Id: I696434e9ec1694e72d62801299e2700a7e71ce8d
---
M tests/browser/features/full_text.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/support/pages/search_results_page.rb
3 files changed, 25 insertions(+), 18 deletions(-)


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

diff --git a/tests/browser/features/full_text.feature 
b/tests/browser/features/full_text.feature
index 560a799..296f317 100644
--- a/tests/browser/features/full_text.feature
+++ b/tests/browser/features/full_text.feature
@@ -61,15 +61,20 @@
 | incategory:  | Search results |
 | incategory:| Search results |
 
-  @setup_suggestions
-  Scenario Outline: Suggestions
-When I search for term
-Then suggestion is suggested
-  Examples:
-| term| suggestion  |
-| popular culatur | popular culture |
-| noble prize | nobel prize |
-| nobel prize | none|
+  @Setup_suggestions
+  Scenario: Common phrases spelled incorrectly get suggestions
+When I search for popular cultur
+Then popular *culture* is suggested
+
+  @Setup_suggestions
+  Scenario: Uncommon phrases spelled incorrectly get suggestions even if they 
contain words that are spelled correctly on their own
+When I search for noble prize
+Then *nobel* prize is suggested
+
+  @Setup_suggestions
+  Scenario: Uncommon phrases spelled correctly don't get suggestsions even if 
one of the words is very uncommon
+When I search for nobel prize
+Then there is no suggestion
 
   @setup_weight
   Scenario: Page weight include redirects
@@ -190,7 +195,7 @@
 When I search for Rescore Test Words
 Then Test Words Rescore Rescore is the first search result
 
-  # Note that other tests will catch this situration as well but this test 
should be pretty specific
+  # Note that other tests will catch this situation as well but this test 
should be pretty specific
   @setup_phrase_rescore
   Scenario: Searching for an unquoted phrase still prioritizes titles over text
 When I search for Rescore Test TextContent
diff --git a/tests/browser/features/step_definitions/search_steps.rb 
b/tests/browser/features/step_definitions/search_steps.rb
index d1a0109..f4488a8 100644
--- a/tests/browser/features/step_definitions/search_steps.rb
+++ b/tests/browser/features/step_definitions/search_steps.rb
@@ -197,11 +197,10 @@
   end
 end
 Then(/^(.*) is suggested$/) do |text|
-  if text == 'none' then
-on(SearchResultsPage).suggestion_element.should_not exist
-  else
-on(SearchResultsPage).suggestion.should == text
-  end
+  on(SearchResultsPage).highlighted_suggestion.should == text
+end
+Then(/^there is no suggestion$/) do
+  on(SearchResultsPage).suggestion_element.should_not exist
 end
 Then(/there are no errors reported$/) do
   on(SearchResultsPage).error_report_element.should_not exist
diff --git a/tests/browser/features/support/pages/search_results_page.rb 
b/tests/browser/features/support/pages/search_results_page.rb
index 76cc6c0..e3143a6 100644
--- a/tests/browser/features/support/pages/search_results_page.rb
+++ b/tests/browser/features/support/pages/search_results_page.rb
@@ -21,8 +21,8 @@
   def suggestion_element
 suggestion_wrapper_element.link_element
   end
-  def suggestion
-suggestion_element.text
+  def highlighted_suggestion
+get_highlighted_text(suggestion_element)
   end
   def results
 @browser.divs(:class = 'mw-search-result-heading')
@@ -40,6 +40,9 @@
 
   def get_highlighted_text(element)
 result = element.element.attribute_value('innerHTML').strip
-result.gsub('span class=searchmatch', '*').gsub('/span', '*')
+result.gsub('span class=searchmatch', '*').
+   gsub('/span', '*').
+   gsub('em', '*').
+   gsub('/em', '*')
   end
 end

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

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

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


[MediaWiki-commits] [Gerrit] Add editentity claims support - change (mediawiki...Wikibase)

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

Change subject: Add editentity claims support
..


Add editentity claims support

This allows the addition and removal of claims
New claims can contain references and qualifiers
Multiple claims can be changed at once
This now allows everything in an entity to change
in a single edit!

Bug: 46709

Change-Id: Id8586795c34eed24f899858b48dec7f299636db9
---
M lib/includes/serializers/ClaimSerializer.php
M repo/includes/api/ApiWikibase.php
M repo/includes/api/EditEntity.php
M repo/tests/phpunit/includes/api/EditEntityTest.php
M repo/tests/phpunit/includes/api/WikibaseApiTestCase.php
5 files changed, 234 insertions(+), 7 deletions(-)

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



diff --git a/lib/includes/serializers/ClaimSerializer.php 
b/lib/includes/serializers/ClaimSerializer.php
index 489e8ed..ec81dcd 100644
--- a/lib/includes/serializers/ClaimSerializer.php
+++ b/lib/includes/serializers/ClaimSerializer.php
@@ -161,7 +161,6 @@
}
 
$requiredElements = array(
-   'id',
'mainsnak',
);
 
@@ -187,7 +186,9 @@
$claim = new $claimClass( 
$snakUnserializer-newFromSerialization( $serialization['mainsnak'] ) );
assert( $claim instanceof Claim );
 
-   $claim-setGuid( $serialization['id'] );
+   if( array_key_exists( 'id', $serialization ) ){
+   $claim-setGuid( $serialization['id'] );
+   }
 
$claim-setQualifiers( $this-unserializeQualifiers( 
$serialization, $snakUnserializer ) );
 
diff --git a/repo/includes/api/ApiWikibase.php 
b/repo/includes/api/ApiWikibase.php
index 8e74fc5..214426a 100644
--- a/repo/includes/api/ApiWikibase.php
+++ b/repo/includes/api/ApiWikibase.php
@@ -3,9 +3,11 @@
 namespace Wikibase\Api;
 
 use User, Status, ApiBase;
+use Wikibase\Claims;
 use Wikibase\DataModel\SimpleSiteLink;
 use Wikibase\Entity;
 use Wikibase\EntityContent;
+use Wikibase\Lib\Serializers\ClaimsSerializer;
 use Wikibase\Settings;
 use Wikibase\EditEntity;
 use Wikibase\SiteLink;
@@ -244,6 +246,33 @@
}
 
/**
+* Get serialized claims and add them to result
+*
+* @since 0.5
+*
+* @param array $claims the labels to set in the result
+* @param array|string $path where the data is located
+* @param string $name name used for the entry
+* @param string $tag tag used for indexed entries in xml formats and 
similar
+*
+*/
+   protected function addClaimsToResult( array $claims, $path, $name = 
'claims', $tag = 'claim' ) {
+   $options = new MultiLangSerializationOptions();
+   $options-setUseKeys( $this-getUsekeys() );
+   $claimSerializer = new ClaimsSerializer( $options );
+
+   $value = $claimSerializer-getSerialized( new Claims( $claims ) 
);
+
+   if ( $value !== array() ) {
+   if ( !$this-getUsekeys() ) {
+   $this-getResult()-setIndexedTagName( $value, 
$tag );
+   }
+
+   $this-getResult()-addValue( $path, $name, $value );
+   }
+   }
+
+   /**
 * Returns the permissions that are required to perform the operation 
specified by
 * the parameters.
 *
diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index 028172c..f4858f0 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -2,6 +2,10 @@
 
 namespace Wikibase\Api;
 
+use DataValues\IllegalValueException;
+use MWException;
+use Wikibase\ChangeOpClaim;
+use Wikibase\Claim;
 use Wikibase\EntityContentFactory;
 use InvalidArgumentException;
 use Wikibase\ChangeOps;
@@ -15,9 +19,11 @@
 use Wikibase\Entity;
 use Wikibase\EntityContent;
 use Wikibase\Item;
+use Wikibase\Lib\ClaimGuidGenerator;
 use Wikibase\Property;
 use Wikibase\QueryContent;
 use Wikibase\Utils;
+use WikiPage;
 
 /**
  * Derived class for API modules modifying a single entity identified by id 
xor a combination of site and page title.
@@ -28,6 +34,7 @@
  * @author John Erling Blad  jeb...@gmail.com 
  * @author Daniel Kinzler
  * @author Tobias Gritschacher  tobias.gritschac...@wikimedia.de 
+ * @author Adam Shorland
  */
 class EditEntity extends ModifyEntity {
 
@@ -156,10 +163,19 @@
if ( array_key_exists( 'sitelinks', $data ) ) {
if ( $entity-getType() !== Item::ENTITY_TYPE ) {
wfProfileOut( __METHOD__ );
-   $this-dieUsage( key can't be handled: 
sitelinks, 'not-recognized' );
+   $this-dieUsage( Non Items can not have 
sitelinks, 'not-recognized' );
   

[MediaWiki-commits] [Gerrit] Implementing satus mapping and severity mapping based on [1]... - change (pywikibot/sf-export)

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

Change subject: Implementing satus mapping and severity mapping based on [1] 
[2] [3] [4]
..


Implementing satus mapping and severity mapping based on [1] [2] [3] [4]

[1] https://www.mediawiki.org/wiki/Bug_management/Bug_report_life_cycle
[2] http://www.bugzilla.org/docs/3.6/en/html/api/Bugzilla/WebService/Bug.html
[3] https://sourceforge.net/rest/p/pywikipediabot/feature-requests/347/
[4] https://sourceforge.net/rest/p/pywikipediabot/bugs/1669/

Change-Id: I4d51c2f3219484db0e090f8484b89d2e65f3fdcd
---
M bz.py
M sf.py
2 files changed, 15 insertions(+), 2 deletions(-)

Approvals:
  Ladsgroup: Verified
  Merlijn van Deen: Looks good to me, approved



diff --git a/bz.py b/bz.py
index 7bf3a0e..47840c6 100644
--- a/bz.py
+++ b/bz.py
@@ -23,8 +23,10 @@
 'summary': ticket.summary(),
 'version': '',  # ???
 'description': ticket.export(),
-'status': '',  # Need to map this
+'status': find_status(ticket),  # Need to map this
 }
+if ticket.group == 'feature-requests':
+params['severity'] = 'Enhancement'
 logging.info('Uploading {0} to Bugzilla'.format(ticket.human_url()))
 bug = BZ.createbug(**params)
 
@@ -58,7 +60,10 @@
 content_type='text/plain'  # python-bugzilla 
says we need to do this
 )
 
-
+def find_status(ticket):
+if ticket.owner():
+return ASSIGNED
+return NEW
 def find_valid_component(labels):
 
 Modified slightly from Amir's list...
diff --git a/sf.py b/sf.py
index b1051a1..5b60f6f 100644
--- a/sf.py
+++ b/sf.py
@@ -77,6 +77,14 @@
 def summary(self):
 return self.json['ticket']['summary']
 
+def status(self):
+return self.json['ticket']['status']
+
+def owner(self):
+if self.json['ticket']['assigned_to_id'] == null:
+return None
+return self.json['ticket']['assigned_to_id']
+
 def comments(self):
 for cmt in self.json['ticket']['discussion_thread']['posts']:
 yield cmt['text']

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4d51c2f3219484db0e090f8484b89d2e65f3fdcd
Gerrit-PatchSet: 2
Gerrit-Project: pywikibot/sf-export
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: 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] Always update position of all claim group labels - change (mediawiki...Wikibase)

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

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


Change subject: Always update position of all claim group labels
..

Always update position of all claim group labels

(bug 53672)
Since there may be more than one claim group label whose vertical position 
needs to
be updated because more than one claim group label is visible in the viewport, 
all
those claim group labels' positions are update now, instead of just the first 
one's
visible in the viewport.

Change-Id: Ie81163471090f217aaed8422b624ffc52eec8b33
---
M lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
1 file changed, 33 insertions(+), 31 deletions(-)


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

diff --git 
a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
index a48953f..843755a 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimgrouplabelscroll.js
@@ -116,30 +116,34 @@
 
expensiveChecks = 0;
 
-   var $firstVisibleMainSnak =
-   
findFirstVisibleMainSnakElementWithinClaimList( this.element );
+   var $visibleMainSnaks =
+   
findFirstVisibleMainSnakElementsWithinClaimList( this.element );
 
-   if( !$firstVisibleMainSnak ) {
-   return;
+   for( var i = 0; i  $visibleMainSnaks.length; i++ ) {
+   var $visibleMainSnak = $visibleMainSnaks.eq( i 
),
+   $claimGroup = $visibleMainSnak.closest( 
'.wb-claim-section' ),
+   $claimNameSection = 
$claimGroup.children( '.wb-claim-section-name' ),
+   $claimGroupLabel = 
$claimNameSection.children( '.wb-claim-name' );
+
+   this._log(
+   'positioning',
+   $claimGroupLabel.get( 0 ),
+   'on',
+   $visibleMainSnak.get( 0 )
+   );
+
+   var newLabelPosition =
+   positionElementInOneLineWithAnother( 
$claimGroupLabel, $visibleMainSnak );
+
+   this._log( newLabelPosition
+   ? ( 'moving label to ' + 
newLabelPosition )
+   : 'no position update required'
+   );
+
+   var endTime = new Date().getTime();
+   this._log( expensiveChecks + ' expensive 
checks, execution time '
+   + ( endTime - startTime ) + 'ms' );
}
-
-   var $claimGroup = $firstVisibleMainSnak.closest( 
'.wb-claim-section' ),
-   $claimGroupLabel =
-   $claimGroup.children( 
'.wb-claim-section-name' ).children( '.wb-claim-name' );
-
-   this._log( 'positioning', $claimGroupLabel.get( 0 ), 
'on', $firstVisibleMainSnak.get( 0 ) );
-
-   var newLabelPosition =
-   positionElementInOneLineWithAnother( 
$claimGroupLabel, $firstVisibleMainSnak );
-
-   this._log( newLabelPosition
-   ? ( 'moving label to ' + newLabelPosition )
-   : 'no position update required'
-   );
-
-   var endTime = new Date().getTime();
-   this._log( expensiveChecks + ' expensive checks, 
execution time '
-   + ( endTime - startTime ) + 'ms' );
},
 
/**
@@ -165,17 +169,17 @@
};
 
/**
-* Checks an Claim Group's element for Main Snak elements and returns 
the first one visible in
+* Checks an Claim Group's element for Main Snak elements and returns 
all that are visible in
 * the browser's viewport.
 * This is an optimized version of findFirstVisibleMainSnakElement in 
case Claim groups
 * are expected within the DOM that should be searched for Main Snaks.
 *
 * @param {jQuery} $searchRange
-* @return {null|jQuery}
+* @return {jQuery}
 */
-   function findFirstVisibleMainSnakElementWithinClaimList( $searchRange ) 
{
+   function findFirstVisibleMainSnakElementsWithinClaimList( $searchRange 
) {
var $claimGroups = 

[MediaWiki-commits] [Gerrit] No longer require mainsnak when removing claims - change (mediawiki...Wikibase)

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

Change subject: No longer require mainsnak when removing claims
..


No longer require mainsnak when removing claims

Bug: 54268

Change-Id: If4f77c69de4a289cc73d5f93cde04ab2414e4947
---
M repo/includes/api/EditEntity.php
M repo/includes/changeop/ChangeOp.php
M repo/includes/changeop/ChangeOpClaim.php
M repo/tests/phpunit/includes/api/EditEntityTest.php
M repo/tests/phpunit/includes/changeop/ChangeOpClaimTest.php
M repo/tests/phpunit/includes/changeop/ChangeOpMainSnakTest.php
6 files changed, 114 insertions(+), 124 deletions(-)

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



diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index f4858f0..cb48597 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -4,6 +4,8 @@
 
 use DataValues\IllegalValueException;
 use MWException;
+use Wikibase\ChangeOp;
+use Wikibase\ChangeOpMainSnak;
 use Wikibase\ChangeOpClaim;
 use Wikibase\Claim;
 use Wikibase\EntityContentFactory;
@@ -16,7 +18,6 @@
 use Wikibase\ChangeOpException;
 use ApiBase, User, Status, SiteList;
 use Wikibase\Repo\WikibaseRepo;
-use Wikibase\Entity;
 use Wikibase\EntityContent;
 use Wikibase\Item;
 use Wikibase\Lib\ClaimGuidGenerator;
@@ -378,42 +379,79 @@
 * @return ChangeOpClaim[]
 */
protected function getClaimsChangeOps( $claims, $guidGenerator ) {
-   $claimChangeOps = array();
-
if ( !is_array( $claims ) ) {
$this-dieUsage( List of claims must be an array, 
'not-recognized-array' );
}
 
+   //todo allow claims to be passed grouped by property rather 
than just an array of claims
+   $removeChangeops = $this-getRemoveClaimsChangeOps( $claims, 
$guidGenerator );
+   $modifyChangeOps = $this-getModifyClaimsChangeOps( $claims, 
$guidGenerator );
+
+   return array_merge( $removeChangeops, $modifyChangeOps );
+   }
+
+   /**
+* @param array $claims array of serialized claims
+* @param ClaimGuidGenerator $guidGenerator
+* @return ChangeOp[]
+*/
+   private function getModifyClaimsChangeOps( $claims, $guidGenerator ){
+   $opsToReturn = array();
+
$serializerFactory = new 
\Wikibase\Lib\Serializers\SerializerFactory();
$unserializer = $serializerFactory-newUnserializerForClass( 
'Wikibase\Claim' );
+   $entityIdFormatter = 
WikibaseRepo::getDefaultInstance()-getEntityIdFormatter();
 
foreach ( $claims as $claimArray ) {
+   if( !array_key_exists( 'remove', $claimArray ) ){
 
-   try {
-   $claim = $unserializer-newFromSerialization( 
$claimArray );
-   assert( $claim instanceof Claim );
-   } catch ( IllegalValueException $illegalValueException 
) {
-   $this-dieUsage( 
$illegalValueException-getMessage(), 'invalid-claim' );
-   } catch ( MWException $mwException ) {
-   $this-dieUsage( $mwException-getMessage(), 
'invalid-claim' );
-   }
+   try {
+   $claim = 
$unserializer-newFromSerialization( $claimArray );
+   assert( $claim instanceof Claim );
+   } catch ( IllegalValueException 
$illegalValueException ) {
+   $this-dieUsage( 
$illegalValueException-getMessage(), 'invalid-claim' );
+   } catch ( MWException $mwException ) {
+   $this-dieUsage( 
$mwException-getMessage(), 'invalid-claim' );
+   }
+   /**  @var $claim Claim  */
 
-   if ( array_key_exists( 'remove', $claimArray ) ) {
if( array_key_exists( 'id', $claimArray ) ){
-   $claimChangeOps[] = new ChangeOpClaim( 
$claim, 'remove', $guidGenerator );
+   $opsToReturn[] = new ChangeOpMainSnak(
+   $claim-getGuid(),
+   null,
+   $entityIdFormatter,
+   $guidGenerator
+   );
+   }
+   $opsToReturn[] = new ChangeOpClaim( $claim, 
$guidGenerator );
+   }
+   }
+   return $opsToReturn;
+   }
+
+   /**
+* Get changeops that remove all 

[MediaWiki-commits] [Gerrit] begin puppetizing clamav for otrs - change (operations/puppet)

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

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


Change subject: begin puppetizing clamav for otrs
..

begin puppetizing clamav for otrs

Change-Id: I14f85603595d21afbaa1d49f1a859eb158f04ba1
---
M manifests/mail.pp
M manifests/role/otrs.pp
2 files changed, 43 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/09/85209/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 7d4ed08..84f002c 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -136,20 +136,22 @@
#   - $hold_domains:
#   List of domains to hold on the queue without processing
class roled(
-   $local_domains = [ +system_domains ],
-   $enable_mail_relay=false,
-   $enable_otrs_server=false,
-   $enable_mailman=false,
-   $enable_imap_delivery=false,
-   $enable_mail_submission=false,
-   $enable_external_mail=false,
-   $smart_route_list=[],
-   $mediawiki_relay=false,
-   $rt_relay=false,
-   $enable_spamassassin=false,
-   $outbound_ips=[ $ipaddress ],
-   $list_outbound_ips=[],
-   $hold_domains=[] ) {
+   $enable_clamav=false,
+   $enable_external_mail=false,
+   $enable_imap_delivery=false,
+   $enable_mail_relay=false,
+   $enable_mail_submission=false,
+   $enable_mailman=false,
+   $enable_otrs_server=false,
+   $enable_spamassassin=false,
+   $hold_domains=[],
+   $list_outbound_ips=[],
+   $local_domains = [ +system_domains ],
+   $mediawiki_relay=false,
+   $outbound_ips=[ $ipaddress ],
+   $rt_relay=false,
+   $smart_route_list=[]
+) {
 
class { exim::config: install_type = heavy, queuerunner = 
combined }
Class[exim::config] - Class[exim::roled]
@@ -255,9 +257,35 @@
if ( $enable_spamassassin == true ) {
Class[spamassassin] - Class[exim::roled]
}
+   if ( $enable_clamav == true ) {
+   include clamav
+   }
}
 }
 
+# https://help.ubuntu.com/community/EximClamAV
+# /usr/share/doc/clamav-base/README.Debian.gz
+class clamav {
+
+   systemuser { clamav:
+   name = clamav,
+   groups = Debian-exim, # needed for exim integration
+   }
+
+   package { [ clamav-daemon ]:
+   ensure = latest;
+   # note: freshclam needs an initial manual run to fetch virus 
definitions
+   # this takes several minutes to run
+   }
+
+   service { clamd:
+   require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
+   subscribe = [ File[/etc/clamav/clamd.conf] ],
+   ensure = running;
+   }
+
+}
+
 # SpamAssassin http://spamassassin.apache.org/
 class spamassassin(
$required_score = '5.0',
diff --git a/manifests/role/otrs.pp b/manifests/role/otrs.pp
index c5bdcc7..b625937 100644
--- a/manifests/role/otrs.pp
+++ b/manifests/role/otrs.pp
@@ -80,6 +80,7 @@
 }
 
 class { 'exim::roled':
+enable_clamav = 'true',
 enable_otrs_server = 'true',
 enable_spamassassin = 'true',
 enable_external_mail = 'true',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14f85603595d21afbaa1d49f1a859eb158f04ba1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Clipboard hash should ignore all node attributes - change (mediawiki...VisualEditor)

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

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


Change subject: Clipboard hash should ignore all node attributes
..

Clipboard hash should ignore all node attributes

Some browsers normalise attributes (e.g. Firefox makes
URLs absolute) so we have to remove them from the clipboard
hash to make the comparable.

Bug: 54377
Change-Id: Iadc4d886a5345b28370cbfa31eb665661e577eeb
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 14 insertions(+), 8 deletions(-)


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

diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 5eadc52..7ccc45d 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -154,11 +154,17 @@
  * When pasting, browsers normalize HTML to varying degrees.
  * This hash creates a comparable string for validating clipboard contents.
  *
- * @param {string} html Clipboard HTML
+ * @param {jQuery} $elements Clipboard HTML elements
  * @returns {string} Hash
  */
-ve.ce.Surface.static.getClipboardHash = function ( html ) {
-   return html.replace( /\s+/gm, '' );
+ve.ce.Surface.static.getClipboardHash = function ( $elements ) {
+   var hash = '';
+   // Node attributes may be normalised (e.g. URLs made absolute) so just 
store nodeName
+   $elements.each( function () {
+   hash += this.textContent || this.nodeName;
+   } );
+   // Whitespace may be added/removed, so strip it all
+   return hash.replace( /\s/gm, '' );
 };
 
 
@@ -683,7 +689,7 @@
this.$pasteTarget.prepend(
$( 'span' ).attr( 'data-ve-clipboard-key', 
this.clipboardId + '-' + clipboardIndex )
);
-   clipboardItem.hash = this.constructor.static.getClipboardHash( 
this.$pasteTarget.html() );
+   clipboardItem.hash = this.constructor.static.getClipboardHash( 
this.$pasteTarget.contents() );
// If direct clipboard editing is not allowed, we must use the 
pasteTarget to
// select the data we want to go in the clipboard
rangyRange = rangy.createRange( this.getElementDocument() );
@@ -791,12 +797,12 @@
clipboardId = parts[0];
clipboardIndex = parts[1];
if ( clipboardId === this.clipboardId  
this.clipboard[clipboardIndex] ) {
-   // Hash validation: either the hash must be null (i.e. 
text/xcustom was used)
-   // or it must be equal to the hash of the pasted HTML 
to assert that the HTML
+   // Hash validation: either text/xcustom was used or the 
hash must be
+   // equal to the hash of the pasted HTML to assert that 
the HTML
// hasn't been modified in another editor before being 
pasted back.
-   if ( this.clipboard[clipboardIndex].hash === null ||
+   if ( beforePasteData.custom ||
this.clipboard[clipboardIndex].hash ===
-   
this.constructor.static.getClipboardHash( beforePasteData.html || 
this.$pasteTarget.html() )
+   
this.constructor.static.getClipboardHash( $elements )
) {
slice = this.clipboard[clipboardIndex].data;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadc4d886a5345b28370cbfa31eb665661e577eeb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] puppetize clamd.conf - change (operations/puppet)

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

Change subject: puppetize clamd.conf
..


puppetize clamd.conf

Change-Id: Idb16a59d7782ad0bbf89e24743aad3e2d24df85d
---
A files/clamd.conf
M manifests/mail.pp
2 files changed, 70 insertions(+), 0 deletions(-)

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



diff --git a/files/clamd.conf b/files/clamd.conf
new file mode 100644
index 000..5649e55
--- /dev/null
+++ b/files/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose false
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 6
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/manifests/mail.pp b/manifests/mail.pp
index 84f002c..6810348 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -278,6 +278,15 @@
# this takes several minutes to run
}
 
+   file {
+   /etc/clamav/clamd.conf:
+   require = Package[clamav-daemon],
+   owner = root,
+   group = root,
+   mode = 0444,
+   source = puppet:///files/clamav/clamd.conf;
+   }
+
service { clamd:
require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
subscribe = [ File[/etc/clamav/clamd.conf] ],

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idb16a59d7782ad0bbf89e24743aad3e2d24df85d
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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 clamd.conf - change (operations/puppet)

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

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


Change subject: puppetize clamd.conf
..

puppetize clamd.conf

Change-Id: Idb16a59d7782ad0bbf89e24743aad3e2d24df85d
---
A files/clamd.conf
M manifests/mail.pp
2 files changed, 70 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/11/85211/1

diff --git a/files/clamd.conf b/files/clamd.conf
new file mode 100644
index 000..5649e55
--- /dev/null
+++ b/files/clamd.conf
@@ -0,0 +1,61 @@
+#Automatically Generated by clamav-base postinst
+#To reconfigure clamd run #dpkg-reconfigure clamav-base
+#Please read /usr/share/doc/clamav-base/README.Debian.gz for details
+LocalSocket /var/run/clamav/clamd.ctl
+FixStaleSocket true
+LocalSocketGroup clamav
+LocalSocketMode 666
+# TemporaryDirectory is not set to its default /tmp here to make overriding
+# the default with environment variables TMPDIR/TMP/TEMP possible
+User clamav
+AllowSupplementaryGroups true
+ScanMail true
+ScanArchive true
+ArchiveBlockEncrypted false
+MaxDirectoryRecursion 15
+FollowDirectorySymlinks false
+FollowFileSymlinks false
+ReadTimeout 180
+MaxThreads 12
+MaxConnectionQueueLength 15
+LogSyslog false
+LogFacility LOG_LOCAL6
+LogClean false
+LogVerbose false
+PidFile /var/run/clamav/clamd.pid
+DatabaseDirectory /var/lib/clamav
+SelfCheck 3600
+Foreground false
+Debug false
+ScanPE true
+ScanOLE2 true
+ScanHTML true
+DetectBrokenExecutables false
+ExitOnOOM false
+LeaveTemporaryFiles false
+AlgorithmicDetection true
+ScanELF true
+IdleTimeout 30
+PhishingSignatures true
+PhishingScanURLs true
+PhishingAlwaysBlockSSLMismatch false
+PhishingAlwaysBlockCloak false
+DetectPUA false
+ScanPartialMessages false
+HeuristicScanPrecedence false
+StructuredDataDetection false
+CommandReadTimeout 5
+SendBufTimeout 200
+MaxQueue 100
+ExtendedDetectionInfo true
+OLE2BlockMacros false
+StreamMaxLength 25M
+LogFile /var/log/clamav/clamav.log
+LogTime true
+LogFileUnlock false
+LogFileMaxSize 0
+Bytecode true
+BytecodeSecurity TrustSigned
+BytecodeTimeout 6
+OfficialDatabaseOnly false
+CrossFilesystems true
diff --git a/manifests/mail.pp b/manifests/mail.pp
index 84f002c..c127038 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -278,6 +278,15 @@
# this takes several minutes to run
}
 
+   file {
+   /etc/clamav/clamd.conf:
+   require = Package[clamav-daemon],
+   owner = root,
+   group = root,
+   mode = 0444
+   source = puppet:///files/clamav/clamd.conf;
+   }
+
service { clamd:
require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
subscribe = [ File[/etc/clamav/clamd.conf] ],

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb16a59d7782ad0bbf89e24743aad3e2d24df85d
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix exception thrown by converter when data ends in text - change (mediawiki...VisualEditor)

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

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


Change subject: Fix exception thrown by converter when data ends in text
..

Fix exception thrown by converter when data ends in text

Conversions usually end in a close tag so this hans't been a problem
before, but the mini-conversion we do in onCopy may not be balanced.

Change-Id: Ia2db29f116ca84ee886b4c5cafd4ac45cd926b79
---
M modules/ve/dm/ve.dm.Converter.js
1 file changed, 7 insertions(+), 5 deletions(-)


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

diff --git a/modules/ve/dm/ve.dm.Converter.js b/modules/ve/dm/ve.dm.Converter.js
index 9c3639b..e2b1169 100644
--- a/modules/ve/dm/ve.dm.Converter.js
+++ b/modules/ve/dm/ve.dm.Converter.js
@@ -1183,11 +1183,13 @@
annotatedDomElements = [];
annotatedDomElementStack = [ annotatedDomElements ];
while (
-   ve.isArray( data[i] ) ||
-   (
-   data[i].annotations !== undefined  (
-   this.metaItemFactory.lookup( 
data[i].type ) ||
-   this.nodeFactory.isNodeContent( 
data[i].type )
+   data[i] !== undefined  (
+   ve.isArray( data[i] ) ||
+   (
+   data[i].annotations !== 
undefined  (
+   
this.metaItemFactory.lookup( data[i].type ) ||
+   
this.nodeFactory.isNodeContent( data[i].type )
+   )
)
)
) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2db29f116ca84ee886b4c5cafd4ac45cd926b79
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders esand...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] begin puppetizing clamav for otrs - change (operations/puppet)

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

Change subject: begin puppetizing clamav for otrs
..


begin puppetizing clamav for otrs

Change-Id: I14f85603595d21afbaa1d49f1a859eb158f04ba1
---
M manifests/mail.pp
M manifests/role/otrs.pp
2 files changed, 43 insertions(+), 14 deletions(-)

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



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 7d4ed08..84f002c 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -136,20 +136,22 @@
#   - $hold_domains:
#   List of domains to hold on the queue without processing
class roled(
-   $local_domains = [ +system_domains ],
-   $enable_mail_relay=false,
-   $enable_otrs_server=false,
-   $enable_mailman=false,
-   $enable_imap_delivery=false,
-   $enable_mail_submission=false,
-   $enable_external_mail=false,
-   $smart_route_list=[],
-   $mediawiki_relay=false,
-   $rt_relay=false,
-   $enable_spamassassin=false,
-   $outbound_ips=[ $ipaddress ],
-   $list_outbound_ips=[],
-   $hold_domains=[] ) {
+   $enable_clamav=false,
+   $enable_external_mail=false,
+   $enable_imap_delivery=false,
+   $enable_mail_relay=false,
+   $enable_mail_submission=false,
+   $enable_mailman=false,
+   $enable_otrs_server=false,
+   $enable_spamassassin=false,
+   $hold_domains=[],
+   $list_outbound_ips=[],
+   $local_domains = [ +system_domains ],
+   $mediawiki_relay=false,
+   $outbound_ips=[ $ipaddress ],
+   $rt_relay=false,
+   $smart_route_list=[]
+) {
 
class { exim::config: install_type = heavy, queuerunner = 
combined }
Class[exim::config] - Class[exim::roled]
@@ -255,9 +257,35 @@
if ( $enable_spamassassin == true ) {
Class[spamassassin] - Class[exim::roled]
}
+   if ( $enable_clamav == true ) {
+   include clamav
+   }
}
 }
 
+# https://help.ubuntu.com/community/EximClamAV
+# /usr/share/doc/clamav-base/README.Debian.gz
+class clamav {
+
+   systemuser { clamav:
+   name = clamav,
+   groups = Debian-exim, # needed for exim integration
+   }
+
+   package { [ clamav-daemon ]:
+   ensure = latest;
+   # note: freshclam needs an initial manual run to fetch virus 
definitions
+   # this takes several minutes to run
+   }
+
+   service { clamd:
+   require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
+   subscribe = [ File[/etc/clamav/clamd.conf] ],
+   ensure = running;
+   }
+
+}
+
 # SpamAssassin http://spamassassin.apache.org/
 class spamassassin(
$required_score = '5.0',
diff --git a/manifests/role/otrs.pp b/manifests/role/otrs.pp
index c5bdcc7..b625937 100644
--- a/manifests/role/otrs.pp
+++ b/manifests/role/otrs.pp
@@ -80,6 +80,7 @@
 }
 
 class { 'exim::roled':
+enable_clamav = 'true',
 enable_otrs_server = 'true',
 enable_spamassassin = 'true',
 enable_external_mail = 'true',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14f85603595d21afbaa1d49f1a859eb158f04ba1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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] Allow editing of claims in property groups - change (mediawiki...Wikibase)

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

Change subject: Allow editing of claims in property groups
..


Allow editing of claims in property groups

This allows output from getentites to be copied
directly into editentity.

Editentity now accepts both an array of claims and
an array of claims grouped by property id

Bug: 54313

Change-Id: I1c19bf28d2df822f082a7c9625e6f8bfd848950d
---
M repo/includes/api/EditEntity.php
M repo/tests/phpunit/includes/api/EditEntityTest.php
2 files changed, 46 insertions(+), 5 deletions(-)

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



diff --git a/repo/includes/api/EditEntity.php b/repo/includes/api/EditEntity.php
index cb48597..039052f 100644
--- a/repo/includes/api/EditEntity.php
+++ b/repo/includes/api/EditEntity.php
@@ -382,12 +382,22 @@
if ( !is_array( $claims ) ) {
$this-dieUsage( List of claims must be an array, 
'not-recognized-array' );
}
+   $changeOps = array();
 
-   //todo allow claims to be passed grouped by property rather 
than just an array of claims
-   $removeChangeops = $this-getRemoveClaimsChangeOps( $claims, 
$guidGenerator );
-   $modifyChangeOps = $this-getModifyClaimsChangeOps( $claims, 
$guidGenerator );
+   //check if the array is associative or in arrays by property
+   if( array_keys( $claims ) !== range( 0, count( $claims ) - 1 ) 
){
+   foreach( $claims as $subClaims ){
+   $changeOps = array_merge( $changeOps,
+   $this-getRemoveClaimsChangeOps( 
$subClaims, $guidGenerator ),
+   $this-getModifyClaimsChangeOps( 
$subClaims, $guidGenerator ) );
+   }
+   } else {
+   $changeOps = array_merge( $changeOps,
+   $this-getRemoveClaimsChangeOps( $claims, 
$guidGenerator ),
+   $this-getModifyClaimsChangeOps( $claims, 
$guidGenerator ) );
+   }
 
-   return array_merge( $removeChangeops, $modifyChangeOps );
+   return $changeOps;
}
 
/**
diff --git a/repo/tests/phpunit/includes/api/EditEntityTest.php 
b/repo/tests/phpunit/includes/api/EditEntityTest.php
index d08e354..54628a4 100644
--- a/repo/tests/phpunit/includes/api/EditEntityTest.php
+++ b/repo/tests/phpunit/includes/api/EditEntityTest.php
@@ -41,13 +41,20 @@
parent::setup();
 
$prop56 = PropertyId::newFromNumber( 56 );
+   $prop72 = PropertyId::newFromNumber( 72 );
 
if( !isset( self::$hasSetup ) ){
$this-initTestEntities( array( 'Berlin' ) );
+
$prop = PropertyContent::newEmpty();
$prop-getEntity()-setId( $prop56 );
$prop-getEntity()-setDataTypeId( 'string' );
-   $prop-save( 'EditEntityTest' );
+   $prop-save( 'EditEntityTestP56' );
+
+   $prop = PropertyContent::newEmpty();
+   $prop-getEntity()-setId( $prop72 );
+   $prop-getEntity()-setDataTypeId( 'string' );
+   $prop-save( 'EditEntityTestP72' );
}
self::$hasSetup = true;
}
@@ -183,6 +190,30 @@
)
) )
),
+
+   array( //15 clear and add multiple claims within 
property groups
+   'p' = array( 'clear' = '',
+   'data' = 
'{claims:{P56:[{mainsnak:{snaktype:value,property:P56,datavalue:{value:imastring56,type:string}},type:statement,rank:normal}],'.
+   
'P72:[{mainsnak:{snaktype:value,property:P72,datavalue:{value:imastring72,type:string}},type:statement,rank:normal}]}}'
 ),
+   'e' = array( 'claims' = array(
+   'P56' = array(
+   'mainsnak' = array(
+   'snaktype' = 'value', 
'property' = 'P56',
+   'datavalue' = array(
+   'value' = 
'imastring56',
+   'type' = 
'string' ) ),
+   'type' = 'statement',
+   'rank' = 'normal' ),
+   array(
+   'mainsnak' = array(
+

[MediaWiki-commits] [Gerrit] oops, checked in clamd.conf in the wrong dir - change (operations/puppet)

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

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


Change subject: oops, checked in clamd.conf in the wrong dir
..

oops, checked in clamd.conf in the wrong dir

Change-Id: Icd806c3bd6f6eaaf12f1dfe5afec4ae2cb158b5b
---
R files/clamav/clamd.conf
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/14/85214/1

diff --git a/files/clamd.conf b/files/clamav/clamd.conf
similarity index 100%
rename from files/clamd.conf
rename to files/clamav/clamd.conf

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd806c3bd6f6eaaf12f1dfe5afec4ae2cb158b5b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Populate Wikipedia interwiki ids for Commons and Wikidata - change (mediawiki...Wikibase)

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

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


Change subject: Populate Wikipedia interwiki ids for Commons and Wikidata
..

Populate Wikipedia interwiki ids for Commons and Wikidata

By default, special wikis are in the wikipedia family
when it comes to the interwiki table and interwiki ids.

e.g. [[:en:Berlin]] on Wikimedia Commons should resolve to
[[Berlin]] on English Wikipedia.

Change-Id: Ief5e6c9c3ae44e2eb157fd28e8c37db7c05f50e9
---
M lib/includes/sites/SitesBuilder.php
M lib/maintenance/populateSitesTable.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
3 files changed, 101 insertions(+), 79 deletions(-)


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

diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index 50e0455..8e95f6c 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -17,8 +17,14 @@
 */
protected $store;
 
-   public function __construct( SiteStore $store ) {
+   /**
+* @var array
+*/
+   protected $validGroups;
+
+   public function __construct( SiteStore $store, array $validGroups ) {
$this-store = $store;
+   $this-validGroups = $validGroups;
}
 
/**
@@ -26,8 +32,14 @@
 * @param string $siteGroup
 * @param string $wikiId
 */
-   public function buildStore( array $sites, $siteGroup, $wikiId ) {
-   $sites = $this-addInterwikiIdsToGroup( $sites, $siteGroup, 
$wikiId );
+   public function buildStore( array $sites, $siteGroup = null, $wikiId = 
null ) {
+   if ( $siteGroup === null  is_string( $wikiId ) ) {
+   $siteGroup = $this-getInterwikiGroup( $sites, $wikiId 
);
+   }
+
+   if ( $siteGroup  in_array( $siteGroup, $this-validGroups ) ) 
{
+   $sites = $this-addInterwikiIdsToGroup( $sites, 
$siteGroup );
+   }
 
$existingSites = $this-store-getSites( nocache );
 
@@ -46,28 +58,10 @@
/**
 * @param Site[] $sites
 * @param string $siteGroup
-* @param string $wikiId
 *
 * @return Site[]
 */
-   public function addInterwikiIdsToGroup( array $sites, $siteGroup, 
$wikiId ) {
-   if ( $siteGroup !== null ) {
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   } elseif ( is_string( $wikiId ) ) {
-   $siteGroup = $this-getSiteGroupFromWikiId( $sites, 
$wikiId );
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   }
-
-   return $sites;
-   }
-
-   /**
-* @param Site[] $sites
-* @param string $siteGroup
-*
-* @return Site[]
-*/
-   protected function addInterwikiIds( array $sites, $siteGroup ) {
+   protected function addInterwikiIdsToGroup( array $sites, $siteGroup ) {
foreach( $sites as $site ) {
if( $site-getGroup() === $siteGroup ) {
$localId = $site-getLanguageCode();
@@ -88,13 +82,18 @@
 *
 * @return string
 */
-   protected function getSiteGroupFromWikiId( $sites, $wikiId ) {
+   protected function getInterwikiGroup( array $sites, $wikiId ) {
if ( !array_key_exists( $wikiId, $sites ) ) {
return null;
}
 
$site = $sites[$wikiId];
 
+   // @fixme: handle interwiki prefixes in a better way!
+   if ( preg_match( '/^([\w-]*)wiki$/', $site-getGlobalId() ) ) {
+   return 'wikipedia';
+   }
+
return $site-getGroup();
}
 
diff --git a/lib/maintenance/populateSitesTable.php 
b/lib/maintenance/populateSitesTable.php
index cb48a36..9d85396 100644
--- a/lib/maintenance/populateSitesTable.php
+++ b/lib/maintenance/populateSitesTable.php
@@ -45,6 +45,10 @@
$siteGroup = $this-getOption( 'site-group' );
$wikiId = $this-getOption( 'wiki' );
 
+   // @todo make it configurable, such as from a config file.
+   $validGroups = array( 'wikipedia', 'wikivoyage', 'wikiquote', 
'wiktionary',
+   'wikibooks', 'wikisource', 'wikiversity', 'wikinews' );
+
try {
$json = $this-getSiteMatrixData( $url );
 
@@ -54,7 +58,7 @@
$sites = $siteMatrixParser-sitesFromJson( $json );
 
$store = SiteSQLStore::newInstance();
-   $sitesBuilder = new SitesBuilder( $store );
+   $sitesBuilder = new SitesBuilder( $store, $validGroups 
);

[MediaWiki-commits] [Gerrit] oops, checked in clamd.conf in the wrong dir - change (operations/puppet)

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

Change subject: oops, checked in clamd.conf in the wrong dir
..


oops, checked in clamd.conf in the wrong dir

Change-Id: Icd806c3bd6f6eaaf12f1dfe5afec4ae2cb158b5b
---
R files/clamav/clamd.conf
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/files/clamd.conf b/files/clamav/clamd.conf
similarity index 100%
rename from files/clamd.conf
rename to files/clamav/clamd.conf

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd806c3bd6f6eaaf12f1dfe5afec4ae2cb158b5b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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] Allow passing a user to SearchEngine::getTextSnippet - change (mediawiki/core)

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

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


Change subject: Allow passing a user to SearchEngine::getTextSnippet
..

Allow passing a user to SearchEngine::getTextSnippet

This avoids use of $wgUser

Change-Id: Iacb247d5962fe77db5a29084ece941261bf306ec
---
M includes/api/ApiQuerySearch.php
M includes/search/SearchEngine.php
M includes/specials/SpecialSearch.php
3 files changed, 11 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/85221/1

diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php
index 36b5597..abc60f6 100644
--- a/includes/api/ApiQuerySearch.php
+++ b/includes/api/ApiQuerySearch.php
@@ -125,6 +125,7 @@
$titles = array();
$count = 0;
$result = $matches-next();
+   $user = $this-getUser();
 
while ( $result ) {
if ( ++ $count  $limit ) {
@@ -145,7 +146,7 @@
ApiQueryBase::addTitleInfo( $vals, $title );
 
if ( isset( $prop['snippet'] ) ) {
-   $vals['snippet'] = 
$result-getTextSnippet( $terms );
+   $vals['snippet'] = 
$result-getTextSnippet( $terms, $user );
}
if ( isset( $prop['size'] ) ) {
$vals['size'] = $result-getByteSize();
diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php
index e5925fa..b4a25e6 100644
--- a/includes/search/SearchEngine.php
+++ b/includes/search/SearchEngine.php
@@ -874,14 +874,20 @@
 
/**
 * @param array $terms terms to highlight
+* @param User $user The user to use or null for $wgUser
 * @return String: highlighted text snippet, null (and not '') if not 
supported
 */
-   function getTextSnippet( $terms ) {
+   function getTextSnippet( $terms, $user = null ) {
global $wgUser, $wgAdvancedSearchHighlighting;
+
+   if ( !$user ) {
+   $user = $wgUser;
+   }
+
$this-initText();
 
// TODO: make highliter take a content object. Make 
ContentHandler a factory for SearchHighliter.
-   list( $contextlines, $contextchars ) = 
SearchEngine::userHighlightPrefs( $wgUser );
+   list( $contextlines, $contextchars ) = 
SearchEngine::userHighlightPrefs( $user );
$h = new SearchHighlighter();
if ( $wgAdvancedSearchHighlighting ) {
return $h-highlightText( $this-mText, $terms, 
$contextlines, $contextchars );
diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 8609c74..22fa8c4 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -633,7 +633,7 @@
}
 
// format text extract
-   $extract = div class='searchresult' . 
$result-getTextSnippet( $terms ) . /div;
+   $extract = div class='searchresult' . 
$result-getTextSnippet( $terms, $this-getUser() ) . /div;
 
$lang = $this-getLanguage();
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iacb247d5962fe77db5a29084ece941261bf306ec
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] Forcing redraw of snakview variation when changing the property - change (mediawiki...Wikibase)

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

Change subject: Forcing redraw of snakview variation when changing the property
..


Forcing redraw of snakview variation when changing the property

(bug 53157)
When selecting a property from the entityselector widget while another property 
is set already,
the snakview's cached property id is cleared to force redrawing the snakview 
variation.

Change-Id: I395bd7d851b355b69f1c8af06ce20a328af2c1d0
---
M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
index 5cf74b2..f35bafa 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
@@ -212,6 +212,10 @@
// spinner when the selected item actually has not 
changed since the variation will stay
// in place.
if ( !self._propertyId || self._propertyId !== 
ui.item.id ) {
+   // Reset the cached property id for 
re-rendering being triggered as soon as the new
+   // property's attributes have been received:
+   self.propertyId( null );
+
self.$snakValue.empty().append(
$( 'div/' ).append( $( 'span/' 
).addClass( 'mw-small-spinner' ) )
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I395bd7d851b355b69f1c8af06ce20a328af2c1d0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater henning.sna...@wikimedia.de
Gerrit-Reviewer: Tobias Gritschacher tobias.gritschac...@wikimedia.de
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Reorder RL loading - change (mediawiki...SemanticMediaWiki)

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

Change subject: Reorder RL loading
..


Reorder RL loading

This will avoid having MW 1.22 flashy hiccups during page load.

Change-Id: I6ce729d4296bbf027a50cadf708268a87839aa73
---
M resources/Resources.php
1 file changed, 13 insertions(+), 2 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index ed66c47..4258485 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -30,8 +30,13 @@
),
 
// Common styles independent from JavaScript
+   // MW 1.22 loading this as 'dependencies' = 'ext.smw.tooltip.styles'
+   // was not a choice as it showed flashy hiccups
'ext.smw.style' = $moduleTemplate + array(
-   'styles' = 'resources/smw/ext.smw.css',
+   'styles' = array(
+   'resources/smw/util/ext.smw.util.tooltip.css',
+   'resources/smw/ext.smw.css'
+   ),
'position' = 'top'
),
 
@@ -106,11 +111,17 @@
'scripts' = 'resources/jquery/jquery.qtip.js',
'styles' = 'resources/jquery/jquery.qtip.css',
),
+
+   // Tooltip
+   'ext.smw.tooltip.styles' = $moduleTemplate + array(
+   'styles' = 'resources/smw/util/ext.smw.util.tooltip.css',
+   ),
+
// Tooltip
'ext.smw.tooltip' = $moduleTemplate + array(
'scripts' = 'resources/smw/util/ext.smw.util.tooltip.js',
-   'styles' = 'resources/smw/util/ext.smw.util.tooltip.css',
'dependencies' = array(
+   'ext.smw.tooltip.styles',
'ext.smw',
'ext.jquery.qtip'
),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6ce729d4296bbf027a50cadf708268a87839aa73
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Mwjames jamesin.hongkon...@gmail.com
Gerrit-Reviewer: Mwjames jamesin.hongkon...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Registered movetoolbar definition for references - change (mediawiki...Wikibase)

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

Change subject: Registered movetoolbar definition for references
..


Registered movetoolbar definition for references

Change-Id: I1922294f6dac0de6878a6e9c5f3c831cf01fdc53
---
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M repo/resources/wikibase.ui.entityViewInit.js
2 files changed, 153 insertions(+), 3 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index d007de6..ddec4bb 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -137,6 +137,7 @@
this.element
.on(
'snakviewchange.' + this.widgetName
+   + ' snaklistviewchange.' + this.widgetName
+ ' listviewitemadded.' + this.widgetName + ' 
listviewitemremoved.' + this.widgetName,
function( event ) {
 
@@ -146,7 +147,7 @@
var $snaklistview = $( event.target 
).closest( ':wikibase-snaklistview' ),
snaklistview = 
$snaklistview.data( 'snaklistview' );
 
-   if( !snaklistview.value() ) {
+   if( snaklistview  
!snaklistview.value() ) {
self.removeItem( 
snaklistview.element );
}
}
@@ -168,7 +169,7 @@
 */
_detachEditModeEventHandlers: function() {
this.element
-   .off( 'snakviewchange.' + this.widgetName )
+   .off( 'snakviewchange.' + this.widgetName + ' ' + 
'snaklistviewchange.' + this.widgetName )
.off( 'listviewitemadded.' + this.widgetName + ' 
listviewitemremoved.' + this.widgetName )
.off( this.options.listItemAdapter.prefixedEvent( 
'stopediting.' + this.widgetName ) );
},
@@ -645,4 +646,153 @@
}
 } );
 
+$.wikibase.toolbarcontroller.definition( 'movetoolbar', {
+   id: 'referenceview-snakview',
+   selector: '.wb-statement-references .wb-referenceview',
+   events: {
+   'snakviewstartediting': function( event ) {
+   var $snakview = $( event.target ),
+   $snaklistview = $snakview.closest( 
':wikibase-snaklistview' ),
+   $referenceview = $snakview.closest( 
':wikibase-referenceview' ),
+   referenceview = $referenceview.data( 
'referenceview' ),
+   snakList = 
referenceview.options.listItemAdapter.liValue( $snaklistview );
+
+   // Prevent creating the toolbar for pending values.
+   if( snakList !== null ) {
+   // Since snakviewstartediting is triggered for 
every snakview, this creates the
+   // toolbar for each snakview widget:
+   $snakview.movetoolbar( {
+   listView: $referenceview
+   } );
+
+   // Disable move up button of topmost and 
move down button of bottommost
+   // snakview:
+
+   var $topMostSnakview = 
referenceview.items().first().data( 'snaklistview' )
+   ._listview.items().first();
+   var $bottomMostSnakview = 
referenceview.items().last().data( 'snaklistview' )
+   ._listview.items().last();
+
+   if ( $topMostSnakview.get( 0 ) === 
$snakview.get( 0 ) ) {
+   $snakview.data( 'movetoolbar' 
).$btnMoveUp.data( 'toolbarbutton' ).disable();
+   }
+
+   if( $bottomMostSnakview.get( 0 ) === 
$snakview.get( 0 ) ) {
+   $snakview.data( 'movetoolbar' 
).$btnMoveDown.data( 'toolbarbutton' ).disable();
+   }
+   }
+   },
+   'referenceviewafterstopediting': function( event ) {
+   // Destroy the snakview toolbars:
+   var $referenceview = $( event.target ),
+   referenceview = $referenceview.data( 
'referenceview' );
+
+   if( !referenceview ) {
+   // Stopped edit mode of a pending referenceview 
which does not feature any
+   

[MediaWiki-commits] [Gerrit] Triggering snaklistview's change event when moving items - change (mediawiki...Wikibase)

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

Change subject: Triggering snaklistview's change event when moving items
..


Triggering snaklistview's change event when moving items

Change-Id: I35cc6f81c5b44127ead6f6be9a5e04fd0ea6019a
---
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
1 file changed, 29 insertions(+), 22 deletions(-)

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



diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
index ddec4bb..1951e2a 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
@@ -134,28 +134,30 @@
_attachEditModeEventHandlers: function() {
var self = this;
 
+   var changeEvents = [
+   'snakviewchange.' + this.widgetName,
+   'snaklistviewchange.' + this.widgetName,
+   'referenceviewafteritemmove.' + this.widgetName,
+   'listviewitemadded.' + this.widgetName,
+   'listviewitemremoved.' + this.widgetName
+   ];
+
this.element
-   .on(
-   'snakviewchange.' + this.widgetName
-   + ' snaklistviewchange.' + this.widgetName
-   + ' listviewitemadded.' + this.widgetName + ' 
listviewitemremoved.' + this.widgetName,
-   function( event ) {
+   .on( changeEvents.join( ' ' ), function( event ) {
+   if( event.type === 'listviewitemremoved' ) {
+   // Check if last snaklistview item (snakview) 
has been removed and remove the
+   // listview item (the snaklistview itself) if 
so:
+   var $snaklistview = $( event.target ).closest( 
':wikibase-snaklistview' ),
+   snaklistview = $snaklistview.data( 
'snaklistview' );
 
-   if( event.type === 'listviewitemremoved' ) {
-   // Check if last snaklistview item 
(snakview) has been removed and remove the
-   // listview item (the snaklistview 
itself) if so:
-   var $snaklistview = $( event.target 
).closest( ':wikibase-snaklistview' ),
-   snaklistview = 
$snaklistview.data( 'snaklistview' );
-
-   if( snaklistview  
!snaklistview.value() ) {
-   self.removeItem( 
snaklistview.element );
-   }
+   if( snaklistview  !snaklistview.value() ) {
+   self.removeItem( snaklistview.element );
}
-
-   // Propagate change event.
-   self._trigger( 'change' );
}
-   )
+
+   // Propagate change event.
+   self._trigger( 'change' );
+   } )
.one( this.options.listItemAdapter.prefixedEvent( 
'stopediting.' + this.widgetName ),
function( event, dropValue ) {
event.stopPropagation();
@@ -168,10 +170,15 @@
 * Detaches the event handlers needed during edit mode.
 */
_detachEditModeEventHandlers: function() {
-   this.element
-   .off( 'snakviewchange.' + this.widgetName + ' ' + 
'snaklistviewchange.' + this.widgetName )
-   .off( 'listviewitemadded.' + this.widgetName + ' 
listviewitemremoved.' + this.widgetName )
-   .off( this.options.listItemAdapter.prefixedEvent( 
'stopediting.' + this.widgetName ) );
+   var events = [
+   'snakviewchange.' + this.widgetName,
+   'snaklistviewchange.' + this.widgetName,
+   'referenceviewafteritemmove.' + this.widgetName,
+   'listviewitemadded.' + this.widgetName,
+   'listviewitemremoved.' + this.widgetName,
+   this.options.listItemAdapter.prefixedEvent( 
'stopediting.' + this.widgetName )
+   ];
+   this.element.off( events.join( ' ' ) );
},
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I35cc6f81c5b44127ead6f6be9a5e04fd0ea6019a
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 

[MediaWiki-commits] [Gerrit] Reorder RL loading - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Reorder RL loading
..

Reorder RL loading

This will avoid having MW 1.22 flashy hiccups during page

Change-Id: I6ce729d4296bbf027a50cadf708268a87839aa73
---
M resources/Resources.php
1 file changed, 13 insertions(+), 2 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index ed66c47..4258485 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -30,8 +30,13 @@
),
 
// Common styles independent from JavaScript
+   // MW 1.22 loading this as 'dependencies' = 'ext.smw.tooltip.styles'
+   // was not a choice as it showed flashy hiccups
'ext.smw.style' = $moduleTemplate + array(
-   'styles' = 'resources/smw/ext.smw.css',
+   'styles' = array(
+   'resources/smw/util/ext.smw.util.tooltip.css',
+   'resources/smw/ext.smw.css'
+   ),
'position' = 'top'
),
 
@@ -106,11 +111,17 @@
'scripts' = 'resources/jquery/jquery.qtip.js',
'styles' = 'resources/jquery/jquery.qtip.css',
),
+
+   // Tooltip
+   'ext.smw.tooltip.styles' = $moduleTemplate + array(
+   'styles' = 'resources/smw/util/ext.smw.util.tooltip.css',
+   ),
+
// Tooltip
'ext.smw.tooltip' = $moduleTemplate + array(
'scripts' = 'resources/smw/util/ext.smw.util.tooltip.js',
-   'styles' = 'resources/smw/util/ext.smw.util.tooltip.css',
'dependencies' = array(
+   'ext.smw.tooltip.styles',
'ext.smw',
'ext.jquery.qtip'
),

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

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

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


[MediaWiki-commits] [Gerrit] Pass user to Title::userCan in ApiFeedContributions - change (mediawiki/core)

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

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


Change subject: Pass user to Title::userCan in ApiFeedContributions
..

Pass user to Title::userCan in ApiFeedContributions

Change-Id: I15b95f4e4bf4a07b55b98baa360078411c0f42cc
---
M includes/api/ApiFeedContributions.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/api/ApiFeedContributions.php 
b/includes/api/ApiFeedContributions.php
index abd657c..0569109 100644
--- a/includes/api/ApiFeedContributions.php
+++ b/includes/api/ApiFeedContributions.php
@@ -93,7 +93,7 @@
 
protected function feedItem( $row ) {
$title = Title::makeTitle( intval( $row-page_namespace ), 
$row-page_title );
-   if ( $title  $title-userCan( 'read' ) ) {
+   if ( $title  $title-userCan( 'read', $this-getUser() ) ) {
$date = $row-rev_timestamp;
$comments = $title-getTalkPage()-getFullURL();
$revision = Revision::newFromRow( $row );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I15b95f4e4bf4a07b55b98baa360078411c0f42cc
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] rename clamd service to clamav-daemon - change (operations/puppet)

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

Change subject: rename clamd service to clamav-daemon
..


rename clamd service to clamav-daemon

Change-Id: Iab1440ee0643945d745c91f03040f50bbea26b4f
---
M manifests/mail.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/mail.pp b/manifests/mail.pp
index 6810348..00f8d4b 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -287,7 +287,7 @@
source = puppet:///files/clamav/clamd.conf;
}
 
-   service { clamd:
+   service { clamav-daemon:
require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
subscribe = [ File[/etc/clamav/clamd.conf] ],
ensure = running;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iab1440ee0643945d745c91f03040f50bbea26b4f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org
Gerrit-Reviewer: Jgreen jgr...@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] Not including consumer.properties and producer.properties in... - change (operations...kafka)

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

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


Change subject: Not including consumer.properties and producer.properties in 
/etc/kafka.
..

Not including consumer.properties and producer.properties in /etc/kafka.

The old kafka-consumer-shell.sh and kafka-producer-shell.sh scripts have
been removed from upstream 0.8 bin/.  These were the only scripts that
used these property files.  kafka-console-consumer.sh and
kafka-console-producer.sh set properties using CLI options.

However, the kafka mirror command (and /etc/init.d/kafka-mirror) takes
multiple consumer.*.properties and a single producer.properties file.
These are expected to be in /etc/kafka/mirror.  These two property
which still (for some reason) remain in 0.8's config/ directory
are installed into /etc/kafka/mirror (by debian/kafka.install) as
example files which the user should edit and rename in order to
use kafka mirror.

Also fixing kafka-mirror.init so that it checks for
$KAFKA_MIRROR_CONSUMER_CONFIGS properly.

Change-Id: I2c31fe67b95c34d1b704dce40bdaf45a4f8fb784
---
M debian/kafka.kafka-mirror.default
M debian/kafka.kafka-mirror.init
M debian/patches/our-own-build-system.patch
3 files changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/debs/kafka 
refs/changes/19/85219/1

diff --git a/debian/kafka.kafka-mirror.default 
b/debian/kafka.kafka-mirror.default
index a8ca1e9..90d8d51 100644
--- a/debian/kafka.kafka-mirror.default
+++ b/debian/kafka.kafka-mirror.default
@@ -24,7 +24,7 @@
 
 # Set this to a space separated list of consumer.properties files.
 # By default, /etc/init.d/kafka-mirror will use any files that match
-# /etc/kafka/mirror/consumer.*
+# /etc/kafka/mirror/consumer*.properties
 #KAFKA_MIRROR_CONSUMER_CONFIGS=
 
 #KAFKA_MIRROR_PRODUCER_CONFIG=/etc/kafka/mirror/producer.properties
diff --git a/debian/kafka.kafka-mirror.init b/debian/kafka.kafka-mirror.init
index 6095a71..d04d07d 100644
--- a/debian/kafka.kafka-mirror.init
+++ b/debian/kafka.kafka-mirror.init
@@ -50,7 +50,7 @@
 KAFKA_CONFIG=/etc/kafka
 
 # Read in consumer config files from /etc/kafka/mirror.
-KAFKA_MIRROR_CONSUMER_CONFIGS=$(ls $KAFKA_CONFIG/mirror/consumer.* || true) # 
Don't error out yet if files don't exist.
+KAFKA_MIRROR_CONSUMER_CONFIGS=$(ls $KAFKA_CONFIG/mirror/consumer*.properties 
|| true) # Don't error out yet if files don't exist.
 KAFKA_MIRROR_PRODUCER_CONFIG=$KAFKA_CONFIG/mirror/producer.properties
 
 KAFKA_MIRROR_NUM_STREAMS=1
@@ -90,11 +90,11 @@
 # MirrorMaker argument checking:
 #
 
-if [ -z $KAFKA_MIRROR_CONSUMER_CONFIGS ]; then
+if [ -z $KAFKA_MIRROR_CONSUMER_CONFIGS ]; then
echo No consumer config files provided.
exit 1
 fi
-if [ -z $KAFKA_MIRROR_PRODUCER_CONFIG ]; then
+if [ -z $KAFKA_MIRROR_PRODUCER_CONFIG ]; then
echo No producer config file provided.
exit 1
 fi
@@ -107,7 +107,7 @@
exit 1
 fi
 
-if [ ! -r $KAFKA_MIRROR_PRODUCER_CONFIG ]; then
+if [ ! -r $KAFKA_MIRROR_PRODUCER_CONFIG ]; then
echo Cannot read producer config file '$KAFKA_MIRROR_PRODUCER_CONFIG'.
exit 1
 fi
diff --git a/debian/patches/our-own-build-system.patch 
b/debian/patches/our-own-build-system.patch
index 7a459fd..18a3e8d 100644
--- a/debian/patches/our-own-build-system.patch
+++ b/debian/patches/our-own-build-system.patch
@@ -111,7 +111,8 @@
 --- /dev/null
 +++ b/config/Makefile
 @@ -0,0 +1,9 @@
-+CONFFILES=consumer.properties log4j.properties tools-log4j.properties 
producer.properties server.properties zookeeper.properties
++CONFFILES=log4j.properties tools-log4j.properties server.properties 
zookeeper.properties
++MIRROR_CONFFILES=consumer.properties producer.properties
 +
 +all:  
 +
@@ -120,6 +121,11 @@
 +install:  all
 +  $(MKDIR_P) $(DESTDIR)/$(SYSCONFDIR)
 +  $(INSTALL) -o root -g root $(CONFFILES) $(DESTDIR)/$(SYSCONFDIR)
++  $(MKDIR_P) $(DESTDIR)/$(SYSCONFDIR)/mirror
++  cp consumer.properties 
$(DESTDIR)/$(SYSCONFDIR)/mirror/consumer.properties.example
++  cp producer.properties 
$(DESTDIR)/$(SYSCONFDIR)/mirror/producer.properties.example
++  chown -R root:root $(DESTDIR)/$(SYSCONFDIR)/mirror
++
 diff --git a/contrib/Makefile b/contrib/Makefile
 new file mode 100644
 index 000..c214ca3

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2c31fe67b95c34d1b704dce40bdaf45a4f8fb784
Gerrit-PatchSet: 1
Gerrit-Project: operations/debs/kafka
Gerrit-Branch: debian
Gerrit-Owner: Ottomata o...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Use HTTPS for Special:MWOAuth/token - change (mediawiki...OAuth)

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

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


Change subject: Use HTTPS for Special:MWOAuth/token
..

Use HTTPS for Special:MWOAuth/token

For security, we really should be using HTTPS when returning the token
back to the consumer. But we also want to avoid breaking things if the
server doesn't support https or the client is blacklisted from https
support.

Bug: 54110
Change-Id: I9982b1f3a1a14d472882898ee758b4ea38942c66
---
M frontend/specialpages/SpecialMWOAuth.php
1 file changed, 13 insertions(+), 0 deletions(-)


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

diff --git a/frontend/specialpages/SpecialMWOAuth.php 
b/frontend/specialpages/SpecialMWOAuth.php
index 10d94f2..5b75e04 100644
--- a/frontend/specialpages/SpecialMWOAuth.php
+++ b/frontend/specialpages/SpecialMWOAuth.php
@@ -80,6 +80,19 @@
case 'token':
$oauthServer = 
MWOAuthUtils::newMWOAuthServer();
$oauthRequest = 
MWOAuthRequest::fromRequest( $request );
+
+   // We want to use HTTPS when returning 
the credentials. But
+   // we don't want to break things for 
sites that can't use
+   // HTTPS, hence the somewhat 
complicated check.
+   if ( $request-detectProtocol() == 
'http'
+substr( wfExpandUrl( '/', 
PROTO_HTTPS ), 0, 8 ) === 'https://'
+wfCanIPUseHTTPS( 
$request-getIP() )
+   ) {
+   $redirUrl = str_replace( 
'http://', 'https://', $request-getFullRequestURL() );
+   $this-getOutput()-redirect( 
$redirUrl );
+   break;
+   }
+
$consumerKey = 
$oauthRequest-get_parameter( 'oauth_consumer_key' );
wfDebugLog( 'OAuth', /token: 
'{$consumerKey}' getting temporary credentials );
$token = 
$oauthServer-fetch_access_token( $oauthRequest );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9982b1f3a1a14d472882898ee758b4ea38942c66
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/OAuth
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add RSA key support to maintenance/testOAuthConsumer.php - change (mediawiki...OAuth)

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

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


Change subject: Add RSA key support to maintenance/testOAuthConsumer.php
..

Add RSA key support to maintenance/testOAuthConsumer.php

Change-Id: I86289dc770573b715b8f7668b2dddb2909b49085
---
M maintenance/testOAuthConsumer.php
1 file changed, 61 insertions(+), 3 deletions(-)


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

diff --git a/maintenance/testOAuthConsumer.php 
b/maintenance/testOAuthConsumer.php
index b6e96bf..8ca111d 100644
--- a/maintenance/testOAuthConsumer.php
+++ b/maintenance/testOAuthConsumer.php
@@ -16,8 +16,12 @@
parent::__construct();
$this-mDescription = Test an OAuth consumer;
$this-addOption( 'consumerKey', 'Consumer key', true, true );
-   $this-addOption( 'consumerSecret', 'Consumer secret', true, 
true );
+   $this-addOption( 'consumerSecret', 'Consumer secret', false, 
true );
+   $this-addOption( 'RSAKeyFile',
+   'File containing the RSA private key for the consumer', 
false, true
+   );
$this-addOption( 'useSSL', 'Use SSL' );
+   $this-addOption( 'verbose', 'Verbose output (e.g. HTTP 
request/response headers)' );
}
 
public function execute() {
@@ -25,18 +29,31 @@
 
$consumerKey = $this-getOption( 'consumerKey' );
$consumerSecret = $this-getOption( 'consumerSecret' );
+   $rsaKeyFile = $this-getOption( 'RSAKeyFile' );
$baseurl = 
{$wgServer}{$wgScriptPath}/index.php?title=Special:MWOAuth;
$endpoint = 
{$baseurl}/initiateformat=jsonoauth_callback=oob;
 
$endpoint_acc = {$baseurl}/tokenformat=json;
+
+   if ( !$consumerSecret  !$rsaKeyFile ) {
+   $this-error( Either consumerSecret or RSAKeyFile 
required! );
+   $this-maybeHelp( true );
+   }
 
$c = new OAuthConsumer( $consumerKey, $consumerSecret );
$parsed = parse_url( $endpoint );
$params = array();
parse_str( $parsed['query'], $params );
$req_req = OAuthRequest::from_consumer_and_token( $c, NULL, 
GET, $endpoint, $params );
-   $hmac_method = new OAuthSignatureMethod_HMAC_SHA1();
-   $sig_method = $hmac_method;
+   if ( $rsaKeyFile ) {
+   try {
+   $sig_method = new 
TestOAuthSignatureMethod_RSA_SHA1( $rsaKeyFile );
+   } catch ( OAuthException $ex ) {
+   $this-error( $ex-getMessage(), 1 );
+   }
+   } else {
+   $sig_method = new OAuthSignatureMethod_HMAC_SHA1();
+   }
$req_req-sign_request( $sig_method, $c, NULL );
 
$this-output( Calling: $req_req\n );
@@ -45,6 +62,9 @@
curl_setopt( $ch, CURLOPT_URL, (string) $req_req );
if ( $this-hasOption( 'useSSL' ) ) {
curl_setopt( $ch, CURLOPT_PORT , 443 );
+   }
+   if ( $this-hasOption( 'verbose' ) ) {
+   curl_setopt( $ch, CURLOPT_VERBOSE, true );
}
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
@@ -86,6 +106,9 @@
if ( $this-hasOption( 'useSSL' ) ) {
curl_setopt( $ch, CURLOPT_PORT , 443 );
}
+   if ( $this-hasOption( 'verbose' ) ) {
+   curl_setopt( $ch, CURLOPT_VERBOSE, true );
+   }
curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
curl_setopt( $ch, CURLOPT_HEADER, 0 );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
@@ -98,5 +121,40 @@
}
 }
 
+class TestOAuthSignatureMethod_RSA_SHA1 extends OAuthSignatureMethod_RSA_SHA1 {
+   private $privKey, $pubKey;
+
+   function __construct( $privKeyFile ) {
+   $key = file_get_contents( $privKeyFile );
+   if ( !$key ) {
+   throw new OAuthException( Could not read private key 
file $privKeyFile );
+   }
+
+   $privKey = openssl_pkey_get_private( $key );
+   if ( !$privKey ) {
+   throw new OAuthException( File $privKeyFile does not 
contain a private key );
+   }
+
+   $details = openssl_pkey_get_details( $privKey );
+   if ( $details['type'] !== OPENSSL_KEYTYPE_RSA ) {
+   throw new OAuthException( Key is not an RSA key );
+   }
+   if ( !$details['key'] ) {
+   throw new 

[MediaWiki-commits] [Gerrit] rename clamd service to clamav-daemon - change (operations/puppet)

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

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


Change subject: rename clamd service to clamav-daemon
..

rename clamd service to clamav-daemon

Change-Id: Iab1440ee0643945d745c91f03040f50bbea26b4f
---
M manifests/mail.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/85215/1

diff --git a/manifests/mail.pp b/manifests/mail.pp
index 6810348..00f8d4b 100644
--- a/manifests/mail.pp
+++ b/manifests/mail.pp
@@ -287,7 +287,7 @@
source = puppet:///files/clamav/clamd.conf;
}
 
-   service { clamd:
+   service { clamav-daemon:
require = [ File[/etc/clamav/clamd.conf], 
Package[clamav-daemon] ],
subscribe = [ File[/etc/clamav/clamd.conf] ],
ensure = running;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iab1440ee0643945d745c91f03040f50bbea26b4f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jgreen jgr...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Populate Wikipedia interwiki ids for Commons and Wikidata - change (mediawiki...Wikibase)

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

Change subject: Populate Wikipedia interwiki ids for Commons and Wikidata
..


Populate Wikipedia interwiki ids for Commons and Wikidata

By default, special wikis are in the wikipedia family
when it comes to the interwiki table and interwiki ids.

e.g. [[:en:Berlin]] on Wikimedia Commons should resolve to
[[Berlin]] on English Wikipedia.

Change-Id: Ief5e6c9c3ae44e2eb157fd28e8c37db7c05f50e9
---
M lib/includes/sites/SitesBuilder.php
M lib/maintenance/populateSitesTable.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
3 files changed, 101 insertions(+), 79 deletions(-)

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



diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index 50e0455..8e95f6c 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -17,8 +17,14 @@
 */
protected $store;
 
-   public function __construct( SiteStore $store ) {
+   /**
+* @var array
+*/
+   protected $validGroups;
+
+   public function __construct( SiteStore $store, array $validGroups ) {
$this-store = $store;
+   $this-validGroups = $validGroups;
}
 
/**
@@ -26,8 +32,14 @@
 * @param string $siteGroup
 * @param string $wikiId
 */
-   public function buildStore( array $sites, $siteGroup, $wikiId ) {
-   $sites = $this-addInterwikiIdsToGroup( $sites, $siteGroup, 
$wikiId );
+   public function buildStore( array $sites, $siteGroup = null, $wikiId = 
null ) {
+   if ( $siteGroup === null  is_string( $wikiId ) ) {
+   $siteGroup = $this-getInterwikiGroup( $sites, $wikiId 
);
+   }
+
+   if ( $siteGroup  in_array( $siteGroup, $this-validGroups ) ) 
{
+   $sites = $this-addInterwikiIdsToGroup( $sites, 
$siteGroup );
+   }
 
$existingSites = $this-store-getSites( nocache );
 
@@ -46,28 +58,10 @@
/**
 * @param Site[] $sites
 * @param string $siteGroup
-* @param string $wikiId
 *
 * @return Site[]
 */
-   public function addInterwikiIdsToGroup( array $sites, $siteGroup, 
$wikiId ) {
-   if ( $siteGroup !== null ) {
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   } elseif ( is_string( $wikiId ) ) {
-   $siteGroup = $this-getSiteGroupFromWikiId( $sites, 
$wikiId );
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   }
-
-   return $sites;
-   }
-
-   /**
-* @param Site[] $sites
-* @param string $siteGroup
-*
-* @return Site[]
-*/
-   protected function addInterwikiIds( array $sites, $siteGroup ) {
+   protected function addInterwikiIdsToGroup( array $sites, $siteGroup ) {
foreach( $sites as $site ) {
if( $site-getGroup() === $siteGroup ) {
$localId = $site-getLanguageCode();
@@ -88,13 +82,18 @@
 *
 * @return string
 */
-   protected function getSiteGroupFromWikiId( $sites, $wikiId ) {
+   protected function getInterwikiGroup( array $sites, $wikiId ) {
if ( !array_key_exists( $wikiId, $sites ) ) {
return null;
}
 
$site = $sites[$wikiId];
 
+   // @fixme: handle interwiki prefixes in a better way!
+   if ( preg_match( '/^([\w-]*)wiki$/', $site-getGlobalId() ) ) {
+   return 'wikipedia';
+   }
+
return $site-getGroup();
}
 
diff --git a/lib/maintenance/populateSitesTable.php 
b/lib/maintenance/populateSitesTable.php
index cb48a36..9d85396 100644
--- a/lib/maintenance/populateSitesTable.php
+++ b/lib/maintenance/populateSitesTable.php
@@ -45,6 +45,10 @@
$siteGroup = $this-getOption( 'site-group' );
$wikiId = $this-getOption( 'wiki' );
 
+   // @todo make it configurable, such as from a config file.
+   $validGroups = array( 'wikipedia', 'wikivoyage', 'wikiquote', 
'wiktionary',
+   'wikibooks', 'wikisource', 'wikiversity', 'wikinews' );
+
try {
$json = $this-getSiteMatrixData( $url );
 
@@ -54,7 +58,7 @@
$sites = $siteMatrixParser-sitesFromJson( $json );
 
$store = SiteSQLStore::newInstance();
-   $sitesBuilder = new SitesBuilder( $store );
+   $sitesBuilder = new SitesBuilder( $store, $validGroups 
);
$sitesBuilder-buildStore( $sites, $siteGroup, 

[MediaWiki-commits] [Gerrit] update language_by_size from compat - change (pywikibot/core)

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

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


Change subject: update language_by_size from compat
..

update language_by_size from compat

Change-Id: I0ba5a925aec849b938a94eb14c2382e7c3e4be48
---
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wiktionary_family.py
3 files changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/28/85228/1

diff --git a/pywikibot/families/wikisource_family.py 
b/pywikibot/families/wikisource_family.py
index b02349f..f2db991 100644
--- a/pywikibot/families/wikisource_family.py
+++ b/pywikibot/families/wikisource_family.py
@@ -13,7 +13,7 @@
 self.languages_by_size = [
 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'pt', 'es', 'sv',
 'ca', 'fa', 'cs', 'hu', 'ar', 'ko', 'sl', 'fi', 'ro', 'vi', 'te',
-'sa', 'el', 'sr', 'hr', 'bn', 'no', 'th', 'hy', 'nl', 'is', 'ml',
+'sa', 'el', 'sr', 'hr', 'bn', 'no', 'th', 'hy', 'is', 'nl', 'ml',
 'la', 'ja', 'vec', 'gu', 'tr', 'eo', 'br', 'uk', 'mk', 'yi', 'ta',
 'be', 'id', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az',
 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo',
diff --git a/pywikibot/families/wikiversity_family.py 
b/pywikibot/families/wikiversity_family.py
index eb3c0dc..f8c6fd0 100644
--- a/pywikibot/families/wikiversity_family.py
+++ b/pywikibot/families/wikiversity_family.py
@@ -11,8 +11,8 @@
 self.name = 'wikiversity'
 
 self.languages_by_size = [
-'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'sv',
-'fi', 'el', 'sl', 'ko', 'ja',
+'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'fi',
+'sv', 'el', 'sl', 'ko', 'ja',
 ]
 
 self.langs = dict([(lang, '%s.wikiversity.org' % lang)
diff --git a/pywikibot/families/wiktionary_family.py 
b/pywikibot/families/wiktionary_family.py
index fc439a5..87f0f20 100644
--- a/pywikibot/families/wiktionary_family.py
+++ b/pywikibot/families/wiktionary_family.py
@@ -11,13 +11,13 @@
 self.name = 'wiktionary'
 
 self.languages_by_size = [
-'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'pl', 'sv', 'ko', 'de',
+'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'sv', 'pl', 'ko', 'de',
 'tr', 'es', 'nl', 'ku', 'ta', 'kn', 'io', 'fi', 'vi', 'hu', 'pt',
 'no', 'ml', 'my', 'id', 'it', 'chr', 'li', 'et', 'ja', 'te', 'fa',
 'ca', 'cs', 'ro', 'ar', 'eu', 'jv', 'gl', 'lo', 'uk', 'fj', 'br',
-'bg', 'eo', 'hr', 'oc', 'th', 'is', 'vo', 'ps', 'zh-min-nan',
+'eo', 'bg', 'hr', 'oc', 'th', 'is', 'vo', 'ps', 'zh-min-nan',
 'simple', 'cy', 'scn', 'sr', 'af', 'ast', 'uz', 'sw', 'fy', 'tl',
-'da', 'he', 'nn', 'ur', 'wa', 'az', 'la', 'hy', 'sq', 'sm', 'sl',
+'da', 'he', 'nn', 'ur', 'wa', 'az', 'la', 'sq', 'hy', 'sm', 'sl',
 'nah', 'pnb', 'hi', 'ka', 'bs', 'tt', 'lb', 'lv', 'tk', 'sk', 
'hsb',
 'kk', 'ky', 'nds', 'be', 'mk', 'km', 'ga', 'wo', 'ms', 'ang', 'co',
 'gn', 'mr', 'sa', 'csb', 'st', 'ia', 'sd', 'ug', 'sh', 'si', 'tg',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ba5a925aec849b938a94eb14c2382e7c3e4be48
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] Pass user to Title::userCan in ApiFeedContributions - change (mediawiki/core)

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

Change subject: Pass user to Title::userCan in ApiFeedContributions
..


Pass user to Title::userCan in ApiFeedContributions

Change-Id: I15b95f4e4bf4a07b55b98baa360078411c0f42cc
---
M includes/api/ApiFeedContributions.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/ApiFeedContributions.php 
b/includes/api/ApiFeedContributions.php
index abd657c..0569109 100644
--- a/includes/api/ApiFeedContributions.php
+++ b/includes/api/ApiFeedContributions.php
@@ -93,7 +93,7 @@
 
protected function feedItem( $row ) {
$title = Title::makeTitle( intval( $row-page_namespace ), 
$row-page_title );
-   if ( $title  $title-userCan( 'read' ) ) {
+   if ( $title  $title-userCan( 'read', $this-getUser() ) ) {
$date = $row-rev_timestamp;
$comments = $title-getTalkPage()-getFullURL();
$revision = Revision::newFromRow( $row );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I15b95f4e4bf4a07b55b98baa360078411c0f42cc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: Anomie bjor...@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 tyv site for wikipedia family: update language_by_siz... - change (pywikibot/core)

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

Change subject: enable tyv site for wikipedia family: update language_by_size 
update interwiki sorting orders (update from compat 84114)
..


enable tyv site for wikipedia family:
update language_by_size
update interwiki sorting orders
(update from compat 84114)

Change-Id: I0fea407b3ee263c30094ec5708b90a054ccd8bbd
---
M pywikibot/families/wikipedia_family.py
M pywikibot/family.py
2 files changed, 22 insertions(+), 22 deletions(-)

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



diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 9e57685..8c09efc 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -12,33 +12,33 @@
 
 self.languages_by_size = [
 'en', 'nl', 'de', 'sv', 'fr', 'it', 'es', 'ru', 'pl', 'ja', 'vi',
-'pt', 'war', 'ceb', 'zh', 'uk', 'ca', 'no', 'fi', 'fa', 'cs', 'ko',
+'war', 'ceb', 'pt', 'zh', 'uk', 'ca', 'no', 'fi', 'fa', 'cs', 'ko',
 'hu', 'ar', 'ro', 'ms', 'sr', 'tr', 'id', 'kk', 'sk', 'eo', 'da',
 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'uz', 'vo', 'et', 'hi', 'gl',
 'nn', 'simple', 'az', 'la', 'el', 'sh', 'oc', 'th', 'ka', 'hy',
 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'ht', 'te', 'tt', 'be-x-old',
-'cy', 'lv', 'sq', 'bs', 'br', 'jv', 'mg', 'mr', 'lb', 'is', 'ml',
-'my', 'ba', 'yo', 'an', 'lmo', 'fy', 'af', 'bn', 'pnb', 'zh-yue',
-'sw', 'bpy', 'ur', 'io', 'ky', 'ne', 'scn', 'ga', 'gu', 'nds', 
'ku',
-'cv', 'ast', 'qu', 'tg', 'su', 'sco', 'als', 'bug', 'ia', 'nap',
-'kn', 'bat-smg', 'map-bms', 'wa', 'ckb', 'am', 'gd', 'hif',
+'cy', 'lv', 'sq', 'bs', 'br', 'mg', 'jv', 'mr', 'lb', 'is', 'ml',
+'my', 'ba', 'yo', 'an', 'lmo', 'fy', 'af', 'pnb', 'bn', 'zh-yue',
+'sw', 'ur', 'bpy', 'io', 'ky', 'ne', 'scn', 'ga', 'gu', 'tg', 
'nds',
+'ku', 'cv', 'ast', 'qu', 'su', 'sco', 'als', 'ia', 'bug', 'nap',
+'kn', 'bat-smg', 'am', 'map-bms', 'wa', 'ckb', 'gd', 'hif',
 'zh-min-nan', 'arz', 'mzn', 'yi', 'mn', 'vec', 'sah', 'nah', 'sa',
 'roa-tara', 'os', 'si', 'bar', 'pam', 'hsb', 'se', 'pa', 'li', 
'mi',
 'fo', 'co', 'ilo', 'gan', 'bo', 'frr', 'glk', 'rue', 'bcl',
 'nds-nl', 'fiu-vro', 'mrj', 'tk', 'ps', 'vls', 'xmf', 'gv', 'min',
-'or', 'diq', 'kv', 'km', 'pag', 'ce', 'mhr', 'zea', 'dv', 'csb',
-'nrm', 'vep', 'rm', 'koi', 'hak', 'udm', 'lad', 'lij', 'wuu',
+'or', 'diq', 'ce', 'kv', 'km', 'pag', 'mhr', 'zea', 'dv', 'csb',
+'nrm', 'vep', 'rm', 'hak', 'koi', 'udm', 'lad', 'lij', 'wuu',
 'zh-classical', 'fur', 'sc', 'stq', 'mt', 'ug', 'ay', 'so', 'pi',
-'bh', 'ksh', 'nov', 'kw', 'gn', 'ang', 'pcd', 'nv', 'as', 'eml',
-'gag', 'ext', 'frp', 'ace', 'szl', 'ie', 'ln', 'pfl', 'krc', 'xal',
+'bh', 'ksh', 'nov', 'kw', 'gn', 'ang', 'pcd', 'nv', 'gag', 'as',
+'eml', 'ext', 'frp', 'ace', 'szl', 'ie', 'ln', 'pfl', 'krc', 'xal',
 'haw', 'pdc', 'rw', 'crh', 'lez', 'dsb', 'to', 'arc', 'kl', 'myv',
-'kab', 'sn', 'bjn', 'pap', 'tpi', 'lo', 'lbe', 'wo', 'mwl', 'jbo',
+'kab', 'sn', 'bjn', 'pap', 'mwl', 'tpi', 'lo', 'lbe', 'wo', 'jbo',
 'mdf', 'kbd', 'cbk-zam', 'av', 'srn', 'ty', 'kg', 'ab', 'tet',
 'ltg', 'ig', 'na', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy',
 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'bi', 'got', 'sm', 'bm', 'iu',
-'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts',
-'ks', 'sg', 've', 'rn', 'st', 'cr', 'dz', 'ak', 'tum', 'ik', 'lg',
-'ff', 'ny', 'tw', 'ch', 'xh',
+'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'tyv', 'om', 'fj', 
'ti',
+'ts', 'ks', 'sg', 've', 'rn', 'st', 'cr', 'dz', 'ak', 'tum', 'ik',
+'lg', 'ff', 'ny', 'tw', 'ch', 'xh',
 ]
 
 langs = self.languages_by_size + ['test', 'test2']  # Sites we want to 
edit but not count as real languages
@@ -305,10 +305,10 @@
 'stq', 'st', 'nso', 'tn', 'sq', 'si', 'scn', 'simple', 'ss', 'sk',
 'sl', 'cu', 'szl', 'so', 'ckb', 'srn', 'sr', 'sh', 'fi', 'sv', 
'ta',
 'shi', 'tl', 'kab', 'roa-tara', 'tt', 'te', 'tet', 'th', 'ti', 
'vi',
-'tg', 'tokipona', 'tp', 'tpi', 'chy', 've', 'tr', 'tk', 'tw', 
'udm',
-'uk', 'ur', 'ug', 'za', 'vec', 'vep', 'vo', 'fiu-vro', 'wa', 'vls',
-'war', 'wo', 'wuu', 'ts', 'xmf', 'yi', 'yo', 'diq', 'zea', 'zh',
-'zh-tw', 'zh-cn', 'zh-classical', 'zh-yue', 'bat-smg',
+'tg', 'tokipona', 'tp', 'tpi', 'chy', 've', 'tr', 'tk', 'tw', 
'tyv',
+'udm', 'uk', 'ur', 

[MediaWiki-commits] [Gerrit] make string check very generic - change (qa/browsertests)

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

Change subject: make string check very generic
..


make string check very generic

Change-Id: I9a3bf6a57e1b8920be2f02d0425f043cfdb8166f
---
M features/page.feature
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/features/page.feature b/features/page.feature
index b22b2d1..ca77ee7 100644
--- a/features/page.feature
+++ b/features/page.feature
@@ -6,7 +6,7 @@
 
   Scenario:Go to page that does not exist
 Given I am at page that does not exist
-Then page text should contain Wikipedia does not have an article with this 
exact name
+Then page text should contain pages
   And link Create should be there
 
   Scenario: Prepare to start a new page using the URL

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9a3bf6a57e1b8920be2f02d0425f043cfdb8166f
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@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 language_by_size from compat - change (pywikibot/core)

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

Change subject: update language_by_size from compat
..


update language_by_size from compat

Change-Id: I0ba5a925aec849b938a94eb14c2382e7c3e4be48
---
M pywikibot/families/wikisource_family.py
M pywikibot/families/wikiversity_family.py
M pywikibot/families/wiktionary_family.py
3 files changed, 6 insertions(+), 6 deletions(-)

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



diff --git a/pywikibot/families/wikisource_family.py 
b/pywikibot/families/wikisource_family.py
index b02349f..f2db991 100644
--- a/pywikibot/families/wikisource_family.py
+++ b/pywikibot/families/wikisource_family.py
@@ -13,7 +13,7 @@
 self.languages_by_size = [
 'fr', 'en', 'de', 'ru', 'it', 'pl', 'zh', 'he', 'pt', 'es', 'sv',
 'ca', 'fa', 'cs', 'hu', 'ar', 'ko', 'sl', 'fi', 'ro', 'vi', 'te',
-'sa', 'el', 'sr', 'hr', 'bn', 'no', 'th', 'hy', 'nl', 'is', 'ml',
+'sa', 'el', 'sr', 'hr', 'bn', 'no', 'th', 'hy', 'is', 'nl', 'ml',
 'la', 'ja', 'vec', 'gu', 'tr', 'eo', 'br', 'uk', 'mk', 'yi', 'ta',
 'be', 'id', 'da', 'li', 'et', 'bg', 'as', 'mr', 'bs', 'sah', 'az',
 'gl', 'kn', 'lt', 'cy', 'sk', 'zh-min-nan', 'fo',
diff --git a/pywikibot/families/wikiversity_family.py 
b/pywikibot/families/wikiversity_family.py
index eb3c0dc..f8c6fd0 100644
--- a/pywikibot/families/wikiversity_family.py
+++ b/pywikibot/families/wikiversity_family.py
@@ -11,8 +11,8 @@
 self.name = 'wikiversity'
 
 self.languages_by_size = [
-'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'sv',
-'fi', 'el', 'sl', 'ko', 'ja',
+'en', 'fr', 'de', 'beta', 'cs', 'ru', 'it', 'pt', 'es', 'ar', 'fi',
+'sv', 'el', 'sl', 'ko', 'ja',
 ]
 
 self.langs = dict([(lang, '%s.wikiversity.org' % lang)
diff --git a/pywikibot/families/wiktionary_family.py 
b/pywikibot/families/wiktionary_family.py
index fc439a5..87f0f20 100644
--- a/pywikibot/families/wiktionary_family.py
+++ b/pywikibot/families/wiktionary_family.py
@@ -11,13 +11,13 @@
 self.name = 'wiktionary'
 
 self.languages_by_size = [
-'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'pl', 'sv', 'ko', 'de',
+'en', 'mg', 'fr', 'zh', 'lt', 'ru', 'el', 'sv', 'pl', 'ko', 'de',
 'tr', 'es', 'nl', 'ku', 'ta', 'kn', 'io', 'fi', 'vi', 'hu', 'pt',
 'no', 'ml', 'my', 'id', 'it', 'chr', 'li', 'et', 'ja', 'te', 'fa',
 'ca', 'cs', 'ro', 'ar', 'eu', 'jv', 'gl', 'lo', 'uk', 'fj', 'br',
-'bg', 'eo', 'hr', 'oc', 'th', 'is', 'vo', 'ps', 'zh-min-nan',
+'eo', 'bg', 'hr', 'oc', 'th', 'is', 'vo', 'ps', 'zh-min-nan',
 'simple', 'cy', 'scn', 'sr', 'af', 'ast', 'uz', 'sw', 'fy', 'tl',
-'da', 'he', 'nn', 'ur', 'wa', 'az', 'la', 'hy', 'sq', 'sm', 'sl',
+'da', 'he', 'nn', 'ur', 'wa', 'az', 'la', 'sq', 'hy', 'sm', 'sl',
 'nah', 'pnb', 'hi', 'ka', 'bs', 'tt', 'lb', 'lv', 'tk', 'sk', 
'hsb',
 'kk', 'ky', 'nds', 'be', 'mk', 'km', 'ga', 'wo', 'ms', 'ang', 'co',
 'gn', 'mr', 'sa', 'csb', 'st', 'ia', 'sd', 'ug', 'sh', 'si', 'tg',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ba5a925aec849b938a94eb14c2382e7c3e4be48
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Xqt i...@gno.de
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] (Bug 48570) Fix subtle selser bug handling separator-only nodes - change (mediawiki...Parsoid)

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

Change subject: (Bug 48570) Fix subtle selser bug handling separator-only nodes
..


(Bug 48570) Fix subtle selser bug handling separator-only nodes

* When the original source for an element node whose content
  was entirely made up of separator text, selser duplicated the
  separator in leading and trailing separators. This manifested
  in the various bug reports around an extra space before links
  and colons (which introduces an nbsp; span which exhibits
  this separator-only node behavior and causes the single-space
  duplication reported in the bug reports).

* This patch also fixes 11 additional selser tests.

Change-Id: Ibbc97e2eeb93fff56beb3fdc9cb2875ceb3e100b
---
M js/lib/mediawiki.WikitextSerializer.js
M js/tests/parserTests-blacklist.js
2 files changed, 25 insertions(+), 24 deletions(-)

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



diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index 83bdd04..56b5ae1 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -455,7 +455,7 @@
if (sep  sep.match(/\n/)) {
this.onSOL = true;
}
-   if (this.debugging) {
+   if (this.serializer.debugging) {
console.log(debugPrefix, JSON.stringify(sep));
}
},
@@ -3946,24 +3946,28 @@
// Strip leading/trailing separators 
*ONLY IF* the previous/following
// node will go through non-selser 
serialization.
var src = state.getOrigSrc(dp.dsr[0], 
dp.dsr[1]),
+   out = src,
stripLeading = 
!DU.isIndentPre(node)  DU.hasCurrentDiffMark(node.previousSibling, this.env),
stripTrailing = 
DU.hasCurrentDiffMark(node.nextSibling, this.env),
-   leadingSepMatch = stripLeading 
? src.match(/^((?:\s|!--([^\-]|-(?!-))*--)+)/) : null,
-   trailingSepMatch = 
stripTrailing ? src.match(/((?:\s|!--([^\-]|-(?!-))*--)+)$/) : null,
-   out = src,
newSep = '',
offset = 0;
 
-   if (leadingSepMatch) {
-   state.sep.src = (state.sep.src 
|| '') + leadingSepMatch[0];
-   offset = 
leadingSepMatch[0].length;
-   out = out.substring(offset);
-   dp.dsr[0] += offset;
+   if (stripLeading) {
+   var leadingSepMatch = 
out.match(/^((?:\s|!--([^\-]|-(?!-))*--)+)/);
+   if (leadingSepMatch) {
+   state.sep.src = 
(state.sep.src || '') + leadingSepMatch[0];
+   offset = 
leadingSepMatch[0].length;
+   out = 
out.substring(offset);
+   dp.dsr[0] += offset;
+   }
}
-   if (trailingSepMatch) {
-   newSep = trailingSepMatch[0];
-   out = out.substring(0, 
trailingSepMatch.index - offset);
-   dp.dsr[1] -= 
trailingSepMatch.index;
+   if (stripTrailing) {
+   var trailingSepMatch = 
out.match(/((?:\s|!--([^\-]|-(?!-))*--)+)$/);
+   if (trailingSepMatch) {
+   newSep = 
trailingSepMatch[0];
+   out = out.substring(0, 
trailingSepMatch.index);
+   dp.dsr[1] -= 
trailingSepMatch.index;
+   }
}
 
state.currNodeUnmodified = true;
@@ -4032,6 +4036,10 @@
 
break;
case node.TEXT_NODE:
+   if (state.selserMode) {
+   this.trace(TEXT: , node.nodeValue);
+ 

[MediaWiki-commits] [Gerrit] Ensure populate sites works for updating existing sites - change (mediawiki...Wikibase)

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

Change subject: Ensure populate sites works for updating existing sites
..


Ensure populate sites works for updating existing sites

also:

* add 'en' as language code for special sites,
parts of wikibase depend on there being a language
for all sites.
* improve site matrix parser test

Change-Id: I2f50f40d0a796f03ef78c524bca63018595207e5
(cherry picked from commit e731705a7489a227c43c97282ca51afd2526862e)
---
M lib/includes/sites/SiteMatrixParser.php
M lib/includes/sites/SitesBuilder.php
M lib/maintenance/populateSitesTable.php
M lib/tests/phpunit/sites/SiteMatrixParserTest.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
5 files changed, 86 insertions(+), 59 deletions(-)

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



diff --git a/lib/includes/sites/SiteMatrixParser.php 
b/lib/includes/sites/SiteMatrixParser.php
index df3020b..ffdc559 100644
--- a/lib/includes/sites/SiteMatrixParser.php
+++ b/lib/includes/sites/SiteMatrixParser.php
@@ -94,8 +94,12 @@
 
foreach( $specialSites as $specialSite ) {
$site = $this-getSiteFromSiteData( $specialSite );
-   $siteId= $site-getGlobalId();
-   $sites[$siteId] = $this-getSiteFromSiteData( 
$specialSite );
+   $siteId = $site-getGlobalId();
+
+   // todo: get this from $wgConf
+   $site-setLanguageCode( 'en' );
+
+   $sites[$siteId] = $site;
}
 
return $sites;
@@ -138,13 +142,13 @@
 
// @note: expandGroup is specific to wikimedia site matrix 
sources
$siteGroup = ( $this-expandGroup  $siteData['code'] === 
'wiki' )
-? 'wikipedia' : $siteData['code'];
+   ? 'wikipedia' : $siteData['code'];
 
$site-setGroup( $siteGroup );
 
$url = $siteData['url'];
 
-   if ( $this-stripProtocol === 'stripProtocol' ) {
+   if ( $this-stripProtocol ) {
$url = preg_replace( '@^https?:@', '', $url );
}
 
diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index 4857e50..50e0455 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -29,7 +29,17 @@
public function buildStore( array $sites, $siteGroup, $wikiId ) {
$sites = $this-addInterwikiIdsToGroup( $sites, $siteGroup, 
$wikiId );
 
-   $this-store-getSites( nocache );
+   $existingSites = $this-store-getSites( nocache );
+
+   foreach( $sites as $site ) {
+   $siteId = $site-getGlobalId();
+
+   if ( $existingSites-hasSite( $siteId ) ) {
+   $existingSite = $existingSites-getSite( 
$siteId );
+   $site-setInternalId( 
$existingSite-getInternalId() );
+   }
+   }
+
$this-store-saveSites( $sites );
}
 
diff --git a/lib/maintenance/populateSitesTable.php 
b/lib/maintenance/populateSitesTable.php
index 080bb82..cb48a36 100644
--- a/lib/maintenance/populateSitesTable.php
+++ b/lib/maintenance/populateSitesTable.php
@@ -37,7 +37,7 @@
}
 
public function execute() {
-   $stripProtocols = $this-getOption( 'strip-protocols' ) ? 
stripProtocol : false;
+   $stripProtocols = $this-getOption( 'strip-protocols', false );
$url = $this-getOption( 'load-from', 
'https://meta.wikimedia.org/w/api.php' );
$scriptPath = $this-getOption( 'script-path', '/w/$1' );
$articlePath = $this-getOption( 'article-path', '/wiki/$1' );
@@ -78,7 +78,7 @@
$json = Http::get( $url, 'default', array( 'raiseException' = 
true ) );
 
if ( !$json ) {
-   throw new MWException( Got no data from $url );
+   throw new MWException( Got no data from $url\n );
}
 
return $json;
diff --git a/lib/tests/phpunit/sites/SiteMatrixParserTest.php 
b/lib/tests/phpunit/sites/SiteMatrixParserTest.php
index 3483efa..a1ef2bb 100644
--- a/lib/tests/phpunit/sites/SiteMatrixParserTest.php
+++ b/lib/tests/phpunit/sites/SiteMatrixParserTest.php
@@ -3,7 +3,7 @@
 /**
  * @covers SiteMatrixParser
  *
- * @since 0.1
+ * @since 0.5
  *
  * @group Wikibase
  *
@@ -15,20 +15,31 @@
/**
 * @dataProvider sitesFromJsonProvider
 */
-   public function testSitesFromJson( $json, $expected ) {
-   $siteMatrixParser = new SiteMatrixParser( '/w/$1', '/wiki/$1', 
false );
+   public function testSitesFromJson( $scriptPath, $articlePath, $expected 
) {
+   $json = $this-getSiteMatrixJson();
+
+   

[MediaWiki-commits] [Gerrit] Retry timeout to 15sec for etherpad frontend - change (operations/puppet)

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

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


Change subject: Retry timeout to 15sec for etherpad frontend
..

Retry timeout to 15sec for etherpad frontend

By default it's 60 secs of timeout whenever the backend application
server goes into an error state. This commit reduces this to 15 secs
allowing for shorter time windows during failure of nodejs backend

Change-Id: If3abc09e492752f1d52b2b8567857d9a1886fa9a
---
M templates/apache/sites/etherpad_lite.wikimedia.org.erb
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/36/85236/1

diff --git a/templates/apache/sites/etherpad_lite.wikimedia.org.erb 
b/templates/apache/sites/etherpad_lite.wikimedia.org.erb
index 5976897..477f88f 100644
--- a/templates/apache/sites/etherpad_lite.wikimedia.org.erb
+++ b/templates/apache/sites/etherpad_lite.wikimedia.org.erb
@@ -14,7 +14,7 @@
RewriteEngine on
ProxyVia On
ProxyRequests Off
-   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/
+   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ retry=15
ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/
ProxyPreserveHost On
RewriteRule /p/*$ https://etherpad.wikimedia.org/ [NC,L]
@@ -65,7 +65,7 @@
RewriteEngine on
ProxyVia On
ProxyRequests Off
-   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/
+   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ retry=15
ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/
ProxyPreserveHost On
RewriteRule /p/*$ https://etherpad.wikimedia.org/ [NC,L]

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If3abc09e492752f1d52b2b8567857d9a1886fa9a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update Wikibase and WikimediaMessages - change (mediawiki/core)

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

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


Change subject: Update Wikibase and WikimediaMessages
..

Update Wikibase and WikimediaMessages

This allows Wikimedia Commons site link section to be
enabled on test.wikidata.org

Change-Id: Ide8165c22b9a3e7d52b75d9fbc694fa671b35051
---
M extensions/Wikibase
M extensions/WikimediaMessages
2 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/85231/1

diff --git a/extensions/Wikibase b/extensions/Wikibase
index 1ee7613..7392e36 16
--- a/extensions/Wikibase
+++ b/extensions/Wikibase
-Subproject commit 1ee7613d9149970f8fa04604a2439608a9b48585
+Subproject commit 7392e36f8ba07c3250fa398694b8993c7ca53a8e
diff --git a/extensions/WikimediaMessages b/extensions/WikimediaMessages
index b855aa9..90eb34b 16
--- a/extensions/WikimediaMessages
+++ b/extensions/WikimediaMessages
-Subproject commit b855aa995a71050899184767af002ec2f0b8acaa
+Subproject commit 90eb34bcaa4a84c2513829aabd8a4d913422ade7

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide8165c22b9a3e7d52b75d9fbc694fa671b35051
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.22wmf18
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Eliminate redundant work in the quote minimization pass - change (mediawiki...Parsoid)

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

Change subject: Eliminate redundant work in the quote minimization pass
..


Eliminate redundant work in the quote minimization pass

* Quote minimization code was doing redundant passes over the
  same dom-tree when skipping over text nodes -- in the worst
  case, this used to cause exponential behavior.

* Cleaned up the min_a and min_b flags to more accurately reflect
  progress when DOM has not changed because of combine or swap.

* This fixes serialization times on pl:Zarazowate and it:Poposaurus
  which used to take 944 and 569 secs respectively in rt-testing.

Change-Id: I901034e70ba0c88e3ede61c517b62c85ea80226e
---
M js/lib/dom.minimizeWTQuoteTags.js
1 file changed, 4 insertions(+), 8 deletions(-)

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



diff --git a/js/lib/dom.minimizeWTQuoteTags.js 
b/js/lib/dom.minimizeWTQuoteTags.js
index 1b50d68..a70827a 100644
--- a/js/lib/dom.minimizeWTQuoteTags.js
+++ b/js/lib/dom.minimizeWTQuoteTags.js
@@ -66,12 +66,11 @@
}
 
var a = node.firstChild, b,
-   min_a = true, min_b = true;
+   min_a = true;
 
while (a) {
if (DU.isElt(a)  min_a) {
minimizeTags(a, rewriteablePair);
-   min_a = false;
}
 
b = a.nextSibling;
@@ -79,9 +78,8 @@
break;
}
 
-   if (DU.isElt(b)  min_b) {
+   if (DU.isElt(b)) {
minimizeTags(b, rewriteablePair);
-   min_b = false;
}
 
// If 'a' and 'b' make a rewriteable tag-pair and neither of 
them
@@ -93,18 +91,16 @@
} else if (combinable(a, b)) {
a = merge(swap(a, a.firstChild), b);
min_a = true;
-   min_b = true;
} else if (combinable(b, a)) {
a = merge(a, swap(b, b.firstChild));
min_a = true;
-   min_b = true;
} else {
a = b;
-   min_b = true;
+   min_a = false;
}
} else {
a = b;
-   min_b = true;
+   min_a = false;
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I901034e70ba0c88e3ede61c517b62c85ea80226e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry ssas...@wikimedia.org
Gerrit-Reviewer: Cscott canan...@wikimedia.org
Gerrit-Reviewer: GWicke gwi...@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 continue editing link also to js and css pages - change (mediawiki/core)

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

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


Change subject: Add continue editing link also to js and css pages
..

Add continue editing link also to js and css pages

Wrap link in a span with class

Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9
---
M includes/EditPage.php
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/includes/EditPage.php b/includes/EditPage.php
index 63e3e66..963ef1c 100644
--- a/includes/EditPage.php
+++ b/includes/EditPage.php
@@ -3118,6 +3118,10 @@
return $previewHTML;
}
 
+   # provide a anchor link to the editform
+   $continueEditing = 'span class=mw-continue-editing' 
.
+   '[[#' . self::EDITFORM_ID . '|' . 
$wgLang-getArrow() . ' ' .
+   wfMessage( 'continue-editing' )-text() . 
']]/span';
if ( $this-mTriedSave  !$this-mTokenOk ) {
if ( $this-mTokenOkExceptSuffix ) {
$note = wfMessage( 
'token_suffix_mismatch' )-plain();
@@ -3128,8 +3132,7 @@
} elseif ( $this-incompleteForm ) {
$note = wfMessage( 'edit_form_incomplete' 
)-plain();
} else {
-   $note = wfMessage( 'previewnote' )-plain() .
-   ' [[#' . self::EDITFORM_ID . '|' . 
$wgLang-getArrow() . ' ' . wfMessage( 'continue-editing' )-text() . ']]';
+   $note = wfMessage( 'previewnote' )-plain() . ' 
' . $continueEditing;
}
 
$parserOptions = $this-mArticle-makeParserOptions( 
$this-mArticle-getContext() );
@@ -3158,7 +3161,9 @@
# Used messages to make sure grep find them:
# Messages: usercsspreview, userjspreview, 
sitecsspreview, sitejspreview
if ( $level  $format ) {
-   $note = div 
id='mw-{$level}{$format}preview' . wfMessage( {$level}{$format}preview 
)-text() . /div;
+   $note = div 
id='mw-{$level}{$format}preview' .
+   wfMessage( 
{$level}{$format}preview )-text() .
+   ' ' . $continueEditing . 
/div;
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cbbf9c2ae23672c0939261f2675273f5923e5f9
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] Remove tables from alpha - change (mediawiki...MobileFrontend)

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

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


Change subject: Remove tables from alpha
..

Remove tables from alpha

They have been there since December 2012 with no movement so let's
just remove them. We can always reconsider this code at a later time but
in the mean time it is something else to maintain

Change-Id: I2d62a8d296354c85ed938ab0b2f0003ab4d5920f
---
M includes/Resources.php
D javascripts/modules/mf-tables.js
2 files changed, 0 insertions(+), 71 deletions(-)


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

diff --git a/includes/Resources.php b/includes/Resources.php
index d86f3c3..bc3c19c 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -383,7 +383,6 @@
'javascripts/externals/micro.tap.js',
'javascripts/externals/epoch.js',
'javascripts/common/history-alpha.js',
-   'javascripts/modules/mf-tables.js',
'javascripts/modules/mf-translator.js',
'javascripts/modules/lazyload.js',
'javascripts/modules/nearbypages.js',
diff --git a/javascripts/modules/mf-tables.js b/javascripts/modules/mf-tables.js
deleted file mode 100644
index 22503a7..000
--- a/javascripts/modules/mf-tables.js
+++ /dev/null
@@ -1,70 +0,0 @@
-( function( M,  $ ) {
-   var Overlay = M.require( 'Overlay' ), STEP_SIZE = 150;
-
-   function isBlacklisted( $table ) {
-   return $table.hasClass( 'metadata' ) || $table.hasClass( 
'navbox' );
-   }
-
-   function collapseTables( $container ) {
-   var
-   $tables = $container ? $container.find( 'table' ) : $( 
'table' );
-
-   $tables.each( function( i ) {
-   var $t = $( this ),
-   $tc = $t.find( 'tbody' ),
-   $block, tableNo = i + 1,
-   sectionNo, tableId,
-   colspan, $tr, maxHeight, $td,
-   $container = $( 'div class=tableContent' );
-
-   if ( $t.parents( 'table' ).length === 0  $tc.length  
0  !isBlacklisted( $t ) ) {
-   $block = $t.parents( '.content_block' );
-   if ( $block ) {
-   $t.addClass( 'expando' ).css( { height: 
STEP_SIZE } );
-   maxHeight = $tc.height();
-
-   sectionNo = parseInt( $block.attr( 'id' 
).split( '_' )[ 1 ], 10 ) + 1;
-   tableId = sectionNo + '.' + tableNo;
-   $container.append( $t.clone() );
-   $td = $t.find( 'tr' ).find( 'td' );
-   colspan = $td.eq( 0 ).attr( 'colspan' ) 
|| $td.length;
-
-   $tr = $( 'tr class=overlayZoomer' 
).prependTo( $tc );
-   $( 'td' ).attr( 'colspan', colspan 
).click( function() {
-   var overlay = new Overlay( {
-   heading: 'h2' + $( 
this ).text() + '/h2',
-   content: $( 
'div').append( $container ).html()
-   } );
-   overlay.show();
-   } ).text( mw.msg( 
'mobile-frontend-table', tableId ) ).appendTo( $tr );
-
-   // make the vertical expando
-   $tr = $( 'tr class=expandoVertical' 
).appendTo( $tc );
-   $( 'tdnbsp;/td' ).attr( 'colspan', 
colspan ).appendTo( $tr );
-   $tr.on( 'click', function() {
-   var height,
-   expand = $tr.hasClass( 
'expanded' ) ? true : false;
-   height = expand ? STEP_SIZE : 
'';
-   $t.css( 'height', height );
-   $tr.toggleClass( 'expanded' );
-   window.scrollTo( 0, 
$tr.offset().top );
-   } );
-
-   }
-   }
-   } );
-   }
-
-   function initTables( $container ) {
-   if ( !mw.config.get( 'wgIsMainPage' ) ) {
-   collapseTables( $container );
-   }
-   }
-
-   M.
-   

[MediaWiki-commits] [Gerrit] enable tyv site for wikipedia family: update language_by_siz... - change (pywikibot/core)

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

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


Change subject: enable tyv site for wikipedia family: update language_by_size 
update interwiki sorting orders (update from compat 84114)
..

enable tyv site for wikipedia family:
update language_by_size
update interwiki sorting orders
(update from compat 84114)

Change-Id: I0fea407b3ee263c30094ec5708b90a054ccd8bbd
---
M pywikibot/families/wikipedia_family.py
M pywikibot/family.py
2 files changed, 22 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/24/85224/1

diff --git a/pywikibot/families/wikipedia_family.py 
b/pywikibot/families/wikipedia_family.py
index 9e57685..8c09efc 100644
--- a/pywikibot/families/wikipedia_family.py
+++ b/pywikibot/families/wikipedia_family.py
@@ -12,33 +12,33 @@
 
 self.languages_by_size = [
 'en', 'nl', 'de', 'sv', 'fr', 'it', 'es', 'ru', 'pl', 'ja', 'vi',
-'pt', 'war', 'ceb', 'zh', 'uk', 'ca', 'no', 'fi', 'fa', 'cs', 'ko',
+'war', 'ceb', 'pt', 'zh', 'uk', 'ca', 'no', 'fi', 'fa', 'cs', 'ko',
 'hu', 'ar', 'ro', 'ms', 'sr', 'tr', 'id', 'kk', 'sk', 'eo', 'da',
 'lt', 'eu', 'bg', 'he', 'hr', 'sl', 'uz', 'vo', 'et', 'hi', 'gl',
 'nn', 'simple', 'az', 'la', 'el', 'sh', 'oc', 'th', 'ka', 'hy',
 'mk', 'new', 'be', 'pms', 'tl', 'ta', 'ht', 'te', 'tt', 'be-x-old',
-'cy', 'lv', 'sq', 'bs', 'br', 'jv', 'mg', 'mr', 'lb', 'is', 'ml',
-'my', 'ba', 'yo', 'an', 'lmo', 'fy', 'af', 'bn', 'pnb', 'zh-yue',
-'sw', 'bpy', 'ur', 'io', 'ky', 'ne', 'scn', 'ga', 'gu', 'nds', 
'ku',
-'cv', 'ast', 'qu', 'tg', 'su', 'sco', 'als', 'bug', 'ia', 'nap',
-'kn', 'bat-smg', 'map-bms', 'wa', 'ckb', 'am', 'gd', 'hif',
+'cy', 'lv', 'sq', 'bs', 'br', 'mg', 'jv', 'mr', 'lb', 'is', 'ml',
+'my', 'ba', 'yo', 'an', 'lmo', 'fy', 'af', 'pnb', 'bn', 'zh-yue',
+'sw', 'ur', 'bpy', 'io', 'ky', 'ne', 'scn', 'ga', 'gu', 'tg', 
'nds',
+'ku', 'cv', 'ast', 'qu', 'su', 'sco', 'als', 'ia', 'bug', 'nap',
+'kn', 'bat-smg', 'am', 'map-bms', 'wa', 'ckb', 'gd', 'hif',
 'zh-min-nan', 'arz', 'mzn', 'yi', 'mn', 'vec', 'sah', 'nah', 'sa',
 'roa-tara', 'os', 'si', 'bar', 'pam', 'hsb', 'se', 'pa', 'li', 
'mi',
 'fo', 'co', 'ilo', 'gan', 'bo', 'frr', 'glk', 'rue', 'bcl',
 'nds-nl', 'fiu-vro', 'mrj', 'tk', 'ps', 'vls', 'xmf', 'gv', 'min',
-'or', 'diq', 'kv', 'km', 'pag', 'ce', 'mhr', 'zea', 'dv', 'csb',
-'nrm', 'vep', 'rm', 'koi', 'hak', 'udm', 'lad', 'lij', 'wuu',
+'or', 'diq', 'ce', 'kv', 'km', 'pag', 'mhr', 'zea', 'dv', 'csb',
+'nrm', 'vep', 'rm', 'hak', 'koi', 'udm', 'lad', 'lij', 'wuu',
 'zh-classical', 'fur', 'sc', 'stq', 'mt', 'ug', 'ay', 'so', 'pi',
-'bh', 'ksh', 'nov', 'kw', 'gn', 'ang', 'pcd', 'nv', 'as', 'eml',
-'gag', 'ext', 'frp', 'ace', 'szl', 'ie', 'ln', 'pfl', 'krc', 'xal',
+'bh', 'ksh', 'nov', 'kw', 'gn', 'ang', 'pcd', 'nv', 'gag', 'as',
+'eml', 'ext', 'frp', 'ace', 'szl', 'ie', 'ln', 'pfl', 'krc', 'xal',
 'haw', 'pdc', 'rw', 'crh', 'lez', 'dsb', 'to', 'arc', 'kl', 'myv',
-'kab', 'sn', 'bjn', 'pap', 'tpi', 'lo', 'lbe', 'wo', 'mwl', 'jbo',
+'kab', 'sn', 'bjn', 'pap', 'mwl', 'tpi', 'lo', 'lbe', 'wo', 'jbo',
 'mdf', 'kbd', 'cbk-zam', 'av', 'srn', 'ty', 'kg', 'ab', 'tet',
 'ltg', 'ig', 'na', 'bxr', 'nso', 'za', 'kaa', 'zu', 'chy', 'rmy',
 'cu', 'chr', 'tn', 'cdo', 'roa-rup', 'bi', 'got', 'sm', 'bm', 'iu',
-'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'om', 'fj', 'ti', 'ts',
-'ks', 'sg', 've', 'rn', 'st', 'cr', 'dz', 'ak', 'tum', 'ik', 'lg',
-'ff', 'ny', 'tw', 'ch', 'xh',
+'pih', 'pnt', 'sd', 'ss', 'ki', 'ee', 'ha', 'tyv', 'om', 'fj', 
'ti',
+'ts', 'ks', 'sg', 've', 'rn', 'st', 'cr', 'dz', 'ak', 'tum', 'ik',
+'lg', 'ff', 'ny', 'tw', 'ch', 'xh',
 ]
 
 langs = self.languages_by_size + ['test', 'test2']  # Sites we want to 
edit but not count as real languages
@@ -305,10 +305,10 @@
 'stq', 'st', 'nso', 'tn', 'sq', 'si', 'scn', 'simple', 'ss', 'sk',
 'sl', 'cu', 'szl', 'so', 'ckb', 'srn', 'sr', 'sh', 'fi', 'sv', 
'ta',
 'shi', 'tl', 'kab', 'roa-tara', 'tt', 'te', 'tet', 'th', 'ti', 
'vi',
-'tg', 'tokipona', 'tp', 'tpi', 'chy', 've', 'tr', 'tk', 'tw', 
'udm',
-'uk', 'ur', 'ug', 'za', 'vec', 'vep', 'vo', 'fiu-vro', 'wa', 'vls',
-'war', 'wo', 'wuu', 'ts', 'xmf', 'yi', 'yo', 'diq', 'zea', 'zh',
-'zh-tw', 'zh-cn', 'zh-classical', 'zh-yue', 'bat-smg',
+'tg', 'tokipona', 'tp', 'tpi', 'chy', 've', 'tr', 'tk', 'tw', 
'tyv',
+

[MediaWiki-commits] [Gerrit] Improve mw.text.nowiki, part 2 - change (mediawiki...Scribunto)

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

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


Change subject: Improve mw.text.nowiki, part 2
..

Improve mw.text.nowiki, part 2

The following are now correctly escaped:
* Blank lines (including those with only tabs)
*  at the start of a line

Bug: 53658
Change-Id: Ib000ff4f21f76c310741de89de0e0b66f6450344
---
M engines/LuaCommon/lualib/mw.text.lua
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Scribunto 
refs/changes/34/85234/1

diff --git a/engines/LuaCommon/lualib/mw.text.lua 
b/engines/LuaCommon/lualib/mw.text.lua
index 1047028..0191442 100644
--- a/engines/LuaCommon/lualib/mw.text.lua
+++ b/engines/LuaCommon/lualib/mw.text.lua
@@ -106,6 +106,9 @@
[\n:] = \n#58;, [\r:] = \r#58;,
[\n;] = \n#59;, [\r;] = \r#59;,
[\n ] = \n#32;, [\r ] = \r#32;,
+   [\n\n] = \n#10;, [\r\n] = #13;\n,
+   [\n\r] = \n#13;, [\r\r] = \r#13;,
+   [\n\t] = \n#9;, [\r\t] = \r#9;,
 }
 
 local nowikiReplMagic = {}
@@ -124,7 +127,10 @@
 function mwtext.nowiki( s )
-- string.gsub is safe here, because we're only caring about ASCII chars
s = string.gsub( s, '[\'=%[%]{|}]', nowikiRepl1 )
-   s = string.sub( string.gsub( '\n' .. s, '[\r\n][#*:; ]', nowikiRepl2 ), 
2 )
+   s = '\n' .. s
+   s = string.gsub( s, '[\r\n][#*:; \n\r\t]', nowikiRepl2 )
+   s = string.gsub( s, '([\r\n])%-%-%-%-', '%1#45;---' )
+   s = string.sub( s, 2 )
s = string.gsub( s, '__', '_#95;' )
s = string.gsub( s, '://', '#58;//' )
s = string.gsub( s, 'ISBN%s', nowikiReplMagic )

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib000ff4f21f76c310741de89de0e0b66f6450344
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] AFT pref is n/a for test2 now - change (qa/browsertests)

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

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


Change subject: AFT pref is n/a for test2 now
..

AFT pref is n/a for test2 now

Change-Id: I3ec141edf44d03111e8a2f7fac7640550af3ac1d
---
M features/step_definitions/preferences_appearance_steps.rb
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/qa/browsertests 
refs/changes/26/85226/1

diff --git a/features/step_definitions/preferences_appearance_steps.rb 
b/features/step_definitions/preferences_appearance_steps.rb
index 3d602ea..0687b8a 100644
--- a/features/step_definitions/preferences_appearance_steps.rb
+++ b/features/step_definitions/preferences_appearance_steps.rb
@@ -39,7 +39,6 @@
 page.auto_number_check_element.should exist
 page.collapse_sidebar_vector_check_element.should exist
 page.exclude_from_experiments_check_element.should exist
-page.dont_show_aft_check_element.should exist
   end
 end
 Then(/^I have Math options radio buttons$/) do

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ec141edf44d03111e8a2f7fac7640550af3ac1d
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] make string check very generic - change (qa/browsertests)

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

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


Change subject: make string check very generic
..

make string check very generic

Change-Id: I9a3bf6a57e1b8920be2f02d0425f043cfdb8166f
---
M features/page.feature
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/features/page.feature b/features/page.feature
index b22b2d1..ca77ee7 100644
--- a/features/page.feature
+++ b/features/page.feature
@@ -6,7 +6,7 @@
 
   Scenario:Go to page that does not exist
 Given I am at page that does not exist
-Then page text should contain Wikipedia does not have an article with this 
exact name
+Then page text should contain pages
   And link Create should be there
 
   Scenario: Prepare to start a new page using the URL

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a3bf6a57e1b8920be2f02d0425f043cfdb8166f
Gerrit-PatchSet: 1
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] AFT pref is n/a for test2 now - change (qa/browsertests)

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

Change subject: AFT pref is n/a for test2 now
..


AFT pref is n/a for test2 now

Change-Id: I3ec141edf44d03111e8a2f7fac7640550af3ac1d
---
M features/step_definitions/preferences_appearance_steps.rb
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/features/step_definitions/preferences_appearance_steps.rb 
b/features/step_definitions/preferences_appearance_steps.rb
index 3d602ea..0687b8a 100644
--- a/features/step_definitions/preferences_appearance_steps.rb
+++ b/features/step_definitions/preferences_appearance_steps.rb
@@ -39,7 +39,6 @@
 page.auto_number_check_element.should exist
 page.collapse_sidebar_vector_check_element.should exist
 page.exclude_from_experiments_check_element.should exist
-page.dont_show_aft_check_element.should exist
   end
 end
 Then(/^I have Math options radio buttons$/) do

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ec141edf44d03111e8a2f7fac7640550af3ac1d
Gerrit-PatchSet: 2
Gerrit-Project: qa/browsertests
Gerrit-Branch: master
Gerrit-Owner: Cmcmahon cmcma...@wikimedia.org
Gerrit-Reviewer: Cmcmahon cmcma...@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] Populate Wikipedia interwiki ids for Commons and Wikidata - change (mediawiki...Wikibase)

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

Change subject: Populate Wikipedia interwiki ids for Commons and Wikidata
..


Populate Wikipedia interwiki ids for Commons and Wikidata

By default, special wikis are in the wikipedia family
when it comes to the interwiki table and interwiki ids.

e.g. [[:en:Berlin]] on Wikimedia Commons should resolve to
[[Berlin]] on English Wikipedia.

Change-Id: Ief5e6c9c3ae44e2eb157fd28e8c37db7c05f50e9
(cherry picked from commit 6186cc21c8ebc1c6ae0838b05e614b3537c8f263)
---
M lib/includes/sites/SitesBuilder.php
M lib/maintenance/populateSitesTable.php
M lib/tests/phpunit/sites/SitesBuilderTest.php
3 files changed, 101 insertions(+), 79 deletions(-)

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



diff --git a/lib/includes/sites/SitesBuilder.php 
b/lib/includes/sites/SitesBuilder.php
index 50e0455..8e95f6c 100644
--- a/lib/includes/sites/SitesBuilder.php
+++ b/lib/includes/sites/SitesBuilder.php
@@ -17,8 +17,14 @@
 */
protected $store;
 
-   public function __construct( SiteStore $store ) {
+   /**
+* @var array
+*/
+   protected $validGroups;
+
+   public function __construct( SiteStore $store, array $validGroups ) {
$this-store = $store;
+   $this-validGroups = $validGroups;
}
 
/**
@@ -26,8 +32,14 @@
 * @param string $siteGroup
 * @param string $wikiId
 */
-   public function buildStore( array $sites, $siteGroup, $wikiId ) {
-   $sites = $this-addInterwikiIdsToGroup( $sites, $siteGroup, 
$wikiId );
+   public function buildStore( array $sites, $siteGroup = null, $wikiId = 
null ) {
+   if ( $siteGroup === null  is_string( $wikiId ) ) {
+   $siteGroup = $this-getInterwikiGroup( $sites, $wikiId 
);
+   }
+
+   if ( $siteGroup  in_array( $siteGroup, $this-validGroups ) ) 
{
+   $sites = $this-addInterwikiIdsToGroup( $sites, 
$siteGroup );
+   }
 
$existingSites = $this-store-getSites( nocache );
 
@@ -46,28 +58,10 @@
/**
 * @param Site[] $sites
 * @param string $siteGroup
-* @param string $wikiId
 *
 * @return Site[]
 */
-   public function addInterwikiIdsToGroup( array $sites, $siteGroup, 
$wikiId ) {
-   if ( $siteGroup !== null ) {
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   } elseif ( is_string( $wikiId ) ) {
-   $siteGroup = $this-getSiteGroupFromWikiId( $sites, 
$wikiId );
-   $sites = $this-addInterwikiIds( $sites, $siteGroup );
-   }
-
-   return $sites;
-   }
-
-   /**
-* @param Site[] $sites
-* @param string $siteGroup
-*
-* @return Site[]
-*/
-   protected function addInterwikiIds( array $sites, $siteGroup ) {
+   protected function addInterwikiIdsToGroup( array $sites, $siteGroup ) {
foreach( $sites as $site ) {
if( $site-getGroup() === $siteGroup ) {
$localId = $site-getLanguageCode();
@@ -88,13 +82,18 @@
 *
 * @return string
 */
-   protected function getSiteGroupFromWikiId( $sites, $wikiId ) {
+   protected function getInterwikiGroup( array $sites, $wikiId ) {
if ( !array_key_exists( $wikiId, $sites ) ) {
return null;
}
 
$site = $sites[$wikiId];
 
+   // @fixme: handle interwiki prefixes in a better way!
+   if ( preg_match( '/^([\w-]*)wiki$/', $site-getGlobalId() ) ) {
+   return 'wikipedia';
+   }
+
return $site-getGroup();
}
 
diff --git a/lib/maintenance/populateSitesTable.php 
b/lib/maintenance/populateSitesTable.php
index cb48a36..9d85396 100644
--- a/lib/maintenance/populateSitesTable.php
+++ b/lib/maintenance/populateSitesTable.php
@@ -45,6 +45,10 @@
$siteGroup = $this-getOption( 'site-group' );
$wikiId = $this-getOption( 'wiki' );
 
+   // @todo make it configurable, such as from a config file.
+   $validGroups = array( 'wikipedia', 'wikivoyage', 'wikiquote', 
'wiktionary',
+   'wikibooks', 'wikisource', 'wikiversity', 'wikinews' );
+
try {
$json = $this-getSiteMatrixData( $url );
 
@@ -54,7 +58,7 @@
$sites = $siteMatrixParser-sitesFromJson( $json );
 
$store = SiteSQLStore::newInstance();
-   $sitesBuilder = new SitesBuilder( $store );
+   $sitesBuilder = new SitesBuilder( $store, $validGroups 
);

[MediaWiki-commits] [Gerrit] add commons site link group section for test wikidata - change (operations/mediawiki-config)

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

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


Change subject: add commons site link group section for test wikidata
..

add commons site link group section for test wikidata

Change-Id: I54e39a21ea0e97f752ea379a33e9b0d6493743de
---
M wmf-config/CommonSettings.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 6c0210e..737c485 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2545,6 +2545,10 @@
'wikivoyage'
);
 
+   if ( $wgDBname === 'testwikidatawiki' ) {
+   $wgWBRepoSettings['siteLinkGroups'][] = 'commons';
+   }
+
$wgWBRepoSettings['usePropertyInfoTable'] = true;
 
if ( $wgDBname === 'testwikidatawiki' ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54e39a21ea0e97f752ea379a33e9b0d6493743de
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add tracking category when uploading with a Campaign - change (apps...commons)

2013-09-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Add tracking category when uploading with a Campaign
..


Add tracking category when uploading with a Campaign

Change-Id: I0790fc499c0b4960590f03222a1738cc72d7b173
---
M 
commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git 
a/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
 
b/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
index 111a2f9..a105c0e 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/campaigns/CampaignContribution.java
@@ -38,6 +38,7 @@
 } else {
 buffer.append({{subst:unc}}\n);
 }
+
buffer.append([[Category:).append(campaign.getTrackingCategory()).append(\n);
 return buffer.toString();
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0790fc499c0b4960590f03222a1738cc72d7b173
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: campaigns
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Improve wfEscapeWikiText, part 2 - change (mediawiki/core)

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

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


Change subject: Improve wfEscapeWikiText, part 2
..

Improve wfEscapeWikiText, part 2

The following are now correctly escaped:
* Blank lines (including those with only tabs)
*  at the start of a line

Bug: 53658
Change-Id: I300e15a22c93ca542913135c9c83913c18c99faf
---
M includes/GlobalFunctions.php
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/33/85233/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 0c92ab6..414c822 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -2032,6 +2032,10 @@
\n* = \n#42;, \r* = \r#42;,
\n: = \n#58;, \r: = \r#58;,
\n  = \n#32;, \r  = \r#32;,
+   \n\n = \n#10;, \r\n = #13;\n,
+   \n\r = \n#13;, \r\r = \r#13;,
+   \n\t = \n#9;, \r\t = \r#9;, // \n\t\n is 
treated like \n\n
+   \n = \n#45;---, \r = \r#45;---,
'__' = '_#95;', '://' = '#58;//',
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I300e15a22c93ca542913135c9c83913c18c99faf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie bjor...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Make the ImageView to be of the specific type - change (apps...commons)

2013-09-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Make the ImageView to be of the specific type
..


Make the ImageView to be of the specific type

Change-Id: I51ced26ea0b654457919d915e322d91eb211f781
---
M 
commons/src/main/java/org/wikimedia/commons/contributions/ContributionViewHolder.java
1 file changed, 3 insertions(+), 2 deletions(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionViewHolder.java
 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionViewHolder.java
index bfa9bda..3bf5adf 100644
--- 
a/commons/src/main/java/org/wikimedia/commons/contributions/ContributionViewHolder.java
+++ 
b/commons/src/main/java/org/wikimedia/commons/contributions/ContributionViewHolder.java
@@ -4,10 +4,11 @@
 import android.widget.ImageView;
 import android.widget.ProgressBar;
 import android.widget.TextView;
+import org.wikimedia.commons.MediaWikiImageView;
 import org.wikimedia.commons.R;
 
 class ContributionViewHolder {
-final ImageView imageView;
+final MediaWikiImageView imageView;
 final TextView titleView;
 final TextView stateView;
 final TextView seqNumView;
@@ -16,7 +17,7 @@
 String url;
 
 ContributionViewHolder(View parent) {
-imageView = (ImageView)parent.findViewById(R.id.contributionImage);
+imageView = (MediaWikiImageView) 
parent.findViewById(R.id.contributionImage);
 titleView = (TextView)parent.findViewById(R.id.contributionTitle);
 stateView = (TextView)parent.findViewById(R.id.contributionState);
 seqNumView = 
(TextView)parent.findViewById(R.id.contributionSequenceNumber);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I51ced26ea0b654457919d915e322d91eb211f781
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: campaigns
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] point composer dependencies to the branches - change (mediawiki...Wikibase)

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

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


Change subject: point composer dependencies to the branches
..

point composer dependencies to the branches

Change-Id: I6fc3fb8ed12120884c7422b96aa24a45a9613433
---
M composer.json
1 file changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/composer.json b/composer.json
index ce8e82f..057f6e6 100644
--- a/composer.json
+++ b/composer.json
@@ -19,10 +19,10 @@
},
 require: {
 php: =5.3.0,
-   data-values/data-values: *,
-   data-values/data-types: *,
-   wikibase/data-model: *,
-diff/diff: =0.6
+   data-values/data-values: dev-mw1.22-wmf18,
+   data-values/data-types: dev-mw1.22-wmf18,
+   wikibase/data-model: dev-mw1.22-wmf18,
+diff/diff: dev-mw1.22-wmf18
 },
minimum-stability : dev,
autoload: {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6fc3fb8ed12120884c7422b96aa24a45a9613433
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf18
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] point composer dependencies to the branches - change (mediawiki...Wikibase)

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

Change subject: point composer dependencies to the branches
..


point composer dependencies to the branches

Change-Id: I6fc3fb8ed12120884c7422b96aa24a45a9613433
---
M composer.json
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/composer.json b/composer.json
index ce8e82f..057f6e6 100644
--- a/composer.json
+++ b/composer.json
@@ -19,10 +19,10 @@
},
 require: {
 php: =5.3.0,
-   data-values/data-values: *,
-   data-values/data-types: *,
-   wikibase/data-model: *,
-diff/diff: =0.6
+   data-values/data-values: dev-mw1.22-wmf18,
+   data-values/data-types: dev-mw1.22-wmf18,
+   wikibase/data-model: dev-mw1.22-wmf18,
+diff/diff: dev-mw1.22-wmf18
 },
minimum-stability : dev,
autoload: {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fc3fb8ed12120884c7422b96aa24a45a9613433
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.22-wmf18
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Use parens to clarify intent functionality of a condition - change (apps...commons)

2013-09-20 Thread Brion VIBBER (Code Review)
Brion VIBBER has submitted this change and it was merged.

Change subject: Use parens to clarify intent  functionality of a condition
..


Use parens to clarify intent  functionality of a condition

Precedence rules are for chumps.

Change-Id: I5e46899b3d2e2af32b627e8cd61f085ad28ef2a2
---
M commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Brion VIBBER: Verified; Looks good to me, approved



diff --git 
a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java 
b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java
index 57bfd43..1cdc61a 100644
--- a/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java
+++ b/commons/src/main/java/org/wikimedia/commons/MediaWikiImageView.java
@@ -182,7 +182,7 @@
 
 if (response.getBitmap() != null) {
 setImageBitmap(response.getBitmap());
-if(tryOriginal  mMedia instanceof Contribution 
 response.getBitmap().getWidth()  mMedia.getWidth() || 
response.getBitmap().getHeight()  mMedia.getHeight()) {
+if(tryOriginal  mMedia instanceof Contribution 
 (response.getBitmap().getWidth()  mMedia.getWidth() || 
response.getBitmap().getHeight()  mMedia.getHeight())) {
 // If there is no width information for this 
image, save it. This speeds up image loading massively for smaller images
 
mMedia.setHeight(response.getBitmap().getHeight());
 
mMedia.setWidth(response.getBitmap().getWidth());

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e46899b3d2e2af32b627e8cd61f085ad28ef2a2
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/commons
Gerrit-Branch: campaigns
Gerrit-Owner: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: Brion VIBBER br...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Add echo to officewiki - change (operations/mediawiki-config)

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

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


Change subject: Add echo to officewiki
..

Add echo to officewiki

Alphasort

Change-Id: Ib41695919d2f28a2dca4ae332efa8ca3f27f6a7d
---
M echowikis.dblist
1 file changed, 14 insertions(+), 13 deletions(-)


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

diff --git a/echowikis.dblist b/echowikis.dblist
index 21f0092..9967bd5 100644
--- a/echowikis.dblist
+++ b/echowikis.dblist
@@ -1,19 +1,20 @@
-mediawikiwiki
-test2wiki
-testwiki
-enwiki
-metawiki
-frwiki
-huwiki
-plwiki
-ptwiki
-svwiki
 bswiki
-nlwiki
+enwiki
+enwikivoyage
+eswiki
 etwiki
 fawiki
+frwiki
 hewiki
+huwiki
+mediawikiwiki
+metawiki
+nlwiki
+officewiki
+plwiki
+ptwiki
 rowiki
-eswiki
-enwikivoyage
 simplewiki
+svwiki
+test2wiki
+testwiki

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib41695919d2f28a2dca4ae332efa8ca3f27f6a7d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Retry timeout to 15sec for etherpad frontend - change (operations/puppet)

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

Change subject: Retry timeout to 15sec for etherpad frontend
..


Retry timeout to 15sec for etherpad frontend

By default it's 60 secs of timeout whenever the backend application
server goes into an error state. This commit reduces this to 15 secs
allowing for shorter time windows during failure of nodejs backend

Change-Id: If3abc09e492752f1d52b2b8567857d9a1886fa9a
---
M templates/apache/sites/etherpad_lite.wikimedia.org.erb
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/templates/apache/sites/etherpad_lite.wikimedia.org.erb 
b/templates/apache/sites/etherpad_lite.wikimedia.org.erb
index 5976897..477f88f 100644
--- a/templates/apache/sites/etherpad_lite.wikimedia.org.erb
+++ b/templates/apache/sites/etherpad_lite.wikimedia.org.erb
@@ -14,7 +14,7 @@
RewriteEngine on
ProxyVia On
ProxyRequests Off
-   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/
+   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ retry=15
ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/
ProxyPreserveHost On
RewriteRule /p/*$ https://etherpad.wikimedia.org/ [NC,L]
@@ -65,7 +65,7 @@
RewriteEngine on
ProxyVia On
ProxyRequests Off
-   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/
+   ProxyPass / http://%= etherpad_ip %:%= etherpad_port %/ retry=15
ProxyPassReverse / http://%= etherpad_ip %:%= etherpad_port %/
ProxyPreserveHost On
RewriteRule /p/*$ https://etherpad.wikimedia.org/ [NC,L]

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If3abc09e492752f1d52b2b8567857d9a1886fa9a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Akosiaris akosia...@wikimedia.org
Gerrit-Reviewer: Akosiaris akosia...@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 echo to officewiki - change (operations/mediawiki-config)

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

Change subject: Add echo to officewiki
..


Add echo to officewiki

Alphasort

Change-Id: Ib41695919d2f28a2dca4ae332efa8ca3f27f6a7d
---
M echowikis.dblist
1 file changed, 14 insertions(+), 13 deletions(-)

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



diff --git a/echowikis.dblist b/echowikis.dblist
index 21f0092..9967bd5 100644
--- a/echowikis.dblist
+++ b/echowikis.dblist
@@ -1,19 +1,20 @@
-mediawikiwiki
-test2wiki
-testwiki
-enwiki
-metawiki
-frwiki
-huwiki
-plwiki
-ptwiki
-svwiki
 bswiki
-nlwiki
+enwiki
+enwikivoyage
+eswiki
 etwiki
 fawiki
+frwiki
 hewiki
+huwiki
+mediawikiwiki
+metawiki
+nlwiki
+officewiki
+plwiki
+ptwiki
 rowiki
-eswiki
-enwikivoyage
 simplewiki
+svwiki
+test2wiki
+testwiki

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib41695919d2f28a2dca4ae332efa8ca3f27f6a7d
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot

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


  1   2   3   4   >