[MediaWiki-commits] [Gerrit] Add ferm rules for rsync server - change (operations/puppet)

2015-07-29 Thread Muehlenhoff (Code Review)
Muehlenhoff has submitted this change and it was merged.

Change subject: Add ferm rules for rsync server
..


Add ferm rules for rsync server

Change-Id: I7c1dcac372014bf4334e2cade24eace9cd6d5017
---
M modules/rsync/manifests/server.pp
1 file changed, 5 insertions(+), 0 deletions(-)

Approvals:
  Muehlenhoff: Verified; Looks good to me, approved
  Dzahn: Looks good to me, but someone else must approve



diff --git a/modules/rsync/manifests/server.pp 
b/modules/rsync/manifests/server.pp
index 06169d1..65d5d15 100644
--- a/modules/rsync/manifests/server.pp
+++ b/modules/rsync/manifests/server.pp
@@ -63,6 +63,11 @@
 content => template('rsync/header.erb'),
   }
 
+  ferm::service{ 'rsync-server':
+  proto  => 'tcp',
+  port   => 873,
+  }
+
   # perhaps this should be a script
   # this allows you to only have a header and no fragments, which happens
   # by default if you have an rsync::server but not an rsync::repo on a host

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I7c1dcac372014bf4334e2cade24eace9cd6d5017
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Alexandros Kosiaris 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Muehlenhoff 
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] Use parsoid permanent ids for section instead of CX generate... - change (mediawiki...ContentTranslation)

2015-07-29 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Use parsoid permanent ids for section instead of CX generated 
ids
..

Use parsoid permanent ids for section instead of CX generated ids

Also restore drafts (new and old) against correct sections.

The permanent ids generated by parsoid allow us to restore
the saved sections against a source which changed a lot
after the translation was saved.

The changes can be - section edited, section removed,
new section added or even sections moved around.

Needs cxserver patch
Iedbf36ea872bee8149e842751fd7bb05b4b870b1

Includes QUnit tests.

Bug: T102584
Bug: T106424
Change-Id: Icc5dff9ba5cf79c599021f2a633024a257b397fb
(cherry picked from commit f2c8517d59c4eaee0f74589c91a069b9eb4ba5dd)
---
M ContentTranslation.hooks.php
M modules/draft/ext.cx.draft.js
M modules/util/ext.cx.util.js
A tests/qunit/draft/ext.cx.draft.test.js
4 files changed, 185 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/42/227942/1

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 1454ec2..a04494f 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -338,6 +338,15 @@
),
) + $resourcePaths;
 
+   $modules['qunit']['ext.cx.draft.test'] = array(
+   'scripts' => array(
+   'tests/qunit/draft/ext.cx.draft.test.js',
+   ),
+   'dependencies' => array(
+   'ext.cx.draft',
+   ),
+   ) + $resourcePaths;
+
$modules['qunit']['ext.cx.tools.tests'] = array(
'scripts' => array(

'tests/qunit/tools/ext.cx.tools.template.test.js',
diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js
index c628510..9424f13 100644
--- a/modules/draft/ext.cx.draft.js
+++ b/modules/draft/ext.cx.draft.js
@@ -17,7 +17,10 @@
 */
function ContentTranslationDraft( draftId ) {
this.draftId = draftId;
+   this.$draft = null;
this.disabled = false;
+   this.$source = $( '.cx-column--source .cx-column__content' );
+   this.$translation = $( '.cx-column--translation 
.cx-column__content' );
this.init();
this.listen();
}
@@ -41,7 +44,7 @@
ContentTranslationDraft.prototype.getContent = function () {
var $content;
 
-   $content = $( '.cx-column--translation .cx-column__content' 
).clone();
+   $content = this.$translation.clone();
// Remove placeholder sections
$content.find( '.placeholder' ).remove();
// Remove empty sections.
@@ -159,23 +162,104 @@
};
 
/**
+* Add an orphan translation. Orphan translation is a translation 
without
+* source section. We add a dummy source section for such cases. Dummy 
source section
+* is a placeholder - a white block in source column.
+* @param {jQuery} $translation The translation to add.
+* @param {jQuery} $section Add it before/after this section.
+* @param {string} afterOrBefore Whether the orphan to be added after 
or before $section.
+*/
+   function addOrphanTranslation( $translation, $section, afterOrBefore ) {
+   // Add a dummy source section
+   var $dummySourceSection = $( '<' + $translation.prop( 'tagName' 
) + '>' )
+   .css( 'height', 1 ) // Non-zero height to avoid it 
ignored by keepAlignment plugin.
+   .prop( 'id', $translation.data( 'source' ) );
+
+   if ( afterOrBefore === 'after' ) {
+   $( '#' + $section.data( 'source' ) ).after( 
$dummySourceSection );
+   $section.after( $translation );
+   } else {
+   $( '#' + $section.data( 'source' ) ).before( 
$dummySourceSection );
+   $section.before( $translation );
+   }
+   // Annotate the section to indicate it was restored from draft
+   // so that certain adaptations can be skipped.
+   $translation.attr( 'data-cx-draft', true ).keepAlignment();
+   mw.hook( 'mw.cx.translation.postMT' ).fire( $translation );
+   }
+
+   /**
 * Restore this draft to the appropriate placeholders
 */
ContentTranslationDraft.prototype.restore = function () {
-   var i, $draftSection, sectionId, $section;
+   var i, j, $draftSection, sectionId, $section,
+   $placeholderSection, orphans = [],
+   $

[MediaWiki-commits] [Gerrit] Use parsoid permanent ids for section instead of CX generate... - change (mediawiki...ContentTranslation)

2015-07-29 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Use parsoid permanent ids for section instead of CX generated 
ids
..

Use parsoid permanent ids for section instead of CX generated ids

Also restore drafts (new and old) against correct sections.

The permanent ids generated by parsoid allow us to restore
the saved sections against a source which changed a lot
after the translation was saved.

The changes can be - section edited, section removed,
new section added or even sections moved around.

Needs cxserver patch
Iedbf36ea872bee8149e842751fd7bb05b4b870b1

Includes QUnit tests.

Bug: T102584
Bug: T106424
Change-Id: Icc5dff9ba5cf79c599021f2a633024a257b397fb
(cherry picked from commit f2c8517d59c4eaee0f74589c91a069b9eb4ba5dd)
---
M ContentTranslation.hooks.php
M modules/draft/ext.cx.draft.js
M modules/util/ext.cx.util.js
A tests/qunit/draft/ext.cx.draft.test.js
4 files changed, 185 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/ContentTranslation 
refs/changes/43/227943/1

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index f73edd2..5fc5932 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -342,6 +342,15 @@
),
) + $resourcePaths;
 
+   $modules['qunit']['ext.cx.draft.test'] = array(
+   'scripts' => array(
+   'tests/qunit/draft/ext.cx.draft.test.js',
+   ),
+   'dependencies' => array(
+   'ext.cx.draft',
+   ),
+   ) + $resourcePaths;
+
$modules['qunit']['ext.cx.tools.tests'] = array(
'scripts' => array(

'tests/qunit/tools/ext.cx.tools.template.test.js',
diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js
index c628510..9424f13 100644
--- a/modules/draft/ext.cx.draft.js
+++ b/modules/draft/ext.cx.draft.js
@@ -17,7 +17,10 @@
 */
function ContentTranslationDraft( draftId ) {
this.draftId = draftId;
+   this.$draft = null;
this.disabled = false;
+   this.$source = $( '.cx-column--source .cx-column__content' );
+   this.$translation = $( '.cx-column--translation 
.cx-column__content' );
this.init();
this.listen();
}
@@ -41,7 +44,7 @@
ContentTranslationDraft.prototype.getContent = function () {
var $content;
 
-   $content = $( '.cx-column--translation .cx-column__content' 
).clone();
+   $content = this.$translation.clone();
// Remove placeholder sections
$content.find( '.placeholder' ).remove();
// Remove empty sections.
@@ -159,23 +162,104 @@
};
 
/**
+* Add an orphan translation. Orphan translation is a translation 
without
+* source section. We add a dummy source section for such cases. Dummy 
source section
+* is a placeholder - a white block in source column.
+* @param {jQuery} $translation The translation to add.
+* @param {jQuery} $section Add it before/after this section.
+* @param {string} afterOrBefore Whether the orphan to be added after 
or before $section.
+*/
+   function addOrphanTranslation( $translation, $section, afterOrBefore ) {
+   // Add a dummy source section
+   var $dummySourceSection = $( '<' + $translation.prop( 'tagName' 
) + '>' )
+   .css( 'height', 1 ) // Non-zero height to avoid it 
ignored by keepAlignment plugin.
+   .prop( 'id', $translation.data( 'source' ) );
+
+   if ( afterOrBefore === 'after' ) {
+   $( '#' + $section.data( 'source' ) ).after( 
$dummySourceSection );
+   $section.after( $translation );
+   } else {
+   $( '#' + $section.data( 'source' ) ).before( 
$dummySourceSection );
+   $section.before( $translation );
+   }
+   // Annotate the section to indicate it was restored from draft
+   // so that certain adaptations can be skipped.
+   $translation.attr( 'data-cx-draft', true ).keepAlignment();
+   mw.hook( 'mw.cx.translation.postMT' ).fire( $translation );
+   }
+
+   /**
 * Restore this draft to the appropriate placeholders
 */
ContentTranslationDraft.prototype.restore = function () {
-   var i, $draftSection, sectionId, $section;
+   var i, j, $draftSection, sectionId, $section,
+   $placeholderSection, orphans = [],
+   $

[MediaWiki-commits] [Gerrit] Bump Sentry version to match operations/puppet - change (mediawiki/vagrant)

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

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

Change subject: Bump Sentry version to match operations/puppet
..

Bump Sentry version to match operations/puppet

Change-Id: Ibf285cd2683f06f158f25f7abc6bd351b80231ec
---
M puppet/modules/sentry/manifests/init.pp
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant 
refs/changes/41/227941/1

diff --git a/puppet/modules/sentry/manifests/init.pp 
b/puppet/modules/sentry/manifests/init.pp
index 194186e..a10bda5 100644
--- a/puppet/modules/sentry/manifests/init.pp
+++ b/puppet/modules/sentry/manifests/init.pp
@@ -83,7 +83,7 @@
 # Use virtualenv because Sentry has lots of dependencies
 virtualenv::environment { $deploy_dir:
 ensure   => present,
-packages => ['sentry[mysql]==7.6.2', 'raven'],
+packages => ['sentry[mysql]==7.7.0', 'raven'],
 require  => Package['libmysqlclient-dev'],
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf285cd2683f06f158f25f7abc6bd351b80231ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/vagrant
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] Corrections for draft restore based on permanent ids - change (mediawiki...ContentTranslation)

2015-07-29 Thread Santhosh (Code Review)
Santhosh has uploaded a new change for review.

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

Change subject: Corrections for draft restore based on permanent ids
..

Corrections for draft restore based on permanent ids

* The translation column may not be ready when draft module initilize
  this.$translation because draft module is loaded in parallel with source.
  This can cause, incorrect draft restore. Fixed that.

* Update the data-source attributes correctly in draft restore
  Icc5dff9ba5cf79c599021f2a633024a257b397fb missed to update the data-source
  attributes when sections are restored. This causes progress calculation
  going wrong.

* Updated the tests accordingly

Change-Id: I6406e43cbfef1c83f6f0de7b6fe9874a20f43d60
---
M modules/draft/ext.cx.draft.js
M tests/qunit/draft/ext.cx.draft.test.js
2 files changed, 52 insertions(+), 29 deletions(-)


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

diff --git a/modules/draft/ext.cx.draft.js b/modules/draft/ext.cx.draft.js
index 9424f13..f5881fd 100644
--- a/modules/draft/ext.cx.draft.js
+++ b/modules/draft/ext.cx.draft.js
@@ -19,8 +19,8 @@
this.draftId = draftId;
this.$draft = null;
this.disabled = false;
-   this.$source = $( '.cx-column--source .cx-column__content' );
-   this.$translation = $( '.cx-column--translation 
.cx-column__content' );
+   this.$source = null;
+   this.$translation = null;
this.init();
this.listen();
}
@@ -44,6 +44,9 @@
ContentTranslationDraft.prototype.getContent = function () {
var $content;
 
+   if ( !this.$translation.length ) {
+   this.$translation = $( '.cx-column--translation 
.cx-column__content' );
+   }
$content = this.$translation.clone();
// Remove placeholder sections
$content.find( '.placeholder' ).remove();
@@ -169,11 +172,11 @@
 * @param {jQuery} $section Add it before/after this section.
 * @param {string} afterOrBefore Whether the orphan to be added after 
or before $section.
 */
-   function addOrphanTranslation( $translation, $section, afterOrBefore ) {
+   ContentTranslationDraft.prototype.addOrphanTranslation = function ( 
$translation, $section, afterOrBefore ) {
// Add a dummy source section
var $dummySourceSection = $( '<' + $translation.prop( 'tagName' 
) + '>' )
.css( 'height', 1 ) // Non-zero height to avoid it 
ignored by keepAlignment plugin.
-   .prop( 'id', $translation.data( 'source' ) );
+   .attr( 'id', $translation.data( 'source' ) );
 
if ( afterOrBefore === 'after' ) {
$( '#' + $section.data( 'source' ) ).after( 
$dummySourceSection );
@@ -184,26 +187,39 @@
}
// Annotate the section to indicate it was restored from draft
// so that certain adaptations can be skipped.
-   $translation.attr( 'data-cx-draft', true ).keepAlignment();
+   $translation.attr( {
+   'data-cx-draft': true,
+   'data-source': $dummySourceSection.prop( 'id' )
+   } ).keepAlignment();
mw.hook( 'mw.cx.translation.postMT' ).fire( $translation );
-   }
+   };
 
/**
 * Restore this draft to the appropriate placeholders
 */
ContentTranslationDraft.prototype.restore = function () {
-   var i, j, $draftSection, sectionId, $section,
+   var i, j, $draftSection, sectionId, $section, $sourceSection,
$placeholderSection, orphans = [],
$lastPlaceholder;
 
+   // We cannot populate this early because this ext.cx.draft 
modules may be loaded before
+   // source and target is ready.
+   if ( !this.$source.length ) {
+   this.$source = $( '.cx-column--source 
.cx-column__content' );
+   }
+   if ( !this.$translation.length ) {
+   this.$translation = $( '.cx-column--translation 
.cx-column__content' );
+   }
for ( i = 0; i < this.$draft.length; i++ ) {
$draftSection = $( this.$draft[ i ] );
sectionId = $draftSection.prop( 'id' );
$placeholderSection = this.$translation.find( '#' + 
sectionId );
+   $sourceSection = this.$source.find( '#' + 
$placeholderSection.data( 'source' ) );
if ( !$placeholderSection.length ) {
// Support old sections with sequential 
idendifiers
+ 

[MediaWiki-commits] [Gerrit] Basic script to run cirrus queries in bulk - change (mediawiki...CirrusSearch)

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

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

Change subject: Basic script to run cirrus queries in bulk
..

Basic script to run cirrus queries in bulk

script takes a stream of queries on stdin and issues them via the \CirrusSearch
object. Reports the query and number of results to stdout as a json object per
line. Can override global variables by passing a json object as a cli
parameter.

Change-Id: Id92168c03b6310fb4ad6bb77f28dd9ee90f184ea
---
M autoload.php
A includes/Maintenance/StreamingForkController.php
A maintenance/runSearch.php
3 files changed, 228 insertions(+), 0 deletions(-)


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

diff --git a/autoload.php b/autoload.php
index 87954b0..99e6b28 100644
--- a/autoload.php
+++ b/autoload.php
@@ -47,6 +47,8 @@
'CirrusSearch\\Maintenance\\MappingConfigBuilder' => __DIR__ . 
'/includes/Maintenance/MappingConfigBuilder.php',
'CirrusSearch\\Maintenance\\ReindexForkController' => __DIR__ . 
'/includes/Maintenance/ReindexForkController.php',
'CirrusSearch\\Maintenance\\Reindexer' => __DIR__ . 
'/includes/Maintenance/Reindexer.php',
+   'CirrusSearch\\Maintenance\\RunSearch' => __DIR__ . 
'/maintenance/runSearch.php',
+   'CirrusSearch\\Maintenance\\StreamingForkController' => __DIR__ . 
'/includes/Maintenance/StreamingForkController.php',
'CirrusSearch\\Maintenance\\UpdateOneSearchIndexConfig' => __DIR__ . 
'/maintenance/updateOneSearchIndexConfig.php',
'CirrusSearch\\Maintenance\\UpdateSearchIndexConfig' => __DIR__ . 
'/maintenance/updateSearchIndexConfig.php',
'CirrusSearch\\Maintenance\\UpdateVersionIndex' => __DIR__ . 
'/maintenance/updateVersionIndex.php',
diff --git a/includes/Maintenance/StreamingForkController.php 
b/includes/Maintenance/StreamingForkController.php
new file mode 100644
index 000..397f596
--- /dev/null
+++ b/includes/Maintenance/StreamingForkController.php
@@ -0,0 +1,99 @@
+workCallback = $workCallback;
+   $this->input = $input;
+   $this->output = $output;
+   }
+
+   public function start() {
+   $status = parent::start();
+   if ( $status === 'child' ) {
+   $this->consume();
+   }
+   }
+
+   protected function forkWorkers( $numProcs ) {
+   $this->prepareEnvironment();
+
+   // Create the child processes
+   for ( $i = 0; $i < $numProcs; $i++ ) {
+   $sockets = stream_socket_pair( STREAM_PF_UNIX, 
STREAM_SOCK_STREAM, STREAM_IPPROTO_IP );
+   // Do the fork
+   $pid = pcntl_fork();
+   if ( $pid === -1 || $pid === false ) {
+   echo "Error creating child processes\n";
+   exit( 1 );
+   }
+
+   if ( !$pid ) {
+   $this->initChild();
+   $this->childNumber = $i;
+   $this->socket = $sockets[0];
+   fclose( $sockets[1] );
+   return 'child';
+   } else {
+   // This is the parent process
+   $this->children[$pid] = true;
+   fclose( $sockets[0] );
+   $childSockets[$i] = $sockets[1];
+   }
+   }
+   $this->feedChildren( $childSockets );
+   foreach ( $childSockets as $socket ) {
+   fclose( $socket );
+   }
+   return 'parent';
+   }
+
+   protected function consume() {
+   while ( !feof( $this->socket ) ) {
+   $line = trim( fgets( $this->socket ) );
+   if ( $line ) {
+   $result = call_user_func( $this->workCallback, 
$line );
+   fwrite( $this->socket, $result . "\n" );
+   }
+   }
+   }
+
+   protected function feedChildren( array $sockets ) {
+   $used = array();
+   while ( !feof( $this->input ) ) {
+   $query = fgets( $this->input );
+   if ( !trim( $query ) ) {
+   continue;
+   }
+   if ( $used ) {
+   do {
+   $this->updateAvailableSockets( 
$sockets, $used, $sockets ? 0 : 5 );
+   } while( !$sockets );
+   }
+   $socket = array_pop( $sockets );
+   fputs( $socket, $query );
+ 

[MediaWiki-commits] [Gerrit] Make the files relocatable - change (operations...sentry)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Make the files relocatable
..


Make the files relocatable

The new plan is to install the package via simple git clone instead
of trebuchet so we cannot rely on them having a static location.

Changes done via virtualenv --relocatable

Change-Id: I6c9fe14358efd5ab0603983282f46abab6929f65
---
M README.md
M bin/django-admin.py
M bin/easy_install
M bin/easy_install-2.7
M bin/gunicorn
M bin/gunicorn_django
M bin/gunicorn_paster
M bin/markdown_py
M bin/ndg_httpclient
M bin/pip
M bin/pip2
M bin/pip2.7
M bin/raven
M bin/sentry
14 files changed, 68 insertions(+), 27 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/README.md b/README.md
index be9d39a..824e1a6 100644
--- a/README.md
+++ b/README.md
@@ -9,7 +9,9 @@
 5. Go to that folder and run "virtualenv --system-site-packages sentry" to 
create the venv
 6. Run "source sentry/bin/activate" to activate the venv
 7. Run "pip install sentry[postgres]" to install the latest version of Sentry 
and its dependencies into the venv with postgres support
-8. Set up git-review in the /srv/deployment/sentry/sentry folder and commit 
the changes to this repository
+8. Run "virtualenv --relocatable sentry" to rewrite the file references to 
relative
+9. Copy the extra files from the repo (TODO: these should probably be in a 
separate project or branch): README.md list-debian-packages.py 
requirements_list.py requirements_map.py
+10. Set up git-review in the /srv/deployment/sentry/sentry folder and commit 
the changes to this repository
 
 ### System dependencies ###
 
diff --git a/bin/django-admin.py b/bin/django-admin.py
index 217ce90..6a34f11 100755
--- a/bin/django-admin.py
+++ b/bin/django-admin.py
@@ -1,5 +1,8 @@
-#!/srv/deployment/sentry/sentry/bin/python2
+#!/usr/bin/env python2.7
+
+import os; 
activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 
'exec'), dict(__file__=activate_this)); del os, activate_this
+
 from django.core import management
 
 if __name__ == "__main__":
-management.execute_from_command_line()
+management.execute_from_command_line()
\ No newline at end of file
diff --git a/bin/easy_install b/bin/easy_install
index 3a5bae9..e502506 100755
--- a/bin/easy_install
+++ b/bin/easy_install
@@ -1,4 +1,7 @@
-#!/srv/deployment/sentry/sentry/bin/python2
+#!/usr/bin/env python2.7
+
+import os; 
activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 
'exec'), dict(__file__=activate_this)); del os, activate_this
+
 
 # -*- coding: utf-8 -*-
 import re
@@ -8,4 +11,4 @@
 
 if __name__ == '__main__':
 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
-sys.exit(main())
+sys.exit(main())
\ No newline at end of file
diff --git a/bin/easy_install-2.7 b/bin/easy_install-2.7
index 3a5bae9..e502506 100755
--- a/bin/easy_install-2.7
+++ b/bin/easy_install-2.7
@@ -1,4 +1,7 @@
-#!/srv/deployment/sentry/sentry/bin/python2
+#!/usr/bin/env python2.7
+
+import os; 
activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 
'exec'), dict(__file__=activate_this)); del os, activate_this
+
 
 # -*- coding: utf-8 -*-
 import re
@@ -8,4 +11,4 @@
 
 if __name__ == '__main__':
 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
-sys.exit(main())
+sys.exit(main())
\ No newline at end of file
diff --git a/bin/gunicorn b/bin/gunicorn
index 563d50b..98a9f51 100755
--- a/bin/gunicorn
+++ b/bin/gunicorn
@@ -1,4 +1,7 @@
-#!/srv/deployment/sentry/sentry/bin/python2
+#!/usr/bin/env python2.7
+
+import os; 
activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 
'exec'), dict(__file__=activate_this)); del os, activate_this
+
 
 # -*- coding: utf-8 -*-
 import re
@@ -8,4 +11,4 @@
 
 if __name__ == '__main__':
 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
-sys.exit(run())
+sys.exit(run())
\ No newline at end of file
diff --git a/bin/gunicorn_django b/bin/gunicorn_django
index bf29968..07ccec3 100755
--- a/bin/gunicorn_django
+++ b/bin/gunicorn_django
@@ -1,4 +1,7 @@
-#!/srv/deployment/sentry/sentry/bin/python2
+#!/usr/bin/env python2.7
+
+import os; 
activate_this=os.path.join(os.path.dirname(os.path.realpath(__file__)), 
'activate_this.py'); exec(compile(open(activate_this).read(), activate_this, 
'exec'), dict(__file__=activate_this)); del os, activate_this
+
 
 # -*- coding: utf-8 -*-
 import re
@@ -8,4 +11,4 @@
 
 if __name__ == '__main__':
 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
-sys.exit(run())
+sys.exit(run())

[MediaWiki-commits] [Gerrit] Version update: 7.6.2 -> 7.7.0 - change (operations...sentry)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Version update: 7.6.2 -> 7.7.0
..


Version update: 7.6.2 -> 7.7.0

The sentry maintainers suggested this might solve / make easier to
debug a problem with Sentry caching.

Change-Id: I7a0ce9e087dee1b95f916288785470b1423f5435
---
M README.md
M bin/sentry
A include/python2.7
M lib/python2.7/site-packages/_cffi_backend.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_26cb75b8x62b488b1.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_590da19fxffc7b1ce.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so
M lib/python2.7/site-packages/lxml/etree.so
M lib/python2.7/site-packages/lxml/objectify.so
R lib/python2.7/site-packages/raven-5.5.0.dist-info/DESCRIPTION.rst
R lib/python2.7/site-packages/raven-5.5.0.dist-info/METADATA
R lib/python2.7/site-packages/raven-5.5.0.dist-info/RECORD
R lib/python2.7/site-packages/raven-5.5.0.dist-info/WHEEL
R lib/python2.7/site-packages/raven-5.5.0.dist-info/entry_points.txt
R lib/python2.7/site-packages/raven-5.5.0.dist-info/metadata.json
R lib/python2.7/site-packages/raven-5.5.0.dist-info/top_level.txt
M lib/python2.7/site-packages/raven/base.py
M lib/python2.7/site-packages/raven/conf/defaults.py
M lib/python2.7/site-packages/raven/contrib/django/models.py
M lib/python2.7/site-packages/raven/contrib/flask.py
M lib/python2.7/site-packages/raven/contrib/zope/component.xml
M lib/python2.7/site-packages/raven/handlers/logging.py
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/PKG-INFO
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/SOURCES.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/dependency_links.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/entry_points.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/installed-files.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/not-zip-safe
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/requires.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/top_level.txt
M lib/python2.7/site-packages/sentry/api/authentication.py
M lib/python2.7/site-packages/sentry/api/base.py
M lib/python2.7/site-packages/sentry/api/bases/group.py
M lib/python2.7/site-packages/sentry/api/client.py
M lib/python2.7/site-packages/sentry/api/endpoints/catchall.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_events_latest.py
A lib/python2.7/site-packages/sentry/api/endpoints/group_index.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_tagkey_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_tags.py
M 
lib/python2.7/site-packages/sentry/api/endpoints/organization_access_request_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/organization_details.py
M 
lib/python2.7/site-packages/sentry/api/endpoints/organization_member_team_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/organization_teams.py
M lib/python2.7/site-packages/sentry/api/endpoints/project_group_index.py
M lib/python2.7/site-packages/sentry/api/endpoints/project_releases.py
A lib/python2.7/site-packages/sentry/api/endpoints/project_search_details.py
A lib/python2.7/site-packages/sentry/api/endpoints/project_searches.py
M lib/python2.7/site-packages/sentry/api/permissions.py
M lib/python2.7/site-packages/sentry/api/serializers/base.py
M lib/python2.7/site-packages/sentry/api/serializers/models/group.py
M lib/python2.7/site-packages/sentry/api/serializers/models/grouptagvalue.py
M lib/python2.7/site-packages/sentry/api/serializers/models/release.py
A lib/python2.7/site-packages/sentry/api/serializers/models/savedsearch.py
M lib/python2.7/site-packages/sentry/api/urls.py
M lib/python2.7/site-packages/sentry/api/views/help_base.py
M lib/python2.7/site-packages/sentry/app.py
M lib/python2.7/site-packages/sentry/auth/helper.py
M lib/python2.7/site-packages/sentry/auth/providers/oauth2.py
M lib/python2.7/site-packages/sentry/auth/view.py
M lib/python2.7/site-packages/sentry/buffer/base.py
M lib/python2.7/site-packages/sentry/buffer/redis.py
M lib/python2.7/site-packages/sentry/conf/server.py
M lib/python2.7/site-packages/sentry/conf/urls.py
M lib/python2.7/site-packages/sentry/constants.py
M lib/python2.7/site-packages/sentry/coreapi.py
M lib/python2.7/site-packages/sentry/db/models/query.py
M lib/python2.7/site-packages/sentry/db/postgres/base.py
M lib/python2.7/site-packages/sentry/db/postgres/helpers.py
M lib/python2.7/site-packages/sentry/event_manager.py
M lib/python2.7/site-packages/sentry/exceptions.py
M lib/python2.7/site-packages/sentry/http.py
M lib/python2.7/site-packages/sentry/interfaces/stacktrace.py
M lib/python2.7/site-packages/sentry/lang/javascript/processor.py
M lib/python2.7/site-packages/sentry/lang/javascript/sourcemaps.py
A lib/python2.7/site-packages/sentry/

[MediaWiki-commits] [Gerrit] Update cxserver to 92cdf4c - change (mediawiki...deploy)

2015-07-29 Thread KartikMistry (Code Review)
KartikMistry has uploaded a new change for review.

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

Change subject: Update cxserver to 92cdf4c
..

Update cxserver to 92cdf4c

Changes:
* 92cdf4c Reuse the element identifiers given by RESTBase
*   9669e19 Merge "Enhance /list api"
|\
| * 1b69e55 Enhance /list api
* |   50d5284 Merge "config: Update config to sync with Production"
|\ \
| * | 27204a7 config: Update config to sync with Production
| |/
* |   1174cbc Merge "Validate authorization header if required"
|\ \
| * | fdb3ed8 Validate authorization header if required
* | | 30b01e1 Set loglevel to debug for annotation mapping errors
| |/
|/|
* | 7261c73 config: Remove closed/read-only wikis from selector

Change-Id: I7645f7bfb3785ce4be99cbe75d10b67d65d7d2c6
---
M src
1 file changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/cxserver/deploy 
refs/changes/38/227938/1

diff --git a/src b/src
index 9e3f1c8..92cdf4c 16
--- a/src
+++ b/src
-Subproject commit 9e3f1c86b33b3f1d060c47636d1663c58f38a2d4
+Subproject commit 92cdf4ccaf1b4a21afe9d6675c4549187924f707

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7645f7bfb3785ce4be99cbe75d10b67d65d7d2c6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/services/cxserver/deploy
Gerrit-Branch: master
Gerrit-Owner: KartikMistry 

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


[MediaWiki-commits] [Gerrit] Update domino to 1.0.19. - change (mediawiki...deploy)

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

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

Change subject: Update domino to 1.0.19.
..

Update domino to 1.0.19.

This provides some fixes to the TreeWalker interface which are needed
for the new mwparserfromhell-like JsApi.

Change-Id: Ie1de26734b00712237adebf55e16c50d1ccea5ec
---
M node_modules/domino/.travis.yml
M node_modules/domino/CHANGELOG.md
M node_modules/domino/lib/Document.js
A node_modules/domino/lib/NodeIterator.js
A node_modules/domino/lib/NodeTraversal.js
M node_modules/domino/lib/TreeWalker.js
M node_modules/domino/package.json
M node_modules/domino/test/domino.js
M node_modules/domino/test/fixture/doc.html
9 files changed, 325 insertions(+), 81 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/services/parsoid/deploy 
refs/changes/37/227937/1

diff --git a/node_modules/domino/.travis.yml b/node_modules/domino/.travis.yml
index f238dc5..df42fb2 100644
--- a/node_modules/domino/.travis.yml
+++ b/node_modules/domino/.travis.yml
@@ -4,3 +4,4 @@
   - 0.10
   - 0.11
 script: npm run test-spec
+sudo: false
diff --git a/node_modules/domino/CHANGELOG.md b/node_modules/domino/CHANGELOG.md
index 74fc313..cc944b6 100644
--- a/node_modules/domino/CHANGELOG.md
+++ b/node_modules/domino/CHANGELOG.md
@@ -1,3 +1,9 @@
+# domino 1.0.19 (29 Jul 2015)
+* Bug fixes for `TreeWalker` / `document.createTreeWalker` (filter
+  argument was ignored; various traversal issues)
+* Implement `NodeIterator` / `document.createNodeIterator` (#54)
+* Update `mocha` dependency to 2.2.x and `should` to 7.0.x.
+
 # domino 1.0.18 (25 Sep 2014)
 * HTMLAnchorElement now implements URLUtils. (#47)
 * Be consistent with our handling of null/empty namespaces. (#48)
diff --git a/node_modules/domino/lib/Document.js 
b/node_modules/domino/lib/Document.js
index 3dd15cf..16d1246 100644
--- a/node_modules/domino/lib/Document.js
+++ b/node_modules/domino/lib/Document.js
@@ -11,6 +11,7 @@
 var DOMImplementation = require('./DOMImplementation');
 var FilteredElementList = require('./FilteredElementList');
 var TreeWalker = require('./TreeWalker');
+var NodeIterator = require('./NodeIterator');
 var NodeFilter = require('./NodeFilter');
 var URL = require('./URL');
 var select = require('./select')
@@ -184,9 +185,10 @@
   createTreeWalker: {value: function (root, whatToShow, filter) {
 whatToShow = whatToShow === undefined ? NodeFilter.SHOW_ALL : whatToShow;
 
-if (filter && typeof filter.acceptNode == 'function') {
-  filter = filter.acceptNode;
-  // Support filter being a function
+if (filter && typeof filter === 'object' &&
+   typeof filter.acceptNode == 'function') {
+  filter = filter.acceptNode.bind(filter);
+   // Support filter being a function
   // https://developer.mozilla.org/en-US/docs/DOM/document.createTreeWalker
 }
 else if (typeof filter != 'function') {
@@ -195,6 +197,22 @@
 return new TreeWalker(root, whatToShow, filter);
   }},
 
+  // See: http://www.w3.org/TR/dom/#dom-document-createnodeiterator
+  createNodeIterator: {value: function (root, whatToShow, filter) {
+whatToShow = whatToShow === undefined ? NodeFilter.SHOW_ALL : whatToShow;
+
+if (filter && typeof filter === 'object' &&
+   typeof filter.acceptNode == 'function') {
+  filter = filter.acceptNode.bind(filter);
+  // Support filter being a function
+  // 
https://developer.mozilla.org/en-US/docs/DOM/document.createNodeIterator
+}
+else if (typeof filter != 'function') {
+  filter = null;
+}
+return new NodeIterator(root, whatToShow, filter);
+  }},
+
   // Add some (surprisingly complex) document hierarchy validity
   // checks when adding, removing and replacing nodes into a
   // document object, and also maintain the documentElement and
diff --git a/node_modules/domino/lib/NodeIterator.js 
b/node_modules/domino/lib/NodeIterator.js
new file mode 100644
index 000..11892ba
--- /dev/null
+++ b/node_modules/domino/lib/NodeIterator.js
@@ -0,0 +1,144 @@
+module.exports = NodeIterator;
+
+var NodeFilter = require('./NodeFilter');
+var NodeTraversal = require('./NodeTraversal');
+
+/* Private methods and helpers */
+
+/**
+ * @based on WebKit's NodeIterator::moveToNext and NodeIterator::moveToPrevious
+ * 
https://trac.webkit.org/browser/trunk/Source/WebCore/dom/NodeIterator.cpp?rev=186279#L51
+ */
+function move(node, stayWithin, directionIsNext) {
+  if (directionIsNext) {
+return NodeTraversal.next(node, stayWithin);
+  } else {
+if (node === stayWithin) {
+  return null;
+}
+return NodeTraversal.previous(node, null);
+  }
+}
+
+/**
+ * @spec http://www.w3.org/TR/dom/#concept-nodeiterator-traverse
+ * @method
+ * @access private
+ * @param {NodeIterator} ni
+ * @param {string} direction One of 'next' or 'previous'.
+ * @return {Node|null}
+ */
+function traverse(ni, directionIsNext) {
+  var node, beforeN

[MediaWiki-commits] [Gerrit] Fix crash in ContentTranslationHooks::onSaveOptions() - change (mediawiki...ContentTranslation)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Fix crash in ContentTranslationHooks::onSaveOptions()
..

Fix crash in ContentTranslationHooks::onSaveOptions()

It is not safe to chain $wgOut->getTitle()->isSpecial(), because
OutputPage::getTitle() can return null, and the code will crash.
This has occurred in production. Fix it by checking that $title is truthy.

While I'm here, clarify the flow of control by rephrasing some of the
conditionals.

Change-Id: I81b1d021d3cb5fe585c99b29192fd399bf841189
---
M ContentTranslation.hooks.php
1 file changed, 22 insertions(+), 13 deletions(-)


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

diff --git a/ContentTranslation.hooks.php b/ContentTranslation.hooks.php
index 5fc5932..dc7db2e 100644
--- a/ContentTranslation.hooks.php
+++ b/ContentTranslation.hooks.php
@@ -216,21 +216,30 @@
public static function onSaveOptions( $user, &$saveOptions ) {
$out = RequestContext::getMain()->getOutput();
 
-   if (
-   isset( $saveOptions['cx'] ) &&
-   $saveOptions['cx'] === '1' &&
-   !isset( $saveOptions['cx-know'] ) &&
-   !$out->getTitle()->isSpecial( 'ContentTranslation' )
-   ) {
-   $out->addModules(
-   array( 'ext.cx.betafeature.init', 
'ext.cx.campaigns.contributionsmenu' )
-   );
-
-   // This make sure the auto-open contribution menu shown 
exactly once.
-   // and it is not in Special:CX
-   $saveOptions['cx-know'] = true;
+   if ( !isset( $saveOptions['cx'] ) || $saveOptions['cx'] !== 1 ) 
{
+   // Not using ContentTranslation; bail.
+   return true;
}
 
+   if ( isset( $saveOptions['cx-know'] ) ) {
+   // The auto-open contribution menu has already been 
shown; bail.
+   return true;
+   }
+
+   $title = $out->getTitle();
+   if ( $title && $title->isSpecial( 'ContentTranslation' ) ) {
+   // Don't show the menu on Special:ContentTranslation.
+   return true;
+   }
+
+   // Show the auto-open contribution menu and set the cx-know 
preference
+   // as true to prevent it from being automatically shown in the 
future.
+   $out->addModules( array(
+   'ext.cx.betafeature.init',
+   'ext.cx.campaigns.contributionsmenu',
+   ) );
+   $saveOptions['cx-know'] = true;
+
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I81b1d021d3cb5fe585c99b29192fd399bf841189
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/ContentTranslation
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] HHVM: Limit wall execution time of FCGI reqs to 145s - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: HHVM: Limit wall execution time of FCGI reqs to 145s
..


HHVM: Limit wall execution time of FCGI reqs to 145s

Follow-up for I1fa012ca1.

Change-Id: Ia5a30b7a03c9232dc5041935b13960c353116b29
---
M modules/hhvm/manifests/init.pp
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp
index fdf1673..809c260 100644
--- a/modules/hhvm/manifests/init.pp
+++ b/modules/hhvm/manifests/init.pp
@@ -142,7 +142,8 @@
 # Specify a maximum execution time of 290 wall-clock seconds.
 # This is scandalously high, but we must wean ourselves from
 # bad habits in stages. -- Ori, 24-Apr-2015.
-$max_execution_time = 290
+# Halved to 145. -- Ori, 29-Jul-2015
+$max_execution_time = 145
 
 $fcgi_defaults = {
 memory_limit   => '500M',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia5a30b7a03c9232dc5041935b13960c353116b29
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Ignore files when exporting package - change (WrappedString)

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

Change subject: Ignore files when exporting package
..


Ignore files when exporting package

Add a .gitattributes file including instructions to exclude various files
from `git archive` output. The zip files created by GitHub that are used
by Composer to install stable versions will honor these directives. By
removing files that are not strictly needed at runtime we can minimize
the footprint of the installed plugin for the typical user.

Change-Id: Ieb81d8a840495121605f789c55787da9d4a0c2d7
---
A .gitattributes
1 file changed, 11 insertions(+), 0 deletions(-)

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



diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..c6971e7
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,11 @@
+.editorconfig export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.gitreview export-ignore
+.jshintrc export-ignore
+.travis.yml export-ignore
+Doxyfile export-ignore
+composer.json export-ignore
+phpcs.xml export-ignore
+phpunit.xml.dist export-ignore
+tests/ export-ignore

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ieb81d8a840495121605f789c55787da9d4a0c2d7
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use PSR-4 autoloader - change (WrappedString)

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

Change subject: Use PSR-4 autoloader
..


Use PSR-4 autoloader

The classes in the library are named in compliance with PSR-4 so there
is no good reason not to configure a PSR-4 autoloader. Also configure
a separate development autoloader as suggested in the Composer docs
().

Change-Id: I4e81772739943291f4c688989c3c3e395b0b56b1
---
M composer.json
1 file changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/composer.json b/composer.json
index 7e9319d..eb76770 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,14 @@
}
],
"autoload": {
-   "classmap": ["src/"]
+   "psr-4": {
+   "WrappedString\\": "src/"
+   }
+   },
+   "autoload-dev": {
+   "psr-4": {
+   "WrappedString\\Test\\": "tests/"
+   }
},
"require": {
"php": ">=5.3.3"

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4e81772739943291f4c688989c3c3e395b0b56b1
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: Legoktm 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Use PSR-4 autoloader - change (WrappedString)

2015-07-29 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Use PSR-4 autoloader
..

Use PSR-4 autoloader

The classes in the library are named in compliance with PSR-4 so there
is no good reason not to configure a PSR-4 autoloader. Also configure
a separate development autoloader as suggested in the Composer docs
().

Change-Id: I4e81772739943291f4c688989c3c3e395b0b56b1
---
M composer.json
1 file changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/WrappedString 
refs/changes/34/227934/1

diff --git a/composer.json b/composer.json
index 7e9319d..eb76770 100644
--- a/composer.json
+++ b/composer.json
@@ -10,7 +10,14 @@
}
],
"autoload": {
-   "classmap": ["src/"]
+   "psr-4": {
+   "WrappedString\\": "src/"
+   }
+   },
+   "autoload-dev": {
+   "psr-4": {
+   "WrappedString\\Test\\": "tests/"
+   }
},
"require": {
"php": ">=5.3.3"

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4e81772739943291f4c688989c3c3e395b0b56b1
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
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] Ignore files when exporting package - change (WrappedString)

2015-07-29 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Ignore files when exporting package
..

Ignore files when exporting package

Add a .gitattributes file including instructions to exclude various files
from `git archive` output. The zip files created by GitHub that are used
by Composer to install stable versions will honor these directives. By
removing files that are not strictly needed at runtime we can minimize
the footprint of the installed plugin for the typical user.

Change-Id: Ieb81d8a840495121605f789c55787da9d4a0c2d7
---
A .gitattributes
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/WrappedString 
refs/changes/35/227935/1

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000..c6971e7
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,11 @@
+.editorconfig export-ignore
+.gitattributes export-ignore
+.gitignore export-ignore
+.gitreview export-ignore
+.jshintrc export-ignore
+.travis.yml export-ignore
+Doxyfile export-ignore
+composer.json export-ignore
+phpcs.xml export-ignore
+phpunit.xml.dist export-ignore
+tests/ export-ignore

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb81d8a840495121605f789c55787da9d4a0c2d7
Gerrit-PatchSet: 1
Gerrit-Project: WrappedString
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] Fix many space-related phpcs warnings in client and lib - change (mediawiki...Wikibase)

2015-07-29 Thread Ricordisamoa (Code Review)
Ricordisamoa has uploaded a new change for review.

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

Change subject: Fix many space-related phpcs warnings in client and lib
..

Fix many space-related phpcs warnings in client and lib

Change-Id: Ibd60c63b8f6beed7ba74b63fd1b1f52289ab08b3
---
M 
client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
M client/includes/InterwikiSorter.php
M client/includes/LangLinkHandler.php
M client/includes/SiteLinkCommentCreator.php
M client/includes/recentchanges/ExternalChangeFactory.php
M client/maintenance/populateInterwiki.php
M 
client/tests/phpunit/includes/DataAccess/WikibaseDataAccessTestItemSetUpHelper.php
M lib/includes/Localizer/DispatchingExceptionLocalizer.php
M lib/includes/TermIndexEntry.php
M lib/includes/formatters/OutputFormatSnakFormatterFactory.php
M lib/includes/formatters/OutputFormatValueFormatterFactory.php
M lib/includes/formatters/WikibaseValueFormatterBuilders.php
M lib/includes/parsers/MWTimeIsoParser.php
M lib/includes/parsers/YearMonthTimeParser.php
M lib/includes/parsers/YearTimeParser.php
M lib/includes/serializers/AliasSerializer.php
M lib/includes/serializers/ClaimSerializer.php
M lib/includes/serializers/DescriptionSerializer.php
M lib/includes/serializers/ItemSerializer.php
M lib/includes/serializers/LabelSerializer.php
M lib/includes/serializers/LibSerializerFactory.php
M lib/includes/serializers/SerializationOptions.php
M lib/includes/serializers/SiteLinkSerializer.php
M lib/includes/serializers/SnakSerializer.php
M lib/includes/sites/SiteMatrixParser.php
M lib/includes/sites/SitesBuilder.php
M lib/includes/store/CachingPropertyInfoStore.php
M lib/includes/store/EntityRedirectResolvingDecorator.php
M lib/includes/store/EntityTermLookupBase.php
M lib/includes/store/GenericEntityInfoBuilder.php
M lib/includes/store/TermPropertyLabelResolver.php
M lib/includes/store/sql/PropertyInfoTable.php
M lib/includes/store/sql/SiteLinkTable.php
M lib/includes/store/sql/TermSqlIndex.php
M lib/includes/store/sql/WikiPageEntityMetaDataLookup.php
M lib/tests/phpunit/MockRepositoryTest.php
M lib/tests/phpunit/ReferencedEntitiesFinderTest.php
M lib/tests/phpunit/StringNormalizerTest.php
M lib/tests/phpunit/TermIndexEntryTest.php
M lib/tests/phpunit/Validators/AlternativeValidatorTest.php
M lib/tests/phpunit/Validators/CompositeValidatorTest.php
M lib/tests/phpunit/Validators/DataFieldValidatorTest.php
M lib/tests/phpunit/Validators/DataValueValidatorTest.php
M lib/tests/phpunit/Validators/EntityExistsValidatorTest.php
M lib/tests/phpunit/Validators/MembershipValidatorTest.php
M lib/tests/phpunit/Validators/NumberRangeValidatorTest.php
M lib/tests/phpunit/Validators/RegexValidatorTest.php
M lib/tests/phpunit/Validators/StringLengthValidatorTest.php
M lib/tests/phpunit/Validators/TypeValidatorTest.php
M lib/tests/phpunit/Validators/UrlSchemeValidatorsTest.php
M lib/tests/phpunit/Validators/UrlValidatorTest.php
M lib/tests/phpunit/ValuesFinderTest.php
M lib/tests/phpunit/formatters/EscapingEntityIdFormatterTest.php
M lib/tests/phpunit/formatters/MonolingualHtmlFormatterTest.php
M lib/tests/phpunit/formatters/WikibaseValueFormatterBuildersTest.php
M lib/tests/phpunit/serializers/SerializerBaseTest.php
56 files changed, 98 insertions(+), 98 deletions(-)


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

diff --git 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
index 0c625cd..fff 100644
--- 
a/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
+++ 
b/client/includes/DataAccess/PropertyParserFunction/PropertyClaimsRendererFactory.php
@@ -153,7 +153,7 @@
private function newVariantsAwareRenderer( array $variants, 
UsageAccumulator $usageAccumulator ) {
$languageAwareRenderers = array();
 
-   foreach( $variants as $variant ) {
+   foreach ( $variants as $variant ) {
$languageAwareRenderers[$variant] = 
$this->getLanguageAwareRendererFromCode(
$variant,
$usageAccumulator
diff --git a/client/includes/InterwikiSorter.php 
b/client/includes/InterwikiSorter.php
index 55d7437..8367b48 100644
--- a/client/includes/InterwikiSorter.php
+++ b/client/includes/InterwikiSorter.php
@@ -53,14 +53,14 @@
);
 
// Prepare the array for sorting.
-   foreach( $links as $k => $langLink ) {
+   foreach ( $links as $k => $langLink ) {
$links[$k] = explode( ':', $langLink, 2 );
}
 
usort( $links, array( $this, 'compareLinks' ) );
 
// Restore the sorted array.
-   foreach( $links as $k => $langLink ) {
+ 

[MediaWiki-commits] [Gerrit] Rename "parent", SecurePoll_BasePage, SecurePoll_Page to be ... - change (mediawiki...SecurePoll)

2015-07-29 Thread Fhocutt (Code Review)
Fhocutt has uploaded a new change for review.

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

Change subject: Rename "parent", SecurePoll_BasePage, SecurePoll_Page to be 
more descriptive
..

Rename "parent", SecurePoll_BasePage, SecurePoll_Page to be more descriptive

* Rename SecurePoll_BasePage to SecurePoll_SpecialSecurePoll
* Rename SecurePoll_Page to SecurePoll_ActionPage to further distinguish
  it from SecurePoll_SpecialSecurePoll, the associated SpecialPage
* Rename SecurePoll_BasePage::parent to
  SecurePoll_SpecialSecurePoll::specialPage to reduce confusion with
  the reserved word parent

Change-Id: I17641f9c5bcf027ddace79fe0fd64fa1ceaf50e7
---
M SecurePoll.php
M api/ApiStrikeVote.php
M includes/ballots/Ballot.php
M includes/main/Base.php
R includes/pages/ActionPage.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/LoginPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
M includes/talliers/AlternativeVoteTallier.php
M includes/talliers/HistogramRangeTallier.php
M includes/talliers/SchulzeTallier.php
19 files changed, 335 insertions(+), 326 deletions(-)


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

diff --git a/SecurePoll.php b/SecurePoll.php
index e47aeda..0fc64e3 100644
--- a/SecurePoll.php
+++ b/SecurePoll.php
@@ -85,7 +85,7 @@
 $wgExtensionMessagesFiles['SecurePollAlias'] = "$dir/SecurePoll.alias.php";
 $wgExtensionMessagesFiles['SecurePollNamespaces'] = $dir . 
'/SecurePoll.namespaces.php';
 
-$wgSpecialPages['SecurePoll'] = 'SecurePoll_BasePage';
+$wgSpecialPages['SecurePoll'] = 'SecurePoll_SpecialSecurePoll';
 
 $wgAutoloadClasses = $wgAutoloadClasses + array(
# api
@@ -111,7 +111,7 @@
'SecurePoll_Question' => "$dir/includes/entities/Question.php",
 
# main
-   'SecurePoll_BasePage' => "$dir/includes/main/Base.php",
+   'SecurePoll_SpecialSecurePoll' => "$dir/includes/main/Base.php",
'SecurePoll_Context' => "$dir/includes/main/Context.php",
'SecurePoll_DBStore' => "$dir/includes/main/Store.php",
'SecurePoll_MemoryStore' => "$dir/includes/main/Store.php",
@@ -131,7 +131,7 @@
'SecurePoll_ListPager' => "$dir/includes/pages/ListPage.php",
'SecurePoll_LoginPage' => "$dir/includes/pages/LoginPage.php",
'SecurePoll_MessageDumpPage' => 
"$dir/includes/pages/MessageDumpPage.php",
-   'SecurePoll_Page' => "$dir/includes/pages/Page.php",
+   'SecurePoll_ActionPage' => "$dir/includes/pages/ActionPage.php",
'SecurePoll_TallyPage' => "$dir/includes/pages/TallyPage.php",
'SecurePoll_TranslatePage' => "$dir/includes/pages/TranslatePage.php",
'SecurePoll_VotePage' => "$dir/includes/pages/VotePage.php",
diff --git a/api/ApiStrikeVote.php b/api/ApiStrikeVote.php
index 142e4ae..df6f5c5 100644
--- a/api/ApiStrikeVote.php
+++ b/api/ApiStrikeVote.php
@@ -48,7 +48,7 @@
}
 
// see if vote exists
-   $page = new SecurePoll_BasePage;
+   $page = new SecurePoll_SpecialSecurePoll;
$context = $page->sp_context;
$db = $context->getDB();
$table = $db->tableName( 'securepoll_elections' );
diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 73d24e1..63af83e 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -292,7 +292,7 @@
}
$s = '';
foreach ( $this->errors as $error ) {
-   $text = wfMsgReal( $error['message'], $error['params'] 
);
+   $text = wfMessage( $error['message'], $error['params'] 
)->text();
if ( isset( $error['securepoll-id'] ) ) {
$id = $error['securepoll-id'];
if ( isset( $usedIds[$id] ) ) {
@@ -323,7 +323,7 @@
if ( $error['securepoll-id'] !== $id ) {
continue;
}
-   return wfMsgReal( $error['message'], $error['params'] );
+   return wfMessage( $error['message'], $error['params'] 
)->text();
}
}
 }
diff --git a/includes/main/Base.php b/includes/main/Base.php
index 10b0458..558f0d1 100644
--- a/includes/main/Base.php
+++ b/includes/main/Base.php
@@ -3,10 +3,10 @@
 /**
  * The page that's initially called by MediaWiki when navigating to
  * Special:SecurePoll.  The actual pages are not actually subclasses of
- * this or of SpecialPage, they're subclassed from SecurePoll_Page.
+ * this or of SpecialPage, they're subclassed from SecurePoll_ActionPage.
  */
-cla

[MediaWiki-commits] [Gerrit] Add sentry-phabricator package - change (operations...sentry)

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

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

Change subject: Add sentry-phabricator package
..

Add sentry-phabricator package

Bug: T97136
Change-Id: I8f94263735761374b2b0223cec2a17144e582ca8
---
M README.md
A lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/PKG-INFO
A lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/SOURCES.txt
A 
lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/dependency_links.txt
A 
lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/installed-files.txt
A lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/not-zip-safe
A lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/top_level.txt
A lib/python2.7/site-packages/phabricator/__init__.py
A lib/python2.7/site-packages/phabricator/interfaces.json
A lib/python2.7/site-packages/phabricator/tests.py
A lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/PKG-INFO
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/SOURCES.txt
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/dependency_links.txt
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/entry_points.txt
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/installed-files.txt
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/not-zip-safe
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/requires.txt
A 
lib/python2.7/site-packages/sentry_phabricator-0.6.2-py2.7.egg-info/top_level.txt
A lib/python2.7/site-packages/sentry_phabricator/__init__.py
A lib/python2.7/site-packages/sentry_phabricator/models.py
A lib/python2.7/site-packages/sentry_phabricator/plugin.py
21 files changed, 633 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/software/sentry 
refs/changes/31/227931/1

diff --git a/README.md b/README.md
index 3e820e7..b320a71 100644
--- a/README.md
+++ b/README.md
@@ -9,9 +9,11 @@
 5. Go to that folder and run "virtualenv --system-site-packages sentry" to 
create the venv
 6. Run "source sentry/bin/activate" to activate the venv
 7. Run "pip install sentry[postgres]" to install the latest version of Sentry 
and its dependencies into the venv with postgres support
-8. Run "virtualenv --relocatable sentry" to rewrite the file references to 
relative
-9. Copy the extra files from the repo (TODO: these should probably be in a 
separate project or branch): README.md list-debian-packages.py 
requirements_list.py requirements_map.py
-10. Set up git-review in the /srv/deployment/sentry/sentry folder and commit 
the changes to this repository
+8. Install optional packages (currently, only sentry-phabricator)
+9. Remove pyc files by running "find sentry -name '*.pyc' | xargs rm"
+10. Run "virtualenv --relocatable sentry" to rewrite the file references to 
relative
+11. Copy the extra files from the repo (TODO: these should probably be in a 
separate project or branch): README.md list-debian-packages.py 
requirements_list.py requirements_map.py
+12. Set up git-review in the /srv/deployment/sentry/sentry folder and commit 
the changes to this repository
 
 ### System dependencies ###
 
diff --git 
a/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/PKG-INFO 
b/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/PKG-INFO
new file mode 100644
index 000..d24baad
--- /dev/null
+++ b/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/PKG-INFO
@@ -0,0 +1,14 @@
+Metadata-Version: 1.1
+Name: phabricator
+Version: 0.4.0
+Summary: Phabricator API Bindings
+Home-page: http://github.com/disqus/python-phabricator
+Author: DISQUS
+Author-email: opensou...@disqus.com
+License: UNKNOWN
+Description: UNKNOWN
+Platform: UNKNOWN
+Classifier: Intended Audience :: Developers
+Classifier: Intended Audience :: System Administrators
+Classifier: Operating System :: OS Independent
+Classifier: Topic :: Software Development
diff --git 
a/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/SOURCES.txt 
b/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/SOURCES.txt
new file mode 100644
index 000..51cfdb6
--- /dev/null
+++ b/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/SOURCES.txt
@@ -0,0 +1,13 @@
+LICENSE
+MANIFEST.in
+README.rst
+setup.cfg
+setup.py
+phabricator/__init__.py
+phabricator/interfaces.json
+phabricator/tests.py
+phabricator.egg-info/PKG-INFO
+phabricator.egg-info/SOURCES.txt
+phabricator.egg-info/dependency_links.txt
+phabricator.egg-info/not-zip-safe
+phabricator.egg-info/top_level.txt
\ No newline at end of file
diff --git 
a/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/dependency_links.txt
 
b/lib/python2.7/site-packages/phabricator-0.4.0-py2.7.egg-info/dependency_links.txt
new file mode 100644
index 000..8b13789
--- /dev/null
+++ 
b/lib/python2.7/site-packages/phab

[MediaWiki-commits] [Gerrit] Double $wgMemoryLimit (330 => 660) - change (operations/mediawiki-config)

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

Change subject: Double $wgMemoryLimit (330 => 660)
..


Double $wgMemoryLimit (330 => 660)

HHVM's memory utilisation is substantially better than PHP 5.3, and our
application server fleet has substantially more RAM than it used to. We
often get fatals when calling HH\xenon_get_data(), which means that there
is potentially a class of requests that are both memory-intensive and
utterly invisible to xenon profiling. So let's double the limit and see what
happens.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index facc115..7df9eac 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14125,7 +14125,7 @@
 ),
 
 'wmgMemoryLimit' => array(
-   'default' => 330 * 1024 * 1024, // 330MB
+   'default' => 660 * 1024 * 1024, // 660MB
 ),
 'wgMaxGeneratedPPNodeCount' => array(
'default' => 150,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3c6217f06783ae1630bf9aa3d7b7eabc14f2bafa
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Double $wgMemoryLimit (330 => 660) - change (operations/mediawiki-config)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Double $wgMemoryLimit (330 => 660)
..

Double $wgMemoryLimit (330 => 660)

HHVM's memory utilisation is substantially better than PHP 5.3, and our
application server fleet has substantially more RAM than it used to. We
often get fatals when calling HH\xenon_get_data(), which means that there
is potentially a class of requests that are both memory-intensive and
utterly invisible to xenon profiling. So let's double the limit and see what
happens.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index facc115..7df9eac 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -14125,7 +14125,7 @@
 ),
 
 'wmgMemoryLimit' => array(
-   'default' => 330 * 1024 * 1024, // 330MB
+   'default' => 660 * 1024 * 1024, // 660MB
 ),
 'wgMaxGeneratedPPNodeCount' => array(
'default' => 150,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3c6217f06783ae1630bf9aa3d7b7eabc14f2bafa
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] FieldLayout: Allow displaying errors or notices next to fields - change (oojs/ui)

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

Change subject: FieldLayout: Allow displaying errors or notices next to fields
..


FieldLayout: Allow displaying errors or notices next to fields

A 'notice' is a helpful bit of information that is always visible
(unlike the 'help' text, which is hidden behind a button).

A 'error' is like a notice, but shown in harsh red or orange colours.

Bug: T106947
Change-Id: Ie14a35fac70d62ff7d102caaa56654ebde11d7dd
---
M bin/testsuitegenerator.rb
M demos/pages/widgets.js
M demos/widgets.php
M php/layouts/FieldLayout.php
M src/layouts/FieldLayout.js
M src/themes/apex/layouts.less
M src/themes/mediawiki/layouts.less
7 files changed, 214 insertions(+), 5 deletions(-)

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



diff --git a/bin/testsuitegenerator.rb b/bin/testsuitegenerator.rb
index 57b440b..4fbf0f4 100644
--- a/bin/testsuitegenerator.rb
+++ b/bin/testsuitegenerator.rb
@@ -36,6 +36,8 @@
['FieldLayout', 'help'] => true, # different PHP and JS 
implementations
['ActionFieldLayout', 'help'] => true, # different PHP and JS 
implementations
['FieldsetLayout', 'help'] => true, # different PHP and JS 
implementations
+   ['FieldLayout', 'errors'] => expandos['string'].map{|v| [v] }, 
# treat as string[]
+   ['FieldLayout', 'notices'] => expandos['string'].map{|v| [v] }, 
# treat as string[]
'type' => %w[text button],
'method' => %w[GET POST],
'action' => [],
diff --git a/demos/pages/widgets.js b/demos/pages/widgets.js
index db7ea8f..4e5a947 100644
--- a/demos/pages/widgets.js
+++ b/demos/pages/widgets.js
@@ -1488,6 +1488,37 @@
label: $( '' ).text( 
'ActionFieldLayout aligned top with rich text label' ),
align: 'top'
}
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( {
+   value: ''
+   } ),
+   {
+   label: 'FieldLayout with 
notice',
+   notices: [ 'Please input a 
number.' ],
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( {
+   value: 'Foo'
+   } ),
+   {
+   label: 'FieldLayout with error 
message',
+   errors: [ 'The value must be a 
number.' ],
+   align: 'top'
+   }
+   ),
+   new OO.ui.FieldLayout(
+   new OO.ui.TextInputWidget( {
+   value: 'Foo'
+   } ),
+   {
+   label: 'FieldLayout with notice 
and error message',
+   notices: [ 'Please input a 
number.' ],
+   errors: [ 'The value must be a 
number.' ],
+   align: 'top'
+   }
)
]
} ),
diff --git a/demos/widgets.php b/demos/widgets.php
index 88e9a07..0b18f97 100644
--- a/demos/widgets.php
+++ b/demos/widgets.php
@@ -878,7 +878,38 @@
new 
OOUI\HtmlSnippet( 'ActionFieldLayout aligned top with rich text label' ),
'align' => 'top'
)
-   )
+   ),
+   new OOUI\FieldLayout(
+   new 
OOUI\TextInputWidget( array(
+   'value' => ''
+   ) ),
+   array(
+   'label' => 
'FieldLayout with notice',
+ 

[MediaWiki-commits] [Gerrit] logger: Fix undefined variable $data - change (mediawiki/core)

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

Change subject: logger: Fix undefined variable $data
..


logger: Fix undefined variable $data

Follows-up 77a397125f. Also add unit test that would've caught
this "PHP Notice: Undefined variable: data" error.

Change-Id: I8a3bd9c8b685c2aa7a466e3d3c61ffa027be02fa
---
M includes/debug/logger/LegacyLogger.php
M tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
2 files changed, 8 insertions(+), 1 deletion(-)

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



diff --git a/includes/debug/logger/LegacyLogger.php 
b/includes/debug/logger/LegacyLogger.php
index ea4e1b1..831ad1b 100644
--- a/includes/debug/logger/LegacyLogger.php
+++ b/includes/debug/logger/LegacyLogger.php
@@ -343,7 +343,7 @@
if ( is_nan( $item ) ) {
return 'NaN';
}
-   return $data;
+   return $item;
}
 
if ( is_scalar( $item ) ) {
diff --git a/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php 
b/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
index c63ce66..1b3ce2c 100644
--- a/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
+++ b/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
@@ -85,6 +85,13 @@
'true',
),
array(
+   '{float}',
+   array(
+   'float' => 1.23,
+   ),
+   '1.23',
+   ),
+   array(
'{array}',
array(
'array' => array( 1, 2, 3 ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a3bd9c8b685c2aa7a466e3d3c61ffa027be02fa
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Krinkle 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Added sanitizeHdrs() tests for Swift - change (mediawiki/core)

2015-07-29 Thread Aaron Schulz (Code Review)
Aaron Schulz has uploaded a new change for review.

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

Change subject: Added sanitizeHdrs() tests for Swift
..

Added sanitizeHdrs() tests for Swift

Change-Id: I2e3c3225c729e5220ca16f6ef4518da49e7f721c
---
M includes/filebackend/SwiftFileBackend.php
A tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
2 files changed, 92 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/29/227929/1

diff --git a/includes/filebackend/SwiftFileBackend.php 
b/includes/filebackend/SwiftFileBackend.php
index 3db235b..dca1b4c 100644
--- a/includes/filebackend/SwiftFileBackend.php
+++ b/includes/filebackend/SwiftFileBackend.php
@@ -197,6 +197,7 @@
// By default, Swift has annoyingly low maximum header value 
limits
if ( isset( $headers['content-disposition'] ) ) {
$disposition = '';
+   // @note: assume FileBackend::makeContentDisposition() 
already used
foreach ( explode( ';', $headers['content-disposition'] 
) as $part ) {
$part = trim( $part );
$new = ( $disposition === '' ) ? $part : 
"{$disposition};{$part}";
diff --git a/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php 
b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
new file mode 100644
index 000..38000f6
--- /dev/null
+++ b/tests/phpunit/includes/filebackend/SwiftFileBackendTest.php
@@ -0,0 +1,91 @@
+backend = TestingAccessWrapper::newFromObject(
+   new SwiftFileBackend( array(
+   'name' => 'local-swift-testing',
+   'class'=> 'SwiftFileBackend',
+   'wikiId'   => 'unit-testing',
+   'lockManager'  => 
LockManagerGroup::singleton()->get( 'fsLockManager' ),
+   'swiftAuthUrl' => 
'http://127.0.0.1:8080/auth', // unused
+   'swiftUser'=> 'test:tester',
+   'swiftKey' => 'testing',
+   'swiftTempUrlKey'  => 
'b3968d0207b54ece8706515a89d4' // unused
+   ) )
+   );
+   }
+
+   /**
+* @dataProvider provider_testSanitzeHdrs
+* @covers SwiftFileBackend::sanitzeHdrs
+*/
+   public function testSanitzeHdrs( $raw, $sanitized ) {
+   $hdrs = $this->backend->sanitizeHdrs( array( 'headers' => $raw 
) );
+
+   $this->assertEquals( $hdrs, $sanitized, 'sanitizeHdrs() has 
expected result' );
+   }
+
+   public static function provider_testSanitzeHdrs() {
+   return array(
+   array(
+   array(
+   'content-length' => 345,
+   'content-type'   => 'image+bitmap/jpeg',
+   'content-disposition' => 'inline',
+   'content-duration' => 35.6363,
+   'content-custom' => 'hello',
+   'x-content-custom' => 'hello'
+   ),
+   array(
+   'content-disposition' => 'inline',
+   'content-duration' => 35.6363,
+   'content-custom' => 'hello',
+   'x-content-custom' => 'hello'
+   )
+   ),
+   array(
+   array(
+   'content-length' => 345,
+   'content-type'   => 'image+bitmap/jpeg',
+   'content-disposition' => 'inline; 
filename=xxx; ' . str_repeat( 'o', 1024 ),
+   'content-duration' => 35.6363,
+   'content-custom' => 'hello',
+   'x-content-custom' => 'hello'
+   ),
+   array(
+   'content-disposition' => 
'inline;filename=xxx',
+   'content-duration' => 35.6363,
+   'content-custom' => 'hello',
+   'x-content-custom' => 'hello'
+   )
+   ),
+   array(
+   array(
+   'content-length' => 345,
+   'content-type'  

[MediaWiki-commits] [Gerrit] Remove deprecated calls to wfMsg and updated SecurePoll spec... - change (mediawiki...SecurePoll)

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

Change subject: Remove deprecated calls to wfMsg and updated SecurePoll special 
pages
..


Remove deprecated calls to wfMsg and updated SecurePoll special pages

* Changed various calls to wfMsg to use either the new wfMessage
global function or use SpecialPage::msg().
* Removed various globals, changed to getOutput(), getUser(), getRequest()
and getLanguage() functions inherited from SpecialPage.
* Declared visibility for functions and variables, any undeclared
functions or variables are assumed to be public.

Change-Id: I74404cb6ac2cbf3946a3e0d2841cf64c086051c2
---
M includes/ballots/Ballot.php
M includes/main/Base.php
M includes/pages/CreatePage.php
M includes/pages/DetailsPage.php
M includes/pages/DumpPage.php
M includes/pages/EntryPage.php
M includes/pages/ListPage.php
M includes/pages/LoginPage.php
M includes/pages/MessageDumpPage.php
M includes/pages/Page.php
M includes/pages/TallyPage.php
M includes/pages/TranslatePage.php
M includes/pages/VotePage.php
M includes/pages/VoterEligibilityPage.php
M includes/talliers/AlternativeVoteTallier.php
M includes/talliers/HistogramRangeTallier.php
M includes/talliers/SchulzeTallier.php
17 files changed, 280 insertions(+), 271 deletions(-)

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



diff --git a/includes/ballots/Ballot.php b/includes/ballots/Ballot.php
index 73d24e1..63af83e 100644
--- a/includes/ballots/Ballot.php
+++ b/includes/ballots/Ballot.php
@@ -292,7 +292,7 @@
}
$s = '';
foreach ( $this->errors as $error ) {
-   $text = wfMsgReal( $error['message'], $error['params'] 
);
+   $text = wfMessage( $error['message'], $error['params'] 
)->text();
if ( isset( $error['securepoll-id'] ) ) {
$id = $error['securepoll-id'];
if ( isset( $usedIds[$id] ) ) {
@@ -323,7 +323,7 @@
if ( $error['securepoll-id'] !== $id ) {
continue;
}
-   return wfMsgReal( $error['message'], $error['params'] );
+   return wfMessage( $error['message'], $error['params'] 
)->text();
}
}
 }
diff --git a/includes/main/Base.php b/includes/main/Base.php
index 10b0458..bf9d583 100644
--- a/includes/main/Base.php
+++ b/includes/main/Base.php
@@ -6,7 +6,7 @@
  * this or of SpecialPage, they're subclassed from SecurePoll_Page.
  */
 class SecurePoll_BasePage extends UnlistedSpecialPage {
-   static $pages = array(
+   public static $pages = array(
'create' => 'SecurePoll_CreatePage',
'edit' => 'SecurePoll_CreatePage',
'details' => 'SecurePoll_DetailsPage',
@@ -21,7 +21,7 @@
'votereligibility' => 'SecurePoll_VoterEligibilityPage',
);
 
-   public $sp_context, $request;
+   public $sp_context;
 
/**
 * Constructor
@@ -37,17 +37,17 @@
 * @param $paramString Mixed: parameter passed to the page or null
 */
public function execute( $paramString ) {
-   global $wgOut, $wgRequest, $wgExtensionAssetsPath;
+   global $wgExtensionAssetsPath;
+
+   $out = $this->getOutput();
 
$this->setHeaders();
-   $wgOut->addLink( array(
+   $out->addLink( array(
'rel' => 'stylesheet',
'href' => 
"$wgExtensionAssetsPath/SecurePoll/resources/SecurePoll.css",
'type' => 'text/css'
) );
-   $wgOut->addScriptFile( 
"$wgExtensionAssetsPath/SecurePoll/resources/SecurePoll.js" );
-
-   $this->request = $wgRequest;
+   $out->addScriptFile( 
"$wgExtensionAssetsPath/SecurePoll/resources/SecurePoll.js" );
 
$paramString = strval( $paramString );
if ( $paramString === '' ) {
@@ -57,7 +57,7 @@
$pageName = array_shift( $params );
$page = $this->getSubpage( $pageName );
if ( !$page ) {
-   $wgOut->addWikiMsg( 'securepoll-invalid-page', 
$pageName );
+   $out->addWikiMsg( 'securepoll-invalid-page', $pageName 
);
return;
}
 
@@ -71,7 +71,7 @@
/**
 * Get a SecurePoll_Page subclass object for the given subpage name
 */
-   function getSubpage( $name ) {
+   public function getSubpage( $name ) {
if ( !isset( self::$pages[$name] ) ) {
return false;
}
@@ -83,7 +83,7 @@
/**
 * Get a random token for CSRF protection
 */
-   function getEditToken() {
+   public function getEditToken() 

[MediaWiki-commits] [Gerrit] Changed background on Entitytermsview input fields - change (mediawiki...Wikibase)

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

Change subject: Changed background on Entitytermsview input fields
..


Changed background on Entitytermsview input fields

Changed background color of input fields when they are focused to blue

Bug: T92447
Change-Id: Ia441d0e481d8d5b26e698fab417d5387fd397715
---
M view/resources/jquery/ui/jquery.ui.tagadata.css
M 
view/resources/jquery/wikibase/themes/default/jquery.wikibase.descriptionview.css
M view/resources/jquery/wikibase/themes/default/jquery.wikibase.labelview.css
3 files changed, 13 insertions(+), 3 deletions(-)

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



diff --git a/view/resources/jquery/ui/jquery.ui.tagadata.css 
b/view/resources/jquery/ui/jquery.ui.tagadata.css
index 2ca4149..1019b1d 100644
--- a/view/resources/jquery/ui/jquery.ui.tagadata.css
+++ b/view/resources/jquery/ui/jquery.ui.tagadata.css
@@ -52,9 +52,7 @@
 }
 
 ul.tagadata li.tagadata-choice-empty,
-ul.tagadata li.tagadata-choice-active,
-ul.tagadata li.tagadata-choice .tagadata-label input:focus,
-ul.tagadata li.tagadata-choice-empty input {
+ul.tagadata li.tagadata-choice-active {
background: none white !important;
 }
 
@@ -77,3 +75,7 @@
 ul.tagadata {
background-color: #F0F0F0;
 }
+
+ul.tagadata li.tagadata-choice .tagadata-label input:focus {
+   background-color: #D6F3FF;
+}
\ No newline at end of file
diff --git 
a/view/resources/jquery/wikibase/themes/default/jquery.wikibase.descriptionview.css
 
b/view/resources/jquery/wikibase/themes/default/jquery.wikibase.descriptionview.css
index dc03833..d9d3d07 100644
--- 
a/view/resources/jquery/wikibase/themes/default/jquery.wikibase.descriptionview.css
+++ 
b/view/resources/jquery/wikibase/themes/default/jquery.wikibase.descriptionview.css
@@ -10,3 +10,7 @@
font-family: inherit;
font-size: inherit;
 }
+
+.wikibase-descriptionview .wikibase-descriptionview-input:focus {
+   background-color: #D6F3FF;
+}
\ No newline at end of file
diff --git 
a/view/resources/jquery/wikibase/themes/default/jquery.wikibase.labelview.css 
b/view/resources/jquery/wikibase/themes/default/jquery.wikibase.labelview.css
index 9d6b9d7..ca1fcc5 100644
--- 
a/view/resources/jquery/wikibase/themes/default/jquery.wikibase.labelview.css
+++ 
b/view/resources/jquery/wikibase/themes/default/jquery.wikibase.labelview.css
@@ -10,3 +10,7 @@
font-family: inherit;
font-size: inherit;
 }
+
+.wikibase-labelview .wikibase-labelview-input:focus {
+   background-color: #D6F3FF;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia441d0e481d8d5b26e698fab417d5387fd397715
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Jonas Kress (WMDE) 
Gerrit-Reviewer: Aude 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] coal: log all Navigation Timing metrics, not just four - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: coal: log all Navigation Timing metrics, not just four
..


coal: log all Navigation Timing metrics, not just four

We (the performance team) continues to derive value from coal, because we are
able to specify precisely how metrics are aggregated, which is harder to do for
the statsd stack. So make the set of metrics collected by coal comprehensive
(i.e., encompassing all Navigation Timing metrics) rather than just four.

Bug: T104902
Change-Id: I0ac3b75aa525a3a972edc58fc74e7f1fddeb7a3f
---
M modules/coal/files/coal
1 file changed, 17 insertions(+), 5 deletions(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/modules/coal/files/coal b/modules/coal/files/coal
index dd0bbe9..db3d26b 100755
--- a/modules/coal/files/coal
+++ b/modules/coal/files/coal
@@ -42,11 +42,23 @@
 UPDATE_INTERVAL = 60  # How often we log values.
 RETENTION = 525949# How many datapoints we retain. (One year's worth.)
 METRICS = (
-'responseStart',  # Time to user agent receiving first byte
-'firstPaint', # Time to initial render
-'domComplete',# Time to DOM Comlete event
-'loadEventEnd',   # Time to load event completion
-'saveTiming', # Time to first byte for page edits
+'connectEnd',
+'connectStart',
+'dnsLookup',
+'domComplete',
+'domInteractive',
+'fetchStart',
+'firstPaint',
+'loadEventEnd',
+'loadEventStart',
+'mediaWikiLoadComplete',
+'redirectCount',
+'redirecting',
+'requestStart',
+'responseEnd',
+'responseStart',
+'saveTiming',
+'secureConnectionStart',
 )
 ARCHIVES = [(UPDATE_INTERVAL, RETENTION)]
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0ac3b75aa525a3a972edc58fc74e7f1fddeb7a3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] coal: log all Navigation Timing metrics, not just four - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: coal: log all Navigation Timing metrics, not just four
..

coal: log all Navigation Timing metrics, not just four

We (the performance team) continues to derive value from coal, because we are
able to specify precisely how metrics are aggregated, which is harder to do for
the statsd stack. So make the set of metrics collected by coal comprehensive
(i.e., encompassing all Navigation Timing metrics) rather than just four.

Bug: T104902
Change-Id: I0ac3b75aa525a3a972edc58fc74e7f1fddeb7a3f
---
M modules/coal/files/coal
1 file changed, 17 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/28/227928/1

diff --git a/modules/coal/files/coal b/modules/coal/files/coal
index dd0bbe9..db3d26b 100755
--- a/modules/coal/files/coal
+++ b/modules/coal/files/coal
@@ -42,11 +42,23 @@
 UPDATE_INTERVAL = 60  # How often we log values.
 RETENTION = 525949# How many datapoints we retain. (One year's worth.)
 METRICS = (
-'responseStart',  # Time to user agent receiving first byte
-'firstPaint', # Time to initial render
-'domComplete',# Time to DOM Comlete event
-'loadEventEnd',   # Time to load event completion
-'saveTiming', # Time to first byte for page edits
+'connectEnd',
+'connectStart',
+'dnsLookup',
+'domComplete',
+'domInteractive',
+'fetchStart',
+'firstPaint',
+'loadEventEnd',
+'loadEventStart',
+'mediaWikiLoadComplete',
+'redirectCount',
+'redirecting',
+'requestStart',
+'responseEnd',
+'responseStart',
+'saveTiming',
+'secureConnectionStart',
 )
 ARCHIVES = [(UPDATE_INTERVAL, RETENTION)]
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0ac3b75aa525a3a972edc58fc74e7f1fddeb7a3f
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] resourceloader: Ensure 'user' loads after 'site' (asynchrono... - change (mediawiki/core)

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

Change subject: resourceloader: Ensure 'user' loads after 'site' 
(asynchronously)
..


resourceloader: Ensure 'user' loads after 'site' (asynchronously)

Regression from 19a40cd3ad which made the 'site' module load asynchronously,
but the 'user' module was still loaded synchronously which meant it ran before
the site module finished.

Full test script at .

Also:
* This changes the 'user' module to load asynchronously.
* Similar to 19a40cd3ad for site module, this makes the styles for the user
  module load twice. Harmless but doesn't look pretty internally.
* Remove the obsolete XXX-comment from 0b5389d98d (r56770).
* Add comment documenting the fact that the 'excludepages' feature can cause
  User/common.js and User/vector.js to be mis-ordered when the user previews
  common.js edits. This has always been the case (since 2009) and is merely
  being documented here.

Bug: T32358
Bug: T106736
Bug: T102077
Change-Id: Id599b6be42613529fb7f4dd3273f36ccadb3a09e
---
M includes/OutputPage.php
M includes/resourceloader/ResourceLoader.php
M resources/src/mediawiki/mediawiki.js
3 files changed, 40 insertions(+), 16 deletions(-)

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



diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 1c76f0b..e2caf80 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3067,28 +3067,42 @@
$links[] = "\n" . $this->mScripts;
 
// Add user JS if enabled
+   // This must use TYPE_COMBINED instead of only=scripts so that 
its request is handled by
+   // mw.loader.implement() which ensures that execution is 
scheduled after the "site" module.
if ( $this->getConfig()->get( 'AllowUserJs' )
&& $this->getUser()->isLoggedIn()
&& $this->getTitle()
&& $this->getTitle()->isJsSubpage()
&& $this->userCanPreview()
) {
-   # XXX: additional security check/prompt?
-   // We're on a preview of a JS subpage
-   // Exclude this page from the user module in case it's 
in there (bug 26283)
-   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_SCRIPTS, false,
+   // We're on a preview of a JS subpage. Exclude this 
page from the user module (T28283)
+   // and include the draft contents as a raw script 
instead.
+   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_COMBINED, false,
array( 'excludepage' => 
$this->getTitle()->getPrefixedDBkey() ), $inHead
);
// Load the previewed JS
-   $links[] = Html::inlineScript( "\n"
-   . $this->getRequest()->getText( 
'wpTextbox1' ) . "\n" ) . "\n";
+   $links[] = ResourceLoader::makeInlineScript(
+   Xml::encodeJsCall( 'mw.loader.using', array(
+   array( 'user', 'site' ),
+   new XmlJsCode(
+   'function () {'
+   . Xml::encodeJsCall( 
'$.globalEval', array(
+   
$this->getRequest()->getText( 'wpTextbox1' )
+   ) )
+   . '}'
+   )
+   ) )
+   );
 
// FIXME: If the user is previewing, say, ./vector.js, 
his ./common.js will be loaded
// asynchronously and may arrive *after* the inline 
script here. So the previewed code
-   // may execute before ./common.js runs. Normally, 
./common.js runs before ./vector.js...
+   // may execute before ./common.js runs. Normally, 
./common.js runs before ./vector.js.
+   // Similarly, when previewing ./common.js and the user 
module does arrive first, it will
+   // arrive without common.js and the inline script runs 
after. Thus running common after
+   // the excluded subpage.
} else {
// Include the user module normally, i.e., raw to avoid 
it being wrapped in a closure.
-   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_SCRIPTS,
+   $links[] = $this->makeResourceLoaderLink( '

[MediaWiki-commits] [Gerrit] Private hiera keys for Sentry - change (labs/private)

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

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

Change subject: Private hiera keys for Sentry
..

Private hiera keys for Sentry

Bug: T84956
Change-Id: I2cfacb4544f99df9f5e6c30dc2824e8b153e27b2
---
A hieradata/sentry.yaml
1 file changed, 4 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/labs/private 
refs/changes/27/227927/1

diff --git a/hieradata/sentry.yaml b/hieradata/sentry.yaml
new file mode 100644
index 000..4c812f3
--- /dev/null
+++ b/hieradata/sentry.yaml
@@ -0,0 +1,4 @@
+sentry::db_pass: 'sentry'
+sentry::secret_key: 'cad0c58f5489a1efbc2fadc2b81d5c95dc3f3103'
+sentry::admin_pass: '123'
+

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cfacb4544f99df9f5e6c30dc2824e8b153e27b2
Gerrit-PatchSet: 1
Gerrit-Project: labs/private
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] Remove unused talliers. - change (mediawiki...SecurePoll)

2015-07-29 Thread Fhocutt (Code Review)
Fhocutt has uploaded a new change for review.

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

Change subject: Remove unused talliers.
..

Remove unused talliers.

Neither AlternativeVoteTallier nor RandomPrefVoteTallier are used in
SecurePoll currently and both are vulnerable to code rot. Remove both
of these.

Bug: T107400
Change-Id: I2357b76b7c493bdaf20f42617354ad9a495c5e73
---
D includes/talliers/AlternativeVoteTallier.php
D includes/talliers/RandomPrefVoteTallier.php
2 files changed, 0 insertions(+), 302 deletions(-)


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

diff --git a/includes/talliers/AlternativeVoteTallier.php 
b/includes/talliers/AlternativeVoteTallier.php
deleted file mode 100644
index 543b4eb..000
--- a/includes/talliers/AlternativeVoteTallier.php
+++ /dev/null
@@ -1,205 +0,0 @@
- => 
-*/
-   public $spoilt = array( 1 => 0);
-   public $exhausted = array( 1 => 0 );
-
-   // Total number of counting rounds
-   public $rounds = 0;
-
-   // Total number of candidates who received any votes at all
-   public $numCandidates = 0;
-
-   /**
-* The results of the counting process
-* array(  => array(  =>  ) )
-*/
-   public $results = array();
-
-
-   /**
-* @param  $context SecurePoll_Context
-* @param  $electionTallier SecurePoll_ElectionTallier
-* @param  $question SecurePoll_Question
-*/
-   function __construct( $context, $electionTallier, $question ) {
-   parent::__construct( $context, $electionTallier, $question );
-
-   foreach ( $question->getOptions() as $option ) {
-   $this->results[$option->getId()] = array();
-   }
-   }
-
-   /**
-* Add a voter's preferences to the ballot bin
-*
-* @param  $scores array of  => 
-* @return bool Whether the vote was parsed correctly
-*/
-   function addVote( $scores ) {
-
-   foreach ( $scores as $oid => $score ) {
-   if ( !isset( $this->results[$oid] ) ) {
-   wfDebug( __METHOD__.": unknown OID $oid\n" );
-   return false;
-   }
-   // Score of zero = no preference
-   if( $score == 0 ){
-   unset( $scores[$oid] );
-   }
-   }
-
-   $this->numCandidates = max( $this->numCandidates, count( 
$scores ) );
-
-   // Simple way to check for duplicate preferences: flip the 
array, and the
-   // preferences will become duplicate keys.
-   $rscores = array_flip( $scores );
-   if( count( $rscores ) < count( $scores ) ){
-   wfDebug( __METHOD__.": vote has duplicate preferences, 
spoilt\n" );
-   $this->spoilt[1] ++;
-   return true;
-   } elseif ( count( $rscores ) == 0 ) {
-   wfDebug( __METHOD__.": vote is empty\n" );
-   $this->exhausted[1]++;
-   return true;
-   }
-
-   // Sorting also avoids any problem with voters skipping 
preferences (1, 2, 4, etc)
-   ksort( $rscores );
-
-   // Slightly ugly way to get the first element of the array when 
that might not
-   // have index zero
-   $this->ballots[reset($rscores)][] = $rscores;
-
-   return true;
-   }
-
-   function finishTally(){
-   while ( $this->rounds++ < $this->numCandidates ){
-   // Record the number of ballots in each bin
-   foreach( $this->ballots as $oid => $bin ){
-   $this->results[$oid][$this->rounds] = count( 
$bin );
-   }
-
-   // Carry over exhausted ballot count from previous round
-   $this->exhausted[$this->rounds + 1] = 
$this->exhausted[$this->rounds];
-   $this->spoilt[$this->rounds + 1] = 
$this->spoilt[$this->rounds];
-
-   // Sort the ballot bins by the number of ballots they 
contain
-   uasort( $this->ballots, array( __CLASS__, 
'sortByArraySize' ) );
-
-   // The smallest bin is now at the end of the list; kill 
it
-   $loser = array_pop( $this->ballots );
-
-   // And redistribute its ballots to the other bins
-   foreach( $loser as &$ballot ){
-   $reused = false;
-   foreach( $ballot as $pref => $oid ){
-   if( !array_key_exists( $oid, 
$this->ballots ) ){
-  

[MediaWiki-commits] [Gerrit] logger: Fix undefined variable $data - change (mediawiki/core)

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

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

Change subject: logger: Fix undefined variable $data
..

logger: Fix undefined variable $data

Follows-up 77a397125f. Also add unit test that would've caught
this "PHP Notice: Undefined variable: data" error.

Change-Id: I8a3bd9c8b685c2aa7a466e3d3c61ffa027be02fa
---
M includes/debug/logger/LegacyLogger.php
M tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
2 files changed, 8 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/227925/1

diff --git a/includes/debug/logger/LegacyLogger.php 
b/includes/debug/logger/LegacyLogger.php
index ea4e1b1..831ad1b 100644
--- a/includes/debug/logger/LegacyLogger.php
+++ b/includes/debug/logger/LegacyLogger.php
@@ -343,7 +343,7 @@
if ( is_nan( $item ) ) {
return 'NaN';
}
-   return $data;
+   return $item;
}
 
if ( is_scalar( $item ) ) {
diff --git a/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php 
b/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
index c63ce66..1b3ce2c 100644
--- a/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
+++ b/tests/phpunit/includes/debug/logger/LegacyLoggerTest.php
@@ -85,6 +85,13 @@
'true',
),
array(
+   '{float}',
+   array(
+   'float' => 1.23,
+   ),
+   '1.23',
+   ),
+   array(
'{array}',
array(
'array' => array( 1, 2, 3 ),

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8a3bd9c8b685c2aa7a466e3d3c61ffa027be02fa
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] Run update.php with --skip-external-dependencies - change (integration/jenkins)

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

Change subject: Run update.php with --skip-external-dependencies
..


Run update.php with --skip-external-dependencies

When trying to update a library in mediawiki/core and mediawiki/vendor,
a circular dependency is produced as both patches depend upon each other.

Now, all non-mediawiki/vendor jobs will skip checking for matching versions
and continue "at their own risk". mediawiki/vendor will still check
versions to make sure it stays in sync with MediaWiki core.

Depends upon Ie84dd6320e in mediawiki/core (merged).

Bug: T88211
Change-Id: I39531a2540419ccb803e22ced7672981b42317ea
---
M bin/mw-run-update-script.sh
1 file changed, 7 insertions(+), 1 deletion(-)

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



diff --git a/bin/mw-run-update-script.sh b/bin/mw-run-update-script.sh
index edb14c6..7ea2eff 100755
--- a/bin/mw-run-update-script.sh
+++ b/bin/mw-run-update-script.sh
@@ -2,4 +2,10 @@
 
 . /srv/deployment/integration/slave-scripts/bin/mw-set-env.sh
 
-php "$MW_INSTALL_PATH/maintenance/update.php" --quick
+ARGS="--quick"
+if [ "$ZUUL_PROJECT" = "mediawiki/vendor" ]
+then
+   ARGS="$ARGS --skip-external-dependencies"
+fi
+php "$MW_INSTALL_PATH/maintenance/update.php" $ARGS
+

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I39531a2540419ccb803e22ced7672981b42317ea
Gerrit-PatchSet: 4
Gerrit-Project: integration/jenkins
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: JanZerebecki 
Gerrit-Reviewer: Jforrester 
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] Reduce the module build time - change (mediawiki...MobileFrontend)

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

Change subject: Reduce the module build time
..


Reduce the module build time

Import module less files into styles.less so that lessphp can build
the module faster.

Bug: T105314
Change-Id: I17de655e52d2ff1f3467fa00b8eb6f461139b1ba
---
M MobileFrontend.php
M includes/Resources.php
A resources/skins.minerva.content.styles/styles.less
3 files changed, 13 insertions(+), 11 deletions(-)

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



diff --git a/MobileFrontend.php b/MobileFrontend.php
index dde7cc2..3ecd384 100644
--- a/MobileFrontend.php
+++ b/MobileFrontend.php
@@ -181,6 +181,7 @@
 
 // Set LESS importpath
 $wgResourceLoaderLESSImportPaths[] = __DIR__ . "/minerva.less/";
+$wgResourceLoaderLESSImportPaths[] = __DIR__ . "/resources/";
 
 // ResourceLoader modules
 
diff --git a/includes/Resources.php b/includes/Resources.php
index b6dfa1e..a72cc4b 100644
--- a/includes/Resources.php
+++ b/includes/Resources.php
@@ -63,17 +63,7 @@
'skins.minerva.content.styles' => $wgMFResourceFileModuleBoilerplate + 
array(
'position' => 'top',
'styles' => array(
-   'resources/skins.minerva.content.styles/main.less',
-   
'resources/skins.minerva.content.styles/thumbnails.less',
-   'resources/skins.minerva.content.styles/images.less',
-   'resources/skins.minerva.content.styles/galleries.less',
-   'resources/skins.minerva.content.styles/headings.less',
-   
'resources/skins.minerva.content.styles/blockquotes.less',
-   'resources/skins.minerva.content.styles/lists.less',
-   'resources/skins.minerva.content.styles/links.less',
-   'resources/skins.minerva.content.styles/text.less',
-   'resources/skins.minerva.content.styles/tables.less',
-   'resources/skins.minerva.content.styles/hacks.less',
+   'resources/skins.minerva.content.styles/styles.less',
),
),
'mobile.pagelist.styles' => $wgMFResourceFileModuleBoilerplate + array(
diff --git a/resources/skins.minerva.content.styles/styles.less 
b/resources/skins.minerva.content.styles/styles.less
new file mode 100644
index 000..cd3e2ca
--- /dev/null
+++ b/resources/skins.minerva.content.styles/styles.less
@@ -0,0 +1,11 @@
+@import "skins.minerva.content.styles/main.less";
+@import "skins.minerva.content.styles/thumbnails.less";
+@import "skins.minerva.content.styles/images.less";
+@import "skins.minerva.content.styles/galleries.less";
+@import "skins.minerva.content.styles/headings.less";
+@import "skins.minerva.content.styles/blockquotes.less";
+@import "skins.minerva.content.styles/lists.less";
+@import "skins.minerva.content.styles/links.less";
+@import "skins.minerva.content.styles/text.less";
+@import "skins.minerva.content.styles/tables.less";
+@import "skins.minerva.content.styles/hacks.less";

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

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

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


[MediaWiki-commits] [Gerrit] Fix for 'timeline' format when _pageName is not the event title - change (mediawiki...Cargo)

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

Change subject: Fix for 'timeline' format when _pageName is not the event title
..


Fix for 'timeline' format when _pageName is not the event title

Change-Id: Ic31e302284db6021733c7ce7b32ff210c06d8387
---
M specials/CargoExport.php
1 file changed, 5 insertions(+), 5 deletions(-)

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



diff --git a/specials/CargoExport.php b/specials/CargoExport.php
index e215ba4..1269293 100644
--- a/specials/CargoExport.php
+++ b/specials/CargoExport.php
@@ -170,7 +170,6 @@
$queryResults = $sqlQuery->run();
 
foreach ( $queryResults as $queryResult ) {
-   $title = Title::newFromText( 
$queryResult['_pageName'] );
$eventDescription = '';
$firstField = true;
foreach ( $sqlQuery->mFieldDescriptions as 
$fieldName => $fieldDescription ) {
@@ -196,12 +195,13 @@
if ( array_key_exists( 'name', $queryResult ) ) 
{
$eventTitle = $queryResult['name'];
} else {
-   $eventTitle = reset( $queryResult );
-   }
-
-   $displayedArray[] = array(
// Get first field for the 'title' - not
// necessarily the page name.
+   $eventTitle = reset( $queryResult );
+   }
+   $title = Title::newFromText( $eventTitle );
+
+   $displayedArray[] = array(
'title' => $eventTitle,
'start' => $queryResult[$dateFields[0]],
'description' => $eventDescription,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic31e302284db6021733c7ce7b32ff210c06d8387
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 
Gerrit-Reviewer: Yaron Koren 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Fix for 'timeline' format when _pageName is not the event title - change (mediawiki...Cargo)

2015-07-29 Thread Yaron Koren (Code Review)
Yaron Koren has uploaded a new change for review.

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

Change subject: Fix for 'timeline' format when _pageName is not the event title
..

Fix for 'timeline' format when _pageName is not the event title

Change-Id: Ic31e302284db6021733c7ce7b32ff210c06d8387
---
M specials/CargoExport.php
1 file changed, 5 insertions(+), 5 deletions(-)


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

diff --git a/specials/CargoExport.php b/specials/CargoExport.php
index e215ba4..1269293 100644
--- a/specials/CargoExport.php
+++ b/specials/CargoExport.php
@@ -170,7 +170,6 @@
$queryResults = $sqlQuery->run();
 
foreach ( $queryResults as $queryResult ) {
-   $title = Title::newFromText( 
$queryResult['_pageName'] );
$eventDescription = '';
$firstField = true;
foreach ( $sqlQuery->mFieldDescriptions as 
$fieldName => $fieldDescription ) {
@@ -196,12 +195,13 @@
if ( array_key_exists( 'name', $queryResult ) ) 
{
$eventTitle = $queryResult['name'];
} else {
-   $eventTitle = reset( $queryResult );
-   }
-
-   $displayedArray[] = array(
// Get first field for the 'title' - not
// necessarily the page name.
+   $eventTitle = reset( $queryResult );
+   }
+   $title = Title::newFromText( $eventTitle );
+
+   $displayedArray[] = array(
'title' => $eventTitle,
'start' => $queryResult[$dateFields[0]],
'description' => $eventDescription,

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic31e302284db6021733c7ce7b32ff210c06d8387
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Cargo
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren 

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


[MediaWiki-commits] [Gerrit] build: Bump various devDependencies to latest - change (VisualEditor/VisualEditor)

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

Change subject: build: Bump various devDependencies to latest
..


build: Bump various devDependencies to latest

* grunt-contrib-csslint 0.4.0   ->  0.5.0
* grunt-css-url-embed   1.5.2   ->  1.6.1
* grunt-karma   0.10.1  ->  0.12.0
* karma 0.12.31 ->  0.13.3
* karma-chrome-launcher 0.1.8   ->  0.2.0
* karma-coverage0.3.1   ->  0.4.2
* karma-firefox-launcher0.1.4   ->  0.1.6
* karma-qunit   0.1.4   ->  0.1.5
* karma-sauce-launcher  0.2.10  ->  0.2.14

Change-Id: I80ed1aa6bfc364634e357896a6a339dcfe7243c1
---
M package.json
1 file changed, 9 insertions(+), 9 deletions(-)

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



diff --git a/package.json b/package.json
index 6536242..3985c50 100644
--- a/package.json
+++ b/package.json
@@ -25,20 +25,20 @@
 "grunt-contrib-clean": "0.6.0",
 "grunt-contrib-concat": "0.5.1",
 "grunt-contrib-copy": "0.8.0",
-"grunt-contrib-csslint": "0.4.0",
+"grunt-contrib-csslint": "0.5.0",
 "grunt-contrib-jshint": "0.11.2",
 "grunt-jsonlint": "1.0.4",
 "grunt-contrib-watch": "0.6.1",
-"grunt-css-url-embed": "1.5.2",
+"grunt-css-url-embed": "1.6.1",
 "grunt-cssjanus": "0.2.4",
 "grunt-jscs": "1.8.0",
-"grunt-karma": "0.10.1",
-"karma": "0.12.31",
-"karma-chrome-launcher": "0.1.8",
-"karma-coverage": "0.3.1",
-"karma-firefox-launcher": "0.1.4",
-"karma-qunit": "0.1.4",
-"karma-sauce-launcher": "0.2.10",
+"grunt-karma": "0.12.0",
+"karma": "0.13.3",
+"karma-chrome-launcher": "0.2.0",
+"karma-coverage": "0.4.2",
+"karma-firefox-launcher": "0.1.6",
+"karma-qunit": "0.1.5",
+"karma-sauce-launcher": "0.2.14",
 "qunitjs": "1.18.0"
   }
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80ed1aa6bfc364634e357896a6a339dcfe7243c1
Gerrit-PatchSet: 2
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Jforrester 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Allow customization of "Did you mean" suggestions - change (mediawiki...CirrusSearch)

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

Change subject: Allow customization of "Did you mean" suggestions
..


Allow customization of "Did you mean" suggestions

The settings used to build the suggest request are now configurable at runtime
with request URI parameters. These settings can be made persistent with the
'cirrus-didyoumean-settings' system message.

Bug: T106692
Change-Id: I10f5e6b1683d29e57d1a7ac23a48342bf26a64d3
---
M CirrusSearch.php
M i18n/en.json
M i18n/qqq.json
M includes/Hooks.php
M includes/Searcher.php
M tests/browser/features/did_you_mean_api.feature
M tests/browser/features/step_definitions/search_steps.rb
M tests/browser/features/support/hooks.rb
8 files changed, 216 insertions(+), 20 deletions(-)

Approvals:
  Cindy-the-browser-test-bot: Looks good to me, but someone else must approve
  EBernhardson: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/CirrusSearch.php b/CirrusSearch.php
index bd69af8..e8eea80 100644
--- a/CirrusSearch.php
+++ b/CirrusSearch.php
@@ -240,10 +240,62 @@
 // See max_errors on 
http://www.elasticsearch.org/guide/reference/api/search/suggest/
 $wgCirrusSearchPhraseSuggestMaxErrors = 2;
 
+// Set the hard limit for $wgCirrusSearchPhraseSuggestMaxErrors. This prevents 
customizing
+// this setting in a way that could hurt the system performances.
+$wgCirrusSearchPhraseSuggestMaxErrorsHardLimit = 2;
+
 // Confidence level required to suggest new phrases.
 // See confidence on 
http://www.elasticsearch.org/guide/reference/api/search/suggest/
 $wgCirrusSearchPhraseSuggestConfidence = 2.0;
 
+// The suggest mode used by the phrase suggester
+// can be :
+//  * missing: Only suggest terms in the suggest text that aren’t in the index.
+//  * popular: Only suggest suggestions that occur in more docs then the 
original
+// suggest text term.
+//  * always: Suggest any matching suggestions based on terms in the suggest 
text.
+$wgCirrusSearchPhraseSuggestMode = 'always';
+
+// List of allowed values for the suggest mode
+$wgCirrusSearchPhraseSuggestAllowedMode = array( 'missing', 'popular', 
'always' );
+
+
+// The max term freq used by the phrase suggester.
+// The maximum threshold in number of documents a suggest text token can exist 
in
+// order to be included. Can be a relative percentage number (e.g 0.4) or an 
absolute
+// number to represent document frequencies. If an value higher than 1 is 
specified
+// then fractional can not be specified. Defaults to 0.01f.
+// If a term appears in more then half the docs then don't try to correct it.  
This really
+// shouldn't kick in much because we're not looking for misspellings.  We're 
looking for phrases
+// that can be might off.  Like "noble prize" ->  "nobel prize".  In any case, 
the default was
+// 0.01 which way too frequently decided not to correct some terms.
+$wgCirrusSearchPhraseSuggestMaxTermFreq = 0.5;
+
+// Set the hard limit for $wgCirrusSearchPhraseMaxTermFreq. This prevents 
customizing
+// this setting in a way that could hurt the system performances.
+$wgCirrusSearchPhraseSugggestMaxTermFreqHardLimit = 0.6;
+
+// The max doc freq (shard level) used by the phrase suggester
+// The minimal threshold in number of documents a suggestion should appear in.
+// This can be specified as an absolute number or as a relative percentage of
+// number of documents. This can improve quality by only suggesting high 
frequency
+// terms. Defaults to 0f and is not enabled. If a value higher than 1 is 
specified
+// then the number cannot be fractional. The shard level document frequencies 
are
+// used for this option.
+// NOTE: this value is ignored if $wgCirrusSearchPhraseSuggestMode is always
+$wgCirrusSearchPhraseSuggestMinDocFreq = 0.0;
+
+// The prefix length used by the phrase suggester
+// The number of minimal prefix characters that must match in order be a 
candidate
+// suggestions. Defaults to 1. Increasing this number improves spellcheck 
performance.
+// Usually misspellings don’t occur in the beginning of terms.
+$wgCirrusSearchPhraseSuggestPrefixLength = 2;
+
+// Set the hard limit for $wgCirrusSearchPhraseSuggestPrefixLength. This 
prevents customizing
+// this setting in a way that could hurt the system performances.
+// (This is the minimal value)
+$wgCirrusSearchPhraseSuggestPrefixLengthHardLimit = 2;
+
 // Look for suggestions in the article text?  Changing this from false to true 
will
 // break search until you perform an in place index rebuild.  Changing it from 
true
 // to false is ok and then you can change it back to true so long as you 
_haven't_
diff --git a/i18n/en.json b/i18n/en.json
index 5ec1c81..ba372c8 100644
--- a/i18n/en.json
+++ b/i18n/en.json
@@ -20,5 +20,6 @@
"apihelp-cirrus-mapping-dump-description": "Dump of CirrusSearch 
mapping for this wiki.",
"apihelp-cirrus-settings-dump-description": "Dump of CirrusSearch 
settings for this wiki.",

[MediaWiki-commits] [Gerrit] HTMLForm: Correct documentation - change (mediawiki/core)

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

Change subject: HTMLForm: Correct documentation
..


HTMLForm: Correct documentation

Change-Id: I84f4d886907b2ae988956563fda48e78afb3cfa6
---
M includes/htmlform/HTMLForm.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/htmlform/HTMLForm.php b/includes/htmlform/HTMLForm.php
index b10d789..ac064bc 100644
--- a/includes/htmlform/HTMLForm.php
+++ b/includes/htmlform/HTMLForm.php
@@ -76,10 +76,10 @@
  *'size'-- the length of text fields
  *'filter-callback  -- a function name to give you the chance to
  * massage the inputted value before it's 
processed.
- * @see HTMLForm::filter()
+ * @see HTMLFormField::filter()
  *'validation-callback' -- a function name to give you the chance
  * to impose extra validation on the field input.
- * @see HTMLForm::validate()
+ * @see HTMLFormField::validate()
  *'name'-- By default, the 'name' attribute of the input 
field
  * is "wp{$fieldname}".  If you want a different 
name
  * (eg one without the "wp" prefix), specify it 
here and

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I84f4d886907b2ae988956563fda48e78afb3cfa6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Daniel Friesen 
Gerrit-Reviewer: Florianschmidtwelzow 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Decolonize 'viewsourcetext' and 'viewyourtext' messages - change (mediawiki/core)

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

Change subject: Decolonize 'viewsourcetext' and 'viewyourtext' messages
..


Decolonize 'viewsourcetext' and 'viewyourtext' messages

I think it reads better. A number of translations for this message
also use a full stop instead of the colon.

Change-Id: Ie39657f8308123bb14584cf18cf75e489683eca8
---
M languages/i18n/en.json
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/languages/i18n/en.json b/languages/i18n/en.json
index 97f1310..e9f7d8b 100644
--- a/languages/i18n/en.json
+++ b/languages/i18n/en.json
@@ -357,8 +357,8 @@
"actionthrottled": "Action throttled",
"actionthrottledtext": "As an anti-spam measure, you are limited from 
performing this action too many times in a short space of time, and you have 
exceeded this limit.\nPlease try again in a few minutes.",
"protectedpagetext": "This page has been protected to prevent editing 
or other actions.",
-   "viewsourcetext": "You can view and copy the source of this page:",
-   "viewyourtext": "You can view and copy the source of your 
edits to this page:",
+   "viewsourcetext": "You can view and copy the source of this page.",
+   "viewyourtext": "You can view and copy the source of your 
edits to this page.",
"protectedinterface": "This page provides interface text for the 
software on this wiki, and is protected to prevent abuse.\nTo add or change 
translations for all wikis, please use [//translatewiki.net/ 
translatewiki.net], the MediaWiki localisation project.",
"editinginterface": "Warning: You are editing a page 
that is used to provide interface text for the software.\nChanges to this page 
will affect the appearance of the user interface for other users on this wiki.",
"translateinterface": "To add or change translations for all wikis, 
please use [//translatewiki.net/ translatewiki.net], the MediaWiki localisation 
project.",

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie39657f8308123bb14584cf18cf75e489683eca8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add {ar, ca}wiki and remove ee-prototype in beta labs RB config - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Add {ar,ca}wiki and remove ee-prototype in beta labs RB config
..


Add {ar,ca}wiki and remove ee-prototype in beta labs RB config

Primarily a sync from the Parsoid config.

Bug: T107342
Change-Id: I693fffdc3ebf6a09917746a53800da1874b52bef
---
M modules/restbase/templates/config.labs.yaml.erb
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Ori.livneh: Verified; Looks good to me, approved
  Catrope: Looks good to me, approved



diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index a2efd1d..4dc738c 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -154,10 +154,11 @@
   paths:
 # list taken from Parsoid's beta config
 /{domain:aa.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
+/{domain:ar.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
+/{domain:ca.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:commons.wikimedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:deployment.wikimedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:de.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
-/{domain:ee-prototype.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en-rtl.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en.wikibooks.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en.wikinews.beta.wmflabs.org}: *wp/default/1.0.0

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I693fffdc3ebf6a09917746a53800da1874b52bef
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: GWicke 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: Yuvipanda 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Debug logging for T102199 - change (mediawiki/core)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Debug logging for T102199
..


Debug logging for T102199

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

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/Message.php b/includes/Message.php
index 54abfd1..0f1db6c 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -251,6 +251,11 @@
throw new InvalidArgumentException( '$key must be a 
string or an array' );
}
 
+   // Debug logging for T102199. --OL, 29-Jul-2015
+   if ( $key === 'session_fail_preview_html' || $key === 
'session_fail_preview' ) {
+   wfDebugLog( 'redis',  wfHostname() . ' session fail' );
+   }
+
$this->keysToTry = (array)$key;
 
if ( empty( $this->keysToTry ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic505045373e8c27ccd3f01a3f7d1bc112ed2e2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Debug logging for T102199 - change (mediawiki/core)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Debug logging for T102199
..

Debug logging for T102199

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/23/227923/1

diff --git a/includes/Message.php b/includes/Message.php
index 54abfd1..0f1db6c 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -251,6 +251,11 @@
throw new InvalidArgumentException( '$key must be a 
string or an array' );
}
 
+   // Debug logging for T102199. --OL, 29-Jul-2015
+   if ( $key === 'session_fail_preview_html' || $key === 
'session_fail_preview' ) {
+   wfDebugLog( 'redis',  wfHostname() . ' session fail' );
+   }
+
$this->keysToTry = (array)$key;
 
if ( empty( $this->keysToTry ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic505045373e8c27ccd3f01a3f7d1bc112ed2e2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf15
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] HHVM: Limit wall execution time of FCGI reqs to 145s - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: HHVM: Limit wall execution time of FCGI reqs to 145s
..

HHVM: Limit wall execution time of FCGI reqs to 145s

Follow-up for I1fa012ca1.

Change-Id: Ia5a30b7a03c9232dc5041935b13960c353116b29
---
M modules/hhvm/manifests/init.pp
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/22/227922/1

diff --git a/modules/hhvm/manifests/init.pp b/modules/hhvm/manifests/init.pp
index fdf1673..809c260 100644
--- a/modules/hhvm/manifests/init.pp
+++ b/modules/hhvm/manifests/init.pp
@@ -142,7 +142,8 @@
 # Specify a maximum execution time of 290 wall-clock seconds.
 # This is scandalously high, but we must wean ourselves from
 # bad habits in stages. -- Ori, 24-Apr-2015.
-$max_execution_time = 290
+# Halved to 145. -- Ori, 29-Jul-2015
+$max_execution_time = 145
 
 $fcgi_defaults = {
 memory_limit   => '500M',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia5a30b7a03c9232dc5041935b13960c353116b29
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] docparser: Add rudimentary error handling - change (oojs/ui)

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

Change subject: docparser: Add rudimentary error handling
..


docparser: Add rudimentary error handling

I know you've all been waiting for this.

* Detect invalid input before it explodes the script, outputting the
  problematic file name and code snippet (no line numbers though).
* Exit with error code if invalid input found to continue failing the
  job when something's wrong.
* Do not immediately die after encountering invalid input; complain
  about it, ignore, and continue to find all invalid things at once.

Change-Id: Idfda8eee1805df7e1734bb9ce175f2a3652be80f
---
M .rubocop.yml
M bin/docparser.rb
2 files changed, 56 insertions(+), 20 deletions(-)

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



diff --git a/.rubocop.yml b/.rubocop.yml
index fb491a3..a1b33cc 100644
--- a/.rubocop.yml
+++ b/.rubocop.yml
@@ -15,6 +15,10 @@
 Metrics/PerceivedComplexity:
   Enabled: false
 
+# Maybe I'll rewrite the code one day. This is not a Ruby project, this just 
has to work.
+Style/GlobalVars:
+  Enabled: false
+
 # I like my Unicode, thankyouverymuch.
 Style/AsciiComments:
   Enabled: false
@@ -22,6 +26,8 @@
 # Opinions differ.
 Style/Blocks:
   Enabled: false
+Style/NegatedIf:
+  Enabled: false
 Style/Tab:
   Enabled: false
 Style/IndentArray:
diff --git a/bin/docparser.rb b/bin/docparser.rb
index 9f58549..64bbf81 100644
--- a/bin/docparser.rb
+++ b/bin/docparser.rb
@@ -1,6 +1,12 @@
 require 'pp'
 require 'json'
 
+$bad_input = false
+def bad_input file, text
+   $bad_input = true
+   $stderr.puts "#{file}: unrecognized input: #{text}"
+end
+
 def parse_dir dirname
Dir.entries(dirname).map{|filename|
if filename == '.' || filename == '..'
@@ -63,13 +69,13 @@
ignore = false
 
comment, code_line = d.split '*/'
-   comment.split("\n").each{|c|
-   next if c.strip == '/**'
-   c.sub!(/^[ \t]*\*[ \t]?/, '') # strip leading *
+   comment.split("\n").each{|comment_line|
+   next if comment_line.strip == '/**'
+   comment_line.sub!(/^[ \t]*\*[ \t]?/, '') # strip 
leading '*' and whitespace
 
-   m = c.match(/^@(\w+)[ \t]*(.*)/)
-   unless m
-   previous_item[:description] << c + "\n"
+   m = comment_line.match(/^@(\w+)[ \t]*(.*)/)
+   if !m
+   previous_item[:description] << comment_line + 
"\n"
next
end
 
@@ -93,11 +99,13 @@
when 'property', 'var'
kind = :property
m = content.match(/^\{?(.+?)\}?( .+)?$/)
-   if m.captures
-   type, description = m.captures
-   data[:type] = type
-   data[:description] = description if 
description
+   if !m
+   bad_input filename, comment_line
+   next
end
+   type, description = m.captures
+   data[:type] = type
+   data[:description] = description if description
when 'event'
kind = :event
data[:name] = content.strip
@@ -124,20 +132,28 @@
end
end
when 'cfg' # JS only
-   type, name, default, description = 
content.match(/^\{(.+?)\} \[?([\w.$]+?)(?:=(.+?))?\]?( .+)?$/).captures
+   m = content.match(/^\{(.+?)\} 
\[?([\w.$]+?)(?:=(.+?))?\]?( .+)?$/)
+   if !m
+   bad_input filename, comment_line
+   next
+   end
+   type, name, default, description = m.captures
data[:config] << {name: name, type: 
cleanup_class_name(type), description: description || '', default: default}
previous_item = data[:config][-1]
when 'return'
case filetype
when :js
-   type, description = 
content.match(/^\{(.+?)\}( .+)?$/).captures
-   data[:return] = {type: 
cleanup_class_name(type), description: description || ''}
-   previo

[MediaWiki-commits] [Gerrit] Debug logging for T102199 - change (mediawiki/core)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Debug logging for T102199
..


Debug logging for T102199

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

Approvals:
  Ori.livneh: Verified; Looks good to me, approved



diff --git a/includes/Message.php b/includes/Message.php
index 54abfd1..0f1db6c 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -251,6 +251,11 @@
throw new InvalidArgumentException( '$key must be a 
string or an array' );
}
 
+   // Debug logging for T102199. --OL, 29-Jul-2015
+   if ( $key === 'session_fail_preview_html' || $key === 
'session_fail_preview' ) {
+   wfDebugLog( 'redis',  wfHostname() . ' session fail' );
+   }
+
$this->keysToTry = (array)$key;
 
if ( empty( $this->keysToTry ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic505045373e8c27ccd3f01a3f7d1bc112ed2e2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Debug logging for T102199 - change (mediawiki/core)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Debug logging for T102199
..

Debug logging for T102199

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/21/227921/1

diff --git a/includes/Message.php b/includes/Message.php
index 54abfd1..0f1db6c 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -251,6 +251,11 @@
throw new InvalidArgumentException( '$key must be a 
string or an array' );
}
 
+   // Debug logging for T102199. --OL, 29-Jul-2015
+   if ( $key === 'session_fail_preview_html' || $key === 
'session_fail_preview' ) {
+   wfDebugLog( 'redis',  wfHostname() . ' session fail' );
+   }
+
$this->keysToTry = (array)$key;
 
if ( empty( $this->keysToTry ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic505045373e8c27ccd3f01a3f7d1bc112ed2e2fe
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: wmf/1.26wmf16
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Debug logging for T102199 - change (mediawiki/core)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Debug logging for T102199
..

Debug logging for T102199

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/227920/1

diff --git a/includes/Message.php b/includes/Message.php
index 54abfd1..0f1db6c 100644
--- a/includes/Message.php
+++ b/includes/Message.php
@@ -251,6 +251,11 @@
throw new InvalidArgumentException( '$key must be a 
string or an array' );
}
 
+   // Debug logging for T102199. --OL, 29-Jul-2015
+   if ( $key === 'session_fail_preview_html' || $key === 
'session_fail_preview' ) {
+   wfDebugLog( 'redis',  wfHostname() . ' session fail' );
+   }
+
$this->keysToTry = (array)$key;
 
if ( empty( $this->keysToTry ) ) {

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

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

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


[MediaWiki-commits] [Gerrit] Add ferm rules for Kibana - change (operations/puppet)

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

Change subject: Add ferm rules for Kibana
..


Add ferm rules for Kibana

Bug: T104939
Change-Id: Iaac1cd1ce2ebb716f0c1b12f24837b2589f2f88e
---
M manifests/role/kibana.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/kibana.pp b/manifests/role/kibana.pp
index ac08937..2604fdd 100644
--- a/manifests/role/kibana.pp
+++ b/manifests/role/kibana.pp
@@ -74,6 +74,12 @@
 include ::apache::mod::proxy_http
 include ::apache::mod::rewrite
 
+ferm::service { 'kibana_frontend':
+proto  => 'tcp',
+port   => 80,
+srange => '$INTERNAL',
+}
+
 apache::site { $hostname:
 content => template('kibana/apache.conf.erb'),
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iaac1cd1ce2ebb716f0c1b12f24837b2589f2f88e
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Filippo Giunchedi 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2c7a42f..08a9551 - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 2c7a42f..08a9551
..


Syncronize VisualEditor: 2c7a42f..08a9551

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

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



diff --git a/VisualEditor b/VisualEditor
index 2c7a42f..08a9551 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2c7a42fff98f25424f01e13e29b125ad278e0157
+Subproject commit 08a9551c845cea85f27f3d7259d56b650ec6c774

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 2c7a42f..08a9551 - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 2c7a42f..08a9551
..

Syncronize VisualEditor: 2c7a42f..08a9551

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


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

diff --git a/VisualEditor b/VisualEditor
index 2c7a42f..08a9551 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 2c7a42fff98f25424f01e13e29b125ad278e0157
+Subproject commit 08a9551c845cea85f27f3d7259d56b650ec6c774

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

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

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


[MediaWiki-commits] [Gerrit] MobileArticleTarget: Collapse text style buttons - change (mediawiki...VisualEditor)

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

Change subject: MobileArticleTarget: Collapse text style buttons
..


MobileArticleTarget: Collapse text style buttons

B/I doesn't fit with link & cite on a iPhone 6

Change-Id: Ib23b2f8540425ee5d8265f369aea250e900a0c5f
---
M modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js
1 file changed, 11 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js 
b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js
index 2925a9f..0fd5126 100644
--- a/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js
+++ b/modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js
@@ -46,7 +46,17 @@
// Link
{ include: [ 'back' ] },
// Style
-   { include: [ 'bold', 'italic' ] },
+   {
+   classes: [ 've-test-toolbar-style' ],
+   type: 'list',
+   icon: 'textStyle',
+   indicator: 'down',
+   title: OO.ui.deferMsg( 'visualeditor-toolbar-style-tooltip' ),
+   include: [ { group: 'textStyle' }, 'language', 'clear' ],
+   forceExpand: [ 'bold', 'italic', 'clear' ],
+   promote: [ 'bold', 'italic' ],
+   demote: [ 'strikethrough', 'code', 'underline', 'language', 
'clear' ]
+   },
// Link
{ include: [ 'link' ] },
// Cite

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

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

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


[MediaWiki-commits] [Gerrit] Add ferm rules for mariadb labsdb - change (operations/puppet)

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

Change subject: Add ferm rules for mariadb labsdb
..


Add ferm rules for mariadb labsdb

Bug: T104699
Change-Id: Ib729303ef25da9c427618bbd6fa2fef88c656c8a
---
M manifests/role/mariadb.pp
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index 91e5928..edeeb6e 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -504,6 +504,12 @@
 mode   => '0755',
 }
 
+ferm::service{ 'mariadb-labsdb':
+proto  => 'tcp',
+port   => 3306,
+srange => '$INTERNAL',
+}
+
 # Required for TokuDB to start
 # See 
https://mariadb.com/kb/en/mariadb/enabling-tokudb/#check-for-transparent-hugepage-support-on-linux
 sysfs::parameters { 'disable-transparent-hugepages':

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib729303ef25da9c427618bbd6fa2fef88c656c8a
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: Jcrespo 
Gerrit-Reviewer: Springle 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Add {ar, ca}wiki and remove ee-prototype in beta labs RB config - change (operations/puppet)

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

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

Change subject: Add {ar,ca}wiki and remove ee-prototype in beta labs RB config
..

Add {ar,ca}wiki and remove ee-prototype in beta labs RB config

Primarily a sync from the Parsoid config.

Change-Id: I693fffdc3ebf6a09917746a53800da1874b52bef
---
M modules/restbase/templates/config.labs.yaml.erb
1 file changed, 2 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/18/227918/1

diff --git a/modules/restbase/templates/config.labs.yaml.erb 
b/modules/restbase/templates/config.labs.yaml.erb
index a2efd1d..4dc738c 100644
--- a/modules/restbase/templates/config.labs.yaml.erb
+++ b/modules/restbase/templates/config.labs.yaml.erb
@@ -154,10 +154,11 @@
   paths:
 # list taken from Parsoid's beta config
 /{domain:aa.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
+/{domain:ar.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
+/{domain:ca.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:commons.wikimedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:deployment.wikimedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:de.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
-/{domain:ee-prototype.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en-rtl.wikipedia.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en.wikibooks.beta.wmflabs.org}: *wp/default/1.0.0
 /{domain:en.wikinews.beta.wmflabs.org}: *wp/default/1.0.0

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 9f20acf..2c7a42f - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 9f20acf..2c7a42f
..


Syncronize VisualEditor: 9f20acf..2c7a42f

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

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



diff --git a/VisualEditor b/VisualEditor
index 9f20acf..2c7a42f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 9f20acfc9a3905f7c0202b4a90874f92b9964157
+Subproject commit 2c7a42fff98f25424f01e13e29b125ad278e0157

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

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

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


[MediaWiki-commits] [Gerrit] Settings dialog: Focus redirect target input when redirect i... - change (mediawiki...VisualEditor)

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

Change subject: Settings dialog: Focus redirect target input when redirect is 
enabled
..


Settings dialog: Focus redirect target input when redirect is enabled

Bug: T106616
Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
---
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
1 file changed, 3 insertions(+), 1 deletion(-)

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



diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
index 371a695..3ac4f37 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
@@ -196,7 +196,9 @@
 ve.ui.MWSettingsPage.prototype.onEnableRedirectChange = function ( value ) {
this.redirectTargetInput.setDisabled( !value );
this.enableStaticRedirectInput.setDisabled( !value );
-   if ( !value ) {
+   if ( value ) {
+   this.redirectTargetInput.focus();
+   } else {
this.redirectTargetInput.setValue( '' );
this.enableStaticRedirectInput.setSelected( false );
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 9f20acf..2c7a42f - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 9f20acf..2c7a42f
..

Syncronize VisualEditor: 9f20acf..2c7a42f

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


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

diff --git a/VisualEditor b/VisualEditor
index 9f20acf..2c7a42f 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 9f20acfc9a3905f7c0202b4a90874f92b9964157
+Subproject commit 2c7a42fff98f25424f01e13e29b125ad278e0157

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

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

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


[MediaWiki-commits] [Gerrit] Test script to delete pages created by browser suite - change (mediawiki...CirrusSearch)

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

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

Change subject: Test script to delete pages created by browser suite
..

Test script to delete pages created by browser suite

Change-Id: Ia801b8c0e72f3352fbb29597d11b9183e87ae642
---
A tests/jenkins/deleteBrowserTestPages.php
1 file changed, 78 insertions(+), 0 deletions(-)


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

diff --git a/tests/jenkins/deleteBrowserTestPages.php 
b/tests/jenkins/deleteBrowserTestPages.php
new file mode 100644
index 000..3b9fe0e
--- /dev/null
+++ b/tests/jenkins/deleteBrowserTestPages.php
@@ -0,0 +1,78 @@
+http://www.gnu.org/copyleft/gpl.html
+ */
+
+$IP = getenv( 'MW_INSTALL_PATH' );
+if( $IP === false ) {
+   $IP = __DIR__ . '/../../../..';
+}
+require_once( "$IP/maintenance/Maintenance.php" );
+
+class DeleteBrowserTestPages extends Maintenance {
+   public function execute() {
+   $pattern = implode( '|', array(
+   'IAmABad RedirectChain',
+   'IAmABad RedirectSelf',
+   'IDontExistLink',
+   'IDontExistRdir',
+   'IDontExistRdirLinked',
+   'ILinkIRedirectToNonExistentPages',
+   'ILinkToNonExistentPages',
+   'IRedirectToNonExistentPages',
+   'IRedirectToNonExistentPagesLinked',
+   'Move',
+   'PreferRecent First exists with contents ',
+   'PreferRecent Second Second exists with contents ',
+   'PreferRecent Third exists with contents ',
+   'ReallyLongLink',
+   'StartsAsRedirect',
+   'ToBeRedirect',
+   'WeightedLink',
+   'WeightedLinkRdir',
+   'WeightedLinkRemoveUpdate',
+   'WLDoubleRdir',
+   'WLRURdir',
+   ) );
+   $pattern = "/$pattern/";
+
+   $dbw = wfGetDB( DB_MASTER );
+   $user = \User::newFromName( 'Admin' );
+   $it = new \EchoBatchRowIterator( $dbw, 'page', 'page_id', 500 );
+   $it->setFetchColumns( array( '*' ) );
+   $it = new \RecursiveIteratorIterator( $it );
+   foreach ( $it as $row ) {
+   if ( preg_match( $pattern, $row->page_title ) !== 1 ) {
+   continue;
+   }
+   $title = \Title::newFromRow( $row );
+   $pageObj = \WikiPage::factory( $title );
+   echo "Deleting page $title\n";
+   $pageObj->doDeleteArticleReal( 'cirrussearch maint 
task' );
+   }
+   }
+}
+
+$maintClass = "CirrusSearch\Jenkins\DeleteBrowserTestPages";
+require_once RUN_MAINTENANCE_IF_MAIN;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia801b8c0e72f3352fbb29597d11b9183e87ae642
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] labstore: Make create-dbusers create users for users too - change (operations/puppet)

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

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

Change subject: labstore: Make create-dbusers create users for users too
..

labstore: Make create-dbusers create users for users too

A very hacky and non-performant ldap query here, but that should
be ok for now.

Bug: T104453
Change-Id: I2fd24e6048bd409b138b0804d9f19b09e42a25f0
---
M modules/labstore/files/create-dbusers
1 file changed, 58 insertions(+), 19 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/15/227915/1

diff --git a/modules/labstore/files/create-dbusers 
b/modules/labstore/files/create-dbusers
index a4ad4e8..e47c93b 100755
--- a/modules/labstore/files/create-dbusers
+++ b/modules/labstore/files/create-dbusers
@@ -26,10 +26,11 @@
 
 
 class User:
-def __init__(self, project, name, uid):
+def __init__(self, project, name, uid, kind):
 self.project = project
 self.name = name
 self.uid = int(uid)
+self.kind = kind  # either 'user' or 'servicegroup'
 
 @property
 def db_username(self):
@@ -38,11 +39,23 @@
 
 Guaranteed to be of the form (s|u)\d+
 """
-return 's%s' % self.uid
+prefix = 'u' if self.kind == 'user' else 's'
+return prefix + str(self.uid)
+
+@property
+def homedir(self):
+prefix = '/srv/project/%s' % self.project
+if self.kind == 'user':
+return os.path.join(prefix, 'home', self.name.lower())
+else:
+return os.path.join(
+prefix, 'project',
+re.sub(r'^%s\.' % self.project, '', self.name.lower())
+)
 
 def __repr__(self):
-return "User(name=%s, uid=%s)" % (
-self.name, self.uid)
+return "%s(name=%s, uid=%s)" % (
+self.kind, self.name, self.uid)
 
 @classmethod
 def from_ldap_servicegroups(cls, conn, projectname):
@@ -55,7 +68,36 @@
 users = []
 for resp in conn.response:
 attrs = resp['attributes']
-users.append(cls(projectname, attrs['cn'][0], 
attrs['uidNumber'][0]))
+users.append(cls(projectname, attrs['cn'][0], 
attrs['uidNumber'][0], 'servicegroup'))
+
+return users
+
+@classmethod
+def from_ldap_users(cls, conn, projectname):
+conn.search(
+'ou=projects,dc=wikimedia,dc=org',
+'(cn=%s)' % projectname,
+ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
+attributes=['member']
+)
+users = []
+members = conn.response[0]['attributes']['member']
+for member in members:
+# FIXME: Stupid hack
+search_string = member.replace(',ou=people,dc=wikimedia,dc=org', 
'')
+conn.search(
+'ou=people,dc=wikimedia,dc=org',
+'(%s)'% search_string,
+ldap3.SEARCH_SCOPE_WHOLE_SUBTREE,
+attributes=['uidNumber', 'cn']
+)
+attrs = conn.response[0]['attributes']
+users.append(cls(
+projectname,
+attrs['cn'][0],
+attrs['uidNumber'][0],
+'user'
+))
 
 return users
 
@@ -103,7 +145,7 @@
 # and not just return the value as a string directly
 replica_buffer = io.StringIO()
 replica_config.write(replica_buffer)
-sg.write_user_file(path, replica_buffer.getvalue())
+user.write_user_file(path, replica_buffer.getvalue())
 
 def check_user_exists(self, user):
 exists = True
@@ -168,22 +210,19 @@
 
 while True:
 logging.info('Starting createdb-users run')
+users = User.from_ldap_users(conn, args.project)
 servicegroups = User.from_ldap_servicegroups(conn, args.project)
-for sg in servicegroups:
-# FIXME: for non tools/maps projects this path is different
-home_path = os.path.join(
-'/srv/project/', sg.project, 'project',
-re.sub(r'^%s\.' % sg.project, '', sg.name)
-)
-replica_path = os.path.join(home_path, 'replica.my.cnf')
-if os.path.exists(home_path) and not os.path.exists(replica_path):
-if not cgen.check_user_exists(sg):
+all_users = users + servicegroups
+for u in all_users:
+replica_path = os.path.join(u.homedir, 'replica.my.cnf')
+if os.path.exists(u.homedir) and not os.path.exists(replica_path):
+if not cgen.check_user_exists(u):
 # No replica.my.cnf and no user in db
 # Generate new creds and put them in there!
-logging.info('Creating DB accounts for %s with db username 
%s', sg.name, sg.db_username)
-cgen.write_credentials_file(replica_path, sg)
-logging.info("Created replica.m

[MediaWiki-commits] [Gerrit] Refactor tooltip patch that removes tags - change (mediawiki...SecurePoll)

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

Change subject: Refactor tooltip patch that removes  tags
..


Refactor tooltip patch that removes  tags

Bug: T32399
Change-Id: If41f90b5e94b41fe2bc4bfe148542fb0cdcd31ba
---
M includes/ballots/RadioRangeBallot.php
1 file changed, 2 insertions(+), 2 deletions(-)

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



diff --git a/includes/ballots/RadioRangeBallot.php 
b/includes/ballots/RadioRangeBallot.php
index 48f854e..0244e50 100644
--- a/includes/ballots/RadioRangeBallot.php
+++ b/includes/ballots/RadioRangeBallot.php
@@ -163,7 +163,7 @@
if ( $useMessageLabels ) {
foreach ( $scores as $score ) {
$signedScore = $this->addSign( $question, 
$score );
-   $labels[$score] = $question->parseMessage( 
"column$signedScore" );
+   $labels[$score] = 
$question->parseMessageInline( "column$signedScore" );
}
} else {
global $wgLang;
@@ -234,7 +234,7 @@
$s .=
Xml::tags( 'td', array(),
Xml::radio( $inputId, $score, 
!strcmp( $oldValue, $score ),
-   array( 'title' => 
Sanitizer::stripAllTags( $label ) ) )
+   array( 'title' => 
$label ) )
) . "\n";
}
$s .= "\n";

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If41f90b5e94b41fe2bc4bfe148542fb0cdcd31ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Fhocutt 
Gerrit-Reviewer: Bartosz Dziewoński 
Gerrit-Reviewer: Kaldari 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] resourceloader: Restore minification for 'user' and 'site' m... - change (mediawiki/core)

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

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

Change subject: resourceloader: Restore minification for 'user' and 'site' 
module
..

resourceloader: Restore minification for 'user' and 'site' module

Follows-up 19a40cd3ad, Id599b6be4.

TODO: Change minification to happen per-module instead of per-request so that
these hacks aren't needed (T107377).

Change-Id: Iaa281ee117f2ae7a51884d256dfbb1807224fc52
---
M includes/resourceloader/ResourceLoader.php
1 file changed, 13 insertions(+), 6 deletions(-)


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

diff --git a/includes/resourceloader/ResourceLoader.php 
b/includes/resourceloader/ResourceLoader.php
index 7875048..77f2a2a 100644
--- a/includes/resourceloader/ResourceLoader.php
+++ b/includes/resourceloader/ResourceLoader.php
@@ -204,7 +204,7 @@
}
 
if ( !$options['cache'] ) {
-   $result = $this->applyFilter( $filter, $data );
+   $result = self::applyFilter( $filter, $data, 
$this->config );
} else {
$key = wfGlobalCacheKey( 'resourceloader', 'filter', 
$filter, self::$filterCacheVersion, md5( $data ) );
$cache = wfGetCache( wfIsHHVM() ? CACHE_ACCEL : 
CACHE_ANYTHING );
@@ -218,7 +218,7 @@
$stats = RequestContext::getMain()->getStats();
$statStart = microtime( true );
 
-   $result = $this->applyFilter( $filter, $data );
+   $result = self::applyFilter( $filter, $data, 
$this->config );
 
$stats->timing( 
"resourceloader_cache.$filter.miss", microtime( true ) - $statStart );
if ( $options['cacheReport'] ) {
@@ -238,12 +238,12 @@
return $result;
}
 
-   private function applyFilter( $filter, $data ) {
+   private static function applyFilter( $filter, $data, Config $config ) {
switch ( $filter ) {
case 'minify-js':
return JavaScriptMinifier::minify( $data,
-   $this->config->get( 
'ResourceLoaderMinifierStatementsOnOwnLine' ),
-   $this->config->get( 
'ResourceLoaderMinifierMaxLineLength' )
+   $config->get( 
'ResourceLoaderMinifierStatementsOnOwnLine' ),
+   $config->get( 
'ResourceLoaderMinifierMaxLineLength' )
);
case 'minify-css':
return CSSMin::minify( $data );
@@ -1107,7 +1107,14 @@
if ( is_string( $scripts ) ) {
// Site and user module are a legacy scripts that run 
in the global scope (no closure).
// Transportation as string instructs 
mw.loader.implement to use globalEval.
-   if ( $name !== 'site' && $name !== 'user' ) {
+   if ( $name === 'site' || $name === 'user' ) {
+   // Minify manually because the general 
makeModuleResponse() minification won't be
+   // effective here due to the script being a 
string instead of a function. (T107377)
+   if ( !ResourceLoader::inDebugMode() ) {
+   $scripts = self::applyFilter( 
'minify-js', $scripts,
+   
ConfigFactory::getDefaultInstance()->makeConfig( 'main' ) );
+   }
+   } else {
$scripts = new XmlJsCode( "function ( $, jQuery 
) {\n{$scripts}\n}" );
}
} elseif ( !is_array( $scripts ) ) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iaa281ee117f2ae7a51884d256dfbb1807224fc52
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] Syncronize VisualEditor: f616edd..9f20acf - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: f616edd..9f20acf
..

Syncronize VisualEditor: f616edd..9f20acf

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/13/227913/1

diff --git a/VisualEditor b/VisualEditor
index f616edd..9f20acf 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f616edd3105212d915b5eda2b06ac7efd0f5be83
+Subproject commit 9f20acfc9a3905f7c0202b4a90874f92b9964157

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

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

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


[MediaWiki-commits] [Gerrit] [BREAKING CHANGE] Bring in some code from MobileFrontend - change (mediawiki...VisualEditor)

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

Change subject: [BREAKING CHANGE] Bring in some code from MobileFrontend
..


[BREAKING CHANGE] Bring in some code from MobileFrontend

* Bring in back button & save button from MobileFrontend
  so they are properly styled OOUI widgets
* Accordingly, move toolbar save button code up into base
  MW target.

Bug: T96186
Change-Id: Ic89dd4efb831fc3b09980da16524276f6568619d
---
M extension.json
M modules/ve-mw/i18n/en.json
M modules/ve-mw/i18n/qqq.json
M modules/ve-mw/init/styles/ve.init.mw.MobileArticleTarget.css
M modules/ve-mw/init/targets/ve.init.mw.DesktopArticleTarget.js
M modules/ve-mw/init/targets/ve.init.mw.MobileArticleTarget.js
M modules/ve-mw/init/ve.init.mw.Target.js
7 files changed, 146 insertions(+), 66 deletions(-)

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



diff --git a/extension.json b/extension.json
index 640c9d1..e5bb520 100644
--- a/extension.json
+++ b/extension.json
@@ -960,6 +960,7 @@
"mediawiki.widgets"
],
"messages": [
+   "visualeditor-backbutton-tooltip",
"visualeditor-beta-label",
"visualeditor-beta-warning",
"visualeditor-browserwarning",
@@ -1006,6 +1007,7 @@
"visualeditor-recreate",
"visualeditor-toolbar-cite-label",
"visualeditor-toolbar-savedialog",
+   "visualeditor-toolbar-savedialog-short",
"visualeditor-version-label",
"visualeditor-viewpage-savewarning",
"visualeditor-viewpage-savewarning-discard",
diff --git a/modules/ve-mw/i18n/en.json b/modules/ve-mw/i18n/en.json
index c356264..1385ab4 100644
--- a/modules/ve-mw/i18n/en.json
+++ b/modules/ve-mw/i18n/en.json
@@ -49,6 +49,7 @@
"tooltip-ca-ve-edit": "Edit this page",
"visualeditor-advancedsettings-tool": "Advanced settings",
"visualeditor-annotationbutton-linknode-tooltip": "Simple link",
+   "visualeditor-backbutton-tooltip": "Go back",
"visualeditor-beta-appendix": "beta",
"visualeditor-beta-label": "beta",
"visualeditor-beta-warning": "This editor is in 'beta'. To switch to 
source editing at any time without losing your changes, open the dropdown next 
to \"{{int:visualeditor-toolbar-savedialog}}\" and select 
\"{{int:visualeditor-mweditmodesource-tool}}\".",
@@ -303,6 +304,7 @@
"visualeditor-timeout":"It looks like this editor is currently 
unavailable. Would you like to edit in source mode instead?",
"visualeditor-toolbar-cite-label": "Cite",
"visualeditor-toolbar-savedialog": "Save page",
+   "visualeditor-toolbar-savedialog-short": "Save",
"visualeditor-usernamespacepagelink": "Project:User namespace",
"visualeditor-version-label": "Version",
"visualeditor-viewpage-savewarning": "Are you sure you want to go back 
to view mode without saving first?",
diff --git a/modules/ve-mw/i18n/qqq.json b/modules/ve-mw/i18n/qqq.json
index d1543eb..bdd050d 100644
--- a/modules/ve-mw/i18n/qqq.json
+++ b/modules/ve-mw/i18n/qqq.json
@@ -58,6 +58,7 @@
"tooltip-ca-ve-edit": "Tooltip of the dedicated VisualEditor \"Edit\" 
tab.\n{{Identical|Edit this page}}",
"visualeditor-advancedsettings-tool": "Tool for opening the advanced 
settings section of the meta dialog.\n{{Identical|Advanced settings}}",
"visualeditor-annotationbutton-linknode-tooltip": "Tooltip text for 
link button for auto-numbered, labelless, external links.\n\nSee also:\n* 
{{msg-mw|Visualeditor-linknodeinspector-title}}\n{{Related|Visualeditor-annotationbutton}}",
+   "visualeditor-backbutton-tooltip": "Tooltip text for back button taking 
user to reading mode and closing the editor.",
"visualeditor-beta-appendix": "Used in 
{{msg-mw|Guidedtour-tour-firsteditve-edit-page-description}}.\n{{Identical|Beta}}",
"visualeditor-beta-label": "Text of tool in the toolbar that highlights 
that VisualEditor is still in beta.\n{{Identical|Beta}}",
"visualeditor-beta-warning": "Note shown when user clicks on 'beta' 
label in VisualEditor, warning users that the software may have 
issues.\n\nRefers to:\n* {{msg-mw|Visualeditor-toolbar-savedialog}}\n* 
{{msg-mw|Visualeditor-mweditmodesource-tool}}\nSee also:\n* 
{{msg-mw|Visualeditor-wikitext-warning}}",
@@ -312,6 +313,7 @@
"visualeditor-timeout": "Text (JavaScript confirm()) shown when the 
editor fails to load properly due to a 504 Gateway Timeout error.",
"visualeditor-toolbar-cite-label": "Label text for the toolbar button 
for inserting customized references.\n{{Identical|Cite}}",

[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: f616edd..9f20acf - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: f616edd..9f20acf
..


Syncronize VisualEditor: f616edd..9f20acf

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

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



diff --git a/VisualEditor b/VisualEditor
index f616edd..9f20acf 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit f616edd3105212d915b5eda2b06ac7efd0f5be83
+Subproject commit 9f20acfc9a3905f7c0202b4a90874f92b9964157

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

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

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


[MediaWiki-commits] [Gerrit] [WIP] resourceloader: Ensure 'user' loads after 'site' (asyn... - change (mediawiki/core)

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

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

Change subject: [WIP] resourceloader: Ensure 'user' loads after 'site' 
(asynchronously)
..

[WIP] resourceloader: Ensure 'user' loads after 'site' (asynchronously)

Regression from 19a40cd3ad which made the 'site' module load asynchronously,
but the 'user' module was still loaded synchronously which meant it ran before
the site module finished.

Full test script at .

Also:
* This changes the 'user' module to load asynchronously.
* Similar to 19a40cd3ad for site module, this makes the styles for the user
  module load twice. Harmless but doesn't look pretty internally.
* Remove the obsolete XXX-comment from 0b5389d98d (r56770).
* Add comment documenting the fact that the 'excludepages' feature can cause
  User/common.js and User/vector.js to be mis-ordered when the user previews
  common.js edits. This has always been the case (since 2009) and is merely
  being documented here.

Bug: T32358
Bug: T106736
Bug: T102077
Change-Id: Id599b6be42613529fb7f4dd3273f36ccadb3a09e
---
M includes/OutputPage.php
M includes/resourceloader/ResourceLoader.php
M resources/src/mediawiki/mediawiki.js
3 files changed, 40 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/12/227912/1

diff --git a/includes/OutputPage.php b/includes/OutputPage.php
index 1c76f0b..e2caf80 100644
--- a/includes/OutputPage.php
+++ b/includes/OutputPage.php
@@ -3067,28 +3067,42 @@
$links[] = "\n" . $this->mScripts;
 
// Add user JS if enabled
+   // This must use TYPE_COMBINED instead of only=scripts so that 
its request is handled by
+   // mw.loader.implement() which ensures that execution is 
scheduled after the "site" module.
if ( $this->getConfig()->get( 'AllowUserJs' )
&& $this->getUser()->isLoggedIn()
&& $this->getTitle()
&& $this->getTitle()->isJsSubpage()
&& $this->userCanPreview()
) {
-   # XXX: additional security check/prompt?
-   // We're on a preview of a JS subpage
-   // Exclude this page from the user module in case it's 
in there (bug 26283)
-   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_SCRIPTS, false,
+   // We're on a preview of a JS subpage. Exclude this 
page from the user module (T28283)
+   // and include the draft contents as a raw script 
instead.
+   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_COMBINED, false,
array( 'excludepage' => 
$this->getTitle()->getPrefixedDBkey() ), $inHead
);
// Load the previewed JS
-   $links[] = Html::inlineScript( "\n"
-   . $this->getRequest()->getText( 
'wpTextbox1' ) . "\n" ) . "\n";
+   $links[] = ResourceLoader::makeInlineScript(
+   Xml::encodeJsCall( 'mw.loader.using', array(
+   array( 'user', 'site' ),
+   new XmlJsCode(
+   'function () {'
+   . Xml::encodeJsCall( 
'$.globalEval', array(
+   
$this->getRequest()->getText( 'wpTextbox1' )
+   ) )
+   . '}'
+   )
+   ) )
+   );
 
// FIXME: If the user is previewing, say, ./vector.js, 
his ./common.js will be loaded
// asynchronously and may arrive *after* the inline 
script here. So the previewed code
-   // may execute before ./common.js runs. Normally, 
./common.js runs before ./vector.js...
+   // may execute before ./common.js runs. Normally, 
./common.js runs before ./vector.js.
+   // Similarly, when previewing ./common.js and the user 
module does arrive first, it will
+   // arrive without common.js and the inline script runs 
after. Thus running common after
+   // the excluded subpage.
} else {
// Include the user module normally, i.e., raw to avoid 
it being wrapped in a closure.
-   $links[] = $this->makeResourceLoaderLink( 'user', 
ResourceLoaderModule::TYPE_SCRIPTS,
+ 

[MediaWiki-commits] [Gerrit] Clean up mobile-reportcard reports and dashboards - change (analytics/limn-mobile-data)

2015-07-29 Thread Mforns (Code Review)
Mforns has uploaded a new change for review.

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

Change subject: Clean up mobile-reportcard reports and dashboards
..

Clean up mobile-reportcard reports and dashboards

Also moved the execution of all surviving reports to reportupdater.

Bug: T104379
Change-Id: Id9d9f558f2be806578269030c8b0a4c92ed1d2ff
---
M dashboards/reportcard.json
M mobile/config.yaml
M mobile/diff-activity.sql
M mobile/main-menu-daily.sql
A mobile/mobile-options-last-3-months.sql
M mobile/mobile-options.sql
M mobile/page-ui-daily.sql
M mobile/ui-daily-historic.sql
M mobile/watchlist-activity.sql
9 files changed, 65 insertions(+), 194 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/analytics/limn-mobile-data 
refs/changes/11/227911/1

diff --git a/dashboards/reportcard.json b/dashboards/reportcard.json
index 6003a31..cb36272 100644
--- a/dashboards/reportcard.json
+++ b/dashboards/reportcard.json
@@ -4,46 +4,15 @@
 "subhead"  : "Apps & Web",
 "tabs": [
 {
-"name": "Monthly reports",
+"name": "Main",
 "graph_ids": [
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/edits-monthly-new-active.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/edits-monthly-unique-editors.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/edits-monthly-successful.csv";
-]
-},
-{
-"name": "Edits daily",
-"graph_ids": [
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits-main.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits-newbie.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits-other.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/successful-edits-unique.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/error-edits.csv";
-]
-},
-{
-"name": "Apps",
-"graph_ids": [
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edit-funnel-total.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edit-funnel-android.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edit-funnel-ios.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edits-starts.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edits-preview.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edits-save-attempt.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-edits-success.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/app-user-blocks-en.csv";
-]
-},
-{
-"name": "Other",
-"graph_ids": [
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/mobile-options.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/thanks-daily.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/ui-daily-historic.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/main-menu-daily.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/page-ui-daily.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/watchlist-activity.csv";,
-
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/diff-activity.csv";
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/mobile-options.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/mobile-options-last-3-months.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/ui-daily-historic.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/main-menu-daily.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/page-ui-daily.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/watchlist-activity.tsv";,
+
"http://datasets.wikimedia.org/limn-public-data/mobile/datafiles/diff-activity.tsv";
 ]
 }
 ]
diff --git a/mobile/config.yaml b/mobile/config.yaml
index ccc1b75..d7a3236 100644
--- a/mobile/config.yaml
+++ b/mobile/config.yaml
@@ -4,161 +4,43 @@
 port: 3306
 creds_file: /a/.my.cnf.research
 db: lo

[MediaWiki-commits] [Gerrit] WikidataPageBanner add extension.json - change (mediawiki...WikidataPageBanner)

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

Change subject: WikidataPageBanner add extension.json
..


WikidataPageBanner add extension.json

Make WikidataPageBanner use extension registration. Add extension.json. Empty
php entry point.

Bug: T106587
Change-Id: Id1d03ebc5ce4ae63f70f267cce7368b8c80ad8fa
---
M WikidataPageBanner.php
A extension.json
D resources/Resources.php
3 files changed, 98 insertions(+), 99 deletions(-)

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



diff --git a/WikidataPageBanner.php b/WikidataPageBanner.php
index 3fbd68f..2590d11 100644
--- a/WikidataPageBanner.php
+++ b/WikidataPageBanner.php
@@ -7,51 +7,17 @@
  * @license GNU General Public Licence 2.0 or later
  */
 
-if ( !defined( 'MEDIAWIKI' ) ) {
-   die( 'This file is a MediaWiki extension, it is not a valid entry 
point' );
+if ( function_exists( 'wfLoadExtension' ) ) {
+   wfLoadExtension( 'WikidataPageBanner' );
+   // Keep i18n globals so mergeMessageFileList.php doesn't break
+   $wgMessagesDirs['WikidataPageBanner'] = __DIR__ . '/i18n';
+   $wgExtensionMessagesFiles['WikidataPageBannerMagic'] =
+   __DIR__ . '/WikidataPageBanner.i18n.magic.php';
+   /* wfWarn(
+   'Deprecated PHP entry point used for WikidataPageBanner 
extension. Please use wfLoadExtension'.
+   'instead, see 
https://www.mediawiki.org/wiki/Extension_registration for more details.'
+   ); */
+   return;
+} else {
+   die( 'This version of the WikidataPageBanner extension requires 
MediaWiki 1.25+' );
 }
-
-$wgExtensionCredits['other'][] = array(
-   'path' => __FILE__,
-   'name' => 'WikidataPageBanner',
-   'namemsg' => 'Wikidatapagebanner-extname',
-   'descriptionmsg' => 'wikidatapagebanner-desc',
-   'author' => array( 'Sumit Asthana' ),
-   'version' => '0.0.1',
-   'url' => 'https://www.mediawiki.org/wiki/Extension:WikidataPageBanner',
-   'license-name' => 'GPL-2.0+',
-);
-
-/**
- * $wgWPBImage - default pagebanner image file, use only filename, do not 
prefix 'File:',
- * e.g. $wgWPBImage = 'Foo.jpg'
- */
-$wgWPBImage = "";
-/** $wgWPBNamespace - Namespaces on which to display banner */
-$wgWPBNamespaces = array( NS_MAIN );
-/** $wgWPBStandardSizes - Array of standard predefined screen widths in 
increasing order */
-$wgWPBStandardSizes = array( 320, 640, 1280, 2560 );
-/** $wgWPBBannerProperty - Banner property on wikidata which holds commons 
media file */
-$wgWPBBannerProperty = "";
-
-/* Setup */
-// autoloader
-$wgAutoloadClasses['WikidataPageBanner'] = __DIR__ . 
'/includes/WikidataPageBanner.hooks.php';
-$wgAutoloadClasses['WikidataPageBannerFunctions'] =
-   __DIR__ . '/includes/WikidataPageBanner.functions.php';
-
-// Register files
-$wgMessagesDirs['WikidataPageBanner'] = __DIR__ . '/i18n';
-$wgExtensionMessagesFiles['WikidataPageBannerMagic'] =
-   __DIR__ . '/WikidataPageBanner.i18n.magic.php';
-
-// Register hooks
-// Hook to inject banner code
-$wgHooks['BeforePageDisplay'][] = 'WikidataPageBanner::addBanner';
-// hook to pass banner data from ParserOutput to OutputPage
-$wgHooks['OutputPageParserOutput'][] = 
'WikidataPageBanner::onOutputPageParserOutput';
-$wgHooks['ParserFirstCallInit'][] = 
'WikidataPageBanner::onParserFirstCallInit';
-$wgHooks['UnitTestsList'][] = 'WikidataPageBanner::onUnitTestsList';
-
-// include WikidataPageBanner class file
-require_once __DIR__ . "/resources/Resources.php";
diff --git a/extension.json b/extension.json
new file mode 100644
index 000..ab4ff9d
--- /dev/null
+++ b/extension.json
@@ -0,0 +1,85 @@
+{
+   "name": "WikidataPageBanner",
+   "namemsg": "Wikidatapagebanner-extname",
+   "version": "0.0.1",
+   "author": [
+   "Sumit Asthana"
+   ],
+   "url": "https://www.mediawiki.org/wiki/Extension:WikidataPageBanner";,
+   "descriptionmsg": "wikidatapagebanner-desc",
+   "license-name": "GPL-2.0+",
+   "type": "other",
+   "MessagesDirs": {
+   "WikidataPageBanner": [
+   "i18n"
+   ]
+   },
+   "ExtensionMessagesFiles": {
+   "WikidataPageBannerMagic": "WikidataPageBanner.i18n.magic.php"
+   },
+   "AutoloadClasses": {
+   "WikidataPageBanner": "includes/WikidataPageBanner.hooks.php",
+   "WikidataPageBannerFunctions": 
"includes/WikidataPageBanner.functions.php"
+   },
+   "ResourceModules": {
+   "ext.WikidataPageBanner": {
+   "styles": [
+   
"ext.WikidataPageBanner.styles/ext.WikidataPageBanner.less"
+   ],
+   "skinStyles": {
+   "minerva": 
"ext.WikidataPageBanner.styles/ext.WikidataPageBanner.minerva.less"
+   },
+   "targets": [
+

[MediaWiki-commits] [Gerrit] Add support for Finnish allative case via {{GRAMMAR:}} - change (mediawiki/core)

2015-07-29 Thread Jack Phoenix (Code Review)
Jack Phoenix has uploaded a new change for review.

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

Change subject: Add support for Finnish allative case via {{GRAMMAR:}}
..

Add support for Finnish allative case via {{GRAMMAR:}}

Probably nowhere near perfect, but it should allow us to create somewhat
better translations and avoid repeating the word "user" in Finnish
translations.

Change-Id: I0d296df4532a5addb3d9c8e47b5cdc0bdff3
---
M languages/classes/LanguageFi.php
A tests/phpunit/languages/classes/LanguageFiTest.php
2 files changed, 117 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/10/227910/1

diff --git a/languages/classes/LanguageFi.php b/languages/classes/LanguageFi.php
index a96b0a9..608069c 100644
--- a/languages/classes/LanguageFi.php
+++ b/languages/classes/LanguageFi.php
@@ -79,6 +79,43 @@
case 'inessive':
$word .= ( $aou ? 'ssa' : 'ssä' );
break;
+   case 'allative':
+   // Check for double consonants
+   // Regex borrowed from 
http://tartarus.org/martin/PorterStemmer/php.txt
+   // Needed to handle "special" cases like 
"Matti", "Pekka", etc.
+   // which need to become Matille and Pekalle, 
respectively, in
+   // allative
+   $lastFiveCharacters = substr( $word, -5 );
+   $lastFourCharacters = substr( $word, -4 );
+   if ( preg_match( '/[bcdfghjklmnpqrstvwxz]/', 
$lastFiveCharacters, $matches ) ) {
+   if ( isset( $matches[0] ) ) {
+   // @see 
http://stackoverflow.com/questions/801545/how-to-replace-double-more-letters-to-a-single-letter/801571#801571
+   // Get the last five characters 
instead of the whole $word
+   // to avoid fucking up compound 
words, since usually you
+   // should apply transformation 
only on the last word of
+   // a compound word.
+   // This is sorta stupid because 
this str_replace() runs
+   // even if $lastFiveCharacters 
does *not* contain two
+   // consecutive instances of 
$matches[0], but eh.
+   $newLastFiveCharacters = 
str_replace( $matches[0] . $matches[0], $matches[0], $lastFiveCharacters );
+   $word = str_replace( 
$lastFiveCharacters, $newLastFiveCharacters, $word );
+   }
+   }
+   if ( $lastFourCharacters === 'neni' ) {
+   // Many Finnish surnames end in -nen, 
and they are handled
+   // a bit differently...
+   // The superfluous "i" comes from the 
vowel harmony flag stuff
+   // above
+   // This transforms "Matti Meikäläinen" 
into "Matti Meikäläiselle"
+   $word = str_replace( 
$lastFourCharacters, 'se', $word );
+   }
+   // If $word is something like "Test1234" or 
whatever (last
+   // characters being numbers), the allative form 
needs to contain
+   // the colon before the "lle" suffix.
+   // @see 
http://stackoverflow.com/questions/4114609/check-if-a-string-ends-with-a-number-in-php/4114619#4114619
+   $lastCharacterIsNumeric = (bool)is_numeric( 
substr( $word, -1, 1 ) );
+   $word .= ( $lastCharacterIsNumeric ? ':' : '' ) 
. 'lle';
+   break;
}
return $word;
}
diff --git a/tests/phpunit/languages/classes/LanguageFiTest.php 
b/tests/phpunit/languages/classes/LanguageFiTest.php
new file mode 100644
index 000..5b1569b
--- /dev/null
+++ b/tests/phpunit/languages/classes/LanguageFiTest.php
@@ -0,0 +1,80 @@
+assertEquals( $result, $this->getLang()->convertGrammar( 
$word, $case ) );
+   }
+
+   public static function providerGrammar() {
+   return array(
+   array(
+   'Wikipedia',
+   'Wikipedian',
+   'genitive'
+

[MediaWiki-commits] [Gerrit] Remove new page handling from beta - change (mediawiki...MobileFrontend)

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

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

Change subject: Remove new page handling from beta
..

Remove new page handling from beta

This seems to be a dead experiment and is breaking other things.
Remove out of date comment.

Bug: T102887
Change-Id: Ia9b88cf60f9c6a0834d296b2c818df0a5e200581
---
M includes/skins/SkinMinervaBeta.php
1 file changed, 0 insertions(+), 24 deletions(-)


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

diff --git a/includes/skins/SkinMinervaBeta.php 
b/includes/skins/SkinMinervaBeta.php
index c67b907..cf5618b 100644
--- a/includes/skins/SkinMinervaBeta.php
+++ b/includes/skins/SkinMinervaBeta.php
@@ -42,9 +42,6 @@
if ( !$out ) {
$out = $this->getOutput();
}
-   # Replace page content before DOMParse to make sure images are 
scrubbed
-   # and Zero transformations are applied.
-   $this->handleNewPages( $out );
parent::outputPage( $out );
}
 
@@ -137,27 +134,6 @@
}
 
return $styles;
-   }
-
-   /**
-* Handles new pages to show error message and print message, that page 
does not exist.
-* @param OutputPage $out
-*/
-   protected function handleNewPages( OutputPage $out ) {
-   # Show error message
-   $title = $this->getTitle();
-   if ( !$title->exists()
-   && !$title->isSpecialPage()
-   && $title->userCan( 'create', $this->getUser() )
-   && $title->getNamespace() !== NS_FILE
-   ) {
-   $out->clearHTML();
-   $out->addHTML(
-   Html::openElement( 'div', array( 'id' => 
'mw-mf-newpage' ) )
-   . wfMessage( 
'mobile-frontend-editor-newpage-prompt' )->parse()
-   . Html::closeElement( 'div' )
-   );
-   }
}
 
/**

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

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

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


[MediaWiki-commits] [Gerrit] Disable a bunch of extensions on loginwiki/votewiki - change (operations/mediawiki-config)

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

Change subject: Disable a bunch of extensions on loginwiki/votewiki
..


Disable a bunch of extensions on loginwiki/votewiki

Bug: T61702
Change-Id: Ia2b06b063cdb5051c0e47b44b3d87e9c449b9b44
---
M wmf-config/CommonSettings.php
M wmf-config/InitialiseSettings.php
2 files changed, 45 insertions(+), 8 deletions(-)

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



diff --git a/wmf-config/CommonSettings.php b/wmf-config/CommonSettings.php
index e5b36ec..39ae8cd 100755
--- a/wmf-config/CommonSettings.php
+++ b/wmf-config/CommonSettings.php
@@ -352,7 +352,9 @@
 $wgFileBlacklist[] = 'txt';
 $wgFileBlacklist[] = 'mht';
 
-include( $IP . '/extensions/PagedTiffHandler/PagedTiffHandler.php' );
+if ( $wmgUsePagedTiffHandler ) {
+   include( $IP . '/extensions/PagedTiffHandler/PagedTiffHandler.php' );
+}
 $wgTiffUseTiffinfo = true;
 $wgTiffMaxMetaSize = 1048576;
 
@@ -528,9 +530,13 @@
 $wgSiteMatrixPrivateSites = MWWikiversions::readDbListFile( 
getRealmSpecificFilename( "$IP/../private.dblist" ) );
 $wgSiteMatrixFishbowlSites = MWWikiversions::readDbListFile( 
getRealmSpecificFilename( "$IP/../fishbowl.dblist" ) );
 
-ExtensionRegistry::getInstance()->queue( 
"$IP/extensions/CharInsert/extension.json" );
+if ( $wmgUseCharInsert ) {
+   ExtensionRegistry::getInstance()->queue( 
"$IP/extensions/CharInsert/extension.json" );
+}
 
-include( $IP . '/extensions/ParserFunctions/ParserFunctions.php' );
+if ( $wmgUseParserFunctions ) {
+   include( $IP . '/extensions/ParserFunctions/ParserFunctions.php' );
+}
 $wgExpensiveParserFunctionLimit = 500;
 
 if ( $wmgUseCite ) {
@@ -2055,10 +2061,12 @@
$wgCitoidServiceUrl = '//citoid.wikimedia.org/api';
 }
 
-// TemplateData enabled for all wikis - 2014-09-29
-require_once( "$IP/extensions/TemplateData/TemplateData.php" );
-// TemplateData GUI enabled for all wikis - 2014-11-06
-$wgTemplateDataUseGUI = true;
+if ( $wmgUseTemplateData ) { // T61702 - 2015-07-20
+   // TemplateData enabled for all wikis - 2014-09-29
+   require_once( "$IP/extensions/TemplateData/TemplateData.php" );
+   // TemplateData GUI enabled for all wikis - 2014-11-06
+   $wgTemplateDataUseGUI = true;
+}
 
 if ( $wmgUseGoogleNewsSitemap ) {
include( "$IP/extensions/GoogleNewsSitemap/GoogleNewsSitemap.php" );
diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index 5624afc..8648c7d 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4181,11 +4181,13 @@
'default' => true,
'advisorywiki' => false, // Per T27519
'fishbowl' => false, // Per T19718 Disable CentralNotice on 
private/fishbowl wikis
+   'loginwiki' => false, // T61702
'nonglobal' => false,
'fiwikimedia' => false, // T19718
'private' => false, // :D
'qualitywiki' => false,
'ukwikimedia' => false, // T19718 Disable CentralNotice on 
private/fishbowl wikis
+   'votewiki' => false, // T61702
 ),
 
 'wmgCentralNoticeLoader' => array(
@@ -12532,6 +12534,8 @@
 
 'wmgUseParsoid' => array(
'default' => true,
+   'loginwiki' => false, // T61702
+   'votewiki' => false, // T61702
 ),
 
 // Should a users' Cookie: headers be forwarded to Parsoid (for private wikis)
@@ -12882,8 +12886,9 @@
 
 'wmgUseMath' => array(
'default' => true, // moved from MW core
-   'loginwiki' => false,
'labswiki' => false,
+   'loginwiki' => false,
+   'votewiki' => false, // T61702
 ),
 
 'wmgUseMoodBar' => array(
@@ -14519,6 +14524,8 @@
 ),
 'wmgUseDisambiguator' => array(
'default' => true,
+   'loginwiki' => false, // T61702
+   'votewiki' => false, // T61702
 ),
 
 'wmgUseCodeEditorForCore' => array(
@@ -14715,6 +14722,8 @@
 
 'wmgUseUniversalLanguageSelector' => array(
'default' => true,
+   'loginwiki' => false, // T61702
+   'votewiki' => false, // T61702
 ),
 
 'wmgULSPosition' => array(
@@ -15224,6 +15233,26 @@
'kowikiversity' => true,
 ),
 
+'wmgUsePagedTiffHandler' => array(
+   'default' => true,
+   'loginwiki' => false, // T61702
+   'votewiki' => false, // T61702
+),
+
+'wmgUseParserFunctions' => array(
+   'default' => true,
+   'loginwiki' => false, // T61702
+),
+
+'wmgUseTemplateData' => array(
+   'default' => true,
+   'loginwiki' => false, // T61702
+   'votewiki' => false, // T61702
+),
+'wmgUseCharInsert' => array(
+   'default' => true,
+   'loginwiki' => false, // T61702
+),
 ### End (roughly) of general extensions 
 
 // Apply blocks to IPs in XFF (T25343)

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ia2b06b063cdb5051c0e47b44b3d87e9c449b9b44
Gerrit-PatchSet: 4
Ge

[MediaWiki-commits] [Gerrit] Add ferm rules for dataset NFS server - change (operations/puppet)

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

Change subject: Add ferm rules for dataset NFS server
..


Add ferm rules for dataset NFS server

Bug: T104991
Change-Id: I4da66cf7f10756f1bef1bef468f0ef3090c9cb31
---
M modules/dataset/manifests/nfs.pp
1 file changed, 23 insertions(+), 0 deletions(-)

Approvals:
  John F. Lewis: Looks good to me, but someone else must approve
  jenkins-bot: Verified
  Dzahn: Looks good to me, approved



diff --git a/modules/dataset/manifests/nfs.pp b/modules/dataset/manifests/nfs.pp
index 41391a8..2f5adb9 100644
--- a/modules/dataset/manifests/nfs.pp
+++ b/modules/dataset/manifests/nfs.pp
@@ -55,4 +55,27 @@
 check_command => 'check_tcp!2049',
 }
 
+ferm::service { 'nfs_rpc_mountd':
+proto  => 'tcp',
+port   => '32767',
+srange => '$INTERNAL',
+}
+
+ferm::service { 'nfs_rpc_statd':
+proto  => 'tcp',
+port   => '32765',
+srange => '$INTERNAL',
+}
+
+ferm::service { 'nfs_portmapper_udp':
+proto  => 'udp',
+port   => '111',
+srange => '$INTERNAL',
+}
+
+ferm::service { 'nfs_portmapper_tcp':
+proto  => 'tcp',
+port   => '111',
+srange => '$INTERNAL',
+}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4da66cf7f10756f1bef1bef468f0ef3090c9cb31
Gerrit-PatchSet: 4
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Muehlenhoff 
Gerrit-Reviewer: ArielGlenn 
Gerrit-Reviewer: Dzahn 
Gerrit-Reviewer: John F. Lewis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Clean up Redis and slayer stuff - change (mediawiki...DonationInterface)

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

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

Change subject: Clean up Redis and slayer stuff
..

Clean up Redis and slayer stuff

Doesn't affect anything.  The main thing I'd like to deploy here is an explicit
dependency on Predis--we've been flying on fumes, apparently I must have left
the library installed in vendor/ at some point in the distant past.

Change-Id: I30be99ee57f2ec4352b30a807202b075d44ea263
---
M DonationInterface.php
M composer.json
M composer.lock
M globalcollect_gateway/scripts/orphans.php
4 files changed, 74 insertions(+), 25 deletions(-)


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

diff --git a/DonationInterface.php b/DonationInterface.php
index 126cf8a..5d54f14 100644
--- a/DonationInterface.php
+++ b/DonationInterface.php
@@ -468,26 +468,29 @@
 $wgDonationInterfaceQueues = array(
// Incoming donations that we think have been paid for.
'completed' => array(),
+
// So-called limbo queue for GlobalCollect, where we store donor 
personal
// information while waiting for the donor to return from iframe or a
// redirect.  It's very important that this data is not stored anywhere
// permanent such as logs or the database, until we know this person
// finished making a donation.
// FIXME: Note that this must be an instance of KeyValueStore.
-   'globalcollect-cc-limbo' => array(
-   'type' => 'PHPQueue\Backend\Memcache',
-   'servers' => array( 'localhost' ),
-   # 30 days, in seconds
-   'expiry' => 2592000,
-   ),
-   // The general limbo queue (see above). FIXME: deprecated?
-   'limbo' => array(
-   'type' => 'PHPQueue\Backend\Memcache',
-   'servers' => array( 'localhost' ),
-   'expiry' => 2592000,
-   ),
-   // Where limbo messages go to die, if the orphan slayer decides they are
-   // still in one of the pending states.  FIXME: who reads from this 
queue?
+   //
+   // Example of a PCI-compliant queue configuration:
+   //
+   // 'globalcollect-cc-limbo' => array(
+   //  'type' => 'PHPQueue\Backend\Predis',
+   //  # Note that servers cannot be an array, due to some incompatibility
+   //  # with aggregate connections.
+   //  'servers' => 'tcp://payments1003.eqiad.net',
+   //  # 1 hour, in seconds
+   //  'expiry' => 3600,
+   //  'score_key' => 'date',
+   // ),
+   // 'limbo' => ...
+
+   // Transactions still needing action before they are settled.
+   // FIXME: who reads from this queue?
'pending' => array(),
 
// Non-critical queues
diff --git a/composer.json b/composer.json
index 65f6a1d..629394c 100644
--- a/composer.json
+++ b/composer.json
@@ -21,8 +21,9 @@
"require": {
"coderkungfu/php-queue": "dev-master",
"fusesource/stomp-php": "2.1.*",
-   "psr/log": "1.0.0",
"monolog/monolog": "1.12.0",
+   "predis/predis": "1.*",
+   "psr/log": "1.0.0",
"zordius/lightncandy": "0.18"
},
"repositories": [
diff --git a/composer.lock b/composer.lock
index 41a9c26..96c5f25 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,10 +1,10 @@
 {
 "_readme": [
 "This file locks the dependencies of your project to a known state",
-"Read more about it at 
http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
+"Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "2f350a68b09bdf7dee7b4c1a7b2d37bf",
+"hash": "548d536bcd2bbb4110e29b3d72294f1c",
 "packages": [
 {
 "name": "clio/clio",
@@ -231,6 +231,56 @@
 "time": "2014-12-29 21:29:35"
 },
 {
+"name": "predis/predis",
+"version": "v1.0.1",
+"source": {
+"type": "git",
+"url": "https://github.com/nrk/predis.git";,
+"reference": "7a170b3d8123c556597b4fbdb88631f99de180c2"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/nrk/predis/zipball/7a170b3d8123c556597b4fbdb88631f99de180c2";,
+"reference": "7a170b3d8123c556597b4fbdb88631f99de180c2",
+"shasum": ""
+},
+"require": {
+"php": ">=5.3.2"
+},
+"require-dev": {
+"phpunit/phpunit": "~4.0"
+},
+"suggest": {
+"ext-curl": "Allows access to Webdis when paired with 
phpiredis",
+"ext-phpiredis": "Allows f

[MediaWiki-commits] [Gerrit] Revert "Extend the core TemplateParser" and similar related ... - change (mediawiki...Gather)

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

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

Change subject: Revert "Extend the core TemplateParser" and similar related 
workarounds
..

Revert "Extend the core TemplateParser" and similar related workarounds

This reverts commit 4364d720c5a31f7a611783509cf4d124b049383a.

Conflicts:
extension.json
templates/CollectionsListItemCard.mustache
templates/compiled/CollectionsList.mustache.php
templates/compiled/CollectionsListItemCard.mustache.php

Bug: T104427
Change-Id: I3f9bd3699b12927c8c2ff3abfad5a708dd84c2fd
---
M composer.json
M extension.json
D includes/views/TemplateParser.php
M includes/views/helpers/Template.php
M templates/CollectionsListItemCard.mustache
D templates/compiled/CardImage.mustache.php
D templates/compiled/CollectionsList.mustache.php
D templates/compiled/CollectionsListItemCard.mustache.php
D tests/phpunit/views/TemplateParserTest.php
D tests/phpunit/views/fixtures/compiled/.gitkeep
D tests/phpunit/views/fixtures/foo.mustache
11 files changed, 5 insertions(+), 265 deletions(-)


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

diff --git a/composer.json b/composer.json
index 71c5e56..263ca10 100644
--- a/composer.json
+++ b/composer.json
@@ -6,7 +6,7 @@
"scripts": {
"test": [
"parallel-lint . --exclude vendor",
-   "phpcs 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--extensions=php,php5,inc --ignore=vendor,templates/compiled -p ."
+   "phpcs 
--standard=vendor/mediawiki/mediawiki-codesniffer/MediaWiki 
--extensions=php,php5,inc --ignore=vendor -p ."
]
}
 }
diff --git a/extension.json b/extension.json
index 6268bcd..154e07b 100644
--- a/extension.json
+++ b/extension.json
@@ -80,7 +80,6 @@
"Gather\\views\\ReportTableRow": 
"includes/views/ReportTableRow.php",
"Gather\\views\\ReportTable": "includes/views/ReportTable.php",
"Gather\\views\\Tabs": "includes/views/Tabs.php",
-   "Gather\\views\\TemplateParser": 
"includes/views/TemplateParser.php",
"Gather\\views\\helpers\\CSS": "includes/views/helpers/CSS.php",
"Gather\\views\\helpers\\Template": 
"includes/views/helpers/Template.php",
"Gather\\SpecialGather": "includes/specials/SpecialGather.php",
@@ -725,7 +724,7 @@
"GatherShouldShowTutorial": true,
"GatherAllowPublicWatchlist": false,
"GatherEnableBetaFeature": false,
-   "GatherRecompileTemplates": false,
+   "GatherEnableBetaFeature": false,
"GatherAutohideFlagLimit": 100
},
"manifest_version": 1
diff --git a/includes/views/TemplateParser.php 
b/includes/views/TemplateParser.php
deleted file mode 100644
index 90c3949..000
--- a/includes/views/TemplateParser.php
+++ /dev/null
@@ -1,91 +0,0 @@
-https://gist.github.com/anonymous/dd63bccdb955f49a1e76
- * [1] https://phabricator.wikimedia.org/T102937
- */
-class TemplateParser extends BaseTemplateParser {
-
-   /**
-* Constructs the location of the the source Mustache template and
-* where to store the compiled PHP that will be used to render it.
-*
-* @param string $templateName
-*
-* @return string[]
-* @throws \UnexpectedValueException Disallows upwards directory 
traversal via
-*  $templateName (see TemplateParser#getTemplateFilename).
-*/
-   public function getTemplateFilenames( $templateName ) {
-   $templateFilename = $this->getTemplateFilename( $templateName );
-
-   return array(
-   'template' => $templateFilename,
-   'compiled' => 
"{$this->templateDir}/compiled/{$templateName}.mustache.php",
-   );
-   }
-
-   /**
-* Returns a given template function if found, otherwise throws an 
exception.
-*
-* @param string $templateName
-*
-* @return \Closure
-* @throws Exception
-*/
-   public function getTemplate( $templateName ) {
-   if ( isset( $this->renderers[$templateName] ) ) {
-   return $this->renderers[$templateName];
-   }
-
-   $filenames = $this->getTemplateFilenames( $templateName );
-
-   if ( $this->forceRecompile ) {
-   $code = $this->compile( file_get_contents( 
$filenames['template'] ), $this->templateDir );
-
-   if ( !$code ) {
-   throw new Exception( "Failed to compile 
template '$templateName'." );
-   }
-
-   if ( !file_put_contents( $filenames['compiled'], $code 
) ) {
- 

[MediaWiki-commits] [Gerrit] Ignore debug level messages from the 'redis' logging channel - change (operations/mediawiki-config)

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

Change subject: Ignore debug level messages from the 'redis' logging channel
..


Ignore debug level messages from the 'redis' logging channel

Follow up I5fc4c68e52b13a688bdcc93d9defc9f973323241 which moved some
redis related logging from wfDebug() to debug level on the redis
channel.

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

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ea5323e..af303a1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4319,7 +4319,7 @@
'FileOperation' => 'debug',
'SwiftBackend' => 'debug', // -aaron 5/15/12
'updateTranstagOnNullRevisions' => 'debug',
-   'redis' => 'debug', // -asher 2012/10/12
+   'redis' => 'info', // -asher 2012/10/12
'memcached' => 'error', // -aaron 2012/10/24
'404' => 'debug',
'resourceloader' => 'debug',

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d3eebaf46521440b76f322faba07a13d24155a5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: BryanDavis 
Gerrit-Reviewer: Aaron Schulz 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Catrope 
Gerrit-Reviewer: Chad 
Gerrit-Reviewer: Robmoen 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Build a mutation interface similar to mwparserfromhell. - change (mediawiki...parsoid)

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

Change subject: Build a mutation interface similar to mwparserfromhell.
..


Build a mutation interface similar to mwparserfromhell.

Change-Id: I7aa14c2ef697d360cb0fcae48eb7bc308744a081
---
A guides/jsapi/README.md
M lib/index.js
A lib/jsapi.js
M tests/mocha/jsapi.js
M tests/parse.js
5 files changed, 1,090 insertions(+), 21 deletions(-)

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



diff --git a/guides/jsapi/README.md b/guides/jsapi/README.md
new file mode 100644
index 000..f3224ef
--- /dev/null
+++ b/guides/jsapi/README.md
@@ -0,0 +1,144 @@
+Usage of the JavaScript API
+===
+
+This file describes usage of Parsoid as a standalone wikitext parsing
+package, in the spirit of [`mwparserfromhell`].  This is not the typical
+use case for Parsoid; it is more often used as a network service.
+See [the HTTP API guide](#!/guide/apiuse) or [Parsoid service] on the wiki
+for more details.
+
+These examples will use the [`prfun`] library and [ES6 generators] in
+order to fluently express asynchronous operations.  The library also
+exports vanilla [`Promise`]s if you wish to maintain compatibility
+with old versions of `node` at the cost of a little bit of readability.
+
+Use as a wikitext parser is straightforward (where `text` is
+wikitext input):
+
+```
+#/usr/bin/node --harmony-generators
+var Promise = require('prfun');
+var Parsoid = require('parsoid');
+
+var main = Promise.async(function*() {
+var text = "I love wikitext!";
+var pdoc = yield Parsoid.parse(text, { pdoc: true });
+console.log(pdoc.document.outerHTML);
+});
+
+// start me up!
+main().done();
+```
+
+As you can see, there is a little bit of boilerplate needed to get the
+asynchronous machinery started.  Future code examples will be assumed
+to replace the body of the `main()` method above.
+
+The `pdoc` variable above holds a [`PDoc`] object, which has
+helpful methods to filter and manipulate the document.  If you want
+to access the raw [Parsoid DOM], however, it is easily accessible
+via the [`document`](#!/api/PDoc-property-document) property, as shown above,
+and all normal DOM manipulation functions can be used on it (Parsoid uses
+[`domino`] to implement these methods).  Be sure to call
+[`update()`](#!/api/PNode-method-update) after any direct DOM manipulation.
+[`PDoc`] is a subclass of [`PNodeList`], which provides a number of
+useful access and mutation methods -- and if you use these you won't need
+to manually call `update()`.  These provided methods can be quite useful.
+For example:
+
+```
+> var text = "I has a template! {{foo|bar|baz|eggs=spam}} See it?\n";
+> var pdoc = yield Parsoid.parse(text, { pdoc: true });
+> console.log(String(pdoc));
+I has a template! {{foo|bar|baz|eggs=spam}} See it?
+> var templates = pdoc.filterTemplates();
+> console.log(templates.map(String));
+[ '{{foo|bar|baz|eggs=spam}}' ]
+> var template = templates[0];
+> console.log(template.name);
+foo
+> template.name = 'notfoo';
+> console.log(String(template));
+{{notfoo|bar|baz|eggs=spam}}
+> console.log(template.params);
+[ '1', '2', 'eggs' ]
+> console.log(template.get(1).value);
+bar
+> console.log(template.get("eggs").value);
+spam
+```
+
+Getting nested templates is trivial:
+
+```
+> var text = "{{foo|bar={{baz|{{spam}}";
+> var pdoc = yield Parsoid.parse(text, { pdoc: true });
+> console.log(pdoc.filterTemplates().map(String));
+[ '{{foo|bar={{baz|{{spam}}',
+  '{{baz|{{spam',
+  '{{spam}}' ]
+```
+
+You can also pass `{ recursive: false }` to
+[`filterTemplates()`](#!/api/PNodeList-method-filterTemplates) and explore
+templates manually. This is possible because the
+[`get`](#!/api/PTemplate-method-get) method on a
+[`PTemplate`] object returns an object containing further [`PNodeList`]s:
+
+```
+> var text = "{{foo|this {{includes a|template";
+> var pdoc = yield Parsoid.parse(text, { pdoc: true });
+> var templates = pdoc.filterTemplates({ recursive: false });
+> console.log(templates.map(String));
+[ '{{foo|this {{includes a|template' ]
+> var foo = templates[0];
+> console.log(String(foo.get(1).value));
+this {{includes a|template}}
+> var more = foo.get(1).value.filterTemplates();
+> console.log(more.map(String));
+[ '{{includes a|template}}' ]
+> console.log(String(more[0].get(1).value));
+template
+```
+
+Templates can be easily modified to add, remove, or alter params.
+Templates also have a [`matches()`](#!/api/PTemplate-method-matches) method
+for comparing template names, which takes care of capitalization and
+white space:
+
+```
+> var text = "{{cleanup}} '''Foo''' is a [[bar]]. {{uncategorized}}";
+> var pdoc = yield Parsoid.parse(text, { pdoc: true });
+> pdoc.filterTemplates().forEach(function(template) {
+...if (template.matches('Cleanup') && !template.has('date')) {
+...template.add('date', 'July 2012');
+

[MediaWiki-commits] [Gerrit] Drop our cache ttls WAY down - change (operations/puppet)

2015-07-29 Thread Andrew Bogott (Code Review)
Andrew Bogott has submitted this change and it was merged.

Change subject: Drop our cache ttls WAY down
..


Drop our cache ttls WAY down

The pdns defaults are 20, 20, 60.  We were setting them
to 3600 which meant that in some cases you couldn't recreated
a new labs instance with a reused name for an hour.

Dropping them to 10 isn't way off from the detauls, and
10 seconds is (I predict) less than the time it takes to
delete and create a new instance.

Bug: T107325
Change-Id: I97ca47db072b3a719b90ed7eff8bb4978eeaf465
---
M modules/labs_dns/templates/pdns.conf.erb
1 file changed, 3 insertions(+), 3 deletions(-)

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



diff --git a/modules/labs_dns/templates/pdns.conf.erb 
b/modules/labs_dns/templates/pdns.conf.erb
index e28e245..add29ed 100644
--- a/modules/labs_dns/templates/pdns.conf.erb
+++ b/modules/labs_dns/templates/pdns.conf.erb
@@ -11,9 +11,9 @@
 # Change this to the actual SOA name:
 default-soa-name=<%= @dns_auth_soa_name %>
 
-query-cache-ttl=3600
-cache-ttl=3600
-negquery-cache-ttl=3600
+query-cache-ttl=10
+cache-ttl=10
+negquery-cache-ttl=10
 
 # If just geobackend is used, multithreading is unnecessary,
 # and may even impact performance.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I97ca47db072b3a719b90ed7eff8bb4978eeaf465
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Andrew Bogott 
Gerrit-Reviewer: Andrew Bogott 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Diff should be centered in beta - change (mediawiki...MobileFrontend)

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

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

Change subject: Diff should be centered in beta
..

Diff should be centered in beta

Bug: T103728
Change-Id: I58ecd8c2d049b468713a6f9f24a278378058d543
---
M includes/specials/SpecialMobileDiff.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialMobileDiff.php 
b/includes/specials/SpecialMobileDiff.php
index 1531090..d4dfd3f 100644
--- a/includes/specials/SpecialMobileDiff.php
+++ b/includes/specials/SpecialMobileDiff.php
@@ -129,7 +129,7 @@
// Allow other extensions to load more stuff here
Hooks::run( 'BeforeSpecialMobileDiffDisplay', array( &$output, 
$ctx, $revisions ) );
 
-   $output->addHtml( '' );
+   $output->addHtml( '' );
 
$this->showHeader();
$this->showDiff();

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

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

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


[MediaWiki-commits] [Gerrit] Drop our cache ttls WAY down - change (operations/puppet)

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

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

Change subject: Drop our cache ttls WAY down
..

Drop our cache ttls WAY down

The pdns defaults are 20, 20, 60.  We were setting them
to 3600 which meant that in some cases you couldn't recreated
a new labs instance with a reused name for many hours.

Dropping them to 10 isn't way off from the detauls, and
10 seconds is (I predict) less than the time it takes to
delete and create a new instance.

Bug: T107325
Change-Id: I97ca47db072b3a719b90ed7eff8bb4978eeaf465
---
M modules/labs_dns/templates/pdns.conf.erb
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/05/227905/1

diff --git a/modules/labs_dns/templates/pdns.conf.erb 
b/modules/labs_dns/templates/pdns.conf.erb
index e28e245..add29ed 100644
--- a/modules/labs_dns/templates/pdns.conf.erb
+++ b/modules/labs_dns/templates/pdns.conf.erb
@@ -11,9 +11,9 @@
 # Change this to the actual SOA name:
 default-soa-name=<%= @dns_auth_soa_name %>
 
-query-cache-ttl=3600
-cache-ttl=3600
-negquery-cache-ttl=3600
+query-cache-ttl=10
+cache-ttl=10
+negquery-cache-ttl=10
 
 # If just geobackend is used, multithreading is unnecessary,
 # and may even impact performance.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I97ca47db072b3a719b90ed7eff8bb4978eeaf465
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] Update mobileapps to 77181ea - change (mediawiki...deploy)

2015-07-29 Thread Mobrovac (Code Review)
Mobrovac has submitted this change and it was merged.

Change subject: Update mobileapps to 77181ea
..


Update mobileapps to 77181ea

List of changes:
65db9d9 Get JSON metadata embedded in HTML
9ea5c3a Prefix JSON metadata embed id with "mw-"
170808a Expanded the Lite service to break down sections into paragraphs.
8b9a992 Added ds_store to gitignore.
79d8602 Added hatnote processing.
f27d886 Start using Parsoid HTML via RESTBase
ff796e4 Add some examples of leveraging Parsoid metadata
c807854 Add tests for mobileapp-page
00148e7 Add tests for Lite route.
f1ce983 Update to service-template-node bd23818
53ccc98 Update package.json
2d40c8c Add monitoring spec and update to template v0.2.1
72a5d60 html route: make RESTBase host configurable
77181ea Switch the deploy target to 'debian'
xxx Update node module dependencies

Bug: T107315
Change-Id: I8fed9aa55f0a9d2190337ac8bce9cbcfa6481de9
---
M node_modules/bluebird/js/browser/bluebird.js
M node_modules/bluebird/js/browser/bluebird.min.js
M node_modules/bluebird/js/main/any.js
M node_modules/bluebird/js/main/assert.js
M node_modules/bluebird/js/main/async.js
D node_modules/bluebird/js/main/bind.js
M node_modules/bluebird/js/main/call_get.js
M node_modules/bluebird/js/main/cancel.js
M node_modules/bluebird/js/main/captured_trace.js
D node_modules/bluebird/js/main/debuggability.js
M node_modules/bluebird/js/main/direct_resolve.js
M node_modules/bluebird/js/main/errors.js
M node_modules/bluebird/js/main/es5.js
M node_modules/bluebird/js/main/generators.js
M node_modules/bluebird/js/main/join.js
M node_modules/bluebird/js/main/map.js
M node_modules/bluebird/js/main/nodeify.js
M node_modules/bluebird/js/main/promise.js
M node_modules/bluebird/js/main/promise_array.js
M node_modules/bluebird/js/main/promise_resolver.js
M node_modules/bluebird/js/main/promisify.js
M node_modules/bluebird/js/main/queue.js
M node_modules/bluebird/js/main/reduce.js
M node_modules/bluebird/js/main/schedule.js
M node_modules/bluebird/js/main/settle.js
M node_modules/bluebird/js/main/some.js
M node_modules/bluebird/js/main/synchronous_inspection.js
M node_modules/bluebird/js/main/thenables.js
M node_modules/bluebird/js/main/timers.js
M node_modules/bluebird/js/main/using.js
M node_modules/bluebird/js/main/util.js
A node_modules/bluebird/js/zalgo/any.js
A node_modules/bluebird/js/zalgo/assert.js
A node_modules/bluebird/js/zalgo/async.js
A node_modules/bluebird/js/zalgo/bluebird.js
A node_modules/bluebird/js/zalgo/call_get.js
A node_modules/bluebird/js/zalgo/cancel.js
A node_modules/bluebird/js/zalgo/captured_trace.js
A node_modules/bluebird/js/zalgo/catch_filter.js
A node_modules/bluebird/js/zalgo/direct_resolve.js
A node_modules/bluebird/js/zalgo/each.js
A node_modules/bluebird/js/zalgo/errors.js
A node_modules/bluebird/js/zalgo/es5.js
A node_modules/bluebird/js/zalgo/filter.js
A node_modules/bluebird/js/zalgo/finally.js
A node_modules/bluebird/js/zalgo/generators.js
A node_modules/bluebird/js/zalgo/join.js
A node_modules/bluebird/js/zalgo/map.js
A node_modules/bluebird/js/zalgo/nodeify.js
A node_modules/bluebird/js/zalgo/progress.js
A node_modules/bluebird/js/zalgo/promise.js
A node_modules/bluebird/js/zalgo/promise_array.js
A node_modules/bluebird/js/zalgo/promise_resolver.js
A node_modules/bluebird/js/zalgo/promisify.js
A node_modules/bluebird/js/zalgo/props.js
A node_modules/bluebird/js/zalgo/queue.js
A node_modules/bluebird/js/zalgo/race.js
A node_modules/bluebird/js/zalgo/reduce.js
A node_modules/bluebird/js/zalgo/schedule.js
A node_modules/bluebird/js/zalgo/settle.js
A node_modules/bluebird/js/zalgo/some.js
A node_modules/bluebird/js/zalgo/synchronous_inspection.js
A node_modules/bluebird/js/zalgo/thenables.js
A node_modules/bluebird/js/zalgo/timers.js
A node_modules/bluebird/js/zalgo/using.js
A node_modules/bluebird/js/zalgo/util.js
M node_modules/bluebird/package.json
A node_modules/bluebird/zalgo.js
M node_modules/body-parser/index.js
M node_modules/body-parser/lib/read.js
M node_modules/body-parser/lib/types/json.js
M node_modules/body-parser/lib/types/raw.js
M node_modules/body-parser/lib/types/text.js
M node_modules/body-parser/lib/types/urlencoded.js
D node_modules/body-parser/node_modules/bytes/.npmignore
D node_modules/body-parser/node_modules/bytes/Makefile
D node_modules/body-parser/node_modules/bytes/component.json
M node_modules/body-parser/node_modules/bytes/index.js
M node_modules/body-parser/node_modules/bytes/package.json
M node_modules/body-parser/node_modules/content-type/package.json
M node_modules/body-parser/node_modules/debug/node_modules/ms/package.json
M node_modules/body-parser/node_modules/debug/package.json
M node_modules/body-parser/node_modules/depd/package.json
A node_modules/body-parser/node_modules/http-errors/LICENSE
A node_modules/body-parser/node_modules/http-errors/index.js
A 
node_modules/body-parser/node_modules/http-errors/node_modules/inherits/LICENSE
A 
node_modules/body-

[MediaWiki-commits] [Gerrit] add wmf-officeit group to metawiki - change (operations/mediawiki-config)

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

Change subject: add wmf-officeit group to metawiki
..


add wmf-officeit group to metawiki

Per request by James Alexander on IRC, adding a group for wmf-officeit
with createaccount, centralauth-lock, noratelimit and tboverride.

Rights added were specifically requested.

Bug: T106724
Change-Id: I824bd2136c88d57f69b9c8d08e9304dc89088703
---
M wmf-config/InitialiseSettings.php
1 file changed, 6 insertions(+), 0 deletions(-)

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



diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ea5323e..1669f84 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -7743,6 +7743,12 @@
'reupload' => true,
'reupload-own' => true,
),
+   'wmf-officeit' => array( // T106724
+   'centralauth-lock' => true,
+   'createaccount' => true,
+   'noratelimit' => true,
+   'tboverride' => true,
+   ),
),
'mkwiki' => array(
'autopatrolled' => array( 'autopatrol' => true ),

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I824bd2136c88d57f69b9c8d08e9304dc89088703
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
Gerrit-Branch: master
Gerrit-Owner: John F. Lewis 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jalexander 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Settings dialog: Focus redirect target input when redirect i... - change (mediawiki...VisualEditor)

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

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

Change subject: Settings dialog: Focus redirect target input when redirect is 
enabled
..

Settings dialog: Focus redirect target input when redirect is enabled

Bug: T106616
Change-Id: Ia635552825194908503b8e8eef61f5fa2733a9da
---
M modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
1 file changed, 3 insertions(+), 1 deletion(-)


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

diff --git a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js 
b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
index 371a695..3ac4f37 100644
--- a/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
+++ b/modules/ve-mw/ui/pages/ve.ui.MWSettingsPage.js
@@ -196,7 +196,9 @@
 ve.ui.MWSettingsPage.prototype.onEnableRedirectChange = function ( value ) {
this.redirectTargetInput.setDisabled( !value );
this.enableStaticRedirectInput.setDisabled( !value );
-   if ( !value ) {
+   if ( value ) {
+   this.redirectTargetInput.focus();
+   } else {
this.redirectTargetInput.setValue( '' );
this.enableStaticRedirectInput.setSelected( false );
}

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

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

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


[MediaWiki-commits] [Gerrit] Refactor tooltip patch that removes tags - change (mediawiki...SecurePoll)

2015-07-29 Thread Fhocutt (Code Review)
Fhocutt has uploaded a new change for review.

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

Change subject: Refactor tooltip patch that removes  tags
..

Refactor tooltip patch that removes  tags

Bug: T32399
Change-Id: If41f90b5e94b41fe2bc4bfe148542fb0cdcd31ba
---
M includes/ballots/RadioRangeBallot.php
1 file changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/ballots/RadioRangeBallot.php 
b/includes/ballots/RadioRangeBallot.php
index 48f854e..0244e50 100644
--- a/includes/ballots/RadioRangeBallot.php
+++ b/includes/ballots/RadioRangeBallot.php
@@ -163,7 +163,7 @@
if ( $useMessageLabels ) {
foreach ( $scores as $score ) {
$signedScore = $this->addSign( $question, 
$score );
-   $labels[$score] = $question->parseMessage( 
"column$signedScore" );
+   $labels[$score] = 
$question->parseMessageInline( "column$signedScore" );
}
} else {
global $wgLang;
@@ -234,7 +234,7 @@
$s .=
Xml::tags( 'td', array(),
Xml::radio( $inputId, $score, 
!strcmp( $oldValue, $score ),
-   array( 'title' => 
Sanitizer::stripAllTags( $label ) ) )
+   array( 'title' => 
$label ) )
) . "\n";
}
$s .= "\n";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If41f90b5e94b41fe2bc4bfe148542fb0cdcd31ba
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Fhocutt 

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


[MediaWiki-commits] [Gerrit] Set nutcracker log verbosity to LOG_INFO, per deployment rec... - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has submitted this change and it was merged.

Change subject: Set nutcracker log verbosity to LOG_INFO, per deployment 
recommendations
..


Set nutcracker log verbosity to LOG_INFO, per deployment recommendations

https://github.com/twitter/twemproxy/blob/master/notes/recommendation.md#log-level

Change-Id: Id946eb56c7ed45ad6d5b14cf839ebd130231c581
---
M manifests/role/mediawiki.pp
M modules/nutcracker/manifests/init.pp
M modules/nutcracker/templates/default.erb
3 files changed, 9 insertions(+), 2 deletions(-)

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



diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 81df319..99611ae 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -61,6 +61,7 @@
 
 class { '::nutcracker':
 mbuf_size => '64k',
+verbosity => 6,  # LOG_INFO
 pools => $nutcracker_pools,
 }
 
diff --git a/modules/nutcracker/manifests/init.pp 
b/modules/nutcracker/manifests/init.pp
index baf29e0..7fe1aae 100644
--- a/modules/nutcracker/manifests/init.pp
+++ b/modules/nutcracker/manifests/init.pp
@@ -12,6 +12,9 @@
 #   /blob/b2cd3ad/notes/recommendation.md> for a discussion of this
 #   option.
 #
+# [*verbosity*]
+#   Set logging level (default: 5, min: 0, max: 11).
+#
 # [*pools*]
 #   A hash defining a nutcracker server pool.
 #   See .
@@ -32,11 +35,13 @@
 #
 class nutcracker(
 $pools,
-$mbuf_size = undef,
 $ensure= present,
+$mbuf_size = undef,
+$verbosity = 5,
 ) {
 validate_hash($pools)
 validate_re($ensure, '^(present|absent)$')
+validate_re($verbosity, '^(\d|10|11)$')
 
 package { 'nutcracker':
 ensure => $ensure,
diff --git a/modules/nutcracker/templates/default.erb 
b/modules/nutcracker/templates/default.erb
index 417b7b8..731ce3a 100644
--- a/modules/nutcracker/templates/default.erb
+++ b/modules/nutcracker/templates/default.erb
@@ -1,3 +1,4 @@
 # Default settings for nutcracker.
 # This file is managed by Puppet.
-<%- if @mbuf_size -%>DAEMON_OPTS="--mbuf-size=<%= scope.function_to_bytes 
[@mbuf_size] %>"<%- end %>
+DAEMON_OPTS="--verbose=<%= @verbosity %>"
+<%- if @mbuf_size -%>DAEMON_OPTS="$DAEMON_OPTS --mbuf-size=<%= 
scope.function_to_bytes [@mbuf_size] %>"<%- end %>

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id946eb56c7ed45ad6d5b14cf839ebd130231c581
Gerrit-PatchSet: 2
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 
Gerrit-Reviewer: Ori.livneh 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Have RedisConnectionPool explicitly implement Psr\Log\Logger... - change (mediawiki/core)

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

Change subject: Have RedisConnectionPool explicitly implement 
Psr\Log\LoggerAwareInterface
..


Have RedisConnectionPool explicitly implement Psr\Log\LoggerAwareInterface

Follows up 93f360a01b49

Change-Id: I0266be9771b7bf58de9f573249f28c6f28adf059
---
M includes/clientpool/RedisConnectionPool.php
1 file changed, 1 insertion(+), 1 deletion(-)

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



diff --git a/includes/clientpool/RedisConnectionPool.php 
b/includes/clientpool/RedisConnectionPool.php
index 0d00d11..599fb6a 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -39,7 +39,7 @@
  * @ingroup Redis
  * @since 1.21
  */
-class RedisConnectionPool {
+class RedisConnectionPool implements LoggerAwareInterface {
/**
 * @name Pool settings.
 * Settings there are shared for any connection made in this pool.

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0266be9771b7bf58de9f573249f28c6f28adf059
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Legoktm 
Gerrit-Reviewer: BryanDavis 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Set nutcracker log verbosity to LOG_INFO, per deployment rec... - change (operations/puppet)

2015-07-29 Thread Ori.livneh (Code Review)
Ori.livneh has uploaded a new change for review.

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

Change subject: Set nutcracker log verbosity to LOG_INFO, per deployment 
recommendations
..

Set nutcracker log verbosity to LOG_INFO, per deployment recommendations

https://github.com/twitter/twemproxy/blob/master/notes/recommendation.md#log-level

Change-Id: Id946eb56c7ed45ad6d5b14cf839ebd130231c581
---
M manifests/role/mediawiki.pp
M modules/nutcracker/manifests/init.pp
M modules/nutcracker/templates/default.erb
3 files changed, 9 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/02/227902/1

diff --git a/manifests/role/mediawiki.pp b/manifests/role/mediawiki.pp
index 81df319..99611ae 100644
--- a/manifests/role/mediawiki.pp
+++ b/manifests/role/mediawiki.pp
@@ -61,6 +61,7 @@
 
 class { '::nutcracker':
 mbuf_size => '64k',
+verbosity => 6,  # LOG_INFO
 pools => $nutcracker_pools,
 }
 
diff --git a/modules/nutcracker/manifests/init.pp 
b/modules/nutcracker/manifests/init.pp
index baf29e0..4884256 100644
--- a/modules/nutcracker/manifests/init.pp
+++ b/modules/nutcracker/manifests/init.pp
@@ -12,6 +12,9 @@
 #   /blob/b2cd3ad/notes/recommendation.md> for a discussion of this
 #   option.
 #
+# [*verbosity*]
+#   Set logging level (default: 5, min: 0, max: 11).
+#
 # [*pools*]
 #   A hash defining a nutcracker server pool.
 #   See .
@@ -32,11 +35,13 @@
 #
 class nutcracker(
 $pools,
-$mbuf_size = undef,
 $ensure= present,
+$mbuf_size = undef,
+$verbosity = 5,
 ) {
 validate_hash($pools)
 validate_re($ensure, '^(present|absent)$')
+validate_integer($verbosity, 0, 11)
 
 package { 'nutcracker':
 ensure => $ensure,
diff --git a/modules/nutcracker/templates/default.erb 
b/modules/nutcracker/templates/default.erb
index 417b7b8..731ce3a 100644
--- a/modules/nutcracker/templates/default.erb
+++ b/modules/nutcracker/templates/default.erb
@@ -1,3 +1,4 @@
 # Default settings for nutcracker.
 # This file is managed by Puppet.
-<%- if @mbuf_size -%>DAEMON_OPTS="--mbuf-size=<%= scope.function_to_bytes 
[@mbuf_size] %>"<%- end %>
+DAEMON_OPTS="--verbose=<%= @verbosity %>"
+<%- if @mbuf_size -%>DAEMON_OPTS="$DAEMON_OPTS --mbuf-size=<%= 
scope.function_to_bytes [@mbuf_size] %>"<%- end %>

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id946eb56c7ed45ad6d5b14cf839ebd130231c581
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh 

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


[MediaWiki-commits] [Gerrit] Have RedisConnectionPool explicitly implement Psr\Log\Logger... - change (mediawiki/core)

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

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

Change subject: Have RedisConnectionPool explicitly implement 
Psr\Log\LoggerAwareInterface
..

Have RedisConnectionPool explicitly implement Psr\Log\LoggerAwareInterface

Follows up 93f360a01b49

Change-Id: I0266be9771b7bf58de9f573249f28c6f28adf059
---
M includes/clientpool/RedisConnectionPool.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/clientpool/RedisConnectionPool.php 
b/includes/clientpool/RedisConnectionPool.php
index 0d00d11..599fb6a 100644
--- a/includes/clientpool/RedisConnectionPool.php
+++ b/includes/clientpool/RedisConnectionPool.php
@@ -39,7 +39,7 @@
  * @ingroup Redis
  * @since 1.21
  */
-class RedisConnectionPool {
+class RedisConnectionPool implements LoggerAwareInterface {
/**
 * @name Pool settings.
 * Settings there are shared for any connection made in this pool.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0266be9771b7bf58de9f573249f28c6f28adf059
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
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] Promote Tabs to production. - change (apps...wikipedia)

2015-07-29 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Promote Tabs to production.
..

Promote Tabs to production.

almost forgot!

Change-Id: Id254296acfe2755c9aa59a1cb6a0069654beb0ea
---
M wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
1 file changed, 0 insertions(+), 6 deletions(-)


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

diff --git 
a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java 
b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
index ae8710b..e15333f 100755
--- a/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
+++ b/wikipedia/src/main/java/org/wikipedia/page/PageViewFragmentInternal.java
@@ -691,12 +691,6 @@
 MenuItem themeChooserMenu = menu.findItem(R.id.menu_themechooser);
 MenuItem tabsMenu = menu.findItem(R.id.menu_show_tabs);
 
-//TODO: enable when ready for production!
-if (app.isProdRelease() && tabsMenu != null) {
-// remove the tabs button in production, for now.
-menu.removeItem(tabsMenu.getItemId());
-}
-
 if (pageLoadStrategy.isLoading()) {
 savePageMenu.setEnabled(false);
 shareMenu.setEnabled(false);

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

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

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


[MediaWiki-commits] [Gerrit] Version update: 7.6.2 -> 7.7.0 - change (operations...sentry)

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

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

Change subject: Version update: 7.6.2 -> 7.7.0
..

Version update: 7.6.2 -> 7.7.0

The sentry maintainers suggested this might solve / make easier to
debug a problem with Sentry caching.

Change-Id: I7a0ce9e087dee1b95f916288785470b1423f5435
---
M README.md
M bin/sentry
A include/python2.7
M lib/python2.7/site-packages/_cffi_backend.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_26cb75b8x62b488b1.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_590da19fxffc7b1ce.so
M 
lib/python2.7/site-packages/cryptography/_Cryptography_cffi_a269d620xd5c405b7.so
M lib/python2.7/site-packages/lxml/etree.so
M lib/python2.7/site-packages/lxml/objectify.so
R lib/python2.7/site-packages/raven-5.5.0.dist-info/DESCRIPTION.rst
R lib/python2.7/site-packages/raven-5.5.0.dist-info/METADATA
R lib/python2.7/site-packages/raven-5.5.0.dist-info/RECORD
R lib/python2.7/site-packages/raven-5.5.0.dist-info/WHEEL
R lib/python2.7/site-packages/raven-5.5.0.dist-info/entry_points.txt
R lib/python2.7/site-packages/raven-5.5.0.dist-info/metadata.json
R lib/python2.7/site-packages/raven-5.5.0.dist-info/top_level.txt
M lib/python2.7/site-packages/raven/base.py
M lib/python2.7/site-packages/raven/conf/defaults.py
M lib/python2.7/site-packages/raven/contrib/django/models.py
M lib/python2.7/site-packages/raven/contrib/flask.py
M lib/python2.7/site-packages/raven/contrib/zope/component.xml
M lib/python2.7/site-packages/raven/handlers/logging.py
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/PKG-INFO
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/SOURCES.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/dependency_links.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/entry_points.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/installed-files.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/not-zip-safe
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/requires.txt
R lib/python2.7/site-packages/sentry-7.7.0-py2.7.egg-info/top_level.txt
M lib/python2.7/site-packages/sentry/api/authentication.py
M lib/python2.7/site-packages/sentry/api/base.py
M lib/python2.7/site-packages/sentry/api/bases/group.py
M lib/python2.7/site-packages/sentry/api/client.py
M lib/python2.7/site-packages/sentry/api/endpoints/catchall.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_events_latest.py
A lib/python2.7/site-packages/sentry/api/endpoints/group_index.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_tagkey_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/group_tags.py
M 
lib/python2.7/site-packages/sentry/api/endpoints/organization_access_request_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/organization_details.py
M 
lib/python2.7/site-packages/sentry/api/endpoints/organization_member_team_details.py
M lib/python2.7/site-packages/sentry/api/endpoints/organization_teams.py
M lib/python2.7/site-packages/sentry/api/endpoints/project_group_index.py
M lib/python2.7/site-packages/sentry/api/endpoints/project_releases.py
A lib/python2.7/site-packages/sentry/api/endpoints/project_search_details.py
A lib/python2.7/site-packages/sentry/api/endpoints/project_searches.py
M lib/python2.7/site-packages/sentry/api/permissions.py
M lib/python2.7/site-packages/sentry/api/serializers/base.py
M lib/python2.7/site-packages/sentry/api/serializers/models/group.py
M lib/python2.7/site-packages/sentry/api/serializers/models/grouptagvalue.py
M lib/python2.7/site-packages/sentry/api/serializers/models/release.py
A lib/python2.7/site-packages/sentry/api/serializers/models/savedsearch.py
M lib/python2.7/site-packages/sentry/api/urls.py
M lib/python2.7/site-packages/sentry/api/views/help_base.py
M lib/python2.7/site-packages/sentry/app.py
M lib/python2.7/site-packages/sentry/auth/helper.py
M lib/python2.7/site-packages/sentry/auth/providers/oauth2.py
M lib/python2.7/site-packages/sentry/auth/view.py
M lib/python2.7/site-packages/sentry/buffer/base.py
M lib/python2.7/site-packages/sentry/buffer/redis.py
M lib/python2.7/site-packages/sentry/conf/server.py
M lib/python2.7/site-packages/sentry/conf/urls.py
M lib/python2.7/site-packages/sentry/constants.py
M lib/python2.7/site-packages/sentry/coreapi.py
M lib/python2.7/site-packages/sentry/db/models/query.py
M lib/python2.7/site-packages/sentry/db/postgres/base.py
M lib/python2.7/site-packages/sentry/db/postgres/helpers.py
M lib/python2.7/site-packages/sentry/event_manager.py
M lib/python2.7/site-packages/sentry/exceptions.py
M lib/python2.7/site-packages/sentry/http.py
M lib/python2.7/site-packages/sentry/interfaces/stacktrace.py
M lib/python2.7/site-packages/sentry/lang/javascript/processor.py
M lib/python2.7/site-packages/sentry/lang/javascript/sourcemaps.py
A l

[MediaWiki-commits] [Gerrit] Modify access rules - change (wikibase)

2015-07-29 Thread JanZerebecki (Code Review)
JanZerebecki has uploaded a new change for review.

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

Change subject: Modify access rules
..

Modify access rules
---
M groups
M project.config
2 files changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikibase refs/changes/96/227896/1

diff --git a/groups b/groups
index b56628e..56fbfff 100644
--- a/groups
+++ b/groups
@@ -1,5 +1,6 @@
 # UUID Group Name
 #
 2bc47fcadf4e44ec9a1a73bcfa06232554f47ce2   JenkinsBot
+58f296e12def7ca8f52f35079396b524838a0398   wikidata
 cc37d98e3a4301744a0c0a9249173ae170696072   l10n-bot
 d138c5c3d9a84c49008893eaaae20a0a127a201b   wikibase
diff --git a/project.config b/project.config
index aef5d50..2f4ea6d 100644
--- a/project.config
+++ b/project.config
@@ -4,5 +4,6 @@
mergeContent = true
 [access "refs/*"]
owner = group wikibase
+   owner = group wikidata
submit = group JenkinsBot
submit = group l10n-bot

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I25a3bec094cb0c9cc7551debe54db9fe0b028d76
Gerrit-PatchSet: 1
Gerrit-Project: wikibase
Gerrit-Branch: refs/meta/config
Gerrit-Owner: JanZerebecki 

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


[MediaWiki-commits] [Gerrit] Fix possible crash in History and Saved Pages. - change (apps...wikipedia)

2015-07-29 Thread Dbrant (Code Review)
Dbrant has uploaded a new change for review.

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

Change subject: Fix possible crash in History and Saved Pages.
..

Fix possible crash in History and Saved Pages.

Note: this fixes the crash, but doesn't quite answer the question of why
onLoadFinished() is sometimes called with a null Cursor...

Bug: T107355
Change-Id: I6a47bc587a0bebd2ba217511c5bcac03ec8d7600
---
M wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java
M wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java 
b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java
index 60d25fa..4506b9a 100644
--- a/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/history/HistoryFragment.java
@@ -221,7 +221,7 @@
 
 @Override
 public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
-if (!isAdded()) {
+if (!isAdded() || cursor == null) {
 return;
 }
 
diff --git 
a/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java 
b/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java
index 36f4b1b..e102423 100644
--- a/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java
+++ b/wikipedia/src/main/java/org/wikipedia/savedpages/SavedPagesFragment.java
@@ -250,7 +250,7 @@
 
 @Override
 public void onLoadFinished(Loader cursorLoader, Cursor cursor) {
-if (!isAdded()) {
+if (!isAdded() || cursor == null) {
 return;
 }
 

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

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

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


[MediaWiki-commits] [Gerrit] ButtonOptionWidget: Make it more difficult to set an inappro... - change (oojs/ui)

2015-07-29 Thread Code Review
Bartosz Dziewoński has uploaded a new change for review.

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

Change subject: ButtonOptionWidget: Make it more difficult to set an 
inappropriate 'tabIndex'
..

ButtonOptionWidget: Make it more difficult to set an inappropriate 'tabIndex'

ButtonOptionWidgets are not supposed to be focusable, since the parent
ButtonSelectWidget handles all keyboard input. Giving one a 'tabIndex'
(other than the default -1) breaks the ability to select options with
the keyboard.

Make it more difficult to do to prevent users from shooting themselves
in the leg by ignoring the 'tabIndex' passed in configuration options.
(It's still possible to call #setTabIndex after the initialization, if
someone really wants to.)

Bug: T98684
Change-Id: Iddaa1aa5b66384ef4f042ba7b7acfae3d04e25c2
---
M src/widgets/ButtonOptionWidget.js
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/oojs/ui refs/changes/94/227894/1

diff --git a/src/widgets/ButtonOptionWidget.js 
b/src/widgets/ButtonOptionWidget.js
index d064124..6edca75 100644
--- a/src/widgets/ButtonOptionWidget.js
+++ b/src/widgets/ButtonOptionWidget.js
@@ -16,14 +16,17 @@
  */
 OO.ui.ButtonOptionWidget = function OoUiButtonOptionWidget( config ) {
// Configuration initialization
-   config = $.extend( { tabIndex: -1 }, config );
+   config = config || {};
 
// Parent constructor
OO.ui.ButtonOptionWidget.parent.call( this, config );
 
// Mixin constructors
OO.ui.mixin.ButtonElement.call( this, config );
-   OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, { 
$tabIndexed: this.$button } ) );
+   OO.ui.mixin.TabIndexedElement.call( this, $.extend( {}, config, {
+   $tabIndexed: this.$button,
+   tabIndex: -1
+   } ) );
 
// Initialization
this.$element.addClass( 'oo-ui-buttonOptionWidget' );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iddaa1aa5b66384ef4f042ba7b7acfae3d04e25c2
Gerrit-PatchSet: 1
Gerrit-Project: oojs/ui
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński 

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


[MediaWiki-commits] [Gerrit] Revert "Remove wrapping around label that shows in t... - change (mediawiki...SecurePoll)

2015-07-29 Thread Fhocutt (Code Review)
Fhocutt has uploaded a new change for review.

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

Change subject: Revert "Remove  wrapping around label that shows in 
tooltip". Git review mistake. 
..

Revert "Remove  wrapping around label that shows in tooltip". Git review 
mistake. 

This reverts commit 4d029eaf5135cf190e10b2eeed0b1406493bcdf0.

Change-Id: Ic0a1668b0455799bfe5211d4ea0af2692c8e502c
---
M includes/ballots/RadioRangeBallot.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/ballots/RadioRangeBallot.php 
b/includes/ballots/RadioRangeBallot.php
index 48f854e..5e3524d 100644
--- a/includes/ballots/RadioRangeBallot.php
+++ b/includes/ballots/RadioRangeBallot.php
@@ -234,7 +234,7 @@
$s .=
Xml::tags( 'td', array(),
Xml::radio( $inputId, $score, 
!strcmp( $oldValue, $score ),
-   array( 'title' => 
Sanitizer::stripAllTags( $label ) ) )
+   array( 'title' => 
$label ) )
) . "\n";
}
$s .= "\n";

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic0a1668b0455799bfe5211d4ea0af2692c8e502c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SecurePoll
Gerrit-Branch: master
Gerrit-Owner: Fhocutt 

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


[MediaWiki-commits] [Gerrit] Ignore debug level messages from the 'redis' logging channel - change (operations/mediawiki-config)

2015-07-29 Thread BryanDavis (Code Review)
BryanDavis has uploaded a new change for review.

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

Change subject: Ignore debug level messages from the 'redis' logging channel
..

Ignore debug level messages from the 'redis' logging channel

Follow up I5fc4c68e52b13a688bdcc93d9defc9f973323241 which moved some
redis related logging from wfDebug() to debug level on the redis
channel.

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


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

diff --git a/wmf-config/InitialiseSettings.php 
b/wmf-config/InitialiseSettings.php
index ea5323e..af303a1 100644
--- a/wmf-config/InitialiseSettings.php
+++ b/wmf-config/InitialiseSettings.php
@@ -4319,7 +4319,7 @@
'FileOperation' => 'debug',
'SwiftBackend' => 'debug', // -aaron 5/15/12
'updateTranstagOnNullRevisions' => 'debug',
-   'redis' => 'debug', // -asher 2012/10/12
+   'redis' => 'info', // -asher 2012/10/12
'memcached' => 'error', // -aaron 2012/10/24
'404' => 'debug',
'resourceloader' => 'debug',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d3eebaf46521440b76f322faba07a13d24155a5
Gerrit-PatchSet: 1
Gerrit-Project: operations/mediawiki-config
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] DesktopArticleTarget-*.css: Placeholder CSS fixes for skins - change (mediawiki...VisualEditor)

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

Change subject: DesktopArticleTarget-*.css: Placeholder CSS fixes for skins
..


DesktopArticleTarget-*.css: Placeholder CSS fixes for skins

Change-Id: I8c7f98cc083c0811cd847a8b3874a586487658ca
---
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css
M modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css
2 files changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css
index a08114e..b760ee5 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-monobook.css
@@ -40,8 +40,11 @@
padding: 0;
 }
 
-.ve-init-mw-target-surface .ve-ui-surface-placeholder {
-   margin-top: -0.45em;
+.mw-body .ve-init-mw-target-surface .ve-ui-surface-placeholder > * {
+   /* Fix margin overlap */
+   margin-top: 0;
+   /* Placeholder doesn't need a border as well */
+   border: 0;
 }
 
 .ve-init-target > .ve-ui-debugBar {
diff --git 
a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css 
b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css
index af70b1f..548ef0d 100644
--- a/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css
+++ b/modules/ve-mw/init/styles/ve.init.mw.DesktopArticleTarget-vector.css
@@ -28,6 +28,13 @@
padding: 0 1.143em; /* surface-margin-left (1em) / (mw-body-content 
font-size) 0.875em */
 }
 
+.mw-body .ve-init-mw-viewPageTarget-surface .ve-ui-surface-placeholder > * {
+   /* Fix margin overlap */
+   margin-top: 0;
+   /* Placeholder doesn't need a border as well */
+   border: 0;
+}
+
 .ve-init-target,
 .ve-ui-overlay-global {
/* Enforce different font-size for all UI elements of VisualEditor */

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8c7f98cc083c0811cd847a8b3874a586487658ca
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7ae8321..f616edd - change (mediawiki/extensions)

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

Change subject: Syncronize VisualEditor: 7ae8321..f616edd
..


Syncronize VisualEditor: 7ae8321..f616edd

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

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



diff --git a/VisualEditor b/VisualEditor
index 7ae8321..f616edd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7ae83213669ebba6d8ffea92c4fdef702ac35b33
+Subproject commit f616edd3105212d915b5eda2b06ac7efd0f5be83

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

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

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


[MediaWiki-commits] [Gerrit] Syncronize VisualEditor: 7ae8321..f616edd - change (mediawiki/extensions)

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

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

Change subject: Syncronize VisualEditor: 7ae8321..f616edd
..

Syncronize VisualEditor: 7ae8321..f616edd

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


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions 
refs/changes/91/227891/1

diff --git a/VisualEditor b/VisualEditor
index 7ae8321..f616edd 16
--- a/VisualEditor
+++ b/VisualEditor
-Subproject commit 7ae83213669ebba6d8ffea92c4fdef702ac35b33
+Subproject commit f616edd3105212d915b5eda2b06ac7efd0f5be83

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

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

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


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

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

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

Change subject: Update VE core submodule to master (43652b6)
..

Update VE core submodule to master (43652b6)

New changes:
11953f7 Localisation updates from https://translatewiki.net.
0dbafb0 Update OOjs UI to v0.12.2
cbd0982 Replace placeholder color with opacity
087365c Support other types of 'empty' document placeholders
7692890 Make scrollIntoView a VE utility function
5a1a159 Localisation updates from https://translatewiki.net.
8edf71e [BREAKING CHANGE] Kill ve.indexOf and thus @until

Change-Id: I312dbd12d5291b7039067cb28b661319dc786a9c
---
M .jsduck/CustomTags.rb
M lib/ve
2 files changed, 0 insertions(+), 18 deletions(-)


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

diff --git a/.jsduck/CustomTags.rb b/.jsduck/CustomTags.rb
index 5e32a89..346079b 100644
--- a/.jsduck/CustomTags.rb
+++ b/.jsduck/CustomTags.rb
@@ -48,24 +48,6 @@
   end
 end
 
-class UntilTag < CommonTag
-  def initialize
-@tagname = :until
-@pattern = "until"
-super
-  end
-
-  def to_html(context)
-<<-EOHTML
-  Until
-  
-  This method provides browser compatibility for:
-  #{ context[@tagname].map {|tag| tag[:doc] }.join("\n") }
-  
-EOHTML
-  end
-end
-
 class SeeTag < CommonTag
   def initialize
 @tagname = :see
diff --git a/lib/ve b/lib/ve
index cb14f66..43652b6 16
--- a/lib/ve
+++ b/lib/ve
-Subproject commit cb14f66f50ace8069ba3646293cb27069b30f24c
+Subproject commit 43652b6d7b8bc9f3682e2211548d499372db971a

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I312dbd12d5291b7039067cb28b661319dc786a9c
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] adds geoIP tests - change (mediawiki...CentralNotice)

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

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

Change subject: adds geoIP tests
..

adds geoIP tests

Change-Id: Ia9e47eb8efd25e2a76279cea7fda847c09fa9c01
---
A tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js
1 file changed, 100 insertions(+), 0 deletions(-)


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

diff --git a/tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js 
b/tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js
new file mode 100644
index 000..8c867ab
--- /dev/null
+++ b/tests/qunit/subscribing/ext.centralNotice.geoIP.tests.js
@@ -0,0 +1,100 @@
+( function ( me, $ ) {
+   'use strict';
+
+   var badCookie = 'the car is on fire',
+   blankGeo = { country: '', region: '', city: '', lat: '', lon: 
'', af: 'vx' },
+   cookieName = 'GeoIP',
+   madeAjaxCall = false,
+   realAjax = $.ajax;
+
+   QUnit.module( 'ext.centralNotice.geoIP', QUnit.newMwEnvironment( {
+   setup: function () {
+   },
+   teardown: function () {
+   $.ajax = realAjax;
+   }
+   } ) );
+
+   QUnit.test( 'validCookie', 3, function ( assert ) {
+   // Geo info should already be present here.
+   assert.ok( typeof window.Geo === 'object' );
+
+   // Nuke it.
+   window.Geo = null;
+
+   // Set up the ajax smoke signal.
+   $.ajax = function () {
+   madeAjaxCall = true;
+   // .always() gets called, so support it.
+   var p = $.Deferred();
+   p.resolve();
+   return p.promise();
+   }
+
+   // Running again should reparse the cookie.
+   mw.geoIP.setWindowGeo();
+
+   // When the promise resolves, you will find these things to be 
true.
+   $.when( mw.geoIP.getPromise() ).then( function () {
+   // Should not make a background call when cookie is 
present.
+   assert.equal( madeAjaxCall, false );
+   // Should re-add geo info.
+   assert.equal( typeof window.Geo, 'object' );
+   } );
+
+   } );
+
+   QUnit.test( 'invalidCookie', 3, function ( assert ) {
+   // Save the cookie and kill it.
+   var goodCookie = $.cookie( cookieName );
+   $.removeCookie( cookieName );
+
+   // Make a broken one.
+   $.cookie( cookieName, badCookie );
+
+   // Set the ajax call up to restore it.
+   $.ajax = function () {
+   madeAjaxCall = true;
+   $.removeCookie( cookieName );
+   $.cookie( cookieName, goodCookie );
+   var p = $.Deferred();
+   p.resolve();
+   return p.promise();
+   }
+
+   // Get busy.
+   window.Geo = null;
+   mw.geoIP.setWindowGeo();
+   $.when( mw.geoIP.getPromise() ).then( function () {
+   assert.equal( madeAjaxCall, true );
+   assert.equal( $.cookie( cookieName ), goodCookie );
+   assert.equal( typeof window.Geo, 'object' );
+   } );
+   } );
+
+   QUnit.test( 'requestFails', 4, function ( assert ) {
+   // Nuke the cookie.
+   $.removeCookie( cookieName );
+
+   // Set the ajax call to fail and leave the geo data "blank"
+   $.ajax = function () {
+   madeAjaxCall = true;
+   var p = $.Deferred();
+   p.resolve();
+   return p.promise();
+   }
+
+   window.Geo = null;
+   mw.geoIP.setWindowGeo();
+   $.when( mw.geoIP.getPromise() ).then( function () {
+   // TODO I don't think this callback should be firing.
+   assert.equal( JSON.stringify( window.Geo ), 
JSON.stringify( blankGeo ) );
+   assert.equal( madeAjaxCall, true );
+   assert.equal( $.cookie( cookieName ), null );
+   assert.equal( typeof window.Geo, 'object' );
+   }, function () {
+   // TODO I think it should be this one as the promise 
gets rejected.
+   } );
+   } );
+
+}( mediaWiki, jQuery ) );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9e47eb8efd25e2a76279cea7fda847c09fa9c01
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki

[MediaWiki-commits] [Gerrit] Increase usage of assert_valid_iter_params - change (pywikibot/core)

2015-07-29 Thread John Vandenberg (Code Review)
John Vandenberg has uploaded a new change for review.

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

Change subject: Increase usage of assert_valid_iter_params
..

Increase usage of assert_valid_iter_params

Also rename APISite.loadrevisions rvdir to reverse and
provide backwards compatability for APISite.recentchanges rcdir.

Change-Id: Ia7a7620c53aa26d4fc4ae6870d275c8b73bcaf65
---
M pywikibot/page.py
M pywikibot/site.py
2 files changed, 60 insertions(+), 45 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/pywikibot/core 
refs/changes/88/227888/1

diff --git a/pywikibot/page.py b/pywikibot/page.py
index 278ed54..7f8be0d 100644
--- a/pywikibot/page.py
+++ b/pywikibot/page.py
@@ -1472,7 +1472,7 @@
   rollback=False, starttime=None, endtime=None):
 """Generator which loads the version history as Revision instances."""
 # TODO: Only request uncached revisions
-self.site.loadrevisions(self, getText=content, rvdir=reverse,
+self.site.loadrevisions(self, getText=content, reverse=reverse,
 starttime=starttime, endtime=endtime,
 step=step, total=total, rollback=rollback)
 return (self._revisions[rev] for rev in
diff --git a/pywikibot/site.py b/pywikibot/site.py
index e77315c..d5164b3 100644
--- a/pywikibot/site.py
+++ b/pywikibot/site.py
@@ -1979,16 +1979,21 @@
 'articlepath must end with /$1'
 return self.siteinfo['general']['articlepath'][:-2]
 
-def assert_valid_iter_params(self, msg_prefix, start, end, reverse):
+def assert_valid_iter_params(self, msg_prefix, start, end, reverse,
+ suffix='', exception=Error):
 """Validate iterating API parameters."""
+start_name = 'start' + suffix
+end_name = 'end' + suffix
 if reverse:
 if end < start:
-raise Error(
-"%s: end must be later than start with reverse=True" % 
msg_prefix)
+raise exception(
+'%s: %s(%r) must be greater than %s(%r) with reverse=True'
+% (msg_prefix, end_name, end, start_name, start))
 else:
 if start < end:
-raise Error(
-"%s: start must be later than end with reverse=False" % 
msg_prefix)
+raise exception(
+'%s: %s(%r) must be greater than %s(%r) with reverse=False'
+% (msg_prefix, start_name, start, end_name, end))
 
 def has_right(self, right, sysop=False):
 """Return true if and only if the user has a specific right.
@@ -3278,6 +3283,7 @@
 @type sortby: str
 @param reverse: if True, generate results in reverse order
 (default False)
+@type reverse: bool
 @param starttime: if provided, only generate pages added after this
 time; not valid unless sortby="timestamp"
 @type starttime: pywikibot.Timestamp
@@ -3316,12 +3322,15 @@
 raise ValueError(
 "categorymembers: invalid sortby value '%s'"
 % sortby)
-if starttime and endtime and starttime > endtime:
-raise ValueError(
-"categorymembers: starttime must be before endtime")
-if startsort and endsort and startsort > endsort:
-raise ValueError(
-"categorymembers: startsort must be less than endsort")
+if starttime and endtime:
+self.assert_valid_iter_params('categorymembers',
+  starttime, endtime, reverse,
+  suffix='time', exception=ValueError)
+
+if startsort and endsort:
+self.assert_valid_iter_params('categorymembers',
+  startsort, endsort, reverse,
+  suffix='sort', exception=ValueError)
 
 if isinstance(member_type, basestring):
 member_type = set([member_type])
@@ -3401,21 +3410,22 @@
 **cmargs)
 return cmgen
 
+@deprecated_args(rvdir='reverse')
 def loadrevisions(self, page, getText=False, revids=None,
   startid=None, endid=None, starttime=None,
-  endtime=None, rvdir=None, user=None, excludeuser=None,
+  endtime=None, reverse=False, user=None, excludeuser=None,
   section=None, sysop=False, step=None, total=None, 
rollback=False):
 """Retrieve and store revision information.
 
 By default, retrieves the last (current) revision of the page,
 unless any of the optional parameters revids, startid, endid,
-starttime, endtime, rvdir, user, excludeuser, or limit are
+starttime, endtime, reverse, user, excludeuser, or limit are
   

[MediaWiki-commits] [Gerrit] Make scrollIntoView a VE utility function - change (VisualEditor/VisualEditor)

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

Change subject: Make scrollIntoView a VE utility function
..


Make scrollIntoView a VE utility function

This allows it to be disabled in test mode

Bug: T107122
Change-Id: Id9b460f1a3baf6568c4634c1494c44cb54d51387
---
M src/ce/nodes/ve.ce.TableNode.js
M src/ce/ve.ce.Surface.js
M src/ve.utils.js
M tests/ve.test.utils.js
4 files changed, 12 insertions(+), 3 deletions(-)

Approvals:
  Alex Monk: Looks good to me, approved
  Jforrester: Looks good to me, but someone else must approve
  jenkins-bot: Verified



diff --git a/src/ce/nodes/ve.ce.TableNode.js b/src/ce/nodes/ve.ce.TableNode.js
index 913ccad..deb56de 100644
--- a/src/ce/nodes/ve.ce.TableNode.js
+++ b/src/ce/nodes/ve.ce.TableNode.js
@@ -432,7 +432,7 @@
.toggleClass( 've-ce-tableNodeOverlay-selection-box-fullCol', 
selection.isFullCol() );
 
if ( selectionChanged ) {
-   OO.ui.Element.static.scrollIntoView( this.$selectionBox.get( 0 
) );
+   ve.scrollIntoView( this.$selectionBox.get( 0 ) );
}
 };
 
diff --git a/src/ce/ve.ce.Surface.js b/src/ce/ve.ce.Surface.js
index 3b0281a..281d033 100644
--- a/src/ce/ve.ce.Surface.js
+++ b/src/ce/ve.ce.Surface.js
@@ -2327,7 +2327,7 @@
this.surfaceObserver.clear();
}
// If the node is outside the view, scroll to it
-   OO.ui.Element.static.scrollIntoView( 
this.focusedNode.$element.get( 0 ) );
+   ve.scrollIntoView( 
this.focusedNode.$element.get( 0 ) );
}
}
} else {
@@ -3865,7 +3865,7 @@
$( newSel.focusNode ).closest( '[contenteditable=true]' 
).focus();
} else {
// Scroll the node into view
-   OO.ui.Element.static.scrollIntoView(
+   ve.scrollIntoView(
$( newSel.focusNode ).closest( '*' ).get( 0 )
);
}
diff --git a/src/ve.utils.js b/src/ve.utils.js
index 81a0ef6..4cf791e 100644
--- a/src/ve.utils.js
+++ b/src/ve.utils.js
@@ -69,6 +69,12 @@
 ve.debounce = OO.ui.debounce;
 
 /**
+ * @method
+ * @inheritdoc OO.ui.Element#scrollIntoView
+ */
+ve.scrollIntoView = OO.ui.Element.static.scrollIntoView;
+
+/**
  * Copy an array of DOM elements, optionally into a different document.
  *
  * @param {HTMLElement[]} domElements DOM elements to copy
diff --git a/tests/ve.test.utils.js b/tests/ve.test.utils.js
index 2503da4..466c452 100644
--- a/tests/ve.test.utils.js
+++ b/tests/ve.test.utils.js
@@ -15,6 +15,9 @@
// Configure QUnit
QUnit.config.requireExpects = true;
 
+   // Disable scroll animatinos
+   ve.scrollIntoView = function () {};
+
// Extend QUnit.module to provide a fixture element. This used to be in 
tests/index.html, but
// dynamic test runners like Karma build their own web page.
( function () {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id9b460f1a3baf6568c4634c1494c44cb54d51387
Gerrit-PatchSet: 1
Gerrit-Project: VisualEditor/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Esanders 
Gerrit-Reviewer: Alex Monk 
Gerrit-Reviewer: Esanders 
Gerrit-Reviewer: Jdlrobson 
Gerrit-Reviewer: Jforrester 
Gerrit-Reviewer: Krinkle 
Gerrit-Reviewer: jenkins-bot <>

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


  1   2   3   4   >