[MediaWiki-commits] [Gerrit] Fix unit tests when $wgEmailAuthentication is set to false - change (mediawiki/core)

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

Change subject: Fix unit tests when $wgEmailAuthentication is set to false
..


Fix unit tests when $wgEmailAuthentication is set to false

Since d2a5cf3 (I0b906b23de), 'emailaddress' and 'emailauthentication'
fields don't have any more CSS classes when $wgEmailAuthentication is
set to false which is breaking the tests.

Force $wgEmailAuthentication to true, so that the tests work in all cases.

Change-Id: Idc156f88ff1bc8595009056166f13191cf5c5c25
---
M tests/phpunit/includes/PreferencesTest.php
1 file changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/tests/phpunit/includes/PreferencesTest.php 
b/tests/phpunit/includes/PreferencesTest.php
index b909f26..392ad08 100644
--- a/tests/phpunit/includes/PreferencesTest.php
+++ b/tests/phpunit/includes/PreferencesTest.php
@@ -30,7 +30,10 @@
protected function setUp() {
parent::setUp();
 
-   $this->setMwGlobals( 'wgEnableEmail', true );
+   $this->setMwGlobals( array(
+   'wgEnableEmail' => true,
+   'wgEmailAuthentication' => true,
+   ) );
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idc156f88ff1bc8595009056166f13191cf5c5c25
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: IAlex 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Drop support for old skins that don't use head element. - change (mediawiki/core)

2013-05-12 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Drop support for old skins that don't use head element.
..

Drop support for old skins that don't use head element.

These skins have been obsolete since 1.16 and aren't supported well at this 
point.
This deprecates those skins and begins deprecation of the creation of  
contents
with only chunks of OutputPage stuff. The entire head should be created by 
OutputPage.

This also deprecates some old methods responsible for returning raw chunks of 
html for the head:
* getScript
* getHeadItems

Output of HeadItems is also tweaked. Previously there was no newline added 
after each, now their is.
Most of the callers of addHeadItem don't use their own newline and as a result 
end up on one line.

Change-Id: I13e25cc8d8fc3aa682f23b019a2fda0e809a5f64
---
M RELEASE-NOTES-1.22
M includes/OutputPage.php
M includes/SkinTemplate.php
3 files changed, 18 insertions(+), 38 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/64/63364/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ad12bf9..3f5c8fd 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -152,6 +152,7 @@
   user ID, or file name.  The old Special:Filepath page was reimplemented
   to redirect through Special:Redirect.
 * Monobook: Removed the old conditional stylesheets for Opera 6, 7 and 9.
+* BREAKING CHANGE: Old skins not using headelement are no longer supported.
 
 == Compatibility ==
 
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 746cd0e..93bb87a 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -437,8 +437,10 @@
 * Get all registered JS and CSS tags for the header.
 *
 * @return String
+* @deprecated since 1.22 Use OutputPage::headElement to build the full 
header.
 */
function getScript() {
+   wfDeprecated( __METHOD__, '1.22' );
return $this->mScripts . $this->getHeadItems();
}
 
@@ -592,8 +594,11 @@
 * Get all header items in a string
 *
 * @return String
+* @deprecated since 1.22 Use OutputPage::headElement or
+* if absolutely necessary use OutputPage::getHeadItemsArray.
 */
function getHeadItems() {
+   wfDeprecated( __METHOD__, '1.22' );
$s = '';
foreach ( $this->mHeadItems as $item ) {
$s .= $item;
@@ -2498,12 +2503,15 @@
 
$ret .= Html::element( 'title', null, $this->getHTMLTitle() ) . 
"\n";
 
-   $ret .= implode( "\n", array(
-   $this->getHeadLinks( null, true ),
-   $this->buildCssLinks(),
-   $this->getHeadScripts(),
-   $this->getHeadItems()
-   ) );
+   foreach ( $this->getHeadLinksArray( true ) as $item ) {
+   $ret .= $item . "\n";
+   }
+   $ret .= $this->buildCssLinks() . "\n";
+   $ret .= $this->getHeadScripts() . "\n";
+
+   foreach ( $this->mHeadItems as $item ) {
+   $ret .= $item . "\n";
+   }
 
$closeHead = Html::closeElement( 'head' );
if ( $closeHead ) {
@@ -3381,8 +3389,10 @@
 * @param bool $addContentType Whether "" specifying content type 
should be returned
 *
 * @return string HTML tag links to be put in the header.
+* @deprecated since 1.22 Use OutputPage::headElement or if you have 
to, OutputPage::getHeadLinksArray directly.
 */
public function getHeadLinks( $unused = null, $addContentType = false ) 
{
+   wfDeprecated( __METHOD__, '1.22' );
return implode( "\n", $this->getHeadLinksArray( $addContentType 
) );
}
 
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index e53d424..cca24d7 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -90,12 +90,6 @@
 */
var $template = 'QuickTemplate';
 
-   /**
-* Whether this skin use OutputPage::headElement() to generate the 
""
-* tag
-*/
-   var $useHeadElement = false;
-
/**#@-*/
 
/**
@@ -174,7 +168,6 @@
global $wgContLang;
global $wgScript, $wgStylePath;
global $wgMimeType, $wgJsMimeType;
-   global $wgXhtmlDefaultNamespace, $wgXhtmlNamespaces, 
$wgHtml5Version;
global $wgDisableCounters, $wgSitename, $wgLogo;
global $wgMaxCredits, $wgShowCreditsIfMax;
global $wgPageShowWatchingUsers;
@@ -225,26 +218,6 @@
}
 
wfProfileOut( __METHOD__ . '-stuff' );
-
-   wfProfileIn( __METHOD__ . '-stuff-head' );
- 

[MediaWiki-commits] [Gerrit] Revert "(bug 1495) Enable on-wiki message language fallbacks" - change (mediawiki/core)

2013-05-12 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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


Change subject: Revert "(bug 1495) Enable on-wiki message language fallbacks"
..

Revert "(bug 1495) Enable on-wiki message language fallbacks"

This reverts commit d434bfcf3bbab05660ed8f798a4622487dd8ba56.

See Iac7ac4357dd80e8cdb238a6a207393f0712b3fe5.

Conflicts:
includes/cache/MessageCache.php
tests/phpunit/includes/cache/MessageCacheTest.php

Change-Id: I5ea8af299a14e052b265ebf9f21914ab0a4eb922
---
M includes/cache/MessageCache.php
M languages/Language.php
D tests/phpunit/includes/cache/MessageCacheTest.php
3 files changed, 33 insertions(+), 194 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/65/63365/1

diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 7425978..c406b5c 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -586,32 +586,27 @@
}
 
/**
-* Get a message from either the content language or the user language. 
The fallback
-* language order is the users language fallback union the content 
language fallback.
-* This list is then applied to find keys in the following order
-* 1) MediaWiki:$key/$langcode (for every language except the content 
language where
-*we look at MediaWiki:$key)
-* 2) Built-in messages via the l10n cache which is also in fallback 
order
+* Get a message from either the content language or the user language.
 *
 * @param string $key the message cache key
-* @param $useDB Boolean: If true will look for the message in the DB, 
false only
-*get the message from the DB, false to use only the compiled 
l10n cache.
-* @param bool|string|object $langcode Code of the language to get the 
message for.
-*- If string and a valid code, will create a standard language 
object
-*- If string but not a valid code, will create a basic 
language object
-*- If boolean and false, create object from the current users 
language
-*- If boolean and true, create object from the wikis content 
language
-*- If language object, use it as given
+* @param $useDB Boolean: get the message from the DB, false to use only
+*   the localisation
+* @param bool|string $langcode Code of the language to get the message 
for, if
+*  it is a valid code create a language for that 
language,
+*  if it is a string but not a valid code then make a 
basic
+*  language object, if it is a false boolean then use 
the
+*  current users language (as a fallback for the old
+*  parameter functionality), or if it is a true boolean
+*  then use the wikis content language (also as a
+*  fallback).
 * @param $isFullKey Boolean: specifies whether $key is a two part key
 *   "msg/lang".
 *
 * @throws MWException
-* @return string|bool False if the message doesn't exist, otherwise 
the message
+* @return string|bool
 */
function get( $key, $useDB = true, $langcode = true, $isFullKey = false 
) {
global $wgLanguageCode, $wgContLang;
-
-   wfProfileIn( __METHOD__ );
 
if ( is_int( $key ) ) {
// "Non-string key given" exception sometimes happens 
for numerical strings that become ints somewhere on their way here
@@ -619,37 +614,22 @@
}
 
if ( !is_string( $key ) ) {
-   wfProfileOut( __METHOD__ );
throw new MWException( 'Non-string key given' );
}
 
if ( strval( $key ) === '' ) {
# Shortcut: the empty key is always missing
-   wfProfileOut( __METHOD__ );
return false;
}
 
-
-   # Obtain the initial language object
-   if ( $isFullKey ) {
-   $keyParts = explode( '/', $key );
-   if ( count( $keyParts ) < 2 ) {
-   throw new MWException( "Message key '$key' does 
not appear to be a full key." );
-   }
-
-   $langcode = array_pop( $keyParts );
-   $key = implode( '/', $keyParts );
-   }
-
-   # Obtain a language object for the requested language from the 
passed language code
-   # Note that the language code could in fact be a language 
object already but we assume
-   # it's a string further below.
-   $requestedL

[MediaWiki-commits] [Gerrit] CoreParserFunctions::anchorencode should return a string - change (mediawiki/core)

2013-05-12 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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


Change subject: CoreParserFunctions::anchorencode should return a string
..

CoreParserFunctions::anchorencode should return a string

CoreParserFunctions::anchorencode incorrectly returns false rather than
the empty string when passed an empty string.

A simple cast fixes it; this likely wasn't noticed before since PHP was
automatically doing the cast anyway when the return value was merged
into wikitext.

Bug: 46608
Change-Id: I97556dbc4dcc1f102f6fed499d43dada388cdc5d
---
M includes/parser/CoreParserFunctions.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/66/63366/1

diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 542ac0f..cdd03aa 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -753,7 +753,7 @@
 */
static function anchorencode( $parser, $text ) {
$text = $parser->killMarkers( $text );
-   return substr( $parser->guessSectionNameFromWikiText( $text ), 
1);
+   return (string)substr( $parser->guessSectionNameFromWikiText( 
$text ), 1 );
}
 
static function special( $parser, $text ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97556dbc4dcc1f102f6fed499d43dada388cdc5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Anomie 

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


[MediaWiki-commits] [Gerrit] API: Fix parameter validation in setnotificationtimestamp - change (mediawiki/core)

2013-05-12 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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


Change subject: API: Fix parameter validation in setnotificationtimestamp
..

API: Fix parameter validation in setnotificationtimestamp

This was broken in I7a3d7b6e, when the ApiPageSet parameters stopped
being returned by getAllowedParams() and so by extractRequestParams().
Although it would be broken differently if they had been.

Change-Id: I4b6ec21fd7b7c932856546df1ccad574d996db1f
---
M includes/api/ApiPageSet.php
M includes/api/ApiSetNotificationTimestamp.php
2 files changed, 27 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/67/63367/1

diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index bab59b7..074efe4 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -218,6 +218,30 @@
}
 
/**
+* Return the parameter name that is the source of data for this PageSet
+*
+* If multiple source parameters are specified (e.g. titles and 
pageids),
+* one will be named arbitrarily.
+*
+* @return string|null
+*/
+   public function getDataSource() {
+   if ( $this->mAllowGenerator && isset( 
$this->mParams['generator'] ) ) {
+   return 'generator';
+   }
+   if ( isset( $this->mParams['titles'] ) ) {
+   return 'titles';
+   }
+   if ( isset( $this->mParams['pageids'] ) ) {
+   return 'pageids';
+   }
+   if ( isset( $this->mParams['revids'] ) ) {
+   return 'revids';
+   }
+   return null;
+   }
+
+   /**
 * Request an additional field from the page table.
 * Must be called before execute()
 * @param string $fieldName Field name
diff --git a/includes/api/ApiSetNotificationTimestamp.php 
b/includes/api/ApiSetNotificationTimestamp.php
index b40476a..58d5d9a 100644
--- a/includes/api/ApiSetNotificationTimestamp.php
+++ b/includes/api/ApiSetNotificationTimestamp.php
@@ -44,8 +44,9 @@
$this->requireMaxOneParameter( $params, 'timestamp', 'torevid', 
'newerthanrevid' );
 
$pageSet = $this->getPageSet();
-   $args = array_merge( array( $params, 'entirewatchlist' ), 
array_keys( $pageSet->getAllowedParams() ) );
-   call_user_func_array( array( $this, 'requireOnlyOneParameter' 
), $args );
+   if ( $params['entirewatchlist'] && $pageSet->getDataSource() 
!== null ) {
+   $this->dieUsage( "Cannot use 'entirewatchlist' at the 
same time as '{$pageSet->getDataSource()}'", 'multisource' );
+   }
 
$dbw = wfGetDB( DB_MASTER, 'api' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b6ec21fd7b7c932856546df1ccad574d996db1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Anomie 

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


[MediaWiki-commits] [Gerrit] Remove remaining JSON release notes - change (mediawiki/core)

2013-05-12 Thread PleaseStand (Code Review)
PleaseStand has uploaded a new change for review.

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


Change subject: Remove remaining JSON release notes
..

Remove remaining JSON release notes

Change-Id: I326f266716da50d223c65f2035c8d41021c20bae
Follows-Up: Id3b88102e768318e3605a19e9952121091a40915
---
M RELEASE-NOTES-1.21
1 file changed, 0 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/68/63368/1

diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index d984725..6b4ff04 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -339,17 +339,6 @@
   - ShowStats -> ShowSiteStats.
 * BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
   and moved it to the TitleBlacklist extension.
-* BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding
-  has changed:
-** MediaWiki no longer supports PHP installations in which the native JSON
-   extension is missing or disabled.
-** XmlJsCode objects can no longer be nested inside objects or arrays.
-   (For Xml::encodeJsCall(), this individually applies to each argument.)
-** The sets of characters escaped by default, along with the precise escape
-   sequences used, have changed (except for the Xml::escapeJsString()
-   function, which is now deprecated).
-* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
-  be sure to upgrade affected extensions at the same time (e.g. Collection).
 
 == Compatibility ==
 

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

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

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


[MediaWiki-commits] [Gerrit] Add throttle exception for Haifa University workshop on 12/5/13 - change (operations/mediawiki-config)

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

Change subject: Add throttle exception for Haifa University workshop on 12/5/13
..


Add throttle exception for Haifa University workshop on 12/5/13

Bug: 48301
Change-Id: Id80a78c95115e45fdb2e667f3ab6ddb11f161f11
---
M wmf-config/throttle.php
1 file changed, 5 insertions(+), 5 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  Dereckson: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 22a5124..12c95ce 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -20,11 +20,11 @@
 
 ## Add throttling definitions below.
 
-$wmfThrottlingExceptions[] = array( // Bug 47315, itwiki GLAM event
-   'from'   => '2013-04-20T11:00 +0:00',
-   'to' => '2013-04-20T18:00 +0:00',
-   'IP' => '46.255.84.17',
-   'dbname' => array( 'itwiki', ),
+$wmfThrottlingExceptions[] = array( // Bug 48301 Haifa University workshop
+   'from'   => '2013-05-12T16:00 +3:00',
+   'to' => '2013-05-12T21:00 +3:00',
+   'IP' => '132.74.209.225',
+   'dbname' => array( 'enwiki', 'hewiki', 'eswiki', 'frwiki', 'ruwiki', 
'plwiki' ),
 );
 
 ## Add throttling definitions above.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id80a78c95115e45fdb2e667f3ab6ddb11f161f11
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add smw.util.namespace - change (mediawiki...SemanticMediaWiki)

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

Change subject: Add smw.util.namespace
..


Add smw.util.namespace

* Add smw.util.namespace.getList()
* Add smw.util.namespace.getId()
* Add smw.util.namespace.getName()

Change-Id: If526e56b4b6633bad0e40c54f7e3f36d1c41cd8a
---
M SemanticMediaWiki.hooks.php
M resources/smw/api/ext.smw.api.js
M resources/smw/ext.smw.js
M tests/qunit/smw/ext.smw.test.js
4 files changed, 344 insertions(+), 112 deletions(-)

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



diff --git a/SemanticMediaWiki.hooks.php b/SemanticMediaWiki.hooks.php
index 14ad262..726c6a6 100644
--- a/SemanticMediaWiki.hooks.php
+++ b/SemanticMediaWiki.hooks.php
@@ -414,6 +414,12 @@
)
);
 
+   // Available semantic namespaces
+   foreach ( array_keys( 
$GLOBALS['smwgNamespacesWithSemanticLinks'] ) as $ns ) {
+   $name = MWNamespace::getCanonicalName( $ns );
+   $vars['smw-config']['settings']['namespace'][$name] = 
$ns;
+   }
+
foreach ( array_keys( $GLOBALS['smwgResultFormats'] ) as 
$format ) {
// Special formats "count" and "debug" currently not 
supported.
if ( $format != 'broadtable' && $format != 'count' && 
$format != 'debug' ) {
diff --git a/resources/smw/api/ext.smw.api.js b/resources/smw/api/ext.smw.api.js
index ddfdfb9..c0fe954 100644
--- a/resources/smw/api/ext.smw.api.js
+++ b/resources/smw/api/ext.smw.api.js
@@ -1,17 +1,35 @@
 /**
- * SMW Api base class
+ * This file is part of the Semantic MediaWiki Extension
+ * @see https://semantic-mediawiki.org/
  *
- * @since 1.9
+ * @section LICENSE
+ * 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
  *
  * @file
+ * @ignore
+ *
+ * @since 1.9
  * @ingroup SMW
  *
- * @licence GNU GPL v2 or later
+ * @licence GNU GPL v2+
  * @author mwjames
  */
-/*global md5 */
 ( function( $, mw, smw ) {
'use strict';
+
+   /*global md5 */
 
/**
 * Constructor to create an object to interact with the API and SMW
@@ -19,13 +37,14 @@
 * @since 1.9
 *
 * @class
+* @alias smw.Api
 * @constructor
 */
-   smw.Api = function() {};
+   smw.api = function() {};
 
/* Public methods */
 
-   smw.Api.prototype = {
+   smw.api.prototype = {
 
/**
 * Convenience method to parse and map a JSON string
@@ -131,6 +150,6 @@
};
 
//Alias
-   smw.api = smw.Api;
+   smw.Api = smw.api;
 
 } )( jQuery, mediaWiki, semanticMediaWiki );
\ No newline at end of file
diff --git a/resources/smw/ext.smw.js b/resources/smw/ext.smw.js
index 97f7ba4..59601f9 100644
--- a/resources/smw/ext.smw.js
+++ b/resources/smw/ext.smw.js
@@ -1,29 +1,68 @@
 /**
- * JavaScript for Semantic MediaWiki.
- * @see http://semantic-mediawiki.org/
+ * This file is part of the Semantic MediaWiki Extension
+ * @see https://semantic-mediawiki.org/
  *
- * @licence GNU GPL v3 or later
+ * @section LICENSE
+ * 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
+ *
+ * @file
+ *
+ * @since 1.9
+ * @ingroup SMW
+ *
+ * @licence GNU GPL v2+
  * @author Jeroen De Dauw 
+ * @author mwjames
  */
-/*global console:true message:true */
 
-// Declare instance
-var instance = ( function () {
+/**
+ * Declares global smw instance and namespace
+ *
+ * @class smw
+ */
+var instance = ( function ( $ ) {
'use strict';
+
+   /*global console:true message:true */
 

[MediaWiki-commits] [Gerrit] Introduce the notion of 'roles' - change (mediawiki/vagrant)

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

Change subject: Introduce the notion of 'roles'
..


Introduce the notion of 'roles'

This change refactors the Puppet code around the notion of 'roles' (a common
Puppet pattern, also in use in operations/puppet). Roles are meant to
facilitate the use of Mediawiki-Vagrant for sharing development environments
amongst developers of some particular component or extension.

Role classes are one level more abstract than module classes. They parametrize
the provisioning of several related software components that together enable
the machine to fulfill some particular function. Role classes do not take
parameters themselves, but rather exist as a place for aggregating all
parameters required for provisioning a virtual machine of a certain kind.

Roles are enabled by including them in the node definition in site.pp.
Declaring a role is not tantamount to enabling it -- it merely makes it
available. Thus additional roles could be incorporated into this repository
while keeping the basic setup quite generic and lightweight.

My hope is that it would be rather straightforward for individual teams that
use Vagrant internally to declare their development setup as role. Arthur
Richards from the mobile team told me some moons ago that many of the bugs they
ended up deploying were undetected by dint of differences in the development
environment of various mobile developers. I think Vagrant + Puppet roles
provide a possible solution.

As part of this change, I moved various high-level configuration options from
class parameter defaults to roles, to facilitate centralized management of key
configuration options.

Change-Id: I88ca30607c0ff91f4fcafa49a01765eb1013bb31
---
A puppet/manifests/base.pp
D puppet/manifests/extras.pp
A puppet/manifests/roles.pp
M puppet/manifests/site.pp
M puppet/modules/mediawiki/files/phpsh.sh
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/mediawiki/manifests/user.pp
M puppet/modules/mediawiki/templates/mediawiki-apache-site.erb
M puppet/modules/mediawiki/templates/rc.php.erb
M puppet/modules/misc/manifests/init.pp
M puppet/modules/mysql/manifests/init.pp
M puppet/modules/mysql/templates/my.cnf.erb
13 files changed, 199 insertions(+), 132 deletions(-)

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



diff --git a/puppet/manifests/base.pp b/puppet/manifests/base.pp
new file mode 100644
index 000..044ad41
--- /dev/null
+++ b/puppet/manifests/base.pp
@@ -0,0 +1,53 @@
+# == Base Puppet manifest
+#
+# This manifest declares resource defaults for the Mediawiki-Vagrant
+# Puppet site. All Puppet modules bundled with this project have an
+# implicit dependency on this manifest and the declarations it contains.
+# Modify this file with care.
+#
+# For more information about resource defaults in Puppet, see
+# .
+#
+
+# Declares a default search path for executables, allowing the path to
+# be omitted from individual resources. Also configures Puppet to log
+# the command's output if it was unsuccessful.
+Exec {
+   path  => [ '/bin', '/usr/bin', '/usr/sbin/', '/usr/local/bin' ],
+   logoutput => on_failure,
+}
+
+# Ensure that apt-get update has ran in the last 24 hours before
+# installing any packages.
+Package {
+   require => Exec['update package index'],
+}
+
+# Declare default uid / gid and permissions for file resources, and
+# tells Puppet not to back up configuration files by default.
+File {
+   backup => false,
+   owner  => 'root',
+   group  => 'root',
+   mode   => '0644',
+}
+
+# Emit a notice indicating whether or not the host's VirtualBox version
+# was detected. See ../../Vagrantfile for the version detection code.
+if ( $::virtualbox_version ) {
+   notice("Detected VirtualBox version ${::virtualbox_version}")
+} else {
+   warning('Could not determine VirtualBox version.')
+}
+
+# Run 'apt-get update' if the package index has not been updated in the
+# last 24 hours.
+exec { 'update package index':
+   command => 'apt-get update',
+   unless  => 'bash -c \'(( $(date +%s) - $(stat -c %Y 
/var/lib/apt/periodic/update-success-stamp) < 86400 ))\''
+}
+
+# Configures a 'puppet' user group, required by Puppet.
+group { 'puppet':
+   ensure => present,
+}
diff --git a/puppet/manifests/extras.pp b/puppet/manifests/extras.pp
deleted file mode 100644
index 0a7f884..000
--- a/puppet/manifests/extras.pp
+++ /dev/null
@@ -1,13 +0,0 @@
-# == Puppet manifest for optional modules
-#
-# Uncomment lines below to enable Puppet modules that ship with Vagrant
-# but are not enabled by default.
-#
-# Once uncommented, run 'vagrant up' and 'vagrant provision'.
-#
-
-# Selenium browser tests for MediaWiki
-# class { 'browsertests': }
-
-# User metrics API
-# class { 'user_m

[MediaWiki-commits] [Gerrit] Clean-up: use pip provisioner, virtual resources, run stages... - change (mediawiki/vagrant)

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

Change subject: Clean-up: use pip provisioner, virtual resources, run stages, 
etc.
..


Clean-up: use pip provisioner, virtual resources, run stages, etc.

* Remove shell provisioner. My original idea was that the shell provisioner
  could be used somehow to fix the "stdin: not a tty" error before it is
  displayed, but this did not work out. I migrated the fix to the Puppet code.
* Added a Puppet templatedir for templates that aren't a part of any module.
  Empty for now, but I want it there because I expect potential contributors
  will appreciate having it set up.
* Added stages: 'first' runs before main (which exists by default), 'last' runs
  after. I only needed 'first', but once again I thought that it's better to
  have explicit scaffolding in place for other developers.
* Default ensure for Package resource type => present, rather than latest.
  'latest' causes a lot of unnecessary apt-get updates.
* Use pip provisioner to install Python packages. I forked phpsh and uploaded a
  maintenance release to PyPI so that it is trivially installable via 'pip
  install phpsh'.
* Added the Wikimedia apt public key to the repository.
* Added an apt class, with a resource type for adding PPAs.
* Moved Wikimedia apt repo setup to apt class (was in misc).
* Simplified a bunch of the onlyif / unless checks for Exec resources.
* Move Apache-related configurations from ::mediawiki to ::mediawiki::apache.
* Make Git clones and Apache modules & sites virtual.

Change-Id: Ia0518b6a18eda5946cbfea1d68acdb18f05f1e3f
---
M Vagrantfile
M puppet/manifests/base.pp
M puppet/manifests/roles.pp
M puppet/modules/apache/manifests/init.pp
M puppet/modules/apache/manifests/site.pp
A puppet/modules/apt/files/wikimedia.key
A puppet/modules/apt/manifests/init.pp
A puppet/modules/apt/manifests/ppa.pp
R puppet/modules/apt/templates/wikimedia.list.erb
M puppet/modules/git/manifests/init.pp
A puppet/modules/mediawiki/manifests/apache.pp
M puppet/modules/mediawiki/manifests/extension.pp
M puppet/modules/mediawiki/manifests/init.pp
M puppet/modules/mediawiki/manifests/php.pp
M puppet/modules/mediawiki/manifests/phpsh.pp
M puppet/modules/mediawiki/manifests/user.pp
D puppet/modules/mediawiki/templates/phpsh-config.erb
M puppet/modules/memcached/manifests/init.pp
M puppet/modules/misc/manifests/init.pp
D puppet/modules/misc/manifests/wikimedia.pp
M puppet/modules/mysql/manifests/init.pp
M puppet/modules/user_metrics/manifests/init.pp
A puppet/templates/.gitignore
23 files changed, 230 insertions(+), 185 deletions(-)

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



diff --git a/Vagrantfile b/Vagrantfile
index 113dba4..004940d 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -79,25 +79,24 @@
 # vb.gui = true
 
 # If you are on a single-core system, comment out the following line:
-vb.customize ["modifyvm", :id, '--cpus', '2']
-end
-
-config.vm.provision :shell do |s|
-# Silence 'stdin: is not a tty' error on Puppet run
-s.inline = 'sed -i -e "s/^mesg n/tty -s \&\& mesg n/" /root/.profile'
+vb.customize ['modifyvm', :id, '--cpus', '2']
 end
 
 config.vm.provision :puppet do |puppet|
 puppet.module_path = 'puppet/modules'
 puppet.manifests_path = 'puppet/manifests'
 puppet.manifest_file = 'site.pp'
-puppet.options = '--verbose'
+
+puppet.options = [
+'--verbose',
+'--templatedir', '/vagrant/puppet/templates',
+]
 
 # For more output, uncomment the following line:
-# puppet.options << ' --debug'
+# puppet.options << '--debug'
 
 # Windows's Command Prompt has poor support for ANSI escape sequences.
-puppet.options << ' --color=false' if windows?
+puppet.options << '--color=false' if windows?
 
 puppet.facter = {
 'virtualbox_version' => get_virtualbox_version
diff --git a/puppet/manifests/base.pp b/puppet/manifests/base.pp
index 044ad41..69686fb 100644
--- a/puppet/manifests/base.pp
+++ b/puppet/manifests/base.pp
@@ -9,19 +9,20 @@
 # .
 #
 
+stage { 'first': }
+stage { 'last': }
+
+Stage['first'] -> Stage['main'] -> Stage['last']
+
 # Declares a default search path for executables, allowing the path to
 # be omitted from individual resources. Also configures Puppet to log
 # the command's output if it was unsuccessful.
 Exec {
-   path  => [ '/bin', '/usr/bin', '/usr/sbin/', '/usr/local/bin' ],
logoutput => on_failure,
+   path  => [ '/bin', '/usr/bin', '/usr/local/bin', '/usr/sbin/' ],
 }
 
-# Ensure that apt-get update has ran in the last 24 hours before
-# installing any packages.
-Package {
-   require => Exec['update package index'],
-}
+Package { ensure => present, }
 
 # Declare default uid / 

[MediaWiki-commits] [Gerrit] phpsh etc file should require phpsh - change (mediawiki/vagrant)

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

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


Change subject: phpsh etc file should require phpsh
..

phpsh etc file should require phpsh

Change-Id: I56849f7c5678249f13be42b82bc613f40ef1a791
---
M puppet/modules/mediawiki/manifests/phpsh.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/69/63369/1

diff --git a/puppet/modules/mediawiki/manifests/phpsh.pp 
b/puppet/modules/mediawiki/manifests/phpsh.pp
index 69d3229..8ab39a4 100644
--- a/puppet/modules/mediawiki/manifests/phpsh.pp
+++ b/puppet/modules/mediawiki/manifests/phpsh.pp
@@ -27,6 +27,7 @@
}
 
file { '/etc/phpsh/rc.php':
+   require => Package['phpsh'],
content => template('mediawiki/rc.php.erb'),
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I56849f7c5678249f13be42b82bc613f40ef1a791
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] phpsh etc file should require phpsh - change (mediawiki/vagrant)

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

Change subject: phpsh etc file should require phpsh
..


phpsh etc file should require phpsh

Change-Id: I56849f7c5678249f13be42b82bc613f40ef1a791
---
M puppet/modules/mediawiki/manifests/phpsh.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/puppet/modules/mediawiki/manifests/phpsh.pp 
b/puppet/modules/mediawiki/manifests/phpsh.pp
index 69d3229..8ab39a4 100644
--- a/puppet/modules/mediawiki/manifests/phpsh.pp
+++ b/puppet/modules/mediawiki/manifests/phpsh.pp
@@ -27,6 +27,7 @@
}
 
file { '/etc/phpsh/rc.php':
+   require => Package['phpsh'],
content => template('mediawiki/rc.php.erb'),
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I56849f7c5678249f13be42b82bc613f40ef1a791
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] swiftrepl: fetch all containers, not just the first 10k - change (operations/software)

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

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


Change subject: swiftrepl: fetch all containers, not just the first 10k
..

swiftrepl: fetch all containers, not just the first 10k

Doh!

Change-Id: I464b6a68e420551ec2dea5056669290df8f2360c
---
M swiftrepl/swiftrepl.py
1 file changed, 14 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software 
refs/changes/70/63370/1

diff --git a/swiftrepl/swiftrepl.py b/swiftrepl/swiftrepl.py
index 39ef2d0..c5a646f 100644
--- a/swiftrepl/swiftrepl.py
+++ b/swiftrepl/swiftrepl.py
@@ -492,7 +492,20 @@
dstconnpool = connect(dst)

srcconn = srcconnpool.get()
-   containerlist = [container for container in srcconn.get_all_containers()
+
+   containers=[]
+   limit=1
+   last=''
+   while True:
+   page = srcconn.get_all_containers(limit=limit, marker=last)
+   if len(page) == 0:
+   break
+   last = page[-1].name.encode("utf-8")
+   containers.extend(page)
+   if len(page) < limit:
+   break
+
+   containerlist = [container for container in containers
   if re.match(container_regexp, 
container.name)]
if '-r' in sys.argv: random.shuffle(containerlist)
containers = collections.deque(containerlist)

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I464b6a68e420551ec2dea5056669290df8f2360c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Faidon 

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


[MediaWiki-commits] [Gerrit] swiftrepl: fetch all containers, not just the first 10k - change (operations/software)

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

Change subject: swiftrepl: fetch all containers, not just the first 10k
..


swiftrepl: fetch all containers, not just the first 10k

Doh!

Change-Id: I464b6a68e420551ec2dea5056669290df8f2360c
---
M swiftrepl/swiftrepl.py
1 file changed, 14 insertions(+), 1 deletion(-)

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



diff --git a/swiftrepl/swiftrepl.py b/swiftrepl/swiftrepl.py
index 39ef2d0..c5a646f 100644
--- a/swiftrepl/swiftrepl.py
+++ b/swiftrepl/swiftrepl.py
@@ -492,7 +492,20 @@
dstconnpool = connect(dst)

srcconn = srcconnpool.get()
-   containerlist = [container for container in srcconn.get_all_containers()
+
+   containers=[]
+   limit=1
+   last=''
+   while True:
+   page = srcconn.get_all_containers(limit=limit, marker=last)
+   if len(page) == 0:
+   break
+   last = page[-1].name.encode("utf-8")
+   containers.extend(page)
+   if len(page) < limit:
+   break
+
+   containerlist = [container for container in containers
   if re.match(container_regexp, 
container.name)]
if '-r' in sys.argv: random.shuffle(containerlist)
containers = collections.deque(containerlist)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I464b6a68e420551ec2dea5056669290df8f2360c
Gerrit-PatchSet: 1
Gerrit-Project: operations/software
Gerrit-Branch: master
Gerrit-Owner: Faidon 
Gerrit-Reviewer: Faidon 
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 definition of wgHandheldStyle - change (operations/mediawiki-config)

2013-05-12 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: Remove definition of wgHandheldStyle
..

Remove definition of wgHandheldStyle

It referred to nonexistent Chick's CSS, and the feature is being
removed in Ia8d79b4a in mediawiki/core.

Bug: 48375
Change-Id: Iad1ac93bd54ad7c1bf4a7f8631e5697da8ae5350
---
M wmf-config/InitialiseSettings.php
1 file changed, 0 insertions(+), 8 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37a527e..9996177 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9926,14 +9926,6 @@
'usabilitywiki' => true,
 ),
 
-'wgHandheldStyle' => array(
-   // Set MonoBook's handheld stylesheet to use Chick's style
-   // in place of big fat nothin'.
-   // New Kindle should support it; Opera Mini in "mobile mode" should 
also see it.
-   // iPhone and Opera Mini in pretty mode will ignore it unless 
wgHandheldForIPhone is also turned on.
-   'default' => 'chick/main.css',
-),
-
 'wmgUseNewUserMessage' => array(
'default' => false,
'arwiki' => true,

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

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

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


[MediaWiki-commits] [Gerrit] RT manifest: typo fix wikmedia -> wikimedia - change (operations/puppet)

2013-05-12 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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


Change subject: RT manifest: typo fix wikmedia -> wikimedia
..

RT manifest: typo fix wikmedia -> wikimedia

follows up on I8a7db9d98d4f62fcae6d49

Change-Id: I5305c89ccf7ef3f548a551ea05f1253a085445e6
---
M manifests/misc/rt-server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/72/63372/1

diff --git a/manifests/misc/rt-server.pp b/manifests/misc/rt-server.pp
index 0a18628..b3eb033 100644
--- a/manifests/misc/rt-server.pp
+++ b/manifests/misc/rt-server.pp
@@ -4,7 +4,7 @@
 #
 #  It's used in production but should function in labs
 #  as well.
-class misc::rt::server ( $site = 'rt.wikmedia.org', $datadir = 
'/var/lib/mysql' ) {
+class misc::rt::server ( $site = 'rt.wikimedia.org', $datadir = 
'/var/lib/mysql' ) {
   system_role { 'misc::rt::server': description => 'RT server' }
 
   package { [ 'request-tracker3.8', 'rt3.8-db-mysql', 'rt3.8-clients', 
'libcgi-fast-perl', 'lighttpd',

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

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

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


[MediaWiki-commits] [Gerrit] RT manifest: typo fix wikmedia -> wikimedia - change (operations/puppet)

2013-05-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: RT manifest: typo fix wikmedia -> wikimedia
..


RT manifest: typo fix wikmedia -> wikimedia

follows up on I8a7db9d98d4f62fcae6d49

Change-Id: I5305c89ccf7ef3f548a551ea05f1253a085445e6
---
M manifests/misc/rt-server.pp
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/manifests/misc/rt-server.pp b/manifests/misc/rt-server.pp
index 0a18628..b3eb033 100644
--- a/manifests/misc/rt-server.pp
+++ b/manifests/misc/rt-server.pp
@@ -4,7 +4,7 @@
 #
 #  It's used in production but should function in labs
 #  as well.
-class misc::rt::server ( $site = 'rt.wikmedia.org', $datadir = 
'/var/lib/mysql' ) {
+class misc::rt::server ( $site = 'rt.wikimedia.org', $datadir = 
'/var/lib/mysql' ) {
   system_role { 'misc::rt::server': description => 'RT server' }
 
   package { [ 'request-tracker3.8', 'rt3.8-db-mysql', 'rt3.8-clients', 
'libcgi-fast-perl', 'lighttpd',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5305c89ccf7ef3f548a551ea05f1253a085445e6
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jeremyb 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] add wikmedia to typos - change (operations/puppet)

2013-05-12 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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


Change subject: add wikmedia to typos
..

add wikmedia to typos

see I5305c89ccf7ef3f548a551ea05

Change-Id: I19ad68ea8832b525361fff776a49b114606554aa
---
M typos
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/73/63373/1

diff --git a/typos b/typos
index 5cf20a5..e866550 100644
--- a/typos
+++ b/typos
@@ -1,2 +1,3 @@
 pmpta
 gadolinum
+wikmedia

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

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

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


[MediaWiki-commits] [Gerrit] this is a test... - change (operations/puppet)

2013-05-12 Thread Jeremyb (Code Review)
Jeremyb has uploaded a new change for review.

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


Change subject: this is a test...
..

this is a test...

Change-Id: I0bc0d399b06e56d8b5813e0462603bc48eb5d6f7
---
M manifests/misc/rt-server.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/74/63374/1

diff --git a/manifests/misc/rt-server.pp b/manifests/misc/rt-server.pp
index b3eb033..0a18628 100644
--- a/manifests/misc/rt-server.pp
+++ b/manifests/misc/rt-server.pp
@@ -4,7 +4,7 @@
 #
 #  It's used in production but should function in labs
 #  as well.
-class misc::rt::server ( $site = 'rt.wikimedia.org', $datadir = 
'/var/lib/mysql' ) {
+class misc::rt::server ( $site = 'rt.wikmedia.org', $datadir = 
'/var/lib/mysql' ) {
   system_role { 'misc::rt::server': description => 'RT server' }
 
   package { [ 'request-tracker3.8', 'rt3.8-db-mysql', 'rt3.8-clients', 
'libcgi-fast-perl', 'lighttpd',

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

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

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


[MediaWiki-commits] [Gerrit] add wikmedia to typos - change (operations/puppet)

2013-05-12 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: add wikmedia to typos
..


add wikmedia to typos

see I5305c89ccf7ef3f548a551ea05

Change-Id: I19ad68ea8832b525361fff776a49b114606554aa
---
M typos
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Jeremyb: Looks good to me, but someone else must approve
  BBlack: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/typos b/typos
index 5cf20a5..e866550 100644
--- a/typos
+++ b/typos
@@ -1,2 +1,3 @@
 pmpta
 gadolinum
+wikmedia

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I19ad68ea8832b525361fff776a49b114606554aa
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Jeremyb 
Gerrit-Reviewer: BBlack 
Gerrit-Reviewer: Jeremyb 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: Moar comments in the module - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Moar comments in the module
..

Tool Labs: Moar comments in the module

To make things less opaque.

Change-Id: I881744f200ef2bfb1d81717175bbc43b1757f876
---
M modules/toollabs/files/40-tools-bastion-banner
M modules/toollabs/files/40-tools-exechost-banner
M modules/toollabs/files/40-tools-infrastructure-banner
M modules/toollabs/files/project-make-access
M modules/toollabs/files/project-make-shosts
M modules/toollabs/files/update-repo.sh
M modules/toollabs/manifests/bastion.pp
M modules/toollabs/manifests/exec_environ.pp
M modules/toollabs/manifests/execnode.pp
M modules/toollabs/manifests/infrastructure.pp
M modules/toollabs/manifests/init.pp
M modules/toollabs/manifests/master.pp
M modules/toollabs/manifests/shadow.pp
M modules/toollabs/manifests/webproxy.pp
M modules/toollabs/manifests/webserver.pp
15 files changed, 62 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/75/63375/1

diff --git a/modules/toollabs/files/40-tools-bastion-banner 
b/modules/toollabs/files/40-tools-bastion-banner
index bfa5091..56b18d9 100755
--- a/modules/toollabs/files/40-tools-bastion-banner
+++ b/modules/toollabs/files/40-tools-bastion-banner
@@ -1,5 +1,9 @@
 #! /bin/sh
 
+#
+# This script is managed by puppet
+#
+
 cat < "$ipaddress\n",
   }
 
-
-  # TODO: sshd config
   # TODO: local scripts
   # TODO: j* tools
   # TODO: cron setup
diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 93c6459..2ccf6c0 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -93,8 +93,6 @@
   sysctl { "vm.overcommit_memory": value => 2 }
   sysctl { "vm.overcommit_ratio": value => 95 }
 
-  # TODO: autofs overrides
-  # TODO: PAM config
   # TODO: quotas
 }
 
diff --git a/modules/toollabs/manifests/execnode.pp 
b/modules/toollabs/manifests/execnode.pp
index 8ba1be8..1e5c785 100644
--- a/modules/toollabs/manifests/execnode.pp
+++ b/modules/toollabs/manifests/execnode.pp
@@ -35,6 +35,12 @@
 content => "$ipaddress\n",
   }
 
+  # Execution hosts have funky access requirements; they need to be ssh-able
+  # by service accounts, and they need to use host-based authentication.
+
+  # We override /etc/ssh/shosts.equiv and /etc/security/access.conf
+  # accordingly from information collected from the project store.
+
   file { "/usr/local/sbin/project-make-shosts":
 ensure => file,
 owner => 'root',
diff --git a/modules/toollabs/manifests/infrastructure.pp 
b/modules/toollabs/manifests/infrastructure.pp
index ee795ae..79d17bb 100644
--- a/modules/toollabs/manifests/infrastructure.pp
+++ b/modules/toollabs/manifests/infrastructure.pp
@@ -22,6 +22,9 @@
 source => 
"puppet:///modules/toollabs/40-${instanceproject}-infrastructure-banner",
   }
 
+  # Infrastructure instances are limited to an (arbitrarily picked) local
+  # service group and root.
+
   File <| title == '/etc/security/access.conf' |> {
 content => "-:ALL EXCEPT (local-admin) root:ALL\n",
   }
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 20b43e7..2490f4a 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -12,11 +12,19 @@
 # Sample Usage:
 #
 class toollabs {
-  # TODO: autofs overrides
-  # TODO: PAM config
 
   $store = "/data/project/.system/store"
   $repo  = "/data/project/.system/deb"
+
+  #
+  # The $store is an incredibly horrid workaround the fact that we cannot
+  # use exported resources in our puppet setup: individual instances store
+  # information in a shared filesystem that are collected locally into
+  # files to finish up the configuration.
+  #
+  # Case in point here: SSH host keys distributed around the project for
+  # known_hosts and HBA of the execution nodes.
+  #
 
   file { $store:
 ensure => directory,
@@ -35,11 +43,6 @@
 content => "[$fqdn]:*,[$ipaddress]:* ssh-rsa $sshrsakey\n$fqdn ssh-rsa 
$sshrsakey\n",
   }
 
-  file { "/shared":
-ensure => link,
-target => "/data/project/.shared";
-  }
-
   exec { "make_known_hosts":
 command => "/bin/cat $store/hostkey-* >/etc/ssh/ssh_known_hosts~",
 require => File[$store],
@@ -53,6 +56,12 @@
 owner => "root",
 group => "root",
   }
+
+  file { "/shared":
+ensure => link,
+target => "/data/project/.shared";
+  }
+
 
   # Tool Labs is enduser-facing, so we want to control the motd
   # properly (most things make no sense for community users: they
@@ -69,6 +78,10 @@
 purge => true,
   }
 
+  # We keep a project-locat apt repo where we stuff packages we build
+  # that are intended to be local to the project.  By keeping it on the
+  # shared storage, we have no need to set up a server to use it.
+
   file { "/etc/apt/sources.list.d/

[MediaWiki-commits] [Gerrit] Tool Labs: Moar comments in the module - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Moar comments in the module
..


Tool Labs: Moar comments in the module

To make things less opaque.

Change-Id: I881744f200ef2bfb1d81717175bbc43b1757f876
---
M modules/toollabs/files/40-tools-bastion-banner
M modules/toollabs/files/40-tools-exechost-banner
M modules/toollabs/files/40-tools-infrastructure-banner
M modules/toollabs/files/project-make-access
M modules/toollabs/files/project-make-shosts
M modules/toollabs/files/update-repo.sh
M modules/toollabs/manifests/bastion.pp
M modules/toollabs/manifests/exec_environ.pp
M modules/toollabs/manifests/execnode.pp
M modules/toollabs/manifests/infrastructure.pp
M modules/toollabs/manifests/init.pp
M modules/toollabs/manifests/master.pp
M modules/toollabs/manifests/shadow.pp
M modules/toollabs/manifests/webproxy.pp
M modules/toollabs/manifests/webserver.pp
15 files changed, 62 insertions(+), 23 deletions(-)

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



diff --git a/modules/toollabs/files/40-tools-bastion-banner 
b/modules/toollabs/files/40-tools-bastion-banner
index bfa5091..56b18d9 100755
--- a/modules/toollabs/files/40-tools-bastion-banner
+++ b/modules/toollabs/files/40-tools-bastion-banner
@@ -1,5 +1,9 @@
 #! /bin/sh
 
+#
+# This script is managed by puppet
+#
+
 cat < "$ipaddress\n",
   }
 
-
-  # TODO: sshd config
   # TODO: local scripts
   # TODO: j* tools
   # TODO: cron setup
diff --git a/modules/toollabs/manifests/exec_environ.pp 
b/modules/toollabs/manifests/exec_environ.pp
index 93c6459..2ccf6c0 100644
--- a/modules/toollabs/manifests/exec_environ.pp
+++ b/modules/toollabs/manifests/exec_environ.pp
@@ -93,8 +93,6 @@
   sysctl { "vm.overcommit_memory": value => 2 }
   sysctl { "vm.overcommit_ratio": value => 95 }
 
-  # TODO: autofs overrides
-  # TODO: PAM config
   # TODO: quotas
 }
 
diff --git a/modules/toollabs/manifests/execnode.pp 
b/modules/toollabs/manifests/execnode.pp
index 8ba1be8..1e5c785 100644
--- a/modules/toollabs/manifests/execnode.pp
+++ b/modules/toollabs/manifests/execnode.pp
@@ -35,6 +35,12 @@
 content => "$ipaddress\n",
   }
 
+  # Execution hosts have funky access requirements; they need to be ssh-able
+  # by service accounts, and they need to use host-based authentication.
+
+  # We override /etc/ssh/shosts.equiv and /etc/security/access.conf
+  # accordingly from information collected from the project store.
+
   file { "/usr/local/sbin/project-make-shosts":
 ensure => file,
 owner => 'root',
diff --git a/modules/toollabs/manifests/infrastructure.pp 
b/modules/toollabs/manifests/infrastructure.pp
index ee795ae..79d17bb 100644
--- a/modules/toollabs/manifests/infrastructure.pp
+++ b/modules/toollabs/manifests/infrastructure.pp
@@ -22,6 +22,9 @@
 source => 
"puppet:///modules/toollabs/40-${instanceproject}-infrastructure-banner",
   }
 
+  # Infrastructure instances are limited to an (arbitrarily picked) local
+  # service group and root.
+
   File <| title == '/etc/security/access.conf' |> {
 content => "-:ALL EXCEPT (local-admin) root:ALL\n",
   }
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 20b43e7..2490f4a 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -12,11 +12,19 @@
 # Sample Usage:
 #
 class toollabs {
-  # TODO: autofs overrides
-  # TODO: PAM config
 
   $store = "/data/project/.system/store"
   $repo  = "/data/project/.system/deb"
+
+  #
+  # The $store is an incredibly horrid workaround the fact that we cannot
+  # use exported resources in our puppet setup: individual instances store
+  # information in a shared filesystem that are collected locally into
+  # files to finish up the configuration.
+  #
+  # Case in point here: SSH host keys distributed around the project for
+  # known_hosts and HBA of the execution nodes.
+  #
 
   file { $store:
 ensure => directory,
@@ -35,11 +43,6 @@
 content => "[$fqdn]:*,[$ipaddress]:* ssh-rsa $sshrsakey\n$fqdn ssh-rsa 
$sshrsakey\n",
   }
 
-  file { "/shared":
-ensure => link,
-target => "/data/project/.shared";
-  }
-
   exec { "make_known_hosts":
 command => "/bin/cat $store/hostkey-* >/etc/ssh/ssh_known_hosts~",
 require => File[$store],
@@ -53,6 +56,12 @@
 owner => "root",
 group => "root",
   }
+
+  file { "/shared":
+ensure => link,
+target => "/data/project/.shared";
+  }
+
 
   # Tool Labs is enduser-facing, so we want to control the motd
   # properly (most things make no sense for community users: they
@@ -69,6 +78,10 @@
 purge => true,
   }
 
+  # We keep a project-locat apt repo where we stuff packages we build
+  # that are intended to be local to the project.  By keeping it on the
+  # shared storage, we have no need to set up a server to use it.
+
   file { "/etc/apt/sources.list.d/local.list":
 ensure => file,
 content =

[MediaWiki-commits] [Gerrit] Variable $wgRestrictionLevels unused since 1cbaa921 - change (mediawiki/core)

2013-05-12 Thread Platonides (Code Review)
Platonides has uploaded a new change for review.

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


Change subject: Variable $wgRestrictionLevels unused since 1cbaa921
..

Variable $wgRestrictionLevels unused since 1cbaa921

Change-Id: I251ecaf319b2b4379ef80417ba23022a56064a94
---
M includes/ProtectionForm.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/76/63376/1

diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index 0ac8749..0871cf0 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -614,7 +614,7 @@
}
 
function buildCleanupScript() {
-   global $wgRestrictionLevels, $wgCascadingRestrictionLevels, 
$wgOut;
+   global $wgCascadingRestrictionLevels, $wgOut;
 
$cascadeableLevels = $wgCascadingRestrictionLevels;
$options = array(

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Add mosh for non-NA friends. - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Add mosh for non-NA friends.
..

Tool Labs: Add mosh for non-NA friends.

Change-Id: I86eb3cee78e9fa7a8f098c07198eb02587c26400
---
M modules/toollabs/manifests/dev_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/77/63377/1

diff --git a/modules/toollabs/manifests/dev_environ.pp 
b/modules/toollabs/manifests/dev_environ.pp
index 253a674..6a74ca0 100644
--- a/modules/toollabs/manifests/dev_environ.pp
+++ b/modules/toollabs/manifests/dev_environ.pp
@@ -34,6 +34,7 @@
   'emacs',
   'elinks',
   'mercurial',
+  'mosh',
   'fakeroot', # for dpkg
   'build-essential', # for dpkg
   'mc', # midnight commander is favorite on toolserver, let's not make 
labs worse than toolserver

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Add mosh for non-NA friends. - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Add mosh for non-NA friends.
..


Tool Labs: Add mosh for non-NA friends.

Change-Id: I86eb3cee78e9fa7a8f098c07198eb02587c26400
---
M modules/toollabs/manifests/dev_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/dev_environ.pp 
b/modules/toollabs/manifests/dev_environ.pp
index 253a674..6a74ca0 100644
--- a/modules/toollabs/manifests/dev_environ.pp
+++ b/modules/toollabs/manifests/dev_environ.pp
@@ -34,6 +34,7 @@
   'emacs',
   'elinks',
   'mercurial',
+  'mosh',
   'fakeroot', # for dpkg
   'build-essential', # for dpkg
   'mc', # midnight commander is favorite on toolserver, let's not make 
labs worse than toolserver

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I86eb3cee78e9fa7a8f098c07198eb02587c26400
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Variable $wgRestrictionLevels unused since 1cbaa921 - change (mediawiki/core)

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

Change subject: Variable $wgRestrictionLevels unused since 1cbaa921
..


Variable $wgRestrictionLevels unused since 1cbaa921

Change-Id: I251ecaf319b2b4379ef80417ba23022a56064a94
---
M includes/ProtectionForm.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/ProtectionForm.php b/includes/ProtectionForm.php
index 0ac8749..0871cf0 100644
--- a/includes/ProtectionForm.php
+++ b/includes/ProtectionForm.php
@@ -614,7 +614,7 @@
}
 
function buildCleanupScript() {
-   global $wgRestrictionLevels, $wgCascadingRestrictionLevels, 
$wgOut;
+   global $wgCascadingRestrictionLevels, $wgOut;
 
$cascadeableLevels = $wgCascadingRestrictionLevels;
$options = array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I251ecaf319b2b4379ef80417ba23022a56064a94
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Platonides 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Matmarex 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Improve language handling of page titles. - change (mediawiki/core)

2013-05-12 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Improve language handling of page titles.
..

Improve language handling of page titles.

* The title's lang="auto" and pageviewlang is moved into SkinTemplate
* Setting of the language attributes is done inside the same place as it's done 
for mw-content-text
  to avoid the bug where the title for an edit page is given the page's lang 
instead of the user's lang.
* Fix getPageLanguage usage that should probably be getPageViewLanguage instead.
* Add getPageTitleLanguage to Title and ContextHandler to declare the language 
of the title
* Add context to Title and ContextHandler's getPage*Language methods instead of 
using $wgLang.

Change-Id: I0ff707d5f04218bef5721e6fc162c6359bb7538a
---
M includes/Article.php
M includes/CategoryViewer.php
M includes/OutputPage.php
M includes/SkinTemplate.php
M includes/Title.php
M includes/content/ContentHandler.php
M skins/CologneBlue.php
M skins/Modern.php
M skins/MonoBook.php
M skins/Vector.php
M tests/phpunit/includes/content/ContentHandlerTest.php
11 files changed, 137 insertions(+), 54 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/78/63378/1

diff --git a/includes/Article.php b/includes/Article.php
index 87b94ae..f8ed4e6 100644
--- a/includes/Article.php
+++ b/includes/Article.php
@@ -1346,7 +1346,7 @@
$target = array( $target );
}
 
-   $lang = $this->getTitle()->getPageLanguage();
+   $lang = $this->getTitle()->getPageViewLanguage();
$imageDir = $lang->getDir();
 
if ( $appendSubtitle ) {
diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php
index 970adb5..df56561 100644
--- a/includes/CategoryViewer.php
+++ b/includes/CategoryViewer.php
@@ -480,7 +480,7 @@
$list = self::shortList( $articles, 
$articles_start_char );
}
 
-   $pageLang = $this->title->getPageLanguage();
+   $pageLang = $this->title->getPageViewLanguage();
$attribs = array( 'lang' => $pageLang->getCode(), 'dir' => 
$pageLang->getDir(),
'class' => 'mw-content-' . $pageLang->getDir() );
$list = Html::rawElement( 'div', $attribs, $list );
diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 746cd0e..52f2449 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3029,7 +3029,7 @@
$pageID = $wikiPage->getId();
}
 
-   $lang = $title->getPageLanguage();
+   $lang = $title->getPageViewLanguage();
 
// Pre-process information
$separatorTransTable = $lang->separatorTransformTable();
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index e53d424..060e2e4 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -247,10 +247,6 @@
wfProfileOut( __METHOD__ . '-stuff-head' );
 
wfProfileIn( __METHOD__ . '-stuff2' );
-   $tpl->set( 'title', $out->getPageTitle() );
-   $tpl->set( 'pagetitle', $out->getHTMLTitle() );
-   $tpl->set( 'displaytitle', $out->mPageLinkTitle );
-
$tpl->setRef( 'thispage', $this->thispage );
$tpl->setRef( 'titleprefixeddbkey', $this->thispage );
$tpl->set( 'titletext', $title->getText() );
@@ -435,20 +431,39 @@
 
# An ID that includes the actual body text; without categories, 
contentSub, ...
$realBodyAttribs = array( 'id' => 'mw-content-text' );
+   $realTitleAttribs = array();
+
+   // @fixme We shouldn't be using these methods on title. Page 
language can potentially
+   // depend on content of the revision being displayed. But these 
methods use the most
+   // recent revision of the page. Trying to guess whether the 
user is on a page view or
+   // something like an action is also really hacky. Defining the 
language of what we are
+   // outputting to the user should be the job of whatever class 
is rendering the view
+   // we're looking at, whether it's an article, action, or 
special page.
+   $pageLang = $title->getPageViewLanguage( $this->getContext() );
+   $pageTitleLang = $title->getPageTitleLanguage( 
$this->getContext() );
 
# Add a mw-content-ltr/rtl class to be able to style based on 
text direction
# when the content is different from the UI language, i.e.:
# not for special pages or file pages AND only when viewing AND 
if the page exists
# (or is in MW namespace, because that has default content)
-   if ( !in_array( $title->getNamespace(), ar

[MediaWiki-commits] [Gerrit] mwext-CentralAuth-jslint: Enable voting - change (integration/zuul-config)

2013-05-12 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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


Change subject: mwext-CentralAuth-jslint: Enable voting
..

mwext-CentralAuth-jslint: Enable voting

Change-Id: Ic22d7c6cb811fd7e303efbea2dde7f8d71a0a551
---
M layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/layout.yaml b/layout.yaml
index deef65f..5f4fd33 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -329,6 +329,8 @@
 voting: true
   - name: mwext-Calendar-jslint
 voting: true
+  - name: mwext-CentralAuth-jslint
+voting: true
   - name: mwext-Echo-jslint
 voting: true
   - name: mwext-GlobalBlocking-jslint

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

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

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


[MediaWiki-commits] [Gerrit] mwext-CentralAuth-jslint: Enable voting - change (integration/zuul-config)

2013-05-12 Thread Krinkle (Code Review)
Krinkle has submitted this change and it was merged.

Change subject: mwext-CentralAuth-jslint: Enable voting
..


mwext-CentralAuth-jslint: Enable voting

Change-Id: Ic22d7c6cb811fd7e303efbea2dde7f8d71a0a551
---
M layout.yaml
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/layout.yaml b/layout.yaml
index deef65f..5f4fd33 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -329,6 +329,8 @@
 voting: true
   - name: mwext-Calendar-jslint
 voting: true
+  - name: mwext-CentralAuth-jslint
+voting: true
   - name: mwext-Echo-jslint
 voting: true
   - name: mwext-GlobalBlocking-jslint

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic22d7c6cb811fd7e303efbea2dde7f8d71a0a551
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Whitelist Daniel Friesen (Dantman, nadir-seen-fire) - change (integration/zuul-config)

2013-05-12 Thread Matmarex (Code Review)
Matmarex has uploaded a new change for review.

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


Change subject: Whitelist Daniel Friesen (Dantman, nadir-seen-fire)
..

Whitelist Daniel Friesen (Dantman, nadir-seen-fire)

I mean come on.

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


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

diff --git a/layout.yaml b/layout.yaml
index 5f4fd33..9b878d6 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -36,7 +36,7 @@
 # TODO: Figure out a way to not have to repeat this from pipeline 
'test'.
 # This email_filter and the one for 'test' can be removed once we have 
fixed bug 45499.
 email_filter:
- - 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de)).*$
+ - 
^(?!(.*?@wikimedia\.org|.*?@wikimedia\.de|anomie\.wikipedia@gmail\.com|amir\.aharoni@mail\.huji\.ac\.il|hashar@free\.fr|jeroendedauw@gmail\.com|maxsem\.wiki@gmail\.com|mtraceur@member\.fsf\.org|niklas\.laxstrom@gmail\.com|s\.mazeland@xs4all\.nl|stefan\.petrea@gmail\.com|stefan@garage-coding\.com|roan\.kattouw@gmail\.com|krinklemail@gmail\.com|trevorparscal@gmail\.com|inez@wikia-inc\.com|orbit@framezero\.com|aude\.wiki@gmail\.com|bawolff\+wn@gmail\.com|bryan\.tongminh@gmail\.com|dereckson@espace-win\.org|hartman\.wiki@gmail\.com|hoo@online\.de|codereview@emsenhuber\.ch|daniel@nadir-seen-fire\.com|jamesin\.hongkong\.1@gmail\.com|krenair@gmail\.com|liangent@gmail\.com|mah@everybody\.org|matma\.rex@gmail\.com|raimond\.spekking@gmail\.com|robinp\.1273@gmail\.com|tim@tim-landscheidt\.de|umherirrender_de\.wp@web\.de|yuriastrakhan@gmail\.com|yaron57@gmail\.com|markus@semantic-mediawiki\.org|s7eph4n@gmail\.org|wiki@physikerwelt\.de)).*$
   - event: comment-added
 comment_filter: (?im)^Patch Set \d+:\n\n\s*recheck\.?\s*$
 success:
@@ -118,6 +118,7 @@
  - ^hartman\.wiki@gmail\.com$
  - ^hoo@online\.de$
  - ^codereview@emsenhuber\.ch$
+ - ^daniel@nadir-seen-fire\.com$
  - ^jamesin\.hongkong\.1@gmail\.com$  # Mwjames
  - ^krenair@gmail\.com$
  - ^liangent@gmail\.com$

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4c6e658d22d6647e32d6d8ba0c37688da82c48e8
Gerrit-PatchSet: 1
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Matmarex 

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


[MediaWiki-commits] [Gerrit] Add frontier pattern (%f[set]) to ustring - change (mediawiki...Scribunto)

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

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


Change subject: Add frontier pattern (%f[set]) to ustring
..

Add frontier pattern (%f[set]) to ustring

The "%f[set]" frontier pattern has been in Lua 5.1 since the beginning,
but was undocumented until Lua 5.2. And the code is even unchanged from
5.1.0 to 5.2.1. So there's no reason not to implement it in ustring too.

Note the changes to UstringLibrary.php are somewhat large, because it
splits the "convert a Lua bracketed charset to PCRE" code into a
separate function and it changes the handling of mw.ustring.find's and
mw.ustring.match's 'init' parameter from "substring, match from 0, then
add back on $init" to "use preg_match's $offset and use \G instead of ^
where this matters". Both of these are necessary to properly support
%f.

This also fixes a bug in the pure-Lua code (not used in Scribunto)
exposed by the unit tests for %f where %z was matching '\1' rather than
'\0' and %Z everything except '\1' instead of everything except '\0'.

Bug: 48331
Change-Id: Ie0b95ef5b734db53d6adc9de5dae4874f8944c08
---
M engines/LuaCommon/UstringLibrary.php
M engines/LuaCommon/lualib/ustring/charsets.lua
M engines/LuaCommon/lualib/ustring/make-tables.php
M engines/LuaCommon/lualib/ustring/ustring.lua
M tests/engines/LuaCommon/UstringLibraryTests.lua
5 files changed, 127 insertions(+), 64 deletions(-)


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

diff --git a/engines/LuaCommon/UstringLibrary.php 
b/engines/LuaCommon/UstringLibrary.php
index b253e0b..5c96a9a 100644
--- a/engines/LuaCommon/UstringLibrary.php
+++ b/engines/LuaCommon/UstringLibrary.php
@@ -232,7 +232,7 @@
}
 
/* Convert a Lua pattern into a PCRE regex */
-   private function patternToRegex( $pattern, $noAnchor = false ) {
+   private function patternToRegex( $pattern, $anchor ) {
$pat = preg_split( '//us', $pattern, null, PREG_SPLIT_NO_EMPTY 
);
 
static $charsets = null, $brcharsets = null;
@@ -295,7 +295,7 @@
switch ( $pat[$i] ) {
case '^':
$q = $i;
-   $re .= ( $noAnchor || $q ) ? '\\^' : '^';
+   $re .= ( $anchor === false || $q ) ? '\\^' : 
$anchor;
break;
 
case '$':
@@ -345,6 +345,19 @@
$bct++;
$re .= 
"(?$d1(?:(?>[^$d1$d2]+)|(?P>b$bct))*$d2)";
}
+   } elseif ( $pat[$i] === 'f' ) {
+   if ( $i + 1 >= $len || $pat[++$i] !== 
'[' ) {
+   throw new Scribunto_LuaError( 
"missing '[' after %f in pattern at pattern character $ii" );
+   }
+   list( $i, $re2 ) = 
$this->bracketedCharSetToRegex( $pat, $i, $len, $brcharsets );
+   // Because %f considers the beginning 
and end of the string
+   // to be \0, determine if $re2 matches 
that and take it
+   // into account with "^" and "$".
+   if ( preg_match( "/$re2/us", "\0" ) ) {
+   $re .= 
"(?= '0' && $pat[$i] <= '9' ) 
{
$n = ord( $pat[$i] ) - 0x30;
if ( $n === 0 || $n > count( $capt ) || 
in_array( $n, $opencapt ) ) {
@@ -358,34 +371,8 @@
break;
 
case '[':
-   $re .= '[';
-   $i++;
-   if ( $i < $len && $pat[$i] === '^' ) {
-   $re .= '^';
-   $i++;
-   }
-   for ( ; $i < $len && $pat[$i] !== ']'; $i++ ) {
-   if ( $pat[$i] === '%' ) {
-   $i++;
-   if ( $i >= $len ) {
-   break;
-   }
-   if ( isset( 
$brcharsets[$pat[$i]] ) ) {
-   $re .= 
$brcharsets[$pat[$i]];
-   } else {
-   $re .= preg_quote( 
$pat[$i], '/' );
-   }
-   } el

[MediaWiki-commits] [Gerrit] Login function for JavaScript - change (mediawiki/core)

2013-05-12 Thread Nikerabbit (Code Review)
Nikerabbit has uploaded a new change for review.

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


Change subject: Login function for JavaScript
..

Login function for JavaScript

Change-Id: I1113a076ff66e20ece1db9380969e7a7b5a68f1a
---
M resources/Resources.php
A resources/mediawiki.api/mediawiki.api.login.js
2 files changed, 51 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/82/63382/1

diff --git a/resources/Resources.php b/resources/Resources.php
index 0d8b330..78ca967 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -582,6 +582,12 @@
'mediawiki.Title',
),
),
+   'mediawiki.api.login' => array(
+   'scripts' => 'resources/mediawiki.api/mediawiki.api.login.js',
+   'dependencies' => array(
+   'mediawiki.api',
+   ),
+   ),
'mediawiki.api.parse' => array(
'scripts' => 'resources/mediawiki.api/mediawiki.api.parse.js',
'dependencies' => 'mediawiki.api',
diff --git a/resources/mediawiki.api/mediawiki.api.login.js 
b/resources/mediawiki.api/mediawiki.api.login.js
new file mode 100644
index 000..eb37808
--- /dev/null
+++ b/resources/mediawiki.api/mediawiki.api.login.js
@@ -0,0 +1,45 @@
+/**
+ * Make the two-step login easier.
+ * @author Niklas Laxström
+ * @class mw.Api.plugin.edit
+ * @since 1.22
+ */
+( function ( $, mw ) {
+   'use strict';
+
+   $.extend( mw.Api.prototype, {
+   /**
+* @param {string} username
+* @param {string} password
+* @return {jQuery.Promise} See mw.Api.post
+*/
+   login: function ( username, password ) {
+   var params, request,
+   deferred = $.Deferred(),
+   api = this;
+
+   params = {
+   action: 'login',
+   lgname: username,
+   lgpassword: password
+   };
+
+   request = api.post( params );
+   request.fail( deferred.reject );
+   request.done( function ( data ) {
+   params.lgtoken = data.login.token;
+   api.post( params )
+   .fail( deferred.reject )
+   .done( function ( data ) {
+   if ( data.login.result === 
'Success' ) {
+   deferred.resolve( data 
);
+   } else {
+   deferred.reject( 
data.login.result, data );
+   }
+   } );
+   } );
+
+   return deferred.promise();
+   }
+   } );
+}( jQuery, mediaWiki ) );

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

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

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


[MediaWiki-commits] [Gerrit] (bug 34666) Escape URLs in XML files created by generateSite... - change (mediawiki/core)

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

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


Change subject: (bug 34666) Escape URLs in XML files created by 
generateSitemap.php
..

(bug 34666) Escape URLs in XML files created by generateSitemap.php

Bug: 34666
Change-Id: Ifb6ddb0bc6ca03c411f938837b2f89a5a30e4fc3
---
M maintenance/generateSitemap.php
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/83/63383/1

diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php
index b356d18..6fee79b 100644
--- a/maintenance/generateSitemap.php
+++ b/maintenance/generateSitemap.php
@@ -490,7 +490,8 @@
function fileEntry( $url, $date, $priority ) {
return
"\t\n" .
-   "\t\t$url\n" .
+   // bug 34666: $url may contain bad characters such as 
ampersands.
+   "\t\t" . htmlspecialchars( $url ) . "\n" .
"\t\t$date\n" .
"\t\t$priority\n" .
"\t\n";

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

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

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


[MediaWiki-commits] [Gerrit] Make voterList output at least some text - change (mediawiki...SecurePoll)

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

Change subject: Make voterList output at least some text
..


Make voterList output at least some text

Change-Id: I49a731f98d4c5071ec53bd961cd125dd7817875b
---
M voterList.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/voterList.php b/voterList.php
index a27b416..330efde 100644
--- a/voterList.php
+++ b/voterList.php
@@ -23,10 +23,13 @@
 }
 $name = $args[0];
 
+$count = 0;
+
 for ( $user = 1; $user <= $maxUser; $user++ ) {
$insertRow = array( 'li_name' => $name, 'li_member' => $user );
if ( $minEdits === false ) {
$dbw->insert( 'securepoll_lists', $insertRow, $fname );
+   $count++;
continue;
}
 
@@ -38,5 +41,8 @@
$edits = $dbr->selectField( 'revision', 'COUNT(*)', $conds, $fname );
if ( $edits >= $minEdits ) {
$dbw->insert( 'securepoll_lists', $insertRow, $fname );
+   $count++;
}
 }
+
+echo "$count users eligble to vote";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I49a731f98d4c5071ec53bd961cd125dd7817875b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Blacklist alias languages on Special:SiteMatrix - change (mediawiki...SiteMatrix)

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

Change subject: Blacklist alias languages on Special:SiteMatrix
..


Blacklist alias languages on Special:SiteMatrix

Bug: 27194
Change-Id: I57d4a6d794cbb1cc746a08d3a4289431c768b5a1
---
M SpecialSiteMatrix.php
1 file changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/SpecialSiteMatrix.php b/SpecialSiteMatrix.php
index 4880250..2befd02 100644
--- a/SpecialSiteMatrix.php
+++ b/SpecialSiteMatrix.php
@@ -49,6 +49,10 @@
 
# Bulk of table
foreach ( $matrix->getLangList() as $lang ) {
+   if ( in_array( $lang, array( 'cz', 'dk', 'epo', 'jp', 
'minnan', 'nan', 'nb', 'zh-cfr' ) ) ) {
+   continue;
+   }
+
$anchor = strtolower( '' );
$s .= '';
$attribs = array();

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I57d4a6d794cbb1cc746a08d3a4289431c768b5a1
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/SiteMatrix
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Change default importImages comment to "Importing file" - change (mediawiki/core)

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

Change subject: Change default importImages comment to "Importing file"
..


Change default importImages comment to "Importing file"

Change-Id: Id65de095d7d7b697092a369f429b9e3b171d3e38
---
M maintenance/importImages.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/maintenance/importImages.php b/maintenance/importImages.php
index 2b5d690..9b0a290 100644
--- a/maintenance/importImages.php
+++ b/maintenance/importImages.php
@@ -104,7 +104,7 @@
 $timestamp = isset( $options['timestamp'] ) ? $options['timestamp'] : false;
 
 # Get the upload comment. Provide a default one in case there's no comment 
given.
-$comment = 'Importing image file';
+$comment = 'Importing file';
 
 if ( isset( $options['comment-file'] ) ) {
$comment = file_get_contents( $options['comment-file'] );
@@ -347,7 +347,7 @@
 --sleep=   Sleep between files. Useful mostly for debugging.
 --user=   Set username of uploader, default 'Maintenance script'
 --check-userblock   Check if the user got blocked during import.
---comment=Set file description, default 'Importing image file'.
+--comment=Set file description, default 'Importing file'.
 --comment-file=   Set description to the content of .
 --comment-ext= Causes the description for each file to be loaded from 
a file with the same name
 but the extension . If a global description is 
also given, it is appended.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id65de095d7d7b697092a369f429b9e3b171d3e38
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 34666) Escape URLs in XML files created by generateSite... - change (mediawiki/core)

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

Change subject: (bug 34666) Escape URLs in XML files created by 
generateSitemap.php
..


(bug 34666) Escape URLs in XML files created by generateSitemap.php

Bug: 34666
Change-Id: Ifb6ddb0bc6ca03c411f938837b2f89a5a30e4fc3
---
M maintenance/generateSitemap.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/generateSitemap.php b/maintenance/generateSitemap.php
index 75907ad..86fb97a 100644
--- a/maintenance/generateSitemap.php
+++ b/maintenance/generateSitemap.php
@@ -490,7 +490,8 @@
function fileEntry( $url, $date, $priority ) {
return
"\t\n" .
-   "\t\t$url\n" .
+   // bug 34666: $url may contain bad characters such as 
ampersands.
+   "\t\t" . htmlspecialchars( $url ) . "\n" .
"\t\t$date\n" .
"\t\t$priority\n" .
"\t\n";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifb6ddb0bc6ca03c411f938837b2f89a5a30e4fc3
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Liangent 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Added missing continue to avoid fatal error. - change (mediawiki/core)

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

Change subject: Added missing continue to avoid fatal error.
..


Added missing continue to avoid fatal error.

Change-Id: Ibb87c9e59e424fa84d662bb42349085d186dcc99
---
M maintenance/copyFileBackend.php
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/maintenance/copyFileBackend.php b/maintenance/copyFileBackend.php
index 736910a..685c868 100644
--- a/maintenance/copyFileBackend.php
+++ b/maintenance/copyFileBackend.php
@@ -190,7 +190,8 @@
: $src->getLocalReference( array( 'src' => 
$srcPath, 'latest' => 1 ) );
if ( !$fsFile ) {
if ( $src->fileExists( array( 'src' => $srcPath 
) ) === false ) {
-   $this->error( "File '$srcPath' was 
listed be must have been deleted." );
+   $this->error( "File '$srcPath' was 
listed but must have been deleted." );
+   continue;
} else {
$this->error( "Could not get local copy 
of $srcPath." );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb87c9e59e424fa84d662bb42349085d186dcc99
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Tim Starling 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 48236) Update login.wikimedia.org logo - change (operations/mediawiki-config)

2013-05-12 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: (bug 48236) Update login.wikimedia.org logo
..

(bug 48236) Update login.wikimedia.org logo

This commit replaces the current login.wikimedia.org logo
with a GIMP-created and losslessly compressed version that
does not have rsvg's rendering issue mentioned in the bug.

The file is fully protected on Commons and weighs just
3273 bytes, which is quite good for a logo.

Bug: 48236
Change-Id: I43ffba30080589705e231c385911460049e0ecb5
---
M wmf-config/InitialiseSettings.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37a527e..72c8fc2 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -645,7 +645,8 @@
'lmowiki'   => 
'//upload.wikimedia.org/wikipedia/commons/f/ff/Wikipedia-logo-v2-lmo.png', // 
bug 40285
'lnwiki'=> 
'//upload.wikimedia.org/wikipedia/commons/a/aa/Wikipedia-logo-v2-ln.png', // 
bug 46589
'wikidatawiki'  => 
'//upload.wikimedia.org/wikipedia/commons/e/e4/Wikidata-logo-en-135px.png',
-   'loginwiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'loginwiki' => 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-sc
+aled-down.png', // bug 48236
'lowiki'=> '$stdlogo',
'ltgwiki'   => 
'//upload.wikimedia.org/wikipedia/commons/7/77/Wikipedia-logo-v2-ltg.png',
'ltwiki'=> 
'//upload.wikimedia.org/wikipedia/commons/1/1c/Wikipedia-logo-v2-lt.png', // 
bug 46589

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Package request - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Package request
..

Tool Labs: Package request

Change-Id: I158d80f8fc23d981d3cbea4fa89c5c962efbc602
---
M modules/toollabs/manifests/dev_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/85/63385/1

diff --git a/modules/toollabs/manifests/dev_environ.pp 
b/modules/toollabs/manifests/dev_environ.pp
index 6a74ca0..7ba7746 100644
--- a/modules/toollabs/manifests/dev_environ.pp
+++ b/modules/toollabs/manifests/dev_environ.pp
@@ -35,6 +35,7 @@
   'elinks',
   'mercurial',
   'mosh',
+  'tig',
   'fakeroot', # for dpkg
   'build-essential', # for dpkg
   'mc', # midnight commander is favorite on toolserver, let's not make 
labs worse than toolserver

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Package request - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Package request
..


Tool Labs: Package request

Change-Id: I158d80f8fc23d981d3cbea4fa89c5c962efbc602
---
M modules/toollabs/manifests/dev_environ.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/dev_environ.pp 
b/modules/toollabs/manifests/dev_environ.pp
index 6a74ca0..7ba7746 100644
--- a/modules/toollabs/manifests/dev_environ.pp
+++ b/modules/toollabs/manifests/dev_environ.pp
@@ -35,6 +35,7 @@
   'elinks',
   'mercurial',
   'mosh',
+  'tig',
   'fakeroot', # for dpkg
   'build-essential', # for dpkg
   'mc', # midnight commander is favorite on toolserver, let's not make 
labs worse than toolserver

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I158d80f8fc23d981d3cbea4fa89c5c962efbc602
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Update formatting. - change (mediawiki...Translate)

2013-05-12 Thread Siebrand (Code Review)
Siebrand has uploaded a new change for review.

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


Change subject: Update formatting.
..

Update formatting.

Change-Id: I323c029abe4d59bf9b2f3c47f2488a45c36b492a
---
M tag/PageTranslationHooks.php
M tag/PageTranslationLogFormatter.php
M tag/SpecialPageTranslation.php
M tag/SpecialPageTranslationDeletePage.php
M tag/SpecialPageTranslationMovePage.php
M tag/TranslatablePage.php
M tag/TranslateMoveJob.php
M tests/MessageCollectionTest.php
M tests/MessageIndexTest.php
M tests/PageTranslationTaggingTest.php
M tests/StringMatcherTest.php
M tests/TranslateHooksTest.php
M utils/MessageGroupStats.php
M utils/MessageWebImporter.php
M utils/TranslateYaml.php
15 files changed, 363 insertions(+), 114 deletions(-)


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

diff --git a/tag/PageTranslationHooks.php b/tag/PageTranslationHooks.php
index 0e9ab94..84626e6 100644
--- a/tag/PageTranslationHooks.php
+++ b/tag/PageTranslationHooks.php
@@ -73,7 +73,9 @@
global $wgTranslatePageTranslationULS;
 
$title = $out->getTitle();
-   if ( TranslatablePage::isSourcePage( $title ) || 
TranslatablePage::isTranslationPage( $title ) ) {
+   if ( TranslatablePage::isSourcePage( $title ) ||
+   TranslatablePage::isTranslationPage( $title )
+   ) {
$out->addModules( 'ext.translate' );
if ( $wgTranslatePageTranslationULS ) {
$out->addModules( 
'ext.translate.pagetranslation.uls' );
@@ -512,7 +514,9 @@
 * Prevent editing of unknown pages in Translations namespace.
 * Hook: getUserPermissionsErrorsExpensive
 */
-   public static function preventUnknownTranslations( Title $title, User 
$user, $action, &$result ) {
+   public static function preventUnknownTranslations( Title $title, User 
$user,
+   $action, &$result
+   ) {
$handle = new MessageHandle( $title );
if ( $handle->isPageTranslation() && $action === 'edit' ) {
if ( !$handle->isValid() ) {
@@ -611,8 +615,13 @@
 */
public static function disableDelete( $article, $out, &$reason ) {
$title = $article->getTitle();
-   if ( TranslatablePage::isSourcePage( $title ) || 
TranslatablePage::isTranslationPage( $title ) ) {
-   $new = SpecialPage::getTitleFor( 
'PageTranslationDeletePage', $title->getPrefixedText() );
+   if ( TranslatablePage::isSourcePage( $title ) ||
+   TranslatablePage::isTranslationPage( $title )
+   ) {
+   $new = SpecialPage::getTitleFor(
+   'PageTranslationDeletePage',
+   $title->getPrefixedText()
+   );
$out->redirect( $new->getFullUrl() );
}
 
@@ -683,7 +692,8 @@
$actions[] = Linker::link( $translate, 
$linkDesc, array(), $par );
} else {
$markUrl = $translate->getFullUrl( $par 
);
-   $actions[] = wfMessage( 
'translate-tag-markthisagain', $diffUrl, $markUrl )->parse();
+   $actions[] = wfMessage( 
'translate-tag-markthisagain', $diffUrl, $markUrl )
+   ->parse();
}
} else {
$actions[] = wfMessage( 'translate-tag-hasnew', 
$diffUrl )->parse();
@@ -815,6 +825,7 @@
} else {
$display .= '/';
}
+
$growinglink .= '/';
}
}
diff --git a/tag/PageTranslationLogFormatter.php 
b/tag/PageTranslationLogFormatter.php
index 6e89801..b0121cd 100644
--- a/tag/PageTranslationLogFormatter.php
+++ b/tag/PageTranslationLogFormatter.php
@@ -12,7 +12,6 @@
  * Class for formatting Translate page translation logs.
  */
 class PageTranslationLogFormatter extends LogFormatter {
-
public function getMessageParameters() {
$params = parent::getMessageParameters();
$legacy = $this->entry->getParameters();
@@ -46,7 +45,10 @@
if ( $languages !== false ) {
$lang = $this->context->getLanguage();
 
-   $languages = array_map( 'trim', 
preg_split( '/,/', $languages, -1, PREG_SPLIT_NO_EMPTY ) );
+   $languages = array_map(
+  

[MediaWiki-commits] [Gerrit] (Bug 17099) Added "(page does not exist)" to unexistent talk... - change (mediawiki/core)

2013-05-12 Thread Luis Felipe Schenone (Code Review)
Luis Felipe Schenone has uploaded a new change for review.

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


Change subject: (Bug 17099) Added "(page does not exist)" to unexistent talk 
pages
..

(Bug 17099) Added "(page does not exist)" to unexistent talk pages

Followed the patch submitted by Nikola Kovacs in bugzilla.

Bug 17099

Change-Id: Ie3c12c66989665326cc10ea9a0bc1d569026faa0
---
M includes/Linker.php
M includes/SkinTemplate.php
M skins/Vector.php
3 files changed, 32 insertions(+), 11 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/87/63387/1

diff --git a/includes/Linker.php b/includes/Linker.php
index 4003efb..0c7b51f 100644
--- a/includes/Linker.php
+++ b/includes/Linker.php
@@ -2074,13 +2074,15 @@
 * element than the id, for reverse-compatibility, etc.)
 *
 * @param string $name id of the element, minus prefixes.
-* @param $options Mixed: null or the string 'withaccess' to add an 
access-
-*   key hint
+* @param $options Array: 'withaccess': add an access-key hint
+*'redlink': add (page does not exist)
 * @return String: contents of the title attribute (which you must HTML-
 *   escape), or false for no title attribute
 */
public static function titleAttrib( $name, $options = null ) {
wfProfileIn( __METHOD__ );
+
+   $options = (array)$options;
 
$message = wfMessage( "tooltip-$name" );
 
@@ -2096,7 +2098,16 @@
}
}
 
-   if ( $options == 'withaccess' ) {
+   if ( in_array( 'redlink', $options ) ) {
+   if ( $tooltip !== false || $tooltip !== '' ) {
+   $message = wfMessage( "red-link-title", 
$tooltip );
+   if ( !$message->isDisabled() ) {
+   $tooltip = $message->text();
+   }
+   }
+   }
+
+   if ( in_array( 'withaccess', $options ) ) {
$accesskey = self::accesskey( $name );
if ( $accesskey !== false ) {
if ( $tooltip === false || $tooltip === '' ) {
@@ -2387,12 +2398,14 @@
 * Returns the attributes for the tooltip and access key.
 * @return array
 */
-   public static function tooltipAndAccesskeyAttribs( $name ) {
+   public static function tooltipAndAccesskeyAttribs( $name, $options = 
null ) {
+   $options = (array)$options;
+   $options[] = 'withaccess';
# @todo FIXME: If Sanitizer::expandAttributes() treated "false" 
as "output
# no attribute" instead of "output '' as value for attribute", 
this
# would be three lines.
$attribs = array(
-   'title' => self::titleAttrib( $name, 'withaccess' ),
+   'title' => self::titleAttrib( $name, $options ),
'accesskey' => self::accesskey( $name )
);
if ( $attribs['title'] === false ) {
diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php
index e53d424..7004159 100644
--- a/includes/SkinTemplate.php
+++ b/includes/SkinTemplate.php
@@ -597,6 +597,7 @@
'text' => $this->username,
'href' => &$this->userpageUrlDetails['href'],
'class' => $this->userpageUrlDetails['exists'] 
? false : 'new',
+   'exists' => $this->userpageUrlDetails['exists'],
'active' => ( $this->userpageUrlDetails['href'] 
== $pageurl ),
'dir' => 'auto'
);
@@ -682,6 +683,7 @@
'text' => $this->username,
'href' => $href,
'class' => 
$this->userpageUrlDetails['exists'] ? false : 'new',
+   'exists' => 
$this->userpageUrlDetails['exists'],
'active' => ( $pageurl == $href )
);
$usertalkUrlDetails = 
$this->makeTalkUrlDetails( $this->userpage );
@@ -690,6 +692,7 @@
'text' => $this->msg( 'anontalk' 
)->text(),
'href' => $href,
'class' => 
$usertalkUrlDetails['exists'] ? false : 'new',
+   'exists' => 
$usertalkUrlDetails['exists'],
'active' => ( $pageurl == $href )
);
}
@@ -722,6 +725

[MediaWiki-commits] [Gerrit] (bug 48376) Customise Wikimania team wiki logo - change (operations/mediawiki-config)

2013-05-12 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: (bug 48376) Customise Wikimania team wiki logo
..

(bug 48376) Customise Wikimania team wiki logo

This patch changes $wgLogo for the Wikimania team wiki from
a non-public version (that I have never even seen :) into
a customised and losslessly compressed logo available on
Commons per bug request.

Obviously, the file page on Commons is fully protected
against uploads and moves.

I'm also moving the logo definition for the Spanish Wikivoyage
higher into the file to match the usual alphabetical sorting.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37a527e..cbe3624 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -486,6 +486,7 @@
'eswiki'=> 
'//upload.wikimedia.org/wikipedia/commons/8/8c/Wikipedia-logo-v2-es.png',
'eswikibooks'   => 
'//upload.wikimedia.org/wikipedia/commons/0/05/Wikibooks-logo-es.png',
'eswikinews'=> 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikinews-logo-es-peq.png',
+   'eswikivoyage'  => 
'//upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Wikivoyage-logo-es.svg/135px-Wikivoyage-logo-es.svg.png',
'eswiktionary'  => 
'//upload.wikimedia.org/wikipedia/commons/thumb/c/c3/WiktionaryEs.svg/135px-WiktionaryEs.svg.png',
'etwiki'=> 
'//upload.wikimedia.org/wikipedia/commons/4/41/Wikipedia-logo-v2-et.png',
'etwikibooks'   => 
'//upload.wikimedia.org/wikibooks/et/b/bc/Wiki.png',
@@ -908,8 +909,7 @@
'wg_enwiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Wikimedia_Community_Logo.svg/120px-Wikimedia_Community_Logo.svg.png',
'wikimania2005wiki' => 
'//upload.wikimedia.org/wikipedia/wikimania2005/b/bc/Wiki.png',
'wikimania' => 
'//upload.wikimedia.org/wikipedia/wikimania2006/c/c0/Mania-logo.gif',
-   'wikimaniateamwiki' => 
'//wikimaniateam.wikimedia.org/w/img_auth.php/b/bc/Wiki.png',
-   'eswikivoyage'  => 
'//upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Wikivoyage-logo-es.svg/135px-Wikivoyage-logo-es.svg.png',
+   'wikimaniateamwiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/0/07/Wikimania_team_logo.svg/135px-Wikimania_team_logo.svg.png',
 // bug 48376
'wowiki'=> 
'//upload.wikimedia.org/wikipedia/commons/4/41/Wikipedia-logo-v2-wo.png', // 
bug 40285
'wowiktionary'  => '$stdlogo',
'wuuwiki'   => 
'//upload.wikimedia.org/wikipedia/commons/9/92/Wikipedia-logo-v2-wuu.png', // 
bug 44974

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

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

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


[MediaWiki-commits] [Gerrit] (bug 48236) Update login.wikimedia.org logo - change (operations/mediawiki-config)

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

Change subject: (bug 48236) Update login.wikimedia.org logo
..


(bug 48236) Update login.wikimedia.org logo

This commit replaces the current login.wikimedia.org logo
with a GIMP-created and losslessly compressed version that
does not have rsvg's rendering issue mentioned in the bug.

The file is fully protected on Commons and weighs just
3273 bytes, which is quite good for a logo.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37a527e..494b47e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -645,7 +645,7 @@
'lmowiki'   => 
'//upload.wikimedia.org/wikipedia/commons/f/ff/Wikipedia-logo-v2-lmo.png', // 
bug 40285
'lnwiki'=> 
'//upload.wikimedia.org/wikipedia/commons/a/aa/Wikipedia-logo-v2-ln.png', // 
bug 46589
'wikidatawiki'  => 
'//upload.wikimedia.org/wikipedia/commons/e/e4/Wikidata-logo-en-135px.png',
-   'loginwiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/8/81/Wikimedia-logo.svg/135px-Wikimedia-logo.svg.png',
+   'loginwiki' => 
'//upload.wikimedia.org/wikipedia/commons/e/ed/Wikimedia_logo-scaled-down.png', 
// bug 48236
'lowiki'=> '$stdlogo',
'ltgwiki'   => 
'//upload.wikimedia.org/wikipedia/commons/7/77/Wikipedia-logo-v2-ltg.png',
'ltwiki'=> 
'//upload.wikimedia.org/wikipedia/commons/1/1c/Wikipedia-logo-v2-lt.png', // 
bug 46589

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I43ffba30080589705e231c385911460049e0ecb5
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Odder 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Thehelpfulone 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Patch for worker.py. It checks for external programs existen... - change (operations/dumps)

2013-05-12 Thread Sanja pavlovic (Code Review)
Sanja pavlovic has uploaded a new change for review.

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


Change subject: Patch for worker.py. It checks for external programs existence 
in the initialization part.
..

Patch for worker.py. It checks for external programs existence in the 
initialization part.

Left to be done/discuss is what to do with checks that already exist, because
they are now superfluous.

Change-Id: I3f7fafa6d2813931bf328bba6c519029ea412c99
---
M xmldumps-backup/worker.py
1 file changed, 31 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dumps 
refs/changes/90/63390/1

diff --git a/xmldumps-backup/worker.py b/xmldumps-backup/worker.py
index 08c3816..8ac6535 100644
--- a/xmldumps-backup/worker.py
+++ b/xmldumps-backup/worker.py
@@ -4187,6 +4187,37 @@
else:
config = WikiDump.Config()
 
+   try:
+   if (not exists( config.php ) ):
+   raise BackupError("php command %s not found" % 
config.php)
+   elif (not exists( config.mysql ) ):
+   raise BackupError("mysql command %s not found" 
% config.mysql)
+   elif (not exists( config.mysqldump ) ):
+   raise BackupError("mysqldump command %s not 
found" % config.mysqldump)
+   elif (not exists( config.head ) ):
+   raise BackupError("head command %s not found" % 
config.head)
+   elif (not exists( config.checkforbz2footer ) ):
+   raise BackupError("checkforbz2footer command %s 
not found" % config.checkforbz2footer)
+   elif (not exists( config.tail ) ):
+   raise BackupError("tail command %s not found" % 
config.tail)
+   elif (not exists( config.grep ) ):
+   raise BackupError("grep command %s not found" % 
config.grep)
+   elif (not exists( config.gzip ) ):
+   raise BackupError("gzip command %s not found" % 
config.gzip)
+   elif (not exists( config.bzip2 ) ):
+   raise BackupError("bzip2 command %s not found" 
% config.bzip2)
+   elif (not exists( config.writeuptopageid ) ):
+   raise BackupError("writeuptopageid command %s 
not found" % config.writeuptopageid)
+   elif (not exists( config.recompressxml ) ):
+   raise BackupError("recompressxml command %s not 
found" % config.recompressxml)
+   elif (not exists( config.sevenzip ) ):
+   raise BackupError("7zip command %s not found" % 
config.sevenzip)
+   elif (not exists( config.cat ) ):
+   raise BackupError("cat command %s not found" % 
config.cat)
+   except BackupError, e:
+   sys.stderr.write("%s. Exiting.\n" % e)
+   sys.exit(1)
+
if dryrun or chunkToDo or (jobRequested and not restart) or 
cutoff:
locksEnabled = False
else:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f7fafa6d2813931bf328bba6c519029ea412c99
Gerrit-PatchSet: 1
Gerrit-Project: operations/dumps
Gerrit-Branch: ariel
Gerrit-Owner: Sanja pavlovic 

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


[MediaWiki-commits] [Gerrit] contint: proxy only enabled on wikimedia.org - change (operations/puppet)

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

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


Change subject: contint: proxy only enabled on wikimedia.org
..

contint: proxy only enabled on wikimedia.org

The proxy configuration is server wide, which cause any virtual host to
serve them (ex: http://doc.mediawiki.org/ci/ ) when we only want to have
them served from integration.wikimedia.org.

As a side effect, that makes the bots to honor the robots.txt :-]

Change-Id: I022a3b086bb9822a9c123440d2e71d6056dafbc7
---
M modules/contint/files/apache/integration.wikimedia.org
M modules/contint/manifests/proxy_jenkins.pp
M modules/contint/manifests/proxy_zuul.pp
3 files changed, 12 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/91/63391/1

diff --git a/modules/contint/files/apache/integration.wikimedia.org 
b/modules/contint/files/apache/integration.wikimedia.org
index 6fd883f..44409fd 100644
--- a/modules/contint/files/apache/integration.wikimedia.org
+++ b/modules/contint/files/apache/integration.wikimedia.org
@@ -31,6 +31,8 @@
ErrorLog /var/log/apache2/integration_error.log
CustomLog /var/log/apache2/integration_access.log vhost_combined
 
+   Include *_proxy
+

Order Deny,Allow
AllowOverride All
diff --git a/modules/contint/manifests/proxy_jenkins.pp 
b/modules/contint/manifests/proxy_jenkins.pp
index 6302d2d..734ddcd 100644
--- a/modules/contint/manifests/proxy_jenkins.pp
+++ b/modules/contint/manifests/proxy_jenkins.pp
@@ -8,6 +8,11 @@
 
   file {
 '/etc/apache2/conf.d/jenkins_proxy':
+  ensure => absent,
+  }
+
+  file {
+'/etc/apache2/jenkins_proxy':
   owner  => 'root',
   group  => 'root',
   mode   => '0444',
diff --git a/modules/contint/manifests/proxy_zuul.pp 
b/modules/contint/manifests/proxy_zuul.pp
index 2422d5f..06df787 100644
--- a/modules/contint/manifests/proxy_zuul.pp
+++ b/modules/contint/manifests/proxy_zuul.pp
@@ -5,6 +5,11 @@
 
   file {
 '/etc/apache2/conf.d/zuul_proxy':
+  ensure => absent,
+  }
+
+  file {
+'/etc/apache2/zuul_proxy':
   owner  => 'root',
   group  => 'root',
   mode   => '0444',

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

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

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


[MediaWiki-commits] [Gerrit] (bug 48382) Customise Wikimania wiki logos with years - change (operations/mediawiki-config)

2013-05-12 Thread Odder (Code Review)
Odder has uploaded a new change for review.

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


Change subject: (bug 48382) Customise Wikimania wiki logos with years
..

(bug 48382) Customise Wikimania wiki logos with years

This patch changes $wgLogo for all Wikimania wikis from the
default (and incorrect in case of colours) .gif files into
customised PNG versions with years which are complaint with
the general logo creation guidelines (ie. the text of the
second line is 60% the size of the first line and 60% black).

Obviously, the file pages on Commons are fully protected
against uploads and moves.

As an additional bonus, I created logos for future Wikimanias
up to the year 2020, so there will be no need for any changes
(if the logo doesn't change, of course). When you run out of
logos in the year 2020, please give me a shout!

Bug: 48382
Change-Id: I5715fd861b77289ea8a0a7a337582975d23437c7
---
M wmf-config/InitialiseSettings.php
1 file changed, 10 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 37a527e..b563a98 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -906,8 +906,16 @@
'wawiktionary'  => 
'//upload.wikimedia.org/wikipedia/commons/thumb/e/e6/Wiktionary-logo-wa.png/135px-Wiktionary-logo-wa.png',
 // bug 43240
'warwiki'   => 
'//upload.wikimedia.org/wikipedia/commons/8/81/Wikipedia-logo-v2-war.png', // 
bug 40285
'wg_enwiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/7/75/Wikimedia_Community_Logo.svg/120px-Wikimedia_Community_Logo.svg.png',
-   'wikimania2005wiki' => 
'//upload.wikimedia.org/wikipedia/wikimania2005/b/bc/Wiki.png',
-   'wikimania' => 
'//upload.wikimedia.org/wikipedia/wikimania2006/c/c0/Mania-logo.gif',
+   'wikimania2005wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/d/de/Wikimania_2005_logo.svg/135px-Wikimania_2005_logo.svg.png',
 // bug 48382
+   'wikimania2006wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/2/2b/Wikimania_2006_logo.svg/135px-Wikimania_2006_logo.svg.png',
 // bug 48382
+   'wikimania2007wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/5/5a/Wikimania_2007_logo.svg/135px-Wikimania_2007_logo.svg.png',
 // bug 48382
+   'wikimania2008wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/0/02/Wikimania_2008_logo.svg/135px-Wikimania_2008_logo.svg.png',
 // bug 48382
+   'wikimania2009wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/2/28/Wikimania_2009_logo.svg/135px-Wikimania_2009_logo.svg.png',
 // bug 48382
+   'wikimania2010wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/9/9f/Wikimania_2010_logo.svg/135px-Wikimania_2010_logo.svg.png',
 // bug 48382
+   'wikimania2011wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/a/a3/Wikimania_2011_logo.svg/135px-Wikimania_2011_logo.svg.png',
 // bug 48382
+   'wikimania2012wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/f/fc/Wikimania_2012_logo.svg/135px-Wikimania_2012_logo.svg.png',
 // bug 48382
+   'wikimania2013wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/5/52/Wikimania_2013_logo.svg/135px-Wikimania_2013_logo.svg.png',
 // bug 48382
+   'wikimania2014wiki' => 
'//upload.wikimedia.org/wikipedia/commons/thumb/c/cf/Wikimania_2014_logo.svg/135px-Wikimania_2014_logo.svg.png',
 // bug 48382
'wikimaniateamwiki' => 
'//wikimaniateam.wikimedia.org/w/img_auth.php/b/bc/Wiki.png',
'eswikivoyage'  => 
'//upload.wikimedia.org/wikipedia/commons/thumb/3/3c/Wikivoyage-logo-es.svg/135px-Wikivoyage-logo-es.svg.png',
'wowiki'=> 
'//upload.wikimedia.org/wikipedia/commons/4/41/Wikipedia-logo-v2-wo.png', // 
bug 40285

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

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

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


[MediaWiki-commits] [Gerrit] Disable linkitem for browsers without CORS support - change (mediawiki...Wikibase)

2013-05-12 Thread Hoo man (Code Review)
Hoo man has uploaded a new change for review.

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


Change subject: Disable linkitem for browsers without CORS support
..

Disable linkitem for browsers without CORS support

This will affect users of browser versions less
than IE10 or Firefox 3.5.

Bug: 48389
Change-Id: Iae53b39dd20342f5719fd5c67d2891284f1b39bf
---
M client/resources/wikibase.client.linkitem.init.js
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/client/resources/wikibase.client.linkitem.init.js 
b/client/resources/wikibase.client.linkitem.init.js
index 5fd3470..9c6ae9b 100644
--- a/client/resources/wikibase.client.linkitem.init.js
+++ b/client/resources/wikibase.client.linkitem.init.js
@@ -35,6 +35,10 @@
 * Displays the link which opens the dialog (using 
jquery.wikibase.linkitem)
 */
$( document ).ready( function() {
+   if ( !$.support.cors ) {
+   // This will fail horribly w/o CORS support on WMF-like 
setups (different domains for repo and client)
+   return;
+   }
$( '.wbc-editpage' ).eq(0)
.empty()
.append(

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iae53b39dd20342f5719fd5c67d2891284f1b39bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Hoo man 

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


[MediaWiki-commits] [Gerrit] Fix unindent action when acting on multiple list items - change (mediawiki...VisualEditor)

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

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


Change subject: Fix unindent action when acting on multiple list items
..

Fix unindent action when acting on multiple list items

First off just failing test coverage.

Change-Id: I7418910412d292ef4953e294a97f66e48d6f776f
---
M modules/ve/actions/ve.IndentationAction.js
M modules/ve/test/actions/ve.IndentationAction.test.js
2 files changed, 23 insertions(+), 0 deletions(-)


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

diff --git a/modules/ve/actions/ve.IndentationAction.js 
b/modules/ve/actions/ve.IndentationAction.js
index 2045d0c..ff884d5 100644
--- a/modules/ve/actions/ve.IndentationAction.js
+++ b/modules/ve/actions/ve.IndentationAction.js
@@ -117,8 +117,12 @@
  *
  * @method
  * @param {ve.dm.ListItemNode} listItem List item to indent
+ * @throws {Error} listItem must be a ve.dm.ListItemNode
  */
 ve.IndentationAction.prototype.indentListItem = function ( listItem ) {
+   if ( !( listItem instanceof ve.dm.ListItemNode ) ) {
+   throw new Error( 'listItem must be a ve.dm.ListItemNode' );
+   }
/*
 * Indenting a list item is done as follows:
 * 1. Wrap the listItem in a list and a listItem ( --> )
@@ -191,8 +195,12 @@
  *
  * @method
  * @param {ve.dm.ListItemNode} listItem List item to unindent
+ * @throws {Error} listItem must be a ve.dm.ListItemNode
  */
 ve.IndentationAction.prototype.unindentListItem = function ( listItem ) {
+   if ( !( listItem instanceof ve.dm.ListItemNode ) ) {
+   throw new Error( 'listItem must be a ve.dm.ListItemNode' );
+   }
/*
 * Outdenting a list item is done as follows:
 * 1. Split the parent list to isolate the listItem in its own list
diff --git a/modules/ve/test/actions/ve.IndentationAction.test.js 
b/modules/ve/test/actions/ve.IndentationAction.test.js
index 055b310..eda06f2 100644
--- a/modules/ve/test/actions/ve.IndentationAction.test.js
+++ b/modules/ve/test/actions/ve.IndentationAction.test.js
@@ -52,6 +52,21 @@
delete data[12].internal;
},
'msg': 'decrease indentation on partial 
selection of list item "Item 2"'
+   },
+   {
+   'range': new ve.Range( 1, 21 ),
+   'method': 'decrease',
+   'expectedSelection': new ve.Range( 0, 16 ),
+   'expectedData': function ( data ) {
+   data.splice( 0, 2 );
+   data.splice( 8, 2 );
+   data.splice( 16, 1, { 'type': 'data' });
+   },
+   'expectedOriginalData': function ( data ) {
+   // generated: 'wrapper' is removed by 
the action and not restored by undo
+   //delete data[12].internal;
+   },
+   'msg': 'decrease indentation on Items 1 & 2'
}
];
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7418910412d292ef4953e294a97f66e48d6f776f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

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


[MediaWiki-commits] [Gerrit] Add smw.util.async - change (mediawiki...SemanticMediaWiki)

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

Change subject: Add smw.util.async
..


Add smw.util.async

* Add smw.util.async.load()
* Add smw.util.async.isEnabled()
* Add smw.debug()
* Renamed capitalize() to ucFirst()
* Fix jsDuck docs

## Example
var fn = function( options ) {}

smw.util.async.load( $( this ), fn, { 'id': ... } );

Change-Id: Idfd34c7f29a8f112f116d9080ca9991ffcfa77a3
---
M resources/Resources.php
M resources/smw/ext.smw.js
M tests/qunit/smw/ext.smw.test.js
3 files changed, 179 insertions(+), 24 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index cc80fe1..b8376d0 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -40,9 +40,8 @@
 return array(
// SMW core class
'ext.smw' => $moduleTemplate + array(
-   'scripts' => array(
-   'resources/smw/ext.smw.js'
-   )
+   'scripts' => 'resources/smw/ext.smw.js',
+   'dependencies' => 'jquery.async',
),
 
// Common styles independent from JavaScript
diff --git a/resources/smw/ext.smw.js b/resources/smw/ext.smw.js
index 59601f9..f166b56 100644
--- a/resources/smw/ext.smw.js
+++ b/resources/smw/ext.smw.js
@@ -17,9 +17,11 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA
  *
- * @file
+ * @since 1.8
  *
- * @since 1.9
+ * @file
+ * @ignore
+ *
  * @ingroup SMW
  *
  * @licence GNU GPL v2+
@@ -28,8 +30,9 @@
  */
 
 /**
- * Declares global smw instance and namespace
+ * Declares methods and properties that are available through the smw namespace
  *
+ * @since  1.8
  * @class smw
  */
 var instance = ( function ( $ ) {
@@ -77,7 +80,18 @@
};
 
/**
-* Returns SMW version
+* Returns current debug status
+*
+* @since 1.9
+*
+* @return {boolean}
+*/
+   instance.debug = function() {
+   return mediaWiki.config.get( 'debug' );
+   };
+
+   /**
+* Returns Semantic MediaWiki version
 *
 * @since 1.9
 *
@@ -89,6 +103,10 @@
 
/**
 * Declares methods to access utility functions
+*
+* @since  1.9
+*
+* @static
 * @class smw.util
 * @alias smw.Util
 */
@@ -118,14 +136,21 @@
 * @param {string} s
 * @return {string}
 */
-   capitalize: function( s ) {
+   ucFirst: function( s ) {
return s.charAt(0).toUpperCase() + s.slice(1);
},
 
/**
 * Declares methods to access information about namespace 
settings
-* @class smw.util.namespace
+
+* Example to find localised name:
+* smw.util.namespace.getName( 'property' );
+* smw.util.namespace.getName( 'file' );
+*
+* @since  1.9
+*
 * @static
+* @class smw.util.namespace
 */
namespace: {
 
@@ -151,7 +176,7 @@
 */
getId: function( key ) {
if( typeof key === 'string' ) {
-   return this.getList()[ 
instance.util.capitalize( instance.util.clean( key ) ) ];
+   return this.getList()[ 
instance.util.ucFirst( instance.util.clean( key ) ) ];
}
return undefined;
},
@@ -172,12 +197,75 @@
}
return undefined;
}
-   }
+   },
 
+   /**
+* Declares methods to improve browser responsiveness by loading
+* invoked methods asynchronously using the jQuery.eachAsync 
plug-in
+*
+* Example:
+* var fn = function( options ) {};
+* smw.util.async.load( $( this ), fn, {} );
+*
+* @since  1.9
+*
+* @static
+* @class smw.util.async
+*/
+   async: {
+
+   /**
+* Returns if eachAsync is available for asynchronous 
loading
+*
+* @return {boolean}
+*/
+   isEnabled: function() {
+   return $.isFunction( $.fn.eachAsync );
+   },
+
+   /**
+

[MediaWiki-commits] [Gerrit] Add Special:DiffLink/### as an internally-linkable redirect ... - change (mediawiki/core)

2013-05-12 Thread Code Review
Jérémie Roquet has uploaded a new change for review.

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


Change subject: Add Special:DiffLink/### as an internally-linkable redirect to 
index.php?diff=###.
..

Add Special:DiffLink/### as an internally-linkable redirect to 
index.php?diff=###.

This is similar to Special:PermanentLink added in changeset 1afaa075 and has 
been
asked for several times in different places, including:
 - on the English Wikipedia (oldid=539308532)
 - on mediawiki.org (lqt_oldid=31691)
 - on the French Wikipedia (oldif=93029892)

A notable use-case is linking to diffs in the edit summaries where external
links are not yet allowed (bug 14892)

Change-Id: I77fdaf8e04375caa1d67ca4a3ec3bd93920c3309
---
M includes/AutoLoader.php
M includes/SpecialPage.php
M includes/SpecialPageFactory.php
M languages/messages/MessagesEn.php
4 files changed, 23 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/95/63395/1

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 26d5b94..b8774b7 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -944,6 +944,7 @@
'SpecialChangePassword' => 
'includes/specials/SpecialChangePassword.php',
'SpecialComparePages' => 'includes/specials/SpecialComparePages.php',
'SpecialContributions' => 'includes/specials/SpecialContributions.php',
+   'SpecialDiffLink' => 'includes/SpecialPage.php',
'SpecialEditWatchlist' => 'includes/specials/SpecialEditWatchlist.php',
'SpecialEmailUser' => 'includes/specials/SpecialEmailuser.php',
'SpecialExport' => 'includes/specials/SpecialExport.php',
diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php
index f619c79..91fb194 100644
--- a/includes/SpecialPage.php
+++ b/includes/SpecialPage.php
@@ -1395,3 +1395,23 @@
return true;
}
 }
+
+/**
+ * Redirect from Special:DiffLink/### to index.php?diff=###
+ */
+class SpecialDiffLink extends RedirectSpecialPage {
+   function __construct() {
+   parent::__construct( 'DiffLink' );
+   $this->mAllowedRedirectParams = array();
+   }
+
+   function getRedirect( $subpage ) {
+   $subpage = intval( $subpage );
+   if ( $subpage === 0 ) {
+   # throw an error page when no subpage was given
+   throw new ErrorPageError( 'nopagetitle', 'nopagetext' );
+   }
+   $this->mAddedRedirectParams['diff'] = $subpage;
+   return true;
+   }
+}
diff --git a/includes/SpecialPageFactory.php b/includes/SpecialPageFactory.php
index 3c4e61d..630f277 100644
--- a/includes/SpecialPageFactory.php
+++ b/includes/SpecialPageFactory.php
@@ -155,6 +155,7 @@
// Unlisted / redirects
'Blankpage' => 'SpecialBlankpage',
'Blockme'   => 'SpecialBlockme',
+   'DiffLink'  => 'SpecialDiffLink',
'Emailuser' => 'SpecialEmailUser',
'Movepage'  => 'MovePageForm',
'Mycontributions'   => 'SpecialMycontributions',
diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index 79a0a93..11c5ab1 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -397,6 +397,7 @@
'CreateAccount' => array( 'CreateAccount' ),
'Deadendpages'  => array( 'DeadendPages' ),
'DeletedContributions'  => array( 'DeletedContributions' ),
+   'DiffLink'  => array( 'DiffLink' ),
'Disambiguations'   => array( 'Disambiguations' ),
'DoubleRedirects'   => array( 'DoubleRedirects' ),
'EditWatchlist' => array( 'EditWatchlist' ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I77fdaf8e04375caa1d67ca4a3ec3bd93920c3309
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Jérémie Roquet 

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


[MediaWiki-commits] [Gerrit] Added hook to purge CDN for thumbnails only in swift. - change (operations/mediawiki-config)

2013-05-12 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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


Change subject: Added hook to purge CDN for thumbnails only in swift.
..

Added hook to purge CDN for thumbnails only in swift.

* This should not be needed in theory, though will handle any files
  that failed to copy or be created in ceph.

Change-Id: I3ec2dede732150941c7241ab6dd8757e34e71ead
---
M wmf-config/filebackend.php
1 file changed, 34 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/filebackend.php b/wmf-config/filebackend.php
index ca6477f..0cf59c8 100644
--- a/wmf-config/filebackend.php
+++ b/wmf-config/filebackend.php
@@ -219,3 +219,37 @@
'abbrvThreshold'   => 160
);
 }
+
+// Make sure any thumbnails in swift but not ceph have the CDN get purged
+$wgHooks['LocalFilePurgeThumbnails'][] = function( File $file, $archiveName ) {
+   global $site, $lang;
+
+   $backend = FileBackendGroup::singleton()->get( 'local-swift' );
+   // Get thumbnail dir relative to thumb zone
+   if ( $archiveName !== false ) {
+   $thumbRel = $file->getArchiveThumbRel( $archiveName ); // old 
version
+   } else {
+   $thumbRel = $file->getRel(); // current version
+   }
+   $thumbDir = $backend->getRootStoragePath() . "/local-thumb/$thumbRel";
+
+   $list = $backend->getFileList( array( 'dir' => $thumbDir ) );
+   if ( $list === null ) {
+   wfDebugLog( 'SwiftBackend', "Could not get thumbnail listing." .
+   "Site: `{$site}` Lang: `{$lang}` ThumbRel: 
`{$thumbRel}/`" );
+   } else {
+   $urls = array();
+   wfProfileIn( __METHOD__ . '-list' );
+   foreach ( $list as $relFile ) {
+   $urls[] = ( $archiveName !== false )
+   ? $file->getArchiveThumbUrl( $archiveName, 
$relFile )
+   : $file->getThumbUrl( $relFile );
+   }
+   wfProfileOut( __METHOD__ . '-list' );
+   wfProfileIn( __METHOD__ . '-purge' );
+   SquidUpdate::purge( $urls );
+   wfProfileOut( __METHOD__ . '-purge' );
+   }
+
+   return true;
+};

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3ec2dede732150941c7241ab6dd8757e34e71ead
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Fix some JS related docs in smw-core (jsDuck) - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Fix some JS related docs in smw-core (jsDuck)
..

Fix some JS related docs in smw-core (jsDuck)

Fix some of the JS docs in order for jsDuck to generate
appropriate documentation.

Change-Id: I40fbbb114318a56add5f1d9980896d814f46ecd3
---
M resources/smw/api/ext.smw.api.js
M resources/smw/data/ext.smw.data.js
M resources/smw/ext.smw.css
M resources/smw/query/ext.smw.query.js
M resources/smw/special/ext.smw.query.ui.css
M resources/smw/special/ext.smw.special.ask.css
M resources/smw/special/ext.smw.special.ask.js
M resources/smw/util/ext.smw.util.tooltip.css
M resources/smw/util/ext.smw.util.tooltip.js
M tests/qunit/smw/api/ext.smw.api.test.js
M tests/qunit/smw/data/ext.smw.data.test.js
M tests/qunit/smw/ext.smw.test.js
M tests/qunit/smw/query/ext.smw.query.test.js
M tests/qunit/smw/util/ext.smw.util.tooltip.test.js
14 files changed, 492 insertions(+), 136 deletions(-)


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

diff --git a/resources/smw/api/ext.smw.api.js b/resources/smw/api/ext.smw.api.js
index c0fe954..e5a902c 100644
--- a/resources/smw/api/ext.smw.api.js
+++ b/resources/smw/api/ext.smw.api.js
@@ -32,25 +32,25 @@
/*global md5 */
 
/**
-* Constructor to create an object to interact with the API and SMW
+* Constructor to create an object to interact with the Semantic
+* MediaWiki Api
 *
 * @since 1.9
 *
 * @class
-* @alias smw.Api
+* @alias smw.api
 * @constructor
 */
-   smw.api = function() {};
+   smw.Api = function() {};
 
/* Public methods */
 
-   smw.api.prototype = {
+   smw.Api.prototype = {
 
/**
 * Convenience method to parse and map a JSON string
 *
-* Emulates partly $.parseJSON (jquery.js)
-* @see http://www.json.org/js.html
+* Emulates partly $.parseJSON (jquery.js)(see 
http://www.json.org/js.html)
 *
 * @since  1.9
 *
@@ -81,16 +81,15 @@
},
 
/**
-* Returns results from the SMWAPI
+* Returns results from the SMWApi
 *
-* On the topic of converters
-* @see http://bugs.jquery.com/ticket/9095
+* On the topic of converters (see 
http://bugs.jquery.com/ticket/9095)
 *
-* var smwApi = new smw.Api();
-* smwApi.fetch( query )
-*   .done( function ( data ) { } )
-*   .fail( function ( error ) { } );
-*
+* Example:
+* var smwApi = new smw.Api();
+* smwApi.fetch( query )
+*   .done( function ( data ) { } )
+*   .fail( function ( error ) { } );
 *
 * @since 1.9
 *
@@ -150,6 +149,6 @@
};
 
//Alias
-   smw.Api = smw.api;
+   smw.api = smw.Api;
 
 } )( jQuery, mediaWiki, semanticMediaWiki );
\ No newline at end of file
diff --git a/resources/smw/data/ext.smw.data.js 
b/resources/smw/data/ext.smw.data.js
index a688985..fe42cd8 100644
--- a/resources/smw/data/ext.smw.data.js
+++ b/resources/smw/data/ext.smw.data.js
@@ -1,21 +1,42 @@
 /**
- * SMW DataItem JavaScript representation
+ * This file is part of the Semantic MediaWiki JavaScript DataItem module
+ * @see https://semantic-mediawiki.org/
  *
- * @since 1.9
+ * @section LICENSE
+ * 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
  *
  * @file
+ * @ignore
+ *
+ * @since 1.9
  * @ingroup SMW
  *
- * @licence GNU GPL v2 or later
+ * @licence GNU GPL v2+
  * @author mwjames
  */
 ( function( $, mw, smw ) {
'use strict';
 
/**
-* Constructor
+* Constructor to create an object to interact with data objects and Api
 *
-* @var Object
+* @since 1.9
+*
+* @class
+* @alias smw.data
+* @constructor
 *

[MediaWiki-commits] [Gerrit] Fix some JS related docs in smw-core (JSDuck) - change (mediawiki...SemanticMediaWiki)

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

Change subject: Fix some JS related docs in smw-core (JSDuck)
..


Fix some JS related docs in smw-core (JSDuck)

Fix some of the JS docs in order for JSDuck to generate
appropriate documentation.

Change-Id: I40fbbb114318a56add5f1d9980896d814f46ecd3
---
M resources/smw/api/ext.smw.api.js
M resources/smw/data/ext.smw.data.js
M resources/smw/ext.smw.css
M resources/smw/query/ext.smw.query.js
M resources/smw/special/ext.smw.query.ui.css
M resources/smw/special/ext.smw.special.ask.css
M resources/smw/special/ext.smw.special.ask.js
M resources/smw/util/ext.smw.util.tooltip.css
M resources/smw/util/ext.smw.util.tooltip.js
M tests/qunit/smw/api/ext.smw.api.test.js
M tests/qunit/smw/data/ext.smw.data.test.js
M tests/qunit/smw/ext.smw.test.js
M tests/qunit/smw/query/ext.smw.query.test.js
M tests/qunit/smw/util/ext.smw.util.tooltip.test.js
14 files changed, 492 insertions(+), 136 deletions(-)

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



diff --git a/resources/smw/api/ext.smw.api.js b/resources/smw/api/ext.smw.api.js
index c0fe954..e5a902c 100644
--- a/resources/smw/api/ext.smw.api.js
+++ b/resources/smw/api/ext.smw.api.js
@@ -32,25 +32,25 @@
/*global md5 */
 
/**
-* Constructor to create an object to interact with the API and SMW
+* Constructor to create an object to interact with the Semantic
+* MediaWiki Api
 *
 * @since 1.9
 *
 * @class
-* @alias smw.Api
+* @alias smw.api
 * @constructor
 */
-   smw.api = function() {};
+   smw.Api = function() {};
 
/* Public methods */
 
-   smw.api.prototype = {
+   smw.Api.prototype = {
 
/**
 * Convenience method to parse and map a JSON string
 *
-* Emulates partly $.parseJSON (jquery.js)
-* @see http://www.json.org/js.html
+* Emulates partly $.parseJSON (jquery.js)(see 
http://www.json.org/js.html)
 *
 * @since  1.9
 *
@@ -81,16 +81,15 @@
},
 
/**
-* Returns results from the SMWAPI
+* Returns results from the SMWApi
 *
-* On the topic of converters
-* @see http://bugs.jquery.com/ticket/9095
+* On the topic of converters (see 
http://bugs.jquery.com/ticket/9095)
 *
-* var smwApi = new smw.Api();
-* smwApi.fetch( query )
-*   .done( function ( data ) { } )
-*   .fail( function ( error ) { } );
-*
+* Example:
+* var smwApi = new smw.Api();
+* smwApi.fetch( query )
+*   .done( function ( data ) { } )
+*   .fail( function ( error ) { } );
 *
 * @since 1.9
 *
@@ -150,6 +149,6 @@
};
 
//Alias
-   smw.Api = smw.api;
+   smw.api = smw.Api;
 
 } )( jQuery, mediaWiki, semanticMediaWiki );
\ No newline at end of file
diff --git a/resources/smw/data/ext.smw.data.js 
b/resources/smw/data/ext.smw.data.js
index a688985..fe42cd8 100644
--- a/resources/smw/data/ext.smw.data.js
+++ b/resources/smw/data/ext.smw.data.js
@@ -1,21 +1,42 @@
 /**
- * SMW DataItem JavaScript representation
+ * This file is part of the Semantic MediaWiki JavaScript DataItem module
+ * @see https://semantic-mediawiki.org/
  *
- * @since 1.9
+ * @section LICENSE
+ * 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
  *
  * @file
+ * @ignore
+ *
+ * @since 1.9
  * @ingroup SMW
  *
- * @licence GNU GPL v2 or later
+ * @licence GNU GPL v2+
  * @author mwjames
  */
 ( function( $, mw, smw ) {
'use strict';
 
/**
-* Constructor
+* Constructor to create an object to interact with data objects and Api
 *
-* @var Object
+* @since 1.9
+*
+* @class
+* @alias smw.data
+* @constructor
 */
smw.Data = function() {};
 
@@ -23,6 +44,12 @@
 
 

[MediaWiki-commits] [Gerrit] bump to 1.21.0rc5 - change (mediawiki/core)

2013-05-12 Thread MarkAHershberger (Code Review)
MarkAHershberger has uploaded a new change for review.

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


Change subject: bump to 1.21.0rc5
..

bump to 1.21.0rc5

Change-Id: Ib16c34e6cb0fbbbcacb94be1ed3c031f5fe4d741
---
M includes/DefaultSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/98/63398/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index f5f46c4..0ad4362 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -63,7 +63,7 @@
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.21.0rc4';
+$wgVersion = '1.21.0rc5';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib16c34e6cb0fbbbcacb94be1ed3c031f5fe4d741
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger 

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


[MediaWiki-commits] [Gerrit] Tool Labs: Implement mail relay - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Implement mail relay
..

Tool Labs: Implement mail relay

Sooner rather than later to prevent gridengine spam.  Better
collect locally than post to mailing lists.  :-)

Change-Id: Id49556eb1acb2148609541b668db6b1fdb5d0683
---
A modules/toollabs/files/exim4-norelay.conf
M modules/toollabs/manifests/init.pp
A modules/toollabs/manifests/mailrelay.pp
A modules/toollabs/templates/exim4.conf.erb
A modules/toollabs/templates/mail-relay.erb
5 files changed, 131 insertions(+), 0 deletions(-)


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

diff --git a/modules/toollabs/files/exim4-norelay.conf 
b/modules/toollabs/files/exim4-norelay.conf
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/modules/toollabs/files/exim4-norelay.conf
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 2490f4a..905dc6d 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -99,5 +99,10 @@
 group => "root",
   }
 
+  File <| title == '/etc/exim4/exim4.conf' |> {
+content => undef,
+source => [ "$store/mail-relay", 
"puppet:///modules/toollabs/exim4-norelay.conf" ],
+  }
+
 }
 
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
new file mode 100644
index 000..7654d69
--- /dev/null
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -0,0 +1,30 @@
+# Class: toollabs::mailrelay
+#
+# This role sets up a mail relay in the Tool Labs model.
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class toollabs::mailrelay($maildomain) inherits toollabs {
+  include toollabs::infrastructure
+
+  file { "$store/mail-relay":
+ensure => file,
+owner => 'root',
+group => 'root',
+mode => '0444',
+require => File[$store],
+content => template("toollabs/mail-relay.erb"),
+  }
+
+  File <| title == '/etc/exim4/exim4.conf' |> {
+source => undef,
+content => template("toollabs/exim4.conf.erb"),
+  }
+}
+
diff --git a/modules/toollabs/templates/exim4.conf.erb 
b/modules/toollabs/templates/exim4.conf.erb
new file mode 100644
index 000..4af8e15
--- /dev/null
+++ b/modules/toollabs/templates/exim4.conf.erb
@@ -0,0 +1,85 @@
+
+primary_hostname = relay.<%= maildomain %>
+qualify_domain = <%= maildomain %>
+
+domainlist local_domains = <%= maildomain %>
+domainlist relay_to_domains =
+hostlist relay_from_hosts = 10.0.0.0/8
+
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+
+never_users = root
+
+host_lookup = *
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+acl_check_rcpt:
+accept  hosts = :
+denymessage   = Restricted characters in address
+domains   = +local_domains
+local_parts   = ^[.] : ^.*[@%!/|]
+
+denymessage   = Restricted characters in address
+domains   = !+local_domains
+local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+accept  local_parts   = postmaster
+domains   = +local_domains
+
+require verify= sender
+
+accept  hosts = +relay_from_hosts
+control   = submission
+
+accept  authenticated = *
+control   = submission
+
+require message = relay not permitted
+domains = +local_domains : +relay_domains
+
+require verify = recipient
+
+accept
+
+
+acl_check_data:
+accept
+
+
+begin routers
+
+dnslookup:
+  driver = dnslookup
+  domains = ! +local_domains
+  transport = remote_smtp
+  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+  no_more
+
+system_aliases:
+  driver = redirect
+  allow_fail
+  allow_defer
+  data = ${lookup{$local_part}lsearch{/etc/aliases}}
+
+localuser:
+  driver = accept
+  check_local_user
+  transport = local_delivery
+
+begin transports
+
+remote_smtp:
+  driver = smtp
+
+local_delivery:
+  driver = appendfile
+  file = <%= store %>/mail/$local_part
+  delivery_date_add
+  envelope_to_add
+  return_path_add
+
+begin retry
+*   *   F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
diff --git a/modules/toollabs/templates/mail-relay.erb 
b/modules/toollabs/templates/mail-relay.erb
new file mode 100644
index 000..dfac364
--- /dev/null
+++ b/modules/toollabs/templates/mail-relay.erb
@@ -0,0 +1,11 @@
+## Managed by puppet
+
+qualify_domain = <%= maildomain %>
+local_domains =
+
+smarthost:
+  driver = domainlist
+  transport = remote_smtp
+  route_list = "* <%= fqdn %> bydns_a"
+end
+

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

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

___
MediaWiki-commits mailing list
MediaWiki-commits@l

[MediaWiki-commits] [Gerrit] Tool Labs: Implement mail relay - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Implement mail relay
..


Tool Labs: Implement mail relay

Sooner rather than later to prevent gridengine spam.  Better
collect locally than post to mailing lists.  :-)

Change-Id: Id49556eb1acb2148609541b668db6b1fdb5d0683
---
M manifests/role/labs.pp
A modules/toollabs/files/exim4-norelay.conf
M modules/toollabs/manifests/init.pp
A modules/toollabs/manifests/mailrelay.pp
A modules/toollabs/templates/exim4.conf.erb
A modules/toollabs/templates/mail-relay.erb
6 files changed, 138 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/labs.pp b/manifests/role/labs.pp
index 0798dcb..8efd6f3 100644
--- a/manifests/role/labs.pp
+++ b/manifests/role/labs.pp
@@ -49,5 +49,12 @@
 class { 'toollabs::webproxy': }
   }
 
+  class mailrelay inherits role::labs::tools::config {
+system_role { "role::labs::tools::mailrelay": description => "Tool Labs 
mail relay" }
+class { 'toollabs::mailrelay':
+  maildomain => "tools.wmflabs.org", ### TEMPORARY DO NOT USE FOR REAL! ###
+}
+  }
+
 } # class role::labs::tools
 
diff --git a/modules/toollabs/files/exim4-norelay.conf 
b/modules/toollabs/files/exim4-norelay.conf
new file mode 100644
index 000..e69de29
--- /dev/null
+++ b/modules/toollabs/files/exim4-norelay.conf
diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 2490f4a..905dc6d 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -99,5 +99,10 @@
 group => "root",
   }
 
+  File <| title == '/etc/exim4/exim4.conf' |> {
+content => undef,
+source => [ "$store/mail-relay", 
"puppet:///modules/toollabs/exim4-norelay.conf" ],
+  }
+
 }
 
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
new file mode 100644
index 000..7654d69
--- /dev/null
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -0,0 +1,30 @@
+# Class: toollabs::mailrelay
+#
+# This role sets up a mail relay in the Tool Labs model.
+#
+# Parameters:
+#
+# Actions:
+#
+# Requires:
+#
+# Sample Usage:
+#
+class toollabs::mailrelay($maildomain) inherits toollabs {
+  include toollabs::infrastructure
+
+  file { "$store/mail-relay":
+ensure => file,
+owner => 'root',
+group => 'root',
+mode => '0444',
+require => File[$store],
+content => template("toollabs/mail-relay.erb"),
+  }
+
+  File <| title == '/etc/exim4/exim4.conf' |> {
+source => undef,
+content => template("toollabs/exim4.conf.erb"),
+  }
+}
+
diff --git a/modules/toollabs/templates/exim4.conf.erb 
b/modules/toollabs/templates/exim4.conf.erb
new file mode 100644
index 000..4af8e15
--- /dev/null
+++ b/modules/toollabs/templates/exim4.conf.erb
@@ -0,0 +1,85 @@
+
+primary_hostname = relay.<%= maildomain %>
+qualify_domain = <%= maildomain %>
+
+domainlist local_domains = <%= maildomain %>
+domainlist relay_to_domains =
+hostlist relay_from_hosts = 10.0.0.0/8
+
+acl_smtp_rcpt = acl_check_rcpt
+acl_smtp_data = acl_check_data
+
+never_users = root
+
+host_lookup = *
+ignore_bounce_errors_after = 2d
+timeout_frozen_after = 7d
+
+acl_check_rcpt:
+accept  hosts = :
+denymessage   = Restricted characters in address
+domains   = +local_domains
+local_parts   = ^[.] : ^.*[@%!/|]
+
+denymessage   = Restricted characters in address
+domains   = !+local_domains
+local_parts   = ^[./|] : ^.*[@%!] : ^.*/\\.\\./
+
+accept  local_parts   = postmaster
+domains   = +local_domains
+
+require verify= sender
+
+accept  hosts = +relay_from_hosts
+control   = submission
+
+accept  authenticated = *
+control   = submission
+
+require message = relay not permitted
+domains = +local_domains : +relay_domains
+
+require verify = recipient
+
+accept
+
+
+acl_check_data:
+accept
+
+
+begin routers
+
+dnslookup:
+  driver = dnslookup
+  domains = ! +local_domains
+  transport = remote_smtp
+  ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8
+  no_more
+
+system_aliases:
+  driver = redirect
+  allow_fail
+  allow_defer
+  data = ${lookup{$local_part}lsearch{/etc/aliases}}
+
+localuser:
+  driver = accept
+  check_local_user
+  transport = local_delivery
+
+begin transports
+
+remote_smtp:
+  driver = smtp
+
+local_delivery:
+  driver = appendfile
+  file = <%= store %>/mail/$local_part
+  delivery_date_add
+  envelope_to_add
+  return_path_add
+
+begin retry
+*   *   F,2h,15m; G,16h,1h,1.5; F,4d,6h
+
diff --git a/modules/toollabs/templates/mail-relay.erb 
b/modules/toollabs/templates/mail-relay.erb
new file mode 100644
index 000..dfac364
--- /dev/null
+++ b/modules/toollabs/templates/mail-relay.erb
@@ -0,0 +1,11 @@
+## Managed by puppet
+
+qualify_domain = <%= maildomain %>
+local_domains =
+
+smarthost:
+  driv

[MediaWiki-commits] [Gerrit] Remove remaining JSON release notes - change (mediawiki/core)

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

Change subject: Remove remaining JSON release notes
..


Remove remaining JSON release notes

Change-Id: I326f266716da50d223c65f2035c8d41021c20bae
Follows-Up: Id3b88102e768318e3605a19e9952121091a40915
---
M RELEASE-NOTES-1.21
1 file changed, 0 insertions(+), 11 deletions(-)

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



diff --git a/RELEASE-NOTES-1.21 b/RELEASE-NOTES-1.21
index 28a039d..3318506 100644
--- a/RELEASE-NOTES-1.21
+++ b/RELEASE-NOTES-1.21
@@ -338,17 +338,6 @@
   - ShowStats -> ShowSiteStats.
 * BREAKING CHANGE: (bug 38244) Removed the mediawiki.api.titleblacklist module
   and moved it to the TitleBlacklist extension.
-* BREAKING CHANGE: Implementation of MediaWiki's JS and JSON value encoding
-  has changed:
-** MediaWiki no longer supports PHP installations in which the native JSON
-   extension is missing or disabled.
-** XmlJsCode objects can no longer be nested inside objects or arrays.
-   (For Xml::encodeJsCall(), this individually applies to each argument.)
-** The sets of characters escaped by default, along with the precise escape
-   sequences used, have changed (except for the Xml::escapeJsString()
-   function, which is now deprecated).
-* BREAKING CHANGE: The Services_JSON class has been removed. If necessary,
-  be sure to upgrade affected extensions at the same time (e.g. Collection).
 
 == Compatibility ==
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I326f266716da50d223c65f2035c8d41021c20bae
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] bump to 1.21.0rc5 - change (mediawiki/core)

2013-05-12 Thread MarkAHershberger (Code Review)
MarkAHershberger has submitted this change and it was merged.

Change subject: bump to 1.21.0rc5
..


bump to 1.21.0rc5

Change-Id: Ib16c34e6cb0fbbbcacb94be1ed3c031f5fe4d741
---
M includes/DefaultSettings.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index f5f46c4..0ad4362 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -63,7 +63,7 @@
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.21.0rc4';
+$wgVersion = '1.21.0rc5';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib16c34e6cb0fbbbcacb94be1ed3c031f5fe4d741
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: MarkAHershberger 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: Mail works, redirecting /var/mail - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Mail works, redirecting /var/mail
..

Tool Labs: Mail works, redirecting /var/mail

Change-Id: Ifeb5d66ca07ad9b3635fbf8444ae9d3f55368ad0
---
M modules/toollabs/manifests/init.pp
M modules/toollabs/templates/exim4.conf.erb
2 files changed, 8 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/00/63400/1

diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 905dc6d..7b958b1 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -104,5 +104,11 @@
 source => [ "$store/mail-relay", 
"puppet:///modules/toollabs/exim4-norelay.conf" ],
   }
 
+  file { "/var/mail":
+ensure => link,
+force => true,
+target => "$store/mail",
+  }
+
 }
 
diff --git a/modules/toollabs/templates/exim4.conf.erb 
b/modules/toollabs/templates/exim4.conf.erb
index 4af8e15..c69908b 100644
--- a/modules/toollabs/templates/exim4.conf.erb
+++ b/modules/toollabs/templates/exim4.conf.erb
@@ -15,6 +15,8 @@
 ignore_bounce_errors_after = 2d
 timeout_frozen_after = 7d
 
+begin acl
+
 acl_check_rcpt:
 accept  hosts = :
 denymessage   = Restricted characters in address

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Mail works, redirecting /var/mail - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Mail works, redirecting /var/mail
..


Tool Labs: Mail works, redirecting /var/mail

Change-Id: Ifeb5d66ca07ad9b3635fbf8444ae9d3f55368ad0
---
M modules/toollabs/manifests/init.pp
M modules/toollabs/templates/exim4.conf.erb
2 files changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/init.pp 
b/modules/toollabs/manifests/init.pp
index 905dc6d..7b958b1 100644
--- a/modules/toollabs/manifests/init.pp
+++ b/modules/toollabs/manifests/init.pp
@@ -104,5 +104,11 @@
 source => [ "$store/mail-relay", 
"puppet:///modules/toollabs/exim4-norelay.conf" ],
   }
 
+  file { "/var/mail":
+ensure => link,
+force => true,
+target => "$store/mail",
+  }
+
 }
 
diff --git a/modules/toollabs/templates/exim4.conf.erb 
b/modules/toollabs/templates/exim4.conf.erb
index 4af8e15..c69908b 100644
--- a/modules/toollabs/templates/exim4.conf.erb
+++ b/modules/toollabs/templates/exim4.conf.erb
@@ -15,6 +15,8 @@
 ignore_bounce_errors_after = 2d
 timeout_frozen_after = 7d
 
+begin acl
+
 acl_check_rcpt:
 accept  hosts = :
 denymessage   = Restricted characters in address

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ifeb5d66ca07ad9b3635fbf8444ae9d3f55368ad0
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Revert "(bug 1495) Enable on-wiki message language fallbacks" - change (mediawiki/core)

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

Change subject: Revert "(bug 1495) Enable on-wiki message language fallbacks"
..


Revert "(bug 1495) Enable on-wiki message language fallbacks"

This reverts commit d434bfcf3bbab05660ed8f798a4622487dd8ba56.

See Iac7ac4357dd80e8cdb238a6a207393f0712b3fe5.

Conflicts:
includes/cache/MessageCache.php
tests/phpunit/includes/cache/MessageCacheTest.php

Change-Id: I5ea8af299a14e052b265ebf9f21914ab0a4eb922
---
M includes/cache/MessageCache.php
M languages/Language.php
D tests/phpunit/includes/cache/MessageCacheTest.php
3 files changed, 33 insertions(+), 194 deletions(-)

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



diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php
index 7425978..c406b5c 100644
--- a/includes/cache/MessageCache.php
+++ b/includes/cache/MessageCache.php
@@ -586,32 +586,27 @@
}
 
/**
-* Get a message from either the content language or the user language. 
The fallback
-* language order is the users language fallback union the content 
language fallback.
-* This list is then applied to find keys in the following order
-* 1) MediaWiki:$key/$langcode (for every language except the content 
language where
-*we look at MediaWiki:$key)
-* 2) Built-in messages via the l10n cache which is also in fallback 
order
+* Get a message from either the content language or the user language.
 *
 * @param string $key the message cache key
-* @param $useDB Boolean: If true will look for the message in the DB, 
false only
-*get the message from the DB, false to use only the compiled 
l10n cache.
-* @param bool|string|object $langcode Code of the language to get the 
message for.
-*- If string and a valid code, will create a standard language 
object
-*- If string but not a valid code, will create a basic 
language object
-*- If boolean and false, create object from the current users 
language
-*- If boolean and true, create object from the wikis content 
language
-*- If language object, use it as given
+* @param $useDB Boolean: get the message from the DB, false to use only
+*   the localisation
+* @param bool|string $langcode Code of the language to get the message 
for, if
+*  it is a valid code create a language for that 
language,
+*  if it is a string but not a valid code then make a 
basic
+*  language object, if it is a false boolean then use 
the
+*  current users language (as a fallback for the old
+*  parameter functionality), or if it is a true boolean
+*  then use the wikis content language (also as a
+*  fallback).
 * @param $isFullKey Boolean: specifies whether $key is a two part key
 *   "msg/lang".
 *
 * @throws MWException
-* @return string|bool False if the message doesn't exist, otherwise 
the message
+* @return string|bool
 */
function get( $key, $useDB = true, $langcode = true, $isFullKey = false 
) {
global $wgLanguageCode, $wgContLang;
-
-   wfProfileIn( __METHOD__ );
 
if ( is_int( $key ) ) {
// "Non-string key given" exception sometimes happens 
for numerical strings that become ints somewhere on their way here
@@ -619,37 +614,22 @@
}
 
if ( !is_string( $key ) ) {
-   wfProfileOut( __METHOD__ );
throw new MWException( 'Non-string key given' );
}
 
if ( strval( $key ) === '' ) {
# Shortcut: the empty key is always missing
-   wfProfileOut( __METHOD__ );
return false;
}
 
-
-   # Obtain the initial language object
-   if ( $isFullKey ) {
-   $keyParts = explode( '/', $key );
-   if ( count( $keyParts ) < 2 ) {
-   throw new MWException( "Message key '$key' does 
not appear to be a full key." );
-   }
-
-   $langcode = array_pop( $keyParts );
-   $key = implode( '/', $keyParts );
-   }
-
-   # Obtain a language object for the requested language from the 
passed language code
-   # Note that the language code could in fact be a language 
object already but we assume
-   # it's a string further below.
-   $requestedLangObj = wfGetLangObj( $langcode )

[MediaWiki-commits] [Gerrit] Tool Labs: Mail config for other instances - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Mail config for other instances
..

Tool Labs: Mail config for other instances

(Send to mailrelay if it exists)

Change-Id: I4faaf13d217c7b9cff272737a05e64053b21e42c
---
M modules/toollabs/templates/mail-relay.erb
1 file changed, 19 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/01/63401/1

diff --git a/modules/toollabs/templates/mail-relay.erb 
b/modules/toollabs/templates/mail-relay.erb
index dfac364..ed9bdff 100644
--- a/modules/toollabs/templates/mail-relay.erb
+++ b/modules/toollabs/templates/mail-relay.erb
@@ -1,11 +1,24 @@
 ## Managed by puppet
 
 qualify_domain = <%= maildomain %>
-local_domains =
 
-smarthost:
-  driver = domainlist
-  transport = remote_smtp
-  route_list = "* <%= fqdn %> bydns_a"
-end
+begin routers
+
+# Catch unqualified e-mail addresses from MediaWiki
+
+smart_route:
+   driver = manualroute
+   transport = remote_smtp
+   route_list = *  <%= fqdn %>
+
+begin transports
+
+# Generic remote SMTP transport
+
+remote_smtp:
+   driver = smtp
+
+begin retry
+
+*  *   F,2h,5m; F,1d,15m
 

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

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

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


[MediaWiki-commits] [Gerrit] API: Fix parameter validation in setnotificationtimestamp - change (mediawiki/core)

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

Change subject: API: Fix parameter validation in setnotificationtimestamp
..


API: Fix parameter validation in setnotificationtimestamp

This was broken in I7a3d7b6e, when the ApiPageSet parameters stopped
being returned by getAllowedParams() and so by extractRequestParams().
Although it would be broken differently if they had been.

Change-Id: I4b6ec21fd7b7c932856546df1ccad574d996db1f
---
M includes/api/ApiPageSet.php
M includes/api/ApiSetNotificationTimestamp.php
2 files changed, 27 insertions(+), 2 deletions(-)

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



diff --git a/includes/api/ApiPageSet.php b/includes/api/ApiPageSet.php
index bab59b7..074efe4 100644
--- a/includes/api/ApiPageSet.php
+++ b/includes/api/ApiPageSet.php
@@ -218,6 +218,30 @@
}
 
/**
+* Return the parameter name that is the source of data for this PageSet
+*
+* If multiple source parameters are specified (e.g. titles and 
pageids),
+* one will be named arbitrarily.
+*
+* @return string|null
+*/
+   public function getDataSource() {
+   if ( $this->mAllowGenerator && isset( 
$this->mParams['generator'] ) ) {
+   return 'generator';
+   }
+   if ( isset( $this->mParams['titles'] ) ) {
+   return 'titles';
+   }
+   if ( isset( $this->mParams['pageids'] ) ) {
+   return 'pageids';
+   }
+   if ( isset( $this->mParams['revids'] ) ) {
+   return 'revids';
+   }
+   return null;
+   }
+
+   /**
 * Request an additional field from the page table.
 * Must be called before execute()
 * @param string $fieldName Field name
diff --git a/includes/api/ApiSetNotificationTimestamp.php 
b/includes/api/ApiSetNotificationTimestamp.php
index b40476a..58d5d9a 100644
--- a/includes/api/ApiSetNotificationTimestamp.php
+++ b/includes/api/ApiSetNotificationTimestamp.php
@@ -44,8 +44,9 @@
$this->requireMaxOneParameter( $params, 'timestamp', 'torevid', 
'newerthanrevid' );
 
$pageSet = $this->getPageSet();
-   $args = array_merge( array( $params, 'entirewatchlist' ), 
array_keys( $pageSet->getAllowedParams() ) );
-   call_user_func_array( array( $this, 'requireOnlyOneParameter' 
), $args );
+   if ( $params['entirewatchlist'] && $pageSet->getDataSource() 
!== null ) {
+   $this->dieUsage( "Cannot use 'entirewatchlist' at the 
same time as '{$pageSet->getDataSource()}'", 'multisource' );
+   }
 
$dbw = wfGetDB( DB_MASTER, 'api' );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4b6ec21fd7b7c932856546df1ccad574d996db1f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: PleaseStand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] CoreParserFunctions::anchorencode should return a string - change (mediawiki/core)

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

Change subject: CoreParserFunctions::anchorencode should return a string
..


CoreParserFunctions::anchorencode should return a string

CoreParserFunctions::anchorencode incorrectly returns false rather than
the empty string when passed an empty string.

A simple cast fixes it; this likely wasn't noticed before since PHP was
automatically doing the cast anyway when the return value was merged
into wikitext.

Bug: 46608
Change-Id: I97556dbc4dcc1f102f6fed499d43dada388cdc5d
---
M includes/parser/CoreParserFunctions.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/parser/CoreParserFunctions.php 
b/includes/parser/CoreParserFunctions.php
index 542ac0f..cdd03aa 100644
--- a/includes/parser/CoreParserFunctions.php
+++ b/includes/parser/CoreParserFunctions.php
@@ -753,7 +753,7 @@
 */
static function anchorencode( $parser, $text ) {
$text = $parser->killMarkers( $text );
-   return substr( $parser->guessSectionNameFromWikiText( $text ), 
1);
+   return (string)substr( $parser->guessSectionNameFromWikiText( 
$text ), 1 );
}
 
static function special( $parser, $text ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97556dbc4dcc1f102f6fed499d43dada388cdc5d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_21
Gerrit-Owner: PleaseStand 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: MarkAHershberger 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: Mail config for other instances - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Mail config for other instances
..


Tool Labs: Mail config for other instances

(Send to mailrelay if it exists)

Change-Id: I4faaf13d217c7b9cff272737a05e64053b21e42c
---
M modules/toollabs/templates/mail-relay.erb
1 file changed, 19 insertions(+), 6 deletions(-)

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



diff --git a/modules/toollabs/templates/mail-relay.erb 
b/modules/toollabs/templates/mail-relay.erb
index dfac364..ed9bdff 100644
--- a/modules/toollabs/templates/mail-relay.erb
+++ b/modules/toollabs/templates/mail-relay.erb
@@ -1,11 +1,24 @@
 ## Managed by puppet
 
 qualify_domain = <%= maildomain %>
-local_domains =
 
-smarthost:
-  driver = domainlist
-  transport = remote_smtp
-  route_list = "* <%= fqdn %> bydns_a"
-end
+begin routers
+
+# Catch unqualified e-mail addresses from MediaWiki
+
+smart_route:
+   driver = manualroute
+   transport = remote_smtp
+   route_list = *  <%= fqdn %>
+
+begin transports
+
+# Generic remote SMTP transport
+
+remote_smtp:
+   driver = smtp
+
+begin retry
+
+*  *   F,2h,5m; F,1d,15m
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4faaf13d217c7b9cff272737a05e64053b21e42c
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Use QUnit.start() - change (mediawiki...SemanticResultFormats)

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

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


Change subject: Use QUnit.start()
..

Use QUnit.start()

Change-Id: Ib876b5f04eab619604a54a480a24df9e18b83f8c
---
M formats/media/resources/ext.srf.formats.media.js
M resources/ext.srf.js
M tests/qunit/formats/ext.srf.formats.media.test.js
3 files changed, 11 insertions(+), 31 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticResultFormats 
refs/changes/02/63402/1

diff --git a/formats/media/resources/ext.srf.formats.media.js 
b/formats/media/resources/ext.srf.formats.media.js
index 64edf84..d61fff8 100644
--- a/formats/media/resources/ext.srf.formats.media.js
+++ b/formats/media/resources/ext.srf.formats.media.js
@@ -78,7 +78,8 @@
jplayer : {
swfPath: srf.settings.get( 'srfgScriptPath' ) + 
'/resources/jquery/jplayer/Jplayer.swf',
backgroundColor: '#FF',
-   wmode: 'window'
+   wmode: 'window',
+   errorAlerts: smw.debug()
}
},
 
@@ -191,23 +192,6 @@
} );
} );
return srf.template.jplayer.inspector( self.getId( ID 
).inspectorId );
-   },
-
-   /**
-* Return query string value for a given url
-*
-* @see 
http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values
-*
-* @since 1.9
-*
-* @param {string} url
-* @param {string} key
-*
-* @return {mixed}
-*/
-   getQueryStringValue: function( url, key ){
-   var match = RegExp('[?&]' + key + '=([^&]*)').exec( url 
);
-   return match && decodeURIComponent( 
match[1].replace(/\+/g, ' ') );
}
};
 
@@ -245,11 +229,6 @@
// Init media event inspector
if ( json.inspector ){
container.append( media.getInspector( ID ) );
-   }
-
-   // Use RL debug mode to output additional alert messages
-   if ( media.getQueryStringValue( $( location ).attr( 
'href' ), 'debug' ) === 'true' ){
-   media.defaults.jplayer.errorAlerts = true;
}
 
// Create jPlayer instance
diff --git a/resources/ext.srf.js b/resources/ext.srf.js
index 9ec0b3d..1244949 100644
--- a/resources/ext.srf.js
+++ b/resources/ext.srf.js
@@ -26,15 +26,16 @@
  * @author Jeroen De Dauw 
  * @author mwjames
  */
-/*global console:true message:true */
 
 /**
  * Declares global srf instance and namespace
  *
  * @class srf
  */
-var instance = ( function ( $ ) {
+var instance = ( function () {
'use strict';
+
+   /*global console:true message:true */
 
var instance = {};
 
@@ -123,7 +124,7 @@
instance.Util = instance.util;
 
return instance;
-} )( jQuery );
+} )();
 
 // Assign namespace
 window.srf = window.semanticFormats = instance;
\ No newline at end of file
diff --git a/tests/qunit/formats/ext.srf.formats.media.test.js 
b/tests/qunit/formats/ext.srf.formats.media.test.js
index 68294f1..5590838 100644
--- a/tests/qunit/formats/ext.srf.formats.media.test.js
+++ b/tests/qunit/formats/ext.srf.formats.media.test.js
@@ -45,7 +45,7 @@
QUnit.test( 'init', 8, function ( assert ) {
var media = new srf.formats.media();
 
-   assert.ok( media instanceof Object, 'media instance was 
accessible' );
+   assert.ok( media instanceof Object, 'srf.formats.media() 
instance was accessible' );
assert.equal( $.type( media.defaults ), 'object', '.defaults 
was accessible' );
assert.equal( $.type( media.parse ), 'function', '.parse() was 
accessible' );
assert.equal( $.type( media.getId ), 'function', '.getId() was 
accessible' );
@@ -79,22 +79,22 @@
 
$.get( media.defaults.posterImage )
.done( function() {
-   start();
+   QUnit.start();
assert.ok( true, media.defaults.posterImage + ' 
verified' );
} )
.fail( function() {
// doesn't exists
-   start();
+   QUnit.start();
} );
 
$.get( media.defaults.jplayer.swfPath )
.done( function() {
-   start();
+   QUnit.start();
assert.ok( true, media.defaults.jplayer.swfPath + ' 
verifie

[MediaWiki-commits] [Gerrit] Use QUnit.start() - change (mediawiki...SemanticResultFormats)

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

Change subject: Use QUnit.start()
..


Use QUnit.start()

Change-Id: Ib876b5f04eab619604a54a480a24df9e18b83f8c
---
M formats/media/resources/ext.srf.formats.media.js
M resources/ext.srf.js
M tests/qunit/formats/ext.srf.formats.media.test.js
3 files changed, 11 insertions(+), 31 deletions(-)

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



diff --git a/formats/media/resources/ext.srf.formats.media.js 
b/formats/media/resources/ext.srf.formats.media.js
index 64edf84..d61fff8 100644
--- a/formats/media/resources/ext.srf.formats.media.js
+++ b/formats/media/resources/ext.srf.formats.media.js
@@ -78,7 +78,8 @@
jplayer : {
swfPath: srf.settings.get( 'srfgScriptPath' ) + 
'/resources/jquery/jplayer/Jplayer.swf',
backgroundColor: '#FF',
-   wmode: 'window'
+   wmode: 'window',
+   errorAlerts: smw.debug()
}
},
 
@@ -191,23 +192,6 @@
} );
} );
return srf.template.jplayer.inspector( self.getId( ID 
).inspectorId );
-   },
-
-   /**
-* Return query string value for a given url
-*
-* @see 
http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values
-*
-* @since 1.9
-*
-* @param {string} url
-* @param {string} key
-*
-* @return {mixed}
-*/
-   getQueryStringValue: function( url, key ){
-   var match = RegExp('[?&]' + key + '=([^&]*)').exec( url 
);
-   return match && decodeURIComponent( 
match[1].replace(/\+/g, ' ') );
}
};
 
@@ -245,11 +229,6 @@
// Init media event inspector
if ( json.inspector ){
container.append( media.getInspector( ID ) );
-   }
-
-   // Use RL debug mode to output additional alert messages
-   if ( media.getQueryStringValue( $( location ).attr( 
'href' ), 'debug' ) === 'true' ){
-   media.defaults.jplayer.errorAlerts = true;
}
 
// Create jPlayer instance
diff --git a/resources/ext.srf.js b/resources/ext.srf.js
index 9ec0b3d..1244949 100644
--- a/resources/ext.srf.js
+++ b/resources/ext.srf.js
@@ -26,15 +26,16 @@
  * @author Jeroen De Dauw 
  * @author mwjames
  */
-/*global console:true message:true */
 
 /**
  * Declares global srf instance and namespace
  *
  * @class srf
  */
-var instance = ( function ( $ ) {
+var instance = ( function () {
'use strict';
+
+   /*global console:true message:true */
 
var instance = {};
 
@@ -123,7 +124,7 @@
instance.Util = instance.util;
 
return instance;
-} )( jQuery );
+} )();
 
 // Assign namespace
 window.srf = window.semanticFormats = instance;
\ No newline at end of file
diff --git a/tests/qunit/formats/ext.srf.formats.media.test.js 
b/tests/qunit/formats/ext.srf.formats.media.test.js
index 68294f1..5590838 100644
--- a/tests/qunit/formats/ext.srf.formats.media.test.js
+++ b/tests/qunit/formats/ext.srf.formats.media.test.js
@@ -45,7 +45,7 @@
QUnit.test( 'init', 8, function ( assert ) {
var media = new srf.formats.media();
 
-   assert.ok( media instanceof Object, 'media instance was 
accessible' );
+   assert.ok( media instanceof Object, 'srf.formats.media() 
instance was accessible' );
assert.equal( $.type( media.defaults ), 'object', '.defaults 
was accessible' );
assert.equal( $.type( media.parse ), 'function', '.parse() was 
accessible' );
assert.equal( $.type( media.getId ), 'function', '.getId() was 
accessible' );
@@ -79,22 +79,22 @@
 
$.get( media.defaults.posterImage )
.done( function() {
-   start();
+   QUnit.start();
assert.ok( true, media.defaults.posterImage + ' 
verified' );
} )
.fail( function() {
// doesn't exists
-   start();
+   QUnit.start();
} );
 
$.get( media.defaults.jplayer.swfPath )
.done( function() {
-   start();
+   QUnit.start();
assert.ok( true, media.defaults.jplayer.swfPath + ' 
verified' );
} )
.fail( function() {
  

[MediaWiki-commits] [Gerrit] Tool Labs: Make mailrelay actually listen for mail - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: Make mailrelay actually listen for mail
..

Tool Labs: Make mailrelay actually listen for mail

Change-Id: I7d4773635175374549b68265c290c58554cd8e5b
---
A modules/toollabs/files/exim4.default.mailrelay
M modules/toollabs/manifests/mailrelay.pp
2 files changed, 30 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/03/63403/1

diff --git a/modules/toollabs/files/exim4.default.mailrelay 
b/modules/toollabs/files/exim4.default.mailrelay
new file mode 100644
index 000..c000f01
--- /dev/null
+++ b/modules/toollabs/files/exim4.default.mailrelay
@@ -0,0 +1,26 @@
+# /etc/default/exim4
+#
+### THIS FILE IS MANAGED BY PUPPET 
+#
+
+EX4DEF_VERSION=''
+
+# 'combined' -   one daemon running queue and listening on SMTP port
+# 'no'   -   no daemon running the queue
+# 'separate' -   two separate daemons
+# 'ppp'  -   only run queue with /etc/ppp/ip-up.d/exim4.
+# 'nodaemon' - no daemon is started at all.
+# 'queueonly' - only a queue running daemon is started, no SMTP listener.
+# setting this to 'no' will also disable queueruns from /etc/ppp/ip-up.d/exim4
+QUEUERUNNER='combined'
+# how often should we run the queue
+QUEUEINTERVAL='10m'
+# options common to quez-runner and listening daemon
+COMMONOPTIONS=''
+# more options for the daemon/process running the queue (applies to the one
+# started in /etc/ppp/ip-up.d/exim4, too.
+QUEUERUNNEROPTIONS=''
+# special flags given to exim directly after the -q. See exim(8)
+QFLAGS=''
+# options for daemon listening on port 25
+SMTPLISTENEROPTIONS=''
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 7654d69..2beb8e2 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -26,5 +26,9 @@
 source => undef,
 content => template("toollabs/exim4.conf.erb"),
   }
+
+  File <| title == '/etc/default/exim4' |> {
+source =>  "puppet:///modules/toollabs/exim4.default.mailrelay",
+  }
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: Make mailrelay actually listen for mail - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: Make mailrelay actually listen for mail
..


Tool Labs: Make mailrelay actually listen for mail

Change-Id: I7d4773635175374549b68265c290c58554cd8e5b
---
A modules/toollabs/files/exim4.default.mailrelay
M modules/toollabs/manifests/mailrelay.pp
2 files changed, 30 insertions(+), 0 deletions(-)

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



diff --git a/modules/toollabs/files/exim4.default.mailrelay 
b/modules/toollabs/files/exim4.default.mailrelay
new file mode 100644
index 000..c000f01
--- /dev/null
+++ b/modules/toollabs/files/exim4.default.mailrelay
@@ -0,0 +1,26 @@
+# /etc/default/exim4
+#
+### THIS FILE IS MANAGED BY PUPPET 
+#
+
+EX4DEF_VERSION=''
+
+# 'combined' -   one daemon running queue and listening on SMTP port
+# 'no'   -   no daemon running the queue
+# 'separate' -   two separate daemons
+# 'ppp'  -   only run queue with /etc/ppp/ip-up.d/exim4.
+# 'nodaemon' - no daemon is started at all.
+# 'queueonly' - only a queue running daemon is started, no SMTP listener.
+# setting this to 'no' will also disable queueruns from /etc/ppp/ip-up.d/exim4
+QUEUERUNNER='combined'
+# how often should we run the queue
+QUEUEINTERVAL='10m'
+# options common to quez-runner and listening daemon
+COMMONOPTIONS=''
+# more options for the daemon/process running the queue (applies to the one
+# started in /etc/ppp/ip-up.d/exim4, too.
+QUEUERUNNEROPTIONS=''
+# special flags given to exim directly after the -q. See exim(8)
+QFLAGS=''
+# options for daemon listening on port 25
+SMTPLISTENEROPTIONS=''
diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 7654d69..2beb8e2 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -26,5 +26,9 @@
 source => undef,
 content => template("toollabs/exim4.conf.erb"),
   }
+
+  File <| title == '/etc/default/exim4' |> {
+source =>  "puppet:///modules/toollabs/exim4.default.mailrelay",
+  }
 }
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d4773635175374549b68265c290c58554cd8e5b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Tool Labs: minor fix - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has uploaded a new change for review.

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


Change subject: Tool Labs: minor fix
..

Tool Labs: minor fix

Change-Id: Ibfdee3dd7109ec91ac1ff249cc2dec4d86cd4c00
---
M modules/toollabs/manifests/mailrelay.pp
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 2beb8e2..bdf3eb8 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -28,6 +28,7 @@
   }
 
   File <| title == '/etc/default/exim4' |> {
+content => undef,
 source =>  "puppet:///modules/toollabs/exim4.default.mailrelay",
   }
 }

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

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

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


[MediaWiki-commits] [Gerrit] Tool Labs: minor fix - change (operations/puppet)

2013-05-12 Thread coren (Code Review)
coren has submitted this change and it was merged.

Change subject: Tool Labs: minor fix
..


Tool Labs: minor fix

Change-Id: Ibfdee3dd7109ec91ac1ff249cc2dec4d86cd4c00
---
M modules/toollabs/manifests/mailrelay.pp
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/modules/toollabs/manifests/mailrelay.pp 
b/modules/toollabs/manifests/mailrelay.pp
index 2beb8e2..bdf3eb8 100644
--- a/modules/toollabs/manifests/mailrelay.pp
+++ b/modules/toollabs/manifests/mailrelay.pp
@@ -28,6 +28,7 @@
   }
 
   File <| title == '/etc/default/exim4' |> {
+content => undef,
 source =>  "puppet:///modules/toollabs/exim4.default.mailrelay",
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibfdee3dd7109ec91ac1ff249cc2dec4d86cd4c00
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: coren 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add smw.dataItem.wikiPage.getText() - change (mediawiki...SemanticMediaWiki)

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

Change subject: Add smw.dataItem.wikiPage.getText()
..


Add smw.dataItem.wikiPage.getText()

* wikiPage.getText() outputs text without hash fragment;in-page
objects such as subobjects (Foo#_QUERY9a665a578eb95c1) now are
displayed with its base page text (Foo)
* Fix some docs (JSDuck)
* Add tests (total of 74 tests)

Change-Id: I0a355ebd7ee03ab30467ef510ff97da34ac2877a
---
M resources/smw/data/ext.smw.dataItem.wikiPage.js
M resources/smw/ext.smw.js
M tests/qunit/smw/data/ext.smw.dataItem.wikiPage.test.js
3 files changed, 174 insertions(+), 73 deletions(-)

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



diff --git a/resources/smw/data/ext.smw.dataItem.wikiPage.js 
b/resources/smw/data/ext.smw.dataItem.wikiPage.js
index 22b94a2..a425fd8 100644
--- a/resources/smw/data/ext.smw.dataItem.wikiPage.js
+++ b/resources/smw/data/ext.smw.dataItem.wikiPage.js
@@ -1,42 +1,64 @@
-/**
- * SMW wikiPage DataItem JavaScript representation
+/*!
+ * This file is part of the Semantic MediaWiki Extension
+ * @see https://semantic-mediawiki.org/
  *
- * @see SMW\DIWikiPage
+ * @section LICENSE
+ * 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
  *
  * @since 1.9
  *
  * @file
+ *
  * @ingroup SMW
  *
- * @licence GNU GPL v2 or later
+ * @license GNU GPL v2+
  * @author mwjames
  */
 ( function( $, mw, smw ) {
'use strict';
 
+   /**
+* Helper method
+* @ignore
+*/
var html = mw.html;
 
/**
-* Inheritance class
+* Inheritance class for the smw.dataItem constructor
 *
-* @type object
+* @since 1.9
+*
+* @class smw.dataItem
+* @abstract
 */
smw.dataItem = smw.dataItem || {};
 
/**
-* wikiPage constructor
+* Initializes the constructor
 *
-* @since  1.9
+* @param {string} fulltext
+* @param {string} fullurl
+* @param {number} ns
+* @param {boolean} exists
 *
-* @param {String} fulltext
-* @param {String} fullurl
-* @param {Integer} namespace
-* @return {Object} this
+* @return {smw.dataItem.wikiPage} this
 */
-   var wikiPage = function ( fulltext, fullurl, namespace, exists ) {
+   var wikiPage = function ( fulltext, fullurl, ns, exists ) {
this.fulltext  = fulltext !== ''&& fulltext !==  undefined ? 
fulltext : null;
this.fullurl   = fullurl !== '' && fullurl !==  undefined ? 
fullurl : null;
-   this.namespace = namespace !==  undefined ? namespace : 0;
+   this.ns= ns !==  undefined ? ns : 0;
this.exists= exists !==  undefined ? exists : true;
 
// Get mw.Title inheritance
@@ -48,27 +70,24 @@
};
 
/**
-* Constructor
+* A class that includes methods to create a wikiPage dataItem 
representation
+* in JavaScript that resembles the SMW\DIWikiPage object in PHP
 *
-* @var Object
+* @since 1.9
+*
+* @class
+* @constructor
 */
-   smw.dataItem.wikiPage = function( fulltext, fullurl, namespace, exists 
) {
+   smw.dataItem.wikiPage = function( fulltext, fullurl, ns, exists ) {
if ( $.type( fulltext ) === 'string' && $.type( fullurl ) === 
'string' ) {
-   this.constructor( fulltext, fullurl, namespace, exists 
);
+   this.constructor( fulltext, fullurl, ns, exists );
} else {
throw new Error( 'smw.dataItem.wikiPage: fulltext, 
fullurl must be a string' );
}
};
 
-   /**
-* Creates an object with methods related to the wikiPage dataItem
-*
-* @see SMW\DIWikiPage
-*
-* @since  1.9
-*
-* @type object
-*/
+   /* Public methods */
+
var fn = {
 
constructor: wikiPage,
@@ -85,10 +104,8 @@
},
 
/**
-* Returns wikiPage text title
-*
-* Get full name in text form, like "Fi

[MediaWiki-commits] [Gerrit] srf.formats.datatables() use getNamespaceId() - change (mediawiki...SemanticResultFormats)

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

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


Change subject: srf.formats.datatables() use getNamespaceId()
..

srf.formats.datatables() use getNamespaceId()

[1] changed getNamespace() to getNamespaceId() (in smw.dataItem.wikiPage)

[1] https://gerrit.wikimedia.org/r/#/c/62536/

Change-Id: I87779a89d78d9e1b438b2a0e310a1dac71af685b
---
M formats/datatables/resources/ext.srf.formats.datatables.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/formats/datatables/resources/ext.srf.formats.datatables.js 
b/formats/datatables/resources/ext.srf.formats.datatables.js
index ad0f61f..014a14e 100644
--- a/formats/datatables/resources/ext.srf.formats.datatables.js
+++ b/formats/datatables/resources/ext.srf.formats.datatables.js
@@ -106,7 +106,7 @@
// Try to resolve image/thumbnail information 
by fetching its
// imageInfo from the back-end
function createLink( wikiPage, linker, options 
){
-   if ( wikiPage.getNamespace() === 6 && 
linker ) {
+   if ( wikiPage.getNamespaceId() === 6 && 
linker ) {
var imageInfo = getImageInfo( 
wikiPage.getName(), options );
if ( imageInfo !== null &&  
imageInfo !== undefined  ) {
var imageLink = 
self.thumbnail( imageInfo );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I87779a89d78d9e1b438b2a0e310a1dac71af685b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticResultFormats
Gerrit-Branch: master
Gerrit-Owner: Mwjames 

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


[MediaWiki-commits] [Gerrit] srf.formats.datatables() use getNamespaceId() - change (mediawiki...SemanticResultFormats)

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

Change subject: srf.formats.datatables() use getNamespaceId()
..


srf.formats.datatables() use getNamespaceId()

[1] changed getNamespace() to getNamespaceId() (in smw.dataItem.wikiPage)

[1] https://gerrit.wikimedia.org/r/#/c/62536/

Change-Id: I87779a89d78d9e1b438b2a0e310a1dac71af685b
---
M formats/datatables/resources/ext.srf.formats.datatables.js
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/formats/datatables/resources/ext.srf.formats.datatables.js 
b/formats/datatables/resources/ext.srf.formats.datatables.js
index ad0f61f..014a14e 100644
--- a/formats/datatables/resources/ext.srf.formats.datatables.js
+++ b/formats/datatables/resources/ext.srf.formats.datatables.js
@@ -106,7 +106,7 @@
// Try to resolve image/thumbnail information 
by fetching its
// imageInfo from the back-end
function createLink( wikiPage, linker, options 
){
-   if ( wikiPage.getNamespace() === 6 && 
linker ) {
+   if ( wikiPage.getNamespaceId() === 6 && 
linker ) {
var imageInfo = getImageInfo( 
wikiPage.getName(), options );
if ( imageInfo !== null &&  
imageInfo !== undefined  ) {
var imageLink = 
self.thumbnail( imageInfo );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I87779a89d78d9e1b438b2a0e310a1dac71af685b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticResultFormats
Gerrit-Branch: master
Gerrit-Owner: Mwjames 
Gerrit-Reviewer: Mwjames 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Whitelist a bunch of url protocols. - change (mediawiki/core)

2013-05-12 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Whitelist a bunch of url protocols.
..

Whitelist a bunch of url protocols.

Our url whitelisting is just to reject unsafe protocols like javascript:.
We have no reason to reject a bunch of urls to open standardized schemes.

Whitelist a bunch of them:
ftps, ssh, sftp, xmpp, sip, sips, tel, sms, bitcoin, magnet, urn, and geo.

Change-Id: I941190203ee1442d912d46144584bf2e7733f32c
---
M RELEASE-NOTES-1.22
M includes/DefaultSettings.php
2 files changed, 14 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/06/63406/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ad12bf9..569a2b9 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -16,6 +16,8 @@
   Special:UserLogin/signup is activated.
 * $wgVectorUseIconWatch is now enabled by default.
 * $wgCascadingRestrictionLevels was added.
+* ftps, ssh, sftp, xmpp, sip, sips, tel, sms, bitcoin, magnet, urn, and geo
+  have been whitelisted inside of $wgUrlProtocols.
 
 === New features in 1.22 ===
 * (bug 44525) mediawiki.jqueryMsg can now parse (whitelisted) HTML elements 
and attributes.
diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 46ca7ed..bcc4ae4 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -3377,17 +3377,29 @@
'http://',
'https://',
'ftp://',
+   'ftps://', // If we allow ftp:// we should allow the secure version.
+   'ssh://',
+   'sftp://', // SFTP > FTP
'irc://',
'ircs://', // @bug 28503
+   'xmpp:', // Another open communication protocol
+   'sip:',
+   'sips:',
'gopher://',
'telnet://', // Well if we're going to support the above.. -ævar
'nntp://', // @bug 3808 RFC 1738
'worldwind://',
'mailto:',
+   'tel:', // If we can make emails linkable, why not phone numbers?
+   'sms:', // Likewise this is standardized too
'news:',
'svn://',
'git://',
'mms://',
+   'bitcoin:', // Even registerProtocolHandler whitelists this along with 
mailto:
+   'magnet:', // No reason to reject torrents over magnet: when they're 
allowed over http://
+   'urn:', // Allow URNs to be used in Microdata/RDFa s
+   'geo:', // geo: urls define locations, they're useful in Microdata/RDFa 
and when mentioning coordinates.
'//', // for protocol-relative URLs
 );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I941190203ee1442d912d46144584bf2e7733f32c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Friesen 

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


[MediaWiki-commits] [Gerrit] Shorten our in-comment urls to the whatwg HTML spec. - change (mediawiki/core)

2013-05-12 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Shorten our in-comment urls to the whatwg HTML spec.
..

Shorten our in-comment urls to the whatwg HTML spec.

whatwg.org has a redirect to /specs/web-apps/current-work/multipage/ from 
/html/.

Change-Id: If21705c214ca8f14db5a0c6dda3c43c22f9ca811
---
M includes/Html.php
M includes/Sanitizer.php
M includes/User.php
3 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/07/63407/1

diff --git a/includes/Html.php b/includes/Html.php
index cb082a1..a265d04 100644
--- a/includes/Html.php
+++ b/includes/Html.php
@@ -185,7 +185,7 @@
 
// In text/html, initial  and  tags can be omitted 
under
// pretty much any sane circumstances, if they have no 
attributes.  See:
-   // 

+   // 
if ( !$wgWellFormedXml && !$attribs
&& in_array( $element, array( 'html', 'head' ) ) ) {
return '';
@@ -259,7 +259,7 @@
$element = strtolower( $element );
 
// Reference:
-   // 
http://www.whatwg.org/specs/web-apps/current-work/multipage/syntax.html#optional-tags
+   // http://www.whatwg.org/html/syntax.html#optional-tags
if ( !$wgWellFormedXml && in_array( $element, array(
'html',
'head',
@@ -964,7 +964,7 @@
$candidates = array();
foreach ( $urls as $density => $url ) {
// Image candidate syntax per current whatwg live spec, 
2012-09-23:
-   // 
http://www.whatwg.org/specs/web-apps/current-work/multipage/embedded-content-1.html#attr-img-srcset
+   // 
http://www.whatwg.org/html/embedded-content-1.html#attr-img-srcset
$candidates[] = "{$url} {$density}x";
}
return implode( ", ", $candidates );
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index e757021..7f81a86 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -742,7 +742,7 @@
 
# WAI-ARIA
# http://www.w3.org/TR/wai-aria/
-   # 
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#wai-aria
+   # http://www.whatwg.org/html/elements.html#wai-aria
# For now we only support role="presentation" until we 
work out what roles should be
# usable by content and we ensure that our code 
explicitly rejects patterns that
# violate HTML5's ARIA restrictions.
@@ -1014,7 +1014,7 @@
 *  in the id 
and
 *  name 
attributes
 * @see http://www.w3.org/TR/html401/struct/links.html#h-12.2.3 Anchors 
with the id attribute
-* @see 
http://www.whatwg.org/specs/web-apps/current-work/multipage/elements.html#the-id-attribute
+* @see http://www.whatwg.org/html/elements.html#the-id-attribute
 *   HTML5 definition of id attribute
 *
 * @param string $id id to escape
@@ -1452,7 +1452,7 @@
}
 
if ( $wgHtml5 && $wgAllowMicrodataAttributes ) {
-   # add HTML5 microdata tags as specified by 
http://www.whatwg.org/specs/web-apps/current-work/multipage/microdata.html#the-microdata-model
+   # add HTML5 microdata tags as specified by 
http://www.whatwg.org/html/microdata.html#the-microdata-model
$common = array_merge( $common, array(
'itemid', 'itemprop', 'itemref', 'itemscope', 
'itemtype'
) );
@@ -1611,7 +1611,7 @@
 
if ( $wgHtml5 ) {
# HTML5 elements, defined by:
-   # 
http://www.whatwg.org/specs/web-apps/current-work/multipage/
+   # http://www.whatwg.org/html/
$whitelist += array(
'data' => array_merge( $common, array( 'value' 
) ),
'time' => array_merge( $common, array( 
'datetime' ) ),
@@ -1730,7 +1730,7 @@
 * Does a string look like an e-mail address?
 *
 * This validates an email address using an HTML5 specification found 
at:
-* 
http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
+* 
http://www.whatwg.org/html/states-of-the-type-attribute.html#valid-e-mail

[MediaWiki-commits] [Gerrit] Whitelist the element. - change (mediawiki/core)

2013-05-12 Thread Daniel Friesen (Code Review)
Daniel Friesen has uploaded a new change for review.

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


Change subject: Whitelist the  element.
..

Whitelist the  element.

Change-Id: If4a4882155888606c960237be0fbe7933a85c5f9
---
M RELEASE-NOTES-1.22
M includes/Sanitizer.php
2 files changed, 6 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/08/63408/1

diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22
index ad12bf9..af77d8a 100644
--- a/RELEASE-NOTES-1.22
+++ b/RELEASE-NOTES-1.22
@@ -70,6 +70,7 @@
   uses ES5 getter/setter to emit a warning when they are used.
 * $wgCascadingRestrictionLevels was added, allowing one to specify restriction 
levels
   which can be cascading (previously 'sysop' was hard-coded as the only one).
+*  can now be used inside WikiText.
 
 === Bug fixes in 1.22 ===
 * Disable Special:PasswordReset when $wgEnableEmail. Previously one could still
diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php
index e757021..7c5e52c 100644
--- a/includes/Sanitizer.php
+++ b/includes/Sanitizer.php
@@ -388,10 +388,10 @@
$htmlpairsStatic = array_merge( 
$htmlpairsStatic, array( 'data', 'time', 'mark' ) );
}
$htmlsingle = array(
-   'br', 'hr', 'li', 'dt', 'dd'
+   'br', 'wbr', 'hr', 'li', 'dt', 'dd'
);
$htmlsingleonly = array( # Elements that cannot have 
close tags
-   'br', 'hr'
+   'br', 'wbr', 'hr'
);
if ( $wgHtml5 && $wgAllowMicrodataAttributes ) {
$htmlsingle[] = $htmlsingleonly[] = 'meta';
@@ -1521,6 +1521,9 @@
# 9.3.2
'br' => array( 'id', 'class', 'title', 'style', 
'clear' ),
 
+   # 
http://www.whatwg.org/html/text-level-semantics.html#the-wbr-element
+   'wbr'=> array( 'id', 'class', 'title', 'style' 
),
+
# 9.3.4
'pre'=> array_merge( $common, array( 'width' ) 
),
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If4a4882155888606c960237be0fbe7933a85c5f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Daniel Friesen 

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


[MediaWiki-commits] [Gerrit] fix. abort method does not attempt reset to a start tag when... - change (sartoris)

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

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


Change subject: fix. abort method does not attempt reset to a start tag when 
one does not exist.
..

fix. abort method does not attempt reset to a start tag when one does not exist.

Change-Id: I975b03bdba582d80318eafa9c3a36dcbc7ae3a34
---
M sartoris/sartoris.py
1 file changed, 14 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/09/63409/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index c20e246..98eec19 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -315,23 +315,29 @@
 """
 
 # Get the commit hash of the current tag
-commit_sha = self._get_commit_sha_for_tag(self._tag)
+try:
+commit_sha = self._get_commit_sha_for_tag(self._tag)
+except SartorisError:
+   # No current tag 
+   commit_sha = None
 
 # 1. hard reset the index to the desired tree
 # 2. move the branch pointer back to the previous HEAD
 # 3. commit revert
 # @TODO replace with dulwich
-if subprocess.call("git reset --hard {0}".format(commit_sha).split()):
-raise SartorisError(message=exit_codes[5], exit_code=5)
-if subprocess.call("git reset --soft HEAD@{1}".split()):
-raise SartorisError(message=exit_codes[5], exit_code=5)
-if subprocess.call("git commit -m 'Revert to {0}'".format(commit_sha).
+
+if commit_sha:
+if subprocess.call("git reset --hard 
{0}".format(commit_sha).split()):
+raise SartorisError(message=exit_codes[5], exit_code=5)
+if subprocess.call("git reset --soft HEAD@{1}".split()):
+raise SartorisError(message=exit_codes[5], exit_code=5)
+if subprocess.call("git commit -m 'Revert to 
{0}'".format(commit_sha).
split()):
-raise SartorisError(message=exit_codes[5], exit_code=5)
+raise SartorisError(message=exit_codes[5], exit_code=5)
 
 # Remove lock file
 if os.listdir(self.DEPLOY_DIR).__contains__(self.LOCK_FILE_HANDLE):
-os.remove(self.LOCK_FILE_HANDLE)
+os.remove(self.DEPLOY_DIR + self.LOCK_FILE_HANDLE)
 else:
 raise SartorisError(message=exit_codes[4])
 return 0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I975b03bdba582d80318eafa9c3a36dcbc7ae3a34
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk 

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


[MediaWiki-commits] [Gerrit] fix. dulwich tagging. - change (sartoris)

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

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


Change subject: fix. dulwich tagging.
..

fix. dulwich tagging.

Change-Id: I49a10a52b68e81db3c8c1569d70fab563c99004a
---
M sartoris/sartoris.py
1 file changed, 4 insertions(+), 10 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/10/63410/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 98eec19..902a217 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -263,17 +263,10 @@
 object_store.add_object(tree)
 object_store.add_object(commit)
 _repo.refs['refs/heads/' + master_branch] = commit.id
+import pdb; pdb.set_trace()
 
 # Build the tag object and tag
-tag = Tag()
-tag.tagger = author
-tag.message = message
-tag.name = tag
-tag.object = (Commit, commit.id)
-tag.tag_time = commit.author_time
-tag.tag_timezone = tz
-object_store.add_object(tag)
-_repo['refs/tags/' + tag] = tag.id
+_repo['refs/tags/' + tag] = commit.id
 
 def start(self, args):
 """
@@ -303,7 +296,8 @@
 
 try:
 self._dulwich_tag(_tag, _author)
-except Exception:
+except Exception as e:
+logging.error(str(e))
 raise SartorisError(message=exit_codes[12], exit_code=12)
 
 return 0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49a10a52b68e81db3c8c1569d70fab563c99004a
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk 

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


[MediaWiki-commits] [Gerrit] fix. remove debugger statement + pep8. - change (sartoris)

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

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


Change subject: fix. remove debugger statement + pep8.
..

fix. remove debugger statement + pep8.

Change-Id: Ib02124bc23d6e5df85ada06c34800e4fd2e79cac
---
M sartoris/sartoris.py
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/11/63411/1

diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 902a217..d5b45b8 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -263,7 +263,6 @@
 object_store.add_object(tree)
 object_store.add_object(commit)
 _repo.refs['refs/heads/' + master_branch] = commit.id
-import pdb; pdb.set_trace()
 
 # Build the tag object and tag
 _repo['refs/tags/' + tag] = commit.id
@@ -312,8 +311,8 @@
 try:
 commit_sha = self._get_commit_sha_for_tag(self._tag)
 except SartorisError:
-   # No current tag 
-   commit_sha = None
+# No current tag
+commit_sha = None
 
 # 1. hard reset the index to the desired tree
 # 2. move the branch pointer back to the previous HEAD
@@ -321,12 +320,13 @@
 # @TODO replace with dulwich
 
 if commit_sha:
-if subprocess.call("git reset --hard 
{0}".format(commit_sha).split()):
+if subprocess.call("git reset --hard {0}".
+   format(commit_sha).split()):
 raise SartorisError(message=exit_codes[5], exit_code=5)
 if subprocess.call("git reset --soft HEAD@{1}".split()):
 raise SartorisError(message=exit_codes[5], exit_code=5)
-if subprocess.call("git commit -m 'Revert to 
{0}'".format(commit_sha).
-   split()):
+if subprocess.call("git commit -m 'Revert to {0}'".
+   format(commit_sha).split()):
 raise SartorisError(message=exit_codes[5], exit_code=5)
 
 # Remove lock file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib02124bc23d6e5df85ada06c34800e4fd2e79cac
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk 

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


[MediaWiki-commits] [Gerrit] Prevent selser of zero-length DSR chunks. - change (mediawiki...Parsoid)

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

Change subject: Prevent selser of zero-length DSR chunks.
..


Prevent selser of zero-length DSR chunks.

We use zero-length TSRs to mark synthetic chunks of the DOM, for example
the  generated by '#REDIRECT [[Category:Foo]]'.
We want to make sure that we don't try to selser these chunks if they
are edited.

Makes one more selser test pass, more-or-less randomly.

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

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



diff --git a/js/lib/mediawiki.WikitextSerializer.js 
b/js/lib/mediawiki.WikitextSerializer.js
index c3f5892..e52fa01 100644
--- a/js/lib/mediawiki.WikitextSerializer.js
+++ b/js/lib/mediawiki.WikitextSerializer.js
@@ -2964,6 +2964,9 @@
// To serialize from source, we need 2 things 
of the node:
// -- it should not have a diff marker
// -- it should have valid, usable DSR
+   // -- it should have a non-zero length DSR
+   //(this is used to prevent selser on 
synthetic content,
+   // like the category link for '#REDIRECT 
[[Category:Foo]]')
//
// SSS FIXME: Additionally, we can guard 
against buggy DSR with
// some sanity checks. We can test that non-sep 
src content
@@ -2973,7 +2976,9 @@
//
//  TO BE DONE
//
-   if (dp && isValidDSR(dp.dsr) && 
!DU.hasCurrentDiffMark(node, this.env)) {
+   if (dp && isValidDSR(dp.dsr) &&
+   (dp.dsr[1] > dp.dsr[0]) &&
+   !DU.hasCurrentDiffMark(node, this.env)) 
{
// Strip leading/trailing separators 
*ONLY IF* the previous/following
// node will go through non-selser 
serialization.
var src = state.getOrigSrc(dp.dsr[0], 
dp.dsr[1]),
diff --git a/js/tests/parserTests-blacklist.js 
b/js/tests/parserTests-blacklist.js
index 9f8a41a..64c4db6 100644
--- a/js/tests/parserTests-blacklist.js
+++ b/js/tests/parserTests-blacklist.js
@@ -2894,7 +2894,6 @@
 add("selser", "Fuzz testing: Parser24 [3,4,1]");
 add("selser", "Fuzz testing: Parser24 [4,2,[0,0,0,1],4]");
 add("selser", "Fuzz testing: Parser24 [[0,[0,2]],2]");
-add("selser", "Fuzz testing: Parser24 [4,3,[0,0,0,3],[1]]");
 add("selser", "Fuzz testing: Parser24 [2,[2]]");
 add("selser", "Fuzz testing: Parser24 [[0,3],[0,0]]");
 add("selser", "Fuzz testing: Parser24 [4,[[0]]]");

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I07cf0b5432ed188f8d33eda8178d205f48f36b82
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Adding valueview qunit tests to be executed automatically - change (mediawiki...Wikibase)

2013-05-12 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has uploaded a new change for review.

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


Change subject: Adding valueview qunit tests to be executed automatically
..

Adding valueview qunit tests to be executed automatically

- added valueview tests to selenium qunit test

Change-Id: Ibc875e7c8a28b86da9bc0535e8c932891fa74a26
---
M repo/tests/selenium/qunit/qunit_spec.rb
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/repo/tests/selenium/qunit/qunit_spec.rb 
b/repo/tests/selenium/qunit/qunit_spec.rb
index 3ba0244..0b9c451 100644
--- a/repo/tests/selenium/qunit/qunit_spec.rb
+++ b/repo/tests/selenium/qunit/qunit_spec.rb
@@ -63,5 +63,12 @@
 page.qunitTestFail?.should be_false
   end
 end
+it "run valueview tests" do
+  on_page(QUnitPage) do |page|
+page.call_qunit(WIKI_REPO_URL + 
"Special:JavaScriptTest/qunit?filter=valueview")
+page.wait_for_qunit_tests
+page.qunitTestFail?.should be_false
+  end
+end
   end
 end

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibc875e7c8a28b86da9bc0535e8c932891fa74a26
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] (bug 48386) Use DOM_VK_ENTER instead of DOM_VK_RETURN (which... - change (mediawiki...VisualEditor)

2013-05-12 Thread Inez (Code Review)
Inez has uploaded a new change for review.

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


Change subject: (bug 48386) Use DOM_VK_ENTER instead of DOM_VK_RETURN (which is 
not defined anymore)
..

(bug 48386) Use DOM_VK_ENTER instead of DOM_VK_RETURN (which is not defined 
anymore)

Change-Id: I8d7aeffc8166487806e3489b054f508c5e9418ff
---
M modules/ve/ce/ve.ce.Surface.js
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/ve/ce/ve.ce.Surface.js b/modules/ve/ce/ve.ce.Surface.js
index 7ad07c5..984ab23 100644
--- a/modules/ve/ce/ve.ce.Surface.js
+++ b/modules/ve/ce/ve.ce.Surface.js
@@ -399,7 +399,7 @@
} else {
this.handleUpOrDownArrowKey( e );
}
-   } else if ( e.keyCode === ve.Keys.DOM_VK_RETURN ) {
+   } else if ( e.keyCode === ve.Keys.DOM_VK_ENTER ) {
e.preventDefault();
this.handleEnter( e );
} else if ( e.keyCode === ve.Keys.DOM_VK_BACK_SPACE ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d7aeffc8166487806e3489b054f508c5e9418ff
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Inez 

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