[MediaWiki-commits] [Gerrit] XML format: fix "Unrecognized parameter" warning - change (mediawiki/core)

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

Change subject: XML format: fix "Unrecognized parameter" warning
..


XML format: fix "Unrecognized parameter" warning

ApiMain::reportUnusedParams() is called before the XML formatter is
executed, so using "includexmlnamespace" or another such parameter
causes the incorrect generation of a warning. This patch corrects
the issue by explicitly excluding valid formatter parameters from
the list of unused parameters.

This does not need a release note because MediaWiki 1.20 did not
generate this kind of warning.

Change-Id: I269a6e07aa245099c811947d7832e1aa6fcfb9ec
---
M includes/api/ApiMain.php
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/includes/api/ApiMain.php b/includes/api/ApiMain.php
index fed515b..c3ae8b1 100644
--- a/includes/api/ApiMain.php
+++ b/includes/api/ApiMain.php
@@ -921,7 +921,13 @@
$paramsUsed = $this->getParamsUsed();
$allParams = $this->getRequest()->getValueNames();
 
-   $unusedParams = array_diff( $allParams, $paramsUsed );
+   // Printer has not yet executed; don't warn that its parameters 
are unused
+   $printerParams = array_map(
+   array( $this->mPrinter, 'encodeParamName' ),
+   array_keys( $this->mPrinter->getFinalParams() ?: 
array() )
+   );
+
+   $unusedParams = array_diff( $allParams, $paramsUsed, 
$printerParams );
if( count( $unusedParams ) ) {
$s = count( $unusedParams ) > 1 ? 's' : '';
$this->setWarning( "Unrecognized parameter$s: '" . 
implode( $unusedParams, "', '" ) . "'" );

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

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

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


[MediaWiki-commits] [Gerrit] Make ApiEditPage use Article::newFromWikiPage() and add user... - change (mediawiki/core)

2013-02-24 Thread IAlex (Code Review)
IAlex has uploaded a new change for review.

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


Change subject: Make ApiEditPage use Article::newFromWikiPage() and add user to 
context
..

Make ApiEditPage use Article::newFromWikiPage() and add user to context

- Changed the creation of the Article object in ApiEditPage::execute() to
  use Article::newFromWikiPage(), this allows to re-use the already-existing
  WikiPage object in that method instead of having to create a new one.
  Article::newFromTitle() was used before, but for some reason this got
  reverted back to "new Article" with the merge of the Wikidata branch.
- Removed the call to WikiPage::clear() added in I1d28164d (2c27926); no
  longer needed since the WikiPage object is now already up to date after
  the edit.
- Added WikiPage and User objects to the context passed to the created
  Article object; follow-up to I74394282 (078334f).

Change-Id: I53088a42ef7592aaba7449ef3f84f77f2e07b2f5
---
M includes/api/ApiEditPage.php
1 file changed, 4 insertions(+), 5 deletions(-)


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

diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index 1d6dc66..b642c6d 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -303,12 +303,12 @@
// TODO: Make them not or check if they still do
$wgTitle = $titleObj;
 
-   $articleObject = new Article( $titleObj );
-
$articleContext = new RequestContext;
$articleContext->setRequest( $req );
-   $articleContext->setTitle( $titleObj );
-   $articleObject->setContext( $articleContext );
+   $articleContext->setWikiPage( $pageObj );
+   $articleContext->setUser( $this->getUser() );
+
+   $articleObject = Article::newFromWikiPage( $pageObj, 
$articleContext );
 
$ep = new EditPage( $articleObject );
 
@@ -409,7 +409,6 @@
} else {
$r['oldrevid'] = intval( $oldRevId );
$r['newrevid'] = intval( $newRevId );
-   $pageObj->clear();
$r['newtimestamp'] = wfTimestamp( 
TS_ISO_8601,
$pageObj->getTimestamp() );
}

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

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

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


[MediaWiki-commits] [Gerrit] Shift responsibility for annotating events with UUID - change (mediawiki...EventLogging)

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

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


Change subject: Shift responsibility for annotating events with UUID
..

Shift responsibility for annotating events with UUID

It seemed a bit weird to defer calculation of UUID to the database
layer. It should rather be included in the (presumably canonical) output
of log2json.

Change-Id: I1ea55df2d5948d9e8c16493943f7164c0c894b74
---
M server/bin/log2json
M server/eventlogging/jrm.py
M server/eventlogging/parse.py
M server/tests/fixtures.py
4 files changed, 11 insertions(+), 7 deletions(-)


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

diff --git a/server/bin/log2json b/server/bin/log2json
index 9805da6..f14e763 100755
--- a/server/bin/log2json
+++ b/server/bin/log2json
@@ -37,7 +37,7 @@
 import jsonschema
 import zmq
 
-from eventlogging import json, LogParser, validate, zmq_subscribe
+from eventlogging import capsule_uuid, json, LogParser, validate, zmq_subscribe
 
 
 logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
@@ -61,6 +61,7 @@
 try:
 event = parser.parse(raw_event)
 validate(event)
+event['uuid'] = capsule_uuid(event)
 except Exception:
 logging.exception('Unable to decode: %s', raw_event)
 else:
diff --git a/server/eventlogging/jrm.py b/server/eventlogging/jrm.py
index fe6c5d2..3ad32bc 100644
--- a/server/eventlogging/jrm.py
+++ b/server/eventlogging/jrm.py
@@ -14,7 +14,7 @@
 
 import sqlalchemy
 
-from .schema import get_schema, capsule_uuid
+from .schema import get_schema
 from .compat import items
 
 
@@ -170,7 +170,6 @@
 scid = (event['schema'], event['revision'])
 table = get_table(meta, scid)
 event = flatten(event)
-event['uuid'] = capsule_uuid(event)
 event = {k: v for k, v in items(event) if k not in NO_DB_PROPERTIES}
 return table.insert(values=event).execute()
 
diff --git a/server/eventlogging/parse.py b/server/eventlogging/parse.py
index ee48a13..b9200cf 100644
--- a/server/eventlogging/parse.py
+++ b/server/eventlogging/parse.py
@@ -87,10 +87,10 @@
 #: A mapping of format specifiers to a tuple of (regexp, caster).
 format_specifiers = {
 '%h': (r'(?P\S+)', hash_value),
-'%j': (r'(?P\S+)', json.loads),
+'%j': (r'(?P\S+)', json.loads),
 '%l': (r'(?P\S+)', str),
 '%n': (r'(?P\d+)', int),
-'%q': (r'(?P\?\S+)', decode_qson),
+'%q': (r'(?P\?\S+)', decode_qson),
 '%t': (r'(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})',
ncsa_to_epoch),
 }
@@ -128,7 +128,7 @@
 raise ValueError(self.re, line)
 keys = sorted(match.groupdict(), key=match.start)
 event = {k: f(match.group(k)) for f, k in zip(self.casters, keys)}
-event.update(event.pop('event'))
+event.update(event.pop('capsule'))
 return event
 
 def __repr__(self):
diff --git a/server/tests/fixtures.py b/server/tests/fixtures.py
index 17be66e..af7f280 100644
--- a/server/tests/fixtures.py
+++ b/server/tests/fixtures.py
@@ -60,6 +60,9 @@
 'type': 'number',
 'required': True,
 'format': 'utc-millisec'
+},
+'uuid': {
+'type': 'string'
 }
 },
 'additionalProperties': False
@@ -106,7 +109,8 @@
 'recvFrom': 'fenari',
 'clientValidated': True,
 'revision': 123,
-'schema': 'TestSchema'
+'schema': 'TestSchema',
+'uuid': 'babb66f34a0a5de3be0c6513088be33e'
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1ea55df2d5948d9e8c16493943f7164c0c894b74
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
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] Shift responsibility for annotating events with UUID - change (mediawiki...EventLogging)

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

Change subject: Shift responsibility for annotating events with UUID
..


Shift responsibility for annotating events with UUID

It seemed a bit weird to defer calculation of UUID to the database
layer. It should rather be included in the (presumably canonical) output
of log2json.

Change-Id: I1ea55df2d5948d9e8c16493943f7164c0c894b74
---
M server/bin/log2json
M server/eventlogging/jrm.py
M server/eventlogging/parse.py
M server/tests/fixtures.py
4 files changed, 12 insertions(+), 8 deletions(-)

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



diff --git a/server/bin/log2json b/server/bin/log2json
index 9805da6..f14e763 100755
--- a/server/bin/log2json
+++ b/server/bin/log2json
@@ -37,7 +37,7 @@
 import jsonschema
 import zmq
 
-from eventlogging import json, LogParser, validate, zmq_subscribe
+from eventlogging import capsule_uuid, json, LogParser, validate, zmq_subscribe
 
 
 logging.basicConfig(level=logging.DEBUG, stream=sys.stderr)
@@ -61,6 +61,7 @@
 try:
 event = parser.parse(raw_event)
 validate(event)
+event['uuid'] = capsule_uuid(event)
 except Exception:
 logging.exception('Unable to decode: %s', raw_event)
 else:
diff --git a/server/eventlogging/jrm.py b/server/eventlogging/jrm.py
index fe6c5d2..2cb02da 100644
--- a/server/eventlogging/jrm.py
+++ b/server/eventlogging/jrm.py
@@ -14,7 +14,7 @@
 
 import sqlalchemy
 
-from .schema import get_schema, capsule_uuid
+from .schema import get_schema
 from .compat import items
 
 
@@ -166,11 +166,10 @@
 
 
 def store_event(meta, event):
-"""Store an event the database."""
+"""Store an event in the database."""
 scid = (event['schema'], event['revision'])
 table = get_table(meta, scid)
 event = flatten(event)
-event['uuid'] = capsule_uuid(event)
 event = {k: v for k, v in items(event) if k not in NO_DB_PROPERTIES}
 return table.insert(values=event).execute()
 
diff --git a/server/eventlogging/parse.py b/server/eventlogging/parse.py
index ee48a13..b9200cf 100644
--- a/server/eventlogging/parse.py
+++ b/server/eventlogging/parse.py
@@ -87,10 +87,10 @@
 #: A mapping of format specifiers to a tuple of (regexp, caster).
 format_specifiers = {
 '%h': (r'(?P\S+)', hash_value),
-'%j': (r'(?P\S+)', json.loads),
+'%j': (r'(?P\S+)', json.loads),
 '%l': (r'(?P\S+)', str),
 '%n': (r'(?P\d+)', int),
-'%q': (r'(?P\?\S+)', decode_qson),
+'%q': (r'(?P\?\S+)', decode_qson),
 '%t': (r'(?P\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})',
ncsa_to_epoch),
 }
@@ -128,7 +128,7 @@
 raise ValueError(self.re, line)
 keys = sorted(match.groupdict(), key=match.start)
 event = {k: f(match.group(k)) for f, k in zip(self.casters, keys)}
-event.update(event.pop('event'))
+event.update(event.pop('capsule'))
 return event
 
 def __repr__(self):
diff --git a/server/tests/fixtures.py b/server/tests/fixtures.py
index 17be66e..af7f280 100644
--- a/server/tests/fixtures.py
+++ b/server/tests/fixtures.py
@@ -60,6 +60,9 @@
 'type': 'number',
 'required': True,
 'format': 'utc-millisec'
+},
+'uuid': {
+'type': 'string'
 }
 },
 'additionalProperties': False
@@ -106,7 +109,8 @@
 'recvFrom': 'fenari',
 'clientValidated': True,
 'revision': 123,
-'schema': 'TestSchema'
+'schema': 'TestSchema',
+'uuid': 'babb66f34a0a5de3be0c6513088be33e'
 }
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1ea55df2d5948d9e8c16493943f7164c0c894b74
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/EventLogging
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] Testing commit - change (test...examples)

2013-02-24 Thread Yuvals (Code Review)
Yuvals has uploaded a new change for review.

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


Change subject: Testing commit
..

Testing commit

Change-Id: Icd9dcf3238c6b6c28ec5e8253253fdb29e4794fa
---
M Example/Example.body.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/test/mediawiki/extensions/examples 
refs/changes/03/50603/1

diff --git a/Example/Example.body.php b/Example/Example.body.php
index 10d26ad..a4a7826 100644
--- a/Example/Example.body.php
+++ b/Example/Example.body.php
@@ -18,6 +18,6 @@
}
 
function getVersion() {
-return '0.042';
+return '0.043';
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icd9dcf3238c6b6c28ec5e8253253fdb29e4794fa
Gerrit-PatchSet: 1
Gerrit-Project: test/mediawiki/extensions/examples
Gerrit-Branch: master
Gerrit-Owner: Yuvals 

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


[MediaWiki-commits] [Gerrit] (bug 45268) cumulative fix replacing deprecated wfMsg calls - change (mediawiki...OpenID)

2013-02-24 Thread Wikinaut (Code Review)
Wikinaut has uploaded a new change for review.

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


Change subject: (bug 45268) cumulative fix replacing deprecated wfMsg calls
..

(bug 45268) cumulative fix replacing deprecated wfMsg calls

final and cumulative fix for replacing deprecated wfMsg * calls
with wfMessage.

It is an follow up to and includes the changes which were already
merged in https://gerrit.wikimedia.org/r/#/c/50478/ .

Change-Id: I76e744184228a5f20c26fb0575f0ff278fc0c437
---
M .gitignore
M OpenID.hooks.php
M OpenIDProvider.body.php
M SpecialOpenIDConvert.body.php
M SpecialOpenIDDashboard.body.php
M SpecialOpenIDLogin.body.php
M SpecialOpenIDServer.body.php
M SpecialOpenIDXRDS.body.php
8 files changed, 93 insertions(+), 85 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index 92d560d..3f2efdc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
 *.kate-swp
 .*.swp
 Auth/
+php-openid/
diff --git a/OpenID.hooks.php b/OpenID.hooks.php
index eb31e9e..764dadc 100644
--- a/OpenID.hooks.php
+++ b/OpenID.hooks.php
@@ -113,7 +113,7 @@
$returnto = $title->isSpecial( 'Userlogout' ) ? '' : ( 
'returnto=' . $title->getPrefixedURL() );
 
$personal_urls['openidlogin'] = array(
-   'text' => wfMsg( 'openidlogin' ),
+   'text' => wfMessage( 'openidlogin' )->text(),
'href' => $sk->makeSpecialUrl( 'OpenIDLogin', 
$returnto ),
'active' => $title->isSpecial( 'OpenIDLogin' )
);
@@ -152,13 +152,12 @@
foreach ( $openid_urls_registration as $url_reg ) {

if ( !empty( $url_reg->uoi_user_registration ) ) { 
-   $registrationTime = wfMsgExt(
+   $registrationTime = wfMessage(
'openid-urls-registration-date-time',
-   'parsemag',
$wgLang->timeanddate( 
$url_reg->uoi_user_registration, true ),
$wgLang->date( 
$url_reg->uoi_user_registration, true ),
$wgLang->time( 
$url_reg->uoi_user_registration, true )
-   );
+   )->text();
} else {
$registrationTime = '';
}
@@ -174,7 +173,7 @@
) .
Xml::tags( 'td',
array(),
-   $sk->link( $delTitle, wfMsgHtml( 
'openid-urls-delete' ),
+   $sk->link( $delTitle, wfMessage( 
'openid-urls-delete' )->text(),
array(),
array( 'url' => 
$url_reg->uoi_openid ) 
) 
@@ -185,17 +184,20 @@
Xml::tags( 'tr', array(),
Xml::element( 'th',
array(), 
-   wfMsg( 'openid-urls-url' ) ) .
+   wfMessage( 'openid-urls-url' )->text() 
) .
Xml::element( 'th',
array(), 
-   wfMsg( 'openid-urls-registration' ) ) .
+   wfMessage( 'openid-urls-registration' 
)->text() ) .
Xml::element( 'th', 
array(), 
-   wfMsg( 'openid-urls-action' ) )
+   wfMessage( 'openid-urls-action' 
)->text() )
) . "\n" .
$rows
);
-   $info .= $sk->link( SpecialPage::getTitleFor( 'OpenIDConvert' 
), wfMsgHtml( 'openid-add-url' ) );
+   $info .= $sk->link(
+   SpecialPage::getTitleFor( 'OpenIDConvert' ),
+   wfMessage( 'openid-add-url' )->text()
+   );
return $info;
}
 
@@ -213,13 +215,13 @@
}
 
$update = array();
-   $update[wfMsg( 'openidnickname' )] = 'nickname';
-   $update[wfMsg( 'openidemail' )] = 'email';
+   $update[ wfMessage( 'openidnickname' )->text() ] = 'nickname';
+   $update[ wfMessage( 'openidemail' )->text() ] = 'email';
if ( $wgAllowRealName ) {
-   $update[wfMsg( 'openidfullname' )] = 'fullname';
+   

[MediaWiki-commits] [Gerrit] bugfix (unknown hook used) - change (mediawiki...Lingo)

2013-02-24 Thread Foxtrott (Code Review)
Foxtrott has uploaded a new change for review.

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


Change subject: bugfix (unknown hook used)
..

bugfix (unknown hook used)

Compatibility with MW pre1.20 was broken because the used hook ParserAfterParse 
was not available back then.

Change-Id: Ia30a7697d1202cc66f71b4c5ea9abdb162078210
---
M Lingo.php
M LingoParser.php
M libs/Lingo.js
3 files changed, 15 insertions(+), 6 deletions(-)


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

diff --git a/Lingo.php b/Lingo.php
index 56cfd37..0aaf874 100644
--- a/Lingo.php
+++ b/Lingo.php
@@ -8,7 +8,7 @@
  * @author Barry Coughlan
  * @copyright 2010 Barry Coughlan
  * @author Stephan Gambke
- * @version 0.4
+ * @version 0.4.1
  * @licence GNU General Public Licence 2.0 or later
  * @see http://www.mediawiki.org/wiki/Extension:Lingo Documentation
  */
@@ -16,7 +16,7 @@
die( 'This file is part of a MediaWiki extension, it is not a valid 
entry point.' );
 }
 
-define( 'LINGO_VERSION', '0.4' );
+define( 'LINGO_VERSION', '0.4.1' );
 
 
 // set defaults for settings
@@ -71,7 +71,13 @@
 
 // register hook handlers
 $wgHooks['SpecialVersionExtensionTypes'][] = 'LingoHooks::setCredits'; // set 
credits
-$wgHooks['ParserAfterParse'][] = 'LingoHooks::parse'; // parse page
+
+if ( version_compare( $wgVersion, '1.20', 'lt' ) ) {
+   // ParserAfterParse only available from 1.20 onwards
+   $wgHooks['InternalParseBeforeLinks'][] = 'LingoHooks::parse'; // parse 
page
+} else {
+   $wgHooks['ParserAfterParse'][] = 'LingoHooks::parse'; // parse page
+}
 
 $wgHooks['ArticlePurge'][] = 'LingoBasicBackend::purgeCache';
 $wgHooks['ArticleSave'][] = 'LingoBasicBackend::purgeCache';
diff --git a/LingoParser.php b/LingoParser.php
index 0eeb073..fd26110 100644
--- a/LingoParser.php
+++ b/LingoParser.php
@@ -45,6 +45,9 @@
wfProfileIn( __METHOD__ );
if ( !self::$parserSingleton ) {
self::$parserSingleton = new LingoParser();
+
+   // The RegEx to split a chunk of text into words
+   // Words are: placeholders for stripped items, 
sequences of letters and numbers, single characters that are neither letter nor 
number
self::$regex = '/' . preg_quote( $parser->uniqPrefix(), 
'/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
}
 
diff --git a/libs/Lingo.js b/libs/Lingo.js
index 2df..6dae13e 100644
--- a/libs/Lingo.js
+++ b/libs/Lingo.js
@@ -161,7 +161,7 @@
 
if ( placeAbove ) {
wrapper.css( {
-   'top': ( - tipdef.outerHeight() 
- 5 ) + 'px',
+   'top': ( -tipdef.outerHeight() 
- 5 ) + 'px',
'padding-bottom': 
termLineHeight + 'px',
'padding-top' : '0px'
} );
@@ -196,7 +196,7 @@
.mouseleave( function ( event ){
event.stopImmediatePropagation();
 
-   if( jQuery.browser.msie && 
jQuery.browser.version.substr( 0, 1 ) <= 7 ) {
+   if( $.browser.msie && $.browser.version.substr( 0, 1 ) 
<= 7 ) {
$( this ).css( 'z-index', 1 );
}
 
@@ -210,7 +210,7 @@
.mouseleave( function ( event ){
event.stopImmediatePropagation();
 
-   if( jQuery.browser.msie && 
jQuery.browser.version.substr( 0, 1 ) <= 7 ) {
+   if( $.browser.msie && $.browser.version.substr( 0, 1 ) 
<= 7 ) {
$( this ).parent().parent().css( 'z-index', 1 );
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia30a7697d1202cc66f71b4c5ea9abdb162078210
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 

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


[MediaWiki-commits] [Gerrit] bugfix (unknown hook used) - change (mediawiki...Lingo)

2013-02-24 Thread Foxtrott (Code Review)
Foxtrott has submitted this change and it was merged.

Change subject: bugfix (unknown hook used)
..


bugfix (unknown hook used)

Compatibility with MW pre1.20 was broken because the used hook ParserAfterParse 
was not available back then.

Change-Id: Ia30a7697d1202cc66f71b4c5ea9abdb162078210
---
M Lingo.php
M LingoParser.php
M libs/Lingo.js
3 files changed, 15 insertions(+), 6 deletions(-)

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



diff --git a/Lingo.php b/Lingo.php
index 56cfd37..0aaf874 100644
--- a/Lingo.php
+++ b/Lingo.php
@@ -8,7 +8,7 @@
  * @author Barry Coughlan
  * @copyright 2010 Barry Coughlan
  * @author Stephan Gambke
- * @version 0.4
+ * @version 0.4.1
  * @licence GNU General Public Licence 2.0 or later
  * @see http://www.mediawiki.org/wiki/Extension:Lingo Documentation
  */
@@ -16,7 +16,7 @@
die( 'This file is part of a MediaWiki extension, it is not a valid 
entry point.' );
 }
 
-define( 'LINGO_VERSION', '0.4' );
+define( 'LINGO_VERSION', '0.4.1' );
 
 
 // set defaults for settings
@@ -71,7 +71,13 @@
 
 // register hook handlers
 $wgHooks['SpecialVersionExtensionTypes'][] = 'LingoHooks::setCredits'; // set 
credits
-$wgHooks['ParserAfterParse'][] = 'LingoHooks::parse'; // parse page
+
+if ( version_compare( $wgVersion, '1.20', 'lt' ) ) {
+   // ParserAfterParse only available from 1.20 onwards
+   $wgHooks['InternalParseBeforeLinks'][] = 'LingoHooks::parse'; // parse 
page
+} else {
+   $wgHooks['ParserAfterParse'][] = 'LingoHooks::parse'; // parse page
+}
 
 $wgHooks['ArticlePurge'][] = 'LingoBasicBackend::purgeCache';
 $wgHooks['ArticleSave'][] = 'LingoBasicBackend::purgeCache';
diff --git a/LingoParser.php b/LingoParser.php
index 0eeb073..fd26110 100644
--- a/LingoParser.php
+++ b/LingoParser.php
@@ -45,6 +45,9 @@
wfProfileIn( __METHOD__ );
if ( !self::$parserSingleton ) {
self::$parserSingleton = new LingoParser();
+
+   // The RegEx to split a chunk of text into words
+   // Words are: placeholders for stripped items, 
sequences of letters and numbers, single characters that are neither letter nor 
number
self::$regex = '/' . preg_quote( $parser->uniqPrefix(), 
'/' ) . '.*?' . preg_quote( Parser::MARKER_SUFFIX, '/' ) . 
'|[\p{L}\p{N}]+|[^\p{L}\p{N}]/u';
}
 
diff --git a/libs/Lingo.js b/libs/Lingo.js
index 2df..6dae13e 100644
--- a/libs/Lingo.js
+++ b/libs/Lingo.js
@@ -161,7 +161,7 @@
 
if ( placeAbove ) {
wrapper.css( {
-   'top': ( - tipdef.outerHeight() 
- 5 ) + 'px',
+   'top': ( -tipdef.outerHeight() 
- 5 ) + 'px',
'padding-bottom': 
termLineHeight + 'px',
'padding-top' : '0px'
} );
@@ -196,7 +196,7 @@
.mouseleave( function ( event ){
event.stopImmediatePropagation();
 
-   if( jQuery.browser.msie && 
jQuery.browser.version.substr( 0, 1 ) <= 7 ) {
+   if( $.browser.msie && $.browser.version.substr( 0, 1 ) 
<= 7 ) {
$( this ).css( 'z-index', 1 );
}
 
@@ -210,7 +210,7 @@
.mouseleave( function ( event ){
event.stopImmediatePropagation();
 
-   if( jQuery.browser.msie && 
jQuery.browser.version.substr( 0, 1 ) <= 7 ) {
+   if( $.browser.msie && $.browser.version.substr( 0, 1 ) 
<= 7 ) {
$( this ).parent().parent().css( 'z-index', 1 );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia30a7697d1202cc66f71b4c5ea9abdb162078210
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Lingo
Gerrit-Branch: master
Gerrit-Owner: Foxtrott 
Gerrit-Reviewer: Foxtrott 

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


[MediaWiki-commits] [Gerrit] (bug 40665) Watch/Unwatch must be POSTed and pass token. - change (mediawiki...LiquidThreads)

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

Change subject: (bug 40665) Watch/Unwatch must be POSTed and pass token.
..


(bug 40665) Watch/Unwatch must be POSTed and pass token.

I think this was caused by r88522.

Change-Id: Ibb0fcba5d70cf7045d9280445f63ee4914ff9fc6
---
M LiquidThreads.php
M lqt.js
2 files changed, 8 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Helder.wiki: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/LiquidThreads.php b/LiquidThreads.php
index c49ed61..0de9a1d 100644
--- a/LiquidThreads.php
+++ b/LiquidThreads.php
@@ -83,6 +83,7 @@
'jquery.ui.dialog',
'jquery.ui.droppable',
'mediawiki.action.edit.preview',
+   'user.tokens',
),
'messages' => $lqtMessages
 );
diff --git a/lqt.js b/lqt.js
index 82b6376..66a8f2f 100644
--- a/lqt.js
+++ b/lqt.js
@@ -801,13 +801,18 @@
button.empty().addClass( 'mw-small-spinner' );
 
// Do the AJAX call.
-   var apiParams = { 'action' : 'watch', 'title' : title, 'format' 
: 'json' };
+   var apiParams = {
+   'action': 'watch',
+   'title' : title,
+   'format': 'json',
+   'token' : mw.user.tokens.get( 'watchToken' )
+   };
 
if (action === 'unwatch') {
apiParams.unwatch = 'yes';
}
 
-   $.get( mw.util.wikiScript( 'api' ), apiParams,
+   $.post( mw.util.wikiScript( 'api' ), apiParams,
function () {
threadLevelCommands.load( 
window.location.href+' '+

'#'+threadLevelCommands.attr('id')+' > *' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibb0fcba5d70cf7045d9280445f63ee4914ff9fc6
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Helder.wiki 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: MZMcBride 
Gerrit-Reviewer: Martineznovo 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 29127) Fix placement of sign unnecessary message - change (mediawiki...LiquidThreads)

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

Change subject: (bug 29127) Fix placement of sign unnecessary message
..


(bug 29127) Fix placement of sign unnecessary message

Change-Id: Ib9e3bbbad5123a3c48d24496f1ed47d58cf1fb4b
---
M lqt.js
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/lqt.js b/lqt.js
index 82b6376..cf8cf81 100644
--- a/lqt.js
+++ b/lqt.js
@@ -1146,11 +1146,14 @@
}
 
// Show the warning
-   var msg = mw.msg('lqt-sign-not-necessary');
-   var elem = $('');
-   elem.text(msg);
+   var elem = $( '' ).attr( { 'id': 
'lqt-sign-warning', 'class': 'error' } ).text( mw.msg( 'lqt-sign-not-necessary' 
) ),
+   $weTop = $( this ).closest( '.lqt-edit-form' 
).find( '.wikiEditor-ui-top' );
 
-   $(this).before( elem );
+   if ( $weTop.length ) {
+   $weTop.before( elem );
+   } else {
+   $( this ).before( elem );
+   }
} else {
prevWarning.remove();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib9e3bbbad5123a3c48d24496f1ed47d58cf1fb4b
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Martineznovo 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Werdna 
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 24292) Update new messages count after marking all thre... - change (mediawiki...LiquidThreads)

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

Change subject: (bug 24292) Update new messages count after marking all threads 
as read
..


(bug 24292) Update new messages count after marking all threads as read

Change-Id: I64682c54a261a965eb30812bb4c19c1b9843686b
---
M api/ApiThreadAction.php
M newmessages.js
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/api/ApiThreadAction.php b/api/ApiThreadAction.php
index 8dbd068..4df5a5c 100644
--- a/api/ApiThreadAction.php
+++ b/api/ApiThreadAction.php
@@ -54,10 +54,16 @@
 
if ( in_array( 'all', $threads ) ) {
NewMessages::markAllReadByUser( $user );
+   $newMessagesCount = NewMessages::newMessageCount( $user 
);
$result[] = array(
'result' => 'Success',
'action' => 'markread',
'threads' => 'all',
+   'unreadlink' => array(
+   'href' => SpecialPage::getTitleFor( 
'NewMessages' )->getLocalURL(),
+   'text' => wfMessage( $newMessagesCount 
? 'lqt-newmessages-n' : 'lqt_newmessages' )->numParams( $newMessagesCount 
)->text(),
+   'active' => $newMessagesCount > 0,
+   )
);
} else {
foreach ( $threads as $t ) {
@@ -69,6 +75,12 @@
'title' => 
$t->title()->getPrefixedText()
);
}
+   $newMessagesCount = NewMessages::newMessageCount( $user 
);
+   $result[count( $result ) - 1]['unreadlink'] = array( // 
Only bother to put this on the last threadaction
+   'href' => SpecialPage::getTitleFor( 
'NewMessages' )->getLocalURL(),
+   'text' => wfMessage( $newMessagesCount ? 
'lqt-newmessages-n' : 'lqt_newmessages' )->numParams( $newMessagesCount 
)->text(),
+   'active' => $newMessagesCount > 0,
+   );
}
 
$this->getResult()->setIndexedTagName( $result, 'thread' );
diff --git a/newmessages.js b/newmessages.js
index 67e6241..f0c526b 100644
--- a/newmessages.js
+++ b/newmessages.js
@@ -98,6 +98,7 @@
liquidThreads.apiRequest( markReadParameters,
function(e) {

liquidThreads.markReadDone.one(e,form.find('input[type=submit]'),operand);
+   $( 'li#pt-newmessages' ).html( $( '', 
e.threadactions[e.threadactions.length - 1].unreadlink ) ); // Unreadlink will 
be on the last threadaction
spinner.remove();
} );
},
@@ -115,6 +116,7 @@
 
liquidThreads.apiRequest( request, function(res) {
liquidThreads.markReadDone.all(res);
+   $( 'li#pt-newmessages' ).html( $( '', 
res.threadactions[0].unreadlink ) );
spinner.remove();
} );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I64682c54a261a965eb30812bb4c19c1b9843686b
Gerrit-PatchSet: 6
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Huji 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 39513) Check lqtnotifytalk property correctly - change (mediawiki...LiquidThreads)

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

Change subject: (bug 39513) Check lqtnotifytalk property correctly
..


(bug 39513) Check lqtnotifytalk property correctly

Change-Id: I79e79c5df646081e7a96df82e5945b37ac663b0d
---
M classes/NewMessagesController.php
1 file changed, 7 insertions(+), 4 deletions(-)

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



diff --git a/classes/NewMessagesController.php 
b/classes/NewMessagesController.php
index 73f2ad0..732c069 100644
--- a/classes/NewMessagesController.php
+++ b/classes/NewMessagesController.php
@@ -204,11 +204,14 @@
NewMessages::recacheMessageCount( $row->wl_user 
);
}
 
-   $wantsTalkNotification = true;
+   global $wgHiddenPrefs;
+   if ( !in_array( 'lqtnotifytalk', $wgHiddenPrefs ) && 
isset( $row->up_value ) ) {
+   $wantsTalkNotification = (bool) $row->wl_user;
+   } else {
+   $wantsTalkNotification = 
User::getDefaultOption( 'lqtnotifytalk' );
+   }
 
-   $wantsTalkNotification = $wantsTalkNotification && 
User::getDefaultOption( 'lqtnotifytalk' );
-
-   if ( $wantsTalkNotification || $row->up_value ) {
+   if ( $wantsTalkNotification ) {
$notifyUsers[] = $row->wl_user;
}
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I79e79c5df646081e7a96df82e5945b37ac663b0d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 37562) Fix order of checking for non-existent lqt_oldids - change (mediawiki...LiquidThreads)

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

Change subject: (bug 37562) Fix order of checking for non-existent lqt_oldids
..


(bug 37562) Fix order of checking for non-existent lqt_oldids

Change-Id: I26a77bd7d1c8973059ff4f3cdf353b412f2ae30a
---
M pages/ThreadHistoricalRevisionView.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/pages/ThreadHistoricalRevisionView.php 
b/pages/ThreadHistoricalRevisionView.php
index 98f54c6..5f57062 100644
--- a/pages/ThreadHistoricalRevisionView.php
+++ b/pages/ThreadHistoricalRevisionView.php
@@ -105,13 +105,13 @@
 
$oldid = $this->request->getInt( 'lqt_oldid' );
$this->mDisplayRevision = ThreadRevision::loadFromId( $oldid );
-
-   $this->thread = $this->mDisplayRevision->getThreadObj();
-
if ( !$this->mDisplayRevision ) {
$this->showMissingThreadPage();
return false;
-   } elseif ( !$this->thread ) {
+   }
+
+   $this->thread = $this->mDisplayRevision->getThreadObj();
+   if ( !$this->thread ) {
$this->output->addWikiMsg( 
'lqt-historicalrevision-error' );
return false;
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I26a77bd7d1c8973059ff4f3cdf353b412f2ae30a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 25309) Change sort order submit button to use it's own ... - change (mediawiki...LiquidThreads)

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

Change subject: (bug 25309) Change sort order submit button to use it's own 
message instead of 'go'
..


(bug 25309) Change sort order submit button to use it's own message instead of 
'go'

Change-Id: I31364dca5acdf43470d327df34d25224a7bbe557
---
M i18n/Lqt.i18n.php
M pages/TalkpageView.php
2 files changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Helder.wiki: Looks good to me, but someone else must approve
  Siebrand: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php
index ab09559..c09f9ab 100644
--- a/i18n/Lqt.i18n.php
+++ b/i18n/Lqt.i18n.php
@@ -164,6 +164,8 @@
'lqt-newmessages-from' => 'From $1',
'lqt-hot-topics' => 'Hot topics',
'lqt-add-reply' => 'Add a reply',
+   // Thread sort button
+   'lqt-changesortorder' => 'Sort',
 
// Recent changes display
'lqt_rc_new_discussion' => "posted a new thread, \"$1\"",
@@ -625,6 +627,7 @@
'lqt-reply-subpage' => 'Part of the page title when a LiquidThread 
answer is given. Should probably be translated as a noun and not as a verb.
 
 {{Identical|Reply}}',
+   'lqt-changesortorder' => 'The text of the sort button for threads. 
{{mw-msg|go}} used to be used for this.',
'nstab-thread' => 'Used as tab title of the Thread namespace.
 {{Identical|Thread}}',
'nstab-summary' => 'Used as tab title for the Summary namespace.
diff --git a/pages/TalkpageView.php b/pages/TalkpageView.php
index bd20d55..9b2857d 100644
--- a/pages/TalkpageView.php
+++ b/pages/TalkpageView.php
@@ -204,7 +204,7 @@
);
$html .= $sortOrderSelect->getHTML();
 
-   $html .= Xml::submitButton( wfMessage( 'go' )->text(), array( 
'class' => 'lqt_go_sort' ) );
+   $html .= Xml::submitButton( wfMessage( 'lqt-changesortorder' 
)->text(), array( 'class' => 'lqt_go_sort' ) );
$html .= Html::hidden( 'title', $this->title->getPrefixedText() 
);
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I31364dca5acdf43470d327df34d25224a7bbe557
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Helder.wiki 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 41185) Fix Call to a member function getPrefixedText() ... - change (mediawiki...LiquidThreads)

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

Change subject: (bug 41185) Fix Call to a member function getPrefixedText() on 
a non-object
..


(bug 41185) Fix Call to a member function getPrefixedText() on a non-object

Change-Id: I8c7bcb9c0b65f79385137d7cc598229a42330a41
---
M api/ApiFeedLQTThreads.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/api/ApiFeedLQTThreads.php b/api/ApiFeedLQTThreads.php
index 696a6ff..f72901c 100644
--- a/api/ApiFeedLQTThreads.php
+++ b/api/ApiFeedLQTThreads.php
@@ -109,11 +109,17 @@
 
foreach ( (array)$params['thread'] as $thread ) {
$t = Title::newFromText( $thread );
+   if ( !$t ) {
+   continue;
+   }
$fromPlaces[] = $t->getPrefixedText();
}
 
foreach ( (array)$params['talkpage'] as $talkpage ) {
$t = Title::newFromText( $talkpage );
+   if ( !$t ) {
+   continue;
+   }
$fromPlaces[] = $t->getPrefixedText();
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c7bcb9c0b65f79385137d7cc598229a42330a41
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 36096) Log signature changes - change (mediawiki...LiquidThreads)

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

Change subject: (bug 36096) Log signature changes
..


(bug 36096) Log signature changes

Change-Id: I6b3c5000fb71d8c8ad07b34102eebe6b518b8b69
---
M LiquidThreads.php
M classes/Thread.php
M classes/Threads.php
M i18n/Lqt.i18n.php
4 files changed, 16 insertions(+), 2 deletions(-)

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



diff --git a/LiquidThreads.php b/LiquidThreads.php
index c49ed61..4d0c33b 100644
--- a/LiquidThreads.php
+++ b/LiquidThreads.php
@@ -235,7 +235,7 @@
 $wgLogNames['liquidthreads'] = 'lqt-log-name';
 $wgLogHeaders['liquidthreads']   = 'lqt-log-header';
 
-foreach ( array( 'move', 'split', 'merge', 'subjectedit', 'resort' ) as 
$action ) {
+foreach ( array( 'move', 'split', 'merge', 'subjectedit', 'resort', 
'signatureedit' ) as $action ) {
$wgLogActionsHandlers["liquidthreads/$action"] = 
'LqtLogFormatter::formatLogEntry';
 }
 
diff --git a/classes/Thread.php b/classes/Thread.php
index 788a22a..640799b 100644
--- a/classes/Thread.php
+++ b/classes/Thread.php
@@ -173,6 +173,9 @@
}
 
$original = $this->dbVersion;
+   if ( $original->signature() != $this->signature() ) {
+   $this->logChange( Threads::CHANGE_EDITED_SIGNATURE, 
$original, null, $reason );
+   }
 
$this->modified = wfTimestampNow();
$this->updateEditedness( $change_type );
@@ -226,6 +229,10 @@
case Threads::CHANGE_ADJUSTED_SORTKEY:
$log->addEntry( 'resort', $this->title(), 
$reason,
array( $original->sortkey(), 
$this->sortkey() ) );
+   case Threads::CHANGE_EDITED_SIGNATURE:
+   $log->addEntry( 'signatureedit', 
$this->title(), $reason,
+   array( $original->signature(), 
$this->signature() ) );
+   break;
}
}
 
diff --git a/classes/Threads.php b/classes/Threads.php
index 8b7631e..f092507 100644
--- a/classes/Threads.php
+++ b/classes/Threads.php
@@ -22,6 +22,7 @@
const CHANGE_SPLIT_FROM = 12;
const CHANGE_ROOT_BLANKED = 13;
const CHANGE_ADJUSTED_SORTKEY = 14;
+   const CHANGE_EDITED_SIGNATURE = 15;
 
static $VALID_CHANGE_TYPES = array(
self::CHANGE_EDITED_SUMMARY,
@@ -39,6 +40,7 @@
self::CHANGE_SPLIT_FROM,
self::CHANGE_ROOT_BLANKED,
self::CHANGE_ADJUSTED_SORTKEY,
+   self::CHANGE_EDITED_SIGNATURE,
);
 
// Possible values of Thread->editedness.
diff --git a/i18n/Lqt.i18n.php b/i18n/Lqt.i18n.php
index ab09559..b4b7ba7 100644
--- a/i18n/Lqt.i18n.php
+++ b/i18n/Lqt.i18n.php
@@ -192,6 +192,7 @@
'lqt-log-action-merge-down' => 'merged [[$1]] to underneath [[$3]]',
'lqt-log-action-subjectedit' => 'changed the subject of [[$1]] from 
"$2" to "$3"',
'lqt-log-action-resort' => 'modified the sort order of [[$1]]. Changed 
sort key from $2 to $3',
+   'lqt-log-action-signatureedit' => 'changed the signature of [[$1]] from 
"$2" to "$3"',
 
// Preferences
'lqt-preference-notify-talk' => 'E-mail me on replies to a thread I am 
watching',
@@ -531,10 +532,14 @@
'right-lqt-merge' => '{{doc-right|lqt-merge}}',
'right-lqt-react' => '{{doc-right|lqt-react}}',
'lqt-log-name' => '{{doc-logpage}}',
-   'lqt-log-action-move' => 'Parameteres:
+   'lqt-log-action-move' => 'Parameters:
 * $1 is the link text to the topic
 * $2 is the link text to the source page the topic was moved from
 * $3 is the link text to the target page the topic was moved to',
+   'lqt-log-action-signatureedit' => 'Parameters:
+* $1 is the link text to the topic
+* $2 is the old signature text
+* $3 is the new signature text',
'lqt-preference-notify-talk' => 'This appears in 
[[Special:Preferences]]. The wording should be similar to 
{{msg-mw|tog-enotifwatchlistpages}}.',
'lqt-preference-watch-threads' => 'The wording of this message should 
be similar to {{msg-mw|tog-watchdefault}}.',
'lqt-preference-display-depth' => "Used in Special:Preferences, tab 
Threaded Discussion (where Liquid Thread extension is installed).

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b3c5000fb71d8c8ad07b34102eebe6b518b8b69
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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

[MediaWiki-commits] [Gerrit] Do not use h2 for a very very long message - change (mediawiki...ExtensionDistributor)

2013-02-24 Thread Demon (Code Review)
Demon has submitted this change and it was merged.

Change subject: Do not use h2 for a very very long message
..


Do not use h2 for a very very long message

Message 'extdist-choose-version' has 3 lines -> it is not a header
Use normal wikimessage instead

Change-Id: I5c7ddc30b8bf56fb60a3e4486b61e820c2084562
---
M SpecialExtensionDistributor.php
1 file changed, 1 insertion(+), 4 deletions(-)

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



diff --git a/SpecialExtensionDistributor.php b/SpecialExtensionDistributor.php
index 0a9ab65..ed57242 100644
--- a/SpecialExtensionDistributor.php
+++ b/SpecialExtensionDistributor.php
@@ -126,10 +126,7 @@
}
 
$out = $this->getOutput();
-   $out->wrapWikiMsg(
-   "\n$1\n",
-   array( 'extdist-choose-version', $extensionName )
-   );
+   $out->addWikiMsg( 'extdist-choose-version', $extensionName );
$out->addHTML(
Xml::openElement( 'form', array(
'action' => $this->getTitle()->getLocalUrl(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5c7ddc30b8bf56fb60a3e4486b61e820c2084562
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Demon 

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


[MediaWiki-commits] [Gerrit] Recurseively checkout submodules... - change (operations/mediawiki-config)

2013-02-24 Thread Demon (Code Review)
Demon has submitted this change and it was merged.

Change subject: Recurseively checkout submodules...
..


Recurseively checkout submodules...

Change-Id: Ie0bdfaf74e6a4d38871b50a9c71293fdd02b73cd
---
M multiversion/checkoutMediaWiki
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/multiversion/checkoutMediaWiki b/multiversion/checkoutMediaWiki
index 519c5e2..8d99d05 100755
--- a/multiversion/checkoutMediaWiki
+++ b/multiversion/checkoutMediaWiki
@@ -57,7 +57,7 @@
print "Error running git\n";
exit( 1 );
}
-   passthru( 'git submodule update --init ' . escapeshellarg( 
$destIP ), $ret );
+   passthru( 'git submodule update --init --recursive ' . 
escapeshellarg( $destIP ), $ret );
if ( $ret ) {
print "Error running git\n";
exit( 1 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie0bdfaf74e6a4d38871b50a9c71293fdd02b73cd
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Mattflaschen 
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] mw.Map: Avoid using 'undefined' to check for real existance. - change (mediawiki/core)

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

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


Change subject: mw.Map: Avoid using 'undefined' to check for real existance.
..

mw.Map: Avoid using 'undefined' to check for real existance.

Instead use hasOwnProperty or arguments.length when checking
for existance of object propertys and arguments respectively.

That way the following work as expected:

var a = new mw.Map();

a.get('constructor');
// Should be `null`
// Was `function Object() { [native code] }

a.get('something', undefined);
// Should be `undefined`
// Was `null`

Bug: 45330
Bug: 45331
Change-Id: I035e23f700e2120618ed4fbe5ce95c7f9b947e41
---
M resources/mediawiki/mediawiki.js
M tests/qunit/suites/resources/mediawiki/mediawiki.test.js
2 files changed, 45 insertions(+), 21 deletions(-)


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

diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js
index b5b42e1..59a9fb0 100644
--- a/resources/mediawiki/mediawiki.js
+++ b/resources/mediawiki/mediawiki.js
@@ -42,22 +42,22 @@
 */
get: function ( selection, fallback ) {
var results, i;
+   // If we only do this in the `return` block, it'll fail 
for the
+   // call to get() from the mutli-selection block.
+   fallback = arguments.length > 1 ? fallback : null;
 
if ( $.isArray( selection ) ) {
selection = slice.call( selection );
results = {};
-   for ( i = 0; i < selection.length; i += 1 ) {
+   for ( i = 0; i < selection.length; i++ ) {
results[selection[i]] = this.get( 
selection[i], fallback );
}
return results;
}
 
if ( typeof selection === 'string' ) {
-   if ( this.values[selection] === undefined ) {
-   if ( fallback !== undefined ) {
-   return fallback;
-   }
-   return null;
+   if ( !hasOwn.call( this.values, selection ) ) {
+   return fallback;
}
return this.values[selection];
}
@@ -86,7 +86,7 @@
}
return true;
}
-   if ( typeof selection === 'string' && value !== 
undefined ) {
+   if ( typeof selection === 'string' && arguments.length 
> 1 ) {
this.values[selection] = value;
return true;
}
@@ -103,14 +103,14 @@
var s;
 
if ( $.isArray( selection ) ) {
-   for ( s = 0; s < selection.length; s += 1 ) {
-   if ( this.values[selection[s]] === 
undefined ) {
+   for ( s = 0; s < selection.length; s++ ) {
+   if ( typeof selection[s] !== 'string' 
|| !hasOwn.call( this.values, selection[s] ) ) {
return false;
}
}
return true;
}
-   return this.values[selection] !== undefined;
+   return typeof selection === 'string' && hasOwn.call( 
this.values, selection );
}
};
 
diff --git a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js 
b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
index 9b540a8..454f51e 100644
--- a/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
+++ b/tests/qunit/suites/resources/mediawiki/mediawiki.test.js
@@ -37,10 +37,8 @@
assert.strictEqual( window.mw, window.mediaWiki, 'mw alias to 
mediaWiki' );
} );
 
-   QUnit.test( 'mw.Map', 17, function ( assert ) {
+   QUnit.test( 'mw.Map', 27, function ( assert ) {
var arry, conf, funky, globalConf, nummy, someValues;
-
-   assert.ok( mw.Map, 'mw.Map defined' );
 
conf = new mw.Map();
// Dummy variables
@@ -48,15 +46,43 @@
arry = [];
nummy = 7;
 
-   // Tests for input validation
-   assert.strictEqual( conf.get( 'inexistantKey' ), null, 'Map.get 
returns null if selection was a string and the key wa

[MediaWiki-commits] [Gerrit] Remove gaps from $wgFileExtensions array - change (mediawiki/core)

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

Change subject: Remove gaps from $wgFileExtensions array
..


Remove gaps from $wgFileExtensions array

If $wgFileExtensions contains values that are in $wgFileBlacklist,
when Setup.php uses array_diff to remove them it leaves $wgFileExtensions
as an array with nonconsecutive integer indices.

When this array is encoded by the Xml class, for use in client-side
JavaScript, the nonconsecutive indices cause it to encode it as an
Object rather than Array.  This breaks the extension processing in
UploadWizard's JS code.  To fix this, use array_values to remove the
gaps in indices.

Bug: 44776
Change-Id: I4ef7f1de90a0384800722839f3fa3a581c63bac9
---
M includes/Setup.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/Setup.php b/includes/Setup.php
index 7f4d634..0853df1 100644
--- a/includes/Setup.php
+++ b/includes/Setup.php
@@ -337,7 +337,7 @@
 }
 
 # Blacklisted file extensions shouldn't appear on the "allowed" list
-$wgFileExtensions = array_diff ( $wgFileExtensions, $wgFileBlacklist );
+$wgFileExtensions = array_values( array_diff ( $wgFileExtensions, 
$wgFileBlacklist ) );
 
 if ( $wgArticleCountMethod === null ) {
$wgArticleCountMethod = $wgUseCommaCount ? 'comma' : 'link';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ef7f1de90a0384800722839f3fa3a581c63bac9
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Worden.lee 
Gerrit-Reviewer: Demon 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Worden.lee 
Gerrit-Reviewer: jenkins-bot

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


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

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

Change subject: Proofread
..


Proofread

* proofread jQuery plugin
* Integration with message table with proofread mode and translate mode
* Messagetable takes care of dynamic loading of messages
* Integration with translate editor

Works sometimes, but more polishing in follow up commits

Change-Id: I219a29522c9184c86cce96c2391867f09546da7c
---
M Translate.php
A resources/css/ext.translate.proofread.css
A resources/images/check-hi.png
A resources/images/check.png
A resources/images/outdated.png
A resources/images/translate.png
A resources/images/uncheck-hi.png
A resources/images/uncheck.png
M resources/js/ext.translate.messagetable.js
A resources/js/ext.translate.proofread.js
M utils/TuxMessageTable.php
11 files changed, 361 insertions(+), 5 deletions(-)

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



diff --git a/Translate.php b/Translate.php
index ef502f3..6826781 100644
--- a/Translate.php
+++ b/Translate.php
@@ -241,8 +241,12 @@
'scripts' => array(
'resources/js/ext.translate.editor.js',
'resources/js/ext.translate.editor.helpers.js',
+   'resources/js/ext.translate.proofread.js',
),
-   'styles' => 'resources/css/ext.translate.editor.css',
+   'styles' => array(
+   'resources/css/ext.translate.editor.css',
+   'resources/css/ext.translate.proofread.css',
+   ),
'dependencies' => array(
'ext.translate.base',
'ext.translate.grid',
diff --git a/resources/css/ext.translate.proofread.css 
b/resources/css/ext.translate.proofread.css
new file mode 100644
index 000..3a9bfc3
--- /dev/null
+++ b/resources/css/ext.translate.proofread.css
@@ -0,0 +1,68 @@
+.tux-message-proofread {
+   height: auto;
+   min-height: 50px;
+   padding: 5px;
+   padding-bottom: 10px;
+   background-color: #FFF;
+   vertical-align: middle;
+   border-bottom: 1px solid #C9C9C9;
+}
+
+.tux-proofread-source {
+   font-size: 15px;
+}
+
+.tux-proofread-translation {
+   font-size: 16px;
+   font-weight: bold;
+}
+
+.tux-proofread-status.outdated {
+   /* @embed */
+   background: url(../images/outdated.png) left center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-status.translated {
+   /* @embed */
+   background: url(../images/translate.png) left center no-repeat;
+   height: 40px;
+}
+
+
+.tux-proofread-action {
+   /* @embed */
+   background: url(../images/uncheck.png) right center no-repeat;
+   height: 40px;
+   cursor: pointer;
+}
+
+.tux-proofread-action:hover {
+   /* @embed */
+   background: url(../images/uncheck-hi.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-action.proofread {
+   /* @embed */
+   background: url(../images/check.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-action.proofread:hover {
+   /* @embed */
+   background: url(../images/check-hi.png) right center no-repeat;
+   height: 40px;
+}
+
+.tux-proofread-edit {
+   /* @embed */
+   background-image: url(../images/label-pen.png);
+   background-image: -webkit-linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-image: -moz-linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-image: linear-gradient(transparent, transparent), 
url(../images/label-pen.svg);
+   background-repeat: no-repeat;
+   background-position: right center;
+   height: 40px;
+   cursor: pointer;
+}
diff --git a/resources/images/check-hi.png b/resources/images/check-hi.png
new file mode 100644
index 000..4fabd0d
--- /dev/null
+++ b/resources/images/check-hi.png
Binary files differ
diff --git a/resources/images/check.png b/resources/images/check.png
new file mode 100644
index 000..15546f6
--- /dev/null
+++ b/resources/images/check.png
Binary files differ
diff --git a/resources/images/outdated.png b/resources/images/outdated.png
new file mode 100644
index 000..63b7aa2
--- /dev/null
+++ b/resources/images/outdated.png
Binary files differ
diff --git a/resources/images/translate.png b/resources/images/translate.png
new file mode 100644
index 000..f15e8bf
--- /dev/null
+++ b/resources/images/translate.png
Binary files differ
diff --git a/resources/images/uncheck-hi.png b/resources/images/uncheck-hi.png
new file mode 100644
index 000..d4063a3
--- /dev/null
+++ b/resources/images/uncheck-hi.png
Binary files differ
diff --git a/resources/images/uncheck.png b/resources/images/uncheck.png
new file mode 100644
index 000..6aa5222
--- /dev/null
+++ b/resources/images/uncheck.png
Binary files differ
diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index ec3442f..9fc1308 

[MediaWiki-commits] [Gerrit] (bug 45142) dirty RTL CSS hack for Opera - change (mediawiki...UniversalLanguageSelector)

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

Change subject: (bug 45142) dirty RTL CSS hack for Opera
..


(bug 45142) dirty RTL CSS hack for Opera

For some absolutely inexplicable reason Opera confuses right and left
padding on li#pt-uls a.uls-trigger in RTL mode, causing the text to
overlap an icon. Use a CSS hack to flip the text direction for Opera
only.

Change-Id: I71c2c4cac3269551722b15c533a2d511e1b483d9
---
M resources/css/ext.uls.css
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/resources/css/ext.uls.css b/resources/css/ext.uls.css
index 564f147..9211522 100644
--- a/resources/css/ext.uls.css
+++ b/resources/css/ext.uls.css
@@ -2,6 +2,14 @@
padding-left: 30px;
 }
 
+/* Opera for some inexplicable reason confuses right and left padding with */
+/* RTL text direction here (bug 45142). x:-o-prefocus won't match anything, */
+/* but will make other browsers ignore this rule. */
+x:-o-prefocus, body.rtl li#pt-uls {
+  /* @noflip */
+  direction: ltr;
+}
+
 div#settings-block {
border-top: 1px solid #C9C9C9;
background: #f8f8f8;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I71c2c4cac3269551722b15c533a2d511e1b483d9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/UniversalLanguageSelector
Gerrit-Branch: master
Gerrit-Owner: Matmarex 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Pginer 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Proper formatting of LTR messages docs in RTL - change (mediawiki...Translate)

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

Change subject: Proper formatting of LTR messages docs in RTL
..


Proper formatting of LTR messages docs in RTL

Formatting of message documentation with RTL interface
language was somewhat broken, for example for lists.

This commit adds mw-content-ltr/rtl to the documentation
element.

Change-Id: I698e9b98168c8468bda8170fff627244ce831cc2
---
M resources/js/ext.translate.editor.helpers.js
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/resources/js/ext.translate.editor.helpers.js 
b/resources/js/ext.translate.editor.helpers.js
index b46b990..1f74da7 100644
--- a/resources/js/ext.translate.editor.helpers.js
+++ b/resources/js/ext.translate.editor.helpers.js
@@ -117,11 +117,17 @@
// lang and dir attributes.
// The message documentation is assumed to be 
written
// in the content language of the wiki.
+   // Possible classes:
+   // * mw-content-ltr
+   // * mw-content-rtl
+   // (The direction classes are needed, because 
the documentation
+   // is likely to be MediaWiki-formatted text.)
$messageDoc
.attr( {
lang: documentation.language,
dir: documentationDir
} )
+   .addClass( 'mw-content-' + 
documentationDir )
.html( documentation.html );
 
this.$editor.find( '.message-desc-editor 
textarea' )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I698e9b98168c8468bda8170fff627244ce831cc2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Use XHTML tag - change (mediawiki...Scribunto)

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

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


Change subject: Use XHTML  tag
..

Use XHTML  tag

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


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

diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php
index 565aa06..21fa27d 100644
--- a/Scribunto.i18n.php
+++ b/Scribunto.i18n.php
@@ -25,7 +25,7 @@
'scribunto-doc-subpage-name' => 'doc',
'scribunto-doc-subpage-does-not-exist' => "''Documentation for this 
module may be created at [[$1]]''",
'scribunto-doc-subpage-show' => '{{$1}}
-',
+',
'scribunto-doc-subpage-header' => "'''This is the documentation subpage 
for [[$1]]'''",
 
'scribunto-console-intro' => '* The module exports are available as the 
variable "p", including unsaved modifications.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia818d24e1070087c6571556172213307dfb9a723
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Siebrand 

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


[MediaWiki-commits] [Gerrit] Use XHTML tag - change (mediawiki...Scribunto)

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

Change subject: Use XHTML  tag
..


Use XHTML  tag

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

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



diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php
index 565aa06..21fa27d 100644
--- a/Scribunto.i18n.php
+++ b/Scribunto.i18n.php
@@ -25,7 +25,7 @@
'scribunto-doc-subpage-name' => 'doc',
'scribunto-doc-subpage-does-not-exist' => "''Documentation for this 
module may be created at [[$1]]''",
'scribunto-doc-subpage-show' => '{{$1}}
-',
+',
'scribunto-doc-subpage-header' => "'''This is the documentation subpage 
for [[$1]]'''",
 
'scribunto-console-intro' => '* The module exports are available as the 
variable "p", including unsaved modifications.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia818d24e1070087c6571556172213307dfb9a723
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] checkoutMediaWiki: Remove redundant argument to git-submodule. - change (operations/mediawiki-config)

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

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


Change subject: checkoutMediaWiki: Remove redundant argument to git-submodule.
..

checkoutMediaWiki: Remove redundant argument to git-submodule.

Follows-up Ibf7b36a5.

Change-Id: Ib857d04b6eec74fabe6038c2f4d6056fa6b12419
---
M multiversion/checkoutMediaWiki
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/multiversion/checkoutMediaWiki b/multiversion/checkoutMediaWiki
index 8d99d05..9f6c4b2 100755
--- a/multiversion/checkoutMediaWiki
+++ b/multiversion/checkoutMediaWiki
@@ -57,7 +57,7 @@
print "Error running git\n";
exit( 1 );
}
-   passthru( 'git submodule update --init --recursive ' . 
escapeshellarg( $destIP ), $ret );
+   passthru( 'git submodule update --init --recursive', $ret );
if ( $ret ) {
print "Error running git\n";
exit( 1 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib857d04b6eec74fabe6038c2f4d6056fa6b12419
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-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] Remove dead Aliases "for 1.17 wikis" from bits conf. - change (operations/apache-config)

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

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


Change subject: Remove dead Aliases "for 1.17 wikis" from bits conf.
..

Remove dead Aliases "for 1.17 wikis" from bits conf.

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


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

diff --git a/wikimedia.conf b/wikimedia.conf
index 02aeb46..3c3b6f3 100644
--- a/wikimedia.conf
+++ b/wikimedia.conf
@@ -142,9 +142,6 @@
 
php_admin_flag engine off
 
-# Aliases for 1.17 wikis
-Alias /w/extensions-1.17/ 
/usr/local/apache/common/live-1.5/extensions-1.17/
-Alias /skins-1.17/ /usr/local/apache/common/live-1.5/skins-1.17/
 
 # Used for Firefox OS web application manifest living on bits.wikimedia.org
 AddType application/x-web-app-manifest+json .webapp

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I01cd5aa14bf81f0d8883297cb5ebed2bee8e3e69
Gerrit-PatchSet: 1
Gerrit-Project: operations/apache-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] Update tags - change (translatewiki)

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

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


Change subject: Update tags
..

Update tags

Change-Id: I928eb605d5c71c52b8af2ebe8ab3158302276b33
---
M groups/EOL/EOL.yaml
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/10/50610/1

diff --git a/groups/EOL/EOL.yaml b/groups/EOL/EOL.yaml
index e0248cd..eb6190b 100644
--- a/groups/EOL/EOL.yaml
+++ b/groups/EOL/EOL.yaml
@@ -52,6 +52,9 @@
   prefix: website-
 
 TAGS:
+  optional:
+- website-forums.buttons.move_up
+- website-forums.buttons.move_down
   ignored:
 - website-date.*
 - website-datetime.*

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

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

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


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

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

Change subject: Update tags
..


Update tags

Change-Id: I928eb605d5c71c52b8af2ebe8ab3158302276b33
---
M groups/EOL/EOL.yaml
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/groups/EOL/EOL.yaml b/groups/EOL/EOL.yaml
index e0248cd..eb6190b 100644
--- a/groups/EOL/EOL.yaml
+++ b/groups/EOL/EOL.yaml
@@ -52,6 +52,9 @@
   prefix: website-
 
 TAGS:
+  optional:
+- website-forums.buttons.move_up
+- website-forums.buttons.move_down
   ignored:
 - website-date.*
 - website-datetime.*

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I928eb605d5c71c52b8af2ebe8ab3158302276b33
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Clean up old multiversion readme. - change (operations/mediawiki-config)

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

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


Change subject: Clean up old multiversion readme.
..

Clean up old multiversion readme.

Change-Id: I2bf8d2fc32ae9090b4fa449615cd6f9ac9a99ae6
---
M multiversion/README
1 file changed, 3 insertions(+), 20 deletions(-)


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

diff --git a/multiversion/README b/multiversion/README
index 8e768bd..085a8fa 100644
--- a/multiversion/README
+++ b/multiversion/README
@@ -1,20 +1,3 @@
-For project page see http://www.mediawiki.org/wiki/Heterogeneous_deployment
-
-Changes to be made for this version of Het Deploy:
-
-* Move wmf-config one level up
-* Change all references to wmf-config to have the correct value in 
LocalSettings.php
-* For all new wikis being deployed, add a 
/usr/local/apache/common/wikiversions.db
-** A helper script to do this is checked into scripts/cdbmake-12.sh
-** A sample file that contains input for cdbmake-12.sh is checked into 
scripts/wikiversions.dat.sample
-* Copy common/php-1.17/cache/trusted-xff.cdb to the new source directory
-* Apply patches to CommonSettings.php
-* In InitialiseSettings.php, make the following change:
-'wgCacheDirectory' => array(
-'default' => '/tmp/mw-cache-' . $wgVersionDirectory,
-* Create the following new symlinks:
-** /apache/common/live-1.5/extensions-
-** /apache/common/live-1.5/skins-
-
-* TODO: Maintenance script changes are not done yet. Checked in as a patch for 
now.
-
+Relevant documents:
+* https://wikitech.wikimedia.org/view/Heterogeneous_deployment
+* https://www.mediawiki.org/wiki/Heterogeneous_deployment

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2bf8d2fc32ae9090b4fa449615cd6f9ac9a99ae6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-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] Clean up common/README. - change (operations/mediawiki-config)

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

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


Change subject: Clean up common/README.
..

Clean up common/README.

live-1.5 is not the docroot, but the "w/"" directory therein.

Change-Id: I9498e470231396ea688d6cc78ebf2f4b07e8a195
---
M README
1 file changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/README b/README
index 49d9642..e4a9c9e 100644
--- a/README
+++ b/README
@@ -19,10 +19,10 @@
  The Apache document root for several of our VirtualHosts.
 
 images/
- Shared pictures for the unified login system
+ Shared pictures for the unified login system.
 
 live-1.5/
- The docroot for any wiki.
+ The "w/" directory in the docroot of any mediawiki-serving VirtualHost.
 
 tests/
  Hold some PHPUnit tests.
@@ -33,16 +33,16 @@
 
 wmf-config/CommonSettings.php
  Generic configuration such as including extensions or calling over piece
-of configuration. This is mostly shared among all wikis.
+ of configuration. This is mostly shared among all wikis.
 
 wmf-config/InitialiseSettings.php
  Per wiki configuration.
 
 wmf-config/db.php
- Databases related configuration
+ Databases related configuration.
 
 wmf-config/mc.php
- Memcached configuration
+ Memcached configuration.
 
 wmf-config/*-labs.php
  Files used by the beta cluster to override production settings.
@@ -68,7 +68,7 @@
  The call to getRealmSpecificFilename( 'mc.php' ) will return:
 
   - on pmtpa: mc-pmtpa.php
-  - on any other datacenter (ex: eqiad): mc.php
+  - on any other datacenter (e.g. eqiad): mc.php
 
 
 Example per realm with a non php file extension:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9498e470231396ea688d6cc78ebf2f4b07e8a195
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-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] Disable a MediaWiki extension for Wikia - change (translatewiki)

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

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


Change subject: Disable a MediaWiki extension for Wikia
..

Disable a MediaWiki extension for Wikia

Change-Id: Ief0dce9c4d3f104212028aeb046e30cbc85f5f74
---
M groups/Wikia/extensions.txt
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/13/50613/1

diff --git a/groups/Wikia/extensions.txt b/groups/Wikia/extensions.txt
index 30fe1e7..5335237 100644
--- a/groups/Wikia/extensions.txt
+++ b/groups/Wikia/extensions.txt
@@ -81,8 +81,9 @@
 Edit Account
 file = EditAccount/SpecialEditAccount.i18n.php
 
-Edit Page Layout
-ignored = anoneditwarning-notice, longpagewarning-notice
+# Siebrand / 2013-02-24 / Disabled as announced.
+#Edit Page Layout
+#ignored = anoneditwarning-notice, longpagewarning-notice
 
 # Siebrand / 2012-08-09 / Disabled as announced.
 #Follow

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

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

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


[MediaWiki-commits] [Gerrit] Disable a MediaWiki extension for Wikia - change (translatewiki)

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

Change subject: Disable a MediaWiki extension for Wikia
..


Disable a MediaWiki extension for Wikia

Change-Id: Ief0dce9c4d3f104212028aeb046e30cbc85f5f74
---
M groups/Wikia/extensions.txt
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/groups/Wikia/extensions.txt b/groups/Wikia/extensions.txt
index 30fe1e7..5335237 100644
--- a/groups/Wikia/extensions.txt
+++ b/groups/Wikia/extensions.txt
@@ -81,8 +81,9 @@
 Edit Account
 file = EditAccount/SpecialEditAccount.i18n.php
 
-Edit Page Layout
-ignored = anoneditwarning-notice, longpagewarning-notice
+# Siebrand / 2013-02-24 / Disabled as announced.
+#Edit Page Layout
+#ignored = anoneditwarning-notice, longpagewarning-notice
 
 # Siebrand / 2012-08-09 / Disabled as announced.
 #Follow

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief0dce9c4d3f104212028aeb046e30cbc85f5f74
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (Bug 44947) Removed "requires JavaScript" from preference texts - change (mediawiki/core)

2013-02-24 Thread Rahul21 (Code Review)
Rahul21 has uploaded a new change for review.

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


Change subject: (Bug 44947) Removed "requires JavaScript" from preference texts
..

(Bug 44947) Removed "requires JavaScript" from preference texts

Change-Id: I15e34206437cd55f1033d2cf76f377a2505aaffc
---
M languages/messages/MessagesEn.php
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/14/50614/1

diff --git a/languages/messages/MessagesEn.php 
b/languages/messages/MessagesEn.php
index d3f1327..c6080c3 100644
--- a/languages/messages/MessagesEn.php
+++ b/languages/messages/MessagesEn.php
@@ -644,10 +644,10 @@
 'tog-extendwatchlist' => 'Expand watchlist to show all changes, not 
just the most recent',
 'tog-usenewrc'=> 'Group changes by page in recent changes and 
watchlist (requires JavaScript)',
 'tog-numberheadings'  => 'Auto-number headings',
-'tog-showtoolbar' => 'Show edit toolbar (requires JavaScript)',
-'tog-editondblclick'  => 'Edit pages on double click (requires 
JavaScript)',
+'tog-showtoolbar' => 'Show edit toolbar',
+'tog-editondblclick'  => 'Edit pages on double click',
 'tog-editsection' => 'Enable section editing via [edit] links',
-'tog-editsectiononrightclick' => 'Enable section editing by right clicking on 
section titles (requires JavaScript)',
+'tog-editsectiononrightclick' => 'Enable section editing by right clicking on 
section titles',
 'tog-showtoc' => 'Show table of contents (for pages with more 
than 3 headings)',
 'tog-rememberpassword'=> 'Remember my login on this browser (for a 
maximum of $1 {{PLURAL:$1|day|days}})',
 'tog-watchcreations'  => 'Add pages I create and files I upload to my 
watchlist',
@@ -668,7 +668,7 @@
 'tog-externaleditor'  => 'Use external editor by default (for experts 
only, needs special settings on your computer. 
[//www.mediawiki.org/wiki/Manual:External_editors More information.])',
 'tog-externaldiff'=> 'Use external diff by default (for experts 
only, needs special settings on your computer. 
[//www.mediawiki.org/wiki/Manual:External_editors More information.])',
 'tog-showjumplinks'   => 'Enable "jump to" accessibility links',
-'tog-uselivepreview'  => 'Use live preview (requires JavaScript) 
(experimental)',
+'tog-uselivepreview'  => 'Use live preview (experimental)',
 'tog-forceeditsummary'=> 'Prompt me when entering a blank edit 
summary',
 'tog-watchlisthideown'=> 'Hide my edits from the watchlist',
 'tog-watchlisthidebots'   => 'Hide bot edits from the watchlist',
@@ -2133,7 +2133,7 @@
 'rc-change-size'=> '$1', # only translate this message to 
other languages if you have to change it
 'rc-change-size-new'=> '$1 {{PLURAL:$1|byte|bytes}} after 
change',
 'newsectionsummary' => '/* $1 */ new section',
-'rc-enhanced-expand'=> 'Show details (requires JavaScript)',
+'rc-enhanced-expand'=> 'Show details',
 'rc-enhanced-hide'  => 'Hide details',
 'rc-old-title'  => 'originally created as "$1"',
 

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

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

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


[MediaWiki-commits] [Gerrit] Disallow translation for threelettercodes for android mobile - change (translatewiki)

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

Change subject: Disallow translation for threelettercodes for android mobile
..


Disallow translation for threelettercodes for android mobile

Change-Id: Ib34e22d5d64e7f6294dbbe6cefc85566b6e6
---
M TranslateSettings.php
A groups/Wikimedia/WikimediaMobile-android.yaml
M groups/Wikimedia/WikimediaMobile.yaml
3 files changed, 234 insertions(+), 53 deletions(-)

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

Objections:
  Yuvipanda: There's a problem with this change, please improve



diff --git a/TranslateSettings.php b/TranslateSettings.php
index d9720fc..63f7a27 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -281,6 +281,7 @@
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/jquery.uls.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikiBlame.yaml";
 $wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikimediaMobile.yaml";
+$wgTranslateGroupFiles[] = "$GROUPS/Wikimedia/WikimediaMobile-android.yaml";
 
 # No longer in use.
 wfAddNamespace( 1208, 'StatusNet' );
diff --git a/groups/Wikimedia/WikimediaMobile-android.yaml 
b/groups/Wikimedia/WikimediaMobile-android.yaml
new file mode 100644
index 000..5827cff
--- /dev/null
+++ b/groups/Wikimedia/WikimediaMobile-android.yaml
@@ -0,0 +1,233 @@
+TEMPLATE:
+  BASIC:
+description: "I'm in beta! 
"
+icon: wiki://File:Commons-icon.svg
+namespace: NS_WIKIMEDIA
+class: FileBasedMessageGroup
+
+  FILES:
+class: AndroidXmlFFS
+codeMap:
+  qqq: qq
+
+  MANGLER:
+class: StringMatcher
+patterns:
+  - "*"
+
+  LANGUAGES:
+whitelist:
+  - aa
+  - ab
+  - af
+  - ak
+  - am
+  - an
+  - ar
+  - as
+  - av
+  - ay
+  - az
+  - ba
+  - be
+  - bg
+  - bi
+  - bm
+  - bn
+  - bo
+  - br
+  - bs
+  - ca
+  - ce
+  - ch
+  - co
+  - cr
+  - cs
+  - cu
+  - cv
+  - cy
+  - da
+  - de
+  - dv
+  - dz
+  - ee
+  - el
+  - en
+  - eo
+  - es
+  - et
+  - eu
+  - fa
+  - ff
+  - fi
+  - fj
+  - fo
+  - fr
+  - fy
+  - ga
+  - gd
+  - gl
+  - gn
+  - gu
+  - gv
+  - ha
+  - he
+  - hi
+  - ho
+  - hr
+  - ht
+  - hu
+  - hy
+  - hz
+  - ia
+  - id
+  - ie
+  - ig
+  - ii
+  - ik
+  - io
+  - is
+  - iu
+  - ja
+  - jv
+  - ka
+  - kg
+  - ki
+  - kj
+  - kk
+  - kl
+  - km
+  - kn
+  - ko
+  - kr
+  - ks
+  - ku
+  - kv
+  - kw
+  - ky
+  - la
+  - lb
+  - lg
+  - li
+  - ln
+  - lo
+  - lt
+  - lv
+  - mg
+  - mh
+  - mi
+  - mk
+  - ml
+  - mn
+  - mo
+  - mr
+  - ms
+  - mt
+  - my
+  - na
+  - nb
+  - ne
+  - ng
+  - nl
+  - nn
+  - nv
+  - ny
+  - oc
+  - om
+  - or
+  - os
+  - pa
+  - pi
+  - pl
+  - ps
+  - pt
+  - qqq
+  - qu
+  - rm
+  - rn
+  - ro
+  - ru
+  - rw
+  - sa
+  - sc
+  - sd
+  - se
+  - sg
+  - sh
+  - si
+  - sk
+  - sl
+  - sm
+  - sn
+  - so
+  - sq
+  - sr
+  - ss
+  - st
+  - su
+  - sv
+  - sw
+  - ta
+  - te
+  - tg
+  - th
+  - ti
+  - tk
+  - tl
+  - tn
+  - to
+  - tr
+  - ts
+  - tt
+  - tw
+  - ty
+  - ug
+  - uk
+  - ur
+  - uz
+  - ve
+  - vi
+  - vo
+  - wa
+  - wo
+  - xh
+  - yi
+  - yo
+  - za
+  - zh
+  - zu
+---
+BASIC:
+  id: out-wikimedia-mobile-commons-android-0-all
+  label: Commons Mobile App
+  meta: yes
+  class: AggregateMessageGroup
+
+GROUPS:
+  - out-wikimedia-mobile-commons-android-*
+
+---
+BASIC:
+  id: out-wikimedia-mobile-commons-android-strings
+  label: Commons Android Mobile (main)
+
+MANGLER:
+  prefix: commons-android-strings-
+
+FILES:
+  sourcePattern: 
%GROUPROOT%/commons-android/commons/res/values-%CODE%/strings.xml
+  definitionFile: %GROUPROOT%/commons-android/commons/res/values/strings.xml
+  targetPattern: commons-android/commons/res/values-%CODE%/strings.xml
+
+---
+BASIC:
+  id: out-wikimedia-mobile-commons-android-errors
+  label: Commons Android Mobile (errors)
+
+MANGLER:
+  prefix: commons-android-error-
+
+FILES:
+  sourcePattern: 
%GROUPROOT%/commons-android/commons/res/values-%CODE%/error.xml
+  definitionFile: %GROUPROOT%/commons-android/commons/res/values/error.xml
+  targetPattern: commons-android/commons/res/values-%CODE%/error.xml
diff --git a/groups/Wikimedia/WikimediaMobile.yaml 
b/groups/Wikimedia/WikimediaMobile.yaml
index df61ad5..83cd19c 100644
--- a/groups/Wikimedia/Wikimedia

[MediaWiki-commits] [Gerrit] SMWSQLStore2 is no more. - change (translatewiki)

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

Change subject: SMWSQLStore2 is no more.
..


SMWSQLStore2 is no more.

Have to migrate now or wont be able to update code.

Change-Id: I75a984efbebdeb81ea466ee8a4a2da533c0cd4b7
---
M TranslatewikiSettings.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/TranslatewikiSettings.php b/TranslatewikiSettings.php
index ec8b8e6..6f95a0d 100644
--- a/TranslatewikiSettings.php
+++ b/TranslatewikiSettings.php
@@ -209,7 +209,6 @@
 // Threads
 $smwgNamespacesWithSemanticLinks[NS_LQT_THREAD] = true;
 $smwgNamespacesWithSemanticLinks[NS_LQT_SUMMARY] = true;
-$smwgDefaultStore = 'SMWSQLStore2';
 
 include_once( "$IP/extensions/SemanticForms/SemanticForms.php" );
 $sfgRedLinksCheckOnlyLocalProps = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I75a984efbebdeb81ea466ee8a4a2da533c0cd4b7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Nikerabbit 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] FUEL enabled - change (translatewiki)

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

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


Change subject: FUEL enabled
..

FUEL enabled

Change-Id: I441f425b3a1cc319673fc4ccb9cbb5c94bd75bdc
---
M TranslateSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/15/50615/1

diff --git a/TranslateSettings.php b/TranslateSettings.php
index d9720fc..c4b0a7d 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -361,6 +361,5 @@
 wfAddNamespace( 1252, 'Vicuna' );
 #$wgTranslateGroupFiles[] = "$GROUPS/Vicuna/Vicuna.yaml";
 
-# Not yet in use.
 wfAddNamespace( 1254, 'FUEL' );
-#$wgTranslateGroupFiles[] = "$GROUPS/FUEL/FUEL.yaml";
+$wgTranslateGroupFiles[] = "$GROUPS/FUEL/FUEL.yaml";

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

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

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


[MediaWiki-commits] [Gerrit] FUEL enabled - change (translatewiki)

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

Change subject: FUEL enabled
..


FUEL enabled

Change-Id: I441f425b3a1cc319673fc4ccb9cbb5c94bd75bdc
---
M TranslateSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)

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



diff --git a/TranslateSettings.php b/TranslateSettings.php
index d9720fc..c4b0a7d 100644
--- a/TranslateSettings.php
+++ b/TranslateSettings.php
@@ -361,6 +361,5 @@
 wfAddNamespace( 1252, 'Vicuna' );
 #$wgTranslateGroupFiles[] = "$GROUPS/Vicuna/Vicuna.yaml";
 
-# Not yet in use.
 wfAddNamespace( 1254, 'FUEL' );
-#$wgTranslateGroupFiles[] = "$GROUPS/FUEL/FUEL.yaml";
+$wgTranslateGroupFiles[] = "$GROUPS/FUEL/FUEL.yaml";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I441f425b3a1cc319673fc4ccb9cbb5c94bd75bdc
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...MaintenanceShell)

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

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


Change subject: Add .gitreview
..

Add .gitreview

Change-Id: I6cb49d65e07f29e636d7e43bf33084441f0cbee7
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)


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

diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..285ccae
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=mediawiki/extensions/MaintenanceShell.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cb49d65e07f29e636d7e43bf33084441f0cbee7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MaintenanceShell
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] Add .gitreview - change (mediawiki...MaintenanceShell)

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

Change subject: Add .gitreview
..


Add .gitreview

Change-Id: I6cb49d65e07f29e636d7e43bf33084441f0cbee7
---
A .gitreview
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/.gitreview b/.gitreview
new file mode 100644
index 000..285ccae
--- /dev/null
+++ b/.gitreview
@@ -0,0 +1,6 @@
+[gerrit]
+host=gerrit.wikimedia.org
+port=29418
+project=mediawiki/extensions/MaintenanceShell.git
+defaultbranch=master
+defaultrebase=0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6cb49d65e07f29e636d7e43bf33084441f0cbee7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MaintenanceShell
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] Update cache file if parserTests parser or .txt is updated (... - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Update cache file if parserTests parser or .txt is updated 
(take 2).
..

Update cache file if parserTests parser or .txt is updated (take 2).

This is a better solution than the fix already merged in
e348d00e3314d5b0ee6b7ce3d813f84baea6d594 -- it uses the existing
fileDependencies[] and CACHE mechanism of ParserTests.getTests().

Also fixes a bug where the cache file was written to the cwd, not the
__dirname directory (ie js/tests), and adds the cache file and the
parser tests to .gitignore.

Change-Id: I051349612e9a23a9aaf8a534161c80dfcae8db96
---
M .gitignore
M js/tests/parserTests.js
M js/tests/runtests.sh
3 files changed, 21 insertions(+), 20 deletions(-)


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

diff --git a/.gitignore b/.gitignore
index ea87853..f6a90b5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,3 +12,5 @@
 js/api/nohup.out
 js/api/npm-debug.log
 js/node_modules/
+js/tests/parserTests.cache
+js/tests/parserTests.txt
diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 08905d5..ce4b496 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -237,26 +237,29 @@
} catch (e) {
console.log( e );
}
+   // parser grammar is also a dependency
+   fileDependencies.push( this.testParserFileName );
+
if( !argv.cache ) {
// Cache not wanted, parse file and return object
return this.parseTestCase( testFile );
}
 
-   // Find out modification time of all files depencies and then hashes 
those
-   // as a unique value using sha1.
-   var mtimes = '';
-   fileDependencies.sort().forEach( function (file) {
-   mtimes += fs.statSync( file ).mtime;
-   });
+   // Find out modification time of all files dependencies and then hash 
those
+   // to make a unique value using sha1.
+   var mtimes = fileDependencies.sort().map( function (file) {
+   return fs.statSync( file ).mtime;
+   }).join('|');
 
var sha1 = require('crypto').createHash('sha1')
.update( mtimes ).digest( 'hex' ),
+   cache_file_name= __dirname + '/' + this.cache_file,
// Look for a cache_file
cache_content,
cache_file_digest;
try {
console.log( "Looking for cache file " + this.cache_file );
-   cache_content = fs.readFileSync( this.cache_file, 'utf8' );
+   cache_content = fs.readFileSync( cache_file_name, 'utf8' );
// Fetch previous digest
cache_file_digest = cache_content.match( /^CACHE: (\w+)\n/ )[1];
} catch( e4 ) {
@@ -265,16 +268,16 @@
 
if( cache_file_digest === sha1 ) {
// cache file match our digest.
-   console.log( "Loaded tests cases from cache file" );
+   console.log( "Loaded test cases from cache file" );
// Return contained object after removing first line (CACHE: 
)
return JSON.parse( cache_content.replace( /.*\n/, '' ) );
} else {
// Write new file cache, content preprended with current digest
-   console.log( "Cache file either inexistant or outdated" );
+   console.log( "Cache file either not present or outdated" );
var parse = this.parseTestCase( testFile );
if ( parse !== undefined ) {
console.log( "Writing parse result to " + 
this.cache_file );
-   fs.writeFileSync( this.cache_file,
+   fs.writeFileSync( cache_file_name,
"CACHE: " + sha1 + "\n" + JSON.stringify( parse 
),
'utf8'
);
@@ -1045,7 +1048,8 @@
}
 
try {
-   this.testParser = PEG.buildParser( fs.readFileSync( __dirname + 
'/parserTests.pegjs', 'utf8' ) );
+   this.testParserFileName = __dirname + '/parserTests.pegjs';
+   this.testParser = PEG.buildParser( fs.readFileSync( 
this.testParserFileName, 'utf8' ) );
} catch ( e2 ) {
console.log( e2 );
}
diff --git a/js/tests/runtests.sh b/js/tests/runtests.sh
index 158b16f..7fcee7b 100755
--- a/js/tests/runtests.sh
+++ b/js/tests/runtests.sh
@@ -27,30 +27,25 @@
 fi
 
 node=` ( nodejs --version > /dev/null 2>&1 && echo 'nodejs' ) || echo 'node' `
-cache=--cache
-if [ parserTests.pegjs -nt parserTests.cache -o \
- parserTests.txt -nt parserTests.cache ]; then
-  cache=
-fi
 
 if [ "$1" = "--wt2wt" ];then
OUTPUT="results/roundtrip.txt"
-time $node parserTests.js $cache --wt2wt \
+time $node parserTests.js --cache --wt2wt \
 > $OUTPUT 2>&1
  

[MediaWiki-commits] [Gerrit] Parse "options" sections in parserTests.txt test cases (take... - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Parse "options" sections in parserTests.txt test cases (take 2).
..

Parse "options" sections in parserTests.txt test cases (take 2).

Improvement to already-merged 0110b0b46b3d150032fdcebf8a12fe2c776522d8.
This grammar matches more closely the grammar found in the PHP test parser
at tests/parser/parserTest.inc:parseOptions() and handles value lists
and the newly-added "parsoid" simple option.  (The latter by replacing
the hard-coded list of simple options with a more flexible parser.)

Change-Id: Ic449411afd8f5906dd140b0020b52b49fe1b44c7
---
M js/tests/parserTests.js
M js/tests/parserTests.pegjs
2 files changed, 54 insertions(+), 17 deletions(-)


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

diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index ce4b496..7d3b5d1 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -93,9 +93,20 @@
 
 var prettyPrintIOptions = function(iopts) {
if (!iopts) { return ''; }
+   var ppValue = function(v) {
+   if ($.isArray(v)) {
+   return v.map(ppValue).join(',');
+   }
+   if (/^\[\[[^\]]*\]\]$/.test(v) ||
+   /^[-\w]+$/.test(v)) {
+   return v;
+   }
+   console.assert(v.indexOf('"') < 0);
+   return '"'+v+'"';
+   };
return Object.keys(iopts).map(function(k) {
if (iopts[k]==='') { return k; }
-   return k+'='+iopts[k];
+   return k+'='+ppValue(iopts[k]);
}).join(' ');
 };
 
diff --git a/js/tests/parserTests.pegjs b/js/tests/parserTests.pegjs
index bcf8f08..1135217 100644
--- a/js/tests/parserTests.pegjs
+++ b/js/tests/parserTests.pegjs
@@ -149,26 +149,52 @@
 return result;
 }
 
-an_option = simple_option / prefix_option
-
-simple_option = k:("pst"i / "msg"i / "cat"i / "ill"i / "subpage"i /
-   "noxml"i / "disabled"i / "showtitle"i / "comment"i /
-   "local"i / "rawhtml"i / "preload"i )
+// from PHP parser in tests/parser/parserTest.inc:parseOptions()
+//   foo
+//   foo=bar
+//   foo="bar baz"
+//   foo=[[bar baz]]
+//   foo=bar,"baz quux",[[bat]]
+an_option = k:option_name v:option_value?
 {
-return {k:k.toLowerCase()};
-}
-prefix_option = title_option / nospace_prefix_option
-
-nospace_prefix_option = k:(c:[^ \t\n=]+ { return c.join(''); }) ws? "=" ws?
-  v:(c:[^ \t\n]+ { return c.join(''); })
-{
-return {k:k, v:v};
+return {k:k.toLowerCase(), v:(v||'')};
 }
 
-title_option = k:"title" ws? "=" ws?
-   v:("[[" (c:[^\]]+ { return c.join(''); }) "]]")
+option_name = c:[^ \t\n=!]+
 {
-return {k:k, v:"[["+v+"]]"};
+return c.join('');
+}
+
+option_value = ws? "=" ws? ovl:option_value_list
+{
+return (ovl.length===1) ? ovl[0] : ovl;
+}
+
+option_value_list = v:an_option_value
+rest:( ws? "," ws? ovl:option_value_list {return ovl; })?
+{
+var result = [ v ];
+if (rest && rest.length) {
+result.push.apply(result, rest);
+}
+return result;
+}
+
+an_option_value = link_target_value / quoted_value / plain_value
+
+link_target_value = v:("[[" (c:[^\]]* { return c.join(''); }) "]]")
+{
+return v.join('');
+}
+
+quoted_value = [\"] v:[^\"]* [\"]
+{
+return v.join('');
+}
+
+plain_value = v:[^ \t\n\"\'\[\]=,!]+
+{
+return v.join('');
 }
 
 /* the : is for a stray one, not sure it should be there */

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic449411afd8f5906dd140b0020b52b49fe1b44c7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] User-friendly boolean options for parserTests.js. - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: User-friendly boolean options for parserTests.js.
..

User-friendly boolean options for parserTests.js.

Allow --debug=no and --debug=false to mean the same thing as --no-debug.
This saves some hair (why doesn't "--use_source=false" do anything?).

(I'd actually expect the 'optimist' package to do this for us when we
specify that an option is a boolean option... but sigh.)

Change-Id: Icd89a0fb59e3a19cf88b49e24b67eaebf3eaadea
---
M js/tests/parserTests.js
1 file changed, 28 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/19/50619/1

diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 7d3b5d1..4b02bd5 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -110,6 +110,17 @@
}).join(' ');
 };
 
+// user-friendly 'boolean' command-line options:
+// allow --debug=no and --debug=false to mean the same as --no-debug
+var booleanOption = function ( val ) {
+   if ( !val ) { return false; }
+   if ( (typeof val) === 'string' &&
+/^(no|false)$/i.test(val)) {
+   return false;
+   }
+   return true;
+};
+
 /**
  * Get the options from the command line.
  */
@@ -225,7 +236,7 @@
},
xml: {
description: 'Print output in JUnit XML format.',
-   default: false,
+   'default': false,
'boolean': true
}
}).check( function(argv) {
@@ -251,7 +262,7 @@
// parser grammar is also a dependency
fileDependencies.push( this.testParserFileName );
 
-   if( !argv.cache ) {
+   if( !booleanOption(argv.cache) ) {
// Cache not wanted, parse file and return object
return this.parseTestCase( testFile );
}
@@ -339,7 +350,7 @@
// so we don't try to regenerate the changes.
item.changes = 0;
}
-   } else if (options.use_source && startsAtWikitext ) {
+   } else if (booleanOption(options.use_source) && 
startsAtWikitext ) {
this.env.page.src = item.input;
} else {
this.env.page.src = null;
@@ -725,9 +736,9 @@
console.log( 'INPUT'.cyan + ':' );
console.log( actual.input + '\n' );
 
-   console.log( options.getActualExpected( actual, expected, 
options.getDiff, options.color ) );
+   console.log( options.getActualExpected( actual, expected, 
options.getDiff, booleanOption( options.color ) ) );
 
-   if ( options.printwhitelist ) {
+   if ( booleanOption( options.printwhitelist )  ) {
this.printWhitelistEntry( title, actual.raw );
}
} else if ( !failure_only && error ) {
@@ -844,25 +855,27 @@
  * @arg mode {string} The mode we're in (wt2wt, wt2html, html2wt, or html2html)
  */
 ParserTests.prototype.printResult = function ( title, time, comments, iopts, 
expected, actual, options, mode, item ) {
+   var quick = booleanOption( options.quick );
+   var quiet = booleanOption( options.quiet );
if ( mode === 'selser' ) {
title += ' ' + JSON.stringify( item.changes );
}
 
if ( expected.normal !== actual.normal ) {
-   if ( options.whitelist && title in testWhiteList &&
+   if ( booleanOption( options.whitelist ) && title in 
testWhiteList &&
Util.normalizeOut( testWhiteList[title] ) ===  
actual.normal ) {
-   options.reportSuccess( title, mode, true, options.quiet 
);
+   options.reportSuccess( title, mode, true, quiet );
return;
}
 
item.wt2wtResult = actual.raw;
 
-   options.reportFailure( title, comments, iopts, options, actual, 
expected, options.quick, mode, null, item );
+   options.reportFailure( title, comments, iopts, options, actual, 
expected, quick, mode, null, item );
} else {
if ( mode === 'wt2wt' ) {
item.wt2wtPassed = true;
}
-   options.reportSuccess( title, mode, false, options.quiet );
+   options.reportSuccess( title, mode, false, quiet );
}
 };
 
@@ -1047,7 +1060,7 @@
}
console.log( 'Filtering title test using Regexp ' + 
this.test_filter );
}
-   if( !options.color ) {
+   if( !booleanOption( options.color ) ) {
colors.mode = 'none';
}
 
@@ -1402,6 +1415,8 @@
 */
reportResultXML = function ( title, time, comments, iopts,

[MediaWiki-commits] [Gerrit] Add --run-disabled and --run-php options. - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Add --run-disabled and --run-php options.
..

Add --run-disabled and --run-php options.

These parallel the --run-disabled and --run-parsoid options for the
PHP parser tests (see https://gerrit.wikimedia.org/r/50476 ).

At the moment --run-disabled is true by default (so use --run-disabled=no
or --no-run-disabled to turn it off) because many parsoid-specific tests
are still marked with the 'disabled' option.  Once those are all switched
over to using the 'parsoid' options, the default for --run-disabled should
switch to false.

The test-running logic for parsoid's parserTests now matches the
PHP parserTests logic (see tests/testHelpers.inc in the above change set).

Change-Id: Ia2dc633cf49e6daec59662901ed65731efb8a064
---
M js/tests/parserTests.js
1 file changed, 19 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/20/50620/1

diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index 4b02bd5..fd9fbfe 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -185,8 +185,16 @@
description: 'Only run tests whose descriptions which 
match given regex',
alias: 'regex'
},
-   'disabled': {
-   description: 'Run disabled tests (option not 
implemented)',
+   'run-disabled': {
+   description: 'Run disabled tests',
+   // this defaults to true because historically 
parsoid-only tests
+   // were marked as 'disabled'.  Once these are all 
changed to
+   // 'parsoid', this default should be changed to false.
+   'default': true,
+   'boolean': true
+   },
+   'run-php': {
+   description: 'Run php-only tests',
'default': false,
'boolean': true
},
@@ -1049,6 +1057,9 @@
options.getActualExpected = this.getActualExpected.bind( this );
}
 
+   // test case filtering
+   this.runDisabled = booleanOption(options['run-disabled']);
+   this.runPHP = booleanOption(options['run-php']);
this.test_filter = null;
if ( options.filter ) { // null is the 'default' by definition
try {
@@ -1199,6 +1210,7 @@
 
if ( i < this.cases.length ) {
item = this.cases[i];
+   if (!item.options) { item.options = {}; }
// Reset the cached results for the new case.
// All test modes happen in a single run of processCase.
item.cachedHTML = null;
@@ -1213,9 +1225,12 @@
this.processArticle( item, nextCallback 
);
break;
case 'test':
-   if( this.test_filter &&
-   -1 === item.title.search( 
this.test_filter ) ) {
+   if( ('disabled' in item.options 
&& !this.runDisabled) ||
+   ('php' in item.options && 
!this.runPHP) ||
+   (this.test_filter &&
+-1 === item.title.search( 
this.test_filter ) ) ) {
// Skip test whose title does 
not match --filter
+   // or which is disabled or 
php-only
process.nextTick( nextCallback 
);
break;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2dc633cf49e6daec59662901ed65731efb8a064
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Fixes to WikiConfig: don't alias namespaces, magic words, etc. - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Fixes to WikiConfig: don't alias namespaces, magic words, etc.
..

Fixes to WikiConfig: don't alias namespaces, magic words, etc.

By mutating {} and [] assigned to WikiConfig.prototype, all languages were
effectively sharing the same namespaceNames, namespaceIds, magicWords, etc.
Create these hashes and arrays in the constructor instead so they are
unique per-instance.

Change-Id: Idef86eae95c21d694ac02e519ed16b6596386350
---
M js/lib/mediawiki.WikiConfig.js
1 file changed, 24 insertions(+), 13 deletions(-)


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

diff --git a/js/lib/mediawiki.WikiConfig.js b/js/lib/mediawiki.WikiConfig.js
index e84338f..ec25cb8 100644
--- a/js/lib/mediawiki.WikiConfig.js
+++ b/js/lib/mediawiki.WikiConfig.js
@@ -10,6 +10,7 @@
 
 var WikiConfig = function ( resultConf, prefix, uri ) {
var nsid, name, conf = this;
+   this._init(); // initialize hashes/arrays/etc.
 
conf.iwp = prefix;
 
@@ -76,12 +77,6 @@
var mws = resultConf.magicwords;
var mw, replaceRegex = /\$1/;
var namedMagicOptions = [];
-   if ( mws.length > 0 ) {
-   // Don't use the default if we get a result.
-   conf.magicWords = {};
-   conf.mwAliases = {};
-   conf.interpolatedList = [];
-   }
for ( var mwx = 0; mwx < mws.length; mwx++ ) {
mw = mws[mwx];
aliases = mw.aliases;
@@ -191,13 +186,28 @@
category: 14,
category_talk: 15
},
-   namespaceNames: {},
-   namespaceIds: {},
-   magicWords: {},
-   mwAliases: {},
-   specialPages: {},
-   extensionTags: {},
-   interpolatedList: [],
+   namespaceNames: null,
+   namespaceIds: null,
+   magicWords: null,
+   mwAliases: null,
+   specialPages: null,
+   extensionTags: null,
+   interpolatedList: null,
+
+   _init: function() {
+   // give the instance its own hashes/arrays so they
+   // don't get aliased.
+   this.namespaceNames = {};
+   this.namespaceIds = {};
+   this.magicWords = {};
+   this.mwAliases = {};
+   this.specialPages = {};
+   this.extensionTags = {};
+   this.interpolatedList = [];
+   // clone the canonicalNamespace list
+   this.canonicalNamespaces =
+   Object.create(WikiConfig.prototype.canonicalNamespaces);
+   },
 
getMagicWord: function ( alias ) {
return this.magicWords[alias] || null;
@@ -254,6 +264,7 @@
return alias.replace( /\$1/, value );
}
 };
+Object.freeze(WikiConfig.prototype.canonicalNamespaces);
 
 if ( typeof module === 'object' ) {
module.exports.WikiConfig = WikiConfig;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idef86eae95c21d694ac02e519ed16b6596386350
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Honor language=xx option in parserTests.txt (for wt2html). - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Honor language=xx option in parserTests.txt (for wt2html).
..

Honor language=xx option in parserTests.txt (for wt2html).

This patch implements the language=xx option in parserTests for
wt2html.  This exposes some failures in l10n.  In particular, the
tests are now run in the 'en' prefix by default (as thay are in the
PHP parser tests), and the 'en' prefix currently has some issues with
linktrail and linkprefix.  A bug in the WikitextSerializer is also
exposed in the "Simple category in language variants" test case, which
doesn't properly normalize the category link name when the locale is
set.

Change-Id: Ibb925ecdfe848b43e46ff97b29c5bddcdb02e9c8
---
M js/tests/parserTests.js
1 file changed, 23 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Parsoid 
refs/changes/22/50622/1

diff --git a/js/tests/parserTests.js b/js/tests/parserTests.js
index fd9fbfe..51dcefd 100644
--- a/js/tests/parserTests.js
+++ b/js/tests/parserTests.js
@@ -515,7 +515,7 @@
cb( null, content, changelist );
 };
 
-ParserTests.prototype.convertWt2Html = function( mode, wikitext, processHtmlCB 
) {
+ParserTests.prototype.convertWt2Html = function( mode, prefix, variant, 
wikitext, processHtmlCB ) {
try {
this.parserPipeline.once( 'document', function ( doc ) {
// processHtmlCB can be asynchronous, so deep-clone
@@ -528,7 +528,24 @@
processHtmlCB( e );
}
this.env.page.src = wikitext;
-   this.parserPipeline.process( wikitext );
+   this.env.switchToConfig( prefix, function( err ) {
+   if ( err ) {
+   processHtmlCB( err );
+   } else {
+   // TODO: set language variant
+   // adjust config to match that used for PHP tests
+   this.env.conf.wiki.server = 'http://Britney-Spears';
+   this.env.conf.wiki.wgScriptPath = '/';
+   this.env.conf.wiki.script = '/index.php';
+   this.env.conf.wiki.articlePath = '/wiki/$1';
+   // this has been updated in the live wikis, but the 
parser tests
+   // expect the old value.
+   this.env.conf.wiki.interwikiMap.meatball.url =
+   'http://www.usemod.com/cgi-bin/mb.pl?$1';
+   // convert this wikitext!
+   this.parserPipeline.process( wikitext );
+   }
+   }.bind(this));
 };
 
 /**
@@ -553,6 +570,8 @@
}
 
item.time = {};
+   var prefix = (item.options || {}).language || 'en';
+   var variant = (item.options || {}).variant;
 
// Build a list of tasks for this test that will be passed to 
async.waterfall
var finishHandler = function ( err, res ) {
@@ -601,7 +620,7 @@
// First conversion stage
if ( startsAtWikitext ) {
if ( item.cachedHTML === null ) {
-   testTasks.push( this.convertWt2Html.bind( this, mode, 
item.input ) );
+   testTasks.push( this.convertWt2Html.bind( this, mode, 
prefix, variant, item.input ) );
} else {
testTasks.push( function ( cb ) {
cb( null, item.cachedHTML.cloneNode( true ) );
@@ -642,7 +661,7 @@
if ( mode === 'wt2wt' || mode === 'selser' ) {
testTasks.push( this.convertHtml2Wt.bind( this, options, mode, 
item ) );
} else if ( mode === 'html2html' ) {
-   testTasks.push( this.convertWt2Html.bind( this, mode ) );
+   testTasks.push( this.convertWt2Html.bind( this, mode, prefix, 
variant ) );
}
 
// Processing stage

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibb925ecdfe848b43e46ff97b29c5bddcdb02e9c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Fix up pf_localurl, implement pf_servername and take a stab ... - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: Fix up pf_localurl, implement pf_servername and take a stab at 
pf_server.
..

Fix up pf_localurl, implement pf_servername and take a stab at pf_server.

{{SERVER}} expanded to an external nofollow link.  So rather than literally
expanding to [], it should be thrown back into the parser to
get expanded.  Help?

Change-Id: I035bfcd84bc9f8fd7079a1179c1cc0d013ca0a88
---
M js/lib/ext.core.ParserFunctions.js
1 file changed, 9 insertions(+), 1 deletion(-)


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

diff --git a/js/lib/ext.core.ParserFunctions.js 
b/js/lib/ext.core.ParserFunctions.js
index ef3ce69..7fe3fc3 100644
--- a/js/lib/ext.core.ParserFunctions.js
+++ b/js/lib/ext.core.ParserFunctions.js
@@ -646,7 +646,7 @@
console.trace();
throw( err );
}
-   cb({ tokens: [ '/' +
+   cb({ tokens: [
// FIXME! Figure out correct prefix to 
use
//this.env.conf.wiki.wgScriptPath +
env.conf.wiki.script + '?title=' +
@@ -769,6 +769,14 @@
 ParserFunctions.prototype.pf_scriptpath = function ( token, frame, cb, args ) {
cb( { tokens: [this.env.conf.wiki.wgScriptPath] } );
 };
+ParserFunctions.prototype.pf_server = function ( token, frame, cb, args ) {
+   // XXX: I'd really like '[..]' to be expanded as a link.
+   // can anyone offer me a clue? [CSA]
+   cb( { tokens: [ '[', this.env.conf.wiki.server, ']' ] } );
+};
+ParserFunctions.prototype.pf_servername = function ( token, frame, cb, args ) {
+   cb( { tokens: [this.env.conf.wiki.server.replace(/^https?:\/\//,'')] } 
);
+};
 ParserFunctions.prototype.pf_talkpagename = function ( token, frame, cb, args 
) {
cb( { tokens: [this.env.page.name.replace(/^[^:]:/, 'Talk:' ) || ''] } 
);
 };

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I035bfcd84bc9f8fd7079a1179c1cc0d013ca0a88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] WIP: Respect $linkPrefixExtension. - change (mediawiki...Parsoid)

2013-02-24 Thread Cscott (Code Review)
Cscott has uploaded a new change for review.

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


Change subject: WIP: Respect $linkPrefixExtension.
..

WIP: Respect $linkPrefixExtension.

Setting '$linkPrefixExtension = false' in an upstream wikipedia means
that we should ignore the linkPrefixRegex, even if it is set (as is the
case for English and Russian wikipedias, among others).  A corresponding
patch to wikimedia core (https://gerrit.wikimedia.org/r/50596) exports
the value of $linkPrefixExtension as part of the general siteinfo.
Until that gets deployed, though, we'll rely on a hard-coded list of the
languages which have $linkPrefixExtension=false (including via fallback).

Change-Id: I2b912e46e3be5da7f636191751a58140cc1986a7
---
M js/lib/mediawiki.WikiConfig.js
1 file changed, 21 insertions(+), 0 deletions(-)


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

diff --git a/js/lib/mediawiki.WikiConfig.js b/js/lib/mediawiki.WikiConfig.js
index e84338f..78e84f0 100644
--- a/js/lib/mediawiki.WikiConfig.js
+++ b/js/lib/mediawiki.WikiConfig.js
@@ -161,6 +161,27 @@
this.server = general.server;
}
}
+   // use linkPrefixExtension (if present) to correct linkPrefixRegex
+   if ('linkprefixextension' in general) {
+   if (!general.linkprefixextension) {
+   conf.linkPrefixRegex = undefined;
+   }
+   } else {
+   // hack, while https://gerrit.wikimedia.org/r/50596 slowly 
works its
+   // way into deployed wikis
+   var langs = [prefix].
+   concat(general.fallback.map(function(f){ return f.code; 
}));
+   for (var i=0; ihttps://gerrit.wikimedia.org/r/50624
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b912e46e3be5da7f636191751a58140cc1986a7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: Cscott 

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


[MediaWiki-commits] [Gerrit] Remove unused message - change (mediawiki...ExtensionDistributor)

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

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


Change subject: Remove unused message
..

Remove unused message

See new bug 45336 for the need to localize new, similar strings

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


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

diff --git a/ExtensionDistributor.i18n.php b/ExtensionDistributor.i18n.php
index 6b620a9..c9c01ad 100644
--- a/ExtensionDistributor.i18n.php
+++ b/ExtensionDistributor.i18n.php
@@ -11,7 +11,6 @@
'extdist-no-such-version' => 'The extension "$1" does not exist 
in the version "$2".',
'extdist-choose-extension' => 'Select which extension you want 
to download:',
'extdist-submit-extension' => 'Continue',
-   'extdist-current-version' => 'Development version (trunk)',
'extdist-choose-version' => 'You are downloading the $1 
extension.
 
 Select your MediaWiki version.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0affbac3f19e82705b6d293178dd30e1516f5ada
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ExtensionDistributor
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] Some consistency tweaks in preparation for adding extension ... - change (mediawiki...GoogleSiteSearch)

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

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


Change subject: Some consistency tweaks in preparation for adding extension to 
Translatewiki.net
..

Some consistency tweaks in preparation for adding extension to Translatewiki.net

* Add weblink to description message
* http -> https

@Maintainer: Please add message documenation
per https://www.mediawiki.org/wiki/I18n#Message_documentation

Once done, I will add the extension to Translatewiki.net. Thanks!

Change-Id: Ibf7d66ed1b037bcacaac5cfbbf02baed2f0db5c8
---
M GoogleSiteSearch.i18n.php
M GoogleSiteSearch.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/GoogleSiteSearch.i18n.php b/GoogleSiteSearch.i18n.php
index ed1000e..f4bc3d9 100644
--- a/GoogleSiteSearch.i18n.php
+++ b/GoogleSiteSearch.i18n.php
@@ -10,7 +10,7 @@
 /** English (English) */
 $messages['en'] = array(
'googlesitesearch' => 'GoogleSiteSearch',
-   'googlesitesearch-desc' => 'Adds Google CSE site search to wiki search 
results',
+   'googlesitesearch-desc' => 'Adds [//www.google.com/cse/manage/all 
Google CSE site search] to wiki search results',
'googlesitesearch-loading' => 'Loading',
'googlesitesearch-google-results' => 'Google site results',
'googlesitesearch-wiki-results' => 'Wiki results',
diff --git a/GoogleSiteSearch.php b/GoogleSiteSearch.php
index 4b8d433..e386930 100644
--- a/GoogleSiteSearch.php
+++ b/GoogleSiteSearch.php
@@ -37,7 +37,7 @@
'path' => __FILE__,
'name' => 'GoogleSiteSearch',
'author' => 'Ryan Finnie',
-   'url' => 'http://www.mediawiki.org/wiki/Extension:GoogleSiteSearch',
+   'url' => 'https://www.mediawiki.org/wiki/Extension:GoogleSiteSearch',
'descriptionmsg' => 'googlesitesearch-desc',
'version' => '2.0',
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf7d66ed1b037bcacaac5cfbbf02baed2f0db5c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleSiteSearch
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 

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


[MediaWiki-commits] [Gerrit] Add MessageReporter since core CR is slow as usual - change (mediawiki...Wikibase)

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

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


Change subject: Add MessageReporter since core CR is slow as usual
..

Add MessageReporter since core CR is slow as usual

Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f0
---
M repo/config/Wikibase.experimental.php
A repo/includes/MessageReporter.php
2 files changed, 132 insertions(+), 0 deletions(-)


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

diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index bb3a70c..e2c7650 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -45,6 +45,13 @@
 $wgAutoloadClasses['Wikibase\QueryContent']= $dir . 
'includes/content/QueryContent.php';
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
+
+if ( !class_exists( 'MessageReporter' ) ) {
+   $wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
+   $wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
+}
+
+
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Repo\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Repo\Api\SetQualifier';
 $wgAPIModules['wbsetstatementrank']= 
'Wikibase\Api\SetStatementRank';
diff --git a/repo/includes/MessageReporter.php 
b/repo/includes/MessageReporter.php
new file mode 100644
index 000..fd13294
--- /dev/null
+++ b/repo/includes/MessageReporter.php
@@ -0,0 +1,125 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+interface MessageReporter {
+
+   /**
+* Report the provided message.
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message );
+
+}
+
+/**
+ * Message reporter that reports messages by passing them along to all
+ * registered handlers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class ObservableMessageReporter implements MessageReporter {
+
+   /**
+* @since 1.21
+*
+* @var MessageReporter[]
+*/
+   protected $reporters = array();
+
+   /**
+* @since 1.21
+*
+* @var callable[]
+*/
+   protected $callbacks = array();
+
+   /**
+* @see MessageReporter::report
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message ) {
+   foreach ( $this->reporters as $reporter ) {
+   $reporter->reportMessage( $message );
+   }
+
+   foreach ( $this->callbacks as $callback ) {
+   call_user_func( $callback, $message );
+   }
+   }
+
+   /**
+* Register a new message reporter.
+*
+* @since 1.21
+*
+* @param MessageReporter $reporter
+*/
+   public function registerMessageReporter( MessageReporter $reporter ) {
+   $this->reporters[] = $reporter;
+   }
+
+   /**
+* Register a callback as message reporter.
+*
+* @since 1.21
+*
+* @param callable $handler
+*/
+   public function registerReporterCallback( $handler ) {
+   $this->callbacks[] = $handler;
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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

[MediaWiki-commits] [Gerrit] Registered Wikibase\Repo\Database classes and added test for... - change (mediawiki...Wikibase)

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

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


Change subject: Registered Wikibase\Repo\Database classes and added test for 
FieldDefinition
..

Registered Wikibase\Repo\Database classes and added test for FieldDefinition

Change-Id: I97f40f5b51f6a39e9deaa286b5fdcd4f9b7498a6
---
M repo/Wikibase.hooks.php
M repo/config/Wikibase.experimental.php
M repo/includes/Database/FieldDefinition.php
M repo/includes/Query/SQLStore/Setup.php
A repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
5 files changed, 133 insertions(+), 3 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index c1c7b88..002f238 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -185,6 +185,8 @@
'content/PropertyContent',
'content/PropertyHandler',
 
+   'Database/FieldDefinition',
+
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index e2c7650..57d6fb5 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -46,6 +46,18 @@
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
 
+
+foreach ( array(
+ 'Wikibase\Repo\Database\FieldDefinition',
+ 'Wikibase\Repo\Database\MediaWikiQueryInterface',
+ 'Wikibase\Repo\Database\QueryInterface',
+ 'Wikibase\Repo\Database\TableBuilder',
+ 'Wikibase\Repo\Database\TableDefinition',
+ ) as $class ) {
+
+   $wgAutoloadClasses[$class] = $dir . 'includes' . str_replace( '\\', 
'/', substr( $class, 13 ) ) . '.php';
+}
+
 if ( !class_exists( 'MessageReporter' ) ) {
$wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
$wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
diff --git a/repo/includes/Database/FieldDefinition.php 
b/repo/includes/Database/FieldDefinition.php
index 9672d3d..01f3024 100644
--- a/repo/includes/Database/FieldDefinition.php
+++ b/repo/includes/Database/FieldDefinition.php
@@ -70,7 +70,7 @@
/**
 * @since 0.4
 *
-* @var string
+* @var string|null
 */
private $index;
 
@@ -96,7 +96,7 @@
 * @param mixed $default
 * @param string|null $attributes
 * @param boolean $null
-* @param string $index
+* @param string|null $index
 * @param boolean $autoIncrement
 *
 * @throws InvalidArgumentException
@@ -114,7 +114,7 @@
throw new InvalidArgumentException( 'The $null 
parameter needs to be a boolean' );
}
 
-   if ( !is_string( $autoIncrement ) ) {
+   if ( !is_null( $index ) && !is_string( $index ) ) {
throw new InvalidArgumentException( 'The $index 
parameter needs to be a string' );
}
 
diff --git a/repo/includes/Query/SQLStore/Setup.php 
b/repo/includes/Query/SQLStore/Setup.php
index 174595e..489026c 100644
--- a/repo/includes/Query/SQLStore/Setup.php
+++ b/repo/includes/Query/SQLStore/Setup.php
@@ -29,6 +29,7 @@
 *
 * @param Store $sqlStore
 * @param TableBuilder $tableBuilder
+* @param MessageReporter|null $messageReporter
 */
public function __construct( Store $sqlStore, TableBuilder 
$tableBuilder, MessageReporter $messageReporter = null ) {
$this->store = $sqlStore;
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
new file mode 100644
index 000..29943f8
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -0,0 +1,115 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class FieldDefinitionTest extends \MediaWikiTestCase {
+
+   public function instanceProvider() {
+   $instances = array();
+
+   $instances[] = new FieldDefinition(
+   'names',
+   FieldDefinition::TYPE_TEXT
+   );
+
+   $instances[] = new FieldDefinition(
+   'numbers',
+   FieldDefinition::TYPE_FLOAT
+   );
+
+  

[MediaWiki-commits] [Gerrit] Add MessageReporter since core CR is slow as usual - change (mediawiki...Wikibase)

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

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


Change subject: Add MessageReporter since core CR is slow as usual
..

Add MessageReporter since core CR is slow as usual

Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f1
---
M repo/config/Wikibase.experimental.php
A repo/includes/MessageReporter.php
2 files changed, 132 insertions(+), 0 deletions(-)


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

diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index bb3a70c..e2c7650 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -45,6 +45,13 @@
 $wgAutoloadClasses['Wikibase\QueryContent']= $dir . 
'includes/content/QueryContent.php';
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
+
+if ( !class_exists( 'MessageReporter' ) ) {
+   $wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
+   $wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
+}
+
+
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Repo\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Repo\Api\SetQualifier';
 $wgAPIModules['wbsetstatementrank']= 
'Wikibase\Api\SetStatementRank';
diff --git a/repo/includes/MessageReporter.php 
b/repo/includes/MessageReporter.php
new file mode 100644
index 000..fd13294
--- /dev/null
+++ b/repo/includes/MessageReporter.php
@@ -0,0 +1,125 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+interface MessageReporter {
+
+   /**
+* Report the provided message.
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message );
+
+}
+
+/**
+ * Message reporter that reports messages by passing them along to all
+ * registered handlers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class ObservableMessageReporter implements MessageReporter {
+
+   /**
+* @since 1.21
+*
+* @var MessageReporter[]
+*/
+   protected $reporters = array();
+
+   /**
+* @since 1.21
+*
+* @var callable[]
+*/
+   protected $callbacks = array();
+
+   /**
+* @see MessageReporter::report
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message ) {
+   foreach ( $this->reporters as $reporter ) {
+   $reporter->reportMessage( $message );
+   }
+
+   foreach ( $this->callbacks as $callback ) {
+   call_user_func( $callback, $message );
+   }
+   }
+
+   /**
+* Register a new message reporter.
+*
+* @since 1.21
+*
+* @param MessageReporter $reporter
+*/
+   public function registerMessageReporter( MessageReporter $reporter ) {
+   $this->reporters[] = $reporter;
+   }
+
+   /**
+* Register a callback as message reporter.
+*
+* @since 1.21
+*
+* @param callable $handler
+*/
+   public function registerReporterCallback( $handler ) {
+   $this->callbacks[] = $handler;
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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

[MediaWiki-commits] [Gerrit] Registered Wikibase\Repo\Database classes and added test for... - change (mediawiki...Wikibase)

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

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


Change subject: Registered Wikibase\Repo\Database classes and added test for 
FieldDefinition
..

Registered Wikibase\Repo\Database classes and added test for FieldDefinition

Change-Id: I97f40f5b51f6a39e9deaa286b5fdcd4f9b7498a7
---
M repo/Wikibase.hooks.php
M repo/config/Wikibase.experimental.php
M repo/includes/Database/FieldDefinition.php
M repo/includes/Query/SQLStore/Setup.php
A repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
5 files changed, 133 insertions(+), 3 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index c1c7b88..002f238 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -185,6 +185,8 @@
'content/PropertyContent',
'content/PropertyHandler',
 
+   'Database/FieldDefinition',
+
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index e2c7650..57d6fb5 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -46,6 +46,18 @@
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
 
+
+foreach ( array(
+ 'Wikibase\Repo\Database\FieldDefinition',
+ 'Wikibase\Repo\Database\MediaWikiQueryInterface',
+ 'Wikibase\Repo\Database\QueryInterface',
+ 'Wikibase\Repo\Database\TableBuilder',
+ 'Wikibase\Repo\Database\TableDefinition',
+ ) as $class ) {
+
+   $wgAutoloadClasses[$class] = $dir . 'includes' . str_replace( '\\', 
'/', substr( $class, 13 ) ) . '.php';
+}
+
 if ( !class_exists( 'MessageReporter' ) ) {
$wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
$wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
diff --git a/repo/includes/Database/FieldDefinition.php 
b/repo/includes/Database/FieldDefinition.php
index 9672d3d..01f3024 100644
--- a/repo/includes/Database/FieldDefinition.php
+++ b/repo/includes/Database/FieldDefinition.php
@@ -70,7 +70,7 @@
/**
 * @since 0.4
 *
-* @var string
+* @var string|null
 */
private $index;
 
@@ -96,7 +96,7 @@
 * @param mixed $default
 * @param string|null $attributes
 * @param boolean $null
-* @param string $index
+* @param string|null $index
 * @param boolean $autoIncrement
 *
 * @throws InvalidArgumentException
@@ -114,7 +114,7 @@
throw new InvalidArgumentException( 'The $null 
parameter needs to be a boolean' );
}
 
-   if ( !is_string( $autoIncrement ) ) {
+   if ( !is_null( $index ) && !is_string( $index ) ) {
throw new InvalidArgumentException( 'The $index 
parameter needs to be a string' );
}
 
diff --git a/repo/includes/Query/SQLStore/Setup.php 
b/repo/includes/Query/SQLStore/Setup.php
index 174595e..489026c 100644
--- a/repo/includes/Query/SQLStore/Setup.php
+++ b/repo/includes/Query/SQLStore/Setup.php
@@ -29,6 +29,7 @@
 *
 * @param Store $sqlStore
 * @param TableBuilder $tableBuilder
+* @param MessageReporter|null $messageReporter
 */
public function __construct( Store $sqlStore, TableBuilder 
$tableBuilder, MessageReporter $messageReporter = null ) {
$this->store = $sqlStore;
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
new file mode 100644
index 000..29943f8
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -0,0 +1,115 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class FieldDefinitionTest extends \MediaWikiTestCase {
+
+   public function instanceProvider() {
+   $instances = array();
+
+   $instances[] = new FieldDefinition(
+   'names',
+   FieldDefinition::TYPE_TEXT
+   );
+
+   $instances[] = new FieldDefinition(
+   'numbers',
+   FieldDefinition::TYPE_FLOAT
+   );
+
+  

[MediaWiki-commits] [Gerrit] Fix bug: Empty response on certain Apache/PHP versions. - change (mediawiki...MaintenanceShell)

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

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


Change subject: Fix bug: Empty response on certain Apache/PHP versions.
..

Fix bug: Empty response on certain Apache/PHP versions.

I ran into this on an shared hosting somewhere with
5.3.17 on Apache 2.

Echoing an empty line (an empty string didn't do it, it had to
be at least 1 byte) fixed the problem.

Bug: 45338
Change-Id: I8c4182d3e879cff84db48ea7c1b0ab2e51d5f02c
---
M includes/SpecialMaintenanceShell.php
M resources/ext.maintenanceShell.js
2 files changed, 4 insertions(+), 1 deletion(-)


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

diff --git a/includes/SpecialMaintenanceShell.php 
b/includes/SpecialMaintenanceShell.php
index 9f16957..15a810f 100644
--- a/includes/SpecialMaintenanceShell.php
+++ b/includes/SpecialMaintenanceShell.php
@@ -133,6 +133,9 @@
// Output plain text header to avoid output being misintepreted 
as html
header( 'Content-Type: text/plain; charset=utf-8' );
 
+   // Output non-empty string before `exit` (bug 45338)
+   echo "\n";
+
require_once( $filePath );
 
// We could eval the entire extension, but lets only eval the 
part
diff --git a/resources/ext.maintenanceShell.js 
b/resources/ext.maintenanceShell.js
index 777c1a0..75661f5 100644
--- a/resources/ext.maintenanceShell.js
+++ b/resources/ext.maintenanceShell.js
@@ -68,7 +68,7 @@
$wrap.replaceWith( 
$tmpWrap );
init( $tmpWrap );
} else {
-   $shell.text( data );
+   $shell.text( $.trim( 
data ) );
}
} )
.fail( function ( jqXHR, textStatus, 
errorThrown ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c4182d3e879cff84db48ea7c1b0ab2e51d5f02c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MaintenanceShell
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] Fix empty response on certain Apache/PHP versions. - change (mediawiki...MaintenanceShell)

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

Change subject: Fix empty response on certain Apache/PHP versions.
..


Fix empty response on certain Apache/PHP versions.

I ran into this on an shared hosting somewhere with
5.3.17 on Apache 2.

The server response on the POST ajax request is empty.

Echoing an non-empty string anywhere fixes the problem.

Bug: 45338
Change-Id: I8c4182d3e879cff84db48ea7c1b0ab2e51d5f02c
---
M includes/SpecialMaintenanceShell.php
M resources/ext.maintenanceShell.js
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/includes/SpecialMaintenanceShell.php 
b/includes/SpecialMaintenanceShell.php
index 9f16957..15a810f 100644
--- a/includes/SpecialMaintenanceShell.php
+++ b/includes/SpecialMaintenanceShell.php
@@ -133,6 +133,9 @@
// Output plain text header to avoid output being misintepreted 
as html
header( 'Content-Type: text/plain; charset=utf-8' );
 
+   // Output non-empty string before `exit` (bug 45338)
+   echo "\n";
+
require_once( $filePath );
 
// We could eval the entire extension, but lets only eval the 
part
diff --git a/resources/ext.maintenanceShell.js 
b/resources/ext.maintenanceShell.js
index 777c1a0..75661f5 100644
--- a/resources/ext.maintenanceShell.js
+++ b/resources/ext.maintenanceShell.js
@@ -68,7 +68,7 @@
$wrap.replaceWith( 
$tmpWrap );
init( $tmpWrap );
} else {
-   $shell.text( data );
+   $shell.text( $.trim( 
data ) );
}
} )
.fail( function ( jqXHR, textStatus, 
errorThrown ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c4182d3e879cff84db48ea7c1b0ab2e51d5f02c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MaintenanceShell
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] Fix scripts not working due to uncomitted transactions. - change (mediawiki...MaintenanceShell)

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

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


Change subject: Fix scripts not working due to uncomitted transactions.
..

Fix scripts not working due to uncomitted transactions.

Scripts like removeUnusedAccounts.php weren't working eventhough
their output would suggest everything is fine.

This applies the following bug fix from MediaWiki core:
 c628b6d121b49319e783dd80f7cae4284807634b

Change-Id: I485737f673573955cb56f49b831c62960e2eb5f7
---
M includes/SpecialMaintenanceShell.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/includes/SpecialMaintenanceShell.php 
b/includes/SpecialMaintenanceShell.php
index 15a810f..3e5e4ec 100644
--- a/includes/SpecialMaintenanceShell.php
+++ b/includes/SpecialMaintenanceShell.php
@@ -162,6 +162,14 @@
try {
$maintenance->execute();
$maintenance->globals();
+
+   // Perform deferred updates
+   DeferredUpdates::doUpdates( 'commit' );
+
+   // Close up pending commits
+   $factory = wfGetLBFactory();
+   $factory->commitMasterChanges();
+   $factory->shutdown();
} catch ( MWException $mwe ) {
echo $mwe->getText();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I485737f673573955cb56f49b831c62960e2eb5f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MaintenanceShell
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] Fix scripts not working due to uncomitted transactions. - change (mediawiki...MaintenanceShell)

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

Change subject: Fix scripts not working due to uncomitted transactions.
..


Fix scripts not working due to uncomitted transactions.

Scripts like removeUnusedAccounts.php weren't working eventhough
their output would suggest everything is fine.

This applies the following bug fix from MediaWiki core:
 c628b6d121b49319e783dd80f7cae4284807634b

Change-Id: I485737f673573955cb56f49b831c62960e2eb5f7
---
M includes/SpecialMaintenanceShell.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/includes/SpecialMaintenanceShell.php 
b/includes/SpecialMaintenanceShell.php
index 15a810f..3e5e4ec 100644
--- a/includes/SpecialMaintenanceShell.php
+++ b/includes/SpecialMaintenanceShell.php
@@ -162,6 +162,14 @@
try {
$maintenance->execute();
$maintenance->globals();
+
+   // Perform deferred updates
+   DeferredUpdates::doUpdates( 'commit' );
+
+   // Close up pending commits
+   $factory = wfGetLBFactory();
+   $factory->commitMasterChanges();
+   $factory->shutdown();
} catch ( MWException $mwe ) {
echo $mwe->getText();
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I485737f673573955cb56f49b831c62960e2eb5f7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MaintenanceShell
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 

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


[MediaWiki-commits] [Gerrit] Some consistency tweaks in preparation for adding extension ... - change (mediawiki...GoogleSiteSearch)

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

Change subject: Some consistency tweaks in preparation for adding extension to 
Translatewiki.net
..


Some consistency tweaks in preparation for adding extension to Translatewiki.net

* Add weblink to description message
* http -> https

@Maintainer: Please add message documenation
per https://www.mediawiki.org/wiki/I18n#Message_documentation

Once done, I will add the extension to Translatewiki.net. Thanks!

Change-Id: Ibf7d66ed1b037bcacaac5cfbbf02baed2f0db5c8
---
M GoogleSiteSearch.i18n.php
M GoogleSiteSearch.php
2 files changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Siebrand: Verified; Looks good to me, but someone else must approve
  Fo0bar: Looks good to me, approved



diff --git a/GoogleSiteSearch.i18n.php b/GoogleSiteSearch.i18n.php
index ed1000e..f4bc3d9 100644
--- a/GoogleSiteSearch.i18n.php
+++ b/GoogleSiteSearch.i18n.php
@@ -10,7 +10,7 @@
 /** English (English) */
 $messages['en'] = array(
'googlesitesearch' => 'GoogleSiteSearch',
-   'googlesitesearch-desc' => 'Adds Google CSE site search to wiki search 
results',
+   'googlesitesearch-desc' => 'Adds [//www.google.com/cse/manage/all 
Google CSE site search] to wiki search results',
'googlesitesearch-loading' => 'Loading',
'googlesitesearch-google-results' => 'Google site results',
'googlesitesearch-wiki-results' => 'Wiki results',
diff --git a/GoogleSiteSearch.php b/GoogleSiteSearch.php
index 4b8d433..e386930 100644
--- a/GoogleSiteSearch.php
+++ b/GoogleSiteSearch.php
@@ -37,7 +37,7 @@
'path' => __FILE__,
'name' => 'GoogleSiteSearch',
'author' => 'Ryan Finnie',
-   'url' => 'http://www.mediawiki.org/wiki/Extension:GoogleSiteSearch',
+   'url' => 'https://www.mediawiki.org/wiki/Extension:GoogleSiteSearch',
'descriptionmsg' => 'googlesitesearch-desc',
'version' => '2.0',
 );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibf7d66ed1b037bcacaac5cfbbf02baed2f0db5c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleSiteSearch
Gerrit-Branch: master
Gerrit-Owner: Raimond Spekking 
Gerrit-Reviewer: Fo0bar 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] Added TableDefinitionTest - change (mediawiki...Wikibase)

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

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


Change subject: Added TableDefinitionTest
..

Added TableDefinitionTest

Change-Id: Ibdf324d85c3f3093aa46af2d4407a77936711322
---
M repo/Wikibase.hooks.php
A repo/tests/phpunit/includes/Database/TableDefinitionTest.php
2 files changed, 98 insertions(+), 0 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 002f238..5f3e700 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -186,6 +186,7 @@
'content/PropertyHandler',
 
'Database/FieldDefinition',
+   'Database/TableDefinition',
 
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
diff --git a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php
new file mode 100644
index 000..aa7681e
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php
@@ -0,0 +1,97 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class TableDefinitionTest extends \MediaWikiTestCase {
+
+   public function instanceProvider() {
+   $instances = array();
+
+   $instances[] = new TableDefinition(
+   'snaks',
+   array(
+   new FieldDefinition( 'omnomnom', 
FieldDefinition::TYPE_TEXT )
+   )
+   );
+
+   $instances[] = new TableDefinition(
+   'spam',
+   array(
+   new FieldDefinition( 'o', 
FieldDefinition::TYPE_TEXT ),
+   new FieldDefinition( 'h', 
FieldDefinition::TYPE_TEXT ),
+   new FieldDefinition( 'i', 
FieldDefinition::TYPE_INTEGER, 42 ),
+   )
+   );
+
+   return $this->arrayWrap( $instances );
+   }
+
+   /**
+* @dataProvider instanceProvider
+*
+* @param TableDefinition $table
+*/
+   public function testReturnValueOfGetName( TableDefinition $table ) {
+   $this->assertInternalType( 'string', $table->getName() );
+
+   $newTable = new TableDefinition( $table->getName(), 
$table->getFields() );
+
+   $this->assertEquals(
+   $table->getName(),
+   $newTable->getName(),
+   'The TableDefinition name is set and obtained correctly'
+   );
+   }
+
+   /**
+* @dataProvider instanceProvider
+*
+* @param TableDefinition $table
+*/
+   public function testReturnValueOfGetFields( TableDefinition $table ) {
+   $this->assertInternalType( 'array', $table->getFields() );
+   $this->assertContainsOnlyInstancesOf( 
'Wikibase\Repo\Database\FieldDefinition', $table->getFields() );
+
+   $newTable = new TableDefinition( $table->getName(), 
$table->getFields() );
+
+   $this->assertEquals(
+   $table->getFields(),
+   $newTable->getFields(),
+   'The TableDefinition fields are set and obtained 
correctly'
+   );
+   }
+
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibdf324d85c3f3093aa46af2d4407a77936711322
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Added TableBuilderTest - change (mediawiki...Wikibase)

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

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


Change subject: Added TableBuilderTest
..

Added TableBuilderTest

Change-Id: Ie172ebaf146495941f10e6d265433fe2577e5325
---
M repo/Wikibase.hooks.php
M repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
A repo/tests/phpunit/includes/Database/TableBuilderTest.php
M repo/tests/phpunit/includes/Database/TableDefinitionTest.php
4 files changed, 139 insertions(+), 2 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 5f3e700..55587e8 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -186,6 +186,7 @@
'content/PropertyHandler',
 
'Database/FieldDefinition',
+   'Database/TableBuilder',
'Database/TableDefinition',
 
'specials/SpecialCreateItem',
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
index 29943f8..122cbfb 100644
--- a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -5,7 +5,7 @@
 use Wikibase\Repo\Database\FieldDefinition;
 
 /**
- * Unit test Wikibase\Repo\Database\FieldDefinitionTest class.
+ * Unit test Wikibase\Repo\Database\FieldDefinition class.
  *
  * 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
diff --git a/repo/tests/phpunit/includes/Database/TableBuilderTest.php 
b/repo/tests/phpunit/includes/Database/TableBuilderTest.php
new file mode 100644
index 000..aa2d33f
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/TableBuilderTest.php
@@ -0,0 +1,136 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class TableBuilderTest extends \MediaWikiTestCase {
+
+   public function tableNameProvider() {
+   return $this->arrayWrap(
+   array(
+   'foo',
+   'bar',
+   'o',
+   'foo_bar_baz',
+   'foobarbaz',
+   )
+   );
+   }
+
+   /**
+* @dataProvider tableNameProvider
+*/
+   public function testCreateTableCallsTableExists( $tableName ) {
+   $table = new TableDefinition(
+   $tableName,
+   array( new FieldDefinition( 'foo', 
FieldDefinition::TYPE_TEXT ) )
+   );
+
+   $reporter = new NullMessageReporter();
+
+   $queryInterface = new ObservableQueryInterface();
+
+   $assertEquals = array( $this, 'assertEquals' );
+   $callCount = 0;
+
+   $queryInterface->registerCallback(
+   'tableExists',
+   function( $tableName ) use ( $table, &$callCount, 
$assertEquals ) {
+   call_user_func( $assertEquals, 
$table->getName(), $tableName );
+   $callCount += 1;
+   }
+   );
+
+   $builder = new TableBuilder( $queryInterface, $reporter );
+
+   $builder->createTable( $table );
+   $this->assertEquals( 1, $callCount );
+   }
+
+}
+
+use Wikibase\Repo\Database\QueryInterface;
+
+class ObservableQueryInterface implements QueryInterface {
+
+   /**
+* @var callable[]
+*/
+   private $callbacks = array();
+
+   /**
+* @param string $method
+* @param callable $callback
+*/
+   public function registerCallback( $method, $callback ) {
+   $this->callbacks[$method] = $callback;
+   }
+
+   private function runCallbacks( $method, $args ) {
+   if ( array_key_exists( $method, $this->callbacks ) ) {
+   call_user_func_array( $this->callbacks[$method], $args 
);
+   }
+   }
+
+   /**
+* @see QueryInterface::tableExists
+*
+* @param string $tableName
+*
+* @return boolean
+*/
+   public function tableExists( $tableName ) {
+   $this->runCallbacks( __FUNCTION__, func_get_args() );
+   }
+
+}
+
+use MessageReporter;
+
+class NullMessageReporter implements MessageReporter {
+
+   /**
+* @see MessageReporter::reportMessage
+*
+* @since 0.4
+*
+* @param str

[MediaWiki-commits] [Gerrit] (bug 45329) Use mediawiki.api.watch for watching/unwatching ... - change (mediawiki...LiquidThreads)

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

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


Change subject: (bug 45329) Use mediawiki.api.watch for watching/unwatching 
pages
..

(bug 45329) Use mediawiki.api.watch for watching/unwatching pages

Also, fix action=watch and action=unwatch.

Change-Id: I3659ae24decdd82723d78e9b9862068f59f660d0
---
M LiquidThreads.php
M classes/View.php
M lqt.js
M pages/ThreadWatchView.php
4 files changed, 34 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads 
refs/changes/36/50636/1

diff --git a/LiquidThreads.php b/LiquidThreads.php
index 0b125c1..8ff30a4 100644
--- a/LiquidThreads.php
+++ b/LiquidThreads.php
@@ -84,6 +84,7 @@
'jquery.ui.droppable',
'mediawiki.action.edit.preview',
'user.tokens',
+   'mediawiki.api.watch',
),
'messages' => $lqtMessages
 );
diff --git a/classes/View.php b/classes/View.php
index 3a1232d..fb58fb8 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -1340,13 +1340,23 @@
if ( !$this->user->isAnon() && 
!$thread->title()->userIsWatching() ) {
$commands['watch'] = array(
'label' => wfMessage( 'watch' )->parse(),
-   'href' => self::permalinkUrlWithQuery( $thread, 
'action=watch' ),
+   'href' => self::permalinkUrlWithQuery(
+   $thread,
+   array( 'action' => 'watch', 'token' => 
$this->user->getEditToken(
+   array( 'watch', 
$thread->title()->getDBkey() )
+   ) )
+   ),
'enabled' => true
);
} elseif ( !$this->user->isAnon() ) {
$commands['unwatch'] = array(
'label' => wfMessage( 'unwatch' )->parse(),
-   'href' => self::permalinkUrlWithQuery( $thread, 
'action=unwatch' ),
+   'href' => self::permalinkUrlWithQuery(
+   $thread,
+   array( 'action' => 'unwatch', 'token' 
=> $this->user->getEditToken(
+   array( 'unwatch', 
$thread->title()->getDBkey() )
+   ) )
+   ),
'enabled' => true
);
}
diff --git a/lqt.js b/lqt.js
index dfa164a..6e3a077 100644
--- a/lqt.js
+++ b/lqt.js
@@ -778,45 +778,27 @@
$(this).remove();
},
 
-   'asyncWatch' : function(e) {
-   var button = $(this);
-   var tlcOffset = "lqt-threadlevel-commands-".length;
-
-   // Find the title of the thread
-   var threadLevelCommands = 
button.closest('.lqt_threadlevel_commands');
-   var threadID = threadLevelCommands.attr('id').substring( 
tlcOffset );
-   var title = $('#lqt-thread-title-'+threadID).val();
-
-   // Check if we're watching or unwatching.
-   var action = '';
-   if ( button.hasClass( 'lqt-command-watch' ) ) {
-   button.removeClass( 'lqt-command-watch' );
-   action = 'watch';
-   } else if ( button.hasClass( 'lqt-command-unwatch' ) ) {
-   button.removeClass( 'lqt-command-unwatch' );
-   action = 'unwatch';
-   }
+   'asyncWatch' : function( e ) {
+   var button = $( this ),
+   oldButton = $( this ).clone(),
+   tlcOffset = "lqt-threadlevel-commands-".length,
+   // Find the title of the thread
+   threadLevelCommands = button.closest( 
'.lqt_threadlevel_commands' ),
+   title = $( '#lqt-thread-title-' + 
threadLevelCommands.attr( 'id' ).substring( tlcOffset ) ).val();
 
// Replace the watch link with a spinner
button.empty().addClass( 'mw-small-spinner' );
 
-   // Do the AJAX call.
-   var apiParams = {
-   'action': 'watch',
-   'title' : title,
-   'format': 'json',
-   'token' : mw.user.tokens.get( 'watchToken' )
-   };
-
-   if (action === 'unwatch') {
-   apiParams.unwatch = 'yes';
+   // Check if we're watching or unwatching.
+   var api = new mw.Api,
+   success = function () {
+   threadLevelCommands.load( window.location.href 

[MediaWiki-commits] [Gerrit] Add i18n message documentation - change (mediawiki...GoogleSiteSearch)

2013-02-24 Thread Fo0bar (Code Review)
Fo0bar has uploaded a new change for review.

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


Change subject: Add i18n message documentation
..

Add i18n message documentation

Per https://www.mediawiki.org/wiki/I18n#Message_documentation

Change-Id: I6d141112e02e6e84625b7740e241d6797ba5da67
---
M GoogleSiteSearch.i18n.php
1 file changed, 9 insertions(+), 0 deletions(-)


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

diff --git a/GoogleSiteSearch.i18n.php b/GoogleSiteSearch.i18n.php
index f4bc3d9..d485f5f 100644
--- a/GoogleSiteSearch.i18n.php
+++ b/GoogleSiteSearch.i18n.php
@@ -15,3 +15,12 @@
'googlesitesearch-google-results' => 'Google site results',
'googlesitesearch-wiki-results' => 'Wiki results',
 );
+
+/** Message documentation (Message documentation) */
+$messages['qqq'] = array(
+   'googlesitesearch' => 'The canonical name of the extension, please do 
not alter.',
+   'googlesitesearch-desc' => 'Special:About description of the 
extension.',
+   'googlesitesearch-loading' => 'Displayed before the Google CSE 
JavaScript replaces it with the actual search results.  Wiki markup is not 
allowed here; message will be converted to escaped HTML.',
+   'googlesitesearch-google-results' => 'The title sub-header for the 
Google CSE results section.',
+   'googlesitesearch-wiki-results' => 'The title sub-header for the 
MediaWiki search results section.',
+);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6d141112e02e6e84625b7740e241d6797ba5da67
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GoogleSiteSearch
Gerrit-Branch: master
Gerrit-Owner: Fo0bar 

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


[MediaWiki-commits] [Gerrit] jsduck-ify comments in ext.eventLogging.core.js - change (mediawiki...EventLogging)

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

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


Change subject: jsduck-ify comments in ext.eventLogging.core.js
..

jsduck-ify comments in ext.eventLogging.core.js

I don't love jsduck, but using a syntax that *can* compile into documentation
beats a purely formal syntactic convention with no application. So, ok.

Also renames 'isInstance' to 'isInstanceOf' and renames its first argument from
'instance' to 'value'.

Change-Id: I265d3962155b89d6890b7aedf749983ba124fa79
---
M modules/ext.eventLogging.core.js
1 file changed, 31 insertions(+), 27 deletions(-)


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

diff --git a/modules/ext.eventLogging.core.js b/modules/ext.eventLogging.core.js
index d255c6b..6673e85 100644
--- a/modules/ext.eventLogging.core.js
+++ b/modules/ext.eventLogging.core.js
@@ -1,4 +1,6 @@
 /**
+ * ext.eventLogging.core.js
+ * 
  * Logs arbitrary events from client-side code to server. Each event
  * must validate against a predeclared data model, specified as JSON
  * Schema (version 3 of the draft).
@@ -11,6 +13,7 @@
 
/**
 * @constructor
+* Error thrown on JSON Schema validation failures.
 * @extends Error
 **/
function ValidationError( message ) {
@@ -40,8 +43,10 @@
 
/**
 * Declares event schema.
-* @param {Object} schemas Schema specified as JSON Schema
-* @param integer revision
+* @param {String} schemaName Name of schema.
+* @param {Object} meta An object describing a schema:
+* @param {Number} [meta.revision] Revision ID.
+* @param {Object} [meta.schema] The schema itself.
 * @return {Object}
 */
setSchema: function ( schemaName, meta ) {
@@ -59,28 +64,28 @@
 
/**
 * @param {Object} instance Object to test.
-* @param {string} type JSON Schema type specifier.
-* @return {boolean}
+* @param {String} type JSON Schema type.
+* @return {Boolean}
 */
-   isInstance: function ( instance, type ) {
+   isInstanceOf: function ( value, type ) {
// undefined and null are invalid values for any type.
-   if ( instance === undefined || instance === null ) {
+   if ( value === undefined || value === null ) {
return false;
}
switch ( type ) {
case 'string':
-   return typeof instance === 'string';
+   return typeof value === 'string';
case 'timestamp':
-   return instance instanceof Date || (
-   typeof instance === 'number' &&
-   instance >= 0 &&
-   instance % 1 === 0 );
+   return value instanceof Date || (
+   typeof value === 'number' &&
+   value >= 0 &&
+   value % 1 === 0 );
case 'boolean':
-   return typeof instance === 'boolean';
+   return typeof value === 'boolean';
case 'integer':
-   return typeof instance === 'number' && instance 
% 1 === 0;
+   return typeof value === 'number' && value % 1 
=== 0;
case 'number':
-   return typeof instance === 'number' && 
isFinite( instance );
+   return typeof value === 'number' && isFinite( 
instance );
default:
return false;
}
@@ -89,8 +94,8 @@
 
/**
 * @param {Object} event Event to test for validity.
-* @param {Object} schemaName Name of schema.
-* @returns {boolean}
+* @param {String} schemaName Name of schema.
+* @return {Boolean}
 */
isValid: function ( event, schemaName ) {
try {
@@ -135,7 +140,7 @@
return true;
}
 
-   if ( !( self.isInstance( val, desc.type ) ) ) {
+   if ( !( self.isInstanceOf( val, desc.type ) ) ) 
{
   

[MediaWiki-commits] [Gerrit] Add missing release notes for various commits. - change (mediawiki/core)

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

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


Change subject: Add missing release notes for various commits.
..

Add missing release notes for various commits.

Follows-up Ibda2b49395, I0975e5c6a6, Ia6535f1090, Idc11b54752.

Change-Id: I7e8c78dd71fc6a8aaa630bec97c3ed08de99b720
---
M RELEASE-NOTES-1.20
1 file changed, 8 insertions(+), 3 deletions(-)


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

diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20
index a1900a8..1df20b5 100644
--- a/RELEASE-NOTES-1.20
+++ b/RELEASE-NOTES-1.20
@@ -6,17 +6,22 @@
 
 == MediaWiki 1.20.3 ==
 
-This is a maintenance release of the MediaWiki 1.20 branch
+This is a maintenance release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20.2 ===
 * New preference type - 'api'. Preferences of this type are not shown on
   Special:Preferences, but are still available via the action=options API.
 * (bug 44010) Context is passed to UserGetLanguageObject.
 * The recursion guard on RequestContext::getLanguage() was weakened.
+* (bug 40585) Don't drop 'step="any"' in HTML input fields.
+* (bug 44024) Fixed problems in ObjectCache when using XCache.
+* (bug 44135) Fixed problems in CurlHttpRequest that caused InstantCommons
+  to longer work by default.
+* (bug 44010) FauxRequest leaked cookie data from primary request.
 
 == MediaWiki 1.20.2 ==
 
-This is a maintenance release of the MediaWiki 1.20 branch
+This is a maintenance release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20.1 ===
 * (bug 42638) Fix API action=options&reset=1 & unit tests.
@@ -24,7 +29,7 @@
 
 == MediaWiki 1.20.1 ==
 
-This is a security release of the MediaWiki 1.20 branch
+This is a security release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20 ===
 * (bug 42202) Validate options to prevent html injection

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7e8c78dd71fc6a8aaa630bec97c3ed08de99b720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Add missing release notes for various commits. - change (mediawiki/core)

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

Change subject: Add missing release notes for various commits.
..


Add missing release notes for various commits.

Follows-up Ibda2b49395, I0975e5c6a6, Ia6535f1090, Idc11b54752.

Change-Id: I7e8c78dd71fc6a8aaa630bec97c3ed08de99b720
---
M RELEASE-NOTES-1.20
1 file changed, 8 insertions(+), 3 deletions(-)

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



diff --git a/RELEASE-NOTES-1.20 b/RELEASE-NOTES-1.20
index a1900a8..1df20b5 100644
--- a/RELEASE-NOTES-1.20
+++ b/RELEASE-NOTES-1.20
@@ -6,17 +6,22 @@
 
 == MediaWiki 1.20.3 ==
 
-This is a maintenance release of the MediaWiki 1.20 branch
+This is a maintenance release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20.2 ===
 * New preference type - 'api'. Preferences of this type are not shown on
   Special:Preferences, but are still available via the action=options API.
 * (bug 44010) Context is passed to UserGetLanguageObject.
 * The recursion guard on RequestContext::getLanguage() was weakened.
+* (bug 40585) Don't drop 'step="any"' in HTML input fields.
+* (bug 44024) Fixed problems in ObjectCache when using XCache.
+* (bug 44135) Fixed problems in CurlHttpRequest that caused InstantCommons
+  to longer work by default.
+* (bug 44010) FauxRequest leaked cookie data from primary request.
 
 == MediaWiki 1.20.2 ==
 
-This is a maintenance release of the MediaWiki 1.20 branch
+This is a maintenance release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20.1 ===
 * (bug 42638) Fix API action=options&reset=1 & unit tests.
@@ -24,7 +29,7 @@
 
 == MediaWiki 1.20.1 ==
 
-This is a security release of the MediaWiki 1.20 branch
+This is a security release of the MediaWiki 1.20 branch.
 
 === Changes since 1.20 ===
 * (bug 42202) Validate options to prevent html injection

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7e8c78dd71fc6a8aaa630bec97c3ed08de99b720
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_20
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Instead of having multiple $cliSapiAutomaton, make it an array. - change (mediawiki...code-utils)

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

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


Change subject: Instead of having multiple $cliSapiAutomaton, make it an array.
..

Instead of having multiple $cliSapiAutomaton, make it an array.

Change-Id: I7d25ba9bef22ee8cec738eae197f6eda2d2f3d0f
---
M find-entries.php
1 file changed, 17 insertions(+), 27 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils 
refs/changes/07/50707/1

diff --git a/find-entries.php b/find-entries.php
index 1e6c0af..a77be7b 100755
--- a/find-entries.php
+++ b/find-entries.php
@@ -128,10 +128,11 @@
$braces = 0;
$safeBraces = 0;
$definedAutomaton = token_get_all( "= count( 
$cliSapiAutomaton ) ) {
-   $inDefinedConditional = true;
-   $cliSapiAutomatonState = 0;
+   for ($j = 0; $j < count( $cliSapiAutomatons ); 
$j++) {
+   if ( ( $tokens[$i] == 
$cliSapiAutomatons[$j][$cliSapiAutomatonsState[$j]] ) ||
+( ( $tokens[$i][0] == 
$cliSapiAutomatons[$j][$cliSapiAutomatonsState[$j]][0] )
+&& ( $tokens[$i][1] == 
$cliSapiAutomatons[$j][$cliSapiAutomatonsState[$j]][1] ) ) )
+   {
+   $cliSapiAutomatonsState[$j]++;
+   if ( 
$cliSapiAutomatonsState[$j] >= count( $cliSapiAutomatons[$j] ) ) {
+   $inDefinedConditional = 
true;
+   
$cliSapiAutomatonsState[$j] = 0;
+   }
+   } else {
+   $cliSapiAutomatonsState[$j] = 0;
}
-   } else {
-   $cliSapiAutomatonState = 0;
-   }
-
-   if ( ( $tokens[$i] == 
$cliSapiAutomaton2[$cliSapiAutomaton2State] ) ||
-( ( $tokens[$i][0] == 
$cliSapiAutomaton2[$cliSapiAutomaton2State][0] )
-&& ( $tokens[$i][1] == 
$cliSapiAutomaton2[$cliSapiAutomaton2State][1] ) ) )
-   {
-   $cliSapiAutomaton2State++;
-   if ( $cliSapiAutomaton2State >= count( 
$cliSapiAutomaton2 ) ) {
-   $inDefinedConditional = true;
-   $cliSapiAutomaton2State = 0;
-   }
-   } else {
-   $cliSapiAutomaton2State = 0;
}
}
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d25ba9bef22ee8cec738eae197f6eda2d2f3d0f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
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] Add a couple of automatons - change (mediawiki...code-utils)

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

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


Change subject: Add a couple of automatons
..

Add a couple of automatons

if ( PHP_SAPI !== 'cli' ) used by maintenance/locking/LockServerDaemon.php
if ( PHP_SAPI != 'cli-server' ) used by maintenance/dev/includes/router.php

A script intended for 'cli-server' should be safe for a 'normal' server :)

Change-Id: I74a57944d5cf1088851d968646edd3179e87ea51
---
M find-entries.php
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/tools/code-utils 
refs/changes/08/50708/1

diff --git a/find-entries.php b/find-entries.php
index a77be7b..ef161b9 100755
--- a/find-entries.php
+++ b/find-entries.php
@@ -131,6 +131,8 @@
$cliSapiAutomatons = array();
$cliSapiAutomatons[] = token_get_all( "https://gerrit.wikimedia.org/r/50708
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I74a57944d5cf1088851d968646edd3179e87ea51
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
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] (bug 45079) Add P: as alias for Property namespace - change (operations/mediawiki-config)

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

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


Change subject: (bug 45079) Add P: as alias for Property namespace
..

(bug 45079) Add P: as alias for Property namespace

There is no chance of a conflict since P is currently not
used in the interwiki map, nor will there be any articles
starting with "P:".

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 029deb6..adc349d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -3288,6 +3288,7 @@
'+wikidatawiki' => array(
'WD' => NS_PROJECT,  // Bug 41834
'WT' => NS_PROJECT_TALK,
+   'P' => 120, // bug 45079
),
'+yiwiki' => array(
'וויקיפעדיע' => NS_PROJECT,

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

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

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


[MediaWiki-commits] [Gerrit] Added support for SMW's SQLStore3 (finally) for remote autoc... - change (mediawiki...SemanticForms)

2013-02-24 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: Added support for SMW's SQLStore3 (finally) for remote 
autocompletion
..

Added support for SMW's SQLStore3 (finally) for remote autocompletion

Change-Id: Ic8c57ccdf5347dfb7670b371734e7f6abec3b746
---
M includes/SF_AutocompleteAPI.php
1 file changed, 44 insertions(+), 13 deletions(-)


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

diff --git a/includes/SF_AutocompleteAPI.php b/includes/SF_AutocompleteAPI.php
index ec947d5..1757e6a 100644
--- a/includes/SF_AutocompleteAPI.php
+++ b/includes/SF_AutocompleteAPI.php
@@ -135,6 +135,7 @@
 
private static function getAllValuesForProperty( $property_name, 
$substring, $base_property_name = null, $base_value = null ) {
global $sfgMaxAutocompleteValues, $sfgCacheAutocompleteValues, 
$sfgAutocompleteCacheTimeout;
+   global $smwgDefaultStore;
 
$values = array();
$db = wfGetDB( DB_SLAVE );
@@ -164,11 +165,26 @@
}
 
if ( $is_relation ) {
-   $value_field = 'o_ids.smw_title';
-   $from_clause = $db->tableName( 'smw_rels2' ) . " r JOIN 
" . $db->tableName( 'smw_ids' ) . " p_ids ON r.p_id = p_ids.smw_id JOIN " . 
$db->tableName( 'smw_ids' ) . " o_ids ON r.o_id = o_ids.smw_id";
+   $valueField = 'o_ids.smw_title';
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $idsTable =  $db->tableName( 'smw_object_ids' );
+   $propsTable = $db->tableName( 'smw_di_wikipage' 
);
+   } else {
+   $idsTable =  $db->tableName( 'smw_ids' );
+   $propsTable = $db->tableName( 'smw_rels2' );
+   }
+   $from_clause = "$propsTable p JOIN $idsTable p_ids ON 
p.p_id = p_ids.smw_id JOIN $idsTable o_ids ON p.o_id = o_ids.smw_id";
} else {
-   $value_field = 'a.value_xsd';
-   $from_clause = $db->tableName( 'smw_atts2' ) . " a JOIN 
" . $db->tableName( 'smw_ids' ) . " p_ids ON a.p_id = p_ids.smw_id";
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $valueField = 'p.o_hash';
+   $idsTable =  $db->tableName( 'smw_object_ids' );
+   $propsTable = $db->tableName( 'smw_di_blob' );
+   } else {
+   $valueField = 'p.value_xsd';
+   $idsTable =  $db->tableName( 'smw_ids' );
+   $propsTable = $db->tableName( 'smw_atts2' );
+   }
+   $from_clause = "$propsTable p JOIN $idsTable p_ids ON 
p.p_id = p_ids.smw_id";
}
 
if ( !is_null( $base_property_name ) ) {
@@ -177,25 +193,40 @@
 
$base_property_name = str_replace( ' ', '_', 
$base_property_name );
$conditions['base_p_ids.smw_title'] = 
$base_property_name;
-   $main_prop_alias = ( $is_relation ) ? 'r' : 'a';
if ( $base_is_relation ) {
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_rels2' ) . " r_base ON $main_prop_alias.s_id = r_base.s_id";
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_ids' ) . " base_p_ids ON r_base.p_id = base_p_ids.smw_id JOIN " . 
$db->tableName( 'smw_ids' ) . " base_o_ids ON r_base.o_id = base_o_ids.smw_id";
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $idsTable =  $db->tableName( 
'smw_object_ids' );
+   $propsTable = $db->tableName( 
'smw_di_wikipage' );
+   } else {
+   $idsTable =  $db->tableName( 'smw_ids' 
);
+   $propsTable = $db->tableName( 
'smw_rels2' );
+   }
+   $from_clause .= " JOIN $propsTable p_base ON 
p.s_id = p_base.s_id";
+   $from_clause .= " JOIN $idsTable base_p_ids ON 
p_base.p_id = base_p_ids.smw_id JOIN $idsTable base_o_ids ON p_base.o_id = 
base_o_ids.smw_id";
$base_value = str_replace( ' ', '_', 
$base_value );
$conditions['base_o_ids.smw_title'] = 
$base_value;
} else {
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_atts2' ) . " a_base ON $main_prop_alias.s_id = a_base.s_id";
-   $from_clause .= " JOI

[MediaWiki-commits] [Gerrit] Added support for SMW's SQLStore3 (finally) for remote autoc... - change (mediawiki...SemanticForms)

2013-02-24 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Added support for SMW's SQLStore3 (finally) for remote 
autocompletion
..


Added support for SMW's SQLStore3 (finally) for remote autocompletion

Change-Id: Ic8c57ccdf5347dfb7670b371734e7f6abec3b746
---
M includes/SF_AutocompleteAPI.php
1 file changed, 44 insertions(+), 13 deletions(-)

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



diff --git a/includes/SF_AutocompleteAPI.php b/includes/SF_AutocompleteAPI.php
index ec947d5..1757e6a 100644
--- a/includes/SF_AutocompleteAPI.php
+++ b/includes/SF_AutocompleteAPI.php
@@ -135,6 +135,7 @@
 
private static function getAllValuesForProperty( $property_name, 
$substring, $base_property_name = null, $base_value = null ) {
global $sfgMaxAutocompleteValues, $sfgCacheAutocompleteValues, 
$sfgAutocompleteCacheTimeout;
+   global $smwgDefaultStore;
 
$values = array();
$db = wfGetDB( DB_SLAVE );
@@ -164,11 +165,26 @@
}
 
if ( $is_relation ) {
-   $value_field = 'o_ids.smw_title';
-   $from_clause = $db->tableName( 'smw_rels2' ) . " r JOIN 
" . $db->tableName( 'smw_ids' ) . " p_ids ON r.p_id = p_ids.smw_id JOIN " . 
$db->tableName( 'smw_ids' ) . " o_ids ON r.o_id = o_ids.smw_id";
+   $valueField = 'o_ids.smw_title';
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $idsTable =  $db->tableName( 'smw_object_ids' );
+   $propsTable = $db->tableName( 'smw_di_wikipage' 
);
+   } else {
+   $idsTable =  $db->tableName( 'smw_ids' );
+   $propsTable = $db->tableName( 'smw_rels2' );
+   }
+   $from_clause = "$propsTable p JOIN $idsTable p_ids ON 
p.p_id = p_ids.smw_id JOIN $idsTable o_ids ON p.o_id = o_ids.smw_id";
} else {
-   $value_field = 'a.value_xsd';
-   $from_clause = $db->tableName( 'smw_atts2' ) . " a JOIN 
" . $db->tableName( 'smw_ids' ) . " p_ids ON a.p_id = p_ids.smw_id";
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $valueField = 'p.o_hash';
+   $idsTable =  $db->tableName( 'smw_object_ids' );
+   $propsTable = $db->tableName( 'smw_di_blob' );
+   } else {
+   $valueField = 'p.value_xsd';
+   $idsTable =  $db->tableName( 'smw_ids' );
+   $propsTable = $db->tableName( 'smw_atts2' );
+   }
+   $from_clause = "$propsTable p JOIN $idsTable p_ids ON 
p.p_id = p_ids.smw_id";
}
 
if ( !is_null( $base_property_name ) ) {
@@ -177,25 +193,40 @@
 
$base_property_name = str_replace( ' ', '_', 
$base_property_name );
$conditions['base_p_ids.smw_title'] = 
$base_property_name;
-   $main_prop_alias = ( $is_relation ) ? 'r' : 'a';
if ( $base_is_relation ) {
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_rels2' ) . " r_base ON $main_prop_alias.s_id = r_base.s_id";
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_ids' ) . " base_p_ids ON r_base.p_id = base_p_ids.smw_id JOIN " . 
$db->tableName( 'smw_ids' ) . " base_o_ids ON r_base.o_id = base_o_ids.smw_id";
+   if ( $smwgDefaultStore === 'SMWSQLStore3' ) {
+   $idsTable =  $db->tableName( 
'smw_object_ids' );
+   $propsTable = $db->tableName( 
'smw_di_wikipage' );
+   } else {
+   $idsTable =  $db->tableName( 'smw_ids' 
);
+   $propsTable = $db->tableName( 
'smw_rels2' );
+   }
+   $from_clause .= " JOIN $propsTable p_base ON 
p.s_id = p_base.s_id";
+   $from_clause .= " JOIN $idsTable base_p_ids ON 
p_base.p_id = base_p_ids.smw_id JOIN $idsTable base_o_ids ON p_base.o_id = 
base_o_ids.smw_id";
$base_value = str_replace( ' ', '_', 
$base_value );
$conditions['base_o_ids.smw_title'] = 
$base_value;
} else {
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_atts2' ) . " a_base ON $main_prop_alias.s_id = a_base.s_id";
-   $from_clause .= " JOIN " . $db->tableName( 
'smw_ids' ) . " base_p_ids 

[MediaWiki-commits] [Gerrit] Add repo for FUEL - change (translatewiki)

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

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


Change subject: Add repo for FUEL
..

Add repo for FUEL

Change-Id: I3ce36b37c5448f33ce254c7c79024cf814d359c9
---
M REPOCONF
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/11/50711/1

diff --git a/REPOCONF b/REPOCONF
index d17bb66..7afc066 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,7 +11,7 @@
 
REPO_FREECOL=https://freecol.svn.sourceforge.net/svnroot/freecol/freecol/trunk/data/strings
 REPO_FRONTLINESMS=git://github.com/frontlinesms/frontlinesms.git
 
REPO_FUDFORUM=https://fudforum.svn.sourceforge.net/svnroot/fudforum/trunk/install/forum_data/thm/default/i18n
-REPO_FUEL=TO_BE_DECIDED
+REPO_FUEL=git://git.fedorahosted.org/fuel.git
 REPO_IHRIS=http://bazaar.launchpad.net/~intrahealth%2Binformatics
 REPO_IHRIS_BRANCH="4.1-dev"
 REPO_IHRIS_MODULES="i2ce ihris-common ihris-manage ihris-qualify"

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

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

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


[MediaWiki-commits] [Gerrit] Add repo for FUEL - change (translatewiki)

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

Change subject: Add repo for FUEL
..


Add repo for FUEL

Change-Id: I3ce36b37c5448f33ce254c7c79024cf814d359c9
---
M REPOCONF
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/REPOCONF b/REPOCONF
index d17bb66..7afc066 100644
--- a/REPOCONF
+++ b/REPOCONF
@@ -11,7 +11,7 @@
 
REPO_FREECOL=https://freecol.svn.sourceforge.net/svnroot/freecol/freecol/trunk/data/strings
 REPO_FRONTLINESMS=git://github.com/frontlinesms/frontlinesms.git
 
REPO_FUDFORUM=https://fudforum.svn.sourceforge.net/svnroot/fudforum/trunk/install/forum_data/thm/default/i18n
-REPO_FUEL=TO_BE_DECIDED
+REPO_FUEL=git://git.fedorahosted.org/fuel.git
 REPO_IHRIS=http://bazaar.launchpad.net/~intrahealth%2Binformatics
 REPO_IHRIS_BRANCH="4.1-dev"
 REPO_IHRIS_MODULES="i2ce ihris-common ihris-manage ihris-qualify"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3ce36b37c5448f33ce254c7c79024cf814d359c9
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Also blacklist Bengali - change (translatewiki)

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

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


Change subject: Also blacklist Bengali
..

Also blacklist Bengali

Spotted by Sankarshan during the Pune translation sprint.

Change-Id: I24358579bd4651b94109a58c7d45f935c63e51ea
---
M groups/FUEL/FUEL.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/12/50712/1

diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 1a7628b..3f08c99 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -15,6 +15,7 @@
   LANGUAGES:
 blacklist:
   - as
+  - bn
   - gu
   - hi
   - kn

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

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

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


[MediaWiki-commits] [Gerrit] Add MessageReporter since core CR is slow as usual - change (mediawiki...Wikibase)

2013-02-24 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Add MessageReporter since core CR is slow as usual
..


Add MessageReporter since core CR is slow as usual

Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f1
---
M repo/config/Wikibase.experimental.php
A repo/includes/MessageReporter.php
2 files changed, 132 insertions(+), 0 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index bb3a70c..e2c7650 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -45,6 +45,13 @@
 $wgAutoloadClasses['Wikibase\QueryContent']= $dir . 
'includes/content/QueryContent.php';
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
+
+if ( !class_exists( 'MessageReporter' ) ) {
+   $wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
+   $wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
+}
+
+
 $wgAPIModules['wbremovequalifiers']= 
'Wikibase\Repo\Api\RemoveQualifiers';
 $wgAPIModules['wbsetqualifier']= 
'Wikibase\Repo\Api\SetQualifier';
 $wgAPIModules['wbsetstatementrank']= 
'Wikibase\Api\SetStatementRank';
diff --git a/repo/includes/MessageReporter.php 
b/repo/includes/MessageReporter.php
new file mode 100644
index 000..fd13294
--- /dev/null
+++ b/repo/includes/MessageReporter.php
@@ -0,0 +1,125 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+interface MessageReporter {
+
+   /**
+* Report the provided message.
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message );
+
+}
+
+/**
+ * Message reporter that reports messages by passing them along to all
+ * registered handlers.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 1.21
+ * @file
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class ObservableMessageReporter implements MessageReporter {
+
+   /**
+* @since 1.21
+*
+* @var MessageReporter[]
+*/
+   protected $reporters = array();
+
+   /**
+* @since 1.21
+*
+* @var callable[]
+*/
+   protected $callbacks = array();
+
+   /**
+* @see MessageReporter::report
+*
+* @since 1.21
+*
+* @param string $message
+*/
+   public function reportMessage( $message ) {
+   foreach ( $this->reporters as $reporter ) {
+   $reporter->reportMessage( $message );
+   }
+
+   foreach ( $this->callbacks as $callback ) {
+   call_user_func( $callback, $message );
+   }
+   }
+
+   /**
+* Register a new message reporter.
+*
+* @since 1.21
+*
+* @param MessageReporter $reporter
+*/
+   public function registerMessageReporter( MessageReporter $reporter ) {
+   $this->reporters[] = $reporter;
+   }
+
+   /**
+* Register a callback as message reporter.
+*
+* @since 1.21
+*
+* @param callable $handler
+*/
+   public function registerReporterCallback( $handler ) {
+   $this->callbacks[] = $handler;
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8575626363e2e57e66016ee5448df4249ab4e9f1
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Kinzler 
Gerrit-Reviewer: Daniel Werner 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: John Erling Blad 
Gerrit-Reviewer: jenkins-bot

[MediaWiki-commits] [Gerrit] Correct paths for FUEL in configuration - change (translatewiki)

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

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


Change subject: Correct paths for FUEL in configuration
..

Correct paths for FUEL in configuration

Change-Id: Ice45db9e1b3d867c91a6f07d70c6b10d967cb016
---
M groups/FUEL/FUEL.yaml
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/13/50713/1

diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 3f08c99..a61edcc 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -46,9 +46,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/desktop/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/desktop/desktop.pot
-  targetPattern: fuel/%CODE%/desktop/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
+  definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/desktop/fuel-desktop-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -63,9 +63,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/mobile/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/mobile/mobile.pot
-  targetPattern: fuel/%CODE%/mobile/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
+  definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/mobile/fuel-mobile-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -80,9 +80,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/web/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/web/web.pot
-  targetPattern: %CODE%/fuel/web/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
+  definitionFile: %GROUPROOT%/fuel/language/en/terminology/web/fuel-web-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher

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

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

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


[MediaWiki-commits] [Gerrit] Also blacklist Bengali - change (translatewiki)

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

Change subject: Also blacklist Bengali
..


Also blacklist Bengali

Spotted by Sankarshan during the Pune translation sprint.

Change-Id: I24358579bd4651b94109a58c7d45f935c63e51ea
---
M groups/FUEL/FUEL.yaml
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 1a7628b..3f08c99 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -15,6 +15,7 @@
   LANGUAGES:
 blacklist:
   - as
+  - bn
   - gu
   - hi
   - kn

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I24358579bd4651b94109a58c7d45f935c63e51ea
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Correct paths for FUEL in configuration - change (translatewiki)

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

Change subject: Correct paths for FUEL in configuration
..


Correct paths for FUEL in configuration

Change-Id: Ice45db9e1b3d867c91a6f07d70c6b10d967cb016
---
M groups/FUEL/FUEL.yaml
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index 3f08c99..a61edcc 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -46,9 +46,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/desktop/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/desktop/desktop.pot
-  targetPattern: fuel/%CODE%/desktop/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
+  definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/desktop/fuel-desktop-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/desktop/fuel-desktop_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -63,9 +63,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/mobile/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/mobile/mobile.pot
-  targetPattern: fuel/%CODE%/mobile/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
+  definitionFile: 
%GROUPROOT%/fuel/language/en/terminology/mobile/fuel-mobile-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/mobile/fuel-mobile_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher
@@ -80,9 +80,9 @@
 
 FILES:
   class: GettextFFS
-  sourcePattern: %GROUPROOT%/fuel/%CODE%/web/translatewiki.net.po
-  definitionFile: %GROUPROOT%/fuel/en/web/web.pot
-  targetPattern: %CODE%/fuel/web/translatewiki.net.po
+  sourcePattern: 
%GROUPROOT%/fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
+  definitionFile: %GROUPROOT%/fuel/language/en/terminology/web/fuel-web-en.pot
+  targetPattern: 
fuel/language/%CODE%/terminology/web/fuel-web_translatewiki.net.po
 
 MANGLER:
   class: StringMatcher

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice45db9e1b3d867c91a6f07d70c6b10d967cb016
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (bug 45249) Comment text diff links in thread history should... - change (mediawiki...LiquidThreads)

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

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


Change subject: (bug 45249) Comment text diff links in thread history should be 
protocol-relative
..

(bug 45249) Comment text diff links in thread history should be 
protocol-relative

Change-Id: I7a310efeaa2d878bec95f6cdca9a8a903aad4b4a
---
M classes/View.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/LiquidThreads 
refs/changes/14/50714/1

diff --git a/classes/View.php b/classes/View.php
index 3a1232d..2f4b5b0 100644
--- a/classes/View.php
+++ b/classes/View.php
@@ -222,7 +222,7 @@
 
static function diffPermalinkURL( $thread, $revision ) {
$query = self::diffQuery( $thread, $revision );
-   return self::permalinkUrl( $thread, null, null, $query, false );
+   return wfExpandUrl( self::permalinkUrl( $thread, null, null, 
$query ) );
}
 
static function diffPermalink( $thread, $text, $revision ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7a310efeaa2d878bec95f6cdca9a8a903aad4b4a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/LiquidThreads
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 

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


[MediaWiki-commits] [Gerrit] Move registration of tests for experimental code to experime... - change (mediawiki...Wikibase)

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

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


Change subject: Move registration of tests for experimental code to 
experimental file
..

Move registration of tests for experimental code to experimental file

Change-Id: I8c3154ca384bcf29b6c0dfb86118bab11c6092fe
---
M repo/Wikibase.hooks.php
M repo/config/Wikibase.experimental.php
2 files changed, 4 insertions(+), 4 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 55587e8..c1c7b88 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -185,10 +185,6 @@
'content/PropertyContent',
'content/PropertyHandler',
 
-   'Database/FieldDefinition',
-   'Database/TableBuilder',
-   'Database/TableDefinition',
-
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index 57d6fb5..d7f23b9 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -96,6 +96,10 @@
'content/QueryContent',
'content/QueryHandler',
 
+   'Database/FieldDefinition',
+   'Database/TableBuilder',
+   'Database/TableDefinition',
+
'specials/SpecialEntityData',
 
);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8c3154ca384bcf29b6c0dfb86118bab11c6092fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 

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


[MediaWiki-commits] [Gerrit] Fix codeMap for FUEL - change (translatewiki)

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

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


Change subject: Fix codeMap for FUEL
..

Fix codeMap for FUEL

Change-Id: Ie59e0adf79edebabe0090a454f76861246acf709
---
M groups/FUEL/FUEL.yaml
1 file changed, 2 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/16/50716/1

diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index a61edcc..440e44a 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -1,4 +1,3 @@

 TEMPLATE:
   BASIC:
 description: "Beta. Unicorns. Bunnies."
@@ -9,8 +8,8 @@
 class: GettextFFS
 keyAlgorithm: simple
 codemap:
-  zh-hant: zh-TW
-  zh-hans: zh-CN
+  zh-hans: zh_CN
+  zh-hant: zh_TW
 
   LANGUAGES:
 blacklist:

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

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

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


[MediaWiki-commits] [Gerrit] Fix codeMap for FUEL - change (translatewiki)

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

Change subject: Fix codeMap for FUEL
..


Fix codeMap for FUEL

Change-Id: Ie59e0adf79edebabe0090a454f76861246acf709
---
M groups/FUEL/FUEL.yaml
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/groups/FUEL/FUEL.yaml b/groups/FUEL/FUEL.yaml
index a61edcc..440e44a 100644
--- a/groups/FUEL/FUEL.yaml
+++ b/groups/FUEL/FUEL.yaml
@@ -1,4 +1,3 @@

 TEMPLATE:
   BASIC:
 description: "Beta. Unicorns. Bunnies."
@@ -9,8 +8,8 @@
 class: GettextFFS
 keyAlgorithm: simple
 codemap:
-  zh-hant: zh-TW
-  zh-hans: zh-CN
+  zh-hans: zh_CN
+  zh-hant: zh_TW
 
   LANGUAGES:
 blacklist:

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie59e0adf79edebabe0090a454f76861246acf709
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Registered Wikibase\Repo\Database classes and added test for... - change (mediawiki...Wikibase)

2013-02-24 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Registered Wikibase\Repo\Database classes and added test for 
FieldDefinition
..


Registered Wikibase\Repo\Database classes and added test for FieldDefinition

Change-Id: I97f40f5b51f6a39e9deaa286b5fdcd4f9b7498a7
---
M repo/Wikibase.hooks.php
M repo/config/Wikibase.experimental.php
M repo/includes/Database/FieldDefinition.php
M repo/includes/Query/SQLStore/Setup.php
A repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
5 files changed, 133 insertions(+), 3 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index c1c7b88..002f238 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -185,6 +185,8 @@
'content/PropertyContent',
'content/PropertyHandler',
 
+   'Database/FieldDefinition',
+
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index e2c7650..57d6fb5 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -46,6 +46,18 @@
 $wgAutoloadClasses['Wikibase\QueryHandler']= $dir . 
'includes/content/QueryHandler.php';
 
 
+
+foreach ( array(
+ 'Wikibase\Repo\Database\FieldDefinition',
+ 'Wikibase\Repo\Database\MediaWikiQueryInterface',
+ 'Wikibase\Repo\Database\QueryInterface',
+ 'Wikibase\Repo\Database\TableBuilder',
+ 'Wikibase\Repo\Database\TableDefinition',
+ ) as $class ) {
+
+   $wgAutoloadClasses[$class] = $dir . 'includes' . str_replace( '\\', 
'/', substr( $class, 13 ) ) . '.php';
+}
+
 if ( !class_exists( 'MessageReporter' ) ) {
$wgAutoloadClasses['MessageReporter'] = $dir . 
'includes/MessageReporter.php';
$wgAutoloadClasses['ObservableMessageReporter'] = $dir . 
'includes/MessageReporter.php';
diff --git a/repo/includes/Database/FieldDefinition.php 
b/repo/includes/Database/FieldDefinition.php
index 9672d3d..01f3024 100644
--- a/repo/includes/Database/FieldDefinition.php
+++ b/repo/includes/Database/FieldDefinition.php
@@ -70,7 +70,7 @@
/**
 * @since 0.4
 *
-* @var string
+* @var string|null
 */
private $index;
 
@@ -96,7 +96,7 @@
 * @param mixed $default
 * @param string|null $attributes
 * @param boolean $null
-* @param string $index
+* @param string|null $index
 * @param boolean $autoIncrement
 *
 * @throws InvalidArgumentException
@@ -114,7 +114,7 @@
throw new InvalidArgumentException( 'The $null 
parameter needs to be a boolean' );
}
 
-   if ( !is_string( $autoIncrement ) ) {
+   if ( !is_null( $index ) && !is_string( $index ) ) {
throw new InvalidArgumentException( 'The $index 
parameter needs to be a string' );
}
 
diff --git a/repo/includes/Query/SQLStore/Setup.php 
b/repo/includes/Query/SQLStore/Setup.php
index 174595e..489026c 100644
--- a/repo/includes/Query/SQLStore/Setup.php
+++ b/repo/includes/Query/SQLStore/Setup.php
@@ -29,6 +29,7 @@
 *
 * @param Store $sqlStore
 * @param TableBuilder $tableBuilder
+* @param MessageReporter|null $messageReporter
 */
public function __construct( Store $sqlStore, TableBuilder 
$tableBuilder, MessageReporter $messageReporter = null ) {
$this->store = $sqlStore;
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
new file mode 100644
index 000..29943f8
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -0,0 +1,115 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class FieldDefinitionTest extends \MediaWikiTestCase {
+
+   public function instanceProvider() {
+   $instances = array();
+
+   $instances[] = new FieldDefinition(
+   'names',
+   FieldDefinition::TYPE_TEXT
+   );
+
+   $instances[] = new FieldDefinition(
+   'numbers',
+   FieldDefinition::TYPE_FLOAT
+   );
+
+   $instances[] = new FieldDefinition(
+   

[MediaWiki-commits] [Gerrit] Remove unused local variable - change (mediawiki...Translate)

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

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


Change subject: Remove unused local variable
..

Remove unused local variable

Change-Id: I53b72da086296668d17d95e05cbe58a1e873b2d4
---
M api/ApiQueryMessageCollection.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/api/ApiQueryMessageCollection.php 
b/api/ApiQueryMessageCollection.php
index 2e06308..dd399a8 100644
--- a/api/ApiQueryMessageCollection.php
+++ b/api/ApiQueryMessageCollection.php
@@ -84,7 +84,6 @@
$messages->loadTranslations();
 
$pages = array();
-   $count = 0;
 
if ( $forwardsOffset !== false ) {
$this->setContinueEnumParameter( 'offset', 
$forwardsOffset );

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

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

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


[MediaWiki-commits] [Gerrit] Remove unused local assignments - change (mediawiki...Translate)

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

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


Change subject: Remove unused local assignments
..

Remove unused local assignments

Change-Id: I7c5bb0277f0912673f52ef0af79d25aec7d5802f
---
M specials/SpecialTranslate.php
M tag/RenderJob.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index f47b207..df21ade 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -641,7 +641,7 @@
}
 
$dbr = wfGetDB( DB_SLAVE );
-   $current = $dbr->selectField(
+   $dbr->selectField(
'translate_groupreviews',
'tgr_state',
array( 'tgr_group' => $this->options['group'], 
'tgr_lang' => $this->options['language'] ),
diff --git a/tag/RenderJob.php b/tag/RenderJob.php
index b577ca0..d428d04 100644
--- a/tag/RenderJob.php
+++ b/tag/RenderJob.php
@@ -64,7 +64,7 @@
PageTranslationHooks::$allowTargetEdit = true;
 
// Do the edit
-   $status = $article->doEdit( $text, $summary, $flags, false, 
$user );
+   $article->doEdit( $text, $summary, $flags, false, $user );
 
PageTranslationHooks::$allowTargetEdit = false;
 

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

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

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


[MediaWiki-commits] [Gerrit] Add type hint - change (mediawiki...Translate)

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

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


Change subject: Add type hint
..

Add type hint

Change-Id: I3b23f8c90f3ea8447ed9eec4777ce1a65d3a4806
---
M tests/MessageIndexTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/MessageIndexTest.php b/tests/MessageIndexTest.php
index 3a5dc72..b7f3590 100644
--- a/tests/MessageIndexTest.php
+++ b/tests/MessageIndexTest.php
@@ -34,6 +34,7 @@
 */
public function testMessageIndexImplementation( $mi ) {
$data = self::getTestData();
+   /** @var MessageIndex $mi */
$mi->store( $data );
 
$tests = array_rand( $data, 10 );
@@ -60,7 +61,6 @@
// Not testing CachedMessageIndex because there is no 
easy way to mockup those.
);
}
-
 }
 
 class TestableDatabaseMessageIndex extends DatabaseMessageIndex {

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

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

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


[MediaWiki-commits] [Gerrit] Added TableDefinitionTest - change (mediawiki...Wikibase)

2013-02-24 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Added TableDefinitionTest
..


Added TableDefinitionTest

Change-Id: Ibdf324d85c3f3093aa46af2d4407a77936711322
---
M repo/Wikibase.hooks.php
A repo/tests/phpunit/includes/Database/TableDefinitionTest.php
2 files changed, 98 insertions(+), 0 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 002f238..5f3e700 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -186,6 +186,7 @@
'content/PropertyHandler',
 
'Database/FieldDefinition',
+   'Database/TableDefinition',
 
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
diff --git a/repo/tests/phpunit/includes/Database/TableDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php
new file mode 100644
index 000..aa7681e
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/TableDefinitionTest.php
@@ -0,0 +1,97 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class TableDefinitionTest extends \MediaWikiTestCase {
+
+   public function instanceProvider() {
+   $instances = array();
+
+   $instances[] = new TableDefinition(
+   'snaks',
+   array(
+   new FieldDefinition( 'omnomnom', 
FieldDefinition::TYPE_TEXT )
+   )
+   );
+
+   $instances[] = new TableDefinition(
+   'spam',
+   array(
+   new FieldDefinition( 'o', 
FieldDefinition::TYPE_TEXT ),
+   new FieldDefinition( 'h', 
FieldDefinition::TYPE_TEXT ),
+   new FieldDefinition( 'i', 
FieldDefinition::TYPE_INTEGER, 42 ),
+   )
+   );
+
+   return $this->arrayWrap( $instances );
+   }
+
+   /**
+* @dataProvider instanceProvider
+*
+* @param TableDefinition $table
+*/
+   public function testReturnValueOfGetName( TableDefinition $table ) {
+   $this->assertInternalType( 'string', $table->getName() );
+
+   $newTable = new TableDefinition( $table->getName(), 
$table->getFields() );
+
+   $this->assertEquals(
+   $table->getName(),
+   $newTable->getName(),
+   'The TableDefinition name is set and obtained correctly'
+   );
+   }
+
+   /**
+* @dataProvider instanceProvider
+*
+* @param TableDefinition $table
+*/
+   public function testReturnValueOfGetFields( TableDefinition $table ) {
+   $this->assertInternalType( 'array', $table->getFields() );
+   $this->assertContainsOnlyInstancesOf( 
'Wikibase\Repo\Database\FieldDefinition', $table->getFields() );
+
+   $newTable = new TableDefinition( $table->getName(), 
$table->getFields() );
+
+   $this->assertEquals(
+   $table->getFields(),
+   $newTable->getFields(),
+   'The TableDefinition fields are set and obtained 
correctly'
+   );
+   }
+
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibdf324d85c3f3093aa46af2d4407a77936711322
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: Daniel Werner 
Gerrit-Reviewer: Jens Ohlig 
Gerrit-Reviewer: John Erling Blad 
Gerrit-Reviewer: Tobias Gritschacher 
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 type hint - change (mediawiki...Translate)

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

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


Change subject: Add type hint
..

Add type hint

Change-Id: I3e61bfa681c947995dc92597554d81efb1d8d113
---
M tests/MessageCollectionTest.php
1 file changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/tests/MessageCollectionTest.php b/tests/MessageCollectionTest.php
index ed2a732..c3e8619 100644
--- a/tests/MessageCollectionTest.php
+++ b/tests/MessageCollectionTest.php
@@ -53,6 +53,7 @@
$collection = $group->initCollection( 'fi' );
$collection->loadTranslations();
 
+   /** @var TMessage $translated */
$translated = $collection['translated'];
$this->assertInstanceof( 'TMessage', $translated );
$this->assertEquals( 'translated', $translated->key() );
@@ -63,6 +64,7 @@
$this->assertEquals( 'translated', $translated->getProperty( 
'status' ), 'message status is translated' );
$this->assertEquals( $revision, $translated->getProperty( 
'revision' ) );
 
+   /** @var TMessage $untranslated */
$untranslated = $collection['untranslated'];
$this->assertInstanceof( 'TMessage', $untranslated );
$this->assertEquals( null, $untranslated->translation(), 'no 
translation is null' );

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

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

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


[MediaWiki-commits] [Gerrit] Add type hint - change (mediawiki...Translate)

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

Change subject: Add type hint
..


Add type hint

Change-Id: I3e61bfa681c947995dc92597554d81efb1d8d113
---
M tests/MessageCollectionTest.php
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/tests/MessageCollectionTest.php b/tests/MessageCollectionTest.php
index ed2a732..c3e8619 100644
--- a/tests/MessageCollectionTest.php
+++ b/tests/MessageCollectionTest.php
@@ -53,6 +53,7 @@
$collection = $group->initCollection( 'fi' );
$collection->loadTranslations();
 
+   /** @var TMessage $translated */
$translated = $collection['translated'];
$this->assertInstanceof( 'TMessage', $translated );
$this->assertEquals( 'translated', $translated->key() );
@@ -63,6 +64,7 @@
$this->assertEquals( 'translated', $translated->getProperty( 
'status' ), 'message status is translated' );
$this->assertEquals( $revision, $translated->getProperty( 
'revision' ) );
 
+   /** @var TMessage $untranslated */
$untranslated = $collection['untranslated'];
$this->assertInstanceof( 'TMessage', $untranslated );
$this->assertEquals( null, $untranslated->translation(), 'no 
translation is null' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e61bfa681c947995dc92597554d81efb1d8d113
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Added TableBuilderTest - change (mediawiki...Wikibase)

2013-02-24 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Added TableBuilderTest
..


Added TableBuilderTest

Change-Id: Ie172ebaf146495941f10e6d265433fe2577e5325
---
M repo/Wikibase.hooks.php
M repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
A repo/tests/phpunit/includes/Database/TableBuilderTest.php
M repo/tests/phpunit/includes/Database/TableDefinitionTest.php
4 files changed, 139 insertions(+), 2 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 5f3e700..55587e8 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -186,6 +186,7 @@
'content/PropertyHandler',
 
'Database/FieldDefinition',
+   'Database/TableBuilder',
'Database/TableDefinition',
 
'specials/SpecialCreateItem',
diff --git a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php 
b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
index 29943f8..122cbfb 100644
--- a/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
+++ b/repo/tests/phpunit/includes/Database/FieldDefinitionTest.php
@@ -5,7 +5,7 @@
 use Wikibase\Repo\Database\FieldDefinition;
 
 /**
- * Unit test Wikibase\Repo\Database\FieldDefinitionTest class.
+ * Unit test Wikibase\Repo\Database\FieldDefinition class.
  *
  * 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
diff --git a/repo/tests/phpunit/includes/Database/TableBuilderTest.php 
b/repo/tests/phpunit/includes/Database/TableBuilderTest.php
new file mode 100644
index 000..aa2d33f
--- /dev/null
+++ b/repo/tests/phpunit/includes/Database/TableBuilderTest.php
@@ -0,0 +1,136 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ * @since 0.4
+ *
+ * @ingroup WikibaseRepoTest
+ *
+ * @group Wikibase
+ * @group WikibaseRepo
+ * @group WikibaseDatabase
+ *
+ * @licence GNU GPL v2+
+ * @author Jeroen De Dauw < jeroended...@gmail.com >
+ */
+class TableBuilderTest extends \MediaWikiTestCase {
+
+   public function tableNameProvider() {
+   return $this->arrayWrap(
+   array(
+   'foo',
+   'bar',
+   'o',
+   'foo_bar_baz',
+   'foobarbaz',
+   )
+   );
+   }
+
+   /**
+* @dataProvider tableNameProvider
+*/
+   public function testCreateTableCallsTableExists( $tableName ) {
+   $table = new TableDefinition(
+   $tableName,
+   array( new FieldDefinition( 'foo', 
FieldDefinition::TYPE_TEXT ) )
+   );
+
+   $reporter = new NullMessageReporter();
+
+   $queryInterface = new ObservableQueryInterface();
+
+   $assertEquals = array( $this, 'assertEquals' );
+   $callCount = 0;
+
+   $queryInterface->registerCallback(
+   'tableExists',
+   function( $tableName ) use ( $table, &$callCount, 
$assertEquals ) {
+   call_user_func( $assertEquals, 
$table->getName(), $tableName );
+   $callCount += 1;
+   }
+   );
+
+   $builder = new TableBuilder( $queryInterface, $reporter );
+
+   $builder->createTable( $table );
+   $this->assertEquals( 1, $callCount );
+   }
+
+}
+
+use Wikibase\Repo\Database\QueryInterface;
+
+class ObservableQueryInterface implements QueryInterface {
+
+   /**
+* @var callable[]
+*/
+   private $callbacks = array();
+
+   /**
+* @param string $method
+* @param callable $callback
+*/
+   public function registerCallback( $method, $callback ) {
+   $this->callbacks[$method] = $callback;
+   }
+
+   private function runCallbacks( $method, $args ) {
+   if ( array_key_exists( $method, $this->callbacks ) ) {
+   call_user_func_array( $this->callbacks[$method], $args 
);
+   }
+   }
+
+   /**
+* @see QueryInterface::tableExists
+*
+* @param string $tableName
+*
+* @return boolean
+*/
+   public function tableExists( $tableName ) {
+   $this->runCallbacks( __FUNCTION__, func_get_args() );
+   }
+
+}
+
+use MessageReporter;
+
+class NullMessageReporter implements MessageReporter {
+
+   /**
+* @see MessageReporter::reportMessage
+*
+* @since 0.4
+*
+* @param string $message
+*/
+   public function reportMessag

[MediaWiki-commits] [Gerrit] Remove unused local variable - change (mediawiki...Translate)

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

Change subject: Remove unused local variable
..


Remove unused local variable

Change-Id: I53b72da086296668d17d95e05cbe58a1e873b2d4
---
M api/ApiQueryMessageCollection.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/api/ApiQueryMessageCollection.php 
b/api/ApiQueryMessageCollection.php
index 2e06308..dd399a8 100644
--- a/api/ApiQueryMessageCollection.php
+++ b/api/ApiQueryMessageCollection.php
@@ -84,7 +84,6 @@
$messages->loadTranslations();
 
$pages = array();
-   $count = 0;
 
if ( $forwardsOffset !== false ) {
$this->setContinueEnumParameter( 'offset', 
$forwardsOffset );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I53b72da086296668d17d95e05cbe58a1e873b2d4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Remove unused local assignments - change (mediawiki...Translate)

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

Change subject: Remove unused local assignments
..


Remove unused local assignments

Change-Id: I7c5bb0277f0912673f52ef0af79d25aec7d5802f
---
M specials/SpecialTranslate.php
M tag/RenderJob.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/specials/SpecialTranslate.php b/specials/SpecialTranslate.php
index f47b207..df21ade 100644
--- a/specials/SpecialTranslate.php
+++ b/specials/SpecialTranslate.php
@@ -641,7 +641,7 @@
}
 
$dbr = wfGetDB( DB_SLAVE );
-   $current = $dbr->selectField(
+   $dbr->selectField(
'translate_groupreviews',
'tgr_state',
array( 'tgr_group' => $this->options['group'], 
'tgr_lang' => $this->options['language'] ),
diff --git a/tag/RenderJob.php b/tag/RenderJob.php
index b577ca0..d428d04 100644
--- a/tag/RenderJob.php
+++ b/tag/RenderJob.php
@@ -64,7 +64,7 @@
PageTranslationHooks::$allowTargetEdit = true;
 
// Do the edit
-   $status = $article->doEdit( $text, $summary, $flags, false, 
$user );
+   $article->doEdit( $text, $summary, $flags, false, $user );
 
PageTranslationHooks::$allowTargetEdit = false;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c5bb0277f0912673f52ef0af79d25aec7d5802f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add type hint - change (mediawiki...Translate)

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

Change subject: Add type hint
..


Add type hint

Change-Id: I3b23f8c90f3ea8447ed9eec4777ce1a65d3a4806
---
M tests/MessageIndexTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/MessageIndexTest.php b/tests/MessageIndexTest.php
index 3a5dc72..b7f3590 100644
--- a/tests/MessageIndexTest.php
+++ b/tests/MessageIndexTest.php
@@ -34,6 +34,7 @@
 */
public function testMessageIndexImplementation( $mi ) {
$data = self::getTestData();
+   /** @var MessageIndex $mi */
$mi->store( $data );
 
$tests = array_rand( $data, 10 );
@@ -60,7 +61,6 @@
// Not testing CachedMessageIndex because there is no 
easy way to mockup those.
);
}
-
 }
 
 class TestableDatabaseMessageIndex extends DatabaseMessageIndex {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b23f8c90f3ea8447ed9eec4777ce1a65d3a4806
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Move registration of tests for experimental code to experime... - change (mediawiki...Wikibase)

2013-02-24 Thread John Erling Blad (Code Review)
John Erling Blad has submitted this change and it was merged.

Change subject: Move registration of tests for experimental code to 
experimental file
..


Move registration of tests for experimental code to experimental file

Change-Id: I8c3154ca384bcf29b6c0dfb86118bab11c6092fe
---
M repo/Wikibase.hooks.php
M repo/config/Wikibase.experimental.php
2 files changed, 4 insertions(+), 4 deletions(-)

Approvals:
  John Erling Blad: Verified; Looks good to me, approved



diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index 55587e8..c1c7b88 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -185,10 +185,6 @@
'content/PropertyContent',
'content/PropertyHandler',
 
-   'Database/FieldDefinition',
-   'Database/TableBuilder',
-   'Database/TableDefinition',
-
'specials/SpecialCreateItem',
'specials/SpecialItemDisambiguation',
'specials/SpecialItemByTitle',
diff --git a/repo/config/Wikibase.experimental.php 
b/repo/config/Wikibase.experimental.php
index 57d6fb5..d7f23b9 100644
--- a/repo/config/Wikibase.experimental.php
+++ b/repo/config/Wikibase.experimental.php
@@ -96,6 +96,10 @@
'content/QueryContent',
'content/QueryHandler',
 
+   'Database/FieldDefinition',
+   'Database/TableBuilder',
+   'Database/TableDefinition',
+
'specials/SpecialEntityData',
 
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c3154ca384bcf29b6c0dfb86118bab11c6092fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: John Erling Blad 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix for generating a template field if no property and "disp... - change (mediawiki...SemanticForms)

2013-02-24 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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


Change subject: Fix for generating a template field if no property and 
"display-if-not-empty"
..

Fix for generating a template field if no property and "display-if-not-empty"

Change-Id: I3b9d2a175787f8eb2356f01135daeef99c897dd8
---
M includes/SF_TemplateField.php
1 file changed, 6 insertions(+), 2 deletions(-)


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

diff --git a/includes/SF_TemplateField.php b/includes/SF_TemplateField.php
index 1588684..7f3b442 100644
--- a/includes/SF_TemplateField.php
+++ b/includes/SF_TemplateField.php
@@ -238,14 +238,18 @@
// Value column
if ( $template_format == 'standard' || $template_format 
== 'infobox' ) {
if ( $field->mDisplay == 'hidden' ) {
-   } elseif ( $field->mDisplay == 'hidden' ) {
+   } elseif ( $field->mDisplay == 'nonempty' ) {
$tableText .= "{{!}} ";
} else {
$tableText .= "| ";
}
}
if ( !$field->mSemanticProperty ) {
-   $tableText .= "{{{" . $field->mFieldName . 
"|}}}\n";
+   $tableText .= "{{{" . $field->mFieldName . 
"|}}}";
+   if ( $field->mDisplay == 'nonempty' ) {
+   $tableText .= " }}";
+   }
+   $tableText .= "\n";
} elseif ( !is_null( $setInternalText ) ) {
$tableText .= "{{{" . $field->mFieldName . 
"|}}}\n";
if ( $field->mIsList ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b9d2a175787f8eb2356f01135daeef99c897dd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] Fix for generating a template field if no property and "disp... - change (mediawiki...SemanticForms)

2013-02-24 Thread Yaron Koren (Code Review)
Yaron Koren has submitted this change and it was merged.

Change subject: Fix for generating a template field if no property and 
"display-if-not-empty"
..


Fix for generating a template field if no property and "display-if-not-empty"

Change-Id: I3b9d2a175787f8eb2356f01135daeef99c897dd8
---
M includes/SF_TemplateField.php
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/includes/SF_TemplateField.php b/includes/SF_TemplateField.php
index 1588684..7f3b442 100644
--- a/includes/SF_TemplateField.php
+++ b/includes/SF_TemplateField.php
@@ -238,14 +238,18 @@
// Value column
if ( $template_format == 'standard' || $template_format 
== 'infobox' ) {
if ( $field->mDisplay == 'hidden' ) {
-   } elseif ( $field->mDisplay == 'hidden' ) {
+   } elseif ( $field->mDisplay == 'nonempty' ) {
$tableText .= "{{!}} ";
} else {
$tableText .= "| ";
}
}
if ( !$field->mSemanticProperty ) {
-   $tableText .= "{{{" . $field->mFieldName . 
"|}}}\n";
+   $tableText .= "{{{" . $field->mFieldName . 
"|}}}";
+   if ( $field->mDisplay == 'nonempty' ) {
+   $tableText .= " }}";
+   }
+   $tableText .= "\n";
} elseif ( !is_null( $setInternalText ) ) {
$tableText .= "{{{" . $field->mFieldName . 
"|}}}\n";
if ( $field->mIsList ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3b9d2a175787f8eb2356f01135daeef99c897dd8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
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 45336 Add messages used in the mediawiki.org ExtensionDi... - change (mediawiki...WikimediaMessages)

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

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


Change subject: bug 45336 Add messages used in the mediawiki.org 
ExtensionDistributor
..

bug 45336 Add messages used in the mediawiki.org ExtensionDistributor

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


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

diff --git a/WikimediaMessages.i18n.php b/WikimediaMessages.i18n.php
index 1e8e482..e801182 100644
--- a/WikimediaMessages.i18n.php
+++ b/WikimediaMessages.i18n.php
@@ -237,6 +237,11 @@
 
# Added by the WLM mobile app
'upload-more-photos-of-this-monument' => 'Upload more photos of this 
monument',
+
+   # Extension distributor messages for mediawiki.org
+   'extdist-branch-master' => 'master (latest development version)',
+   'extdist-branch-REL1_20' => '1.20 (latest stable MediaWiki)',
+   'extdist-branch-REL1_19' => '1.19',
 );
 
 /** Message documentation (Message documentation)
@@ -463,6 +468,9 @@
 {{Identical/Wikimedia-licensing}}',
'wikimedia-translationnotifications-signup-legal' => 'Legal text about 
the notifications sent to translators.',
'upload-more-photos-of-this-monument' => 'This message is addded by the 
WLM app linking to the upload wizard with the parameters set for a new upload 
of the same monument.',
+   'extdist-branch-master' => 'Message used for an extensions git master 
version; the latest development version',
+   'extdist-branch-REL1_20' => 'Message used for an extension branched for 
MediaWiki version 1.20, which is currently the latest stable MediaWiki 
release.',
+   'extdist-branch-REL1_19' => 'Message used for an extension branched for 
MediaWiki version 1.19',
 );
 
 /** Abkhazian (Аҧсшәа)

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

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

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


[MediaWiki-commits] [Gerrit] Add i18n message documentation - change (mediawiki...GoogleSiteSearch)

2013-02-24 Thread Fo0bar (Code Review)
Fo0bar has submitted this change and it was merged.

Change subject: Add i18n message documentation
..


Add i18n message documentation

Per https://www.mediawiki.org/wiki/I18n#Message_documentation

Change-Id: I6d141112e02e6e84625b7740e241d6797ba5da67
---
M GoogleSiteSearch.i18n.php
1 file changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/GoogleSiteSearch.i18n.php b/GoogleSiteSearch.i18n.php
index f4bc3d9..4d55071 100644
--- a/GoogleSiteSearch.i18n.php
+++ b/GoogleSiteSearch.i18n.php
@@ -9,9 +9,16 @@
 
 /** English (English) */
 $messages['en'] = array(
-   'googlesitesearch' => 'GoogleSiteSearch',
'googlesitesearch-desc' => 'Adds [//www.google.com/cse/manage/all 
Google CSE site search] to wiki search results',
-   'googlesitesearch-loading' => 'Loading',
+   'googlesitesearch-loading' => 'Loading...',
'googlesitesearch-google-results' => 'Google site results',
'googlesitesearch-wiki-results' => 'Wiki results',
 );
+
+/** Message documentation (Message documentation) */
+$messages['qqq'] = array(
+   'googlesitesearch-desc' => 'Special:Version description of the 
extension.',
+   'googlesitesearch-loading' => 'Displayed before the Google CSE 
JavaScript replaces it with the actual search results.  Wiki markup is not 
allowed here; message will be converted to escaped HTML.',
+   'googlesitesearch-google-results' => 'The title sub-header for the 
Google CSE results section.',
+   'googlesitesearch-wiki-results' => 'The title sub-header for the 
MediaWiki search results section.',
+);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6d141112e02e6e84625b7740e241d6797ba5da67
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/GoogleSiteSearch
Gerrit-Branch: master
Gerrit-Owner: Fo0bar 
Gerrit-Reviewer: Fo0bar 
Gerrit-Reviewer: Raimond Spekking 
Gerrit-Reviewer: Siebrand 

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


[MediaWiki-commits] [Gerrit] Add i18n message documentation - change (mediawiki...SecureHTML)

2013-02-24 Thread Fo0bar (Code Review)
Fo0bar has uploaded a new change for review.

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


Change subject: Add i18n message documentation
..

Add i18n message documentation

Per https://www.mediawiki.org/wiki/I18n#Message_documentation .
Also, adjust URL to https for Translatewiki.net.

Change-Id: I3676fa787bde90b14ed3dad6d737f0c31359beef
---
M SecureHTML.i18n.php
M SecureHTML.php
2 files changed, 22 insertions(+), 1 deletion(-)


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

diff --git a/SecureHTML.i18n.php b/SecureHTML.i18n.php
index d2254c5..9e88de3 100644
--- a/SecureHTML.i18n.php
+++ b/SecureHTML.i18n.php
@@ -27,3 +27,24 @@
'securehtml-inputinstructions' => 'Enter a key name (optional), key 
secret, and desired raw HTML.  If no key name is specified, the first key in 
wgSecureHTMLSecrets will be assumed.',
'securehtml-outputinstructions' => 'Copy the code above EXACTLY and 
paste it into the wiki editor.  If the generated code does not work, try 
removing all linefeeds from the input HTML and re-generate.',
 );
+
+/** Message documentation (Message documentation) */
+$messages['qqq'] = array(
+   'securehtml' => 'The title of Special:SecureHTML; also seen in 
Special:SpecialPages.',
+   'securehtml-desc' => 'Special:Version description of the extension.',
+   'securehtml-nokeys' => 'Rendered by the  tag when the extension 
is not configured.  "wgSecureHTMLSecrets" is a global variable and should not 
be translated.',
+   'securehtml-legacykeys' => 'Special:SecureHTML: Warning message, 
displayed when the user is using a legacy configuration.  "wgSecureHTMLSecrets" 
is a global variable and should not be translated.',
+   'securehtml-invalidhash' => 'Rendered by the  tag when an 
invalid hash is calculated.',
+   'securehtml-invalidversion' => 'Rendered by the  tag when an 
invalid version is given.',
+   'securehtml-input-title' => 'Special:SecureHTML: The title sub-header 
for the HTML input form section.',
+   'securehtml-generatedoutput-title' => 'Special:SecureHTML: The title 
sub-header for the calculated code output of the user input.',
+   'securehtml-renderedhhtml-title' => 'Special:SecureHTML: The title 
sub-header for the rendered output of the user input.',
+   'securehtml-form-version' => 'Special:SecureHTML: Input form item title 
for the hash key version.',
+   'securehtml-form-deprecated' => 'Special:SecureHTML: Applied as a short 
descriptive warning after elements in the input form which are deprecated.  For 
example, "1 (deprecated)" in the version dropdown menu, or "oldkeyname 
(deprecated)" in the key name dropdown menu.',
+   'securehtml-form-keyname' => 'Special:SecureHTML: Input form item title 
for the hash key name.',
+   'securehtml-form-keysecret' => 'Special:SecureHTML: Input form item 
title for the hash key secret.',
+   'securehtml-form-html' => 'Special:SecureHTML: Input form item title 
for the HTML input box.',
+   'securehtml-form-submit' => 'Special:SecureHTML: Input form submit 
button text.',
+   'securehtml-inputinstructions' => 'Special:SecureHTML: Instructions for 
filling in the input form.  "wgSecureHTMLSecrets" is a global variable and 
should not be translated.',
+   'securehtml-outputinstructions' => 'Special:SecureHTML: Instructions 
using the output returned by filling in the input form.',
+);
diff --git a/SecureHTML.php b/SecureHTML.php
index 3f9f001..cc7864c 100644
--- a/SecureHTML.php
+++ b/SecureHTML.php
@@ -37,7 +37,7 @@
'path' => __FILE__,
'name' => 'Secure HTML',
'author' => 'Ryan Finnie',
-   'url' => 'http://www.mediawiki.org/wiki/Extension:Secure_HTML',
+   'url' => 'https://www.mediawiki.org/wiki/Extension:Secure_HTML',
'descriptionmsg' => 'securehtml-desc',
'version' => '2.2.1',
 );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3676fa787bde90b14ed3dad6d737f0c31359beef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecureHTML
Gerrit-Branch: master
Gerrit-Owner: Fo0bar 

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


[MediaWiki-commits] [Gerrit] (bug 44804) Automatic flipping for LTR and RTL. Also: - change (mediawiki...GuidedTour)

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

Change subject: (bug 44804) Automatic flipping for LTR and RTL.  Also:
..


(bug 44804) Automatic flipping for LTR and RTL.  Also:

* Flip using Guiders' clock metaphor, not using CSSJanus (it can't support the 
dynamic absolute positioning)
* Bump submodule for a CSSJanus change in it, plus the document ready 
reposition.
* Add documentation for this and the skin overrides.
* Minor formatting and refactoring

Change-Id: I6e5a2cf35a20dd4aec1aaf29fa2bfbaee21265ae
---
M modules/ext.guidedTour.css
M modules/ext.guidedTour.lib.js
M modules/externals/mediawiki.libs.guiders/mediawiki.libs.guiders.submodule
3 files changed, 105 insertions(+), 10 deletions(-)

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



diff --git a/modules/ext.guidedTour.css b/modules/ext.guidedTour.css
index 6680a90..72809af 100644
--- a/modules/ext.guidedTour.css
+++ b/modules/ext.guidedTour.css
@@ -94,6 +94,11 @@
height: 23px;
 }
 
+/**
+   Since Guiders uses dynamic absolute positioning, the elements below need to 
be flipped at a higher level.
+*/
+
+/* @noflip */
 .guider_arrow_right {
background-position: 0 -58px;
right: -40px;
@@ -108,6 +113,8 @@
background-position: 0 -92px;
top: -23px;
 }
+
+/* @noflip */
 .guider_arrow_left {
background-position: 0 -24px;
left: -40px;
diff --git a/modules/ext.guidedTour.lib.js b/modules/ext.guidedTour.lib.js
index 3def3b1..4c0dfdb 100644
--- a/modules/ext.guidedTour.lib.js
+++ b/modules/ext.guidedTour.lib.js
@@ -12,7 +12,6 @@
'use strict';
 
var gt = mw.guidedTour = mw.guidedTour || {},
-   MW_NS_TOUR_PREFIX = 'MediaWiki:Guidedtour-tour-',
skin = mw.config.get( 'skin' ),
messageParser = new mw.jqueryMsg.parser(),
userId = mw.config.get( 'wgUserId' ),
@@ -132,6 +131,17 @@
}
 
/**
+* Gets the tour module name.  This does not guarantee there is such a 
module.
+*
+* @param {string} tourName tour name
+*
+* @return {string} tour module name
+*/
+   function getTourModuleName( tourName ) {
+   return 'ext.guidedTour.tour.' + tourName;
+   }
+
+   /**
 * Launch a tour.  Tours start themselves, but this allows one tour to 
launch
 * another.
 *
@@ -146,7 +156,9 @@
 * @param {string} tourId id of tour (optional)
 */
gt.launchTour = function ( tourName, tourId ) {
-   var tourModuleName, onWikiTourUrl;
+   var tourModuleName,
+   onWikiTourUrl,
+   MW_NS_TOUR_PREFIX = 'MediaWiki:Guidedtour-tour-';
 
if ( !tourId ) {
tourId = gt.makeTourId( {
@@ -157,10 +169,10 @@
 
// Called if we successfully loaded the tour
function resume() {
-   guiders.resume(tourId);
+   guiders.resume( tourId );
}
 
-   tourModuleName = 'ext.guidedTour.tour.' + tourName;
+   tourModuleName = getTourModuleName( tourName );
if ( mw.loader.getState( tourModuleName ) !== null ) {
mw.loader.using( tourModuleName, resume, function ( 
err, dependencies ) {
mw.log( 'Failed to load tour ', tourModuleName,
@@ -715,13 +727,68 @@
}
 
/**
+* Determines whether we should horizontally flip the guider due to 
LTR/RTL
+*
+* Considers the HTML element's dir attribute and body LTR/RTL classes 
in addition
+* to parameter.
+*
+* @param {boolean} isExtensionDefined true if the tour is 
extension-defined,
+* false otherwise
+*
+* @return {boolean} true if steps should be flipped, false otherwise
+*/
+   function getShouldFlipHorizontally( isExtensionDefined ) {
+   var tourDirection, interfaceDirection, siteDirection, $body;
+
+   $body = $( document.body );
+
+   // Main direction of the site
+   siteDirection = $body.is( '.sitedir-ltr' ) ? 'ltr' : 'rtl';
+
+   // Direction the interface is being viewed in.
+   // This can be changed by user preferences or uselang
+   interfaceDirection = $( 'html' ).attr( 'dir' );
+
+   // Direction the tour is assumed to be written for
+   tourDirection = isExtensionDefined ? 'ltr' : siteDirection;
+
+   // We flip if needed to match the interface direction
+   return tourDirection !== interfaceDirection;
+   }
+
+   /**
+* Flips a Guiders position horizontally, and returns the new version.
+*
+* @param {string} position original position
+*
+* 

  1   2   >