[MediaWiki-commits] [Gerrit] Make ellipsis + ellipsis gradient cover ascender/descender g... - change (mediawiki...MultimediaViewer)

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

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

Change subject: Make ellipsis + ellipsis gradient cover ascender/descender 
glyphs
..

Make ellipsis + ellipsis gradient cover ascender/descender glyphs

Change-Id: I3d2c2016761c9b7551750585c01763f424eecc8c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/985
---
M resources/mmv/ui/mmv.ui.truncatableTextField.less
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/resources/mmv/ui/mmv.ui.truncatableTextField.less 
b/resources/mmv/ui/mmv.ui.truncatableTextField.less
index 0519319..fc401fd 100644
--- a/resources/mmv/ui/mmv.ui.truncatableTextField.less
+++ b/resources/mmv/ui/mmv.ui.truncatableTextField.less
@@ -1,3 +1,4 @@
+@import mediawiki.mixins;
 @import ../mmv.mixins;
 
 .mw-mmv-ttf-container {
@@ -41,6 +42,7 @@
background-repeat: no-repeat;
/* @embed */
background-image: url(img/ellipsis_lightgray.svg);
+   .box-shadow( -4px 6px 0 0 white);
 
// Hovering over .mw-mmv-ttf-ellipsis-container will make the 
ellipsis more visible to attract
// attention to it. Since it has to be set on a parent element 
which is not under control of
@@ -63,8 +65,7 @@
display: block;
content: '';
 
-   height: 1.2em; // 1em would not cover high glyphs
-   margin-top: -0.1em; // center
+   height: 1.6em; // 1em would not cover high glyphs
 
width: @fade-length;
margin-left: -@fade-length;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3d2c2016761c9b7551750585c01763f424eecc8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MultimediaViewer
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza gti...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Remove -hhvm suffix from beta multiversion config - change (operations/mediawiki-config)

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

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

Change subject: Remove -hhvm suffix from beta multiversion config
..

Remove -hhvm suffix from beta multiversion config

Change-Id: Ic5d9b615cfe38b203915a47d53c4bf78ed9e2d7b
---
M multiversion/MWMultiVersion.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index f3aec00..dc3e84b 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -151,7 +151,7 @@
} elseif ( isset( $staticMappings[$serverName] ) ) {
$lang = $staticMappings[$serverName];
} elseif ( strpos( $serverName, 'wmflabs' ) !== false ) {
-   if ( preg_match( 
'/^([^.]+)\.([^.]+)\.beta(?:-hhvm)?\.wmflabs\.org$/', $serverName, $matches ) ) 
{
+   if ( preg_match( 
'/^([^.]+)\.([^.]+)\.beta\.wmflabs\.org$/', $serverName, $matches ) ) {
// http://en.wikipedia.beta.wmflabs.org/
$lang = $matches[1];
if ( $matches[2] === 'wikimedia' ) {
@@ -161,7 +161,7 @@
} else {
$site = $matches[2];
}
-   } elseif ( preg_match( 
'/^([a-z0-9]*)\.beta(?:-hhvm)?\.wmflabs\.org$/', $serverName, $matches ) ) {
+   } elseif ( preg_match( 
'/^([a-z0-9]*)\.beta\.wmflabs\.org$/', $serverName, $matches ) ) {
// http://wikidata.beta.wmflabs.org/
$lang = $matches[1];
}

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

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

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


[MediaWiki-commits] [Gerrit] Update CDB code from upstream (mediawiki core) - change (operations/mediawiki-config)

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

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

Change subject: Update CDB code from upstream (mediawiki core)
..

Update CDB code from upstream (mediawiki core)

Minor refactoring to add cdb folder

Bug: 73454
Change-Id: I74e53c825a553523a8830f2470c00f448d5aea3a
---
M multiversion/Cdb.php
D multiversion/CdbPHP.php
A multiversion/cdb/CdbException.php
A multiversion/cdb/CdbFunctions.php
A multiversion/cdb/CdbReader.php
R multiversion/cdb/CdbReaderDBA.php
A multiversion/cdb/CdbReaderPHP.php
7 files changed, 424 insertions(+), 685 deletions(-)


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

diff --git a/multiversion/Cdb.php b/multiversion/Cdb.php
index 2e34409..9686b75 100644
--- a/multiversion/Cdb.php
+++ b/multiversion/Cdb.php
@@ -1,165 +1,7 @@
 ?php
-/**
- * Native CDB file reader and writer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
 
-/**
- * Read from a CDB file.
- * Native and pure PHP implementations are provided.
- * http://cr.yp.to/cdb.html
- */
-abstract class CdbReader {
-   /**
-* The file handle
-*/
-   protected $handle;
-
-   /**
-* Open a file and return a subclass instance
-*
-* @param $fileName string
-*
-* @return CdbReader
-*/
-   public static function open( $fileName ) {
-   return self::haveExtension() ?
-   new CdbReaderDBA( $fileName ) :
-   new CdbReaderPHP( $fileName );
-   }
-
-   /**
-* Returns true if the native extension is available
-*
-* @return bool
-*/
-   public static function haveExtension() {
-   if ( !function_exists( 'dba_handlers' ) ) {
-   return false;
-   }
-   $handlers = dba_handlers();
-   if ( !in_array( 'cdb', $handlers ) || !in_array( 'cdb_make', 
$handlers ) ) {
-   return false;
-   }
-
-   return true;
-   }
-
-   /**
-* Create the object and open the file
-*
-* @param $fileName string
-*/
-   abstract public function __construct( $fileName );
-
-   /**
-* Close the file. Optional, you can just let the variable go out of 
scope.
-*/
-   abstract public function close();
-
-   /**
-* Get a value with a given key. Only string values are supported.
-*
-* @param $key string
-*/
-   abstract public function get( $key );
-}
-
-/**
- * Write to a CDB file.
- * Native and pure PHP implementations are provided.
- */
-abstract class CdbWriter {
-   /**
-* The file handle
-*/
-   protected $handle;
-
-   /**
-* File we'll be writing to when we're done
-* @var string
-*/
-   protected $realFileName;
-
-   /**
-* File we write to temporarily until we're done
-* @var string
-*/
-   protected $tmpFileName;
-
-   /**
-* Open a writer and return a subclass instance.
-* The user must have write access to the directory, for temporary file 
creation.
-*
-* @param $fileName string
-*
-* @return CdbWriterDBA|CdbWriterPHP
-*/
-   public static function open( $fileName ) {
-   return CdbReader::haveExtension() ?
-   new CdbWriterDBA( $fileName ) :
-   new CdbWriterPHP( $fileName );
-   }
-
-   /**
-* Create the object and open the file
-*
-* @param $fileName string
-*/
-   abstract public function __construct( $fileName );
-
-   /**
-* Set a key to a given value. The value will be converted to string.
-* @param $key string
-* @param $value string
-*/
-   abstract public function set( $key, $value );
-
-   /**
-* Close the writer object. You should call this function before the 
object
-* goes out of scope, to write out the final hashtables.
-*/
-   abstract public function close();

[MediaWiki-commits] [Gerrit] Swap missing.php to use CDB reader wrappers - change (operations/mediawiki-config)

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

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

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, 14 insertions(+), 10 deletions(-)


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

diff --git a/wmf-config/missing.php b/wmf-config/missing.php
index 50b143a..5ced439 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
@@ -68,16 +70,20 @@
 
if( strpos( $page, ':' ) !== false  function_exists( 'dba_open' ) ) {
# 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: newchange
Gerrit-Change-Id: I2d47928a8a283c2e39696ea3637ad065486e669a
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Fix php short tags - change (operations/mediawiki-config)

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

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

Change subject: Fix php short tags
..

Fix php short tags

Change-Id: Ie5d691581ded0aefb940a415c3ed0218bbef1c74
---
M wmf-config/missing.php
1 file changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/wmf-config/missing.php b/wmf-config/missing.php
index 50b143a..90aed31 100644
--- a/wmf-config/missing.php
+++ b/wmf-config/missing.php
@@ -215,7 +215,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**
@@ -273,7 +273,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**
@@ -309,7 +309,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**

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

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

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


[MediaWiki-commits] [Gerrit] ParamInfo class - change (pywikibot/core)

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

Change subject: ParamInfo class
..


ParamInfo class

Manages data from the paraminfo which was previous managed within
QueryGenerator and stored in APISite._modules.

This provides preloading of an initial set of params, so the cache
key is constant, and bulk loading of all query params, again so that
the cache key is constant irrespective of order of queries used.

Change-Id: I84a0769f19abf8740106659426109c62e8438e65
---
M pywikibot/data/api.py
M pywikibot/site.py
M tests/api_tests.py
M tests/dry_api_tests.py
4 files changed, 682 insertions(+), 76 deletions(-)

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



diff --git a/pywikibot/data/api.py b/pywikibot/data/api.py
index 83ef419..01d36d9 100644
--- a/pywikibot/data/api.py
+++ b/pywikibot/data/api.py
@@ -7,7 +7,7 @@
 #
 __version__ = '$Id$'
 
-from collections import MutableMapping
+from collections import Container, MutableMapping
 from pywikibot.comms import http
 from email.mime.nonmultipart import MIMENonMultipart
 import datetime
@@ -25,7 +25,7 @@
 
 import pywikibot
 from pywikibot import config, login
-from pywikibot.tools import MediaWikiVersion as LV, deprecated
+from pywikibot.tools import MediaWikiVersion as LV, deprecated, itergroup
 from pywikibot.exceptions import Server504Error, FatalServerError, Error
 
 import sys
@@ -121,6 +121,321 @@
 self.mediawiki_exception_class_name = mediawiki_exception_class_name
 code = 'internal_api_error_' + mediawiki_exception_class_name
 super(APIMWException, self).__init__(code, info, **kwargs)
+
+
+class ParamInfo(Container):
+
+
+API parameter information data object.
+
+Provides cache aware fetching of parameter information.
+
+TODO: establish a data structure in the class which prefills
+the param information available for a site given its
+version, using the API information available for each
+API version.
+
+TODO: module aliases: in 1.25wmf
+list=deletedrevs becomes list=alldeletedrevisions
+prop=deletedrevs becomes prop=deletedrevisions
+
+TODO: share API parameter information between sites using
+similar versions of the API, especially all sites in the
+same family.
+
+
+paraminfo_keys = frozenset(['modules', 'querymodules', 'formatmodules',
+'mainmodule', 'pagesetmodule'])
+
+root_modules = frozenset(['main', 'pageset'])
+root_module_keys = frozenset(['mainmodule', 'pagesetmodule'])
+
+init_modules = frozenset(['main', 'paraminfo'])
+
+def __init__(self, site, preloaded_modules=None, modules_only_mode=None):
+
+Constructor.
+
+@param preloaded_modules: API modules to preload
+@type preloaded_modules: set of string
+@param modules_only_mode: use the 'modules' only syntax for API request
+@type: modules_only_mode: bool or None to only use default, which True
+if the site is 1.25wm4+
+
+self.site = site
+
+# Keys are module names, values are the raw responses from the server.
+self._paraminfo = {}
+
+# Cached data.
+self._prefixes = {}
+self._with_limits = None
+
+self._action_modules = None
+self._query_modules = []  # filled in _init()
+self._limit = None
+
+self.preloaded_modules = self.init_modules
+if preloaded_modules:
+self.preloaded_modules |= set(preloaded_modules)
+self.__inited = False
+
+self.modules_only_mode = modules_only_mode
+if self.modules_only_mode:
+self.paraminfo_keys = frozenset(['modules'])
+
+def _init(self):
+# The paraminfo api deprecated the old request syntax of
+# querymodules='info'; to avoid warnings sites with 1.25wmf4+
+# must only use 'modules' parameter.
+if self.modules_only_mode is None:
+self.modules_only_mode = LV(self.site.version()) = LV('1.25wmf4')
+if self.modules_only_mode:
+self.paraminfo_keys = frozenset(['modules'])
+# Assume that by v1.26, it will be desirable to prefetch 'query'
+if LV(self.site.version())  LV('1.26'):
+self.preloaded_modules |= set(['query'])
+
+self.fetch(self.preloaded_modules, _init=True)
+main_modules_param = self.parameter('main', 'action')
+
+assert(main_modules_param)
+assert('type' in main_modules_param)
+self._action_modules = frozenset(main_modules_param['type'])
+
+# While deprecated with warning in 1.25, paraminfo param 'querymodules'
+# provides a list of all query modules. This will likely be removed
+# from the API in the future, in which case the fallback is the use
+# the same data available in the paraminfo for query.
+   

[MediaWiki-commits] [Gerrit] Use start/endAtomic in Database::deadlockLoop - change (mediawiki/core)

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

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

Change subject: Use start/endAtomic in Database::deadlockLoop
..

Use start/endAtomic in Database::deadlockLoop

Bug: 73456
Change-Id: I4542d1f668e750f43cec81411aa540346f9a0ce1
---
M includes/db/Database.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/91/173491/2

diff --git a/includes/db/Database.php b/includes/db/Database.php
index 18cd39f..2a55372 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -3070,7 +3070,7 @@
 * @return bool
 */
public function deadlockLoop() {
-   $this-begin( __METHOD__ );
+   $this-startAtomic( __METHOD__ );
$args = func_get_args();
$function = array_shift( $args );
$oldIgnore = $this-ignoreErrors( true );
@@ -3106,7 +3106,7 @@
 
return false;
} else {
-   $this-commit( __METHOD__ );
+   $this-endAtomic( __METHOD__ );
 
return $retVal;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4542d1f668e750f43cec81411aa540346f9a0ce1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Make qualitywiki HTTPS only - change (operations/puppet)

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

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

Change subject: Make qualitywiki HTTPS only
..

Make qualitywiki HTTPS only

It's a private wiki

Change-Id: I260fa8132f5e87b3e89a746193ee8dc812439be9
---
M modules/mediawiki/files/apache/sites/remnant.conf
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/93/173493/1

diff --git a/modules/mediawiki/files/apache/sites/remnant.conf 
b/modules/mediawiki/files/apache/sites/remnant.conf
index 0cb2f9b..8a51442 100644
--- a/modules/mediawiki/files/apache/sites/remnant.conf
+++ b/modules/mediawiki/files/apache/sites/remnant.conf
@@ -313,6 +313,9 @@
 VirtualHost *:80
 ServerName quality.wikimedia.org
 
+RewriteEngine On
+RewriteCond %{HTTP:X-Forwarded-Proto} !https
+RewriteRule ^/(.*)$ https://quality.wikimedia.org/$1 [R=301,L]
 Include sites-enabled/wikimedia-common.incl
 Include sites-enabled/wikimedia-legacy.incl
 /VirtualHost

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I260fa8132f5e87b3e89a746193ee8dc812439be9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Handle TemplateParser::parsePage() returning an empty array - change (mediawiki...CommonsMetadata)

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

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

Change subject: Handle TemplateParser::parsePage() returning an empty array
..

Handle TemplateParser::parsePage() returning an empty array

Bug: 73107
Change-Id: I0361a6bd8f6103559a5cfc91fb99b706a39223df
(cherry picked from commit 636297d74f98c9f1af89429c3937839559fa21fc)
---
M DataCollector.php
1 file changed, 5 insertions(+), 1 deletion(-)


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

diff --git a/DataCollector.php b/DataCollector.php
index 018954b..1e8042f 100644
--- a/DataCollector.php
+++ b/DataCollector.php
@@ -109,8 +109,12 @@
 *  - no-source - failed to detect the source of the image or a custom 
attribution text
 */
public function verifyAttributionMetadata( $descriptionText ) {
-   $problems = array();
$templateData = $this-templateParser-parsePage( 
$descriptionText );
+   if ( !$templateData ) {
+   return array( 'no-license', 'no-description', 
'no-author', 'no-source' );
+   }
+
+   $problems = array();
$licenseData = $this-selectLicense( 
$templateData[TemplateParser::LICENSES_KEY] );
$informationData = $this-selectInformationTemplate( 
$templateData[TemplateParser::INFORMATION_FIELDS_KEY] );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0361a6bd8f6103559a5cfc91fb99b706a39223df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommonsMetadata
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Handle TemplateParser::parsePage() returning an empty array - change (mediawiki...CommonsMetadata)

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

Change subject: Handle TemplateParser::parsePage() returning an empty array
..


Handle TemplateParser::parsePage() returning an empty array

Bug: 73107
Change-Id: I0361a6bd8f6103559a5cfc91fb99b706a39223df
(cherry picked from commit 636297d74f98c9f1af89429c3937839559fa21fc)
---
M DataCollector.php
1 file changed, 5 insertions(+), 1 deletion(-)

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



diff --git a/DataCollector.php b/DataCollector.php
index 018954b..1e8042f 100644
--- a/DataCollector.php
+++ b/DataCollector.php
@@ -109,8 +109,12 @@
 *  - no-source - failed to detect the source of the image or a custom 
attribution text
 */
public function verifyAttributionMetadata( $descriptionText ) {
-   $problems = array();
$templateData = $this-templateParser-parsePage( 
$descriptionText );
+   if ( !$templateData ) {
+   return array( 'no-license', 'no-description', 
'no-author', 'no-source' );
+   }
+
+   $problems = array();
$licenseData = $this-selectLicense( 
$templateData[TemplateParser::LICENSES_KEY] );
$informationData = $this-selectInformationTemplate( 
$templateData[TemplateParser::INFORMATION_FIELDS_KEY] );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0361a6bd8f6103559a5cfc91fb99b706a39223df
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CommonsMetadata
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

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

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

Change subject: Prevent PHP notices and broken time displays
..

Prevent PHP notices and broken time displays

Bug: 73111
Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
(cherry picked from commit 932738df9ba179b3c9d10b13fbe764c2aac8f62d)
---
M TimeUnits.body.php
1 file changed, 5 insertions(+), 0 deletions(-)


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

diff --git a/TimeUnits.body.php b/TimeUnits.body.php
index 1cbe531..df7f2a6 100644
--- a/TimeUnits.body.php
+++ b/TimeUnits.body.php
@@ -169,6 +169,11 @@
$timeUnitKey = {$unit}-{$tense}-other;
}
 
+   // Not all languages have translations for everything
+   if ( !isset( $timeUnits[$timeUnitKey] ) ) {
+   return true;
+   }
+
// Select the appropriate template for the timestamp.
$timeUnit = $timeUnits[$timeUnitKey];
// Replace the placeholder with the number.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com

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


[MediaWiki-commits] [Gerrit] Prevent PHP notices and broken time displays - change (mediawiki...cldr)

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

Change subject: Prevent PHP notices and broken time displays
..


Prevent PHP notices and broken time displays

Bug: 73111
Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
(cherry picked from commit 932738df9ba179b3c9d10b13fbe764c2aac8f62d)
---
M TimeUnits.body.php
1 file changed, 5 insertions(+), 0 deletions(-)

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



diff --git a/TimeUnits.body.php b/TimeUnits.body.php
index 1cbe531..df7f2a6 100644
--- a/TimeUnits.body.php
+++ b/TimeUnits.body.php
@@ -169,6 +169,11 @@
$timeUnitKey = {$unit}-{$tense}-other;
}
 
+   // Not all languages have translations for everything
+   if ( !isset( $timeUnits[$timeUnitKey] ) ) {
+   return true;
+   }
+
// Select the appropriate template for the timestamp.
$timeUnit = $timeUnits[$timeUnitKey];
// Replace the placeholder with the number.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I69c22e8b61e65fe2ec881f6401e4eb9e809900dd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/cldr
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Nikerabbit niklas.laxst...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update cldr to 1.25wmf7 HEAD - change (mediawiki/core)

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

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

Change subject: Update cldr to 1.25wmf7 HEAD
..

Update cldr to 1.25wmf7 HEAD

Change-Id: I3851a305112dd704cd61ff63dbcfb6a4d3939f02
---
M extensions/cldr
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/96/173496/1

diff --git a/extensions/cldr b/extensions/cldr
index 373b829..33c43a2 16
--- a/extensions/cldr
+++ b/extensions/cldr
-Subproject commit 373b82932ac291bcaabea1f3c13af5fa3a43c561
+Subproject commit 33c43a2d28da03a38614e3013c9428531f161636

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3851a305112dd704cd61ff63dbcfb6a4d3939f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update cldr to 1.25wmf7 HEAD - change (mediawiki/core)

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

Change subject: Update cldr to 1.25wmf7 HEAD
..


Update cldr to 1.25wmf7 HEAD

Change-Id: I3851a305112dd704cd61ff63dbcfb6a4d3939f02
---
M extensions/cldr
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/cldr b/extensions/cldr
index 373b829..33c43a2 16
--- a/extensions/cldr
+++ b/extensions/cldr
-Subproject commit 373b82932ac291bcaabea1f3c13af5fa3a43c561
+Subproject commit 33c43a2d28da03a38614e3013c9428531f161636

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3851a305112dd704cd61ff63dbcfb6a4d3939f02
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update CommonsMetadata to 1.25wmf7 HEAD - change (mediawiki/core)

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

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

Change subject: Update CommonsMetadata to 1.25wmf7 HEAD
..

Update CommonsMetadata to 1.25wmf7 HEAD

Change-Id: I23e05772440754d288b5dc894eef838aab2a953b
---
M extensions/CommonsMetadata
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/97/173497/1

diff --git a/extensions/CommonsMetadata b/extensions/CommonsMetadata
index 1d6481d..98f7fe9 16
--- a/extensions/CommonsMetadata
+++ b/extensions/CommonsMetadata
-Subproject commit 1d6481db5712c812c0d934e1502f2ae25f2046f4
+Subproject commit 98f7fe961585e8c397770ab60b616c7233e5b8f6

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23e05772440754d288b5dc894eef838aab2a953b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org

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


[MediaWiki-commits] [Gerrit] Update CommonsMetadata to 1.25wmf7 HEAD - change (mediawiki/core)

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

Change subject: Update CommonsMetadata to 1.25wmf7 HEAD
..


Update CommonsMetadata to 1.25wmf7 HEAD

Change-Id: I23e05772440754d288b5dc894eef838aab2a953b
---
M extensions/CommonsMetadata
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/extensions/CommonsMetadata b/extensions/CommonsMetadata
index 1d6481d..98f7fe9 16
--- a/extensions/CommonsMetadata
+++ b/extensions/CommonsMetadata
-Subproject commit 1d6481db5712c812c0d934e1502f2ae25f2046f4
+Subproject commit 98f7fe961585e8c397770ab60b616c7233e5b8f6

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23e05772440754d288b5dc894eef838aab2a953b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.25wmf7
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Fix php short tags - change (operations/mediawiki-config)

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

Change subject: Fix php short tags
..


Fix php short tags

Change-Id: Ie5d691581ded0aefb940a415c3ed0218bbef1c74
---
M wmf-config/missing.php
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/wmf-config/missing.php b/wmf-config/missing.php
index 50b143a..90aed31 100644
--- a/wmf-config/missing.php
+++ b/wmf-config/missing.php
@@ -215,7 +215,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**
@@ -273,7 +273,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**
@@ -309,7 +309,7 @@
 /body
 /html
 
-?
+?php
 }
 
 /**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie5d691581ded0aefb940a415c3ed0218bbef1c74
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] Update CDB code from upstream (mediawiki core) - 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 CDB code from upstream (mediawiki core)
..


Update CDB code from upstream (mediawiki core)

Minor refactoring to add cdb folder

Bug: 73454
Change-Id: I74e53c825a553523a8830f2470c00f448d5aea3a
---
M multiversion/Cdb.php
D multiversion/CdbPHP.php
A multiversion/cdb/CdbException.php
A multiversion/cdb/CdbFunctions.php
A multiversion/cdb/CdbReader.php
C multiversion/cdb/CdbReaderDBA.php
A multiversion/cdb/CdbReaderPHP.php
A multiversion/cdb/CdbWriter.php
R multiversion/cdb/CdbWriterDBA.php
A multiversion/cdb/CdbWriterPHP.php
10 files changed, 757 insertions(+), 708 deletions(-)

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



diff --git a/multiversion/Cdb.php b/multiversion/Cdb.php
index 2e34409..b67cf62 100644
--- a/multiversion/Cdb.php
+++ b/multiversion/Cdb.php
@@ -1,165 +1,10 @@
 ?php
-/**
- * Native CDB file reader and writer.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- * http://www.gnu.org/copyleft/gpl.html
- *
- * @file
- */
 
-/**
- * Read from a CDB file.
- * Native and pure PHP implementations are provided.
- * http://cr.yp.to/cdb.html
- */
-abstract class CdbReader {
-   /**
-* The file handle
-*/
-   protected $handle;
-
-   /**
-* Open a file and return a subclass instance
-*
-* @param $fileName string
-*
-* @return CdbReader
-*/
-   public static function open( $fileName ) {
-   return self::haveExtension() ?
-   new CdbReaderDBA( $fileName ) :
-   new CdbReaderPHP( $fileName );
-   }
-
-   /**
-* Returns true if the native extension is available
-*
-* @return bool
-*/
-   public static function haveExtension() {
-   if ( !function_exists( 'dba_handlers' ) ) {
-   return false;
-   }
-   $handlers = dba_handlers();
-   if ( !in_array( 'cdb', $handlers ) || !in_array( 'cdb_make', 
$handlers ) ) {
-   return false;
-   }
-
-   return true;
-   }
-
-   /**
-* Create the object and open the file
-*
-* @param $fileName string
-*/
-   abstract public function __construct( $fileName );
-
-   /**
-* Close the file. Optional, you can just let the variable go out of 
scope.
-*/
-   abstract public function close();
-
-   /**
-* Get a value with a given key. Only string values are supported.
-*
-* @param $key string
-*/
-   abstract public function get( $key );
-}
-
-/**
- * Write to a CDB file.
- * Native and pure PHP implementations are provided.
- */
-abstract class CdbWriter {
-   /**
-* The file handle
-*/
-   protected $handle;
-
-   /**
-* File we'll be writing to when we're done
-* @var string
-*/
-   protected $realFileName;
-
-   /**
-* File we write to temporarily until we're done
-* @var string
-*/
-   protected $tmpFileName;
-
-   /**
-* Open a writer and return a subclass instance.
-* The user must have write access to the directory, for temporary file 
creation.
-*
-* @param $fileName string
-*
-* @return CdbWriterDBA|CdbWriterPHP
-*/
-   public static function open( $fileName ) {
-   return CdbReader::haveExtension() ?
-   new CdbWriterDBA( $fileName ) :
-   new CdbWriterPHP( $fileName );
-   }
-
-   /**
-* Create the object and open the file
-*
-* @param $fileName string
-*/
-   abstract public function __construct( $fileName );
-
-   /**
-* Set a key to a given value. The value will be converted to string.
-* @param $key string
-* @param $value string
-*/
-   abstract public function set( $key, $value );
-
-   /**
-* Close the writer object. You should call this function before the 
object
-* goes out of scope, to write out the final hashtables.

[MediaWiki-commits] [Gerrit] Add ignore templates for 'pt' lang to commonscat.py - change (pywikibot/core)

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

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

Change subject: Add ignore templates for 'pt' lang to commonscat.py
..

Add ignore templates for 'pt' lang to commonscat.py

Also:
- fixed pep257 docstrings
- refactored findCommonscatLink

Bug: 68941
Change-Id: I0c7d4956897d57a527a27fca90b9d456ada8c3c8
---
M scripts/commonscat.py
1 file changed, 30 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/98/173498/1

diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index 1d89b7c..ad004f6 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -204,7 +204,11 @@
 'nl': [u'Commons', u'Commonsklein', u'Commonscatklein', u'Catbeg',
u'Catsjab', u'Catwiki'],
 'om': [u'Commons'],
-'pt': [u'Correlatos'],
+'pt': [u'Correlatos',
+   u'Commons',
+   u'Commons cat multi',
+   u'Commons1',
+   u'Commons2'],
 'simple': [u'Sisterlinks'],
 'ru': [u'Навигация', u'Навигация для категорий', u'КПР', u'КБР',
u'Годы в России', u'commonscat-inline'],
@@ -240,6 +244,7 @@
 Commons categorisation bot.
 
 def __init__(self, generator, always, summary=None):
+Constructor.
 super(CommonscatBot, self).__init__(always=always)
 self.generator = generator
 self.summary = summary
@@ -400,25 +405,32 @@
 % (page.title(), error.url))
 
 def findCommonscatLink(self, page=None):
-# In Pywikibot 2.0, page.interwiki() now returns Link objects, not 
Page objects
+Find CommonsCat template on interwiki pages.
+
+In Pywikibot 2.0, page.interwiki() now returns Link objects,
+not Page objects
+
+@rtype: unicode, name of a valid commons category
+
 for ipageLink in page.langlinks():
 ipage = pywikibot.page.Page(ipageLink)
 pywikibot.log(Looking for template on %s % (ipage.title()))
 try:
-if(ipage.exists() and not ipage.isRedirectPage()
-   and not ipage.isDisambig()):
-commonscatLink = self.getCommonscatLink(ipage)
-if commonscatLink:
-(currentTemplate,
- possibleCommonscat, linkText, Note) = commonscatLink
-checkedCommonscat = self.checkCommonscatLink(
-possibleCommonscat)
-if (checkedCommonscat != u''):
-pywikibot.output(
-uFound link for %s at [[%s:%s]] to %s.
-% (page.title(), ipage.site.code,
-   ipage.title(), checkedCommonscat))
-return checkedCommonscat
+if(not ipage.exists() or ipage.isRedirectPage()
+   or ipage.isDisambig()):
+continue
+commonscatLink = self.getCommonscatLink(ipage)
+if not commonscatLink:
+continue
+(currentTemplate,
+ possibleCommonscat, linkText, Note) = commonscatLink
+checkedCommonscat = 
self.checkCommonscatLink(possibleCommonscat)
+if (checkedCommonscat != u''):
+pywikibot.output(
+uFound link for %s at [[%s:%s]] to %s.
+% (page.title(), ipage.site.code,
+   ipage.title(), checkedCommonscat))
+return checkedCommonscat
 except pywikibot.BadTitle:
 #The interwiki was incorrect
 return u''
@@ -427,7 +439,7 @@
 def getCommonscatLink(self, wikipediaPage=None):
 Find CommonsCat template on page.
 
-@rtype: tuple of (templatename, target)
+@rtype: tuple of (templatename, target, linktext, note)
 
 primaryCommonscat, commonscatAlternatives = self.getCommonscatTemplate(
 wikipediaPage.site.code)
@@ -457,7 +469,7 @@
  Return the name of a valid commons category.
 
 If the page is a redirect this function tries to follow it.
-If the page doesnt exists the function will return an empty string
+If the page doesn't exists the function will return an empty string
 
 
 pywikibot.log(getCommonscat:  + name)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c7d4956897d57a527a27fca90b9d456ada8c3c8
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa mpaa.w...@gmail.com

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

[MediaWiki-commits] [Gerrit] Preloading tests - change (pywikibot/core)

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

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

Change subject: Preloading tests
..

Preloading tests

QueryGenerator only performs continuation for the first
query module that uses continuation.

APISite.preloadpages always uses the 'revisions' module,
which needs continuation.  The langlinks and templates
parameters of APISite.preloadpages require two additional
continuations to be operational at the same time, but this
exposes functionality that does not appear to be supported by
QueryGenerator.

There was only one very simple test for preloadpages.  This
adds more tests for basic single continuation operation,
and three tests for multi-continuation operation.

Bug: 73461
Change-Id: I11df5361bd2b67cce132faba252552bfa5053827
---
M pywikibot/site.py
M tests/site_tests.py
2 files changed, 254 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/99/173499/1

diff --git a/pywikibot/site.py b/pywikibot/site.py
index ba1b00c..814c9a6 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -2436,8 +2436,8 @@
 break
 else:
 pywikibot.warning(
-upreloadpages: Query returned unexpected 
title
-u'%s' % pagedata['title'])
+upreloadpages: Query returned unexpected 
+utitle '%s' % pagedata['title'])
 continue
 except KeyError:
 pywikibot.debug(uNo 'title' in %s % pagedata, _logger)
diff --git a/tests/site_tests.py b/tests/site_tests.py
index 10d36ed..edc6baa 100644
--- a/tests/site_tests.py
+++ b/tests/site_tests.py
@@ -280,20 +280,6 @@
 if a:
 self.assertEqual(a[0], mainpage)
 
-def testPreload(self):
-Test that preloading works.
-mysite = self.get_site()
-mainpage = self.get_mainpage()
-count = 0
-for page in mysite.preloadpages(mysite.pagelinks(mainpage, total=10)):
-self.assertIsInstance(page, pywikibot.Page)
-self.assertIsInstance(page.exists(), bool)
-if page.exists():
-self.assertTrue(hasattr(page, _text))
-count += 1
-if count = 5:
-break
-
 def testLinkMethods(self):
 Test site methods for getting links to and from a page.
 mysite = self.get_site()
@@ -1562,6 +1548,258 @@
 self.assertTrue(site.is_uploaddisabled())
 
 
+class TestPagePreloading(DefaultSiteTestCase):
+
+Test site.preloadpages().
+
+def test_pageids(self):
+Test basic preloading with pageids.
+mysite = self.get_site()
+mainpage = self.get_mainpage()
+count = 0
+links = mysite.pagelinks(mainpage, total=10)
+# preloadpages will send the page ids,
+# as they have already been loaded by pagelinks
+for page in mysite.preloadpages(links):
+self.assertIsInstance(page, pywikibot.Page)
+self.assertIsInstance(page.exists(), bool)
+if page.exists():
+self.assertTrue(hasattr(page, _text))
+self.assertEqual(len(page._revisions), 1)
+self.assertFalse(hasattr(page, '_pageprops'))
+count += 1
+if count = 5:
+break
+
+def test_titles(self):
+Test basic preloading with titles.
+mysite = self.get_site()
+mainpage = self.get_mainpage()
+count = 0
+links = mysite.pagelinks(mainpage, total=10)
+
+# remove the pageids that have already been loaded above by pagelinks
+# so that preloadpages will use the titles instead
+for page in links:
+del page._pageid
+
+for page in mysite.preloadpages(links):
+self.assertIsInstance(page, pywikibot.Page)
+self.assertIsInstance(page.exists(), bool)
+if page.exists():
+self.assertTrue(hasattr(page, _text))
+self.assertEqual(len(page._revisions), 1)
+self.assertFalse(hasattr(page, '_pageprops'))
+count += 1
+if count = 5:
+break
+
+def test_preload_continuation(self):
+Test preloading continuation works.
+mysite = self.get_site()
+mainpage = self.get_mainpage()
+count = 0
+links = mysite.pagelinks(mainpage, total=10)
+for page in mysite.preloadpages(links, groupsize=5):
+self.assertIsInstance(page, pywikibot.Page)
+self.assertIsInstance(page.exists(), bool)
+if page.exists():
+self.assertTrue(hasattr(page, _text))
+self.assertEqual(len(page._revisions), 1)
+

[MediaWiki-commits] [Gerrit] don't show top dashed border on wikibase-toolbar-wrapper for... - change (mediawiki...Wikibase)

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

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

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(-)


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

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: newchange
Gerrit-Change-Id: I488d30baac53a8c590b27eb242f08157096c07ca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: wmf/1.25wmf8
Gerrit-Owner: Aude aude.w...@gmail.com

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


[MediaWiki-commits] [Gerrit] Add ignore templates for 'pt' lang to commonscat.py - change (pywikibot/core)

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

Change subject: Add ignore templates for 'pt' lang to commonscat.py
..


Add ignore templates for 'pt' lang to commonscat.py

Also:
- fixed pep257 docstrings
- refactored findCommonscatLink

Bug: 68941
Change-Id: I0c7d4956897d57a527a27fca90b9d456ada8c3c8
---
M scripts/commonscat.py
1 file changed, 30 insertions(+), 18 deletions(-)

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



diff --git a/scripts/commonscat.py b/scripts/commonscat.py
index 1d89b7c..ad004f6 100755
--- a/scripts/commonscat.py
+++ b/scripts/commonscat.py
@@ -204,7 +204,11 @@
 'nl': [u'Commons', u'Commonsklein', u'Commonscatklein', u'Catbeg',
u'Catsjab', u'Catwiki'],
 'om': [u'Commons'],
-'pt': [u'Correlatos'],
+'pt': [u'Correlatos',
+   u'Commons',
+   u'Commons cat multi',
+   u'Commons1',
+   u'Commons2'],
 'simple': [u'Sisterlinks'],
 'ru': [u'Навигация', u'Навигация для категорий', u'КПР', u'КБР',
u'Годы в России', u'commonscat-inline'],
@@ -240,6 +244,7 @@
 Commons categorisation bot.
 
 def __init__(self, generator, always, summary=None):
+Constructor.
 super(CommonscatBot, self).__init__(always=always)
 self.generator = generator
 self.summary = summary
@@ -400,25 +405,32 @@
 % (page.title(), error.url))
 
 def findCommonscatLink(self, page=None):
-# In Pywikibot 2.0, page.interwiki() now returns Link objects, not 
Page objects
+Find CommonsCat template on interwiki pages.
+
+In Pywikibot 2.0, page.interwiki() now returns Link objects,
+not Page objects
+
+@rtype: unicode, name of a valid commons category
+
 for ipageLink in page.langlinks():
 ipage = pywikibot.page.Page(ipageLink)
 pywikibot.log(Looking for template on %s % (ipage.title()))
 try:
-if(ipage.exists() and not ipage.isRedirectPage()
-   and not ipage.isDisambig()):
-commonscatLink = self.getCommonscatLink(ipage)
-if commonscatLink:
-(currentTemplate,
- possibleCommonscat, linkText, Note) = commonscatLink
-checkedCommonscat = self.checkCommonscatLink(
-possibleCommonscat)
-if (checkedCommonscat != u''):
-pywikibot.output(
-uFound link for %s at [[%s:%s]] to %s.
-% (page.title(), ipage.site.code,
-   ipage.title(), checkedCommonscat))
-return checkedCommonscat
+if(not ipage.exists() or ipage.isRedirectPage()
+   or ipage.isDisambig()):
+continue
+commonscatLink = self.getCommonscatLink(ipage)
+if not commonscatLink:
+continue
+(currentTemplate,
+ possibleCommonscat, linkText, Note) = commonscatLink
+checkedCommonscat = 
self.checkCommonscatLink(possibleCommonscat)
+if (checkedCommonscat != u''):
+pywikibot.output(
+uFound link for %s at [[%s:%s]] to %s.
+% (page.title(), ipage.site.code,
+   ipage.title(), checkedCommonscat))
+return checkedCommonscat
 except pywikibot.BadTitle:
 #The interwiki was incorrect
 return u''
@@ -427,7 +439,7 @@
 def getCommonscatLink(self, wikipediaPage=None):
 Find CommonsCat template on page.
 
-@rtype: tuple of (templatename, target)
+@rtype: tuple of (templatename, target, linktext, note)
 
 primaryCommonscat, commonscatAlternatives = self.getCommonscatTemplate(
 wikipediaPage.site.code)
@@ -457,7 +469,7 @@
  Return the name of a valid commons category.
 
 If the page is a redirect this function tries to follow it.
-If the page doesnt exists the function will return an empty string
+If the page doesn't exists the function will return an empty string
 
 
 pywikibot.log(getCommonscat:  + name)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0c7d4956897d57a527a27fca90b9d456ada8c3c8
Gerrit-PatchSet: 1
Gerrit-Project: pywikibot/core
Gerrit-Branch: master
Gerrit-Owner: Mpaa mpaa.w...@gmail.com
Gerrit-Reviewer: John Vandenberg jay...@gmail.com
Gerrit-Reviewer: Ladsgroup ladsgr...@gmail.com
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
Gerrit-Reviewer: jenkins-bot 


[MediaWiki-commits] [Gerrit] Remove deprecated (since 1.21) Sites class - change (mediawiki/core)

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

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

Change subject: Remove deprecated (since 1.21) Sites class
..

Remove deprecated (since 1.21) Sites class

this is an 'alias' for SiteSQLStore and is unused
afaik in Wikibase and elsewhere.

Change-Id: Ibee3e2a89399b97fa4de48e52c3d527714cd0731
---
M autoload.php
M includes/site/SiteSQLStore.php
2 files changed, 0 insertions(+), 50 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index fe16ca3..b91d72e 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1031,7 +1031,6 @@
 $wgAutoloadLocalClasses['SiteStatsInit'] = __DIR__ . '/includes/SiteStats.php';
 $wgAutoloadLocalClasses['SiteStatsUpdate'] = __DIR__ . 
'/includes/deferred/SiteStatsUpdate.php';
 $wgAutoloadLocalClasses['SiteStore'] = __DIR__ . 
'/includes/site/SiteStore.php';
-$wgAutoloadLocalClasses['Sites'] = __DIR__ . '/includes/site/SiteSQLStore.php';
 $wgAutoloadLocalClasses['Skin'] = __DIR__ . '/includes/skins/Skin.php';
 $wgAutoloadLocalClasses['SkinApi'] = __DIR__ . '/includes/skins/SkinApi.php';
 $wgAutoloadLocalClasses['SkinApiTemplate'] = __DIR__ . 
'/includes/skins/SkinApiTemplate.php';
diff --git a/includes/site/SiteSQLStore.php b/includes/site/SiteSQLStore.php
index e5d05be..fde22f1 100644
--- a/includes/site/SiteSQLStore.php
+++ b/includes/site/SiteSQLStore.php
@@ -444,52 +444,3 @@
}
 
 }
-
-/**
- * @deprecated since 1.21
- */
-class Sites extends SiteSQLStore {
-
-   /**
-* Factory for creating new site objects.
-*
-* @since 1.21
-* @deprecated since 1.21
-*
-* @param string|bool $globalId
-*
-* @return Site
-*/
-   public static function newSite( $globalId = false ) {
-   $site = new Site();
-
-   if ( $globalId !== false ) {
-   $site-setGlobalId( $globalId );
-   }
-
-   return $site;
-   }
-
-   /**
-* @deprecated since 1.21
-* @return SiteStore
-*/
-   public static function singleton() {
-   static $singleton;
-
-   if ( $singleton === null ) {
-   $singleton = new static();
-   }
-
-   return $singleton;
-   }
-
-   /**
-* @deprecated since 1.21
-* @param string $group
-* @return SiteList
-*/
-   public function getSiteGroup( $group ) {
-   return $this-getSites()-getGroup( $group );
-   }
-}

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

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

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


[MediaWiki-commits] [Gerrit] 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 re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: TTO at.li...@live.com.au
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 aude.w...@gmail.com
Gerrit-Reviewer: Aude aude.w...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 legoktm.wikipe...@gmail.com
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Jack Phoenix j...@countervandalism.net
Gerrit-Reviewer: jenkins-bot 

___
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] 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 siebr...@kitano.nl

___
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 re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 siebr...@kitano.nl
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
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 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 

[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
--- 

[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 re...@wikimedia.org

___
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 re...@wikimedia.org

___
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 re...@wikimedia.org

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


[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 legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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] 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 re...@wikimedia.org

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


[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 yuvipa...@gmail.com
Gerrit-Reviewer: Andrew Bogott abog...@wikimedia.org
Gerrit-Reviewer: Dzahn dz...@wikimedia.org
Gerrit-Reviewer: Giuseppe Lavagetto glavage...@wikimedia.org
Gerrit-Reviewer: Ori.livneh o...@wikimedia.org
Gerrit-Reviewer: Yuvipanda yuvipa...@gmail.com
Gerrit-Reviewer: coren mpellet...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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' : $('textarea /')
-   .css({
+   mw.addDialog( {
+   'width': '640',
+   'height': '480',
+   'title': $(this).attr( 'title' ),
+   'content': $('textarea /')
+   .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 $( 'a /' ).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() 
{ 

[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' : $('textarea /')
-   .css({
+   mw.addDialog( {
+   'width': '640',
+   'height': '480',
+   'title': $(this).attr( 'title' ),
+   'content': $('textarea /')
+   .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 $( 'a /' ).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); }
-  

[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 yuvipa...@gmail.com

___
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 krinklem...@gmail.com

___
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 krinklem...@gmail.com

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


[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 siebr...@kitano.nl
Gerrit-Reviewer: Anomie bjor...@wikimedia.org
Gerrit-Reviewer: Raimond Spekking raimond.spekk...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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': $('textarea /')
-   .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 $( 'a /' ).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.error.info ){
-  

[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() . '!-- ' . $category . ' --';
-
-   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 ) . 'ul 
class=list-inline ';
-
-   $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 ) . '/ul' .
-   $this-indent( -1 ) . '/li';
-   }
+   $ret .= $this-buildTabGroup( $category, $tabs );
}
$this-indent( -2 );
 
if ( $ret !== '' ){
-   $ret = $this-indent( 1 ) . '!-- Content navigation --' .
-   $this-indent() .
-   \Html::openElement( 'ul',
-   array(
-   'class' = 'p-contentnavigation ' . 
$this-getClassString(),
-   'id' = 
IdRegistry::getRegistry()-getId( 'p-contentnavigation' ),
-   ) ) .
-   $ret .
-   $this-indent() . '/ul';
+   $ret =
+   $this-indent( 1 ) . '!-- Content navigation 
--' .
+   $this-indent() . \Html::openElement( 'ul',
+   array(
+   'class' = 'p-contentnavigation 
' . $this-getClassString(),
+   'id' = 
IdRegistry::getRegistry()-getId( 'p-contentnavigation' ),
+   ) ) .
+   $ret .
+   $this-indent() . '/ul';
}
 
return $ret;
@@ -182,5 +137,89 @@
return $namespaceKey;
}
 
+   /**
+* @param $tab
+* @param $key
+* @return string
+*/
+   protected function 

[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: 'ul id=p-contentnavigation
  *
- * @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() . '!-- ' . $category . ' --';
-
-   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 ) . 'ul 
class=list-inline ';
-
-   $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 ) . '/ul' .
-   $this-indent( -1 ) . '/li';
-   }
+   foreach ( $contentNavigation as $category = $tabsDescription ) 
{
+   $ret .= $this-buildTabGroup( $category, 
$tabsDescription );
}
$this-indent( -2 );
 
-   if ( $ret !== '' ){
-   $ret = $this-indent( 1 ) . '!-- Content navigation --' .
-   $this-indent() .
-   \Html::openElement( 'ul',
-   

[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.log( 

[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 aklap...@wikimedia.org

___
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 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 http://www.gnu.org/licenses/.
  *
  * @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
+  

[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 http://www.gnu.org/licenses/.
  *
  * @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
 */
public function 

[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 krinklem...@gmail.com

___
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 h...@online.de

___
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 krinklem...@gmail.com
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 krinklem...@gmail.com

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


[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 ebernhard...@wikimedia.org
Gerrit-Reviewer: EBernhardson ebernhard...@wikimedia.org
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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.hoverIntentjQuery.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.length1opts.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(contentSelectopts.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!=nullcontent==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?$(div/).append(cacheData.replace(/script(.|\s)*?\/script/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?$(div/).append(XMLHttpRequest.responseText.replace(/script(.|\s)*?\/script/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.shadowBlurMath.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.shadowBlurMath.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
 

[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 @@
script type=text/javascript src=js/jquery-2.1.1.min.js/script
script type=text/javascript 
src=js/jquery-ui-1.11.2.custom.min.js/script
link rel=stylesheet href=css/custom.min.css/
-   script type=text/javascript src=js/jquery.jOrgChart.js/script
+   script type=text/javascript src=js/jquery.jOrgChart.minjs/script
script type=text/javascript src=js/jquery.bt.min.js/script
 /head
 body
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 = $(div class=' + opts.chartClass + '/);
-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();
-   });
-   

[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 @@
script type=text/javascript src=js/jquery-2.1.1.min.js/script
script type=text/javascript 
src=js/jquery-ui-1.11.2.custom.min.js/script
link rel=stylesheet href=css/custom.min.css/
-   script type=text/javascript src=js/jquery.jOrgChart.js/script
+   script type=text/javascript src=js/jquery.jOrgChart.minjs/script
script type=text/javascript src=js/jquery.bt.min.js/script
 /head
 body
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 = $(div class=' + opts.chartClass + '/);
-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();

[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.hoverIntentjQuery.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.length1opts.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(contentSelectopts.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!=nullcontent==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?$(div/).append(cacheData.replace(/script(.|\s)*?\/script/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?$(div/).append(XMLHttpRequest.responseText.replace(/script(.|\s)*?\/script/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.shadowBlurMath.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.shadowBlurMath.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
 

[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 @@
script type=text/javascript src=js/jquery-2.1.1.min.js/script
script type=text/javascript 
src=js/jquery-ui-1.11.2.custom.min.js/script
link rel=stylesheet href=css/custom.min.css/
-   script type=text/javascript src=js/jquery.jOrgChart.minjs/script
+   script type=text/javascript 
src=js/jquery.jOrgChart.min.js/script
script type=text/javascript src=js/jquery.bt.min.js/script
 /head
 body

-- 
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 re...@wikimedia.org

___
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 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 @@
script type=text/javascript src=js/jquery-2.1.1.min.js/script
script type=text/javascript 
src=js/jquery-ui-1.11.2.custom.min.js/script
link rel=stylesheet href=css/custom.min.css/
-   script type=text/javascript src=js/jquery.jOrgChart.minjs/script
+   script type=text/javascript 
src=js/jquery.jOrgChart.min.js/script
script type=text/javascript src=js/jquery.bt.min.js/script
 /head
 body

-- 
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 re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 http://www.gnu.org/licenses/.
  *
  * @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
+*
+* @param string 

[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 http://www.gnu.org/licenses/.
  *
  * @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 $attributeNameInDomElement
+*
+* 

[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 federicol...@tiscali.it
Gerrit-Reviewer: Hoo man h...@online.de
Gerrit-Reviewer: Jackmcbarn jackmcb...@gmail.com
Gerrit-Reviewer: Matthias Mullie mmul...@wikimedia.org
Gerrit-Reviewer: Se4598 se4...@gmx.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] [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 = 

[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 krinklem...@gmail.com

___
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 krinklem...@gmail.com
Gerrit-Reviewer: Krinkle krinklem...@gmail.com
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 valhall...@arctus.nl

___
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
templatedata 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()
)
-   . 'table class=wikitable mw-templatedata-doc-params'
+   . 'table class=wikitable mw-templatedata-doc-params 
sortable'
. 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 glaisher.w...@gmail.com

___
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 valhall...@arctus.nl
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

___
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 krinklem...@gmail.com

___
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 @@
 /div
 {{#variantHeader}}
 h3 class=list-header{{{variantHeader}}}/h3
-ul class=page-list
+ul class=page-list list-indent
{{#variants}}
li
a href={{url}} hreflang={{lang}} 
lang={{lang}}{{langname}}/a
@@ -15,7 +15,7 @@
 {{#variantHeader}}
 h3 class=list-header{{{header}}}/h3
 {{/variantHeader}}
-ul class=page-list
+ul class=page-list list-indent
{{#languages}}
li {{#preferred}}class=preferred{{/preferred}}
a href={{url}} hreflang={{lang}} 
lang={{lang}}span{{langname}}/span{{#title}} | {{title}}{{/title}}/a

-- 
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 florian.schmidt.wel...@t-online.de

___
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 bsitzm...@wikimedia.org

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


[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 florian.schmidt.wel...@t-online.de

___
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();
-   //var 

[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 siebr...@kitano.nl

___
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 siebr...@kitano.nl
Gerrit-Reviewer: Merlijn van Deen valhall...@arctus.nl
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 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 stablebeta 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 florian.schmidt.wel...@t-online.de

___
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 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() . '!-- ' . $boxName . ' --';
 
-   $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() . '!-- empty --';
+   return $this-indent() . '!-- empty --';
}
+   }
 
-   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 ) . 'a href=# 
class=dropdown-toggle data-toggle=dropdown' .
+   htmlspecialchars( $box[ 'header' ] ) . ' b 
class=caret/b/a';
 
-   $ret .= $this-indent() . \Html::rawElement( 'li',
-   array(
-   'class' = '',
-   'title' = Linker::titleAttrib( 
$box[ 'id' ] )
-   ),
-   'a href=#' . htmlspecialchars( 
$box[ 'header' ] ) . '/a'
-   );
-
-   } 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 ) . 'a href=# 
class=dropdown-toggle data-toggle=dropdown' .
-   htmlspecialchars( $box[ 'header' ] ) . ' b 
class=caret/b/a';
-

[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() . '!-- ' . $boxName . ' --';
 
-   $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() . '!-- empty --';
+   return $this-indent() . '!-- empty --';
}
+   }
 
-   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 ) . 'a href=# 
class=dropdown-toggle data-toggle=dropdown' .
+   htmlspecialchars( $box[ 'header' ] ) . ' b 
class=caret/b/a';
 
-   $ret .= $this-indent() . \Html::rawElement( 'li',
-   array(
-   'class' = '',
-   'title' = Linker::titleAttrib( 
$box[ 'id' ] )
-   ),
-   'a href=#' . htmlspecialchars( 
$box[ 'header' ] ) . '/a'
-   );
-
-   } 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 ) . 'a href=# 
class=dropdown-toggle data-toggle=dropdown' .
-   htmlspecialchars( $box[ 'header' ] ) . ' b 
class=caret/b/a';
-
-   // open list of dropdown menu items
-

[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 hartman.w...@gmail.com

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


[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 hartman.w...@gmail.com

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


[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 http://www.gnu.org/licenses/.
  *
  * @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() . '!-- ' . $boxName . ' --';
+   $ret = $this-indent() . '!-- ' . $menuName . ' --';
 
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] 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 http://www.gnu.org/licenses/.
  *
  * @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() . '!-- ' . $boxName . ' --';
+   $ret = $this-indent() . '!-- ' . $menuName . ' --';
 
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 

[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: If66078ac7e0a6ec63ff618fa86be32868e9127b0

[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 pleasest...@live.com

___
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 florian.schmidt.wel...@t-online.de

___
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 florian.schmidt.wel...@t-online.de

___
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 umherirrender_de...@web.de
Gerrit-Reviewer: CSteipp cste...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 re...@wikimedia.org

___
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 re...@wikimedia.org
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 re...@wikimedia.org

___
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 siebr...@kitano.nl

___
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 siebr...@kitano.nl
Gerrit-Reviewer: Siebrand siebr...@kitano.nl
Gerrit-Reviewer: jenkins-bot 

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


[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 has...@free.fr
Gerrit-Reviewer: Hashar has...@free.fr
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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
--- 

[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 umherirrender_de...@web.de
Gerrit-Reviewer: Legoktm legoktm.wikipe...@gmail.com
Gerrit-Reviewer: Parent5446 tylerro...@gmail.com
Gerrit-Reviewer: Reedy re...@wikimedia.org
Gerrit-Reviewer: Skizzerz skizz...@gmail.com
Gerrit-Reviewer: TTO at.li...@live.com.au
Gerrit-Reviewer: Umherirrender umherirrender_de...@web.de
Gerrit-Reviewer: jenkins-bot 

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


[MediaWiki-commits] [Gerrit] 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 niklas.laxst...@gmail.com

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


  1   2   >