[MediaWiki-commits] [Gerrit] Full text search results in correct order - change (apps...wikipedia)

2014-11-15 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Full text search results in correct order
..

Full text search results in correct order

Also avoiding an extra request per full text search to get the thumbnail URLs.
This should make the thumbnails appear much faster.

Using similar request as iOS app.

Bug: 72781
Change-Id: Ic6742bd8ae796c1c0ee4879e22cae0063efd564b
---
M wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java
M wikipedia/src/main/java/org/wikipedia/search/FullSearchFragment.java
M wikipedia/src/main/java/org/wikipedia/search/FullSearchResult.java
M wikipedia/src/main/java/org/wikipedia/search/TitleSearchTask.java
4 files changed, 62 insertions(+), 60 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/38/173638/1

diff --git 
a/wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java 
b/wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java
index 9d09734..363422e 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/FullSearchArticlesTask.java
@@ -3,18 +3,23 @@
 import org.wikipedia.ApiTask;
 import org.wikipedia.PageTitle;
 import org.wikipedia.Site;
+import org.wikipedia.WikipediaApp;
 import org.mediawiki.api.json.Api;
 import org.mediawiki.api.json.ApiException;
 import org.mediawiki.api.json.ApiResult;
 import org.mediawiki.api.json.RequestBuilder;
+import org.json.JSONArray;
 import org.json.JSONException;
 import org.json.JSONObject;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 
 public class FullSearchArticlesTask extends 
ApiTask {
+private static final int MAX_RESULTS = 12;
 private static final String NUM_RESULTS_PER_QUERY = "12";
 
 private final Site site;
@@ -30,17 +35,29 @@
 
 @Override
 public RequestBuilder buildRequest(Api api) {
+final String offset = Integer.toString(continueOffset);
 return api.action("query")
-.param("prop", "pageprops")
+.param("prop", "pageprops|pageimages")
 .param("ppprop", "wikibase_item") // only interested in 
wikibase_item
 .param("generator", "search")
 .param("gsrsearch", searchTerm)
 .param("gsrnamespace", "0")
 .param("gsrwhat", "text")
-.param("gsrinfo", "totalhits|suggestion")
+.param("gsrinfo", "")
 .param("gsrprop", "redirecttitle")
-.param("gsroffset", Integer.toString(continueOffset))
-.param("gsrlimit", NUM_RESULTS_PER_QUERY);
+.param("gsroffset", offset)
+.param("gsrlimit", NUM_RESULTS_PER_QUERY)
+.param("list", "search") // for correct order
+.param("srsearch", searchTerm)
+.param("srnamespace", "0")
+.param("srwhat", "text")
+.param("srinfo", "suggestion")
+.param("srprop", "")
+.param("sroffset", offset)
+.param("srlimit", NUM_RESULTS_PER_QUERY)
+.param("piprop", "thumbnail") // for thumbnail URLs
+.param("pithumbsize", 
Integer.toString(WikipediaApp.PREFERRED_THUMB_SIZE))
+.param("pilimit", NUM_RESULTS_PER_QUERY);
 }
 
 @Override
@@ -77,7 +94,19 @@
 return emptyResults();
 }
 
-ArrayList resultList = new 
ArrayList();
+/*
+So here's what we're doing here:
+We're requesting two sets of results with our API query. They both 
contain the same titles,
+but in different orders.  The results given by "list=search" give us 
the results in
+the correct order, but with no thumbnails or wikidata ID. The results 
given by "generator=search"
+give the results in the wrong order, but with thumbnails and wikidata 
IDs!
+So, all we have to do is use the first list, and correlate the titles 
with the second list to
+extract the thumbnails. Unfortunately, the search generator only gives 
us titles and not pageids.
+This is why we need a Map of titles to results.
+*/
+
+// build a map of full result objects
+Map map = new HashMap(MAX_RESULTS + 1, 1.0f);
 Iterator keys = pages.keys();
 while (keys.hasNext()) {
 String key = keys.next();
@@ -89,7 +118,20 @@
 JSONObject pageProps = pageData.getJSONObject("pageprops");
 wikiBaseId = pageProps.optString("wikibase_item", null);
 }
-resultList.add(new FullSearchResult(pageTitle, wikiBaseId));
+String thumbUrl = null;
+if (pageDa

[MediaWiki-commits] [Gerrit] Hygiene: Change categoryButton to be hyphenated - change (mediawiki...MobileFrontend)

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

Change subject: Hygiene: Change categoryButton to be hyphenated
..


Hygiene: Change categoryButton to be hyphenated

Bug: 73339
Change-Id: I90f83c0c27acecb153971181c079a6afec49149f
---
M includes/skins/MinervaTemplateAlpha.php
M javascripts/modules/categories/init.js
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/skins/MinervaTemplateAlpha.php 
b/includes/skins/MinervaTemplateAlpha.php
index c09477b..7cc2347 100644
--- a/includes/skins/MinervaTemplateAlpha.php
+++ b/includes/skins/MinervaTemplateAlpha.php
@@ -49,7 +49,7 @@
'url' => '#/categories',
// add hidden class (the overlay works only, 
when JS is enabled (class will
// be removed in categories/init.js)
-   'class' => 'categoryButton hidden',
+   'class' => 'category-button hidden',
'label' => wfMessage( 'categories' )->text()
);
}
diff --git a/javascripts/modules/categories/init.js 
b/javascripts/modules/categories/init.js
index 78556a6..1917376 100644
--- a/javascripts/modules/categories/init.js
+++ b/javascripts/modules/categories/init.js
@@ -19,7 +19,7 @@
 * Enable the categories button
 */
function initButton() {
-   $( '.categoryButton' ).removeClass( 'hidden' );
+   $( '.category-button' ).removeClass( 'hidden' );
}
 
$( initButton );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I90f83c0c27acecb153971181c079a6afec49149f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 
Gerrit-Reviewer: Awjrichards 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Removed HTML escaping for admin confirmation emails - change (mediawiki...ConfirmAccount)

2014-11-15 Thread Tiefpunkt (Code Review)
Tiefpunkt has uploaded a new change for review.

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

Change subject: Removed HTML escaping for admin confirmation emails
..

Removed HTML escaping for admin confirmation emails

Change-Id: I1b669424bac18d2480bfa65354cd0633db509e43
---
M frontend/specialpages/actions/RequestAccount_body.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ConfirmAccount 
refs/changes/37/173637/1

diff --git a/frontend/specialpages/actions/RequestAccount_body.php 
b/frontend/specialpages/actions/RequestAccount_body.php
index ab3..6267fef 100644
--- a/frontend/specialpages/actions/RequestAccount_body.php
+++ b/frontend/specialpages/actions/RequestAccount_body.php
@@ -366,10 +366,10 @@
if ( $adminsNotify->count() || $wgConfirmAccountContact 
!= '' ) {
$title = SpecialPage::getTitleFor( 
'ConfirmAccounts' );
$subject = $this->msg(
-   'requestaccount-email-subj-admin' 
)->inContentLanguage()->escaped();
+   'requestaccount-email-subj-admin' 
)->inContentLanguage()->text();
$body = $this->msg(
'requestaccount-email-body-admin', 
$name )->rawParams(
-   $title->getFullUrl() 
)->inContentLanguage()->escaped();
+   $title->getFullUrl() 
)->inContentLanguage()->text();
# Actually send the email...
if ( $wgConfirmAccountContact != '' ) {
$source = new MailAddress( 
$wgPasswordSender, wfMessage( 'emailsender' )->text() );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b669424bac18d2480bfa65354cd0633db509e43
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ConfirmAccount
Gerrit-Branch: master
Gerrit-Owner: Tiefpunkt 

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


[MediaWiki-commits] [Gerrit] Dont load site at startup to log site version - change (pywikibot/core)

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

Change subject: Dont load site at startup to log site version
..


Dont load site at startup to log site version

Move the logging of the site version into Bot() to prevent
site access issues occurring before main() or Bot() have
requested a Site() object.

Bot now log the site version of each site that is fetched via
the Bot.site property

Bot.__init__ sets self.generator if it is in kwargs.

Bot.run updates Bot.site if Bot.site was not set prior to run()
being invoked.

Remove the run() method from delete.py, so it uses the new
treat()-only system where Bot.run() manages the site property.

Bug: 69895
Change-Id: If8a71b78b639288c7cf4329b1292c88d889ce1fa
---
M pywikibot/bot.py
M scripts/delete.py
2 files changed, 70 insertions(+), 23 deletions(-)

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



diff --git a/pywikibot/bot.py b/pywikibot/bot.py
index 99c6b8f..1b5bfec 100644
--- a/pywikibot/bot.py
+++ b/pywikibot/bot.py
@@ -258,10 +258,11 @@
 
 This may help the user to track errors or report bugs.
 """
-# if site not available it's too early to print a header (work-a-round)
-try:
-site = pywikibot.Site()
-except AttributeError:
+# If a http thread is not available, it's too early to print a header
+# that includes version information, which may need to query a server.
+# The http module can't be imported due to circular dependencies.
+http = sys.modules.get('pywikibot.comms.http', None)
+if not http or not hasattr(http, 'threads') or not len(http.threads):
 return
 
 log(u'=== Pywikibot framework v2.0 -- Logging header ===')
@@ -321,8 +322,6 @@
 
 if config.log_pywiki_repo_version:
 log(u'PYWIKI REPO VERSION: %s' % 
unicode(version.getversion_onlinerepo()))
-
-log(u'SITE VERSION: %s' % site.version())
 
 log(u'=== ' * 14)
 
@@ -888,7 +887,12 @@
 @param kwargs: bot options
 @type kwargs: dict
 """
+if 'generator' in kwargs:
+self.generator = kwargs.pop('generator')
+
 self.setOptions(**kwargs)
+self._site = None
+self._sites = set()
 
 def setOptions(self, **kwargs):
 """
@@ -1049,13 +1053,63 @@
 raise NotImplementedError('Method %s.treat() not implemented.'
   % self.__class__.__name__)
 
+@property
+def site(self):
+"""Site that the bot is using."""
+if not self._site:
+warning('Bot.site was not set before being retrieved.')
+self.site = pywikibot.Site()
+warning('Using the default site: %s' % self.site)
+return self._site
+
+@site.setter
+def site(self, site):
+"""
+Set the Site that the bot is using.
+
+When Bot.run() is managing the generator and site property, this is
+set each time a page is on a site different from the previous page.
+"""
+if site not in self._sites:
+log(u'LOADING SITE %s VERSION: %s'
+% (site, unicode(site.version(
+
+self._sites.add(site)
+if len(self._sites) == 2:
+log('%s uses multiple sites' % self.__class__.__name__)
+if self._site and self._site != site:
+log('%s: changing site from %s to %s'
+% (self.__class__.__name__, self._site, site))
+self._site = site
+
 def run(self):
 """Process all pages in generator."""
 if not hasattr(self, 'generator'):
 raise NotImplementedError('Variable %s.generator not set.'
   % self.__class__.__name__)
+
+# This check is to remove the possibility that the superclass changing
+# self.site causes bugs in subclasses.
+# If the subclass has set self.site before run(), it may be that the
+# bot processes pages on sites other than self.site, and therefore
+# this method cant alter self.site.  To use this functionality, don't
+# set self.site in __init__, and use page.site in treat().
+auto_update_site = not self._site
+if not auto_update_site:
+warning(
+'%s.__init__ set the Bot.site property; this is only needed '
+'when the Bot accesses many sites.' % self.__class__.__name__)
+else:
+log('Bot is managing the %s.site property in run()'
+% self.__class__.__name__)
+
 try:
 for page in self.generator:
+# When in auto update mode, set the site when it changes,
+# so subclasses can hook onto changes to site.
+if (auto_update_site and
+(not self._site or page.site != self.site)):
+self.site = page.site
 self.treat(page)
 except 

[MediaWiki-commits] [Gerrit] [FEAT] Page: Create redirects - change (pywikibot/core)

2014-11-15 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FEAT] Page: Create redirects
..

[FEAT] Page: Create redirects

This sets the text to a #REDIRECT to the given Page or Link.

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


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

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 68bfd5c..806d1d7 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1061,6 +1061,35 @@
 comment += i18n.twtranslate(self.site, 'cosmetic_changes-append')
 return comment
 
+def redirect_to(self, target, interwiki=False):
+"""
+Set the text to be a redirect.
+
+@param target: Redirect target page
+@type target: Page, Link
+@param interwiki: Allow interwiki redirects. They are not supported
+by the MediaWiki software.
+@type interwiki: bool
+"""
+if isinstance(target, Page):
+target = target._link
+if self.site != target.site:
+if not interwiki:
+raise ValueError('Interwiki redirects are not enabled.')
+else:
+iw_prefix = self.site.interwiki_prefix(target.site)[0] + ':'
+else:
+iw_prefix = ''
+if target.section:
+section = '#' + target.section
+else:
+section = ''
+self.text = u"#{0} [[{1}{2}{3}]]".format(
+self.site.redirect(),
+iw_prefix,
+target.canonical_title(),
+section)
+
 def put(self, newtext, comment=u'', watchArticle=None, minorEdit=True,
 botflag=None, force=False, async=False, callback=None, **kwargs):
 """Save the page with the contents of the first argument as the text.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I03a217c416bcb6e709ccf72b1b805889e8d77a87
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (mediawiki...CollapsibleVector)

2014-11-15 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: I6f0ca860cf94f88195968f3d3a97e96183b75f6f
(cherry picked from commit a0fe10c9f637268c9fe10c6a7f3111eaa8433e42)
---
A i18n/zh-hant.json
1 file changed, 8 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CollapsibleVector 
refs/changes/35/173635/1

diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json
new file mode 100644
index 000..a1927be
--- /dev/null
+++ b/i18n/zh-hant.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Liuxinyu970226"
+   ]
+   },
+   "collapsiblevector-collapsiblenav-more": "更多語言"
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f0ca860cf94f88195968f3d3a97e96183b75f6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox 
Gerrit-Reviewer: L10n-bot 

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


[MediaWiki-commits] [Gerrit] Localisation updates from https://translatewiki.net. - change (mediawiki...CollapsibleVector)

2014-11-15 Thread Paladox (Code Review)
Paladox has submitted this change and it was merged.

Change subject: Localisation updates from https://translatewiki.net.
..


Localisation updates from https://translatewiki.net.

Change-Id: I6f0ca860cf94f88195968f3d3a97e96183b75f6f
(cherry picked from commit a0fe10c9f637268c9fe10c6a7f3111eaa8433e42)
---
A i18n/zh-hant.json
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/i18n/zh-hant.json b/i18n/zh-hant.json
new file mode 100644
index 000..a1927be
--- /dev/null
+++ b/i18n/zh-hant.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Liuxinyu970226"
+   ]
+   },
+   "collapsiblevector-collapsiblenav-more": "更多語言"
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6f0ca860cf94f88195968f3d3a97e96183b75f6f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox 
Gerrit-Reviewer: L10n-bot 
Gerrit-Reviewer: Paladox 

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


[MediaWiki-commits] [Gerrit] eventlogging: Make ganglia usage optional - change (operations/puppet)

2014-11-15 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: eventlogging: Make ganglia usage optional
..

eventlogging: Make ganglia usage optional

Bug: 73479
Change-Id: I6b1802cbf51e5304b4b2d752551efd68184a3210
---
M modules/eventlogging/manifests/service/processor.pp
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/34/173634/1

diff --git a/modules/eventlogging/manifests/service/processor.pp 
b/modules/eventlogging/manifests/service/processor.pp
index cb98388..f8e94da 100644
--- a/modules/eventlogging/manifests/service/processor.pp
+++ b/modules/eventlogging/manifests/service/processor.pp
@@ -59,6 +59,10 @@
 file { "/etc/eventlogging.d/processors/${basename}":
 ensure  => $ensure,
 content => template('eventlogging/processor.erb'),
-notify  => Service['eventlogging/init', 'gmond'],
+notify  => Service['eventlogging/init'],
+}
+
+if hiera('has_ganglia', true) {
+File["/etc/eventlogging.d/processors/${basename}"] ~> Service['gmond']
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6b1802cbf51e5304b4b2d752551efd68184a3210
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] keyholder: add icinga check - change (operations/puppet)

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

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

Change subject: keyholder: add icinga check
..

keyholder: add icinga check

Add a check that ensures the keyholder agent is armed with the key.

Change-Id: I4a5d4bf6429ccf2571c27e13a3039324a100a528
---
M manifests/role/deployment.pp
A modules/keyholder/files/check_keyholder
A modules/keyholder/manifests/monitoring.pp
3 files changed, 71 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/33/173633/1

diff --git a/manifests/role/deployment.pp b/manifests/role/deployment.pp
index 0b60416..5e55f60 100644
--- a/manifests/role/deployment.pp
+++ b/manifests/role/deployment.pp
@@ -151,6 +151,8 @@
 trusted_group => 'wikidev',
 }
 
+include ::keyholder::monitoring
+
 keyholder::private_key { 'mwdeploy_rsa':
 source => 'puppet:///private/ssh/tin/mwdeploy_rsa',
 }
diff --git a/modules/keyholder/files/check_keyholder 
b/modules/keyholder/files/check_keyholder
new file mode 100755
index 000..5700372
--- /dev/null
+++ b/modules/keyholder/files/check_keyholder
@@ -0,0 +1,37 @@
+#!/bin/bash
+# Icinga plugin for keyholder
+
+export SSH_AUTH_SOCK="/run/keyholder/proxy.sock"
+
+configured_keys() {
+  # Get a sorted list of all key files in /etc/keyholder.d
+  /usr/bin/find /etc/keyholder.d -type f 2>/dev/null | /usr/bin/sort
+}
+
+active_keys() {
+  # Get a sorted list of all keys currently represented by the agent.
+  /usr/bin/ssh-add -l 2>/dev/null | /usr/bin/cut -d' ' -f 3 | /usr/bin/sort
+}
+
+[ -S "$SSH_AUTH_SOCK" ] || {
+  echo "CRITICAL: Cannot connect to keyholder-proxy socket $SSH_AUTH_SOCK."
+  exit 2
+}
+
+[ -r /etc/keyholder.d ] || {
+  echo "UNKNOWN: You do not have permission to list /etc/keyholder.d."
+  exit 3
+}
+
+[ -w "$SSH_AUTH_SOCK" ] || {
+  echo "UNKNOWN: You do not have permission to communicate with the keyholder 
socket."
+  exit 3
+}
+
+[ "$(configured_keys)" == "$(active_keys)" ] || {
+  echo "WARNING: Keyholder is not armed. Run 'keyholder arm' to arm it."
+  exit 1
+}
+
+echo "OK: Keyholder is armed with all configured keys."
+exit 0
diff --git a/modules/keyholder/manifests/monitoring.pp 
b/modules/keyholder/manifests/monitoring.pp
new file mode 100644
index 000..15d48ec
--- /dev/null
+++ b/modules/keyholder/manifests/monitoring.pp
@@ -0,0 +1,32 @@
+# == Class: keyholder::monitoring
+#
+# Provisions an Icinga check that ensures the keyholder is armed
+# with all configured identities.
+#
+class keyholder::monitoring( $ensure = present ) {
+validate_ensure($ensure)
+
+$plugin_path = '/usr/lib/nagios/plugins/check_keyholder'
+
+file { $plugin_path:
+ensure => $ensure,
+source => 'puppet:///modules/keyholder/check_keyholder',
+owner  => 'root',
+group  => 'root',
+mode   => '0555',
+}
+
+sudo::user { 'nagios_check_keyholder':
+ensure => $ensure,
+user   => 'nagios',
+privileges => [ "ALL = NOPASSWD: $plugin_path" ],
+require=> File[$plugin_path],
+}
+
+nrpe::monitor_service { 'keyholder':
+ensure   => $ensure,
+description  => 'Keyholder SSH agent',
+nrpe_command => "/usr/bin/sudo $plugin_path",
+require  => Sudo::User['nagios_check_keyholder'],
+}
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a5d4bf6429ccf2571c27e13a3039324a100a528
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] [FIX] ParamInfo: Don't modify module set - change (pywikibot/core)

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

Change subject: [FIX] ParamInfo: Don't modify module set
..


[FIX] ParamInfo: Don't modify module set

The module set has been modified which led to the effect that when
someone was fetching all entries and then iterating over the entries of
the same set, that all already cached entries were missing from the set.

The HTTP GET patch (c26b9dcb4242add0145a883c6b6973a45a665ed0) therefore
was thinking it could use a GET request, because the entry which
should've shown it that a POST request is required was deleted.

Change-Id: I467ff7a8fe243df0abd7f322ecaa8460a91e4017
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 3eb69a1..8aa97b4 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -274,7 +274,7 @@
 else:
 modules = set(modules)
 
-modules -= set(self._paraminfo.keys())
+modules = modules - set(self._paraminfo.keys())
 if not modules:
 return
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I467ff7a8fe243df0abd7f322ecaa8460a91e4017
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Show actual SQL instead of query string in db modal - change (wikimedia...dash)

2014-11-15 Thread Ssmith (Code Review)
Ssmith has uploaded a new change for review.

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

Change subject: Show actual SQL instead of query string in db modal
..

Show actual SQL instead of query string in db modal

Change-Id: Ib6e2a70aaaed70d0c574c42b02ef9e08f4d2bbab
---
M src/components/widgets/fraud-gauge/fraud-gauge.html
M src/components/widgets/fraud-gauge/fraud-gauge.js
2 files changed, 8 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/dash 
refs/changes/32/173632/1

diff --git a/src/components/widgets/fraud-gauge/fraud-gauge.html 
b/src/components/widgets/fraud-gauge/fraud-gauge.html
index 1df020c..ed3ca18 100644
--- a/src/components/widgets/fraud-gauge/fraud-gauge.html
+++ b/src/components/widgets/fraud-gauge/fraud-gauge.html
@@ -115,7 +115,7 @@
 ×Close
 Fraud Gauge SQL:
 
-
+
 
 
 
diff --git a/src/components/widgets/fraud-gauge/fraud-gauge.js 
b/src/components/widgets/fraud-gauge/fraud-gauge.js
index cc956f8..55e61be 100644
--- a/src/components/widgets/fraud-gauge/fraud-gauge.js
+++ b/src/components/widgets/fraud-gauge/fraud-gauge.js
@@ -47,7 +47,8 @@
 self.gaugeValue = ko.observable(0);
 self.filtersSelected = ko.observable(false);
 self.gaugeIsSetUp = ko.observable(false);
-self.queryString = ko.observable('This widget hasn\'t been set up yet!');
+self.queryString = ko.observable('');
+self.queryStringSQL = ko.observable('This widget hasn\'t been set up 
yet!');
 
 //broken down data from above
 self.filters = ko.observableArray($.map(self.data.filters, function(val, 
i){return[val]}));
@@ -171,7 +172,7 @@
 } else {
   qs += filterObj[el];
 }
-qs += ' and ';
+//qs += ' and ';
   });
 
   //convert time constraints
@@ -208,7 +209,7 @@
 postQS = ds;
   }
 
-  return postQS;
+  return qs;
 };
 
 self.showSubfilters = function(stuff){
@@ -263,7 +264,8 @@
 $.get( '/data/fraud?' + $.param({ '$filter': self.queryString() 
}).replace(
   /\+/g, '%20' ), function ( dataget ) {
   self.gaugeIsSetUp(true);
-  self.gaugeValue(parseFloat(dataget[0].fraud_percent).toFixed(2) );
+  self.gaugeValue(parseFloat(dataget[0][0].fraud_percent).toFixed(2) );
+  self.queryStringSQL(dataget[1]);
 
   self.gauge = c3.generate({
   bindto: '#FraudRiskScoreGauge',
@@ -288,7 +290,7 @@
   color: {
   pattern: ['#FF', '#F97600', '#F6C600', '#60B044'], // 
the three color levels for the percentage values.
   threshold: {
-  values: [ 0, self.greenHighRange, 
self.yellowRange().high, 100]
+  values: [ 0, self.greenHighRange, self.redLowRange, 100]
   }
   }
   });

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib6e2a70aaaed70d0c574c42b02ef9e08f4d2bbab
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/dash
Gerrit-Branch: master
Gerrit-Owner: Ssmith 

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


[MediaWiki-commits] [Gerrit] [FIX] ParamInfo: Don't modify module set - change (pywikibot/core)

2014-11-15 Thread XZise (Code Review)
XZise has uploaded a new change for review.

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

Change subject: [FIX] ParamInfo: Don't modify module set
..

[FIX] ParamInfo: Don't modify module set

The module set has been modified which led to the effect that when
someone was fetching all entries and then iterating over the entries of
the same set, that all already cached entries were missing from the set.

The HTTP GET patch (c26b9dcb4242add0145a883c6b6973a45a665ed0) therefore
was thinking it could use a GET request, because the entry which
should've shown it that a POST request is required was deleted.

Change-Id: I467ff7a8fe243df0abd7f322ecaa8460a91e4017
---
M pywikibot/data/api.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/31/173631/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 3eb69a1..8aa97b4 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -274,7 +274,7 @@
 else:
 modules = set(modules)
 
-modules -= set(self._paraminfo.keys())
+modules = modules - set(self._paraminfo.keys())
 if not modules:
 return
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I467ff7a8fe243df0abd7f322ecaa8460a91e4017
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: XZise 

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


[MediaWiki-commits] [Gerrit] api.py: improve QueryGenerator efficiency - change (pywikibot/core)

2014-11-15 Thread Mpaa (Code Review)
Mpaa has uploaded a new change for review.

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

Change subject: api.py: improve QueryGenerator efficiency
..

api.py: improve QueryGenerator efficiency

Limit management is done is currently done on the first module, while
the other limited modules are left with default limits.

Limit for such modules is set to max possible value, in order to reduce
the number of requests and make queries faster.

Change-Id: I1c9d96b7bfb121a1b58bd6361dee69691ec5703c
---
M pywikibot/data/api.py
1 file changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/30/173630/1

diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 01d36d9..98217c3 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -1230,21 +1230,36 @@
 limited_modules = (
 set(self.modules) & self.site._paraminfo.query_modules_with_limits
 )
+
 if not limited_modules:
 self.limited_module = None
 elif len(limited_modules) == 1:
 self.limited_module = limited_modules.pop()
 else:
 # Select the first limited module in the request.
+# Query will continue as needed until limit (if any) for this 
module
+# is reached.
 for module in self.modules:
 if module in self.site._paraminfo.query_modules_with_limits:
 self.limited_module = module
+limited_modules.remove(module)
 break
 pywikibot.log('%s: multiple requested query modules support limits'
   "; using the first such module '%s' of %r"
   % (self.__class__.__name__, self.limited_module,
  self.modules))
 
+# Set limits for all remaining limited modules to max value.
+# Default values will only cause more requests and make the query
+# slower.
+for module in limited_modules:
+param = self.site._paraminfo.parameter(module, 'limit')
+prefix = self.site._paraminfo[module]['prefix']
+if self.site.logged_in() and 
self.site.has_right('apihighlimits'):
+self.request[prefix + 'limit'] = int(param['highmax'])
+else:
+self.request[prefix + 'limit'] = int(param["max"])
+
 self.api_limit = None
 
 if self.limited_module:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c9d96b7bfb121a1b58bd6361dee69691ec5703c
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa 

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


[MediaWiki-commits] [Gerrit] allow multiple sudo::user grants for same user - change (operations/puppet)

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

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

Change subject: allow multiple sudo::user grants for same user
..

allow multiple sudo::user grants for same user

Right now, the user receiving the sudo grant is specified via the resource
title. Since resource titles must be unique, only one grant may be declared per
user. That's a stupid limitation, so let's fix it.

Change-Id: Idd809d8c14052d9708531f9a5887727454e421d1
---
M modules/sudo/manifests/user.pp
1 file changed, 35 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/29/173629/1

diff --git a/modules/sudo/manifests/user.pp b/modules/sudo/manifests/user.pp
index f810305..a8ca316 100644
--- a/modules/sudo/manifests/user.pp
+++ b/modules/sudo/manifests/user.pp
@@ -1,11 +1,39 @@
-define sudo::user( $privileges ) {
-$user = $title
+# == Define: sudo::user
+#
+# Manages a sudo specification in /etc/sudoers.d.
+#
+# === Parameters
+#
+# [*privileges*]
+#   Array of sudo privileges.
+#
+# [*user*]
+#   User to which privileges should be assigned.
+#   Defaults to the resource title.
+#
+# === Examples
+#
+#  sudo::user { 'nagios_check_raid':
+#user   => 'nagios',
+#privileges => [
+#  'ALL = NOPASSWD: /usr/local/lib/nagios/plugins/check-raid'
+#],
+#  }
+#
+define sudo::user(
+$privileges,
+$ensure = present,
+$user   = $title,
+) {
+validate_ensure($ensure)
 
-file { "/etc/sudoers.d/${user}":
-owner   => root,
-group   => root,
+$title_safe = regsubst($title, '\W', '-', 'G')
+
+file { "/etc/sudoers.d/${title_safe}":
+ensure  => $ensure,
+content => template('sudo/sudoers.erb'),
+owner   => 'root',
+group   => 'root',
 mode=> '0440',
-content => template('sudo/sudoers.erb');
 }
-
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd809d8c14052d9708531f9a5887727454e421d1
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Page.latest_revision property - change (pywikibot/core)

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

Change subject: Page.latest_revision property
..


Page.latest_revision property

Also pep8-ified a few revision related properties.

Change-Id: I3e0caa081e9f2e0f06d2d814199531c8af739644
---
M pywikibot/page.py
M pywikibot/pagegenerators.py
2 files changed, 27 insertions(+), 17 deletions(-)

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



diff --git a/pywikibot/page.py b/pywikibot/page.py
index cc094bf..68bfd5c 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -338,7 +338,7 @@
 if not get_redirect:
 raise
 
-return self._revisions[self._revid].text
+return self.latest_revision.text
 
 def _getInternals(self, sysop):
 """Helper function for get().
@@ -396,11 +396,24 @@
   self.title(asUrl=True),
   (oldid if oldid is not None else self.latestRevision()))
 
-def latestRevision(self):
+@property
+def latest_revision_id(self):
 """Return the current revision id for this page."""
 if not hasattr(self, '_revid'):
 self.site.loadrevisions(self)
 return self._revid
+
+def latestRevision(self):
+"""Return the current revision id for this page."""
+return self.latest_revision_id
+
+@property
+def latest_revision(self):
+"""Return the current revision for this page."""
+rev = self.latest_revision_id
+if rev not in self._revisions:
+self.site.loadrevisions(self)
+return self._revisions[rev]
 
 @property
 def text(self):
@@ -491,20 +504,14 @@
 
 @return: unicode
 """
-rev = self.latestRevision()
-if rev not in self._revisions:
-self.site.loadrevisions(self)
-return self._revisions[rev].user
+return self.latest_revision.user
 
 def isIpEdit(self):
 """Return True if last editor was unregistered.
 
 @return: bool
 """
-rev = self.latestRevision()
-if rev not in self._revisions:
-self.site.loadrevisions(self)
-return self._revisions[rev].anon
+return self.latest_revision.anon
 
 def lastNonBotUser(self):
 """Return name or IP address of last human/non-bot user to edit page.
@@ -529,17 +536,16 @@
 
 return self._lastNonBotUser
 
+@deprecated_args(datetime=None)
 def editTime(self):
 """Return timestamp of last revision to page.
 
-@return: pywikibot.Timestamp
+@rtype: pywikibot.Timestamp
 """
-rev = self.latestRevision()
-if rev not in self._revisions:
-self.site.loadrevisions(self)
-return self._revisions[rev].timestamp
+return self.latest_revision.timestamp
 
-def previousRevision(self):
+@property
+def previous_revision_id(self):
 """Return the revision id for the previous revision of this Page.
 
 If the page has only one revision, it shall return -1.
@@ -553,6 +559,9 @@
 else:
 return min(x.revid for x in history)
 
+def previousRevision(self):
+return self.previous_revision_id
+
 def exists(self):
 """Return True if page exists on the wiki, even if it's a redirect.
 
@@ -563,6 +572,7 @@
 """
 return self.site.page_exists(self)
 
+@property
 def oldest_revision(self):
 return self.getVersionHistory(reverseOrder=True, total=1)[0]
 
diff --git a/pywikibot/pagegenerators.py b/pywikibot/pagegenerators.py
index cc37416..f2e8360 100644
--- a/pywikibot/pagegenerators.py
+++ b/pywikibot/pagegenerators.py
@@ -1149,7 +1149,7 @@
 continue
 
 if do_first_edit:
-first_edit = page.oldest_revision().timestamp
+first_edit = page.oldest_revision.timestamp
 
 if first_edit < first_edit_start:
 if show_filtered:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e0caa081e9f2e0f06d2d814199531c8af739644
Gerrit-PatchSet: 4
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: John Vandenberg 
Gerrit-Reviewer: John Vandenberg 
Gerrit-Reviewer: Ladsgroup 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Nullzero 
Gerrit-Reviewer: XZise 
Gerrit-Reviewer: jenkins-bot <>

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


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

2014-11-15 Thread Raimond Spekking (Code Review)
Raimond Spekking has submitted this change and it was merged.

Change subject: [PluggableAuth] Register extension
..


[PluggableAuth] Register extension

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

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



diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index f23bf59..7d66a24 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1599,6 +1599,8 @@
 
 Php Tags Wiki
 
+Pluggable Auth
+
 Poem
 
 Polyglot

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia74bf20c33d9da9348329f5e0e94710150db9372
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Parse annotations - change (mediawiki...CommonsMetadata)

2014-11-15 Thread Code Review
Gergő Tisza has uploaded a new change for review.

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

Change subject: Parse annotations
..

Parse annotations

Bug: 5
Change-Id: I5e401d382ff60d90056500154063123ca258b3dd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/244
---
M DataCollector.php
M TemplateParser.php
A tests/html/File_2011-02-13-chemin.jpg.html
A tests/html/File_Prequile_lyon_1863.jpg.html
A tests/html/File_Spelterini_Al_Ashraf.jpg.html
M tests/phpunit/DataCollectorTest.php
M tests/phpunit/ParserTestHelper.php
M tests/phpunit/TemplateParserTest.php
8 files changed, 781 insertions(+), 1 deletion(-)


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

diff --git a/DataCollector.php b/DataCollector.php
index 1e8042f..ca4d58d 100644
--- a/DataCollector.php
+++ b/DataCollector.php
@@ -174,6 +174,10 @@
$templateFields = array_merge( $templateFields, 
$this->selectLicense( $templateData[TemplateParser::LICENSES_KEY] ) );
}
 
+   if ( isset( $templateData[TemplateParser::ANNOTATIONS_KEY] ) ) {
+   $templateFields = array_merge( $templateFields, 
$this->encodeAnnotations( $templateData[TemplateParser::ANNOTATIONS_KEY] ) );
+   }
+
$metadata = array();
foreach( $templateFields as $name => $value ) {
$metadata[ $name ] = array(
@@ -362,4 +366,20 @@
$sortedLicenses = array_values( $sortedLicenses );
return $sortedLicenses ? $sortedLicenses[0] : array();
}
+
+   /**
+* Receives the list of annotations + some control variables, and 
compacts them into a single string.
+* @param array $annotations
+* @returns array
+*/
+   protected function encodeAnnotations( $annotations ) {
+   if ( !empty( $annotations ) ) {
+   // double-JSON-encoded API results, yay. Still beats 
rolling our own encoding algorithm.
+   $annotationsString = json_encode( $annotations );
+   if ( !empty( $annotationsString ) ) {
+   return array( 'ImageAnnotations' => 
$annotationsString );
+   }
+   }
+   return array();
+   }
 }
diff --git a/TemplateParser.php b/TemplateParser.php
index 0e37366..edafb8c 100644
--- a/TemplateParser.php
+++ b/TemplateParser.php
@@ -15,6 +15,7 @@
const COORDINATES_KEY = 'coordinates';
const LICENSES_KEY = 'licenses';
const INFORMATION_FIELDS_KEY = 'informationFields';
+   const ANNOTATIONS_KEY = 'annotations';
 
/**
 * HTML element class name => metadata field name mapping for license 
data.
@@ -107,6 +108,7 @@
self::COORDINATES_KEY => $this->parseCoordinates( 
$domNavigator ),
self::INFORMATION_FIELDS_KEY => 
$this->parseInformationFields( $domNavigator ),
self::LICENSES_KEY => $this->parseLicenses( 
$domNavigator ),
+   self::ANNOTATIONS_KEY => $this->parseAnnotations( 
$domNavigator ),
);
}
 
@@ -183,7 +185,7 @@
 * @param DomNavigator $domNavigator
 * @param DOMNode $node
 * @param string $property hCard property to be extracted
-* @return DOMNode
+* @return DOMNode|null
 */
protected function extractHCardProperty( DomNavigator $domNavigator, 
DOMNode $node, $property ) {
foreach ( $domNavigator->findElementsWithClass( '*', 'vcard', 
$node ) as $vcard ) {
@@ -191,6 +193,7 @@
return $name;
}
}
+   return null;
}
 
/**
@@ -224,6 +227,56 @@
}
}
return $data;
+   }
+
+   /**
+* @param DomNavigator $domNavigator
+* @return array
+*/
+   protected function parseAnnotations( DomNavigator $domNavigator ) {
+   $annotations = array();
+
+   foreach ( $domNavigator->findElementsWithIdPrefix( 'div', 
'image_annotation_note_' ) as $annotationNode ) {
+   $fields = array();
+   foreach ( array( 'view_x', 'view_y', 'view_w', 
'view_h', 'full_width', 'full_height', 'content' ) as $fieldName ) {
+   $node = $this->getFirstNode( 
$domNavigator->findElementsWithIdPrefix( 'div', 
"image_annotation_${fieldName}_", $annotationNode ) );
+   if ( !$node ) {
+   continue 2; // invalid annotation block
+   }
+   if ( $fieldName === 'content' ) {
+   $fields[$fieldNa

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

2014-11-15 Thread Raimond Spekking (Code Review)
Raimond Spekking has uploaded a new change for review.

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

Change subject: [PluggableAuth] Register extension
..

[PluggableAuth] Register extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/28/173628/1

diff --git a/groups/MediaWiki/mediawiki-extensions.txt 
b/groups/MediaWiki/mediawiki-extensions.txt
index f23bf59..7d66a24 100644
--- a/groups/MediaWiki/mediawiki-extensions.txt
+++ b/groups/MediaWiki/mediawiki-extensions.txt
@@ -1599,6 +1599,8 @@
 
 Php Tags Wiki
 
+Pluggable Auth
+
 Poem
 
 Polyglot

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia74bf20c33d9da9348329f5e0e94710150db9372
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 17f6bad..9b3b81c - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 17f6bad..9b3b81c
..


Syncronize VisualEditor: 17f6bad..9b3b81c

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

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



diff --git a/VisualEditor b/VisualEditor
index 17f6bad..9b3b81c 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 17f6badf0a12e0cf8a521cd2389a016679da2b57
+Subproject commit 9b3b81c234341c8048f3dd61eea787f3d8c3374c

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iffc19ac0c7fdc3ec2ee8c67679a05f6b20e67b25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 
Gerrit-Reviewer: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 17f6bad..9b3b81c - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 17f6bad..9b3b81c
..

Syncronize VisualEditor: 17f6bad..9b3b81c

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


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

diff --git a/VisualEditor b/VisualEditor
index 17f6bad..9b3b81c 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 17f6badf0a12e0cf8a521cd2389a016679da2b57
+Subproject commit 9b3b81c234341c8048f3dd61eea787f3d8c3374c

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iffc19ac0c7fdc3ec2ee8c67679a05f6b20e67b25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions
Gerrit-Branch: master
Gerrit-Owner: Jenkins-mwext-sync 

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


[MediaWiki-commits] [Gerrit] Use correct case of function ImageGallery::toHTML - change (mediawiki/core)

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

Change subject: Use correct case of function ImageGallery::toHTML
..


Use correct case of function ImageGallery::toHTML

Change-Id: I8040c02618a58bb8840658bb7a5c697766c77d2d
---
M includes/specialpage/ImageQueryPage.php
M includes/specials/SpecialUpload.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/specialpage/ImageQueryPage.php 
b/includes/specialpage/ImageQueryPage.php
index 272d533..c837d1a 100644
--- a/includes/specialpage/ImageQueryPage.php
+++ b/includes/specialpage/ImageQueryPage.php
@@ -59,7 +59,7 @@
}
}
 
-   $out->addHTML( $gallery->toHtml() );
+   $out->addHTML( $gallery->toHTML() );
}
}
 
diff --git a/includes/specials/SpecialUpload.php 
b/includes/specials/SpecialUpload.php
index 77ad9aa..ccc5dea 100644
--- a/includes/specials/SpecialUpload.php
+++ b/includes/specials/SpecialUpload.php
@@ -732,7 +732,7 @@
 
return '' .
wfMessage( 'file-exists-duplicate' )->numParams( count( 
$dupes ) )->parse() .
-   $gallery->toHtml() . "\n";
+   $gallery->toHTML() . "\n";
}
 
protected function getGroupName() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8040c02618a58bb8840658bb7a5c697766c77d2d
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Reedy 
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 LinkSearchPage::doQuery override - change (mediawiki/core)

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

Change subject: Remove LinkSearchPage::doQuery override
..


Remove LinkSearchPage::doQuery override

It is not called and not working, because it missed return statements.

The validation check is done in getQueryInfo and the message is added in
execute, when needed.

Change-Id: I9acbd2f09a922d5a7d66e8ce55e8d24ae65ab560
---
M includes/specials/SpecialLinkSearch.php
1 file changed, 0 insertions(+), 18 deletions(-)

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



diff --git a/includes/specials/SpecialLinkSearch.php 
b/includes/specials/SpecialLinkSearch.php
index 2d6213a..05c89c2 100644
--- a/includes/specials/SpecialLinkSearch.php
+++ b/includes/specials/SpecialLinkSearch.php
@@ -286,24 +286,6 @@
}
 
/**
-* Override to check query validity.
-*
-* @param mixed $offset Numerical offset or false for no offset
-* @param mixed $limit Numerical limit or false for no limit
-*/
-   function doQuery( $offset = false, $limit = false ) {
-   list( $this->mMungedQuery, ) = LinkSearchPage::mungeQuery( 
$this->mQuery, $this->mProt );
-   if ( $this->mMungedQuery === false ) {
-   $this->getOutput()->addWikiMsg( 'linksearch-error' );
-   } else {
-   // For debugging
-   // Generates invalid xhtml with patterns that contain --
-   //$this->getOutput()->addHTML( "\n\n" );
-   parent::doQuery( $offset, $limit );
-   }
-   }
-
-   /**
 * Override to squash the ORDER BY.
 * We do a truncated index search, so the optimizer won't trust
 * it as good enough for optimizing sort. The implicit ordering

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9acbd2f09a922d5a7d66e8ce55e8d24ae65ab560
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: IAlex 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] AutoloadGenerator: Add newline at end of output file - change (mediawiki/core)

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

Change subject: AutoloadGenerator: Add newline at end of output file
..


AutoloadGenerator: Add newline at end of output file

Change-Id: I2b5a1adc115afd9430c1ea91285516c9c4290875
---
M includes/utils/AutoloadGenerator.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/includes/utils/AutoloadGenerator.php 
b/includes/utils/AutoloadGenerator.php
index ee2c77a..7cf05bc 100644
--- a/includes/utils/AutoloadGenerator.php
+++ b/includes/utils/AutoloadGenerator.php
@@ -159,6 +159,7 @@
 \${$this->variableName} = array(
{$output}
 );
+
 EOD
);
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b5a1adc115afd9430c1ea91285516c9c4290875
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Better accommodate long text in view switching button group ... - change (mediawiki...Translate)

2014-11-15 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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

Change subject: Better accommodate long text in view switching button group in 
Special:Translate
..

Better accommodate long text in view switching button group in Special:Translate

Change-Id: Idf4fef2a023eb540726519c40c48196f0b8c5554
---
M resources/css/ext.translate.messagetable.css
1 file changed, 3 insertions(+), 7 deletions(-)


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

diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.css
index 07ec579..5da964d 100644
--- a/resources/css/ext.translate.messagetable.css
+++ b/resources/css/ext.translate.messagetable.css
@@ -183,11 +183,8 @@
 }
 
 .tux-action-bar {
-   margin: 0 !important;
background-color: #F0F0F0;
color: #252525;
-   height: 50px;
-   line-height: 50px;
-webkit-box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
transition: width 250ms;
@@ -206,14 +203,13 @@
 }
 
 .tux-action-bar .toggle.button {
-   height: 40px;
+   min-height: 40px;
font-size: 14px;
vertical-align: middle;
border-radius: 0;
text-shadow: none;
-   margin: 0;
+   margin: 5px 0;
text-indent: 0;
-   padding: 0 6px;
 }
 
 .tux-action-bar .tux-view-switcher {
@@ -316,7 +312,7 @@
 }
 
 .tux-message-filter-result .button {
-   height: 30px;
+   float: right;
padding: 5px;
margin: 5px 0;
font-size: 15px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf4fef2a023eb540726519c40c48196f0b8c5554
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 

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


[MediaWiki-commits] [Gerrit] Set default value for $wgSharedSchema - change (mediawiki/core)

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

Change subject: Set default value for $wgSharedSchema
..


Set default value for $wgSharedSchema

Was added in I25df82065a307b9abc30c694f8c8afff0996d7c1 back in REL1_23

Change-Id: I291e770861751e037befe1db004e5e3f8b449f6c
---
M includes/DefaultSettings.php
M includes/Setup.php
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 4a35120..e822655 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -1702,6 +1702,9 @@
  * $wgSharedPrefix is the table prefix for the shared database. It defaults to
  * $wgDBprefix.
  *
+ * $wgSharedSchema is the table schema for the shared database. It defaults to
+ * $wgDBmwschema.
+ *
  * @deprecated since 1.21 In new code, use the $wiki parameter to wfGetLB() to
  *   access remote databases. Using wfGetLB() allows the shared database to
  *   reside on separate servers to the wiki's own database, with suitable
@@ -1720,6 +1723,12 @@
 $wgSharedTables = array( 'user', 'user_properties' );
 
 /**
+ * @see $wgSharedDB
+ * @since 1.23
+ */
+$wgSharedSchema = false;
+
+/**
  * Database load balancer
  * This is a two-dimensional array, an array of server info structures
  * Fields are:
diff --git a/includes/Setup.php b/includes/Setup.php
index 2faf196..f61de7e 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -306,6 +306,11 @@
$wgSharedPrefix = $wgDBprefix;
 }
 
+// Set default shared schema
+if ( $wgSharedSchema === false ) {
+   $wgSharedSchema = $wgDBmwschema;
+}
+
 if ( !$wgCookiePrefix ) {
if ( $wgSharedDB && $wgSharedPrefix && in_array( 'user', 
$wgSharedTables ) ) {
$wgCookiePrefix = $wgSharedDB . '_' . $wgSharedPrefix;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I291e770861751e037befe1db004e5e3f8b449f6c
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Skizzerz 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Track usage via Lua - change (mediawiki...Wikibase)

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

Change subject: Track usage via Lua
..


Track usage via Lua

Entity usages via the wikibase Lua modules need to be tracked
in the UsageTracker service.

Bug: 71288
Change-Id: Ib47e3d9348f60b50c176162ca686cb06672fdfe9
---
M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/scribunto/WikibaseLuaBindings.php
M client/includes/scribunto/WikibaseLuaEntityBindings.php
M 
client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseEntityLibraryTest.php
M client/tests/phpunit/includes/scribunto/Scribunto_LuaWikibaseLibraryTest.php
M client/tests/phpunit/includes/scribunto/WikibaseLuaBindingsTest.php
M client/tests/phpunit/includes/scribunto/WikibaseLuaEntityBindingsTest.php
9 files changed, 193 insertions(+), 41 deletions(-)

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



diff --git 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 8af6deb..2632ff9 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -132,6 +132,7 @@
}
 
/**
+* @todo Share code with WikibaseLuaEntityBindings::trackUsage
 * @param Snak[] $snaks
 */
private function trackUsage( array $snaks ) {
@@ -153,6 +154,8 @@
}
 
/**
+* @todo Share code with WikibaseLuaEntityBindings.
+*
 * @param EntityId $entityId
 * @param PropertyId $propertyId
 *
diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php 
b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
index 67323e7..5d43ab4 100644
--- a/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
+++ b/client/includes/scribunto/Scribunto_LuaWikibaseEntityLibrary.php
@@ -2,6 +2,7 @@
 
 use ValueFormatters\FormatterOptions;
 use Wikibase\Client\Scribunto\WikibaseLuaEntityBindings;
+use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\Lib\SnakFormatter;
 
@@ -21,13 +22,15 @@
 */
private $wbLibrary;
 
-   /**
-* Constructor for wrapper class, initialize member object holding 
implementation
-*
-* @param Scribunto_LuaEngine $engine
-* @since 0.5
-*/
-   public function __construct( $engine ) {
+   private function getImplementation() {
+   if ( !$this->wbLibrary ) {
+   $this->wbLibrary = $this->newImplementation();
+   }
+
+   return $this->wbLibrary;
+   }
+
+   private function newImplementation() {
// For the language we need $wgContLang, not parser target 
language or anything else.
// See Scribunto_LuaLanguageLibrary::getContLangCode().
global $wgContLang;
@@ -40,14 +43,13 @@
SnakFormatter::FORMAT_WIKI, $formatterOptions
);
 
-   $this->wbLibrary = new WikibaseLuaEntityBindings(
+   return new WikibaseLuaEntityBindings(
$snakFormatter,
$wikibaseClient->getStore()->getEntityLookup(),
+   new ParserOutputUsageAccumulator( 
$this->getParser()->getOutput() ),
$wikibaseClient->getSettings()->getSetting( 
'siteGlobalID' ),
$wgContLang
);
-
-   parent::__construct( $engine );
}
 
/**
@@ -76,7 +78,7 @@
 * @return string[]
 */
public function getGlobalSiteId() {
-   return array( $this->wbLibrary->getGlobalSiteId() );
+   return array( $this->getImplementation()->getGlobalSiteId() );
}
 
/**
@@ -99,7 +101,7 @@
$this->checkType( 'formatPropertyValues', 1, $propertyId, 
'string' );
$this->checkType( 'formatPropertyValues', 2, $acceptableRanks, 
'table' );
try {
-   return array( $this->wbLibrary->formatPropertyValues( 
$entityId, $propertyId, $acceptableRanks ) );
+   return array( 
$this->getImplementation()->formatPropertyValues( $entityId, $propertyId, 
$acceptableRanks ) );
} catch ( InvalidArgumentException $e ) {
throw new ScribuntoException( 
'wikibase-error-invalid-entity-id' );
}
diff --git a/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php 
b/client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
index 5abe2aa..5a9fac5 100644
--- a/client/i

[MediaWiki-commits] [Gerrit] Migrate mw doxygen to zuul-cloner and Trusty - change (integration/config)

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

Change subject: Migrate mw doxygen to zuul-cloner and Trusty
..


Migrate mw doxygen to zuul-cloner and Trusty

Job is no more bound to gallium by using the push-doc macro see doc
https://www.mediawiki.org/wiki/Continuous_integration/Documentation_generation

Ubuntu Trusty has doxygen 1.8.6 (bug 46771)
Migrate to Zuul cloner (bug 72837)
TARGET_BASEDIR is recognized by mwcore-docgen.sh slave script and used
to override the destination.

Use DOC_SUBPATH generated by Zuul which is the version extracted from
the branch or tag refspec. mwcore-docgen no more carry that logic since
https://gerrit.wikimedia.org/r/#/c/173295/

Bug: 46771
Bug: 72837
Change-Id: I1fd6d23917c2098dbdad37d9e718335616207f68
---
M jjb/mediawiki.yaml
1 file changed, 17 insertions(+), 11 deletions(-)

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



diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index 67216df..a2cc260 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -93,21 +93,27 @@
 
 - job:
 name: 'mediawiki-core-doxygen-publish'
-node: gallium
-defaults: use-zuul
+node: contintLabsSlave && UbuntuTrusty
 concurrent: false
-scm:
- - git-mwcore
- - git:
-url: '/srv/ssd/gerrit/mediawiki/vendor'
-branches:
-  - master
-wipe-workspace: false
-basedir: vendor
 triggers:
  - zuul
 builders:
- - shell: 
"/srv/deployment/integration/slave-scripts/tools/mwcore-docgen.sh"
+ - shell: |
+ if [ -z $DOC_SUBPATH ]; then
+ echo "\$DOC_SUBPATH is missing. Can not publish."
+ exit 1
+ fi
+ - zuul-cloner:
+ projects: >
+ mediawiki/core
+ mediawiki/vendor
+ - shell: |
+ rm -fR build/doc
+ mkdir -p build/doc
+ TARGET_BASEDIR="$WORKSPACE/build/doc" 
/srv/deployment/integration/slave-scripts/tools/mwcore-docgen.sh
+ - push-doc:
+ docsrc: 'build/doc'
+ docdest: 'mediawiki-core/$DOC_SUBPATH/php'
 
 - job-template:
 name: '{name}-whitespaces'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1fd6d23917c2098dbdad37d9e718335616207f68
Gerrit-PatchSet: 13
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
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 support for Western Balochi (bgn) - change (translatewiki)

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

Change subject: Add support for Western Balochi (bgn)
..


Add support for Western Balochi (bgn)

As requested on
https://translatewiki.net/wiki/Thread:User_talk:Nemo_bis/Balochi_language%28_%D8%A8%D9%84%D9%88%DA%86%DB%8C_%29

Change-Id: Idaeb7cecb982eea5e062a56f2ce3b82532c45a34
---
M FallbackSettings.php
M LanguageSettings.php
2 files changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/FallbackSettings.php b/FallbackSettings.php
index 44cca1d..1924d21 100644
--- a/FallbackSettings.php
+++ b/FallbackSettings.php
@@ -13,6 +13,7 @@
 $wgTranslateLanguageFallbacks['be-tarask'] = array( 'pl', 'ru', 'uk', 'be' );
 $wgTranslateLanguageFallbacks['bew'] = 'id';
 $wgTranslateLanguageFallbacks['bfq'] = array( 'kn', 'ta' );
+$wgTranslateLanguageFallbacks['bgn'] = array( 'fa' );
 $wgTranslateLanguageFallbacks['bjn'] = 'id';
 $wgTranslateLanguageFallbacks['br'] = array( 'roa-rup', 'pms', 'fr', 'it' );
 $wgTranslateLanguageFallbacks['cnh'] = array( 'my' );
diff --git a/LanguageSettings.php b/LanguageSettings.php
index ff0f41f..4a2e41c 100644
--- a/LanguageSettings.php
+++ b/LanguageSettings.php
@@ -83,6 +83,7 @@
 $wgExtraLanguageNames['kjh'] = 'хакас'; # Khakas / Amire80 2014-06-17
 $wgExtraLanguageNames['cnh'] = 'Lai holh'; # Haka Chin / Siebrand 2014-08-06
 $wgExtraLanguageNames['smn'] = 'Anarâškielâ'; # Inari Saami / Siebrand 
2014-10-06
+$wgExtraLanguageNames['bgn'] = 'بلوچی رخشانی'; # Western Balochi / Siebrand 
2014-11-15
 
 $wgExtraLanguageNames['nl-be'] = 'nl-be'; # Nikerabbit 2008-xx-xx - For FreeCol
 $wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic 
content. Used for documenting messages

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idaeb7cecb982eea5e062a56f2ce3b82532c45a34
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
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 support for Western Balochi (bgn) - change (translatewiki)

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

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

Change subject: Add support for Western Balochi (bgn)
..

Add support for Western Balochi (bgn)

As requested on
https://translatewiki.net/wiki/Thread:User_talk:Nemo_bis/Balochi_language%28_%D8%A8%D9%84%D9%88%DA%86%DB%8C_%29

Change-Id: Idaeb7cecb982eea5e062a56f2ce3b82532c45a34
---
M FallbackSettings.php
M LanguageSettings.php
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/46/173546/1

diff --git a/FallbackSettings.php b/FallbackSettings.php
index 44cca1d..1924d21 100644
--- a/FallbackSettings.php
+++ b/FallbackSettings.php
@@ -13,6 +13,7 @@
 $wgTranslateLanguageFallbacks['be-tarask'] = array( 'pl', 'ru', 'uk', 'be' );
 $wgTranslateLanguageFallbacks['bew'] = 'id';
 $wgTranslateLanguageFallbacks['bfq'] = array( 'kn', 'ta' );
+$wgTranslateLanguageFallbacks['bgn'] = array( 'fa' );
 $wgTranslateLanguageFallbacks['bjn'] = 'id';
 $wgTranslateLanguageFallbacks['br'] = array( 'roa-rup', 'pms', 'fr', 'it' );
 $wgTranslateLanguageFallbacks['cnh'] = array( 'my' );
diff --git a/LanguageSettings.php b/LanguageSettings.php
index ff0f41f..4a2e41c 100644
--- a/LanguageSettings.php
+++ b/LanguageSettings.php
@@ -83,6 +83,7 @@
 $wgExtraLanguageNames['kjh'] = 'хакас'; # Khakas / Amire80 2014-06-17
 $wgExtraLanguageNames['cnh'] = 'Lai holh'; # Haka Chin / Siebrand 2014-08-06
 $wgExtraLanguageNames['smn'] = 'Anarâškielâ'; # Inari Saami / Siebrand 
2014-10-06
+$wgExtraLanguageNames['bgn'] = 'بلوچی رخشانی'; # Western Balochi / Siebrand 
2014-11-15
 
 $wgExtraLanguageNames['nl-be'] = 'nl-be'; # Nikerabbit 2008-xx-xx - For FreeCol
 $wgExtraLanguageNames['qqq'] = 'Message documentation'; # No linguistic 
content. Used for documenting messages

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idaeb7cecb982eea5e062a56f2ce3b82532c45a34
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Write dblists to staging - change (mediawiki...WikimediaMaintenance)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Write dblists to staging
..

Write dblists to staging

Change-Id: I3dc05db5c0c1423fe86786fce2e3994fb23edbbb
---
M makeSizeDBLists.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMaintenance 
refs/changes/45/173545/1

diff --git a/makeSizeDBLists.php b/makeSizeDBLists.php
index 11ad0f0..1e9587c 100644
--- a/makeSizeDBLists.php
+++ b/makeSizeDBLists.php
@@ -36,11 +36,11 @@
}
 
$this->output( 'Small wiki count: ' . count( $small ) . "\n" );
-   $this->writeFile( '/srv/mediawiki/small.dblist', $small );
+   $this->writeFile( '/srv/mediawiki-staging/small.dblist', $small 
);
$this->output( 'Medium wiki count: ' . count( $medium ) . "\n" 
);
-   $this->writeFile( '/srv/mediawiki/medium.dblist', $medium );
+   $this->writeFile( '/srv/mediawiki-staging/medium.dblist', 
$medium );
$this->output( 'Large wiki count: ' . count( $large ) . "\n" );
-   $this->writeFile( '/srv/mediawiki/large.dblist', $large );
+   $this->writeFile( '/srv/mediawiki-staging/large.dblist', $large 
);
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3dc05db5c0c1423fe86786fce2e3994fb23edbbb
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMaintenance
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Update size related dblists - change (operations/mediawiki-config)

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

Change subject: Update size related dblists
..


Update size related dblists

Change-Id: Ia6352a7f920d25f9162c89a85c8e019e3dac1404
---
M large.dblist
M medium.dblist
M small.dblist
3 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/large.dblist b/large.dblist
index 7fd8423..bb662c9 100644
--- a/large.dblist
+++ b/large.dblist
@@ -26,6 +26,7 @@
 rowiki
 ruwiki
 shwiki
+srwiki
 svwiki
 trwiki
 ukwiki
diff --git a/medium.dblist b/medium.dblist
index d7e80a9..a23bf3e 100644
--- a/medium.dblist
+++ b/medium.dblist
@@ -21,10 +21,12 @@
 bawiki
 bclwiki
 be_x_oldwiki
+betawikiversity
 bewiki
 bgwiki
 bgwikiquote
 bgwiktionary
+bhwiki
 bnwiki
 bnwikisource
 bowiki
@@ -266,7 +268,6 @@
 specieswiki
 sqwiki
 sqwiktionary
-srwiki
 srwikinews
 srwikisource
 srwiktionary
diff --git a/small.dblist b/small.dblist
index c2b4876..76f4dfb 100644
--- a/small.dblist
+++ b/small.dblist
@@ -42,7 +42,6 @@
 azwikisource
 bawikibooks
 bdwikimedia
-betawikiversity
 bewikibooks
 bewikimedia
 bewikiquote
@@ -51,7 +50,6 @@
 bgwikibooks
 bgwikinews
 bgwikisource
-bhwiki
 bhwiktionary
 biwiki
 biwikibooks

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia6352a7f920d25f9162c89a85c8e019e3dac1404
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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 size related dblists - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Update size related dblists
..

Update size related dblists

Change-Id: Ia6352a7f920d25f9162c89a85c8e019e3dac1404
---
M large.dblist
M medium.dblist
M small.dblist
3 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/large.dblist b/large.dblist
index 7fd8423..bb662c9 100644
--- a/large.dblist
+++ b/large.dblist
@@ -26,6 +26,7 @@
 rowiki
 ruwiki
 shwiki
+srwiki
 svwiki
 trwiki
 ukwiki
diff --git a/medium.dblist b/medium.dblist
index d7e80a9..a23bf3e 100644
--- a/medium.dblist
+++ b/medium.dblist
@@ -21,10 +21,12 @@
 bawiki
 bclwiki
 be_x_oldwiki
+betawikiversity
 bewiki
 bgwiki
 bgwikiquote
 bgwiktionary
+bhwiki
 bnwiki
 bnwikisource
 bowiki
@@ -266,7 +268,6 @@
 specieswiki
 sqwiki
 sqwiktionary
-srwiki
 srwikinews
 srwikisource
 srwiktionary
diff --git a/small.dblist b/small.dblist
index c2b4876..76f4dfb 100644
--- a/small.dblist
+++ b/small.dblist
@@ -42,7 +42,6 @@
 azwikisource
 bawikibooks
 bdwikimedia
-betawikiversity
 bewikibooks
 bewikimedia
 bewikiquote
@@ -51,7 +50,6 @@
 bgwikibooks
 bgwikinews
 bgwikisource
-bhwiki
 bhwiktionary
 biwiki
 biwikibooks

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia6352a7f920d25f9162c89a85c8e019e3dac1404
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Simplify checks on Special:UserLogin/signup - change (mediawiki/core)

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

Change subject: Simplify checks on Special:UserLogin/signup
..


Simplify checks on Special:UserLogin/signup

I27c488e4008a924117ff6bac2216f148cd5e7abd changed the validation code in
User::getCanonicalName, the # and Title::makeTitleSafe checks now done
there and can be removed here.

Follow-Up: I27c488e4008a924117ff6bac2216f148cd5e7abd
Follow-Up: I88c479cea2bc9d2eab882e0ee8ebcbe2d1dd125e
Follow-Up: I983e3f528491817f9f31f71a92d8d2946ce5941d
Change-Id: I17bf88be6398dc402295264ca9bfd57809c872d7
---
M includes/specials/SpecialUserlogin.php
1 file changed, 1 insertion(+), 13 deletions(-)

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



diff --git a/includes/specials/SpecialUserlogin.php 
b/includes/specials/SpecialUserlogin.php
index b6a3be2..2eefd0a 100644
--- a/includes/specials/SpecialUserlogin.php
+++ b/includes/specials/SpecialUserlogin.php
@@ -527,20 +527,8 @@
return Status::newFatal( 'sorbs_create_account_reason' 
);
}
 
-   // Normalize the name so that silly things don't cause "invalid 
username"
-   // errors. User::newFromName does some rather strict checking, 
rejecting
-   // e.g. leading/trailing/multiple spaces. But first we need to 
reject
-   // usernames that would be treated as titles with a fragment 
part.
-   if ( strpos( $this->mUsername, '#' ) !== false ) {
-   return Status::newFatal( 'noname' );
-   }
-   $title = Title::makeTitleSafe( NS_USER, $this->mUsername );
-   if ( !is_object( $title ) ) {
-   return Status::newFatal( 'noname' );
-   }
-
# Now create a dummy user ($u) and check if it is valid
-   $u = User::newFromName( $title->getText(), 'creatable' );
+   $u = User::newFromName( $this->mUsername, 'creatable' );
if ( !is_object( $u ) ) {
return Status::newFatal( 'noname' );
} elseif ( 0 != $u->idForName() ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I17bf88be6398dc402295264ca9bfd57809c872d7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Hygiene: Change categoryButton to be hyphenated - change (mediawiki...MobileFrontend)

2014-11-15 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Hygiene: Change categoryButton to be hyphenated
..

Hygiene: Change categoryButton to be hyphenated

Bug: 73339
Change-Id: I90f83c0c27acecb153971181c079a6afec49149f
---
M includes/skins/MinervaTemplateAlpha.php
M javascripts/modules/categories/init.js
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/skins/MinervaTemplateAlpha.php 
b/includes/skins/MinervaTemplateAlpha.php
index c09477b..7cc2347 100644
--- a/includes/skins/MinervaTemplateAlpha.php
+++ b/includes/skins/MinervaTemplateAlpha.php
@@ -49,7 +49,7 @@
'url' => '#/categories',
// add hidden class (the overlay works only, 
when JS is enabled (class will
// be removed in categories/init.js)
-   'class' => 'categoryButton hidden',
+   'class' => 'category-button hidden',
'label' => wfMessage( 'categories' )->text()
);
}
diff --git a/javascripts/modules/categories/init.js 
b/javascripts/modules/categories/init.js
index 78556a6..1917376 100644
--- a/javascripts/modules/categories/init.js
+++ b/javascripts/modules/categories/init.js
@@ -19,7 +19,7 @@
 * Enable the categories button
 */
function initButton() {
-   $( '.categoryButton' ).removeClass( 'hidden' );
+   $( '.category-button' ).removeClass( 'hidden' );
}
 
$( initButton );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90f83c0c27acecb153971181c079a6afec49149f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Get talk page name from title object - change (mediawiki...MobileFrontend)

2014-11-15 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Get talk page name from title object
..

Get talk page name from title object

Instead of build it ourself. Talk pages of user pages e.g. will be
false.

Bug: 73476
Change-Id: I134113eaac9b774755b436976d20e20474018352
---
M includes/skins/SkinMinerva.php
M javascripts/modules/talk/talk.js
2 files changed, 7 insertions(+), 3 deletions(-)


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

diff --git a/includes/skins/SkinMinerva.php b/includes/skins/SkinMinerva.php
index a852f60..f4b410e 100644
--- a/includes/skins/SkinMinerva.php
+++ b/includes/skins/SkinMinerva.php
@@ -749,6 +749,11 @@
$menu['talk'] = $namespaces[$talkId];
}
 
+   if ( $title->canTalk() ) {
+   $talkTitle = $title->getTalkPage();
+   $menu['talk']['data-title'] = 
$talkTitle->getFullText();
+   }
+
if ( isset( $menu['talk'] ) ) {
$menu['talk']['class'] = MobileUI::iconClass( 
'talk', 'element', 'icon-32px' );
if ( isset( $tpl->data['_talkdata'] ) ) {
diff --git a/javascripts/modules/talk/talk.js b/javascripts/modules/talk/talk.js
index 5829da9..bdd5e5f 100644
--- a/javascripts/modules/talk/talk.js
+++ b/javascripts/modules/talk/talk.js
@@ -1,13 +1,12 @@
 ( function ( M, $ ) {
-   var licenseLink = mw.config.get( 'wgMFLicenseLink' ),
-   talkPrefix = mw.config.get( 'wgFormattedNamespaces' )[ 
mw.config.get( 'wgNamespaceNumber' ) + 1 ] + ':';
+   var licenseLink = mw.config.get( 'wgMFLicenseLink' );
 
M.assertMode( [ 'beta', 'alpha', 'app' ] );
 
M.overlayManager.add( /^\/talk\/?(.*)$/, function ( id ) {
var result = $.Deferred(),
talkOptions = {
-   title: talkPrefix + M.getCurrentPage().title
+   title: $( '#ca-talk a' ).data( 'title' )
};
 
if ( $( '#footer-places-terms-use' ).length > 0 ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I134113eaac9b774755b436976d20e20474018352
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] skins: Update .gitignore - change (mediawiki/core)

2014-11-15 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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

Change subject: skins: Update .gitignore
..

skins: Update .gitignore

Removed common (last remaining file removed in 1e8b1dd8cff2)
and added README (added in c505afca41c9).

Change-Id: Idc31569b29df19fb79bc2c08fba0a327d9cd334d
---
M skins/.gitignore
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/40/173540/1

diff --git a/skins/.gitignore b/skins/.gitignore
index 6719bdd..cd5800c 100644
--- a/skins/.gitignore
+++ b/skins/.gitignore
@@ -1,3 +1,3 @@
 /*
-!/common/
 !/.gitignore
+!/README

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idc31569b29df19fb79bc2c08fba0a327d9cd334d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: PleaseStand 

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


[MediaWiki-commits] [Gerrit] Inject SiteList into OtherProjectsSidebarGenerator - change (mediawiki...Wikibase)

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

Change subject: Inject SiteList into OtherProjectsSidebarGenerator
..


Inject SiteList into OtherProjectsSidebarGenerator

Also avoid accessing SiteStore to get the id of the current site.

Change-Id: If66078ac7e0a6ec63ff618fa86be32868e9127b0
---
M client/includes/WikibaseClient.php
M client/includes/hooks/OtherProjectsSidebarGenerator.php
M client/tests/phpunit/includes/hooks/OtherProjectsSidebarGeneratorTest.php
M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
4 files changed, 14 insertions(+), 10 deletions(-)

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



diff --git a/client/includes/WikibaseClient.php 
b/client/includes/WikibaseClient.php
index 3d699db..0790073 100644
--- a/client/includes/WikibaseClient.php
+++ b/client/includes/WikibaseClient.php
@@ -649,7 +649,7 @@
return new OtherProjectsSidebarGenerator(
$settings->getSetting( 'siteGlobalID' ),
$this->getStore()->getSiteLinkTable(),
-   $this->getSiteStore(),
+   $this->getSiteStore()->getSites(),
$settings->getSetting( 'otherProjectsLinks' )
);
}
diff --git a/client/includes/hooks/OtherProjectsSidebarGenerator.php 
b/client/includes/hooks/OtherProjectsSidebarGenerator.php
index 8cb5c6d..b18e478 100644
--- a/client/includes/hooks/OtherProjectsSidebarGenerator.php
+++ b/client/includes/hooks/OtherProjectsSidebarGenerator.php
@@ -3,7 +3,7 @@
 namespace Wikibase\Client\Hooks;
 
 use Site;
-use SiteStore;
+use SiteList;
 use Title;
 use Wikibase\DataModel\SiteLink;
 use Wikibase\Lib\Store\SiteLinkLookup;
@@ -29,9 +29,9 @@
private $siteLinkLookup;
 
/**
-* @var SiteStore
+* @var SiteList
 */
-   private $siteStore;
+   private $siteList;
 
/**
 * @var string[]
@@ -41,13 +41,15 @@
/**
 * @param string $localSiteId
 * @param SiteLinkLookup $siteLinkLookup
-* @param SiteStore $siteStore
+* @param SiteList $siteList
 * @param string[] $siteIdsToOutput
 */
-   public function __construct( $localSiteId, SiteLinkLookup 
$siteLinkLookup, SiteStore $siteStore, array $siteIdsToOutput ) {
+   public function __construct( $localSiteId, SiteLinkLookup 
$siteLinkLookup, SiteList $siteList,
+   array $siteIdsToOutput
+   ) {
$this->localSiteId = $localSiteId;
$this->siteLinkLookup = $siteLinkLookup;
-   $this->siteStore = $siteStore;
+   $this->siteList = $siteList;
$this->siteIdsToOutput = $siteIdsToOutput;
}
 
@@ -72,7 +74,7 @@
if ( !in_array( $siteLink->getSiteId(), 
$this->siteIdsToOutput ) ) {
continue;
}
-   $site = $this->siteStore->getSite( 
$siteLink->getSiteId() );
+   $site = $this->siteList->getSite( 
$siteLink->getSiteId() );
if ( $site === null ) {
continue;
}
diff --git 
a/client/tests/phpunit/includes/hooks/OtherProjectsSidebarGeneratorTest.php 
b/client/tests/phpunit/includes/hooks/OtherProjectsSidebarGeneratorTest.php
index a9a34bc..8d319cf 100644
--- a/client/tests/phpunit/includes/hooks/OtherProjectsSidebarGeneratorTest.php
+++ b/client/tests/phpunit/includes/hooks/OtherProjectsSidebarGeneratorTest.php
@@ -33,10 +33,12 @@
$mockRepo = new MockRepository();
$mockRepo->putEntity( $item );
 
+   $siteStore = MockSiteStore::newFromTestSites();
+
$otherProjectSidebarGenerator = new 
OtherProjectsSidebarGenerator(
'enwiki',
$mockRepo,
-   MockSiteStore::newFromTestSites(),
+   $siteStore->getSites(),
$siteIdsToOutput
);
 
diff --git a/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php 
b/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
index 453e8a5..46fb334 100644
--- a/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
+++ b/client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
@@ -195,7 +195,7 @@
$otherProjectsSidebarGenerator = new 
OtherProjectsSidebarGenerator(
$siteId,
$mockRepo,
-   $siteStore,
+   $siteStore->getSites(),
$otherProjectIds
);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If66078ac7e0a6ec63ff618fa86be

[MediaWiki-commits] [Gerrit] Cleanup NavMenu.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Cleanup NavMenu.php
..


Cleanup NavMenu.php

Change-Id: I45a4656eb811417a8c6656411e1f1b02ec2a74a3
---
M src/Components/NavMenu.php
1 file changed, 47 insertions(+), 46 deletions(-)

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



diff --git a/src/Components/NavMenu.php b/src/Components/NavMenu.php
index 13f35b2..2f403be 100644
--- a/src/Components/NavMenu.php
+++ b/src/Components/NavMenu.php
@@ -21,7 +21,7 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon\Components;
@@ -32,9 +32,8 @@
 /**
  * The NavMenu class.
  *
- *
- * @author Stephan Gambke
- * @since 1.0
+ * @author  Stephan Gambke
+ * @since   1.0
  * @ingroup Skins
  */
 class NavMenu extends Component {
@@ -42,7 +41,7 @@
/**
 * Builds the HTML code for this component
 *
-* @return String the HTML code
+* @return string the HTML code
 */
public function getHtml() {
 
@@ -64,9 +63,8 @@
}
 
// create a dropdown for each sidebar box
-   foreach ( $sidebar as $boxName => $box ) {
-
-   $ret .= $this->getDropdownForNavMenu( $boxName, $box, 
array_search( $boxName, $flatten ) !== false );
+   foreach ( $sidebar as $menuName => $menuDescription ) {
+   $ret .= $this->getDropdownForNavMenu( $menuName, 
$menuDescription, array_search( $menuName, $flatten ) !== false );
}
 
return $ret;
@@ -75,29 +73,29 @@
/**
 * Create a single dropdown
 *
-* @param string $boxName
-* @param array  $box
-* @param bool   $flatten
+* @param string  $menuName
+* @param mixed[] $menuDescription
+* @param bool$flatten
 *
 * @return string
 */
-   protected function getDropdownForNavMenu( $boxName, $box, $flatten = 
false ) {
+   protected function getDropdownForNavMenu( $menuName, $menuDescription, 
$flatten = false ) {
 
// open list item containing the dropdown
-   $ret = $this->indent() . '';
+   $ret = $this->indent() . '';
 
if ( $flatten ) {
 
-   $ret .= $this->buildMenuItemsForDropdownMenu( $box );
+   $ret .= $this->buildMenuItemsForDropdownMenu( 
$menuDescription );
 
-   } elseif ( !$this->hasSubmenuItems( $box ) ) {
+   } elseif ( !$this->hasSubmenuItems( $menuDescription ) ) {
 
-   $ret .= $this->buildDropdownMenuStub( $box, $ret );
+   $ret .= $this->buildDropdownMenuStub( $menuDescription 
);
 
} else {
 
-   $ret .= $this->buildDropdownOpeningTags( $box, $ret )
-   . $this->buildMenuItemsForDropdownMenu( $box, 2 
)
+   $ret .= $this->buildDropdownOpeningTags( 
$menuDescription )
+   . $this->buildMenuItemsForDropdownMenu( 
$menuDescription, 2 )
. $this->buildDropdownClosingTags();
 
 
@@ -107,18 +105,20 @@
}
 
/**
-* @param $box
+* @param mixed[] $menuDescription
+* @param int $indent
+*
 * @return string
 */
-   protected function buildMenuItemsForDropdownMenu( $box, $indent = 0 ) {
+   protected function buildMenuItemsForDropdownMenu( $menuDescription, 
$indent = 0 ) {
 
// build the list of submenu items
-   if ( $this->hasSubmenuItems( $box ) ) {
+   if ( $this->hasSubmenuItems( $menuDescription ) ) {
 
$menuitems = '';
$this->indent( $indent );
 
-   foreach ( $box[ 'content' ] as $key => $item ) {
+   foreach ( $menuDescription[ 'content' ] as $key => 
$item ) {
$menuitems .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $item );
}
 
@@ -131,38 +131,54 @@
}
 
/**
-* @param $box
+* @param mixed[] $menuDescription
 *
 * @return bool
 */
-   protected function hasSubmenuItems( $box ) {
-   return is_array( $box[ 'content' ] ) && count( $box[ 'content' 
] ) > 0;
+   protected function hasSubmenuItems( $menuDescription ) {
+   return is_array( $menuDescription[ 'content' ] ) && count( 
$menuDescription[ 'content' ] ) > 0;
}
 
/**
-* @param $box
+* @param mixed[] $menuDescription
 *
 * @return string
 */
-   protected function buildDropdownOpeningTags( $box ) {
+   protected function buildDropdow

[MediaWiki-commits] [Gerrit] Cleanup NavMenu.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Cleanup NavMenu.php
..

Cleanup NavMenu.php

Change-Id: I45a4656eb811417a8c6656411e1f1b02ec2a74a3
---
M src/Components/NavMenu.php
1 file changed, 46 insertions(+), 44 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/39/173539/1

diff --git a/src/Components/NavMenu.php b/src/Components/NavMenu.php
index 13f35b2..b8f4e38 100644
--- a/src/Components/NavMenu.php
+++ b/src/Components/NavMenu.php
@@ -21,7 +21,7 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon\Components;
@@ -33,8 +33,8 @@
  * The NavMenu class.
  *
  *
- * @author Stephan Gambke
- * @since 1.0
+ * @author  Stephan Gambke
+ * @since   1.0
  * @ingroup Skins
  */
 class NavMenu extends Component {
@@ -64,9 +64,8 @@
}
 
// create a dropdown for each sidebar box
-   foreach ( $sidebar as $boxName => $box ) {
-
-   $ret .= $this->getDropdownForNavMenu( $boxName, $box, 
array_search( $boxName, $flatten ) !== false );
+   foreach ( $sidebar as $menuName => $menuDescription ) {
+   $ret .= $this->getDropdownForNavMenu( $menuName, 
$menuDescription, array_search( $menuName, $flatten ) !== false );
}
 
return $ret;
@@ -75,29 +74,29 @@
/**
 * Create a single dropdown
 *
-* @param string $boxName
-* @param array  $box
-* @param bool   $flatten
+* @param string  $menuName
+* @param mixed[] $menuDescription
+* @param bool$flatten
 *
 * @return string
 */
-   protected function getDropdownForNavMenu( $boxName, $box, $flatten = 
false ) {
+   protected function getDropdownForNavMenu( $menuName, $menuDescription, 
$flatten = false ) {
 
// open list item containing the dropdown
-   $ret = $this->indent() . '';
+   $ret = $this->indent() . '';
 
if ( $flatten ) {
 
-   $ret .= $this->buildMenuItemsForDropdownMenu( $box );
+   $ret .= $this->buildMenuItemsForDropdownMenu( 
$menuDescription );
 
-   } elseif ( !$this->hasSubmenuItems( $box ) ) {
+   } elseif ( !$this->hasSubmenuItems( $menuDescription ) ) {
 
-   $ret .= $this->buildDropdownMenuStub( $box, $ret );
+   $ret .= $this->buildDropdownMenuStub( $menuDescription 
);
 
} else {
 
-   $ret .= $this->buildDropdownOpeningTags( $box, $ret )
-   . $this->buildMenuItemsForDropdownMenu( $box, 2 
)
+   $ret .= $this->buildDropdownOpeningTags( 
$menuDescription )
+   . $this->buildMenuItemsForDropdownMenu( 
$menuDescription, 2 )
. $this->buildDropdownClosingTags();
 
 
@@ -107,18 +106,20 @@
}
 
/**
-* @param $box
+* @param $menuDescription
+* @param int $indent
+*
 * @return string
 */
-   protected function buildMenuItemsForDropdownMenu( $box, $indent = 0 ) {
+   protected function buildMenuItemsForDropdownMenu( $menuDescription, 
$indent = 0 ) {
 
// build the list of submenu items
-   if ( $this->hasSubmenuItems( $box ) ) {
+   if ( $this->hasSubmenuItems( $menuDescription ) ) {
 
$menuitems = '';
$this->indent( $indent );
 
-   foreach ( $box[ 'content' ] as $key => $item ) {
+   foreach ( $menuDescription[ 'content' ] as $key => 
$item ) {
$menuitems .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $item );
}
 
@@ -131,38 +132,54 @@
}
 
/**
-* @param $box
+* @param $menuDescription
 *
 * @return bool
 */
-   protected function hasSubmenuItems( $box ) {
-   return is_array( $box[ 'content' ] ) && count( $box[ 'content' 
] ) > 0;
+   protected function hasSubmenuItems( $menuDescription ) {
+   return is_array( $menuDescription[ 'content' ] ) && count( 
$menuDescription[ 'content' ] ) > 0;
}
 
/**
-* @param $box
+* @param $menuDescription
 *
 * @return string
 */
-   protected function buildDropdownOpeningTags( $box ) {
+   protected function buildDropdownMenuStub( $menuDescription ) {
+   return
+   $this->indent() . \Html::rawElement( 'li',
+   array(
+ 

[MediaWiki-commits] [Gerrit] Fix an undeclared and an incorrect RL dependency - change (mediawiki...TimedMediaHandler)

2014-11-15 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Fix an undeclared and an incorrect RL dependency
..

Fix an undeclared and an incorrect RL dependency

Change-Id: Ib2bad1f0c35a13b72bda538c5ceb849fb65853af
---
M TimedMediaHandler.hooks.php
1 file changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 7ab2230..2791182 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -72,6 +72,9 @@
'ext.tmh.transcodetable' => $baseExtensionResource + 
array(
'scripts' => 
'resources/ext.tmh.transcodetable.js',
'styles' => 'resources/transcodeTable.css',
+   'dependencies' => array(
+   'mw.MwEmbedSupport',
+   ),
'messages'=> array(
'mwe-ok',
'mwe-cancel',
@@ -82,7 +85,7 @@
),
"mw.MediaWikiPlayerSupport" =>  $baseExtensionResource 
+ array(
'scripts' => 
'resources/mw.MediaWikiPlayerSupport.js',
-   'dependencies'=> 'mw.Api',
+   'dependencies'=> 'mediawiki.api',
),
// adds support MediaWikiPlayerSupport player bindings
"mw.MediaWikiPlayer.loader" =>  $baseExtensionResource 
+ array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib2bad1f0c35a13b72bda538c5ceb849fb65853af
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] Use postWithEditToken to make the reset transcode request - change (mediawiki...TimedMediaHandler)

2014-11-15 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Use postWithEditToken to make the reset transcode request
..

Use postWithEditToken to make the reset transcode request

Change-Id: Ie1aef55e40150a91ddd24fa3121de1a6e8a8a86e
---
M TimedMediaHandler.hooks.php
M resources/ext.tmh.transcodetable.js
2 files changed, 6 insertions(+), 8 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/TimedMediaHandler 
refs/changes/37/173537/1

diff --git a/TimedMediaHandler.hooks.php b/TimedMediaHandler.hooks.php
index 7ab2230..a403e05 100644
--- a/TimedMediaHandler.hooks.php
+++ b/TimedMediaHandler.hooks.php
@@ -72,6 +72,7 @@
'ext.tmh.transcodetable' => $baseExtensionResource + 
array(
'scripts' => 
'resources/ext.tmh.transcodetable.js',
'styles' => 'resources/transcodeTable.css',
+   'dependencies' => 'mw.api.edit',
'messages'=> array(
'mwe-ok',
'mwe-cancel',
diff --git a/resources/ext.tmh.transcodetable.js 
b/resources/ext.tmh.transcodetable.js
index ed0e901..346c78f 100644
--- a/resources/ext.tmh.transcodetable.js
+++ b/resources/ext.tmh.transcodetable.js
@@ -50,15 +50,12 @@
 
$( this ).loadingSpinner();
 
-   var apiUrl =  mw.config.get( 'wgServer' ) + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
-   // Do an api post action:
-   $.post( apiUrl, {
+   var api = new mw.Api();
+   api.postWithEditToken( {
'action' : 'transcodereset',
'transcodekey' : tKey,
-   'title' : mw.config.get('wgPageName'),
-   'token' : mw.user.tokens.get('editToken'),
-   'format' : 'json'
-   }, function ( data ) {
+   'title' : mw.config.get('wgPageName')
+   } ).done( function ( data ) {
if( data && data['success'] ){
// refresh the page
window.location.reload();
@@ -72,7 +69,7 @@
okBtn[ mw.msg('mwe-ok') ] = function() 
{ $(this).dialog( 'close' ); }
$( _thisDialog ).dialog( 'option', 
'buttons', okBtn );
}
-   })
+   } );
};
buttons[ mw.msg( 'mwe-cancel' ) ] = function () {
$( this ).dialog( 'close' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1aef55e40150a91ddd24fa3121de1a6e8a8a86e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TimedMediaHandler
Gerrit-Branch: master
Gerrit-Owner: TheDJ 

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


[MediaWiki-commits] [Gerrit] Refactor NavMenu.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Refactor NavMenu.php
..


Refactor NavMenu.php

Change-Id: Iee3d3e179eea9825b0c262bb44582eab6ebb6323
---
M src/Components/NavMenu.php
1 file changed, 88 insertions(+), 50 deletions(-)

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



diff --git a/src/Components/NavMenu.php b/src/Components/NavMenu.php
index 616dfae..13f35b2 100644
--- a/src/Components/NavMenu.php
+++ b/src/Components/NavMenu.php
@@ -86,72 +86,110 @@
// open list item containing the dropdown
$ret = $this->indent() . '';
 
-   $menuitems = '';
+   if ( $flatten ) {
+
+   $ret .= $this->buildMenuItemsForDropdownMenu( $box );
+
+   } elseif ( !$this->hasSubmenuItems( $box ) ) {
+
+   $ret .= $this->buildDropdownMenuStub( $box, $ret );
+
+   } else {
+
+   $ret .= $this->buildDropdownOpeningTags( $box, $ret )
+   . $this->buildMenuItemsForDropdownMenu( $box, 2 
)
+   . $this->buildDropdownClosingTags();
+
+
+   }
+
+   return $ret;
+   }
+
+   /**
+* @param $box
+* @return string
+*/
+   protected function buildMenuItemsForDropdownMenu( $box, $indent = 0 ) {
 
// build the list of submenu items
-   if ( is_array( $box[ 'content' ] ) && count( $box[ 'content' ] 
) > 0 ) {
+   if ( $this->hasSubmenuItems( $box ) ) {
 
-   $this->indent( $flatten ? 0 : 2 );
+   $menuitems = '';
+   $this->indent( $indent );
 
foreach ( $box[ 'content' ] as $key => $item ) {
$menuitems .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $item );
}
 
-   $this->indent( $flatten ? 0 : -2 );
+   $this->indent( -$indent );
+   return $menuitems;
 
} else {
-   $menuitems .= $this->indent() . '';
+   return $this->indent() . '';
}
+   }
 
-   if ( $flatten ) {
-   // if the menu is to be flattened, just return the 
introducing comment and the list of menu items as is
+   /**
+* @param $box
+*
+* @return bool
+*/
+   protected function hasSubmenuItems( $box ) {
+   return is_array( $box[ 'content' ] ) && count( $box[ 'content' 
] ) > 0;
+   }
 
-   $ret .= $menuitems;
+   /**
+* @param $box
+*
+* @return string
+*/
+   protected function buildDropdownOpeningTags( $box ) {
+   // open list item containing the dropdown
+   $ret = $this->indent() . \Html::openElement( 'li',
+   array(
+   'class' => 'dropdown',
+   'title' => Linker::titleAttrib( $box[ 
'id' ] )
+   )
+   );
 
-   } elseif ( !is_array( $box[ 'content' ] ) || count( $box[ 
'content' ] ) === 0 ) {
-   //if the menu is not to be flattened, but is empty, 
return an inert link
+   // add the dropdown toggle
+   $ret .= $this->indent( 1 ) . '' .
+   htmlspecialchars( $box[ 'header' ] ) . ' ';
 
-   $ret .= $this->indent() . \Html::rawElement( 'li',
-   array(
-   'class' => '',
-   'title' => Linker::titleAttrib( 
$box[ 'id' ] )
-   ),
-   '' . htmlspecialchars( 
$box[ 'header' ] ) . ''
-   );
-
-   } else {
-
-   // open list item containing the dropdown
-   $ret .= $this->indent() . \Html::openElement( 'li',
-   array(
-   'class' => 'dropdown',
-   'title' => Linker::titleAttrib( 
$box[ 'id' ] )
-   )
-   );
-
-   // add the dropdown toggle
-   $ret .= $this->indent( 1 ) . '' .
-   htmlspecialchars( $box[ 'header' ] ) . ' ';
-
-   // open list of dropdown menu items
-   $ret .= $this->indent() .
-   $this->indent() . \Html::openElement( 'ul',
-   array

[MediaWiki-commits] [Gerrit] Refactor NavMenu.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Refactor NavMenu.php
..

Refactor NavMenu.php

Change-Id: Iee3d3e179eea9825b0c262bb44582eab6ebb6323
---
M src/Components/NavMenu.php
1 file changed, 88 insertions(+), 50 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/36/173536/1

diff --git a/src/Components/NavMenu.php b/src/Components/NavMenu.php
index 616dfae..13f35b2 100644
--- a/src/Components/NavMenu.php
+++ b/src/Components/NavMenu.php
@@ -86,72 +86,110 @@
// open list item containing the dropdown
$ret = $this->indent() . '';
 
-   $menuitems = '';
+   if ( $flatten ) {
+
+   $ret .= $this->buildMenuItemsForDropdownMenu( $box );
+
+   } elseif ( !$this->hasSubmenuItems( $box ) ) {
+
+   $ret .= $this->buildDropdownMenuStub( $box, $ret );
+
+   } else {
+
+   $ret .= $this->buildDropdownOpeningTags( $box, $ret )
+   . $this->buildMenuItemsForDropdownMenu( $box, 2 
)
+   . $this->buildDropdownClosingTags();
+
+
+   }
+
+   return $ret;
+   }
+
+   /**
+* @param $box
+* @return string
+*/
+   protected function buildMenuItemsForDropdownMenu( $box, $indent = 0 ) {
 
// build the list of submenu items
-   if ( is_array( $box[ 'content' ] ) && count( $box[ 'content' ] 
) > 0 ) {
+   if ( $this->hasSubmenuItems( $box ) ) {
 
-   $this->indent( $flatten ? 0 : 2 );
+   $menuitems = '';
+   $this->indent( $indent );
 
foreach ( $box[ 'content' ] as $key => $item ) {
$menuitems .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $item );
}
 
-   $this->indent( $flatten ? 0 : -2 );
+   $this->indent( -$indent );
+   return $menuitems;
 
} else {
-   $menuitems .= $this->indent() . '';
+   return $this->indent() . '';
}
+   }
 
-   if ( $flatten ) {
-   // if the menu is to be flattened, just return the 
introducing comment and the list of menu items as is
+   /**
+* @param $box
+*
+* @return bool
+*/
+   protected function hasSubmenuItems( $box ) {
+   return is_array( $box[ 'content' ] ) && count( $box[ 'content' 
] ) > 0;
+   }
 
-   $ret .= $menuitems;
+   /**
+* @param $box
+*
+* @return string
+*/
+   protected function buildDropdownOpeningTags( $box ) {
+   // open list item containing the dropdown
+   $ret = $this->indent() . \Html::openElement( 'li',
+   array(
+   'class' => 'dropdown',
+   'title' => Linker::titleAttrib( $box[ 
'id' ] )
+   )
+   );
 
-   } elseif ( !is_array( $box[ 'content' ] ) || count( $box[ 
'content' ] ) === 0 ) {
-   //if the menu is not to be flattened, but is empty, 
return an inert link
+   // add the dropdown toggle
+   $ret .= $this->indent( 1 ) . '' .
+   htmlspecialchars( $box[ 'header' ] ) . ' ';
 
-   $ret .= $this->indent() . \Html::rawElement( 'li',
-   array(
-   'class' => '',
-   'title' => Linker::titleAttrib( 
$box[ 'id' ] )
-   ),
-   '' . htmlspecialchars( 
$box[ 'header' ] ) . ''
-   );
-
-   } else {
-
-   // open list item containing the dropdown
-   $ret .= $this->indent() . \Html::openElement( 'li',
-   array(
-   'class' => 'dropdown',
-   'title' => Linker::titleAttrib( 
$box[ 'id' ] )
-   )
-   );
-
-   // add the dropdown toggle
-   $ret .= $this->indent( 1 ) . '' .
-   htmlspecialchars( $box[ 'header' ] ) . ' ';
-
-   // open list of dropdown menu items
-   $ret .= $this->indent() .
-   $this->indent() . \Ht

[MediaWiki-commits] [Gerrit] Remove bytes{added|remoed} image from MobileSpecialPageFeed - change (mediawiki...MobileFrontend)

2014-11-15 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Remove bytes{added|remoed} image from MobileSpecialPageFeed
..

Remove bytes{added|remoed} image from MobileSpecialPageFeed

CSS rule used for stable&beta doesn't exist out of mobilediff.

Bug: 73422
Change-Id: I8330d58bbf213407a102fbe91ab7bdb8ddc07c8b
---
M includes/specials/MobileSpecialPageFeed.php
1 file changed, 0 insertions(+), 6 deletions(-)


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

diff --git a/includes/specials/MobileSpecialPageFeed.php 
b/includes/specials/MobileSpecialPageFeed.php
index aff67f5..f9dbcf3 100644
--- a/includes/specials/MobileSpecialPageFeed.php
+++ b/includes/specials/MobileSpecialPageFeed.php
@@ -120,12 +120,6 @@
 
if ( $bytes ) {
$formattedBytes = $lang->formatNum( $bytes );
-   if ( $bytes > 0 ) {
-   $formattedBytes = '+' . $formattedBytes;
-   $bytesClass = MobileUI::iconClass( 
'bytesadded', 'before', 'icon-12px mw-mf-bytesadded' );
-   } else {
-   $bytesClass = MobileUI::iconClass( 
'bytesremoved', 'before', 'icon-12px mw-mf-bytesremoved' );
-   }
$html .= Html::element(
'p',
array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8330d58bbf213407a102fbe91ab7bdb8ddc07c8b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Update version - change (pywikibot/compat)

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

Change subject: Update version
..


Update version

Change-Id: I14cb5ddb42036f7169945102c1dfcd9d1c256a91
---
M families/i18n_family.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Merlijn van Deen: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/families/i18n_family.py b/families/i18n_family.py
index c1d5532..1438148 100644
--- a/families/i18n_family.py
+++ b/families/i18n_family.py
@@ -265,7 +265,7 @@
 
 def version(self, code):
 """Return the version for this family."""
-return "1.23alpha"
+return "1.25alpha"
 
 def protocol(self, *args, **kwargs):
 return 'https'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I14cb5ddb42036f7169945102c1dfcd9d1c256a91
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Merlijn van Deen 
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 version - change (pywikibot/compat)

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

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

Change subject: Update version
..

Update version

Change-Id: I14cb5ddb42036f7169945102c1dfcd9d1c256a91
---
M families/i18n_family.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/34/173534/1

diff --git a/families/i18n_family.py b/families/i18n_family.py
index c1d5532..1438148 100644
--- a/families/i18n_family.py
+++ b/families/i18n_family.py
@@ -265,7 +265,7 @@
 
 def version(self, code):
 """Return the version for this family."""
-return "1.23alpha"
+return "1.25alpha"
 
 def protocol(self, *args, **kwargs):
 return 'https'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I14cb5ddb42036f7169945102c1dfcd9d1c256a91
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] WIP useless rough draft tests for more banner choosing stuff - change (mediawiki...CentralNotice)

2014-11-15 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: WIP useless rough draft tests for more banner choosing stuff
..

WIP useless rough draft tests for more banner choosing stuff

Change-Id: I9af506c7a980bfaadf4e1ae4dae9b4c5c3a6cd9f
---
M 
tests/qunit/ext.centralNotice.bannerController.lib/bannerController.lib.tests.js
M tests/qunit/ext.centralNotice.bannerController/bannerController.tests.js
2 files changed, 78 insertions(+), 8 deletions(-)


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

diff --git 
a/tests/qunit/ext.centralNotice.bannerController.lib/bannerController.lib.tests.js
 
b/tests/qunit/ext.centralNotice.bannerController.lib/bannerController.lib.tests.js
index cb01e61..07e42df 100644
--- 
a/tests/qunit/ext.centralNotice.bannerController.lib/bannerController.lib.tests.js
+++ 
b/tests/qunit/ext.centralNotice.bannerController.lib/bannerController.lib.tests.js
@@ -1,13 +1,70 @@
 ( function( mw, $ ) {
'use strict';
 
+   var singleFixture = {
+   choices: [
+   {
+   preferred: 1,
+   throttle: 50,
+   bucket_count: 1,
+   geotargetted: true,
+   countries: [
+   "FR",
+   "GR",
+   "XX"
+   ],
+   banners: [
+   {
+   name: "b1",
+   weight: 5,
+   bucket: 0,
+   category: "fundraising",
+   devices: [ "desktop" ]
+   }
+   ]
+   }
+   ],
+   },
+   skewedFixture = {
+   choices: [
+   {
+   preferred: 1,
+   throttle: 50,
+   bucket_count: 1,
+   geotargetted: true,
+   countries: [
+   "FR",
+   "GR",
+   "XX"
+   ],
+   banners: [
+   {
+   name: "b2",
+   weight: 1,
+   bucket: 0,
+   category: "fundraising",
+   devices: [ "desktop" ]
+   },
+   {
+   name: "b3",
+   weight: 99,
+   bucket: 0,
+   category: "fundraising",
+   devices: [ "desktop" ]
+   }
+   ]
+   }
+   ],
+   };
+
QUnit.module( 'ext.centralNotice.bannerController.lib', 
QUnit.newMwEnvironment( {
setup: function() {
mw.centralNotice.data.getVars.country = 'US';
mw.centralNotice.data.device = 'desktop';
-   // TODO: remaining config, initialize CN.
-   },
-   teardown: function() {
+   mw.centralNotice.data.bucket = 0;
+
+   // FIXME: do we need to?  If so, copy the mocking code 
from bannerController.tests.js.
+   // mw.centralNotice.initialize()
}
} ) );
 
@@ -28,17 +85,22 @@
// haven't been able to make that work, yet.
// TODO: pending implementation of this library
lib.setChoiceData( data.choices );
-   //lib.filterChoiceData();
-

[MediaWiki-commits] [Gerrit] Don't load talk overlay code on talk pages - change (mediawiki...MobileFrontend)

2014-11-15 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Don't load talk overlay code on talk pages
..

Don't load talk overlay code on talk pages

It's unneded there.

Bug: 72799
Change-Id: Idf57dec830211d38f1e0d5ea634cd19d605f090f
---
M includes/skins/SkinMinervaBeta.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index 47cb640..098beb3 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -33,7 +33,8 @@
 */
public function getDefaultModules() {
$modules = parent::getDefaultModules();
-   if ( $this->isAllowedPageAction( 'talk' ) ) {
+   $title = $this->getTitle();
+   if ( $this->isAllowedPageAction( 'talk' ) && 
!$title->isTalkPage() ) {
$modules['talk'] = array( 'mobile.talk' );
}
$modules['beta'] = array( 'mobile.beta' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idf57dec830211d38f1e0d5ea634cd19d605f090f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Fix possible crash(es) on screen rotation in search fragment. - change (apps...wikipedia)

2014-11-15 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Fix possible crash(es) on screen rotation in search fragment.
..

Fix possible crash(es) on screen rotation in search fragment.

Change-Id: Ib7ed54949f2aa627e15cbd2987f4c3e5e96ff5f9
---
M wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/31/173531/1

diff --git 
a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java 
b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
index f14bb3a..f93524f 100644
--- a/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/search/SearchArticlesFragment.java
@@ -373,7 +373,7 @@
 
 @Override
 public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {
-if (isSearchActive) {
+if (isSearchActive && isAdded()) {
 addSearchView(menu);
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7ed54949f2aa627e15cbd2987f4c3e5e96ff5f9
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: BearND 

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


[MediaWiki-commits] [Gerrit] Don't indent all page-lists - change (mediawiki...MobileFrontend)

2014-11-15 Thread Florianschmidtwelzow (Code Review)
Florianschmidtwelzow has uploaded a new change for review.

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

Change subject: Don't indent all page-lists
..

Don't indent all page-lists

Follow up: I14c625b4b0cb7e48e49c8e947ebca39d76b502f6

Bug: 73448
Change-Id: Ia870a9f9b63da5c4f5656dcc274f1fb950a08ce7
---
M less/pagelist.less
M templates/modules/languages/LanguageOverlay.hogan
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/less/pagelist.less b/less/pagelist.less
index 44148b2..06af0f3 100644
--- a/less/pagelist.less
+++ b/less/pagelist.less
@@ -182,8 +182,8 @@
 
 // FIXME: combine with a similar pattern in modules/NotificationsOverlay.less
 @media all and (min-width: @wgMFDeviceWidthTablet) {
-   .overlay {
-   .page-list {
+   .page-list {
+   &.list-indent {
padding: @itemPaddingV @contentPaddingTablet;
}
}
diff --git a/templates/modules/languages/LanguageOverlay.hogan 
b/templates/modules/languages/LanguageOverlay.hogan
index 8686512..a263a24 100644
--- a/templates/modules/languages/LanguageOverlay.hogan
+++ b/templates/modules/languages/LanguageOverlay.hogan
@@ -3,7 +3,7 @@
 
 {{#variantHeader}}
 {{{variantHeader}}}
-
+
{{#variants}}

{{langname}}
@@ -15,7 +15,7 @@
 {{#variantHeader}}
 {{{header}}}
 {{/variantHeader}}
-
+
{{#languages}}

{{langname}}{{#title}} | {{title}}{{/title}}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia870a9f9b63da5c4f5656dcc274f1fb950a08ce7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Florianschmidtwelzow 

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


[MediaWiki-commits] [Gerrit] Migrate mediawiki/qunit jobs from production slaves to labs - change (integration/config)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Migrate mediawiki/qunit jobs from production slaves to labs
..

Migrate mediawiki/qunit jobs from production slaves to labs

Bug: 72063
Change-Id: I69c4d6db114e2960c76ac01c4b255b7fb7bf8962
---
M jjb/mediawiki-extensions.yaml
M jjb/mediawiki.yaml
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/29/173529/1

diff --git a/jjb/mediawiki-extensions.yaml b/jjb/mediawiki-extensions.yaml
index 43b4033..b045781 100644
--- a/jjb/mediawiki-extensions.yaml
+++ b/jjb/mediawiki-extensions.yaml
@@ -124,7 +124,7 @@
 
 - job-template:
 name: '{name}-{ext-name}-qunit'
-node: productionSlaves && UbuntuPrecise  # labs instances not ready yet
+node: contintLabsSlave && UbuntuPrecise  # labs instances not ready yet
 concurrent: true
 triggers:
  - zuul
@@ -158,7 +158,7 @@
 # submodule under lib/ve and Zuul cloner does not process submodules.
 - job-template:
 name: 'mwext-VisualEditor-qunit'
-node: productionSlaves && UbuntuPrecise  # labs instances not ready yet
+node: contintLabsSlave && UbuntuPrecise  # labs instances not ready yet
 concurrent: true
 triggers:
  - zuul
diff --git a/jjb/mediawiki.yaml b/jjb/mediawiki.yaml
index fd74b0e..4ac0d1c 100644
--- a/jjb/mediawiki.yaml
+++ b/jjb/mediawiki.yaml
@@ -37,7 +37,7 @@
 # Generic job to run QUnit
 - job-template:
 name: '{name}-qunit'
-node: productionSlaves && UbuntuPrecise  # labs instances not ready yet
+node: contintLabsSlave && UbuntuPrecise  # labs instances not ready yet
 concurrent: true
 logrotate:
 daysToKeep: 15

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69c4d6db114e2960c76ac01c4b255b7fb7bf8962
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] i18n -> https for Siebrand - change (pywikibot/compat)

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

Change subject: i18n -> https for Siebrand
..


i18n -> https for Siebrand

Change-Id: I1b2bd25ebcd01ba58d0ef3c028698a8a68a13dc2
---
M families/i18n_family.py
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/families/i18n_family.py b/families/i18n_family.py
index 64d6dd5..c1d5532 100644
--- a/families/i18n_family.py
+++ b/families/i18n_family.py
@@ -266,3 +266,6 @@
 def version(self, code):
 """Return the version for this family."""
 return "1.23alpha"
+
+def protocol(self, *args, **kwargs):
+return 'https'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1b2bd25ebcd01ba58d0ef3c028698a8a68a13dc2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 
Gerrit-Reviewer: Siebrand 
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 "sortable" class to display table - change (mediawiki...TemplateData)

2014-11-15 Thread Glaisher (Code Review)
Glaisher has uploaded a new change for review.

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

Change subject: Add "sortable" class to display table
..

Add "sortable" class to display table

This will make the display table sortable; table which appears when
 tag is used on a page.

Bug: 50435
Change-Id: If72a44eab3229139791ea2d06ef6a74e2ce2e0c9
---
M TemplateDataBlob.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/TemplateDataBlob.php b/TemplateDataBlob.php
index b386be7..2524a64 100644
--- a/TemplateDataBlob.php
+++ b/TemplateDataBlob.php
@@ -574,7 +574,7 @@
$data->description :
wfMessage( 
'templatedata-doc-desc-empty' )->inLanguage( $lang )->text()
)
-   . ''
+   . ''
. Html::element(
'caption',
array(),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If72a44eab3229139791ea2d06ef6a74e2ce2e0c9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/TemplateData
Gerrit-Branch: master
Gerrit-Owner: Glaisher 

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


[MediaWiki-commits] [Gerrit] i18n -> https for Siebrand - change (pywikibot/compat)

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

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

Change subject: i18n -> https for Siebrand
..

i18n -> https for Siebrand

Change-Id: I1b2bd25ebcd01ba58d0ef3c028698a8a68a13dc2
---
M families/i18n_family.py
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/compat 
refs/changes/27/173527/1

diff --git a/families/i18n_family.py b/families/i18n_family.py
index 64d6dd5..c1d5532 100644
--- a/families/i18n_family.py
+++ b/families/i18n_family.py
@@ -266,3 +266,6 @@
 def version(self, code):
 """Return the version for this family."""
 return "1.23alpha"
+
+def protocol(self, *args, **kwargs):
+return 'https'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b2bd25ebcd01ba58d0ef3c028698a8a68a13dc2
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/compat
Gerrit-Branch: master
Gerrit-Owner: Merlijn van Deen 

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


[MediaWiki-commits] [Gerrit] grunt: Remove unused --qunit-file option - change (integration/jenkins)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: grunt: Remove unused --qunit-file option
..

grunt: Remove unused --qunit-file option

Change-Id: I950ae4ae49a406d86e390d63992bc4ec9c485e8d
---
M tools/Gruntfile.js
M tools/package.json
2 files changed, 10 insertions(+), 14 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/26/173526/1

diff --git a/tools/Gruntfile.js b/tools/Gruntfile.js
index f9ba74c..a268067 100644
--- a/tools/Gruntfile.js
+++ b/tools/Gruntfile.js
@@ -16,16 +16,12 @@
qunit: {
all: ( function () {
var url = grunt.option( 'qunit-url' ),
-   file = grunt.option( 'qunit-file' ),
ret = {};
if ( url ) {
ret.options = {
urls: [ url ],
timeout: 30 * 1000
};
-   }
-   if ( file ) {
-   ret.src = [ file ];
}
return ret;
}() ),
diff --git a/tools/package.json b/tools/package.json
index 91b5a86..75696ab 100644
--- a/tools/package.json
+++ b/tools/package.json
@@ -1,12 +1,12 @@
 {
-   "name": "wikimedia-integration-jenkins",
-   "version": "0.3.1",
-   "dependencies": {
-   "grunt": "0.4.5",
-   "grunt-cli": "0.1.13",
-   "grunt-contrib-qunit": "0.5.2",
-   "phantomjs": "1.9.7-3",
-   "grunt-contrib-csslint": "0.3.1",
-   "jshint": "2.5.6"
-   }
+  "name": "wikimedia-integration-jenkins",
+  "version": "0.3.1",
+  "dependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-contrib-qunit": "0.5.2",
+"phantomjs": "1.9.7-3",
+"grunt-contrib-csslint": "0.3.1",
+"jshint": "2.5.6"
+  }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I950ae4ae49a406d86e390d63992bc4ec9c485e8d
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] grunt: Remove unused --qunit-file option - change (integration/jenkins)

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

Change subject: grunt: Remove unused --qunit-file option
..


grunt: Remove unused --qunit-file option

Change-Id: I950ae4ae49a406d86e390d63992bc4ec9c485e8d
---
M tools/Gruntfile.js
M tools/package.json
2 files changed, 10 insertions(+), 14 deletions(-)

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



diff --git a/tools/Gruntfile.js b/tools/Gruntfile.js
index f9ba74c..a268067 100644
--- a/tools/Gruntfile.js
+++ b/tools/Gruntfile.js
@@ -16,16 +16,12 @@
qunit: {
all: ( function () {
var url = grunt.option( 'qunit-url' ),
-   file = grunt.option( 'qunit-file' ),
ret = {};
if ( url ) {
ret.options = {
urls: [ url ],
timeout: 30 * 1000
};
-   }
-   if ( file ) {
-   ret.src = [ file ];
}
return ret;
}() ),
diff --git a/tools/package.json b/tools/package.json
index 91b5a86..75696ab 100644
--- a/tools/package.json
+++ b/tools/package.json
@@ -1,12 +1,12 @@
 {
-   "name": "wikimedia-integration-jenkins",
-   "version": "0.3.1",
-   "dependencies": {
-   "grunt": "0.4.5",
-   "grunt-cli": "0.1.13",
-   "grunt-contrib-qunit": "0.5.2",
-   "phantomjs": "1.9.7-3",
-   "grunt-contrib-csslint": "0.3.1",
-   "jshint": "2.5.6"
-   }
+  "name": "wikimedia-integration-jenkins",
+  "version": "0.3.1",
+  "dependencies": {
+"grunt": "0.4.5",
+"grunt-cli": "0.1.13",
+"grunt-contrib-qunit": "0.5.2",
+"phantomjs": "1.9.7-3",
+"grunt-contrib-csslint": "0.3.1",
+"jshint": "2.5.6"
+  }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I950ae4ae49a406d86e390d63992bc4ec9c485e8d
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] [FEAT] Support HTTP GET requests - change (pywikibot/core)

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

Change subject: [FEAT] Support HTTP GET requests
..


[FEAT] Support HTTP GET requests

This uses a HTTP GET request if possible instead of an HTTP POST if not
one of the following conditions is applying:

- The action is one of the actions which requires a POST request (e.g.
  action=upload). If the action is query, the query modules requires a
  POST request.
- The config variable (maximum_GET_length) is lower than the actual
  param string. The family can overwrite this maximum length. If it is 0
  (it accepts also ints < 0, but those don't make sense), it'll never
  use a GET request.
- If after the first request the server returns a 414 it'll switch to
  the POST request mode and retry it.
- If the site is not using SSL, but could be configured.

The Request instance itself has an attribute 'use_get' which can
overwrite this behaviour. If it's True the first try will always be a
GET request (even if the action doesn't support it), if it's False it'll
never try it with a GET request and if it's None, it'll check the action
and if requires the querymodule.

The value of 'True' is defined to allow calling action=paraminfo inside
the request, which would itself call action=paraminfo if it didn't know
that this doesn't require a GET request. It also ignores 'meta'
parameters as those are all GETable and because ParamInfo requries
meta=siteinfo and meta=userinfo.

Change-Id: Ib045fecedd9638f4b3bcbc40bc7b37ebfea63c42
---
M pywikibot/comms/http.py
M pywikibot/config2.py
M pywikibot/data/api.py
M pywikibot/exceptions.py
M pywikibot/family.py
5 files changed, 73 insertions(+), 4 deletions(-)

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



diff --git a/pywikibot/comms/http.py b/pywikibot/comms/http.py
index 660e597..f3e93c8 100644
--- a/pywikibot/comms/http.py
+++ b/pywikibot/comms/http.py
@@ -66,7 +66,9 @@
 from urllib2 import quote
 
 from pywikibot import config
-from pywikibot.exceptions import FatalServerError, Server504Error
+from pywikibot.exceptions import (
+FatalServerError, Server504Error, Server414Error
+)
 from pywikibot.comms import threadedhttp
 from pywikibot.tools import deprecate_arg
 import pywikibot.version
@@ -260,6 +262,9 @@
 if request.data[0].status == 504:
 raise Server504Error("Server %s timed out" % site.hostname())
 
+if request.data[0].status == 414:
+raise Server414Error('Too long GET request')
+
 # HTTP status 207 is also a success status for Webdav FINDPROP,
 # used by the version module.
 if request.data[0].status not in (200, 207):
diff --git a/pywikibot/config2.py b/pywikibot/config2.py
index e24ebca..0020d5d 100644
--- a/pywikibot/config2.py
+++ b/pywikibot/config2.py
@@ -89,6 +89,14 @@
 # number of days to cache namespaces, api configuration, etc.
 API_config_expiry = 30
 
+# The maximum number of bytes which uses a GET request, if not positive
+# it'll always use POST requests
+maximum_GET_length = 255
+# Some networks modify GET requests when they are not encrypted, to avoid
+# bug reports related to that disable those. If we are confident that bug
+# related to this are really because of the network this could be changed.
+enable_GET_without_SSL = False
+
 # Solve captchas in the webbrowser. Setting this to False will result in the
 # exception CaptchaError being thrown if a captcha is encountered.
 solve_captcha = True
diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 01d36d9..3eb69a1 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -26,7 +26,9 @@
 import pywikibot
 from pywikibot import config, login
 from pywikibot.tools import MediaWikiVersion as LV, deprecated, itergroup
-from pywikibot.exceptions import Server504Error, FatalServerError, Error
+from pywikibot.exceptions import (
+Server504Error, Server414Error, FatalServerError, Error
+)
 
 import sys
 
@@ -297,6 +299,7 @@
 
 params = {
 'expiry': config.API_config_expiry,
+'use_get': True,  # Request need ParamInfo to determine use_get
 'site': self.site,
 'action': 'paraminfo',
 }
@@ -534,6 +537,9 @@
 @kwarg retry_wait: (optional) Minimum time to wait after an error,
defaults to 5 seconds (doubles each retry until max of 120 is
reached)
+@kwarg use_get: (optional) Use HTTP GET request if possible. If False
+   it uses a POST request. If None, it'll try to determine via
+   action=paraminfo if the action requires a POST.
 @kwarg format: (optional) Defaults to "json"
 """
 try:
@@ -549,6 +555,7 @@
 else:
 self.mime = kwargs.pop('mime', False)
 self.throttle = kwargs.pop('throttle', True)
+self.use_get = kwargs.pop('use_get', None)
 self.max_retries = kwarg

[MediaWiki-commits] [Gerrit] Consistently document function parameter $group - change (mediawiki...AbuseFilter)

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

Change subject: Consistently document function parameter $group
..


Consistently document function parameter $group

Followup to 0c174aec.

Change-Id: Idbe7eee4288b5c09d3b9f373cb4eb22da659fc16
---
M AbuseFilter.class.php
1 file changed, 8 insertions(+), 8 deletions(-)

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



diff --git a/AbuseFilter.class.php b/AbuseFilter.class.php
index bb94e6d..3e45b0a 100644
--- a/AbuseFilter.class.php
+++ b/AbuseFilter.class.php
@@ -429,7 +429,7 @@
 * Returns an associative array of filters which were tripped
 *
 * @param $vars array
-* @param $group string The filter group to check against.
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 *
 * @return array
 */
@@ -848,7 +848,7 @@
/**
 * @param $vars AbuseFilterVariableHolder
 * @param $title Title
-* @param $group string
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @return Status
 */
public static function filterAction( $vars, $title, $group = 'default' 
) {
@@ -930,7 +930,7 @@
 * @param $log_template
 * @param $action
 * @param $vars AbuseFilterVariableHolder
-* @param string $group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @return mixed
 */
public static function addLogEntries( $actions_taken, $log_template, 
$action, $vars, $group = 'default' ) {
@@ -1537,7 +1537,7 @@
}
 
/**
-* @param $group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @return String
 */
public static function getGlobalRulesKey( $group ) {
@@ -1566,7 +1566,7 @@
/**
 * Update statistics, and disable filters which are over-blocking.
 * @param $filters
-* @param $group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 */
public static function recordStats( $filters, $group = 'default' ) {
global $wgAbuseFilterConditionLimit, $wgMemc;
@@ -1607,7 +1607,7 @@
}
 
/**
-* @param $group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @param $filters
 * @param $total
 */
@@ -1658,7 +1658,7 @@
 
/**
 * @param array $emergencyValue
-* @param string $group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @return mixed
 */
public static function getEmergencyValue( array $emergencyValue, $group 
) {
@@ -2244,7 +2244,7 @@
/**
 * Gives either the user-specified name for a group,
 * or spits the input back out
-* @param $group String: Internal name of the filter group
+* @param string $group The filter's group (as defined in 
$wgAbuseFilterValidGroups)
 * @return String A name for that filter group, or the input.
 */
static function nameGroup($group) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idbe7eee4288b5c09d3b9f373cb4eb22da659fc16
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/AbuseFilter
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: Se4598 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Refactor PermissionsHelper.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Refactor PermissionsHelper.php
..


Refactor PermissionsHelper.php

Change-Id: I0aed1ef22cca1a92a2d45f9872a843dc61fe01ae
---
M src/PermissionsHelper.php
1 file changed, 76 insertions(+), 48 deletions(-)

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



diff --git a/src/PermissionsHelper.php b/src/PermissionsHelper.php
index 9d8c023..5d5e9ed 100644
--- a/src/PermissionsHelper.php
+++ b/src/PermissionsHelper.php
@@ -21,18 +21,18 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon;
+
 use DOMElement;
-use Skin;
 
 /**
  * PermissionsHelper class
  *
- * @author Stephan Gambke
- * @since 1.1
+ * @author  Stephan Gambke
+ * @since   1.1
  * @ingroup Skins
  */
 class PermissionsHelper {
@@ -43,87 +43,115 @@
 
/**
 * @param \SkinChameleon $skin
-* @param DOMElement $domElement
-* @param bool $default
+* @param DOMElement $domElement
+* @param bool   $default
 */
-   public function __construct ( \SkinChameleon $skin, DOMElement 
$domElement = null, $default = false ){
+   public function __construct( \SkinChameleon $skin, DOMElement 
$domElement = null, $default = false ) {
$this->skin = $skin;
$this->domElement = $domElement;
$this->default = $default;
}
 
/**
-* @param string $attribute
+* @since 1.1
+*
+* @param string $attributeNameInDomElement
+*
 * @return bool
 */
-   public function userHasGroup( $attribute ) {
+   public function userHasGroup( $attributeNameInDomElement ) {
 
-   if ( !$this->hasAttribute( $attribute ) ) {
-   return $this->default;
-   }
-
-   $expectedGroups = $this->getValueListFromAttribute( $attribute 
);
-   $userGroups = $this->skin->getUser()->getEffectiveGroups();
-   $effectiveUserGroups = array_intersect( $expectedGroups, 
$userGroups );
-
-   return !empty( $effectiveUserGroups );
+   return $this->userHas( 'group', $attributeNameInDomElement );
}
 
/**
-* @param string $attribute
+* @param string $attributeOfUser
+* @param string $attributeNameInDomElement
+*
+* @throws \MWException
 * @return bool
 */
-   public function userHasPermission( $attribute ) {
+   protected function userHas( $attributeOfUser, 
$attributeNameInDomElement ) {
 
-   if ( !$this->hasAttribute( $attribute ) ) {
+   $user = $this->skin->getUser();
+   $attributeAccessors = array(
+   'group'  => array( $user, 'getEffectiveGroups' ),
+   'permission' => array( $user, 'getRights' ),
+   );
+
+   if ( !array_key_exists( $attributeOfUser, $attributeAccessors ) 
) {
+   throw new \MWException( sprintf( 'Unknown permission: 
%s', $attributeOfUser ) );
+   }
+
+   if ( !$this->hasAttribute( $attributeNameInDomElement ) ) {
return $this->default;
}
 
-   $expectedRights = $this->getValueListFromAttribute( $attribute 
);
-   $userRights = $this->skin->getUser()->getRights();
-   $effectiveUserRights = array_intersect( $expectedRights, 
$userRights );
+   $expectedValues = $this->getValueListFromAttribute( 
$attributeNameInDomElement );
+   $observedValues = call_user_func( $attributeAccessors[ 
$attributeOfUser ] );
+   $effectiveValues = array_intersect( $expectedValues, 
$observedValues );
 
-   return !empty( $effectiveUserRights );
+   return !empty( $effectiveValues );
}
 
/**
-* @param string $attribute
+* @since 1.1
+*
+* @param string $attributeNameInDomElement
+*
 * @return bool
 */
-   public function pageIsInNamespace( $attribute ) {
+   public function hasAttribute( $attributeNameInDomElement ) {
+   return $this->domElement !== null && 
$this->domElement->hasAttribute( $attributeNameInDomElement );
+   }
 
-   if ( !$this->hasAttribute( $attribute ) ) {
+   /**
+* @param string $attributeName
+*
+* @return string[]
+*/
+   protected function getValueListFromAttribute( $attributeName ) {
+   return $this->domElement === null ? array() : array_map( 
'trim', explode( ',', $this->domElement->getAttribute( $attributeName ) ) );
+
+   }
+
+   /**
+* @since 1.1
+*
+* @param string $attributeNameInDomEle

[MediaWiki-commits] [Gerrit] Refactor PermissionsHelper.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Refactor PermissionsHelper.php
..

Refactor PermissionsHelper.php

Change-Id: I0aed1ef22cca1a92a2d45f9872a843dc61fe01ae
---
M src/PermissionsHelper.php
1 file changed, 73 insertions(+), 47 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/25/173525/1

diff --git a/src/PermissionsHelper.php b/src/PermissionsHelper.php
index 9d8c023..8a5c7f4 100644
--- a/src/PermissionsHelper.php
+++ b/src/PermissionsHelper.php
@@ -21,18 +21,18 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon;
+
 use DOMElement;
-use Skin;
 
 /**
  * PermissionsHelper class
  *
- * @author Stephan Gambke
- * @since 1.1
+ * @author  Stephan Gambke
+ * @since   1.1
  * @ingroup Skins
  */
 class PermissionsHelper {
@@ -43,84 +43,110 @@
 
/**
 * @param \SkinChameleon $skin
-* @param DOMElement $domElement
-* @param bool $default
+* @param DOMElement $domElement
+* @param bool   $default
 */
-   public function __construct ( \SkinChameleon $skin, DOMElement 
$domElement = null, $default = false ){
+   public function __construct( \SkinChameleon $skin, DOMElement 
$domElement = null, $default = false ) {
$this->skin = $skin;
$this->domElement = $domElement;
$this->default = $default;
}
 
/**
-* @param string $attribute
+* @since 1.1
+*
+* @param string $attributeNameInDomElement
+*
 * @return bool
 */
-   public function userHasGroup( $attribute ) {
+   public function userHasGroup( $attributeNameInDomElement ) {
 
-   if ( !$this->hasAttribute( $attribute ) ) {
-   return $this->default;
-   }
-
-   $expectedGroups = $this->getValueListFromAttribute( $attribute 
);
-   $userGroups = $this->skin->getUser()->getEffectiveGroups();
-   $effectiveUserGroups = array_intersect( $expectedGroups, 
$userGroups );
-
-   return !empty( $effectiveUserGroups );
+   return $this->userHas( 'group', $attributeNameInDomElement );
}
 
/**
-* @param string $attribute
+* @param string $attributeOfUser
+* @param string $attributeNameInDomElement
+*
+* @throws \MWException
 * @return bool
 */
-   public function userHasPermission( $attribute ) {
+   protected function userHas( $attributeOfUser, 
$attributeNameInDomElement ) {
 
-   if ( !$this->hasAttribute( $attribute ) ) {
+   $user = $this->skin->getUser();
+   $attributeAccessors = array(
+   'group'  => array( $user, 'getEffectiveGroups' ),
+   'permission' => array( $user, 'getRights' ),
+   );
+
+   if ( !array_key_exists( $attributeOfUser, $attributeAccessors ) 
) {
+   throw new \MWException( sprintf( 'Unknown permission: 
%s', $attributeOfUser ) );
+   }
+
+   if ( !$this->hasAttribute( $attributeNameInDomElement ) ) {
return $this->default;
}
 
-   $expectedRights = $this->getValueListFromAttribute( $attribute 
);
-   $userRights = $this->skin->getUser()->getRights();
-   $effectiveUserRights = array_intersect( $expectedRights, 
$userRights );
+   $expectedValues = $this->getValueListFromAttribute( 
$attributeNameInDomElement );
+   $observedValues = call_user_func( $attributeAccessors[ 
$attributeOfUser ] );
+   $effectiveValues = array_intersect( $expectedValues, 
$observedValues );
 
-   return !empty( $effectiveUserRights );
+   return !empty( $effectiveValues );
}
 
/**
-* @param string $attribute
+* @param string $attributeNameInDomElement
+*
 * @return bool
 */
-   public function pageIsInNamespace( $attribute ) {
+   public function hasAttribute( $attributeNameInDomElement ) {
+   return $this->domElement !== null && 
$this->domElement->hasAttribute( $attributeNameInDomElement );
+   }
 
-   if ( !$this->hasAttribute( $attribute ) ) {
+   /**
+* @param string $attributeName
+*
+* @return string[]
+*/
+   private function getValueListFromAttribute( $attributeName ) {
+   return $this->domElement === null ? array() : array_map( 
'trim', explode( ',', $this->domElement->getAttribute( $attributeName ) ) );
+
+   }
+
+   /**
+* @since 1.1
+*
+* @pa

[MediaWiki-commits] [Gerrit] Add missing . - change (operations/mediawiki-config)

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

Change subject: Add missing .
..


Add missing .

Change-Id: I95a8b27720e93a0855260308c7a762b93e0c35e8
---
M docroot/noc/dbtree/index.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/docroot/noc/dbtree/index.php b/docroot/noc/dbtree/index.php
index 7bcf3ca..04725dd 100644
--- a/docroot/noc/dbtree/index.php
+++ b/docroot/noc/dbtree/index.php
@@ -194,7 +194,7 @@



-   
+   

 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I95a8b27720e93a0855260308c7a762b93e0c35e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
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 . - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Add missing .
..

Add missing .

Change-Id: I95a8b27720e93a0855260308c7a762b93e0c35e8
---
M docroot/noc/dbtree/index.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/docroot/noc/dbtree/index.php b/docroot/noc/dbtree/index.php
index 7bcf3ca..04725dd 100644
--- a/docroot/noc/dbtree/index.php
+++ b/docroot/noc/dbtree/index.php
@@ -194,7 +194,7 @@



-   
+   

 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95a8b27720e93a0855260308c7a762b93e0c35e8
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Minify jquery.jOrgChart - change (operations/mediawiki-config)

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

Change subject: Minify jquery.jOrgChart
..


Minify jquery.jOrgChart

Change-Id: I7f476b8b8bf2b05b6d1340a586ecbbcb7dac3ceb
---
M docroot/noc/dbtree/index.php
D docroot/noc/dbtree/js/jquery.jOrgChart.js
A docroot/noc/dbtree/js/jquery.jOrgChart.min.js
3 files changed, 2 insertions(+), 232 deletions(-)

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



diff --git a/docroot/noc/dbtree/index.php b/docroot/noc/dbtree/index.php
index f6aee40..7bcf3ca 100644
--- a/docroot/noc/dbtree/index.php
+++ b/docroot/noc/dbtree/index.php
@@ -194,7 +194,7 @@



-   
+   

 
 
diff --git a/docroot/noc/dbtree/js/jquery.jOrgChart.js 
b/docroot/noc/dbtree/js/jquery.jOrgChart.js
deleted file mode 100644
index 9dfc056..000
--- a/docroot/noc/dbtree/js/jquery.jOrgChart.js
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * jQuery org-chart/tree plugin.
- *
- * Author: Wes Nolte
- * http://twitter.com/wesnolte
- *
- * Based on the work of Mark Lee
- * http://www.capricasoftware.co.uk 
- *
- * This software is licensed under the Creative Commons Attribution-ShareAlike
- * 3.0 License.
- *
- * See here for license terms:
- * http://creativecommons.org/licenses/by-sa/3.0
- */
-(function($) {
-
-  $.fn.jOrgChart = function(options) {
-var opts = $.extend({}, $.fn.jOrgChart.defaults, options);
-var $appendTo = $(opts.chartElement);
-
-   // build the tree
-$this = $(this);
-var $container = $("");
-if($this.is("ul")) {
-  buildNode($this.find("li:first"), $container, 0, opts);
-}
-else if($this.is("li")) {
-  buildNode($this, $container, 0, opts);
-}
-$appendTo.append($container);
-
-   // add drag and drop if enabled
-   if(opts.dragAndDrop){
-   $('div.node').draggable({
-   cursor  : 'move',
-   distance: 40,
-   helper  : 'clone',
-   opacity : 0.8,
-   revert  : true,
-   revertDuration : 100,
-   snap: 'div.node.expanded',
-   snapMode: 'inner',
-   stack   : 'div.node'
-   });
-   
-   $('div.node').droppable({
-   accept  : '.node',  
-   activeClass : 'drag-active',
-   hoverClass  : 'drop-hover'
-   });
-   
- // Drag start event handler for nodes
- $('div.node').bind("dragstart", function handleDragStart( event, ui ){
-   
-   var sourceNode = $(this);
-   sourceNode.parentsUntil('.node-container')
-  .find('*')
-  .filter('.node')
-  .droppable('disable');
- });
-
- // Drag stop event handler for nodes
- $('div.node').bind("dragstop", function handleDragStop( event, ui ){
-
-   /* reload the plugin */
-   $(opts.chartElement).children().remove();
-   $this.jOrgChart(opts);  
- });
-   
- // Drop event handler for nodes
- $('div.node').bind("drop", function handleDropEvent( event, ui ) {
-   var sourceNode = ui.draggable;
-   var targetNode = $(this);
-   
-   // finding nodes based on plaintext and html
-   // content is hard!
-   var targetLi = $('li').filter(function(){
-   
-   li = $(this).clone()
-   .children("ul,li")
-   .remove()
-   .end();
-   
-   return li.html() == targetNode.html();
-   }); 
-   
-   var sourceLi = $('li').filter(function(){
-   
-   li = $(this).clone()
-   .children("ul,li")
-   .remove()
-   .end();
-   
-   return li.html() == sourceNode.html();
-   });
-   
-   var sourceliClone = sourceLi.clone();
-   var sourceUl = sourceLi.parent('ul');
-   
-   if(sourceUl.children('li').size() > 1){
-   sourceLi.remove();  
-   }else{
-   sourceUl.remove();
-   }
-   
-   if(targetLi.children('ul').size() >0){
-   
targetLi.chil

[MediaWiki-commits] [Gerrit] Update jquery.bt.min.js to 0.9.7 - change (operations/mediawiki-config)

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

Change subject: Update jquery.bt.min.js to 0.9.7
..


Update jquery.bt.min.js to 0.9.7

Change-Id: I02ffe3067179aabd11bab38becd9c21a1486a968
---
M docroot/noc/dbtree/js/jquery.bt.min.js
1 file changed, 1 insertion(+), 8 deletions(-)

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



diff --git a/docroot/noc/dbtree/js/jquery.bt.min.js 
b/docroot/noc/dbtree/js/jquery.bt.min.js
index 0bc85dc..79ec7dd 100644
--- a/docroot/noc/dbtree/js/jquery.bt.min.js
+++ b/docroot/noc/dbtree/js/jquery.bt.min.js
@@ -1,8 +1 @@
-/*
- * @name BeautyTips
- * @desc a tooltips/baloon-help plugin for jQuery
- *
- * @author Jeff Robbins - Lullabot - http://www.lullabot.com
- * @version 0.9.5-rc1  (5/20/2009)
- */
-jQuery.bt={version:"0.9.5-rc1"};(function($){jQuery.fn.bt=function(content,options){if(typeof
 content!="string"){var 
contentSelect=true;options=content;content=false;}else{var 
contentSelect=false;}if(jQuery.fn.hoverIntent&&jQuery.bt.defaults.trigger=="hover"){jQuery.bt.defaults.trigger="hoverIntent";}return
 this.each(function(index){var 
opts=jQuery.extend(false,jQuery.bt.defaults,jQuery.bt.options,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var
 
ajaxTimeout=false;if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){if(!$(this).attr("bt-xTitle")){$(this).attr("bt-xTitle",$(this).attr("title")).attr("title","");}});}if(typeof
 
opts.trigger=="string"){opts.trigger=[opts.trigger];}if(opts.trigger[0]=="hoverIntent"){var
 
hoverOpts=jQuery.extend(opts.hoverIntentOpts,{over:function(){this.btOn();},out:function(){this.btOff();}});$(this).hoverIntent(hoverOpts);}else{if(opts.trigger[0]=="hover"){$(this).hover(function(){this.btOn();},function(){this.btOff();});}else{if(opts.trigger[0]=="now"){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}}else{if(opts.trigger[0]=="none"){}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn();}).bind(opts.trigger[1],function(){this.btOff();});}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}});}this.btOn=function(){if(typeof
 
$(this).data("bt-box")=="object"){this.btOff();}opts.preBuild.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active
 
"+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=$.isFunction(opts.contentSelector)?opts.contentSelector.apply(this):eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","");}}if(opts.ajaxPath!=null&&content==false){if(typeof
 opts.ajaxPath=="object"){var 
url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" 
"+opts.ajaxPath[1]:"";}else{var url=opts.ajaxPath;}var off=url.indexOf(" 
");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var 
cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof
 
cacheData=="string"){content=selector?$("").append(cacheData.replace(//g,"")).find(selector):cacheData;}else{var
 target=this;var 
ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText);}ajaxTimeout=false;content=selector?$("").append(XMLHttpRequest.responseText.replace(//g,"")).find(selector):XMLHttpRequest.responseText;}else{if(textStatus=="timeout"){ajaxTimeout=true;}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText);}if($(target).hasClass("bt-active")){target.btOn();}}},opts.ajaxOpts);jQuery.ajax(ajaxOpts);content=opts.ajaxLoading;}}var
 shadowMarginX=0;var shadowMarginY=0;var shadowShiftX=0;var 
shadowShiftY=0;if(opts.shadow&&!shadowSupport()){opts.shadow=false;jQuery.extend(opts,opts.noShadowOpts);}if(opts.shadow){if(opts.shadowBlur>Math.abs(opts.shadowOffsetX)){shadowMarginX=opts.shadowBlur*2;}else{shadowMarginX=opts.shadowBlur+Math.abs(opts.shadowOffsetX);}shadowShiftX=(opts.shadowBlur-opts.shadowOffsetX)>0?opts.shadowBlur-opts.shadowOffsetX:0;if(opts.shadowBlur>Math.abs(opts.shadowOffsetY)){shadowMarginY=opts.shadowBlur*2;}else{shadowMarginY=opts.shadowBlur+Math.abs(opts.shadowOffsetY);}shadowShiftY=(opts.shadowBlur-opts.shadowOffsetY)>0?opts.shadowBlur-opts.shadowOffsetY:0;}if(opts.offsetParent){var
 offsetParent=$(opts.offsetParent);var 
offsetParentPos=offsetParent.offset();var pos=$(this).offset();var 
top=numb(pos.top)-numb(offsetParentPos.top)+numb($(this).css("margin-top"))-shadowShiftY;var
 
left=numb(pos.left)-numb(offsetParentPos.left)+numb($(this).css("margin-left"))-shadowShiftX;}else{var
 
offsetParent=($(this).css(

[MediaWiki-commits] [Gerrit] Minify jquery.jOrgChart - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Minify jquery.jOrgChart
..

Minify jquery.jOrgChart

Change-Id: I7f476b8b8bf2b05b6d1340a586ecbbcb7dac3ceb
---
M docroot/noc/dbtree/index.php
D docroot/noc/dbtree/js/jquery.jOrgChart.js
A docroot/noc/dbtree/js/jquery.jOrgChart.min.js
3 files changed, 2 insertions(+), 232 deletions(-)


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

diff --git a/docroot/noc/dbtree/index.php b/docroot/noc/dbtree/index.php
index f6aee40..7bcf3ca 100644
--- a/docroot/noc/dbtree/index.php
+++ b/docroot/noc/dbtree/index.php
@@ -194,7 +194,7 @@



-   
+   

 
 
diff --git a/docroot/noc/dbtree/js/jquery.jOrgChart.js 
b/docroot/noc/dbtree/js/jquery.jOrgChart.js
deleted file mode 100644
index 9dfc056..000
--- a/docroot/noc/dbtree/js/jquery.jOrgChart.js
+++ /dev/null
@@ -1,231 +0,0 @@
-/**
- * jQuery org-chart/tree plugin.
- *
- * Author: Wes Nolte
- * http://twitter.com/wesnolte
- *
- * Based on the work of Mark Lee
- * http://www.capricasoftware.co.uk 
- *
- * This software is licensed under the Creative Commons Attribution-ShareAlike
- * 3.0 License.
- *
- * See here for license terms:
- * http://creativecommons.org/licenses/by-sa/3.0
- */
-(function($) {
-
-  $.fn.jOrgChart = function(options) {
-var opts = $.extend({}, $.fn.jOrgChart.defaults, options);
-var $appendTo = $(opts.chartElement);
-
-   // build the tree
-$this = $(this);
-var $container = $("");
-if($this.is("ul")) {
-  buildNode($this.find("li:first"), $container, 0, opts);
-}
-else if($this.is("li")) {
-  buildNode($this, $container, 0, opts);
-}
-$appendTo.append($container);
-
-   // add drag and drop if enabled
-   if(opts.dragAndDrop){
-   $('div.node').draggable({
-   cursor  : 'move',
-   distance: 40,
-   helper  : 'clone',
-   opacity : 0.8,
-   revert  : true,
-   revertDuration : 100,
-   snap: 'div.node.expanded',
-   snapMode: 'inner',
-   stack   : 'div.node'
-   });
-   
-   $('div.node').droppable({
-   accept  : '.node',  
-   activeClass : 'drag-active',
-   hoverClass  : 'drop-hover'
-   });
-   
- // Drag start event handler for nodes
- $('div.node').bind("dragstart", function handleDragStart( event, ui ){
-   
-   var sourceNode = $(this);
-   sourceNode.parentsUntil('.node-container')
-  .find('*')
-  .filter('.node')
-  .droppable('disable');
- });
-
- // Drag stop event handler for nodes
- $('div.node').bind("dragstop", function handleDragStop( event, ui ){
-
-   /* reload the plugin */
-   $(opts.chartElement).children().remove();
-   $this.jOrgChart(opts);  
- });
-   
- // Drop event handler for nodes
- $('div.node').bind("drop", function handleDropEvent( event, ui ) {
-   var sourceNode = ui.draggable;
-   var targetNode = $(this);
-   
-   // finding nodes based on plaintext and html
-   // content is hard!
-   var targetLi = $('li').filter(function(){
-   
-   li = $(this).clone()
-   .children("ul,li")
-   .remove()
-   .end();
-   
-   return li.html() == targetNode.html();
-   }); 
-   
-   var sourceLi = $('li').filter(function(){
-   
-   li = $(this).clone()
-   .children("ul,li")
-   .remove()
-   .end();
-   
-   return li.html() == sourceNode.html();
-   });
-   
-   var sourceliClone = sourceLi.clone();
-   var sourceUl = sourceLi.parent('ul');
-   
-   if(sourceUl.children('li').size() > 1){
-   sourceLi.remove();  
-   }else{
-   sourceUl.remove();
-   }
-   
-   if(targetLi.children('ul

[MediaWiki-commits] [Gerrit] Update jquery.bt.min.js to 0.9.7 - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Update jquery.bt.min.js to 0.9.7
..

Update jquery.bt.min.js to 0.9.7

Change-Id: I02ffe3067179aabd11bab38becd9c21a1486a968
---
M docroot/noc/dbtree/js/jquery.bt.min.js
1 file changed, 1 insertion(+), 8 deletions(-)


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

diff --git a/docroot/noc/dbtree/js/jquery.bt.min.js 
b/docroot/noc/dbtree/js/jquery.bt.min.js
index 0bc85dc..79ec7dd 100644
--- a/docroot/noc/dbtree/js/jquery.bt.min.js
+++ b/docroot/noc/dbtree/js/jquery.bt.min.js
@@ -1,8 +1 @@
-/*
- * @name BeautyTips
- * @desc a tooltips/baloon-help plugin for jQuery
- *
- * @author Jeff Robbins - Lullabot - http://www.lullabot.com
- * @version 0.9.5-rc1  (5/20/2009)
- */
-jQuery.bt={version:"0.9.5-rc1"};(function($){jQuery.fn.bt=function(content,options){if(typeof
 content!="string"){var 
contentSelect=true;options=content;content=false;}else{var 
contentSelect=false;}if(jQuery.fn.hoverIntent&&jQuery.bt.defaults.trigger=="hover"){jQuery.bt.defaults.trigger="hoverIntent";}return
 this.each(function(index){var 
opts=jQuery.extend(false,jQuery.bt.defaults,jQuery.bt.options,options);opts.spikeLength=numb(opts.spikeLength);opts.spikeGirth=numb(opts.spikeGirth);opts.overlap=numb(opts.overlap);var
 
ajaxTimeout=false;if(opts.killTitle){$(this).find("[title]").andSelf().each(function(){if(!$(this).attr("bt-xTitle")){$(this).attr("bt-xTitle",$(this).attr("title")).attr("title","");}});}if(typeof
 
opts.trigger=="string"){opts.trigger=[opts.trigger];}if(opts.trigger[0]=="hoverIntent"){var
 
hoverOpts=jQuery.extend(opts.hoverIntentOpts,{over:function(){this.btOn();},out:function(){this.btOff();}});$(this).hoverIntent(hoverOpts);}else{if(opts.trigger[0]=="hover"){$(this).hover(function(){this.btOn();},function(){this.btOff();});}else{if(opts.trigger[0]=="now"){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}}else{if(opts.trigger[0]=="none"){}else{if(opts.trigger.length>1&&opts.trigger[0]!=opts.trigger[1]){$(this).bind(opts.trigger[0],function(){this.btOn();}).bind(opts.trigger[1],function(){this.btOff();});}else{$(this).bind(opts.trigger[0],function(){if($(this).hasClass("bt-active")){this.btOff();}else{this.btOn();}});}this.btOn=function(){if(typeof
 
$(this).data("bt-box")=="object"){this.btOff();}opts.preBuild.apply(this);$(jQuery.bt.vars.closeWhenOpenStack).btOff();$(this).addClass("bt-active
 
"+opts.activeClass);if(contentSelect&&opts.ajaxPath==null){if(opts.killTitle){$(this).attr("title",$(this).attr("bt-xTitle"));}content=$.isFunction(opts.contentSelector)?opts.contentSelector.apply(this):eval(opts.contentSelector);if(opts.killTitle){$(this).attr("title","");}}if(opts.ajaxPath!=null&&content==false){if(typeof
 opts.ajaxPath=="object"){var 
url=eval(opts.ajaxPath[0]);url+=opts.ajaxPath[1]?" 
"+opts.ajaxPath[1]:"";}else{var url=opts.ajaxPath;}var off=url.indexOf(" 
");if(off>=0){var selector=url.slice(off,url.length);url=url.slice(0,off);}var 
cacheData=opts.ajaxCache?$(document.body).data("btCache-"+url.replace(/\./g,"")):null;if(typeof
 
cacheData=="string"){content=selector?$("").append(cacheData.replace(//g,"")).find(selector):cacheData;}else{var
 target=this;var 
ajaxOpts=jQuery.extend(false,{type:opts.ajaxType,data:opts.ajaxData,cache:opts.ajaxCache,url:url,complete:function(XMLHttpRequest,textStatus){if(textStatus=="success"||textStatus=="notmodified"){if(opts.ajaxCache){$(document.body).data("btCache-"+url.replace(/\./g,""),XMLHttpRequest.responseText);}ajaxTimeout=false;content=selector?$("").append(XMLHttpRequest.responseText.replace(//g,"")).find(selector):XMLHttpRequest.responseText;}else{if(textStatus=="timeout"){ajaxTimeout=true;}content=opts.ajaxError.replace(/%error/g,XMLHttpRequest.statusText);}if($(target).hasClass("bt-active")){target.btOn();}}},opts.ajaxOpts);jQuery.ajax(ajaxOpts);content=opts.ajaxLoading;}}var
 shadowMarginX=0;var shadowMarginY=0;var shadowShiftX=0;var 
shadowShiftY=0;if(opts.shadow&&!shadowSupport()){opts.shadow=false;jQuery.extend(opts,opts.noShadowOpts);}if(opts.shadow){if(opts.shadowBlur>Math.abs(opts.shadowOffsetX)){shadowMarginX=opts.shadowBlur*2;}else{shadowMarginX=opts.shadowBlur+Math.abs(opts.shadowOffsetX);}shadowShiftX=(opts.shadowBlur-opts.shadowOffsetX)>0?opts.shadowBlur-opts.shadowOffsetX:0;if(opts.shadowBlur>Math.abs(opts.shadowOffsetY)){shadowMarginY=opts.shadowBlur*2;}else{shadowMarginY=opts.shadowBlur+Math.abs(opts.shadowOffsetY);}shadowShiftY=(opts.shadowBlur-opts.shadowOffsetY)>0?opts.shadowBlur-opts.shadowOffsetY:0;}if(opts.offsetParent){var
 offsetParent=$(opts.offsetParent);var 
offsetParentPos=offsetParent.offset();var pos=$(this).offset();var 
top=numb(pos.top)-numb(offsetParentPos.top)+numb($(this).css("margin-top"))-shadowShiftY;var
 
left=numb(pos.left)-numb(offsetParentPos.left)+numb($(this).css("margin-left")

[MediaWiki-commits] [Gerrit] Increase QUnit.config.testTimeout to 30s - change (mediawiki/core)

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

Change subject: Increase QUnit.config.testTimeout to 30s
..


Increase QUnit.config.testTimeout to 30s

The default value of 10s is ocasionally failing when loading resources
via RL.  Increase to 30s as suggested in the qunit documentation.

http://api.qunitjs.com/QUnit.config/#config-testTimeout

Change-Id: I288db068c8dd1041e0a9be959b3b0c6ddcc7606e
---
M tests/qunit/data/testrunner.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index 2eda8f1..96a88f0 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -26,9 +26,9 @@
 */
 
// When a test() indicates asynchronicity with stop(),
-   // allow 10 seconds to pass before killing the test(),
+   // allow 30 seconds to pass before killing the test(),
// and assuming failure.
-   QUnit.config.testTimeout = 10 * 1000;
+   QUnit.config.testTimeout = 30 * 1000;
 
// Add a checkbox to QUnit header to toggle MediaWiki ResourceLoader 
debug mode.
QUnit.config.urlConfig.push( {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I288db068c8dd1041e0a9be959b3b0c6ddcc7606e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 
Gerrit-Reviewer: EBernhardson 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Document hasOwn optimisation - change (oojs/core)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: Document hasOwn optimisation
..

Document hasOwn optimisation

Change-Id: I3bc4310a4e85320cdb97d9a965584789c37b55c4
---
M src/core.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/core refs/changes/21/173521/1

diff --git a/src/core.js b/src/core.js
index 1d3c9e4..81474fc 100644
--- a/src/core.js
+++ b/src/core.js
@@ -6,6 +6,7 @@
 * @singleton
 */
oo = {},
+   // Optimisation: Local reference to Object.prototype.hasOwnProperty
hasOwn = oo.hasOwnProperty,
toString = oo.toString;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3bc4310a4e85320cdb97d9a965584789c37b55c4
Gerrit-PatchSet: 1
Gerrit-Project: oojs/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] mwconf: Clean up wgHTTPProxy config - change (integration/jenkins)

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

Change subject: mwconf: Clean up wgHTTPProxy config
..


mwconf: Clean up wgHTTPProxy config

* Re-use $site instead of repeating path.
* Consistent coding style.

Change-Id: I0c9ba245b76b33516b1bc892cb6c057125c6bd6c
---
M mediawiki/conf.d/10_set_wgHTTPProxy.php
1 file changed, 11 insertions(+), 8 deletions(-)

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



diff --git a/mediawiki/conf.d/10_set_wgHTTPProxy.php 
b/mediawiki/conf.d/10_set_wgHTTPProxy.php
index 69b11ec..29ccd40 100644
--- a/mediawiki/conf.d/10_set_wgHTTPProxy.php
+++ b/mediawiki/conf.d/10_set_wgHTTPProxy.php
@@ -10,16 +10,19 @@
  * - https://bugzilla.wikimedia.org/59253
  * - https://wikitech.wikimedia.org/wiki/Http_proxy
  */
-$wgHTTPProxy = call_user_func( function() {
-   $proxy = 'webproxy.eqiad.wmnet:8080';
+$wgHTTPProxy = call_user_func( function () {
$site_file = '/etc/wikimedia-site';
-   if ( file_exists( $site_file ) ) {
-   $site = rtrim(file_get_contents('/etc/wikimedia-site'));
-   switch( $site ) {
-   case 'pmtpa':
-   $proxy = 'webproxy.pmtpa.wmnet:8080';
+   $site = file_exists( $site_file )
+   ? rtrim( file_get_contents( $site_file ) )
+   : 'eqiad';
+
+   switch ( $site ) {
+   case 'pmtpa':
+   $proxy = 'webproxy.pmtpa.wmnet:8080';
break;
-   }
+   case 'eqiad':
+   default:
+   $proxy = 'webproxy.eqiad.wmnet:8080';
}
 
return $proxy;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c9ba245b76b33516b1bc892cb6c057125c6bd6c
Gerrit-PatchSet: 4
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Krinkle 
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 global AbuseFilter on wikidatawiki - change (operations/mediawiki-config)

2014-11-15 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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

Change subject: Enable global AbuseFilter on wikidatawiki
..

Enable global AbuseFilter on wikidatawiki

In order to help fighting the spam hitting the talk pages
there.

Change-Id: I773dd28016bcfa65c5ff742efdc3e754cba8b031
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4fc8274..53a72c4 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13958,6 +13958,7 @@
'mediawikiwiki' => true,
'specieswiki' => true,
'incubatorwiki' => true,
+   'wikidatawiki' => true,
 ),
 
 'wmgUseCampaigns' => array(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I773dd28016bcfa65c5ff742efdc3e754cba8b031
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] mwconf: Remove references to pmtpa - change (integration/jenkins)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: mwconf: Remove references to pmtpa
..

mwconf: Remove references to pmtpa

Change-Id: If436da70cd5d00b282dc75c4a31fa5996131941e
---
M mediawiki/conf.d/10_set_wgHTTPProxy.php
1 file changed, 0 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/jenkins 
refs/changes/18/173518/1

diff --git a/mediawiki/conf.d/10_set_wgHTTPProxy.php 
b/mediawiki/conf.d/10_set_wgHTTPProxy.php
index 97ffb69..4ab4073 100644
--- a/mediawiki/conf.d/10_set_wgHTTPProxy.php
+++ b/mediawiki/conf.d/10_set_wgHTTPProxy.php
@@ -17,9 +17,6 @@
: 'eqiad';
 
switch ( $site ) {
-   case 'pmtpa':
-   $proxy = 'webproxy.pmtpa.wmnet:8080';
-   break;
case 'eqiad':
default:
$proxy = 'webproxy.eqiad.wmnet:8080';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If436da70cd5d00b282dc75c4a31fa5996131941e
Gerrit-PatchSet: 1
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Refactor ComponentFactory.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Refactor ComponentFactory.php
..


Refactor ComponentFactory.php

Change-Id: I0dfc0af1a4560017d8025d360c12cce49adea2be
---
M src/ComponentFactory.php
1 file changed, 95 insertions(+), 78 deletions(-)

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



diff --git a/src/ComponentFactory.php b/src/ComponentFactory.php
index e07aed7..946904c 100644
--- a/src/ComponentFactory.php
+++ b/src/ComponentFactory.php
@@ -21,7 +21,7 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon;
@@ -34,8 +34,8 @@
 /**
  * Class ComponentFactory
  *
- * @author Stephan Gambke
- * @since 1.0
+ * @author  Stephan Gambke
+ * @since   1.0
  * @ingroup Skins
  */
 class ComponentFactory {
@@ -84,6 +84,28 @@
}
 
/**
+* @return string
+*/
+   protected function getLayoutFile() {
+
+   return $this->layoutFile;
+   }
+
+   /**
+* @param string $fileName
+*/
+   public function setLayoutFile( $fileName ) {
+
+   $fileName = $this->sanitizeFileName( $fileName );
+
+   if ( !is_readable( $fileName ) ) {
+   throw new RuntimeException( "Expected an accessible 
{$fileName} layout file" );
+   }
+
+   $this->layoutFile = $fileName;
+   }
+
+   /**
 * @param \DOMElement $description
 * @param int $indent
 * @param string  $htmlClassAttribute
@@ -105,6 +127,75 @@
}
 
return $component;
+   }
+
+   /**
+* @param \DOMElement $description
+*
+* @return string
+* @throws \MWException
+* @since 1.1
+*/
+   protected function getComponentClassName( \DOMElement $description ) {
+
+   $className = $this->mapComponentDescriptionToClassName( 
$description );
+
+   if ( !class_exists( $className ) || !is_subclass_of( 
$className, 'Skins\\Chameleon\\Components\\Component' ) ) {
+   throw new \MWException( sprintf( '%s (line %d): Invalid 
component type: %s.', $this->getLayoutFile(), $description->getLineNo(), 
$description->getAttribute( 'type' ) ) );
+   }
+
+   return $className;
+   }
+
+   /**
+* @param \DOMElement $description
+*
+* @return string
+* @throws \MWException
+*/
+   protected function mapComponentDescriptionToClassName( \DOMElement 
$description ) {
+
+   $mapOfComponentsToClassNames = array(
+   'structure'=> 'Structure',
+   'grid' => 'Grid',
+   'row'  => 'Row',
+   'cell' => 'Cell',
+   'modification' => 'Silent',
+   );
+
+   $nodeName = strtolower( $description->nodeName );
+
+   if ( array_key_exists( $nodeName, $mapOfComponentsToClassNames 
) ) {
+
+   $className = $mapOfComponentsToClassNames[ $nodeName ];
+
+   } elseif ( $nodeName === 'component' ) {
+
+   if ( $description->hasAttribute( 'type' ) ) {
+   $className = $description->getAttribute( 'type' 
);
+   } else {
+   $className = 'Container';
+   }
+
+   } else {
+   throw new \MWException( sprintf( '%s (line %d): XML 
element not allowed here: %s.', $this->getLayoutFile(), 
$description->getLineNo(), $description->nodeName ) );
+   }
+
+   return 'Skins\\Chameleon\\Components\\' . $className;
+   }
+
+   /**
+* @return mixed
+*/
+   public function getSkinTemplate() {
+   return $this->skinTemplate;
+   }
+
+   /**
+* @param ChameleonTemplate $skinTemplate
+*/
+   public function setSkinTemplate( ChameleonTemplate $skinTemplate ) {
+   $this->skinTemplate = $skinTemplate;
}
 
/**
@@ -131,86 +222,12 @@
}
 
/**
-* @return string
-*/
-   protected function getLayoutFile() {
-
-   return $this->layoutFile;
-   }
-
-   /**
 * @param string $fileName
-*/
-   public function setLayoutFile( $fileName ) {
-
-   $fileName = $this->sanitizeFileName( $fileName );
-
-   if ( !is_readable( $fileName ) ) {
-   throw new RuntimeException( "Expected an accessible 
{$fileName} layout file" );
-   }
-
-   $this->layoutFile = $fileName;
-   }
-
-   /**
-* @param string $fileName
+*
 * @return string
 

[MediaWiki-commits] [Gerrit] Refactor ComponentFactory.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Refactor ComponentFactory.php
..

Refactor ComponentFactory.php

Change-Id: I0dfc0af1a4560017d8025d360c12cce49adea2be
---
M src/ComponentFactory.php
1 file changed, 95 insertions(+), 78 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/17/173517/1

diff --git a/src/ComponentFactory.php b/src/ComponentFactory.php
index e07aed7..946904c 100644
--- a/src/ComponentFactory.php
+++ b/src/ComponentFactory.php
@@ -21,7 +21,7 @@
  * with this program. If not, see .
  *
  * @file
- * @ingroup Skins
+ * @ingroup   Skins
  */
 
 namespace Skins\Chameleon;
@@ -34,8 +34,8 @@
 /**
  * Class ComponentFactory
  *
- * @author Stephan Gambke
- * @since 1.0
+ * @author  Stephan Gambke
+ * @since   1.0
  * @ingroup Skins
  */
 class ComponentFactory {
@@ -84,6 +84,28 @@
}
 
/**
+* @return string
+*/
+   protected function getLayoutFile() {
+
+   return $this->layoutFile;
+   }
+
+   /**
+* @param string $fileName
+*/
+   public function setLayoutFile( $fileName ) {
+
+   $fileName = $this->sanitizeFileName( $fileName );
+
+   if ( !is_readable( $fileName ) ) {
+   throw new RuntimeException( "Expected an accessible 
{$fileName} layout file" );
+   }
+
+   $this->layoutFile = $fileName;
+   }
+
+   /**
 * @param \DOMElement $description
 * @param int $indent
 * @param string  $htmlClassAttribute
@@ -105,6 +127,75 @@
}
 
return $component;
+   }
+
+   /**
+* @param \DOMElement $description
+*
+* @return string
+* @throws \MWException
+* @since 1.1
+*/
+   protected function getComponentClassName( \DOMElement $description ) {
+
+   $className = $this->mapComponentDescriptionToClassName( 
$description );
+
+   if ( !class_exists( $className ) || !is_subclass_of( 
$className, 'Skins\\Chameleon\\Components\\Component' ) ) {
+   throw new \MWException( sprintf( '%s (line %d): Invalid 
component type: %s.', $this->getLayoutFile(), $description->getLineNo(), 
$description->getAttribute( 'type' ) ) );
+   }
+
+   return $className;
+   }
+
+   /**
+* @param \DOMElement $description
+*
+* @return string
+* @throws \MWException
+*/
+   protected function mapComponentDescriptionToClassName( \DOMElement 
$description ) {
+
+   $mapOfComponentsToClassNames = array(
+   'structure'=> 'Structure',
+   'grid' => 'Grid',
+   'row'  => 'Row',
+   'cell' => 'Cell',
+   'modification' => 'Silent',
+   );
+
+   $nodeName = strtolower( $description->nodeName );
+
+   if ( array_key_exists( $nodeName, $mapOfComponentsToClassNames 
) ) {
+
+   $className = $mapOfComponentsToClassNames[ $nodeName ];
+
+   } elseif ( $nodeName === 'component' ) {
+
+   if ( $description->hasAttribute( 'type' ) ) {
+   $className = $description->getAttribute( 'type' 
);
+   } else {
+   $className = 'Container';
+   }
+
+   } else {
+   throw new \MWException( sprintf( '%s (line %d): XML 
element not allowed here: %s.', $this->getLayoutFile(), 
$description->getLineNo(), $description->nodeName ) );
+   }
+
+   return 'Skins\\Chameleon\\Components\\' . $className;
+   }
+
+   /**
+* @return mixed
+*/
+   public function getSkinTemplate() {
+   return $this->skinTemplate;
+   }
+
+   /**
+* @param ChameleonTemplate $skinTemplate
+*/
+   public function setSkinTemplate( ChameleonTemplate $skinTemplate ) {
+   $this->skinTemplate = $skinTemplate;
}
 
/**
@@ -131,86 +222,12 @@
}
 
/**
-* @return string
-*/
-   protected function getLayoutFile() {
-
-   return $this->layoutFile;
-   }
-
-   /**
 * @param string $fileName
-*/
-   public function setLayoutFile( $fileName ) {
-
-   $fileName = $this->sanitizeFileName( $fileName );
-
-   if ( !is_readable( $fileName ) ) {
-   throw new RuntimeException( "Expected an accessible 
{$fileName} layout file" );
-   }
-
-   $this->layoutFile = $fileName;
-   }
-
-   /**
-* @p

[MediaWiki-commits] [Gerrit] Reapply Bugzilla XML-RPC API workaround for a short while again - change (wikimedia...modifications)

2014-11-15 Thread Aklapper (Code Review)
Aklapper has uploaded a new change for review.

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

Change subject: Reapply Bugzilla XML-RPC API workaround for a short while again
..

Reapply Bugzilla XML-RPC API workaround for a short while again

Chase asked for this to test mass-fetching numerous Bugzilla tickets
as a preparation for the migration to Phabricator:
We'd like to make sure that there are no further issues we need to
tackle of (private comments and attachments, access restricted bug
reports, and non-existing ticket numbers are already handled).
We likely want to remove this again around Wednesday to do further
testing with fetching attachments, then reapply on Friday for
migrating bug reports, then remove for migrating attachments.
Hell yeah.

T815

Change-Id: Id999039c6d0c372235249859f781ae78c6b07e7a
---
M Bugzilla/WebService/Server/XMLRPC.pm
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/bugzilla/modifications 
refs/changes/16/173516/1

diff --git a/Bugzilla/WebService/Server/XMLRPC.pm 
b/Bugzilla/WebService/Server/XMLRPC.pm
index 03590bd..26bf74e 100644
--- a/Bugzilla/WebService/Server/XMLRPC.pm
+++ b/Bugzilla/WebService/Server/XMLRPC.pm
@@ -273,6 +273,11 @@
 }
 }
 }
+# BEGIN workaround for https://bugzilla.wikimedia.org/show_bug.cgi?id=69747
+if (ref $initial eq '') {
+$initial =~ s/([\x01-\x08\x0b\x0c\x0f-\x1f])/sprintf "\\x%02x", ord($1)/ge;
+}
+# END workaround for https://bugzilla.wikimedia.org/show_bug.cgi?id=69747
 return $initial;
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id999039c6d0c372235249859f781ae78c6b07e7a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/bugzilla/modifications
Gerrit-Branch: master
Gerrit-Owner: Aklapper 

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


[MediaWiki-commits] [Gerrit] Track image "unviews" - change (mediawiki...MultimediaViewer)

2014-11-15 Thread Gilles (Code Review)
Gilles has uploaded a new change for review.

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

Change subject: Track image "unviews"
..

Track image "unviews"

Change-Id: I4441b6df511f99b73bfafea0d804171435e129d2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/998
---
M MultimediaViewer.php
M resources/mmv/logging/mmv.logging.ActionLogger.js
M resources/mmv/mmv.js
M tests/qunit/mmv/logging/mmv.logging.ActionLogger.test.js
4 files changed, 48 insertions(+), 24 deletions(-)


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

diff --git a/MultimediaViewer.php b/MultimediaViewer.php
index ef9724e..a9abc28 100644
--- a/MultimediaViewer.php
+++ b/MultimediaViewer.php
@@ -1022,7 +1022,7 @@
 
 $wgHooks['EventLoggingRegisterSchemas'][] = function( array &$schemas ) {
$schemas += array(
-   'MediaViewer' => 10308479,
+   'MediaViewer' => 10536413,
'MultimediaViewerNetworkPerformance' => 7917896,
'MultimediaViewerDuration' => 8572641,
'MultimediaViewerAttribution' => 9758179,
diff --git a/resources/mmv/logging/mmv.logging.ActionLogger.js 
b/resources/mmv/logging/mmv.logging.ActionLogger.js
index c394570..1a7d937 100644
--- a/resources/mmv/logging/mmv.logging.ActionLogger.js
+++ b/resources/mmv/logging/mmv.logging.ActionLogger.js
@@ -113,37 +113,33 @@
'options-open': 'User opened the enable/disable dialog.',
'options-close': 'User either canceled an enable/disable action 
or closed a confirmation window.',
'disable-about-link': 'User clicked on the "Learn more" link in 
the disable window.',
-   'enable-about-link': 'User clicked on the "Learn more" link in 
the enable window.'
+   'enable-about-link': 'User clicked on the "Learn more" link in 
the enable window.',
+   'image-unview': 'User stopped looking at the current image.'
};
 
/**
 * Logs an action
 * @param {string} action The key representing the action
-* @param {boolean} skipEventLog True if we don't want the action to be 
recorded in the event log
-* @param {Object} substitutions A list of variable subtitutions for 
parametrized action texts
+* @param {boolean} forceEventLog True if we want the action to be 
logged regardless of the sampling factor
 * @returns {jQuery.Promise}
 */
-   L.log = function ( action, skipEventLog, substitutions ) {
-   var translatedAction = this.logActions[action] || action,
+   L.log = function ( action, forceEventLog ) {
+   var actionText = this.logActions[action] || action,
self = this;
 
-   if ( $.isPlainObject( substitutions ) ) {
-   $.each( substitutions, function( key, value ) {
-   translatedAction = translatedAction.replace( 
key, value );
-   } );
-   }
+   mw.log( actionText );
 
-   mw.log( translatedAction );
-
-   if ( !skipEventLog && self.isInSample( action ) ) {
+   if ( forceEventLog || self.isInSample( action ) ) {
return this.loadDependencies().then( function () {
self.eventLog.logEvent( self.schema, {
action : action,
samplingFactor : self.getActionFactor( 
action )
} );
+
+   return true;
} );
} else {
-   return $.Deferred().resolve();
+   return $.Deferred().resolve( false );
}
};
 
diff --git a/resources/mmv/mmv.js b/resources/mmv/mmv.js
index 46d440c..6e7aba8 100644
--- a/resources/mmv/mmv.js
+++ b/resources/mmv/mmv.js
@@ -104,6 +104,12 @@
 
/** @property {string} documentTitle base document title, 
MediaViewer will expand this */
this.documentTitle = document.title;
+
+   /**
+* Was the last image view logged or was logging skipped?
+* @property {boolean}
+*/
+   this.wasLastViewLogged = false;
}
 
MMVP = MultimediaViewer.prototype;
@@ -385,6 +391,8 @@
 * @param {number} loadTime Time it took to load the thumbnail
 */
MMVP.displayRealThumbnail = function ( thumbnail, imageElement, 
imageWidths, loadTime ) {
+   var viewer = this;
+
this.realThumbnailShown = true;
 
this.setImage( this.ui, thumbnail, imageElement, imageWidths );
@@ -397,7 +405,16 @@
this.ui.canvas.unblur();
}
 
-   mw.mmv.actionLogger

[MediaWiki-commits] [Gerrit] Refactor PageTools.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: Refactor PageTools.php
..


Refactor PageTools.php

Change-Id: I874d3a25b900c876b8219582570c5f00765e3e4d
---
M src/Components/PageTools.php
1 file changed, 119 insertions(+), 72 deletions(-)

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



diff --git a/src/Components/PageTools.php b/src/Components/PageTools.php
index 59ce785..40c9708 100644
--- a/src/Components/PageTools.php
+++ b/src/Components/PageTools.php
@@ -33,18 +33,24 @@
 /**
  * The PageTools class.
  *
- * A unordered list containing content navigation links (Page, Discussion, 
Edit, History, Move, ...)
+ * A unordered list containing content navigation links (Page, Discussion,
+ * Edit, History, Move, ...)
  *
  * The tab list is a list of lists: '
  *
- * @author Stephan Gambke
- * @since 1.0
+ * @author  Stephan Gambke
+ * @since   1.0
  * @ingroup Skins
  */
 class PageTools extends Component {
 
private $mFlat = false;
 
+   /**
+* @param ChameleonTemplate $template
+* @param \DOMElement|null  $domElement
+* @param int   $indent
+*/
public function __construct( ChameleonTemplate $template, \DOMElement 
$domElement = null, $indent = 0 ) {
 
parent::__construct( $template, $domElement, $indent );
@@ -57,91 +63,46 @@
/**
 * Builds the HTML code for this component
 *
-* @return String the HTML code
+* @return string the HTML code
 */
public function getHtml() {
 
-   $navigation = $this->getSkinTemplate()->data[ 
'content_navigation' ];
+   $contentNavigation = $this->getSkinTemplate()->data[ 
'content_navigation' ];
 
-   $hideSelectedNameSpace = false;
-   if ( $this->getDomElement() !== null ) {
-   $hideSelectedNameSpace = filter_var( 
$this->getDomElement()->getAttribute( 'hideSelectedNameSpace' ), 
FILTER_VALIDATE_BOOLEAN );
-   }
-
-   if ( $hideSelectedNameSpace ) {
-   $namespacekey = $this->getNamespaceKey();
-   unset( $navigation['namespaces'][ $namespacekey ] );
+   if ( $this->hideSelectedNamespace() ) {
+   unset( $contentNavigation[ 'namespaces' ][ 
$this->getNamespaceKey() ] );
}
 
$ret = '';
 
$this->indent( 2 );
-   foreach ( $navigation as $category => $tabs ) {
-
-   // TODO: visually group all links of one category (e.g. 
some space between categories)
-
-   if ( empty( $tabs ) ) {
-   continue;
-   }
-
-   $ret .= $this->indent() . '';
-
-   if ( !$this->mFlat ) {
-   // output the name of the current category 
(e.g. 'namespaces', 'views', ...)
-   $ret .= $this->indent() .
-   \Html::openElement( 'li', array( 'id' 
=> IdRegistry::getRegistry()->getId( 'p-' . $category ) ) ) .
-   $this->indent( 1 ) . '';
-
-   $this->indent( 1 );
-   }
-
-   foreach ( $tabs as $key => $tab ) {
-
-   // skip redundant links (i.e. the 'view' link)
-   // TODO: make this dependent on an option
-   if ( array_key_exists( 'redundant', $tab ) && 
$tab[ 'redundant' ] === true ) {
-   continue;
-   }
-
-   // apply a link class if specified, e.g. for 
the currently active namespace
-   $options = array();
-   if ( array_key_exists( 'class', $tab ) ) {
-   $options[ 'link-class' ] = $tab[ 
'class' ];
-   }
-
-   $ret .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $tab, $options );
-
-   }
-
-   if ( !$this->mFlat ) {
-   $ret .= $this->indent( -1 ) . '' .
-   $this->indent( -1 ) . '';
-   }
+   foreach ( $contentNavigation as $category => $tabsDescription ) 
{
+   $ret .= $this->buildTabGroup( $category, 
$tabsDescription );
}
$this->indent( -2 );
 
-   if ( $ret !== '' ){
-   $ret = $this->indent( 1 ) . '' .
-   $this->indent() .
-   \Html::openElement( 'ul',
-   array(
- 

[MediaWiki-commits] [Gerrit] Refactor PageTools.php - change (mediawiki...chameleon)

2014-11-15 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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

Change subject: Refactor PageTools.php
..

Refactor PageTools.php

Change-Id: I874d3a25b900c876b8219582570c5f00765e3e4d
---
M src/Components/PageTools.php
1 file changed, 96 insertions(+), 57 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/chameleon 
refs/changes/14/173514/1

diff --git a/src/Components/PageTools.php b/src/Components/PageTools.php
index 59ce785..18b79ee 100644
--- a/src/Components/PageTools.php
+++ b/src/Components/PageTools.php
@@ -63,73 +63,28 @@
 
$navigation = $this->getSkinTemplate()->data[ 
'content_navigation' ];
 
-   $hideSelectedNameSpace = false;
-   if ( $this->getDomElement() !== null ) {
-   $hideSelectedNameSpace = filter_var( 
$this->getDomElement()->getAttribute( 'hideSelectedNameSpace' ), 
FILTER_VALIDATE_BOOLEAN );
-   }
-
-   if ( $hideSelectedNameSpace ) {
-   $namespacekey = $this->getNamespaceKey();
-   unset( $navigation['namespaces'][ $namespacekey ] );
+   if ( $this->hideSelectedNamespace() ) {
+   unset( $navigation['namespaces'][ 
$this->getNamespaceKey() ] );
}
 
$ret = '';
 
$this->indent( 2 );
foreach ( $navigation as $category => $tabs ) {
-
-   // TODO: visually group all links of one category (e.g. 
some space between categories)
-
-   if ( empty( $tabs ) ) {
-   continue;
-   }
-
-   $ret .= $this->indent() . '';
-
-   if ( !$this->mFlat ) {
-   // output the name of the current category 
(e.g. 'namespaces', 'views', ...)
-   $ret .= $this->indent() .
-   \Html::openElement( 'li', array( 'id' 
=> IdRegistry::getRegistry()->getId( 'p-' . $category ) ) ) .
-   $this->indent( 1 ) . '';
-
-   $this->indent( 1 );
-   }
-
-   foreach ( $tabs as $key => $tab ) {
-
-   // skip redundant links (i.e. the 'view' link)
-   // TODO: make this dependent on an option
-   if ( array_key_exists( 'redundant', $tab ) && 
$tab[ 'redundant' ] === true ) {
-   continue;
-   }
-
-   // apply a link class if specified, e.g. for 
the currently active namespace
-   $options = array();
-   if ( array_key_exists( 'class', $tab ) ) {
-   $options[ 'link-class' ] = $tab[ 
'class' ];
-   }
-
-   $ret .= $this->indent() . 
$this->getSkinTemplate()->makeListItem( $key, $tab, $options );
-
-   }
-
-   if ( !$this->mFlat ) {
-   $ret .= $this->indent( -1 ) . '' .
-   $this->indent( -1 ) . '';
-   }
+   $ret .= $this->buildTabGroup( $category, $tabs );
}
$this->indent( -2 );
 
if ( $ret !== '' ){
-   $ret = $this->indent( 1 ) . '' .
-   $this->indent() .
-   \Html::openElement( 'ul',
-   array(
-   'class' => 'p-contentnavigation ' . 
$this->getClassString(),
-   'id' => 
IdRegistry::getRegistry()->getId( 'p-contentnavigation' ),
-   ) ) .
-   $ret .
-   $this->indent() . '';
+   $ret =
+   $this->indent( 1 ) . '' .
+   $this->indent() . \Html::openElement( 'ul',
+   array(
+   'class' => 'p-contentnavigation 
' . $this->getClassString(),
+   'id' => 
IdRegistry::getRegistry()->getId( 'p-contentnavigation' ),
+   ) ) .
+   $ret .
+   $this->indent() . '';
}
 
return $ret;
@@ -182,5 +137,89 @@
return $namespaceKey;
}
 
+   /**
+* @param $tab
+* @param $key
+* @return string
+*/
+   protected function buildTab( $tab, $key ) {
+
+   // skip redundant links 

[MediaWiki-commits] [Gerrit] Make the private modules of TMH pass jshint - change (mediawiki...TimedMediaHandler)

2014-11-15 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: Make the private modules of TMH pass jshint
..

Make the private modules of TMH pass jshint

Change-Id: I41cf1bf6a1a2406d2d4731492747bb9a6b8d9803
---
A .jshintignore
A .jshintrc
M resources/ext.tmh.transcodetable.js
M resources/mw.MediaWikiPlayerSupport.js
M resources/mw.PopUpThumbVideo.js
M resources/mw.TMHGalleryHook.js
6 files changed, 161 insertions(+), 115 deletions(-)


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

diff --git a/.jshintignore b/.jshintignore
new file mode 100644
index 000..a56a7ef
--- /dev/null
+++ b/.jshintignore
@@ -0,0 +1,2 @@
+node_modules
+
diff --git a/.jshintrc b/.jshintrc
new file mode 100644
index 000..ef9af3d
--- /dev/null
+++ b/.jshintrc
@@ -0,0 +1,39 @@
+{
+   /* Common */
+
+   // Enforcing
+   "camelcase": true,
+   "curly": true,
+   "eqeqeq": true,
+   "immed": true,
+   "latedef": true,
+   "newcap": true,
+   "noarg": true,
+   "noempty": true,
+   "nonew": true,
+   "quotmark": "single",
+   "trailing": true,
+   "undef": true,
+   "unused": true,
+   // Legacy
+   "onevar": true,
+
+   /* Local */
+
+   // Enforcing
+   "bitwise": true,
+   "es3": true,
+   // Relaxing
+   "laxbreak": true,
+   "smarttabs": true,
+   "multistr": true,
+   // Environment
+   "browser": true,
+   // Legacy
+   "nomen": true,
+
+   "predef": [
+   "mediaWiki",
+   "jQuery"
+   ]
+}
diff --git a/resources/ext.tmh.transcodetable.js 
b/resources/ext.tmh.transcodetable.js
index ed0e901..8539015 100644
--- a/resources/ext.tmh.transcodetable.js
+++ b/resources/ext.tmh.transcodetable.js
@@ -1,91 +1,95 @@
 /**
 * Javascript to support transcode table on image page
 */
-$( document ).ready( function () {
-   var errorPopup, $errorLink;
+( function ( mw, $ ) {
+   $( document ).ready( function () {
+   var errorPopup, $errorLink;
 
-   errorPopup = function () {
-   // pop up dialog
-   mw.addDialog( {
-   'width': '640',
-   'height': '480',
-   'title': $(this).attr( 'title' ),
-   'content': $('')
-   .css( {
-   'width':'99%',
-   'height':'99%'
-   } )
-   .text( $(this).attr('data-error') )
-   } )
-   .css( 'overflow', 'hidden' );
-   return false;
-   }
-
-   // Old version. Need to keep for a little while in case of cached pages.
-   $( '.mw-filepage-transcodestatus .errorlink' ).click( errorPopup );
-   // New version.
-   $errorLink = $( '.mw-filepage-transcodestatus 
.mw-tmh-pseudo-error-link' );
-   $errorLink.wrapInner( function () {
-   var $this = $( this );
-   return $( '' ).attr( {
-   href: '#',
-   title: $this.text(),
-   'data-error': $this.attr( 'data-error' )
-   } ).click( errorPopup );
-   } );
-
-   // Reset transcode action:
-   $( '.mw-filepage-transcodereset a' ).click( function () {
-   var tKey = $( this ).attr( 'data-transcodekey' );
-   var buttons = {};
-   buttons[ mw.msg( 'mwe-ok' ) ] = function () {
-   var _thisDialog = this;
-
-   // Only show cancel button while loading:
-   var cancelBtn = {};
-   cancelBtn[ mw.msg( 'mwe-cancel' ) ] = function () {
-   $(this).dialog( 'close' );
-   }
-   $( _thisDialog ).dialog( 'option', 'buttons', cancelBtn 
);
-
-   $( this ).loadingSpinner();
-
-   var apiUrl =  mw.config.get( 'wgServer' ) + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
-   // Do an api post action:
-   $.post( apiUrl, {
-   'action' : 'transcodereset',
-   'transcodekey' : tKey,
-   'title' : mw.config.get('wgPageName'),
-   'token' : mw.user.tokens.get('editToken'),
-   'format' : 'json'
-   }, function ( data ) {
-   if( data && data['success'] ){
-   // refresh the page
-   window.location.reload();
-   } else {
-   if( data.error && data.

[MediaWiki-commits] [Gerrit] Update "apihelp-upload-param-stash" - change (mediawiki/core)

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

Change subject: Update "apihelp-upload-param-stash"
..


Update "apihelp-upload-param-stash"

Per suggestion by Lokal Profil at
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Apihelp-upload-param-stash/sv

Change-Id: I377fb210ee191deab612a156268eca57c6746337
---
M includes/api/i18n/en.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/i18n/en.json b/includes/api/i18n/en.json
index 4fbfb40..17b79ff 100644
--- a/includes/api/i18n/en.json
+++ b/includes/api/i18n/en.json
@@ -994,7 +994,7 @@
"apihelp-upload-param-url": "URL to fetch the file from.",
"apihelp-upload-param-filekey": "Key that identifies a previous upload 
that was stashed temporarily.",
"apihelp-upload-param-sessionkey": "Same as $1filekey, maintained for 
backward compatibility.",
-   "apihelp-upload-param-stash": "If set, the server will not add the file 
to the repository and stash it temporarily.",
+   "apihelp-upload-param-stash": "If set, the server will stash the file 
temporarily instead of adding it to the repository.",
"apihelp-upload-param-filesize": "Filesize of entire upload.",
"apihelp-upload-param-offset": "Offset of chunk in bytes.",
"apihelp-upload-param-chunk": "Chunk contents.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I377fb210ee191deab612a156268eca57c6746337
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Umherirrender 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] contint: Move tmpfs Require to caller to support labs' jenki... - change (operations/puppet)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: contint: Move tmpfs Require to caller to support labs' 
jenkins-deploy
..

contint: Move tmpfs Require to caller to support labs' jenkins-deploy

The 'jenkins-deploy' user is in LDAP, so we can't reference that
username in puppet File sources (the user may not exist yet).
It doesn't have a User resource that can be required.

Change-Id: I4713ff77a7835ec5cd1dc000c85198732e40ed64
---
M manifests/role/ci.pp
M modules/contint/manifests/tmpfs.pp
2 files changed, 5 insertions(+), 6 deletions(-)


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

diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp
index 456bea6..e6f5d3e 100644
--- a/manifests/role/ci.pp
+++ b/manifests/role/ci.pp
@@ -169,6 +169,7 @@
 group   => 'jenkins-slave',
 mount_point => '/var/lib/jenkins-slave/tmpfs',
 size=> '512M',
+require => [ User['jenkins-slave'], Group['jenkins-slave'] ],
 }
 nrpe::monitor_service { 'ci_tmpfs':
 description  => 'CI tmpfs disk space',
diff --git a/modules/contint/manifests/tmpfs.pp 
b/modules/contint/manifests/tmpfs.pp
index 2a030f5..40b6d4d 100644
--- a/modules/contint/manifests/tmpfs.pp
+++ b/modules/contint/manifests/tmpfs.pp
@@ -1,5 +1,6 @@
-# Wikimedia uses a small tmpfs disk to help soften I/O on the contint server.
-# A typical use cases are the MediaWiki sqlite files
+# Use a small tmpfs disk to help soften I/O on the contint slaves.
+# A typical use case is speeding up interaction with MediaWiki
+# sqlite database files in Jenkins jobs.
 define contint::tmpfs(
   $user = 'jenkins',
   $group = 'jenkins',
@@ -7,13 +8,11 @@
   $size = '512M',
   ) {
 
-  # Setup tmpfs to write SQLite files to
   file { $mount_point:
 ensure  => directory,
 mode=> '0755',
 owner   => $user,
 group   => $group,
-require => [ User[$user], Group[$group] ],
   }
 
   mount { $mount_point:
@@ -21,8 +20,7 @@
 device  => 'tmpfs',
 fstype  => 'tmpfs',
 options => 
"noatime,defaults,size=${size},mode=755,uid=${user},gid=${group}",
-require => [ User[$user], Group[$group],
-  File[$mount_point] ],
+require => File[$mount_point],
   }
 
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4713ff77a7835ec5cd1dc000c85198732e40ed64
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] [WIP] contint: Add tmpfs mount in jenkins-deploy homedir for... - change (operations/puppet)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: [WIP] contint: Add tmpfs mount in jenkins-deploy homedir for 
labs slaves
..

[WIP] contint: Add tmpfs mount in jenkins-deploy homedir for labs slaves

Bug: 72063
Change-Id: I126ab53813842a008871a29d43b1ea55a64214bf
---
M manifests/role/ci.pp
1 file changed, 9 insertions(+), 15 deletions(-)


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

diff --git a/manifests/role/ci.pp b/manifests/role/ci.pp
index e6f5d3e..da1fd64 100644
--- a/manifests/role/ci.pp
+++ b/manifests/role/ci.pp
@@ -242,7 +242,7 @@
 require => $slash_mnt_require,
 }
 
-# Create a homedir for `jenkins-deploy` so it does not ends up being 
created
+# Create a homedir for `jenkins-deploy` so it does not end up being created
 # on /home which is using GlusterFS on the integration project.  The user 
is
 # only LDAP and is not created by puppet
 # bug 61144
@@ -320,20 +320,6 @@
 }
 
 include role::ci::slave::labs::common
-
-/**
-* FIXME breaks puppet because jenkins-deploy is not known
-* by puppet since it is provided via LDAP.
-*/
-/**
-contint::tmpfs { 'tmpfs for jenkins CI slave':
-user=> 'jenkins-deploy',
-group   => 'wikidev',
-# Jobs expect the tmpfs to be in $HOME/tmpfs
-mount_point => '/home/jenkins-deploy/tmpfs',
-size=> '128M',
-}
-**/
 
 # We are in labs context, so use /mnt (== /dev/vdb)
 # Never EVER think about using GlusterFS.
@@ -414,6 +400,14 @@
 }
 include contint::qunit_localhost
 
+contint::tmpfs { 'tmpfs for jenkins labs slaves':
+user=> 'jenkins-deploy',
+group   => 'root',
+mount_point => '/mnt/home/jenkins-deploy/tmpfs',
+size=> '512M',
+require => File['/mnt/home/jenkins-deploy'],
+}
+
 # Trebuchet replacement on labs
 include contint::slave-scripts
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I126ab53813842a008871a29d43b1ea55a64214bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] memcached: Make ganglia inclusion optional - change (operations/puppet)

2014-11-15 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: memcached: Make ganglia inclusion optional
..

memcached: Make ganglia inclusion optional

Change-Id: If72a7b576b2a8cb87d049207dc2cd705a8e472b8
---
M modules/memcached/manifests/init.pp
1 file changed, 3 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/173510/1

diff --git a/modules/memcached/manifests/init.pp 
b/modules/memcached/manifests/init.pp
index 2097362..c25b20f 100644
--- a/modules/memcached/manifests/init.pp
+++ b/modules/memcached/manifests/init.pp
@@ -48,7 +48,9 @@
 }
 }
 
-include ::memcached::ganglia
+if hiera('use_ganglia', true) {
+include ::memcached::ganglia
+}
 }
 
 class memcached::disabled {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If72a7b576b2a8cb87d049207dc2cd705a8e472b8
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] JSCS cleanup for timed media handler - change (mediawiki...TimedMediaHandler)

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

Change subject: JSCS cleanup for timed media handler
..


JSCS cleanup for timed media handler

Change-Id: Ia6b22c951e33e4f1fdfbf57cd5562f125dc5f656
---
M resources/ext.tmh.transcodetable.js
M resources/mw.MediaWikiPlayer.loader.js
M resources/mw.MediaWikiPlayerSupport.js
M resources/mw.PopUpThumbVideo.js
4 files changed, 175 insertions(+), 174 deletions(-)

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



diff --git a/resources/ext.tmh.transcodetable.js 
b/resources/ext.tmh.transcodetable.js
index 5b1e443..ed0e901 100644
--- a/resources/ext.tmh.transcodetable.js
+++ b/resources/ext.tmh.transcodetable.js
@@ -1,23 +1,23 @@
 /**
 * Javascript to support transcode table on image page
 */
-$(document).ready(function(){
+$( document ).ready( function () {
var errorPopup, $errorLink;
 
errorPopup = function () {
// pop up dialog
-   mw.addDialog({
-   'width' : '640',
-   'height' : '480',
-   'title' : $(this).attr('title'),
-   'content' : $('')
-   .css({
+   mw.addDialog( {
+   'width': '640',
+   'height': '480',
+   'title': $(this).attr( 'title' ),
+   'content': $('')
+   .css( {
'width':'99%',
'height':'99%'
-   })
+   } )
.text( $(this).attr('data-error') )
-   })
-   .css('overflow', 'hidden');
+   } )
+   .css( 'overflow', 'hidden' );
return false;
}
 
@@ -25,32 +25,32 @@
$( '.mw-filepage-transcodestatus .errorlink' ).click( errorPopup );
// New version.
$errorLink = $( '.mw-filepage-transcodestatus 
.mw-tmh-pseudo-error-link' );
-   $errorLink.wrapInner( function() {
-   var $this = $(this);
+   $errorLink.wrapInner( function () {
+   var $this = $( this );
return $( '' ).attr( {
href: '#',
title: $this.text(),
-   'data-error': $this.attr('data-error')
+   'data-error': $this.attr( 'data-error' )
} ).click( errorPopup );
} );
 
// Reset transcode action:
-   $('.mw-filepage-transcodereset a').click( function(){
-   var tKey = $(this).attr('data-transcodekey');
+   $( '.mw-filepage-transcodereset a' ).click( function () {
+   var tKey = $( this ).attr( 'data-transcodekey' );
var buttons = {};
-   buttons[ mw.msg('mwe-ok') ] = function(){
+   buttons[ mw.msg( 'mwe-ok' ) ] = function () {
var _thisDialog = this;
 
// Only show cancel button while loading:
var cancelBtn = {};
-   cancelBtn[ mw.msg('mwe-cancel') ] = function() {
-   $(this).dialog("close");
+   cancelBtn[ mw.msg( 'mwe-cancel' ) ] = function () {
+   $(this).dialog( 'close' );
}
-   $( _thisDialog ).dialog( "option", "buttons", cancelBtn 
);
+   $( _thisDialog ).dialog( 'option', 'buttons', cancelBtn 
);
 
$( this ).loadingSpinner();
 
-   var apiUrl =  mw.config.get('wgServer') + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
+   var apiUrl =  mw.config.get( 'wgServer' ) + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
// Do an api post action:
$.post( apiUrl, {
'action' : 'transcodereset',
@@ -58,7 +58,7 @@
'title' : mw.config.get('wgPageName'),
'token' : mw.user.tokens.get('editToken'),
'format' : 'json'
-   }, function( data ){
+   }, function ( data ) {
if( data && data['success'] ){
// refresh the page
window.location.reload();
@@ -69,23 +69,23 @@
$( _thisDialog ).text( mw.msg( 
'timedmedia-reset-error' ) );
}
var okBtn = {};
-   okBtn[ mw.msg('mwe-ok') ] = function() 
{ $(this).dialog("close"); }
-   $( _thisDial

[MediaWiki-commits] [Gerrit] JSCS cleanup for timed media handler - change (mediawiki...TimedMediaHandler)

2014-11-15 Thread TheDJ (Code Review)
TheDJ has uploaded a new change for review.

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

Change subject: JSCS cleanup for timed media handler
..

JSCS cleanup for timed media handler

Change-Id: Ia6b22c951e33e4f1fdfbf57cd5562f125dc5f656
---
M resources/ext.tmh.transcodetable.js
M resources/mw.MediaWikiPlayer.loader.js
M resources/mw.MediaWikiPlayerSupport.js
M resources/mw.PopUpThumbVideo.js
4 files changed, 175 insertions(+), 174 deletions(-)


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

diff --git a/resources/ext.tmh.transcodetable.js 
b/resources/ext.tmh.transcodetable.js
index 5b1e443..ed0e901 100644
--- a/resources/ext.tmh.transcodetable.js
+++ b/resources/ext.tmh.transcodetable.js
@@ -1,23 +1,23 @@
 /**
 * Javascript to support transcode table on image page
 */
-$(document).ready(function(){
+$( document ).ready( function () {
var errorPopup, $errorLink;
 
errorPopup = function () {
// pop up dialog
-   mw.addDialog({
-   'width' : '640',
-   'height' : '480',
-   'title' : $(this).attr('title'),
-   'content' : $('')
-   .css({
+   mw.addDialog( {
+   'width': '640',
+   'height': '480',
+   'title': $(this).attr( 'title' ),
+   'content': $('')
+   .css( {
'width':'99%',
'height':'99%'
-   })
+   } )
.text( $(this).attr('data-error') )
-   })
-   .css('overflow', 'hidden');
+   } )
+   .css( 'overflow', 'hidden' );
return false;
}
 
@@ -25,32 +25,32 @@
$( '.mw-filepage-transcodestatus .errorlink' ).click( errorPopup );
// New version.
$errorLink = $( '.mw-filepage-transcodestatus 
.mw-tmh-pseudo-error-link' );
-   $errorLink.wrapInner( function() {
-   var $this = $(this);
+   $errorLink.wrapInner( function () {
+   var $this = $( this );
return $( '' ).attr( {
href: '#',
title: $this.text(),
-   'data-error': $this.attr('data-error')
+   'data-error': $this.attr( 'data-error' )
} ).click( errorPopup );
} );
 
// Reset transcode action:
-   $('.mw-filepage-transcodereset a').click( function(){
-   var tKey = $(this).attr('data-transcodekey');
+   $( '.mw-filepage-transcodereset a' ).click( function () {
+   var tKey = $( this ).attr( 'data-transcodekey' );
var buttons = {};
-   buttons[ mw.msg('mwe-ok') ] = function(){
+   buttons[ mw.msg( 'mwe-ok' ) ] = function () {
var _thisDialog = this;
 
// Only show cancel button while loading:
var cancelBtn = {};
-   cancelBtn[ mw.msg('mwe-cancel') ] = function() {
-   $(this).dialog("close");
+   cancelBtn[ mw.msg( 'mwe-cancel' ) ] = function () {
+   $(this).dialog( 'close' );
}
-   $( _thisDialog ).dialog( "option", "buttons", cancelBtn 
);
+   $( _thisDialog ).dialog( 'option', 'buttons', cancelBtn 
);
 
$( this ).loadingSpinner();
 
-   var apiUrl =  mw.config.get('wgServer') + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
+   var apiUrl =  mw.config.get( 'wgServer' ) + 
mw.config.get( 'wgScriptPath' ) + '/api.php';
// Do an api post action:
$.post( apiUrl, {
'action' : 'transcodereset',
@@ -58,7 +58,7 @@
'title' : mw.config.get('wgPageName'),
'token' : mw.user.tokens.get('editToken'),
'format' : 'json'
-   }, function( data ){
+   }, function ( data ) {
if( data && data['success'] ){
// refresh the page
window.location.reload();
@@ -69,23 +69,23 @@
$( _thisDialog ).text( mw.msg( 
'timedmedia-reset-error' ) );
}
var okBtn = {};
-   okBtn[ mw.msg('mwe-ok') ] = function() 
{ $(this).dialog(

[MediaWiki-commits] [Gerrit] base: Allow overriding core dump path via hiera - change (operations/puppet)

2014-11-15 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: base: Allow overriding core dump path via hiera
..


base: Allow overriding core dump path via hiera

Change-Id: I1d209df535a0387ba88c58c84bce72e8c4e175d4
Phab: T1259
---
M modules/base/manifests/environment.pp
1 file changed, 14 insertions(+), 2 deletions(-)

Approvals:
  Yuvipanda: Looks good to me, approved
  Giuseppe Lavagetto: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/modules/base/manifests/environment.pp 
b/modules/base/manifests/environment.pp
index 7edd8d5..a74029e 100644
--- a/modules/base/manifests/environment.pp
+++ b/modules/base/manifests/environment.pp
@@ -1,4 +1,16 @@
-class base::environment {
+# = Class: base::environment
+#
+# Sets up the base environment for all hosts (profile, editor, sysctl, etc)
+#
+# = Parameters
+#
+# [*core_dump_pattern*]
+#   Sets the pattern for the path where core dumps are kept.
+#   See documentation for values at 
http://man7.org/linux/man-pages/man5/core.5.html under 'Naming of core dump 
files'
+#
+class base::environment(
+$core_dump_pattern = '/var/tmp/core/core.%h.%e.%p.%t',
+){
 case $::realm {
 'production': {
 exec { 'uncomment root bash aliases':
@@ -91,7 +103,7 @@
 }
 
 sysctl::parameters { 'core_dumps':
-values  => { 'kernel.core_pattern' => 
'/var/tmp/core/core.%h.%e.%p.%t', },
+values  => { 'kernel.core_pattern' => $core_dump_pattern, },
 require => File['/var/tmp/core'],
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d209df535a0387ba88c58c84bce72e8c4e175d4
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Giuseppe Lavagetto 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 
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 Undefined index: fulltext - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix Undefined index: fulltext
..

Fix Undefined index: fulltext

Nov 15 13:24:25 mw1025:  #012Notice: Undefined index: fulltext in 
/srv/mediawiki/search-redirect.php on line 5

Wrap long line

Change-Id: I0626344a48e3015e649ada4d77414f9c52b87397
---
M search-redirect.php
1 file changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/search-redirect.php b/search-redirect.php
index 55e85b5..a856d2d 100644
--- a/search-redirect.php
+++ b/search-redirect.php
@@ -2,7 +2,7 @@
 // get params
 $language = $_GET['language'];
 $search   = $_GET['search'];
-$fulltext = $_GET['fulltext'];
+$fulltext = isset( $_GET['fulltext'] ) ? $_GET['fulltext'] : false;
 $go   = $_GET['go'];
 
 if ( isset( $_GET['family'] ) ) {
@@ -11,7 +11,9 @@
$family = 'wikipedia';
 }
 
-if ( ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' ) || ( isset( $_SERVER['HTTPS'] 
) && $_SERVER['HTTPS'] === 'on' ) ) {
+if ( ( isset( $_SERVER['HTTP_X_FORWARDED_PROTO'] ) && 
$_SERVER['HTTP_X_FORWARDED_PROTO'] === 'https' )
+   || ( isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] === 'on' )
+) {
$proto = 'https';
 } else {
$proto = 'http';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0626344a48e3015e649ada4d77414f9c52b87397
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Move contents of resources/jquery/ to Repo - change (mediawiki...Wikibase)

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

Change subject: Move contents of resources/jquery/ to Repo
..


Move contents of resources/jquery/ to Repo

$.removeClassByRegex, $.sticknode are used only by jquery.wikibase widgets
due to be moved to Repo.

Change-Id: I6b0865ace791d9b3991f83c724f2d7caa3592282
---
M lib/resources/Resources.php
M lib/tests/qunit/resources.php
M repo/resources/Resources.php
R repo/resources/jquery/jquery.removeClassByRegex.js
R repo/resources/jquery/jquery.sticknode.js
R repo/resources/jquery/jquery.util.EventSingletonManager.js
R repo/tests/qunit/jquery/jquery.removeClassByRegex.tests.js
R repo/tests/qunit/jquery/jquery.sticknode.tests.js
R repo/tests/qunit/jquery/jquery.util.EventSingletonManager.tests.js
M repo/tests/qunit/resources.php
10 files changed, 51 insertions(+), 51 deletions(-)

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



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index deb74bd..d183f6c 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -102,30 +102,6 @@
),
),
 
-   'jquery.removeClassByRegex' => $moduleTemplate + array(
-   'scripts' => array(
-   'jquery/jquery.removeClassByRegex.js',
-   ),
-   ),
-
-   'jquery.sticknode' => $moduleTemplate + array(
-   'scripts' => array(
-   'jquery/jquery.sticknode.js',
-   ),
-   'dependencies' => array(
-   'jquery.util.EventSingletonManager',
-   ),
-   ),
-
-   'jquery.util.EventSingletonManager' => $moduleTemplate + array(
-   'scripts' => array(
-   'jquery/jquery.util.EventSingletonManager.js',
-   ),
-   'dependencies' => array(
-   'jquery.throttle-debounce',
-   ),
-   ),
-
'wikibase.dataTypes' => $moduleTemplate + array(
'scripts' => array(
'wikibase.dataTypes/wikibase.dataTypes.js',
diff --git a/lib/tests/qunit/resources.php b/lib/tests/qunit/resources.php
index 7135dec..7fa6e95 100644
--- a/lib/tests/qunit/resources.php
+++ b/lib/tests/qunit/resources.php
@@ -35,33 +35,6 @@
),
),
 
-   'jquery.removeClassByRegex.tests' => $moduleBase + array(
-   'scripts' => array(
-   'jquery/jquery.removeClassByRegex.tests.js',
-   ),
-   'dependencies' => array(
-   'jquery.removeClassByRegex',
-   ),
-   ),
-
-   'jquery.sticknode.tests' => $moduleBase + array(
-   'scripts' => array(
-   'jquery/jquery.sticknode.tests.js',
-   ),
-   'dependencies' => array(
-   'jquery.sticknode',
-   ),
-   ),
-
-   'jquery.util.EventSingletonManager.tests' => $moduleBase + 
array(
-   'scripts' => array(
-   
'jquery/jquery.util.EventSingletonManager.tests.js',
-   ),
-   'dependencies' => array(
-   'jquery.util.EventSingletonManager',
-   ),
-   ),
-
'wikibase.dataTypes.tests' => $moduleBase + array(
'scripts' => array(

'wikibase.dataTypes/wikibase.dataTypes.tests.js',
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index 99ca550..229f328 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -25,6 +25,30 @@
 
$modules = array(
 
+   'jquery.removeClassByRegex' => $moduleTemplate + array(
+   'scripts' => array(
+   'jquery/jquery.removeClassByRegex.js',
+   ),
+   ),
+
+   'jquery.sticknode' => $moduleTemplate + array(
+   'scripts' => array(
+   'jquery/jquery.sticknode.js',
+   ),
+   'dependencies' => array(
+   'jquery.util.EventSingletonManager',
+   ),
+   ),
+
+   'jquery.util.EventSingletonManager' => $moduleTemplate + array(
+   'scripts' => array(
+   'jquery/jquery.util.EventSingletonManager.js',

[MediaWiki-commits] [Gerrit] Use MailAddress::newFromUser() - change (mediawiki...ContactPage)

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

Change subject: Use MailAddress::newFromUser()
..


Use MailAddress::newFromUser()

Change-Id: I1d650e25087f83c8ea3d141c9d1d8e24731c2f00
---
M ContactPage_body.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/ContactPage_body.php b/ContactPage_body.php
index 5605723..54bbbe5 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -235,7 +235,7 @@
$senderIP = $request->getIP();
 
$contactUser = User::newFromName( $config['RecipientUser'] );
-   $targetAddress = new MailAddress( $contactUser );
+   $targetAddress = MailAddress::newFromUser( $contactUser );
$replyto = null;
$contactSender = new MailAddress( $csender, $cname );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d650e25087f83c8ea3d141c9d1d8e24731c2f00
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wgMemoryLimit to 330MB - change (operations/mediawiki-config)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: wgMemoryLimit to 330MB
..

wgMemoryLimit to 330MB

Change-Id: Ia8e0b6b01abf0a15aca38e074977027fb2a17528
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 4fc8274..b1b082c 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -13158,7 +13158,7 @@
 ),
 
 'wmgMemoryLimit' => array(
-   'default' => 300 * 1024 * 1024, // 300MB
+   'default' => 330 * 1024 * 1024, // 330MB
 ),
 'wgMaxGeneratedPPNodeCount' => array(
'default' => 150,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia8e0b6b01abf0a15aca38e074977027fb2a17528
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Fix Undefined index: 0 - change (mediawiki...Echo)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix Undefined index: 0
..

Fix Undefined index: 0

Bug: 73113
Change-Id: Ie6291cb4c5a33dc3ce62bdacfa956442ecfc08d1
---
M includes/DiscussionParser.php
1 file changed, 7 insertions(+), 5 deletions(-)


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

diff --git a/includes/DiscussionParser.php b/includes/DiscussionParser.php
index 99a610e..79a2926 100644
--- a/includes/DiscussionParser.php
+++ b/includes/DiscussionParser.php
@@ -861,16 +861,18 @@
 
// Step 2: Generalise it
// Trim off the timezone to replace at the end
-   $output = $exemplarTimestamp;
+
$tzRegex = '/\s*\(\w+\)\s*$/';
-   $tzMatches = array();
-   preg_match( $tzRegex, $output, $tzMatches );
-   $output = preg_replace( $tzRegex, '', $output );
+
+   $output = preg_replace( $tzRegex, '', $exemplarTimestamp );
$output = preg_quote( $output, '/' );
$output = preg_replace( '/[^\d\W]+/u', '[^\d\W]+', $output );
$output = preg_replace( '/\d+/u', '\d+', $output );
 
-   $output .= preg_quote( $tzMatches[0] );
+   $tzMatches = array();
+   if ( preg_match( $tzRegex, $exemplarTimestamp, $tzMatches ) ) {
+   $output .= preg_quote( $tzMatches[0] );
+   }
 
if ( !preg_match( "/$output/u", $exemplarTimestamp ) ) {
throw new MWException( "Timestamp regex does not match 
exemplar" );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6291cb4c5a33dc3ce62bdacfa956442ecfc08d1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Fix Undefined index: IncludeIP - change (mediawiki...ContactPage)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix Undefined index: IncludeIP
..

Fix Undefined index: IncludeIP

Bug: 73465
Change-Id: I9cadbf32669fde3165bb443ae8afad295d259479
---
M ContactPage_body.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/ContactPage_body.php b/ContactPage_body.php
index 5605723..9e765a7 100644
--- a/ContactPage_body.php
+++ b/ContactPage_body.php
@@ -250,7 +250,9 @@
}
}
 
-   $includeIP = $config['IncludeIP'] && ( $formData['IncludeIP'] 
|| $user->isAnon() );
+   $includeIP = isset( $config['IncludeIP'] ) && 
$config['IncludeIP']
+   && ( $formData['IncludeIP'] || $user->isAnon()
+   );
$fromName = $formData['FromName'];
$subject = $formData['Subject'];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9cadbf32669fde3165bb443ae8afad295d259479
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContactPage
Gerrit-Branch: master
Gerrit-Owner: Reedy 

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


[MediaWiki-commits] [Gerrit] Optimize all use sections in Client - change (mediawiki...Wikibase)

2014-11-15 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Optimize all use sections in Client
..


Optimize all use sections in Client

Change-Id: I6ab1d09a3e55ac7d8b25362c187969015ad1f68b
---
M client/includes/DataAccess/PropertyIdResolver.php
M client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
M 
client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M client/includes/DataAccess/PropertyParserFunction/Runner.php
M client/includes/DataAccess/PropertyParserFunction/SnaksFinder.php
M client/includes/DataAccess/PropertyParserFunction/VariantsAwareRenderer.php
M client/includes/LangLinkHandler.php
M client/includes/Usage/Sql/UsageTableUpdater.php
M client/includes/WikibaseClient.php
M client/includes/hooks/DataUpdateHookHandlers.php
M client/includes/scribunto/Scribunto_LuaWikibaseLibrary.php
M client/includes/scribunto/WikibaseLuaBindings.php
M client/includes/store/ClientStore.php
M client/includes/store/sql/DirectSqlStore.php
M client/tests/phpunit/includes/Changes/AffectedPagesFinderTest.php
M client/tests/phpunit/includes/DataAccess/PropertyIdResolverTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/LanguageAwareRendererTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactoryTest.php
M client/tests/phpunit/includes/DataAccess/PropertyParserFunction/RunnerTest.php
M 
client/tests/phpunit/includes/DataAccess/PropertyParserFunction/SnaksFinderTest.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
M client/tests/phpunit/includes/UpdateRepo/UpdateRepoOnMoveTest.php
M client/tests/phpunit/includes/Usage/UsageAccumulatorContractTester.php
M client/tests/phpunit/includes/Usage/UsageLookupContractTester.php
M client/tests/phpunit/includes/Usage/UsageTrackerContractTester.php
M client/tests/phpunit/includes/UsageUpdaterTest.php
M client/tests/phpunit/includes/hooks/BaseTemplateAfterPortalHandlerTest.php
M client/tests/phpunit/includes/hooks/SidebarHookHandlersTest.php
M client/tests/phpunit/includes/store/TitleFactoryTest.php
29 files changed, 40 insertions(+), 65 deletions(-)

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



diff --git a/client/includes/DataAccess/PropertyIdResolver.php 
b/client/includes/DataAccess/PropertyIdResolver.php
index 395377b..d4a77ed 100644
--- a/client/includes/DataAccess/PropertyIdResolver.php
+++ b/client/includes/DataAccess/PropertyIdResolver.php
@@ -3,8 +3,6 @@
 namespace Wikibase\DataAccess;
 
 use InvalidArgumentException;
-use Wikibase\DataModel\Entity\Entity;
-use Wikibase\DataModel\Entity\EntityIdParsingException;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\Lib\PropertyLabelNotResolvedException;
 use Wikibase\PropertyLabelResolver;
diff --git 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
index 84fa3c6..8af6deb 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/LanguageAwareRenderer.php
@@ -5,10 +5,8 @@
 use InvalidArgumentException;
 use Language;
 use Status;
-use Wikibase\Client\WikibaseClient;
+use Wikibase\Client\Usage\UsageAccumulator;
 use Wikibase\DataAccess\PropertyIdResolver;
-use Wikibase\DataModel\Claim\Claims;
-use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\DataModel\Entity\EntityIdValue;
 use Wikibase\DataModel\Entity\PropertyId;
@@ -16,7 +14,6 @@
 use Wikibase\DataModel\Snak\Snak;
 use Wikibase\Lib\PropertyLabelNotResolvedException;
 use Wikibase\Lib\SnakFormatter;
-use Wikibase\Client\Usage\UsageAccumulator;
 
 /**
  * PropertyClaimsRenderer of the {{#property}} parser function.
diff --git 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
index ef2eccd..7afbdab 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
@@ -5,12 +5,12 @@
 use Language;
 use Parser;
 use ValueFormatters\FormatterOptions;
+use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
+use Wikibase\Client\Usage\UsageAccumulator;
 use Wikibase\DataAccess\PropertyIdResolver;
 use Wikibase\LanguageFallbackChainFactory;
 use Wikibase\Lib\OutputFormatSnakFormatterFactory;
 use Wikibase\Lib\SnakFormatter;
-use Wikibase\Client\Usage\ParserOutputUsageAccumulator;
-use Wikibase\Client\Usage\UsageAccumulator;
 
 /**
  * @since 0.5
diff --git a/client/includes/DataAccess/PropertyParserFunction/Runner.php 
b/client/includes/DataAccess/PropertyParserFunction/Runner.php
index 36f2947..978904a 100644
--- a/client/includes/DataAccess/PropertyParserFunction/Ru

[MediaWiki-commits] [Gerrit] Optimize all use sections in Lib - change (mediawiki...Wikibase)

2014-11-15 Thread Jeroen De Dauw (Code Review)
Jeroen De Dauw has submitted this change and it was merged.

Change subject: Optimize all use sections in Lib
..


Optimize all use sections in Lib

Change-Id: I79df2962f6f2932986aae1f37ca8bfb9836be09f
---
M lib/includes/changes/EntityChange.php
M lib/includes/formatters/EntityIdLabelFormatter.php
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/includes/store/EntityRetrievingTermLookup.php
M lib/includes/store/TermIndex.php
M lib/includes/store/TermLookup.php
M lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php
M lib/tests/phpunit/formatters/EntityIdLabelFormatterTest.php
M lib/tests/phpunit/formatters/PropertyValueSnakFormatterTest.php
M lib/tests/phpunit/serializers/SnakSerializerTest.php
M lib/tests/phpunit/store/EntityRetrievingTermLookupTest.php
M lib/tests/phpunit/store/LanguageFallbackLabelLookupTest.php
M lib/tests/phpunit/store/TermIndexTest.php
13 files changed, 9 insertions(+), 22 deletions(-)

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



diff --git a/lib/includes/changes/EntityChange.php 
b/lib/includes/changes/EntityChange.php
index 68fec7f..b5e3926 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -8,9 +8,9 @@
 use User;
 use Wikibase\Client\WikibaseClient;
 use Wikibase\DataModel\Claim\Claim;
+use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\DataModel\Entity\BasicEntityIdParser;
 use Wikibase\Repo\WikibaseRepo;
 
 /**
diff --git a/lib/includes/formatters/EntityIdLabelFormatter.php 
b/lib/includes/formatters/EntityIdLabelFormatter.php
index 1081797..30e0bcb 100644
--- a/lib/includes/formatters/EntityIdLabelFormatter.php
+++ b/lib/includes/formatters/EntityIdLabelFormatter.php
@@ -9,7 +9,6 @@
 use Wikibase\DataModel\Entity\EntityId;
 use Wikibase\Lib\Store\LabelLookup;
 use Wikibase\Lib\Store\StorageException;
-use Wikibase\Lib\Store\UnresolvedRedirectException;
 
 /**
  * @since 0.4
diff --git a/lib/includes/formatters/WikibaseValueFormatterBuilders.php 
b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
index 414d722..5596a21 100644
--- a/lib/includes/formatters/WikibaseValueFormatterBuilders.php
+++ b/lib/includes/formatters/WikibaseValueFormatterBuilders.php
@@ -13,11 +13,11 @@
 use ValueFormatters\ValueFormatter;
 use Wikibase\LanguageFallbackChain;
 use Wikibase\LanguageFallbackChainFactory;
+use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\Lib\Store\EntityRetrievingTermLookup;
+use Wikibase\Lib\Store\EntityTitleLookup;
 use Wikibase\Lib\Store\LanguageFallbackLabelLookup;
 use Wikibase\Lib\Store\LanguageLabelLookup;
-use Wikibase\Lib\Store\EntityLookup;
-use Wikibase\Lib\Store\EntityTitleLookup;
 
 /**
  * Defines the formatters for DataValues supported by Wikibase.
diff --git a/lib/includes/store/EntityRetrievingTermLookup.php 
b/lib/includes/store/EntityRetrievingTermLookup.php
index f62b68d..ba5cc60 100644
--- a/lib/includes/store/EntityRetrievingTermLookup.php
+++ b/lib/includes/store/EntityRetrievingTermLookup.php
@@ -3,11 +3,8 @@
 namespace Wikibase\Lib\Store;
 
 use OutOfBoundsException;
-use Wikibase\DataModel\Entity\EntityId;
 use Wikibaes\DataModel\Term\Fingerprint;
-use Wikibase\Lib\Store\EntityLookup;
-use Wikibase\Lib\Store\StorageException;
-use Wikibase\Lib\Store\UnresolvedRedirectException;
+use Wikibase\DataModel\Entity\EntityId;
 
 /**
  * @since 0.5
diff --git a/lib/includes/store/TermIndex.php b/lib/includes/store/TermIndex.php
index 8b36af2..e975e90 100644
--- a/lib/includes/store/TermIndex.php
+++ b/lib/includes/store/TermIndex.php
@@ -2,9 +2,9 @@
 
 namespace Wikibase;
 
-use Wikibase\Lib\Store\LabelConflictFinder;
 use Wikibase\DataModel\Entity\Entity;
 use Wikibase\DataModel\Entity\EntityId;
+use Wikibase\Lib\Store\LabelConflictFinder;
 
 /**
  * Interface to a cache for terms with both write and lookup methods.
diff --git a/lib/includes/store/TermLookup.php 
b/lib/includes/store/TermLookup.php
index 4c1b065..0a2ed8d 100644
--- a/lib/includes/store/TermLookup.php
+++ b/lib/includes/store/TermLookup.php
@@ -4,7 +4,6 @@
 
 use OutOfBoundsException;
 use Wikibase\DataModel\Entity\EntityId;
-use Wikibase\Lib\Store\StorageException;
 
 /**
  * @since 0.5
diff --git a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php 
b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php
index d98285c..d0bbb8e 100644
--- a/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php
+++ b/lib/tests/phpunit/PropertyInfoDataTypeLookupTest.php
@@ -3,9 +3,9 @@
 namespace Wikibase\Lib\Test;
 
 use Wikibase\DataModel\Entity\Property;
+use Wikibase\DataModel\Entity\PropertyDataTypeLookup;
 use Wikibase\DataModel\Entity\PropertyId;
 use Wikibase\Lib\EntityRetrievingDataTypeLookup;
-use Wikibase\DataModel\Entity\PropertyDataTypeLookup;
 use Wikibase\Lib\PropertyInfoDataTypeLookup;
 use Wikibase\PropertyInfoStore;
 use Wikibase\Test\MockProperty

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

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

Change subject: Update tags
..


Update tags

Also sorted.

Change-Id: I6bce2b5288a356b0baa2ec01ce732ca43a02ee34
---
M groups/FreeCol/FreeCol.yaml
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/groups/FreeCol/FreeCol.yaml b/groups/FreeCol/FreeCol.yaml
index eef6681..0d5d6cd 100644
--- a/groups/FreeCol/FreeCol.yaml
+++ b/groups/FreeCol/FreeCol.yaml
@@ -36,6 +36,7 @@
 
 TAGS:
   optional:
+- "*.accelerator"
 - colopedia.abilityGrantedBy
 - indianCapitalOwner
 - indianSettlementOwner
@@ -60,11 +61,17 @@
 - model.unit.occupation.activeNoMovesLeft
 - model.unit.occupation.improving
 - model.unit.occupation.unknown
-- "*.accelerator"
 - selectDestination.destinationTurns
 - shipName.3.0
 - transaction.tax
+- unitFormat.name.nation.null.null
+- unitFormat.name.nation.role.null
+- unitFormat.null.nation.null.null
+- unitFormat.null.nation.role.equip
+- unitFormat.null.nation.role.null
+- unitFormat.null.null.role.null
 - year.YEAR
+
   ignored:
 - font.*
 - cli.arg.font

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6bce2b5288a356b0baa2ec01ce732ca43a02ee34
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
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 Undefined index: iw_trans - change (mediawiki...Interwiki)

2014-11-15 Thread Reedy (Code Review)
Reedy has uploaded a new change for review.

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

Change subject: Fix Undefined index: iw_trans
..

Fix Undefined index: iw_trans

Bug: 73466
Change-Id: Ifdd134dbc0a388515d6aa3b597d15041119b7f02
---
M Interwiki_body.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/Interwiki_body.php b/Interwiki_body.php
index 87f4371..87feaf6 100644
--- a/Interwiki_body.php
+++ b/Interwiki_body.php
@@ -442,7 +442,7 @@
);
$attribs = array( 'class' => 'mw-interwikitable-local' 
);
// Green background for cells with "yes".
-   if( $iwPrefix['iw_local'] ) {
+   if( isset( $iwPrefix['iw_local'] ) && 
$iwPrefix['iw_local'] ) {
$attribs['class'] .= ' 
mw-interwikitable-local-yes';
}
// The messages interwiki_0 and interwiki_1 are used 
here.
@@ -452,7 +452,7 @@
$out .= Html::element( 'td', $attribs, $contents );
$attribs = array( 'class' => 'mw-interwikitable-trans' 
);
// Green background for cells with "yes".
-   if( $iwPrefix['iw_trans'] ) {
+   if( isset( $iwPrefix['iw_trans'] ) && 
$iwPrefix['iw_trans'] ) {
$attribs['class'] .= ' 
mw-interwikitable-trans-yes';
}
// The messages interwiki_0 and interwiki_1 are used 
here.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifdd134dbc0a388515d6aa3b597d15041119b7f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Interwiki
Gerrit-Branch: master
Gerrit-Owner: Reedy 
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 tags - change (translatewiki)

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

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

Change subject: Update tags
..

Update tags

Also sorted.

Change-Id: I6bce2b5288a356b0baa2ec01ce732ca43a02ee34
---
M groups/FreeCol/FreeCol.yaml
1 file changed, 8 insertions(+), 1 deletion(-)


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

diff --git a/groups/FreeCol/FreeCol.yaml b/groups/FreeCol/FreeCol.yaml
index eef6681..0d5d6cd 100644
--- a/groups/FreeCol/FreeCol.yaml
+++ b/groups/FreeCol/FreeCol.yaml
@@ -36,6 +36,7 @@
 
 TAGS:
   optional:
+- "*.accelerator"
 - colopedia.abilityGrantedBy
 - indianCapitalOwner
 - indianSettlementOwner
@@ -60,11 +61,17 @@
 - model.unit.occupation.activeNoMovesLeft
 - model.unit.occupation.improving
 - model.unit.occupation.unknown
-- "*.accelerator"
 - selectDestination.destinationTurns
 - shipName.3.0
 - transaction.tax
+- unitFormat.name.nation.null.null
+- unitFormat.name.nation.role.null
+- unitFormat.null.nation.null.null
+- unitFormat.null.nation.role.equip
+- unitFormat.null.nation.role.null
+- unitFormat.null.null.role.null
 - year.YEAR
+
   ignored:
 - font.*
 - cli.arg.font

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bce2b5288a356b0baa2ec01ce732ca43a02ee34
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] doc: Clean up Doxyfile for doxygen 1.8.6 - change (mediawiki/core)

2014-11-15 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: doc: Clean up Doxyfile for doxygen 1.8.6
..

doc: Clean up Doxyfile for doxygen 1.8.6

Latest stable is v1.8.8, but Ubunu Trusty (which we now use on the
Jenkins slave that generates our documentation) ships doxygen v1.8.6.
Time to migrate away from 1.7.x stuff.

Warnings:

 Tag `SYMBOL_CACHE_SIZE' at line 84 of file maintenance/Doxyfile has become 
obsolete.
 Tag `SHOW_DIRECTORIES' at line 118 of file maintenance/Doxyfile has become 
obsolete.
 Tag `HTML_ALIGN_MEMBERS' at line 226 of file maintenance/Doxyfile has become 
obsolete.
 Tag `USE_INLINE_TREES' at line 253 of file maintenance/Doxyfile has become 
obsolete.

Regenerated with:

 $ doxygen -u ./maintenance/Doxyfile

Which automatically added new configurations settings, removed
obsolete ones, migrated formatting to their new standard, and
imported various bits of documentation.

Change-Id: I372ea06c439762578cb4c68686344eb446925c04
---
M maintenance/Doxyfile
1 file changed, 2,085 insertions(+), 68 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/02/173502/1

diff --git a/maintenance/Doxyfile b/maintenance/Doxyfile
index ffc8c3b..d6ce3f0 100644
--- a/maintenance/Doxyfile
+++ b/maintenance/Doxyfile
@@ -1,4 +1,4 @@
-# Doxyfile 1.7.6.1
+# Doxyfile 1.8.6
 
 # This file describes the settings to be used by the documentation system
 # doxygen (www.doxygen.org) for MediaWiki.
@@ -10,20 +10,114 @@
 # {{INPUT}}
 #
 # To generate documentation run: php mwdocgen.php --no-extensions
+#
+# All text after a double hash (##) is considered a comment and is placed in
+# front of the TAG it is preceding.
+#
+# All text after a single hash (#) is considered a comment and will be ignored.
+# The format is:
+# TAG = value [value, ...]
+# For lists, items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (\" \").
 
 #---
 # Project related configuration options
 #---
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all 
text
+# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv
+# built into libc) for the transcoding. See 
http://www.gnu.org/software/libiconv
+# for the list of possible encodings.
+# The default value is: UTF-8.
+
 DOXYFILE_ENCODING  = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by
+# double-quotes, unless you are using Doxywizard) that should identify the
+# project for which the documentation is generated. This name is used in the
+# title of most generated pages and in a few other places.
+# The default value is: My Project.
+
 PROJECT_NAME   = MediaWiki
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
This
+# could be handy for archiving the generated documentation or if some version
+# control system is used.
+
 PROJECT_NUMBER = {{CURRENT_VERSION}}
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description
+# for a project that appears at the top of each page and should give viewer a
+# quick idea about the purpose of the project. Keep the description short.
+
 PROJECT_BRIEF  =
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
+# the documentation. The maximum height of the logo should not exceed 55 pixels
+# and the maximum width should not exceed 200 pixels. Doxygen will copy the 
logo
+# to the output directory.
+
 PROJECT_LOGO   =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path
+# into which the generated documentation will be written. If a relative path is
+# entered, it will be relative to the location where doxygen was started. If
+# left blank the current directory will be used.
+
 OUTPUT_DIRECTORY   = {{OUTPUT_DIRECTORY}}
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
+# directories (in 2 levels) under the output directory of each output format 
and
+# will distribute the generated files over these directories. Enabling this
+# option can be useful when feeding doxygen a huge amount of source files, 
where
+# putting all generated files in the same directory would otherwise causes
+# performance problems for the file system.
+# The default value is: NO.
+
 CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, 

[MediaWiki-commits] [Gerrit] Make default settings generic - change (mediawiki...GlobalUserPage)

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

Change subject: Make default settings generic
..


Make default settings generic

* Use https for the central wiki url (bug 70584)

Change-Id: I71853a2d686a483dfcc7bfd425071436f7095962
---
M GlobalUserPage.php
1 file changed, 3 insertions(+), 3 deletions(-)

Approvals:
  CSteipp: Looks good to me, but someone else must approve
  Jack Phoenix: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/GlobalUserPage.php b/GlobalUserPage.php
index bafa0a5..aedc73d 100644
--- a/GlobalUserPage.php
+++ b/GlobalUserPage.php
@@ -35,7 +35,7 @@
 /**
  * API endpoint of the central wiki
  */
-$wgGlobalUserPageAPIUrl = 'http://www.shoutwiki.com/w/api.php';
+$wgGlobalUserPageAPIUrl = 'https://example.org/w/api.php';
 
 /**
  * By default enables global userpage for all users
@@ -46,7 +46,7 @@
 /**
  * Database name of the central wiki
  */
-$wgGlobalUserPageDBname = 'shoutwiki';
+$wgGlobalUserPageDBname = 'examplewiki';
 
 /**
  * Optionally add a footer message to the
@@ -80,7 +80,7 @@
 $wgExtensionCredits['other'][] = array(
'path' => __FILE__,
'name' => 'GlobalUserPage',
-   'version' => '0.9.1',
+   'version' => '0.10.0',
'author' => array( 'Kunal Mehta', 'Jack Phoenix' ),
'url' => 'https://www.mediawiki.org/wiki/Extension:GlobalUserPage',
'descriptionmsg' => 'globaluserpage-desc',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71853a2d686a483dfcc7bfd425071436f7095962
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GlobalUserPage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Jack Phoenix 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] don't show top dashed border on wikibase-toolbar-wrapper for... - change (mediawiki...Wikibase)

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

Change subject: don't show top dashed border on wikibase-toolbar-wrapper for 
new statements
..


don't show top dashed border on wikibase-toolbar-wrapper for new statements

doesn't look nice otherwise when clicking "add" on an item with
no statements or to add a new one.

Change-Id: I488d30baac53a8c590b27eb242f08157096c07ca
(cherry picked from commit ad652806e89c2f413e18cdb7597ce5366a8ae93f)
---
M lib/resources/wikibase.css
1 file changed, 9 insertions(+), 1 deletion(-)

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



diff --git a/lib/resources/wikibase.css b/lib/resources/wikibase.css
index a139b9e..f3309e9 100644
--- a/lib/resources/wikibase.css
+++ b/lib/resources/wikibase.css
@@ -303,12 +303,20 @@
 
 .wb-claimlistview > .wikibase-toolbar-wrapper {
background-color: #F8F8F8;
-   border-top: 1px dashed #AAA;
display: block;
float: left;
position: relative;
width: 100%;
 }
+
+.wb-claimlistview > .wikibase-toolbar-wrapper {
+   border-top: 1px dashed #AAA;
+}
+
+.wb-claimlistview.wb-new > .wikibase-toolbar-wrapper {
+   border-top: 0;
+}
+
 .wb-claimlistview > .wikibase-toolbar-wrapper .wikibase-toolbar-container {
position: static;
line-height: 3em;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I488d30baac53a8c590b27eb242f08157096c07ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf8
Gerrit-Owner: Aude 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Swap missing.php to use CDB reader wrappers - change (operations/mediawiki-config)

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

Change subject: Swap missing.php to use CDB reader wrappers
..


Swap missing.php to use CDB reader wrappers

Bug: 73454
Change-Id: I2d47928a8a283c2e39696ea3637ad065486e669a
---
M wmf-config/missing.php
1 file changed, 15 insertions(+), 11 deletions(-)

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



diff --git a/wmf-config/missing.php b/wmf-config/missing.php
index 90aed31..23ad0ff 100644
--- a/wmf-config/missing.php
+++ b/wmf-config/missing.php
@@ -2,24 +2,26 @@
 
 /**
  * Missing wiki redirect / 404 page
- * 
+ *
  * This file redirects non-existing languages of Wikipedia, Wiktionary, 
Wikiquote,
  * Wikibooks and Wikinews to the Wikimedia Incubator. Non-existing languages of
  * Wikisource and Wikiversity show static 404 page.
- * 
+ *
  * There is a specific extension on Incubator used to make nice "welcome pages"
  * (adapted to each language, project and translatable).
- * 
+ *
  * These redirects allow the usage of interwiki links from existing language
  * subdomains to Incubator, e.g. [[xyz:Page]] on en.wikipedia links to
  * http://incubator.wikimedia.org/wiki/Wp/xyz/Page
- * 
+ *
  * @copyright Copyright © 2011-2013, Danny B., SPQRobin, Tim Starling
- * 
+ *
  * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License 
2.0 or later
  */
 
 // define( 'MISSING_PHP_TEST', 1 );
+
+require dirname( __DIR__ ) . '/multiversion/Cdb.php';
 
 /**
  * The main function
@@ -66,18 +68,22 @@
return;
}
 
-   if( strpos( $page, ':' ) !== false && function_exists( 'dba_open' ) ) {
+   if( strpos( $page, ':' ) !== false ) {
# Open the interwiki file to see if we have an interwiki prefix
-   $db = dba_open( __DIR__ . '/interwiki.cdb', 'r-', 'cdb' );
+   $db = null;
+   try {
+   $db = CdbReader::open( __DIR__ . '/interwiki.cdb' );
+   } catch ( CdbException $e ) {}
+
if ( $db ) {
$prefix = strtok( $page, ':' );
 
# Try looking for lateral links (w: q: voy: ...)
-   $row = dba_fetch( "{$language}wiki:$prefix", $db );
+   $row = $db->get( "{$language}wiki:$prefix" );
if( !$row ) {
# Also try interlanguage links
$projectForCdb = ( $project === 'wikipedia' ? 
'wiki' : $project );
-   $row = dba_fetch( "_$projectForCdb:$prefix", 
$db );
+   $row = $db->get( "_$projectForCdb:$prefix" );
}
 
if( $row ) {
@@ -86,12 +92,10 @@
# Redirect to the appropriate WMF wiki
# strtok gives us the remainder of the 
page title after the interwiki prefix
showRedirect( $protocol . ':' . 
str_replace( '$1', strtok( '' ), $iw_url ) );
-   dba_close( $db );
return;
}
}
# We don't have an interwiki link, keep going and see 
what else we could have
-   dba_close( $db );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d47928a8a283c2e39696ea3637ad065486e669a
Gerrit-PatchSet: 4
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: TTO 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   >