[MediaWiki-commits] [Gerrit] Add replace_space function - change (analytics/webstatscollector)

2013-03-01 Thread Diederik (Code Review)
Diederik has submitted this change and it was merged.

Change subject: Add replace_space function
..


Add replace_space function

  Added tests, added test file, fixed replace_space

Change-Id: Ic795c876105fe8a1a980f83a0c07a5ba2011fff5
---
M Makefile
A README.tests
A entries-with-urls-with-spaces-2013-02-10.txt
M filter.c
A test.sh
5 files changed, 80 insertions(+), 35 deletions(-)

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



diff --git a/Makefile b/Makefile
index b05321b..25451a7 100644
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,14 @@
 
 all: collector filter
 
-collector: collector.h collector.c export.c
+collector: collector.h collector.c export.c export.o
+   gcc -o collector collector.c export.o -ldb -lpthread
 
 filter: filter.c
-   cc -o filter filter.c
+   gcc -o filter filter.c
 
-#export: collector.h export.c
+export.o: export.c collector.h collector.c filter.c
+   gcc -c -o export.o export.c
 
 clean:
-   rm -f collector exporter
+   rm -f *.o collector filter
diff --git a/README.tests b/README.tests
new file mode 100644
index 000..c14927e
--- /dev/null
+++ b/README.tests
@@ -0,0 +1,7 @@
+
+
+The test lines in entries-with-urls-with-spaces-2013-02-10.txt were produced 
like this:
+
+   zcat /home/user/wikidata/raw_gzips/sampled-1000.tab.log-20130210.gz | perl 
-ne '@f=split(/\t/); print if index($f[8]," ")!=-1;'  > 
entries-with-urls-with-spaces-2013-02-10.txt
+
+After this head -40 | tail -30  was applied in order for the filter to accept 
all of them (some of them were influenced by some the discarding rules of the 
filter).
diff --git a/entries-with-urls-with-spaces-2013-02-10.txt 
b/entries-with-urls-with-spaces-2013-02-10.txt
new file mode 100644
index 000..abb6648
--- /dev/null
+++ b/entries-with-urls-with-spaces-2013-02-10.txt
@@ -0,0 +1,30 @@
+ssl1002338866312   2013-02-09T10:00:09.126 1.667   0.0.0.0 
FAKE_CACHE_STATUS/301   667 GET 
https://fr.wikipedia.org/wiki/Discussion:Bourail/Droit d'auteur NONE/wikipedia  
-   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl1004347282202   2013-02-09T10:18:11.367 0.082   0.0.0.0 
FAKE_CACHE_STATUS/301   675 GET 
https://fr.wikipedia.org/wiki/Discussion:Chemin\xC3\xA9e solaire/Traduction 
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+https://www.google.com/bot.html) 
-   -
+ssl1004349592952   2013-02-09T12:19:04.972 0.079   0.0.0.0 
FAKE_CACHE_STATUS/301   667 GET 
https://fr.wikipedia.org/wiki/\xC3\x89tienne Perrot (psychanalyste) 
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl1001338735382   2013-02-09T12:57:51.173 0.201   0.0.0.0 
FAKE_CACHE_STATUS/301   759 GET http://ja.wikipedia.org/wiki/CODE NAME. 
1 Brother 
Sun\xE3\x80\x90\xE5\x88\x9D\xE5\x9B\x9E\xE7\x94\x9F\xE7\x94\xA3\xE9\x99\x90\xE5\xAE\x9A\xE3\x80\x91(\xE7\xB4\x99\xE3\x82\xB8\xE3\x83\xA3\xE3\x82\xB1\xE3\x83\x83\xE3\x83\x88\xE4\xBB\x95\xE6\xA7\x98)
 NONE/wikipedia  -   -   -   foobar2000/1.1.14a  -   -
+ssl1001340768664   2013-02-09T14:29:25.274 0.351   0.0.0.0 
FAKE_CACHE_STATUS/301   885 GET 
http://ja.wikipedia.org/wiki/\xE7\x89\xB9\xE5\x88\xA5:\xE3\x83\x87\xE3\x83\xBC\xE3\x82\xBF\xE6\x9B\xB8\xE3\x81\x8D\xE5\x87\xBA\xE3\x81\x97/\xE3\x82\x82\xE3\x82\x82\xE3\x81\x84\xE3\x82\x8D\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x90\xE3\x83\xBCZ
 1st Live 
\xE3\x81\xAB\xE3\x83\x95\xE3\x83\xA9\xE3\x83\xB3\xE3\x82\xB9\xE4\xBA\xBA\xE5\xA4\xA7\xE8\x88\x88\xE5\xA5\xAE\xEF\xBC\x81\xE3\x83\x91\xE3\x83\xAAde
 Japan Expo NONE/wikipedia  -   -   -   
Mozilla/4.0%20(compatible;%20MSIE%207.0;%20Windows%20NT%206.0)  -   -
+ssl3002764325222   2013-02-09T14:35:55.799 0.088   0.0.0.0 
FAKE_CACHE_STATUS/301   1247GET http://en.wikipedia.org/wiki/Chopin - 
The Piano Works (Brilliant Classics) (CD4 of 13)_(album)  NONE/wikipedia  - 
  -   -   foobar2000/1.2  -   -
+ssl1002345415572   2013-02-09T15:10:39.804 0.051   0.0.0.0 
FAKE_CACHE_STATUS/301   674 GET 
https://fr.wikipedia.org/wiki/Portail:Indianapolis/Index th\xC3\xA9matique  
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl3002769405948   2013-02-09T15:36:59.442 0.408   0.0.0.0 
FAKE_CACHE_STATUS/301   1270GET https://en.wikipedia.org/wiki/Kevin 
Smith   NONE/wikipedia  -   -   -   
Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:18.0)%20Gecko/20100101%20Firefox/18.0
en-US,en;q=0.5  -
+ssl1004354242982   2013-02-09T15:40:02.553 0.061   0.0.0.0 
FAKE_CACHE_STATUS/301   677 GET 
https://fr.wiki

[MediaWiki-commits] [Gerrit] Set favicon for donatewiki - change (operations/mediawiki-config)

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

Change subject: Set favicon for donatewiki
..


Set favicon for donatewiki

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f8eeefb..6e3f466 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9217,6 +9217,7 @@
'chapcomwiki'   => 
'//bits.wikimedia.org/favicon/chapcom.ico',
'checkuserwiki' => 
'//bits.wikimedia.org/favicon/community.ico',
'commonswiki'   => 
'//bits.wikimedia.org/favicon/commons.ico',
+   'donatewiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'foundationwiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'grantswiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'incubatorwiki' => 
'//bits.wikimedia.org/favicon/incubator.ico',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d0aa6e2deea930a9eb69a2ecd0b4e6ab3df8f4f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] (FR #823) bt does not need special forms for AVS - change (mediawiki/core)

2013-03-01 Thread Mwalker (Code Review)
Mwalker has submitted this change and it was merged.

Change subject: (FR #823) bt does not need special forms for AVS
..


(FR #823) bt does not need special forms for AVS

Change-Id: I4c8714fe0024855651851a1e37be4a8209505e73
---
M DonationInterfaceFormSettings.php
1 file changed, 2 insertions(+), 21 deletions(-)

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

Objections:
  jenkins-bot: Fails



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index 9e4e1e0..d1528d3 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -30,30 +30,11 @@
'gateway' => 'globalcollect',
'countries' => array(
//  '+' => 'ALL',
-   '-' => array('CA','US'),
),
'currencies' => array(
-   '+' => array('AED', 'BGN', 'BHD', 'CLP', 'CZK', 'DKK', 'EEK', 
'EGP', 'EUR', 'HRK',
+   '+' => array('AED', 'BGN', 'BHD', 'CAD', 'CLP', 'CZK', 'DKK', 
'EEK', 'EGP', 'EUR', 'HRK',
 'HUF', 'IDR', 'JPY', 'LBP', 'MXN', 
'MYR', 'NOK', 'NZD', 'PEN', 'PLN',
 'QAR', 'RON', 'RUB', 'SEK', 'THB', 
'TRY', 'TWD', 'USD', 'ZAR'),
-   ),
-   'payment_methods' => array('bt' => 'ALL')
-);
-
-$forms_whitelist['bt-CA'] = array(
-   'file' => $form_dirs['gc'] . '/bt/bt-CA.html',
-   'gateway' => 'globalcollect',
-   'countries' => array(
-   '+' => 'CA',
-   ),
-   'payment_methods' => array('bt' => 'ALL')
-);
-
-$forms_whitelist['bt-US'] = array(
-   'file' => $form_dirs['gc'] . '/bt/bt-US.html',
-   'gateway' => 'globalcollect',
-   'countries' => array(
-   '+' => 'US',
),
'payment_methods' => array('bt' => 'ALL')
 );
@@ -428,4 +409,4 @@
 unset( $forms_whitelist );
 unset( $form_dirs );
 unset( $wgGlobalCollectGatewayAllowedHtmlForms );
-unset( $wgPayflowProGatewayAllowedHtmlForms );
\ No newline at end of file
+unset( $wgPayflowProGatewayAllowedHtmlForms );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c8714fe0024855651851a1e37be4a8209505e73
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/1.20
Gerrit-Owner: Adamw 
Gerrit-Reviewer: Mwalker 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Set favicon for donatewiki - change (operations/mediawiki-config)

2013-03-01 Thread Tim Starling (Code Review)
Tim Starling has uploaded a new change for review.

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


Change subject: Set favicon for donatewiki
..

Set favicon for donatewiki

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index f8eeefb..6e3f466 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -9217,6 +9217,7 @@
'chapcomwiki'   => 
'//bits.wikimedia.org/favicon/chapcom.ico',
'checkuserwiki' => 
'//bits.wikimedia.org/favicon/community.ico',
'commonswiki'   => 
'//bits.wikimedia.org/favicon/commons.ico',
+   'donatewiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'foundationwiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'grantswiki'=> 
'//bits.wikimedia.org/favicon/wmf.ico',
'incubatorwiki' => 
'//bits.wikimedia.org/favicon/incubator.ico',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d0aa6e2deea930a9eb69a2ecd0b4e6ab3df8f4f
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Tim Starling 

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


[MediaWiki-commits] [Gerrit] Updated builder-corrected-tag fixup to add placeholders always. - change (mediawiki...Parsoid)

2013-03-01 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has uploaded a new change for review.

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


Change subject: Updated builder-corrected-tag fixup to add placeholders always.
..

Updated builder-corrected-tag fixup to add placeholders always.

* echo "|foo" would parse to an empty string because this would
  parse to a tr-token which the builder strips but leaves behind
  a mw:StartTag meta-marker. findBuilderCorrectedTags function
  wasn't properly processing these markers and possibly other
  markers as well.

* Fixed addPlaceholderMeta helper function to be smarter and fix
  this up.  With this patch, this wikitext snippet now parses and
  RTs correctly.  There are notes in the file about possible
  improvements which makes this text editable (currently VE will
  likely ignore content wrapped in mw:Placeholder metas).

* 2 more wt2wt tests now green.

* Improves RT-ing of en:Drum tabs.

Change-Id: I259bd235b8b11bff706a30a13f29723c21cef892
---
M js/lib/mediawiki.DOMPostProcessor.js
1 file changed, 46 insertions(+), 13 deletions(-)


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

diff --git a/js/lib/mediawiki.DOMPostProcessor.js 
b/js/lib/mediawiki.DOMPostProcessor.js
index 8426339..66e70c4 100644
--- a/js/lib/mediawiki.DOMPostProcessor.js
+++ b/js/lib/mediawiki.DOMPostProcessor.js
@@ -1450,19 +1450,49 @@
}
}
 
-   function addPlaceholderMeta( node, dp, name ) {
-   var placeHolder = node.ownerDocument.createElement('meta'),
-   // TODO: pass in more precise source!
-   endSrc = dp.src ||
-   ( DU.hasLiteralHTMLMarker(dp) ?
- '' : '' );
+   function addPlaceholderMeta( node, dp, name, opts ) {
+   var src = dp.src;
 
-   if (!endSrc && dp.tsr) {
-   endSrc = env.page.src.substring(dp.tsr[0], dp.tsr[1]);
+   if (!src) {
+   if (dp.tsr) {
+   src = env.page.src.substring(dp.tsr[0], 
dp.tsr[1]);
+   } else if (opts.tsr) {
+   src = env.page.src.substring(opts.tsr[0], 
opts.tsr[1]);
+   } else if (DU.hasLiteralHTMLMarker(dp)) {
+   if (opts.start) {
+   src = "<" + name + ">";
+   } else if (opts.end) {
+   src = "";
+   }
+   }
}
-   if ( endSrc ) {
+
+   if ( src ) {
+   var placeHolder;
+
+   /**
+* SSS FIXME: We can do better with these checks and 
introducing
+* plain text instead of a placeholder.  However, in 
some cases,
+* it does introduce nowiki escaping if this src has 
leading spaces
+* that could be parsed as pres.
+*
+* A possibly fix for this is to wrap this in a span 
with a public
+* attribute that tells WTS that this doesn't need 
escaping which
+* would have to be cleared by VE if that text gets 
edited.
+*
+* Another fix would be for nowiki escaping to get 
smarter.
+*
+* But for now, leaving this note in place and using 
placeholders.
+*
+   if (opts.start && (name === 'tr' || name === 'td' || 
name === 'th')) {
+   placeHolder = 
node.ownerDocument.createTextNode(src);
+   } else {
+   }
+   **/
+
+   placeHolder = node.ownerDocument.createElement('meta'),
placeHolder.setAttribute('typeof', 'mw:Placeholder');
-   DU.setDataParsoid(placeHolder, {src: endSrc});
+   DU.setDataParsoid(placeHolder, {src: src});
 
// Insert the placeHolder
node.parentNode.insertBefore(placeHolder, node);
@@ -1562,17 +1592,20 @@
// Not found, the tag 
was stripped. Insert an
// mw:Placeholder for 
round-tripping

//console.log('autoinsertedEnd', c.innerHTML, c.parentNode.innerHTML);
-   addPlaceholderMeta(c, 
dp, expectedName);
+   addPlaceholderMeta(c, 
dp, expectedName, {end: true});
 
 

[MediaWiki-commits] [Gerrit] CSS changes for question mark and move core notices down. - change (mediawiki...GettingStarted)

2013-03-01 Thread Massaf (Code Review)
Massaf has uploaded a new change for review.

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


Change subject: CSS changes for question mark and move core notices down.
..

CSS changes for question mark and move core notices down.

Patch 3 (Munaf):
Re-aligned question mark icon.

Change-Id: I811a710d45cba2f5f3564c9c6d6ad7f2eb4c5499
---
M resources/ext.gettingstarted.accountcreation.js
M resources/ext.gettingstarted.css
2 files changed, 18 insertions(+), 14 deletions(-)


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

diff --git a/resources/ext.gettingstarted.accountcreation.js 
b/resources/ext.gettingstarted.accountcreation.js
index 53a296e..56b5b99 100644
--- a/resources/ext.gettingstarted.accountcreation.js
+++ b/resources/ext.gettingstarted.accountcreation.js
@@ -5,6 +5,7 @@
$returnTo = $( '#mw-returnto' ),
$returnToA = $returnTo.find( 'a' ),
$onboardingContainer = $( '.onboarding-container' ),
+   $notices,
state,
url;
 
@@ -18,9 +19,14 @@
$returnTo.empty().append( $returnToA );
$onboardingContainer.append( $returnTo );
 
-   state = {}; // Currently unused
-   url = mw.util.wikiGetlink( 'Special:GettingStarted' );
+   // Mainly intended for email confirmation message, but others 
are possible.
+   // There is not a more specific selector in core for this.
+   $notices = $( '#mw-content-text > p' );
+   $notices.insertAfter( $onboardingContainer );
+
if ( history.replaceState ) {
+   state = {}; // Currently unused
+   url = mw.util.wikiGetlink( 'Special:GettingStarted' );
history.replaceState( state, title, url );
}
} );
diff --git a/resources/ext.gettingstarted.css b/resources/ext.gettingstarted.css
index cda8abf..7e34b28 100644
--- a/resources/ext.gettingstarted.css
+++ b/resources/ext.gettingstarted.css
@@ -17,19 +17,16 @@
 
 .onboarding-help {
display: inline-block;
-   margin-left: 0.5em;
-   color: #999;
-   font-weight: bold;
-   font-size: 11px;
-   line-height: 11px;
-   width: 16px;
-   height: 16px;
-   text-align: center;
+   vertical-align: text-bottom;
 }
 
-.onboarding-help:hover {
-   color: #222;
+.onboarding-help img {
+   opacity: 0.6;
+}
+
+.onboarding-help img:hover {
cursor: pointer;
+   opacity: 1;
 }
 
 /* Header Banner */
@@ -98,8 +95,9 @@
-o-filter: grayscale(0%);
 }
 
-/* Email Notification */
-#mw-content-text > p:first-child {
+/* Notifications */
+/* Core currently doesn't offer any more stable selector. */
+#mw-content-text > p {
font-size: 0.8em;
color: gray;
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I811a710d45cba2f5f3564c9c6d6ad7f2eb4c5499
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/GettingStarted
Gerrit-Branch: master
Gerrit-Owner: Massaf 
Gerrit-Reviewer: Mattflaschen 

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


[MediaWiki-commits] [Gerrit] (bug 22317) Do not prevent unification if home wiki is blocked - change (mediawiki...CentralAuth)

2013-03-01 Thread CSteipp (Code Review)
CSteipp has submitted this change and it was merged.

Change subject: (bug 22317) Do not prevent unification if home wiki is blocked
..


(bug 22317) Do not prevent unification if home wiki is blocked

This check didn't make to much sense as right now it's by far
easier for stewards to stop a vandal using one global account
than having to deal with several local ones.

Change-Id: I32384d6423d3cb633f99cdcd2745f8ce6d8c597e
---
M CentralAuth.i18n.php
M CentralAuthUser.php
M specials/SpecialMergeAccount.php
3 files changed, 1 insertion(+), 19 deletions(-)

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



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index 1a15aab..026f35c 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -68,10 +68,6 @@
'centralauth-not-owner-text'  => 'The username "$1" was automatically 
assigned to the owner of the account on $2.
 
 If this is you, you can finish the login unification process simply by typing 
the master password for that account here:',
-   'centralauth-blocked-text'=> 'Your home wiki (listed below) is 
blocked from editing.
-Please contact an administrator in this wiki to unblock it.
-While it is blocked, you cannot merge your accounts.',
-
'centralauth-notice-dryrun'   => "Demo mode 
only",
 
'centralauth-disabled-dryrun' => "Account unification is currently in a 
demo / debugging mode, so actual merging operations are disabled.
@@ -440,7 +436,6 @@
 Status message after successful unification of a user account.',
'centralauth-incomplete-text' => '{{doc-important|Please leave 
{{msg|Centralauth-groupname|text={{int:Centralauth-groupname
 exactly as it is.}}
 Status message after incomplete unification of a user account.',
-   'centralauth-blocked-text' => 'Status message after failed unification 
of a user account because a wiki is closed.',
'centralauth-notice-dryrun' => 'Message displayed while account 
unification is in demonstration mode.',
'centralauth-disabled-dryrun' => 'Message displayed while account 
unification is disabled.',
'centralauth-error-locked' => "Message displayed while account 
unification is not possible because the acting user's account is locked.",
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index 6dc2d72..88718dc 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -747,12 +747,6 @@
$home = $this->chooseHomeWiki( $migrationSet );
$local = $migrationSet[$home];
 
-   // If home account is blocked...
-   if ( $local['blocked'] ) {
-   wfDebugLog( 'CentralAuth', "dry run: $home blocked, 
forbid migration" );
-   return Status::newFatal( 'centralauth-blocked-text' );
-   }
-
// And we need to match the home wiki before proceeding...
if ( $this->matchHashes( $passwords, $local['id'], 
$local['password'] ) ) {
wfDebugLog( 'CentralAuth', "dry run: passed password 
match to home $home" );
@@ -797,11 +791,6 @@
$home = $migrationSet[$this->mHomeWiki];
$this->mEmail = $home['email'];
$this->mEmailAuthenticated = $home['emailAuthenticated'];
-
-   if ( $home['blocked'] ) {
-   wfDebugLog( 'CentralAuth', $this->mHomeWiki . ' 
blocked, forbid migration' );
-   return false;
-   }
 
$attach = $this->prepareMigration( $migrationSet, $passwords );
 
diff --git a/specials/SpecialMergeAccount.php b/specials/SpecialMergeAccount.php
index 5e9ced4..add62f9 100644
--- a/specials/SpecialMergeAccount.php
+++ b/specials/SpecialMergeAccount.php
@@ -209,9 +209,7 @@
$this->getOutput()->addHTML( '' );
 
// Show wiki list if required
-   if ( $status->hasMessage( 'centralauth-blocked-text' )
-   || $status->hasMessage( 
'centralauth-merge-home-password' ) )
-   {
+   if ( $status->hasMessage( 
'centralauth-merge-home-password' ) ) {
$out = '' . $this->msg( 
'centralauth-list-home-title' )->escaped() . '';
$out .= $this->msg( 
'centralauth-list-home-dryrun' )->parseAsBlock();
$out .= $this->listAttached( array( $home ), 
array( $home => 'primary' ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I32384d6423d3cb633f99cdcd2745f8ce6d8c597e
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Hoo man 

___
Media

[MediaWiki-commits] [Gerrit] Revert "pulling db1043 and shifting watchlist q's to db1050" - change (operations/mediawiki-config)

2013-03-01 Thread Asher (Code Review)
Asher has submitted this change and it was merged.

Change subject: Revert "pulling db1043 and shifting watchlist q's to db1050"
..


Revert "pulling db1043 and shifting watchlist q's to db1050"

This reverts commit d617b6fceb04887b8659f33534516a04e6e6acb7

Change-Id: I4f8ff87c8b3d4b843ada59b6f7a79ad1cd4b4189
---
M wmf-config/db-eqiad.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 43b2951..179eaa4 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -85,7 +85,7 @@
'db1042'=> 400, # 1.4TB sas
'db1049'=> 500, # 2.8TB sas
'db1050'=> 0, # snapshot 2.8TB sas
-   # 'db1043'=> 100, # 1.4TB sas, special contrib, watchlist, 
etc
+   'db1043'=> 100, # 1.4TB sas, special contrib, watchlist, etc
),
's2' => array(
'db1034'=> 0,
@@ -149,16 +149,16 @@
 'groupLoadsByDB' => array(
'enwiki' => array(
'watchlist' => array(
-   'db1050' => 1,
+   'db1043' => 1,
),
'recentchangeslinked' => array(
-   'db1050' => 1,
+   'db1043' => 1,
),
'contributions' => array(
-   'db1050' => 1,
+   'db1043' => 1,
),
'dump' => array(
-   'db1050' => 1,
+   'db1043' => 1,
),
),
 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4f8ff87c8b3d4b843ada59b6f7a79ad1cd4b4189
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Asher 
Gerrit-Reviewer: Asher 
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 44126: Avoid API call to check watch status on pages - change (mediawiki...MobileFrontend)

2013-03-01 Thread Jdlrobson (Code Review)
Jdlrobson has submitted this change and it was merged.

Change subject: Bug 44126: Avoid API call to check watch status on pages
..


Bug 44126: Avoid API call to check watch status on pages

Instead pass as a config variable that can be looked up before making
an ajax request

Change-Id: If90d3b55060e52e423d309a67c9b567e4183bcd8
---
M MobileFrontend.php
M includes/MobileFrontend.hooks.php
M javascripts/modules/mf-watchstar.js
3 files changed, 47 insertions(+), 1 deletion(-)

Approvals:
  JGonera: Looks good to me, but someone else must approve
  Jdlrobson: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/MobileFrontend.php b/MobileFrontend.php
index 455e4e6..62f2cd7 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -83,6 +83,7 @@
 $wgHooks['APIGetDescription'][] = 'ApiParseExtender::onAPIGetDescription';
 $wgHooks['OpenSearchXml'][] = 'ApiQueryExtracts::onOpenSearchXml';
 
+$wgHooks['MakeGlobalVariablesScript'][] = 
'MobileFrontendHooks::onMakeGlobalVariablesScript';
 $wgHooks['RequestContextCreateSkin'][] = 
'MobileFrontendHooks::onRequestContextCreateSkin';
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 
'MobileFrontendHooks::onSkinTemplateOutputPageBeforeExec';
 $wgHooks['BeforePageRedirect'][] = 'MobileFrontendHooks::onBeforePageRedirect';
diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 07cbca0..899a5df 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -10,6 +10,27 @@
 
 class MobileFrontendHooks {
 
+
+   /**
+* MakeGlobalVariablesScript hook handler
+* @see 
http://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript
+* Adds various mobile specific config variables
+*
+* @param array &$vars
+* @param OutputPage $out
+* @return boolean
+*/
+   public static function onMakeGlobalVariablesScript( &$vars, $out ) {
+   $title = $out->getTitle();
+   $user = $out->getUser();
+   if ( !$user->isAnon() ) {
+   $vars[ 'wgWatchedPageCache' ] = array(
+   $title->getText() => $user->isWatched( $title ),
+   );
+   }
+   return true;
+   }
+
/**
 * RequestContextCreateSkin hook handler
 * @see 
https://www.mediawiki.org/wiki/Manual:Hooks/RequestContextCreateSkin
diff --git a/javascripts/modules/mf-watchstar.js 
b/javascripts/modules/mf-watchstar.js
index 6eaa4ce..21d2360 100644
--- a/javascripts/modules/mf-watchstar.js
+++ b/javascripts/modules/mf-watchstar.js
@@ -93,7 +93,13 @@
 
}
 
-   function checkWatchStatus( titles, callback ) {
+   /**
+* Checks whether a list of article titles are being watched by the 
current user via ajax request to server
+*
+* @param {Array} titles: A list of titles to check the watchlist 
status of
+* @param {Function} callback: A callback that is passed a json of 
mappings from title to booleans describing whether page is watched
+*/
+   function asyncCheckWatchStatus( titles, callback ) {
$.ajax( {
url:  M.getApiUrl(), dataType: 'json',
data: {
@@ -116,6 +122,24 @@
} );
}
 
+   /**
+* Checks whether a list of article titles are being watched by the 
current user
+* Checks a local cache before making a query to server
+*
+* @param {Array} titles: A list of titles to check the watchlist 
status of
+* @param {Function} callback: A callback that is passed a json of 
mappings from title to booleans describing whether page is watched
+*/
+   function checkWatchStatus( titles, callback ) {
+   var cache = mw.config.get( 'wgWatchedPageCache' ) || {};
+   // check local cache in case where only one title is passed
+   // FIXME: allow this to work for more than one title
+   if ( titles.length === 1 && typeof cache[ titles[ 0 ] ] !== 
'undefined' ) {
+   callback( cache );
+   } else {
+   asyncCheckWatchStatus( titles, callback );
+   }
+   }
+
function initWatchListIcon( container, title ) {
 
api.getToken( 'watch', function( data ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If90d3b55060e52e423d309a67c9b567e4183bcd8
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Brion VIBBER 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot


[MediaWiki-commits] [Gerrit] Add replace_space function - change (analytics/webstatscollector)

2013-03-01 Thread Demon (Code Review)
Demon has uploaded a new change for review.

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


Change subject: Add replace_space function
..

Add replace_space function

  Added tests, added test file, fixed replace_space

Change-Id: Ic795c876105fe8a1a980f83a0c07a5ba2011fff5
---
M Makefile
A README.tests
A entries-with-urls-with-spaces-2013-02-10.txt
M filter.c
A test.sh
5 files changed, 80 insertions(+), 35 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/webstatscollector 
refs/changes/80/51680/1

diff --git a/Makefile b/Makefile
index b05321b..25451a7 100644
--- a/Makefile
+++ b/Makefile
@@ -14,12 +14,14 @@
 
 all: collector filter
 
-collector: collector.h collector.c export.c
+collector: collector.h collector.c export.c export.o
+   gcc -o collector collector.c export.o -ldb -lpthread
 
 filter: filter.c
-   cc -o filter filter.c
+   gcc -o filter filter.c
 
-#export: collector.h export.c
+export.o: export.c collector.h collector.c filter.c
+   gcc -c -o export.o export.c
 
 clean:
-   rm -f collector exporter
+   rm -f *.o collector filter
diff --git a/README.tests b/README.tests
new file mode 100644
index 000..c14927e
--- /dev/null
+++ b/README.tests
@@ -0,0 +1,7 @@
+
+
+The test lines in entries-with-urls-with-spaces-2013-02-10.txt were produced 
like this:
+
+   zcat /home/user/wikidata/raw_gzips/sampled-1000.tab.log-20130210.gz | perl 
-ne '@f=split(/\t/); print if index($f[8]," ")!=-1;'  > 
entries-with-urls-with-spaces-2013-02-10.txt
+
+After this head -40 | tail -30  was applied in order for the filter to accept 
all of them (some of them were influenced by some the discarding rules of the 
filter).
diff --git a/entries-with-urls-with-spaces-2013-02-10.txt 
b/entries-with-urls-with-spaces-2013-02-10.txt
new file mode 100644
index 000..abb6648
--- /dev/null
+++ b/entries-with-urls-with-spaces-2013-02-10.txt
@@ -0,0 +1,30 @@
+ssl1002338866312   2013-02-09T10:00:09.126 1.667   0.0.0.0 
FAKE_CACHE_STATUS/301   667 GET 
https://fr.wikipedia.org/wiki/Discussion:Bourail/Droit d'auteur NONE/wikipedia  
-   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl1004347282202   2013-02-09T10:18:11.367 0.082   0.0.0.0 
FAKE_CACHE_STATUS/301   675 GET 
https://fr.wikipedia.org/wiki/Discussion:Chemin\xC3\xA9e solaire/Traduction 
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+https://www.google.com/bot.html) 
-   -
+ssl1004349592952   2013-02-09T12:19:04.972 0.079   0.0.0.0 
FAKE_CACHE_STATUS/301   667 GET 
https://fr.wikipedia.org/wiki/\xC3\x89tienne Perrot (psychanalyste) 
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl1001338735382   2013-02-09T12:57:51.173 0.201   0.0.0.0 
FAKE_CACHE_STATUS/301   759 GET http://ja.wikipedia.org/wiki/CODE NAME. 
1 Brother 
Sun\xE3\x80\x90\xE5\x88\x9D\xE5\x9B\x9E\xE7\x94\x9F\xE7\x94\xA3\xE9\x99\x90\xE5\xAE\x9A\xE3\x80\x91(\xE7\xB4\x99\xE3\x82\xB8\xE3\x83\xA3\xE3\x82\xB1\xE3\x83\x83\xE3\x83\x88\xE4\xBB\x95\xE6\xA7\x98)
 NONE/wikipedia  -   -   -   foobar2000/1.1.14a  -   -
+ssl1001340768664   2013-02-09T14:29:25.274 0.351   0.0.0.0 
FAKE_CACHE_STATUS/301   885 GET 
http://ja.wikipedia.org/wiki/\xE7\x89\xB9\xE5\x88\xA5:\xE3\x83\x87\xE3\x83\xBC\xE3\x82\xBF\xE6\x9B\xB8\xE3\x81\x8D\xE5\x87\xBA\xE3\x81\x97/\xE3\x82\x82\xE3\x82\x82\xE3\x81\x84\xE3\x82\x8D\xE3\x82\xAF\xE3\x83\xAD\xE3\x83\xBC\xE3\x83\x90\xE3\x83\xBCZ
 1st Live 
\xE3\x81\xAB\xE3\x83\x95\xE3\x83\xA9\xE3\x83\xB3\xE3\x82\xB9\xE4\xBA\xBA\xE5\xA4\xA7\xE8\x88\x88\xE5\xA5\xAE\xEF\xBC\x81\xE3\x83\x91\xE3\x83\xAAde
 Japan Expo NONE/wikipedia  -   -   -   
Mozilla/4.0%20(compatible;%20MSIE%207.0;%20Windows%20NT%206.0)  -   -
+ssl3002764325222   2013-02-09T14:35:55.799 0.088   0.0.0.0 
FAKE_CACHE_STATUS/301   1247GET http://en.wikipedia.org/wiki/Chopin - 
The Piano Works (Brilliant Classics) (CD4 of 13)_(album)  NONE/wikipedia  - 
  -   -   foobar2000/1.2  -   -
+ssl1002345415572   2013-02-09T15:10:39.804 0.051   0.0.0.0 
FAKE_CACHE_STATUS/301   674 GET 
https://fr.wikipedia.org/wiki/Portail:Indianapolis/Index th\xC3\xA9matique  
NONE/wikipedia  -   -   -   
Mozilla/5.0%20(compatible;%20Googlebot/2.1;%20+http://www.google.com/bot.html)  
-   -
+ssl3002769405948   2013-02-09T15:36:59.442 0.408   0.0.0.0 
FAKE_CACHE_STATUS/301   1270GET https://en.wikipedia.org/wiki/Kevin 
Smith   NONE/wikipedia  -   -   -   
Mozilla/5.0%20(X11;%20Linux%20x86_64;%20rv:18.0)%20Gecko/20100101%20Firefox/18.0
en-US,en;q=0.5  -
+ssl1004354242982   2013-02-09T15:40:02.553 0.061  

[MediaWiki-commits] [Gerrit] Forms support for Boletos - change (mediawiki...DonationInterface)

2013-03-01 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Forms support for Boletos
..


Forms support for Boletos

Change-Id: I1dcaac35bfc4d0bc42fa3b5f6ab44b6b699c1a62
---
M donationinterface.php
M gateway_common/DonationData.php
M gateway_common/interface.i18n.php
M gateway_forms/RapidHtml.php
M gateway_forms/rapidhtml/RapidHtmlResources.php
M globalcollect_gateway/forms/html/_personal-information/default.html
A globalcollect_gateway/forms/html/cash/boletos.html
A globalcollect_gateway/forms/js/gc.boletos.js
M globalcollect_gateway/globalcollect.adapter.php
M modules/validate_input.js
10 files changed, 183 insertions(+), 10 deletions(-)

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



diff --git a/donationinterface.php b/donationinterface.php
index 5aa90d4..16bbe05 100644
--- a/donationinterface.php
+++ b/donationinterface.php
@@ -901,6 +901,7 @@
'donate_interface-error-msg-card_num',
'donate_interface-error-msg-expiration',
'donate_interface-error-msg-cvv',
+   'donate_interface-error-msg-fiscal_number',
'donate_interface-error-msg-captcha',
'donate_interface-error-msg-captcha-please',
'donate_interface-error-msg-cookies',
diff --git a/gateway_common/DonationData.php b/gateway_common/DonationData.php
index e10f652..a3b10ef 100644
--- a/gateway_common/DonationData.php
+++ b/gateway_common/DonationData.php
@@ -132,6 +132,7 @@
'date_collect' => $wgRequest->getText( 
'date_collect', null ),
'direct_debit_text' => $wgRequest->getText( 
'direct_debit_text', null ),
'iban' => $wgRequest->getText( 'iban', null ),
+   'fiscal_number' => $wgRequest->getText( 
'fiscal_number', null ),
'transaction_type' => $wgRequest->getText( 
'transaction_type', null ),
'form_name' => $wgRequest->getText( 
'form_name', null ),
'ffname' => $wgRequest->getText( 'ffname', null 
),
diff --git a/gateway_common/interface.i18n.php 
b/gateway_common/interface.i18n.php
index e6c6006..aeb5e31 100644
--- a/gateway_common/interface.i18n.php
+++ b/gateway_common/interface.i18n.php
@@ -166,6 +166,7 @@
'donate_interface-donor-security' => 'Security code',
'donate_interface-donor-submit' => 'Donate',
'donate_interface-donor-currency-msg' => 'This donation is being made 
in $1',
+   'donate_interface-donor-fiscal_number' => 'Fiscal number',
'donate_interface-card-name-amex' => 'American Express',
'donate_interface-card-name-visa' => 'Visa',
'donate_interface-card-name-mc' => 'MasterCard',
@@ -202,6 +203,7 @@
'donate_interface-error-msg-cookies' => 'Please enable cookies in your 
browser.',
'donate_interface-error-msg-genaricrequired' => 'This field is 
required',
'donate_interface-error-msg-country-calc' => 'Error - We are unable to 
accept your donation at this time.',
+   'donate_interface-error-msg-fiscal_number' => 'fiscal number',
'donate_interface-donate-error-try-a-different-card' => 'Please [$1 try 
a different card] or one of our [$2 other ways to give] or contact us at $3',
'donate_interface-donate-error-thank-you-for-your-support' => 'Thank 
you for your support!',
'php-response-declined' => 'Your transaction could not be accepted.',
diff --git a/gateway_forms/RapidHtml.php b/gateway_forms/RapidHtml.php
index c9b9aea..0b6a93a 100644
--- a/gateway_forms/RapidHtml.php
+++ b/gateway_forms/RapidHtml.php
@@ -69,6 +69,8 @@
'@bank_name',
'@bank_check_digit',
 '@branch_code',
+   // Boletos
+   '@fiscal_number',
// Not actually data tokens, but available to you in html form:
// @captcha -> the captcha form
// @script_path -> maps to $wgScriptPath 
@@ -99,6 +101,7 @@
'#state',
'#zip',
'#emailAdd',
+   '#fiscal_number',
);
 
public function __construct( &$gateway ) {
diff --git a/gateway_forms/rapidhtml/RapidHtmlResources.php 
b/gateway_forms/rapidhtml/RapidHtmlResources.php
index edc90cf..7f2388a 100644
--- a/gateway_forms/rapidhtml/RapidHtmlResources.php
+++ b/gateway_forms/rapidhtml/RapidHtmlResources.php
@@ -145,7 +145,6 @@
 $wgResourceModules[ 'gc.form.rapidhtml.dd' ] = array(
'styles' => 'css/gc.css',
'scripts' => array(
-// 'js/gc.js',
'js/gc.dd.js'
),
 // 'dependencies' => array( 'di.form.core.validate' ),
@@ -155,13 +154,21 @@
 $wgResourceModules[ 'gc.form.rapidhtml.ew' ] = array(
'styles' => 'css/gc.css',
'scripts' => array(
-'

[MediaWiki-commits] [Gerrit] Boletos supported by gatewayformchooser - change (mediawiki/core)

2013-03-01 Thread Katie Horn (Code Review)
Katie Horn has submitted this change and it was merged.

Change subject: Boletos supported by gatewayformchooser
..


Boletos supported by gatewayformchooser

Change-Id: Ieecb3815f0bc05d7361685c51dbd49526808058c
---
M DonationInterfaceFormSettings.php
1 file changed, 16 insertions(+), 0 deletions(-)

Approvals:
  Katie Horn: Verified; Looks good to me, approved

Objections:
  jenkins-bot: Fails



diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index c05d5d7..9e4e1e0 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -404,6 +404,22 @@
'recurring'
 );
 
+/*
+ * Boletos
+ */
+
+$forms_whitelist['boletos'] = array(
+   'file' => $form_dirs['gc'] . '/cash/boletos.html',
+   'gateway' => 'globalcollect',
+   'payment_methods' => array('cash' => 'boleto'),
+   'countries' => array(
+   '+' => array('BR'),
+   ),
+   'currencies' => array(
+   '+' => array('BRL'),
+   ),
+);
+
 
 //Yes: We definitely want to blow away everything that didn't come from this 
file. 
 $wgDonationInterfaceAllowedHtmlForms = $forms_whitelist;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieecb3815f0bc05d7361685c51dbd49526808058c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/1.20
Gerrit-Owner: Katie Horn 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Used empty string instead of null for lock in setglobalaccou... - change (mediawiki...CentralAuth)

2013-03-01 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Used empty string instead of null for lock in 
setglobalaccountstatus API
..


Used empty string instead of null for lock in setglobalaccountstatus API

For this kind of unset value, no other API module uses null.
Also, null causes invalid XML from paraminfo.

Change-Id: I54295e81b68db44770aaf1f0e8df7d0a4d807505
---
M api/ApiSetGlobalAccountStatus.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/api/ApiSetGlobalAccountStatus.php 
b/api/ApiSetGlobalAccountStatus.php
index 38ce990..5cf2407 100644
--- a/api/ApiSetGlobalAccountStatus.php
+++ b/api/ApiSetGlobalAccountStatus.php
@@ -153,7 +153,7 @@
ApiBase::PARAM_TYPE => array(
'lock',
'unlock',
-   null // Unset - basically means 'do not 
modify lock status'
+   '' // Unset - basically means 'do not 
modify lock status'
)
),
'hidden' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I54295e81b68db44770aaf1f0e8df7d0a4d807505
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Petr Onderka 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Hoo man 
Gerrit-Reviewer: Petr Onderka 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Removing end comments marks from Sofort-GB form - change (mediawiki...DonationInterface)

2013-03-01 Thread Adamw (Code Review)
Adamw has submitted this change and it was merged.

Change subject: Removing end comments marks from Sofort-GB form
..


Removing end comments marks from Sofort-GB form

Whoops :p

Change-Id: Ie6c21d45cf0b4f8c99ad1418d6435809a91fb4b5
---
M globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
index 24a1928..8df3bb0 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
@@ -65,8 +65,8 @@






-   
-->
-   
-->
+   

+   








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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie6c21d45cf0b4f8c99ad1418d6435809a91fb4b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker 
Gerrit-Reviewer: Adamw 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Boletos supported by gatewayformchooser - change (mediawiki/core)

2013-03-01 Thread Katie Horn (Code Review)
Katie Horn has uploaded a new change for review.

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


Change subject: Boletos supported by gatewayformchooser
..

Boletos supported by gatewayformchooser

Change-Id: Ieecb3815f0bc05d7361685c51dbd49526808058c
---
M DonationInterfaceFormSettings.php
1 file changed, 16 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/79/51679/1

diff --git a/DonationInterfaceFormSettings.php 
b/DonationInterfaceFormSettings.php
index c05d5d7..9e4e1e0 100644
--- a/DonationInterfaceFormSettings.php
+++ b/DonationInterfaceFormSettings.php
@@ -404,6 +404,22 @@
'recurring'
 );
 
+/*
+ * Boletos
+ */
+
+$forms_whitelist['boletos'] = array(
+   'file' => $form_dirs['gc'] . '/cash/boletos.html',
+   'gateway' => 'globalcollect',
+   'payment_methods' => array('cash' => 'boleto'),
+   'countries' => array(
+   '+' => array('BR'),
+   ),
+   'currencies' => array(
+   '+' => array('BRL'),
+   ),
+);
+
 
 //Yes: We definitely want to blow away everything that didn't come from this 
file. 
 $wgDonationInterfaceAllowedHtmlForms = $forms_whitelist;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieecb3815f0bc05d7361685c51dbd49526808058c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/1.20
Gerrit-Owner: Katie Horn 
Gerrit-Reviewer: Adamw 

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


[MediaWiki-commits] [Gerrit] Removing end comments marks from Sofort-GB form - change (mediawiki...DonationInterface)

2013-03-01 Thread Mwalker (Code Review)
Mwalker has uploaded a new change for review.

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


Change subject: Removing end comments marks from Sofort-GB form
..

Removing end comments marks from Sofort-GB form

Whoops :p

Change-Id: Ie6c21d45cf0b4f8c99ad1418d6435809a91fb4b5
---
M globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/78/51678/1

diff --git a/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html 
b/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
index 24a1928..8df3bb0 100644
--- a/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
+++ b/globalcollect_gateway/forms/html/rtbt/rtbt-sofo-GB.html
@@ -65,8 +65,8 @@






-   
-->
-   
-->
+   

+   








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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6c21d45cf0b4f8c99ad1418d6435809a91fb4b5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mwalker 

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


[MediaWiki-commits] [Gerrit] (bug 18057) Add conflict detection for status - change (mediawiki...CentralAuth)

2013-03-01 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: (bug 18057) Add conflict detection for status
..


(bug 18057) Add conflict detection for status

Adds a hash of the current locked and hidden values for a user in the
form submission. If another admin has updated the user's status, then
the conflict will be detected and the operation aborted.

The hash can be optionally passed with an api request, to optionally
perform the conflict detection. The MD5 should be easy to calculate in
any code using the api.

Change-Id: Ia985e152ccabb77454f0eb87bbb78f0e220d5674
---
M CentralAuth.i18n.php
M CentralAuthUser.php
M api/ApiSetGlobalAccountStatus.php
M specials/SpecialCentralAuth.php
4 files changed, 29 insertions(+), 1 deletion(-)

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



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index a554ad1..cb6bc1c 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -186,6 +186,7 @@
'centralauth-admin-nonexistent'=> 'There is no global account 
for "$1"',
'centralauth-admin-delete-nonexistent' => 'Error: the global account 
"$1" does not exist.',
'centralauth-token-mismatch'   => 'Sorry, we could not process 
your form submission due to a loss of session data.',
+   'centralauth-state-mismatch'   => 'Error: An edit conflict for 
this user was detected. Please verify your change and try again.',
'centralauth-admin-reason' => 'Reason:',
'centralauth-admin-reason-other'   => 'Other/additional reason:',
'centralauth-admin-unhide-nonexistent' => 'Error: the global account 
"$1" does not exist.',
@@ -614,6 +615,7 @@
 *{{msg-mw|Centralauth-admin-status-hidden-list}}
 *{{msg-mw|Centralauth-admin-status-hidden-oversight}}',
'centralauth-admin-not-authorized' => "Error message when the user 
doesn't have permission",
+   'centralauth-state-mismatch' => 'Error message when another admin has 
updated the user, and an edit conflict was detected',
'centralauth-listusers-locked' => "This message is used as user's info:
 *{{msg-mw|centralauth-listusers-locked}}
 *{{msg-mw|centralauth-listusers-attached}}
diff --git a/CentralAuthUser.php b/CentralAuthUser.php
index e07f3d2..f6a1dd7 100644
--- a/CentralAuthUser.php
+++ b/CentralAuthUser.php
@@ -2354,4 +2354,16 @@
public function attachedOn( $wiki ) {
return $this->exists() && in_array( $wiki, 
$this->mAttachedArray );
}
+
+   /**
+* Get a hash representing the user/locked/hidden state of this user,
+* used to check for edit conflicts
+*
+* @param $recache - force a reload of the user from the database
+* @return String
+*/
+   public function getStateHash( $recache = false ) {
+   $this->loadState( $recache );
+   return md5( $this->mGlobalId . ':' . $this->mName . ':' . 
$this->mHidden . ':' . (int) $this->mLocked );
+   }
 }
diff --git a/api/ApiSetGlobalAccountStatus.php 
b/api/ApiSetGlobalAccountStatus.php
index 38ce990..0519603 100644
--- a/api/ApiSetGlobalAccountStatus.php
+++ b/api/ApiSetGlobalAccountStatus.php
@@ -45,8 +45,13 @@
$setLocked = $this->getParameter( 'locked' ) == 'lock';
$setHidden = $this->getParameter( 'hidden' );
$reason = $this->getParameter( 'reason' );
+   $stateCheck = $this->getParameter( 'statecheck' );
$isLocked = $globalUser->isLocked();
$oldHiddenLevel = $globalUser->getHiddenLevel();
+
+   if ( $stateCheck && $stateCheck !== $globalUser->getStateHash( 
true ) ) {
+   $this->dieUsage( "Edit conflict detected, Aborting." );
+   }
 
if (
$setHidden !== null && // hidden is set
@@ -170,6 +175,10 @@
ApiBase::PARAM_TYPE => 'string',
ApiBase::PARAM_REQUIRED => true
),
+   'statecheck' => array(
+   ApiBase::PARAM_TYPE => 'string',
+   ApiBase::PARAM_REQUIRED => false
+   ),
);
}
 
@@ -179,7 +188,8 @@
'locked' => 'Change whether this user is locked or 
not.',
'hidden' => 'Change whether this user is not hidden, 
hidden from lists, or suppressed.',
'reason' => "Reason for changing the user's status.",
-   'token' => 'Your edit token.'
+   'token' => 'Your edit token.',
+   'statecheck' => 'Optional MD5 of the expected current 
::, to detect edit conflicts. Set  to 1 for 
locked, 0 for unlocked.'
);
}
 
diff --git a/specials/SpecialCentralAuth.php b/spe

[MediaWiki-commits] [Gerrit] adapts lucene classes for beta - change (operations/puppet)

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

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


Change subject: adapts lucene classes for beta
..

adapts lucene classes for beta

Change-Id: Iafefdff4f71d162130b46155902ecd0ee88fab97
---
M manifests/role/lucene.pp
M templates/lucene/lsearch-global-2.1.conf.erb
2 files changed, 138 insertions(+), 114 deletions(-)


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

diff --git a/manifests/role/lucene.pp b/manifests/role/lucene.pp
index d9e09d3..2cf0d91 100644
--- a/manifests/role/lucene.pp
+++ b/manifests/role/lucene.pp
@@ -1,122 +1,138 @@
 class role::lucene {
class configuration {
$nodes = {
-   "eqiad" => {
-   "front_ends" => {
-   # enwiki
-   "pool1" => {
-   "search1001" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2', 'enwiki.spell'],
-   "search1002" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2'],
-   "search1003" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2', 'enwiki.nspart2*'],
-   "search1004" => 
['enwiki.nspart1.sub1.hl', 'enwiki.nspart1.sub2.hl'],
-   "search1005" => 
['enwiki.nspart1.sub1.hl', 'enwiki.nspart1.sub2.hl'],
-   "search1006" => 
['enwiki.nspart2*', 'enwiki.spell'],
+   'production' => {
+   "eqiad" => {
+   "front_ends" => {
+   # enwiki
+   "pool1" => {
+   "search1001" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2', 'enwiki.spell'],
+   "search1002" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2'],
+   "search1003" => 
['enwiki.nspart1.sub1', 'enwiki.nspart1.sub2', 'enwiki.nspart2*'],
+   "search1004" => 
['enwiki.nspart1.sub1.hl', 'enwiki.nspart1.sub2.hl'],
+   "search1005" => 
['enwiki.nspart1.sub1.hl', 'enwiki.nspart1.sub2.hl'],
+   "search1006" => 
['enwiki.nspart2*', 'enwiki.spell'],
+   },
+   # de,fr,jawiki
+   "pool2" => {
+   "search1007" => 
['frwiki.nspart1', 'frwiki.nspart2', 'jawiki.nspart1', 'jawiki.nspart2', 
'dewiki.nspart1', 'dewiki.nspart2'],
+   "search1008" => 
['frwiki.nspart1', 'frwiki.nspart2', 'jawiki.nspart1', 'jawiki.nspart2', 
'dewiki.nspart1', 'dewiki.nspart2'],
+   "search1009" => 
['dewiki.nspart1.hl', 'dewiki.nspart2.hl', 'frwiki.nspart1.hl', 
'frwiki.nspart2.hl', 'frwiki.spell', 'dewiki.spell'],
+   "search1010" => 
['dewiki.nspart1.hl', 'dewiki.nspart2.hl', 'frwiki.nspart1.hl', 
'frwiki.nspart2.hl', 'frwiki.spell', 'dewiki.spell'],
+   },
+   # it,nl,ru,sv,pl,pt,es,zhwiki
+   "pool3" => {
+   "search1011" => 
['eswiki itwiki.nspart1', 'ruwiki.nspart1', 'nlwiki.nspart1',
+
'svwiki.nspart1', 'plwiki.nspart1', 'ptwiki.nspart1', 'zhwiki.nspart1', 
'eswiki.hl'],
+   "search1012" => 
['eswiki itwiki.nspart1', 'ruwiki.nspart1', 'nlwiki.nspart1',
+
'svwiki.nspart1', 'plwiki.nspart1', 'ptwiki.nspart1', 'zhwiki.nspart1', 
'eswiki.hl'],
+   "search1013" => 
['itwiki.nspart1.hl', 'itwiki.nspart2.hl', 'nlwiki.nspart1.hl', 
'nlwiki.nspart2.hl', 'ruwiki.nspart1.hl', 'ruwiki.nspart2.hl',
+
'itwiki.spell', 'nlwiki.spell', 'ruwiki.spell', 'svwiki.spell', 'plwiki.spell', 
'ptwiki.spell', 'eswiki.spell'],
+   "search1014" => 
['itwiki.nspart1.hl', 'itwiki.nspart2.hl', 'nlwiki.nspart1.hl', 
'nlwiki.nspart2.hl', 'ruwiki.nspart1.hl', 'ruwiki.nspart2.hl',
+   

[MediaWiki-commits] [Gerrit] Fix title library saving - change (mediawiki...Scribunto)

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

Change subject: Fix title library saving
..


Fix title library saving

getParser() sometimes returns null (eg: on saving edits). In that case,
don't try injecting link information into the (non-existent)
ParserOutput object.

Change-Id: Ief54498615fbf674305bff95f874d56b7866
---
M engines/LuaCommon/TitleLibrary.php
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/engines/LuaCommon/TitleLibrary.php 
b/engines/LuaCommon/TitleLibrary.php
index 817c869..b97c68c 100644
--- a/engines/LuaCommon/TitleLibrary.php
+++ b/engines/LuaCommon/TitleLibrary.php
@@ -64,7 +64,9 @@
$this->idCache[$title->getArticleID()] = $title;
 
// Record a link
-   $this->getParser()->getOutput()->addLink( $title );
+   if ( $this->getParser() ) {
+   $this->getParser()->getOutput()->addLink( $title );
+   }
 
return array(
'isLocal' => (bool)$title->isLocal(),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief54498615fbf674305bff95f874d56b7866
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Scribunto
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Demon 
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 a couple of unused variables - change (mediawiki...Echo)

2013-03-01 Thread Bsitu (Code Review)
Bsitu has submitted this change and it was merged.

Change subject: Remove a couple of unused variables
..


Remove a couple of unused variables

Change-Id: I45e0b6e7c2ae8e2235ff8f85c95c657e0e05fc9e
---
M formatters/CommentFormatter.php
M includes/EmailBatch.php
2 files changed, 1 insertion(+), 6 deletions(-)

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



diff --git a/formatters/CommentFormatter.php b/formatters/CommentFormatter.php
index ac805fb..a7e60ee 100644
--- a/formatters/CommentFormatter.php
+++ b/formatters/CommentFormatter.php
@@ -55,11 +55,6 @@
$message->params( '' );
}
} elseif ( $param === 'commentText' ) {
-   /**
-* @var $wgLang Language
-*/
-   global $wgLang; // Message::language is protected :(
-
if ( isset( $extra['content'] ) && $extra['content'] ) {
$content = $extra['content'];
$content = EchoDiscussionParser::stripHeader( 
$content );
diff --git a/includes/EmailBatch.php b/includes/EmailBatch.php
index d86e2d9..4aedf6f 100644
--- a/includes/EmailBatch.php
+++ b/includes/EmailBatch.php
@@ -100,7 +100,7 @@
$events = $this->getEvents();
 
if ( $events ) {
-   foreach( $events as $batchId => $row ) {
+   foreach( $events as $row ) {
$this->count++;
if ( $this->count > self::$displaySize ) {
break;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I45e0b6e7c2ae8e2235ff8f85c95c657e0e05fc9e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Echo
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Bsitu 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] More tests for Parsoid's beneift. - change (mediawiki/core)

2013-03-01 Thread GWicke (Code Review)
GWicke has submitted this change and it was merged.

Change subject: More tests for Parsoid's beneift.
..


More tests for Parsoid's beneift.

* One more wikitable fostered content test for this:
  https://gerrit.wikimedia.org/r/#/c/51170/

* Merged duplicate extlink test with another.

* Added another extlink text that tests RTing of space-separated
  link-text.

Change-Id: I4307bde61b186734f3706dc8940f47e015ec2bc5
---
M tests/parser/parserTests.txt
1 file changed, 36 insertions(+), 18 deletions(-)

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



diff --git a/tests/parser/parserTests.txt b/tests/parser/parserTests.txt
index 0716d79..83eb71b 100644
--- a/tests/parser/parserTests.txt
+++ b/tests/parser/parserTests.txt
@@ -2498,6 +2498,17 @@
 !! end
 
 !! test
+External links: link text with spaces
+!! input
+[http://www.example.com a b c]
+[http://www.example.com ''a'' ''b'']
+!! result
+http://www.example.com";>a b 
c
+http://www.example.com";>a 
b
+
+!! end
+
+!! test
 External links: wiki links within external link (Bug 3695)
 !! input
 [http://example.com [[wikilink]] embedded in ext link]
@@ -2657,21 +2668,6 @@
 
 !! end
 
-!!test
-Text in square brackets that is not a link should parse as text
-!!input
-[foo]
-[{{echo|foo}}]
-[url={{echo|foo}}]
-[url=http://example.com]
-!!result
-[foo]
-[foo]
-[url=foo]
-[url=http://example.com";>http://example.com]
-
-!!end
-
 !! test
 URL-encoding in URL functions (single parameter)
 !! input
@@ -2726,6 +2722,8 @@
 [{{echo|foo}} ''bar'']
 [{{echo|foo}}l's] errand
 [{{echo|foo}}l's errand]
+[url={{echo|foo}}]
+[url=http://example.com]
 !! result
 [foo]
 [foo bar]
@@ -2737,6 +2735,8 @@
 [foo bar]
 [fool's] errand
 [fool's errand]
+[url=foo]
+[url=http://example.com";>http://example.com]
 
 !! end
 
@@ -5838,7 +5838,7 @@
 !!end
 
 !!test
-Templates: Wiki Tables: 1. Fostering of entire template content
+Templates: Wiki Tables: 1a. Fostering of entire template content
 !!input
 {|
 {{echo|a}}
@@ -5846,6 +5846,24 @@
 !!result
 
 a
+
+
+!!end
+
+!!test
+Templates: Wiki Tables: 1b. Fostering of entire template content
+!!input
+{|
+{{echo|}}
+foo
+{{echo|}}
+|}
+!!result
+
+
+foo
+
+
 
 
 !!end
@@ -5891,7 +5909,7 @@
 !!end
 
 !!test
-Templates: Wiki Tables: 4. Templated tags, regular td-tags
+Templates: Wiki Tables: 5. Templated tags, regular td-tags
 !!input
 {{tbl-start}}
 |foo
@@ -5905,7 +5923,7 @@
 !!end
 
 !!test
-Templates: Wiki Tables: 4. Templated tags, templated td-tags
+Templates: Wiki Tables: 6. Templated tags, templated td-tags
 !!input
 {{tbl-start}}
 {{!}}foo

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4307bde61b186734f3706dc8940f47e015ec2bc5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Subramanya Sastry 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: MarkTraceur 
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 title library saving - change (mediawiki...Scribunto)

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

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


Change subject: Fix title library saving
..

Fix title library saving

getParser() sometimes returns null (eg: on saving edits). In that case,
don't try injecting link information into the (non-existent)
ParserOutput object.

Change-Id: Ief54498615fbf674305bff95f874d56b7866
---
M engines/LuaCommon/TitleLibrary.php
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/engines/LuaCommon/TitleLibrary.php 
b/engines/LuaCommon/TitleLibrary.php
index 817c869..b97c68c 100644
--- a/engines/LuaCommon/TitleLibrary.php
+++ b/engines/LuaCommon/TitleLibrary.php
@@ -64,7 +64,9 @@
$this->idCache[$title->getArticleID()] = $title;
 
// Record a link
-   $this->getParser()->getOutput()->addLink( $title );
+   if ( $this->getParser() ) {
+   $this->getParser()->getOutput()->addLink( $title );
+   }
 
return array(
'isLocal' => (bool)$title->isLocal(),

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

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

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


[MediaWiki-commits] [Gerrit] Bug 15441, bug 39675. Add archive, externallinks PK - change (mediawiki/core)

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

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


Change subject: Bug 15441, bug 39675. Add archive, externallinks PK
..

Bug 15441, bug 39675. Add archive, externallinks PK

* New fields: ar_id, el_id. el_id is presently not used for
  anything, but will help with binasher's online schema migrations.

Change-Id: Ib6b0fc3736d173fa4ba7b786ecfc710b2f4711bb
---
M includes/WikiPage.php
M includes/api/ApiQueryDeletedrevs.php
M includes/installer/Ibm_db2Updater.php
M includes/installer/MysqlUpdater.php
M includes/installer/OracleUpdater.php
M includes/installer/PostgresUpdater.php
M includes/installer/SqliteUpdater.php
M includes/revisiondelete/RevisionDelete.php
A maintenance/archives/patch-archive-ar_id.sql
A maintenance/archives/patch-externallinks-el_id.sql
A maintenance/ibm_db2/patch-archive-ar_id.sql
A maintenance/ibm_db2/patch-externallinks-el_id.sql
M maintenance/ibm_db2/tables.sql
M maintenance/mssql/tables.sql
A maintenance/oracle/archives/patch-archive-ar_id.sql
A maintenance/oracle/archives/patch-externallinks-el_id.sql
M maintenance/oracle/tables.sql
M maintenance/postgres/tables.sql
M maintenance/sqlite/archives/initial-indexes.sql
A maintenance/sqlite/archives/patch-archive-ar_id.sql
A maintenance/sqlite/archives/patch-externallinks-el_id.sql
M maintenance/tables.sql
22 files changed, 307 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/75/51675/1

diff --git a/includes/WikiPage.php b/includes/WikiPage.php
index 6048294..5c671c9 100644
--- a/includes/WikiPage.php
+++ b/includes/WikiPage.php
@@ -2497,7 +2497,7 @@
public function doDeleteArticleReal(
$reason, $suppress = false, $id = 0, $commit = true, &$error = 
'', User $user = null
) {
-   global $wgUser, $wgContentHandlerUseDB;
+   global $wgUser, $wgContentHandlerUseDB, 
$wgUseArchiveIdLogFields, $wgContLang;
 
wfDebug( __METHOD__ . "\n" );
 
@@ -2543,6 +2543,17 @@
 
$dbw = wfGetDB( DB_MASTER );
$dbw->begin( __METHOD__ );
+
+   # Log the deletion, if the page was suppressed, log it at 
Oversight instead
+   $logtype = $suppress ? 'suppress' : 'delete';
+
+   $logEntry = new ManualLogEntry( $logtype, 'delete' );
+   $logEntry->setPerformer( $user );
+   $logEntry->setTarget( $this->mTitle );
+   $logEntry->setComment( $reason );
+   $logid = $logEntry->insert();
+   $logEntry->publish( $logid );
+
// For now, shunt the revision data into the archive table.
// Text is *not* removed from the text table; bulk storage
// is left intact to avoid breaking block-compression or
@@ -2578,11 +2589,20 @@
$row[ 'ar_content_format' ] = 'rev_content_format';
}
 
-   $dbw->insertSelect( 'archive', array( 'page', 'revision' ),
+   if ( $wgUseArchiveIdLogFields ) {
+   $row[ 'ar_log_id' ] = 'log_id';
+   $row[ 'ar_log_timestamp' ] = 'log_timestamp';
+   $row[ 'ar_log_user' ] = 'log_user';
+   $row[ 'ar_log_user_text' ] = 'log_user_text';
+   $row[ 'ar_log_comment' ] = 'log_comment';
+   }
+
+   $dbw->insertSelect( 'archive', array( 'page', 'revision', 
'logging' ),
$row,
array(
'page_id' => $id,
-   'page_id = rev_page'
+   'page_id = rev_page',
+   'log_id' => $logid,
), __METHOD__
);
 
@@ -3373,9 +3393,9 @@
} elseif ( $isCurrent ) {
// XXX: why use RAW audience here, and PUBLIC (default) 
below?
$content = $this->page->getContent( Revision::RAW );
+
} else {
$rev = Revision::newFromTitle( $this->page->getTitle(), 
$this->revid );
-
if ( $rev === null ) {
$content = null;
} else {
diff --git a/includes/api/ApiQueryDeletedrevs.php 
b/includes/api/ApiQueryDeletedrevs.php
index 31812cf..a4dd8bf 100644
--- a/includes/api/ApiQueryDeletedrevs.php
+++ b/includes/api/ApiQueryDeletedrevs.php
@@ -36,6 +36,7 @@
}
 
public function execute() {
+   global $wgUseArchiveIdLogFields;
$user = $this->getUser();
// Before doing anything at all, let's check permissions
if ( !$user->isAllowed( 'deletedhistory' ) ) {
@@ -56,6 +57,15 @@
$fld_sha1 = isset( $prop['sha1'] );
$fld_content = isset( $prop['content'] )

[MediaWiki-commits] [Gerrit] Numerous bits of method parameter documentation - change (mediawiki...Echo)

2013-03-01 Thread Bsitu (Code Review)
Bsitu has submitted this change and it was merged.

Change subject: Numerous bits of method parameter documentation
..


Numerous bits of method parameter documentation

Change-Id: Ie4b2657b5e010311b779aa587aa7fa9fc3f19abb
---
M Echo.php
M Hooks.php
M api/ApiEchoNotifications.php
M formatters/BasicFormatter.php
M formatters/EditFormatter.php
M formatters/NotificationFormatter.php
M includes/DiscussionParser.php
M includes/EchoBackend.php
M model/Subscription.php
9 files changed, 50 insertions(+), 16 deletions(-)

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



diff --git a/Echo.php b/Echo.php
index 50ece45..e119058 100644
--- a/Echo.php
+++ b/Echo.php
@@ -180,7 +180,10 @@
 // The name of the backend to use for Echo, eg, Db, Redis, Zeromq
 $wgEchoBackendName = 'Db';
 
-// The backend object
+/**
+ * The backend object
+ * @var MWEchoBackend
+ */
 $wgEchoBackend = null;
 
 // Whether to turn on email batch function
diff --git a/Hooks.php b/Hooks.php
index 8fd..552057b 100644
--- a/Hooks.php
+++ b/Hooks.php
@@ -151,6 +151,12 @@
return true;
}
 
+   /**
+* @param $subscription EchoSubscription
+* @param $event EchoEvent
+* @param $notifyTypes
+* @return bool
+*/
public static function getNotificationTypes( $subscription, $event, 
&$notifyTypes ) {
$type = $event->getType();
$user = $subscription->getUser();
@@ -494,7 +500,7 @@
/**
 * Handler for MakeGlobalVariablesScript hook.
 * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript
-* @param &$vars Variables to be added into the output
+* @param &$vars array Variables to be added into the output
 * @param $outputPage OutputPage instance calling the hook
 * @return bool true in all cases
 */
@@ -532,7 +538,7 @@
/**
 * Handler for ArticleEditUpdateNewTalk hook.
 * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleEditUpdateNewTalk
-* @param $page The WikiPage object of the talk page being updated
+* @param $page WikiPage The WikiPage object of the talk page being 
updated
 * @return bool
 */
static function abortNewTalkNotification( $page ) {
@@ -551,10 +557,10 @@
/**
 * Handler for ArticleRollbackComplete hook.
 * @see 
http://www.mediawiki.org/wiki/Manual:Hooks/ArticleRollbackComplete
-* @param $page The article that was edited
-* @param $agent The user who did the rollback
-* @param $newRevision The revision the page was reverted back to
-* @param $oldRevision The revision of the top edit that was reverted
+* @param $page WikiPage The article that was edited
+* @param $agent User The user who did the rollback
+* @param $newRevision Revision The revision the page was reverted back 
to
+* @param $oldRevision Revision The revision of the top edit that was 
reverted
 * @return bool true in all cases
 */
static function onRollbackComplete( $page, $agent, $newRevision, 
$oldRevision ) {
diff --git a/api/ApiEchoNotifications.php b/api/ApiEchoNotifications.php
index bf9b035..7eae87a 100644
--- a/api/ApiEchoNotifications.php
+++ b/api/ApiEchoNotifications.php
@@ -48,7 +48,7 @@
 *
 * @param $user User the user to get notifications for
 * @param $unread Boolean true to get only unread notifications
-* @param $format string/bool false to not format any notifications, 
string to a specific output format
+* @param $format string|bool false to not format any notifications, 
string to a specific output format
 * @param $limit int The maximum number of notifications to return
 * @param $timestamp int The timestamp to start from
 * @param $offset int The notification event id to start from
diff --git a/formatters/BasicFormatter.php b/formatters/BasicFormatter.php
index ebbd20c..ac1721d 100644
--- a/formatters/BasicFormatter.php
+++ b/formatters/BasicFormatter.php
@@ -26,7 +26,7 @@
$this->title['message'] = $params['title-message'];
$this->title['params'] = $params['title-params'];
$this->payload = array();
-   
+
if ( isset( $params['payload'] ) ) {
$this->payload = $params['payload'];
}
@@ -165,7 +165,7 @@
 
// Add timestamp
$content .= $this->formatTimestamp( $event->getTimestamp(), 
$user );
-   
+
$output .= Xml::tags( 'div', array( 'class' => 
'mw-echo-content' ), $content ) . "\n";
 
// The state div is used to visually indicate read or unread 
status. This is
@@ -176,6 +176,11 @@
return $output;
}
 
+   /**
+*

[MediaWiki-commits] [Gerrit] (Bug 44192) Do not attempt to send a real e-mail - change (mediawiki/core)

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

Change subject: (Bug 44192) Do not attempt to send a real e-mail
..


(Bug 44192) Do not attempt to send a real e-mail

The ApiAccountCreationTest is attempting to send an email to the newly
created user. The tests should really never send any email. This patch
register a noop callback for the 'AlternateUserMailer' hook which would
disable email entirely in our test suite.

This is generic version of 2025a89 which was only disabling mail for the
ApiAccountCreationTest test and that Antoine reverted.

Change-Id: I7b3ba4f7563a5818c988d6f8da165cc3c984f160
---
M tests/phpunit/phpunit.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/tests/phpunit/phpunit.php b/tests/phpunit/phpunit.php
index cce5dde..2ec0744 100755
--- a/tests/phpunit/phpunit.php
+++ b/tests/phpunit/phpunit.php
@@ -47,6 +47,12 @@
$wgLocaltimezone = 'UTC';
 
$wgLocalisationCacheConf['storeClass'] = 'LCStore_Null';
+
+   // Bug 44192 Do not attempt to send a real e-mail
+   Hooks::clear( 'AlternateUserMailer' );
+   Hooks::register( 'AlternateUserMailer',
+   function() { return false; }
+   );
}
 
public function execute() {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7b3ba4f7563a5818c988d6f8da165cc3c984f160
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: Platonides 
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 45310) Fix call to undefined method Maps\Location::getL... - change (mediawiki...Maps)

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

Change subject: (bug 45310) Fix call to undefined method 
Maps\Location::getLongitude
..


(bug 45310) Fix call to undefined method Maps\Location::getLongitude

Change-Id: I7d9a4297b2b96ad6dfbcd461790bb221f7d7efc3
---
M includes/Maps_KMLFormatter.php
1 file changed, 14 insertions(+), 9 deletions(-)

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



diff --git a/includes/Maps_KMLFormatter.php b/includes/Maps_KMLFormatter.php
index 06145e1..b3afddf 100644
--- a/includes/Maps_KMLFormatter.php
+++ b/includes/Maps_KMLFormatter.php
@@ -1,5 +1,8 @@
 placemarks[] = $placemark;
}

@@ -76,7 +79,7 @@
 * 
 * @since 0.7.3
 * 
-* @param array of \Maps\Location $placemark
+* @param Location[] $placemarks
 */ 
public function addPlacemarks( array $placemarks ) {
foreach ( $placemarks as $placemark ) {
@@ -140,20 +143,22 @@
 * 
 * @since 0.7.3
 * 
-* @param \Maps\Location $location
-* 
+* @param Location $location
+*
 * @return string
 */ 
-   protected function getKMLForLocation( \Maps\Location $location ) {
+   protected function getKMLForLocation( Location $location ) {
$name = '';

$description = '';
-   
+
+   $coordinates = $location->getCoordinates();
+
// lon,lat[,alt]
$coordinates = Xml::element(
'coordinates',
array(),
-   $location->getLongitude() . ',' . 
$location->getLatitude() . ',' . $location->getAltitude()
+   $coordinates->getLongitude() . ',' . 
$coordinates->getLatitude() . ',' . $coordinates->getAltitude()
);
 
return <

[MediaWiki-commits] [Gerrit] Update i18n - change (mediawiki...Scribunto)

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

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


Change subject: Update i18n
..

Update i18n

Add missing /qqq messages, and remove an unused message.

Bug: 39125
Change-Id: Ib1c21cc4eb334b42408e24051809ab3c0d8da796
---
M Scribunto.i18n.php
1 file changed, 2 insertions(+), 1 deletion(-)


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

diff --git a/Scribunto.i18n.php b/Scribunto.i18n.php
index 1586201..238d0a2 100644
--- a/Scribunto.i18n.php
+++ b/Scribunto.i18n.php
@@ -34,7 +34,6 @@
'scribunto-console-title' => 'Debug console',
'scribunto-console-too-large' => 'This console session is too large. 
Please clear the console history or reduce the size of the module.',
'scribunto-console-current-src' => 'console input',
-   'scribunto-console-previous-src' => 'previous console input',
'scribunto-console-clear' => 'Clear',
'scribunto-console-cleared' => 'The console state was cleared because 
the module was updated.',
'scribunto-console-cleared-session-lost' => 'The console state was 
cleared because the session data was lost.',
@@ -91,6 +90,8 @@
'scribunto-console-intro' => 'An explanatory message shown to module 
programmers in the debug console, where they can run Lua commands and see how 
they work.
 
 "Module exports" are the names that are exported. See the chapter 
[http://www.lua.org/pil/15.2.html Privacy] in the book "Programming in Lua".',
+   'scribunto-console-title' => 'Legend for the debug console fieldset',
+   'scribunto-console-too-large' => 'Error message displayed when the 
console history contains too much data.',
'scribunto-console-current-src' => 'Name of the fictional Lua module 
created in the debugging console. May appear e.g. in Lua error messages (like 
$1 in {{msg-mw|Scribunto-module-line}})',
'scribunto-console-clear' => '{{Identical|Clear}}',
'scribunto-console-cleared' => 'Message displayed in the console when 
the module source has been changed.',

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

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

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


[MediaWiki-commits] [Gerrit] Clean up lualibs - change (mediawiki...Scribunto)

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

Change subject: Clean up lualibs
..


Clean up lualibs

Clean up the modules in engines/LuaCommon/lualib:
* Fix luabit/bit.lua to return its table instead of trying to set the
  global directly.
* Fix luabit/hex.lua to return its table instead of trying to set the
  global directly.
* luabit/noki.lua is useless for our purposes
* luabit/utf8.lua is redundant to mw.ustring
* stringtools uses coroutines, which we don't support

Also fix a parser test that has apparently been broken for a long time.

Change-Id: I1284cddb6e9b94327964cb1077d8dbdf7def6d06
---
M engines/LuaCommon/LuaCommon.php
M engines/LuaCommon/lualib/luabit/bit.lua
M engines/LuaCommon/lualib/luabit/hex.lua
D engines/LuaCommon/lualib/luabit/noki.lua
D engines/LuaCommon/lualib/luabit/utf8.lua
D engines/LuaCommon/lualib/stringtools/README
D engines/LuaCommon/lualib/stringtools/stringbuilder.lua
D engines/LuaCommon/lualib/stringtools/stringreader.lua
M tests/engines/LuaCommon/luaParserTests.txt
9 files changed, 13 insertions(+), 753 deletions(-)

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



diff --git a/engines/LuaCommon/LuaCommon.php b/engines/LuaCommon/LuaCommon.php
index 631ddd1..cbf15d2 100644
--- a/engines/LuaCommon/LuaCommon.php
+++ b/engines/LuaCommon/LuaCommon.php
@@ -22,7 +22,6 @@
protected static $libraryPaths = array(
'.',
'luabit',
-   'stringtools',
'ustring',
);
 
diff --git a/engines/LuaCommon/lualib/luabit/bit.lua 
b/engines/LuaCommon/lualib/luabit/bit.lua
index 94e60d7..6bb3f48 100644
--- a/engines/LuaCommon/lualib/luabit/bit.lua
+++ b/engines/LuaCommon/lualib/luabit/bit.lua
@@ -27,6 +27,8 @@
 Under the MIT license.
 
 copyright(c) 2006~2007 hanzhao (abrash_...@hotmail.com)
+
+2013-02-20: Brad Jorsch: Fix to not try messing with globals, doesn't work in 
Scribunto
 --]]---
 
 do
@@ -218,7 +220,7 @@
 
 -- bit lib interface
 
-bit = {
+local bit = {
  -- bit operations
  bnot = bit_not,
  band = bit_and,
@@ -234,6 +236,8 @@
  tonumb = tbl_to_number,
 }
 
+return bit
+
 end
 
 --[[
diff --git a/engines/LuaCommon/lualib/luabit/hex.lua 
b/engines/LuaCommon/lualib/luabit/hex.lua
index ac9ca96..ee6a69e 100644
--- a/engines/LuaCommon/lualib/luabit/hex.lua
+++ b/engines/LuaCommon/lualib/luabit/hex.lua
@@ -12,9 +12,11 @@
 Under the MIT license.
 
 copyright(c) 2006~2007 hanzhao (abrash_...@hotmail.com)
+
+2013-02-20: Brad Jorsch: Fix to not try messing with globals, doesn't work in 
Scribunto
 --]]---
 
-require 'bit'
+local bit = require 'bit'
 
 do 
 
@@ -70,10 +72,12 @@
 
 
 -- hex lib interface
-hex = {
+local hex = {
  to_dec = to_dec,
  to_hex = to_hex,
 }
+
+return hex
 
 end
 
@@ -92,4 +96,4 @@
   error("failed " .. i .. ", " .. h)
  end
 end
---]]
\ No newline at end of file
+--]]
diff --git a/engines/LuaCommon/lualib/luabit/noki.lua 
b/engines/LuaCommon/lualib/luabit/noki.lua
deleted file mode 100644
index 87a16c1..000
--- a/engines/LuaCommon/lualib/luabit/noki.lua
+++ /dev/null
@@ -1,332 +0,0 @@
---[[---
-Noki v0.4

-Noki is a toolkit to convert Nokia PC Suite backuped SMS to a
-unicode .txt file, which is more accessible than the original
-.nfb or .nfc.
-
-It works well for Nokia PC Suite 6.5.12 and my mobile phone is 
-Nokia 7360. There might be some compatibility problem if you
-use earlier version of the PC Suite.
-
-How to use:
- noki.save_sms('nokia.nfb', 'sms.txt')
-
-Under the MIT license.
-
-Noki is a part of LuaBit(http://luaforge.net/projects/bit/).
-
-copyright(c) 2006~2007 hanzhao (abrash_...@hotmail.com)
---]]---
-
-require 'hex'
-require 'bit'
-
-do
--- globals
-local RETURN = '\13\0\10\0'
-local SMS_FILE = '\\MPAPI\\MESSAGES'
-local SMS_INBOX = 'PIT_MESSAGE_INBOX'
-local SMS_OUTBOX = 'PIT_MESSAGE_OUTBOX'
-local SMS_ARCHIVEBOX = 'PIT_MESSAGE_ARCHIVE'
-
--- output decorator
-local SMS_INBOX_DEC = '[INBOX] '
-local SMS_OUTBOX_DEC = '[OUTBOX] '
-local SMS_ARCHIVE_DEC = '[ARCHIVE] '
-
--- box type
-local BoxType = {
- NON = 0,
- IN = 1,
- OUT = 2,
- ARCHIVE = 3,
-}
-
--- feed each char with an extra \0
-local function asci_to_uni(asci)
- --print("---")
- local uni = ""
- for i = 1, string.len(asci) do
-  local str = string.format('%c\0', string.byte(asci, i))
-  --print(string.len(str))
-  uni = uni .. str
-
- end
- return uni
-end
-
-local function asci_padding(asci, pad)
- local uni = ""
- for i = 1, string.len(asci) do
-  local str = string.format('%c', string.byte(asci, i))
-  --print(string.len(str))
-  uni = uni .. str .. pad
-
- end
- return uni
-end
-
--- shrink the \0 in uni code string
-local function uni_to_asci(uni)
- local asci = ''
- --print('uni len ' .. string.len(uni))
- for i = 1, string.len(uni), 2 do
-  asci = asci .. string.sub(uni, i, i)
- end
- retu

[MediaWiki-commits] [Gerrit] do not exceed max int size by 1 - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: do not exceed max int size by 1
..

do not exceed max int size by 1

Change-Id: I5f2c2d086600930acdc7b4f0226681c6b3c46d7b
---
M tests/phpunit/includes/storage/sqlstore/PropertyStatisticsTableTest.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git 
a/tests/phpunit/includes/storage/sqlstore/PropertyStatisticsTableTest.php 
b/tests/phpunit/includes/storage/sqlstore/PropertyStatisticsTableTest.php
index 57b63c2..83f1769 100644
--- a/tests/phpunit/includes/storage/sqlstore/PropertyStatisticsTableTest.php
+++ b/tests/phpunit/includes/storage/sqlstore/PropertyStatisticsTableTest.php
@@ -62,7 +62,7 @@
$usageCounts[] = array( $propId, mt_rand( 0, 10 ) );
}
 
-   $usageCounts[] = array( 9001, pow( 2 , 31 ) );
+   $usageCounts[] = array( 9001, pow( 2 , 31 ) - 1 );
 
return $usageCounts;
}
@@ -123,7 +123,7 @@
1 => 42,
2 => 0,
9001 => 9001,
-   9002 => pow( 2 , 31 ),
+   9002 => pow( 2 , 31 ) - 1,
9003 => 1,
);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f2c2d086600930acdc7b4f0226681c6b3c46d7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
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] Default $wgContentHandlerUseDB to true - change (mediawiki/core)

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

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


Change subject: Default $wgContentHandlerUseDB to true
..

Default $wgContentHandlerUseDB to true

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/72/51672/1

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 7aad30c..b2ea1cc 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -6491,7 +6491,7 @@
  *
  * @since 1.21
  */
-$wgContentHandlerUseDB = false;
+$wgContentHandlerUseDB = true;
 
 /**
  * Determines which types of text are parsed as wikitext. This does not imply 
that these kinds

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I830ec04e7f7f853bf7752262105a067fb9723145
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] correction: hooper is external - change (operations/puppet)

2013-03-01 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: correction: hooper is external
..


correction: hooper is external

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

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



diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index d4a818f..ec4430b 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -284,7 +284,7 @@
"Upload squids" => 
"sq41.wikimedia.org sq42.wikimedia.org",
"API squids" => 
"sq31.wikimedia.org sq35.wikimedia.org",
"LVS loadbalancers pmtpa" => 
"lvs1.wikimedia.org lvs2.wikimedia.org",
-   "Miscellaneous" => 
"hooper.pmtpa.wmnet tarin.pmtpa.wmnet",
+   "Miscellaneous" => 
"hooper.wikimedia.org tarin.pmtpa.wmnet",
"Text squids" => 
"sq59.wikimedia.org sq60.wikimedia.org",
"Bits caches" => 
"sq67.wikimedia.org sq68.wikimedia.org",
"Fundraiser payments" => 
"payments1.wikimedia.org payments2.wikimedia.org",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib4413f632e8a146de83b573d17e116586531c588
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Pyoungmeister 
Gerrit-Reviewer: Pyoungmeister 

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


[MediaWiki-commits] [Gerrit] correction: hooper is external - change (operations/puppet)

2013-03-01 Thread Pyoungmeister (Code Review)
Pyoungmeister has uploaded a new change for review.

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


Change subject: correction: hooper is external
..

correction: hooper is external

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


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/71/51671/1

diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index d4a818f..ec4430b 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -284,7 +284,7 @@
"Upload squids" => 
"sq41.wikimedia.org sq42.wikimedia.org",
"API squids" => 
"sq31.wikimedia.org sq35.wikimedia.org",
"LVS loadbalancers pmtpa" => 
"lvs1.wikimedia.org lvs2.wikimedia.org",
-   "Miscellaneous" => 
"hooper.pmtpa.wmnet tarin.pmtpa.wmnet",
+   "Miscellaneous" => 
"hooper.wikimedia.org tarin.pmtpa.wmnet",
"Text squids" => 
"sq59.wikimedia.org sq60.wikimedia.org",
"Bits caches" => 
"sq67.wikimedia.org sq68.wikimedia.org",
"Fundraiser payments" => 
"payments1.wikimedia.org payments2.wikimedia.org",

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

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

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


[MediaWiki-commits] [Gerrit] adding hooper and tarin as pmtpa misc ganglia aggregators - change (operations/puppet)

2013-03-01 Thread Pyoungmeister (Code Review)
Pyoungmeister has submitted this change and it was merged.

Change subject: adding hooper and tarin as pmtpa misc ganglia aggregators
..


adding hooper and tarin as pmtpa misc ganglia aggregators

Change-Id: I86411546d060bf9ff94ecd6daf12e2d9b166e561
---
M manifests/ganglia.pp
M manifests/site.pp
2 files changed, 4 insertions(+), 1 deletion(-)

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



diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index a9774d3..d4a818f 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -284,7 +284,7 @@
"Upload squids" => 
"sq41.wikimedia.org sq42.wikimedia.org",
"API squids" => 
"sq31.wikimedia.org sq35.wikimedia.org",
"LVS loadbalancers pmtpa" => 
"lvs1.wikimedia.org lvs2.wikimedia.org",
-   "Miscellaneous" => 
"spence.wikimedia.org",
+   "Miscellaneous" => 
"hooper.pmtpa.wmnet tarin.pmtpa.wmnet",
"Text squids" => 
"sq59.wikimedia.org sq60.wikimedia.org",
"Bits caches" => 
"sq67.wikimedia.org sq68.wikimedia.org",
"Fundraiser payments" => 
"payments1.wikimedia.org payments2.wikimedia.org",
diff --git a/manifests/site.pp b/manifests/site.pp
index 9d9896a..85388f2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -608,6 +608,7 @@
 }
 
 node /(ersch|tarin)\.pmtpa\.wmnet/ {
+   $ganglia_aggregator = "true"
include standard,
role::poolcounter
 }
@@ -884,6 +885,8 @@
 }
 
 node "hooper.wikimedia.org" {
+   $ganglia_aggregator = "true"
+
include standard,
admins::roots,
svn::client,

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

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

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


[MediaWiki-commits] [Gerrit] adding hooper and tarin as pmtpa misc ganglia aggregators - change (operations/puppet)

2013-03-01 Thread Pyoungmeister (Code Review)
Pyoungmeister has uploaded a new change for review.

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


Change subject: adding hooper and tarin as pmtpa misc ganglia aggregators
..

adding hooper and tarin as pmtpa misc ganglia aggregators

Change-Id: I86411546d060bf9ff94ecd6daf12e2d9b166e561
---
M manifests/ganglia.pp
M manifests/site.pp
2 files changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/70/51670/1

diff --git a/manifests/ganglia.pp b/manifests/ganglia.pp
index a9774d3..d4a818f 100644
--- a/manifests/ganglia.pp
+++ b/manifests/ganglia.pp
@@ -284,7 +284,7 @@
"Upload squids" => 
"sq41.wikimedia.org sq42.wikimedia.org",
"API squids" => 
"sq31.wikimedia.org sq35.wikimedia.org",
"LVS loadbalancers pmtpa" => 
"lvs1.wikimedia.org lvs2.wikimedia.org",
-   "Miscellaneous" => 
"spence.wikimedia.org",
+   "Miscellaneous" => 
"hooper.pmtpa.wmnet tarin.pmtpa.wmnet",
"Text squids" => 
"sq59.wikimedia.org sq60.wikimedia.org",
"Bits caches" => 
"sq67.wikimedia.org sq68.wikimedia.org",
"Fundraiser payments" => 
"payments1.wikimedia.org payments2.wikimedia.org",
diff --git a/manifests/site.pp b/manifests/site.pp
index 9d9896a..85388f2 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -608,6 +608,7 @@
 }
 
 node /(ersch|tarin)\.pmtpa\.wmnet/ {
+   $ganglia_aggregator = "true"
include standard,
role::poolcounter
 }
@@ -884,6 +885,8 @@
 }
 
 node "hooper.wikimedia.org" {
+   $ganglia_aggregator = "true"
+
include standard,
admins::roots,
svn::client,

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

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

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


[MediaWiki-commits] [Gerrit] beta: migrate udp2log to -bastion - change (operations/mediawiki-config)

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

Change subject: beta: migrate udp2log to -bastion
..


beta: migrate udp2log to -bastion

-dbdump instance has been phased out, this patch change the udp2log
receiving IP address in beta so it points to deployment-bastion.

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 656e166..4779bff 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -140,8 +140,8 @@
$wmfUdp2logDest = '10.64.0.21:8420';
break;
 case 'labs':
-   # deployment-dbdump host the udp2log daemon
-   $wmfUdp2logDest = '10.4.0.56:8420';
+   # deployment-bastion hosts the udp2log daemon
+   $wmfUdp2logDest = '10.4.0.58:8420';
break;
 default:
$wmfUdp2logDest = '127.0.0.1:8420';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8286ea2577941ee71160f9dcf56b23a1d4f3ab6
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Hashar 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Make use of new data model constructors all over the UI now - change (mediawiki...Wikibase)

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

Change subject: Make use of new data model constructors all over the UI now
..


Make use of new data model constructors all over the UI now

* replaced wb.entities with wb.fetchedEntities, holding wb.FetchedContent now 
instead of wb.Entity
  instances. Includes some tests.
* wb.entity is a wb.Entity object representing the site's entity now.
* for unserializing JSON in entityViewInit we now use the 
wikibase.serialization module.
* wb.entityview is expecting a wb.Entity object instead of a loose data 
structure now.
* removed/changed some todos

Change-Id: I40bcc945610fe6f32e89fc12ea3b0def3126317a
---
M lib/resources/jquery.valueview.views/wikibaseItem.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
M 
lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.variations.Value.js
M lib/resources/wikibase.js
M lib/resources/wikibase.utilities/wikibase.utilities.ui.js
M lib/tests/qunit/wikibase.datamodel/Wikibase.snak.tests.js
M repo/includes/EntityView.php
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
12 files changed, 114 insertions(+), 86 deletions(-)

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



diff --git a/lib/resources/jquery.valueview.views/wikibaseItem.js 
b/lib/resources/jquery.valueview.views/wikibaseItem.js
index 5e4140b..3bd4f26 100644
--- a/lib/resources/jquery.valueview.views/wikibaseItem.js
+++ b/lib/resources/jquery.valueview.views/wikibaseItem.js
@@ -72,14 +72,20 @@
$( this ).data( 'entityselector' 
).repositionMenu();
} )
.on( 'entityselectorselect', function( e, ui ) {
+   var itemData = {
+   id: ui.item.id,
+   label: {}
+   };
+   itemData.label[ language ] = ui.item.label;
+
// update local store with newest information 
about selected item
// TODO: create more sophisticated local store 
interface rather than accessing
-   //   wb.entities directly
-   wb.entities[ ui.item.id ] = {
-   id: ui.item.id,
-   label: ui.item.label,
-   url: ui.item.url
-   };
+   //   wb.fetchedEntities directly
+   wb.fetchedEntities[ ui.item.id ] = new 
wb.store.FetchedContent( {
+   // TODO: *terrible* solution to use 
regex, entityselector should provide title
+   title: new mw.Title( ui.item.url.match( 
/[^\/]+$/ )[0] ),
+   content: new wb.Item( itemData )
+   } );
} )
.on(
// "aftersetentity": When setting the entity 
programmatically (editing an existing
@@ -101,20 +107,22 @@
_displayValue: function( value ) {
if( this.$input ) {
var entityId = value === null ? null : 
value.getPrefixedId( WB_ENTITIES_PREFIXMAP ),
-   entity = entityId ? wb.entities[ 
entityId ] : null,
+   fetchedEntity = entityId ? 
wb.fetchedEntities[ entityId ] : null,
simpleEntity = null;
 
-   if( entity ) {
+   if( fetchedEntity ) {
// entity selector requires very basic 
data only, but ID has to be set which is
-   // not the case in the wb.entities 
entity store.
+   // not the case in the 
wb.fetchedEntities entity store.
simpleEntity = {
-   label: entity.label,
+   label: 
fetchedEntity.getContent().getLabel(),
id: entityId
};
}
 
// in edit mode:
this.$input.data( 'entityselector' 
).selectedEntity( simpleEntity );
+   // TODO: entityselector should just be able t

[MediaWiki-commits] [Gerrit] beta: migrate udp2log to -bastion - change (operations/mediawiki-config)

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

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


Change subject: beta: migrate udp2log to -bastion
..

beta: migrate udp2log to -bastion

-dbdump instance has been phased out, this patch change the udp2log
receiving IP address in beta so it points to deployment-bastion.

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


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

diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 656e166..4779bff 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -140,8 +140,8 @@
$wmfUdp2logDest = '10.64.0.21:8420';
break;
 case 'labs':
-   # deployment-dbdump host the udp2log daemon
-   $wmfUdp2logDest = '10.4.0.56:8420';
+   # deployment-bastion hosts the udp2log daemon
+   $wmfUdp2logDest = '10.4.0.58:8420';
break;
 default:
$wmfUdp2logDest = '127.0.0.1:8420';

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

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

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


[MediaWiki-commits] [Gerrit] Changes wb.RepoApi.getEntities to promise a collection of wb... - change (mediawiki...Wikibase)

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

Change subject: Changes wb.RepoApi.getEntities to promise a collection of 
wb.Entity
..


Changes wb.RepoApi.getEntities to promise a collection of wb.Entity

Would promise a collection of raw data before.

* changed jQuery.wikibase.snakview to make use of the change (rather than 
break).
* simple refactoring and adjustment of some API test

Change-Id: If80ca6c9048cd9d6880a9c790240fdb4e81cbcc0
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
M lib/resources/wikibase.store/wikibase.RepoApi.js
M lib/tests/qunit/wikibase.store/wikibase.RepoApi.tests.js
4 files changed, 118 insertions(+), 130 deletions(-)

Approvals:
  Henning Snater: Verified; Looks good to me, approved



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 71d75fa..823a42a 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -133,6 +133,7 @@
'jquery.json',
'user.tokens',
'wikibase.datamodel',
+   'wikibase.serialization.entities',
'wikibase.repoAccess',
'wikibase.RepoApiError',
'mediawiki.Title',
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
index 0e2eb04..878c348 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
@@ -202,7 +202,8 @@
.on( 'entityselectorselect', function( e, ui ) {
// entity chosen in entity selector but we still need 
the data type of the entity, so
// we have to make a separate API call:
-   var api = new wb.RepoApi();
+   var api = new wb.RepoApi(),
+   entityId = ui.item.id;
 
// Display spinner as long as the value view is 
loading. There is no need to display the
// spinner when the selected item actually has not 
changed since the variation will stay
@@ -213,24 +214,16 @@
);
}
 
-   api.getEntities( ui.item.id, null ).done( function( 
response ) {
-   var entityId = ui.item.id,
-   entity = response.entities[ entityId ],
-   dataTypeId = entity.datatype,
-   dataType = dt.getDataType( dataTypeId ),
-   label;
-
-   if( entity.labels && entity.labels[ language ] 
) {
-   label = entity.labels[ language ].value;
-   }
+   api.getEntities( entityId, null, [ language ] ).done( 
function( entities ) {
+   var entity = entities[ entityId ];
 
// update local store with newest information 
about selected property
// TODO: create more sophisticated local store 
interface rather than accessing
//   wb.entities directly
wb.entities[ entityId ] = {
id: entityId,
-   label: label,
-   datatype: dataType.getId(),
+   label: entity.getLabel(),
+   datatype: entity.getDataType().getId(),
url: ui.item.url
};
 
diff --git a/lib/resources/wikibase.store/wikibase.RepoApi.js 
b/lib/resources/wikibase.store/wikibase.RepoApi.js
index 463ff5a..aa9c0d6 100644
--- a/lib/resources/wikibase.store/wikibase.RepoApi.js
+++ b/lib/resources/wikibase.store/wikibase.RepoApi.js
@@ -75,7 +75,7 @@
},
 
/**
-* Gets one or more entities.
+* Gets one or more Entities.
 *
 * @param {String[]|String} ids
 * @param {String[]|String} [props] Key(s) of property/ies to retrieve 
from the API
@@ -86,7 +86,12 @@
 *  default: null (unsorted)
 * @param {String}  [dir] Sort direction may be 'ascending' or 
'descending'
 *  default: null (ascending)
-* @return {jQuery.Promise}
+* @return {jQuery.Promise} If successful, the first parameter of the 
done callbacks will be
+* an object with keys of the entity's IDs and value

[MediaWiki-commits] [Gerrit] Minor fixes (i18n and special page group) - change (mediawiki...CentralAuth)

2013-03-01 Thread CSteipp (Code Review)
CSteipp has submitted this change and it was merged.

Change subject: Minor fixes (i18n and special page group)
..


Minor fixes (i18n and special page group)

This fixes the description of 'right-centralauth-lock' (that
right changed in I745d252056795fa3631e40f65f9aeef519c94fdb),
the action text for centralauth-lock, the Qqq for action-
centralauth-lock and sets the special page group 'users' for
the new MultiLock.

Change-Id: I8a20cdce1bcf6d95364f6323b6248070314b5256
---
M CentralAuth.i18n.php
M CentralAuth.php
2 files changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index bdddba4..a554ad1 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -388,7 +388,7 @@
'right-globalgroupmembership'   => 'Edit membership to global groups',
'right-centralauth-autoaccount' => 'Automatically login with global 
account',
'right-centralauth-unmerge' => 'Unmerge global account',
-   'right-centralauth-lock'=> 'Lock or hide global account',
+   'right-centralauth-lock'=> 'Lock or unlock global account',
'right-centralauth-oversight'   => 'Suppress or hide global account',
'right-centralauth-merge'   => 'Merge their account',
'right-globalgrouppermissions'  => 'Manage global groups',
@@ -754,7 +754,7 @@
 
 See also:
 * {{msg-mw|Abusefilter-edit-builder-vars-user-groups}}.',
-   'action-centralauth-lock' => '{{Doc-action|lock}}',
+   'action-centralauth-lock' => '{{Doc-action|centralauth-lock}}',
 );
 
 /** Afrikaans (Afrikaans)
diff --git a/CentralAuth.php b/CentralAuth.php
index f395723..451dffb 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -243,6 +243,7 @@
 $wgSpecialPageGroups['GlobalGroupPermissions'] = 'users';
 $wgSpecialPageGroups['WikiSets'] = 'wiki';
 $wgSpecialPageGroups['GlobalUsers'] = 'users';
+$wgSpecialPageGroups['MultiLock'] = 'users';
 
 $wgAPIModules['deleteglobalaccount'] = 'ApiDeleteGlobalAccount';
 $wgAPIModules['setglobalaccountstatus'] = 'ApiSetGlobalAccountStatus';

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a20cdce1bcf6d95364f6323b6248070314b5256
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralAuth
Gerrit-Branch: master
Gerrit-Owner: Hoo man 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: CSteipp 
Gerrit-Reviewer: Raimond Spekking 
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] beta: syslog-ng on deployment-bastion host - change (operations/puppet)

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

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


Change subject: beta: syslog-ng on deployment-bastion host
..

beta: syslog-ng on deployment-bastion host

The puppet base class installs rsyslog by default which conflicts with
the syslog-ng package which should be used for central syslog.

I have bringed that up a few months ago but the hack has been rejected,
this is now a serious blocker to advance on beta since we have NO
SYSLOG!  That prevents us from finding out what is happening in some
part of the cluster and one as to rely on using tcpdump + some scripting
to parse out the output. Definitely annoying.

Change-Id: Ia9e13c1104a29a9193b43404c49655d812c0b7db
---
M manifests/base.pp
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/51668/1

diff --git a/manifests/base.pp b/manifests/base.pp
index 9909d6e..9c08dfb 100644
--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -215,7 +215,7 @@
 }
 
 class base::remote-syslog {
-   if ($::lsbdistid == "Ubuntu") and ($::hostname != "nfs1") and 
($::hostname != "nfs2") {
+   if ($::lsbdistid == "Ubuntu") and ($::hostname != "nfs1") and 
($::hostname != "nfs2") and ($::instancename != 'deployment-bastion') {
package { rsyslog:
ensure => latest;
}
@@ -231,7 +231,7 @@
# Per labs project syslog:
case $::instanceproject {
'deployment-prep': {
-   $syslog_remote_real = 
'deployment-dbdump.pmtpa.wmflabs'
+   $syslog_remote_real = 
'deployment-bastion.pmtpa.wmflabs'
}
default: {
$syslog_remote_real = 
'i-03a9.pmtpa.wmflabs:5544'

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

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

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


[MediaWiki-commits] [Gerrit] Reorganize navigation (#362) - change (mediawiki...MobileFrontend)

2013-03-01 Thread Jdlrobson (Code Review)
Jdlrobson has submitted this change and it was merged.

Change subject: Reorganize navigation (#362)
..


Reorganize navigation (#362)

Update icons, remove contact and fix other minor things in the main
menu.

Change-Id: I2fbd170ff530b3f442670ab0d36021c3ede70383
---
M MobileFrontend.i18n.php
M includes/skins/SkinMobile.php
M less/common/mf-navigation.less
M stylesheets/common/images/menu/README
D stylesheets/common/images/menu/featured.png
D stylesheets/common/images/menu/login.png
A stylesheets/common/images/menu/loginout.png
D stylesheets/common/images/menu/logout.png
D stylesheets/common/images/menu/lowres/contact.png
M stylesheets/common/images/menu/lowres/home.png
D stylesheets/common/images/menu/lowres/login.png
A stylesheets/common/images/menu/lowres/loginout.png
D stylesheets/common/images/menu/lowres/logout.png
D stylesheets/common/images/menu/lowres/nearby.png
M stylesheets/common/images/menu/lowres/random.png
M stylesheets/common/images/menu/lowres/settings.png
R stylesheets/common/images/menu/uploads.png
M stylesheets/common/images/menu/watchlist.png
M stylesheets/common/mf-navigation.css
19 files changed, 55 insertions(+), 113 deletions(-)

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



diff --git a/MobileFrontend.i18n.php b/MobileFrontend.i18n.php
index 3c43d54..d47ee58 100644
--- a/MobileFrontend.i18n.php
+++ b/MobileFrontend.i18n.php
@@ -142,7 +142,7 @@
'mobile-frontend-main-menu-logout' => 'Log out',
'mobile-frontend-main-menu-watchlist' => 'Watchlist',
'mobile-frontend-main-menu-settings' => 'Settings',
-   'mobile-frontend-main-menu-upload' => 'Upload',
+   'mobile-frontend-main-menu-upload' => 'Uploads',
'mobile-frontend-main-menu-settings-heading' => 'Mobile site settings',
'mobile-frontend-settings-site-header' => '{{SITENAME}} Languages',
'mobile-frontend-settings-site-description' => '{{SITENAME}} is 
available in $1 {{PLURAL:$1|language|languages}}. All available versions are 
listed below',
@@ -477,7 +477,7 @@
'mobile-frontend-main-menu-watchlist' => 'Text for watchlist link in 
main menu.
 {{Identical|My watchlist}}',
'mobile-frontend-main-menu-settings' => 'Settings link text in main 
menu',
-   'mobile-frontend-main-menu-upload' => 'Upload link text in main menu.
+   'mobile-frontend-main-menu-upload' => 'Uploads link text in main menu.
 {{Identical|Upload}}',
'mobile-frontend-main-menu-settings-heading' => 'Heading for 
Special:MobileOptions page',
'mobile-frontend-settings-site-header' => 'Heading for the 
Special:MobileOptions/Language page - only visible to non javascript users',
diff --git a/includes/skins/SkinMobile.php b/includes/skins/SkinMobile.php
index 9f8af15..e101ed5 100644
--- a/includes/skins/SkinMobile.php
+++ b/includes/skins/SkinMobile.php
@@ -771,12 +771,20 @@



-   
msg( 'mobile-frontend-home-button' 
) ?>
-   msg( 
'mobile-frontend-random-button' ) ?>
+   data['supports_jquery'] && 
$this->data['isAlphaGroupMember'] && $wgMFNearby ) { ?>
+   
+   
+   msg( 
'mobile-frontend-main-menu-nearby' ) ?>
+   
+   
+   
data['supports_jquery'] ) { ?>




-   data['isBetaGroupMember'] ) { ?>
-   
+   data['supports_jquery'] && 
$this->data['isBetaGroupMember'] ) { ?>
+   

@@ -794,30 +802,14 @@



-   data['isBetaGroupMember'] ) { ?>
-   
-   
-   msg( 
'mobile-frontend-main-menu-contact' ) ?>
-   
-   
-   
-   
+   

msg( 
'mobile-frontend-main-menu-settings' ) ?>


-   data['isAlphaGroupMember'] && 
$wgMFNearby ) { ?>
-   
-   
-   msg( 
'mobile-frontend-main-menu-nearby' ) ?>
-   
-   
-   
data['supports_jquery'] ) { ?>
-   
+   
html( 'logInOut' ) ?>

[MediaWiki-commits] [Gerrit] implemented wb.Claim.equals - change (mediawiki...Wikibase)

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

Change subject: implemented wb.Claim.equals
..


implemented wb.Claim.equals

Change-Id: If07ea5ff7bc2e6ccc1a112ed4bc398b42a10466b
---
M lib/resources/wikibase.datamodel/wikibase.Claim.js
M lib/resources/wikibase.datamodel/wikibase.Snak.js
2 files changed, 23 insertions(+), 6 deletions(-)

Approvals:
  Henning Snater: Verified; Looks good to me, approved



diff --git a/lib/resources/wikibase.datamodel/wikibase.Claim.js 
b/lib/resources/wikibase.datamodel/wikibase.Claim.js
index f0f5cdd..a28d618 100644
--- a/lib/resources/wikibase.datamodel/wikibase.Claim.js
+++ b/lib/resources/wikibase.datamodel/wikibase.Claim.js
@@ -4,7 +4,7 @@
  * @licence GNU GPL v2+
  * @author Daniel Werner
  */
-( function( wb, $, undefined ) {
+( function( wb, $ ) {
 'use strict';
 
 /**
@@ -92,6 +92,25 @@
throw new Error( 'Qualifiers have to be a wb.SnakList 
object' );
}
this._qualifiers = qualifiers;
+   },
+
+   /**
+* Returns whether this Claim is equal to another Claim. Two Claims are 
considered equal
+* if they are of the same type and have the same value. The value does 
not include the guid,
+* so Claims with the same value but different guids are still 
considered equal.
+*
+* @since 0.4
+*
+* @param {wb.Claim|*} claim If this is not a wb.Claim, false will be 
returned.
+* @return boolean
+*/
+   equals: function( claim ) {
+   return this === claim
+   || ( // snaks have no IDs, so we don't have to worry 
about comparing any
+   claim instanceof wb.Claim
+   && this._mainSnak.equals( claim.getMainSnak() )
+   && this._qualifiers.equals( 
claim.getQualifiers() )
+   );
}
 };
 
@@ -127,9 +146,7 @@
rank = wb.Statement.RANK[ json.rank.toUpperCase() ];
return new wb.Statement( mainSnak, qualifiers, references, 
rank, guid );
}
-   else {
-   return new wb.Claim( mainSnak, qualifiers, guid );
-   }
+   return new wb.Claim( mainSnak, qualifiers, guid );
 };
 
 }( wikibase, jQuery ) );
diff --git a/lib/resources/wikibase.datamodel/wikibase.Snak.js 
b/lib/resources/wikibase.datamodel/wikibase.Snak.js
index 020abbe..9fe6586 100644
--- a/lib/resources/wikibase.datamodel/wikibase.Snak.js
+++ b/lib/resources/wikibase.datamodel/wikibase.Snak.js
@@ -124,8 +124,8 @@
 };
 
 /**
- * Creates a new Snak Object from a given Object with certain keys and values, 
what a certain Snak
- * would return when calling toMap().
+ * Creates a new Snak Object from a given Object with certain keys and values, 
what an actual Snak
+ * would return when calling its toMap().
  *
  * @since 0.4
  *

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If07ea5ff7bc2e6ccc1a112ed4bc398b42a10466b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Daniel Werner 
Gerrit-Reviewer: Henning Snater 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Claims now use wb.SnakList instead of wb.Snak[] for their qu... - change (mediawiki...Wikibase)

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

Change subject: Claims now use wb.SnakList instead of wb.Snak[] for their 
qualifiers
..


Claims now use wb.SnakList instead of wb.Snak[] for their qualifiers

Adjusted tests and solved some overdue TODO there along the way.

Change-Id: I2e2688c23c05bcf3bf1d61cd4b8f02675485dd3e
---
M lib/resources/wikibase.datamodel/wikibase.Claim.js
M lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js
2 files changed, 25 insertions(+), 28 deletions(-)

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



diff --git a/lib/resources/wikibase.datamodel/wikibase.Claim.js 
b/lib/resources/wikibase.datamodel/wikibase.Claim.js
index fd2a2ae..f0f5cdd 100644
--- a/lib/resources/wikibase.datamodel/wikibase.Claim.js
+++ b/lib/resources/wikibase.datamodel/wikibase.Claim.js
@@ -14,13 +14,13 @@
  * @see https://meta.wikimedia.org/wiki/Wikidata/Data_model#Statements
  *
  * @param {wb.Snak} mainSnak
- * @param {wb.Snak[]} [qualifiers]
+ * @param {wb.SnakList|null} [qualifiers]
  * @param {String|null} [guid] The Global Unique Identifier of this Claim. Can 
be omitted or null
  *if this is a new Claim, not yet stored in the database and 
associated with some entity.
  */
 wb.Claim = function WbClaim( mainSnak, qualifiers, guid ) {
this.setMainSnak( mainSnak );
-   this.setQualifiers( qualifiers || [] );
+   this.setQualifiers( qualifiers || new wb.SnakList() );
this._guid = guid || null;
 };
 
@@ -74,9 +74,9 @@
},
 
/**
-* Returns all qualifiers as an array of Snaks.
+* Returns all qualifiers as a wb.SnakList object.
 *
-* @return wb.Snak[]
+* @return wb.SnakList
 */
getQualifiers: function() {
return this._qualifiers;
@@ -85,11 +85,11 @@
/**
 * Overwrites the current set of qualifiers.
 *
-* @param {wb.Snak[]} qualifiers
+* @param {wb.SnakList} qualifiers
 */
setQualifiers: function( qualifiers ) {
-   if( !$.isArray( qualifiers ) ) {
-   throw new Error( 'Qualifiers have to be an array of 
snaks' );
+   if( !( qualifiers instanceof wb.SnakList ) ) {
+   throw new Error( 'Qualifiers have to be a wb.SnakList 
object' );
}
this._qualifiers = qualifiers;
}
@@ -103,7 +103,7 @@
  */
 wb.Claim.newFromJSON = function( json ) {
var mainSnak = wb.Snak.newFromJSON( json.mainsnak ),
-   qualifiers = [],
+   qualifiers = new wb.SnakList(),
references = [],
rank,
guid,
@@ -111,7 +111,7 @@
 
if ( json.qualifiers !== undefined ) {
$.each( json.qualifiers, function( i, qualifier ) {
-   qualifiers.push( wb.Snak.newFromJSON( qualifier ) );
+   qualifiers.addSnak( wb.Snak.newFromJSON( qualifier ) );
} );
}
 
diff --git a/lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js 
b/lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js
index 4eacccb..c390294 100644
--- a/lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js
+++ b/lib/tests/qunit/wikibase.datamodel/Wikibase.claim.tests.js
@@ -9,7 +9,7 @@
  * @author Jeroen De Dauw < jeroended...@gmail.com >
  */
 
-( function( wb, dv, $, QUnit, undefined ) {
+( function( wb, dv, $, QUnit ) {
'use strict';
 
QUnit.module( 'wikibase.datamodel.claim.js', QUnit.newMwEnvironment() );
@@ -18,15 +18,13 @@
var argumentLists = [
{
mainSnak: new wb.PropertyNoValueSnak( 42 ),
-   qualifiers: []
-   },
-   {
+   qualifiers: new wb.SnakList()
+   }, {
mainSnak: new wb.PropertySomeValueSnak( 9001 ),
-   qualifiers: []
-   },
-   {
+   qualifiers: new wb.SnakList()
+   }, {
mainSnak: new wb.PropertyValueSnak( 23, new 
dv.StringValue( '~=[,,_,,]:3' ) ),
-   qualifiers: []
+   qualifiers: new wb.SnakList()
}
];
 
@@ -36,11 +34,9 @@
constructorArguments.qualifiers
);
 
-   // TODO: replace with comparison function implemented 
in snak
-   assert.strictEqual(
-   claim.getMainSnak().getPropertyId(),
-   constructorArguments.mainSnak.getPropertyId(),
-   

[MediaWiki-commits] [Gerrit] Fix bug with thumbnail widths. - change (mediawiki...Parsoid)

2013-03-01 Thread Subramanya Sastry (Code Review)
Subramanya Sastry has submitted this change and it was merged.

Change subject: Fix bug with thumbnail widths.
..


Fix bug with thumbnail widths.

"width  + 5" yields surprising results if width is a string.

Document type of width/height and be consistent about 'px' suffixes.

Change-Id: Ia004f9fcd9c7a1d5b32ec3c674b0746f951f7701
---
M js/lib/ext.core.LinkHandler.js
1 file changed, 5 insertions(+), 3 deletions(-)

Approvals:
  Subramanya Sastry: Verified; Looks good to me, approved



diff --git a/js/lib/ext.core.LinkHandler.js b/js/lib/ext.core.LinkHandler.js
index 72bac31..50c5b48 100644
--- a/js/lib/ext.core.LinkHandler.js
+++ b/js/lib/ext.core.LinkHandler.js
@@ -410,8 +410,9 @@
newAttribs = newAttribs.concat(rdfaAttrs.attribs);
 
var width=null, height=null;
+   // local 'width' and 'height' vars will be strings (or null)
if ( oHash.height===null && oHash.width===null ) {
-   width = '200px';
+   width = '200';
} else {
width = oHash.width;
height = oHash.height;
@@ -553,7 +554,8 @@
 
// Handle explicit width value
if ( oHash.width ) {
-   width = oHash.width;
+   // keep local 'width' var numeric, not a string
+   width = parseInt(oHash.width, 10);
}
 
// Handle upright
@@ -565,7 +567,7 @@
}
}
 
-   var figurestyle = "width: " + (width + 5) + "px;",
+   var figurestyle = "width: " + (Math.round(width + 5)) + "px;",
figureclass = "thumb tright thumbinner";
// note that 'border', 'frameless', and 'frame' property is ignored
// for thumbnails

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

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

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


[MediaWiki-commits] [Gerrit] API: Throw error when interwiki is given for various title p... - change (mediawiki/core)

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

Change subject: API: Throw error when interwiki is given for various title param
..


API: Throw error when interwiki is given for various title param

See bug 44341 for action=parse, but the problem with interwiki
processing can also be happen in other modules.

This gives clearer error message on some modules
For example action=move:
Bad title "*title*"
instead of:
Unknown error: "immobile-target-namespace-iw"

Change-Id: I86524533dfd778a169b3996818a1f531efeb
---
M includes/api/ApiBase.php
M includes/api/ApiComparePages.php
M includes/api/ApiEditPage.php
M includes/api/ApiExpandTemplates.php
M includes/api/ApiMove.php
M includes/api/ApiParse.php
M includes/api/ApiQueryAllMessages.php
M includes/api/ApiRollback.php
M includes/api/ApiUndelete.php
M includes/api/ApiWatch.php
10 files changed, 10 insertions(+), 14 deletions(-)

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



diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php
index aff7a2e..d90ea26 100644
--- a/includes/api/ApiBase.php
+++ b/includes/api/ApiBase.php
@@ -756,7 +756,7 @@
$pageObj = null;
if ( isset( $params['title'] ) ) {
$titleObj = Title::newFromText( $params['title'] );
-   if ( !$titleObj ) {
+   if ( !$titleObj || $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$params['title'] ) );
}
if ( !$titleObj->canExist() ) {
diff --git a/includes/api/ApiComparePages.php b/includes/api/ApiComparePages.php
index 6b894c1..79ffcb0 100644
--- a/includes/api/ApiComparePages.php
+++ b/includes/api/ApiComparePages.php
@@ -85,7 +85,7 @@
return $revision;
} elseif( $titleText ) {
$title = Title::newFromText( $titleText );
-   if( !$title ) {
+   if( !$title || $title->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$titleText ) );
}
return $title->getLatestRevID();
diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index b642c6d..1b9df68 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -46,10 +46,6 @@
 
$pageObj = $this->getTitleOrPageId( $params );
$titleObj = $pageObj->getTitle();
-   if ( $titleObj->isExternal() ) {
-   $this->dieUsageMsg( array( 'invalidtitle', 
$params['title'] ) );
-   }
-
$apiResult = $this->getResult();
 
if ( $params['redirect'] ) {
diff --git a/includes/api/ApiExpandTemplates.php 
b/includes/api/ApiExpandTemplates.php
index 826171b..f5898fb 100644
--- a/includes/api/ApiExpandTemplates.php
+++ b/includes/api/ApiExpandTemplates.php
@@ -42,7 +42,7 @@
 
// Create title for parser
$title_obj = Title::newFromText( $params['title'] );
-   if ( !$title_obj ) {
+   if ( !$title_obj || $title_obj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$params['title'] ) );
}
 
diff --git a/includes/api/ApiMove.php b/includes/api/ApiMove.php
index 3f54fee..ba1d6c9 100644
--- a/includes/api/ApiMove.php
+++ b/includes/api/ApiMove.php
@@ -38,7 +38,7 @@
 
if ( isset( $params['from'] ) ) {
$fromTitle = Title::newFromText( $params['from'] );
-   if ( !$fromTitle ) {
+   if ( !$fromTitle || $fromTitle->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$params['from'] ) );
}
} elseif ( isset( $params['fromid'] ) ) {
@@ -54,7 +54,7 @@
$fromTalk = $fromTitle->getTalkPage();
 
$toTitle = Title::newFromText( $params['to'] );
-   if ( !$toTitle ) {
+   if ( !$toTitle || $toTitle->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$params['to'] ) );
}
$toTalk = $toTitle->getTalkPage();
diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php
index b81e5c7..ec8bfee 100644
--- a/includes/api/ApiParse.php
+++ b/includes/api/ApiParse.php
@@ -161,7 +161,7 @@
}
} else { // Not $oldid, $pageid, $page. Hence based on $text
$titleObj = Title::newFromText( $title );
-   if ( !$titleObj ) {
+   if ( !$titleObj || $titleObj->isExternal() ) {
$this->dieUsageMsg( array( 'invalidtitle', 
$title ) );
}

[MediaWiki-commits] [Gerrit] Add -q flag to runtests.sh to suppress diff and update Usage... - change (mediawiki...Parsoid)

2013-03-01 Thread GWicke (Code Review)
GWicke has submitted this change and it was merged.

Change subject: Add -q flag to runtests.sh to suppress diff and update Usage 
note
..


Add -q flag to runtests.sh to suppress diff and update Usage note

No diff / quiet mode is useful to run & commit tests on master followed by
running & diffing on a patch set in a single commandline.

Change-Id: If0c52e441ed6fec9f4c4937b18bfebd4519000a8
---
M js/tests/runtests.sh
1 file changed, 6 insertions(+), 5 deletions(-)

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



diff --git a/js/tests/runtests.sh b/js/tests/runtests.sh
index 7fcee7b..d25ce14 100755
--- a/js/tests/runtests.sh
+++ b/js/tests/runtests.sh
@@ -1,10 +1,9 @@
 #!/bin/sh
 # Simple test runner with result archival in results git repository
 # Usage:
-#  ./runtests.sh -c# wikitext -> HTML DOM tests and commit results
-#  ./runtests.sh -r -c # round-trip tests; commit
-#  ./runtests.sh   # wikitext -> HTML DOM; only show diff (no commit)
-#  ./runtests.sh -r# round-trip tests; only show diff (no commit)
+#  ./runtests.sh -c# run all tests and commit results
+#  ./runtests.sh -c -q # run all tests and commit results, no diff
+#  ./runtests.sh   # run all tests, only show diff (no commit)
 
 # Helper function to echo a message to stderr
 warn() {
@@ -73,5 +72,7 @@
 else
 git commit -m "`tail -11 all.txt`" all.txt || exit 1
 fi
-git diff HEAD~1 | less -R || exit 1
+if [ "$2" != '-q'];then
+git diff HEAD~1 | less -R || exit 1
+fi
 fi

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If0c52e441ed6fec9f4c4937b18bfebd4519000a8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Parsoid
Gerrit-Branch: master
Gerrit-Owner: GWicke 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: MarkTraceur 
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 documentation for wfPickRandom()'s return types - change (mediawiki/core)

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

Change subject: Correct documentation for wfPickRandom()'s return types
..


Correct documentation for wfPickRandom()'s return types

Also make LoadBalancer::pickRandom()'s one consistent.

Change-Id: Ib80827ef20b32fecb799f327545b1232272076d2
---
M includes/GlobalFunctions.php
M includes/db/LoadBalancer.php
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 121d6ca..b49ca65 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -335,7 +335,7 @@
  *
  * @param $weights array
  *
- * @return int|string
+ * @return bool|int|string
  */
 function wfPickRandom( $weights ){
if ( !is_array( $weights ) || count( $weights ) == 0 ) {
diff --git a/includes/db/LoadBalancer.php b/includes/db/LoadBalancer.php
index d249c27..311691d 100644
--- a/includes/db/LoadBalancer.php
+++ b/includes/db/LoadBalancer.php
@@ -121,7 +121,7 @@
 *
 * @param $weights array
 *
-* @return int
+* @return bool|int|string
 */
function pickRandom( $weights ) {
return wfPickRandom( $weights );

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

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

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


[MediaWiki-commits] [Gerrit] Initial extension code. - change (mediawiki...AWS)

2013-03-01 Thread Parent5446 (Code Review)
Parent5446 has submitted this change and it was merged.

Change subject: Initial extension code.
..


Initial extension code.

Added AWS SDK as a dependency and added
basic extension structure.

Change-Id: Ifa77b52ec3359ade0167b69fff8e5231994776bc
---
M .gitignore
A AWS.i18n.php
A AWS.php
A composer.json
A composer.lock
5 files changed, 358 insertions(+), 0 deletions(-)

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



diff --git a/.gitignore b/.gitignore
index 98b092a..f4d9675 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
 *~
 *.kate-swp
 .*.swp
+vendor/
diff --git a/AWS.i18n.php b/AWS.i18n.php
new file mode 100644
index 000..211003d
--- /dev/null
+++ b/AWS.i18n.php
@@ -0,0 +1,18 @@
+ 'This plugin provides classes for using Amazon Web 
Services with MediaWiki.'
+);
+
+$messages['qqq'] = array(
+   'aws-desc' => '{{desc}}'
+);
diff --git a/AWS.php b/AWS.php
new file mode 100644
index 000..6ab567e
--- /dev/null
+++ b/AWS.php
@@ -0,0 +1,48 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @file
+ */
+
+$wgExtensionCredits['other'][] = array(
+   'path'   => __FILE__,
+   'name'   => 'AWS',
+   'url'=> 'https://www.mediawiki.org/wiki/Extension:AWS',
+   'version'=> '0.5',
+   'author' => 'Tyler Romeo',
+   'descriptionmsg' => 'aws-desc'
+);
+
+/**
+ * Credentials to use to connect to AWS
+ */
+$wgAWSCredentials = array(
+   'key' => false,
+   'secret' => false
+);
+
+/**
+ * Region of AWS to connect to
+ */
+$wgAWSRegion = false;
+
+$wgExtensionMessagesFiles['AWS'] = __DIR__ . '/AWS.i18n.php';
+
+require_once( __DIR__ . '/vendor/autoload.php' );
diff --git a/composer.json b/composer.json
new file mode 100644
index 000..6fb86da
--- /dev/null
+++ b/composer.json
@@ -0,0 +1,8 @@
+{
+   "name": "mediawiki/extensions/AWS",
+   "type": "mediawiki-extension",
+   "require": {
+   "aws/aws-sdk-php": ">=2.1.1",
+   "composer/installers": "~1.0"
+   }
+}
diff --git a/composer.lock b/composer.lock
new file mode 100644
index 000..8dce841
--- /dev/null
+++ b/composer.lock
@@ -0,0 +1,283 @@
+{
+"hash": "558822d599154c989db6b8b4a599eaa4",
+"packages": [
+{
+"name": "aws/aws-sdk-php",
+"version": "2.1.2",
+"source": {
+"type": "git",
+"url": "https://github.com/aws/aws-sdk-php.git";,
+"reference": "2.1.2"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/aws/aws-sdk-php/zipball/2.1.2";,
+"reference": "2.1.2",
+"shasum": ""
+},
+"require": {
+"guzzle/guzzle": ">=3.2,<3.3",
+"php": ">=5.3.3"
+},
+"require-dev": {
+"doctrine/common": "2.3.*",
+"ext-apc": "*",
+"monolog/monolog": "1.2.*",
+"phpunit/phpunit": "3.7.*",
+"symfony/class-loader": "2.*"
+},
+"time": "2013-02-19 01:30:36",
+"type": "library",
+"extra": {
+"branch-alias": {
+"dev-master": "2.1.x-dev"
+}
+},
+"autoload": {
+"psr-0": {
+"Aws": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"Apache-2.0"
+],
+"authors": [
+{
+"name": "Amazon Web Services",
+"homepage": "http://aws.amazon.com";
+}
+],
+"description": "AWS SDK for PHP",
+"homepage": "http://aws.amazon.com/sdkforphp2";,
+"keywords": [
+"amazon",
+"aws",
+"dynamodb",
+"ec2",
+"s3",
+"sdk"
+]
+},
+{
+"name": "composer/installers",
+"version": "v1.0.2",
+"source": {
+"type": "git",
+"url": "https://github.com/composer/installers.git";,
+"reference": "v1.0.2"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/composer/installers/zipball/v1.0.2";,
+"reference": "v1.0.2",
+"shasum": ""
+},
+"replace": {
+"shama/baton": "*"
+},
+"require-dev": {
+"composer/composer": "1.0.*@dev",
+"phpunit/phpunit": "3.7.*"
+},
+"time": "2013-02-18 00:51:06",
+"type": "composer-installer",
+"

[MediaWiki-commits] [Gerrit] (bug 44745) Toolbar controller widget - change (mediawiki...Wikibase)

2013-03-01 Thread Daniel Werner (Code Review)
Daniel Werner has submitted this change and it was merged.

Change subject: (bug 44745) Toolbar controller widget
..


(bug 44745) Toolbar controller widget

Initialized in the repo's entityViewInit.js, the toolbar controller widget 
initializes
and manages all "add" and "edit" toolbars registered to the controller. This 
ensures
a clean separation between the toolbars and the actual widgets they interact 
with.

- patch set 2: Moved registry for toolbarcontroller definitions

Change-Id: If9537051448bc263ce749c0b56bba2a001c4b74f
---
M lib/resources/Resources.php
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimview.js
M lib/resources/jquery.wikibase/jquery.wikibase.edittoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityview.js
M lib/resources/jquery.wikibase/jquery.wikibase.listview.js
M lib/resources/jquery.wikibase/jquery.wikibase.referenceview.js
M lib/resources/jquery.wikibase/jquery.wikibase.statementview.js
A 
lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.definitions.js
A 
lib/resources/jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js
M repo/resources/Resources.php
M repo/resources/wikibase.ui.entityViewInit.js
13 files changed, 336 insertions(+), 66 deletions(-)

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



diff --git a/lib/resources/Resources.php b/lib/resources/Resources.php
index 7971739..9cd155f 100644
--- a/lib/resources/Resources.php
+++ b/lib/resources/Resources.php
@@ -318,6 +318,17 @@
)
),
 
+   'jquery.wikibase.toolbarcontroller' => $moduleTemplate + array(
+   'scripts' => array(
+   
'jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.js',
+   
'jquery.wikibase/jquery.wikibase.toolbarcontroller/toolbarcontroller.definitions.js',
+   ),
+   'dependencies' => array(
+   'jquery.wikibase.addtoolbar',
+   'jquery.wikibase.edittoolbar',
+   )
+   ),
+
'jquery.wikibase.addtoolbar' => $moduleTemplate + array(
'scripts' => array(
'jquery.wikibase/jquery.wikibase.addtoolbar.js',
@@ -390,7 +401,7 @@
),
'dependencies' => array(
'jquery.ui.TemplatedWidget',
-   'jquery.wikibase.edittoolbar',
+   'jquery.wikibase.toolbarcontroller',
)
),
 
@@ -451,6 +462,7 @@
),
'dependencies' => array(
'jquery.wikibase.claimview',
+   'jquery.wikibase.toolbarcontroller',
)
),
 
@@ -459,10 +471,10 @@

'jquery.wikibase/jquery.wikibase.statementview.js',
),
'dependencies' => array(
-   'jquery.wikibase.addtoolbar',
'jquery.wikibase.claimview',
'jquery.wikibase.listview',
'jquery.wikibase.referenceview',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.utilities',
),
'messages' => array(
@@ -478,7 +490,7 @@
),
'dependencies' => array(
'jquery.wikibase.claimview',
-   'jquery.wikibase.edittoolbar',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.templates',
),
'messages' => array(
@@ -491,9 +503,9 @@
'jquery.wikibase/jquery.wikibase.entityview.js'
),
'dependencies' => array(
-   'jquery.wikibase.addtoolbar',
'jquery.wikibase.statementview',
'jquery.wikibase.claimlistview',
+   'jquery.wikibase.toolbarcontroller',
'wikibase.templates'
),
'messages' => array(
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9cec3fe..9e9a555 100644
--- a/lib/resources/jquery.wikibase/

[MediaWiki-commits] [Gerrit] Re-enable voting for EducationProgram - change (integration/zuul-config)

2013-03-01 Thread Hashar (Code Review)
Hashar has submitted this change and it was merged.

Change subject: Re-enable voting for EducationProgram
..


Re-enable voting for EducationProgram

Issue it was disabled by fixed in https://gerrit.wikimedia.org/r/#/c/50914/

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

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



diff --git a/layout.yaml b/layout.yaml
index 85f9b4f..46035ac 100644
--- a/layout.yaml
+++ b/layout.yaml
@@ -274,11 +274,6 @@
   - name: ^mwext-GeoData-testextensions.*
 voting: false
 
-  # Lacks SQLite support https://gerrit.wikimedia.org/r/#/c/43828/
-  # Has a test not passing under SQLite
-  - name: ^mwext-EducationProgram-testextensions-master
-voting: false
-
   # LabeledSectionTransclusion has only parser tests which does not
   # play well for now. https://gerrit.wikimedia.org/r/#/c/38114 should
   # let PHPUnit load in the parser tests though. See bug 42506.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I47dcaaf596650efe91f2401a4fcfaeb47d7bebc7
Gerrit-PatchSet: 2
Gerrit-Project: integration/zuul-config
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Ragesoss 
Gerrit-Reviewer: Reedy 

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


[MediaWiki-commits] [Gerrit] Minor tweaks to resource module definitions and test - change (mediawiki...SemanticMediaWiki)

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

Change subject: Minor tweaks to resource module definitions and test
..


Minor tweaks to resource module definitions and test

Change-Id: I362bd1534cf678d7ee8fbb4d5693887d3f2c345f
---
M resources/Resources.php
M tests/phpunit/includes/resources/ResourcesTest.php
2 files changed, 9 insertions(+), 6 deletions(-)

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



diff --git a/resources/Resources.php b/resources/Resources.php
index 97ed790..4507b60 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -29,6 +29,8 @@
  * @author mwjames
  */
 
+global $smwgIP, $smwgScriptPath;
+
 $moduleTemplate = array(
'localBasePath' => $smwgIP ,
'remoteBasePath' => $smwgScriptPath,
diff --git a/tests/phpunit/includes/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
index e9a515c..087d43c 100644
--- a/tests/phpunit/includes/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -40,10 +40,12 @@
 
/**
 * Helper method to load resources only valid for this extension
+*
+* @return array
 */
-   private function load(){
-   global $smwgIP, $smwgScriptPath;
-   return include($smwgIP . "/resources/Resources.php");
+   private function getSMWResourceModules(){
+   global $smwgIP;
+   return include $smwgIP . '/resources/Resources.php';
}
 
/**
@@ -53,7 +55,7 @@
public function moduleDataProvider() {
$resourceLoader = new ResourceLoader();
$context = ResourceLoaderContext::newDummyContext();
-   $modules = $this->load();
+   $modules = $this->getSMWResourceModules();
 
return array( array( $modules, $resourceLoader, $context ) );
}
@@ -64,7 +66,6 @@
 * @dataProvider moduleDataProvider
 */
public function testModulesScriptsFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context ){
-
foreach ( $modules as $name => $values ){
 
// Get module details
@@ -81,7 +82,6 @@
 *
 * @dataProvider moduleDataProvider
 */
-
public function testModulesStylesFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context  ){
 
foreach ( $modules as $name => $values ){
@@ -97,4 +97,5 @@
}
}
}
+
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I362bd1534cf678d7ee8fbb4d5693887d3f2c345f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Mwjames 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add type hints - change (mediawiki...SemanticMediaWiki)

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

Change subject: Add type hints
..


Add type hints

Change-Id: I427eb4ab52f6ad80c993668f63326cde500e436b
---
M tests/phpunit/includes/resources/ResourcesTest.php
1 file changed, 2 insertions(+), 3 deletions(-)

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



diff --git a/tests/phpunit/includes/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
index 61bf118..e9a515c 100644
--- a/tests/phpunit/includes/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -40,7 +40,6 @@
 
/**
 * Helper method to load resources only valid for this extension
-*
 */
private function load(){
global $smwgIP, $smwgScriptPath;
@@ -64,7 +63,7 @@
 *
 * @dataProvider moduleDataProvider
 */
-   public function testModulesScriptsFilesAreAccessible( $modules, 
$resourceLoader, $context ){
+   public function testModulesScriptsFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context ){
 
foreach ( $modules as $name => $values ){
 
@@ -83,7 +82,7 @@
 * @dataProvider moduleDataProvider
 */
 
-   public function testModulesStylesFilesAreAccessible( $modules, 
$resourceLoader, $context  ){
+   public function testModulesStylesFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context  ){
 
foreach ( $modules as $name => $values ){
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I427eb4ab52f6ad80c993668f63326cde500e436b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Mwjames 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Add type hints - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Add type hints
..

Add type hints

Change-Id: I427eb4ab52f6ad80c993668f63326cde500e436b
---
M tests/phpunit/includes/resources/ResourcesTest.php
1 file changed, 2 insertions(+), 3 deletions(-)


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

diff --git a/tests/phpunit/includes/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
index 61bf118..e9a515c 100644
--- a/tests/phpunit/includes/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -40,7 +40,6 @@
 
/**
 * Helper method to load resources only valid for this extension
-*
 */
private function load(){
global $smwgIP, $smwgScriptPath;
@@ -64,7 +63,7 @@
 *
 * @dataProvider moduleDataProvider
 */
-   public function testModulesScriptsFilesAreAccessible( $modules, 
$resourceLoader, $context ){
+   public function testModulesScriptsFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context ){
 
foreach ( $modules as $name => $values ){
 
@@ -83,7 +82,7 @@
 * @dataProvider moduleDataProvider
 */
 
-   public function testModulesStylesFilesAreAccessible( $modules, 
$resourceLoader, $context  ){
+   public function testModulesStylesFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context  ){
 
foreach ( $modules as $name => $values ){
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I427eb4ab52f6ad80c993668f63326cde500e436b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
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] Minor tweaks to resource module definitions and test - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Minor tweaks to resource module definitions and test
..

Minor tweaks to resource module definitions and test

Change-Id: I362bd1534cf678d7ee8fbb4d5693887d3f2c345f
---
M resources/Resources.php
M tests/phpunit/includes/resources/ResourcesTest.php
2 files changed, 9 insertions(+), 6 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index 97ed790..4507b60 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -29,6 +29,8 @@
  * @author mwjames
  */
 
+global $smwgIP, $smwgScriptPath;
+
 $moduleTemplate = array(
'localBasePath' => $smwgIP ,
'remoteBasePath' => $smwgScriptPath,
diff --git a/tests/phpunit/includes/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
index e9a515c..087d43c 100644
--- a/tests/phpunit/includes/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -40,10 +40,12 @@
 
/**
 * Helper method to load resources only valid for this extension
+*
+* @return array
 */
-   private function load(){
-   global $smwgIP, $smwgScriptPath;
-   return include($smwgIP . "/resources/Resources.php");
+   private function getSMWResourceModules(){
+   global $smwgIP;
+   return include $smwgIP . '/resources/Resources.php';
}
 
/**
@@ -53,7 +55,7 @@
public function moduleDataProvider() {
$resourceLoader = new ResourceLoader();
$context = ResourceLoaderContext::newDummyContext();
-   $modules = $this->load();
+   $modules = $this->getSMWResourceModules();
 
return array( array( $modules, $resourceLoader, $context ) );
}
@@ -64,7 +66,6 @@
 * @dataProvider moduleDataProvider
 */
public function testModulesScriptsFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context ){
-
foreach ( $modules as $name => $values ){
 
// Get module details
@@ -81,7 +82,6 @@
 *
 * @dataProvider moduleDataProvider
 */
-
public function testModulesStylesFilesAreAccessible( $modules, 
ResourceLoader $resourceLoader, $context  ){
 
foreach ( $modules as $name => $values ){
@@ -97,4 +97,5 @@
}
}
}
+
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I362bd1534cf678d7ee8fbb4d5693887d3f2c345f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
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 localtion of resources test - change (mediawiki...SemanticMediaWiki)

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

Change subject: Fix localtion of resources test
..


Fix localtion of resources test

Change-Id: Ib061c31eb76f31bb204419682b040e516d8cfe9a
---
R tests/phpunit/includes/resources/ResourcesTest.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/tests/phpunit/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
similarity index 97%
rename from tests/phpunit/resources/ResourcesTest.php
rename to tests/phpunit/includes/resources/ResourcesTest.php
index 5e606e0..61bf118 100644
--- a/tests/phpunit/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -44,7 +44,7 @@
 */
private function load(){
global $smwgIP, $smwgScriptPath;
-   return include( $smwgIP . "/resources/Resources.php" );
+   return include($smwgIP . "/resources/Resources.php");
}
 
/**

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib061c31eb76f31bb204419682b040e516d8cfe9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
Gerrit-Branch: master
Gerrit-Owner: Jeroen De Dauw 
Gerrit-Reviewer: Jeroen De Dauw 
Gerrit-Reviewer: Mwjames 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Fix localtion of resources test - change (mediawiki...SemanticMediaWiki)

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

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


Change subject: Fix localtion of resources test
..

Fix localtion of resources test

Change-Id: Ib061c31eb76f31bb204419682b040e516d8cfe9a
---
R tests/phpunit/includes/resources/ResourcesTest.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/tests/phpunit/resources/ResourcesTest.php 
b/tests/phpunit/includes/resources/ResourcesTest.php
similarity index 97%
rename from tests/phpunit/resources/ResourcesTest.php
rename to tests/phpunit/includes/resources/ResourcesTest.php
index 5e606e0..61bf118 100644
--- a/tests/phpunit/resources/ResourcesTest.php
+++ b/tests/phpunit/includes/resources/ResourcesTest.php
@@ -44,7 +44,7 @@
 */
private function load(){
global $smwgIP, $smwgScriptPath;
-   return include( $smwgIP . "/resources/Resources.php" );
+   return include($smwgIP . "/resources/Resources.php");
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib061c31eb76f31bb204419682b040e516d8cfe9a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticMediaWiki
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] Minor fixes (i18n and special page group) - change (mediawiki...CentralAuth)

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

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


Change subject: Minor fixes (i18n and special page group)
..

Minor fixes (i18n and special page group)

This fixes the description of 'right-centralauth-lock' (that
right changed in I745d252056795fa3631e40f65f9aeef519c94fdb),
the action text for centralauth-lock, the Qqq for action-
centralauth-lock and sets the special page group 'users' for
the new MultiLock.

Change-Id: I8a20cdce1bcf6d95364f6323b6248070314b5256
---
M CentralAuth.i18n.php
M CentralAuth.php
2 files changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralAuth 
refs/changes/64/51664/1

diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index bdddba4..a554ad1 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -388,7 +388,7 @@
'right-globalgroupmembership'   => 'Edit membership to global groups',
'right-centralauth-autoaccount' => 'Automatically login with global 
account',
'right-centralauth-unmerge' => 'Unmerge global account',
-   'right-centralauth-lock'=> 'Lock or hide global account',
+   'right-centralauth-lock'=> 'Lock or unlock global account',
'right-centralauth-oversight'   => 'Suppress or hide global account',
'right-centralauth-merge'   => 'Merge their account',
'right-globalgrouppermissions'  => 'Manage global groups',
@@ -754,7 +754,7 @@
 
 See also:
 * {{msg-mw|Abusefilter-edit-builder-vars-user-groups}}.',
-   'action-centralauth-lock' => '{{Doc-action|lock}}',
+   'action-centralauth-lock' => '{{Doc-action|centralauth-lock}}',
 );
 
 /** Afrikaans (Afrikaans)
diff --git a/CentralAuth.php b/CentralAuth.php
index f395723..451dffb 100644
--- a/CentralAuth.php
+++ b/CentralAuth.php
@@ -243,6 +243,7 @@
 $wgSpecialPageGroups['GlobalGroupPermissions'] = 'users';
 $wgSpecialPageGroups['WikiSets'] = 'wiki';
 $wgSpecialPageGroups['GlobalUsers'] = 'users';
+$wgSpecialPageGroups['MultiLock'] = 'users';
 
 $wgAPIModules['deleteglobalaccount'] = 'ApiDeleteGlobalAccount';
 $wgAPIModules['setglobalaccountstatus'] = 'ApiSetGlobalAccountStatus';

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

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

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


[MediaWiki-commits] [Gerrit] Regression: Do not enable random module on special pages - change (mediawiki...MobileFrontend)

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

Change subject: Regression: Do not enable random module on special pages
..


Regression: Do not enable random module on special pages

Currently incompatible and causes breakage

Change-Id: I5423eca2bd9f4e1715e239a802c37f7ecc030e7b
---
M javascripts/modules/mf-random.js
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/javascripts/modules/mf-random.js b/javascripts/modules/mf-random.js
index 683f927..6884405 100644
--- a/javascripts/modules/mf-random.js
+++ b/javascripts/modules/mf-random.js
@@ -1,6 +1,7 @@
 ( function( M,  $ ) {
 var m = ( function() {
-   var randomPageReq;
+   var randomPageReq,
+   isSpecialPage = mw.config.get( 'wgNamespaceNumber' ) ===  
mw.config.get( 'wgNamespaceIds' ).special;
 
function makeHeader( articles ) {
var $list, $c;
@@ -62,7 +63,7 @@
}
 
return {
-   init: M.history.supportsHistoryApi ? init : $.noop
+   init: M.history.supportsHistoryApi && !isSpecialPage ? init : 
$.noop
};
 }() );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5423eca2bd9f4e1715e239a802c37f7ecc030e7b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: JGonera 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: MaxSem 
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 44674) Entity search: Prevent closing suggestion list - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44674) Entity search: Prevent closing suggestion list
..

(bug 44674) Entity search: Prevent closing suggestion list

The change set prevents the suggestion list of the entity selector replacing 
the native
search box from closing if there are no actual suggestions. If there are no 
suggestions,
the link to the full-text search will remain visible.

Change-Id: I0069a6b1ae1f6264c2a59c29bafffbb6b520a946
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M repo/resources/wikibase.ui.entitysearch.js
2 files changed, 24 insertions(+), 10 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 55cfd66..59cd1a7 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -51,7 +51,7 @@
  * @option messages['more'] {String} (optional) Label of the link to display 
more suggestions.
  * Default value: 'more'
  *
- * @option emulateSearch {boolean} (optional) Allows emulating the behaviour 
of a search box by
+ * @option emulateSearchBox {boolean} (optional) Allows emulating the 
behaviour of a search box by
  * linking the entities to their corresponding pages. Instead of 
selecting an entity, the
  * whole page will be redirected to the entity page.
  * Default value: false
@@ -117,7 +117,7 @@
'aliases-label': mwMsgOrString( 
'wikibase-aliases-label', 'also known as:' ),
'more': mwMsgOrString( 
'wikibase-entityselector-more', 'more' )
},
-   emulateSearch: false // TODO: Allow setting a custom 
target to trigger the redirect on
+   emulateSearchBox: false // TODO: Allow setting a custom 
target to trigger the redirect on
},
 
/**
@@ -193,7 +193,7 @@
// and select it
if ( event.keyCode === $.ui.keyCode.ENTER ) {
 
-   if ( self.options.emulateSearch && 
self.selectedEntity() ) {
+   if ( self.options.emulateSearchBox && 
self.selectedEntity() ) {
// Prevent submitting search 
form since we want to redirect directly to the
// entity.

event.stopImmediatePropagation();
@@ -231,7 +231,7 @@
$( event.target ).closest( 
'.ui-menu-item' ).data( 'item.autocomplete' );
self._setEntity( item );
 
-   if ( self.options.emulateSearch ) {
+   if ( self.options.emulateSearchBox ) {
window.location.href = item.url;
}
 
@@ -344,7 +344,21 @@
 * @see ui.suggester.close
 */
close: function( event ) {
-   if ( !event || !event.originalEvent || 
event.originalEvent.type !== 'programmatic' ) {
+   var originalType = ( event && event.originalEvent && 
event.originalEvent.type )
+   ? event.originalEvent.type
+   : null;
+
+   // When emulating a search box and there is a custom 
item, only close the list of
+   // suggestions when blurring or when there is no text 
in the input box.
+   if (
+   this.options.emulateSearchBox && 
this.options.customListItem
+   && originalType !== 'blur' && 
this.element.val() !== ''
+   ) {
+   // Reset list content leaving just the custom 
item.
+   this.offset = 0;
+   this.menu.element.children().remove();
+   this.menu.refresh();
+   } else {
// Do not close the list of suggestions when 
programmatically selecting an entity
// (e.g by typing an exact, unique entity 
label), allowing the user to check that
// the typed string actually matches a single 
entity.
@@ -486,13 +500,13 @@
}
} else {
thi

[MediaWiki-commits] [Gerrit] Regression: Fix broken tests - change (mediawiki...MobileFrontend)

2013-03-01 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Regression: Fix broken tests
..


Regression: Fix broken tests

Due to renaming of watchlist.js to watchstar.js

Change-Id: Icd3fc91e752f05753832beb162efd0e72b74d452
---
M includes/MobileFrontend.hooks.php
R tests/js/test_mf-watchstar.js
2 files changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/MobileFrontend.hooks.php 
b/includes/MobileFrontend.hooks.php
index 07cbca0..d6d05c6 100644
--- a/includes/MobileFrontend.hooks.php
+++ b/includes/MobileFrontend.hooks.php
@@ -142,7 +142,7 @@
'javascripts/common/mf-notification.js',
'javascripts/modules/mf-photo.js', 
'tests/js/test_mf-photo.js',
'javascripts/modules/mf-references.js', 
'tests/js/test_references.js',
-   'javascripts/modules/mf-watchlist.js', 
'tests/js/test_mf-watchlist.js',
+   'javascripts/modules/mf-watchstar.js', 
'tests/js/test_mf-watchstar.js',
'javascripts/modules/mf-last-modified.js', 
'tests/js/test_mf-last-modified.js' ),
'dependencies' => array( ),
'localBasePath' => dirname( dirname( __FILE__ ) 
),
diff --git a/tests/js/test_mf-watchlist.js b/tests/js/test_mf-watchstar.js
similarity index 100%
rename from tests/js/test_mf-watchlist.js
rename to tests/js/test_mf-watchstar.js

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd3fc91e752f05753832beb162efd0e72b74d452
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: MaxSem 
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 44674) "Full-text search" section for entity search - change (mediawiki...Wikibase)

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

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


Change subject: (bug 44674) "Full-text search" section for entity search
..

(bug 44674) "Full-text search" section for entity search

Change set depends on change Ia67b5aea6886bba460dff7535e2306234201624c in the
DataValues extension.
The entity selector replacing the native search box now will display an 
additional
section in the list of suggestions that allows triggering a full-text search.
For the moment, still, the list of suggestions will close when there are no
suggestions. This will be addressed in another commit since that behavior 
depends
on another change set.

Change-Id: I2d9c8554f3e531977997ebc8120621b79730a130
---
M lib/resources/jquery.ui/jquery.ui.suggester.js
M repo/resources/Resources.php
A repo/resources/themes/default/wikibase.ui.entitysearch.css
M repo/resources/wikibase.ui.entitysearch.js
4 files changed, 67 insertions(+), 2 deletions(-)


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

diff --git a/lib/resources/jquery.ui/jquery.ui.suggester.js 
b/lib/resources/jquery.ui/jquery.ui.suggester.js
index f85ad69..9a59bc1 100644
--- a/lib/resources/jquery.ui/jquery.ui.suggester.js
+++ b/lib/resources/jquery.ui/jquery.ui.suggester.js
@@ -374,7 +374,13 @@
throw new Error( 'suggester: Custom list item 
is invalid.' );
}
 
-   return $li.appendTo( this.menu.element );
+   if ( this.menu.element.children( '.ui-suggester-custom' 
).length > 0 ) {
+   // TODO: This is entity selector "more" button 
specific. There should be a method
+   // to specify a position where to add the 
custom list item.
+   return this.menu.element.children( 
'.ui-suggester-custom' ).first().before( $li );
+   } else {
+   return $li.appendTo( this.menu.element );
+   }
},
 
/**
diff --git a/repo/resources/Resources.php b/repo/resources/Resources.php
index dac0f07..6f0a204 100644
--- a/repo/resources/Resources.php
+++ b/repo/resources/Resources.php
@@ -60,9 +60,16 @@
'scripts' => array(
'wikibase.ui.entitysearch.js',
),
+   'styles' => array(
+   'themes/default/wikibase.ui.entitysearch.css',
+   ),
'dependencies' => array(
+   'jquery.eachchange',
'jquery.wikibase.entityselector',
),
+   'messages' => array(
+   'searchsuggest-containing',
+   )
),
 
/* Wikibase special pages */
diff --git a/repo/resources/themes/default/wikibase.ui.entitysearch.css 
b/repo/resources/themes/default/wikibase.ui.entitysearch.css
new file mode 100644
index 000..3a52256
--- /dev/null
+++ b/repo/resources/themes/default/wikibase.ui.entitysearch.css
@@ -0,0 +1,26 @@
+/**
+ * Styles for the entity selector search box replacement.
+ *
+ * @since 0.4
+ * @file
+ * @ingroup WikibaseRepo
+ *
+ * @license GNU GPL v2+
+ * @author H. Snater < mediaw...@snater.com >
+ */
+
+.ui-entityselector-list .wb-entitysearch-suggestions {
+   border-top: 1px solid #C9C9C9;
+}
+
+.ui-entityselector-list .wb-entitysearch-suggestions .suggestions-special {
+   display: block;
+   border: none;
+   background-color: transparent;
+   margin: 0;
+   padding: 0;
+}
+
+.ui-entityselector-list .wb-entitysearch-suggestions .ui-state-hover div {
+   color: #FF;
+}
diff --git a/repo/resources/wikibase.ui.entitysearch.js 
b/repo/resources/wikibase.ui.entitysearch.js
index 2858e0d..6ffb426 100644
--- a/repo/resources/wikibase.ui.entitysearch.js
+++ b/repo/resources/wikibase.ui.entitysearch.js
@@ -16,6 +16,14 @@
$input = $( '#searchInput' );
 
/**
+* Updates the suggestion list special item that triggers a 
full-text search.
+*/
+   function updateSuggestionSpecial() {
+   var $suggestionsSpecial = $( 
'.wb-entitysearch-suggestions .suggestions-special' );
+   $suggestionsSpecial.find( '.special-query' ).text( 
$input.val() );
+   }
+
+   /**
 * Removes the native search box suggestion list.
 *
 * @param {Object} input Search box node
@@ -45,7 +53,25 @@
.entityselector( {
url: mw.config.get( 'wgServer' ) + mw.config.get( 
'wgScriptPath' ) + '/api.php',
 

[MediaWiki-commits] [Gerrit] Preserve caller expectations for behaviour of sslVerifyHost - change (mediawiki/core)

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

Change subject: Preserve caller expectations for behaviour of sslVerifyHost
..


Preserve caller expectations for behaviour of sslVerifyHost

(bug 42441) The previous patch unnecessarily broke backwards
compatibility in the Http::request() API, following cURL's broken
conventions for sslVerifyHost instead of the boolean interpretation
expected by all existing callers. This change reverts that one, and
fixes the bug in another way. See Ia6535f10.

Also don't bother wrapping the $this->sslVerifyHost access with isset()
since it's always set.

Change-Id: Ia4e1689249b6ac515b859ea2eca1dcff3e63098c
---
M includes/HttpFunctions.php
1 file changed, 4 insertions(+), 19 deletions(-)

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



diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php
index 731ab04..8e48da4 100644
--- a/includes/HttpFunctions.php
+++ b/includes/HttpFunctions.php
@@ -45,9 +45,7 @@
 *  Otherwise it will use $wgHTTPProxy (if set)
 *  Otherwise it will use the environment 
variable "http_proxy" (if set)
 *- noProxy Don't use any proxy at all. Takes 
precedence over proxy value(s).
-*- sslVerifyHost   (curl only) Set to 2 to verify hostname 
against certificate
-*  Setting to 1 (or true) will NOT 
verify the host name. It will
-*  only check its existence. Setting 
to 0 (or false) disables entirely.
+*- sslVerifyHost   (curl only) Verify hostname against 
certificate
 *- sslVerifyCert   (curl only) Verify SSL certificate
 *- caInfo  (curl only) Provide CA information
 *- maxRedirectsMaximum number of redirects to follow 
(defaults to 5)
@@ -187,15 +185,7 @@
protected $postData = null;
protected $proxy = null;
protected $noProxy = false;
-   /**
-* Parameter passed to Curl that specifies whether
-* to validate SSL certificates.
-*
-* Setting to 0 disables entirely. Setting to 1 checks
-* the existence of a CN, but doesn't verify it. Setting
-* to 2 (the default) actually verifies the host.
-*/
-   protected $sslVerifyHost = 2;
+   protected $sslVerifyHost = true;
protected $sslVerifyCert = true;
protected $caInfo = null;
protected $method = "GET";
@@ -726,13 +716,8 @@
}
$this->curlOptions[CURLOPT_USERAGENT] = 
$this->reqHeaders['User-Agent'];
 
-   if ( isset( $this->sslVerifyHost ) ) {
-   $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = 
$this->sslVerifyHost;
-   }
-
-   if ( isset( $this->sslVerifyCert ) ) {
-   $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = 
$this->sslVerifyCert;
-   }
+   $this->curlOptions[CURLOPT_SSL_VERIFYHOST] = 
$this->sslVerifyHost ? 2 : 0;
+   $this->curlOptions[CURLOPT_SSL_VERIFYPEER] = 
$this->sslVerifyCert;
 
if ( $this->caInfo ) {
$this->curlOptions[CURLOPT_CAINFO] = $this->caInfo;

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

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

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


[MediaWiki-commits] [Gerrit] (bug 44154) Blank feedback is confusing - change (mediawiki...ArticleFeedbackv5)

2013-03-01 Thread Matthias Mullie (Code Review)
Matthias Mullie has uploaded a new change for review.

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


Change subject: (bug 44154) Blank feedback is confusing
..

(bug 44154) Blank feedback is confusing

* Display message when no comment was submitted
* Use "more"-link to toggle to full text

Change-Id: I8219d942a79fbb54082a06a488fd384fd6cadde5
---
M ArticleFeedbackv5.i18n.php
M ArticleFeedbackv5.render.php
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
M modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.js
4 files changed, 29 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ArticleFeedbackv5 
refs/changes/60/51660/1

diff --git a/ArticleFeedbackv5.i18n.php b/ArticleFeedbackv5.i18n.php
index 91cab61..ecbc89d 100644
--- a/ArticleFeedbackv5.i18n.php
+++ b/ArticleFeedbackv5.i18n.php
@@ -235,7 +235,7 @@
'articlefeedbackv5watchlist' => 'Article feedback - My watched pages',
'articlefeedbackv5-desc' => 'Article feedback',
'articlefeedbackv5-comment-more' => 'More',
-   'articlefeedbackv5-comment-less' => 'Less',
+   'articlefeedbackv5-comment-empty' => 'No text was entered',
'articlefeedbackv5-header-message' => 'Please promote good feedback and 
help improve this article. $1',
'articlefeedbackv5-header-message-link-text' => 'Learn more',
'articlefeedbackv5-beta-label' => 'BETA',
@@ -946,9 +946,9 @@
 Please visit http://prototype.wikimedia.org/articleassess/Main_Page for a 
prototype installation.',
'articlefeedbackv5watchlist' => '[[Special:SpecialPages]] item',
'articlefeedbackv5-desc' => '{{desc|name=Article Feedback 
v5|url=http://www.mediawiki.org/wiki/Extension:ArticleFeedbackv5}}',
-   'articlefeedbackv5-comment-more' => 'Label for the button to expand the 
truncated comment on feedback. Swaps to articlefeedbackv5-comment-less after 
being clicked.
+   'articlefeedbackv5-comment-more' => 'Label for the button to expand the 
truncated comment on feedback.
 {{Identical|More}}',
-   'articlefeedbackv5-comment-less' => 'Previous label 
(articlefeedbackv5-comment-more) switches to this after being clicked. This is 
the label for collapsing the expanded comments.',
+   'articlefeedbackv5-comment-empty' => 'Text to be displayed instead of 
the feedback comment in case there was no comment',
'articlefeedbackv5-header-message' => 'A message to be displayed on the 
special page, encouraging users to behave well. Parameters:
 * $1 is a link to read more about this.',
'articlefeedbackv5-header-message-link-text' => 'The link text to be 
displayed (at $1 on articlefeedbackv5-header-message-text)',
diff --git a/ArticleFeedbackv5.render.php b/ArticleFeedbackv5.render.php
index 33107f4..e5aa018 100644
--- a/ArticleFeedbackv5.render.php
+++ b/ArticleFeedbackv5.render.php
@@ -498,6 +498,8 @@
 
$id = $record->aft_id;
$text = $record->aft_comment;
+
+   // permalink should always display long version ;)
$short = $this->isPermalink ? $text : $wgLang->truncate( $text, 
250 );
 
// If the short string is the same size as the original, no 
truncation
@@ -527,17 +529,24 @@
);
}
 
+   // if no comment was entered, display message
+   if ( $text == '' ) {
+   $short = Linker::commentBlock( wfMessage( 
'articlefeedbackv5-comment-empty' )->escaped() );
+   } else {
+   $short = Html::element( 'span',
+   array(
+   'class' => 
'articleFeedbackv5-comment-short',
+   'id'=> 
"articleFeedbackv5-comment-short-$id"
+   ),
+   $short
+   );
+   }
+
return
Html::rawElement(
'blockquote',
array(),
-   Html::element( 'span',
-   array(
-   'class' => 
'articleFeedbackv5-comment-short',
-   'id'=> 
"articleFeedbackv5-comment-short-$id"
-   ),
-   $short
-   ) .
+   $short .
$fullLengthToggle
);
}
diff --git 
a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css 
b/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
index 4b02f2a..0c69a7e 100644
--- a/modules/jquery.articleFeedbackv5/jquery.articleFeedbackv5.special.css
+++ b/modu

[MediaWiki-commits] [Gerrit] Do not backport Scots Gaelic to 1.19 and 1.20 - change (translatewiki)

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

Change subject: Do not backport Scots Gaelic to 1.19 and 1.20
..


Do not backport Scots Gaelic to 1.19 and 1.20

This must be done because the plural forms are not backwards compatible.

Change-Id: I6203f2e150d99b56e1c96d667f3e69177c10b1f7
---
M bin/repoexport
1 file changed, 6 insertions(+), 2 deletions(-)

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



diff --git a/bin/repoexport b/bin/repoexport
index f4a002c..f1661cb 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -71,10 +71,14 @@
php "$EXPORTER" --target . --group 'ext-installer' --lang '*' --skip 
"$SKIPLANGS" $HOURS &
 
if [ -d "mediawiki/REL1_20/" ]
-   then php "$EXPORTER" --target mediawiki/REL1_20/languages/messages 
--group 'core-1.20' --lang '*' --skip "$SKIPLANGS" --threshold 18 &
+   then
+   # Also skip "gd" because plurals are not compatible pre 1.21.
+   php "$EXPORTER" --target mediawiki/REL1_20/languages/messages 
--group 'core-1.20' --lang '*' --skip "gd, $SKIPLANGS" --threshold 18 &
fi
if [ -d "mediawiki/REL1_19/" ]
-   then php "$EXPORTER" --target mediawiki/REL1_19/languages/messages 
--group 'core-1.19' --lang '*' --skip "$SKIPLANGS" --threshold 18 &
+   then
+   # Also skip "gd" because plurals are not compatible pre 1.21.
+   php "$EXPORTER" --target mediawiki/REL1_19/languages/messages 
--group 'core-1.19' --lang '*' --skip "gd, $SKIPLANGS" --threshold 18 &
fi
wait
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6203f2e150d99b56e1c96d667f3e69177c10b1f7
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
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] Implement "project" wikia-quick in a better way - change (translatewiki)

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

Change subject: Implement "project" wikia-quick in a better way
..


Implement "project" wikia-quick in a better way

Change-Id: If055884561efba3abb76bc18705a9b6e9ec020bc
---
M bin/repoexport
1 file changed, 31 insertions(+), 58 deletions(-)

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



diff --git a/bin/repoexport b/bin/repoexport
index 8df35b9..de8d585 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -167,68 +167,41 @@
php "$EXPORTER" --target . --group=out-waymarked-trails-help --lang '*' 
--skip en,qqq $THRESHOLD $HOURS
php "$EXPORTER" --target . --group=out-waymarked-trails-help --lang qqq 
$HOURS
 
-elif [ "$PROJECT" = "wikia" ]
+elif [ "$PROJECT" = "wikia" ] || [ "$PROJECT" = "wikia-quick" ]
 then
-   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
-   wait
-   echo "repoexport: Wikia part 2"
-   php "$EXPORTER" --target . --group=wikia-n* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-o* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-p* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-q* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-r* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-s* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-t* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-u* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-v* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-w* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-x* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-y* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
-   wait
+   if [ "$PROJECT" = "wikia" ]
+   then
+   HOURS=""
+   fi
 
-elif [ "$PROJECT" = "wikia-quick" ]
-then
-   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en $H

[MediaWiki-commits] [Gerrit] Implement "project" wikia-quick in a better way - change (translatewiki)

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

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


Change subject: Implement "project" wikia-quick in a better way
..

Implement "project" wikia-quick in a better way

Change-Id: If055884561efba3abb76bc18705a9b6e9ec020bc
---
M bin/repoexport
1 file changed, 31 insertions(+), 58 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/59/51659/1

diff --git a/bin/repoexport b/bin/repoexport
index 8df35b9..de8d585 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -167,68 +167,41 @@
php "$EXPORTER" --target . --group=out-waymarked-trails-help --lang '*' 
--skip en,qqq $THRESHOLD $HOURS
php "$EXPORTER" --target . --group=out-waymarked-trails-help --lang qqq 
$HOURS
 
-elif [ "$PROJECT" = "wikia" ]
+elif [ "$PROJECT" = "wikia" ] || [ "$PROJECT" = "wikia-quick" ]
 then
-   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
-   wait
-   echo "repoexport: Wikia part 2"
-   php "$EXPORTER" --target . --group=wikia-n* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-o* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-p* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-q* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-r* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-s* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-t* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-u* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-v* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-w* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-x* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-y* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
-   wait
+   if [ "$PROJECT" = "wikia" ]
+   then
+   HOURS=""
+   fi
 
-elif [ "$PROJECT" = "wikia-quick" ]
-then
-   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
-   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en $HOURS 
&
+   php "$EXPORTER" --target . --

[MediaWiki-commits] [Gerrit] Add script for Wikia MediaWiki extension processing - change (translatewiki)

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

Change subject: Add script for Wikia MediaWiki extension processing
..


Add script for Wikia MediaWiki extension processing

Change-Id: Ic054eae79b634ac6886663d0abcf8f7e3df321df
---
A bin/update-wikia
1 file changed, 35 insertions(+), 0 deletions(-)

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



diff --git a/bin/update-wikia b/bin/update-wikia
new file mode 100755
index 000..34e66d2
--- /dev/null
+++ b/bin/update-wikia
@@ -0,0 +1,35 @@
+#!binsh
+# Quick script for updating, processing and exporting Wikia MediaWiki 
extensions.
+set -e
+MYDIR="/resources/`whoami`"
+
+# Update production data
+repo update wikia &
+# Update staging environment
+repoupdate wikia "$MYDIR" &
+wait
+
+# Process changes in the backend.
+sudo -u betawiki php 
/www/translatewiki.net/w/extensions/Translate/scripts/processMessageChanges.php 
--group=wikia-*
+
+# Tell user to manually review changes.
+echo "You should probably visit 
https://translatewiki.net/wiki/SpecialManageMessageGroups now! Really!"
+echo "Once done there, come back here and type Y and [ENTER] to continue."
+
+# Require "Y" as input to continue.
+read INPUT
+if [ "$INPUT" != "Y" ]
+then
+   printf "\n\n"
+   echo "Script ended. User did not type 'Y' to continue."
+   exit 1
+fi
+
+# Export
+repoexport wikia-quick "$MYDIR"
+# Commit
+repocommit wikia "$MYDIR"
+# Update production data again
+repo update wikia
+# Process changes (no changes expected)
+sudo -u betawiki php 
/www/translatewiki.net/w/extensions/Translate/scripts/processMessageChanges.php 
--group=wikia-*

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic054eae79b634ac6886663d0abcf8f7e3df321df
Gerrit-PatchSet: 5
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Siebrand 
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] Preparing the config for 2013.02 release - change (translatewiki)

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

Change subject: Preparing the config for 2013.02 release
..


Preparing the config for 2013.02 release

Change-Id: I869a2e225bce63fbe55b86b6a80fd5c411e160de
---
M melange/config.ini
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/melange/config.ini b/melange/config.ini
index 73acd47..f4aa65b 100644
--- a/melange/config.ini
+++ b/melange/config.ini
@@ -2,8 +2,8 @@
 mediawikirepo=ssh://nikerab...@gerrit.wikimedia.org:29418/mediawiki/core.git
 extensionrepo=ssh://nikerab...@gerrit.wikimedia.org:29418/mediawiki/extensions/
 branches=origin/master origin/REL1_20 origin/REL1_19
-releasever=2012.12
-releasever-prev=2012.11
+releasever=2013.02
+releasever-prev=2013.01
 bundlename=MediaWiki language extension bundle
 downloadurl=https://translatewiki.net/mleb
 hasher=sha256sum
@@ -18,8 +18,8 @@
 cldr=origin/master
 CleanChanges=origin/master
 LocalisationUpdate=origin/master
-Translate=efa70e2
-UniversalLanguageSelector=origin/master
+Translate=origin/master
+UniversalLanguageSelector=2012.12
 
 [install]
 dbname=melange

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I869a2e225bce63fbe55b86b6a80fd5c411e160de
Gerrit-PatchSet: 1
Gerrit-Project: translatewiki
Gerrit-Branch: master
Gerrit-Owner: Amire80 
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] Less static stuff in noexternallanglinks - change (mediawiki...Wikibase)

2013-03-01 Thread Tobias Gritschacher (Code Review)
Tobias Gritschacher has submitted this change and it was merged.

Change subject: Less static stuff in noexternallanglinks
..


Less static stuff in noexternallanglinks

- moved hooks to hooks file
- add test case

Change-Id: I7bd87a08aada3a85f9602ea021fd33d724aaa1d8
---
M client/WikibaseClient.hooks.php
M client/WikibaseClient.php
M client/includes/LangLinkHandler.php
M client/includes/NoLangLinkHandler.php
M client/tests/phpunit/includes/LangLinkHandlerTest.php
5 files changed, 100 insertions(+), 47 deletions(-)

Approvals:
  Tobias Gritschacher: Verified; Looks good to me, approved



diff --git a/client/WikibaseClient.hooks.php b/client/WikibaseClient.hooks.php
index 4ee53b8..fbe0d19 100644
--- a/client/WikibaseClient.hooks.php
+++ b/client/WikibaseClient.hooks.php
@@ -695,4 +695,33 @@
return true;
}
 
+   /**
+* Register the parser function.
+* @param $parser \Parser
+* @return bool
+*/
+   public static function onParserFirstCallInit( &$parser ) {
+   $parser->setFunctionHook( 'noexternallanglinks', 
'\Wikibase\NoLangLinkHandler::handle', SFH_NO_HASH );
+   return true;
+   }
+
+   /**
+* Register the magic word.
+*/
+   public static function onMagicWordwgVariableIDs( &$aCustomVariableIds ) 
{
+   $aCustomVariableIds[] = 'noexternallanglinks';
+   return true;
+   }
+
+   /**
+* Apply the magic word.
+*/
+   public static function onParserGetVariableValueSwitch( &$parser, 
&$cache, &$magicWordId, &$ret ) {
+   if( $magicWordId == 'noexternallanglinks' ) {
+   NoLangLinkHandler::handle( $parser, '*' );
+   }
+
+   return true;
+   }
+
 }
diff --git a/client/WikibaseClient.php b/client/WikibaseClient.php
index f2d7003..29fa870 100644
--- a/client/WikibaseClient.php
+++ b/client/WikibaseClient.php
@@ -98,9 +98,9 @@
 $wgHooks['LoadExtensionSchemaUpdates'][]   = 
'\Wikibase\ClientHooks::onSchemaUpdate';
 $wgHooks['OldChangesListRecentChangesLine'][]  = 
'\Wikibase\ClientHooks::onOldChangesListRecentChangesLine';
 $wgHooks['ParserAfterParse'][] = 
'\Wikibase\ClientHooks::onParserAfterParse';
-$wgHooks['ParserFirstCallInit'][]  = 
'\Wikibase\NoLangLinkHandler::onParserFirstCallInit';
-$wgHooks['MagicWordwgVariableIDs'][]   = 
'\Wikibase\NoLangLinkHandler::onMagicWordwgVariableIDs';
-$wgHooks['ParserGetVariableValueSwitch'][] = 
'\Wikibase\NoLangLinkHandler::onParserGetVariableValueSwitch';
+$wgHooks['ParserFirstCallInit'][]  = 
'\Wikibase\ClientHooks::onParserFirstCallInit';
+$wgHooks['MagicWordwgVariableIDs'][]   = 
'\Wikibase\ClientHooks::onMagicWordwgVariableIDs';
+$wgHooks['ParserGetVariableValueSwitch'][] = 
'\Wikibase\ClientHooks::onParserGetVariableValueSwitch';
 $wgHooks['ResourceLoaderTestModules'][] = 
'Wikibase\ClientHooks::onRegisterQUnitTests';
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 
'\Wikibase\ClientHooks::onSkinTemplateOutputPageBeforeExec';
 $wgHooks['SpecialMovepageAfterMove'][] = 
'\Wikibase\ClientHooks::onSpecialMovepageAfterMove';
diff --git a/client/includes/LangLinkHandler.php 
b/client/includes/LangLinkHandler.php
index b80715c..1ae8943 100644
--- a/client/includes/LangLinkHandler.php
+++ b/client/includes/LangLinkHandler.php
@@ -171,6 +171,19 @@
}
 
/**
+* Suppress external language links
+*
+* @since 0.4
+*
+* @param \ParserOutput $out
+* @param $langs[]
+*/
+   public function excludeRepoLangLinks( ParserOutput $out, array $langs ) 
{
+   $nel = array_merge( $this->getNoExternalLangLinks( $out ), 
$langs );
+   $this->setNoExternalLangLinks( $out, $nel );
+   }
+
+   /**
 * Get the noexternallanglinks page property from the ParserOutput,
 * which is set by the {{#noexternallanglinks}} parser function.
 *
@@ -185,8 +198,6 @@
 
if( empty( $nel ) ) {
$nel = array();
-   } else {
-   $nel = unserialize( $nel );
}
 
wfProfileOut( __METHOD__ );
@@ -204,7 +215,7 @@
 */
public function setNoExternalLangLinks( ParserOutput $out, array 
$noexternallanglinks ) {
wfProfileIn( __METHOD__ );
-   $out->setProperty( 'noexternallanglinks', serialize( 
$noexternallanglinks )  );
+   $out->setProperty( 'noexternallanglinks', $noexternallanglinks 
);
wfProfileOut( __METHOD__ );
}
 
diff --git a/client/includes/NoLangLinkHandler.php 
b/client/includes/NoLangLinkHandler.php
index 7c87f84..437cb37 100644
--- a/c

[MediaWiki-commits] [Gerrit] Fixing path to $.eachchange qunit tests - change (mediawiki...DataValues)

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

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


Change subject: Fixing path to $.eachchange qunit tests
..

Fixing path to $.eachchange qunit tests

Change-Id: I0a7cbff2ce57cc07cbf5e4c09c02389d38494b92
---
M DataTypes/DataTypes.mw.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/57/51657/1

diff --git a/DataTypes/DataTypes.mw.php b/DataTypes/DataTypes.mw.php
index eedba52..8dc800c 100644
--- a/DataTypes/DataTypes.mw.php
+++ b/DataTypes/DataTypes.mw.php
@@ -121,7 +121,7 @@
 
$testModules['qunit']['dataTypes.jquery.eachchange.tests'] = 
$moduleTemplate + array(
'scripts' => array(
-   'tests/qunit/jquery.eachchange.tests.js',
+   'tests/qunit/jquery/jquery.eachchange.tests.js',
),
'dependencies' => array(
'jquery.eachchange',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0a7cbff2ce57cc07cbf5e4c09c02389d38494b92
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 

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


[MediaWiki-commits] [Gerrit] $.eachchange: Include input elements without type attribute - change (mediawiki...DataValues)

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

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


Change subject: $.eachchange: Include input elements without type attribute
..

$.eachchange: Include input elements without type attribute

The "type" attribute is not required on input elements and defaults to "text".

Change-Id: Ia67b5aea6886bba460dff7535e2306234201624c
---
M DataTypes/resources/jquery/jquery.eachchange.js
M DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js
2 files changed, 28 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DataValues 
refs/changes/58/51658/1

diff --git a/DataTypes/resources/jquery/jquery.eachchange.js 
b/DataTypes/resources/jquery/jquery.eachchange.js
index d957c5d..498c662 100644
--- a/DataTypes/resources/jquery/jquery.eachchange.js
+++ b/DataTypes/resources/jquery/jquery.eachchange.js
@@ -59,7 +59,7 @@
};
 
// works for text input fields and textarea only:
-   this.filter( 'input:text, textarea' ).each( function() {
+   this.filter( 'input:text, input:not([type]), textarea' ).each( 
function() {
var input = $( this );
 
monitorEachChange( input );
diff --git a/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js 
b/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js
index c9c3909..570ef9d 100644
--- a/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js
+++ b/DataTypes/tests/qunit/jquery/jquery.eachchange.tests.js
@@ -37,6 +37,33 @@
}
} ) );
 
+   QUnit.test(
+   'Initialization',
+   function( assert ) {
+   var $input = $( '', { 'class': 
'test_eachchange', type: 'text' } ),
+   $inputNoType = $( '', { 'class': 
'test_eachchange' } ),
+   $textarea = $( '', { 'class': 
'test_eachchange' } );
+
+   assert.equal(
+   $input.eachchange( iIncr ),
+   $input,
+   'Initialized "eachchange" on a text input 
element.'
+   );
+
+   assert.equal(
+   $inputNoType.eachchange( iIncr ),
+   $inputNoType,
+   'Initialized "eachchange" on an input element 
that has no "type" attribute.'
+   );
+
+   assert.equal(
+   $textarea.eachchange( iIncr ),
+   $textarea,
+   'Initialized "eachchange" on a textarea.'
+   );
+   }
+   );
+
QUnit.test( 'jQuery.eachchange() basics', function( assert ) {
var subject = $( '', {
'class': 'test_eachchange',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia67b5aea6886bba460dff7535e2306234201624c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DataValues
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 

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


[MediaWiki-commits] [Gerrit] Add i18n file in preparation for adding extension to transla... - change (mediawiki...CryoKey)

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

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


Change subject: Add i18n file in preparation for adding extension to 
translatewiki.net
..

Add i18n file in preparation for adding extension to translatewiki.net

Change-Id: I4e1e22698d467c3c46fbecbbc6e1e931e006954a
---
A CryoKey.i18n.php
M cryokey.php
2 files changed, 28 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CryoKey 
refs/changes/56/51656/1

diff --git a/CryoKey.i18n.php b/CryoKey.i18n.php
new file mode 100644
index 000..f1f23f5
--- /dev/null
+++ b/CryoKey.i18n.php
@@ -0,0 +1,23 @@
+ 'Adds support for CryoKey credentials',
+);
+
+/** Message documentation (Message documentation)
+ * @author Raymond
+ */
+$messages['qqq'] = array(
+   'cryokey-desc' => '{{desc|name=Cryo 
Key|url=https://www.mediawiki.org/wiki/Extension:CryoKey}}',
+);
+
diff --git a/cryokey.php b/cryokey.php
index 963026a..bf942e4 100644
--- a/cryokey.php
+++ b/cryokey.php
@@ -8,10 +8,14 @@
 (
   'path' => __FILE__,
   'name' => 'CryoKey',
-  'description' => 'An example of integrating CryoKey into MediaWiki',
+  'descriptionmsg' => 'cryokey-desc',
   'version' => '1.1',
   'author' => 'Authenticade LLC'
+  'url' => 'https://www.mediawiki.org/wiki/Extension:CryoKey',
 );
+
+// Define internationalizations
+$wgExtensionMessagesFiles['CryoKey'] = __DIR__ . '/CryoKey.i18n.php';
 
 // Allow Auto-Registration behavior if "true".
 $wgCKAutoRegister = false;
@@ -133,4 +137,3 @@
 }
 
 $wgHooks['UserLoadFromSession'][] = "ck_check";
-?>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e1e22698d467c3c46fbecbbc6e1e931e006954a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CryoKey
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] "Hide your translations" button - change (mediawiki...Translate)

2013-03-01 Thread Santhosh (Code Review)
Santhosh has submitted this change and it was merged.

Change subject: "Hide your translations" button
..


"Hide your translations" button

Change-Id: I170f019b7eb5f19229b66a275732d320617c2c5e
---
M Translate.i18n.php
M Translate.php
M resources/css/ext.translate.messagetable.css
M resources/js/ext.translate.messagetable.js
M resources/js/ext.translate.special.translate.js
M utils/TuxMessageTable.php
6 files changed, 73 insertions(+), 17 deletions(-)

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



diff --git a/Translate.i18n.php b/Translate.i18n.php
index fee6950..dd8496e 100644
--- a/Translate.i18n.php
+++ b/Translate.i18n.php
@@ -11,6 +11,8 @@
 /** English
  * @author Nike
  * @author Siebrand
+ * @author Amire80
+ * @author Santhosh.thottingal
  */
 $messages['en'] = array(
'translate' => 'Translate',
@@ -465,6 +467,8 @@
'tux-editor-clear-translated' => 'Hide translated',
'tux-editor-proofreading-mode' => 'Proofread',
'tux-editor-translate-mode' => 'List',
+   'tux-editor-proofreading-hide-own-translations' => 'Hide my 
translations',
+   'tux-editor-proofreading-show-own-translations' => 'Show my 
translations',
'tux-editor-outdated-warning' => 'This translation may need to be 
updated.',
'tux-editor-outdated-warning-diff-link' => 'Show differences',
'tux-editor-doc-editor-placeholder' => 'Message documentation',
@@ -954,6 +958,10 @@
'tux-editor-translate-mode' => 'Label for the button that appears at 
the footer of the translation editor.
 Pressing the button goes to the translation mode.
 {{Identical|List}}',
+   'tux-editor-proofreading-hide-own-translations' => 'A label for a 
button that appears at the bottom of the translation editor in proofreading 
mode.
+Pressing the button hides the user\'s own translations from the list.',
+   'tux-editor-proofreading-show-own-translations' => 'A label for a 
button that appears at the bottom of the translation editor in proofreading 
mode.
+Pressing the button shows the user\'s own translations in the list.',
'tux-editor-doc-editor-placeholder' => 'A placeholder that appears in 
the message documentation editor.
 {{Identical|Message documentation}}',
'tux-editor-doc-editor-save' => 'A button that saves the documentation 
string',
diff --git a/Translate.php b/Translate.php
index c6cd203..88545e2 100644
--- a/Translate.php
+++ b/Translate.php
@@ -473,6 +473,8 @@
'translate-workflow-state-',
'tpt-discouraged-language-force',
'tpt-discouraged-language',
+   'tux-editor-proofreading-hide-own-translations',
+   'tux-editor-proofreading-show-own-translations',
),
 ) + $resourcePaths;
 
diff --git a/resources/css/ext.translate.messagetable.css 
b/resources/css/ext.translate.messagetable.css
index f1b073d..ffe3732 100644
--- a/resources/css/ext.translate.messagetable.css
+++ b/resources/css/ext.translate.messagetable.css
@@ -203,7 +203,6 @@
 
 .tux-action-bar .toggle.button {
height: 35px;
-   width: 50%;
font-size: 15px;
vertical-align: middle;
border-radius: 0;
@@ -218,6 +217,10 @@
border-radius: 0 3px 3px 0;
 }
 
+.tux-action-bar .tux-view-switcher .toggle.button {
+   width: 50%;
+}
+
 .tux-action-bar .translate-mode-button:before {
content: "";
height: 15px;
diff --git a/resources/js/ext.translate.messagetable.js 
b/resources/js/ext.translate.messagetable.js
index 6547815..36e24fd 100644
--- a/resources/js/ext.translate.messagetable.js
+++ b/resources/js/ext.translate.messagetable.js
@@ -369,7 +369,10 @@
 */
switchMode: function ( mode ) {
var messageTable = this,
-   filter = messageTable.$loader.data( 'filter' );
+   filter = messageTable.$loader.data( 'filter' ),
+   $tuxTabUntranslated,
+   $controlOwnButton,
+   $hideTranslatedButton;
 
messageTable.$actionBar.find( '.down' ).removeClass( 
'down' );
if ( mode === 'translate' ) {
@@ -379,14 +382,14 @@
messageTable.$actionBar.find( 
'.tux-proofread-button' ).addClass( 'down' );
}
 
-   if ( messageTable.mode === mode ) {
-   // no change in the mode
-   return;
-   }
messageTable.mode = mode;
mw.translate.changeUrl( { action: this.mode } );
 
$( '.tux-message, .tux-message-proofread').remove();
+
+   $tuxTabUntranslated = $( '.tux-message-selector > 
.tux-tab-untranslated' );
+   $controlOwn

[MediaWiki-commits] [Gerrit] Consistency tweaks - change (mediawiki...CentralAuth)

2013-03-01 Thread Hoo man (Code Review)
Hoo man has submitted this change and it was merged.

Change subject: Consistency tweaks
..


Consistency tweaks

Followup If9cd34d3e1f121f5ab8ad4fb708ccc268391788a
* Remove Title Case
* Don't -> Do not
* tabs2spaces

Change-Id: Ie8222ba09054c6dad2326d0ec0e6df1e067d1dbf
---
M CentralAuth.i18n.php
1 file changed, 11 insertions(+), 11 deletions(-)

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



diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index a329e3b..bdddba4 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -137,7 +137,7 @@
 
// Administrator's console
'centralauth'  => 'Global user manager',
-   'centralauth-admin-intro'  => 'This interface 
can be used for administration of global accounts.',
+   'centralauth-admin-intro'  => 'This interface can be used 
for administration of global accounts.',
'centralauth-admin-manage' => 'Manage user data',
'centralauth-admin-username'   => 'User name:',
'centralauth-admin-lookup-ro'  => 'View user info',
@@ -220,15 +220,15 @@
'centralauth-listusers-nolocal'  => 'unattached or doesn\'t exist 
locally',
 
// MultiLock
-   'multilock' => 'Lock Multiple 
Global Users',
+   'multilock' => 'Lock multiple 
global users',
'centralauth-admin-multi-username'  => 'Enter one or more 
usernames, separated by new-line',
'centralauth-admin-multi-notfound'  => 'Search returned no 
usernames.',
'centralauth-admin-multi-searchprefix'  => 'Or, search for 
accounts with a prefix',
'centralauth-admin-multi-intro' => 'Update multiple 
global users at once',
-   'centralauth-admin-action-lock-nochange'=> 'Don\'t change 
locks',
+   'centralauth-admin-action-lock-nochange'=> 'Do not change 
locks',
'centralauth-admin-action-lock-lock'=> 'Lock selected 
accounts',
'centralauth-admin-action-lock-unlock'  => 'Unlock selected 
accounts',
-   'centralauth-admin-action-hide-nochange'=> 'Don\'t change 
hidden levels',
+   'centralauth-admin-action-hide-nochange'=> 'Do not change 
hidden levels',
'centralauth-admin-action-hide-none'=> 'Unhide selected 
accounts',
'centralauth-admin-action-hide-lists'   => 'Hide selected 
accounts from public lists',
'centralauth-admin-action-hide-oversight'   => 'Completely hide 
selected accounts',
@@ -313,7 +313,7 @@
 You may view or edit the permissions assigned to a group, if you have 
permission to.
 A group may be deleted by removing all rights from it.',
'centralauth-globalgroupperms-grouplistitem'  => '$1 
([[Special:GlobalGroupPermissions/$2|view/edit]])',
-   'centralauth-globalgroupperms-nogroups'   => 'No global 
groups are defined.',
+   'centralauth-globalgroupperms-nogroups'   => 'No global groups 
are defined.',
'centralauth-existinggroup-legend'=> 'Existing groups',
'centralauth-newgroup-legend' => 'Create a new 
group',
'centralauth-newgroup-intro'  => 'You can use this 
form to assign permissions to a new group.
@@ -347,11 +347,11 @@
'centralauth-editset' => 'Wiki sets',
'centralauth-editset-legend-rw'   => 'Edit or create 
wiki set',
'centralauth-editset-legend-ro'   => 'List of wiki 
sets',
-   'centralauth-editset-intro-rw'   => 'The following 
wiki sets have already been created.
+   'centralauth-editset-intro-rw'=> 'The following 
wiki sets have already been created.
 You may view and modify any of them, or create a new set.',
-   'centralauth-editset-intro-ro'   => 'Below is the 
list of existing wiki sets.',
-   'centralauth-editset-item-rw'=> 
'[[Special:WikiSets/$2|$1]] ([[Special:WikiSets/delete/$2|delete]])',
-   'centralauth-editset-item-ro'=> 
'[[Special:WikiSets/$2|$1]]',
+   'centralauth-editset-intro-ro'=> 'Below is the list 
of existing wiki sets.',
+   'centralauth-editset-item-rw' => 
'[[Special:WikiSets/$2|$1]] ([[Special:WikiSets/delete/$2|delete]])',
+   'centralauth-editset-item-ro' => 
'[[Special:WikiSets/$2|$1]]',
'centralauth-editset-new' => 'Create a new set',
'centralauth-editset-notfound'=> 'Wiki set "$1" not 
found.',
'centralauth-editset-optin'   => 'Opt-in based 
(includes only specifi

[MediaWiki-commits] [Gerrit] Improving focusing after "add" action in statements UI - change (mediawiki...Wikibase)

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

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


Change subject: Improving focusing after "add" action in statements UI
..

Improving focusing after "add" action in statements UI

After ending a statement section's "add" action (e.g. by canceling), the focus 
is
not moved to the general "add" button anymore but to the section's add button.

Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
---
M lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
M lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
2 files changed, 1 insertion(+), 4 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
index 9cec3fe..0c88fc4 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.addtoolbar.js
@@ -133,9 +133,6 @@
.on(
prefixed( 'itemadded ' ) + prefixed( 
'itemremoved ' ) + prefixed( 'canceled' ),
function( event, value, $node ) {
-   if ( value === null ) {
-   return;
-   }
if ( $node !== undefined && 
$node.parent()[0] !== self.element.parent()[0] ) {
// The event does not belong to 
this "add" button but rather to an "add"
// button encapsulated in a 
descendant node.
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
index 48d9901..3bfd45f 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.claimlistview.js
@@ -426,7 +426,7 @@
if( dropValue || !self._lmwInstance( $newClaim 
).$mainSnak.data( 'snakview' ).snak() ) {
// if new claim is canceled before saved, or if 
it is invalid, we simply remove
// and forget about it
-   self._trigger( 'canceled', null, [ $newClaim ] 
);
+   self._trigger( 'canceled', null, [ null, 
$newClaim ] );
 
self._lmwInstance( $newClaim ).destroy();
$newClaim.remove();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie944353b14ff3535f01553f87537f70817b9de10
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 

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


[MediaWiki-commits] [Gerrit] Further work on claim diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Further work on claim diff visualization
..


Further work on claim diff visualization

Change-Id: Iefb28bb70af3380e820ae1e3955e89f95e901383
---
M lib/includes/DiffOpValueFormatter.php
M lib/includes/DiffView.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
5 files changed, 241 insertions(+), 116 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
index f1411e9..1b6cd62 100644
--- a/lib/includes/DiffOpValueFormatter.php
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -6,7 +6,7 @@
 use Diff;
 
 /**
- * Class for generating HTML for Claim Diffs.
+ * Class for formatting diffs, @todo might be renamed or something
  *
  * 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
@@ -34,12 +34,36 @@
  */
 class DiffOpValueFormatter {
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $name;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $oldValue;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $newValue;
 
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param string $name
+* @param string $oldValue
+* @param string $newValue
+*/
public function __construct( $name, $oldValue, $newValue ) {
$this->name = $name;
$this->oldValue = $oldValue;
@@ -54,9 +78,12 @@
 * @return string
 */
protected function generateHeaderHtml() {
+   $oldHeader = is_string( $this->oldValue ) ? $this->name : '';
+   $newHeader = is_string( $this->newValue ) ? $this->name : '';
+
$html = Html::openElement( 'tr' );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $oldHeader );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $newHeader );
$html .= Html::closeElement( 'tr' );
 
return $html;
@@ -74,12 +101,12 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$this->oldValue ) ) );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue ) ) );
$html .= Html::closeElement( 'tr' );
$html .= Html::closeElement( 'tr' );
@@ -100,7 +127,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue )
)
);
@@ -121,7 +148,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$t

[MediaWiki-commits] [Gerrit] Further work on claim diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Further work on claim diff visualization
..

Further work on claim diff visualization

Change-Id: Iefb28bb70af3380e820ae1e3955e89f95e901383
---
M lib/includes/DiffOpValueFormatter.php
M lib/includes/DiffView.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
5 files changed, 241 insertions(+), 116 deletions(-)


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

diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
index f1411e9..1b6cd62 100644
--- a/lib/includes/DiffOpValueFormatter.php
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -6,7 +6,7 @@
 use Diff;
 
 /**
- * Class for generating HTML for Claim Diffs.
+ * Class for formatting diffs, @todo might be renamed or something
  *
  * 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
@@ -34,12 +34,36 @@
  */
 class DiffOpValueFormatter {
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $name;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $oldValue;
 
+   /**
+* @since 0.4
+*
+* @var string
+*/
protected $newValue;
 
+   /**
+* Constructor.
+*
+* @since 0.4
+*
+* @param string $name
+* @param string $oldValue
+* @param string $newValue
+*/
public function __construct( $name, $oldValue, $newValue ) {
$this->name = $name;
$this->oldValue = $oldValue;
@@ -54,9 +78,12 @@
 * @return string
 */
protected function generateHeaderHtml() {
+   $oldHeader = is_string( $this->oldValue ) ? $this->name : '';
+   $newHeader = is_string( $this->newValue ) ? $this->name : '';
+
$html = Html::openElement( 'tr' );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
-   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $oldHeader );
+   $html .= Html::element( 'td', array( 'colspan'=>'2', 'class' => 
'diff-lineno' ), $newHeader );
$html .= Html::closeElement( 'tr' );
 
return $html;
@@ -74,12 +101,12 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
$this->oldValue ) ) );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue ) ) );
$html .= Html::closeElement( 'tr' );
$html .= Html::closeElement( 'tr' );
@@ -100,7 +127,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
$this->newValue )
)
);
@@ -121,7 +148,7 @@
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
$html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
Html::rawElement( 'div', array(),
-   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   Html::element( 'del', array( 'class' => 
'diffchang

[MediaWiki-commits] [Gerrit] Updated proofreading check marks to use sprites - change (mediawiki...Translate)

2013-03-01 Thread Santhosh (Code Review)
Santhosh has submitted this change and it was merged.

Change subject: Updated proofreading check marks to use sprites
..


Updated proofreading check marks to use sprites

Check marks for proofread have been modified to:
* Use a single graphical asset so that once loaded, status changes such as 
hovering do not introduce an additional delay.
* Emphasize the markers (bigger and more intense colors) so that they are 
easily recognizable.

Change-Id: I0d8593c59ef6f8e65a94c47839d6ba91b7089bc7
---
M resources/css/ext.translate.proofread.css
D resources/images/check-hi.png
D resources/images/check-hi.svg
A resources/images/check-sprite.png
R resources/images/check-sprite.svg
D resources/images/check.png
D resources/images/check.svg
D resources/images/uncheck-hi.png
D resources/images/uncheck-hi.svg
D resources/images/uncheck.png
10 files changed, 26,892 insertions(+), 351,275 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0d8593c59ef6f8e65a94c47839d6ba91b7089bc7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Translate
Gerrit-Branch: master
Gerrit-Owner: Pginer 
Gerrit-Reviewer: Amire80 
Gerrit-Reviewer: Nikerabbit 
Gerrit-Reviewer: Santhosh 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Simple diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: Simple diff visualization
..


Simple diff visualization

- todo: make sure all cases are covered, such as reference change
- further design improvements
- tests
- there's opportunity for DiffView and other places to share code

Change-Id: I4459f274b092a4c0aa707af8bafd175775b2c51e
---
M lib/WikibaseLib.php
A lib/includes/DiffOpValueFormatter.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
6 files changed, 414 insertions(+), 25 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index f0e5545..2955626 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -99,6 +99,7 @@
 $wgAutoloadClasses['Wikibase\ChangeNotifier']  = $dir . 
'includes/ChangeNotifier.php';
 $wgAutoloadClasses['Wikibase\ChangeNotificationJob']   = $dir . 
'includes/ChangeNotificationJob.php';
 $wgAutoloadClasses['Wikibase\ChangesTable']= $dir . 
'includes/ChangesTable.php';
+$wgAutoloadClasses['Wikibase\DiffOpValueFormatter']= $dir . 
'includes/DiffOpValueFormatter.php';
 $wgAutoloadClasses['Wikibase\DiffView']= $dir 
. 'includes/DiffView.php';
 $wgAutoloadClasses['Wikibase\Lib\GuidGenerator']   = $dir . 
'includes/GuidGenerator.php';
 $wgAutoloadClasses['Wikibase\Lib\V4GuidGenerator'] = $dir . 
'includes/GuidGenerator.php';
diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
new file mode 100644
index 000..f1411e9
--- /dev/null
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -0,0 +1,150 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Tobias Gritschacher < tobias.gritschac...@wikimedia.de >
+ * @author Katie Filbert < aude.w...@gmail.com >
+ */
+class DiffOpValueFormatter {
+
+   protected $name;
+
+   protected $oldValue;
+
+   protected $newValue;
+
+   public function __construct( $name, $oldValue, $newValue ) {
+   $this->name = $name;
+   $this->oldValue = $oldValue;
+   $this->newValue = $newValue;
+   }
+
+   /**
+* Generates HTML for the header of the diff operation
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateHeaderHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an change diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateChangeOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->oldValue ) ) );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->newValue ) ) );
+   $html .= Html::closeElement( 'tr' );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an add diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateAddOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2' ), 
' ' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this

[MediaWiki-commits] [Gerrit] Simple diff visualization - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: Simple diff visualization
..

Simple diff visualization

- todo: make sure all cases are covered, such as reference change
- further design improvements
- tests
- there's opportunity for DiffView and other places to share code

Change-Id: I4459f274b092a4c0aa707af8bafd175775b2c51e
---
M lib/WikibaseLib.php
A lib/includes/DiffOpValueFormatter.php
M lib/includes/claim/ClaimDifferenceVisualizer.php
M lib/includes/entity/EntityDiffVisualizer.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
6 files changed, 414 insertions(+), 25 deletions(-)


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

diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index f0e5545..2955626 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -99,6 +99,7 @@
 $wgAutoloadClasses['Wikibase\ChangeNotifier']  = $dir . 
'includes/ChangeNotifier.php';
 $wgAutoloadClasses['Wikibase\ChangeNotificationJob']   = $dir . 
'includes/ChangeNotificationJob.php';
 $wgAutoloadClasses['Wikibase\ChangesTable']= $dir . 
'includes/ChangesTable.php';
+$wgAutoloadClasses['Wikibase\DiffOpValueFormatter']= $dir . 
'includes/DiffOpValueFormatter.php';
 $wgAutoloadClasses['Wikibase\DiffView']= $dir 
. 'includes/DiffView.php';
 $wgAutoloadClasses['Wikibase\Lib\GuidGenerator']   = $dir . 
'includes/GuidGenerator.php';
 $wgAutoloadClasses['Wikibase\Lib\V4GuidGenerator'] = $dir . 
'includes/GuidGenerator.php';
diff --git a/lib/includes/DiffOpValueFormatter.php 
b/lib/includes/DiffOpValueFormatter.php
new file mode 100644
index 000..f1411e9
--- /dev/null
+++ b/lib/includes/DiffOpValueFormatter.php
@@ -0,0 +1,150 @@
+http://www.gnu.org/copyleft/gpl.html
+ *
+ * @since 0.4
+ *
+ * @file
+ * @ingroup WikibaseLib
+ *
+ * @licence GNU GPL v2+
+ * @author Tobias Gritschacher < tobias.gritschac...@wikimedia.de >
+ * @author Katie Filbert < aude.w...@gmail.com >
+ */
+class DiffOpValueFormatter {
+
+   protected $name;
+
+   protected $oldValue;
+
+   protected $newValue;
+
+   public function __construct( $name, $oldValue, $newValue ) {
+   $this->name = $name;
+   $this->oldValue = $oldValue;
+   $this->newValue = $newValue;
+   }
+
+   /**
+* Generates HTML for the header of the diff operation
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateHeaderHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2', 'class' 
=> 'diff-lineno' ), $this->name );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an change diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateChangeOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '-' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-deletedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'del', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->oldValue ) ) );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange diffchange-inline' ),
+   $this->newValue ) ) );
+   $html .= Html::closeElement( 'tr' );
+   $html .= Html::closeElement( 'tr' );
+
+   return $html;
+   }
+
+   /**
+* Generates HTML for an add diffOp
+*
+* @since 0.4
+*
+* @return string
+*/
+   protected function generateAddOpHtml() {
+   $html = Html::openElement( 'tr' );
+   $html .= Html::rawElement( 'td', array( 'colspan'=>'2' ), 
' ' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-marker' ), '+' );
+   $html .= Html::rawElement( 'td', array( 'class' => 
'diff-addedline' ),
+   Html::rawElement( 'div', array(),
+   Html::rawElement( 'ins', array( 'class' => 
'diffchange d

[MediaWiki-commits] [Gerrit] (bug 44095) enhanced claim diff visualizaion including refs - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (bug 44095) enhanced claim diff visualizaion including refs
..


(bug 44095) enhanced claim diff visualizaion including refs

- still todo: qualifiers, ranks.

squashed:

(bug 44095) visualize claim differences

This commit is a follow up to 5fc812442e19d55a7d1c2072ba8a839ce7d1f067.
It tackles some design issues and adds tests, while removing the
preliminary visualization code, which needs to be re-added.

Change-Id: I7f8645df860b1860b4016003f52e7959af685a25
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.i18n.php
M lib/WikibaseLib.php
M lib/includes/DiffView.php
A lib/includes/claim/ClaimDiffer.php
A lib/includes/claim/ClaimDifference.php
A lib/includes/claim/ClaimDifferenceVisualizer.php
D lib/includes/entity/EntityDiffView.php
A lib/includes/entity/EntityDiffVisualizer.php
A lib/tests/phpunit/claim/ClaimDifferTest.php
A lib/tests/phpunit/claim/ClaimDifferenceTest.php
A lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
14 files changed, 768 insertions(+), 197 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 7487c4d..b1c6cfd 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -33,6 +33,9 @@
'changes/EntityChange',
 
'claim/ClaimAggregate',
+   'claim/ClaimDifference',
+   'claim/ClaimDifferenceVisualizer',
+   'claim/ClaimDiffer',
'claim/ClaimListAccess',
'claim/Claims',
'claim/Claim',
diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index d85f151..39fdd75 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -21,6 +21,9 @@
'wikibase-entity-item' => 'item',
'wikibase-entity-property' => 'property',
'wikibase-entity-query' => 'query',
+   'wikibase-diffview-reference' => 'reference',
+   'wikibase-diffview-rank' => 'rank',
+   'wikibase-diffview-qualifier' => 'qualifier',
'wikibase-error-unexpected' => 'An unexpected error occurred.',
'wikibase-error-save-generic' => 'An error occurred while trying to 
perform save and because of this, your changes could not be completed.',
'wikibase-error-remove-generic' => 'An error occurred while trying to 
perform remove and because of this, your changes could not be completed.',
@@ -63,6 +66,9 @@
 {{Identical|Property}}',
'wikibase-entity-query' => 'How we refer to entities of type query. See 
also Wikidatas glossary on [[m:Wikidata/Glossary#entity|entity]].
 {{Identical|Query}}',
+   'wikibase-diffview-reference' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a reference. Will be shown as e.g. "claim / property q1 / referenece".',
+   'wikibase-diffview-rank' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects the rank of the statement. Will be shown as e.g. "claim / property q1 / 
rank".',
+   'wikibase-diffview-qualifier' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a qualifier. Will be shown as e.g. "claim / property q1 / qualifier".',
'wikibase-error-unexpected' => 'Error message that is used as a 
fallback message if no other message can be assigned to the error that 
occurred. This error message being displayed should never happen. However, 
there may be "unexpected" errors not covered by the implemented error 
handling.',
'wikibase-error-save-generic' => 'Generic error message for an error 
happening during a save operation.',
'wikibase-error-remove-generic' => 'Generic error message for an error 
happening during a remove operation',
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 0a9987f..f0e5545 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -129,6 +129,9 @@
 // includes/claims
 $wgAutoloadClasses['Wikibase\Claim']   = $dir . 
'includes/claim/Claim.php';
 $wgAutoloadClasses['Wikibase\ClaimAggregate']  = $dir . 
'includes/claim/ClaimAggregate.php';
+$wgAutoloadClasses['Wikibase\ClaimDiffer'] = $dir . 
'includes/claim/ClaimDiffer.php';
+$wgAutoloadClasses['Wikibase\ClaimDifference'] = $dir . 
'includes/claim/ClaimDifference.php';
+$wgAutoloadClasses['Wikibase\ClaimDifferenceVisualizer'] = $dir . 
'includes/claim/ClaimDifferenceVisualizer.php';
 $wgAutoloadClasses['Wikibase\ClaimListAccess'] = $dir . 
'includes/claim/ClaimListAccess.php';
 $wgAutoloadClasses['Wikibase\Cl

[MediaWiki-commits] [Gerrit] (bug 44095) enhanced claim diff visualizaion including refs - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (bug 44095) enhanced claim diff visualizaion including refs
..

(bug 44095) enhanced claim diff visualizaion including refs

- still todo: qualifiers, ranks.

squashed:

(bug 44095) visualize claim differences

This commit is a follow up to 5fc812442e19d55a7d1c2072ba8a839ce7d1f067.
It tackles some design issues and adds tests, while removing the
preliminary visualization code, which needs to be re-added.

Change-Id: I7f8645df860b1860b4016003f52e7959af685a25
---
M lib/WikibaseLib.hooks.php
M lib/WikibaseLib.i18n.php
M lib/WikibaseLib.php
M lib/includes/DiffView.php
A lib/includes/claim/ClaimDiffer.php
A lib/includes/claim/ClaimDifference.php
A lib/includes/claim/ClaimDifferenceVisualizer.php
D lib/includes/entity/EntityDiffView.php
A lib/includes/entity/EntityDiffVisualizer.php
A lib/tests/phpunit/claim/ClaimDifferTest.php
A lib/tests/phpunit/claim/ClaimDifferenceTest.php
A lib/tests/phpunit/claim/ClaimDifferenceVisualizerTest.php
M repo/includes/EntityContentDiffView.php
M repo/includes/actions/EditEntityAction.php
14 files changed, 768 insertions(+), 197 deletions(-)


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

diff --git a/lib/WikibaseLib.hooks.php b/lib/WikibaseLib.hooks.php
index 7487c4d..b1c6cfd 100644
--- a/lib/WikibaseLib.hooks.php
+++ b/lib/WikibaseLib.hooks.php
@@ -33,6 +33,9 @@
'changes/EntityChange',
 
'claim/ClaimAggregate',
+   'claim/ClaimDifference',
+   'claim/ClaimDifferenceVisualizer',
+   'claim/ClaimDiffer',
'claim/ClaimListAccess',
'claim/Claims',
'claim/Claim',
diff --git a/lib/WikibaseLib.i18n.php b/lib/WikibaseLib.i18n.php
index d85f151..39fdd75 100644
--- a/lib/WikibaseLib.i18n.php
+++ b/lib/WikibaseLib.i18n.php
@@ -21,6 +21,9 @@
'wikibase-entity-item' => 'item',
'wikibase-entity-property' => 'property',
'wikibase-entity-query' => 'query',
+   'wikibase-diffview-reference' => 'reference',
+   'wikibase-diffview-rank' => 'rank',
+   'wikibase-diffview-qualifier' => 'qualifier',
'wikibase-error-unexpected' => 'An unexpected error occurred.',
'wikibase-error-save-generic' => 'An error occurred while trying to 
perform save and because of this, your changes could not be completed.',
'wikibase-error-remove-generic' => 'An error occurred while trying to 
perform remove and because of this, your changes could not be completed.',
@@ -63,6 +66,9 @@
 {{Identical|Property}}',
'wikibase-entity-query' => 'How we refer to entities of type query. See 
also Wikidatas glossary on [[m:Wikidata/Glossary#entity|entity]].
 {{Identical|Query}}',
+   'wikibase-diffview-reference' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a reference. Will be shown as e.g. "claim / property q1 / referenece".',
+   'wikibase-diffview-rank' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects the rank of the statement. Will be shown as e.g. "claim / property q1 / 
rank".',
+   'wikibase-diffview-qualifier' => 'Label within the header of a 
diff-operation on the entity diff view to describe that the diff-operation 
affects a qualifier. Will be shown as e.g. "claim / property q1 / qualifier".',
'wikibase-error-unexpected' => 'Error message that is used as a 
fallback message if no other message can be assigned to the error that 
occurred. This error message being displayed should never happen. However, 
there may be "unexpected" errors not covered by the implemented error 
handling.',
'wikibase-error-save-generic' => 'Generic error message for an error 
happening during a save operation.',
'wikibase-error-remove-generic' => 'Generic error message for an error 
happening during a remove operation',
diff --git a/lib/WikibaseLib.php b/lib/WikibaseLib.php
index 0a9987f..f0e5545 100644
--- a/lib/WikibaseLib.php
+++ b/lib/WikibaseLib.php
@@ -129,6 +129,9 @@
 // includes/claims
 $wgAutoloadClasses['Wikibase\Claim']   = $dir . 
'includes/claim/Claim.php';
 $wgAutoloadClasses['Wikibase\ClaimAggregate']  = $dir . 
'includes/claim/ClaimAggregate.php';
+$wgAutoloadClasses['Wikibase\ClaimDiffer'] = $dir . 
'includes/claim/ClaimDiffer.php';
+$wgAutoloadClasses['Wikibase\ClaimDifference'] = $dir . 
'includes/claim/ClaimDifference.php';
+$wgAutoloadClasses['Wikibase\ClaimDifferenceVisualizer'] = $dir . 
'includes/claim/ClaimDifferenceVisualizer.php';
 $wgAutoloadClasses['Wikibase\ClaimListAccess'] = $dir . 
'inc

[MediaWiki-commits] [Gerrit] (testing) fix for selenium sitelinks tests - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has submitted this change and it was merged.

Change subject: (testing) fix for selenium sitelinks tests
..


(testing) fix for selenium sitelinks tests

- we need a better way to get the suggestion list elements,
since the serach-box may or may not be a ui-autocomplete element too.

Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
---
M selenium/lib/modules/sitelink_module.rb
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Anja Jentzsch: Verified; Looks good to me, approved



diff --git a/selenium/lib/modules/sitelink_module.rb 
b/selenium/lib/modules/sitelink_module.rb
index 1405056..020e70a 100644
--- a/selenium/lib/modules/sitelink_module.rb
+++ b/selenium/lib/modules/sitelink_module.rb
@@ -22,9 +22,10 @@
   text_field(:pageInputField, :xpath => "//table[contains(@class, 
'wb-sitelinks')]/tfoot/tr/td[contains(@class, 'wb-sitelinks-link')]/input")
   text_field(:pageInputFieldExistingSiteLink, :xpath => 
"//table[contains(@class, 'wb-sitelinks')]/tbody/tr/td[contains(@class, 
'wb-sitelinks-link')]/input")
   span(:saveSitelinkLinkDisabled, :class => "wb-ui-toolbar-button-disabled")
-  unordered_list(:siteIdAutocompleteList, :class => "ui-autocomplete", :index 
=> 0)
-  unordered_list(:pageAutocompleteList, :class => "ui-autocomplete", :index => 
1)
-  unordered_list(:editSitelinkAutocompleteList, :class => "ui-autocomplete", 
:index => 0)
+  unordered_list(:siteIdAutocompleteList, :class => 
"wikibase-siteselector-list")
+  #todo: this is not a nice way to get the suggestion list, we should find a 
better way
+  unordered_list(:pageAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
+  unordered_list(:editSitelinkAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
   link(:saveSitelinkLink, :text => "save")
   link(:cancelSitelinkLink, :text => "cancel")
   link(:removeSitelinkLink, :text => "remove")

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Anja Jentzsch 
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] (testing) fix for selenium sitelinks tests - change (mediawiki...Wikibase)

2013-03-01 Thread Anja Jentzsch (Code Review)
Anja Jentzsch has uploaded a new change for review.

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


Change subject: (testing) fix for selenium sitelinks tests
..

(testing) fix for selenium sitelinks tests

- we need a better way to get the suggestion list elements,
since the serach-box may or may not be a ui-autocomplete element too.

Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
---
M selenium/lib/modules/sitelink_module.rb
1 file changed, 4 insertions(+), 3 deletions(-)


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

diff --git a/selenium/lib/modules/sitelink_module.rb 
b/selenium/lib/modules/sitelink_module.rb
index 1405056..020e70a 100644
--- a/selenium/lib/modules/sitelink_module.rb
+++ b/selenium/lib/modules/sitelink_module.rb
@@ -22,9 +22,10 @@
   text_field(:pageInputField, :xpath => "//table[contains(@class, 
'wb-sitelinks')]/tfoot/tr/td[contains(@class, 'wb-sitelinks-link')]/input")
   text_field(:pageInputFieldExistingSiteLink, :xpath => 
"//table[contains(@class, 'wb-sitelinks')]/tbody/tr/td[contains(@class, 
'wb-sitelinks-link')]/input")
   span(:saveSitelinkLinkDisabled, :class => "wb-ui-toolbar-button-disabled")
-  unordered_list(:siteIdAutocompleteList, :class => "ui-autocomplete", :index 
=> 0)
-  unordered_list(:pageAutocompleteList, :class => "ui-autocomplete", :index => 
1)
-  unordered_list(:editSitelinkAutocompleteList, :class => "ui-autocomplete", 
:index => 0)
+  unordered_list(:siteIdAutocompleteList, :class => 
"wikibase-siteselector-list")
+  #todo: this is not a nice way to get the suggestion list, we should find a 
better way
+  unordered_list(:pageAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
+  unordered_list(:editSitelinkAutocompleteList, :xpath => 
"//ul[@class='ui-autocomplete ui-menu ui-widget ui-widget-content ui-corner-all 
ui-suggester-list']")
   link(:saveSitelinkLink, :text => "save")
   link(:cancelSitelinkLink, :text => "cancel")
   link(:removeSitelinkLink, :text => "remove")

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4bf85a8319b4382145651c208d6caf913fa606d5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: mw1.21-wmf11
Gerrit-Owner: Anja Jentzsch 
Gerrit-Reviewer: Tobias Gritschacher 

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


[MediaWiki-commits] [Gerrit] Add script for Wikia MediaWiki extension processing - change (translatewiki)

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

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


Change subject: Add script for Wikia MediaWiki extension processing
..

Add script for Wikia MediaWiki extension processing

Change-Id: Ic054eae79b634ac6886663d0abcf8f7e3df321df
---
A bin/update-wikia
1 file changed, 35 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/50/51650/1

diff --git a/bin/update-wikia b/bin/update-wikia
new file mode 100644
index 000..9dbded6
--- /dev/null
+++ b/bin/update-wikia
@@ -0,0 +1,35 @@
+#!binsh
+# Quick script for updating, processing and exporting Wikia MediaWiki 
extensions.
+set -e
+MYDIR=resources`whoami`
+
+# Update production data
+repo update wikia
+# Update staging environment
+repoupdate wikia $MYDIR
+wait
+
+# Process changes in the backend.
+sudo -u betawiki php 
wwwtranslatewiki.netwextensionsTranslatescriptsprocessMessageChanges.php 
--group=wikia-
+
+# Tell user to manually review changes.
+echo You should probably visit 
httpstranslatewiki.netwikiSpecialManageMessageGroups now! Really!
+echo Once done there, come back here and type Y and [ENTER] to continue.
+
+# Require "Y" as input to continue.
+read INPUT
+if [ $INPUT != Y ]
+then
+   printf nn
+   echo Script ended. User did not type 'Y' to continue
+   exit 1
+fi
+
+# Export
+repoexport wikia-quick $MYDIR
+#Commit
+repocommit wikia $MYDIR
+# Update production data again
+repo update wikia
+# Process changes (no changes expected)
+sudo -u betawiki php 
wwwtranslatewiki.netwextensionsTranslatescriptsprocessMessageChanges.php 
--group=wikia-

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic054eae79b634ac6886663d0abcf8f7e3df321df
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 Mapquest Nominatim geocode for Leaflet - change (mediawiki...MultiMaps)

2013-03-01 Thread Pastakhov (Code Review)
Pastakhov has uploaded a new change for review.

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


Change subject: Add Mapquest Nominatim geocode for Leaflet
..

Add Mapquest Nominatim geocode for Leaflet

Change-Id: Ib5cdd35ccb18d3c8312ef2f543df4cfc60dd94c0
---
M includes/GeoCoordinate.php
M includes/Geocoders.php
M tests/phpunit/services/Leaflet/LeafletTest.php
3 files changed, 97 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MultiMaps 
refs/changes/49/51649/1

diff --git a/includes/GeoCoordinate.php b/includes/GeoCoordinate.php
index 3bf833a..1750833 100644
--- a/includes/GeoCoordinate.php
+++ b/includes/GeoCoordinate.php
@@ -167,6 +167,14 @@
$lon += ($east / (self::EQUATOR_LENGTH * cos(M_PI / 180 * 
$lat))) * 360;
}
 
+   /**
+* Returns the distance between two geographical points
+* @param float $lat1 Latitude geographical point 1
+* @param float $lon1 Longitude geographical point 1
+* @param float $lat2 Latitude geographical point 2
+* @param float $lon2 Longitude geographical point 2
+* @return float Distance, in meters
+*/
public static function getDistanceInMeters($lat1, $lon1, $lat2, $lon2) {
$lat = abs($lat1 - $lat2);
$lon = abs($lon1 - $lon2);
diff --git a/includes/Geocoders.php b/includes/Geocoders.php
index 033b72a..00b0d6f 100644
--- a/includes/Geocoders.php
+++ b/includes/Geocoders.php
@@ -11,7 +11,7 @@
 
 class Geocoders {
 
-   public static function getCoordinates($address, $service) {
+   public static function getCoordinates($address, $service, &$params = 
null) {
switch ($service) {
case 'google':
return self::getCoordinatesUseGoogle($address);
@@ -19,8 +19,15 @@
case 'yandex':
return self::getCoordinatesUseYandex($address);
break;
+   case 'leaflet':
+   return 
self::getCoordinatesUseMapquestNominatim($address, $params);
+   break;
}
return false;
+   }
+
+   private static function performRequest($url, $urlArgs) {
+   return \Http::get( $url.wfArrayToCgi($urlArgs) );
}
 
private static function getCoordinatesUseGoogle($address) {
@@ -96,8 +103,59 @@
return $return;
}
 
-   private static function performRequest($url, $urlArgs) {
-   return \Http::get( $url.wfArrayToCgi($urlArgs) );
+   public static function getCoordinatesUseMapquestNominatim($address, 
&$params) {
+   $return = false;
+   $param_polygon = (isset( $params['polygon'] ) && 
$params['polygon'] === true) ? true : false;
+
+   $urlArgs = array(
+   'format' => 'json',
+   'addressdetails' => '0',
+   'limit' => 1,
+   'q' => $address,
+   );
+   if( $param_polygon ) {
+   $urlArgs['polygon'] = '1';
+   }
+   $response = self::performRequest( 
'http://open.mapquestapi.com/nominatim/v1/search.php?', $urlArgs );
+
+   if( $response !== false ) {
+   $data = \FormatJson::decode( $response );
+   if( isset($data[0]) ) {
+   $data = $data[0];
+   $lat = $data->lat;
+   $lon = $data->lon;
+   if( !is_null($lat) && !is_null($lon) ) {
+   $return = array('lat' => $lat, 'lon' => 
$lon );
+   $bounds = $data->boundingbox;
+   if( !is_null($bounds) ) {
+   $bounds_ne = new Point( 
$bounds[1], $bounds[3] );
+   $bounds_sw = new Point( 
$bounds[0], $bounds[2] );
+   if( $bounds_ne->isValid() && 
$bounds_sw->isValid() ) {
+   $b = new Bounds( 
array($bounds_ne, $bounds_sw) );
+   $return['bounds'] = $b;
+   }
+   }
+   if( $param_polygon ) {
+   $polygonpoints = 
$data->polygonpoints;
+   if( count($polygonpoints) > 1 ) 
{
+   $points = array();
+   foreach ($polygonp

[MediaWiki-commits] [Gerrit] (bug 45364)Fixed Moving/Rename, synched for Repo Upgrades - change (mediawiki...NSFileRepo)

2013-03-01 Thread Jpond (Code Review)
Jpond has submitted this change and it was merged.

Change subject: (bug 45364)Fixed Moving/Rename, synched for Repo Upgrades
..


(bug 45364)Fixed Moving/Rename, synched for Repo Upgrades

This is a major update to incorporate several evolved changes to the core 
FileRepo modules into the extension and to bring the extension up to current 
coding and core standards.  Specifically:

* [https://bugzilla.wikimedia.org/show_bug.cgi?id=45364 Bug Fix for 45364] - 
Fixed Move/Relocate issue and cleared result array for Title
* Synchronized with changes made to the core FileRepo classes and methods.  It 
now reflects fixes and upgrades as of 2013-2-27
* Updated for Documentation (doxygen)
* Cleared result array for userCan hook (NSFileRepolockdownUserCan) since Title 
now takes anything in that array to be an affirmative (user can)
* Updated Version #

Should be backwards compatible, but only tested with HEAD, 1.19 and 1.20

Bug: 45364
Change-Id: I00fad8394ac8fe6061d4b81250c0ae7a42e2b419
---
M NSFileRepo.php
M NSFileRepo_body.php
M README
3 files changed, 254 insertions(+), 197 deletions(-)

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



diff --git a/NSFileRepo.php b/NSFileRepo.php
index 485a35a..32816f4 100644
--- a/NSFileRepo.php
+++ b/NSFileRepo.php
@@ -11,9 +11,9 @@
  * @url http://www.mediawiki.org/wiki/Manual:Extension:NSFileRepo
  * @licence GNU General Public Licence 2.0 or later
  *
- * Version 1.5 - Bug 37652 -Fixes for Extension:Lockdown dependency changes
+ * Version 1.5 - (bug 45364)Fixed Moving/Rename, synched for Repo Upgrades
  *
- * Version 1.4 - Several thumbnail fixes and updates for FileRepo enhancements
+ * Version 1.4 - Bug 37652 Several thumbnail fixes and updates for FileRepo 
enhancements
  *
  * Version 1.3 - Allows namespace protected files to be whitelisted
  *
@@ -41,7 +41,7 @@
'path' => __FILE__,
'name' => 'NSFileRepo',
'author' => 'Jack D. Pond',
-   'version' => '1.4',
+   'version' => '1.5',
'url' => 'https://www.mediawiki.org/wiki/Extension:NSFileRepo',
'descriptionmsg' => 'nsfilerepo-desc'
 );
@@ -96,8 +96,10 @@
} elseif( function_exists( 'lockdownUserPermissionsErrors' ) ) {
if( $title->getNamespace() == NS_FILE ) {
$ntitle = Title::newFromText( $title->mDbkeyform );
-   return ( $ntitle->getNamespace() < 100 ) ?
-   true : lockdownUserPermissionsErrors( $ntitle, 
$user, $action, $result );
+   $ret_val = ( $ntitle->getNamespace() < 100 ) ?
+   true : lockdownUserPermissionsErrors( 
$ntitle, $user, $action, $result );
+   $result = null;
+   return $ret_val;
}
}
return true;
diff --git a/NSFileRepo_body.php b/NSFileRepo_body.php
index 66369c2..fa8d836 100644
--- a/NSFileRepo_body.php
+++ b/NSFileRepo_body.php
@@ -58,6 +58,44 @@
function getRel() {
return $this->getHashPath() . $this->getFileNameStripped( 
$this->getName() );
}
+   /**
+* Get the path, relative to the thumbnail zone root, of the
+* thumbnail directory or a particular file if $suffix is specified
+*
+* @param $suffix bool|string if not false, the name of a thumbnail file
+*
+* @return string
+*/
+   function getThumbRel( $suffix = false ) {
+   $path = $this->getRel();
+   if ( $suffix !== false ) {
+/* This is the part that changed from LocalFile */
+   $path .= '/' . $this->getFileNameStripped( $suffix );
+/* End of changes */
+   }
+   return $path;
+   }
+
+   /**
+* Get the path of an archived file relative to the public zone root
+*
+* @param $suffix bool|string if not false, the name of an archived 
thumbnail file
+*
+* @return string
+*/
+   function getArchiveRel( $suffix = false ) {
+   $path = 'archive/' . $this->getHashPath();
+   if ( $suffix === false ) {
+   $path = substr( $path, 0, -1 );
+   } else {
+/* This is the part that changed from LocalFile */
+   $path .= '/' . $this->getFileNameStripped( $suffix );
+/* End of changes */
+   }
+   return $path;
+   }
+
+
 
/**
 * Get urlencoded relative path of the file
@@ -67,7 +105,13 @@
rawurlencode( $this->getFileNameStripped( 
$this->getName() ) );
}
 
-   /** Get the URL of the thumbnail directory, or a particular file if 
$suffix is specified */
+   /**
+* Get the URL of the thumbnail directory, or a particular file if 
$suffix is specified
+*
+* @param $suffix bool|string if not false, the name of a 

[MediaWiki-commits] [Gerrit] (bug 45364)Fixed Moving/Rename, synched for Repo Upgrades - change (mediawiki...NSFileRepo)

2013-03-01 Thread Jpond (Code Review)
Jpond has uploaded a new change for review.

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


Change subject: (bug 45364)Fixed Moving/Rename, synched for Repo Upgrades
..

(bug 45364)Fixed Moving/Rename, synched for Repo Upgrades

This is a major update to incorporate several evolved changes to the core 
FileRepo modules into the extension and to bring the extension up to current 
coding and core standards.  Specifically:

* [https://bugzilla.wikimedia.org/show_bug.cgi?id=45364 Bug Fix for 45364] - 
Fixed Move/Relocate issue and cleared result array for Title
* Synchronized with changes made to the core FileRepo classes and methods.  It 
now reflects fixes and upgrades as of 2013-2-27
* Updated for Documentation (doxygen)
* Cleared result array for userCan hook (NSFileRepolockdownUserCan) since Title 
now takes anything in that array to be an affirmative (user can)

Should be backwards compatible, but only tested with HEAD, 1.19 and 1.20

Bug: 45364
Change-Id: I00fad8394ac8fe6061d4b81250c0ae7a42e2b419
---
M NSFileRepo.php
M NSFileRepo_body.php
M README
3 files changed, 251 insertions(+), 194 deletions(-)


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

diff --git a/NSFileRepo.php b/NSFileRepo.php
index 485a35a..2ae0833 100644
--- a/NSFileRepo.php
+++ b/NSFileRepo.php
@@ -96,8 +96,10 @@
} elseif( function_exists( 'lockdownUserPermissionsErrors' ) ) {
if( $title->getNamespace() == NS_FILE ) {
$ntitle = Title::newFromText( $title->mDbkeyform );
-   return ( $ntitle->getNamespace() < 100 ) ?
-   true : lockdownUserPermissionsErrors( $ntitle, 
$user, $action, $result );
+   $ret_val = ( $ntitle->getNamespace() < 100 ) ?
+   true : lockdownUserPermissionsErrors( 
$ntitle, $user, $action, $result );
+   $result = null;
+   return $ret_val;
}
}
return true;
diff --git a/NSFileRepo_body.php b/NSFileRepo_body.php
index 66369c2..fa8d836 100644
--- a/NSFileRepo_body.php
+++ b/NSFileRepo_body.php
@@ -58,6 +58,44 @@
function getRel() {
return $this->getHashPath() . $this->getFileNameStripped( 
$this->getName() );
}
+   /**
+* Get the path, relative to the thumbnail zone root, of the
+* thumbnail directory or a particular file if $suffix is specified
+*
+* @param $suffix bool|string if not false, the name of a thumbnail file
+*
+* @return string
+*/
+   function getThumbRel( $suffix = false ) {
+   $path = $this->getRel();
+   if ( $suffix !== false ) {
+/* This is the part that changed from LocalFile */
+   $path .= '/' . $this->getFileNameStripped( $suffix );
+/* End of changes */
+   }
+   return $path;
+   }
+
+   /**
+* Get the path of an archived file relative to the public zone root
+*
+* @param $suffix bool|string if not false, the name of an archived 
thumbnail file
+*
+* @return string
+*/
+   function getArchiveRel( $suffix = false ) {
+   $path = 'archive/' . $this->getHashPath();
+   if ( $suffix === false ) {
+   $path = substr( $path, 0, -1 );
+   } else {
+/* This is the part that changed from LocalFile */
+   $path .= '/' . $this->getFileNameStripped( $suffix );
+/* End of changes */
+   }
+   return $path;
+   }
+
+
 
/**
 * Get urlencoded relative path of the file
@@ -67,7 +105,13 @@
rawurlencode( $this->getFileNameStripped( 
$this->getName() ) );
}
 
-   /** Get the URL of the thumbnail directory, or a particular file if 
$suffix is specified */
+   /**
+* Get the URL of the thumbnail directory, or a particular file if 
$suffix is specified
+*
+* @param $suffix bool|string if not false, the name of a thumbnail file
+*
+* @return string path
+*/
function getThumbUrl( $suffix = false ) {
$path = $this->repo->getZoneUrl('thumb') . '/' . 
$this->getUrlRel();
if ( $suffix !== false ) {
@@ -77,246 +121,202 @@
}
 
 
-   /** Return the file name of a thumbnail with the specified parameters */
-   function thumbName( $params ) {
+   public function thumbName( $params, $flags = 0 ) {
+   $name = ( $this->repo && !( $flags & self::THUMB_FULL_NAME ) )
+/* This is the part that changed from LocalFile */
+   ? $this->repo->nameForThumb( 
$this->getFileNameStripped( $this->getName() ) )
+   : $this->getFileNameStripped( $this->getName() );
+/* End of

[MediaWiki-commits] [Gerrit] Add Babel extension in Wikidata test repos - change (operations/puppet)

2013-03-01 Thread Silke Meyer (Code Review)
Silke Meyer has uploaded a new change for review.

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


Change subject: Add Babel extension in Wikidata test repos
..

Add Babel extension in Wikidata test repos

Change-Id: I62f2ad54d15d254e7c376d444cc0c75ea59474bf
---
M manifests/wikidata.pp
M templates/mediawiki/wikidata-repo-requires.php
2 files changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/48/51648/1

diff --git a/manifests/wikidata.pp b/manifests/wikidata.pp
index 1999861..d862da1 100644
--- a/manifests/wikidata.pp
+++ b/manifests/wikidata.pp
@@ -144,7 +144,7 @@
 
# get the extensions
# for repo get extensions Wikibase and ULS
-   mw-extension { [ "Wikibase", "UniversalLanguageSelector" ]:
+   mw-extension { [ "Wikibase", "UniversalLanguageSelector", 
"Babel" ]:
require => [Git::Clone["mediawiki"], 
Exec["mediawiki_setup"], Exec["repo_move_mainpage"], Mw-extension["Diff"], 
Mw-extension["DataValues"]],
}
# put a repo specific settings file to $install_path (required 
by LocalSettings.php)
diff --git a/templates/mediawiki/wikidata-repo-requires.php 
b/templates/mediawiki/wikidata-repo-requires.php
index cfd52e3..4c9fa20 100644
--- a/templates/mediawiki/wikidata-repo-requires.php
+++ b/templates/mediawiki/wikidata-repo-requires.php
@@ -31,6 +31,7 @@
 require_once( "$IP/extensions/ApiSandbox/ApiSandbox.php" );
 require_once( "$IP/extensions/OAI/OAIRepo.php" );
 require_once( "$IP/extensions/notitle.php" );
+require_once( "$IP/extensions/Babel/Babel.php" );
 
 // items in main namespace
 $baseNs = 100;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I62f2ad54d15d254e7c376d444cc0c75ea59474bf
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Silke Meyer 

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


[MediaWiki-commits] [Gerrit] Add export project "wikia-quick" - change (translatewiki)

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

Change subject: Add export project "wikia-quick"
..


Add export project "wikia-quick"

Change-Id: Ic9a33b9f065fed578b1104c2120929f91e70110c
---
M bin/repoexport
1 file changed, 32 insertions(+), 0 deletions(-)

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



diff --git a/bin/repoexport b/bin/repoexport
index f4a002c..8df35b9 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -199,6 +199,38 @@
php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
wait
 
+elif [ "$PROJECT" = "wikia-quick" ]
+then
+   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
+   wait
+   echo "repoexport: Wikia part 2"
+   php "$EXPORTER" --target . --group=wikia-n* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-o* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-p* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-q* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-r* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-s* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-t* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-u* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-v* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-w* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-x* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-y* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
+   wait
+
 elif [ "$PROJECT" = "wikiblame" ]
 then
php "$EXPORTER" --target . --group=out-wikiblame --lang '*' --skip en 
--threshold 1

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic9a33b9f065fed578b1104c2120929f91e70110c
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 export project "wikia-quick" - change (translatewiki)

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

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


Change subject: Add export project "wikia-quick"
..

Add export project "wikia-quick"

Change-Id: Ic9a33b9f065fed578b1104c2120929f91e70110c
---
M bin/repoexport
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/47/51647/1

diff --git a/bin/repoexport b/bin/repoexport
index f4a002c..8df35b9 100755
--- a/bin/repoexport
+++ b/bin/repoexport
@@ -199,6 +199,38 @@
php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
wait
 
+elif [ "$PROJECT" = "wikia-quick" ]
+then
+   php "$EXPORTER" --target . --group=wikia-a* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-b* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-c* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-d* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-e* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-f* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-g* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-h* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-i* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-j* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-k* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-l* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-m* --lang '*' --skip en &
+   wait
+   echo "repoexport: Wikia part 2"
+   php "$EXPORTER" --target . --group=wikia-n* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-o* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-p* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-q* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-r* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-s* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-t* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-u* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-v* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-w* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-x* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-y* --lang '*' --skip en &
+   php "$EXPORTER" --target . --group=wikia-z* --lang '*' --skip en &
+   wait
+
 elif [ "$PROJECT" = "wikiblame" ]
 then
php "$EXPORTER" --target . --group=out-wikiblame --lang '*' --skip en 
--threshold 1

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic9a33b9f065fed578b1104c2120929f91e70110c
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] Entity selector: Using user language when in MediaWiki context - change (mediawiki...Wikibase)

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

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


Change subject: Entity selector: Using user language when in MediaWiki context
..

Entity selector: Using user language when in MediaWiki context

Change-Id: I001bd969c234b520b889f8f9c09fe1b924f0d79b
---
M lib/resources/jquery.valueview.views/wikibaseItem.js
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
M lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
M lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
M repo/resources/wikibase.ui.entitysearch.js
5 files changed, 9 insertions(+), 14 deletions(-)


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

diff --git a/lib/resources/jquery.valueview.views/wikibaseItem.js 
b/lib/resources/jquery.valueview.views/wikibaseItem.js
index 5e4140b..0d8bdc0 100644
--- a/lib/resources/jquery.valueview.views/wikibaseItem.js
+++ b/lib/resources/jquery.valueview.views/wikibaseItem.js
@@ -54,8 +54,6 @@
 * @private
 */
_buildInputDom: function() {
-   var language = mw.config.get( 'wgUserLanguage' );
-
return $( '', {
'class': this.widgetBaseClass + '-input',
'type': 'text',
@@ -64,8 +62,6 @@
.inputAutoExpand( { expandWidth: false, 
expandHeight:true, suppressNewLine: true } )
.entityselector( {
url: mw.util.wikiScript( 'api' ),
-   language: language,
-   type: 'item',
selectOnAutocomplete: true
} )
.eachchange( function( event, oldValue ) {
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 5605044..c7f9ea4 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -16,7 +16,9 @@
  *
  * @option url {String} URL to retrieve results from.
  *
- * @option language {String} Code of the language results shall be fetched in.
+ * @option language {String} (optional when in MediaWiki context) Code of the 
language results shall
+ * be fetched in. Required if not in MediaWiki context.
+ * Default value: User language (when in MediaWiki context)
  *
  * @option type {String} (optional) Entity type that will be queried for 
results.
  * Default value: 'item'
@@ -101,7 +103,7 @@
 */
options: {
url: null,
-   language: null,
+   language: ( IS_MW_CONTEXT ) ? mw.config.get( 
'wgUserLanguage' ) : null,
type: 'item',
limit: null,
selectOnAutocomplete: false,
diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
index 0e2eb04..4517318 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.snakview/snakview.js
@@ -181,12 +181,10 @@
 * @return {jQuery}
 */
_buildPropertySelector: function() {
-   var self = this,
-   language = mw.config.get( 'wgUserLanguage' );
+   var self = this;
 
return $( '' ).entityselector( {
url: mw.util.wikiScript( 'api' ),
-   language: language,
type: 'property'
} )
.prop( 'placeholder', mw.msg( 
'wikibase-snakview-property-input-placeholder' ) )
@@ -218,7 +216,8 @@
entity = response.entities[ entityId ],
dataTypeId = entity.datatype,
dataType = dt.getDataType( dataTypeId ),
-   label;
+   label,
+   language = mw.config.get( 
'wgUserLanguage' );
 
if( entity.labels && entity.labels[ language ] 
) {
label = entity.labels[ language ].value;
diff --git 
a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js 
b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
index 55e9900..2064ac0 100644
--- a/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
+++ b/lib/tests/qunit/jquery.wikibase/jquery.wikibase.entityselector.tests.js
@@ -19,8 +19,7 @@
 */
 

[MediaWiki-commits] [Gerrit] Bug 45256: make upload endpoint for Commons local - change (operations/mediawiki-config)

2013-03-01 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Bug 45256: make upload endpoint for Commons local
..


Bug 45256: make upload endpoint for Commons local

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 515bd5e..f8eeefb 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -10822,6 +10822,7 @@
 ),
 'wmgMFPhotoUploadEndpoint' => array(
'default' => '//commons.wikimedia.org/w/api.php',
+   'commonswiki' => '', # bug 45256
'test2wiki' => '',
 ),
 'wmgMFForceSecureLogin' => array(

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25e0c95f2332e15043a82367d86d432bf77f3117
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot

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


[MediaWiki-commits] [Gerrit] Consistency tweaks - change (mediawiki...CentralAuth)

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

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


Change subject: Consistency tweaks
..

Consistency tweaks

Followup If9cd34d3e1f121f5ab8ad4fb708ccc268391788a
* Remove Title Case
* Don't -> Do not
* tabs2spaces

Change-Id: Ie8222ba09054c6dad2326d0ec0e6df1e067d1dbf
---
M CentralAuth.i18n.php
1 file changed, 11 insertions(+), 11 deletions(-)


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

diff --git a/CentralAuth.i18n.php b/CentralAuth.i18n.php
index a329e3b..bdddba4 100644
--- a/CentralAuth.i18n.php
+++ b/CentralAuth.i18n.php
@@ -137,7 +137,7 @@
 
// Administrator's console
'centralauth'  => 'Global user manager',
-   'centralauth-admin-intro'  => 'This interface 
can be used for administration of global accounts.',
+   'centralauth-admin-intro'  => 'This interface can be used 
for administration of global accounts.',
'centralauth-admin-manage' => 'Manage user data',
'centralauth-admin-username'   => 'User name:',
'centralauth-admin-lookup-ro'  => 'View user info',
@@ -220,15 +220,15 @@
'centralauth-listusers-nolocal'  => 'unattached or doesn\'t exist 
locally',
 
// MultiLock
-   'multilock' => 'Lock Multiple 
Global Users',
+   'multilock' => 'Lock multiple 
global users',
'centralauth-admin-multi-username'  => 'Enter one or more 
usernames, separated by new-line',
'centralauth-admin-multi-notfound'  => 'Search returned no 
usernames.',
'centralauth-admin-multi-searchprefix'  => 'Or, search for 
accounts with a prefix',
'centralauth-admin-multi-intro' => 'Update multiple 
global users at once',
-   'centralauth-admin-action-lock-nochange'=> 'Don\'t change 
locks',
+   'centralauth-admin-action-lock-nochange'=> 'Do not change 
locks',
'centralauth-admin-action-lock-lock'=> 'Lock selected 
accounts',
'centralauth-admin-action-lock-unlock'  => 'Unlock selected 
accounts',
-   'centralauth-admin-action-hide-nochange'=> 'Don\'t change 
hidden levels',
+   'centralauth-admin-action-hide-nochange'=> 'Do not change 
hidden levels',
'centralauth-admin-action-hide-none'=> 'Unhide selected 
accounts',
'centralauth-admin-action-hide-lists'   => 'Hide selected 
accounts from public lists',
'centralauth-admin-action-hide-oversight'   => 'Completely hide 
selected accounts',
@@ -313,7 +313,7 @@
 You may view or edit the permissions assigned to a group, if you have 
permission to.
 A group may be deleted by removing all rights from it.',
'centralauth-globalgroupperms-grouplistitem'  => '$1 
([[Special:GlobalGroupPermissions/$2|view/edit]])',
-   'centralauth-globalgroupperms-nogroups'   => 'No global 
groups are defined.',
+   'centralauth-globalgroupperms-nogroups'   => 'No global groups 
are defined.',
'centralauth-existinggroup-legend'=> 'Existing groups',
'centralauth-newgroup-legend' => 'Create a new 
group',
'centralauth-newgroup-intro'  => 'You can use this 
form to assign permissions to a new group.
@@ -347,11 +347,11 @@
'centralauth-editset' => 'Wiki sets',
'centralauth-editset-legend-rw'   => 'Edit or create 
wiki set',
'centralauth-editset-legend-ro'   => 'List of wiki 
sets',
-   'centralauth-editset-intro-rw'   => 'The following 
wiki sets have already been created.
+   'centralauth-editset-intro-rw'=> 'The following 
wiki sets have already been created.
 You may view and modify any of them, or create a new set.',
-   'centralauth-editset-intro-ro'   => 'Below is the 
list of existing wiki sets.',
-   'centralauth-editset-item-rw'=> 
'[[Special:WikiSets/$2|$1]] ([[Special:WikiSets/delete/$2|delete]])',
-   'centralauth-editset-item-ro'=> 
'[[Special:WikiSets/$2|$1]]',
+   'centralauth-editset-intro-ro'=> 'Below is the list 
of existing wiki sets.',
+   'centralauth-editset-item-rw' => 
'[[Special:WikiSets/$2|$1]] ([[Special:WikiSets/delete/$2|delete]])',
+   'centralauth-editset-item-ro' => 
'[[Special:WikiSets/$2|$1]]',
'centralauth-editset-new' => 'Create a new set',
'centralauth-editset-notfound'=> 'Wiki set "$1" not 
found.',
'centr

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

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

Change subject: [SecureHTML] Register extension
..


[SecureHTML] Register extension

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 6cc0ef1..122681e 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1121,6 +1121,8 @@
 
 Search Extra NS
 
+Secure HTML
+
 Secure Passwords
 
 Secure Poll

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

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

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


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

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

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


Change subject: [SecureHTML] Register extension
..

[SecureHTML] Register extension

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


  git pull ssh://gerrit.wikimedia.org:29418/translatewiki 
refs/changes/44/51644/1

diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 6cc0ef1..122681e 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1121,6 +1121,8 @@
 
 Search Extra NS
 
+Secure HTML
+
 Secure Passwords
 
 Secure Poll

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

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

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


[MediaWiki-commits] [Gerrit] swap ujson lib for simplejson - change (mediawiki...EventLogging)

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

Change subject: swap ujson lib for simplejson
..


swap ujson lib for simplejson

Change-Id: Ia69fe0fcc85134a8a8cd19697e2e0d3e7a097fde
---
M server/eventlogging/compat.py
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/server/eventlogging/compat.py b/server/eventlogging/compat.py
index 39897cd..58af260 100644
--- a/server/eventlogging/compat.py
+++ b/server/eventlogging/compat.py
@@ -22,7 +22,7 @@
 
 
 try:
-import ujson as json
+import simplejson as json
 except ImportError:
 import json
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia69fe0fcc85134a8a8cd19697e2e0d3e7a097fde
Gerrit-PatchSet: 1
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] Remove Git SHA1 logging functionality - change (mediawiki...EventLogging)

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

Change subject: Remove Git SHA1 logging functionality
..


Remove Git SHA1 logging functionality

It's a bit out-of-scope for EventLogging to be mucking about the call stack and
file paths. My initial enthusiasm for the idea has waned. If we got serious
about adding this functionality, we should do it the Right Way: by improving
GitInfo.php in core (it should be able to search up a path for a .git dir, for
example). If we went that route and reached a point at which adding this
information to server-side events could be done simply and reliably by invoking
functionality in core, I'd be interested in re-introducing it. But it's just
too much stuff to pile into EventLogging.

Change-Id: I6fb205830eb21a05a8f5d4594ad875468cb78377
---
M EventLogging.php
1 file changed, 0 insertions(+), 47 deletions(-)

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



diff --git a/EventLogging.php b/EventLogging.php
index 121d09e..2ffa165 100644
--- a/EventLogging.php
+++ b/EventLogging.php
@@ -78,42 +78,9 @@
  */
 $wgEventLoggingDBname = false;
 
-/**
- * @var bool: Whether to log SHA1 of Git HEAD of caller.
- */
-$wgEventLoggingLogSHA1 = false;
 
 
 // Helpers
-
-/**
- * Gets the SHA1 of HEAD for the Git repository at a given path.
- * If path does not contain a Git repository, moves up the directory
- * tree searching for one, stopping at $IP. Returns false if no Git
- * repository found of if unable to determine SHA1 of HEAD.
- *
- * @param string $path: Starts search at this path. Must be a sub-path
- *  of $IP (or equal to $IP).
- * @return string|bool: SHA1 of HEAD if repository discovery is
- *  successful. False otherwise.
- */
-function efPathGitHeadSHA1( $path ) {
-   global $IP;
-
-   if ( is_file( $path ) ) {
-   $path = pathinfo( $path, PATHINFO_DIRNAME );
-   }
-
-   while ( strpos( $path, $IP ) === 0 ) {
-   if ( file_exists( $path . '/.git' ) ) {
-   $gitInfo = new GitInfo( $path );
-   return $gitInfo->getHeadSHA1();
-   }
-   $path = dirname( $path );
-   }
-   return false;
-}
-
 
 /**
  * Writes an event to a file descriptor or socket.
@@ -155,20 +122,6 @@
'recvFrom' => gethostname(),
'timestamp'=> $_SERVER[ 'REQUEST_TIME' ],
);
-
-   if ( $wgEventLoggingLogSHA1 ) {
-   // Attempt to get the SHA1 of HEAD of caller.
-   if ( version_compare( PHP_VERSION, '5.4.0', '>=' ) ) {
-   // PHP 5.4.0 added a second parameter to 
debug_backtrace, 'limit',
-   // which specifies the number of stack frames to return.
-   $backtrace = debug_backtrace( 
DEBUG_BACKTRACE_IGNORE_ARGS, 1 );
-   } else {
-   $backtrace = debug_backtrace( 
DEBUG_BACKTRACE_IGNORE_ARGS );
-   }
-   $caller = array_shift( $backtrace );
-   $sha1 = substr( efPathGitHeadSHA1( $caller[ 'file' ] ), 0, 6 );
-   $encapsulated[ 'HEAD' ] = $sha1 ?: NULL;
-   }
 
// To make the resultant JSON easily extracted from a row of
// space-separated values, we replace literal spaces with unicode

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6fb205830eb21a05a8f5d4594ad875468cb78377
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/EventLogging
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: MZMcBride 
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] (bug 45198) Do not hide entity selector's list of suggestion - change (mediawiki...Wikibase)

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

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


Change subject: (bug 45198) Do not hide entity selector's list of suggestion
..

(bug 45198) Do not hide entity selector's list of suggestion

The change set prevents the entity selector's list of suggestions from hiding
when an exact, unique label is typed into the input box.

Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
---
M lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
1 file changed, 12 insertions(+), 0 deletions(-)


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

diff --git a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js 
b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
index 15cf0ab..d094827 100644
--- a/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
+++ b/lib/resources/jquery.wikibase/jquery.wikibase.entityselector.js
@@ -341,6 +341,18 @@
},
 
/**
+* @see ui.suggester.close
+*/
+   close: function( event ) {
+   if ( !event || !event.originalEvent || 
event.originalEvent.type !== 'programmatic' ) {
+   // Do not close the list of suggestions when 
programmatically selecting an entity
+   // (e.g by typing an exact, unique entity 
label), allowing the user to check that
+   // the typed string actually matches a single 
entity.
+   $.ui.suggester.prototype.close.apply( this, 
event );
+   }
+   },
+
+   /**
 * Triggers searching for more results with the current search 
term.
 */
more: function() {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e573d0578d3e153a842a20b4196fb7ed2b3b0f9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Henning Snater 

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


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

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

Change subject: [SelectCategory] Register extension
..


[SelectCategory] Register extension

Was imported from SVN

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

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



diff --git a/groups/MediaWiki/mediawiki-defines.txt 
b/groups/MediaWiki/mediawiki-defines.txt
index 186c94a..6cc0ef1 100644
--- a/groups/MediaWiki/mediawiki-defines.txt
+++ b/groups/MediaWiki/mediawiki-defines.txt
@@ -1132,6 +1132,8 @@
 Secure Sessions
 aliasfile = SecureSessions/SecureSessions.alias.php
 
+Select Category
+
 Select Tag
 
 Semantic ACL

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

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

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


<    1   2   3   >