[MediaWiki-commits] [Gerrit] openzim[master]: Adapt tests to new internal cluster API.

2016-11-07 Thread Kelson (Code Review)
Kelson has submitted this change and it was merged.

Change subject: Adapt tests to new internal cluster API.
..


Adapt tests to new internal cluster API.

- There is no more operator>>() on cluster. We should use init_from_stream.
- The stream must be a zim::ifstream not a std::istream.

Change-Id: I58b8e1d43b0973129d02393b83c3f248b77768fd
---
M zimlib/test/cluster.cpp
1 file changed, 48 insertions(+), 20 deletions(-)

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



diff --git a/zimlib/test/cluster.cpp b/zimlib/test/cluster.cpp
index c4c25e6..687c1e1 100644
--- a/zimlib/test/cluster.cpp
+++ b/zimlib/test/cluster.cpp
@@ -18,9 +18,12 @@
  */
 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 #include 
 #include 
@@ -69,7 +72,9 @@
 
 void ReadWriteCluster()
 {
-  std::stringstream s;
+  std::string name = std::tmpnam(NULL);
+  std::ofstream os;
+  os.open(name.c_str());
 
   zim::Cluster cluster;
 
@@ -81,20 +86,25 @@
   cluster.addBlob(blob1.data(), blob1.size());
   cluster.addBlob(blob2.data(), blob2.size());
 
-  s << cluster;
+  os << cluster;
+  os.close();
 
+  zim::ifstream is(name);
   zim::Cluster cluster2;
-  s >> cluster2;
-  CXXTOOLS_UNIT_ASSERT(!s.fail());
+  cluster2.init_from_stream(is, 0);
+  CXXTOOLS_UNIT_ASSERT(!is.fail());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.count(), 3);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(0), blob0.size());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(1), blob1.size());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(2), blob2.size());
+  std::remove(name.c_str());
 }
 
 void ReadWriteEmpty()
 {
-  std::stringstream s;
+  std::string name = std::tmpnam(NULL);
+  std::ofstream os;
+  os.open(name.c_str());
 
   zim::Cluster cluster;
 
@@ -102,21 +112,26 @@
   cluster.addBlob(0, 0);
   cluster.addBlob(0, 0);
 
-  s << cluster;
+  os << cluster;
+  os.close();
 
+  zim::ifstream is(name);
   zim::Cluster cluster2;
-  s >> cluster2;
-  CXXTOOLS_UNIT_ASSERT(!s.fail());
+  cluster2.init_from_stream(is, 0);
+  CXXTOOLS_UNIT_ASSERT(!is.fail());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.count(), 3);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(0), 0);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(1), 0);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(2), 0);
+  std::remove(name.c_str());
 }
 
 #ifdef ENABLE_ZLIB
 void ReadWriteClusterZ()
 {
-  std::stringstream s;
+  std::string name = std::tmpnam(NULL);
+  std::ofstream os;
+  os.open(name.c_str());
 
   zim::Cluster cluster;
 
@@ -129,11 +144,13 @@
   cluster.addBlob(blob2.data(), blob2.size());
   cluster.setCompression(zim::zimcompZip);
 
-  s << cluster;
+  os << cluster;
+  os.close();
 
+  zim::ifstream is(name);
   zim::Cluster cluster2;
-  s >> cluster2;
-  CXXTOOLS_UNIT_ASSERT(!s.fail());
+  cluster2.init_from_stream(is, 0);
+  CXXTOOLS_UNIT_ASSERT(!is.fail());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.count(), 3);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getCompression(), zim::zimcompZip);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(0), blob0.size());
@@ -142,6 +159,7 @@
   CXXTOOLS_UNIT_ASSERT(std::equal(cluster2.getBlobPtr(0), 
cluster2.getBlobPtr(0) + cluster2.getBlobSize(0), blob0.data()));
   CXXTOOLS_UNIT_ASSERT(std::equal(cluster2.getBlobPtr(1), 
cluster2.getBlobPtr(1) + cluster2.getBlobSize(1), blob1.data()));
   CXXTOOLS_UNIT_ASSERT(std::equal(cluster2.getBlobPtr(2), 
cluster2.getBlobPtr(2) + cluster2.getBlobSize(2), blob2.data()));
+  std::remove(name.c_str());
 }
 
 #endif
@@ -149,7 +167,9 @@
 #ifdef ENABLE_BZIP2
 void ReadWriteClusterBz2()
 {
-  std::stringstream s;
+  std::string name = std::tmpnam(NULL);
+  std::ofstream os;
+  os.open(name.c_str());
 
   zim::Cluster cluster;
 
@@ -162,11 +182,13 @@
   cluster.addBlob(blob2.data(), blob2.size());
   cluster.setCompression(zim::zimcompBzip2);
 
-  s << cluster;
+  os << cluster;
+  os.close();
 
+  zim::ifstream is(name);
   zim::Cluster cluster2;
-  s >> cluster2;
-  CXXTOOLS_UNIT_ASSERT(!s.fail());
+  cluster2.init_from_stream(is, 0);
+  CXXTOOLS_UNIT_ASSERT(!is.fail());
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.count(), 3);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getCompression(), 
zim::zimcompBzip2);
   CXXTOOLS_UNIT_ASSERT_EQUALS(cluster2.getBlobSize(0), blob0.size());
@@ -175,6 +197,7 @@
   CXXTOOLS_UNIT_ASSERT(std::equal(cluster2.getBlobPtr(0), 
cluster2.getBlobPtr(0) + cluster2.getBlobSize(0), blob0.data()));
   CXXTOOLS_UNIT_ASSERT(std::equal(cluster2.getBlobPtr(1), 
cluster2.getBlobPtr(1) + 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: db-eqiad.php: Depool db1059 for maintenance

2016-11-07 Thread Marostegui (Code Review)
Marostegui has uploaded a new change for review.

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

Change subject: db-eqiad.php: Depool db1059 for maintenance
..

db-eqiad.php: Depool db1059 for maintenance

db1059 needs an ALTER table to remove partitions from templatelinks table
which is wrong as that server does not need partitioning

It also needs the correct indexes on revision table.

Bug: T149079
Bug: T147305
Change-Id: I951b00b849379497fda6ac5ab2b7fd9f0e522fdf
---
M wmf-config/db-eqiad.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/wmf-config/db-eqiad.php b/wmf-config/db-eqiad.php
index 3bd7b73..9048ac6 100644
--- a/wmf-config/db-eqiad.php
+++ b/wmf-config/db-eqiad.php
@@ -326,7 +326,7 @@
'db1064' => 1,
],
'api' => [
-   'db1059' => 1,
+#  'db1059' => 1,
'db1068' => 3,
],
'watchlist' => [

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: InterWikiLinks: fixed edit and delete of interwiki links

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

Change subject: InterWikiLinks: fixed edit and delete of interwiki links
..


InterWikiLinks: fixed edit and delete of interwiki links

Custom IWL could not be edited or deleted, as Interwiki::fetch
always returned null. Now checking directly against the database.

Change-Id: I91c783b6a7e660514c1abe4c303f4a01a6955d45
---
M InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
1 file changed, 26 insertions(+), 4 deletions(-)

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



diff --git a/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php 
b/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
index ef9e5e5..7583d8c 100644
--- a/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
+++ b/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
@@ -31,6 +31,7 @@
  */
 class BSApiTasksInterWikiLinksManager extends BSApiTasksBase {
 
+   protected $aIWLexists = array();
/**
 * Methods that can be called by task param
 * @var array
@@ -87,12 +88,12 @@
wfGetMainCache()->delete( $sKey );
}
 
-   if( !empty($sOldPrefix) && !$oPrefix = 
Interwiki::fetch($sOldPrefix) ) {
+   if( !empty($sOldPrefix) && !$this->interWikiLinkExists( 
$sOldPrefix ) ) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-nooldpfx' )->plain(),
);
-   } elseif( !empty($sPrefix) && $oPrefix = 
Interwiki::fetch($sPrefix) && $sPrefix !== $sOldPrefix) {
+   } elseif( !empty($sPrefix) && $this->interWikiLinkExists( 
$sPrefix ) && $sPrefix !== $sOldPrefix) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-pfxexists' )->plain(),
@@ -221,7 +222,7 @@
$oPrefix = null;
 
$sPrefix = isset( $oTaskData->prefix )
-   ? (string) $oTaskData->prefix
+   ? addslashes( $oTaskData->prefix )
: ''
;
 
@@ -238,7 +239,8 @@
$sKey = wfMemcKey( 'interwiki', $sPrefix );
wfGetMainCache()->delete( $sKey );
}
-   if( !$oPrefix = Interwiki::fetch($sPrefix) ) {
+
+   if( !$this->interWikiLinkExists( $sPrefix ) ) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-nooldpfx' )->plain(),
@@ -265,4 +267,24 @@
 
return $oReturn;
}
+
+   protected function interWikiLinkExists( $sPrefix ) {
+   if ( isset( $this->aIWLexists[$sPrefix] ) ) {
+   return $this->aIWLexists[$sPrefix];
+   }
+   $row = $this->getDB()->selectRow(
+   'interwiki',
+   Interwiki::selectFields(),
+   [ 'iw_prefix' => $sPrefix ],
+   __METHOD__
+   );
+
+   if( !$row ) {
+   $this->aIWLexists[$sPrefix] = false;
+   } else {
+   $this->aIWLexists[$sPrefix] = true;
+   }
+
+   return $this->aIWLexists[$sPrefix];
+   }
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I91c783b6a7e660514c1abe4c303f4a01a6955d45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Dvogel hallowelt 
Gerrit-Reviewer: Ljonka 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update debian packaging

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

Change subject: Update debian packaging
..


Update debian packaging

Change-Id: I47023d191a4fee793adc7cd259ec5aca0454dab9
---
M debian/changelog
A debian/config.dev.yaml
D debian/config.yaml
A debian/config.yaml
M debian/control
M debian/cxserver.default
M debian/cxserver.install
A debian/cxserver.service
A debian/registry.yaml
M debian/rules
10 files changed, 1,289 insertions(+), 1,226 deletions(-)

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



diff --git a/debian/changelog b/debian/changelog
index 569a813..fc7ebda 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,10 +1,17 @@
+cxserver (0.3) unstable; urgency=low
+
+  * Updated for new config format.
+  * Fixed cxserver.install.
+
+ -- Kartik Mistry   Thu, 03 Nov 2016 15:09:29 +0530
+
 cxserver (0.2) unstable; urgency=low
 
   * Update as per cxserver's service-runner migration.
 
  -- Kartik Mistry   Mon, 22 Feb 2016 10:43:47 +0530
 
-cxserver (0.1) UNRELEASED; urgency=low
+cxserver (0.1) unstable; urgency=low
 
   * Initial release based on Parsoid Debian package.
 
diff --git a/debian/config.dev.yaml b/debian/config.dev.yaml
new file mode 100644
index 000..f17e684
--- /dev/null
+++ b/debian/config.dev.yaml
@@ -0,0 +1,71 @@
+
+# Set to 0 to run everything in a single process without clustering.
+# Use ncpu to run as many workers as there are CPU units
+num_workers: 0
+
+# Log error messages and gracefully restart a worker if v8 reports that it
+# uses more heap (note: not RSS) than this many megabytes.
+worker_heap_limit_mb: 250
+
+# Logger info
+logging:
+  level: trace
+#  streams:
+#  # Use gelf-stream -> logstash
+#- type: gelf
+#host: logstash1003.eqiad.wmnet
+#port: 12201
+
+# Statsd metrics reporter
+metrics:
+  type: log
+  #host: localhost
+  #port: 8125
+
+services:
+  - name: cxserver
+# a relative path or the name of an npm package, if different from name
+module: ./app.js
+# optionally, a version constraint of the npm package
+# version: ^0.4.0
+# per-service config
+conf:
+  port: 8080
+  # interface: localhost # uncomment to only listen on localhost
+  # More per-service config settings
+  # The location of the spec, defaults to spec.yaml if not specified
+  # spec: ./spec.yaml
+  # allow cross-domain requests to the API (default *)
+  cors: '*'
+  # to disable use:
+  # cors: false
+  # to restrict to a particular domain, use:
+  # cors: restricted.domain.org
+  # URL of the outbound proxy to use (complete with protocol)
+  # proxy: http://my.proxy.org:8080
+  # the list of domains for which not to use the proxy defined above
+  # no_proxy_list:
+  #   - domain1.com
+  #   - domain2.org
+  user_agent: cxserver
+  restbase_req:
+method: '{{request.method}}'
+uri: https://{{domain}}/api/rest_v1/{+path}
+query: '{{ default(request.query, {}) }}'
+headers: '{{request.headers}}'
+body: '{{request.body}}'
+  jwt:
+secret: ''
+algorithms:
+  - HS256
+  mt:
+# Apertium web API URL
+apertium:
+  api: http://apertium.wmflabs.org
+yandex:
+  api: https://translate.yandex.net
+  key: null
+youdao:
+  api: https://fanyi.youdao.com/paidapi/fanyiapi
+  key: null
+  registry: ./registry.yaml
diff --git a/debian/config.yaml b/debian/config.yaml
deleted file mode 100644
index f3ae651..000
--- a/debian/config.yaml
+++ /dev/null
@@ -1,1213 +0,0 @@
-
-# Set to 0 to run everything in a single process without clustering.
-# Use ncpu to run as many workers as there are CPU units
-num_workers: 0
-
-# Log error messages and gracefully restart a worker if v8 reports that it
-# uses more heap (note: not RSS) than this many megabytes.
-worker_heap_limit_mb: 250
-
-# Logger info
-logging:
-  level: trace
-#  streams:
-#  # Use gelf-stream -> logstash
-#- type: gelf
-#host: logstash1003.eqiad.wmnet
-#port: 12201
-
-# Statsd metrics reporter
-metrics:
-  type: log
-  #host: localhost
-  #port: 8125
-
-services:
-  - name: cxserver
-# a relative path or the name of an npm package, if different from name
-module: ./app.js
-# optionally, a version constraint of the npm package
-# version: ^0.4.0
-# per-service config
-conf:
-  port: 8080
-  # interface: localhost # uncomment to only listen on localhost
-  # More per-service config settings
-  # The location of the spec, defaults to spec.yaml if not specified
-  # spec: ./spec.yaml
-  # allow cross-domain requests to the API (default *)
-  cors: '*'
-  # to disable use:
-  # cors: false
-  # to restrict to a particular domain, use:
-  # cors: 

[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[wmf/1.29.0-wmf.1]: Search .mw-body instead of #content to support all the skins

2016-11-07 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: Search .mw-body instead of #content to support all the skins
..

Search .mw-body instead of #content to support all the skins

Bug: T150148
Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
(cherry picked from commit 1d24b291f91ac4fb72774a464a658a3361514458)
---
M modules/maplink/maplink.js
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/modules/maplink/maplink.js b/modules/maplink/maplink.js
index 2e7a3b3..0f5e522 100644
--- a/modules/maplink/maplink.js
+++ b/modules/maplink/maplink.js
@@ -66,8 +66,8 @@
 
// Some links might be displayed outside of $content, so we 
need to
// search outside. This is an anti-pattern and should be 
improved...
-   // Meanwhile #content is better than searching the full 
document.
-   $( '.mw-kartographer-maplink', '#content' ).each( function ( 
index ) {
+   // Meanwhile .mw-body is better than searching the full 
document.
+   $( '.mw-kartographer-maplink', '.mw-body' ).each( function ( 
index ) {
var data = getMapData( this ),
link;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: wmf/1.29.0-wmf.1
Gerrit-Owner: Yurik 
Gerrit-Reviewer: JGirault 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Lazy load PasswordReset on SpecialPasswordReset

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

Change subject: Lazy load PasswordReset on SpecialPasswordReset
..


Lazy load PasswordReset on SpecialPasswordReset

Do not use config objects in construct, because it not set and fall
back to global state.

Change-Id: I68da2b545bf6f7065b4e5998104154ced911460e
---
M includes/specials/SpecialPasswordReset.php
1 file changed, 12 insertions(+), 6 deletions(-)

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



diff --git a/includes/specials/SpecialPasswordReset.php 
b/includes/specials/SpecialPasswordReset.php
index 9746ef6..82abccf 100644
--- a/includes/specials/SpecialPasswordReset.php
+++ b/includes/specials/SpecialPasswordReset.php
@@ -34,7 +34,7 @@
  */
 class SpecialPasswordReset extends FormSpecialPage {
/** @var PasswordReset */
-   private $passwordReset;
+   private $passwordReset = null;
 
/**
 * @var string[] Temporary storage for the passwords which have been 
sent out, keyed by username.
@@ -53,7 +53,13 @@
 
public function __construct() {
parent::__construct( 'PasswordReset', 'editmyprivateinfo' );
-   $this->passwordReset = new PasswordReset( $this->getConfig(), 
AuthManager::singleton() );
+   }
+
+   private function getPasswordReset() {
+   if ( $this->passwordReset === null ) {
+   $this->passwordReset = new PasswordReset( 
$this->getConfig(), AuthManager::singleton() );
+   }
+   return $this->passwordReset;
}
 
public function doesWrites() {
@@ -61,11 +67,11 @@
}
 
public function userCanExecute( User $user ) {
-   return $this->passwordReset->isAllowed( $user )->isGood();
+   return $this->getPasswordReset()->isAllowed( $user )->isGood();
}
 
public function checkExecutePermissions( User $user ) {
-   $status = Status::wrap( $this->passwordReset->isAllowed( $user 
) );
+   $status = Status::wrap( $this->getPasswordReset()->isAllowed( 
$user ) );
if ( !$status->isGood() ) {
throw new ErrorPageError( 'internalerror', 
$status->getMessage() );
}
@@ -150,7 +156,7 @@
 
$this->method = $username ? 'username' : 'email';
$this->result = Status::wrap(
-   $this->passwordReset->execute( $this->getUser(), 
$username, $email, $capture ) );
+   $this->getPasswordReset()->execute( $this->getUser(), 
$username, $email, $capture ) );
if ( $capture && $this->result->isOK() ) {
$this->passwords = $this->result->getValue();
}
@@ -199,7 +205,7 @@
 * @return bool
 */
public function isListed() {
-   if ( $this->passwordReset->isAllowed( $this->getUser() 
)->isGood() ) {
+   if ( $this->getPasswordReset()->isAllowed( $this->getUser() 
)->isGood() ) {
return parent::isListed();
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I68da2b545bf6f7065b4e5998104154ced911460e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Florianschmidtwelzow 
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] mediawiki/core[master]: Let findHooks.php find UserCreateForm/UserLoginForm

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

Change subject: Let findHooks.php find UserCreateForm/UserLoginForm
..


Let findHooks.php find UserCreateForm/UserLoginForm

To make findHooks.php happy the hooks must be explicit called with
Hooks::run, passing the name with a variable makes it impossible to
detect and therefore the script unhappy.
In case of B/C this is should be a possible solution.

Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8
---
M includes/specialpage/LoginSignupSpecialPage.php
1 file changed, 12 insertions(+), 4 deletions(-)

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



diff --git a/includes/specialpage/LoginSignupSpecialPage.php 
b/includes/specialpage/LoginSignupSpecialPage.php
index 984e32b..c4e1f17 100644
--- a/includes/specialpage/LoginSignupSpecialPage.php
+++ b/includes/specialpage/LoginSignupSpecialPage.php
@@ -763,10 +763,18 @@
$wgAuth->modifyUITemplate( $template, $action );
 
$oldTemplate = $template;
-   $hookName = $this->isSignup() ? 'UserCreateForm' : 
'UserLoginForm';
-   Hooks::run( $hookName, [ &$template ] );
-   if ( $oldTemplate !== $template ) {
-   wfDeprecated( "reference in $hookName hook", '1.27' );
+
+   // Both Hooks::run are explicit here to make findHooks.php happy
+   if ( $this->isSignup() ) {
+   Hooks::run( 'UserCreateForm', [ &$template ] );
+   if ( $oldTemplate !== $template ) {
+   wfDeprecated( "reference in UserCreateForm 
hook", '1.27' );
+   }
+   } else {
+   Hooks::run( 'UserLoginForm', [ &$template ] );
+   if ( $oldTemplate !== $template ) {
+   wfDeprecated( "reference in UserLoginForm 
hook", '1.27' );
+   }
}
 
return $template;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf4d325a3821e09a742d23a3a5bca8493965bfb8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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] mediawiki...MassMessage[master]: Use a page for preview that is more likely to not exist

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

Change subject: Use a page for preview that is more likely to not exist
..


Use a page for preview that is more likely to not exist

This isn't a real fix, but should work for now.

Bug: T150225
Change-Id: I2b361b809029f068b48a6384428ccb5ceddf23b6
---
M includes/SpecialMassMessage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/SpecialMassMessage.php b/includes/SpecialMassMessage.php
index 0a35e12..344785b 100644
--- a/includes/SpecialMassMessage.php
+++ b/includes/SpecialMassMessage.php
@@ -277,7 +277,7 @@
$this->getOutput()->addHTML( $infoFieldset );
 
// Use a mock target as the context for rendering the preview
-   $mockTarget = Title::newFromText( 'Project:Example' );
+   $mockTarget = Title::newFromText( 'Project:MassMessage:A page 
that should not exist' );
$wikipage = WikiPage::factory( $mockTarget );
 
// Convert into a content object

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2b361b809029f068b48a6384428ccb5ceddf23b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: Harej 
Gerrit-Reviewer: Wctaiwan 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Restore hooks.txt for ParserLimitReportFormat

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

Change subject: Restore hooks.txt for ParserLimitReportFormat
..


Restore hooks.txt for ParserLimitReportFormat

The hook was readded with Iad2646acde79b8a59710bb9fd5fbbfea5a39c341

The text is from I2783c46c6d80f828f9ecf5e71fc8f35910454582

Change-Id: I5e26e0c9bef06e0a6213fd219bda58a61da80665
---
M docs/hooks.txt
1 file changed, 13 insertions(+), 1 deletion(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index ea662cc..568b0d6 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2487,12 +2487,24 @@
 &$parser: Parser object
 &$varCache: variable cache (array)
 
-'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare instead.
+'ParserLimitReport': DEPRECATED! Use ParserLimitReportPrepare and
+ParserLimitReportFormat instead.
 Called at the end of Parser:parse() when the parser will
 include comments about size of the text parsed.
 $parser: Parser object
 &$limitReport: text that will be included (without comment tags)
 
+'ParserLimitReportFormat': Called for each row in the parser limit report that
+needs formatting. If nothing handles this hook, the default is to use "$key" to
+get the label, and "$key-value" or "$key-value-text"/"$key-value-html" to
+format the value.
+$key: Key for the limit report item (string)
+&$value: Value of the limit report item
+&$report: String onto which to append the data
+$isHTML: If true, $report is an HTML table with two columns; if false, it's
+  text intended for display in a monospaced font.
+$localize: If false, $report should be output in English.
+
 'ParserLimitReportPrepare': Called at the end of Parser:parse() when the parser
 will include comments about size of the text parsed. Hooks should use
 $output->setLimitReportData() to populate data. Functions for this hook should

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5e26e0c9bef06e0a6213fd219bda58a61da80665
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
Gerrit-Reviewer: Bartosz Dziewoński 
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] mediawiki/core[master]: Fix docs for OutputPage::addLanguageLinks and OutputPage::s...

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

Change subject: Fix docs for OutputPage::addLanguageLinks and  
OutputPage::setLanguageLinks
..


Fix docs for OutputPage::addLanguageLinks and  OutputPage::setLanguageLinks

Per what has been described and fixed in
Ie9c42ac2b4ff143e36d07642f57cca769e8c00e7.

Change-Id: I2af28ae97805f3259ca038942a84b43f89b55150
---
M includes/OutputPage.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index bf59c9a..1e23de5 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -1214,8 +1214,8 @@
/**
 * Add new language links
 *
-* @param array $newLinkArray Associative array mapping language code 
to the page
-*  name
+* @param string[] $newLinkArray Array of interwiki-prefixed (non DB 
key) titles
+*   (e.g. 'fr:Test page')
 */
public function addLanguageLinks( array $newLinkArray ) {
$this->mLanguageLinks += $newLinkArray;
@@ -1224,8 +1224,8 @@
/**
 * Reset the language links and add new language links
 *
-* @param array $newLinkArray Associative array mapping language code 
to the page
-*  name
+* @param string[] $newLinkArray Array of interwiki-prefixed (non DB 
key) titles
+*   (e.g. 'fr:Test page')
 */
public function setLanguageLinks( array $newLinkArray ) {
$this->mLanguageLinks = $newLinkArray;
@@ -1234,7 +1234,7 @@
/**
 * Get the list of language links
 *
-* @return array Array of Interwiki Prefixed (non DB key) Titles (e.g. 
'fr:Test page')
+* @return string[] Array of interwiki-prefixed (non DB key) titles 
(e.g. 'fr:Test page')
 */
public function getLanguageLinks() {
return $this->mLanguageLinks;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2af28ae97805f3259ca038942a84b43f89b55150
Gerrit-PatchSet: 4
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: WMDE-leszek 
Gerrit-Reviewer: Addshore 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: WMDE-leszek 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: LABS: added beta.wmflabs.org to graphs config

2016-11-07 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: LABS: added beta.wmflabs.org to graphs config
..

LABS: added beta.wmflabs.org to graphs config

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


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 527ab24..2a9632c 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -346,6 +346,7 @@
//  THIS LIST MUST MATCH 
puppet/hieradata/labs/deployment-prep/common.yaml 
// See https://www.mediawiki.org/wiki/Extension:Graph#External_data
$wgGraphAllowedDomains['http'] = [ 'wmflabs.org' ];
+   $wgGraphAllowedDomains['https'][] = [ 'beta.wmflabs.org' ];
$wgGraphAllowedDomains['wikirawupload'][] = 'upload.beta.wmflabs.org';
$wgGraphAllowedDomains['wikidatasparql'][] = 'wdqs-test.wmflabs.org';
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: LABS: added beta.wmflabs.org to graphs config

2016-11-07 Thread Yurik (Code Review)
Yurik has uploaded a new change for review.

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

Change subject: LABS: added beta.wmflabs.org to graphs config
..

LABS: added beta.wmflabs.org to graphs config

Change-Id: Ia39e7e607c633586770ad1d74d556d08d5b6366e
---
M hieradata/labs/deployment-prep/common.yaml
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/43/320343/1

diff --git a/hieradata/labs/deployment-prep/common.yaml 
b/hieradata/labs/deployment-prep/common.yaml
index 90a252f..872958e 100644
--- a/hieradata/labs/deployment-prep/common.yaml
+++ b/hieradata/labs/deployment-prep/common.yaml
@@ -35,6 +35,7 @@
 - wikiversity.org
 - wikivoyage.org
 - wiktionary.org
+- beta.wmflabs.org
   wikirawupload:
 - upload.wikimedia.org
 - upload.beta.wmflabs.org

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Add "page" external data support

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

Change subject: Add "page" external data support
..


Add "page" external data support

Bug: T137930
Change-Id: I933fdb5de26e905e6e7fa6e3dbfd0293c9267b53
---
M i18n/en.json
M i18n/qqq.json
M includes/SimpleStyleParser.php
M lib/wikimedia-mapdata.js
M schemas/geojson.json
M tests/parserTests.txt
M tests/phpunit/ValidationTest.php
A tests/phpunit/data/bad-schemas/58-externaldata.json
D tests/phpunit/data/bad-schemas/58-featurecollection-non-nestable.json
A tests/phpunit/data/bad-schemas/59-externaldata.json
D tests/phpunit/data/bad-schemas/59-featurecollection-non-nestable.json
M tests/phpunit/data/bad-schemas/60-featurecollection-non-nestable.json
M tests/phpunit/data/bad-schemas/61-featurecollection-non-nestable.json
A tests/phpunit/data/bad-schemas/62-featurecollection-non-nestable.json
A tests/phpunit/data/bad-schemas/63-featurecollection-non-nestable.json
M tests/phpunit/data/good-schemas/08-externaldata.json
16 files changed, 168 insertions(+), 88 deletions(-)

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



diff --git a/i18n/en.json b/i18n/en.json
index 04d61d9..193add7 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -27,7 +27,7 @@
"kartographer-error-bad_attr": "Attribute \"$1\" has an invalid value",
"kartographer-error-bad_data": "The JSON content is not valid 
GeoJSON+simplestyle",
"kartographer-error-latlon": "Either both \"latitude\" and 
\"longitude\" parameters should be supplied or neither of them",
-   "kartographer-error-service-name": "Invalid cartographic service 
\"$1\"",
+   "kartographer-error-title": "Title \"$1\" is not a valid map data page",
"kartographer-tracking-category": 
"{{#switch:{{NAMESPACE}}|{{ns:File}}=Files|#default=Pages}} with maps",
"kartographer-tracking-category-desc": "The page includes a map",
"kartographer-coord-combined": "$1 $2",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index eb386fd..06a721f 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -31,7 +31,7 @@
"kartographer-error-bad_attr": "Error shown instead of a map in case of 
a problem with parameters.\n\nParameters:\n* $1 - non-localized attribute name, 
such as 'height', 'latitude', etc",
"kartographer-error-bad_data": "This error is shown if the content of 
the tag is syntactically valid JSON however it does not adhere to GeoJSON and 
simplestyle specifications",
"kartographer-error-latlon": "Error shown by maplink or 
mapframe when certain parameters are incorrect",
-   "kartographer-error-service-name": "Error shown by maplink or 
mapframe. Parameters:\n* $1 - service name.",
+   "kartographer-error-title": "Error shown by maplink or 
mapframe. Parameters:\n* $1 - page title.",
"kartographer-tracking-category": "Name of the tracking category",
"kartographer-tracking-category-desc": "Description on 
[[Special:TrackingCategories]] for the 
{{msg-mw|kartographer-tracking-category}} tracking category.",
"kartographer-coord-combined": "{{optional}}\nJoins two parts of 
geogrpahical coordinates. $1 and $2 are latitude and longitude, respectively.",
diff --git a/includes/SimpleStyleParser.php b/includes/SimpleStyleParser.php
index d773ef2..a688501 100644
--- a/includes/SimpleStyleParser.php
+++ b/includes/SimpleStyleParser.php
@@ -3,7 +3,10 @@
 namespace Kartographer;
 
 use FormatJson;
+use JsonConfig\JCMapDataContent;
+use JsonConfig\JCSingleton;
 use JsonSchema\Validator;
+use LogicException;
 use MediaWiki\MediaWikiServices;
 use Parser;
 use PPFrame;
@@ -15,8 +18,6 @@
  */
 class SimpleStyleParser {
private static $parsedProps = [ 'title', 'description' ];
-
-   private static $services = [ 'geoshape', 'geoline', 'geomask' ];
 
/** @var Parser */
private $parser;
@@ -139,7 +140,7 @@
 * @param mixed $json
 * @return Status
 */
-   private function validateContent( $json ) {
+   protected function validateContent( $json ) {
$schema = self::loadSchema();
$validator = new Validator();
$validator->check( $json, $schema );
@@ -158,7 +159,7 @@
 *
 * @param object|array $json
 */
-   private function sanitize( &$json ) {
+   protected function sanitize( &$json ) {
if ( is_array( $json ) ) {
foreach ( $json as &$element ) {
$this->sanitize( $element );
@@ -185,7 +186,7 @@
 * @param array $json
 * @return Status
 */
-   private function normalize( array &$json ) {
+   protected function normalize( array &$json ) {
$status = Status::newGood();
foreach ( $json as &$object ) {
if ( $object->type === 'ExternalData' ) {
@@ -204,38 +205,59 @@
 * @return 

[MediaWiki-commits] [Gerrit] mediawiki...Graph[master]: Support wikitabular graph protocol

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

Change subject: Support wikitabular graph protocol
..


Support wikitabular graph protocol

Bug: T149713
Depends-On: I6b5f189690b52fc3b523a4087ba8d1e48755a879
Change-Id: I6eb35ea739f5827a14f85758748c313701734880
---
M lib/graph2.compiled.js
M modules/graph2.js
2 files changed, 239 insertions(+), 180 deletions(-)

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



diff --git a/lib/graph2.compiled.js b/lib/graph2.compiled.js
index e7abd5e..bd95538 100644
--- a/lib/graph2.compiled.js
+++ b/lib/graph2.compiled.js
@@ -1,107 +1,4 @@
 (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof 
require=="function"&if(!u&)return a(o,!0);if(i)return i(o,!0);var 
f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var 
l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return 
s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof 
require=="function"&for(var o=0;o

[MediaWiki-commits] [Gerrit] operations/dns[master]: repeat hostname for AAAA (acamar, aluminium, multatuli)

2016-11-07 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: repeat hostname for  (acamar,aluminium,multatuli)
..


repeat hostname for  (acamar,aluminium,multatuli)

Change-Id: I33efc883930e8ac965fec16d10760c3ae181918f
---
M templates/wikimedia.org
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index bffad27..12de625 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -86,13 +86,13 @@
 ; Servers (alphabetic order) << WHAT PART ABOUT THIS IS SO HARD TO UNDERSTAND?
 
 acamar  1H  IN A208.80.153.12
-1H  IN  2620:0:860:1:208:80:153:12
+acamar  1H  IN  2620:0:860:1:208:80:153:12
 achernar1H  IN A208.80.153.42
 1H  IN  2620:0:860:2:208:80:153:42
 alsafi  1H  IN A208.80.153.50
 alsafi  1H  IN  2620:0:860:2:208:80:153:50
 aluminium   1H  IN A208.80.154.80 ; VM on the ganeti01.svc.eqiad.wmnet 
cluster
-1H  IN  2620:0:861:3:208:80:154:80
+aluminium   1H  IN  2620:0:861:3:208:80:154:80
 astatine1H  IN A208.80.155.110
 baham   1H  IN A208.80.153.13
 1H  IN  2620:0:860:1:208:80:153:13
@@ -161,7 +161,7 @@
 ms1001  1H  IN A208.80.154.16
 ms1001  1H  IN  2620:0:861:1:208:80:154:16
 multatuli   1H  IN A91.198.174.114
-1H  IN  2620:0:862:1:91:198:174:114
+multatuli   1H  IN  2620:0:862:1:91:198:174:114
 mx1001  1H  IN A208.80.154.76 ; VM on the ganeti01.svc.eqiad.wmnet 
cluster
 1H  IN  2620:0:861:3:208:80:154:76
 mx2001  1H  IN A208.80.153.45 ; VM on the ganeti01.svc.codfw.wmnet 
cluster

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I33efc883930e8ac965fec16d10760c3ae181918f
Gerrit-PatchSet: 2
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Remove ParserTestParser hook from hooks.txt

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

Change subject: Remove ParserTestParser hook from hooks.txt
..


Remove ParserTestParser hook from hooks.txt

The hook was removed in Ia8e17008cb9d9b62ce5645e15a41a3b402f4026a

The mentioned file in the documenation was renamed:
parserTest.inc -> ParserTest.php -> ParserTestRunner.php

Change-Id: I8fcf8302b84254d1dc5a3b629f425616bd1f5d13
---
M docs/hooks.txt
1 file changed, 0 insertions(+), 4 deletions(-)

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



diff --git a/docs/hooks.txt b/docs/hooks.txt
index ea662cc..30fca07 100644
--- a/docs/hooks.txt
+++ b/docs/hooks.txt
@@ -2521,10 +2521,6 @@
 &$globals: Array with all the globals which should be set for parser tests.
   The arrays keys serve as the globals names, its values are the globals 
values.
 
-'ParserTestParser': Called when creating a new instance of Parser in
-tests/parser/parserTest.inc.
-&$parser: Parser object created
-
 'ParserTestTables': Alter the list of tables to duplicate when parser tests are
 run. Use when page save hooks require the presence of custom tables to ensure
 that tests continue to run properly.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fcf8302b84254d1dc5a3b629f425616bd1f5d13
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender 
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] operations/dns[master]: repeat hostname for AAAA record (aluminium, achernar, multatuli)

2016-11-07 Thread Dzahn (Code Review)
Dzahn has uploaded a new change for review.

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

Change subject: repeat hostname for  record (aluminium,achernar,multatuli)
..

repeat hostname for  record (aluminium,achernar,multatuli)

Change-Id: I33efc883930e8ac965fec16d10760c3ae181918f
---
M templates/wikimedia.org
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/dns 
refs/changes/42/320342/1

diff --git a/templates/wikimedia.org b/templates/wikimedia.org
index bffad27..12de625 100644
--- a/templates/wikimedia.org
+++ b/templates/wikimedia.org
@@ -86,13 +86,13 @@
 ; Servers (alphabetic order) << WHAT PART ABOUT THIS IS SO HARD TO UNDERSTAND?
 
 acamar  1H  IN A208.80.153.12
-1H  IN  2620:0:860:1:208:80:153:12
+acamar  1H  IN  2620:0:860:1:208:80:153:12
 achernar1H  IN A208.80.153.42
 1H  IN  2620:0:860:2:208:80:153:42
 alsafi  1H  IN A208.80.153.50
 alsafi  1H  IN  2620:0:860:2:208:80:153:50
 aluminium   1H  IN A208.80.154.80 ; VM on the ganeti01.svc.eqiad.wmnet 
cluster
-1H  IN  2620:0:861:3:208:80:154:80
+aluminium   1H  IN  2620:0:861:3:208:80:154:80
 astatine1H  IN A208.80.155.110
 baham   1H  IN A208.80.153.13
 1H  IN  2620:0:860:1:208:80:153:13
@@ -161,7 +161,7 @@
 ms1001  1H  IN A208.80.154.16
 ms1001  1H  IN  2620:0:861:1:208:80:154:16
 multatuli   1H  IN A91.198.174.114
-1H  IN  2620:0:862:1:91:198:174:114
+multatuli   1H  IN  2620:0:862:1:91:198:174:114
 mx1001  1H  IN A208.80.154.76 ; VM on the ganeti01.svc.eqiad.wmnet 
cluster
 1H  IN  2620:0:861:3:208:80:154:76
 mx2001  1H  IN A208.80.153.45 ; VM on the ganeti01.svc.codfw.wmnet 
cluster

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I33efc883930e8ac965fec16d10760c3ae181918f
Gerrit-PatchSet: 1
Gerrit-Project: operations/dns
Gerrit-Branch: master
Gerrit-Owner: Dzahn 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Visually report damaging confidence

2016-11-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Visually report damaging confidence
..

Visually report damaging confidence

Bug: T144922
Change-Id: I12b841e2ed65620c115a0b6110f9195b172cc010
---
M extension.json
M includes/Hooks.php
A modules/ext.ores.highlighter.js
3 files changed, 34 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ORES 
refs/changes/41/320341/1

diff --git a/extension.json b/extension.json
index 71419d5..14f0215 100644
--- a/extension.json
+++ b/extension.json
@@ -91,8 +91,11 @@
"remoteExtPath": "ORES/modules"
},
"ResourceModules": {
-   "ext.ores.styles": {
+   "ext.ores.highlight": {
"position": "top",
+   "scripts": [
+   "modules/ext.ores.highlighter.js"
+   ],
"styles": "ext.ores.styles.css",
"targets": [
"desktop",
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 38602c9..2823d6c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -509,9 +509,8 @@
'oresThresholds',
[ 'damaging' => $wgOresDamagingThresholds ]
);
+   $out->addModules( 'ext.ores.highlight' );
}
-
-   $out->addModuleStyles( 'ext.ores.styles' );
return true;
}
 
diff --git a/modules/ext.ores.highlighter.js b/modules/ext.ores.highlighter.js
new file mode 100644
index 000..f0ee78d
--- /dev/null
+++ b/modules/ext.ores.highlighter.js
@@ -0,0 +1,29 @@
+( function ( mw, $ ) {
+   'use strict';
+   if ( !$( '.mw-changeslist' ).length && !$( 'mw-contributions-list' 
).length ) {
+   return;
+   }
+   var thresholds = mw.config.get( 'oresThresholds' ).damaging;
+   var colors = {};
+   colors[thresholds.soft] = '#ef8a62';
+   colors[thresholds.hard] = '#fddbc7';
+   colors[thresholds.softest] = '#b2182b';
+   $('li').each( function () {
+   if ( !$( this ).children( 'a' ).attr( 'href' ) ) {
+   return true;
+   }
+   var reg = /diff=(\d+)/ig;
+   var res = reg.exec( $( this ).children( 'a' ).attr( 'href' ) );
+   if (!res || res[1] in mw.config.get( 'oresData' ) ) {
+   return true;
+   }
+   var score = mw.config.get( 'oresData' )[res[1]]['damaging'];
+   var threshold = 0;
+   for ( threshold in colors ) {
+   if ( score > threshold ) {
+   $( this ).css( 'background-color', 
colors[threshold] );
+   }
+   }
+   } )
+}( mediaWiki, jQuery ) );
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I12b841e2ed65620c115a0b6110f9195b172cc010
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] mediawiki...CategoryTree[master]: Avoid $wgOut and $wgRequest

2016-11-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Avoid $wgOut and $wgRequest
..

Avoid $wgOut and $wgRequest

CategoryViewer extends ContextSource.

Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21
---
M CategoryPageSubclass.php
1 file changed, 3 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CategoryTree 
refs/changes/40/320340/1

diff --git a/CategoryPageSubclass.php b/CategoryPageSubclass.php
index f71f261..13ea08e 100644
--- a/CategoryPageSubclass.php
+++ b/CategoryPageSubclass.php
@@ -16,11 +16,11 @@
 * @return CategoryTree
 */
function getCategoryTree() {
-   global $wgOut, $wgCategoryTreeCategoryPageOptions, 
$wgCategoryTreeForceHeaders;
+   global $wgCategoryTreeCategoryPageOptions, 
$wgCategoryTreeForceHeaders;
 
if ( !isset( $this->categorytree ) ) {
if ( !$wgCategoryTreeForceHeaders ) {
-   CategoryTree::setHeaders( $wgOut );
+   CategoryTree::setHeaders( $this->getOutput() );
}
 
$this->categorytree = new CategoryTree( 
$wgCategoryTreeCategoryPageOptions );
@@ -36,11 +36,9 @@
 * @param $pageLength
 */
function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) {
-   global $wgRequest;
-
$title = $cat->getTitle();
 
-   if ( $wgRequest->getCheck( 'notree' ) ) {
+   if ( $this->getRequest()->getCheck( 'notree' ) ) {
parent::addSubcategoryObject( $cat, $sortkey, 
$pageLength );
return;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I90ca064ee2af6a93d5d4f55fe90cf2fa792eab21
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CategoryTree
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] mapdata[master]: Added support for 'page' externalData

2016-11-07 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Added support for 'page' externalData
..

Added support for 'page' externalData

Change-Id: Ibfc92478496ee7c8b4901926d0b1abf234cfd80a
---
M src/Group.External.js
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mapdata refs/changes/39/320339/1

diff --git a/src/Group.External.js b/src/Group.External.js
index 1b8a27a..5c51b08 100644
--- a/src/Group.External.js
+++ b/src/Group.External.js
@@ -44,6 +44,13 @@
 
   switch ( data.service ) {
 
+case 'page':
+  if ( geodata.jsondata && geodata.jsondata.data ) {
+extend( data, geodata.jsondata.data );
+  }
+  // FIXME: error reporting, at least to console.log
+  break;
+
 case 'geomask':
   // Mask-out the entire world 10 times east and west,
   // and add each result geometry as a hole
@@ -119,6 +126,10 @@
 uri = mwUri( group.geoJSON.url );
 
 switch ( group.geoJSON.service ) {
+  case 'page':
+// FIXME: add link to commons page
+break;
+
   case 'geoshape':
   case 'geoline':
 if ( uri.query.query ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibfc92478496ee7c8b4901926d0b1abf234cfd80a
Gerrit-PatchSet: 1
Gerrit-Project: mapdata
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: Yurik 

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Bump version after release

2016-11-07 Thread Arlolra (Code Review)
Arlolra has uploaded a new change for review.

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

Change subject: Bump version after release
..

Bump version after release

Change-Id: Ia5ae28e94caa409a8b9ef51f94045c9bde13f041
---
M HISTORY.md
M package.json
2 files changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/HISTORY.md b/HISTORY.md
index ea93828..e463639 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,3 +1,8 @@
+
+n.n.n / -XX-XX
+==
+
+
 0.6.0 / 2016-11-07
 ==
 
diff --git a/package.json b/package.json
index e6cafb7..eb2a121 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
 {
   "name": "parsoid",
   "description": "Mediawiki parser for the VisualEditor.",
-  "version": "0.6.0",
+  "version": "0.6.0+git",
   "license": "GPL-2.0+",
   "dependencies": {
 "async": "^0.9.2",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5ae28e94caa409a8b9ef51f94045c9bde13f041
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] mapdata[master]: Add .gitreview

2016-11-07 Thread MaxSem (Code Review)
MaxSem has submitted this change and it was merged.

Change subject: Add .gitreview
..


Add .gitreview

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

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



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

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I72f200faa65d8ce7e9729e45040a683e3174ac9b
Gerrit-PatchSet: 1
Gerrit-Project: mapdata
Gerrit-Branch: master
Gerrit-Owner: MaxSem 
Gerrit-Reviewer: MaxSem 

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


[MediaWiki-commits] [Gerrit] mapdata[master]: Add .gitreview

2016-11-07 Thread MaxSem (Code Review)
MaxSem has uploaded a new change for review.

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

Change subject: Add .gitreview
..

Add .gitreview

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


  git pull ssh://gerrit.wikimedia.org:29418/mapdata refs/changes/37/320337/1

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

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I72f200faa65d8ce7e9729e45040a683e3174ac9b
Gerrit-PatchSet: 1
Gerrit-Project: mapdata
Gerrit-Branch: master
Gerrit-Owner: MaxSem 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Use standard namespace structure

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

Change subject: Use standard namespace structure
..


Use standard namespace structure

* use a subnamespace of MediaWiki\Extensions
* use PSR-4 file naming

Change-Id: Ie51b9c8d1b898bf68dd063c38365ea675aae4f59
---
M extension.json
R includes/Hooks.php
2 files changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/extension.json b/extension.json
index 367d7fc..2e8961a 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,11 @@
"descriptionmsg": "pvi-desc",
"Hooks": {
"InfoAction": [
-   "PageViewInfo\\Hooks::onInfoAction"
+   
"MediaWiki\\Extensions\\PageViewInfo\\Hooks::onInfoAction"
]
},
"AutoloadClasses": {
-   "PageViewInfo\\Hooks": "includes/PageViewInfo.hooks.php"
+   "MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php"
},
"MessagesDirs": {
"PageViewInfo": [
diff --git a/includes/PageViewInfo.hooks.php b/includes/Hooks.php
similarity index 98%
rename from includes/PageViewInfo.hooks.php
rename to includes/Hooks.php
index af4cdda..5302afd 100644
--- a/includes/PageViewInfo.hooks.php
+++ b/includes/Hooks.php
@@ -1,6 +1,6 @@
 https://gerrit.wikimedia.org/r/320319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie51b9c8d1b898bf68dd063c38365ea675aae4f59
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/PageViewInfo
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge Submodule update

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

Change subject: Merge Submodule update
..


Merge Submodule update

Change-Id: Ia3c7ab1bd58e92ae271888477d8efdc8984060da
---
D sites/all/modules/offline2civicrm/test_data/engage.csv
1 file changed, 0 insertions(+), 1,004 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia3c7ab1bd58e92ae271888477d8efdc8984060da
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge Submodule update

2016-11-07 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: Merge Submodule update
..

Merge Submodule update

Change-Id: Ia3c7ab1bd58e92ae271888477d8efdc8984060da
---
D sites/all/modules/offline2civicrm/test_data/engage.csv
1 file changed, 0 insertions(+), 1,004 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/36/320336/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia3c7ab1bd58e92ae271888477d8efdc8984060da
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Finish rename to PageViewInfo

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

Change subject: Finish rename to PageViewInfo
..


Finish rename to PageViewInfo

Change-Id: Iaf83d2fafd09c8ba4509649d51ca94f1003dd75d
---
M extension.json
M i18n/lt.json
M i18n/qqq.json
M includes/PageViewInfo.hooks.php
R resources/ext.pageviewinfo.js
5 files changed, 10 insertions(+), 10 deletions(-)

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



diff --git a/extension.json b/extension.json
index b84b862..367d7fc 100644
--- a/extension.json
+++ b/extension.json
@@ -1,10 +1,10 @@
 {
-   "name": "WikimediaPageViewInfo",
+   "name": "PageViewInfo",
"license-name": "GPL-3.0+",
"author": [
"Kunal Mehta"
],
-   "url": "https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo;,
+   "url": "https://www.mediawiki.org/wiki/Extension:PageViewInfo;,
"descriptionmsg": "pvi-desc",
"Hooks": {
"InfoAction": [
@@ -20,9 +20,9 @@
]
},
"ResourceModules": {
-   "ext.wmpageviewinfo": {
+   "ext.pageviewinfo": {
"scripts": [
-   "ext.wmpageviewinfo.js"
+   "ext.pageviewinfo.js"
],
"messages": [
"pvi-close",
diff --git a/i18n/lt.json b/i18n/lt.json
index 61c7411..e030537 100644
--- a/i18n/lt.json
+++ b/i18n/lt.json
@@ -4,6 +4,6 @@
"Eitvys200"
]
},
-   "wmpvi-month-count": "Puslapio peržiūros per paskutines 30 dienų",
-   "wmpvi-close": "Uždaryti"
+   "pvi-month-count": "Puslapio peržiūros per paskutines 30 dienų",
+   "pvi-close": "Uždaryti"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 368d699..85b449e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,7 +5,7 @@
"Liuxinyu970226"
]
},
-   "pvi-desc": 
"{{desc|name=WikimediaPageViewInfo|url=https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo}};,
+   "pvi-desc": 
"{{desc|name=PageViewInfo|url=https://www.mediawiki.org/wiki/Extension:PageViewInfo}};,
"pvi-month-count": "Label for table cell containing page views in past 
30 days",
"pvi-close": "Text on button to close a dialog\n{{Identical|Close}}",
"pvi-range": "Title of dialog, which is the date range the graph is 
for. $1 is the starting date, $2 is the ending date."
diff --git a/includes/PageViewInfo.hooks.php b/includes/PageViewInfo.hooks.php
index 0f87f45..af4cdda 100644
--- a/includes/PageViewInfo.hooks.php
+++ b/includes/PageViewInfo.hooks.php
@@ -37,12 +37,12 @@
);
$info['data'][0]['values'] = $views['items'];
 
-   $ctx->getOutput()->addModules( 'ext.wmpageviewinfo' );
+   $ctx->getOutput()->addModules( 'ext.pageviewinfo' );
// Ymd -> YmdHis
$plus = '00';
$user = $ctx->getUser();
$ctx->getOutput()->addJsConfigVars( [
-   'wgWMPageViewInfo' => [
+   'wgPageViewInfo' => [
'graph' => $info,
'start' => $lang->userDate( $views['start'] . 
$plus, $user ),
'end' => $lang->userDate( $views['end'] . 
$plus, $user ),
diff --git a/resources/ext.wmpageviewinfo.js b/resources/ext.pageviewinfo.js
similarity index 96%
rename from resources/ext.wmpageviewinfo.js
rename to resources/ext.pageviewinfo.js
index 300522d..486d68c 100644
--- a/resources/ext.wmpageviewinfo.js
+++ b/resources/ext.pageviewinfo.js
@@ -2,7 +2,7 @@
$( function () {
var $count = $( '.mw-pvi-month' ),
count = $count.text(),
-   info = mw.config.get( 'wgWMPageViewInfo' );
+   info = mw.config.get( 'wgPageViewInfo' );
 
// Turn it into an  tag so it's obvious you can click on it
$count.html( mw.html.element( 'a', { href: '#' }, count ) );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaf83d2fafd09c8ba4509649d51ca94f1003dd75d
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/PageViewInfo
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: Add some error handling to wikistatus, and make more thread-...

2016-11-07 Thread Andrew Bogott (Code Review)
Andrew Bogott has uploaded a new change for review.

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

Change subject: Add some error handling to wikistatus, and make more thread-safe
..

Add some error handling to wikistatus, and make more thread-safe

Change-Id: I10bc72a99360cdf60fe019d059c0bd6437b9aa22
---
M modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
1 file changed, 16 insertions(+), 17 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/35/320335/1

diff --git a/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py 
b/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
index dab483a..a78ddcd 100644
--- a/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
+++ b/modules/openstack/files/liberty/nova/wikistatus/wikistatus.py
@@ -111,26 +111,25 @@
 
 def __init__(self, conf, topics, transport, version=1.0):
 self.host = CONF.wiki_host
-self.site = None
 self.kclient = {}
 self.tenant_manager = {}
 self.user_manager = {}
 self._wiki_logged_in = False
 self._image_service = image.glance.get_default_image_service()
 
-def _wiki_login(self):
-if not self._wiki_logged_in:
-if not self.site:
-self.site = mwclient.Site(("https", self.host),
-  retry_timeout=5,
-  max_retries=3)
-if self.site:
-self.site.login(CONF.wiki_login, CONF.wiki_password,
-domain=CONF.wiki_domain)
-self._wiki_logged_in = True
-else:
-LOG.warning("Unable to reach %s.  We'll keep trying, "
-"but pages will be out of sync in the meantime.")
+@staticmethod
+def _wiki_login(host):
+site = mwclient.Site(("https", host),
+ retry_timeout=5,
+ max_retries=3)
+if site:
+site.login(CONF.wiki_login, CONF.wiki_password,
+   domain=CONF.wiki_domain)
+return site
+else:
+LOG.warning("Unable to reach %s.  We'll keep trying, "
+"but pages will be out of sync in the meantime.")
+return None
 
 def _keystone_login(self, tenant_id, ctxt):
 if tenant_id not in self.kclient:
@@ -228,7 +227,7 @@
 image = self._image_service.show(ctxt, inst['image_ref'])
 image_name = image.get('name', inst['image_ref'])
 template_param_dict['image_name'] = image_name
-except (TypeError):
+except (TypeError, exception.ImageNotAuthorized):
 template_param_dict['image_name'] = inst['image_ref']
 else:
 template_param_dict['image_name'] = 'tbd'
@@ -245,13 +244,13 @@
 fields_string,
 end_comment)
 
-self._wiki_login()
+site = self._wiki_login(self.host)
 pagename = "%s%s" % (CONF.wiki_page_prefix, resourceName)
 LOG.debug("wikistatus:  Writing instance info"
   " to page http://%s/wiki/%s; %
   (self.host, pagename))
 
-page = self.site.Pages[pagename]
+page = site.Pages[pagename]
 try:
 if delete_page:
 page.delete(reason='Instance deleted')

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I10bc72a99360cdf60fe019d059c0bd6437b9aa22
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 

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


[MediaWiki-commits] [Gerrit] mediawiki...WikimediaPageViewInfo[master]: Archive old repo

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

Change subject: Archive old repo
..


Archive old repo

The extension has been renamed to PageViewInfo.

Bug: T148775
Change-Id: Iaf3289b337801e551837cf7a3c5601e89c09baa2
---
D .jscsrc
D .jshintignore
D .jshintrc
D Gruntfile.js
A README.txt
M composer.json
M extension.json
D graphs/month.json
D i18n/ar.json
D i18n/ast.json
D i18n/ba.json
D i18n/be-tarask.json
D i18n/bn.json
D i18n/ce.json
D i18n/cs.json
D i18n/de.json
D i18n/en.json
D i18n/eo.json
D i18n/es.json
D i18n/fa.json
D i18n/fi.json
D i18n/fr.json
D i18n/gl.json
D i18n/it.json
D i18n/ja.json
D i18n/ko.json
D i18n/lb.json
D i18n/lt.json
D i18n/mk.json
D i18n/nl.json
D i18n/oc.json
D i18n/pa.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt.json
D i18n/qqq.json
D i18n/ru.json
D i18n/sah.json
D i18n/sv.json
D i18n/tr.json
D i18n/uk.json
D i18n/vi.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D includes/PageViewInfo.hooks.php
M package.json
D phpcs.xml
D resources/ext.wmpageviewinfo.js
D trends.json
49 files changed, 5 insertions(+), 806 deletions(-)

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



diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index c2658d7..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 66e3d48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 5523196..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*jshint node:true */
-module.exports = function ( grunt ) {
-   var conf = grunt.file.readJSON( 'extension.json' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
-
-   grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   all: [
-   'resources/*.js',
-   '*.js'
-   ]
-   },
-   jscs: {
-   src: '<%= jshint.all %>'
-   },
-   banana: conf.MessagesDirs,
-   jsonlint: {
-   all: [
-   '**/*.json',
-   '!node_modules/**'
-   ]
-   }
-   } );
-
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
-   grunt.registerTask( 'default', 'test' );
-};
diff --git a/README.txt b/README.txt
new file mode 100644
index 000..8b8d148
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,3 @@
+The WikimediaPageViewInfo extension has been renamed to PageViewInfo.
+You can find it at https://www.mediawiki.org/wiki/Extension:PageViewInfo
+
diff --git a/composer.json b/composer.json
index 9e0d685..3c0882d 100644
--- a/composer.json
+++ b/composer.json
@@ -1,13 +1,5 @@
 {
-   "require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
-   },
"scripts": {
-   "test": [
-   "parallel-lint . --exclude vendor",
-   "phpcs -p -s"
-   ],
-   "fix": "phpcbf"
+   "test": "true"
}
 }
diff --git a/extension.json b/extension.json
index 7fee2fc..3111bbc 100644
--- a/extension.json
+++ b/extension.json
@@ -5,42 +5,5 @@
"Kunal Mehta"
],
"url": "https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo;,
-   "descriptionmsg": "wmpvi-desc",
-   "Hooks": {
-   "InfoAction": [
-   "PageViewInfo\\Hooks::onInfoAction"
-   ]
-   },
-   "AutoloadClasses": {
-   "PageViewInfo\\Hooks": "includes/PageViewInfo.hooks.php"
-   },
-   "MessagesDirs": {
-   "PageViewInfo": [
-   "i18n"
-   ]
-   },
-   "ResourceModules": {
-   "ext.wmpageviewinfo": {
-   "scripts": [
-   

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Remove OATHAuth from CommonSettings-labs

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

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

Change subject: Remove OATHAuth from CommonSettings-labs
..

Remove OATHAuth from CommonSettings-labs

Same as production (pretty much)

Change-Id: Ia35893e66ec37741d96af2cc52a6a42fc8fe4351
---
M wmf-config/CommonSettings-labs.php
1 file changed, 0 insertions(+), 7 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 527ab24..882a7bd 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -364,13 +364,6 @@
wfLoadExtension( 'PerformanceInspector' );
 }
 
-if ( $wmgUseOATHAuth && $wmgUseCentralAuth ) {
-   wfLoadExtension( 'OATHAuth' );
-   $wgOATHAuthDatabase = 'centralauth';
-   // Roll this feature out to specific groups initially
-   $wgGroupPermissions['*']['oathauth-enable'] = false;
-}
-
 if ( $wmgUseUniversalLanguageSelector ) {
$wgDefaultUserOptions['compact-language-links'] = 0;
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add PageViewInfo to beta

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

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

Change subject: Add PageViewInfo to beta
..

Add PageViewInfo to beta

Change-Id: I3835ad167266d699b4c4459ee312686152a36a0c
---
M wmf-config/CommonSettings-labs.php
M wmf-config/InitialiseSettings-labs.php
M wmf-config/extension-list-labs
3 files changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/CommonSettings-labs.php 
b/wmf-config/CommonSettings-labs.php
index 527ab24..90b8c07 100644
--- a/wmf-config/CommonSettings-labs.php
+++ b/wmf-config/CommonSettings-labs.php
@@ -375,6 +375,10 @@
$wgDefaultUserOptions['compact-language-links'] = 0;
 }
 
+if ( $wmgUsePageViewInfo ) {
+   wfLoadExtension( 'PageViewInfo' );
+}
+
 $wgMessageCacheType = CACHE_ACCEL;
 
 // Let Beta Cluster Commons do upload-from-URL from production Commons.
diff --git a/wmf-config/InitialiseSettings-labs.php 
b/wmf-config/InitialiseSettings-labs.php
index 550a9d9..54cf992 100644
--- a/wmf-config/InitialiseSettings-labs.php
+++ b/wmf-config/InitialiseSettings-labs.php
@@ -588,5 +588,8 @@
'default' => true,
],
 
+   'wmgEnablePageViewInfo' => [
+   'default' => true,
+   ],
];
 } # wmflLabsSettings()
diff --git a/wmf-config/extension-list-labs b/wmf-config/extension-list-labs
index 479d27b..3aff332 100644
--- a/wmf-config/extension-list-labs
+++ b/wmf-config/extension-list-labs
@@ -1,3 +1,4 @@
 $IP/extensions/Newsletter/extension.json
+$IP/extensions/PageViewInfo/extension.json
 $IP/extensions/PerformanceInspector/extension.json
 $IP/extensions/Sentry/extension.json

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Search .mw-body instead of #content to support all the skins

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

Change subject: Search .mw-body instead of #content to support all the skins
..


Search .mw-body instead of #content to support all the skins

Bug: T150148
Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
---
M modules/maplink/maplink.js
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/modules/maplink/maplink.js b/modules/maplink/maplink.js
index 2e7a3b3..0f5e522 100644
--- a/modules/maplink/maplink.js
+++ b/modules/maplink/maplink.js
@@ -66,8 +66,8 @@
 
// Some links might be displayed outside of $content, so we 
need to
// search outside. This is an anti-pattern and should be 
improved...
-   // Meanwhile #content is better than searching the full 
document.
-   $( '.mw-kartographer-maplink', '#content' ).each( function ( 
index ) {
+   // Meanwhile .mw-body is better than searching the full 
document.
+   $( '.mw-kartographer-maplink', '.mw-body' ).each( function ( 
index ) {
var data = getMapData( this ),
link;
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] VisualEditor/VisualEditor[master]: Converter: Remove internal during the main loop

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

Change subject: Converter: Remove internal during the main loop
..


Converter: Remove internal during the main loop

It was placed in a separate loop so as not to affect whitespace
calculations at the end of the document, so fix that calculation
to include the next node being the internal list.

Also assume the internalList is the last thing in the document.
We were over cautious about this when IL was introduced, but we
make this assumption is so many other places.

Change-Id: Ice6b16722b234b63548be72a8e1017ef24d3cc8f
---
M src/dm/ve.dm.Converter.js
1 file changed, 7 insertions(+), 31 deletions(-)

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



diff --git a/src/dm/ve.dm.Converter.js b/src/dm/ve.dm.Converter.js
index 23acaa7..a94ad72 100644
--- a/src/dm/ve.dm.Converter.js
+++ b/src/dm/ve.dm.Converter.js
@@ -1210,35 +1210,6 @@
return dataSlice;
}
 
-   function removeInternalNodes() {
-   var dataCopy, endOffset;
-   // See if there is an internalList in the data, and if there is 
one, remove it
-   // Removing it here prevents unwanted interactions with 
whitespace preservation
-   for ( i = 0; i < dataLen; i++ ) {
-   if (
-   data[ i ].type && data[ i ].type.charAt( 0 ) 
!== '/' &&
-   ve.dm.nodeFactory.lookup( data[ i ].type ) &&
-   ve.dm.nodeFactory.isNodeInternal( data[ i 
].type )
-   ) {
-   // Copy data if we haven't already done so
-   if ( !dataCopy ) {
-   dataCopy = data.slice();
-   }
-   endOffset = findEndOfNode( i );
-   // Remove this node's data from dataCopy
-   dataCopy.splice( i - ( dataLen - 
dataCopy.length ), endOffset - i );
-   // Move i such that it will be at endOffset in 
the next iteration
-   i = endOffset - 1;
-   }
-   }
-   if ( dataCopy ) {
-   data = dataCopy;
-   dataLen = data.length;
-   }
-   }
-
-   removeInternalNodes();
-
for ( i = 0; i < dataLen; i++ ) {
if ( typeof data[ i ] === 'string' ) {
// Text
@@ -1431,8 +1402,10 @@
if ( 
domElement.childNodes.length === 0 && (
// then 
check that we are the last child
// 
before unwrapping (and therefore destroying)
-   i === 
data.length - 1 ||
-   data[ i 
+ 1 ].type.charAt( 0 ) === '/'
+   data[ i 
+ 1 ] === undefined ||
+   data[ i 
+ 1 ].type.charAt( 0 ) === '/' ||
+   // 
Document ends when we encounter the internal list
+   ( data[ 
i + 1 ].type && this.nodeFactory.isNodeInternal( data[ i + 1 ].type ) )
)
) {
doUnwrap = true;
@@ -1491,6 +1464,9 @@
// Create node from data
if ( this.metaItemFactory.lookup( data[ i 
].type ) ) {
isContentNode = canContainContentStack[ 
canContainContentStack.length - 1 ];
+   } else if ( this.nodeFactory.isNodeInternal( 
data[ i ].type ) ) {
+   // Reached the internal list, finish
+   break;
} else {
canContainContentStack.push(
// if the last item was true 
then this item must inherit it

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ice6b16722b234b63548be72a8e1017ef24d3cc8f
Gerrit-PatchSet: 5
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviCRM submodule update

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

Change subject: CiviCRM submodule update
..


CiviCRM submodule update

367b0db CRM-19337 fix contact sub_type display on reports

Change-Id: Iccc5384fa7f27d59165bef810be161881ff87194
---
M civicrm
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/civicrm b/civicrm
index 6f26dbe..367b0db 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit 6f26dbe54c6f727e5de22f29a179ec6e1b0ee0de
+Subproject commit 367b0db772d944f8f489ac2da716b195dfb0a59a

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iccc5384fa7f27d59165bef810be161881ff87194
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [super-atomic-WIP] Adding filters to RecentChanges

2016-11-07 Thread Mooeypoo (Code Review)
Mooeypoo has uploaded a new change for review.

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

Change subject: [super-atomic-WIP] Adding filters to RecentChanges
..

[super-atomic-WIP] Adding filters to RecentChanges

This is a super super super WIP patch, not ready to be reviewed
or considered. Don't look at it. Seriously, avert your eyes.

Go ahead.

Do it.

You're still looking.

Stop.

Bug: T149435
Bug: T149452
Bug: T18
Change-Id: Ic545ff1462998b610d7edae59472ecce2e7d51ea
---
M includes/specials/SpecialRecentchanges.php
M resources/Resources.php
A resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
A resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js
A resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js
A resources/src/mediawiki.rcfilters/mw.rcfilters.init.js
A resources/src/mediawiki.rcfilters/mw.rcfilters.js
A resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less
A resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js
A resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js
A resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js
A resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FiltersListWidget.js
12 files changed, 498 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/32/320332/1

diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index cd3299c..6e6e9e3 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -521,6 +521,8 @@
parent::addModules();
$out = $this->getOutput();
$out->addModules( 'mediawiki.special.recentchanges' );
+   // TODO: Add a config option / feature flag
+   $out->addModules( 'mediawiki.rcfilters.filters' );
}
 
/**
diff --git a/resources/Resources.php b/resources/Resources.php
index 2e4a15d..f25a95e 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -1806,6 +1806,26 @@
 
/* MediaWiki Special pages */
 
+   'mediawiki.rcfilters.filters' => [
+   'scripts' => [
+   'resources/src/mediawiki.rcfilters/mw.rcfilters.js',
+   
'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js',
+   
'resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FiltersViewModel.js',
+   
'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FiltersListWidget.js',
+   
'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterGroupWidget.js',
+   
'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterItemWidget.js',
+   
'resources/src/mediawiki.rcfilters/ui/mw.rcfilters.ui.FilterWrapperWidget.js',
+   
'resources/src/mediawiki.rcfilters/mw.rcfilters.Controller.js',
+   
'resources/src/mediawiki.rcfilters/mw.rcfilters.init.js',
+   ],
+   'styles' => [
+   
'resources/src/mediawiki.rcfilters/styles/mw.rcfilters.less',
+   ],
+   'dependencies' => [
+   'oojs-ui',
+   ],
+   'position' => 'top',
+   ],
'mediawiki.special' => [
'position' => 'top',
'styles' => 
'resources/src/mediawiki.special/mediawiki.special.css',
diff --git a/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js 
b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
new file mode 100644
index 000..e4dca08
--- /dev/null
+++ b/resources/src/mediawiki.rcfilters/dm/mw.rcfilters.dm.FilterItem.js
@@ -0,0 +1,75 @@
+( function ( mw ) {
+   /**
+* Filter item model
+*
+* @mixins OO.EventEmitter
+*
+* @constructor
+* @param {string} name Filter name
+* @param {Object} config Configuration object
+* @cfg {boolean} [selected] Filter is selected
+*/
+   mw.rcfilters.dm.FilterItem = function MwRcfiltersDmFilterItem( name, 
config ) {
+   config = config || {};
+
+   // Mixin constructor
+   OO.EventEmitter.call( this );
+
+   this.name = name;
+   this.label = config.label || this.name;
+   this.description = config.description;
+
+   this.selected = !!config.selected;
+   };
+
+   /* Initialization */
+
+   OO.initClass( mw.rcfilters.dm.FilterItem );
+   OO.mixinClass( mw.rcfilters.dm.FilterItem, OO.EventEmitter );
+
+   /* Events */
+
+   /**
+* @event update
+* @param {boolean} isSelected Filter is selected
+* @param {string} color Color used to mark this filter
+*
+* The state of 

[MediaWiki-commits] [Gerrit] mediawiki...WikimediaPageViewInfo[master]: Archive old repo

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

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

Change subject: Archive old repo
..

Archive old repo

The extension has been renamed to PageViewInfo.

Bug: T148775
Change-Id: Iaf3289b337801e551837cf7a3c5601e89c09baa2
---
D .jscsrc
D .jshintignore
D .jshintrc
D Gruntfile.js
A README.txt
M composer.json
M extension.json
D graphs/month.json
D i18n/ar.json
D i18n/ast.json
D i18n/ba.json
D i18n/be-tarask.json
D i18n/bn.json
D i18n/ce.json
D i18n/cs.json
D i18n/de.json
D i18n/en.json
D i18n/eo.json
D i18n/es.json
D i18n/fa.json
D i18n/fi.json
D i18n/fr.json
D i18n/gl.json
D i18n/it.json
D i18n/ja.json
D i18n/ko.json
D i18n/lb.json
D i18n/lt.json
D i18n/mk.json
D i18n/nl.json
D i18n/oc.json
D i18n/pa.json
D i18n/pl.json
D i18n/ps.json
D i18n/pt.json
D i18n/qqq.json
D i18n/ru.json
D i18n/sah.json
D i18n/sv.json
D i18n/tr.json
D i18n/uk.json
D i18n/vi.json
D i18n/zh-hans.json
D i18n/zh-hant.json
D includes/PageViewInfo.hooks.php
M package.json
D phpcs.xml
D resources/ext.wmpageviewinfo.js
D trends.json
49 files changed, 5 insertions(+), 806 deletions(-)


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

diff --git a/.jscsrc b/.jscsrc
deleted file mode 100644
index 9d22e3f..000
--- a/.jscsrc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
-   "preset": "wikimedia"
-}
diff --git a/.jshintignore b/.jshintignore
deleted file mode 100644
index c2658d7..000
--- a/.jshintignore
+++ /dev/null
@@ -1 +0,0 @@
-node_modules/
diff --git a/.jshintrc b/.jshintrc
deleted file mode 100644
index 66e3d48..000
--- a/.jshintrc
+++ /dev/null
@@ -1,24 +0,0 @@
-{
-   // Enforcing
-   "bitwise": true,
-   "eqeqeq": true,
-   "freeze": true,
-   "latedef": true,
-   "noarg": true,
-   "nonew": true,
-   "undef": true,
-   "unused": true,
-   "strict": false,
-
-   // Relaxing
-   "es5": false,
-
-   // Environment
-   "browser": true,
-   "jquery": true,
-
-   "globals": {
-   "mediaWiki": false,
-   "OO": false
-   }
-}
diff --git a/Gruntfile.js b/Gruntfile.js
deleted file mode 100644
index 5523196..000
--- a/Gruntfile.js
+++ /dev/null
@@ -1,33 +0,0 @@
-/*jshint node:true */
-module.exports = function ( grunt ) {
-   var conf = grunt.file.readJSON( 'extension.json' );
-   grunt.loadNpmTasks( 'grunt-contrib-jshint' );
-   grunt.loadNpmTasks( 'grunt-jsonlint' );
-   grunt.loadNpmTasks( 'grunt-banana-checker' );
-   grunt.loadNpmTasks( 'grunt-jscs' );
-
-   grunt.initConfig( {
-   jshint: {
-   options: {
-   jshintrc: true
-   },
-   all: [
-   'resources/*.js',
-   '*.js'
-   ]
-   },
-   jscs: {
-   src: '<%= jshint.all %>'
-   },
-   banana: conf.MessagesDirs,
-   jsonlint: {
-   all: [
-   '**/*.json',
-   '!node_modules/**'
-   ]
-   }
-   } );
-
-   grunt.registerTask( 'test', [ 'jshint', 'jscs', 'jsonlint', 'banana' ] 
);
-   grunt.registerTask( 'default', 'test' );
-};
diff --git a/README.txt b/README.txt
new file mode 100644
index 000..8b8d148
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,3 @@
+The WikimediaPageViewInfo extension has been renamed to PageViewInfo.
+You can find it at https://www.mediawiki.org/wiki/Extension:PageViewInfo
+
diff --git a/composer.json b/composer.json
index 9e0d685..3c0882d 100644
--- a/composer.json
+++ b/composer.json
@@ -1,13 +1,5 @@
 {
-   "require-dev": {
-   "jakub-onderka/php-parallel-lint": "0.9.2",
-   "mediawiki/mediawiki-codesniffer": "0.7.2"
-   },
"scripts": {
-   "test": [
-   "parallel-lint . --exclude vendor",
-   "phpcs -p -s"
-   ],
-   "fix": "phpcbf"
+   "test": "true"
}
 }
diff --git a/extension.json b/extension.json
index 7fee2fc..3111bbc 100644
--- a/extension.json
+++ b/extension.json
@@ -5,42 +5,5 @@
"Kunal Mehta"
],
"url": "https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo;,
-   "descriptionmsg": "wmpvi-desc",
-   "Hooks": {
-   "InfoAction": [
-   "PageViewInfo\\Hooks::onInfoAction"
-   ]
-   },
-   "AutoloadClasses": {
-   "PageViewInfo\\Hooks": "includes/PageViewInfo.hooks.php"
-   },
-   "MessagesDirs": {
-   "PageViewInfo": [
-   "i18n"
-   ]
-   },
-   "ResourceModules": {
-   

[MediaWiki-commits] [Gerrit] mediawiki...MassMessage[master]: Use a page for preview that is more likely to not exist

2016-11-07 Thread Legoktm (Code Review)
Legoktm has uploaded a new change for review.

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

Change subject: Use a page for preview that is more likely to not exist
..

Use a page for preview that is more likely to not exist

This isn't a real fix, but should work for now.

Bug: T150225
Change-Id: I2b361b809029f068b48a6384428ccb5ceddf23b6
---
M includes/SpecialMassMessage.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/SpecialMassMessage.php b/includes/SpecialMassMessage.php
index 0a35e12..344785b 100644
--- a/includes/SpecialMassMessage.php
+++ b/includes/SpecialMassMessage.php
@@ -277,7 +277,7 @@
$this->getOutput()->addHTML( $infoFieldset );
 
// Use a mock target as the context for rendering the preview
-   $mockTarget = Title::newFromText( 'Project:Example' );
+   $mockTarget = Title::newFromText( 'Project:MassMessage:A page 
that should not exist' );
$wikipage = WikiPage::factory( $mockTarget );
 
// Convert into a content object

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b361b809029f068b48a6384428ccb5ceddf23b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MassMessage
Gerrit-Branch: master
Gerrit-Owner: Legoktm 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: CiviCRM submodule update

2016-11-07 Thread Eileen (Code Review)
Eileen has uploaded a new change for review.

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

Change subject: CiviCRM submodule update
..

CiviCRM submodule update

367b0db CRM-19337 fix contact sub_type display on reports

Change-Id: Iccc5384fa7f27d59165bef810be161881ff87194
---
M civicrm
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/29/320329/1

diff --git a/civicrm b/civicrm
index 6f26dbe..367b0db 16
--- a/civicrm
+++ b/civicrm
@@ -1 +1 @@
-Subproject commit 6f26dbe54c6f727e5de22f29a179ec6e1b0ee0de
+Subproject commit 367b0db772d944f8f489ac2da716b195dfb0a59a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iccc5384fa7f27d59165bef810be161881ff87194
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Eileen 

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


[MediaWiki-commits] [Gerrit] mediawiki...ORES[master]: Add "Lowest" ORES sensitivity

2016-11-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Add "Lowest" ORES sensitivity
..

Add "Lowest" ORES sensitivity

Bug: T150224
Change-Id: I9c344429736acd2009510542e3ffd5ed56366b5c
---
M extension.json
M i18n/en.json
2 files changed, 2 insertions(+), 0 deletions(-)


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

diff --git a/extension.json b/extension.json
index 9a20026..71419d5 100644
--- a/extension.json
+++ b/extension.json
@@ -140,6 +140,7 @@
}
},
"OresDamagingThresholds": {
+   "softest": 0.90,
"soft": 0.70,
"hard": 0.50
},
diff --git a/i18n/en.json b/i18n/en.json
index 0684de4..97d7906 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -9,6 +9,7 @@
"ores-damaging-hard": "High (flags more edits)",
"ores-damaging-letter": "r",
"ores-damaging-soft": "Low (flags fewer edits)",
+   "ores-damaging-softest": "Lowest (flags least edits possible)",
"ores-damaging-title": "This edit needs review",
"ores-damaging-legend": "This edit may be damaging and should be 
reviewed ([[:mw:Special:MyLanguage/ORES review tool|more info]])",
"ores-help-damaging-pref": "This threshold determines how sensitive 
ORES is when flagging edits needing review",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c344429736acd2009510542e3ffd5ed56366b5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ORES
Gerrit-Branch: master
Gerrit-Owner: Ladsgroup 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: s/Unresctricted/Unrestricted/

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

Change subject: s/Unresctricted/Unrestricted/
..


s/Unresctricted/Unrestricted/

Change-Id: I25462dcb6111c0a0cb101b6e2fd9a36c306de3c6
---
M sites/all/modules/offline2civicrm/test_data/engage.csv
1 file changed, 1,000 insertions(+), 1,000 deletions(-)

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




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

Gerrit-MessageType: merged
Gerrit-Change-Id: I25462dcb6111c0a0cb101b6e2fd9a36c306de3c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Eileen 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Nashville Science edit-a-thon (Vanderbilt library) throttle ...

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

Change subject: Nashville Science edit-a-thon (Vanderbilt library) throttle rule
..


Nashville Science edit-a-thon (Vanderbilt library) throttle rule

New throttle rule:
* Event name  Nashville Science edit-a-thon (Vanderbilt library)
* Event start ... 2016-11-15 10:30 -6:00
* Event end . 2016-11-15 16:00 -6:00
* IP  129.59.122.1/25
* Projects .. enwiki, commonswiki
* Attendees . 20 to 25 (margin set at 50)

Bug: T150207
Change-Id: If38a42fe9db88d98fd6b5e9259c5d12b400dfb89
---
M wmf-config/throttle.php
1 file changed, 8 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 516d0a6..cc6fe1d 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -36,6 +36,14 @@
'value'  => 50 // 40 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T150207 - Nashville Science edit-a-thon 
(Vanderbilt library)
+   'from'   => '2016-11-15T10:30 -6:00',
+   'to' => '2016-11-15T16:00 -6:00',
+   'range'  => '129.59.122.1/25',
+   'dbname' => [ 'enwiki', 'commonswiki' ],
+   'value'  => 50 // 20 to 25 expected
+];
+
 // December 2nd
 $wmgThrottlingExceptions[] = [ // T146600
'from' => '2016-12-02T12:30 -6:00',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If38a42fe9db88d98fd6b5e9259c5d12b400dfb89
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: s/Unresctricted/Unrestricted/

2016-11-07 Thread Cdentinger (Code Review)
Cdentinger has uploaded a new change for review.

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

Change subject: s/Unresctricted/Unrestricted/
..

s/Unresctricted/Unrestricted/

Change-Id: I25462dcb6111c0a0cb101b6e2fd9a36c306de3c6
---
M sites/all/modules/offline2civicrm/test_data/engage.csv
1 file changed, 1,000 insertions(+), 1,000 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/27/320327/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25462dcb6111c0a0cb101b6e2fd9a36c306de3c6
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Cdentinger 

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


[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Add PageViewService to make the extension non-Wikimedia-spec...

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

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

Change subject: Add PageViewService to make the extension non-Wikimedia-specific
..

Add PageViewService to make the extension non-Wikimedia-specific

Change-Id: I0ef75e0b94994270992ef07a1698c99820ff7ff3
Depends-On: I3835b054ceac0fa0bcd58b41efa6bf78a0fafae7
---
M extension.json
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
A includes/PageViewService.php
A includes/ServiceWiring.php
A includes/WikimediaPageViewService.php
A tests/phpunit/ServiceWiringTest.php
A tests/phpunit/WikimediaPageViewServiceTest.php
A tests/smoke/WikimediaPageViewServiceSmokeTest.php
10 files changed, 1,083 insertions(+), 60 deletions(-)


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

diff --git a/extension.json b/extension.json
index 2e8961a..8a24ff3 100644
--- a/extension.json
+++ b/extension.json
@@ -12,7 +12,9 @@
]
},
"AutoloadClasses": {
-   "MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php"
+   "MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php",
+   "MediaWiki\\Extensions\\PageViewInfo\\PageViewService": 
"includes/PageViewService.php",
+   
"MediaWiki\\Extensions\\PageViewInfo\\WikimediaPageViewService": 
"includes/WikimediaPageViewService.php"
},
"MessagesDirs": {
"PageViewInfo": [
@@ -38,9 +40,16 @@
"localBasePath": "resources",
"remoteExtPath": "PageViewInfo/resources"
},
+   "ConfigRegistry": {
+   "PageViewInfo": "GlobalVarConfig::newInstance"
+   },
+   "ServiceWiringFiles": [
+   "includes/ServiceWiring.php"
+   ],
"config": {
-   "PageViewInfoEndpoint": 
"https://wikimedia.org/api/rest_v1/metrics/pageviews;,
-   "PageViewInfoDomain": false
+   "PageViewInfoWikimediaEndpoint": 
"https://wikimedia.org/api/rest_v1;,
+   "PageViewInfoWikimediaDomain": false,
+   "PageViewInfoWikimediaRequestLimit": 5
},
"manifest_version": 1
 }
diff --git a/i18n/en.json b/i18n/en.json
index 7a2174f..339d0b0 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -7,5 +7,6 @@
"pvi-desc": "Adds page view information to the info action",
"pvi-month-count": "Page views in the past 30 days",
"pvi-close": "Close",
-   "pvi-range": "$1 - $2"
+   "pvi-range": "$1 - $2",
+   "pvi-invalidresponse": "Invalid response"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 85b449e..ba260de 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -8,5 +8,6 @@
"pvi-desc": 
"{{desc|name=PageViewInfo|url=https://www.mediawiki.org/wiki/Extension:PageViewInfo}};,
"pvi-month-count": "Label for table cell containing page views in past 
30 days",
"pvi-close": "Text on button to close a dialog\n{{Identical|Close}}",
-   "pvi-range": "Title of dialog, which is the date range the graph is 
for. $1 is the starting date, $2 is the ending date."
+   "pvi-range": "Title of dialog, which is the date range the graph is 
for. $1 is the starting date, $2 is the ending date.",
+   "pvi-invalidresponse": "Error message when the REST API response data 
does not have the expected structure."
 }
diff --git a/includes/Hooks.php b/includes/Hooks.php
index 5302afd..e94ac8c 100644
--- a/includes/Hooks.php
+++ b/includes/Hooks.php
@@ -5,8 +5,8 @@
 use IContextSource;
 use FormatJson;
 use Html;
-use MWHttpRequest;
-use MediaWiki\Logger\LoggerFactory;
+use MediaWiki\MediaWikiServices;
+use ObjectCache;
 use Title;
 
 class Hooks {
@@ -17,15 +17,18 @@
 */
public static function onInfoAction( IContextSource $ctx, array 
&$pageInfo ) {
$views = self::getMonthViews( $ctx->getTitle() );
-   if ( $views === false ) {
+   if ( !$views ) {
return;
}
-   $count = 0;
-   foreach ( $views['items'] as $item ) {
-   $count += $item['views'];
-   }
+
+   $total = array_sum( $views );
+   reset( $views );
+   $start = self::toYmdHis( key( $views ) );
+   end( $views );
+   $end = self::toYmdHis( key( $views ) );
+
$lang = $ctx->getLanguage();
-   $formatted = $lang->formatNum( $count );
+   $formatted = $lang->formatNum( $total );
$pageInfo['header-basic'][] = [
$ctx->msg( 'pvi-month-count' ),
Html::element( 'div', [ 'class' => 'mw-pvi-month' ], 
$formatted )
@@ -35,73 +38,64 @@
file_get_contents( __DIR__ . '/../graphs/month.json' ),
true
);
-  

[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: [WIP] Add API endpoints

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

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

Change subject: [WIP] Add API endpoints
..

[WIP] Add API endpoints

TODO:
* fix prop=pageviews result setting
* add uniques
* i18n

Bug: T144865
Change-Id: Icc3b078180c3ddb7f30c82f6033a931be09e5f22
---
M extension.json
A includes/ApiQueryMostViewed.php
A includes/ApiQueryPageViews.php
A includes/ApiQuerySiteViews.php
M includes/ServiceWiring.php
5 files changed, 247 insertions(+), 1 deletion(-)


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

diff --git a/extension.json b/extension.json
index 923ef1c..b100d15 100644
--- a/extension.json
+++ b/extension.json
@@ -15,7 +15,19 @@
"MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php",
"MediaWiki\\Extensions\\PageViewInfo\\PageViewService": 
"includes/PageViewService.php",
"MediaWiki\\Extensions\\PageViewInfo\\CachedPageViewService": 
"includes/CachedPageViewService.php",
-   
"MediaWiki\\Extensions\\PageViewInfo\\WikimediaPageViewService": 
"includes/WikimediaPageViewService.php"
+   
"MediaWiki\\Extensions\\PageViewInfo\\WikimediaPageViewService": 
"includes/WikimediaPageViewService.php",
+   "MediaWiki\\Extensions\\PageViewInfo\\ApiQueryMostViewed": 
"includes/ApiQueryMostViewed.php",
+   "MediaWiki\\Extensions\\PageViewInfo\\ApiQuerySiteViews": 
"includes/ApiQuerySiteViews.php",
+   "MediaWiki\\Extensions\\PageViewInfo\\ApiQueryPageViews": 
"includes/ApiQueryPageViews.php"
+   },
+   "APIListModules": {
+   "mostviewed": 
"MediaWiki\\Extensions\\PageViewInfo\\ApiQueryMostViewed"
+   },
+   "APIMetaModules": {
+   "siteviews": 
"MediaWiki\\Extensions\\PageViewInfo\\ApiQuerySiteViews"
+   },
+   "APIPropModules": {
+   "pageviews": 
"MediaWiki\\Extensions\\PageViewInfo\\ApiQueryPageViews"
},
"MessagesDirs": {
"PageViewInfo": [
diff --git a/includes/ApiQueryMostViewed.php b/includes/ApiQueryMostViewed.php
new file mode 100644
index 000..b76a125
--- /dev/null
+++ b/includes/ApiQueryMostViewed.php
@@ -0,0 +1,100 @@
+run();
+   }
+
+   public function executeGenerator( $resultPageSet ) {
+   $this->run( $resultPageSet );
+   }
+
+   /**
+* @param ApiPageSet|null $resultPageSet
+*/
+   private function run( ApiPageSet $resultPageSet = null ) {
+   /** @var PageViewService $service */
+   $service = MediaWikiServices::getInstance()->getService( 
'PageViewService' );
+   $status = $service->getTopPages();
+
+   if ( $status->isOK() ) {
+   $params = $this->extractRequestParams();
+   $limit = $params['limit'];
+   $offset = $params['offset'];
+
+   $data = $status->getValue();
+   if ( count( $data ) > $offset + $limit ) {
+   $this->setContinueEnumParameter( 'offset', 
$offset + $limit );
+   }
+   $data = array_slice( $data, $offset, $limit, true );
+
+   if ( $resultPageSet ) {
+   $titles = [];
+   foreach ( $data as $title => $_ ) {
+   $titles[] = Title::newFromText( $title 
);
+   }
+   $resultPageSet->populateFromTitles( $titles );
+   } else {
+   $data = array_map( function ( $title, 
$titleData ) {
+   $item = [];
+   self::addTitleInfo( $item, 
\Title::newFromText( $title ) );
+   $item['count'] = $titleData;
+   return $item;
+   }, array_keys( $data), $data );
+
+   $result = $this->getResult();
+   $result->addValue( 'query', 
$this->getModuleName(), $data );
+   $result->addIndexedTagName( [ 'query', 
$this->getModuleName() ], 'page' );
+   }
+   }
+   $this->getErrorFormatter()->addMessagesFromStatus( 
$this->getModuleName(),
+   Status::wrap( $status ) );
+   }
+
+   public function getCacheMode( $params ) {
+   return 'public';
+   }
+
+   public function getAllowedParams() {
+   return [
+   'limit' => [
+   ApiBase::PARAM_DFLT => 10,
+   ApiBase::PARAM_TYPE => 'limit',
+   ApiBase::PARAM_MIN 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Nashville Science edit-a-thon (Vanderbilt library) throttle ...

2016-11-07 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Nashville Science edit-a-thon (Vanderbilt library) throttle rule
..

Nashville Science edit-a-thon (Vanderbilt library) throttle rule

New throttle rule:
* Event name  Nashville Science edit-a-thon (Vanderbilt library)
* Event start ... 2016-11-15 10:30 -6:00
* Event end . 2016-11-15 16:00 -6:00
* IP  129.59.122.1/25
* Projects .. enwiki, commonswiki
* Attendees . 20 to 25 (margin set at 50)

Bug: T150207
Change-Id: If38a42fe9db88d98fd6b5e9259c5d12b400dfb89
---
M wmf-config/throttle.php
1 file changed, 8 insertions(+), 0 deletions(-)


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

diff --git a/wmf-config/throttle.php b/wmf-config/throttle.php
index 516d0a6..cc6fe1d 100644
--- a/wmf-config/throttle.php
+++ b/wmf-config/throttle.php
@@ -36,6 +36,14 @@
'value'  => 50 // 40 expected
 ];
 
+$wmgThrottlingExceptions[] = [ // T150207 - Nashville Science edit-a-thon 
(Vanderbilt library)
+   'from'   => '2016-11-15T10:30 -6:00',
+   'to' => '2016-11-15T16:00 -6:00',
+   'range'  => '129.59.122.1/25',
+   'dbname' => [ 'enwiki', 'commonswiki' ],
+   'value'  => 50 // 20 to 25 expected
+];
+
 // December 2nd
 $wmgThrottlingExceptions[] = [ // T146600
'from' => '2016-12-02T12:30 -6:00',

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Add cache layer to the service

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

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

Change subject: Add cache layer to the service
..

Add cache layer to the service

Change-Id: Ib8feb757caf1f19c0b245fd90aec42537b0a84a7
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/CachedPageViewService.php
M includes/Hooks.php
M includes/ServiceWiring.php
A tests/phpunit/CachedPageViewServiceTest.php
7 files changed, 654 insertions(+), 37 deletions(-)


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

diff --git a/extension.json b/extension.json
index 8a24ff3..923ef1c 100644
--- a/extension.json
+++ b/extension.json
@@ -14,6 +14,7 @@
"AutoloadClasses": {
"MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php",
"MediaWiki\\Extensions\\PageViewInfo\\PageViewService": 
"includes/PageViewService.php",
+   "MediaWiki\\Extensions\\PageViewInfo\\CachedPageViewService": 
"includes/CachedPageViewService.php",

"MediaWiki\\Extensions\\PageViewInfo\\WikimediaPageViewService": 
"includes/WikimediaPageViewService.php"
},
"MessagesDirs": {
diff --git a/i18n/en.json b/i18n/en.json
index 339d0b0..02f836c 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -8,5 +8,7 @@
"pvi-month-count": "Page views in the past 30 days",
"pvi-close": "Close",
"pvi-range": "$1 - $2",
-   "pvi-invalidresponse": "Invalid response"
+   "pvi-invalidresponse": "Invalid response",
+   "pvi-cached-error": "An earlier attempt to fetch this data failed. To 
limit server load, retries have been blocked for $1.",
+   "pvi-cached-error-title": "An earlier attempt to fetch page \"$1\" 
failed. To limit server load, retries have been blocked for $2."
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index ba260de..6a186c0 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -9,5 +9,7 @@
"pvi-month-count": "Label for table cell containing page views in past 
30 days",
"pvi-close": "Text on button to close a dialog\n{{Identical|Close}}",
"pvi-range": "Title of dialog, which is the date range the graph is 
for. $1 is the starting date, $2 is the ending date.",
-   "pvi-invalidresponse": "Error message when the REST API response data 
does not have the expected structure."
+   "pvi-invalidresponse": "Error message when the REST API response data 
does not have the expected structure.",
+   "pvi-cached-error": "Shown when the cached result is an error. $1 is 
the retry delay in human-readable form (e.g. \"30 minutes\").",
+   "pvi-cached-error-title": "Shown when the cached result (which is part 
of a larger resultset) is an error. $1 is the page name, $2 the retry delay in 
human-readable form (e.g. \"30 minutes\")."
 }
diff --git a/includes/CachedPageViewService.php 
b/includes/CachedPageViewService.php
new file mode 100644
index 000..b3fb540
--- /dev/null
+++ b/includes/CachedPageViewService.php
@@ -0,0 +1,240 @@
+service = $service;
+   $this->logger = new NullLogger();
+   $this->cache = $cache;
+   $this->prefix = $prefix;
+   }
+
+   public function setLogger( LoggerInterface $logger ) {
+   $this->logger = $logger;
+   }
+
+   /**
+* Set the number of days that will be cached. To avoid cache 
fragmentation, the inner service
+* is always called with this number of days; if necessary, the 
response will be expanded with
+* nulls.
+* @param int $cachedDays
+*/
+   public function setCachedDays( $cachedDays ) {
+   $this->cachedDays = $cachedDays;
+   }
+
+   public function supports( $metric, $scope ) {
+   return $this->service->supports( $metric, $scope );
+   }
+
+   public function getPageData( array $titles, $days, $metric = 
self::METRIC_VIEW ) {
+   $status = $this->getTitlesWithCache( $metric, $titles );
+   $data = $status->getValue();
+   foreach ( $data as $title => $titleData ) {
+   if ( $days < $this->cachedDays ) {
+   $data[$title] = array_slice( $titleData, 
-$days, null, true );
+   } elseif ( $days > $this->cachedDays ) {
+   $data[$title] = $this->extendDateRange( 
$titleData, $days );
+   }
+   }
+   $status->setResult( $status->isOK(), $data );
+   return $status;
+   }
+
+   public function getSiteData( $days, $metric = self::METRIC_VIEW ) {
+   $status = $this->getWithCache( $metric, self::SCOPE_SITE );
+   if ( $status->isOK() ) {
+   $data = $status->getValue();
+   if ( $days < $this->cachedDays ) {
+  

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: static.php: Consolidate error headers in wmfStaticShowError()

2016-11-07 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: static.php: Consolidate error headers in wmfStaticShowError()
..

static.php: Consolidate error headers in wmfStaticShowError()

Reduces a bit of code duplication and standardizes the messages
by using HttpStatus

Change-Id: I15298f18964c6d4de0c15fc0cfb3a7ac2f8bb7a9
---
M w/static.php
1 file changed, 9 insertions(+), 15 deletions(-)


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

diff --git a/w/static.php b/w/static.php
index 814c85d..1b9e49d 100644
--- a/w/static.php
+++ b/w/static.php
@@ -29,7 +29,8 @@
 require_once './MWVersion.php';
 require getMediaWiki( 'includes/WebStart.php' );
 
-function wmfStaticShowError( $message, $smaxage = 60 ) {
+function wmfStaticShowError( $message, $status, $smaxage = 60 ) {
+   HttpStatus::header( $status );
header(
'Cache-Control: ' .
's-maxage=' . (int)$smaxage . ', must-revalidate, max-age=0'
@@ -48,15 +49,13 @@
$ctype = StreamFile::contentTypeFromPath( $filePath, /* safe: not for 
upload */ false );
if ( !$ctype || $ctype === 'unknown/unknown' ) {
// Directory, extension-less file or unknown extension
-   header( 'HTTP/1.1 400 Bad Request' );
-   wmfStaticShowError( 'Invalid file type' );
+   wmfStaticShowError( 'Invalid file type', 400 );
return;
}
 
$stat = stat( $filePath );
if ( !$stat ) {
-   header( 'HTTP/1.1 404 Not Found' );
-   wmfStaticShowError( 'Unknown file path', 300 );
+   wmfStaticShowError( 'Unknown file path', 404, 300 );
return;
}
 
@@ -92,16 +91,14 @@
global $wgScriptPath, $IP;
 
if ( !isset( $_SERVER['REQUEST_URI'] ) || !isset( 
$_SERVER['SCRIPT_NAME'] ) ) {
-   header( 'HTTP/1.1 500 Internal Server Error' );
-   wmfStaticShowError( 'Invalid request' );
+   wmfStaticShowError( 'Invalid request', 500 );
return;
}
 
// Ignore direct request (eg. "/w/static.php" or "/w/static.php/test")
// (use strpos instead of equal to ignore pathinfo and query string)
if ( strpos( $_SERVER['REQUEST_URI'], $_SERVER['SCRIPT_NAME'] ) === 0 ) 
{
-   header( 'HTTP/1.1 400 Bad Request' );
-   wmfStaticShowError( 'Invalid request' );
+   wmfStaticShowError( 'Invalid request', 400 );
return;
}
 
@@ -111,8 +108,7 @@
// Strip prefix
$urlPrefix = $wgScriptPath;
if ( strpos( $uriPath, $urlPrefix ) !== 0 ) {
-   header( 'HTTP/1.1 400 Bad Request' );
-   wmfStaticShowError( 'Bad request' );
+   wmfStaticShowError( 'Bad request', 400 );
return;
}
$path = substr( $uriPath, strlen( $urlPrefix ) );
@@ -150,8 +146,7 @@
}
 
if ( strpos( $filePath, $branchDir ) !== 0 ) {
-   header( 'HTTP/1.1 400 Bad Request' );
-   wmfStaticShowError( 'Bad request' );
+   wmfStaticShowError( 'Bad request', 400 );
return;
}
 
@@ -183,8 +178,7 @@
}
 
if ( !$fallback ) {
-   header( 'HTTP/1.1 404 Not Found' );
-   wmfStaticShowError( 'Unknown file path', 300 );
+   wmfStaticShowError( 'Unknown file path', 404, 300 );
$stats->increment( 'wmfstatic.notfound' );
return;
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: static.php: Remove unused $maxage param from wmfStaticShowEr...

2016-11-07 Thread Chad (Code Review)
Chad has uploaded a new change for review.

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

Change subject: static.php: Remove unused $maxage param from 
wmfStaticShowError()
..

static.php: Remove unused $maxage param from wmfStaticShowError()

Change-Id: Ibae9294627d69f07df7326c136c4823423d9a181
---
M w/static.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/w/static.php b/w/static.php
index 3694675..814c85d 100644
--- a/w/static.php
+++ b/w/static.php
@@ -29,10 +29,10 @@
 require_once './MWVersion.php';
 require getMediaWiki( 'includes/WebStart.php' );
 
-function wmfStaticShowError( $message, $smaxage = 60, $maxage = 0 ) {
+function wmfStaticShowError( $message, $smaxage = 60 ) {
header(
'Cache-Control: ' .
-   's-maxage=' . (int)$smaxage . ', must-revalidate, max-age=' . 
(int)$maxage
+   's-maxage=' . (int)$smaxage . ', must-revalidate, max-age=0'
);
header( 'Content-Type: text/plain; charset=utf-8' );
echo "$message\n";

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...Wikibase[master]: Fix LinkRendering bug in action=info in repo entity usage

2016-11-07 Thread Ladsgroup (Code Review)
Ladsgroup has uploaded a new change for review.

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

Change subject: Fix LinkRendering bug in action=info in repo entity usage
..

Fix LinkRendering bug in action=info in repo entity usage

Bug: T149598
Change-Id: I42049861cc3ea777a7e7d410e8f63fba6b26494e
---
M repo/Wikibase.hooks.php
M repo/includes/Hooks/InfoActionHookHandler.php
M repo/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php
3 files changed, 17 insertions(+), 45 deletions(-)


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

diff --git a/repo/Wikibase.hooks.php b/repo/Wikibase.hooks.php
index fb38e90..3e93507 100644
--- a/repo/Wikibase.hooks.php
+++ b/repo/Wikibase.hooks.php
@@ -1170,14 +1170,12 @@
$entityIdLookup = $wikibaseRepo->getEntityIdLookup();
 
$siteLookup = $mediaWikiServices->getSiteLookup();
-   $linkRender = $mediaWikiServices->getLinkRenderer();
 
$infoActionHookHandler = new InfoActionHookHandler(
$namespaceChecker,
$subscriptionLookup,
$siteLookup,
$entityIdLookup,
-   $linkRender,
$context
);
 
diff --git a/repo/includes/Hooks/InfoActionHookHandler.php 
b/repo/includes/Hooks/InfoActionHookHandler.php
index a63a2fe..133c4b7 100644
--- a/repo/includes/Hooks/InfoActionHookHandler.php
+++ b/repo/includes/Hooks/InfoActionHookHandler.php
@@ -4,8 +4,6 @@
 
 use Html;
 use IContextSource;
-use Linker;
-use MediaWiki\Linker\LinkRenderer;
 use SiteLookup;
 use Title;
 use Wikibase\Store\Sql\SqlSubscriptionLookup;
@@ -41,11 +39,6 @@
private $entityIdLookup;
 
/**
-* @var LinkRenderer
-*/
-   private $linkRenderer;
-
-   /**
 * @var IContextSource
 */
private $context;
@@ -55,14 +48,12 @@
SqlSubscriptionLookup $subscriptionLookup,
SiteLookup $siteLookup,
EntityIdLookup $entityIdLookup,
-   LinkRenderer $linkRenderer,
IContextSource $context
) {
$this->namespaceChecker = $namespaceChecker;
$this->subscriptionLookup = $subscriptionLookup;
$this->siteLookup = $siteLookup;
$this->entityIdLookup = $entityIdLookup;
-   $this->linkRenderer = $linkRenderer;
$this->context = $context;
}
 
@@ -99,7 +90,7 @@
}
 
/**
-* @param array $usage
+* @param string[] $subscriptions
 * @param Title $title
 *
 * @return string HTML[]
@@ -137,12 +128,16 @@
if ( !$site ) {
return $subscription;
}
-   if ( !$site->getInterwikiIds() ) {
+
+   $url = $site->getPageUrl( 'Special:EntityUsage/' . 
$title->getText() );
+   if ( !$url ) {
return $subscription;
}
-
-   $title = Title::makeTitle( NS_SPECIAL, 'EntityUsage/' . 
$title->getText(), '', $site->getInterwikiIds()[0] );
-   return $this->linkRenderer->makeLink( $title, $subscription );
+   $element = Html::element( 'a',
+   [ 'href' => $url ],
+   $subscription
+   );
+   return $element;
}
 
 }
diff --git a/repo/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php 
b/repo/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php
index 864c610..638200f 100644
--- a/repo/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php
+++ b/repo/tests/phpunit/includes/Hooks/InfoActionHookHandlerTest.php
@@ -2,8 +2,8 @@
 
 namespace Wikibase\Repo\Tests\Hooks;
 
+use Html;
 use IContextSource;
-use MediaWiki\Linker\LinkRenderer;
 use RequestContext;
 use FileBasedSiteLookup;
 use Site;
@@ -13,7 +13,6 @@
 use Wikibase\DataModel\Entity\Item;
 use Wikibase\DataModel\Entity\ItemId;
 use Wikibase\Repo\Hooks\InfoActionHookHandler;
-use Wikibase\Repo\WikibaseRepo;
 use Wikibase\Store\Sql\SqlSubscriptionLookup;
 
 /**
@@ -39,11 +38,10 @@
}
 
public function handleProvider() {
-   global $wgArticlePath, $wgServer;
-
-   $url = $wgServer . $wgArticlePath;
-   $url = str_replace( '$1', 'en:Special:EntityUsage/', $url );
-
+   $url = 'https://en.wikipedia.org/wiki/Special%3AEntityUsage%2F';
+   $elementDewiki = Html::element('a', [ 'href' => $url ], 
'dewiki' );
+   $elementEnwiki = Html::element('a', [ 'href' => $url ], 
'enwiki' );
+   $elementElwiki = Html::element('a', [ 'href' => $url ], 
'elwiki' );
$context = $this->getContext();
 
$cases = [];
@@ -53,7 +51,7 @@
 

[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Use standard namespace structure

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

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

Change subject: Use standard namespace structure
..

Use standard namespace structure

* use a subnamespace of MediaWiki\Extensions
* use PSR-4 file naming

Change-Id: Ie51b9c8d1b898bf68dd063c38365ea675aae4f59
---
M extension.json
R includes/Hooks.php
2 files changed, 3 insertions(+), 3 deletions(-)


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

diff --git a/extension.json b/extension.json
index 367d7fc..2e8961a 100644
--- a/extension.json
+++ b/extension.json
@@ -8,11 +8,11 @@
"descriptionmsg": "pvi-desc",
"Hooks": {
"InfoAction": [
-   "PageViewInfo\\Hooks::onInfoAction"
+   
"MediaWiki\\Extensions\\PageViewInfo\\Hooks::onInfoAction"
]
},
"AutoloadClasses": {
-   "PageViewInfo\\Hooks": "includes/PageViewInfo.hooks.php"
+   "MediaWiki\\Extensions\\PageViewInfo\\Hooks": 
"includes/Hooks.php"
},
"MessagesDirs": {
"PageViewInfo": [
diff --git a/includes/PageViewInfo.hooks.php b/includes/Hooks.php
similarity index 98%
rename from includes/PageViewInfo.hooks.php
rename to includes/Hooks.php
index af4cdda..5302afd 100644
--- a/includes/PageViewInfo.hooks.php
+++ b/includes/Hooks.php
@@ -1,6 +1,6 @@
 https://gerrit.wikimedia.org/r/320319
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie51b9c8d1b898bf68dd063c38365ea675aae4f59
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageViewInfo
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Handle banner loader errors on client

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

Change subject: Handle banner loader errors on client
..


Handle banner loader errors on client

Bug: T149107
Change-Id: Iab80d0462becf1e7a7a2d9f2df662c7a68aed8bf
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
M special/SpecialBannerLoader.php
M tests/qunit/subscribing/ext.centralNotice.display.tests.js
4 files changed, 59 insertions(+), 11 deletions(-)

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



diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 5536e05..ba4777d 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -153,10 +153,14 @@
);
 
// The returned javascript will call 
mw.centralNotice.insertBanner()
+   // or mw.centralNotice.handleBannerLoaderError() (if an error 
was
+   // handled on the server).
$.ajax( {
url: url.toString(),
dataType: 'script',
cache: true
+   } ).fail( function ( jqXHR, status, error ) {
+   cn.handleBannerLoaderError( status + ': ' + error );
} );
}
 
@@ -309,6 +313,20 @@
}
 
/**
+* Stuff we have to do following the call to fetch a banner (successful
+* or not)
+*/
+   function processAfterBannerFetch() {
+
+   // If we're testing a banner, don't call 
Special:RecordImpression or
+   // run mixin hooks.
+   if ( !cn.internal.state.getData().testingBanner ) {
+   runPostBannerMixinHooks();
+   recordImpression();
+   }
+   }
+
+   /**
 * CentralNotice base public object, exposed as mw.centralNotice. Note:
 * other CN modules may add properties to this object, and we add some
 * dynamically. These additional properties are:
@@ -402,12 +420,7 @@
state.setBannerShown();
}
 
-   // If we're testing a banner, don't call 
Special:RecordImpression or
-   // run mixin hooks.
-   if ( !state.getData().testingBanner ) {
-   runPostBannerMixinHooks();
-   recordImpression();
-   }
+   processAfterBannerFetch();
},
 
/**
@@ -531,6 +544,16 @@
} );
},
 
+   /**
+* Handle a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   handleBannerLoaderError: function ( msg ) {
+   cn.internal.state.setBannerLoaderError( msg );
+   bannerLoadedDeferredObj.reject( 
cn.internal.state.getData() );
+   processAfterBannerFetch();
+   },
+
hideBannerWithCloseButton: function () {
// Hide the banner element
$( '#centralNotice' ).hide();
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index a2b11fb..2d18e1f 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -31,7 +31,8 @@
NO_BANNER_AVAILABLE: new Status( 'no_banner_available', 
3 ),
BANNER_CHOSEN: new Status( 'banner_chosen', 4 ),
BANNER_LOADED_BUT_HIDDEN: new Status( 
'banner_loaded_but_hidden', 5 ),
-   BANNER_SHOWN: new Status( 'banner_shown', 6 )
+   BANNER_SHOWN: new Status( 'banner_shown', 6 ),
+   BANNER_LOADER_ERROR: new Status( 'banner_loader_error', 
7 )
},
 
// Until T114078 is closed, we minify banner history logs. This 
lookup
@@ -363,6 +364,17 @@
},
 
/**
+* Set a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   setBannerLoaderError: function ( msg ) {
+   if ( msg ) {
+   state.data.errorMsg = msg;
+   }
+   setStatus( STATUSES.BANNER_LOADER_ERROR );
+   },
+
+   /**
 * Register that the current page view is included in a test.
 *
 * @param {string} identifier A string to identify the test. 
Should not 

[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Move NWE URL changes into JS

2016-11-07 Thread Alex Monk (Code Review)
Alex Monk has uploaded a new change for review.

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

Change subject: Move NWE URL changes into JS
..

Move NWE URL changes into JS

Bug: T148077
Change-Id: Ic9b94184a48026254cf4a0a812fe6fc8455841b5
---
M VisualEditor.hooks.php
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
2 files changed, 10 insertions(+), 30 deletions(-)


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

diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php
index 5fcc4d4..bb726b7 100644
--- a/VisualEditor.hooks.php
+++ b/VisualEditor.hooks.php
@@ -336,17 +336,6 @@
$user->getOption( 
'visualeditor-tabs' ) === 'multi-tab'
)
) {
-   if (
-   $config->get( 
'VisualEditorEnableWikitext' ) &&
-   $user->getOption( 
'visualeditor-newwikitext' )
-   ) {
-   $parsed = wfParseUrl( 
wfExpandUrl( $editTab['href'] ) );
-   $q = wfCgiToArray( 
$parsed['query'] );
-   unset( $q['action'] );
-   $q['veaction'] = 'editsource';
-   $parsed['query'] = 
wfArrayToCgi( $q );
-   $editTab['href'] = 
wfAssembleUrl( $parsed );
-   }
// Inject the VE tab before or after 
the edit tab
if ( $config->get( 
'VisualEditorTabPosition' ) === 'before' ) {
$editTab['class'] .= ' 
collapsible';
@@ -468,25 +457,6 @@
$sourceEditSection = $tabMessages['editsectionsource'] 
!== null ?
$tabMessages['editsectionsource'] : 
'editsection';
$result['editsection']['text'] = $skin->msg( 
$sourceEditSection )->inLanguage( $lang )->text();
-   }
-
-   if (
-   $config->get( 'VisualEditorEnableWikitext' ) &&
-   $user->getOption( 'visualeditor-newwikitext' ) &&
-   (
-   !$config->get( 'VisualEditorUseSingleEditTab' ) 
||
-   $user->getOption( 'visualeditor-tabs' ) === 
'prefer-wt' ||
-   $user->getOption( 'visualeditor-tabs' ) === 
'multi-tab' ||
-   (
-   $user->getOption( 'visualeditor-tabs' ) 
=== 'remember-last' &&
-   $editor === 'wikitext'
-   )
-   )
-   ) {
-   $result['editsection']['query'] = [
-   'veaction' => 'editsource',
-   'vesection' => $section
-   ];
}
 
// Exit if we're using the single edit tab.
diff --git a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js 
b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
index 0aa340d..88b021d 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.init.js
@@ -1007,6 +1007,16 @@
mw.libs.ve.setEditorPreference( 'wikitext' );
}
 
+   // NWE
+   if ( init.isWikitextAvailable ) {
+   $( '.mw-editsection a, #ca-edit a' ).each( 
function () {
+   var uri = new mw.Uri( $( this ).attr( 
'href' ) );
+   delete uri.query.action;
+   uri.query.veaction = 'editsource';
+   $( this ).attr( 'href', uri.toString() 
);
+   } );
+   }
+
// Set up the tabs appropriately if the user has VE on
if ( init.isAvailable && userPrefPreferShow ) {
// … on two-edit-tab wikis, or single-edit-tab 
wikis, where the user wants both …

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

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

[MediaWiki-commits] [Gerrit] mediawiki...CentralNotice[wmf_deploy]: Handle banner loader errors on client

2016-11-07 Thread AndyRussG (Code Review)
AndyRussG has uploaded a new change for review.

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

Change subject: Handle banner loader errors on client
..

Handle banner loader errors on client

Bug: T149107
Change-Id: Iab80d0462becf1e7a7a2d9f2df662c7a68aed8bf
---
M resources/subscribing/ext.centralNotice.display.js
M resources/subscribing/ext.centralNotice.display.state.js
M special/SpecialBannerLoader.php
M tests/qunit/subscribing/ext.centralNotice.display.tests.js
4 files changed, 59 insertions(+), 11 deletions(-)


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

diff --git a/resources/subscribing/ext.centralNotice.display.js 
b/resources/subscribing/ext.centralNotice.display.js
index 5536e05..ba4777d 100644
--- a/resources/subscribing/ext.centralNotice.display.js
+++ b/resources/subscribing/ext.centralNotice.display.js
@@ -153,10 +153,14 @@
);
 
// The returned javascript will call 
mw.centralNotice.insertBanner()
+   // or mw.centralNotice.handleBannerLoaderError() (if an error 
was
+   // handled on the server).
$.ajax( {
url: url.toString(),
dataType: 'script',
cache: true
+   } ).fail( function ( jqXHR, status, error ) {
+   cn.handleBannerLoaderError( status + ': ' + error );
} );
}
 
@@ -309,6 +313,20 @@
}
 
/**
+* Stuff we have to do following the call to fetch a banner (successful
+* or not)
+*/
+   function processAfterBannerFetch() {
+
+   // If we're testing a banner, don't call 
Special:RecordImpression or
+   // run mixin hooks.
+   if ( !cn.internal.state.getData().testingBanner ) {
+   runPostBannerMixinHooks();
+   recordImpression();
+   }
+   }
+
+   /**
 * CentralNotice base public object, exposed as mw.centralNotice. Note:
 * other CN modules may add properties to this object, and we add some
 * dynamically. These additional properties are:
@@ -402,12 +420,7 @@
state.setBannerShown();
}
 
-   // If we're testing a banner, don't call 
Special:RecordImpression or
-   // run mixin hooks.
-   if ( !state.getData().testingBanner ) {
-   runPostBannerMixinHooks();
-   recordImpression();
-   }
+   processAfterBannerFetch();
},
 
/**
@@ -531,6 +544,16 @@
} );
},
 
+   /**
+* Handle a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   handleBannerLoaderError: function ( msg ) {
+   cn.internal.state.setBannerLoaderError( msg );
+   bannerLoadedDeferredObj.reject( 
cn.internal.state.getData() );
+   processAfterBannerFetch();
+   },
+
hideBannerWithCloseButton: function () {
// Hide the banner element
$( '#centralNotice' ).hide();
diff --git a/resources/subscribing/ext.centralNotice.display.state.js 
b/resources/subscribing/ext.centralNotice.display.state.js
index a2b11fb..2d18e1f 100644
--- a/resources/subscribing/ext.centralNotice.display.state.js
+++ b/resources/subscribing/ext.centralNotice.display.state.js
@@ -31,7 +31,8 @@
NO_BANNER_AVAILABLE: new Status( 'no_banner_available', 
3 ),
BANNER_CHOSEN: new Status( 'banner_chosen', 4 ),
BANNER_LOADED_BUT_HIDDEN: new Status( 
'banner_loaded_but_hidden', 5 ),
-   BANNER_SHOWN: new Status( 'banner_shown', 6 )
+   BANNER_SHOWN: new Status( 'banner_shown', 6 ),
+   BANNER_LOADER_ERROR: new Status( 'banner_loader_error', 
7 )
},
 
// Until T114078 is closed, we minify banner history logs. This 
lookup
@@ -363,6 +364,17 @@
},
 
/**
+* Set a banner loader error, with an optional message
+* @param {string} [msg]
+*/
+   setBannerLoaderError: function ( msg ) {
+   if ( msg ) {
+   state.data.errorMsg = msg;
+   }
+   setStatus( STATUSES.BANNER_LOADER_ERROR );
+   },
+
+   /**
 * Register that the current page view is included in a test.
 *
 * @param {string} 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [WIP] resourceloader: Remove unused getPosition() code

2016-11-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: [WIP] resourceloader: Remove unused getPosition() code
..

[WIP] resourceloader: Remove unused getPosition() code

Unused as of I6c21e3e4 (T109837).

Change-Id: I1d8f7109bbe49700f1824fdce0439e958e84f6fa
---
M includes/resourceloader/ResourceLoaderFileModule.php
M includes/resourceloader/ResourceLoaderImageModule.php
M includes/resourceloader/ResourceLoaderUserOptionsModule.php
M includes/resourceloader/ResourceLoaderUserTokensModule.php
M includes/resourceloader/ResourceLoaderWikiModule.php
5 files changed, 0 insertions(+), 51 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/16/320316/1

diff --git a/includes/resourceloader/ResourceLoaderFileModule.php 
b/includes/resourceloader/ResourceLoaderFileModule.php
index 07649e3..725bc6a 100644
--- a/includes/resourceloader/ResourceLoaderFileModule.php
+++ b/includes/resourceloader/ResourceLoaderFileModule.php
@@ -117,9 +117,6 @@
/** @var string Name of group to load this module in */
protected $group;
 
-   /** @var string Position on the page to load this module at */
-   protected $position = 'bottom';
-
/** @var bool Link to raw files in debug mode */
protected $debugRaw = true;
 
@@ -204,8 +201,6 @@
 * 'messages' => [array of message key strings],
 * // Group which this module should be loaded together with
 * 'group' => [group name string],
-* // Position on the page to load this module at
-* 'position' => ['bottom' (default) or 'top']
 * // Function that, if it returns true, makes the loader skip 
this module.
 * // The file must contain valid JavaScript for execution in a 
private function.
 * // The file must not contain the "function () {" and "}" 
wrapper though.
@@ -272,7 +267,6 @@
$this->{$member} = $option;
break;
// Single strings
-   case 'position':
case 'group':
case 'skipFunction':
$this->{$member} = (string)$option;
@@ -446,13 +440,6 @@
}
 
/**
-* @return string
-*/
-   public function getPosition() {
-   return $this->position;
-   }
-
-   /**
 * Gets list of names of modules this module depends on.
 * @param ResourceLoaderContext|null $context
 * @return array List of module names
@@ -573,7 +560,6 @@
// - dependencies (provided via startup module)
// - targets
// - group (provided via startup module)
-   // - position (only used by OutputPage)
'scripts',
'debugScripts',
'styles',
diff --git a/includes/resourceloader/ResourceLoaderImageModule.php 
b/includes/resourceloader/ResourceLoaderImageModule.php
index 6a8957e..ff1b7b1 100644
--- a/includes/resourceloader/ResourceLoaderImageModule.php
+++ b/includes/resourceloader/ResourceLoaderImageModule.php
@@ -45,9 +45,6 @@
protected $selectorWithVariant = '.{prefix}-{name}-{variant}';
protected $targets = [ 'desktop', 'mobile' ];
 
-   /** @var string Position on the page to load this module at */
-   protected $position = 'bottom';
-
/**
 * Constructs a new module from an options array.
 *
@@ -183,7 +180,6 @@
$this->{$member} = $option;
break;
 
-   case 'position':
case 'prefix':
case 'selectorWithoutVariant':
case 'selectorWithVariant':
@@ -446,14 +442,6 @@
}
 
return $localBasePath;
-   }
-
-   /**
-* @return string
-*/
-   public function getPosition() {
-   $this->loadFromDefinition();
-   return $this->position;
}
 
/**
diff --git a/includes/resourceloader/ResourceLoaderUserOptionsModule.php 
b/includes/resourceloader/ResourceLoaderUserOptionsModule.php
index c1b47bf..b3b3f16 100644
--- a/includes/resourceloader/ResourceLoaderUserOptionsModule.php
+++ b/includes/resourceloader/ResourceLoaderUserOptionsModule.php
@@ -67,13 +67,6 @@
/**
 * @return string
 */
-   public function getPosition() {
-   return 'top';
-   }
-
-   /**
-* @return string
-*/
public function getGroup() {
return 'private';
}
diff 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Remove top/bottom queue distinction

2016-11-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Remove top/bottom queue distinction
..

resourceloader: Remove top/bottom queue distinction

* The styles queue has always been top-only
  (except for a few months in 2015).
* The top queue loads asynchronous since mid-2015. (T107399)
  And LocalStorage eval, previously the last remaining non-async part
  of module loading, is also async as of October 2016. (T142129)

* This change merges the bottom 'mw.loader.load()' queue with the top queue.
  It also moves any other snippets potentially in the bottom queue still:
  - embed: I couldn't find any private modules with position=bottom
 (doesn't make sense due to their blocking nature). If any do exist,
 (third-party extensions?), they'll now be embedded in the .
  - scripts: Any legacy 'only=scripts' requests will now initiate
 from the .

Bug: T109837
Change-Id: I6c21e3e47c23df33a04c42ce94bd4c1964599c7f
---
M includes/resourceloader/ResourceLoaderClientHtml.php
M includes/resourceloader/ResourceLoaderModule.php
M tests/phpunit/includes/resourceloader/ResourceLoaderClientHtmlTest.php
3 files changed, 23 insertions(+), 69 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/15/320315/1

diff --git a/includes/resourceloader/ResourceLoaderClientHtml.php 
b/includes/resourceloader/ResourceLoaderClientHtml.php
index 5729218..91e0b02 100644
--- a/includes/resourceloader/ResourceLoaderClientHtml.php
+++ b/includes/resourceloader/ResourceLoaderClientHtml.php
@@ -130,26 +130,15 @@
'states' => [
// moduleName => state
],
-   'general' => [
-   // position => [ moduleName ]
-   'top' => [],
-   'bottom' => [],
-   ],
+   'general' => [],
'styles' => [
// moduleName
],
-   'scripts' => [
-   // position => [ moduleName ]
-   'top' => [],
-   'bottom' => [],
-   ],
+   'scripts' => [],
// Embedding for private modules
'embed' => [
'styles' => [],
-   'general' => [
-   'top' => [],
-   'bottom' => [],
-   ],
+   'general' => [],
],
 
];
@@ -161,16 +150,15 @@
}
 
$group = $module->getGroup();
-   $position = $module->getPosition();
 
if ( $group === 'private' ) {
// Embed via mw.loader.implement per T36907.
-   $data['embed']['general'][$position][] = $name;
+   $data['embed']['general'][] = $name;
// Avoid duplicate request from mw.loader
$data['states'][$name] = 'loading';
} else {
// Load via mw.loader.load()
-   $data['general'][$position][] = $name;
+   $data['general'][] = $name;
}
}
 
@@ -216,14 +204,13 @@
}
 
$group = $module->getGroup();
-   $position = $module->getPosition();
$context = $this->getContext( $group, 
ResourceLoaderModule::TYPE_SCRIPTS );
if ( $module->isKnownEmpty( $context ) ) {
// Avoid needless request for empty module
$data['states'][$name] = 'ready';
} else {
// Load from load.php?only=scripts via 
-   $data['scripts'][$position][] = $name;
+   $data['scripts'][] = $name;
 
// Avoid duplicate request from mw.loader
$data['states'][$name] = 'loading';
@@ -282,24 +269,24 @@
}
 
// Inline RLQ: Embedded modules
-   if ( $data['embed']['general']['top'] ) {
+   if ( $data['embed']['general'] ) {
$chunks[] = $this->getLoad(
-   $data['embed']['general']['top'],
+   $data['embed']['general'],

[MediaWiki-commits] [Gerrit] mediawiki...PageViewInfo[master]: Finish rename to PageViewInfo

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

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

Change subject: Finish rename to PageViewInfo
..

Finish rename to PageViewInfo

Change-Id: Iaf83d2fafd09c8ba4509649d51ca94f1003dd75d
---
M extension.json
M i18n/qqq.json
M includes/PageViewInfo.hooks.php
R resources/ext.pageviewinfo.js
4 files changed, 7 insertions(+), 7 deletions(-)


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

diff --git a/extension.json b/extension.json
index b84b862..11a3ac3 100644
--- a/extension.json
+++ b/extension.json
@@ -1,10 +1,10 @@
 {
-   "name": "WikimediaPageViewInfo",
+   "name": "PageViewInfo",
"license-name": "GPL-3.0+",
"author": [
"Kunal Mehta"
],
-   "url": "https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo;,
+   "url": "https://www.mediawiki.org/wiki/Extension:PageViewInfo;,
"descriptionmsg": "pvi-desc",
"Hooks": {
"InfoAction": [
@@ -22,7 +22,7 @@
"ResourceModules": {
"ext.wmpageviewinfo": {
"scripts": [
-   "ext.wmpageviewinfo.js"
+   "ext.pageviewinfo.js"
],
"messages": [
"pvi-close",
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 368d699..85b449e 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -5,7 +5,7 @@
"Liuxinyu970226"
]
},
-   "pvi-desc": 
"{{desc|name=WikimediaPageViewInfo|url=https://www.mediawiki.org/wiki/Extension:WikimediaPageViewInfo}};,
+   "pvi-desc": 
"{{desc|name=PageViewInfo|url=https://www.mediawiki.org/wiki/Extension:PageViewInfo}};,
"pvi-month-count": "Label for table cell containing page views in past 
30 days",
"pvi-close": "Text on button to close a dialog\n{{Identical|Close}}",
"pvi-range": "Title of dialog, which is the date range the graph is 
for. $1 is the starting date, $2 is the ending date."
diff --git a/includes/PageViewInfo.hooks.php b/includes/PageViewInfo.hooks.php
index 0f87f45..af4cdda 100644
--- a/includes/PageViewInfo.hooks.php
+++ b/includes/PageViewInfo.hooks.php
@@ -37,12 +37,12 @@
);
$info['data'][0]['values'] = $views['items'];
 
-   $ctx->getOutput()->addModules( 'ext.wmpageviewinfo' );
+   $ctx->getOutput()->addModules( 'ext.pageviewinfo' );
// Ymd -> YmdHis
$plus = '00';
$user = $ctx->getUser();
$ctx->getOutput()->addJsConfigVars( [
-   'wgWMPageViewInfo' => [
+   'wgPageViewInfo' => [
'graph' => $info,
'start' => $lang->userDate( $views['start'] . 
$plus, $user ),
'end' => $lang->userDate( $views['end'] . 
$plus, $user ),
diff --git a/resources/ext.wmpageviewinfo.js b/resources/ext.pageviewinfo.js
similarity index 96%
rename from resources/ext.wmpageviewinfo.js
rename to resources/ext.pageviewinfo.js
index 300522d..486d68c 100644
--- a/resources/ext.wmpageviewinfo.js
+++ b/resources/ext.pageviewinfo.js
@@ -2,7 +2,7 @@
$( function () {
var $count = $( '.mw-pvi-month' ),
count = $count.text(),
-   info = mw.config.get( 'wgWMPageViewInfo' );
+   info = mw.config.get( 'wgPageViewInfo' );
 
// Turn it into an  tag so it's obvious you can click on it
$count.html( mw.html.element( 'a', { href: '#' }, count ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaf83d2fafd09c8ba4509649d51ca94f1003dd75d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/PageViewInfo
Gerrit-Branch: master
Gerrit-Owner: Gergő Tisza 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: add layout prefixes to description IDs

2016-11-07 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Hygiene: add layout prefixes to description IDs
..

Hygiene: add layout prefixes to description IDs

Add view_ / fragment_ layout prefixes to description IDs and remove an
unnecessary View parent in DescriptionEditFragment

Bug: T148203
Change-Id: I54db1df44458ff3fa7716860a61d1ea1468f0ac0
---
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
M app/src/main/res/layout/fragment_description_edit.xml
M app/src/main/res/layout/view_description_edit.xml
4 files changed, 18 insertions(+), 24 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/13/320313/1

diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
index 81b3ac6..494f93d 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditFragment.java
@@ -25,7 +25,7 @@
 public class DescriptionEditFragment extends Fragment {
 private static final String ARG_TITLE = "title";
 
-@BindView(R.id.description_edit_view) DescriptionEditView editView;
+@BindView(R.id.fragment_description_edit_view) DescriptionEditView 
editView;
 private Unbinder unbinder;
 private PageTitle pageTitle;
 @Nullable private Call call;
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
index 0fcbbef..5fa6dee 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
@@ -28,11 +28,11 @@
 import butterknife.OnTextChanged;
 
 public class DescriptionEditView extends FrameLayout {
-@BindView(R.id.description_edit_page_title) TextView pageTitleText;
-@BindView(R.id.description_edit_save_button) FloatingActionButton 
saveButton;
-@BindView(R.id.description_edit_text) EditText pageDescriptionText;
-@BindView(R.id.description_edit_char_count) TextView charCountText;
-@BindView(R.id.description_edit_progress_bar) ProgressBar progressBar;
+@BindView(R.id.view_description_edit_page_title) TextView pageTitleText;
+@BindView(R.id.view_description_edit_save_button) FloatingActionButton 
saveButton;
+@BindView(R.id.view_description_edit_text) EditText pageDescriptionText;
+@BindView(R.id.view_description_edit_char_count) TextView charCountText;
+@BindView(R.id.view_description_edit_progress_bar) ProgressBar progressBar;
 
 @Nullable private PageTitle pageTitle;
 @Nullable private String originalDescription;
@@ -87,13 +87,13 @@
 return pageDescriptionText.getText().toString();
 }
 
-@OnClick(R.id.description_edit_save_button) void onSaveClick() {
+@OnClick(R.id.view_description_edit_save_button) void onSaveClick() {
 if (callback != null) {
 callback.onSaveClick();
 }
 }
 
-@OnTextChanged(value = R.id.description_edit_text,
+@OnTextChanged(value = R.id.view_description_edit_text,
 callback = OnTextChanged.Callback.AFTER_TEXT_CHANGED)
 void pageDescriptionTextChanged() {
 updateSaveButtonVisible();
diff --git a/app/src/main/res/layout/fragment_description_edit.xml 
b/app/src/main/res/layout/fragment_description_edit.xml
index fc1c5ee..68022ce 100644
--- a/app/src/main/res/layout/fragment_description_edit.xml
+++ b/app/src/main/res/layout/fragment_description_edit.xml
@@ -1,13 +1,7 @@
 
-http://schemas.android.com/apk/res/android;
+android:id="@+id/fragment_description_edit_view"
 android:layout_width="match_parent"
 android:layout_height="match_parent"
-android:paddingTop="?attr/actionBarSize">
-
-
-
-
\ No newline at end of file
+android:layout_marginTop="?attr/actionBarSize" />
\ No newline at end of file
diff --git a/app/src/main/res/layout/view_description_edit.xml 
b/app/src/main/res/layout/view_description_edit.xml
index 4e1615e..4662f97 100644
--- a/app/src/main/res/layout/view_description_edit.xml
+++ b/app/src/main/res/layout/view_description_edit.xml
@@ -19,7 +19,7 @@
 android:elevation="6dp">
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I54db1df44458ff3fa7716860a61d1ea1468f0ac0
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

___
MediaWiki-commits mailing 

[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Hygiene: remove verbose ArticleHeaderView methods

2016-11-07 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Hygiene: remove verbose ArticleHeaderView methods
..

Hygiene: remove verbose ArticleHeaderView methods

Remove a couple methods that explicate ordinary operations and aren't
worthwhile

Change-Id: I1f0e722bcedfa1e13a5e952524693585ec284459
---
M app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java
1 file changed, 1 insertion(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/12/320312/1

diff --git 
a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java 
b/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java
index 79893b5..8817846 100644
--- a/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java
+++ b/app/src/main/java/org/wikipedia/page/leadimages/ArticleHeaderView.java
@@ -302,17 +302,9 @@
 }
 
 private void init() {
-inflate();
-bind();
-hide();
-}
-
-private void inflate() {
 inflate(getContext(), R.layout.view_article_header, this);
-}
-
-private void bind() {
 ButterKnife.bind(this);
+hide();
 }
 
 @ColorInt

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1f0e722bcedfa1e13a5e952524693585ec284459
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Niedzielski 

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Fix potential NPE & hygiene in DescriptionEditView

2016-11-07 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Fix potential NPE & hygiene in DescriptionEditView
..

Fix potential NPE & hygiene in DescriptionEditView

• Allow for an original null description and add an @Nullable annotation

• Update test save button logic and refactor lightly

• Rename editText to pageDescriptionText

Bug: T148203
Change-Id: I73f6bc98f8b6bf3a1b82d16ea55ce7ac8583ca0e
---
M 
app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditViewTest.java
M app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
M app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
3 files changed, 35 insertions(+), 29 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/11/320311/1

diff --git 
a/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditViewTest.java
 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditViewTest.java
index 54e1630..7cce7bc 100644
--- 
a/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditViewTest.java
+++ 
b/app/src/androidTest/java/org/wikipedia/descriptions/DescriptionEditViewTest.java
@@ -75,7 +75,7 @@
 assertThat(subject.getDescription(), is(expected.getDescription()));
 }
 
-// todo: resolve why the button doesn't show up yet here or in the actual 
screenshots above
+// todo: resolve why the button doesn't show
 // @Theory public void testSetSaveState(@TestedOnBool final boolean 
saving) {
 // defaultSetUp();
 // subject.setSaveState(saving);
@@ -100,7 +100,7 @@
 defaultSetUp();
 String expected = nul ? null : "text";
 subject.setDescription(expected);
-assertThat(subject.editText.getText().toString(), 
is(emptyIfNull(expected)));
+assertThat(subject.pageDescriptionText.getText().toString(), 
is(emptyIfNull(expected)));
 }
 
 private void defaultSetUp() {
@@ -117,5 +117,9 @@
 subject.setTitle(str(title));
 subject.setDescription(str(description));
 subject.setSaveState(saving);
+
+// todo: resolve why the button doesn't show deterministically. the 
button appears either
+//   correctly or in the upper left
+subject.saveButton.hide();
 }
-}
\ No newline at end of file
+}
diff --git a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java 
b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
index 43f3910..5681fbd 100644
--- a/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
+++ b/app/src/androidTest/java/org/wikipedia/test/view/ViewTest.java
@@ -124,11 +124,11 @@
 .build();
 }
 
-protected String str(@NonNull TestStr str, Object... formatArgs) {
+protected String str(@NonNull TestStr str, @Nullable Object... formatArgs) 
{
 return str(str.id(), formatArgs);
 }
 
-protected String str(@StringRes int id, Object... formatArgs) {
+protected String str(@StringRes int id, @Nullable Object... formatArgs) {
 return id == 0 ? null : ctx().getString(id, formatArgs);
 }
 
@@ -140,18 +140,21 @@
 Configuration cfg = new 
Configuration(ctx.getResources().getConfiguration());
 cfg.screenWidthDp = widthDp;
 cfg.fontScale = fontScale.multiplier();
-
-if (android.os.Build.VERSION.SDK_INT >= 
android.os.Build.VERSION_CODES.N) {
-cfg.setLocales(new LocaleList(locale));
-} else if (Build.VERSION.SDK_INT >= 
Build.VERSION_CODES.JELLY_BEAN_MR1) {
-cfg.setLocale(locale);
-cfg.setLayoutDirection(locale);
-} else {
-//noinspection deprecation
-cfg.locale = locale;
-}
+setConfigLocale(cfg, locale);
 
 ctx.getResources().updateConfiguration(cfg, null);
+}
+
+private void setConfigLocale(@NonNull Configuration config, @NonNull 
Locale locale) {
+if (android.os.Build.VERSION.SDK_INT >= 
android.os.Build.VERSION_CODES.N) {
+config.setLocales(new LocaleList(locale));
+} else if (Build.VERSION.SDK_INT >= 
Build.VERSION_CODES.JELLY_BEAN_MR1) {
+config.setLocale(locale);
+config.setLayoutDirection(locale);
+} else {
+//noinspection deprecation
+config.locale = locale;
+}
 }
 
 // todo: identify method name by @Theory / @Test annotation instead of 
depth and remove repeated
@@ -167,4 +170,4 @@
 
 return name;
 }
-}
\ No newline at end of file
+}
diff --git 
a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java 
b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
index 3e36696..0fcbbef 100644
--- a/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
+++ b/app/src/main/java/org/wikipedia/descriptions/DescriptionEditView.java
@@ -10,7 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: VCL: retry explicit 503 once as well

2016-11-07 Thread BBlack (Code Review)
BBlack has submitted this change and it was merged.

Change subject: VCL: retry explicit 503 once as well
..


VCL: retry explicit 503 once as well

In Varnish 3 these cases were blended together, but in Varnish 4
they're distinct: you can only catch->retry explicit 503s in
vcl_backend_response, and you can only catch->retry implicit 503s
in vcl_backend_error.  Since both are protected with
bereq.retries==0, they can't both be applied to the same backend
fetch attempt.

Change-Id: Ib91a48f13c49ea4322a86e844e1640c3d6f22422
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 7d607f9..969505b 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -342,6 +342,11 @@
 
 <% if @varnish_version4 -%>
 sub vcl_backend_response {
+   // retry 503 once in frontend instances, to paper over transient issues
+   // This catches the backending handing us an explicit 503
+   if (beresp.status == 503 && bereq.retries == 0) {
+   return(retry);
+   }
 <% else -%>
 sub vcl_fetch {
 <% end -%>
@@ -435,6 +440,7 @@
 
 sub vcl_backend_error {
// retry 503 once in frontend instances, to paper over transient issues
+   // This catches an implicit 503 (e.g. connectfail, timeout, etc)
if (beresp.status == 503 && bereq.retries == 0) {
return(retry);
}

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: VCL: retry explicit 503 once as well

2016-11-07 Thread BBlack (Code Review)
BBlack has uploaded a new change for review.

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

Change subject: VCL: retry explicit 503 once as well
..

VCL: retry explicit 503 once as well

In Varnish 3 these cases were blended together, but in Varnish 4
they're distinct: you can only catch->retry explicit 503s in
vcl_backend_response, and you can only catch->retry implicit 503s
in vcl_backend_error.  Since both are protected with
bereq.retries==0, they can't both be applied to the same backend
fetch attempt.

Change-Id: Ib91a48f13c49ea4322a86e844e1640c3d6f22422
---
M modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
1 file changed, 6 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/10/320310/1

diff --git a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb 
b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
index 7d607f9..969505b 100644
--- a/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
+++ b/modules/varnish/templates/vcl/wikimedia-frontend.vcl.erb
@@ -342,6 +342,11 @@
 
 <% if @varnish_version4 -%>
 sub vcl_backend_response {
+   // retry 503 once in frontend instances, to paper over transient issues
+   // This catches the backending handing us an explicit 503
+   if (beresp.status == 503 && bereq.retries == 0) {
+   return(retry);
+   }
 <% else -%>
 sub vcl_fetch {
 <% end -%>
@@ -435,6 +440,7 @@
 
 sub vcl_backend_error {
// retry 503 once in frontend instances, to paper over transient issues
+   // This catches an implicit 503 (e.g. connectfail, timeout, etc)
if (beresp.status == 503 && bereq.retries == 0) {
return(retry);
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib91a48f13c49ea4322a86e844e1640c3d6f22422
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] operations/mediawiki-config[master]: Initial configuration for projectcom.wikimedia.org

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

Change subject: Initial configuration for projectcom.wikimedia.org
..


Initial configuration for projectcom.wikimedia.org

This is a private wiki for the Project Grants Committee members,
and some WMF staff.

This configuration is mostly based on be.wikimedia.

Lang code  en
Shard  s3
Site name  Project Grants Committee
Import sources ... meta, en.
Features . Visual Editor, private wiki

Bug: T143138
Change-Id: Ia87fbe9ce466d9565256fba1c45338f340bd5c9c
---
M dblists/all.dblist
M dblists/private.dblist
M dblists/s3.dblist
M dblists/securepollglobal.dblist
M dblists/small.dblist
M dblists/special.dblist
M wikiversions.json
M wmf-config/InitialiseSettings.php
8 files changed, 14 insertions(+), 0 deletions(-)

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



diff --git a/dblists/all.dblist b/dblists/all.dblist
index 3bdafd4..4d930fa 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -609,6 +609,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/private.dblist b/dblists/private.dblist
index 509aeae..c755c90 100644
--- a/dblists/private.dblist
+++ b/dblists/private.dblist
@@ -22,6 +22,7 @@
 officewiki
 ombudsmenwiki
 otrs_wikiwiki
+projectcomwiki
 searchcomwiki
 spcomwiki
 stewardwiki
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index d4fa348..4dd258d 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -581,6 +581,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/securepollglobal.dblist b/dblists/securepollglobal.dblist
index c825c5b..9058b0f 100644
--- a/dblists/securepollglobal.dblist
+++ b/dblists/securepollglobal.dblist
@@ -605,6 +605,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 607fac1..9833cd9 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -341,6 +341,7 @@
 plwikivoyage
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswikibooks
 ptwikivoyage
 qualitywiki
diff --git a/dblists/special.dblist b/dblists/special.dblist
index 8fd34fb..c0a6ed1 100644
--- a/dblists/special.dblist
+++ b/dblists/special.dblist
@@ -31,6 +31,7 @@
 ombudsmenwiki
 otrs_wikiwiki
 outreachwiki
+projectcomwiki
 qualitywiki
 searchcomwiki
 sourceswiki
diff --git a/wikiversions.json b/wikiversions.json
index f320867..ea2f603 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -610,6 +610,7 @@
 "pnbwiki": "php-1.29.0-wmf.1",
 "pnbwiktionary": "php-1.29.0-wmf.1",
 "pntwiki": "php-1.29.0-wmf.1",
+"projectcomwiki": "php-1.29.0-wmf.1",
 "pswiki": "php-1.29.0-wmf.1",
 "pswikibooks": "php-1.29.0-wmf.1",
 "pswiktionary": "php-1.29.0-wmf.1",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index a3eac9f..8350e3e 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -165,6 +165,7 @@
'officewiki' => 'en',
'ombudsmenwiki' => 'en',
'otrs_wikiwiki' => 'en',
+   'projectcomwiki' => 'en',
'qualitywiki' => 'en',
'searchcomwiki' => 'en',
'stewardwiki' => 'en',
@@ -1425,6 +1426,7 @@
'otrs_wikiwiki' => '//otrs-wiki.wikimedia.org',
'outreachwiki' => '//outreach.wikimedia.org',
'pa_uswikimedia' => '//pa-us.wikimedia.org',
+   'projectcomwiki' => '//projectcom.wikimedia.org', // T143138
'qualitywiki' => '//quality.wikimedia.org',
'searchcomwiki' => '//searchcom.wikimedia.org',
'sourceswiki' => '//wikisource.org',
@@ -1871,6 +1873,7 @@
'pnbwiki' => 'وکیپیڈیا',
'pnbwiktionary' => 'وکشنری',
'pntwiki' => 'Βικιπαίδεια',
+   'projectcomwiki' => 'Project Grants Committee',
'pswiki' => 'ويکيپېډيا' ,
'pswikibooks' => 'ويکيتابونه' ,
'pswiktionary' => 'ويکيسيند' ,
@@ -10856,6 +10859,9 @@
'zhwikibooks' => [ 'w', 'wikt', 'q', 's', 'meta', 'commons' ],
'zhwikisource' => [ 'w', 'b', 'q', 'wikt', 'meta', 'commons' ],
'zuwiki' => [ 'en' ], // T53327
+
+   // Special wikis
+   'projectcomwiki' => [ 'wikipedia:en', 'meta' ], // T143138
 ],
 # @} end of wgImportSources
 
@@ -11642,6 +11648,7 @@
'ombudsmenwiki' => '/static/favicon/wmf.ico', // T50404
'otrs_wikiwiki' => '/static/favicon/wmf.ico',
'outreachwiki' => '/static/favicon/community.ico',
+   'projectcomwiki' => '/static/favicon/wmf.ico',
'searchcomwiki' => '/static/favicon/wmf.ico',
'sourceswiki' => '/static/favicon/wikisource.ico',
'spcomwiki' => '/static/favicon/spcom.ico',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Rebuilt PHPVersionCheck to be an own class

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

Change subject: Rebuilt PHPVersionCheck to be an own class
..


Rebuilt PHPVersionCheck to be an own class

The class keyword should work in all reasonable working php installations,
as far as I know. In this way, the php version check does not rely on a
set of global functions. It also should make maintaining the different
checks a bit easier.

Change-Id: I73ee098a8cf931ca4df6263c6e0a3e21b612
---
M autoload.php
M includes/PHPVersionCheck.php
2 files changed, 214 insertions(+), 172 deletions(-)

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



diff --git a/autoload.php b/autoload.php
index 17e5df6..e4f39d4 100644
--- a/autoload.php
+++ b/autoload.php
@@ -1009,6 +1009,7 @@
'OrphanStats' => __DIR__ . '/maintenance/storage/orphanStats.php',
'Orphans' => __DIR__ . '/maintenance/orphans.php',
'OutputPage' => __DIR__ . '/includes/OutputPage.php',
+   'PHPVersionCheck' => __DIR__ . '/includes/PHPVersionCheck.php',
'PNGHandler' => __DIR__ . '/includes/media/PNG.php',
'PNGMetadataExtractor' => __DIR__ . 
'/includes/media/PNGMetadataExtractor.php',
'PPCustomFrame_DOM' => __DIR__ . 
'/includes/parser/Preprocessor_DOM.php',
diff --git a/includes/PHPVersionCheck.php b/includes/PHPVersionCheck.php
index 656ba43..e6e96c7 100644
--- a/includes/PHPVersionCheck.php
+++ b/includes/PHPVersionCheck.php
@@ -1,4 +1,7 @@
  'mbstring',
'utf8_encode' => 'xml',
'ctype_digit' => 'ctype',
'json_decode' => 'json',
'iconv'   => 'iconv',
);
-   // List of extensions we're missing
-   $missingExtensions = array();
-   // @codingStandardsIgnoreEnd
 
-   foreach ( $extensions as $function => $extension ) {
-   if ( !function_exists( $function ) ) {
-   $missingExtensions[] = $extension;
+   /**
+* @var string Which entry point we are protecting. One of:
+*   - index.php
+*   - load.php
+*   - api.php
+*   - mw-config/index.php
+*   - cli
+*/
+   var $entryPoint = null;
+
+   /**
+* @param string $entryPoint Which entry point we are protecting. One 
of:
+*   - index.php
+*   - load.php
+*   - api.php
+*   - mw-config/index.php
+*   - cli
+* @return $this
+*/
+   function setEntryPoint( $entryPoint ) {
+   $this->entryPoint = $entryPoint;
+   }
+
+   /**
+* Returns the version of the installed php implementation.
+*
+* @return string
+*/
+   function getPHPImplVersion() {
+   return PHP_VERSION;
+   }
+
+   /**
+* Displays an error, if the installed php version does not meet the 
minimum requirement.
+*
+* @return $this
+*/
+   function checkRequiredPHPVersion() {
+   if ( !function_exists( 'version_compare' )
+|| version_compare( $this->getPHPImplVersion(), 
$this->minimumVersionPHP ) < 0
+   ) {
+   $shortText = "MediaWiki $this->mwVersion requires at 
least PHP version"
+. " $this->minimumVersionPHP, you are 
using PHP {$this->getPHPImplVersion()}.";
+
+   $longText = "Error: You might be using on older PHP 
version. \n"
+   . "MediaWiki $this->mwVersion needs PHP 
$this->minimumVersionPHP or higher.\n\n"
+   . "Check if you have a newer php executable 
with a different name, "
+   . "such as php5.\n\n";
+
+   $longHtml = <upgrading your copy of PHP.
+   PHP versions less than 5.5.0 are no longer supported by 
the PHP Group and will not receive
+   security or bugfix updates.
+   
+   
+   If for some reason you are unable to upgrade your PHP 
version, you will need to
+   https://www.mediawiki.org/wiki/Download;>download an older version
+   of MediaWiki from our website.  See our
+   https://www.mediawiki.org/wiki/Compatibility#PHP;>compatibility page
+   for details of which versions are compatible with prior 
versions of PHP.
+HTML;
+   $this->triggerError( 'Supported PHP versions', 
$shortText, $longText, $longHtml );
}
}
 
-   if ( $missingExtensions ) {
-   wfMissingExtensions( $entryPoint, $mwVersion, 
$missingExtensions );
+   /**
+* Displays an error, if the vendor/autoload.php file could not be 
found.
+   

[MediaWiki-commits] [Gerrit] mediawiki...CirrusSearch[master]: Don't allow creating metastore from saneitizeJobs.php

2016-11-07 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: Don't allow creating metastore from saneitizeJobs.php
..

Don't allow creating metastore from saneitizeJobs.php

It seems it's possible for the cluster to be in an odd state, where one
node has become partitioned off from the rest of the cluster, and that
node will tell our code that the index doesn't exist even when it does.
This code creates the index, and then the node has trouble re-joining
the cluster.

To be frank, this doesn't seem like a CirrusSearch problem and instead
is some sort of problem with elasticsearch itself. There should only be
one master, and creating an index should require an 'OK' from the
master. We've seen it happen though, so work around the issue by bailing
if the index doesn't exist, expecting it to always be created explicitly
by an admin via metastore.php maintenance script.

Bug: T148821
Change-Id: I6c102677ae91715d277e8469597c4f4990b6c928
---
M maintenance/saneitizeJobs.php
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CirrusSearch 
refs/changes/09/320309/1

diff --git a/maintenance/saneitizeJobs.php b/maintenance/saneitizeJobs.php
index 7f215c4..32d1653 100644
--- a/maintenance/saneitizeJobs.php
+++ b/maintenance/saneitizeJobs.php
@@ -359,6 +359,11 @@
$this->metaStores = [];
foreach ( $connections as $cluster => $connection ) {
$store = new MetaStoreIndex( $connection, $this );
+   if ( !$store->exists() ) {
+   $this->error( "No metastore found in cluster 
$cluster", 1 );
+   }
+   // This won't create, since we already checked. Should 
it be allowed
+   // to do a major upgrade though, or limited to minor 
upgrades?
$store->createOrUpgradeIfNecessary();
$this->metaStores[$cluster] = $store;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c102677ae91715d277e8469597c4f4990b6c928
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CirrusSearch
Gerrit-Branch: master
Gerrit-Owner: EBernhardson 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update interwiki map for vote. and ec.wikimedia

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

Change subject: Update interwiki map for vote. and ec.wikimedia
..


Update interwiki map for vote. and ec.wikimedia

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

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



diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 97b4aa2..c8d0672 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -314,6 +314,7 @@
'__global:vlos' => '0 http://www.thuvienkhoahoc.com/tusach/$1',
'__global:vkol' => '0 http://kol.coldfront.net/thekolwiki/index.php/$1',
'__global:voipinfo' => '0 http://www.voip-info.org/wiki/view/$1',
+   '__global:votewiki' => '1 //vote.wikimedia.org/wiki/$1',
'__global:werelate' => '0 http://www.werelate.org/wiki/$1',
'__global:wg' => '1 https://wg-en.wikipedia.org/wiki/$1',
'__global:wikia' => '0 http://www.wikia.com/wiki/c:$1',
@@ -374,6 +375,7 @@
'__global:wmde' => '0 //wikimedia.de/wiki/$1',
'__global:wmdk' => '1 https://dk.wikimedia.org/wiki/$1',
'__global:wmee' => '1 //ee.wikimedia.org/wiki/$1',
+   '__global:wmec' => '1 https://ec.wikimedia.org/wiki/$1',
'__global:wmes' => '0 https://www.wikimedia.es/wiki/$1',
'__global:wmet' => '1 https://ee.wikimedia.org/wiki/$1',
'__global:wmfi' => '1 https://fi.wikimedia.org/wiki/$1',
@@ -4973,6 +4975,15 @@
'dzwiktionary:chapter' => '1 https://dz.wikimedia.org/wiki/$1',
'dzwiktionary:v' => '1 https://dz.wikiversity.org/wiki/$1',
'dzwiktionary:voy' => '1 https://dz.wikivoyage.org/wiki/$1',
+   '__sites:ecwikimedia' => 'wikimedia',
+   'ecwikimedia:w' => '1 https://ec.wikipedia.org/wiki/$1',
+   'ecwikimedia:wikt' => '1 https://ec.wiktionary.org/wiki/$1',
+   'ecwikimedia:q' => '1 https://ec.wikiquote.org/wiki/$1',
+   'ecwikimedia:b' => '1 https://ec.wikibooks.org/wiki/$1',
+   'ecwikimedia:n' => '1 https://ec.wikinews.org/wiki/$1',
+   'ecwikimedia:s' => '1 https://ec.wikisource.org/wiki/$1',
+   'ecwikimedia:v' => '1 https://ec.wikiversity.org/wiki/$1',
+   'ecwikimedia:voy' => '1 https://ec.wikivoyage.org/wiki/$1',
'__sites:eewiki' => 'wiki',
'eewiki:wikt' => '1 https://ee.wiktionary.org/wiki/$1',
'eewiki:q' => '1 https://ee.wikiquote.org/wiki/$1',
@@ -11416,7 +11427,7 @@
'__global:meta' => '1 https://meta.wikimedia.org/wiki/$1',
'__global:sep11' => '1 https://sep11.wikipedia.org/wiki/$1',
'__global:d' => '1 https://www.wikidata.org/wiki/$1',
-   '__list:__global' => 'acronym advisory advogato aew appropedia 
aquariumwiki arborwiki arxiv atmwiki baden battlestarwiki bcnbio beacha 
betawiki betawikiversity bibcode bluwiki blw botwiki boxrec brickwiki bugzilla 
bulba c c2 c2find cache cellwiki centralwikia chej choralwiki citizendium 
ckwiss comixpedia commons communityscheme communitywiki comune crazyhacks 
creativecommons creativecommonswiki creatureswiki cxej d dbdump dcc dcdatabase 
dcma delicious devmo dict dictionary disinfopedia distributedproofreaders 
distributedproofreadersca dmoz dmozs doi donate doom_wiki download dpd drae 
dreamhost drumcorpswiki dwjwiki ecoreality ecxei elibre emacswiki encyc 
energiewiki englyphwiki enkol eokulturcentro esolang etherpad ethnologue 
ethnologuefamily evowiki exotica eĉei fanimutationwiki fedora finalfantasy 
finnix flickrphoto flickruser floralwiki foldoc forthfreak foundation foxwiki 
freebio freebsdman freeculturewiki freedomdefined freefeel freekiwiki freenode 
freesoft ganfyd gardenology gausswiki gentoo genwiki gerrit git globalvoices 
glossarwiki glossarywiki google googledefine googlegroups greatlakeswiki 
guildwarswiki guildwiki gutenberg gutenbergwiki h2wiki hackerspaces hammondwiki 
hdl heroeswiki horizon hrfwiki hrwiki hupwiki iarchive imdbcharacter 
imdbcompany imdbname imdbtitle incubator infosecpedia infosphere irc ircrc 
iso639-3 issn iuridictum jaglyphwiki javanet javapedia jefo jerseydatabase jira 
jspwiki jstor kamelo karlsruhe kinowiki kmwiki komicawiki kontuwiki koslarwiki 
kpopwiki labsconsole libreplanet linguistlist linuxwiki linuxwikide liswiki 
literateprograms livepedia localwiki lojban lostpedia lqwiki luxo m mail 
mailarchive mariowiki marveldatabase meatball mediawikiwiki mediazilla 
memoryalpha meta metawiki metawikimedia metawikipedia metawikisearch 
mineralienatlas moinmoin monstropedia mosapedia mozcom mozillawiki 
mozillazinekb musicbrainz mw mwod mwot nara nkcells nosmoke nost nostalgia oeis 
oldwikisource olpc onelook openfacts openlibrary openstreetmap openwetware 
openwiki opera7wiki 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Update interwiki map for vote. and ec.wikimedia

2016-11-07 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Update interwiki map for vote. and ec.wikimedia
..

Update interwiki map for vote. and ec.wikimedia

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


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

diff --git a/wmf-config/interwiki.php b/wmf-config/interwiki.php
index 97b4aa2..c8d0672 100644
--- a/wmf-config/interwiki.php
+++ b/wmf-config/interwiki.php
@@ -1,5 +1,5 @@
  '0 
http://www.acronymfinder.com/af-query.asp?String=exact=$1',
'__global:advisory' => '1 https://advisory.wikimedia.org/wiki/$1',
@@ -314,6 +314,7 @@
'__global:vlos' => '0 http://www.thuvienkhoahoc.com/tusach/$1',
'__global:vkol' => '0 http://kol.coldfront.net/thekolwiki/index.php/$1',
'__global:voipinfo' => '0 http://www.voip-info.org/wiki/view/$1',
+   '__global:votewiki' => '1 //vote.wikimedia.org/wiki/$1',
'__global:werelate' => '0 http://www.werelate.org/wiki/$1',
'__global:wg' => '1 https://wg-en.wikipedia.org/wiki/$1',
'__global:wikia' => '0 http://www.wikia.com/wiki/c:$1',
@@ -374,6 +375,7 @@
'__global:wmde' => '0 //wikimedia.de/wiki/$1',
'__global:wmdk' => '1 https://dk.wikimedia.org/wiki/$1',
'__global:wmee' => '1 //ee.wikimedia.org/wiki/$1',
+   '__global:wmec' => '1 https://ec.wikimedia.org/wiki/$1',
'__global:wmes' => '0 https://www.wikimedia.es/wiki/$1',
'__global:wmet' => '1 https://ee.wikimedia.org/wiki/$1',
'__global:wmfi' => '1 https://fi.wikimedia.org/wiki/$1',
@@ -4973,6 +4975,15 @@
'dzwiktionary:chapter' => '1 https://dz.wikimedia.org/wiki/$1',
'dzwiktionary:v' => '1 https://dz.wikiversity.org/wiki/$1',
'dzwiktionary:voy' => '1 https://dz.wikivoyage.org/wiki/$1',
+   '__sites:ecwikimedia' => 'wikimedia',
+   'ecwikimedia:w' => '1 https://ec.wikipedia.org/wiki/$1',
+   'ecwikimedia:wikt' => '1 https://ec.wiktionary.org/wiki/$1',
+   'ecwikimedia:q' => '1 https://ec.wikiquote.org/wiki/$1',
+   'ecwikimedia:b' => '1 https://ec.wikibooks.org/wiki/$1',
+   'ecwikimedia:n' => '1 https://ec.wikinews.org/wiki/$1',
+   'ecwikimedia:s' => '1 https://ec.wikisource.org/wiki/$1',
+   'ecwikimedia:v' => '1 https://ec.wikiversity.org/wiki/$1',
+   'ecwikimedia:voy' => '1 https://ec.wikivoyage.org/wiki/$1',
'__sites:eewiki' => 'wiki',
'eewiki:wikt' => '1 https://ee.wiktionary.org/wiki/$1',
'eewiki:q' => '1 https://ee.wikiquote.org/wiki/$1',
@@ -11416,7 +11427,7 @@
'__global:meta' => '1 https://meta.wikimedia.org/wiki/$1',
'__global:sep11' => '1 https://sep11.wikipedia.org/wiki/$1',
'__global:d' => '1 https://www.wikidata.org/wiki/$1',
-   '__list:__global' => 'acronym advisory advogato aew appropedia 
aquariumwiki arborwiki arxiv atmwiki baden battlestarwiki bcnbio beacha 
betawiki betawikiversity bibcode bluwiki blw botwiki boxrec brickwiki bugzilla 
bulba c c2 c2find cache cellwiki centralwikia chej choralwiki citizendium 
ckwiss comixpedia commons communityscheme communitywiki comune crazyhacks 
creativecommons creativecommonswiki creatureswiki cxej d dbdump dcc dcdatabase 
dcma delicious devmo dict dictionary disinfopedia distributedproofreaders 
distributedproofreadersca dmoz dmozs doi donate doom_wiki download dpd drae 
dreamhost drumcorpswiki dwjwiki ecoreality ecxei elibre emacswiki encyc 
energiewiki englyphwiki enkol eokulturcentro esolang etherpad ethnologue 
ethnologuefamily evowiki exotica eĉei fanimutationwiki fedora finalfantasy 
finnix flickrphoto flickruser floralwiki foldoc forthfreak foundation foxwiki 
freebio freebsdman freeculturewiki freedomdefined freefeel freekiwiki freenode 
freesoft ganfyd gardenology gausswiki gentoo genwiki gerrit git globalvoices 
glossarwiki glossarywiki google googledefine googlegroups greatlakeswiki 
guildwarswiki guildwiki gutenberg gutenbergwiki h2wiki hackerspaces hammondwiki 
hdl heroeswiki horizon hrfwiki hrwiki hupwiki iarchive imdbcharacter 
imdbcompany imdbname imdbtitle incubator infosecpedia infosphere irc ircrc 
iso639-3 issn iuridictum jaglyphwiki javanet javapedia jefo jerseydatabase jira 
jspwiki jstor kamelo karlsruhe kinowiki kmwiki komicawiki kontuwiki koslarwiki 
kpopwiki labsconsole libreplanet linguistlist linuxwiki linuxwikide liswiki 
literateprograms livepedia localwiki lojban lostpedia lqwiki luxo m mail 
mailarchive mariowiki marveldatabase meatball mediawikiwiki mediazilla 
memoryalpha meta metawiki metawikimedia metawikipedia metawikisearch 
mineralienatlas moinmoin monstropedia mosapedia mozcom mozillawiki 
mozillazinekb musicbrainz mw mwod mwot nara nkcells nosmoke nost nostalgia oeis 
oldwikisource olpc onelook openfacts 

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: resourceloader: Use cached Revision::newKnownCurrent for Wik...

2016-11-07 Thread Krinkle (Code Review)
Krinkle has uploaded a new change for review.

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

Change subject: resourceloader: Use cached Revision::newKnownCurrent for 
WikiModule
..

resourceloader: Use cached Revision::newKnownCurrent for WikiModule

Change-Id: I0c68c649783042a959dc20d9675daae790d82cb1
---
M includes/resourceloader/ResourceLoaderWikiModule.php
1 file changed, 3 insertions(+), 2 deletions(-)


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

diff --git a/includes/resourceloader/ResourceLoaderWikiModule.php 
b/includes/resourceloader/ResourceLoaderWikiModule.php
index 3deeb84..ccb336f 100644
--- a/includes/resourceloader/ResourceLoaderWikiModule.php
+++ b/includes/resourceloader/ResourceLoaderWikiModule.php
@@ -162,11 +162,12 @@
return null;
}
 
-   $revision = Revision::newFromTitle( $title, false, 
Revision::READ_NORMAL );
+   $revision = Revision::newKnownCurrent( wfGetDB( DB_REPLICA ), 
$title->getArticleID(),
+   $title->getLatestRevID() );
if ( !$revision ) {
return null;
}
-
+   $revision->setTitle( $title );
$content = $revision->getContent( Revision::RAW );
 
if ( !$content ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0c68c649783042a959dc20d9675daae790d82cb1
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] mediawiki...mobileapps[master]: Use $merge to specify content for hydration in RESTBase

2016-11-07 Thread Mholloway (Code Review)
Mholloway has uploaded a new change for review.

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

Change subject: Use $merge to specify content for hydration in RESTBase
..

Use $merge to specify content for hydration in RESTBase

Replaces sending of titles with $merge properties containing the public
RESTBase summary URL as the value.

Updates tests accordingly.

Change-Id: Ia42aeb9c95c64f246aea85b05435103a728da19d
---
M lib/feed/featured.js
M lib/feed/most-read.js
M lib/feed/news.js
M lib/mobile-util.js
M spec.yaml
M test/features/app/spec.js
M test/features/featured/pagecontent.js
M test/features/news/news.js
8 files changed, 47 insertions(+), 30 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps 
refs/changes/06/320306/1

diff --git a/lib/feed/featured.js b/lib/feed/featured.js
index 5a366c7..a51e95f 100644
--- a/lib/feed/featured.js
+++ b/lib/feed/featured.js
@@ -5,6 +5,7 @@
 'use strict';
 
 var preq = require('preq');
+var mUtil = require('../mobile-util');
 var api = require('../api-util');
 var mwapi = require('../mwapi');
 var dateUtil = require('../dateUtil');
@@ -72,6 +73,9 @@
 }
 
 function promise(app, req) {
+var tfaPageObj;
+var pageTitle;
+var domain = req.params.domain;
 var aggregated = !!req.query.aggregated;
 
 if (!dateUtil.validate(dateUtil.hyphenDelimitedDateString(req))) {
@@ -81,7 +85,7 @@
 dateUtil.throwDateError();
 }
 
-if (req.params.domain.indexOf('en') !== 0 || 
req.params.domain.indexOf('beta.wmflabs.org') > 0) {
+if (domain.indexOf('en') !== 0 || domain.indexOf('beta.wmflabs.org') > 0) {
 if (aggregated) {
 return BBPromise.resolve({});
 } else {
@@ -94,9 +98,7 @@
 }
 }
 
-var tfaPageObj, pageTitle;
-
-return requestFeaturedArticleTitle(app, req.params.domain, 
dateUtil.getRequestedDate(req))
+return requestFeaturedArticleTitle(app, domain, 
dateUtil.getRequestedDate(req))
 .then(function (response) {
 mwapi.checkForQueryPagesInResponse(req, response);
 tfaPageObj = getPageObject(response);
@@ -106,7 +108,7 @@
 });
 }).then(function (res) {
 return {
-payload: { title: res.dbTitle },
+payload: { $merge: [ mUtil.getRbPageSummaryUrl(domain, 
res.dbTitle) ] },
 meta: { etag: tfaPageObj.pageid }
 };
 }).catch(function (err) {
diff --git a/lib/feed/most-read.js b/lib/feed/most-read.js
index 4805a2d..6f2eb80 100644
--- a/lib/feed/most-read.js
+++ b/lib/feed/most-read.js
@@ -145,7 +145,7 @@
 
 var results = goodTitles.map(function(entry) {
 return Object.assign(entry, {
-title: entry.article,
+$merge: [ mUtil.getRbPageSummaryUrl(req.params.domain, 
entry.article) ],
 article: undefined,
 fromencoded: undefined,
 ns: undefined,
diff --git a/lib/feed/news.js b/lib/feed/news.js
index d183479..df70be3 100644
--- a/lib/feed/news.js
+++ b/lib/feed/news.js
@@ -16,15 +16,17 @@
 return href;
 }
 
-function pushTitleIfNew(linkTitles, story, href) {
-if (linkTitles.indexOf(href) === -1) {
-story.links.push({ title: href });
-linkTitles.push(href);
+function pushTitleIfNew(domain, linkTitles, story, title) {
+if (linkTitles.indexOf(title) === -1) {
+story.links.push({
+$merge: [ mUtil.getRbPageSummaryUrl(domain, title) ]
+});
+linkTitles.push(title);
 }
 }
 
-function createLinksList(href, linkTitles, story) {
-pushTitleIfNew(linkTitles, story, removeFragment(href.slice(1)));
+function createLinksList(domain, href, linkTitles, story) {
+pushTitleIfNew(domain, linkTitles, story, removeFragment(href.slice(1)));
 }
 
 function promise(app, req) {
@@ -63,7 +65,7 @@
 };
 
 for (var i = 0, n = anchors.length; i < n; i++) {
-createLinksList(anchors[i].href, linkTitles, story);
+createLinksList(req.params.domain, anchors[i].href, 
linkTitles, story);
 }
 
 story.story = stories[j].innerHTML;
diff --git a/lib/mobile-util.js b/lib/mobile-util.js
index 6e66ab4..44f26f3 100644
--- a/lib/mobile-util.js
+++ b/lib/mobile-util.js
@@ -188,6 +188,10 @@
 return dateString + '/' + uuid.now().toString();
 };
 
+mUtil.getRbPageSummaryUrl = function(domain, title) {
+return 'https://' + domain + '/api/rest_v1/page/summary/' + 
encodeURIComponent(title);
+};
+
 mUtil.throw404 = function(message) {
 throw new HTTPError({
 status: 404,
diff --git a/spec.yaml b/spec.yaml
index a3aa248..f232f1e 100644
--- a/spec.yaml
+++ b/spec.yaml
@@ -95,7 +95,7 @@
 '200':
   description: The title of a Wikipedia's Featured Article of the Day
   schema:
-$ref: '#/definitions/article_title'
+$ref: '#/definitions/article_summary_merge_link'

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [search] Remove unused SpecialSearch functions

2016-11-07 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: [search] Remove unused SpecialSearch functions
..

[search] Remove unused SpecialSearch functions

AFAICT SpecialSearch is never extended into anything else. These
functions are protected, an unused within this class. There are a couple
other public functions that look unused, but i suppose a hook consumer
could be using them so leaving in for now.

Change-Id: I214c6144f81dade14a0a8c616743191a295b716d
---
M includes/specials/SpecialSearch.php
1 file changed, 0 insertions(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/04/320304/1

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 6daf19f..9968f2e 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -471,25 +471,6 @@
}
 
/**
-* Decide if the suggested query should be run, and it's results 
returned
-* instead of the provided $textMatches
-*
-* @param SearchResultSet $textMatches The results of a users query
-* @return bool
-*/
-   protected function shouldRunSuggestedQuery( SearchResultSet 
$textMatches ) {
-   if ( !$this->runSuggestion ||
-   !$textMatches->hasSuggestion() ||
-   $textMatches->numRows() > 0 ||
-   $textMatches->searchContainedSyntax()
-   ) {
-   return false;
-   }
-
-   return $this->getConfig()->get( 'SearchRunSuggestedQuery' );
-   }
-
-   /**
 * Generates HTML shown to the user when we have a suggestion about a 
query
 * that might give more results than their current query.
 */
@@ -1330,24 +1311,6 @@
$parts = explode( ':', $term );
if ( count( $parts ) > 1 ) {
return $wgContLang->getNsIndex( $parts[0] ) == NS_FILE;
-   }
-
-   return false;
-   }
-
-   /**
-* Check if query starts with all: prefix
-*
-* @param string $term The string to check
-* @return bool
-*/
-   protected function startsWithAll( $term ) {
-
-   $allkeyword = $this->msg( 'searchall' 
)->inContentLanguage()->text();
-
-   $parts = explode( ':', $term );
-   if ( count( $parts ) > 1 ) {
-   return $parts[0] == $allkeyword;
}
 
return false;

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [search] Remove more dead code

2016-11-07 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: [search] Remove more dead code
..

[search] Remove more dead code

This code in SpecialSearch looks to still be around from the days where
there was a feature that go would send you to directly to an edit page,
rather than showing search results. That feature no longer exists, so
remove the related code.

Change-Id: If5b064b08a6258bfab31ab8f8b62c1d7283c8912
---
M includes/specials/SpecialSearch.php
1 file changed, 0 insertions(+), 5 deletions(-)


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

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 9968f2e..599d526 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -234,11 +234,6 @@
 
return;
}
-   # No match, generate an edit URL
-   $title = Title::newFromText( $term );
-   if ( !is_null( $title ) ) {
-   Hooks::run( 'SpecialSearchNogomatch', [ &$title ] );
-   }
$this->showResults( $term );
}
 

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...parsoid[master]: Bump version to 0.6.0 for new deb release + update HISTORY.md

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

Change subject: Bump version to 0.6.0 for new deb release + update HISTORY.md
..


Bump version to 0.6.0 for new deb release + update HISTORY.md

* Updated HISTORY file based on Parsoid deployment logs and
  added only the most pertinent entries.

Change-Id: If07bc75fcb09507cae30fc82d7d89b8d87a4c69b
---
M HISTORY.md
M lib/ext/Cite/index.js
M lib/ext/JSON/index.js
M lib/ext/LST/index.js
M lib/ext/Translate/index.js
M npm-shrinkwrap.json
M package.json
M tests/parserTestsParserHook.js
8 files changed, 58 insertions(+), 15 deletions(-)

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



diff --git a/HISTORY.md b/HISTORY.md
index 620c936..ea93828 100644
--- a/HISTORY.md
+++ b/HISTORY.md
@@ -1,22 +1,65 @@
-
-n.n.n / -XX-XX
+0.6.0 / 2016-11-07
 ==
 
-  * T100681: Remove deprecated v1/v2 HTTP APIs
-  * T130638: Add data-mw as a separate JSON blob in the pagebundle
-  * T135596: Return client error for missing data attributes
+  wt -> html changes:
+  * T147742: Trim template target after stripping comments
+  * T142617: Handle invalid titles in transclusions
+  * Handle caption-like text outside tables
+  * migrateTrailingNLs DOM pass: Code simplifications and
+some subtle edge case bug fixes
+  * Handle HTML tags in attribute text properly
+  * A bunch of cleanup and fixes in the PEG tokenizer
+
+  html -> wt changes:
   * T134389: Serialize content in HTML tables using HTML tags
   * T125419: Fix selser issues serializing first table row
-  * T114413: Provide HTML2HTML endpoint in Parsoid
   * T137406: Emit |- between thead/tbody/tfoot
-  * T96195 : Remove node 0.8 support
   * T139388: Ensure that edits to content nested in elements
  with templated attributes is not lost by the
  selective serializer.
-  * T90668 : Replace custom server.js with service-runner
+  * T142998: Fix crasher in DOM normalization code
+  * Normalize all lists to not mix wikitext and HTML list syntax
+  * Always emit canonical wikitext for url links
+  * Emit url-links where appropriate no matter what rel attribute says
+
+  Infrastructure changes:
+  * T96195 : Remove node 0.8 support
   * T113322: Use the mediawiki-title library instead of
  Parsoid-homegrown title normalization code.
+  * Remove html5 treebuilder in favour of domino's
+  * service-runner:
+* T90668 : Replace custom server.js with service-runner
+* T141370: Use service-runner's logger as a backend to
+   Parsoid's logger
+* Use service-runner's metrics reporter in the http api
+  * Extensions:
+* T48580, T133320: Allow extensions to handle specific contentmodels
+* Let native extensions add stylesheets
+  * Lots of wikitext linter fixes / features.
+
+  API changes:
+  * T130638: Add data-mw as a separate JSON blob in the pagebundle
+  * T135596: Return client error for missing data attributes
+  * T114413: Provide HTML2HTML endpoint in Parsoid
+  * T100681: Remove deprecated v1/v2 HTTP APIs
   * T143356: Separate data-mw API semantics
+  * Add a page/wikitext/:title route to GET wikitext for a page
+  * Updates in preparation for supporting version 2.x content
+in the future -- should be no-op for version 1.x content
+  * Don't expose dev routes in production
+  * Cleanup http redirects
+  * Send error responses in the requested format
+
+  Performance fixes:
+  * Template wrapping: Eliminate pathological tpl-range nesting scenario
+  * computeDSR: Fix source of pathological O(n^2) behavior
+
+  Other fixes:
+  * Make the http connect timeout configurable
+  * Prevent JSON.stringify circular refs in template wrapping
+trace/error logs
+  * Fix processing listeners in node v7.x
+
 
 0.5.3 / 2016-11-01
 ==
diff --git a/lib/ext/Cite/index.js b/lib/ext/Cite/index.js
index 5ede05c..2387656 100644
--- a/lib/ext/Cite/index.js
+++ b/lib/ext/Cite/index.js
@@ -6,7 +6,7 @@
 
 var entities = module.parent.require('entities');
 
-var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.5.1');
+var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.6.0');
 var Util = ParsoidExtApi.Util;
 var DU = ParsoidExtApi.DOMUtils;
 var Promise = ParsoidExtApi.Promise;
diff --git a/lib/ext/JSON/index.js b/lib/ext/JSON/index.js
index 37797ae..c5f3f15 100644
--- a/lib/ext/JSON/index.js
+++ b/lib/ext/JSON/index.js
@@ -6,7 +6,7 @@
  * -- */
 'use strict';
 
-var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.5.1');
+var ParsoidExtApi = 
module.parent.require('./extapi.js').versionCheck('^0.6.0');
 var DU = ParsoidExtApi.DOMUtils;
 var Promise = ParsoidExtApi.Promise;
 var addMetaData = ParsoidExtApi.addMetaData;
diff --git a/lib/ext/LST/index.js b/lib/ext/LST/index.js
index 53621ab..9729d71 100644
--- 

[MediaWiki-commits] [Gerrit] mediawiki...SecurePoll[master]: Allow usernames with spaces on eligibility lists

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

Change subject: Allow usernames with spaces on eligibility lists
..


Allow usernames with spaces on eligibility lists

Usernames containing space cannot be added to voter eligibility
lists through the user interface.

Bug: T134687
Change-Id: I282b226b452850fce401f506732a615084a60815
---
M includes/pages/VoterEligibilityPage.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/pages/VoterEligibilityPage.php 
b/includes/pages/VoterEligibilityPage.php
index bfde069..35dce7b 100644
--- a/includes/pages/VoterEligibilityPage.php
+++ b/includes/pages/VoterEligibilityPage.php
@@ -233,7 +233,7 @@
$name = trim( substr( $name, 0, $i ) );
}
if ( $wiki !== '' && $name !== '' ) {
-   $wikiNames[$wiki][] = str_replace( ' ', '_', 
$name );
+   $wikiNames[$wiki][] = str_replace( '_', ' ', 
$name );
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I282b226b452850fce401f506732a615084a60815
Gerrit-PatchSet: 5
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Huji 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Anomie 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Dereckson 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/core[REL1_28]: Add $wgCSPFalsePositiveUrls to release notes

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

Change subject: Add $wgCSPFalsePositiveUrls to release notes
..


Add $wgCSPFalsePositiveUrls to release notes

Follow up d84479c4.

Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
---
M RELEASE-NOTES-1.28
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 7e23083..d20dba0 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -40,6 +40,8 @@
   away from. If you depend upon magic link functionality, it is requested that 
you comment
   on 
 and
   explain your use case(s).
+* New config variable $wgCSPFalsePositiveUrls to control what URLs to ignore
+  in upcoming Content-Security-Policy feature's reporting.
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Search .mw-body instead of #content to support all the skins

2016-11-07 Thread JGirault (Code Review)
JGirault has uploaded a new change for review.

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

Change subject: Search .mw-body instead of #content to support all the skins
..

Search .mw-body instead of #content to support all the skins

Bug: T150148
Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
---
M modules/maplink/maplink.js
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Kartographer 
refs/changes/03/320303/1

diff --git a/modules/maplink/maplink.js b/modules/maplink/maplink.js
index 2e7a3b3..0f5e522 100644
--- a/modules/maplink/maplink.js
+++ b/modules/maplink/maplink.js
@@ -66,8 +66,8 @@
 
// Some links might be displayed outside of $content, so we 
need to
// search outside. This is an anti-pattern and should be 
improved...
-   // Meanwhile #content is better than searching the full 
document.
-   $( '.mw-kartographer-maplink', '#content' ).each( function ( 
index ) {
+   // Meanwhile .mw-body is better than searching the full 
document.
+   $( '.mw-kartographer-maplink', '.mw-body' ).each( function ( 
index ) {
var data = getMapData( this ),
link;
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2368e38942e730a1b13942be238b09e6b1951f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: JGirault 

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Set $wgOATHAuthAccountPrefix to 'Wikimedia' for WMF CA wikis

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

Change subject: Set $wgOATHAuthAccountPrefix to 'Wikimedia' for WMF CA wikis
..


Set $wgOATHAuthAccountPrefix to 'Wikimedia' for WMF CA wikis

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index d878f92..79b2ce2 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -3147,6 +3147,7 @@
}
 
if ( $wmgUseCentralAuth ) {
+   $wgOATHAuthAccountPrefix = 'Wikimedia';
$wgOATHAuthDatabase = 'centralauth';
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0e38f9c5f16f517edfa3bc0dde14d6f14441c58e
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Reedy 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Don't forward Zookeeper and Kafka ports out

2016-11-07 Thread Ottomata (Code Review)
Ottomata has submitted this change and it was merged.

Change subject: Don't forward Zookeeper and Kafka ports out
..


Don't forward Zookeeper and Kafka ports out

Change-Id: Ie259e411849afcaf785ed707cb4cd79fa6bdbcaf
---
M puppet/modules/role/settings/eventbus.yaml
M puppet/modules/role/settings/kafka.yaml
2 files changed, 0 insertions(+), 5 deletions(-)

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



diff --git a/puppet/modules/role/settings/eventbus.yaml 
b/puppet/modules/role/settings/eventbus.yaml
index f96b72b..2719c6b 100644
--- a/puppet/modules/role/settings/eventbus.yaml
+++ b/puppet/modules/role/settings/eventbus.yaml
@@ -2,6 +2,4 @@
 # use same settings as kafka.yaml.
 vagrant_ram: 128
 forward_ports:
-  2181: 2181
-  9092: 9092
   8085: 8085
diff --git a/puppet/modules/role/settings/kafka.yaml 
b/puppet/modules/role/settings/kafka.yaml
index 4bb167f..fab9f85 100644
--- a/puppet/modules/role/settings/kafka.yaml
+++ b/puppet/modules/role/settings/kafka.yaml
@@ -1,4 +1 @@
 vagrant_ram: 128
-forward_ports:
-  2181: 2181
-  9092: 9092

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie259e411849afcaf785ed707cb4cd79fa6bdbcaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dduvall 
Gerrit-Reviewer: GWicke 
Gerrit-Reviewer: Mobrovac 
Gerrit-Reviewer: Ottomata 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SimpleSort[master]: SimpleSort extension: Populate with initial files

2016-11-07 Thread Clump (Code Review)
Clump has submitted this change and it was merged.

Change subject: SimpleSort extension: Populate with initial files
..


SimpleSort extension: Populate with initial files

This all files for the initial version of this extension.

Change-Id: I17d8b7016265c1ff8da8795aad2cc2c6b55421e9
---
A SimpleSort.hooks.php
A SimpleSort.i18n.magic.php
A SimpleSort.php
A extension.json
A i18n/en.json
A i18n/qqq.json
6 files changed, 184 insertions(+), 0 deletions(-)

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



diff --git a/SimpleSort.hooks.php b/SimpleSort.hooks.php
new file mode 100644
index 000..21323a4
--- /dev/null
+++ b/SimpleSort.hooks.php
@@ -0,0 +1,115 @@
+setFunctionHook( 'simplesort', [ __CLASS__, 'renderSort' ] );
+
+ return true;
+   }
+
+   // Render the output of {{#simplesort:}}.
+   // If two arguments are supplied, the 1st specifies options, 
whitespace-separated:
+   //  desc   Sort in descending order
+   //  alpha  Alphabetic sorting (regular, not natural)
+   //  numNumeric sorting
+   //  case   Case-sensitive sorting
+   //  insep="x"  Use x as a list separator in order to identify individual 
elements in the input.
+   // Note that whitespace on either side of x is ignored, 
and discarded.
+   // The quotes are required.
+   //  outsep="x" Use x as a list separator in the output.
+   // The quotes are required.
+   //  Default sorting options are to use php's "natural", case-insensitive 
sort order,
+   //  and a comma-separator for both input and output.
+   // The remaining argument is the sortable list.
+   public static function renderSort( $parser ) {
+  // defaults
+  $asc = true;  // Ascending or descending.
+  $nat = true;  // Natural sorting.
+  $alpha = true; // Alphabetic or numeric, overridden by nat.
+  $cs = false; // Case-sensitive
+  $insep = ",";  // Input separator.
+  $outsep = ",";  // Output separator.
+
+  $numargs = func_num_args();
+  $arglist = func_get_args();
+  $input = "";
+
+  if ( $numargs >= 3 ) {
+  // Options specified, extract them.
+  $options = $arglist[1];
+
+  // Outsep and insep options are complicated by the potential 
for using
+  //  whitespace as a separator.  So first look for them.
+  preg_match( '/insep="([^"]*)"/', $options, $msep );
+  if ( $msep ) {
+  $insep = $msep[1];
+  // Remove the option from the string of options.
+  $options = str_replace( $msep[0], "", $options );
+  }
+
+  preg_match( '/outsep="([^"]*)"/', $options, $osep );
+  if ( $osep ) {
+  $outsep = $osep[1];
+  // Remove the option from the string of options.
+  $options = str_replace( $osep[0], "", $options );
+  } else {
+  $outsep = $insep;
+  }
+
+  // Only 3 options actually possible, but excessively, parse 
up to 4 to
+  //  catch and isolate trailing debris.
+  $opts = preg_split( "/[\s]+/", trim( $options ), 4 );
+
+  // Check for each option.  Ignore blank options if they 
somehow got in there.
+  for ( $i=0; $i < count( $opts ); $i++ ) {
+  if ( $opts[$i] === "desc" ) {
+  $asc = false;
+  } else if ( $opts[$i] === "alpha" ) {
+  $alpha = true;
+  $nat = false;
+  } else if ( $opts[$i] === "num" ) {
+  $alpha = false;
+  $nat = false;
+  } else if ( $opts[$i] === "case" ) {
+  $cs = true;
+  } else if ( $opts[$i] !== "" ) {
+  return wfMessage( 'simplesort-err', 
$opts[$i] )->text();
+  }
+  }
+  $input = $arglist[2];
+  } else if ( $numargs == 2 ) {
+  $input = $arglist[1];
+  }
+
+  if ( $input === "" ) {
+  $output = "";
+  } else {
+  if ( $insep === "" )
+  $ilist = str_split( preg_replace( "/[\s]+/", "", 
$input ) );
+  else
+  $ilist = preg_split( "/[\s]*" . preg_quote( $insep ) 
. "[\s]*/", $input );
+
+  $flags = ( ( $nat ) ? SORT_NATURAL : ( ( $alpha ) ? 
SORT_STRING : SORT_NUMERIC ) )
+  | ( ( $cs ) ? 0 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Don't override message key in badpass log entries

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

Change subject: Don't override message key in badpass log entries
..


Don't override message key in badpass log entries

This causes the log message to be the i18n message
which is not what is wanted.

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

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index 5b3181c..d878f92 100644
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -1509,13 +1509,13 @@
$headers = apache_request_headers();
 
$logger = LoggerFactory::getInstance( 'badpass' );
-   $logger->info( 'Login failed for sysop {name} from {ip} - {xff} 
- {ua}: {message}', [
+   $logger->info( 'Login failed for sysop {name} from {ip} - {xff} 
- {ua}: {messagestr}', [
'name' => $user->getName(),
'ip' => $wgRequest->getIP(),
'xff' => @$headers['X-Forwarded-For'],
'ua' => @$headers['User-Agent'],
'guessed' => $guessed,
-   'message' => $response->message->toString(),
+   'messagestr' => $response->message->toString(),
] );
}
 };

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d3bf9849186ae3191c49fd05e8d6b4cc65f5972
Gerrit-PatchSet: 2
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add ec.wikimedia to MWMultiVersion

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

Change subject: Add ec.wikimedia to MWMultiVersion
..


Add ec.wikimedia to MWMultiVersion

Bug: T135521
Change-Id: I712e566c436ccb778bd24efaecaff46085b3a870
---
M multiversion/MWMultiVersion.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index d80970d..521b8a8 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -182,7 +182,7 @@
|| ( $matches[2] === 'wikimedia' && in_array(
$lang,
array(
-   'ar', 'bd', 'be', 'br', 'ca', 
'cn', 'co', 'dk', 'et', 'fi', 'il', 'mk', 'mx', 'nl',
+   'ar', 'bd', 'be', 'br', 'ca', 
'cn', 'co', 'dk', 'ec', 'et', 'fi', 'il', 'mk', 'mx', 'nl',
'noboard-chapters', 'no', 
'nyc', 'nz', 'pa-us', 'pl', 'rs', 'ru', 'se', 'tr', 'ua', 'uk', 've'
)
) ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I712e566c436ccb778bd24efaecaff46085b3a870
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Dereckson 
Gerrit-Reviewer: Reedy 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki...SimpleSort[master]: SimpleSort extension: Populate with initial files

2016-11-07 Thread Clump (Code Review)
Clump has uploaded a new change for review.

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

Change subject: SimpleSort extension: Populate with initial files
..

SimpleSort extension: Populate with initial files

This all files for the initial version of this extension.

Change-Id: I17d8b7016265c1ff8da8795aad2cc2c6b55421e9
---
A SimpleSort.hooks.php
A SimpleSort.i18n.magic.php
A SimpleSort.php
A extension.json
A i18n/en.json
A i18n/qqq.json
6 files changed, 184 insertions(+), 0 deletions(-)


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

diff --git a/SimpleSort.hooks.php b/SimpleSort.hooks.php
new file mode 100644
index 000..21323a4
--- /dev/null
+++ b/SimpleSort.hooks.php
@@ -0,0 +1,115 @@
+setFunctionHook( 'simplesort', [ __CLASS__, 'renderSort' ] );
+
+ return true;
+   }
+
+   // Render the output of {{#simplesort:}}.
+   // If two arguments are supplied, the 1st specifies options, 
whitespace-separated:
+   //  desc   Sort in descending order
+   //  alpha  Alphabetic sorting (regular, not natural)
+   //  numNumeric sorting
+   //  case   Case-sensitive sorting
+   //  insep="x"  Use x as a list separator in order to identify individual 
elements in the input.
+   // Note that whitespace on either side of x is ignored, 
and discarded.
+   // The quotes are required.
+   //  outsep="x" Use x as a list separator in the output.
+   // The quotes are required.
+   //  Default sorting options are to use php's "natural", case-insensitive 
sort order,
+   //  and a comma-separator for both input and output.
+   // The remaining argument is the sortable list.
+   public static function renderSort( $parser ) {
+  // defaults
+  $asc = true;  // Ascending or descending.
+  $nat = true;  // Natural sorting.
+  $alpha = true; // Alphabetic or numeric, overridden by nat.
+  $cs = false; // Case-sensitive
+  $insep = ",";  // Input separator.
+  $outsep = ",";  // Output separator.
+
+  $numargs = func_num_args();
+  $arglist = func_get_args();
+  $input = "";
+
+  if ( $numargs >= 3 ) {
+  // Options specified, extract them.
+  $options = $arglist[1];
+
+  // Outsep and insep options are complicated by the potential 
for using
+  //  whitespace as a separator.  So first look for them.
+  preg_match( '/insep="([^"]*)"/', $options, $msep );
+  if ( $msep ) {
+  $insep = $msep[1];
+  // Remove the option from the string of options.
+  $options = str_replace( $msep[0], "", $options );
+  }
+
+  preg_match( '/outsep="([^"]*)"/', $options, $osep );
+  if ( $osep ) {
+  $outsep = $osep[1];
+  // Remove the option from the string of options.
+  $options = str_replace( $osep[0], "", $options );
+  } else {
+  $outsep = $insep;
+  }
+
+  // Only 3 options actually possible, but excessively, parse 
up to 4 to
+  //  catch and isolate trailing debris.
+  $opts = preg_split( "/[\s]+/", trim( $options ), 4 );
+
+  // Check for each option.  Ignore blank options if they 
somehow got in there.
+  for ( $i=0; $i < count( $opts ); $i++ ) {
+  if ( $opts[$i] === "desc" ) {
+  $asc = false;
+  } else if ( $opts[$i] === "alpha" ) {
+  $alpha = true;
+  $nat = false;
+  } else if ( $opts[$i] === "num" ) {
+  $alpha = false;
+  $nat = false;
+  } else if ( $opts[$i] === "case" ) {
+  $cs = true;
+  } else if ( $opts[$i] !== "" ) {
+  return wfMessage( 'simplesort-err', 
$opts[$i] )->text();
+  }
+  }
+  $input = $arglist[2];
+  } else if ( $numargs == 2 ) {
+  $input = $arglist[1];
+  }
+
+  if ( $input === "" ) {
+  $output = "";
+  } else {
+  if ( $insep === "" )
+  $ilist = str_split( preg_replace( "/[\s]+/", "", 
$input ) );
+  else
+  $ilist = preg_split( "/[\s]*" . preg_quote( $insep ) 
. "[\s]*/", $input );
+
+  $flags = ( ( $nat ) ? SORT_NATURAL : ( ( $alpha ) 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Add ec.wikimedia to MWMultiVersion

2016-11-07 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Add ec.wikimedia to MWMultiVersion
..

Add ec.wikimedia to MWMultiVersion

Bug: T135521
Change-Id: I712e566c436ccb778bd24efaecaff46085b3a870
---
M multiversion/MWMultiVersion.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/multiversion/MWMultiVersion.php b/multiversion/MWMultiVersion.php
index d80970d..521b8a8 100644
--- a/multiversion/MWMultiVersion.php
+++ b/multiversion/MWMultiVersion.php
@@ -182,7 +182,7 @@
|| ( $matches[2] === 'wikimedia' && in_array(
$lang,
array(
-   'ar', 'bd', 'be', 'br', 'ca', 
'cn', 'co', 'dk', 'et', 'fi', 'il', 'mk', 'mx', 'nl',
+   'ar', 'bd', 'be', 'br', 'ca', 
'cn', 'co', 'dk', 'ec', 'et', 'fi', 'il', 'mk', 'mx', 'nl',
'noboard-chapters', 'no', 
'nyc', 'nz', 'pa-us', 'pl', 'rs', 'ru', 'se', 'tr', 'ua', 'uk', 've'
)
) ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Don't forward Zookeeper and Kafka ports out

2016-11-07 Thread Ppchelko (Code Review)
Ppchelko has uploaded a new change for review.

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

Change subject: Don't forward Zookeeper and Kafka ports out
..

Don't forward Zookeeper and Kafka ports out

Change-Id: Ie259e411849afcaf785ed707cb4cd79fa6bdbcaf
---
M puppet/modules/role/settings/eventbus.yaml
M puppet/modules/role/settings/kafka.yaml
2 files changed, 0 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/00/320300/1

diff --git a/puppet/modules/role/settings/eventbus.yaml 
b/puppet/modules/role/settings/eventbus.yaml
index f96b72b..2719c6b 100644
--- a/puppet/modules/role/settings/eventbus.yaml
+++ b/puppet/modules/role/settings/eventbus.yaml
@@ -2,6 +2,4 @@
 # use same settings as kafka.yaml.
 vagrant_ram: 128
 forward_ports:
-  2181: 2181
-  9092: 9092
   8085: 8085
diff --git a/puppet/modules/role/settings/kafka.yaml 
b/puppet/modules/role/settings/kafka.yaml
index 4bb167f..fab9f85 100644
--- a/puppet/modules/role/settings/kafka.yaml
+++ b/puppet/modules/role/settings/kafka.yaml
@@ -1,4 +1 @@
 vagrant_ram: 128
-forward_ports:
-  2181: 2181
-  9092: 9092

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie259e411849afcaf785ed707cb4cd79fa6bdbcaf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: Ppchelko 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Add $wgCSPFalsePositiveUrls to release notes

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

Change subject: Add $wgCSPFalsePositiveUrls to release notes
..


Add $wgCSPFalsePositiveUrls to release notes

Follow up d84479c4.

Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
---
M RELEASE-NOTES-1.28
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index e04bb17..b5dc3f9 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -40,6 +40,8 @@
   away from. If you depend upon magic link functionality, it is requested that 
you comment
   on 
 and
   explain your use case(s).
+* New config variable $wgCSPFalsePositiveUrls to control what URLs to ignore
+  in upcoming Content-Security-Policy feature's reporting.
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Brian Wolff 
Gerrit-Reviewer: Brian Wolff 
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] mediawiki...VisualEditor[master]: Update VE core submodule to master (88ba26b)

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

Change subject: Update VE core submodule to master (88ba26b)
..


Update VE core submodule to master (88ba26b)

New changes:
e9866f4 Replace reference to current doc with this.newDoc
fa5a575 Add test framework for diffElement
2f6969c Use shallow copy for internal list data inside shallowCloneFromRange
866b2c0 Don't bother testing data on direction key tests
88ba26b Avoid jQuery in PreviewElement and ve.resolveAttributes

Change-Id: I7adb57898fa7cecd6a412183c4ca0726ef1a00ae
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/lib/ve b/lib/ve
index e7c5b56..88ba26b 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit e7c5b56f465d62a97808a82cd488e10601daecbc
+Subproject commit 88ba26bc463b0f051ec3e9cd3957407f3abac09b

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7adb57898fa7cecd6a412183c4ca0726ef1a00ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
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] mediawiki/core[REL1_28]: Add $wgCSPFalsePositiveUrls to release notes

2016-11-07 Thread Brian Wolff (Code Review)
Brian Wolff has uploaded a new change for review.

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

Change subject: Add $wgCSPFalsePositiveUrls to release notes
..

Add $wgCSPFalsePositiveUrls to release notes

Follow up d84479c4.

Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
---
M RELEASE-NOTES-1.28
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/99/320299/1

diff --git a/RELEASE-NOTES-1.28 b/RELEASE-NOTES-1.28
index 7e23083..d20dba0 100644
--- a/RELEASE-NOTES-1.28
+++ b/RELEASE-NOTES-1.28
@@ -40,6 +40,8 @@
   away from. If you depend upon magic link functionality, it is requested that 
you comment
   on 
 and
   explain your use case(s).
+* New config variable $wgCSPFalsePositiveUrls to control what URLs to ignore
+  in upcoming Content-Security-Policy feature's reporting.
 
 === New features in 1.28 ===
 * User::isBot() method for checking if an account is a bot role account.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I604bdd601b9b1e36964342eed3858336e683d769
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_28
Gerrit-Owner: Brian Wolff 

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


[MediaWiki-commits] [Gerrit] mediawiki...JsonConfig[master]: Added jsondata api for localized json from Data ns

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

Change subject: Added jsondata api for localized json from Data ns
..


Added jsondata api for localized json from Data ns

Change-Id: I6b5f189690b52fc3b523a4087ba8d1e48755a879
---
M extension.json
M i18n/en.json
M i18n/qqq.json
A includes/JCDataApi.php
M includes/JCSingleton.php
5 files changed, 103 insertions(+), 2 deletions(-)

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



diff --git a/extension.json b/extension.json
index 17e57c0..233daeb 100644
--- a/extension.json
+++ b/extension.json
@@ -48,6 +48,7 @@
"JsonConfig\\JCContent": "includes/JCContent.php",
"JsonConfig\\JCContentHandler": "includes/JCContentHandler.php",
"JsonConfig\\JCContentView": "includes/JCContentView.php",
+   "JsonConfig\\JCDataApi": "includes/JCDataApi.php",
"JsonConfig\\JCDataContent": "includes/JCDataContent.php",
"JsonConfig\\JCDefaultContentView": 
"includes/JCDefaultContentView.php",
"JsonConfig\\JCDefaultObjContentView": 
"includes/JCDefaultObjContentView.php",
@@ -80,6 +81,9 @@
"AbortMove": [
"JsonConfig\\JCSingleton::onAbortMove"
],
+   "ApiMain::moduleManager": [
+   "JsonConfig\\JCSingleton::onApiMainModuleManager"
+   ],
"ArticleDeleteComplete": [
"JsonConfig\\JCSingleton::onArticleDeleteComplete"
],
diff --git a/i18n/en.json b/i18n/en.json
index f793339..e327c20 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -48,5 +48,9 @@
"apihelp-jsonconfig-param-content": "For $1command=reload, use this 
content instead.",
"apihelp-jsonconfig-example-1": "Show configuration",
"apihelp-jsonconfig-example-2": "Reset [[Zero:TEST]]",
-   "apihelp-jsonconfig-example-3": "Reload [[Zero:TEST]]"
+   "apihelp-jsonconfig-example-3": "Reload [[Zero:TEST]]",
+   "apihelp-jsondata-description": "Retrieve localized JSON data. This API 
only supports format=json and formatversion=2 or later.",
+   "apihelp-jsondata-param-title": "Title to get. By default assumes 
namespace to be \"Data:\"",
+   "apihelp-jsondata-example-1": "Get JSON content of the Sample.tab page, 
localized to user's language",
+   "apihelp-jsondata-example-2": "Get JSON content of the Sample.tab page 
localized to French"
 }
diff --git a/i18n/qqq.json b/i18n/qqq.json
index 808707a..62edca8 100644
--- a/i18n/qqq.json
+++ b/i18n/qqq.json
@@ -56,5 +56,9 @@
"apihelp-jsonconfig-param-content": 
"{{doc-apihelp-param|jsonconfig|content}}",
"apihelp-jsonconfig-example-1": "{{doc-apihelp-example|jsonconfig}}",
"apihelp-jsonconfig-example-2": "{{doc-apihelp-example|jsonconfig}}",
-   "apihelp-jsonconfig-example-3": "{{doc-apihelp-example|jsonconfig}}"
+   "apihelp-jsonconfig-example-3": "{{doc-apihelp-example|jsonconfig}}",
+   "apihelp-jsondata-description": "{{doc-apihelp-description|jsondata}}",
+   "apihelp-jsondata-param-title": "{{doc-apihelp-param|jsondata|title}}",
+   "apihelp-jsondata-example-1": "{{doc-apihelp-example|jsondata}}",
+   "apihelp-jsondata-example-2": "{{doc-apihelp-example|jsondata}}"
 }
diff --git a/includes/JCDataApi.php b/includes/JCDataApi.php
new file mode 100644
index 000..5a1d79b
--- /dev/null
+++ b/includes/JCDataApi.php
@@ -0,0 +1,68 @@
+getMain()->getPrinter()->extractRequestParams();
+   if ( !( $this->getMain()->getPrinter() instanceof ApiFormatJson 
) ||
+!isset( $printerParams['formatversion'] )
+   ) {
+   $this->dieUsage( 'This module only supports format=json 
and format=jsonfm',
+   'invalidparammix' );
+   }
+   if ( $printerParams['formatversion'] == 1 ) {
+   $this->dieUsage( 'This module only supports 
formatversion=2 or later',
+   'invalidparammix' );
+   }
+
+   $params = $this->extractRequestParams();
+   $jct = JCSingleton::parseTitle( $params['title'], NS_DATA );
+   if ( !$jct ) {
+   $this->dieUsageMsg( [ 'invalidtitle', $params['title'] 
] );
+   }
+
+   $data = JCSingleton::getContent( $jct );
+   if ( !$data ) {
+   $this->dieUsageMsg( [ 'invalidtitle', $jct ] );
+   } elseif ( !method_exists( $data, 'getLocalizedData' ) ) {
+   $data = $data->getData();
+   } else {
+   /** @var JCDataContent $data */
+   $data = $data->getLocalizedData( $this->getLanguage() );
+   }
+
+   $this->getResult()->addValue( null, 

[MediaWiki-commits] [Gerrit] operations/puppet[production]: remove gallium from site.pp, installserver

2016-11-07 Thread Dzahn (Code Review)
Dzahn has submitted this change and it was merged.

Change subject: remove gallium from site.pp, installserver
..


remove gallium from site.pp, installserver

Bug: T95757
Change-Id: I3f26ebb379ae66b862a358d5495cd279eec25b49
---
M manifests/site.pp
M modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
2 files changed, 0 insertions(+), 25 deletions(-)

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



diff --git a/manifests/site.pp b/manifests/site.pp
index 1e284a9..f01bcc6 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -1113,24 +1113,6 @@
 include standard
 }
 
-# Continuous Integration
-node 'gallium.wikimedia.org' {
-role(ci::master,
-ci::slave,
-ci::website,
-zuul::server,
-backup::host)
-
-# TODO: Temporary rsync port for the migration to contint1001
-ferm::service { 'rsync_migration':
-proto  => 'tcp',
-port   => 873,
-srange => '208.80.154.17',
-}
-include standard
-include contint::firewall
-}
-
 # Virtualization hosts
 node /^ganeti[12]00[0-9]\.(codfw|eqiad)\.wmnet$/ {
 role(ganeti)
diff --git a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200 
b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
index 8506545..4a6fad7 100644
--- a/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
+++ b/modules/install_server/files/dhcpd/linux-host-entries.ttyS1-115200
@@ -2424,13 +2424,6 @@
 filename "trusty-installer/ubuntu-installer/amd64/pxelinux.0";
 }
 
-host gallium {
-hardware ethernet 78:2b:cb:09:0e:5b;
-fixed-address gallium.wikimedia.org;
-option pxelinux.pathprefix "precise-installer/";
-filename "precise-installer/ubuntu-installer/amd64/pxelinux.0";
-}
-
 host ganeti1001 {
 hardware ethernet f0:1f:af:e8:c5:a3;
 fixed-address ganeti1001.eqiad.wmnet;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3f26ebb379ae66b862a358d5495cd279eec25b49
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Dzahn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Hashar 
Gerrit-Reviewer: Thcipriani 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Initial configuration for ec.wikimedia

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

Change subject: Initial configuration for ec.wikimedia
..


Initial configuration for ec.wikimedia

Wikimedistas de Ecuador has been recognized as a Wikimedia user group
in September 2015. To work efficiently, they wish a private wiki.

This configuration is mostly based on be.wikimedia.

Lang code  es
Shard  s3
Site name  Wikimedistas de Ecuador
Logo . 
https://commons.wikimedia.org/wiki/File:Wikimedians_of_Ecuador_User_Group_Logo_PNG_version.png
Timezone . America/Guayaquil (UTC-5)
Uploads .. allowed
Import sources ... meta
Features . Visual Editor, private wiki

Bug: T135521
Change-Id: I75af02c458aeb3dd0ae93fd30aeace81cbd11fed
---
M dblists/all.dblist
M dblists/private.dblist
M dblists/s3.dblist
M dblists/small.dblist
M dblists/wikimedia.dblist
A static/images/project-logos/ecwikimedia-1.5x.png
A static/images/project-logos/ecwikimedia-2x.png
A static/images/project-logos/ecwikimedia.png
M wikiversions.json
M wmf-config/InitialiseSettings.php
10 files changed, 13 insertions(+), 0 deletions(-)

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



diff --git a/dblists/all.dblist b/dblists/all.dblist
index a6b034c..3bdafd4 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -186,6 +186,7 @@
 dvwiktionary
 dzwiki
 dzwiktionary
+ecwikimedia
 eewiki
 elwiki
 elwikibooks
diff --git a/dblists/private.dblist b/dblists/private.dblist
index 7b15947..509aeae 100644
--- a/dblists/private.dblist
+++ b/dblists/private.dblist
@@ -9,6 +9,7 @@
 chapcomwiki
 checkuserwiki
 collabwiki
+ecwikimedia
 execwiki
 fdcwiki
 grantswiki
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index af95e30..d4fa348 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -179,6 +179,7 @@
 dvwiktionary
 dzwiki
 dzwiktionary
+ecwikimedia
 eewiki
 elwiki
 elwikibooks
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 21aca5c..607fac1 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -114,6 +114,7 @@
 dvwiktionary
 dzwiki
 dzwiktionary
+ecwikimedia
 eewiki
 elwikibooks
 elwikinews
diff --git a/dblists/wikimedia.dblist b/dblists/wikimedia.dblist
index b847f88..8d6a9a8 100644
--- a/dblists/wikimedia.dblist
+++ b/dblists/wikimedia.dblist
@@ -6,6 +6,7 @@
 cnwikimedia
 cowikimedia
 dkwikimedia
+ecwikimedia
 etwikimedia
 fiwikimedia
 ilwikimedia
diff --git a/static/images/project-logos/ecwikimedia-1.5x.png 
b/static/images/project-logos/ecwikimedia-1.5x.png
new file mode 100644
index 000..481ce81
--- /dev/null
+++ b/static/images/project-logos/ecwikimedia-1.5x.png
Binary files differ
diff --git a/static/images/project-logos/ecwikimedia-2x.png 
b/static/images/project-logos/ecwikimedia-2x.png
new file mode 100644
index 000..9b3b02f
--- /dev/null
+++ b/static/images/project-logos/ecwikimedia-2x.png
Binary files differ
diff --git a/static/images/project-logos/ecwikimedia.png 
b/static/images/project-logos/ecwikimedia.png
new file mode 100644
index 000..d253c36
--- /dev/null
+++ b/static/images/project-logos/ecwikimedia.png
Binary files differ
diff --git a/wikiversions.json b/wikiversions.json
index 1e58222..f320867 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -187,6 +187,7 @@
 "dvwiktionary": "php-1.29.0-wmf.1",
 "dzwiki": "php-1.29.0-wmf.1",
 "dzwiktionary": "php-1.29.0-wmf.1",
+"ecwikimedia": "php-1.29.0-wmf.1",
 "eewiki": "php-1.29.0-wmf.1",
 "elwiki": "php-1.29.0-wmf.1",
 "elwikibooks": "php-1.29.0-wmf.1",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 49dee7b..a3eac9f 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -126,6 +126,7 @@
'cawikimedia' => 'en', // T88843#1098439
'cowikimedia' => 'es',
'dkwikimedia' => 'da',
+   'ecwikimedia' => 'es', // T135521
'ilwikimedia' => 'he',
'mkwikimedia' => 'mk',
'mxwikimedia' => 'es',
@@ -280,6 +281,7 @@
'dsbwiki' => 'Europe/Berlin',
'dvwiki' => 'Indian/Maldives', // T48351
'dvwiktionary' => 'Indian/Maldives', // T48351
+   'ecwikimedia' => 'America/Guayaquil', // T135521
'elwikinews' => 'Europe/Athens',
'elwikivoyage' => 'Europe/Athens',
'etwiki' => 'Europe/Tallinn',
@@ -1054,6 +1056,7 @@
'cawikimedia' => '/static/images/project-logos/cawikimedia.png',
'cowikimedia' => '/static/images/project-logos/cowikimedia.png',
'dkwikimedia' => '/static/images/project-logos/dkwikimedia.png',
+   'ecwikimedia' => '/static/images/project-logos/ecwikimedia.png', // 
T135521
'etwikimedia' => '/static/images/project-logos/etwikimedia.png',
'fiwikimedia' => '/static/images/project-logos/fiwikimedia.png',
'mkwikimedia' => '/static/images/project-logos/mkwikimedia.png',
@@ -1182,6 +1185,7 @@
 

[MediaWiki-commits] [Gerrit] operations/mediawiki-config[master]: Initial configuration for projectcom.wikimedia.org

2016-11-07 Thread Dereckson (Code Review)
Dereckson has uploaded a new change for review.

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

Change subject: Initial configuration for projectcom.wikimedia.org
..

Initial configuration for projectcom.wikimedia.org

This is a private wiki for the Project Grants Committee members,
and some WMF staff.

This configuration is mostly based on be.wikimedia.

Lang code  en
Shard  s3
Site name  Project Grants Committee
Import sources ... meta, en.
Features . Visual Editor, private wiki

Bug: T143138
Change-Id: Ia87fbe9ce466d9565256fba1c45338f340bd5c9c
---
M dblists/all.dblist
M dblists/private.dblist
M dblists/s3.dblist
M dblists/securepollglobal.dblist
M dblists/small.dblist
M dblists/special.dblist
M wikiversions.json
M wmf-config/InitialiseSettings.php
8 files changed, 14 insertions(+), 0 deletions(-)


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

diff --git a/dblists/all.dblist b/dblists/all.dblist
index a6b034c..3c42333 100644
--- a/dblists/all.dblist
+++ b/dblists/all.dblist
@@ -608,6 +608,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/private.dblist b/dblists/private.dblist
index 7b15947..7a49350 100644
--- a/dblists/private.dblist
+++ b/dblists/private.dblist
@@ -21,6 +21,7 @@
 officewiki
 ombudsmenwiki
 otrs_wikiwiki
+projectcomwiki
 searchcomwiki
 spcomwiki
 stewardwiki
diff --git a/dblists/s3.dblist b/dblists/s3.dblist
index af95e30..c61a39d 100644
--- a/dblists/s3.dblist
+++ b/dblists/s3.dblist
@@ -580,6 +580,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/securepollglobal.dblist b/dblists/securepollglobal.dblist
index c825c5b..9058b0f 100644
--- a/dblists/securepollglobal.dblist
+++ b/dblists/securepollglobal.dblist
@@ -605,6 +605,7 @@
 pnbwiki
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswiki
 pswikibooks
 pswiktionary
diff --git a/dblists/small.dblist b/dblists/small.dblist
index 21aca5c..14c3866 100644
--- a/dblists/small.dblist
+++ b/dblists/small.dblist
@@ -340,6 +340,7 @@
 plwikivoyage
 pnbwiktionary
 pntwiki
+projectcomwiki
 pswikibooks
 ptwikivoyage
 qualitywiki
diff --git a/dblists/special.dblist b/dblists/special.dblist
index 8fd34fb..c0a6ed1 100644
--- a/dblists/special.dblist
+++ b/dblists/special.dblist
@@ -31,6 +31,7 @@
 ombudsmenwiki
 otrs_wikiwiki
 outreachwiki
+projectcomwiki
 qualitywiki
 searchcomwiki
 sourceswiki
diff --git a/wikiversions.json b/wikiversions.json
index 1e58222..d110e8f 100644
--- a/wikiversions.json
+++ b/wikiversions.json
@@ -609,6 +609,7 @@
 "pnbwiki": "php-1.29.0-wmf.1",
 "pnbwiktionary": "php-1.29.0-wmf.1",
 "pntwiki": "php-1.29.0-wmf.1",
+"projectcomwiki": "php-1.29.0-wmf.1",
 "pswiki": "php-1.29.0-wmf.1",
 "pswikibooks": "php-1.29.0-wmf.1",
 "pswiktionary": "php-1.29.0-wmf.1",
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 49dee7b..e6984e0 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -164,6 +164,7 @@
'officewiki' => 'en',
'ombudsmenwiki' => 'en',
'otrs_wikiwiki' => 'en',
+   'projectcomwiki' => 'en',
'qualitywiki' => 'en',
'searchcomwiki' => 'en',
'stewardwiki' => 'en',
@@ -1421,6 +1422,7 @@
'otrs_wikiwiki' => '//otrs-wiki.wikimedia.org',
'outreachwiki' => '//outreach.wikimedia.org',
'pa_uswikimedia' => '//pa-us.wikimedia.org',
+   'projectcomwiki' => '//projectcom.wikimedia.org', // T143138
'qualitywiki' => '//quality.wikimedia.org',
'searchcomwiki' => '//searchcom.wikimedia.org',
'sourceswiki' => '//wikisource.org',
@@ -1866,6 +1868,7 @@
'pnbwiki' => 'وکیپیڈیا',
'pnbwiktionary' => 'وکشنری',
'pntwiki' => 'Βικιπαίδεια',
+   'projectcomwiki' => 'Project Grants Committee',
'pswiki' => 'ويکيپېډيا' ,
'pswikibooks' => 'ويکيتابونه' ,
'pswiktionary' => 'ويکيسيند' ,
@@ -10849,6 +10852,9 @@
'zhwikibooks' => [ 'w', 'wikt', 'q', 's', 'meta', 'commons' ],
'zhwikisource' => [ 'w', 'b', 'q', 'wikt', 'meta', 'commons' ],
'zuwiki' => [ 'en' ], // T53327
+
+   // Special wikis
+   'projectcomwiki' => [ 'wikipedia:en', 'meta' ], // T143138
 ],
 # @} end of wgImportSources
 
@@ -11635,6 +11641,7 @@
'ombudsmenwiki' => '/static/favicon/wmf.ico', // T50404
'otrs_wikiwiki' => '/static/favicon/wmf.ico',
'outreachwiki' => '/static/favicon/community.ico',
+   'projectcomwiki' => '/static/favicon/wmf.ico',
'searchcomwiki' => '/static/favicon/wmf.ico',
'sourceswiki' => '/static/favicon/wikisource.ico',
'spcomwiki' => '/static/favicon/spcom.ico',

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


[MediaWiki-commits] [Gerrit] apps...wikipedia[master]: Localisation updates from https://translatewiki.net.

2016-11-07 Thread Niedzielski (Code Review)
Niedzielski has uploaded a new change for review.

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

Change subject: Localisation updates from https://translatewiki.net.
..

Localisation updates from https://translatewiki.net.

Change-Id: Ideb5d6088ce652f6a61b58c4abdf4920224a3f90
---
M app/src/main/res/values-de/strings.xml
M app/src/main/res/values-fr/strings.xml
A app/src/main/res/values-ksh/strings.xml
M app/src/main/res/values-mk/strings.xml
M app/src/main/res/values-nl/strings.xml
M app/src/main/res/values-qq/strings.xml
M app/src/main/res/values-ru/strings.xml
A app/src/main/res/values-x-invalidLanguageCode/strings.xml
8 files changed, 142 insertions(+), 22 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/97/320297/1

diff --git a/app/src/main/res/values-de/strings.xml 
b/app/src/main/res/values-de/strings.xml
index caebc4a..8004f2d 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -293,11 +293,11 @@
   Beliebt
   Kartensymbol
   In den Nachrichten
-  
-gestern
-vor %d Tagen
+  
+Gestern
+Vor %d Tagen
   
-  heute
+  Heute
   Bearbeiten
   Was ist das?
   Verfasse eine 
Beschreibung!
diff --git a/app/src/main/res/values-fr/strings.xml 
b/app/src/main/res/values-fr/strings.xml
index 81ebe6f..625be35 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -294,11 +294,11 @@
   Tendance
   Icône de la 
carte
   Dans l’actualité
-  
-hier
-il y a %d jours
+  
+Hier
+Il y a %d jours
   
-  aujourd’hui
+  Aujourd’hui
   Modification
   Qu’est-ce que c’est ?
   Écrire une description !
diff --git a/app/src/main/res/values-ksh/strings.xml 
b/app/src/main/res/values-ksh/strings.xml
new file mode 100644
index 000..2b5d411
--- /dev/null
+++ b/app/src/main/res/values-ksh/strings.xml
@@ -0,0 +1 @@
+
diff --git a/app/src/main/res/values-mk/strings.xml 
b/app/src/main/res/values-mk/strings.xml
index 38999b7..d94f92c 100644
--- a/app/src/main/res/values-mk/strings.xml
+++ b/app/src/main/res/values-mk/strings.xml
@@ -293,11 +293,11 @@
   Најчитани
   Икона за 
картичка
   Вести
-  
-вчера
-пред %d дена
+  
+Вчера
+Пред %d дена
   
-  денес
+  Денес
   Уредување
   Што е ова?
   Напишете опис!
diff --git a/app/src/main/res/values-nl/strings.xml 
b/app/src/main/res/values-nl/strings.xml
index 2b16bd7..a59bf8b 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -291,11 +291,11 @@
   Populair
   Kaart-icoon
   Actueel
-  
-gisteren
+  
+Gisteren
 %d dagen geleden
   
-  vandaag
+  Vandaag
   Bezig met bewerken
   Wat is dit?
   Geef een beschrijving op!
diff --git a/app/src/main/res/values-qq/strings.xml 
b/app/src/main/res/values-qq/strings.xml
index f9698c7..f85af89 100644
--- a/app/src/main/res/values-qq/strings.xml
+++ b/app/src/main/res/values-qq/strings.xml
@@ -431,10 +431,7 @@
 {{Identical|Trending}}
   Feed card icon 
description for use when the icon cannot be seen and acessibility.
   Feed card title for news 
articles.
-  Subtitle for a box 
titled \"Continue reading\"; the first word should have an initial uppercase 
letter if appropriate for the language. Example: [[phabricator:F4695814]].
-
-Parameters:
-* %d - number of days passed since the content (an article) was last 
seen.
+  
   Shown on cards in 
the feed when the card has today\'s date.
 {{Identical|Today}}
   Label above the current article title 
indicating that the description for this title is being edited.
diff --git a/app/src/main/res/values-ru/strings.xml 
b/app/src/main/res/values-ru/strings.xml
index c230bc7..e87e47a 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -293,11 +293,11 @@
   В трендах
   Значок 
карточки
   В новостях
-  
-вчера
+  
+Вчера
 %d вчера
   
-  сегодня
+  Сегодня
   Редактирование
   Что это?
   Написать описание!
diff --git a/app/src/main/res/values-x-invalidLanguageCode/strings.xml 
b/app/src/main/res/values-x-invalidLanguageCode/strings.xml
new file mode 100644
index 000..c702c6b
--- /dev/null
+++ b/app/src/main/res/values-x-invalidLanguageCode/strings.xml
@@ -0,0 +1,122 @@
+
+
+  维基百科测试版
+  是
+  否
+  搜索维基百科
+  历史
+  不能连接网络:(
+  重试
+  清除历史记录
+  此页面不存在。
+  清除浏览历史?
+  保存的页面
+  分享到
+  最后更新于%s
+  内容以a 
href=\"//creativecommons.org/licenses/by-sa/3.0/deed.zh\"CC BY-SA 
3.0/a协议提供,另有声明者除外
+  一旦保存,则表示您同意a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"使用条款/a,同时您的贡献采用a
 href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC-BY-SA 
3.0/a协议并且不可撤消
+  一旦保存,则表示您同意a 
href=\"https://wikimediafoundation.org/wiki/Terms_of_Use\"使用条款/a,同时以a
 href=\"https://creativecommons.org/licenses/by-sa/3.0/\"CC-BY-SA 
3.0/a协议不可撤消的发布你的贡献。编辑将归属于您设备的IP地址。如果您a 
href=\"https://#login\"登录/a,您将拥有更多隐私。
+  维基百科语言
+  搜索
+  搜索
+  本页没有其他语言的版本
+  其他语言
+  保存修改
+  重试
+  

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: [search] Don't show the create link twice on results page

2016-11-07 Thread EBernhardson (Code Review)
EBernhardson has uploaded a new change for review.

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

Change subject: [search] Don't show the create link twice on results page
..

[search] Don't show the create link twice on results page

Due to how things flow through the rendering if an offset is provided
and there are no results, SpecialSearch::showCreateLink gets run twice
and the user gets an odd output.

Bug: T149269
Change-Id: Ifed921207f82cc0d1c1cb621a81127486d4dd03e
---
M includes/specials/SpecialSearch.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialSearch.php 
b/includes/specials/SpecialSearch.php
index 6daf19f..9bea35f 100644
--- a/includes/specials/SpecialSearch.php
+++ b/includes/specials/SpecialSearch.php
@@ -422,7 +422,12 @@
$out->addHTML( '' .
$textStatus->getMessage( 'search-error' 
) . '' );
} else {
-   $this->showCreateLink( $title, $num, 
$titleMatches, $textMatches );
+   if ( !$this->offset) {
+   // If we have an offset the create link 
was rendered earlier in this function.
+   // This class needs a good 
de-spaghettification, but for now this will
+   // do the job.
+   $this->showCreateLink( $title, $num, 
$titleMatches, $textMatches );
+   }
$out->wrapWikiMsg( "\n$1",
[ $hasOtherResults ? 
'search-nonefound-thiswiki' : 'search-nonefound',
wfEscapeWikiText( $term 
)

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...VisualEditor[master]: Update VE core submodule to master (88ba26b)

2016-11-07 Thread Jforrester (Code Review)
Jforrester has uploaded a new change for review.

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

Change subject: Update VE core submodule to master (88ba26b)
..

Update VE core submodule to master (88ba26b)

New changes:
e9866f4 Replace reference to current doc with this.newDoc
fa5a575 Add test framework for diffElement
2f6969c Use shallow copy for internal list data inside shallowCloneFromRange
866b2c0 Don't bother testing data on direction key tests
88ba26b Avoid jQuery in PreviewElement and ve.resolveAttributes

Change-Id: I7adb57898fa7cecd6a412183c4ca0726ef1a00ae
---
M lib/ve
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/lib/ve b/lib/ve
index e7c5b56..88ba26b 16
--- a/lib/ve
+++ b/lib/ve
@@ -1 +1 @@
-Subproject commit e7c5b56f465d62a97808a82cd488e10601daecbc
+Subproject commit 88ba26bc463b0f051ec3e9cd3957407f3abac09b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7adb57898fa7cecd6a412183c4ca0726ef1a00ae
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
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] labs...grrrit[master]: Replacing swig with swig-templates

2016-11-07 Thread Paladox (Code Review)
Paladox has uploaded a new change for review.

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

Change subject: Replacing swig with swig-templates
..

Replacing swig with swig-templates

Swig is no longer being maintained and swig-templates is a fork.

Also updating to version 2.0.2.

Change-Id: I8d240e867205d5436078b7993593483a95a4a656
---
M package.json
M src/relay.js
2 files changed, 4 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/tools/grrrit 
refs/changes/94/320294/1

diff --git a/package.json b/package.json
index 6960a24..9d1105b 100644
--- a/package.json
+++ b/package.json
@@ -8,7 +8,7 @@
 "irc-colors": "~1.3.0",
 "js-yaml": "^3.4.2",
 "ssh2": "~0.5.1",
-"swig": "~0.14.0",
+"swig-templates": "~2.0.2",
 "underscore": "~1.8.3",
 "winston": "~2.1.1"
   },
diff --git a/src/relay.js b/src/relay.js
index e14eba1..40dcbe3 100644
--- a/src/relay.js
+++ b/src/relay.js
@@ -27,12 +27,6 @@
 logging.error(message);
 }
 
-swig.init({
-filters: require('./colors.js'),
-autoescape: false,
-root: __dirname
-});
-
 function subscribeToGerritStream(host, port, username, keypath, listener) {
 logging.info('Connecting to gerrit..');
 
@@ -110,7 +104,9 @@
 return channels.filter(function(v, i) { return channels.indexOf(v) === i; 
});
 }
 
-var template = swig.compileFile('template.txt');
+swig.setFilter('colors', require('./colors.js'));
+swig.setDefaults({ autoescape: false });
+var template = swig.compileFile(__dirname + '/template.txt');
 
 var ircClient = new irc.Client(config.server, config.nick, {
 userName: config.userName,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8d240e867205d5436078b7993593483a95a4a656
Gerrit-PatchSet: 1
Gerrit-Project: labs/tools/grrrit
Gerrit-Branch: master
Gerrit-Owner: Paladox 

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


[MediaWiki-commits] [Gerrit] mediawiki...Kartographer[master]: Fixed marker-size simplestyle json schema

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

Change subject: Fixed marker-size simplestyle json schema
..


Fixed marker-size simplestyle json schema

Change-Id: I4c217b903f0d2b01adce0eb93de12dd2fac82c2d
---
M schemas/geojson.json
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/schemas/geojson.json b/schemas/geojson.json
index b8db853..e750152 100644
--- a/schemas/geojson.json
+++ b/schemas/geojson.json
@@ -258,7 +258,7 @@
"properties": {
"title": { "type": "string" },
"description": { "type": "string" },
-   "marker-size": { "type": { "enum": ["small", 
"medium", "large"] } },
+   "marker-size": { "enum": ["small", "medium", 
"large"] },
"marker-symbol": { "type": "string", "pattern": 
"^(|[0-9]|[a-z-]+)$" },
"marker-color": { "$ref": "#/definitions/color" 
},
"stroke": { "$ref": "#/definitions/color" },

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4c217b903f0d2b01adce0eb93de12dd2fac82c2d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Kartographer
Gerrit-Branch: master
Gerrit-Owner: Yurik 
Gerrit-Reviewer: MaxSem 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] mediawiki/vagrant[master]: Stop installing the vbguest plugin

2016-11-07 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Stop installing the vbguest plugin
..

Stop installing the vbguest plugin

The vagrant-vbguest plugin is a great idea that fails to really work
well for us. The vbguest plugin hooks into the VM startup sequence
before local shares are mounted and tries to run apt. This is fine until
the first Puppet run has happened in the VM. Our Puppet code messes
around with the apt cache directroy structure to assist with caching
across VM instance create/destroy cycles. These changes leave the apt
configuration pointing at a /vagrant/cache/apt directory that doesn't
exist except when the local shares are mounted in the VM.

This causes enough problems for people that I have a paste
() to point them to as a quick
fix.

Change-Id: I07bc0e1fbf73d665e439dcdbf1805acf6ecc2746
---
M lib/mediawiki-vagrant/setup.rb
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/77/320277/1

diff --git a/lib/mediawiki-vagrant/setup.rb b/lib/mediawiki-vagrant/setup.rb
index d08ce41..23e0961 100644
--- a/lib/mediawiki-vagrant/setup.rb
+++ b/lib/mediawiki-vagrant/setup.rb
@@ -10,7 +10,7 @@
   # mediawiki-vagrant plugin.
   #
   class Setup
-PLUGINS = ['vagrant-vbguest']
+PLUGINS = []
 
 class ExecutionError < RuntimeError
   attr_reader :command, :status

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07bc0e1fbf73d665e439dcdbf1805acf6ecc2746
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Add minute to crontab for backups to secondary DC

2016-11-07 Thread Madhuvishy (Code Review)
Madhuvishy has uploaded a new change for review.

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

Change subject: labstore: Add minute to crontab for backups to secondary DC
..

labstore: Add minute to crontab for backups to secondary DC

Change-Id: Ib579a16a70e79837aab43bd27fa3e4695bb20273
---
M modules/labstore/manifests/device_backup.pp
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/76/320276/1

diff --git a/modules/labstore/manifests/device_backup.pp 
b/modules/labstore/manifests/device_backup.pp
index 2b61604..d71dcdf 100644
--- a/modules/labstore/manifests/device_backup.pp
+++ b/modules/labstore/manifests/device_backup.pp
@@ -6,6 +6,7 @@
 $localdev,
 $weekday,
 $hour=0,
+$minute=0,
 ) {
 
 include labstore::bdsync
@@ -30,5 +31,6 @@
 command => "${block_sync} ${remote_ip} ${remote_vg} ${remote_lv} 
${remote_snapshot} ${localdev}",
 weekday => $day[$weekday],
 hour=> $hour,
+minute  => $minute,
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] operations/puppet[production]: labstore: Add minute to crontab for backups to secondary DC

2016-11-07 Thread Madhuvishy (Code Review)
Madhuvishy has submitted this change and it was merged.

Change subject: labstore: Add minute to crontab for backups to secondary DC
..


labstore: Add minute to crontab for backups to secondary DC

Change-Id: Ib579a16a70e79837aab43bd27fa3e4695bb20273
---
M modules/labstore/manifests/device_backup.pp
1 file changed, 2 insertions(+), 0 deletions(-)

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



diff --git a/modules/labstore/manifests/device_backup.pp 
b/modules/labstore/manifests/device_backup.pp
index 2b61604..d71dcdf 100644
--- a/modules/labstore/manifests/device_backup.pp
+++ b/modules/labstore/manifests/device_backup.pp
@@ -6,6 +6,7 @@
 $localdev,
 $weekday,
 $hour=0,
+$minute=0,
 ) {
 
 include labstore::bdsync
@@ -30,5 +31,6 @@
 command => "${block_sync} ${remote_ip} ${remote_vg} ${remote_lv} 
${remote_snapshot} ${localdev}",
 weekday => $day[$weekday],
 hour=> $hour,
+minute  => $minute,
 }
 }

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

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

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


[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 4202cbb

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

Change subject: Update mobileapps to 4202cbb
..


Update mobileapps to 4202cbb

List of changes:
36f77a6 Add test for parseInfobox
e7255ef Hygiene: Use native methods in place of underscore offerings; add a test
968b05d Return 204s for empty responses (for RESTBase aggregated requests)
6de4752 Filter most-read pages with <10% or >90% of total views on desktop
2f2677f Extract page issues and promote to a readable data structure
5e2c6b6 Add response definitions to spec for feed endpoints
73a93e2 Add response schema validation
42c3519 Hygiene: Add dateUtil.constructDateString
4202cbb Remove manual blacklist
xxx Update node module dependencies

Change-Id: I8bde6782152b58562fe03f733668f9e0689d6850
---
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/preq/node_modules/request/.travis.yml
M node_modules/preq/node_modules/request/lib/redirect.js
M node_modules/preq/node_modules/request/package.json
M node_modules/preq/node_modules/request/request.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M 
node_modules/service-runner/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/graceful-fs/package.json
M 
node_modules/service-runner/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/graceful-fs/polyfills.js
M 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/code-point-at/index.js
M 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/code-point-at/package.json
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json
M src
17 files changed, 159 insertions(+), 125 deletions(-)

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



diff --git a/node_modules/heapdump/build/Makefile 
b/node_modules/heapdump/build/Makefile
index 285e8ee..c9d9d51 100644
--- a/node_modules/heapdump/build/Makefile
+++ b/node_modules/heapdump/build/Makefile
@@ -308,8 +308,8 @@
 endif
 
 quiet_cmd_regen_makefile = ACTION Regenerating $@
-cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." 
"--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" 
"-Dnode_root_dir=/root/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
-Makefile: 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp 
$(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi
+cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." 
"-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" 
"-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
+Makefile: 
$(srcdir)/../../../../home/runuser/.node-gyp/4.6.0/include/node/common.gypi 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp
$(call do_cmd,regen_makefile)
 
 # "all" is a concatenation of the "all" targets from all the included
diff --git 
a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
 
b/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
index 

[MediaWiki-commits] [Gerrit] mediawiki...deploy[master]: Update mobileapps to 4202cbb

2016-11-07 Thread BearND (Code Review)
BearND has uploaded a new change for review.

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

Change subject: Update mobileapps to 4202cbb
..

Update mobileapps to 4202cbb

List of changes:
36f77a6 Add test for parseInfobox
e7255ef Hygiene: Use native methods in place of underscore offerings; add a test
968b05d Return 204s for empty responses (for RESTBase aggregated requests)
6de4752 Filter most-read pages with <10% or >90% of total views on desktop
2f2677f Extract page issues and promote to a readable data structure
5e2c6b6 Add response definitions to spec for feed endpoints
73a93e2 Add response schema validation
42c3519 Hygiene: Add dateUtil.constructDateString
4202cbb Remove manual blacklist
xxx Update node module dependencies

Change-Id: I8bde6782152b58562fe03f733668f9e0689d6850
---
M node_modules/heapdump/build/Makefile
M 
node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
M node_modules/heapdump/build/addon.target.mk
M node_modules/heapdump/build/config.gypi
M node_modules/preq/node_modules/request/.travis.yml
M node_modules/preq/node_modules/request/lib/redirect.js
M node_modules/preq/node_modules/request/package.json
M node_modules/preq/node_modules/request/request.js
M 
node_modules/service-runner/node_modules/limitation/node_modules/kad/package.json
M 
node_modules/service-runner/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/graceful-fs/package.json
M 
node_modules/service-runner/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/graceful-fs/polyfills.js
M 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/code-point-at/index.js
M 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/code-point-at/package.json
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/index.js
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/license
R 
node_modules/service-runner/node_modules/yargs/node_modules/string-width/node_modules/is-fullwidth-code-point/node_modules/number-is-nan/package.json
M src
17 files changed, 159 insertions(+), 125 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/services/mobileapps/deploy 
refs/changes/75/320275/1

diff --git a/node_modules/heapdump/build/Makefile 
b/node_modules/heapdump/build/Makefile
index 285e8ee..c9d9d51 100644
--- a/node_modules/heapdump/build/Makefile
+++ b/node_modules/heapdump/build/Makefile
@@ -308,8 +308,8 @@
 endif
 
 quiet_cmd_regen_makefile = ACTION Regenerating $@
-cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/root/.node-gyp/4.6.0/include/node/common.gypi "--depth=." "-Goutput_dir=." 
"--generator-output=build" "-Dlibrary=shared_library" "-Dvisibility=default" 
"-Dnode_root_dir=/root/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
-Makefile: 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp 
$(srcdir)/../../../../root/.node-gyp/4.6.0/include/node/common.gypi
+cmd_regen_makefile = cd $(srcdir); 
/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py
 -fmake --ignore-environment "--toplevel-dir=." 
-I/opt/service/node_modules/heapdump/build/config.gypi 
-I/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 -I/home/runuser/.node-gyp/4.6.0/include/node/common.gypi "--depth=." 
"-Goutput_dir=." "--generator-output=build" "-Dlibrary=shared_library" 
"-Dvisibility=default" "-Dnode_root_dir=/home/runuser/.node-gyp/4.6.0" 
"-Dnode_gyp_dir=/usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp"
 "-Dnode_lib_file=node.lib" 
"-Dmodule_root_dir=/opt/service/node_modules/heapdump" binding.gyp
+Makefile: 
$(srcdir)/../../../../home/runuser/.node-gyp/4.6.0/include/node/common.gypi 
$(srcdir)/../../../../usr/local/nvm/versions/node/v4.6.0/lib/node_modules/npm/node_modules/node-gyp/addon.gypi
 $(srcdir)/build/config.gypi $(srcdir)/binding.gyp
$(call do_cmd,regen_makefile)
 
 # "all" is a concatenation of the "all" targets from all the included
diff --git 
a/node_modules/heapdump/build/Release/.deps/Release/obj.target/addon/src/heapdump.o.d
 

[MediaWiki-commits] [Gerrit] mediawiki...BlueSpiceExtensions[master]: InterWikiLinks: fixed edit and delete of interwiki links

2016-11-07 Thread Mglaser (Code Review)
Mglaser has uploaded a new change for review.

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

Change subject: InterWikiLinks: fixed edit and delete of interwiki links
..

InterWikiLinks: fixed edit and delete of interwiki links

Custom IWL could not be edited or deleted, as Interwiki::fetch
always returned null. Now checking directly against the database.

Change-Id: I91c783b6a7e660514c1abe4c303f4a01a6955d45
---
M InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
1 file changed, 26 insertions(+), 4 deletions(-)


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

diff --git a/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php 
b/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
index ef9e5e5..7583d8c 100644
--- a/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
+++ b/InterWikiLinks/includes/api/BSApiTasksInterWikiLinksManager.php
@@ -31,6 +31,7 @@
  */
 class BSApiTasksInterWikiLinksManager extends BSApiTasksBase {
 
+   protected $aIWLexists = array();
/**
 * Methods that can be called by task param
 * @var array
@@ -87,12 +88,12 @@
wfGetMainCache()->delete( $sKey );
}
 
-   if( !empty($sOldPrefix) && !$oPrefix = 
Interwiki::fetch($sOldPrefix) ) {
+   if( !empty($sOldPrefix) && !$this->interWikiLinkExists( 
$sOldPrefix ) ) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-nooldpfx' )->plain(),
);
-   } elseif( !empty($sPrefix) && $oPrefix = 
Interwiki::fetch($sPrefix) && $sPrefix !== $sOldPrefix) {
+   } elseif( !empty($sPrefix) && $this->interWikiLinkExists( 
$sPrefix ) && $sPrefix !== $sOldPrefix) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-pfxexists' )->plain(),
@@ -221,7 +222,7 @@
$oPrefix = null;
 
$sPrefix = isset( $oTaskData->prefix )
-   ? (string) $oTaskData->prefix
+   ? addslashes( $oTaskData->prefix )
: ''
;
 
@@ -238,7 +239,8 @@
$sKey = wfMemcKey( 'interwiki', $sPrefix );
wfGetMainCache()->delete( $sKey );
}
-   if( !$oPrefix = Interwiki::fetch($sPrefix) ) {
+
+   if( !$this->interWikiLinkExists( $sPrefix ) ) {
$oReturn->errors[] = array(
'id' => 'iweditprefix',
'message' => wfMessage( 
'bs-interwikilinks-nooldpfx' )->plain(),
@@ -265,4 +267,24 @@
 
return $oReturn;
}
+
+   protected function interWikiLinkExists( $sPrefix ) {
+   if ( isset( $this->aIWLexists[$sPrefix] ) ) {
+   return $this->aIWLexists[$sPrefix];
+   }
+   $row = $this->getDB()->selectRow(
+   'interwiki',
+   Interwiki::selectFields(),
+   [ 'iw_prefix' => $sPrefix ],
+   __METHOD__
+   );
+
+   if( !$row ) {
+   $this->aIWLexists[$sPrefix] = false;
+   } else {
+   $this->aIWLexists[$sPrefix] = true;
+   }
+
+   return $this->aIWLexists[$sPrefix];
+   }
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I91c783b6a7e660514c1abe4c303f4a01a6955d45
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 

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


  1   2   3   4   >