[MediaWiki-commits] [Gerrit] Enable VectorBeta form refresh on labs - change (operations/mediawiki-config)

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

Change subject: Enable VectorBeta form refresh on labs
..


Enable VectorBeta form refresh on labs

Precursor to T73477

Change-Id: I462e62b7dd7ae68105761a6cd06c8aa9b767aef2
---
M wmf-config/CommonSettings-labs.php
M wmf-config/InitialiseSettings-labs.php
2 files changed, 4 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 17a7286..98521a7 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -81,6 +81,7 @@
require_once "$IP/extensions/VectorBeta/VectorBeta.php";
$wgVectorBetaPersonalBar = $wmgVectorBetaPersonalBar;
$wgVectorBetaWinter = $wmgVectorBetaWinter;
+   $wgVectorBetaFormRefresh = $wmgVectorBetaFormRefresh;
 }
 
 if ( $wmgUseParsoid ) {
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index a2d9d43..7311a0a 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -397,6 +397,9 @@
'wmgUseVectorBeta' => array(
'default' => true,
),
+   'wmgVectorBetaFormRefresh' => array(
+   'default' => true,
+   ),
 
'wmgVectorBetaPersonalBar' => array(
'default' => true,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I462e62b7dd7ae68105761a6cd06c8aa9b767aef2
Gerrit-PatchSet: 3
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Glaisher 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Document IContextSource->msg - change (mediawiki/core)

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

Change subject: Document IContextSource->msg
..


Document IContextSource->msg

Change-Id: I4cc922c61f77bbb7cd4ece94f28d927c4753c24e
---
M includes/context/IContextSource.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/context/IContextSource.php 
b/includes/context/IContextSource.php
index 713c5cb..2ca79cd 100644
--- a/includes/context/IContextSource.php
+++ b/includes/context/IContextSource.php
@@ -132,7 +132,7 @@
public function getStats();
 
/**
-* Get a Message object with context set
+* Get a Message object with context set.  See wfMessage for parameters.
 *
 * @return Message
 */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4cc922c61f77bbb7cd4ece94f28d927c4753c24e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Mattflaschen 
Gerrit-Reviewer: Mattflaschen 
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 fallback messages for unauthorized actions on a topic - change (mediawiki...Flow)

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

Change subject: Fix fallback messages for unauthorized actions on a topic
..


Fix fallback messages for unauthorized actions on a topic

params['msgKey'] of LogEventsList::showLogExtract accepts
an array where the first element is the msg key or an
array of msg keys to try in order. The other elements
are the parameters ([[$1]]) inside the message.

Adding another level of array to actually provide a
msg key fallback.

Bug: T94841

Change-Id: I8ce656ec019cd15b7f7196b79d4cad32b76d8c5c
Note: It does not completely fix T94841 but it helps.
---
M includes/Block/Topic.php
1 file changed, 4 insertions(+), 2 deletions(-)

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



diff --git a/includes/Block/Topic.php b/includes/Block/Topic.php
index e753b63..8e2b4c6 100644
--- a/includes/Block/Topic.php
+++ b/includes/Block/Topic.php
@@ -860,8 +860,10 @@
//  
flow-error-not-allowed-suppress-extract
//  
flow-error-not-allowed-reply-to-suppress-topic-extract
'msgKey' => array(
-   
"flow-error-not-allowed-{$this->action}-to-$state-$type",
-   
"flow-error-not-allowed-$state-extract",
+   array(
+   
"flow-error-not-allowed-{$this->action}-to-$state-$type",
+   
"flow-error-not-allowed-$state-extract",
+   ),
)
)
);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8ce656ec019cd15b7f7196b79d4cad32b76d8c5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Sbisson 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Matthias Mullie 
Gerrit-Reviewer: Mooeypoo 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Document IContextSource->msg - change (mediawiki/core)

2015-04-24 Thread Mattflaschen (Code Review)
Mattflaschen has uploaded a new change for review.

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

Change subject: Document IContextSource->msg
..

Document IContextSource->msg

Change-Id: I4cc922c61f77bbb7cd4ece94f28d927c4753c24e
---
M includes/context/IContextSource.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/context/IContextSource.php 
b/includes/context/IContextSource.php
index 713c5cb..2ca79cd 100644
--- a/includes/context/IContextSource.php
+++ b/includes/context/IContextSource.php
@@ -132,7 +132,7 @@
public function getStats();
 
/**
-* Get a Message object with context set
+* Get a Message object with context set.  See wfMessage for parameters.
 *
 * @return Message
 */

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

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

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


[MediaWiki-commits] [Gerrit] Revert "tools: Redirect tools.wmflabs.org/toolname appropria... - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Revert "tools: Redirect tools.wmflabs.org/toolname 
appropriately"
..

Revert "tools: Redirect tools.wmflabs.org/toolname appropriately"

This reverts commit 0a46410c1e8236aea4d0acc798a387582e1e168a.

Change-Id: I43f60c8d3acad12b9a342bc7fe1d82b6eac4ac25
---
M modules/dynamicproxy/files/urlproxy.lua
1 file changed, 1 insertion(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/06/206506/1

diff --git a/modules/dynamicproxy/files/urlproxy.lua 
b/modules/dynamicproxy/files/urlproxy.lua
index f2b65f5..7c1da27 100644
--- a/modules/dynamicproxy/files/urlproxy.lua
+++ b/modules/dynamicproxy/files/urlproxy.lua
@@ -23,7 +23,7 @@
 local captures = ngx.re.match(ngx.var.uri, "^/([^/]*)(/.*)?$")
 
 local prefix = captures[1]
-local rest = captures[2] or nil
+local rest = captures[2] or "/"
 local routes_arr = nil
 local route = nil
 
@@ -43,17 +43,6 @@
 break
 end
 end
-end
-
--- if a route is found and there was nothing (no trailing slash)
--- then the url is of form tools.wmflabs.org/tool. If we just let
--- that be, lighttpd will redirect it to a http://tools.wmflabs.org/tool
--- even if the original request was https. So let's do the redirect ourself
--- making sure it keeps the appropriate protocol. This doesn't cover all
--- the ways lighttpd can silently strip off https, but hey it covers the most
--- common one :) See https://phabricator.wikimedia.org/T66627
-if route and rest ~= nil then
-return ngx.redirect(ngx.var.request_uri .. '/')
 end
 
 if not route then

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

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

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


[MediaWiki-commits] [Gerrit] Revert "tools: Redirect tools.wmflabs.org/toolname appropria... - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Revert "tools: Redirect tools.wmflabs.org/toolname 
appropriately"
..


Revert "tools: Redirect tools.wmflabs.org/toolname appropriately"

This reverts commit 0a46410c1e8236aea4d0acc798a387582e1e168a.

Change-Id: I43f60c8d3acad12b9a342bc7fe1d82b6eac4ac25
---
M modules/dynamicproxy/files/urlproxy.lua
1 file changed, 1 insertion(+), 12 deletions(-)

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



diff --git a/modules/dynamicproxy/files/urlproxy.lua 
b/modules/dynamicproxy/files/urlproxy.lua
index f2b65f5..7c1da27 100644
--- a/modules/dynamicproxy/files/urlproxy.lua
+++ b/modules/dynamicproxy/files/urlproxy.lua
@@ -23,7 +23,7 @@
 local captures = ngx.re.match(ngx.var.uri, "^/([^/]*)(/.*)?$")
 
 local prefix = captures[1]
-local rest = captures[2] or nil
+local rest = captures[2] or "/"
 local routes_arr = nil
 local route = nil
 
@@ -43,17 +43,6 @@
 break
 end
 end
-end
-
--- if a route is found and there was nothing (no trailing slash)
--- then the url is of form tools.wmflabs.org/tool. If we just let
--- that be, lighttpd will redirect it to a http://tools.wmflabs.org/tool
--- even if the original request was https. So let's do the redirect ourself
--- making sure it keeps the appropriate protocol. This doesn't cover all
--- the ways lighttpd can silently strip off https, but hey it covers the most
--- common one :) See https://phabricator.wikimedia.org/T66627
-if route and rest ~= nil then
-return ngx.redirect(ngx.var.request_uri .. '/')
 end
 
 if not route then

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

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

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


[MediaWiki-commits] [Gerrit] tools: Redirect tools.wmflabs.org/toolname appropriately - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Redirect tools.wmflabs.org/toolname appropriately
..


tools: Redirect tools.wmflabs.org/toolname appropriately

Lighttpd fucks up redirects with https coming in - does not
respect X-Forwarded-Proto and just redirects it back to http.
While the actual fix is a bit hard, this fixes the most common
case of a link to a tool directly being typed in, and sadly
redirecting to https.

It also handles the /robots.txt and what not case by only doing
the redirect if a tool with the name actually exists and has
a registered webservice.

Bug: T66627
Change-Id: Ib140be8a066ba1081f544f033aebf3622cd74e17
---
M modules/dynamicproxy/files/urlproxy.lua
1 file changed, 12 insertions(+), 1 deletion(-)

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



diff --git a/modules/dynamicproxy/files/urlproxy.lua 
b/modules/dynamicproxy/files/urlproxy.lua
index 7c1da27..f2b65f5 100644
--- a/modules/dynamicproxy/files/urlproxy.lua
+++ b/modules/dynamicproxy/files/urlproxy.lua
@@ -23,7 +23,7 @@
 local captures = ngx.re.match(ngx.var.uri, "^/([^/]*)(/.*)?$")
 
 local prefix = captures[1]
-local rest = captures[2] or "/"
+local rest = captures[2] or nil
 local routes_arr = nil
 local route = nil
 
@@ -45,6 +45,17 @@
 end
 end
 
+-- if a route is found and there was nothing (no trailing slash)
+-- then the url is of form tools.wmflabs.org/tool. If we just let
+-- that be, lighttpd will redirect it to a http://tools.wmflabs.org/tool
+-- even if the original request was https. So let's do the redirect ourself
+-- making sure it keeps the appropriate protocol. This doesn't cover all
+-- the ways lighttpd can silently strip off https, but hey it covers the most
+-- common one :) See https://phabricator.wikimedia.org/T66627
+if route and rest ~= nil then
+return ngx.redirect(ngx.var.request_uri .. '/')
+end
+
 if not route then
 -- No routes defined for this uri, try the default (admin) prefix instead
 rest = ngx.var.uri

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib140be8a066ba1081f544f033aebf3622cd74e17
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] ApiEditPage: Fetch content model from article, not title - change (mediawiki/core)

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

Change subject: ApiEditPage: Fetch content model from article, not title
..


ApiEditPage: Fetch content model from article, not title

The Title object's cached content model isn't updated after the edit.
The Article object fetches the model from the revision that was just
created, so let's just use that instead.

Bug: T96937
Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
---
M includes/api/ApiEditPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/api/ApiEditPage.php b/includes/api/ApiEditPage.php
index 0dee147..6ab8483 100644
--- a/includes/api/ApiEditPage.php
+++ b/includes/api/ApiEditPage.php
@@ -497,7 +497,7 @@
$r['result'] = 'Success';
$r['pageid'] = intval( 
$titleObj->getArticleID() );
$r['title'] = $titleObj->getPrefixedText();
-   $r['contentmodel'] = 
$titleObj->getContentModel();
+   $r['contentmodel'] = 
$articleObject->getContentModel();
$newRevId = $articleObject->getLatest();
if ( $newRevId == $oldRevId ) {
$r['nochange'] = true;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c5ab3ec6829d403a29a8a8f55e7458730369034
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Mattflaschen 
Gerrit-Reviewer: Tpt 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Rename various $that callback variables to be more descriptive - change (mediawiki/core)

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

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

Change subject: Rename various $that callback variables to be more descriptive
..

Rename various $that callback variables to be more descriptive

Change-Id: I0b68b2c550fde9c2da53d844421e34b8df0c42ed
---
M includes/User.php
M includes/db/Database.php
M includes/filerepo/file/File.php
M includes/parser/Parser.php
M tests/phpunit/includes/libs/ArrayUtilsTest.php
M tests/phpunit/includes/site/CachingSiteStoreTest.php
M tests/phpunit/includes/site/SiteImporterTest.php
7 files changed, 30 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/05/206505/1

diff --git a/includes/User.php b/includes/User.php
index c3d4a65..40af973 100644
--- a/includes/User.php
+++ b/includes/User.php
@@ -3711,9 +3711,9 @@
// T95839: clear the cache again post-commit to reduce race 
conditions
// where stale values are written back to the cache by other 
threads.
// Note: this *still* doesn't deal with REPEATABLE-READ 
snapshot lag...
-   $that = $this;
-   $dbw->onTransactionIdle( function() use ( $that ) {
-   $that->clearSharedCache();
+   $user = $this;
+   $dbw->onTransactionIdle( function() use ( $user ) {
+   $user->clearSharedCache();
} );
}
 
@@ -4812,9 +4812,9 @@
 * Deferred version of incEditCountImmediate()
 */
public function incEditCount() {
-   $that = $this;
-   wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle( function() 
use ( $that ) {
-   $that->incEditCountImmediate();
+   $user = $this;
+   wfGetDB( DB_MASTER )->onTransactionPreCommitOrIdle( function() 
use ( $user ) {
+   $user->incEditCountImmediate();
} );
}
 
diff --git a/includes/db/Database.php b/includes/db/Database.php
index 605dc7c..c80e965 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -4181,7 +4181,7 @@
 * @return string The new SQL statement with variables replaced
 */
protected function replaceVars( $ins ) {
-   $that = $this;
+   $db = $this;
$vars = $this->getSchemaVars();
return preg_replace_callback(
'!
@@ -4190,19 +4190,19 @@
`\{\$ (\w+) }`| # 4. 
addIdentifierQuotes
/\*\$ (\w+) \*/ # 5. leave 
unencoded
!x',
-   function ( $m ) use ( $that, $vars ) {
+   function ( $m ) use ( $db, $vars ) {
// Note: Because of 
,
// check for both nonexistent keys *and* the 
empty string.
if ( isset( $m[1] ) && $m[1] !== '' ) {
if ( $m[1] === 'i' ) {
-   return $that->indexName( $m[2] 
);
+   return $db->indexName( $m[2] );
} else {
-   return $that->tableName( $m[2] 
);
+   return $db->tableName( $m[2] );
}
} elseif ( isset( $m[3] ) && $m[3] !== '' && 
array_key_exists( $m[3], $vars ) ) {
-   return $that->addQuotes( $vars[$m[3]] );
+   return $db->addQuotes( $vars[$m[3]] );
} elseif ( isset( $m[4] ) && $m[4] !== '' && 
array_key_exists( $m[4], $vars ) ) {
-   return $that->addIdentifierQuotes( 
$vars[$m[4]] );
+   return $db->addIdentifierQuotes( 
$vars[$m[4]] );
} elseif ( isset( $m[5] ) && $m[5] !== '' && 
array_key_exists( $m[5], $vars ) ) {
return $vars[$m[5]];
} else {
diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php
index 6edd6fc..0d541f6 100644
--- a/includes/filerepo/file/File.php
+++ b/includes/filerepo/file/File.php
@@ -1241,11 +1241,11 @@
// Thumbnailing a very large file could result in network 
saturation if
// everyone does it at once.
if ( $this->getSize() >= 1e7 ) { // 10MB
-   $that = $this;
+   $file = $this;
$work = new PoolCounterWorkViaCallback( 
'GetLocalFileCopy', sha1( $this->g

[MediaWiki-commits] [Gerrit] tools: Redirect tools.wmflabs.org/toolname appropriately - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Redirect tools.wmflabs.org/toolname appropriately
..

tools: Redirect tools.wmflabs.org/toolname appropriately

Lighttpd fucks up redirects with https coming in - does not
respect X-Forwarded-Proto and just redirects it back to http.
While the actual fix is a bit hard, this fixes the most common
case of a link to a tool directly being typed in, and sadly
redirecting to https.

Bug: T66627
Change-Id: Ib140be8a066ba1081f544f033aebf3622cd74e17
---
M modules/dynamicproxy/files/urlproxy.lua
1 file changed, 21 insertions(+), 1 deletion(-)


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

diff --git a/modules/dynamicproxy/files/urlproxy.lua 
b/modules/dynamicproxy/files/urlproxy.lua
index 7c1da27..965aee6 100644
--- a/modules/dynamicproxy/files/urlproxy.lua
+++ b/modules/dynamicproxy/files/urlproxy.lua
@@ -23,7 +23,27 @@
 local captures = ngx.re.match(ngx.var.uri, "^/([^/]*)(/.*)?$")
 
 local prefix = captures[1]
-local rest = captures[2] or "/"
+local rest = captures[2] or nil
+
+if rest == nil then
+-- A bare /toolname without the ending slash!
+-- This causes lighttpd to fuck shit up and redirect to a
+-- slash bearing URL but always as http, even if you came in
+-- as https! So we silently strip some URLs of https, which
+-- IS REALLY BAD. Since other solutions seem terrible, we
+-- just redirect such things via lua to the slashed one
+-- so lighttpd will not try to do its stupid redirection
+-- This will still need to *not* happen for a certain set of URLs
+-- because tools.wmflabs.org does some more fucked up rewriting as well,
+-- and admin is served as /, so we have no clear way to do this.
+-- So, we won't do it if there's any query string at all, or if it is
+-- looking for robots.txt or favicon.ico. Not perfect, but close enough
+if ngx.var.query_string ~= nil or prefix == 'robots.txt' or prefix == 
'favicon.ico' then
+rest = '/'
+else
+return ngx.redirect(ngx.var.uri .. '/')
+end
+end
 local routes_arr = nil
 local route = nil
 

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

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

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


[MediaWiki-commits] [Gerrit] check-vars: Remove $wgRUstart (removed from MediaWiki) - change (mediawiki...code-utils)

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

Change subject: check-vars: Remove $wgRUstart (removed from MediaWiki)
..


check-vars: Remove $wgRUstart (removed from MediaWiki)

See 4b619eb7b in mediawiki-core.

Change-Id: I106d591cdaffbac8e61cca2298a0b60112fc4976
---
M check-vars.php
1 file changed, 0 insertions(+), 1 deletion(-)

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



diff --git a/check-vars.php b/check-vars.php
index 5f98705..65e3532 100755
--- a/check-vars.php
+++ b/check-vars.php
@@ -236,7 +236,6 @@
'$wgQueryPages', # QueryPage.php
'$wgRequest', # Setup.php
'$wgRequestTime', # WebStart.php
-   '$wgRUstart', # WebStart.php, for 
Profiler stuff
'$wgTitle', # index.php
'$wgUpdates', # updaters
'$wgUseEnotif', # Setup.php

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I106d591cdaffbac8e61cca2298a0b60112fc4976
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] check-vars: Remove $wgRUstart (removed from MediaWiki) - change (mediawiki...code-utils)

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

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

Change subject: check-vars: Remove $wgRUstart (removed from MediaWiki)
..

check-vars: Remove $wgRUstart (removed from MediaWiki)

See 4b619eb7b in mediawiki-core.

Change-Id: I106d591cdaffbac8e61cca2298a0b60112fc4976
---
M check-vars.php
1 file changed, 0 insertions(+), 1 deletion(-)


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

diff --git a/check-vars.php b/check-vars.php
index 5f98705..65e3532 100755
--- a/check-vars.php
+++ b/check-vars.php
@@ -236,7 +236,6 @@
'$wgQueryPages', # QueryPage.php
'$wgRequest', # Setup.php
'$wgRequestTime', # WebStart.php
-   '$wgRUstart', # WebStart.php, for 
Profiler stuff
'$wgTitle', # index.php
'$wgUpdates', # updaters
'$wgUseEnotif', # Setup.php

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I106d591cdaffbac8e61cca2298a0b60112fc4976
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/tools/code-utils
Gerrit-Branch: master
Gerrit-Owner: Krinkle 

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


[MediaWiki-commits] [Gerrit] Use /api/rest_v1/ entry point for VE, take two. - change (operations/mediawiki-config)

2015-04-24 Thread GWicke (Code Review)
GWicke has uploaded a new change for review.

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

Change subject: Use /api/rest_v1/ entry point for VE, take two.
..

Use /api/rest_v1/ entry point for VE, take two.

The first attempt had to be rolled back when we discovered that the text 
Varnishes decoded %2f to literal slashes, which broke RESTBase requests for 
subpages / titles containing slashes.

This was fixed in https://gerrit.wikimedia.org/r/#/c/206345/ 
by disabling the decoding for requests to /api/rest_v1/. Thi
patch re-applies I7ddf22d8c552473f848.

This reverts commit 58fe5c179ff08ae3760f91ca2b8145f4f6df72de.

Change-Id: If99be4cdf0fff900ef0f8a05d806448762bca27f
---
M wmf-config/CommonSettings-labs.php
M wmf-config/CommonSettings.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 9873c86..55f86fc 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -104,7 +104,7 @@
// so use a hook
$wgExtensionFunctions[] = function () {
global $wgServerName, $wgVisualEditorRestbaseURL;
-   $wgVisualEditorRestbaseURL = 
"https://restbase-beta.wmflabs.org/$wgServerName/v1/page/html/";;
+   $wgVisualEditorRestbaseURL = 
"https://$wgServerName/api/rest_v1/page/html/";;
};
}
 }
diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index f5727ff..18efed9 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -2046,7 +2046,7 @@
// so use a hook
$wgExtensionFunctions[] = function () {
global $wgServerName, $wgVisualEditorRestbaseURL;
-   $wgVisualEditorRestbaseURL = 
"https://rest.wikimedia.org/$wgServerName/v1/page/html/";;
+   $wgVisualEditorRestbaseURL = 
"https://$wgServerName/api/rest_v1/page/html/";;
};
}
 

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

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

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


[MediaWiki-commits] [Gerrit] Don't use the stored uri from parsoid config - change (mediawiki...parsoid)

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

Change subject: Don't use the stored uri from parsoid config
..


Don't use the stored uri from parsoid config

 * The parsoid config is used across requests and storing anything there
   is setting yourself up for race conditions.

 * This was causing major corruption on wiki.

 * The refactor in 915ea3f6632c6e1cf63cfd0ee5c93f5eca1c2bdd went from
   using a bound copy of the uri to that stored on the parsoid config,
   causing some concurrent requests to use the wrong API.

Change-Id: Ia2244b9737fee1563ca3a33ba3b8683862b39d24
---
M lib/mediawiki.parser.environment.js
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index c3598a5..c41d317 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -278,11 +278,11 @@
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
 
-   var getConfigPromise;
+   var getConfigPromise, uri;
if (!prefix) {
getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
} else {
-   var uri = parsoid.interwikiMap.get(prefix);
+   uri = parsoid.interwikiMap.get(prefix);
if (!uri) {
// SSS: Ugh! Looks like parser tests use a prefix
// that is not part of the interwikiMap -- so we
@@ -318,7 +318,7 @@
 
return getConfigPromise.then(function(resultConf) {
if (resultConf === nothingToDo) { return; }
-   env.conf.wiki = new WikiConfig(env, resultConf, prefix, 
parsoid.apiURI,
+   env.conf.wiki = new WikiConfig(env, resultConf, prefix, uri,
env.getAPIProxy(prefix));
env.confCache[prefix] = env.conf.wiki;
}).nodify(cb);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2244b9737fee1563ca3a33ba3b8683862b39d24
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Made wfReadOnlyReason catch DB connection errors - change (mediawiki/core)

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

Change subject: Made wfReadOnlyReason catch DB connection errors
..


Made wfReadOnlyReason catch DB connection errors

Change-Id: I4e960d9bd751b2a6f95f08861fc8ed360af4a04a
---
M includes/GlobalFunctions.php
1 file changed, 7 insertions(+), 2 deletions(-)

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



diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 0287798..cefa375 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1346,9 +1346,14 @@
}
// Callers use this method to be aware that data presented to a 
user
// may be very stale and thus allowing submissions can be 
problematic.
-   if ( $wgReadOnly === false && wfGetLB()->getLaggedSlaveMode() ) 
{
+   try {
+   if ( $wgReadOnly === false && 
wfGetLB()->getLaggedSlaveMode() ) {
+   $wgReadOnly = 'The database has been 
automatically locked ' .
+   'while the slave database servers catch 
up to the master';
+   }
+   } catch ( DBConnectionError $e ) {
$wgReadOnly = 'The database has been automatically 
locked ' .
-   'while the slave database servers catch up to 
the master';
+   'until the slave database servers become 
available';
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e960d9bd751b2a6f95f08861fc8ed360af4a04a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] qunit: Remove mwlogenv feature - change (mediawiki/core)

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

Change subject: qunit: Remove mwlogenv feature
..


qunit: Remove mwlogenv feature

I added this in the JSTesting branch back in SVN (r107521, merged in
r107919 for MediaWiki 1.19.0).

It was mostly for debugging the setup/teardown in the branch. It never
had much practical use.

Change-Id: I8d6eb9e06ad070c23cb9c9041b5cf4143ee6ac0b
---
M tests/qunit/data/testrunner.js
1 file changed, 1 insertion(+), 14 deletions(-)

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



diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index 3dd2af6..7c3d699 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -165,13 +165,6 @@
}
 
/**
-* Test environment recommended for all QUnit test modules
-*
-* Whether to log environment changes to the console
-*/
-   QUnit.config.urlConfig.push( 'mwlogenv' );
-
-   /**
 * Reset mw.config and others to a fresh copy of the live config for 
each test(),
 * and restore it back to the live one afterwards.
 * @param localEnv {Object} [optional]
@@ -179,7 +172,7 @@
 * 
 */
QUnit.newMwEnvironment = ( function () {
-   var warn, error, log, liveConfig, liveMessages,
+   var warn, error, liveConfig, liveMessages,
ajaxRequests = [];
 
liveConfig = mw.config.values;
@@ -230,8 +223,6 @@
ajaxRequests.push( { xhr: jqXHR, options: ajaxOptions } 
);
}
 
-   log = QUnit.urlParams.mwlogenv ? mw.log : function () {};
-
return function ( localEnv ) {
localEnv = $.extend( {
// QUnit
@@ -244,8 +235,6 @@
 
return {
setup: function () {
-   log( 'MwEnvironment> SETUPfor "' + 
QUnit.config.current.module
-   + ': ' + 
QUnit.config.current.testName + '"' );
 
// Greetings, mock environment!
mw.config.values = freshConfigCopy( 
localEnv.config );
@@ -261,8 +250,6 @@
 
teardown: function () {
var timers, active;
-   log( 'MwEnvironment> TEARDOWN for "' + 
QUnit.config.current.module
-   + ': ' + 
QUnit.config.current.testName + '"' );
 
localEnv.teardown.call( this );
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8d6eb9e06ad070c23cb9c9041b5cf4143ee6ac0b
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Chad 
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 getDataValueDeserializer, since WD Quality needs this in... - change (mediawiki...Wikibase)

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

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

Change subject: Add getDataValueDeserializer, since WD Quality needs this info 
as well
..

Add getDataValueDeserializer, since WD Quality needs this info as well

Change-Id: Ib65c645daa04308e43f431f843e64f4ef867c0e4
---
M repo/includes/WikibaseRepo.php
1 file changed, 19 insertions(+), 12 deletions(-)


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

diff --git a/repo/includes/WikibaseRepo.php b/repo/includes/WikibaseRepo.php
index 98bd5e7..0c7198b 100644
--- a/repo/includes/WikibaseRepo.php
+++ b/repo/includes/WikibaseRepo.php
@@ -882,23 +882,30 @@
 */
protected function getInternalDeserializerFactory() {
return new DeserializerFactory(
-   new DataValueDeserializer( array(
-   'boolean' => 'DataValues\BooleanValue',
-   'number' => 'DataValues\NumberValue',
-   'string' => 'DataValues\StringValue',
-   'unknown' => 'DataValues\UnknownValue',
-   'globecoordinate' => 
'DataValues\Geo\Values\GlobeCoordinateValue',
-   'monolingualtext' => 
'DataValues\MonolingualTextValue',
-   'multilingualtext' => 
'DataValues\MultilingualTextValue',
-   'quantity' => 'DataValues\QuantityValue',
-   'time' => 'DataValues\TimeValue',
-   'wikibase-entityid' => 
'Wikibase\DataModel\Entity\EntityIdValue',
-   ) ),
+   $this->getDataValueDeserializer(),
$this->getEntityIdParser()
);
}
 
/**
+* @return Deserializer
+*/
+   public function getDataValueDeserializer() {
+   return new DataValueDeserializer( array(
+   'boolean' => 'DataValues\BooleanValue',
+   'number' => 'DataValues\NumberValue',
+   'string' => 'DataValues\StringValue',
+   'unknown' => 'DataValues\UnknownValue',
+   'globecoordinate' => 
'DataValues\Geo\Values\GlobeCoordinateValue',
+   'monolingualtext' => 'DataValues\MonolingualTextValue',
+   'multilingualtext' => 
'DataValues\MultilingualTextValue',
+   'quantity' => 'DataValues\QuantityValue',
+   'time' => 'DataValues\TimeValue',
+   'wikibase-entityid' => 
'Wikibase\DataModel\Entity\EntityIdValue',
+   ) );
+   }
+
+   /**
 * @return SerializerFactory
 */
protected function getInternalSerializerFactory() {

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

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

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


[MediaWiki-commits] [Gerrit] Some refactoring in JsonFileEntityLookup - change (mediawiki...WikidataQuality)

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

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

Change subject: Some refactoring in JsonFileEntityLookup
..

Some refactoring in JsonFileEntityLookup

Change-Id: I71416c1ca3feef6a59f04406dc00990eba68ccf9
---
M tests/phpunit/Helper/JsonFileEntityLookup.php
1 file changed, 44 insertions(+), 24 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/01/206501/1

diff --git a/tests/phpunit/Helper/JsonFileEntityLookup.php 
b/tests/phpunit/Helper/JsonFileEntityLookup.php
index f4afb48..ec99363 100644
--- a/tests/phpunit/Helper/JsonFileEntityLookup.php
+++ b/tests/phpunit/Helper/JsonFileEntityLookup.php
@@ -2,6 +2,8 @@
 
 namespace WikidataQuality\Tests\Helper;
 
+use Deserializers\Deserializer;
+use Wikibase\DataModel\Entity\EntityDocument;
 use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Lib\Store\EntityLookup;
 use Wikibase\DataModel\Entity\EntityId;
@@ -19,48 +21,66 @@
private $baseDir;
 
/**
+* @var Deserializer
+*/
+   private $entityDeserializer;
+
+   /**
 * @param string $baseDir
 */
-   public function __construct( $baseDir = __DIR__ ) {
+   public function __construct( $baseDir ) {
$this->baseDir = $baseDir;
+
+   $factory = new DeserializerFactory(
+   new DataValueDeserializer(
+   array (
+   'boolean' => 'DataValues\BooleanValue',
+   'number' => 'DataValues\NumberValue',
+   'string' => 'DataValues\StringValue',
+   'unknown' => 'DataValues\UnknownValue',
+   'globecoordinate' => 
'DataValues\GlobeCoordinateValue',
+   'monolingualtext' => 
'DataValues\MonolingualTextValue',
+   'multilingualtext' => 
'DataValues\MultilingualTextValue',
+   'quantity' => 
'DataValues\QuantityValue',
+   'time' => 'DataValues\TimeValue',
+   'wikibase-entityid' => 
'Wikibase\DataModel\Entity\EntityIdValue',
+   )
+   ),
+   WikibaseRepo::getDefaultInstance()->getEntityIdParser()
+   );
+
+   $this->entityDeserializer = 
WikibaseRepo::getDefaultInstance()-> $factory->newEntityDeserializer();
}
 
/**
 * Returns the entity with the provided id or null if there is no such 
entity.
 *
 * @param EntityId $entityId
+*
+* @return EntityDocument|null
 */
public function getEntity( EntityId $entityId ) {
-   if ( $this->hasEntity( $entityId ) ) {
-   $filePath = $this->buildFilePath( $entityId );
-   $serializedEntity = json_decode( file_get_contents( 
$filePath ), true );
-   if ( $serializedEntity ) {
-   $deserializerFactory = new DeserializerFactory(
-   new DataValueDeserializer(
-   array (
-   'boolean' => 
'DataValues\BooleanValue',
-   'number' => 
'DataValues\NumberValue',
-   'string' => 
'DataValues\StringValue',
-   'unknown' => 
'DataValues\UnknownValue',
-   'globecoordinate' => 
'DataValues\GlobeCoordinateValue',
-   'monolingualtext' => 
'DataValues\MonolingualTextValue',
-   'multilingualtext' => 
'DataValues\MultilingualTextValue',
-   'quantity' => 
'DataValues\QuantityValue',
-   'time' => 
'DataValues\TimeValue',
-   'wikibase-entityid' => 
'Wikibase\DataModel\Entity\EntityIdValue',
-   )
-   ),
-   
WikibaseRepo::getDefaultInstance()->getEntityIdParser()
-   );
-   return 
$deserializerFactory->newEntityDeserializer()->deserialize( $serializedEntity );
-   }
+   if ( !$this->hasEntity( $entityId ) ) {
+   return null;
}
+
+   $filePath = $this->buildFil

[MediaWiki-commits] [Gerrit] Use common Wikibase style for JSON indent - change (mediawiki...WikidataQuality)

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

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

Change subject: Use common Wikibase style for JSON indent
..

Use common Wikibase style for JSON indent

Change-Id: Id6f746ad32f2b161345e06905168d8375339fe28
---
M composer.json
1 file changed, 33 insertions(+), 33 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/99/206499/1

diff --git a/composer.json b/composer.json
index 2ebe70c..628ad99 100644
--- a/composer.json
+++ b/composer.json
@@ -1,35 +1,35 @@
 {
-  "name": "wikidataquality/wikidata-quality",
-  "type": "mediawiki-extension",
-  "description": "Extension for Wikibase to improve the data quality.",
-  "homepage": "https://www.mediawiki.org/wiki/WikidataQuality/";,
-  "license": "GPL-2.0+",
-  "authors": [
-{
-  "name": "BP2014N1"
-}
-  ],
-  "support": {
-"issues": "https://phabricator.wikimedia.org/project/profile/989/";
-  },
-  "require": {
-"php": ">=5.3.0",
-"wikibase/data-model": "~2.6",
-"wikibase/data-model-serialization": "~1.3",
-"serialization/serialization": "3.*,>=3.2.1"
-  },
-  "require-dev": {
-"phpunit/phpunit": "~4.5",
-"satooshi/php-coveralls": "dev-master"
-  },
-  "autoload": {
-"psr-4": {
-  "WikidataQuality\\": "includes/",
-  "WikidataQuality\\Specials\\": "specials/",
-  "WikidataQuality\\Tests\\": "tests/phpunit/"
-},
-"classmap": [
-  "WikidataQualityHooks.php"
-]
-  }
+   "name": "wikidataquality/wikidata-quality",
+   "type": "mediawiki-extension",
+   "description": "Extension for Wikibase to improve the data quality.",
+   "homepage": "https://www.mediawiki.org/wiki/WikidataQuality/";,
+   "license": "GPL-2.0+",
+   "authors": [
+   {
+   "name": "BP2014N1"
+   }
+   ],
+   "support": {
+   "issues": 
"https://phabricator.wikimedia.org/project/profile/989/";
+   },
+   "require": {
+   "php": ">=5.3.0",
+   "wikibase/data-model": "~2.6",
+   "wikibase/data-model-serialization": "~1.3",
+   "serialization/serialization": "3.*,>=3.2.1"
+   },
+   "require-dev": {
+   "phpunit/phpunit": "~4.5",
+   "satooshi/php-coveralls": "dev-master"
+   },
+   "autoload": {
+   "psr-4": {
+   "WikidataQuality\\": "includes/",
+   "WikidataQuality\\Specials\\": "specials/",
+   "WikidataQuality\\Tests\\": "tests/phpunit/"
+   },
+   "classmap": [
+   "WikidataQualityHooks.php"
+   ]
+   }
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6f746ad32f2b161345e06905168d8375339fe28
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
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] Do not use deprecated PHPUnit strict flag - change (mediawiki...WikidataQuality)

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

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

Change subject: Do not use deprecated PHPUnit strict flag
..

Do not use deprecated PHPUnit strict flag

PHPUnit 4 has specific strictness flags for various things

This also forces one to use @uses tags, which in a lot of cases
is a lot more hassle than it is worth.

Change-Id: I0c2aaa09688adda8d14b742b9bd2314bac52cd65
---
M phpunit.xml.dist
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikidataQuality 
refs/changes/98/206498/1

diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 3c5a87a..582bb0b 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -11,7 +11,6 @@
  timeoutForSmallTests="10"
  timeoutForMediumTests="30"
  timeoutForLargeTests="60"
- strict="true"
  verbose="true">
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c2aaa09688adda8d14b742b9bd2314bac52cd65
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
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] Make DB setup work for installs using a table prefix - change (mediawiki...WikidataQuality)

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

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

Change subject: Make DB setup work for installs using a table prefix
..

Make DB setup work for installs using a table prefix

Change-Id: I3b13fea7400140e86808e92f66bbb03e706bc00b
---
M sql/create_wdqa_evaluation.sql
M sql/create_wdqa_violations.sql
2 files changed, 6 insertions(+), 6 deletions(-)


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

diff --git a/sql/create_wdqa_evaluation.sql b/sql/create_wdqa_evaluation.sql
index 9c06916..dd61b33 100644
--- a/sql/create_wdqa_evaluation.sql
+++ b/sql/create_wdqa_evaluation.sql
@@ -1,7 +1,7 @@
-   CREATE TABLE IF NOT EXISTS wdqa_evaluation (
+   CREATE TABLE IF NOT EXISTS /*_*/wdqa_evaluation (
  special_page_id   int   NOT 
NULL,
  entity_id VARCHAR(15)   NOT 
NULL,
  insertion_timestamp   int   NOT 
NULL,
  reference_timestamp   int   
DEFAULT NULL,
  result_string TEXT  
DEFAULT NULL
-   );
\ No newline at end of file
+   ) /*$wgDBTableOptions*/;
\ No newline at end of file
diff --git a/sql/create_wdqa_violations.sql b/sql/create_wdqa_violations.sql
index 40bed1a..e5c29e7 100644
--- a/sql/create_wdqa_violations.sql
+++ b/sql/create_wdqa_violations.sql
@@ -1,4 +1,4 @@
-CREATE TABLE IF NOT EXISTS wdqa_violations (
+CREATE TABLE IF NOT EXISTS /*_*/wdqa_violations (
   entity_id VARBINARY(15) NOT NULL,
   pid   VARBINARY(15) NOT NULL,
   claim_guidVARBINARY(63) NOT NULL,
@@ -9,7 +9,7 @@
   revision_id   INT(10) UNSIGNED  NOT NULL,
   statusVARBINARY(31) NOT NULL,
   PRIMARY KEY (claim_guid, constraint_id)
-);
+) /*$wgDBTableOptions*/;
 
-CREATE INDEX claim_guid ON wdqa_violations (claim_guid);
-CREATE INDEX constraint_id ON wdqa_violations (constraint_id);
\ No newline at end of file
+CREATE INDEX /*i*/claim_guid ON /*_*/wdqa_violations (claim_guid);
+CREATE INDEX /*i*/constraint_id ON /*_*/wdqa_violations (constraint_id);
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3b13fea7400140e86808e92f66bbb03e706bc00b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
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] qunit: Remove mwlogenv feature - change (mediawiki/core)

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

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

Change subject: qunit: Remove mwlogenv feature
..

qunit: Remove mwlogenv feature

I added this in JSTesting branch back in SVN (merged in 1.19.0)
but was mostly for debugging the setup/teardown. It doesn't really
have any practical use at this point.

Change-Id: I8d6eb9e06ad070c23cb9c9041b5cf4143ee6ac0b
---
M tests/qunit/data/testrunner.js
1 file changed, 1 insertion(+), 14 deletions(-)


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

diff --git a/tests/qunit/data/testrunner.js b/tests/qunit/data/testrunner.js
index 3dd2af6..7c3d699 100644
--- a/tests/qunit/data/testrunner.js
+++ b/tests/qunit/data/testrunner.js
@@ -165,13 +165,6 @@
}
 
/**
-* Test environment recommended for all QUnit test modules
-*
-* Whether to log environment changes to the console
-*/
-   QUnit.config.urlConfig.push( 'mwlogenv' );
-
-   /**
 * Reset mw.config and others to a fresh copy of the live config for 
each test(),
 * and restore it back to the live one afterwards.
 * @param localEnv {Object} [optional]
@@ -179,7 +172,7 @@
 * 
 */
QUnit.newMwEnvironment = ( function () {
-   var warn, error, log, liveConfig, liveMessages,
+   var warn, error, liveConfig, liveMessages,
ajaxRequests = [];
 
liveConfig = mw.config.values;
@@ -230,8 +223,6 @@
ajaxRequests.push( { xhr: jqXHR, options: ajaxOptions } 
);
}
 
-   log = QUnit.urlParams.mwlogenv ? mw.log : function () {};
-
return function ( localEnv ) {
localEnv = $.extend( {
// QUnit
@@ -244,8 +235,6 @@
 
return {
setup: function () {
-   log( 'MwEnvironment> SETUPfor "' + 
QUnit.config.current.module
-   + ': ' + 
QUnit.config.current.testName + '"' );
 
// Greetings, mock environment!
mw.config.values = freshConfigCopy( 
localEnv.config );
@@ -261,8 +250,6 @@
 
teardown: function () {
var timers, active;
-   log( 'MwEnvironment> TEARDOWN for "' + 
QUnit.config.current.module
-   + ': ' + 
QUnit.config.current.testName + '"' );
 
localEnv.teardown.call( this );
 

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

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

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


[MediaWiki-commits] [Gerrit] WIP: Add target=>mobile to some reviewed RL modules - change (mediawiki/core)

2015-04-24 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: WIP: Add target=>mobile to some reviewed RL modules
..

WIP: Add target=>mobile to some reviewed RL modules

These should all probably be available to the mobile site. Code is lean,
and seems to work okay there.

I would like to talk about jquery.validate more on the bug report however

Bug: T97202
Change-Id: I68ea3a7d4cac8246dbc02423e0287bc98710d8b1
---
M resources/Resources.php
1 file changed, 7 insertions(+), 0 deletions(-)


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

diff --git a/resources/Resources.php b/resources/Resources.php
index e2f05b6..a302a2b 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -153,6 +153,7 @@
'jquery.arrowSteps' => array(
'scripts' => 'resources/src/jquery/jquery.arrowSteps.js',
'styles' => 'resources/src/jquery/jquery.arrowSteps.css',
+   'targets' => array( 'mobile', 'desktop' ),
),
'jquery.async' => array(
'scripts' => 'resources/lib/jquery/jquery.async.js',
@@ -319,6 +320,7 @@
),
'jquery.validate' => array(
'scripts' => 'resources/lib/jquery/jquery.validate.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
'jquery.xmldom' => array(
'scripts' => 'resources/lib/jquery/jquery.xmldom.js',
@@ -329,6 +331,7 @@
'jquery.tipsy' => array(
'scripts' => 'resources/src/jquery.tipsy/jquery.tipsy.js',
'styles' => 'resources/src/jquery.tipsy/jquery.tipsy.css',
+   'targets' => array( 'desktop', 'mobile' ),
),
 
/* jQuery UI */
@@ -816,6 +819,7 @@
'mediawiki.api',
'mediawiki.Title',
),
+   'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.api.edit' => array(
'scripts' => 
'resources/src/mediawiki.api/mediawiki.api.edit.js',
@@ -838,6 +842,7 @@
'mediawiki.api.parse' => array(
'scripts' => 
'resources/src/mediawiki.api/mediawiki.api.parse.js',
'dependencies' => 'mediawiki.api',
+   'targets' => array( 'desktop', 'mobile' ),
),
'mediawiki.api.watch' => array(
'scripts' => 
'resources/src/mediawiki.api/mediawiki.api.watch.js',
@@ -908,6 +913,7 @@
'feedback-thanks-title',
'feedback-useragent'
),
+   'targets' => array( 'desktop', 'mobile' ),
),
 
'mediawiki.filewarning' => array(
@@ -1294,6 +1300,7 @@
 
'mediawiki.libs.jpegmeta' => array(
'scripts' => 
'resources/src/mediawiki.libs/mediawiki.libs.jpegmeta.js',
+   'targets' => array( 'desktop', 'mobile' ),
),
 
/* MediaWiki Page */

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

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

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


[MediaWiki-commits] [Gerrit] Split long lines in README - change (mediawiki...WikidataQuality)

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

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

Change subject: Split long lines in README
..

Split long lines in README

Change-Id: I73d7d29822a5e64f79f8231b11d0ac5925d0129f
---
M README.md
1 file changed, 6 insertions(+), 3 deletions(-)


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

diff --git a/README.md b/README.md
index 1efbc27..572b954 100644
--- a/README.md
+++ b/README.md
@@ -1,7 +1,8 @@
 # WikidataQuality  [![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQuality)
  [![Coverage 
Status](https://coveralls.io/repos/wikimedia/mediawiki-extensions-WikidataQuality/badge.svg)](https://coveralls.io/r/wikimedia/mediawiki-extensions-WikidataQuality)
  [![Scrutinizer Code 
Quality](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/wikimedia/mediawiki-extensions-WikidataQuality/?branch=master)
 
 This is the base extension for our Wikidata Quality extensions.  
-To add functionality you need to install at least one Wikidata Quality 
extension (see [list of extensions 
below](https://github.com/wikimedia/mediawiki-extensions-WikidataQuality#wikidata-quality-extensions)).
+To add functionality you need to install at least one Wikidata Quality 
extension
+(see [list of extensions 
below](https://github.com/wikimedia/mediawiki-extensions-WikidataQuality#wikidata-quality-extensions)).
 
 ## Installation
 
@@ -15,6 +16,8 @@
 
 ## Wikidata Quality extensions
 
-[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints)
 
[WikidataQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityConstraints)
+[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityConstraints)
+[WikidataQualityConstraints](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityConstraints)
 
-[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation)
 
[WikidataQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation)
\ No newline at end of file
+[![Build 
Status](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation.svg?branch=master)](https://travis-ci.org/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation)
+[WikidataQualityExternalValidation](https://github.com/wikimedia/mediawiki-extensions-WikidataQualityExternalValidation)
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I73d7d29822a5e64f79f8231b11d0ac5925d0129f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikidataQuality
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] WIP: Commence introducing templating to UploadWizard - change (mediawiki...UploadWizard)

2015-04-24 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: WIP: Commence introducing templating to UploadWizard
..

WIP: Commence introducing templating to UploadWizard

I want to do work on UploadWizard but the code needs lots of love.

I think templating is a cheap way to clean this up and make it much more
readable and maintable. I've commenced it here starting with lots of smaller
templates which I hope over time can be grown into big templates and then into
oojs ui components.

Will split this patch into smaller ones when I've worked out what's going on.

TODO:
* Continue refactoring resources/mw.UploadWizardDetails.js
* Remove partials that don't need to be partials (are not reused outside file)

Dependency: Ic752f52669dbffa21c4a514509c3ea1da8ac5d9c
Bug: T96520
Change-Id: I8f2e382498344ccee3dee6c98408ef984d6a1378
---
M UploadWizardHooks.php
M resources/jquery/jquery.removeCtrl.js
M resources/jquery/jquery.showThumbCtrl.js
M resources/mw.ErrorDialog.js
M resources/mw.GroupProgressBar.js
M resources/mw.LanguageUpWiz.js
M resources/mw.UploadWizard.js
M resources/mw.UploadWizardDeed.js
M resources/mw.UploadWizardDescription.js
M resources/mw.UploadWizardDetails.js
M resources/mw.UploadWizardUploadInterface.js
A resources/templates/categories.mustache
A resources/templates/control.mustache
A resources/templates/deedInterface.mustache
A resources/templates/description.mustache
A resources/templates/descriptionAdder.mustache
A resources/templates/details.mustache
A resources/templates/detailsForm.mustache
A resources/templates/dialog.mustache
A resources/templates/error.mustache
A resources/templates/fieldNameDiv.mustache
A resources/templates/form.mustache
A resources/templates/languageMenu.mustache
A resources/templates/progressBar.mustache
A resources/templates/textInput.mustache
A resources/templates/textarea.mustache
A resources/templates/thirdPartyDiv.mustache
A resources/templates/thirdPartyLicense.mustache
A resources/templates/titleContainerDiv.mustache
A resources/templates/uploadInterface.mustache
30 files changed, 342 insertions(+), 279 deletions(-)


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

diff --git a/UploadWizardHooks.php b/UploadWizardHooks.php
index b7c5bde..0b03ba0 100644
--- a/UploadWizardHooks.php
+++ b/UploadWizardHooks.php
@@ -13,8 +13,33 @@
),
),
 
+   'ext.uploadWizard.templates' => array(
+   'templates' => array(
+   'titleContainerDiv.mustache' => 
'resources/templates/titleContainerDiv.mustache',
+   'detailsForm.mustache' => 
'resources/templates/detailsForm.mustache',
+   'descriptionAdder.mustache' => 
'resources/templates/descriptionAdder.mustache',
+   'details.mustache' => 
'resources/templates/details.mustache',
+   'control.mustache' => 
'resources/templates/control.mustache',
+   'uploadInterface.mustache' => 
'resources/templates/uploadInterface.mustache',
+   'description.mustache' => 
'resources/templates/description.mustache',
+   'progressBar.mustache' => 
'resources/templates/progressBar.mustache',
+   'deedInterface.mustache' => 
'resources/templates/deedInterface.mustache',
+   'form.mustache' => 
'resources/templates/form.mustache',
+   'description.mustache' => 
'resources/templates/description.mustache',
+   'languageMenu.mustache' => 
'resources/templates/languageMenu.mustache',
+   'error.mustache' => 
'resources/templates/error.mustache',
+   'categories.mustache' => 
'resources/templates/categories.mustache',
+   'fieldNameDiv.mustache' => 
'resources/templates/fieldNameDiv.mustache',
+   'textarea.mustache' => 
'resources/templates/textarea.mustache',
+   'thirdPartyLicense.mustache' => 
'resources/templates/thirdPartyLicense.mustache',
+   'thirdPartyDiv.mustache' => 
'resources/templates/thirdPartyDiv.mustache',
+   'textInput.mustache' => 
'resources/templates/textInput.mustache',
+   ),
+   ),
+
'ext.uploadWizard' => array(
'dependencies' => array(
+   'ext.uploadWizard.templates',
'jquery.arrowSteps',
'jquery.checkboxShiftClick',
'jquery.client',
@@ -690,7 +715,7 @@
   

[MediaWiki-commits] [Gerrit] Add images and descriptions to link context items - change (mediawiki...VisualEditor)

2015-04-24 Thread Esanders (Code Review)
Esanders has uploaded a new change for review.

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

Change subject: Add images and descriptions to link context items
..

Add images and descriptions to link context items

Bug: T93695
Change-Id: Ieaa3ced06887f561085f892c6fb34de75a20ff88
---
M VisualEditor.php
M extension.json
M modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js
A modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css
4 files changed, 83 insertions(+), 3 deletions(-)


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

diff --git a/VisualEditor.php b/VisualEditor.php
index b71bc35..ff1f497 100644
--- a/VisualEditor.php
+++ b/VisualEditor.php
@@ -1133,6 +1133,7 @@

'modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js',
),
'styles' => array(
+   
'modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css',

'modules/ve-mw/ui/styles/widgets/ve.ui.MWLinkTargetInputWidget.css',

'modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css'
),
diff --git a/extension.json b/extension.json
index c5498f4..3a62c70 100644
--- a/extension.json
+++ b/extension.json
@@ -1158,6 +1158,7 @@

"modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js"
],
"styles": [
+   
"modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.css",

"modules/ve-mw/ui/styles/widgets/ve.ui.MWLinkTargetInputWidget.css",

"modules/ve-mw/ui/styles/widgets/ve.ui.MWInternalLinkMenuOptionWidget.css"
],
diff --git a/modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js 
b/modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js
index 2ca179f..357e673 100644
--- a/modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js
+++ b/modules/ve-mw/ui/contextitems/ve.ui.MWInternalLinkContextItem.js
@@ -46,17 +46,52 @@
  * @inheritdoc
  */
 ve.ui.MWInternalLinkContextItem.prototype.renderBody = function () {
-   var htmlDoc = 
this.context.getSurface().getModel().getDocument().getHtmlDocument(),
+   var $pageImage, $description,
+   usePageImages = mw.config.get( 'wgVisualEditor' ).usePageImages,
+   usePageDescriptions = mw.config.get( 'wgVisualEditor' 
).usePageDescriptions,
+   title = this.model.getAttribute( 'lookupTitle' ),
+   htmlDoc = 
this.context.getSurface().getModel().getDocument().getHtmlDocument(),
+   $wrapper = $( '' ),
$link = $( '' )
+   .addClass( 've-ui-mwInternalLinkContextItem-link' )
.text( this.getDescription() )
.attr( {
href: ve.resolveUrl( this.model.getHref(), 
htmlDoc ),
target: '_blank'
} );
-   this.$body.empty().append( $link );
 
// Style based on link cache information
-   ve.init.platform.linkCache.styleElement( this.model.getAttribute( 
'lookupTitle' ), $link );
+   ve.init.platform.linkCache.styleElement( title, $link );
+
+   if ( usePageImages ) {
+   $wrapper.addClass( 've-ui-mwInternalLinkContextItem-withImage' 
);
+   $pageImage = $( '' ).addClass( 
've-ui-mwInternalLinkContextItem-pageImage' );
+   $wrapper.append( $pageImage );
+   }
+
+   $wrapper.append( $link );
+
+   if ( usePageDescriptions ) {
+   $wrapper.addClass( 
've-ui-mwInternalLinkContextItem-withDescription' );
+   }
+
+   this.$body.empty().append( $wrapper );
+
+   if ( usePageImages || usePageDescriptions ) {
+   ve.init.platform.linkCache.get( title ).then( function ( 
linkData ) {
+   if ( usePageImages && linkData.imageUrl ) {
+   $pageImage
+   .addClass( 
've-ui-mwInternalLinkContextItem-hasImage' )
+   .css( 'background-image', 'url(' + 
linkData.imageUrl + ')' );
+   }
+   if ( usePageDescriptions && linkData.description ) {
+   $description = $( '' )
+   .addClass( 
've-ui-mwInternalLinkContextItem-description' )
+   .text( linkData.description );
+   $wrapper.append( $description );
+   }
+   } );
+   }
 };
 
 /* Registration */
diff --git 
a/modules/ve-mw/ui/styles/contextitems/ve.ui.MWInternalLinkContextItem.

[MediaWiki-commits] [Gerrit] Revert "tools: Faux enable https for lighttpd by default" - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Revert "tools: Faux enable https for lighttpd by default"
..


Revert "tools: Faux enable https for lighttpd by default"

Nope, this doesn't work. I saw a red herring - this actually
caused lighttpd to *not* start and then nginx did the redirect
properly and I just thought that was lighttpd doing it.

This reverts commit 3c76b40cdf5ecc6222e6d14089e2277ef8fca4fe.

Change-Id: I379c31ab7bd6825648597a1b2b4b0f74ec1e1592
---
M modules/toollabs/files/lighttpd-starter
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/toollabs/files/lighttpd-starter 
b/modules/toollabs/files/lighttpd-starter
index bf253db..4867097 100755
--- a/modules/toollabs/files/lighttpd-starter
+++ b/modules/toollabs/files/lighttpd-starter
@@ -64,7 +64,7 @@
 server.max-connections = 300
 server.stat-cache-engine = "fam"
 server.event-handler = "linux-sysepoll"
-ssl.engine = "enable" # Faux-enable, for 
https://phabricator.wikimedia.org/T66627
+ssl.engine = "disable"
 
 alias.url = ( "/$tool" => "$home/public_html/" )
 

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

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

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


[MediaWiki-commits] [Gerrit] Revert "tools: Faux enable https for lighttpd by default" - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Revert "tools: Faux enable https for lighttpd by default"
..

Revert "tools: Faux enable https for lighttpd by default"

Nope, this doesn't work. I saw a red herring - this actually
caused lighttpd to *not* start and then nginx did the redirect
properly and I just thought that was lighttpd doing it.

This reverts commit 3c76b40cdf5ecc6222e6d14089e2277ef8fca4fe.

Change-Id: I379c31ab7bd6825648597a1b2b4b0f74ec1e1592
---
M modules/toollabs/files/lighttpd-starter
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/modules/toollabs/files/lighttpd-starter 
b/modules/toollabs/files/lighttpd-starter
index bf253db..4867097 100755
--- a/modules/toollabs/files/lighttpd-starter
+++ b/modules/toollabs/files/lighttpd-starter
@@ -64,7 +64,7 @@
 server.max-connections = 300
 server.stat-cache-engine = "fam"
 server.event-handler = "linux-sysepoll"
-ssl.engine = "enable" # Faux-enable, for 
https://phabricator.wikimedia.org/T66627
+ssl.engine = "disable"
 
 alias.url = ( "/$tool" => "$home/public_html/" )
 

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

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

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


[MediaWiki-commits] [Gerrit] Improve Mustache Templating offering - change (mediawiki/core)

2015-04-24 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Improve Mustache Templating offering
..

Improve Mustache Templating offering

* Make render return a jQuery object to be consistent with the HTML parser
* Add template partial support.

Bug: T97188
Change-Id: Ic752f52669dbffa21c4a514509c3ea1da8ac5d9c
---
M resources/src/mediawiki/mediawiki.template.mustache.js
1 file changed, 16 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/90/206490/1

diff --git a/resources/src/mediawiki/mediawiki.template.mustache.js 
b/resources/src/mediawiki/mediawiki.template.mustache.js
index dcc3842..14ea456 100644
--- a/resources/src/mediawiki/mediawiki.template.mustache.js
+++ b/resources/src/mediawiki/mediawiki.template.mustache.js
@@ -4,8 +4,22 @@
mw.template.registerCompiler( 'mustache', {
compile: function ( src ) {
return {
-   render: function ( data ) {
-   return $.parseHTML( Mustache.render( 
src, data ) );
+   _getSource: function () {
+   return src;
+   },
+   /**
+* @ignore
+* @param {Object} data to render
+* @param {Object} partialTemplates mapping of 
partial names to templates
+*/
+   render: function ( data, partialTemplates ) {
+   var partials = {};
+   if ( partialTemplates ) {
+   $.each( partialTemplates, 
function ( name, template ) {
+   partials[name] = 
template._getSource();
+   } );
+   }
+   return $( $.parseHTML( Mustache.render( 
src, data, partials ) ) );
}
};
}

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

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

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


[MediaWiki-commits] [Gerrit] tools: Faux enable https for lighttpd by default - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: tools: Faux enable https for lighttpd by default
..


tools: Faux enable https for lighttpd by default

This makes lighttpd return protocol relative redirects
for https as well as http, rather than forcing everything
to https. This means that hitting https://tools.wmflabs.org/tool
will redirect to /tools/ instead of http://tools.wmflabs.org/tool/,
thus being protocol relative.

In an ideal world this wouldn't need to happen, and lighttpd would
just respect X-Forwarded-Proto from nginx, but alas.

Bug: T66627
Change-Id: Ie03c8075a0fb34dc4ca8cc17c76576bb2ae3e077
---
M modules/toollabs/files/lighttpd-starter
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/modules/toollabs/files/lighttpd-starter 
b/modules/toollabs/files/lighttpd-starter
index 4867097..bf253db 100755
--- a/modules/toollabs/files/lighttpd-starter
+++ b/modules/toollabs/files/lighttpd-starter
@@ -64,7 +64,7 @@
 server.max-connections = 300
 server.stat-cache-engine = "fam"
 server.event-handler = "linux-sysepoll"
-ssl.engine = "disable"
+ssl.engine = "enable" # Faux-enable, for 
https://phabricator.wikimedia.org/T66627
 
 alias.url = ( "/$tool" => "$home/public_html/" )
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie03c8075a0fb34dc4ca8cc17c76576bb2ae3e077
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: coren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Chsnge hockey key - change (apps...wikipedia)

2015-04-24 Thread Fjalapeno (Code Review)
Fjalapeno has uploaded a new change for review.

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

Change subject: Chsnge hockey key
..

Chsnge hockey key

Change-Id: I97e9a2f726ce27ae4adaebe5830b194ca677eb53
---
M fastlane/lib/utils.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/89/206489/1

diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb
index f9f55ed..baff022 100644
--- a/fastlane/lib/utils.rb
+++ b/fastlane/lib/utils.rb
@@ -2,7 +2,7 @@
 
 require 'git'
 
-ENV['HOCKEY_API_TOKEN'] = 'c881c19fd8d0401682c4640b7948ef5e'
+ENV['HOCKEY_API_TOKEN'] = '03557690d9d44f39972d70b04980623c'
 
 # Returns true if the `NO_RESET` env var is set to 1
 def reset_disabled?

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97e9a2f726ce27ae4adaebe5830b194ca677eb53
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno 

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


[MediaWiki-commits] [Gerrit] tools: Faux enable https for lighttpd by default - change (operations/puppet)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: tools: Faux enable https for lighttpd by default
..

tools: Faux enable https for lighttpd by default

This makes lighttpd return protocol relative redirects
for https as well as http, rather than forcing everything
to https. This means that hitting https://tools.wmflabs.org/tool
will redirect to /tools/ instead of http://tools.wmflabs.org/tool/,
thus being protocol relative.

In an ideal world this wouldn't need to happen, and lighttpd would
just respect X-Forwarded-Proto from nginx, but alas.

Bug: T66627
Change-Id: Ie03c8075a0fb34dc4ca8cc17c76576bb2ae3e077
---
M modules/toollabs/files/lighttpd-starter
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/206488/1

diff --git a/modules/toollabs/files/lighttpd-starter 
b/modules/toollabs/files/lighttpd-starter
index 4867097..bf253db 100755
--- a/modules/toollabs/files/lighttpd-starter
+++ b/modules/toollabs/files/lighttpd-starter
@@ -64,7 +64,7 @@
 server.max-connections = 300
 server.stat-cache-engine = "fam"
 server.event-handler = "linux-sysepoll"
-ssl.engine = "disable"
+ssl.engine = "enable" # Faux-enable, for 
https://phabricator.wikimedia.org/T66627
 
 alias.url = ( "/$tool" => "$home/public_html/" )
 

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

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

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


[MediaWiki-commits] [Gerrit] Remove instances of env.conf.parsoid.apiURI - change (mediawiki...parsoid)

2015-04-24 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Remove instances of env.conf.parsoid.apiURI
..

Remove instances of env.conf.parsoid.apiURI

 * All these uses look like mistakes that should have been set on the
   wiki config, which has a apiURI field.

 * Also, freeze parsoid config to prevent further issues where it gets
   used across requests.

Change-Id: Ie1e357883c33202ba7f6df260de9149c17987e0c
---
M api/server.js
M lib/ext.core.ExtensionHandler.js
M lib/ext.core.TemplateHandler.js
M lib/mediawiki.parser.environment.js
4 files changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/87/206487/1

diff --git a/api/server.js b/api/server.js
index da70ec3..bdb77a7 100755
--- a/api/server.js
+++ b/api/server.js
@@ -25,6 +25,7 @@
 var path = require('path');
 var util = require('util');
 var fs = require('fs');
+var JSUtils = require('../lib/jsutils.js').JSUtils;
 
 // process arguments
 var opts = require( "yargs" )
@@ -100,6 +101,8 @@
logger, [ "fatal", "error", "warning", "info" ], parsoidConfig
 );
 
+JSUtils.deepFreeze(parsoidConfig);
+
 process.on('uncaughtException', function(err) {
logger.log('fatal', 'uncaught exception', err);
 });
diff --git a/lib/ext.core.ExtensionHandler.js b/lib/ext.core.ExtensionHandler.js
index fe1b2a3..dee7204 100644
--- a/lib/ext.core.ExtensionHandler.js
+++ b/lib/ext.core.ExtensionHandler.js
@@ -26,7 +26,7 @@
 
 ExtensionHandler.prototype.register = function() {
this.usePHPPreProcessor = this.env.conf.parsoid.usePHPPreProcessor &&
-   (this.env.conf.parsoid.apiURI !== null);
+   (this.env.conf.wiki.apiURI !== null);
 
// Native extension handlers
var nativeExts = this.env.conf.parsoid.nativeExtensions;
diff --git a/lib/ext.core.TemplateHandler.js b/lib/ext.core.TemplateHandler.js
index 5f733b9..2ab8616 100644
--- a/lib/ext.core.TemplateHandler.js
+++ b/lib/ext.core.TemplateHandler.js
@@ -109,8 +109,7 @@
this.convertAttribsToString(state, token.attribs, cb);
return;
}
-   if ( env.conf.parsoid.usePHPPreProcessor &&
-   env.conf.parsoid.apiURI !== null ) {
+   if (env.conf.parsoid.usePHPPreProcessor && env.conf.wiki.apiURI !== 
null) {
if ( this.options.wrapTemplates ) {
// Use MediaWiki's action=expandtemplates preprocessor
// We'll never get to frame depth beyond 1 in this 
scenario
diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index c41d317..206a0a0 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -294,7 +294,6 @@
prefix + '; defaulting to enwiki');
uri = parsoid.interwikiMap.get('enwiki');
}
-   parsoid.apiURI = uri;
 
if (env.confCache[prefix]) {
env.conf.wiki = env.confCache[prefix];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie1e357883c33202ba7f6df260de9149c17987e0c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] site.pp: add labcontrol1001 - change (operations/puppet)

2015-04-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: site.pp: add labcontrol1001
..

site.pp: add labcontrol1001

Bug:T96048
Change-Id: I9b409f47a14d453e3a9ba26e30ae63e36a9535de
---
M manifests/site.pp
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/86/206486/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 2abdbfd..89f7a26 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1178,6 +1178,13 @@
 backup::set {'home': }
 }
 
+node 'labcontrol1001.wikimedia.org' {
+$cluster = 'virt'
+
+include standard
+include base::firewall
+}
+
 node 'labcontrol2001.wikimedia.org' {
 $cluster   = 'virt'
 $ganglia_aggregator= true

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

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

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


[MediaWiki-commits] [Gerrit] Don't show the individual citation templates in the cite menu - change (mediawiki...Citoid)

2015-04-24 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Don't show the individual citation templates in the cite menu
..

Don't show the individual citation templates in the cite menu

Bug: T96946 (sort-of)
Change-Id: Idd52b05cd47c5676b5d9929fb2c6beaa88f19972
---
M modules/ve.ui.CiteFromIdInspectorTool.js
1 file changed, 0 insertions(+), 2 deletions(-)


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

diff --git a/modules/ve.ui.CiteFromIdInspectorTool.js 
b/modules/ve.ui.CiteFromIdInspectorTool.js
index b91f3a2..5a61aa0 100644
--- a/modules/ve.ui.CiteFromIdInspectorTool.js
+++ b/modules/ve.ui.CiteFromIdInspectorTool.js
@@ -31,8 +31,6 @@
originalDefinition.include = [ 'citefromidagain', 'reference', 
'reference/existing' ];
originalDefinition.promote = [ 'citefromidagain' ];
 
-   console.log(originalDefinition);
-
// HACK: Replace the previous cite group to represent citoid and the
// dropdown menu for cite tools.
ve.init.mw.Target.static.toolbarGroups[ citeIndex ] = {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd52b05cd47c5676b5d9929fb2c6beaa88f19972
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Citoid
Gerrit-Branch: master
Gerrit-Owner: Jforrester 

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


[MediaWiki-commits] [Gerrit] Put the Citoid tool in the menu as well as the toolbar - change (mediawiki...Citoid)

2015-04-24 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Put the Citoid tool in the menu as well as the toolbar
..

Put the Citoid tool in the menu as well as the toolbar

Bug: T96118
Change-Id: I7798a38977ffe1563a1810d43ae0aa914bb31ad8
---
M Citoid.php
M extension.json
M i18n/en.json
M i18n/qqq.json
M modules/ve.ui.CiteFromIdInspectorTool.js
5 files changed, 35 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Citoid 
refs/changes/84/206484/1

diff --git a/Citoid.php b/Citoid.php
index 384f928..4ef0cab 100644
--- a/Citoid.php
+++ b/Citoid.php
@@ -62,6 +62,7 @@
'citoid-citeFromIDDialog-use-general-dialog-button',
'citoid-citeFromIDDialog-use-general-dialog-message',
'citoid-citeFromIDDialog-use-general-error-message',
+   'citoid-citeFromIDTool-longertitle',
'citoid-citeFromIDTool-title',
'citoid-template-type-map.json',
'citoid-typeMap-config-error',
diff --git a/extension.json b/extension.json
index f186afd..5b0acac 100644
--- a/extension.json
+++ b/extension.json
@@ -22,7 +22,8 @@
"modules/ve.ui.CiteFromIdInspectorTool.js",
"modules/ve.ui.CiteFromIdGroupWidget.js",
"modules/ve.ui.CiteFromIdReferenceWidget.js",
-   "modules/ve.ui.CiteFromIdInspector.js"
+   "modules/ve.ui.CiteFromIdInspector.js",
+   "modules/ve.ui.CitoidAction.js"
],
"styles": [
"modules/ve.ui.CiteFromIdInspector.css"
@@ -34,6 +35,7 @@
],
"messages": [
"citoid-520-error",
+   "citoid-citation-widget-insert-button",
"citoid-citeFromIDDialog-back",
"citoid-citeFromIDDialog-lookup-button",
"citoid-citeFromIDDialog-search",
@@ -41,7 +43,10 @@
"citoid-citeFromIDDialog-search-placeholder",
"citoid-citeFromIDDialog-search-progress",
"citoid-citeFromIDDialog-title",
+   
"citoid-citeFromIDDialog-use-general-dialog-button",
+   
"citoid-citeFromIDDialog-use-general-dialog-message",

"citoid-citeFromIDDialog-use-general-error-message",
+   "citoid-citeFromIDTool-longertitle",
"citoid-citeFromIDTool-title",
"citoid-template-type-map.json",
"citoid-typeMap-config-error",
diff --git a/i18n/en.json b/i18n/en.json
index 147942c..4a617c1 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -14,6 +14,7 @@
"citoid-citeFromIDDialog-use-general-dialog-button": "full citation 
dialog",
"citoid-citeFromIDDialog-use-general-dialog-message": "Or use the $1 to 
fill in the details yourself.",
"citoid-citeFromIDDialog-use-general-error-message": "We couldn't make 
a citation for you. You can make one by using the $1.",
+   "citoid-citeFromIDTool-longertitle": "Auto-fill cite",
"citoid-citeFromIDTool-title": "Cite",
"citoid-desc": "Provides access points between the citoid service and 
MediaWiki",
"citoid-typeMap-config-error": "Mediawiki:citoid-template-type-map.json 
is improperly configured.",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 1435d60..4b82182 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -19,6 +19,7 @@
"citoid-citeFromIDDialog-use-general-dialog-button": "Label for the 
user to click to use the full citation tool.",
"citoid-citeFromIDDialog-use-general-dialog-message": "Label for the 
user to use the full citation tool.\n* $1 – the link to open the citation 
dialog; link label: 
{{msg-mw|citoid-citeFromIDDialog-use-general-dialog-button}}",
"citoid-citeFromIDDialog-use-general-error-message": "Label notifying 
the user there was a problem creating their reference, and offering to use the 
full citation tool.\n* $1 – link to open the citation dialog; link label: 
{{msg-mw|citoid-citeFromIDDialog-use-general-dialog-button}}",
+   "citoid-citeFromIDTool-longertitle": "Label for the secondary button to 
add a citation in the toolbar's drop-down menu.",
"citoid-citeFromIDTool-title": "Label for the button to add a citation 
in the toolbar\n{{Identical|Cite}}",
"citoid-desc": 
"{{desc|name=Citoid|url=https://www.mediawiki.org/wiki/Citoid}}";,
"citoid-typeMap-config-error": "Error message indicating 
Mediawiki:citoid-template-

[MediaWiki-commits] [Gerrit] Don't retry if we're err'ing out - change (mediawiki...parsoid)

2015-04-24 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Don't retry if we're err'ing out
..

Don't retry if we're err'ing out

 * Maybe throwing here would be better.

Change-Id: Ifa4d2341c5b032dbf019b623f0f6b73c91469cf8
---
M lib/mediawiki.ApiRequest.js
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/83/206483/1

diff --git a/lib/mediawiki.ApiRequest.js b/lib/mediawiki.ApiRequest.js
index bb98d39..389261f 100644
--- a/lib/mediawiki.ApiRequest.js
+++ b/lib/mediawiki.ApiRequest.js
@@ -747,6 +747,7 @@
this.reqType = "Config Request";
 
if (!uri) {
+   this.retries = 0;
this._requestCB(new Error('There was no base URI for the API we 
tried to use.'));
return;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifa4d2341c5b032dbf019b623f0f6b73c91469cf8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] add comment - change (mediawiki...DonationInterface)

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

Change subject: add comment
..


add comment

Change-Id: I3dfef83fb46b888745bb10ee1aa1dcc8c82ba2ec
---
M gateway_common/WmfFramework.drupal.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/gateway_common/WmfFramework.drupal.php 
b/gateway_common/WmfFramework.drupal.php
index 4380212..9390970 100644
--- a/gateway_common/WmfFramework.drupal.php
+++ b/gateway_common/WmfFramework.drupal.php
@@ -1,5 +1,13 @@
 https://gerrit.wikimedia.org/r/190483
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I3dfef83fb46b888745bb10ee1aa1dcc8c82ba2ec
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Awight 
Gerrit-Reviewer: AndyRussG 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: Katie Horn 
Gerrit-Reviewer: Ssmith 
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 "please-translate" message - change (mediawiki...WikimediaMessages)

2015-04-24 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Add "please-translate" message
..

Add "please-translate" message

* Needs to be one sentence and fit a talk header as well.
* Must not be a lego message. This is the whole sentence,
  trailing punctuation is avoided so that one can e.g. add
  an explamation mark in header or colon/period elsewhere.

Bug: T93782
Change-Id: I17570cbc6d8fda3cd2aa87f93daad278739722f8
---
M i18n/temporary/en.json
M i18n/temporary/qqq.json
2 files changed, 4 insertions(+), 2 deletions(-)


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

diff --git a/i18n/temporary/en.json b/i18n/temporary/en.json
index 4253eb5..2b2ea52 100644
--- a/i18n/temporary/en.json
+++ b/i18n/temporary/en.json
@@ -4,5 +4,6 @@
 },
 "wikimediamessages-desc": "Wikimedia specific temporary messages",
 "bug-54847-password-reset-prompt": "Due to a [[meta:October 2013 private 
data security issue|privacy issue with the Wikimedia Labs databases]], your 
previously used password may be vulnerable. Please set a new, different, 
password to secure your account. We apologize for the inconvenience.",
-"password-recycled": "The password you have entered matches an old 
password associated with your account. Please set a new, different password."
+"password-recycled": "The password you have entered matches an old 
password associated with your account. Please set a new, different password.",
+"please-translate": "Please help translate to your language"
 }
\ No newline at end of file
diff --git a/i18n/temporary/qqq.json b/i18n/temporary/qqq.json
index 28bf5c6..4fc7512 100644
--- a/i18n/temporary/qqq.json
+++ b/i18n/temporary/qqq.json
@@ -7,5 +7,6 @@
},
"wikimediamessages-desc": "{{desc|name=Wikimedia Temporary Messages}}",
"bug-54847-password-reset-prompt": "Explanatory message shown on the 
password reset form to users who might have had their password leaked. Users 
might have been redirected to this form on login.",
-   "password-recycled": "Error message shown on password reset form when 
the user attempts to set their password to a previously-used value."
+   "password-recycled": "Error message shown on password reset form when 
the user attempts to set their password to a previously-used value.",
+   "please-translate": "Standalone sentence used as header or beginning of 
crosswiki custom invitations to translate."
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I17570cbc6d8fda3cd2aa87f93daad278739722f8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 

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


[MediaWiki-commits] [Gerrit] Factor out getConfigPromise() method. - change (mediawiki...parsoid)

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

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

Change subject: Factor out getConfigPromise() method.
..

Factor out getConfigPromise() method.

Use `Promise.method` to ensure that any synchronous exceptions thrown
(either intentionally or by programmer error) get turned into rejected
Promises.  This also lets us use synchronous return/throw in the body for
readability.  Using return/throw also makes the control flow clearer,
ensuring that future maintainers don't have to worry about multiple
assignment.

Change-Id: I4d7bf027b9cc09b24859f6cf9dae3290e6e2530f
---
M lib/mediawiki.parser.environment.js
1 file changed, 34 insertions(+), 34 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/81/206481/1

diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index c3598a5..067848c 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -278,45 +278,45 @@
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
 
-   var getConfigPromise;
-   if (!prefix) {
-   getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
-   } else {
-   var uri = parsoid.interwikiMap.get(prefix);
-   if (!uri) {
-   // SSS: Ugh! Looks like parser tests use a prefix
-   // that is not part of the interwikiMap -- so we
-   // cannot crash with an error.  Hence defaulting
-   // to enwiki api which is quite odd.  Does the
-   // interwikiMap need updating or is this use-case
-   // valid outside of parserTests??
-   env.log('error', 'Did not find api uri for ' +
-   prefix + '; defaulting to enwiki');
-   uri = parsoid.interwikiMap.get('enwiki');
-   }
-   parsoid.apiURI = uri;
-
-   if (env.confCache[prefix]) {
-   env.conf.wiki = env.confCache[prefix];
-   getConfigPromise = Promise.resolve(nothingToDo);
-   } else if (parsoid.fetchConfig) {
-   getConfigPromise = ConfigRequest
-   .promise(uri, env, env.getAPIProxy(prefix));
+   var getConfigPromise = Promise.method(function() {
+   if (!prefix) {
+   throw new Error('Wiki prefix not provided');
} else {
-   // Load the config from cached config on disk
-   var localConfigFile = './baseconfig/' + prefix + 
'.json';
-   var localConfig = require(localConfigFile);
-   if (localConfig && localConfig.query) {
-   getConfigPromise = 
Promise.resolve(localConfig.query);
+   var uri = parsoid.interwikiMap.get(prefix);
+   if (!uri) {
+   // SSS: Ugh! Looks like parser tests use a 
prefix
+   // that is not part of the interwikiMap -- so we
+   // cannot crash with an error.  Hence defaulting
+   // to enwiki api which is quite odd.  Does the
+   // interwikiMap need updating or is this 
use-case
+   // valid outside of parserTests??
+   env.log('error', 'Did not find api uri for ' +
+   prefix + '; defaulting to 
enwiki');
+   uri = parsoid.interwikiMap.get('enwiki');
+   }
+   parsoid.apiURI = uri;
+
+   if (env.confCache[prefix]) {
+   env.conf.wiki = env.confCache[prefix];
+   return nothingToDo;
+   } else if (parsoid.fetchConfig) {
+   return ConfigRequest
+   .promise(uri, env, 
env.getAPIProxy(prefix));
} else {
-   getConfigPromise = Promise.reject(
-   new Error('Could not read valid config 
from file: ' +
-localConfigFile));
+   // Load the config from cached config on disk
+   var localConfigFile = './baseconfig/' + prefix 
+ '.json';
+   var localConfig = require(localConfigFile);
+   if (localConfig && localConfig.query) {
+   return localConfig.query;
+   } else {
+ 

[MediaWiki-commits] [Gerrit] Enable RandomRootPage everywhere - change (operations/mediawiki-config)

2015-04-24 Thread Nemo bis (Code Review)
Nemo bis has uploaded a new change for review.

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

Change subject: Enable RandomRootPage everywhere
..

Enable RandomRootPage everywhere

e2e2e3ea206f4786aacc23ff51c32d181a17edb3 just enabled it on some
huge wikis and no kittens were killed in the process.

Bug: T18655
Change-Id: I3431d8ee02af57b9e3de24c8157e3de33df70e6e
---
M wmf-config/InitialiseSettings.php
1 file changed, 1 insertion(+), 2 deletions(-)


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index afdff82..0b37f54 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14061,8 +14061,7 @@
 ),
 
 'wmgEnableRandomRootPage' => array(
-   'default' => true,
-   'wikipedia' => false,
+   'default' => true, // T18655
 ),
 'wmgUseGettingStarted' => array(
'default' => false,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3431d8ee02af57b9e3de24c8157e3de33df70e6e
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Nemo bis 

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


[MediaWiki-commits] [Gerrit] parsoid: add role::parsoid::prod to codfw nodes - change (operations/puppet)

2015-04-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: parsoid: add role::parsoid::prod to codfw nodes
..

parsoid: add role::parsoid::prod to codfw nodes

Bug:T90271
Change-Id: I55ed19856c5a2cff2ef373274c6c5ba619a35935
---
M manifests/site.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/79/206479/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 1156c0e..7360d63 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2420,7 +2420,7 @@
 
 node /^wtp20(0[1-9]|1[0-9]|2[0-4])\.eqiad\.wmnet$/ {
 
-include standard
+role parsoid::production
 }
 
 node 'ytterbium.wikimedia.org' {

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

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

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


[MediaWiki-commits] [Gerrit] Readability cleanup - change (mediawiki...parsoid)

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

Change subject: Readability cleanup
..


Readability cleanup

 * Suggested while debugging.

Change-Id: I2794fe6941ff8be899c732d11d6ee9724270ef36
---
M lib/mediawiki.parser.environment.js
1 file changed, 14 insertions(+), 12 deletions(-)

Approvals:
  Subramanya Sastry: Looks good to me, approved
  GWicke: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index 274f71e..c3598a5 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -277,11 +277,11 @@
var env = this;
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
-   return new Promise(function(resolve, reject) {
-   if (!prefix) {
-   return reject(new Error('Wiki prefix not provided'));
-   }
 
+   var getConfigPromise;
+   if (!prefix) {
+   getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
+   } else {
var uri = parsoid.interwikiMap.get(prefix);
if (!uri) {
// SSS: Ugh! Looks like parser tests use a prefix
@@ -298,23 +298,25 @@
 
if (env.confCache[prefix]) {
env.conf.wiki = env.confCache[prefix];
-   return resolve(nothingToDo);
+   getConfigPromise = Promise.resolve(nothingToDo);
} else if (parsoid.fetchConfig) {
-   ConfigRequest
-   .promise(uri, env, env.getAPIProxy(prefix))
-   .then(resolve, reject);
+   getConfigPromise = ConfigRequest
+   .promise(uri, env, env.getAPIProxy(prefix));
} else {
// Load the config from cached config on disk
var localConfigFile = './baseconfig/' + prefix + 
'.json';
var localConfig = require(localConfigFile);
if (localConfig && localConfig.query) {
-   return resolve(localConfig.query);
+   getConfigPromise = 
Promise.resolve(localConfig.query);
} else {
-   return reject(new Error('Could not read valid 
config from' +
-   ' file: ' + localConfigFile));
+   getConfigPromise = Promise.reject(
+   new Error('Could not read valid config 
from file: ' +
+localConfigFile));
}
}
-   }).then(function(resultConf) {
+   }
+
+   return getConfigPromise.then(function(resultConf) {
if (resultConf === nothingToDo) { return; }
env.conf.wiki = new WikiConfig(env, resultConf, prefix, 
parsoid.apiURI,
env.getAPIProxy(prefix));

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2794fe6941ff8be899c732d11d6ee9724270ef36
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 
Gerrit-Reviewer: Arlolra 
Gerrit-Reviewer: Cscott 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Subramanya Sastry 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] add codfw wtp parsoid servers to site.pp - change (operations/puppet)

2015-04-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: add codfw wtp parsoid servers to site.pp
..

add codfw wtp parsoid servers to site.pp

Add the codfw wtp servers with just the standard role for now
to add them to puppet.

Bug:T90271
Change-Id: I0fb7b874f83c5aae1d6bb512240a93f8ca123baa
---
M manifests/site.pp
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/78/206478/1

diff --git a/manifests/site.pp b/manifests/site.pp
index 2abdbfd..1156c0e 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -2418,6 +2418,11 @@
 role parsoid::production
 }
 
+node /^wtp20(0[1-9]|1[0-9]|2[0-4])\.eqiad\.wmnet$/ {
+
+include standard
+}
+
 node 'ytterbium.wikimedia.org' {
 # Note: whenever moving Gerrit out of ytterbium, you will need
 # to update the role::zuul::production

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

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

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


[MediaWiki-commits] [Gerrit] Don't store the uri on parsoid config - change (mediawiki...parsoid)

2015-04-24 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Don't store the uri on parsoid config
..

Don't store the uri on parsoid config

 * Setting yourself up for race conditions.

 * This was causing major corruption on wiki.

 * Consider freezing parsoid config in a follow up.

Change-Id: Ia2244b9737fee1563ca3a33ba3b8683862b39d24
---
M lib/mediawiki.parser.environment.js
1 file changed, 3 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/77/206477/1

diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index c3598a5..206a0a0 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -278,11 +278,11 @@
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
 
-   var getConfigPromise;
+   var getConfigPromise, uri;
if (!prefix) {
getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
} else {
-   var uri = parsoid.interwikiMap.get(prefix);
+   uri = parsoid.interwikiMap.get(prefix);
if (!uri) {
// SSS: Ugh! Looks like parser tests use a prefix
// that is not part of the interwikiMap -- so we
@@ -294,7 +294,6 @@
prefix + '; defaulting to enwiki');
uri = parsoid.interwikiMap.get('enwiki');
}
-   parsoid.apiURI = uri;
 
if (env.confCache[prefix]) {
env.conf.wiki = env.confCache[prefix];
@@ -318,7 +317,7 @@
 
return getConfigPromise.then(function(resultConf) {
if (resultConf === nothingToDo) { return; }
-   env.conf.wiki = new WikiConfig(env, resultConf, prefix, 
parsoid.apiURI,
+   env.conf.wiki = new WikiConfig(env, resultConf, prefix, uri,
env.getAPIProxy(prefix));
env.confCache[prefix] = env.conf.wiki;
}).nodify(cb);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia2244b9737fee1563ca3a33ba3b8683862b39d24
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] Implement ChangeTagsRegister - change (mediawiki...AbuseFilter)

2015-04-24 Thread Cenarium (Code Review)
Cenarium has uploaded a new change for review.

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

Change subject: Implement ChangeTagsRegister
..

Implement ChangeTagsRegister

This implements the ChangeTagsRegister hook introduced by
Change-Id: I4f4b097d660ada77f5cf7b4231925009b27127ea. Special:Tags
now indicates when a filter is defined by AbuseFilter, and which
filter uses it. The default messages are kept pretty basic.
The cache of registered tags is purged whenever filters are edited.
Newly defined non-existing tags are checked with the canCreate
function of the ChangeTag class.

Change-Id: Ibfadd04acfebbedaad1b67c5818dfa5c1b7037b3
---
M AbuseFilter.hooks.php
M AbuseFilter.php
M Views/AbuseFilterViewEdit.php
M i18n/en.json
M i18n/qqq.json
5 files changed, 38 insertions(+), 36 deletions(-)


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

diff --git a/AbuseFilter.hooks.php b/AbuseFilter.hooks.php
index 892d901..fc935fb 100644
--- a/AbuseFilter.hooks.php
+++ b/AbuseFilter.hooks.php
@@ -443,32 +443,41 @@
 
/**
 * @param array $tags
-* @param bool $enabled
 * @return bool
 */
-   private static function fetchAllTags( array &$tags, $enabled ) {
+   private static function fetchAllTags( array &$tags ) {
# This is a pretty awful hack.
$dbr = wfGetDB( DB_SLAVE );
 
-   $where = array( 'afa_consequence' => 'tag', 'af_deleted' => 
false );
-   if ( $enabled ) {
-   $where['af_enabled'] = true;
-   }
+   $where = array( 'afa_consequence' => 'tag', 'af_deleted' => 0 );
+
$res = $dbr->select(
array( 'abuse_filter_action', 'abuse_filter' ),
-   'afa_parameters',
+   array( 'afa_parameters', 'af_enabled', 'af_id' ),
$where,
__METHOD__,
array(),
array( 'abuse_filter' => array( 'INNER JOIN', 
'afa_filter=af_id' ) )
);
 
+   $fetchedTags = array();
foreach ( $res as $row ) {
-   $tags = array_filter(
-   array_merge( explode( "\n", 
$row->afa_parameters ), $tags )
-   );
+   $afTags = explode( "\n", $row->afa_parameters );
+   foreach ( $afTags as $tag ) {
+   if ( !isset( $fetchedTags[$tag] ) ) {
+   $fetchedTags[$tag] = array(
+   'extName' => 'AbuseFilter',
+   'descParams' => array()
+   );
+   }
+   $fetchedTags[$tag]['descParams'][] = 
$row->af_id;
+   if ( $row->af_enabled ) {
+   $fetchedTags[$tag]['active'] = true;
+   }
+   }
}
 
+   $tags = array_filter( array_merge( $fetchedTags, $tags ) );
return true;
}
 
@@ -476,16 +485,8 @@
 * @param array $tags
 * @return bool
 */
-   public static function onListDefinedTags( array &$tags ) {
-   return self::fetchAllTags( $tags, false );
-   }
-
-   /**
-* @param array $tags
-* @return bool
-*/
-   public static function onChangeTagsListActive( array &$tags ) {
-   return self::fetchAllTags( $tags, true );
+   public static function onChangeTagsRegister( array &$tags ) {
+   return self::fetchAllTags( $tags );
}
 
/**
diff --git a/AbuseFilter.php b/AbuseFilter.php
index fb3542a..60e5e07 100644
--- a/AbuseFilter.php
+++ b/AbuseFilter.php
@@ -95,8 +95,7 @@
 $wgHooks['AbortAutoAccount'][] = 'AbuseFilterHooks::onAbortAutoAccount';
 $wgHooks['ArticleDelete'][] = 'AbuseFilterHooks::onArticleDelete';
 $wgHooks['RecentChange_save'][] = 'AbuseFilterHooks::onRecentChangeSave';
-$wgHooks['ListDefinedTags'][] = 'AbuseFilterHooks::onListDefinedTags';
-$wgHooks['ChangeTagsListActive'][] = 
'AbuseFilterHooks::onChangeTagsListActive';
+$wgHooks['ChangeTagsRegister'][] = 'AbuseFilterHooks::onChangeTagsRegister';
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'AbuseFilterHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['ContributionsToolLinks'][] = 
'AbuseFilterHooks::onContributionsToolLinks';
 $wgHooks['UploadVerifyFile'][] = 'AbuseFilterHooks::onUploadVerifyFile';
diff --git a/Views/AbuseFilterViewEdit.php b/Views/AbuseFilterViewEdit.php
index 7f7c634..3c5ecc9 100644
--- a/Views/AbuseFilterViewEdit.php
+++ b/Views/AbuseFilterViewEdit.php
@@ -108,13 +108,13 @@
// If

[MediaWiki-commits] [Gerrit] API: Improve queries for prop=revisions in enum mode - change (mediawiki/core)

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

Change subject: API: Improve queries for prop=revisions in enum mode
..


API: Improve queries for prop=revisions in enum mode

This reworks the queries to better use the indexes available, and at the
same time sorts results by rev_timestamp like they always should have
been rather than rev_id. See T88084 for details.

This also takes the opportunity to replace !is_null with !== null, since
it was annoying me while writing this.

Bug: T88084
Bug: T91883
Change-Id: Ie175c6014e75848e9dda6b413175c8575d1ef6af
---
M RELEASE-NOTES-1.26
M includes/api/ApiQueryRevisions.php
2 files changed, 70 insertions(+), 43 deletions(-)

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



diff --git a/RELEASE-NOTES-1.26 b/RELEASE-NOTES-1.26
index 9426635..57166ef 100644
--- a/RELEASE-NOTES-1.26
+++ b/RELEASE-NOTES-1.26
@@ -23,6 +23,8 @@
   tag is meant to be hidden from user interfaces.
 * action=import no longer allows both the namespace= and rootpage= parameters
   to be set. If they are both set, the value of rootpage= will be ignored.
+* prop=revision output in enum mode is now sorted by timestamp rather than
+  revision ID. This usually won't make any difference.
 
 === Action API internal changes in 1.26 ===
 
diff --git a/includes/api/ApiQueryRevisions.php 
b/includes/api/ApiQueryRevisions.php
index 552ca3b..1a65fe3 100644
--- a/includes/api/ApiQueryRevisions.php
+++ b/includes/api/ApiQueryRevisions.php
@@ -91,10 +91,10 @@
// Enum mode can only be used when exactly one page is provided.
// Enumerating revisions on multiple pages make it extremely
// difficult to manage continuations and require additional SQL 
indexes
-   $enumRevMode = ( !is_null( $params['user'] ) || !is_null( 
$params['excludeuser'] ) ||
-   !is_null( $params['limit'] ) || !is_null( 
$params['startid'] ) ||
-   !is_null( $params['endid'] ) || $params['dir'] === 
'newer' ||
-   !is_null( $params['start'] ) || !is_null( 
$params['end'] ) );
+   $enumRevMode = ( $params['user'] !== null || 
$params['excludeuser'] !== null ||
+   $params['limit'] !== null || $params['startid'] !== 
null ||
+   $params['endid'] !== null || $params['dir'] === 'newer' 
||
+   $params['start'] !== null || $params['end'] !== null );
 
$pageSet = $this->getPageSet();
$pageCount = $pageSet->getGoodTitleCount();
@@ -149,7 +149,7 @@
}
} else {
$this->limit = $this->getParameter( 'limit' ) ?: 10;
-   $this->addFields( array( 'rev_id', 'rev_page' ) );
+   $this->addFields( array( 'rev_id', 'rev_timestamp', 
'rev_page' ) );
}
 
if ( $this->fld_tags ) {
@@ -160,7 +160,7 @@
$this->addFields( 'ts_tags' );
}
 
-   if ( !is_null( $params['tag'] ) ) {
+   if ( $params['tag'] !== null ) {
$this->addTables( 'change_tag' );
$this->addJoinConds(
array( 'change_tag' => array( 'INNER JOIN', 
array( 'rev_id=ct_rev_id' ) ) )
@@ -196,58 +196,77 @@
}
 
if ( $enumRevMode ) {
+   // Indexes targeted:
+   //  page_timestamp if we don't have rvuser
+   //  page_user_timestamp if we have a logged-in rvuser
+   //  page_timestamp or usertext_timestamp if we have an 
IP rvuser
+
// This is mostly to prevent parameter errors (and 
optimize SQL?)
-   if ( !is_null( $params['startid'] ) && !is_null( 
$params['start'] ) ) {
+   if ( $params['startid'] !== null && $params['start'] 
!== null ) {
$this->dieUsage( 'start and startid cannot be 
used together', 'badparams' );
}
 
-   if ( !is_null( $params['endid'] ) && !is_null( 
$params['end'] ) ) {
+   if ( $params['endid'] !== null && $params['end'] !== 
null ) {
$this->dieUsage( 'end and endid cannot be used 
together', 'badparams' );
}
 
-   if ( !is_null( $params['user'] ) && !is_null( 
$params['excludeuser'] ) ) {
+   if ( $params['user'] !== null && $params['excludeuser'] 
!== null ) {
$this->dieUsage( 'user and excludeuser cannot 
be used together', 'badparams' );
}
 
-   // Continuing effectively uses startid. But we can't 
use rvstartid
-   // directly

[MediaWiki-commits] [Gerrit] Readability cleanup - change (mediawiki...parsoid)

2015-04-24 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Readability cleanup
..

Readability cleanup

 * Suggested while debugging.

Change-Id: I2794fe6941ff8be899c732d11d6ee9724270ef36
---
M lib/mediawiki.parser.environment.js
1 file changed, 14 insertions(+), 12 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid 
refs/changes/75/206475/1

diff --git a/lib/mediawiki.parser.environment.js 
b/lib/mediawiki.parser.environment.js
index 274f71e..c0b4a34 100644
--- a/lib/mediawiki.parser.environment.js
+++ b/lib/mediawiki.parser.environment.js
@@ -277,11 +277,11 @@
var env = this;
var nothingToDo = {};  // unique marker value
var parsoid = env.conf.parsoid;
-   return new Promise(function(resolve, reject) {
-   if (!prefix) {
-   return reject(new Error('Wiki prefix not provided'));
-   }
 
+   var getConfigPromise;
+   if (!prefix) {
+   getConfigPromise = Promise.reject(new Error('Wiki prefix not 
provided'));
+   } else {
var uri = parsoid.interwikiMap.get(prefix);
if (!uri) {
// SSS: Ugh! Looks like parser tests use a prefix
@@ -298,23 +298,25 @@
 
if (env.confCache[prefix]) {
env.conf.wiki = env.confCache[prefix];
-   return resolve(nothingToDo);
+   getConfigPromise = Promise.resolve(nothingToDo);
} else if (parsoid.fetchConfig) {
-   ConfigRequest
-   .promise(uri, env, env.getAPIProxy(prefix))
-   .then(resolve, reject);
+   getConfigPromise = ConfigRequest
+   .promise(uri, env, env.getAPIProxy(prefix));
} else {
// Load the config from cached config on disk
var localConfigFile = './baseconfig/' + prefix + 
'.json';
var localConfig = require(localConfigFile);
if (localConfig && localConfig.query) {
-   return resolve(localConfig.query);
+   getConfigPromise = 
Promise.resolve(localConfig.query);
} else {
-   return reject(new Error('Could not read valid 
config from' +
-   ' file: ' + localConfigFile));
+   getConfigPromise = Promise.reject(
+   new Error('Could not read valid config 
from file: ' +
+localConfigFile));
}
}
-   }).then(function(resultConf) {
+   }
+
+   getConfigPromise.then(function(resultConf) {
if (resultConf === nothingToDo) { return; }
env.conf.wiki = new WikiConfig(env, resultConf, prefix, 
parsoid.apiURI,
env.getAPIProxy(prefix));

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2794fe6941ff8be899c732d11d6ee9724270ef36
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/parsoid
Gerrit-Branch: master
Gerrit-Owner: Arlolra 

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


[MediaWiki-commits] [Gerrit] Drop unused FormatMetadata::flattenArray method - change (mediawiki/core)

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

Change subject: Drop unused FormatMetadata::flattenArray method
..


Drop unused FormatMetadata::flattenArray method

This is a pure helper method, not closely related to this class, and
currently unused.

Change-Id: I278058677ad407aae8cd2ba8fe34c12b1e86033f
---
M includes/media/FormatMetadata.php
M tests/phpunit/includes/media/FormatMetadataTest.php
2 files changed, 0 insertions(+), 55 deletions(-)

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



diff --git a/includes/media/FormatMetadata.php 
b/includes/media/FormatMetadata.php
index 7246072..0c6b6c7 100644
--- a/includes/media/FormatMetadata.php
+++ b/includes/media/FormatMetadata.php
@@ -1004,28 +1004,6 @@
}
 
/**
-* Flatten an array, using the user language for any messages.
-*
-* @param array $vals Array of values
-* @param string $type Type of array (either lang, ul, ol).
-*   lang = language assoc array with keys being the lang code
-*   ul = unordered list, ol = ordered list
-*   type can also come from the '_type' member of $vals.
-* @param bool $noHtml If to avoid returning anything resembling HTML.
-*   (Ugly hack for backwards compatibility with old MediaWiki).
-* @param bool|IContextSource $context
-* @return string Single value (in wiki-syntax).
-*/
-   public static function flattenArray( $vals, $type = 'ul', $noHtml = 
false, $context = false ) {
-   $obj = new FormatMetadata;
-   if ( $context ) {
-   $obj->setContext( $context );
-   }
-
-   return $obj->flattenArrayReal( $vals, $type, $noHtml );
-   }
-
-   /**
 * A function to collapse multivalued tags into a single value.
 * This turns an array of (for example) authors into a bulleted list.
 *
diff --git a/tests/phpunit/includes/media/FormatMetadataTest.php 
b/tests/phpunit/includes/media/FormatMetadataTest.php
index 54758f9..b666c83 100644
--- a/tests/phpunit/includes/media/FormatMetadataTest.php
+++ b/tests/phpunit/includes/media/FormatMetadataTest.php
@@ -37,39 +37,6 @@
}
 
/**
-* @param string $filename
-* @param int $expected Total image area
-* @dataProvider provideFlattenArray
-* @covers FormatMetadata::flattenArray
-*/
-   public function testFlattenArray( $vals, $type, $noHtml, $ctx, 
$expected ) {
-   $actual = FormatMetadata::flattenArray( $vals, $type, $noHtml, 
$ctx );
-   $this->assertEquals( $expected, $actual );
-   }
-
-   public static function provideFlattenArray() {
-   return array(
-   array(
-   array( 1, 2, 3 ), 'ul', false, false,
-   "1\n2\n3",
-   ),
-   array(
-   array( 1, 2, 3 ), 'ol', false, false,
-   "1\n2\n3",
-   ),
-   array(
-   array( 1, 2, 3 ), 'ul', true, false,
-   "\n*1\n*2\n*3",
-   ),
-   array(
-   array( 1, 2, 3 ), 'ol', true, false,
-   "\n#1\n#2\n#3",
-   ),
-   // TODO: more test cases
-   );
-   }
-
-   /**
 * @param mixed $input
 * @param mixed $output
 * @dataProvider provideResolveMultivalueValue

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I278058677ad407aae8cd2ba8fe34c12b1e86033f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Thiemo Mättig (WMDE) 
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] Query WMI via win32ole for CPU count on Windows - change (mediawiki/vagrant)

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

Change subject: Query WMI via win32ole for CPU count on Windows
..


Query WMI via win32ole for CPU count on Windows

Fall back to 1 core for all platforms if detection fails.

Bumped version to force auto configuration for Windows users.

Bug: T97087
Change-Id: I3d619570c4404c2ade279dc895937e823aaaeca4
---
M lib/mediawiki-vagrant/environment.rb
M lib/mediawiki-vagrant/version.rb
2 files changed, 19 insertions(+), 11 deletions(-)

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



diff --git a/lib/mediawiki-vagrant/environment.rb 
b/lib/mediawiki-vagrant/environment.rb
index 0cc11f9..74d1a8e 100644
--- a/lib/mediawiki-vagrant/environment.rb
+++ b/lib/mediawiki-vagrant/environment.rb
@@ -34,16 +34,24 @@
   # @return [Fixnum]
   #
   def total_cpus
-case operating_system
-when :osx
-  `sysctl -n hw.ncpu`.to_i
-when :linux
-  `nproc`.to_i
-when :windows
-  `wmic CPU get NumberOfLogicalProcessors | more +1`.to_i
-else
-  1
-end
+cores =
+  case operating_system
+  when :osx
+`sysctl -n hw.ncpu`.to_i
+  when :linux
+`nproc`.to_i
+  when :windows
+require 'win32ole'
+
+wmi = WIN32OLE.connect('winmgmts://')
+q = wmi.ExecQuery('select NumberOfCores from Win32_Processor')
+
+q.to_enum.reduce(0) { |cores, processor| cores + 
processor.NumberOfCores }
+  else
+1
+  end
+
+[1, cores].max
   end
 
   # Total host OS memory in MB.
diff --git a/lib/mediawiki-vagrant/version.rb b/lib/mediawiki-vagrant/version.rb
index 605c1cc..93ca639 100644
--- a/lib/mediawiki-vagrant/version.rb
+++ b/lib/mediawiki-vagrant/version.rb
@@ -1,3 +1,3 @@
 module MediaWikiVagrant
-  VERSION = '0.6.0'
+  VERSION = '0.7.0'
 end

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3d619570c4404c2ade279dc895937e823aaaeca4
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Dduvall 
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] Fix logic in testing code - wasn't using the passed in param... - change (apps...wikipedia)

2015-04-24 Thread Mhurd (Code Review)
Mhurd has submitted this change and it was merged.

Change subject: Fix logic in testing code - wasn't using the passed in 
parameter and the unit test was failing and broke the build
..


Fix logic in testing code - wasn't using the passed in parameter and the unit 
test was failing and broke the build

Change-Id: I854eb433ec117f3cadae1ee49e534f8f73f2f882
---
M WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m 
b/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
index e5d0c0a..2ef5dce 100644
--- a/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
+++ b/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
@@ -12,7 +12,7 @@
 
 - (NSData*)wmf_dataFromContentsOfFile:(NSString *)filename ofType:(NSString 
*)type {
 NSError* error;
-NSData* data = [NSData dataWithContentsOfFile:[self 
pathForResource:filename ofType:@"json"]
+NSData* data = [NSData dataWithContentsOfFile:[self 
pathForResource:filename ofType:type]
   options:0
 error:&error];
 NSParameterAssert(!error);

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I854eb433ec117f3cadae1ee49e534f8f73f2f882
Gerrit-PatchSet: 2
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno 
Gerrit-Reviewer: Mhurd 
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 logic in testing code - wasn't using the passed in param... - change (apps...wikipedia)

2015-04-24 Thread Fjalapeno (Code Review)
Fjalapeno has uploaded a new change for review.

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

Change subject: Fix logic in testing code - wasn't using the passed in 
parameter and the unit test was failing and broke the build
..

Fix logic in testing code - wasn't using the passed in parameter and the unit 
test was failing and broke the build

Change-Id: I854eb433ec117f3cadae1ee49e534f8f73f2f882
---
M WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/72/206472/1

diff --git a/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m 
b/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
index e5d0c0a..2ef5dce 100644
--- a/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
+++ b/WikipediaUnitTests/Utilities/NSBundle+TestAssets.m
@@ -12,7 +12,7 @@
 
 - (NSData*)wmf_dataFromContentsOfFile:(NSString *)filename ofType:(NSString 
*)type {
 NSError* error;
-NSData* data = [NSData dataWithContentsOfFile:[self 
pathForResource:filename ofType:@"json"]
+NSData* data = [NSData dataWithContentsOfFile:[self 
pathForResource:filename ofType:type]
   options:0
 error:&error];
 NSParameterAssert(!error);

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I854eb433ec117f3cadae1ee49e534f8f73f2f882
Gerrit-PatchSet: 1
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno 

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


[MediaWiki-commits] [Gerrit] T97095: add customized web.xml with query runtime cap - change (wikidata...rdf)

2015-04-24 Thread Smalyshev (Code Review)
Smalyshev has uploaded a new change for review.

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

Change subject: T97095: add customized web.xml with query runtime cap
..

T97095: add customized web.xml with query runtime cap

Change-Id: I341a24124e0ba55757f90deab1fc2bf5f1871971
---
M dist/pom.xml
M dist/src/assembly/dist.xml
M dist/src/script/RWStore.properties
3 files changed, 9 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikidata/query/rdf 
refs/changes/71/206471/1

diff --git a/dist/pom.xml b/dist/pom.xml
index 65952e4..ab05ee1 100644
--- a/dist/pom.xml
+++ b/dist/pom.xml
@@ -23,7 +23,7 @@
 
   com.bigdata
   bigdata
-  1.5.1
+  ${blazegraph.version}
   war
 
 
diff --git a/dist/src/assembly/dist.xml b/dist/src/assembly/dist.xml
index 398676e..772a779 100644
--- a/dist/src/assembly/dist.xml
+++ b/dist/src/assembly/dist.xml
@@ -18,10 +18,15 @@
 
 
 
+  blazegraph/WEB-INF
+  ${project.basedir}/src/config
+
+
+
   lib
   ${project.basedir}/../tools/target
   
-
wikidata-query-tools-0.0.1-SNAPSHOT-jar-with-dependencies.jar
+
wikidata-query-tools-${pom.version}-jar-with-dependencies.jar
   
 
 
diff --git a/dist/src/script/RWStore.properties 
b/dist/src/script/RWStore.properties
index d0d100a..d927d11 100644
--- a/dist/src/script/RWStore.properties
+++ b/dist/src/script/RWStore.properties
@@ -19,7 +19,8 @@
 
com.bigdata.rdf.store.AbstractTripleStore.axiomsClass=com.bigdata.rdf.axioms.NoAxioms
 
 # Use the default vocabulary for now.
-com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass=com.bigdata.rdf.vocab.DefaultBigdataVocabulary
+com.bigdata.rdf.store.AbstractTripleStore.vocabularyClass=org.wikidata.query.rdf.blazegraph.WikibaseVocabulary$V001
+com.bigdata.rdf.store.AbstractTripleStore.inlineURIFactory=org.wikidata.query.rdf.blazegraph.WikibaseInlineUriFactory
 
com.bigdata.rdf.store.AbstractTripleStore.extensionFactoryClass=org.wikidata.query.rdf.blazegraph.WikibaseExtensionFactory
 
 # These seem to be ubiquitous overwrites.  Not sure why they aren't the 
default but it works.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I341a24124e0ba55757f90deab1fc2bf5f1871971
Gerrit-PatchSet: 1
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 

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


[MediaWiki-commits] [Gerrit] Update VE core submodule to master (40ff4c2) - change (mediawiki...VisualEditor)

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

Change subject: Update VE core submodule to master (40ff4c2)
..


Update VE core submodule to master (40ff4c2)

New changes:
70a8233 Update OOjs UI to v0.10.0
bea6139 Tests for getNodeAndOffset (matching current quirky behaviour)
4c364f3 Fix old dates

Change-Id: Ic13abd43659e059198a186f44fedc9d7b19d4942
---
M lib/ve
1 file changed, 0 insertions(+), 0 deletions(-)

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



diff --git a/lib/ve b/lib/ve
index 7f8fae5..40ff4c2 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit 7f8fae576a01678b3a757fee7b08ecfae4237136
+Subproject commit 40ff4c25436dd80550d2b29f8c8715d597b4582d

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic13abd43659e059198a186f44fedc9d7b19d4942
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1b4fecb..a615e8e - change (mediawiki/extensions)

2015-04-24 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has submitted this change and it was merged.

Change subject: Syncronize VisualEditor: 1b4fecb..a615e8e
..


Syncronize VisualEditor: 1b4fecb..a615e8e

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

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



diff --git a/VisualEditor b/VisualEditor
index 1b4fecb..a615e8e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1b4fecb61b86a3f9685f1a456f63c36256cd3f4f
+Subproject commit a615e8e1d22e29c036f0b59b5a2a35e1142e4136

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 1b4fecb..a615e8e - change (mediawiki/extensions)

2015-04-24 Thread Jenkins-mwext-sync (Code Review)
Jenkins-mwext-sync has uploaded a new change for review.

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

Change subject: Syncronize VisualEditor: 1b4fecb..a615e8e
..

Syncronize VisualEditor: 1b4fecb..a615e8e

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/70/206470/1

diff --git a/VisualEditor b/VisualEditor
index 1b4fecb..a615e8e 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 1b4fecb61b86a3f9685f1a456f63c36256cd3f4f
+Subproject commit a615e8e1d22e29c036f0b59b5a2a35e1142e4136

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

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

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


[MediaWiki-commits] [Gerrit] Fix change logs - git not using the proper path to the repo. - change (apps...wikipedia)

2015-04-24 Thread Mhurd (Code Review)
Mhurd has submitted this change and it was merged.

Change subject: Fix change logs - git not using the proper path to the repo.
..


Fix change logs - git not using the proper path to the repo.

Change-Id: I3e20c18a8fd38997b9e8dba14880fdfea646c741
---
M fastlane/lib/utils.rb
1 file changed, 9 insertions(+), 8 deletions(-)

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

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



diff --git a/fastlane/lib/utils.rb b/fastlane/lib/utils.rb
index 9e23a78..f9f55ed 100644
--- a/fastlane/lib/utils.rb
+++ b/fastlane/lib/utils.rb
@@ -50,10 +50,11 @@
 
 # Generate a list of commit subjects from `rev` to `HEAD`
 # :rev: The git SHA to start the log from, defaults to `ENV[LAST_SUCCESS_REV']`
-def generate_git_commit_log(rev=ENV['LAST_SUCCESS_REV'])
-  g = Git.open(Dir.getwd)
+def generate_git_commit_log(rev=ENV['GIT_PREVIOUS_SUCCESSFUL_COMMIT'])
+  g = Git.open(ENV['PWD'], :log => Logger.new(STDOUT))
   change_log = g.log.between(rev).map { |c| "- " + c.message.lines.first.chomp 
}.join "\n"
   "Commit Log:\n\n#{change_log}\n"
+  p change_log
 end
 
 # Memoized version of `generate_git_commit_log` which stores the result in 
`ENV['GIT_COMMIT_LOG']`.
@@ -66,17 +67,17 @@
 # Upload the DSYM to Hockey
 hockey({
   api_token: ENV['HOCKEY_API_TOKEN'],
-  notes: git_commit_log,
+  notes: '',
   notify: 0,
   status: 1, #Means do not make available for download
 })
 
-#Set "What To Test" in iTunes Connect for Testflight builds, in the 
future, reference tickets instead of git commits
-DELIVER_WHAT_TO_TEST.replace = git_commit_log
-#Set "App Description" in iTunes Connect for Testflight builds, in the 
future set a better description
-DELIVER_BETA_DESCRIPTION.replace = git_commit_log
 #Set "Feedback email" in iTunes Connect for Testflight builds
-DELIVER_BETA_FEEDBACK_EMAIL.replace = 'ab...@wikimedia.org'
+self.class.const_set("DELIVER_BETA_FEEDBACK_EMAIL", 'ab...@wikimedia.org')
+#Set "What To Test" in iTunes Connect for Testflight builds, in the 
future, reference tickets instead of git commits
+self.class.const_set("DELIVER_WHAT_TO_TEST", git_commit_log)
+#Set "App Description" in iTunes Connect for Testflight builds, in the 
future set a better description
+self.class.const_set("DELIVER_BETA_DESCRIPTION", git_commit_log)
 
 # Upload the IPA and DSYM to iTunes Connect
 deliver :testflight, :beta, :skip_deploy, :force

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e20c18a8fd38997b9e8dba14880fdfea646c741
Gerrit-PatchSet: 3
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Fjalapeno 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: Mhurd 
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 improperly defined const - change (apps...wikipedia)

2015-04-24 Thread Mhurd (Code Review)
Mhurd has submitted this change and it was merged.

Change subject: Fix improperly defined const
..


Fix improperly defined const

Change-Id: I2a6846a35f87dfd1c6679972016b487de5a32e70
---
M Wikipedia/Categories/NSString+WMFHTMLParsing.m
M Wikipedia/Categories/NSURL+WMFRest.h
M Wikipedia/Categories/NSURL+WMFRest.m
M Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
M Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
M Wikipedia/Networking/Fetchers/SearchResultFetcher.h
M Wikipedia/Networking/Fetchers/SearchResultFetcher.m
M Wikipedia/Protocols/WMFLocalizationProtocol.m
M Wikipedia/Session/SessionSingleton.h
M Wikipedia/Session/SessionSingleton.m
M Wikipedia/View Controllers/LeadImage/LeadImageContainer.m
M Wikipedia/View 
Controllers/SavedPages/NSAttributedString+WMFSavedPagesAttributedStrings.m
M Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
M Wikipedia/View Controllers/SearchResults/SearchResultsController.m
M Wikipedia/View Controllers/ShareCard/WMFShareFunnel.m
M Wikipedia/View Controllers/ShareCard/WMFShareOptionsView.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
M Wikipedia/View Controllers/WebView/WebViewController.m
M Wikipedia/View Controllers/WebView/WebViewController_Private.h
M Wikipedia/mw-utils/WikipediaAppUtils.m
25 files changed, 94 insertions(+), 96 deletions(-)

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



diff --git a/Wikipedia/Categories/NSString+WMFHTMLParsing.m 
b/Wikipedia/Categories/NSString+WMFHTMLParsing.m
index f48ba4c..a89ad8f 100644
--- a/Wikipedia/Categories/NSString+WMFHTMLParsing.m
+++ b/Wikipedia/Categories/NSString+WMFHTMLParsing.m
@@ -2,8 +2,8 @@
 #import "WikipediaAppUtils.h"
 #import 
 
-static const int kMinimumLengthForPreTransformedHTMLForSnippet = 40;
-static const int kHighestIndexForSubstringAfterHTMLRemoved = 350;
+static int const kMinimumLengthForPreTransformedHTMLForSnippet = 40;
+static int const kHighestIndexForSubstringAfterHTMLRemoved = 350;
 
 @implementation NSString (WMFHTMLParsing)
 
diff --git a/Wikipedia/Categories/NSURL+WMFRest.h 
b/Wikipedia/Categories/NSURL+WMFRest.h
index 91c264e..85a3679 100644
--- a/Wikipedia/Categories/NSURL+WMFRest.h
+++ b/Wikipedia/Categories/NSURL+WMFRest.h
@@ -5,6 +5,6 @@
 
 @interface NSURL (WMFRest)
 
--(BOOL)wmf_conformsToScheme:(NSString *)scheme andHasKey:(NSString *)key;
+- (BOOL)wmf_conformsToScheme:(NSString*)scheme andHasKey:(NSString*)key;
 
 @end
diff --git a/Wikipedia/Categories/NSURL+WMFRest.m 
b/Wikipedia/Categories/NSURL+WMFRest.m
index eed2352..4eb26ac 100644
--- a/Wikipedia/Categories/NSURL+WMFRest.m
+++ b/Wikipedia/Categories/NSURL+WMFRest.m
@@ -6,7 +6,7 @@
 
 @implementation NSURL (WMFRest)
 
--(BOOL)wmf_conformsToScheme:(NSString *)scheme andHasKey:(NSString *)key {
+- (BOOL)wmf_conformsToScheme:(NSString*)scheme andHasKey:(NSString*)key {
 return ([[self scheme] wmf_isEqualToStringIgnoringCase:scheme] && [[self 
host] wmf_isEqualToStringIgnoringCase:key]);
 }
 
diff --git a/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m 
b/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
index dccbe30..60f6501 100644
--- a/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
+++ b/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
@@ -5,11 +5,11 @@
 #import "UIColor+WMFHexColor.h"
 #import 
 
-static const CGFloat kActivityIndicatorWidth = 100.0f;
-static const CGFloat kActivityIndicatorCornerRadius  = 10.0f;
-static const NSInteger kActivityIndicatorBackgroundColor = 0x00;
+static CGFloat const kActivityIndicatorWidth = 100.0f;
+static CGFloat const kActivityIndicatorCornerRadius  = 10.0f;
+static NSInteger const kActivityIndicatorBackgroundColor = 0x00;
 
-static const CGFloat kFadeAnimationDuration = 0.33f;
+static CGFloat const kFadeAnimationDuration = 0.33f;
 
 @interface WMFLoadingIndicatorOverlay ()
 
diff --git a/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m 
b/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
index 631a896..f9f9057 100644
--- a/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
+++ b/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
@@ -9,7 +9,7 @@
 #import "WMFSuggestedPagesFunnel.h"
 
 static NSString* const kSchemaName = @"MobileWikiAppArticleSuggestions";
-static const int kSchemaVersion= 10590869;
+static int const kSchemaVersion= 10590869;
 
 static NSString* const kActionKey = @"action";
 static NSString* const kActionShown

[MediaWiki-commits] [Gerrit] Switch URL used for collection in moderation notification - change (mediawiki...Gather)

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

Change subject: Switch URL used for collection in moderation notification
..


Switch URL used for collection in moderation notification

Change-Id: Id133570788f5bed78d0fed2db85b9305a01408cc
---
M includes/api/ApiEditList.php
1 file changed, 5 insertions(+), 3 deletions(-)

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



diff --git a/includes/api/ApiEditList.php b/includes/api/ApiEditList.php
index bf8a1f3..9178c6b 100644
--- a/includes/api/ApiEditList.php
+++ b/includes/api/ApiEditList.php
@@ -132,10 +132,12 @@
// Do echo notification
if ( class_exists( 'EchoEvent' ) ) {
$eventType = $mode === 
'showlist' ? 'gather-unhide' : 'gather-hide';
+   // FIXME: better long term 
solution for generating collection urls needed
+   // Model currently handles it 
which is not accessible from here
$collectionTitle = 
SpecialPage::getTitleFor( 'Gather' )
-   ->getSubpage( 'by' )
-   ->getSubpage( 
User::newFromId( $row->gl_user ) )
-   ->getSubpage( 
$row->gl_id );
+   ->getSubpage( 'id' )
+   ->getSubpage( 
$row->gl_id )
+   ->getSubpage( 
$row->gl_label );
 
EchoEvent::create( array(
'type' => $eventType,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id133570788f5bed78d0fed2db85b9305a01408cc
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] hygiene: Consistent collection url generation - change (mediawiki...Gather)

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

Change subject: hygiene: Consistent collection url generation
..


hygiene: Consistent collection url generation

Change-Id: I68c50e57e80bdc9dbb6c4b8ddc39591879f66c83
---
M includes/views/ReportTableRow.php
1 file changed, 5 insertions(+), 7 deletions(-)

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



diff --git a/includes/views/ReportTableRow.php 
b/includes/views/ReportTableRow.php
index 40e2367..d83bdc4 100644
--- a/includes/views/ReportTableRow.php
+++ b/includes/views/ReportTableRow.php
@@ -29,15 +29,13 @@
 
/**
 * Renders a html link for a collection page
-* @param string $text of the link
-* @param User $user owner of the collection
-* @param int $id of the collection
+* @param models\CollectionInfo $collection
 * @return string
 */
-   private function collectionLink( $text, $user, $id ) {
+   private function collectionLink( $collection ) {
return Html::element( 'a', array(
-   'href' => SpecialPage::getTitleFor( 'Gather', 'by/' . 
$user.'/'.$id )->getLocalUrl()
-   ), $text );
+   'href' => $collection->getUrl()
+   ), $collection->getTitle() );
}
 
/**
@@ -68,7 +66,7 @@
$id = $collection->getId();
 
$html = Html::openElement( 'li' )
-   . $this->collectionLink( $title, $owner, $id )
+   . $this->collectionLink( $collection )
. Html::element( 'span', array(), 
$collection->getDescription() )
. Html::element( 'span', array(), 
$collection->getCount() )
. $this->userLink( $owner )

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68c50e57e80bdc9dbb6c4b8ddc39591879f66c83
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Robmoen 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix improperly defined const - change (apps...wikipedia)

2015-04-24 Thread Fjalapeno (Code Review)
Fjalapeno has uploaded a new change for review.

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

Change subject: Fix improperly defined const
..

Fix improperly defined const

Change-Id: I2a6846a35f87dfd1c6679972016b487de5a32e70
---
M Wikipedia/Categories/NSString+WMFHTMLParsing.m
M Wikipedia/Categories/NSURL+WMFRest.h
M Wikipedia/Categories/NSURL+WMFRest.m
M Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
M Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
M Wikipedia/Networking/Fetchers/SearchResultFetcher.h
M Wikipedia/Networking/Fetchers/SearchResultFetcher.m
M Wikipedia/Protocols/WMFLocalizationProtocol.m
M Wikipedia/Session/SessionSingleton.h
M Wikipedia/Session/SessionSingleton.m
M Wikipedia/View Controllers/LeadImage/LeadImageContainer.m
M Wikipedia/View 
Controllers/SavedPages/NSAttributedString+WMFSavedPagesAttributedStrings.m
M Wikipedia/View Controllers/SavedPages/SavedPagesViewController.m
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
M Wikipedia/View Controllers/SearchResults/SearchResultsController.m
M Wikipedia/View Controllers/ShareCard/WMFShareFunnel.m
M Wikipedia/View Controllers/ShareCard/WMFShareOptionsView.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.h
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Legal/WMFLegalFooterViewController.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/Options/WMFOptionsFooterViewController.m
M Wikipedia/View 
Controllers/WebView/Footer/SubFooters/ReadMore/WMFReadMoreViewController.m
M Wikipedia/View Controllers/WebView/WebViewController.m
M Wikipedia/View Controllers/WebView/WebViewController_Private.h
M Wikipedia/mw-utils/WikipediaAppUtils.m
25 files changed, 94 insertions(+), 96 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/69/206469/1

diff --git a/Wikipedia/Categories/NSString+WMFHTMLParsing.m 
b/Wikipedia/Categories/NSString+WMFHTMLParsing.m
index f48ba4c..a89ad8f 100644
--- a/Wikipedia/Categories/NSString+WMFHTMLParsing.m
+++ b/Wikipedia/Categories/NSString+WMFHTMLParsing.m
@@ -2,8 +2,8 @@
 #import "WikipediaAppUtils.h"
 #import 
 
-static const int kMinimumLengthForPreTransformedHTMLForSnippet = 40;
-static const int kHighestIndexForSubstringAfterHTMLRemoved = 350;
+static int const kMinimumLengthForPreTransformedHTMLForSnippet = 40;
+static int const kHighestIndexForSubstringAfterHTMLRemoved = 350;
 
 @implementation NSString (WMFHTMLParsing)
 
diff --git a/Wikipedia/Categories/NSURL+WMFRest.h 
b/Wikipedia/Categories/NSURL+WMFRest.h
index 91c264e..85a3679 100644
--- a/Wikipedia/Categories/NSURL+WMFRest.h
+++ b/Wikipedia/Categories/NSURL+WMFRest.h
@@ -5,6 +5,6 @@
 
 @interface NSURL (WMFRest)
 
--(BOOL)wmf_conformsToScheme:(NSString *)scheme andHasKey:(NSString *)key;
+- (BOOL)wmf_conformsToScheme:(NSString*)scheme andHasKey:(NSString*)key;
 
 @end
diff --git a/Wikipedia/Categories/NSURL+WMFRest.m 
b/Wikipedia/Categories/NSURL+WMFRest.m
index eed2352..4eb26ac 100644
--- a/Wikipedia/Categories/NSURL+WMFRest.m
+++ b/Wikipedia/Categories/NSURL+WMFRest.m
@@ -6,7 +6,7 @@
 
 @implementation NSURL (WMFRest)
 
--(BOOL)wmf_conformsToScheme:(NSString *)scheme andHasKey:(NSString *)key {
+- (BOOL)wmf_conformsToScheme:(NSString*)scheme andHasKey:(NSString*)key {
 return ([[self scheme] wmf_isEqualToStringIgnoringCase:scheme] && [[self 
host] wmf_isEqualToStringIgnoringCase:key]);
 }
 
diff --git a/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m 
b/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
index dccbe30..60f6501 100644
--- a/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
+++ b/Wikipedia/Custom Views/WMFLoadingIndicatorOverlay.m
@@ -5,11 +5,11 @@
 #import "UIColor+WMFHexColor.h"
 #import 
 
-static const CGFloat kActivityIndicatorWidth = 100.0f;
-static const CGFloat kActivityIndicatorCornerRadius  = 10.0f;
-static const NSInteger kActivityIndicatorBackgroundColor = 0x00;
+static CGFloat const kActivityIndicatorWidth = 100.0f;
+static CGFloat const kActivityIndicatorCornerRadius  = 10.0f;
+static NSInteger const kActivityIndicatorBackgroundColor = 0x00;
 
-static const CGFloat kFadeAnimationDuration = 0.33f;
+static CGFloat const kFadeAnimationDuration = 0.33f;
 
 @interface WMFLoadingIndicatorOverlay ()
 
diff --git a/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m 
b/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
index 631a896..f9f9057 100644
--- a/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
+++ b/Wikipedia/EventLogging/WMFSuggestedPagesFunnel.m
@@ -9,7 +9,7 @@
 #import "WMFSuggestedPagesFunnel.h"
 
 static NSString* const kSchemaName = @"MobileWikiAppArticleSuggestions";
-static const int kSchemaVersion= 10590869;
+static int const kSchemaVersion= 10590869;
 
 static NSString* const kActionKey

[MediaWiki-commits] [Gerrit] Fixing icons… again - change (apps...wikipedia)

2015-04-24 Thread Mhurd (Code Review)
Mhurd has submitted this change and it was merged.

Change subject: Fixing icons… again
..


Fixing icons… again

A few problems to overcome this time:
Archives use symlinks for the app bundle, which can throw monkey wrenches in 
the process.
Looks like permissions have changed on build folders - can't reliably save to 
the app bundle during the process. So sidestepping.

New solution:
No longer manipulating the build folder, doing everything in the source 
directory.
Created a new icon set - source - which will always contain the unmolested 
icons.
The other icon set will be overwritten at build time with the overlaid icons.
If release build or if imagemagick is not installed, then the icons are just 
copied
Also removed generated icons from source control

Note: only one icons is copied to the app, the other is in the project only.

Change-Id: I39285429803b72d5caeda738fb82bc3d23406317
---
M .gitignore
M Wikipedia.xcodeproj/project.pbxproj
M Wikipedia/Images.xcassets/AppIcon.appiconset/Contents.json
A Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Contents.json
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-72.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-76.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small-50.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-small...@2x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Small.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-sm...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon-Spotlight-40.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x-1.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@2x.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/icon-spotlight...@3x.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/Icon.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/i...@2x.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_app_icon_iphone.png
R Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_icon.png
R 
Wikipedia/SourceIcons.xcassets/AppIconSource.appiconset/ios7_settings_i...@2x.png
M scripts/process-icons.sh
24 files changed, 263 insertions(+), 70 deletions(-)

Approvals:
  Mhurd: Looks good to me, approved



diff --git a/.gitignore b/.gitignore
index 2d2952e..6dbb5fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,6 +19,9 @@
 *.ipa
 *.xcuserstate
 
+# Icons
+Wikipedia/Images.xcassets/AppIcon.appiconset/*.png
+
 # Fastlane
 fastlane/report.xml
 fastlane/Error*.png
diff --git a/Wikipedia.xcodeproj/project.pbxproj 
b/Wikipedia.xcodeproj/project.pbxproj
index feb2cbd..f302ee2 100644
--- a/Wikipedia.xcodeproj/project.pbxproj
+++ b/Wikipedia.xcodeproj/project.pbxproj
@@ -187,6 +187,7 @@
04F27B7818FE0F2E00EDD838 /* PageHistoryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 04F27B7418FE0F2E00EDD838 /* 
PageHistoryViewController.m */; };
04F39590186CF80100B0D6FC /* TOCViewController.m in Sources */ = 
{isa = PBXBuildFile; fileRef = 04F3958F186CF80100B0D6FC /* TOCViewController.m 
*/; };
08D631F71A69B1AB00D87AD0 /* WMFImageGalleryViewController.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 08D631F61A69B1AB00D87AD0 /* 
WMFImageGalleryViewController.m */; };
+   0E36C2271AE0B59D00C58CFF /* Images.xcassets in Resources */ = 
{isa = PBXBuildFile; fileRef = D4991453181D51DE00E6073C /* Images.xcassets */; 
};
0EA4402E1AA6281200B09DBA /* NSDateFormatter+WMFExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0EA4402D1AA6281200B09DBA /* 
NSDateFormatter+WMFExtensions.m */; };
0EBC56681AD3656900E82CDD /* WMFAsyncTestCase.m in Sources */ = 
{isa = PBXBuildFile; fileRef = BC7ACB631AB34C9C00791497 /* WMFAsyncTestCase.m 
*/; };
0EBC567F1AD442CC00E82CDD /* BITHockeyManager+WMFExtensions.m in 
Sources */ = {isa = PBXBuildFile; fileRef = 0EBC567E1AD442CC00E82CDD /* 
BITHockeyManager+WMFExtensions.m */; };
@@ -325,7 +326,6 @@
D4991445181D51DE00E6073C /* main.m in Sources */ = {isa = 
PBXBuildFile; fileRef = D4991444181D51DE00E6073C /* main.m */; };
D4991449181D51DE00E6073C /* AppDelegate.m in Sources */ = {isa 
= PBXBuildFile; fileRef = D4991448181D51DE00E6073C /* AppDelegate.m */; };
D499144C181D51DE00E6073C /* Main_iPhone.storyboard in Resources 
*/ = {isa = PBXBuildFile; fileRef = D499144A181D51DE00E6073C /* 
Main_iPhone.storyboard */; };
-   D499145

[MediaWiki-commits] [Gerrit] Fix for read more results being bold. - change (apps...wikipedia)

2015-04-24 Thread Fjalapeno (Code Review)
Fjalapeno has submitted this change and it was merged.

Change subject: Fix for read more results being bold.
..


Fix for read more results being bold.

Also cleaned up the search result attributed string.

Removed some items from defines file.

T96263

Change-Id: I84e1798d3cee86505ee15aaeb4fa35d4fae65103
---
M Wikipedia/Defines/Defines.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
M Wikipedia/View Controllers/SearchResults/SearchResultsController.m
4 files changed, 119 insertions(+), 108 deletions(-)

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



diff --git a/Wikipedia/Defines/Defines.h b/Wikipedia/Defines/Defines.h
index 2a7c0b2..c9b4eee 100644
--- a/Wikipedia/Defines/Defines.h
+++ b/Wikipedia/Defines/Defines.h
@@ -14,27 +14,10 @@
 
 
 #define SEARCH_THUMBNAIL_WIDTH (48 * 3)
-#define SEARCH_RESULT_HEIGHT (74.0 * MENUS_SCALE_MULTIPLIER)
 #define SEARCH_MAX_RESULTS 24
 
 #define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:(14.0 * 
MENUS_SCALE_MULTIPLIER)]
 #define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor]
-
-#define SEARCH_RESULT_FONT [UIFont systemFontOfSize:(16.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_FONT_COLOR [UIColor colorWithWhite:0.15 alpha:1.0]
-
-#define SEARCH_RESULT_DESCRIPTION_FONT [UIFont systemFontOfSize:(12.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_DESCRIPTION_FONT_COLOR [UIColor colorWithWhite:0.4 
alpha:1.0]
-
-#define SEARCH_RESULT_SNIPPET_FONT [UIFont italicSystemFontOfSize:(12.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_SNIPPET_FONT_COLOR [UIColor blackColor]
-#define SEARCH_RESULT_SNIPPET_HIGHLIGHT_COLOR WMF_COLOR_BLUE
-
-#define SEARCH_RESULT_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:(16.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
-
-#define SEARCH_RESULT_PADDING_ABOVE_DESCRIPTION 2.0f
-#define SEARCH_RESULT_PADDING_ABOVE_SNIPPET 3.0f
 
 #define SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR [UIColor colorWithRed:0.7 
green:0.7 blue:0.7 alpha:1.0]
 
diff --git a/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.h b/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.h
index 1f94331..ea65374 100644
--- a/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
+++ b/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
@@ -9,12 +9,7 @@
snippet:(NSString*)snippet
wikiDataDescription:(NSString*)description
 highlightWords:(NSArray*)wordsToHighlight
-searchType:(SearchType)searchType
-// Note: pointers to attributes dictionaries are passed to this method for 
performance/memory reasons.
-   attributesTitle:(NSDictionary*)attributesTitle
- attributesDescription:(NSDictionary*)attributesDescription
-   attributesHighlight:(NSDictionary*)attributesHighlight
- attributesSnippet:(NSDictionary*)attributesSnippet
-attributesSnippetHighlight:(NSDictionary*)attributesSnippetHighlight;
+  shouldHighlightWords:(BOOL)shouldHighlightWords
+searchType:(SearchType)searchType;
 
 @end
diff --git a/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.m b/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.m
index 7451fe3..f5666ad 100644
--- a/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
+++ b/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
@@ -4,49 +4,66 @@
 #import "SearchResultAttributedString.h"
 #import "Defines.h"
 #import "NSString+Extras.h"
+#import "UIColor+WMFHexColor.h"
+
+static CGFloat const kFontSize= 16.0f;
+static const NSInteger kFontColor = 0x383838;
+
+static CGFloat const kDescriptionFontSize= 12.0f;
+static const NSInteger kDescriptionFontColor = 0x606060;
+
+static CGFloat const kSnippetFontSize = 12.0f;
+static const NSInteger kSnippetFontColor  = 0x00;
+static const NSInteger kSnippetHighlightColor = 0xff;
+
+static CGFloat const kHighlightedFontSize= 16.0f;
+static const NSInteger kHighlightedFontColor = 0x00;
+
+static CGFloat const kPaddingAboveDescription = 2.0f;
+static CGFloat const kPaddingAboveSnippet = 3.0f;
 
 @implementation SearchResultAttributedString
 
-+ (instancetype) initWithTitle:(NSString*)title
-   snippet:(NSString*)snippet
-   wikiDataDescription:(NSString*)description
-highlightWords:(NSArray*)wordsToHighlight
-searchType:(SearchType)searchType
-   attributesTitle:(NSDictionary*)attributesTitle
- attributesDescription:(NSDictionary*)attributesDescription
-   attributesHighlight:(NSDictionary*)attributesHighlight
- attribut

[MediaWiki-commits] [Gerrit] Use VE's fixBase utility so link previews point to the right... - change (mediawiki...Flow)

2015-04-24 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Use VE's fixBase utility so link previews point to the right 
place
..

Use VE's fixBase utility so link previews point to the right place

This'll prevent link previews from pointing to URLs like
/w/Main_Page if you happen to be at a /w/index.php?...-style URL.

Depends on I42dfd4b90 in VisualEditor.

Bug: T96492
Change-Id: I6da5de2d94ce9d8c7b4a051e76a0937744800259
---
M modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/68/206468/1

diff --git 
a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js 
b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
index 968fa04..763fb02 100644
--- a/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
+++ b/modules/editor/editors/visualeditor/ext.flow.editors.visualeditor.js
@@ -50,6 +50,8 @@
target = this.target = new mw.flow.ve.Target();
 
htmlDoc = ve.createDocumentFromHtml( content ); // HTMLDocument
+   // Fix missing base URL
+   ve.init.mw.Target.static.fixBase( htmlDoc );
 
// Based on ve.init.mw.Target.prototype.setupSurface
dmDoc = this.dmDoc = ve.dm.converter.getModelFromDom( htmlDoc, {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6da5de2d94ce9d8c7b4a051e76a0937744800259
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] Fix for page history sections showing only time instead of d... - change (apps...wikipedia)

2015-04-24 Thread Fjalapeno (Code Review)
Fjalapeno has submitted this change and it was merged.

Change subject: Fix for page history sections showing only time instead of date.
..


Fix for page history sections showing only time instead of date.

T96268

Change-Id: I6b7cda512ad90dc40b139d85c245196bfcac91f7
---
M Wikipedia/Categories/NSDateFormatter+WMFExtensions.h
M Wikipedia/Categories/NSDateFormatter+WMFExtensions.m
M Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
3 files changed, 20 insertions(+), 2 deletions(-)

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



diff --git a/Wikipedia/Categories/NSDateFormatter+WMFExtensions.h 
b/Wikipedia/Categories/NSDateFormatter+WMFExtensions.h
index 7815191..31117d8 100644
--- a/Wikipedia/Categories/NSDateFormatter+WMFExtensions.h
+++ b/Wikipedia/Categories/NSDateFormatter+WMFExtensions.h
@@ -33,4 +33,9 @@
  */
 + (NSDateFormatter*)wmf_shortTimeFormatterWithLocale:(NSLocale*)locale;
 
+/**
+ * Create a long style date formatter. Sample: "April 24, 2015".
+ */
++ (NSDateFormatter*)wmf_longDateFormatter;
+
 @end
diff --git a/Wikipedia/Categories/NSDateFormatter+WMFExtensions.m 
b/Wikipedia/Categories/NSDateFormatter+WMFExtensions.m
index 43e7da5..51d1ef5 100644
--- a/Wikipedia/Categories/NSDateFormatter+WMFExtensions.m
+++ b/Wikipedia/Categories/NSDateFormatter+WMFExtensions.m
@@ -37,4 +37,18 @@
 return shortTimeFormatter;
 }
 
++ (NSDateFormatter*)wmf_longDateFormatter {
+static NSDateFormatter* longDateFormatter = nil;
+if (!longDateFormatter) {
+// See: https://www.mediawiki.org/wiki/Manual:WfTimestamp
+longDateFormatter = [[NSDateFormatter alloc] init];
+[longDateFormatter setTimeZone:[NSTimeZone timeZoneWithName:@"UTC"]];
+[longDateFormatter setDateFormat:@"'-'MM'-'dd'T'HH':'mm':'ss'Z'"];
+longDateFormatter.dateStyle = NSDateFormatterLongStyle;
+longDateFormatter.timeStyle = NSDateFormatterNoStyle;
+longDateFormatter.formatterBehavior = NSDateFormatterBehavior10_4;
+}
+return longDateFormatter;
+}
+
 @end
diff --git a/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m 
b/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
index d2b0960..abc191b 100644
--- a/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
+++ b/Wikipedia/View Controllers/PageHistory/PageHistoryViewController.m
@@ -193,8 +193,7 @@
 
 NSNumber* daysAgo = sectionDict[@"daysAgo"];
 NSDate* date  = [NSDate dateWithDaysBeforeNow:daysAgo.integerValue];
-
-label.text = [[NSDateFormatter wmf_shortTimeFormatter] 
stringFromDate:date];
+label.text = [[NSDateFormatter wmf_longDateFormatter] stringFromDate:date];
 
 [view addSubview:label];
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6b7cda512ad90dc40b139d85c245196bfcac91f7
Gerrit-PatchSet: 2
Gerrit-Project: apps/ios/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Mhurd 
Gerrit-Reviewer: Bgerstle 
Gerrit-Reviewer: Dr0ptp4kt 
Gerrit-Reviewer: Fjalapeno 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Update to $wgCentralSelectedBannerDispatcher - change (mediawiki...CentralNotice)

2015-04-24 Thread Awight (Code Review)
Awight has uploaded a new change for review.

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

Change subject: Update to $wgCentralSelectedBannerDispatcher
..

Update to $wgCentralSelectedBannerDispatcher

Kills the $wgCentralPagePath variable.

TODO:
* Remove any assignments from operations/mediawiki/config.

Change-Id: If5b37372fb71fb545e632732da850a375d26c3c1
---
M CentralNotice.hooks.php
M CentralNotice.php
M modules/ext.centralNotice.bannerController/bannerController.js
3 files changed, 5 insertions(+), 19 deletions(-)


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

diff --git a/CentralNotice.hooks.php b/CentralNotice.hooks.php
index 60afc95..60fb03a 100644
--- a/CentralNotice.hooks.php
+++ b/CentralNotice.hooks.php
@@ -36,15 +36,9 @@
  */
 function efCentralNoticeSetup() {
global $wgHooks, $wgNoticeInfrastructure, $wgAutoloadClasses, 
$wgSpecialPages,
-  $wgCentralNoticeLoader, $wgSpecialPageGroups, 
$wgCentralPagePath, $wgScript,
+  $wgCentralNoticeLoader, $wgSpecialPageGroups, $wgScript,
   $wgNoticeUseTranslateExtension, $wgAPIModules, 
$wgAPIListModules,
   $wgAvailableRights, $wgGroupPermissions, $wgCentralDBname, 
$wgDBname;
-
-   // If $wgCentralPagePath hasn't been set, set it to the local script 
path.
-   // We do this here since $wgScript isn't set until after 
LocalSettings.php loads.
-   if ( $wgCentralPagePath === false ) {
-   $wgCentralPagePath = $wgScript;
-   }
 
// Default for a standalone wiki is that the CN tables are in the main 
database.
if ( $wgCentralDBname === false ) {
@@ -312,7 +306,7 @@
  * @return bool
  */
 function efResourceLoaderGetConfigVars( &$vars ) {
-   global $wgNoticeFundraisingUrl, $wgCentralPagePath, $wgContLang, 
$wgNoticeXXCountries,
+   global $wgNoticeFundraisingUrl, $wgContLang, $wgNoticeXXCountries,
   $wgNoticeInfrastructure, $wgNoticeCloseButton,
   $wgCentralBannerRecorder, $wgNoticeNumberOfBuckets, 
$wgNoticeBucketExpiry,
   $wgNoticeNumberOfControllerBuckets, 
$wgNoticeCookieDurations, $wgScript,
@@ -339,13 +333,12 @@
$mc = MobileContext::singleton();
if ( $mc->shouldDisplayMobileView() ) {
$wgNoticeFundraisingUrl = $mc->getMobileUrl( 
$wgNoticeFundraisingUrl );
-   $wgCentralPagePath = $mc->getMobileUrl( 
$wgCentralPagePath );
$wgCentralBannerRecorder = $mc->getMobileUrl( 
$wgCentralBannerRecorder );
+   $wgCentralSelectedBannerDispatcher = $mc->getMobileUrl( 
$wgCentralSelectedBannerDispatcher );
}
}
 
$vars[ 'wgNoticeFundraisingUrl' ] = $wgNoticeFundraisingUrl;
-   $vars[ 'wgCentralPagePath' ] = $wgCentralPagePath;
$vars[ 'wgCentralBannerRecorder' ] = $wgCentralBannerRecorder;
$vars[ 'wgCentralNoticeSampleRate' ] = $wgCentralNoticeSampleRate;
 
diff --git a/CentralNotice.php b/CentralNotice.php
index b606452..24e8d3f 100644
--- a/CentralNotice.php
+++ b/CentralNotice.php
@@ -74,10 +74,6 @@
 // for example '//meta.wikimedia.org'. This is used for DNS prefetching.
 $wgCentralHost = false;
 
-// The script path on the wiki that hosts the CentralNotice infrastructure
-// For example 'http://meta.wikimedia.org/w/index.php'
-$wgCentralPagePath = false;
-
 // The API path on the wiki that hosts the CentralNotice infrastructure
 // For example 'http://meta.wikimedia.org/api.php'
 // This must be set if you enable the selection of banners on the client and
@@ -87,7 +83,7 @@
 $wgCentralNoticeApiUrl = false;
 
 // URL for BannerLoader, for requests to fetch a banner that is already
-// known (using the banner URL param). If false, it will default to
+// known (using the "banner" URL param). If false, it will default to
 // Special:BannerLoader on the machine serving ResourceLoader requests.
 $wgCentralSelectedBannerDispatcher = false;
 
diff --git a/modules/ext.centralNotice.bannerController/bannerController.js 
b/modules/ext.centralNotice.bannerController/bannerController.js
index ab0c740..a505917 100644
--- a/modules/ext.centralNotice.bannerController/bannerController.js
+++ b/modules/ext.centralNotice.bannerController/bannerController.js
@@ -147,16 +147,13 @@
 
// Get the requested banner
bannerPageQuery = {
-   title: 'Special:BannerLoader',
banner: bannerName,
campaign: campaign,
uselang: mw.config.get( 'wgUserLanguage' ),
debug: mw.centralNotice.data.getVars.debug
};
 
-   // TODO use the new $wgCentralSelectedBannerDispatcher 
here instead
-
-  

[MediaWiki-commits] [Gerrit] Translate LaTeX to corresponding Mathematica with review cha... - change (mediawiki...MathSearch)

2015-04-24 Thread Sharmaans (Code Review)
Sharmaans has uploaded a new change for review.

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

Change subject: Translate LaTeX to corresponding Mathematica with review changes
..

Translate LaTeX to corresponding Mathematica with review changes

LaTeX to Mathematica translation script with suggested changes 
implemented,including titles in the .json files, phpDoc comments added, globals 
replaced by requests, and other miscellaneous suggestions.

Change-Id: Iea4a9395cba5683b5eec63aff6940f573adcb036
---
D .idea/deployment.xml
M i18n/en.json
M i18n/qqq.json
M includes/special/LaTeXTranslator.php
4 files changed, 49 insertions(+), 128 deletions(-)


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

diff --git a/.idea/deployment.xml b/.idea/deployment.xml
deleted file mode 100644
index d53359f..000
--- a/.idea/deployment.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-  
-
-  
-
-  
-
-  
-
-  
-
-  
-
\ No newline at end of file
diff --git a/i18n/en.json b/i18n/en.json
index a82101b..23c34aa 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,7 +9,8 @@
 "mathdownload": "Download math search results",
 "mathindex": "Math index",
 "mathupload": "Submit math search results",
-"specialpages-group-mathsearch": "Math search",
+"latextranslator": "LaTeX to Mathematica Translation",
+  "specialpages-group-mathsearch": "Math search",
 "mathsearch-desc": "Integrates the [http://search.mathweb.org/about.html 
MathWeb Search] engine",
 "getequationsbyquery": "Get equations by query",
 "xquerygenerator": "XQuery generator",
@@ -56,5 +57,5 @@
 "math-search-type-0": "Keyword",
 "math-search-type-1": "TeX pattern",
 "math-search-type-2": "xQuery expression",
-"math-search-expression-label": "Expression:"
+"math-search-expression-label": "Expression:",
 }
\ No newline at end of file
diff --git a/i18n/qqq.json b/i18n/qqq.json
index d80f7d6..026e9d5 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -18,6 +18,7 @@
"getequationsbyquery": "{{doc-special|GetEquationByQuery}}",
"xquerygenerator": "{{doc-special|XQueryGenerator}}",
"mathdebug": "{{doc-special|MathDebug}}",
+"latextranslator": "{{doc-special|LaTeX to Mathematica Translator}}",
"math-wmc-attach-results-help": "Form label help text",
"math-wmc-attach-results-label": "Form label",
"math-wmc-download-intro": "Introductory text for MathDownload special 
page.",
diff --git a/includes/special/LaTeXTranslator.php 
b/includes/special/LaTeXTranslator.php
index 0804743..23060b6 100644
--- a/includes/special/LaTeXTranslator.php
+++ b/includes/special/LaTeXTranslator.php
@@ -4,17 +4,27 @@
 parent::__construct( 'LaTeXTranslator' );
 }
 
+/**
+ * Returns corresponding Mathematica translations of LaTeX functions
+ * @param $par
+ */
 function execute( $par ) {
 $request = $this->getRequest();
 $output = $this->getOutput();
-$this->setHeaders();
 
 # Get request data from, e.g.
 $param = $request->getText( 'param' );
 
-error_reporting(0);
-ini_set('display_errors', 0);
-
+/**
+ * Returns LaTeX arguments without curly brackets
+ * CURRENTLY NESTED as yields error unnested
+ * When brackR is placed within class, but outside of execute function
+ * Results in "call to undefined function brackR()" error
+ * When use $this->brackR(arg) to process function
+ * Doesn't return processed string parameter -- returns original 
argument
+ * @param $arg
+ * @return string
+ */
 function brackR($arg){
 $arg = trim($arg, " ");
 if ($arg[0] == "{" && $arg[strlen($arg)-1] == "}"){
@@ -22,99 +32,21 @@
 }
 return $arg;
 }
-// EXTREMELY INEFFICIENT to remove captured curly braces--
-// need regex to not capture brackets
-// Also, algorithm could be further condensed
-// by classification of functions by argument type
-// PHP FORM: 
http://stackoverflow.com/questions/5968280/how-to-run-a-php-function-from-an-html-form?rq=1
-
//--
 //\divergence{x}
-$par =  "(\{(?>[^{}]|(?-1))*\})";
-$arg = "([?[A-z]*\]?|[0-9])";
-$data = '
-\Alpha = 0.5
-\Beta = 0.4
-\Gamma = 0.3
-\Delta = 0.2
-\Epsilon = 0.1
-\lambda = 6
-\mu = 5
-\nu = 4
-\rho = 3
-\sigma = 2
-\phi = 1
-\nu = 5
-\sin@@\sigma
-\AiryAi@{\phi}
-\AiryBi{\phi}
-\AiryModulusM@{\nu}
-\AGM@{\phi}{\sigma}
-\AngerJ{\phi}@{\sigma}
-\AppellFi@{\phi}{\sigma}{\rho}{\nu}{\mu}{\lambda}
-\BarnesGamma@{\sigma}
-\BesselJ{\Alpha}@{\Alpha}
-\binom{\sigma}{\phi}
-\CatalanNumber@{\Epsilon}
-\ceiling{\sigma}
-

[MediaWiki-commits] [Gerrit] Translate LaTeX to corresponding Mathematica with review cha... - change (mediawiki...MathSearch)

2015-04-24 Thread Sharmaans (Code Review)
Sharmaans has uploaded a new change for review.

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

Change subject: Translate LaTeX to corresponding Mathematica with review changes
..

Translate LaTeX to corresponding Mathematica with review changes

LaTeX to Mathematica translation script with suggested changes 
implemented,including titles in the .json files, phpDoc comments added, globals 
replaced by requests, and other miscellaneous suggestions.

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


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

diff --git a/MathSearch.php b/MathSearch.php
index d96ebbc..7cee6be 100644
--- a/MathSearch.php
+++ b/MathSearch.php
@@ -49,7 +49,7 @@
 $wgAutoloadClasses['MathSearchUtils'] = __DIR__ . 
'/includes/MathSearchUtils.php';
 $wgAutoloadClasses['MathSearchTerm'] = __DIR__ . 
'/includes/MathSearchTerm.php';
 $wgAutoloadClasses['MwsDumpWriter'] = __DIR__ . '/includes/MwsDumpWriter.php';
-$wgAutoloadClasses['LaTexTranslator'] = __DIR__ . 
'/includes/special/LaTeXTranslator.php';
+$wgAutoloadClasses['LaTeXTranslator'] = __DIR__ . 
'/includes/special/LaTeXTranslator.php';
 
 $wgMessagesDirs['MathSeach'] = __DIR__ . '/i18n';
 $wgExtensionMessagesFiles['MathSearch'] = __DIR__ . '/MathSearch.i18n.php';
@@ -62,7 +62,7 @@
 $wgSpecialPageGroups['MathDebug'] = 'mathsearch';
 $wgSpecialPageGroups['MathIndex'] = 'mathsearch';
 $wgSpecialPageGroups['DisplayTopics'] = 'mathsearch';
-$wgSpecialPageGroups['LaTexTranslator'] = 'mathsearch';
+$wgSpecialPageGroups['LaTeXTranslator'] = 'mathsearch';
 
 $wgSpecialPages['MathSearch'] = 'SpecialMathSearch';
 $wgSpecialPages['FormulaInfo'] = 'FormulaInfo';
@@ -70,7 +70,7 @@
 $wgSpecialPages['MathDebug'] = 'SpecialMathDebug';
 $wgSpecialPages['MathIndex'] = 'SpecialMathIndex';
 $wgSpecialPages['DisplayTopics'] = 'SpecialDisplayTopics';
-$wgSpecialPages['LaTexTranslator'] = 'LaTexTranslator';
+$wgSpecialPages['LaTeXTranslator'] = 'LaTeXTranslator';
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 
'MathSearchHooks::onLoadExtensionSchemaUpdates';
 $wgHooks['MathFormulaPostRender']['updateIndex'] = 
'MathSearchHooks::updateMathIndex';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib0f4aefb7a376fb58d0236970d45e29c15f90fe0
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MathSearch
Gerrit-Branch: master
Gerrit-Owner: Sharmaans 

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


[MediaWiki-commits] [Gerrit] Port ve.init.mw.Target to ve.fixBase() - change (mediawiki...VisualEditor)

2015-04-24 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Port ve.init.mw.Target to ve.fixBase()
..

Port ve.init.mw.Target to ve.fixBase()

The old code in ve.init.mw.Target.static.fixBase was mostly
moved to ve.fixBase(), and the new ve.init.mw.Target.static.fixBase
contains MW-specific logic on top of that. This allows us to get
rid of the base fixing logic in onLoad().

Depends on I607fa579733 in VE core.

Change-Id: I42dfd4b90e86eb67d0111fffafc18e1152249610
---
M modules/ve-mw/init/ve.init.mw.Target.js
1 file changed, 16 insertions(+), 40 deletions(-)


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

diff --git a/modules/ve-mw/init/ve.init.mw.Target.js 
b/modules/ve-mw/init/ve.init.mw.Target.js
index 8157055..96bdd22 100644
--- a/modules/ve-mw/init/ve.init.mw.Target.js
+++ b/modules/ve-mw/init/ve.init.mw.Target.js
@@ -267,25 +267,20 @@
 /* Static Methods */
 
 /**
- * Take a target document with a possibly relative base URL, and modify it to 
be absolute.
- * The base URL of the target document is resolved using the base URL of the 
source document.
- * @param {HTMLDocument} targetDoc Document whose base URL should be resolved
- * @param {HTMLDocument} sourceDoc Document whose base URL should be used for 
resolution
+ * Fix the base URL from Parsoid if necessary.
+ *
+ * Absolutizes the base URL if it's relative, and sets a base URL based on 
wgArticlePath
+ * if there was no base URL at all.
+ *
+ * @param {HTMLDocument} doc Parsoid document
  */
-ve.init.mw.Target.static.fixBase = function ( targetDoc, sourceDoc ) {
-   var baseNode;
-   if ( !targetDoc.baseURI ) {
-   baseNode = targetDoc.getElementsByTagName( 'base' )[0];
-   if ( baseNode ) {
-   // Modify the existing  tag
-   baseNode.setAttribute( 'href', ve.resolveUrl( 
baseNode.getAttribute( 'href' ), sourceDoc ) );
-   } else {
-   // No  tag, add one
-   baseNode = targetDoc.createElement( 'base' );
-   baseNode.setAttribute( 'href', sourceDoc.baseURI );
-   sourceDoc.head.appendChild( baseNode );
-   }
-   }
+ve.init.mw.Target.static.fixBase = function ( doc ) {
+   ve.fixBase( doc, document, ve.resolveUrl(
+   // Don't replace $1 with the page name, because that'll break if
+   // the page name contains a slash
+   mw.config.get( 'wgArticlePath' ).replace( '$1', '' ),
+   document
+   ) );
 };
 
 /**
@@ -301,7 +296,7 @@
  * @fires loadError
  */
 ve.init.mw.Target.onLoad = function ( response ) {
-   var i, len, linkData, aboutDoc, docRevIdMatches, baseNode,
+   var i, len, linkData, aboutDoc, docRevIdMatches,
docRevId = 0,
data = response ? response.visualeditor : null;
 
@@ -314,27 +309,8 @@
this.originalHtml = data.content;
this.doc = ve.parseXhtml( this.originalHtml );
 
-   // Parsoid outputs a protocol-relative  tag, so 
absolutize it
-   this.constructor.static.fixBase( this.doc, document );
-
-   // If the document has an invalid  tag or no  tag 
at all (new pages,
-   // for example, don't have a  tag) then set a base URI 
based on wgArticlePath.
-   if ( !this.doc.baseURI ) {
-   // Use existing  tag if present
-   baseNode = this.doc.getElementsByName( 'base' )[0] || 
this.doc.createElement( 'base' );
-   baseNode.setAttribute( 'href',
-   ve.resolveUrl(
-   // Don't replace $1 with this.pageName, 
because that'll break if
-   // this.pageName contains a slash
-   mw.config.get( 'wgArticlePath' 
).replace( '$1', '' ),
-   document
-   )
-   );
-   // If baseNode was created by us, attach it
-   if ( !baseNode.parentNode ) {
-   this.doc.head.appendChild( baseNode );
-   }
-   }
+   // Fix relative or missing base URL if needed
+   this.constructor.static.fixBase( this.doc );
 
this.remoteNotices = ve.getObjectValues( data.notices );
this.protectedClasses = data.protectedClasses;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I42dfd4b90e86eb67d0111fffafc18e1152249610
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: ma

[MediaWiki-commits] [Gerrit] Add ve.fixBase() utility - change (VisualEditor/VisualEditor)

2015-04-24 Thread Catrope (Code Review)
Catrope has uploaded a new change for review.

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

Change subject: Add ve.fixBase() utility
..

Add ve.fixBase() utility

Utility to convert relative base URLs to absolute ones.
Based on code in VE-MW, but changed significantly.

In particular, this one has a fallbackBase parameter which
fills in a base URL if the document doesn't have a  tag.
We have to use the presence of a  tag rather than .baseURI
because in Firefox (but not in Chrome), secondary documents inherit
the base URI of the main document.

Change-Id: I607fa5797334dda6db11c6c0799d2c9e5024d993
---
M src/ve.utils.js
1 file changed, 32 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/VisualEditor/VisualEditor 
refs/changes/63/206463/1

diff --git a/src/ve.utils.js b/src/ve.utils.js
index 3377050..2daadee 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -867,6 +867,38 @@
 };
 
 /**
+ * Take a target document with a possibly relative base URL, and modify it to 
be absolute.
+ * The base URL of the target document is resolved using the base URL of the 
source document.
+ *
+ * Note that the the fallbackBase parameter will be used if there is no  
tag, even if
+ * the document does have a valid base URL: this is to work around Firefox's 
behavior of having
+ * documents created by DOMParser inherit the base URL of the main document.
+ *
+ * @param {HTMLDocument} targetDoc Document whose base URL should be resolved
+ * @param {HTMLDocument} sourceDoc Document whose base URL should be used for 
resolution
+ * @param {string} [fallbackBase] Base URL to use if resolving the base URL 
fails or there is no  tag
+ */
+ve.fixBase = function ( targetDoc, sourceDoc, fallbackBase ) {
+   var baseNode = targetDoc.getElementsByTagName( 'base' )[0];
+   if ( baseNode ) {
+   if ( !targetDoc.baseURI ) {
+   //  tag present but not valid, try resolving its 
URL
+   baseNode.setAttribute( 'href', ve.resolveUrl( 
baseNode.getAttribute( 'href' ), sourceDoc ) );
+   if ( !targetDoc.baseURI && fallbackBase ) {
+   // That didn't work, use the fallback
+   baseNode.setAttribute( 'href', fallbackBase );
+   }
+   }
+   // else:  tag present and valid, do nothing
+   } else if ( fallbackBase ) {
+   // No  tag, add one
+   baseNode = targetDoc.createElement( 'base' );
+   baseNode.setAttribute( 'href', fallbackBase );
+   targetDoc.head.appendChild( baseNode );
+   }
+};
+
+/**
  * Check if a string is a valid URI component.
  *
  * A URI component is considered invalid if decodeURIComponent() throws an 
exception.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I607fa5797334dda6db11c6c0799d2c9e5024d993
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Catrope 

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


[MediaWiki-commits] [Gerrit] T97162: add test for normalization - change (wikidata...rdf)

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

Change subject: T97162: add test for normalization
..


T97162: add test for normalization

Change-Id: I68304e8901af14745927434b5dd3b1da39c1cf7f
---
M 
tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java
1 file changed, 21 insertions(+), 0 deletions(-)

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



diff --git 
a/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java
 
b/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java
index 7edc328..a6ba754 100644
--- 
a/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java
+++ 
b/tools/src/test/java/org/wikidata/query/rdf/tool/wikibase/WikibaseRepositoryIntegrationTest.java
@@ -122,5 +122,26 @@
 assertTrue("Didn't find entity information in rdf", found);
 }
 
+@Test
+public void fetchIsNormalized() throws RetryableException, 
ContainedException {
+long now = System.currentTimeMillis();
+String entityId = 
repo.firstEntityIdForLabelStartingWith("QueryTestItem", "en", "item");
+repo.setLabel(entityId, "item", "QueryTestItem" + now, "en");
+Collection statements = repo.fetchRdfForEntity(entityId);
+boolean foundBad = false, foundGood = false;
+for (Statement statement : statements) {
+
if(statement.getObject().stringValue().contains("http://www.wikidata.org/ontology-beta#";))
 {
+foundBad = true;
+}
+
if(statement.getObject().stringValue().contains("http://www.wikidata.org/ontology-0.0.1#";))
 {
+foundBad = true;
+}
+
if(statement.getObject().stringValue().contains("http://www.wikidata.org/ontology#";))
 {
+foundGood = true;
+}
+}
+assertTrue("Did not find correct ontology statements", foundGood);
+assertFalse("Found incorrect ontology statements", foundBad);
+}
 // TODO we should verify the RDF dump format against a stored file
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68304e8901af14745927434b5dd3b1da39c1cf7f
Gerrit-PatchSet: 2
Gerrit-Project: wikidata/query/rdf
Gerrit-Branch: master
Gerrit-Owner: Smalyshev 
Gerrit-Reviewer: Manybubbles 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix for read more results being bold. - change (apps...wikipedia)

2015-04-24 Thread Mhurd (Code Review)
Mhurd has uploaded a new change for review.

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

Change subject: Fix for read more results being bold.
..

Fix for read more results being bold.

Also cleaned up the search result attributed string.

Removed some items from defines file.

Change-Id: I84e1798d3cee86505ee15aaeb4fa35d4fae65103
---
M Wikipedia/Defines/Defines.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
M Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
M Wikipedia/View Controllers/SearchResults/SearchResultsController.m
4 files changed, 119 insertions(+), 108 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/ios/wikipedia 
refs/changes/62/206462/1

diff --git a/Wikipedia/Defines/Defines.h b/Wikipedia/Defines/Defines.h
index 2a7c0b2..c9b4eee 100644
--- a/Wikipedia/Defines/Defines.h
+++ b/Wikipedia/Defines/Defines.h
@@ -14,27 +14,10 @@
 
 
 #define SEARCH_THUMBNAIL_WIDTH (48 * 3)
-#define SEARCH_RESULT_HEIGHT (74.0 * MENUS_SCALE_MULTIPLIER)
 #define SEARCH_MAX_RESULTS 24
 
 #define SEARCH_TEXT_FIELD_FONT [UIFont systemFontOfSize:(14.0 * 
MENUS_SCALE_MULTIPLIER)]
 #define SEARCH_TEXT_FIELD_HIGHLIGHTED_COLOR [UIColor blackColor]
-
-#define SEARCH_RESULT_FONT [UIFont systemFontOfSize:(16.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_FONT_COLOR [UIColor colorWithWhite:0.15 alpha:1.0]
-
-#define SEARCH_RESULT_DESCRIPTION_FONT [UIFont systemFontOfSize:(12.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_DESCRIPTION_FONT_COLOR [UIColor colorWithWhite:0.4 
alpha:1.0]
-
-#define SEARCH_RESULT_SNIPPET_FONT [UIFont italicSystemFontOfSize:(12.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_SNIPPET_FONT_COLOR [UIColor blackColor]
-#define SEARCH_RESULT_SNIPPET_HIGHLIGHT_COLOR WMF_COLOR_BLUE
-
-#define SEARCH_RESULT_FONT_HIGHLIGHTED [UIFont boldSystemFontOfSize:(16.0 * 
MENUS_SCALE_MULTIPLIER)]
-#define SEARCH_RESULT_FONT_HIGHLIGHTED_COLOR [UIColor blackColor]
-
-#define SEARCH_RESULT_PADDING_ABOVE_DESCRIPTION 2.0f
-#define SEARCH_RESULT_PADDING_ABOVE_SNIPPET 3.0f
 
 #define SEARCH_FIELD_PLACEHOLDER_TEXT_COLOR [UIColor colorWithRed:0.7 
green:0.7 blue:0.7 alpha:1.0]
 
diff --git a/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.h b/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.h
index 1f94331..ea65374 100644
--- a/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
+++ b/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.h
@@ -9,12 +9,7 @@
snippet:(NSString*)snippet
wikiDataDescription:(NSString*)description
 highlightWords:(NSArray*)wordsToHighlight
-searchType:(SearchType)searchType
-// Note: pointers to attributes dictionaries are passed to this method for 
performance/memory reasons.
-   attributesTitle:(NSDictionary*)attributesTitle
- attributesDescription:(NSDictionary*)attributesDescription
-   attributesHighlight:(NSDictionary*)attributesHighlight
- attributesSnippet:(NSDictionary*)attributesSnippet
-attributesSnippetHighlight:(NSDictionary*)attributesSnippetHighlight;
+  shouldHighlightWords:(BOOL)shouldHighlightWords
+searchType:(SearchType)searchType;
 
 @end
diff --git a/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.m b/Wikipedia/View 
Controllers/SearchResults/SearchResultAttributedString.m
index 7451fe3..f1bbafc 100644
--- a/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
+++ b/Wikipedia/View Controllers/SearchResults/SearchResultAttributedString.m
@@ -4,49 +4,66 @@
 #import "SearchResultAttributedString.h"
 #import "Defines.h"
 #import "NSString+Extras.h"
+#import "UIColor+WMFHexColor.h"
+
+static CGFloat const kFontSize= 16.0f;
+static const NSInteger kFontColor = 0x383838;
+
+static CGFloat const kDescriptionFontSize= 12.0f;
+static const NSInteger kDescriptionFontColor = 0x606060;
+
+static CGFloat const kSnippetFontSize = 12.0f;
+static const NSInteger kSnippetFontColor  = 0x00;
+static const NSInteger kSnippetHighlightColor = 0xff;
+
+static CGFloat const kHighlightedFontSize= 16.0f;
+static const NSInteger kHighlightedFontColor = 0x00;
+
+static CGFloat const kPaddingAboveDescription = 2.0f;
+static CGFloat const kPaddingAboveSnippet = 3.0f;
 
 @implementation SearchResultAttributedString
 
-+ (instancetype) initWithTitle:(NSString*)title
-   snippet:(NSString*)snippet
-   wikiDataDescription:(NSString*)description
-highlightWords:(NSArray*)wordsToHighlight
-searchType:(SearchType)searchType
-   attributesTitle:(NSDictionary*)attributesTitle
- attributesDescription:(NSDictionary*)attributesDescription
-   attributesHighlight:(NSDictionary*)attribut

[MediaWiki-commits] [Gerrit] Stop Gather from erroring - change (mediawiki...Gather)

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

Change subject: Stop Gather from erroring
..


Stop Gather from erroring

Follow up to If7bb1941d37ca8ebe20594f4fbf2857d27eac311

Bug: T97175
Change-Id: I63780f9cf57bb69357c7228691bc7bc5ca4d
---
M includes/specials/SpecialGather.php
1 file changed, 3 insertions(+), 2 deletions(-)

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



diff --git a/includes/specials/SpecialGather.php 
b/includes/specials/SpecialGather.php
index bff4d2f..0246c9a 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -51,6 +51,7 @@
'ext.gather.icons',
'ext.gather.styles',
) );
+   $routeMatch = $this->checkRoute( $subpage );
if ( !isset( $subpage ) || $subpage === '' || $subpage === 'by' 
|| $subpage === 'by/' ) {
// Root subpage. User owned collections.
// For listing own lists, you need to be logged in
@@ -70,10 +71,10 @@
} else {
$this->renderUserCollectionsList( $user );
}
-   } elseif ( $this->checkRoute( $subpage ) ) {
+   } elseif ( $routeMatch !== false ) {
// Collection page
// /id/:id
-   $id = (int)$matches['id'];
+   $id = (int)$routeMatch['id'];
$this->renderUserCollection( $id );
} elseif ( preg_match( '/^by\/(?[^\/]+)\/(?\d+)$/', 
$subpage, $matches ) ) {
// Collection page

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I63780f9cf57bb69357c7228691bc7bc5ca4d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 
Gerrit-Reviewer: Yuvipanda 
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] Remove Browse tag first letter style - change (mediawiki...MobileFrontend)

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

Change subject: [Beta] Remove Browse tag first letter style
..


[Beta] Remove Browse tag first letter style

This'll have to be done manually, e.g. NBA All Stars shouldn't have its
first letter lowercased.

Change-Id: Ia84fdfe68021ce29ef5216467e588afb2421b42e
---
M less/browse/tags.less
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/less/browse/tags.less b/less/browse/tags.less
index 2294576..1f69812 100644
--- a/less/browse/tags.less
+++ b/less/browse/tags.less
@@ -11,10 +11,6 @@
padding: 0 .75em;
border-radius: .2em;
 
-   &:first-letter {
-   text-transform: lowercase;
-   }
-
a,
a:visited {
color: @grayMediumDark;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia84fdfe68021ce29ef5216467e588afb2421b42e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MobileFrontend
Gerrit-Branch: master
Gerrit-Owner: Phuedx 
Gerrit-Reviewer: Bmansurov 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Run hdfs balancer weekly - change (operations/puppet)

2015-04-24 Thread Ottomata (Code Review)
Ottomata has uploaded a new change for review.

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

Change subject: Run hdfs balancer weekly
..

Run hdfs balancer weekly

Change-Id: I5f6a8eefcec3dcc7e55640cec8a30f6efcdd8c15
---
M manifests/role/analytics/hadoop.pp
M manifests/site.pp
2 files changed, 19 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/61/206461/1

diff --git a/manifests/role/analytics/hadoop.pp 
b/manifests/role/analytics/hadoop.pp
index c2f16d7..637e2b0 100644
--- a/manifests/role/analytics/hadoop.pp
+++ b/manifests/role/analytics/hadoop.pp
@@ -605,3 +605,19 @@
 }
 }
 }
+
+
+# == Class role::analytics::hadoop::balancer
+# Runs hdfs balancer periodically to keep data balanced across all DataNodes
+class role::analytics::hadoop::balancer {
+Class['role::analytics::hadoop::client'] -> 
Class['role::analytics::hadoop::balancer']
+
+cron {'hdfs-balancer':
+command => 'hdfs dfsadmin -setBalancerBandwidth $((40*1048576)) && 
/usr/bin/hdfs balancer 2>&1 > /var/log/hadoop-hdfs/balancer.log'
+user=> 'hdfs',
+# Start run at 0:00 every Saturday UTC.
+minute  => 0,
+hour=> 0,
+weekday => 6,
+}
+}
diff --git a/manifests/site.pp b/manifests/site.pp
index 2abdbfd..a7008b3 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -206,6 +206,9 @@
 # icinga is not notified of a successful import
 # hourly, icinga should generate an alert.
 include role::analytics::refinery::data::check::icinga
+
+# Include a weekly cron job to run hdfs balancer.
+include role::analytics::hadoop::balancer
 }
 
 

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

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

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


[MediaWiki-commits] [Gerrit] Show the notification count - change (mediawiki...MobileFrontend)

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

Change subject: Show the notification count
..


Show the notification count

Bug: T97179
Change-Id: I78df44ac3d96d38537cf8ba59b35f6619bc7f2f4
---
M less/ui.less
1 file changed, 3 insertions(+), 6 deletions(-)

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



diff --git a/less/ui.less b/less/ui.less
index 10893ac..1ce2e83 100644
--- a/less/ui.less
+++ b/less/ui.less
@@ -280,6 +280,9 @@
margin: .6em .6em 0 0;
padding: 0 0.1em;
text-align: center;
+   position: absolute;
+   right: 0;
+   top: -.1em;
 
&.zero {
display: none;
@@ -311,12 +314,6 @@
 
 // FIXME: identify why this is here.
 .alpha {
-   .notification-count {
-   position: absolute;
-   right: 0;
-   top: -.1em;
-   }
-
.spinner {
margin: auto;
}

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

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

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


[MediaWiki-commits] [Gerrit] channels: Continuous-Integration is now Continuous-Integrati... - change (labs...wikibugs2)

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

Change subject: channels: Continuous-Integration is now 
Continuous-Integration-Infrastructure
..


channels: Continuous-Integration is now Continuous-Integration-Infrastructure

Currently ci-infra is now being sent to #wikimedia-dev instead
of #wikimedia-releng.

Bug: T96908
Change-Id: I734a894d37caa4200557eae069a536ff12705c3d
---
M channels.yaml
M test_channels_yaml.py
2 files changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/channels.yaml b/channels.yaml
index 0f7d16d..55d7f24 100644
--- a/channels.yaml
+++ b/channels.yaml
@@ -78,7 +78,7 @@
 - Release-Engineering
 - Blocked-on-RelEng
 # projects
-- Continuous-integration
+- Continuous-Integration-Infrastructure
 - Beta-Cluster
 - Staging
 - Deployment-Systems
diff --git a/test_channels_yaml.py b/test_channels_yaml.py
index f1f745a..c3b660c 100755
--- a/test_channels_yaml.py
+++ b/test_channels_yaml.py
@@ -13,7 +13,7 @@
 
 assertEquals(
 {'#mediawiki-feed', '#wikimedia-releng'},
-set(chanfilter.channels_for(['Continuous-Integration'])))
+set(chanfilter.channels_for(['Release-Engineering'])))
 
 assertEquals(
 {'#mediawiki-feed', '#wikimedia-devtools', '#wikimedia-dev'},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I734a894d37caa4200557eae069a536ff12705c3d
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/wikibugs2
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Merlijn van Deen 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] integration: Apache turn DirectorySlash Off - change (operations/puppet)

2015-04-24 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: integration: Apache turn DirectorySlash Off
..

integration: Apache turn DirectorySlash Off

T95164 reported how, if an URL ends in a directory without ending in a /,
we are getting 301 redirects to http links. This results in https->http 
redirects.

This is not from individual rewrite rules but it's a feature of mod_dir called
DirectorySlash and it's on by default.

This turns that feature off for the entire VirtualHost, but read the warning on:

http://httpd.apache.org/docs/current/mod/mod_dir.html#directoryslash

Bug:T95164
Change-Id: I577c65b5021b9b9cec7b373ed59e88934334cf5c
---
M modules/contint/templates/apache/integration.wikimedia.org.erb
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/60/206460/1

diff --git a/modules/contint/templates/apache/integration.wikimedia.org.erb 
b/modules/contint/templates/apache/integration.wikimedia.org.erb
index 3de7005..41f4e1c 100644
--- a/modules/contint/templates/apache/integration.wikimedia.org.erb
+++ b/modules/contint/templates/apache/integration.wikimedia.org.erb
@@ -13,6 +13,8 @@
 
 DocumentRoot /srv/org/wikimedia/integration
 
+DirectorySlash Off
+
 RewriteEngine On
 RewriteRule ^/favicon\.ico$ /favicon.php [L]
 # Force any request to HTTPS if not passed via https (misc web varnish)

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

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

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


[MediaWiki-commits] [Gerrit] temporarily block an abusive search query... - change (operations/puppet)

2015-04-24 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: temporarily block an abusive search query...
..


temporarily block an abusive search query...

Change-Id: I0adc35fafdc59a91d02414cae0b896630a1711dc
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 3 insertions(+), 0 deletions(-)

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



diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index b0815c5..c339a66 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -76,6 +76,9 @@
if (req.request == "POST" && req.url ~ 
"index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=")
 {
error 403 "Noise";
}
+   if (req.url ~ "^/w/api.php\?srsearch=Sju\+svarta" && 
req.http.User-Agent ~ "wikipedia") {
+   error 403 "Stop doing this :p";
+   }
 }
 
 sub vcl_recv {

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

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

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


[MediaWiki-commits] [Gerrit] temporarily block an abusive search query... - change (operations/puppet)

2015-04-24 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: temporarily block an abusive search query...
..

temporarily block an abusive search query...

Change-Id: I0adc35fafdc59a91d02414cae0b896630a1711dc
---
M templates/varnish/text-frontend.inc.vcl.erb
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/59/206459/1

diff --git a/templates/varnish/text-frontend.inc.vcl.erb 
b/templates/varnish/text-frontend.inc.vcl.erb
index b0815c5..c339a66 100644
--- a/templates/varnish/text-frontend.inc.vcl.erb
+++ b/templates/varnish/text-frontend.inc.vcl.erb
@@ -76,6 +76,9 @@
if (req.request == "POST" && req.url ~ 
"index\.php\?option=com_jce&task=plugin&plugin=imgmanager&file=imgmanager&method=form&cid=")
 {
error 403 "Noise";
}
+   if (req.url ~ "^/w/api.php\?srsearch=Sju\+svarta" && 
req.http.User-Agent ~ "wikipedia") {
+   error 403 "Stop doing this :p";
+   }
 }
 
 sub vcl_recv {

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

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

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


[MediaWiki-commits] [Gerrit] resourceloader: Add logging for T94810 - change (mediawiki/core)

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

Change subject: resourceloader: Add logging for T94810
..


resourceloader: Add logging for T94810

Bug: T94810
Change-Id: Ibedc31659ed91262bca115101136fe60df6c5134
---
M includes/resourceloader/ResourceLoaderModule.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index ed16521..d1b024f 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -520,6 +520,12 @@
 
wfDebugLog( 'resourceloader', __METHOD__ . ": New definition 
for module "
. "{$this->getName()} in context 
\"{$context->getHash()}\"" );
+   // WMF logging for T94810
+   global $wgRequest;
+   if ( isset( $wgRequest ) && $context->getUser() ) {
+   wfDebugLog( 'resourceloader', __METHOD__ . ": Request 
with user parameter in "
+   . "context \"{$context->getHash()}\" from " . 
$wgRequest->getRequestURL() );
+   }
 
$timestamp = time();
$cache->set( $key, $timestamp );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibedc31659ed91262bca115101136fe60df6c5134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf3
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] resourceloader: Add logging for T94810 - change (mediawiki/core)

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

Change subject: resourceloader: Add logging for T94810
..


resourceloader: Add logging for T94810

Bug: T94810
Change-Id: Ibedc31659ed91262bca115101136fe60df6c5134
---
M includes/resourceloader/ResourceLoaderModule.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/includes/resourceloader/ResourceLoaderModule.php 
b/includes/resourceloader/ResourceLoaderModule.php
index ed16521..d1b024f 100644
--- a/includes/resourceloader/ResourceLoaderModule.php
+++ b/includes/resourceloader/ResourceLoaderModule.php
@@ -520,6 +520,12 @@
 
wfDebugLog( 'resourceloader', __METHOD__ . ": New definition 
for module "
. "{$this->getName()} in context 
\"{$context->getHash()}\"" );
+   // WMF logging for T94810
+   global $wgRequest;
+   if ( isset( $wgRequest ) && $context->getUser() ) {
+   wfDebugLog( 'resourceloader', __METHOD__ . ": Request 
with user parameter in "
+   . "context \"{$context->getHash()}\" from " . 
$wgRequest->getRequestURL() );
+   }
 
$timestamp = time();
$cache->set( $key, $timestamp );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ibedc31659ed91262bca115101136fe60df6c5134
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf2
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
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 space between navbar and jumbotron - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: More space between navbar and jumbotron
..


More space between navbar and jumbotron

Change-Id: I40228b5ade14e62130436dabbd9560dbc06ca560
---
M template.html
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/template.html b/template.html
index 8e95e57..4b7908e 100644
--- a/template.html
+++ b/template.html
@@ -11,7 +11,7 @@
 
 

[MediaWiki-commits] [Gerrit] Show the notification count - change (mediawiki...MobileFrontend)

2015-04-24 Thread Bmansurov (Code Review)
Bmansurov has uploaded a new change for review.

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

Change subject: Show the notification count
..

Show the notification count

Bug: T97179
Change-Id: I78df44ac3d96d38537cf8ba59b35f6619bc7f2f4
---
M less/ui.less
1 file changed, 3 insertions(+), 6 deletions(-)


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

diff --git a/less/ui.less b/less/ui.less
index 10893ac..1ce2e83 100644
--- a/less/ui.less
+++ b/less/ui.less
@@ -280,6 +280,9 @@
margin: .6em .6em 0 0;
padding: 0 0.1em;
text-align: center;
+   position: absolute;
+   right: 0;
+   top: -.1em;
 
&.zero {
display: none;
@@ -311,12 +314,6 @@
 
 // FIXME: identify why this is here.
 .alpha {
-   .notification-count {
-   position: absolute;
-   right: 0;
-   top: -.1em;
-   }
-
.spinner {
margin: auto;
}

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

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

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


[MediaWiki-commits] [Gerrit] More space between navbar and jumbotron - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: More space between navbar and jumbotron
..

More space between navbar and jumbotron

Change-Id: I40228b5ade14e62130436dabbd9560dbc06ca560
---
M template.html
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/57/206457/1

diff --git a/template.html b/template.html
index 8e95e57..4b7908e 100644
--- a/template.html
+++ b/template.html
@@ -11,7 +11,7 @@
 
 

[MediaWiki-commits] [Gerrit] Design tweaks - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Design tweaks
..


Design tweaks

Change-Id: Ib03f039eed6395311519aa6aea2dd138807c950e
---
M template.html
1 file changed, 10 insertions(+), 3 deletions(-)

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



diff --git a/template.html b/template.html
index 8104df9..8e95e57 100644
--- a/template.html
+++ b/template.html
@@ -18,12 +18,19 @@
 list-style: none;
 display: block;
 border-bottom: 1px dotted #ccc;
-padding: 8px;
-marging: 8px;
+padding: 8px 0px;
+}
+
+ul {
+padding-left: 0px;
 }
 
 li.lib .buttons-bar { 
 padding: 8px 0px;
+}
+
+.center {
+text-align: center;
 }
 
 
@@ -50,7 +57,7 @@
 Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
 Thanks to the https://github.com/cdnjs/cdnjs";>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library";>You
 can add your favorite libraries too.
 
-Tip: Use your browser's search function to search! The 
libraries are ordered by popularity. Clicking 'Use' will take show you list of 
files distributed with the library and allows you to include them as you see 
fit
+Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use' will take show 
you list of files distributed with the library and allows you to include them 
as you see fit
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib03f039eed6395311519aa6aea2dd138807c950e
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Actually generate html output - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Actually generate html output
..


Actually generate html output

Change-Id: I5f4a8ebf7eca7b974ea7796c1a080e472115e59c
---
M generate.py
1 file changed, 2 insertions(+), 1 deletion(-)

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



diff --git a/generate.py b/generate.py
index c98ec03..232df99 100644
--- a/generate.py
+++ b/generate.py
@@ -17,7 +17,8 @@
 argparser.add_argument('outputpath', help='Path to html output')
 args = argparser.parse_args()
 
-html = jinja2.Template(args.templatepath, autoescape=True)
+with open(args.templatepath) as f:
+html = jinja2.Template(f.read(), autoescape=True)
 
 all_packages = requests.get(args.cdnjsurl).json()
 libraries = []

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5f4a8ebf7eca7b974ea7796c1a080e472115e59c
Gerrit-PatchSet: 2
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Add blurb about cdnjs community to template - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has submitted this change and it was merged.

Change subject: Add blurb about cdnjs community to template
..


Add blurb about cdnjs community to template

Change-Id: I23dcc768e74fc65381353740e3ba70db5a3fb5c7
---
M template.html
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Krinkle: Looks good to me, but someone else must approve
  Yuvipanda: Verified; Looks good to me, approved



diff --git a/template.html b/template.html
index d0b80dc..8104df9 100644
--- a/template.html
+++ b/template.html
@@ -48,9 +48,9 @@
 
 Mirror of cdnjs.com for use by Wikimedia Tool Labs
 Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
-Tip: Use your browser's search function to search! The 
libraries are ordered by popularity. Clicking 'Use' will take show you list of 
files distributed with the library and allows you to include them as you see 
fit
-
+Thanks to the https://github.com/cdnjs/cdnjs";>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library";>You
 can add your favorite libraries too.
 
+Tip: Use your browser's search function to search! The 
libraries are ordered by popularity. Clicking 'Use' will take show you list of 
files distributed with the library and allows you to include them as you see 
fit
 
 
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I23dcc768e74fc65381353740e3ba70db5a3fb5c7
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Allow setting MySQL session variables via config - change (mediawiki/core)

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

Change subject: Allow setting MySQL session variables via config
..


Allow setting MySQL session variables via config

Change-Id: I39c7e0f5ffe53a3fb15da489f4dddc36af99a4b3
---
M includes/db/Database.php
M includes/db/DatabaseMysqlBase.php
2 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/includes/db/Database.php b/includes/db/Database.php
index 8c1ebf9..605dc7c 100644
--- a/includes/db/Database.php
+++ b/includes/db/Database.php
@@ -69,6 +69,8 @@
protected $mLBInfo = array();
protected $mDefaultBigSelects = null;
protected $mSchemaVars = false;
+   /** @var array */
+   protected $mSessionVars = array();
 
protected $preparedArgs;
 
@@ -813,6 +815,8 @@
}
}
 
+   $this->mSessionVars = $params['variables'];
+
/** Get the default table prefix*/
if ( $tablePrefix == 'get from global' ) {
$this->mTablePrefix = $wgDBprefix;
@@ -926,6 +930,7 @@
$p['password'] = isset( $p['password'] ) ? 
$p['password'] : false;
$p['dbname'] = isset( $p['dbname'] ) ? $p['dbname'] : 
false;
$p['flags'] = isset( $p['flags'] ) ? $p['flags'] : 0;
+   $p['variables'] = isset( $p['variables'] ) ? 
$p['variables'] : array();
$p['tablePrefix'] = isset( $p['tablePrefix'] ) ? 
$p['tablePrefix'] : 'get from global';
$p['schema'] = isset( $p['schema'] ) ? $p['schema'] : 
$defaultSchemas[$dbType];
$p['foreign'] = isset( $p['foreign'] ) ? $p['foreign'] 
: false;
diff --git a/includes/db/DatabaseMysqlBase.php 
b/includes/db/DatabaseMysqlBase.php
index aac95a8..89d3456 100644
--- a/includes/db/DatabaseMysqlBase.php
+++ b/includes/db/DatabaseMysqlBase.php
@@ -132,6 +132,15 @@
if ( is_string( $wgSQLMode ) ) {
$set[] = 'sql_mode = ' . $this->addQuotes( $wgSQLMode );
}
+   // Set any custom settings defined by site config
+   // (e.g. 
https://dev.mysql.com/doc/refman/4.1/en/innodb-parameters.html)
+   foreach ( $this->mSessionVars as $var => $val ) {
+   // Escape strings but not numbers to avoid MySQL 
complaining
+   if ( !is_int( $val ) && !is_float( $val ) ) {
+   $val = $this->addQuotes( $val );
+   }
+   $set[] = $this->addIdentifierQuotes( $var ) . ' = ' . 
$val;
+   }
 
if ( $set ) {
// Use doQuery() to avoid opening implicit transactions 
(DBO_TRX)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39c7e0f5ffe53a3fb15da489f4dddc36af99a4b3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Parent5446 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Avoid pointless master connections in setViewTabs() - change (mediawiki...FlaggedRevs)

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

Change subject: Avoid pointless master connections in setViewTabs()
..


Avoid pointless master connections in setViewTabs()

Change-Id: I44e383464680bc5cc611e5d964c485b97ac9908d
---
M frontend/FlaggablePageView.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/frontend/FlaggablePageView.php b/frontend/FlaggablePageView.php
old mode 100644
new mode 100755
index 2079e66..962b71f
--- a/frontend/FlaggablePageView.php
+++ b/frontend/FlaggablePageView.php
@@ -1251,7 +1251,7 @@
return true; // short-circuit for non-reviewable pages
}
# Hack for bug 16734 (some actions update and view all at once)
-   if ( $this->pageWriteOpRequested() && wfGetDB( DB_MASTER 
)->doneWrites() ) {
+   if ( $this->pageWriteOpRequested() && 
wfGetLB()->hasOrMadeRecentMasterChanges() ) {
# Tabs need to reflect the new stable version so users 
actually
# see the results of their action (i.e. 
"delete"/"rollback")
$this->article->loadPageData( 'fromdbmaster' );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I44e383464680bc5cc611e5d964c485b97ac9908d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Jackmcbarn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Design tweaks - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Design tweaks
..

Design tweaks

Change-Id: Ib03f039eed6395311519aa6aea2dd138807c950e
---
M template.html
1 file changed, 10 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/56/206456/1

diff --git a/template.html b/template.html
index 8104df9..8ade2ca 100644
--- a/template.html
+++ b/template.html
@@ -18,12 +18,19 @@
 list-style: none;
 display: block;
 border-bottom: 1px dotted #ccc;
-padding: 8px;
-marging: 8px;
+padding: 8px 0px;
+}
+
+li {
+padding-left: 0px;
 }
 
 li.lib .buttons-bar { 
 padding: 8px 0px;
+}
+
+.center {
+text-align: center;
 }
 
 
@@ -50,7 +57,7 @@
 Collection of very useful JS / CSS libraries served in a fast, 
Wikimedia Privacy 
Policy friendly way.
 Thanks to the https://github.com/cdnjs/cdnjs";>cdnjs community for maintaining and 
curating the libraries!. https://github.com/cdnjs/cdnjs#adding-a-new-or-updating-an-existing-library";>You
 can add your favorite libraries too.
 
-Tip: Use your browser's search function to search! The 
libraries are ordered by popularity. Clicking 'Use' will take show you list of 
files distributed with the library and allows you to include them as you see 
fit
+Tip: Use your browser's search function to 
search! The libraries are ordered by popularity. Clicking 'Use' will take show 
you list of files distributed with the library and allows you to include them 
as you see fit
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib03f039eed6395311519aa6aea2dd138807c950e
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Made wfReadOnlyReason catch DB connection errors - change (mediawiki/core)

2015-04-24 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Made wfReadOnlyReason catch DB connection errors
..

Made wfReadOnlyReason catch DB connection errors

Change-Id: I4e960d9bd751b2a6f95f08861fc8ed360af4a04a
---
M includes/GlobalFunctions.php
1 file changed, 7 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/55/206455/1

diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 0287798..cefa375 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1346,9 +1346,14 @@
}
// Callers use this method to be aware that data presented to a 
user
// may be very stale and thus allowing submissions can be 
problematic.
-   if ( $wgReadOnly === false && wfGetLB()->getLaggedSlaveMode() ) 
{
+   try {
+   if ( $wgReadOnly === false && 
wfGetLB()->getLaggedSlaveMode() ) {
+   $wgReadOnly = 'The database has been 
automatically locked ' .
+   'while the slave database servers catch 
up to the master';
+   }
+   } catch ( DBConnectionError $e ) {
$wgReadOnly = 'The database has been automatically 
locked ' .
-   'while the slave database servers catch up to 
the master';
+   'until the slave database servers become 
available';
}
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e960d9bd751b2a6f95f08861fc8ed360af4a04a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Aaron Schulz 

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

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

Change subject: Improve performance
..


Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
(cherry picked from commit f0251383658fc3d98a69037aea25a69bf05eabe4)
---
M CollapsibleVector.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 28760d3..4b4f582 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

2015-04-24 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Improve performance
..

Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
(cherry picked from commit f0251383658fc3d98a69037aea25a69bf05eabe4)
---
M CollapsibleVector.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 28760d3..4b4f582 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_24
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

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

Change subject: Improve performance
..


Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
(cherry picked from commit f0251383658fc3d98a69037aea25a69bf05eabe4)
---
M CollapsibleVector.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 88a79b6..a1954b6 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_25
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

2015-04-24 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Improve performance
..

Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
(cherry picked from commit f0251383658fc3d98a69037aea25a69bf05eabe4)
---
M CollapsibleVector.php
1 file changed, 1 insertion(+), 0 deletions(-)


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

diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 88a79b6..a1954b6 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: REL1_25
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

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

Change subject: Improve performance
..


Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
---
M CollapsibleVector.php
1 file changed, 1 insertion(+), 0 deletions(-)

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



diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 88a79b6..a1954b6 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: master
Gerrit-Owner: Paladox 
Gerrit-Reviewer: Paladox 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Actually generate html output - change (labs...cdnjs-index)

2015-04-24 Thread Yuvipanda (Code Review)
Yuvipanda has uploaded a new change for review.

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

Change subject: Actually generate html output
..

Actually generate html output

Change-Id: I5f4a8ebf7eca7b974ea7796c1a080e472115e59c
---
M generate.py
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/cdnjs-index 
refs/changes/52/206452/1

diff --git a/generate.py b/generate.py
index c98ec03..842e694 100644
--- a/generate.py
+++ b/generate.py
@@ -17,7 +17,8 @@
 argparser.add_argument('outputpath', help='Path to html output')
 args = argparser.parse_args()
 
-html = jinja2.Template(args.templatepath, autoescape=True)
+with open(args.outputpath) as f:
+html = jinja2.Template(f.read(), autoescape=True)
 
 all_packages = requests.get(args.cdnjsurl).json()
 libraries = []

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5f4a8ebf7eca7b974ea7796c1a080e472115e59c
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/cdnjs-index
Gerrit-Branch: master
Gerrit-Owner: Yuvipanda 

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


[MediaWiki-commits] [Gerrit] Stop Gather from erroring - change (mediawiki...Gather)

2015-04-24 Thread Jdlrobson (Code Review)
Jdlrobson has uploaded a new change for review.

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

Change subject: Stop Gather from erroring
..

Stop Gather from erroring

Follow up to If7bb1941d37ca8ebe20594f4fbf2857d27eac311
Bug: T97175

Change-Id: I63780f9cf57bb69357c7228691bc7bc5ca4d
---
M includes/specials/SpecialGather.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialGather.php 
b/includes/specials/SpecialGather.php
index bff4d2f..08dfbd7 100644
--- a/includes/specials/SpecialGather.php
+++ b/includes/specials/SpecialGather.php
@@ -70,7 +70,7 @@
} else {
$this->renderUserCollectionsList( $user );
}
-   } elseif ( $this->checkRoute( $subpage ) ) {
+   } elseif ( $matches = $this->checkRoute( $subpage ) ) {
// Collection page
// /id/:id
$id = (int)$matches['id'];

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I63780f9cf57bb69357c7228691bc7bc5ca4d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Gather
Gerrit-Branch: master
Gerrit-Owner: Jdlrobson 

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


[MediaWiki-commits] [Gerrit] Improve performance - change (mediawiki...CollapsibleVector)

2015-04-24 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Improve performance
..

Improve performance

* Includes new dependacy on jquery.throttle-debounce for a slight speed 
increase.

Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
---
M CollapsibleVector.php
M i18n/gl.json
2 files changed, 7 insertions(+), 2 deletions(-)


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

diff --git a/CollapsibleVector.php b/CollapsibleVector.php
index 88a79b6..a1954b6 100644
--- a/CollapsibleVector.php
+++ b/CollapsibleVector.php
@@ -72,6 +72,7 @@
'dependencies' => array(
'jquery.client',
'jquery.cookie',
+   'jquery.throttle-debounce',
'jquery.tabIndex',
),
'localBasePath' => __DIR__,
diff --git a/i18n/gl.json b/i18n/gl.json
index a33aeb9..8f413b2 100644
--- a/i18n/gl.json
+++ b/i18n/gl.json
@@ -1,10 +1,14 @@
 {
"@metadata": {
"authors": [
-   "Banjo"
+   "Banjo",
+   "Elisardojm"
]
},
+   "extensionname-collapsiblevector": "CollapsibleVector",
"collapsiblevector": "Melloras na interface de usuario para Vector",
"collapsiblevector-desc": "Mellora a interface de usuario cando se usa 
o tema Vector",
-   "collapsiblevector-collapsiblenav-more": "Máis linguas"
+   "collapsiblevector-collapsiblenav-preference": "Permitir pregar os 
menús de navegación da aparencia Vector",
+   "collapsiblevector-collapsiblenav-more": "Máis linguas",
+   "collapsiblevector-noexperiments-preference": "Excluirme das 
funcionalidades experimentais"
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d0882424d6df5efd8c467aded2533aa930b4468
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CollapsibleVector
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


  1   2   3   >